linux-stable/arch/x86
Peter Zijlstra cdce3bf653 x86/cpu: Elide KCSAN for cpu_has() and friends
[ Upstream commit a6a5eb269f ]

As x86 uses the <asm-generic/bitops/instrumented-*.h> headers, the
regular forms of all bitops are instrumented with explicit calls to
KASAN and KCSAN checks. As these are explicit calls, these are not
suppressed by the noinstr function attribute.

This can result in calls to those check functions in noinstr code, which
objtool warns about:

vmlinux.o: warning: objtool: enter_from_user_mode+0x24: call to __kcsan_check_access() leaves .noinstr.text section
vmlinux.o: warning: objtool: syscall_enter_from_user_mode+0x28: call to __kcsan_check_access() leaves .noinstr.text section
vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare+0x24: call to __kcsan_check_access() leaves .noinstr.text section
vmlinux.o: warning: objtool: irqentry_enter_from_user_mode+0x24: call to __kcsan_check_access() leaves .noinstr.text section

Prevent this by using the arch_*() bitops, which are the underlying
bitops without explciit instrumentation.

[null: Changelog]
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220502111216.290518605@infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:41:39 +02:00
..
boot Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
configs x86/kbuild: Enable CONFIG_KALLSYMS_ALL=y in the defconfigs 2022-01-08 22:55:29 +01:00
crypto crypto: x86/chacha20 - Avoid spurious jumps to other functions 2022-05-25 09:59:00 +02:00
entry x86/sev: Annotate stack change in the #VC handler 2022-06-09 10:25:55 +02:00
events perf/amd/ibs: Use interrupt regs ip for stack unwinding 2022-06-09 10:25:49 +02:00
hyperv hyperv-next for 5.17 2022-01-16 15:53:00 +02:00
ia32 audit/stable-5.16 PR 20211101 2021-11-01 21:17:39 -07:00
include x86/cpu: Elide KCSAN for cpu_has() and friends 2022-06-14 18:41:39 +02:00
kernel mce: fix set_mce_nospec to always unmap the whole page 2022-06-09 10:26:08 +02:00
kvm KVM: LAPIC: Drop pending LAPIC timer injection when canceling the timer 2022-06-09 10:26:11 +02:00
lib x86/delay: Fix the wrong asm constraint in delay_loop() 2022-06-09 10:25:37 +02:00
math-emu x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
mm mce: fix set_mce_nospec to always unmap the whole page 2022-06-09 10:26:08 +02:00
net x86,bpf: Avoid IBT objtool warning 2022-04-20 09:36:23 +02:00
pci x86/PCI: Fix ALi M1487 (IBC) PIRQ router link value interpretation 2022-06-09 10:25:38 +02:00
platform - Get rid of all the .fixup sections because this generates 2022-01-12 16:31:19 -08:00
power x86/cpu: Load microcode during restore_processor_state() 2022-05-09 09:16:16 +02:00
purgatory x86/purgatory: Remove -nostdlib compiler flag 2021-12-30 14:13:06 +01:00
ras
realmode - Flush *all* mappings from the TLB after switching to the trampoline 2022-01-10 09:51:38 -08:00
tools x86/build: Use the proper name CONFIG_FW_LOADER 2021-12-29 22:20:38 +01:00
um um: Fix out-of-bounds read in LDT setup 2022-06-09 10:26:27 +02:00
video
xen xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32 2022-04-13 19:27:25 +02:00
.gitignore
Kbuild
Kconfig x86/microcode: Add explicit CPU vendor dependency 2022-06-09 10:25:30 +02:00
Kconfig.assembler
Kconfig.cpu x86/mmx_32: Remove X86_USE_3DNOW 2021-12-11 09:09:45 +01:00
Kconfig.debug
Makefile x86: Add straight-line-speculation mitigation 2021-12-09 13:32:25 +01:00
Makefile.um
Makefile_32.cpu