git: 7e85d20eb8f1 - stable/13 - hwpmc: Disable KASAN in pmc_save_kernel_callchain()

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Mon, 01 Nov 2021 14:33:11 UTC
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=7e85d20eb8f16f8892fda4924a601655220216ca

commit 7e85d20eb8f16f8892fda4924a601655220216ca
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-07-10 00:38:11 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-11-01 14:06:47 +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
    
    (cherry picked from commit 5d243d41b1206044cb5eddd5d48c1c711b731478)
---
 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;