Skip to content

Commit f7321ce

Browse files
author
Fox Snowpatch
committed
1 parent 5c2c0ba commit f7321ce

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

arch/powerpc/kexec/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ GCOV_PROFILE_core_$(BITS).o := n
1616
KCOV_INSTRUMENT_core_$(BITS).o := n
1717
UBSAN_SANITIZE_core_$(BITS).o := n
1818
KASAN_SANITIZE_core.o := n
19-
KASAN_SANITIZE_core_$(BITS) := n
19+
KASAN_SANITIZE_core_$(BITS).o := n

arch/powerpc/lib/vmx-helper.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,14 @@ int exit_vmx_usercopy(void)
5252
}
5353
EXPORT_SYMBOL(exit_vmx_usercopy);
5454

55-
int enter_vmx_ops(void)
55+
/*
56+
* Can be called from kexec copy_page() path with MMU off. The kexec
57+
* code sets preempt_count to HARDIRQ_OFFSET so we return early here.
58+
* Since in_interrupt() is always inline, __no_sanitize_address on this
59+
* function is sufficient to avoid KASAN shadow memory accesses in real
60+
* mode.
61+
*/
62+
int __no_sanitize_address enter_vmx_ops(void)
5663
{
5764
if (in_interrupt())
5865
return 0;

0 commit comments

Comments
 (0)