git: 5d243d41b120 - main - hwpmc: Disable KASAN in pmc_save_kernel_callchain()

Mark Johnston markj at FreeBSD.org
Sat Jul 10 00:48:09 UTC 2021


The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=5d243d41b1206044cb5eddd5d48c1c711b731478

commit 5d243d41b1206044cb5eddd5d48c1c711b731478
Author:     Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-07-10 00:38:11 +0000
Commit:     Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-07-10 00:38:50 +0000

    hwpmc: Disable KASAN in pmc_save_kernel_callchain()
    
    As in commit 831850d8b087, this routine can trigger false positives, so
    exclude it from instrumentation.
    
    Reported by:    pho
    Sponsored by:   The FreeBSD Foundation
---
 sys/dev/hwpmc/hwpmc_x86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/hwpmc/hwpmc_x86.c b/sys/dev/hwpmc/hwpmc_x86.c
index 2b2596328ec0..db6ed6fb1145 100644
--- a/sys/dev/hwpmc/hwpmc_x86.c
+++ b/sys/dev/hwpmc/hwpmc_x86.c
@@ -156,7 +156,7 @@ pmc_save_user_callchain(uintptr_t *cc, int nframes, struct trapframe *tf)
  * code, and if so we terminate our trace.
  */
 
-int
+int __nosanitizeaddress
 pmc_save_kernel_callchain(uintptr_t *cc, int nframes, struct trapframe *tf)
 {
 	int n;


More information about the dev-commits-src-all mailing list