From 557a7b21718756cb6138b282dd841ecbd53ff70c Mon Sep 17 00:00:00 2001 From: Alan Jowett Date: Tue, 3 Dec 2024 10:02:40 -0800 Subject: [PATCH] Use volatile write when writing to user buffer Signed-off-by: Alan Jowett --- libs/execution_context/ebpf_program.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/execution_context/ebpf_program.c b/libs/execution_context/ebpf_program.c index cd8c8f598b..be507b5a00 100644 --- a/libs/execution_context/ebpf_program.c +++ b/libs/execution_context/ebpf_program.c @@ -2109,7 +2109,8 @@ ebpf_program_get_info( EBPF_RETURN_RESULT(EBPF_INVALID_POINTER); } else { ebpf_map_t* map = program->maps[i]; - map_ids[i] = ebpf_map_get_id(map); + // Volatile user mode pointer. + WriteNoFence(&map_ids[i], ebpf_map_get_id(map)); } } } __except (EXCEPTION_EXECUTE_HANDLER) {