diff options
| author | Sabyrzhan Tasbolatov <[email protected]> | 2024-10-16 15:24:07 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-10-29 04:40:39 +0000 |
| commit | 1db272864ff250b5e607283eaec819e1186c8e26 (patch) | |
| tree | 5ee12584281e61b6d038027b37d886b046525372 /drivers/acpi/cppc_acpi.c | |
| parent | resource: remove dependency on SPARSEMEM from GET_FREE_REGION (diff) | |
| download | kernel-1db272864ff250b5e607283eaec819e1186c8e26.tar.gz kernel-1db272864ff250b5e607283eaec819e1186c8e26.zip | |
x86/traps: move kmsan check after instrumentation_begin
During x86_64 kernel build with CONFIG_KMSAN, the objtool warns following:
AR built-in.a
AR vmlinux.a
LD vmlinux.o
vmlinux.o: warning: objtool: handle_bug+0x4: call to
kmsan_unpoison_entry_regs() leaves .noinstr.text section
OBJCOPY modules.builtin.modinfo
GEN modules.builtin
MODPOST Module.symvers
CC .vmlinux.export.o
Moving kmsan_unpoison_entry_regs() _after_ instrumentation_begin() fixes
the warning.
There is decode_bug(regs->ip, &imm) is left before KMSAN unpoisoining, but
it has the return condition and if we include it after
instrumentation_begin() it results the warning "return with
instrumentation enabled", hence, I'm concerned that regs will not be KMSAN
unpoisoned if `ud_type == BUG_NONE` is true.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: ba54d194f8da ("x86/traps: avoid KMSAN bugs originating from handle_bug()")
Signed-off-by: Sabyrzhan Tasbolatov <[email protected]>
Reviewed-by: Alexander Potapenko <[email protected]>
Cc: Borislav Petkov (AMD) <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'drivers/acpi/cppc_acpi.c')
0 files changed, 0 insertions, 0 deletions
