From 2454c2b76dcbbf1771f4bcbf89bd95f49384e879 Mon Sep 17 00:00:00 2001 From: liwenxiang1 Date: Wed, 25 Dec 2024 19:28:03 +0800 Subject: [PATCH] arch/x86_64:Resolve the issue of abnormal interrupt numbers triggered when KASAN is enabled When assembly code calls a C function, it needs to save the context. After enabling KASAN, the inserted __asan_load8_noabort function uses the rsi register, causing the value of rsi in the interrupt handler to be modified, which results in an incorrect interrupt number. Signed-off-by: liwenxiang1 --- arch/x86_64/src/intel64/intel64_handlers.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86_64/src/intel64/intel64_handlers.c b/arch/x86_64/src/intel64/intel64_handlers.c index aca4e7981c5..2e3d1820ede 100644 --- a/arch/x86_64/src/intel64/intel64_handlers.c +++ b/arch/x86_64/src/intel64/intel64_handlers.c @@ -190,6 +190,7 @@ uint64_t *irq_handler(uint64_t *regs, uint64_t irq_no) * ****************************************************************************/ +nosanitize_address uint64_t *irq_xcp_regs(void) { /* This must be the simplest as possible, so we not use too much registers.