Skip to contentSkip to conversation

perf test x86: Fix missing __msan_unpoison

PATCH Applied Ian Rogers 3 participants 3 messages Sep 9 – Sep 10 perf events

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

PATCH 1/1 perf test x86: Fix missing __msan_unpoison

__msan_unpoison may need the sanitizer header including for its definition.

---
 tools/perf/arch/x86/tests/dwarf-unwind.c | 4 ++++
 1 file changed, 4 insertions(+)
tools/perf/arch/x86/tests/dwarf-unwind.c +4 -0
index 99d2b7ed016f..3c66dadcab75 100644
@@ -8,6 +8,10 @@
 #include "debug.h"
 #include "tests/tests.h"
 
+#if defined(MEMORY_SANITIZER) && !defined(__msan_unpoison)
+# include <sanitizer/msan_interface.h>
+#endif
+
 #define STACK_SIZE 8192
 
 static int sample_ustack(struct perf_sample *sample,
Signature · 1 line
2.55.0.1003.g10538fe699-goog
#1 lore raw
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 4 lines

__msan_unpoison may need the sanitizer header including for its definition.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Applied
#2 lore raw
In reply to Ian Rogers
Quoted 2 lines · Ian Rogers

__msan_unpoison may need the sanitizer header including for its definition.

Thanks, applied to perf-tools-next, for v7.4.

- Arnaldo

Quoted 22 lines
---
 tools/perf/arch/x86/tests/dwarf-unwind.c | 4 ++++
 1 file changed, 4 insertions(+)
tools/perf/arch/x86/tests/dwarf-unwind.c +4 -0
index 99d2b7ed016f..3c66dadcab75 100644
@@ -8,6 +8,10 @@
 #include "debug.h"
 #include "tests/tests.h"
 
+#if defined(MEMORY_SANITIZER) && !defined(__msan_unpoison)
+# include <sanitizer/msan_interface.h>
+#endif
+
 #define STACK_SIZE 8192
 
 static int sample_ustack(struct perf_sample *sample,
Signature · 1 line
2.55.0.1003.g10538fe699-goog