mirror of
https://github.com/torvalds/linux.git
synced 2024-12-13 06:32:50 +00:00
93324e6842
Instrumenting some files with KMSAN will result in kernel being unable to link, boot or crashing at runtime for various reasons (e.g. infinite recursion caused by instrumentation hooks calling instrumented code again). Completely omit KMSAN instrumentation in the following places: - arch/x86/boot and arch/x86/realmode/rm, as KMSAN doesn't work for i386; - arch/x86/entry/vdso, which isn't linked with KMSAN runtime; - three files in arch/x86/kernel - boot problems; - arch/x86/mm/cpu_entry_area.c - recursion. Link: https://lkml.kernel.org/r/20220915150417.722975-33-glider@google.com Signed-off-by: Alexander Potapenko <glider@google.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Andrey Konovalov <andreyknvl@gmail.com> Cc: Andrey Konovalov <andreyknvl@google.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Borislav Petkov <bp@alien8.de> Cc: Christoph Hellwig <hch@lst.de> Cc: Christoph Lameter <cl@linux.com> Cc: David Rientjes <rientjes@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Eric Biggers <ebiggers@google.com> Cc: Eric Biggers <ebiggers@kernel.org> Cc: Eric Dumazet <edumazet@google.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Kees Cook <keescook@chromium.org> Cc: Marco Elver <elver@google.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Petr Mladek <pmladek@suse.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Vegard Nossum <vegard.nossum@oracle.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
71 lines
2.1 KiB
Makefile
71 lines
2.1 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for x86-compatible CPU details, features and quirks
|
|
#
|
|
|
|
# Don't trace early stages of a secondary CPU boot
|
|
ifdef CONFIG_FUNCTION_TRACER
|
|
CFLAGS_REMOVE_common.o = -pg
|
|
CFLAGS_REMOVE_perf_event.o = -pg
|
|
endif
|
|
|
|
# If these files are instrumented, boot hangs during the first second.
|
|
KCOV_INSTRUMENT_common.o := n
|
|
KCOV_INSTRUMENT_perf_event.o := n
|
|
KMSAN_SANITIZE_common.o := n
|
|
|
|
# As above, instrumenting secondary CPU boot code causes boot hangs.
|
|
KCSAN_SANITIZE_common.o := n
|
|
|
|
# Make sure load_percpu_segment has no stackprotector
|
|
CFLAGS_common.o := -fno-stack-protector
|
|
|
|
obj-y := cacheinfo.o scattered.o topology.o
|
|
obj-y += common.o
|
|
obj-y += rdrand.o
|
|
obj-y += match.o
|
|
obj-y += bugs.o
|
|
obj-y += aperfmperf.o
|
|
obj-y += cpuid-deps.o
|
|
obj-y += umwait.o
|
|
|
|
obj-$(CONFIG_PROC_FS) += proc.o
|
|
obj-$(CONFIG_X86_FEATURE_NAMES) += capflags.o powerflags.o
|
|
|
|
obj-$(CONFIG_IA32_FEAT_CTL) += feat_ctl.o
|
|
ifdef CONFIG_CPU_SUP_INTEL
|
|
obj-y += intel.o intel_pconfig.o tsx.o
|
|
obj-$(CONFIG_PM) += intel_epb.o
|
|
endif
|
|
obj-$(CONFIG_CPU_SUP_AMD) += amd.o
|
|
obj-$(CONFIG_CPU_SUP_HYGON) += hygon.o
|
|
obj-$(CONFIG_CPU_SUP_CYRIX_32) += cyrix.o
|
|
obj-$(CONFIG_CPU_SUP_CENTAUR) += centaur.o
|
|
obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o
|
|
obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o
|
|
obj-$(CONFIG_CPU_SUP_ZHAOXIN) += zhaoxin.o
|
|
obj-$(CONFIG_CPU_SUP_VORTEX_32) += vortex.o
|
|
|
|
obj-$(CONFIG_X86_MCE) += mce/
|
|
obj-$(CONFIG_MTRR) += mtrr/
|
|
obj-$(CONFIG_MICROCODE) += microcode/
|
|
obj-$(CONFIG_X86_CPU_RESCTRL) += resctrl/
|
|
obj-$(CONFIG_X86_SGX) += sgx/
|
|
|
|
obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
|
|
|
|
obj-$(CONFIG_HYPERVISOR_GUEST) += vmware.o hypervisor.o mshyperv.o
|
|
obj-$(CONFIG_ACRN_GUEST) += acrn.o
|
|
|
|
ifdef CONFIG_X86_FEATURE_NAMES
|
|
quiet_cmd_mkcapflags = MKCAP $@
|
|
cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $@ $^
|
|
|
|
cpufeature = $(src)/../../include/asm/cpufeatures.h
|
|
vmxfeature = $(src)/../../include/asm/vmxfeatures.h
|
|
|
|
$(obj)/capflags.c: $(cpufeature) $(vmxfeature) $(src)/mkcapflags.sh FORCE
|
|
$(call if_changed,mkcapflags)
|
|
endif
|
|
targets += capflags.c
|