add support for Clang LTO
Subsystems (23)
Sami Tolvanen
maintainercover add support for Clang LTO
This patch series adds support for building x86_64 and arm64 kernels with Clang's Link Time Optimization (LTO).
In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI kernels since 2018.
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Note that first objtool patch in the series is already in linux-next, but as it's needed with LTO, I'm including it also here to make testing easier.
Sami Tolvanen (22):
objtool: use sh_info to find the base for .rela sections
kbuild: add support for Clang LTO
kbuild: lto: fix module versioning
kbuild: lto: fix recordmcount
kbuild: lto: postpone objtool
kbuild: lto: limit inlining
kbuild: lto: merge module sections
kbuild: lto: remove duplicate dependencies from .mod files
init: lto: ensure initcall ordering
init: lto: fix PREL32 relocations
pci: lto: fix PREL32 relocations
modpost: lto: strip .lto from module names scripts/mod: disable LTO for empty.c efi/libstub: disable LTO
drivers/misc/lkdtm: disable LTO for rodata.o
arm64: export CC_USING_PATCHABLE_FUNCTION_ENTRY
arm64: vdso: disable LTO
arm64: allow LTO_CLANG and THINLTO to be selected x86, vdso: disable LTO only for vDSO
x86, ftrace: disable recordmcount for ftrace_make_nop x86, relocs: Ignore L4_PAGE_OFFSET relocations x86, build: allow LTO_CLANG and THINLTO to be selected
.gitignore | 1 + Makefile | 27 ++- arch/Kconfig | 65 +++++++ arch/arm64/Kconfig | 2 + arch/arm64/Makefile | 1 + arch/arm64/kernel/vdso/Makefile | 4 +- arch/x86/Kconfig | 2 + arch/x86/Makefile | 5 + arch/x86/entry/vdso/Makefile | 5 +- arch/x86/kernel/ftrace.c | 1 + arch/x86/tools/relocs.c | 1 + drivers/firmware/efi/libstub/Makefile | 2 + drivers/misc/lkdtm/Makefile | 1 + include/asm-generic/vmlinux.lds.h | 12 +- include/linux/compiler-clang.h | 4 + include/linux/compiler.h | 2 +- include/linux/compiler_types.h | 4 + include/linux/init.h | 78 +++++++- include/linux/pci.h | 15 +- kernel/trace/ftrace.c | 1 + lib/Kconfig.debug | 2 +- scripts/Makefile.build | 55 +++++- scripts/Makefile.lib | 6 +- scripts/Makefile.modfinal | 40 +++- scripts/Makefile.modpost | 26 ++- scripts/generate_initcall_order.pl | 270 ++++++++++++++++++++++++++ scripts/link-vmlinux.sh | 100 +++++++++- scripts/mod/Makefile | 1 + scripts/mod/modpost.c | 16 +- scripts/mod/modpost.h | 9 + scripts/mod/sumversion.c | 6 +- scripts/module-lto.lds | 26 +++ scripts/recordmcount.c | 3 +- tools/objtool/elf.c | 2 +- 34 files changed, 737 insertions(+), 58 deletions(-) create mode 100755 scripts/generate_initcall_order.pl create mode 100644 scripts/module-lto.lds
base-commit: 26e122e97a3d0390ebec389347f64f3730fdf48f
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Sami Tolvanen
maintainerPATCH 1/22 objtool: use sh_info to find the base for .rela sections
ELF doesn't require .rela section names to match the base section. Use the section index in sh_info to find the section instead of looking it up by name.
LLD, for example, generates a .rela section that doesn't match the base section name when we merge sections in a linker script for a binary compiled with -ffunction-sections.
--- tools/objtool/elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/objtool/elf.c +1 -1
@@ -502,7 +502,7 @@ static int read_relas(struct elf *elf)if (sec->sh.sh_type !=SHT_RELA )continue ; - sec->base =find_section_by_name (elf, sec->name +5 ); + sec->base =find_section_by_index (elf, sec->sh.sh_info);if (!sec->base) {WARN ("can't find base section for rela section %s" , sec->name);
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Sami Tolvanen
maintainerPATCH 2/22 kbuild: add support for Clang LTO
In reply to Sami TolvanenThis change adds build system support for Clang's Link Time Optimization (LTO). With -flto, instead of ELF object files, Clang produces LLVM bitcode, which is compiled into native code at link time, allowing the final binary to be optimized globally. For more details, see:
https://llvm.org/docs/LinkTimeOptimization.html
The Kconfig option CONFIG_LTO_CLANG is implemented as a choice, which defaults to LTO being disabled. To use LTO, the architecture must select ARCH_SUPPORTS_LTO_CLANG and support:
- compiling with Clang,
- compiling inline assembly with Clang's integrated assembler,
- and linking with LLD.
While using full LTO results in the best runtime performance, the compilation is not scalable in time or memory. CONFIG_THINLTO enables ThinLTO, which allows parallel optimization and faster incremental builds. ThinLTO is used by default if the architecture also selects ARCH_SUPPORTS_THINLTO:
https://clang.llvm.org/docs/ThinLTO.html
To enable LTO, LLVM tools must be used to handle bitcode files. The easiest way is to pass the LLVM=1 option to make:
$ make LLVM=1 defconfig $ scripts/config -e LTO_CLANG $ make LLVM=1
Alternatively, at least the following LLVM tools must be used:
CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm
To prepare for LTO support with other compilers, common parts are gated behind the CONFIG_LTO option, and LTO can be disabled for specific files by filtering out CC_FLAGS_LTO.
Note that support for DYNAMIC_FTRACE and MODVERSIONS are added in follow-up patches.
--- Makefile | 16 ++++++++ arch/Kconfig | 66 +++++++++++++++++++++++++++++++ include/asm-generic/vmlinux.lds.h | 11 ++++-- scripts/Makefile.build | 9 ++++- scripts/Makefile.modfinal | 9 ++++- scripts/Makefile.modpost | 24 ++++++++++- scripts/link-vmlinux.sh | 32 +++++++++++---- 7 files changed, 151 insertions(+), 16 deletions(-)
Makefile +16 -0
@@ -886,6 +886,22 @@ KBUILD_CFLAGS += $(CC_FLAGS_SCS) export CC_FLAGS_SCS endif +ifdef CONFIG_LTO_CLANG +ifdef CONFIG_THINLTO +CC_FLAGS_LTO_CLANG := -flto=thin $(call cc-option, -fsplit-lto-unit) +KBUILD_LDFLAGS += --thinlto-cache-dir=.thinlto-cache +else +CC_FLAGS_LTO_CLANG := -flto +endif +CC_FLAGS_LTO_CLANG += -fvisibility=default +endif + +ifdef CONFIG_LTO +CC_FLAGS_LTO := $(CC_FLAGS_LTO_CLANG) +KBUILD_CFLAGS += $(CC_FLAGS_LTO) +export CC_FLAGS_LTO +endif + # arch Makefile may override CC so keep this after arch Makefile is included NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
arch/Kconfig +66 -0
72 lines not on this page · raw message
include/asm-generic/vmlinux.lds.h +7 -4
@@ -89,15 +89,18 @@* .data. We don't want to pull in .data..other sections, which Linux * has defined. Same for text and bss. * +* With LTO_CLANG, the linker also splits sections by default, so we need +* these macros to combine the sections during the final link. +* * RODATA_MAIN is not used because existing code already defines .rodata.x * sections to be brought in with rodata. */ -#ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION +#if defined(CONFIG_LD_DEAD_CODE_DATA_ELIMINATION ) || defined(CONFIG_LTO_CLANG )#define TEXT_MAIN .text .text.[0-9a-zA-Z_]* -#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..LPBX* +#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..L* .data..compoundliteral*#define SDATA_MAIN .sdata .sdata.[0-9a-zA-Z_]* -#define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]* -#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]* +#define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]* .rodata..L* +#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]* .bss..compoundliteral*#define SBSS_MAIN .sbss .sbss.[0-9a-zA-Z_]*#else #define TEXT_MAIN .text
scripts/Makefile.build +8 -1
@@ -108,7 +108,7 @@ endif # --------------------------------------------------------------------------- quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ - cmd_cc_s_c = $(CC) $(filter-out $(DEBUG_CFLAGS), $(c_flags)) $(DISABLE_LTO) -fverbose-asm -S -o $@ $< + cmd_cc_s_c = $(CC) $(filter-out $(DEBUG_CFLAGS) $(CC_FLAGS_LTO), $(c_flags)) -fverbose-asm -S -o $@ $< $(obj)/%.s: $(src)/%.c FORCE $(call if_changed_dep,cc_s_c)
@@ -424,8 +424,15 @@ $(obj)/lib.a: $(lib-y) FORCE # Do not replace $(filter %.o,^) with $(real-prereqs). When a single object # module is turned into a multi object module, $^ will contain header file # dependencies recorded in the .*.cmd file. +ifdef CONFIG_LTO_CLANG +quiet_cmd_link_multi-m = AR [M] $@ +cmd_link_multi-m = \ + rm -f $@; \ + $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(filter %.o,$^) +else quiet_cmd_link_multi-m = LD [M] $@ cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^) +endif $(multi-used-m): FORCE $(call if_changed,link_multi-m)
scripts/Makefile.modfinal +8 -1
@@ -6,6 +6,7 @@ PHONY := __modfinal __modfinal: +include $(objtree)/include/config/auto.conf include $(srctree)/scripts/Kbuild.include # for c_flags
@@ -29,6 +30,12 @@ quiet_cmd_cc_o_c = CC [M] $@ ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink) +ifdef CONFIG_LTO_CLANG +# With CONFIG_LTO_CLANG, reuse the object file we compiled for modpost to +# avoid a second slow LTO link +prelink-ext := .lto +endif + quiet_cmd_ld_ko_o = LD [M] $@ cmd_ld_ko_o = \ $(LD) -r $(KBUILD_LDFLAGS) \
@@ -37,7 +44,7 @@ quiet_cmd_ld_ko_o = LD [M] $@ -o $@ $(filter %.o, $^); \ $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) -$(modules): %.ko: %.o %.mod.o $(KBUILD_LDS_MODULE) FORCE +$(modules): %.ko: %$(prelink-ext).o %.mod.o $(KBUILD_LDS_MODULE) FORCE +$(call if_changed,ld_ko_o) targets += $(modules) $(modules:.ko=.mod.o)
scripts/Makefile.modpost +22 -2
@@ -102,12 +102,32 @@ $(input-symdump): @echo >&2 'WARNING: Symbol version dump "$@" is missing.' @echo >&2 ' Modules may not have dependencies or modversions.' +ifdef CONFIG_LTO_CLANG +# With CONFIG_LTO_CLANG, .o files might be LLVM bitcode, so we need to run +# LTO to compile them into native code before running modpost +prelink-ext = .lto + +quiet_cmd_cc_lto_link_modules = LTO [M] $@ +cmd_cc_lto_link_modules = \ + $(LD) $(ld_flags) -r -o $@ \ + --whole-archive $(filter-out FORCE,$^) + +%.lto.o: %.o FORCE + $(call if_changed,cc_lto_link_modules) + +PHONY += FORCE +FORCE: + +endif + +modules := $(sort $(shell cat $(MODORDER))) + # Read out modules.order to pass in modpost. # Otherwise, allmodconfig would fail with "Argument list too long". quiet_cmd_modpost = MODPOST $@ - cmd_modpost = sed 's/ko$$/o/' $< | $(MODPOST) -T - + cmd_modpost = sed 's/\.ko$$/$(prelink-ext)\.o/' $< | $(MODPOST) -T - -$(output-symdump): $(MODORDER) $(input-symdump) FORCE +$(output-symdump): $(MODORDER) $(input-symdump) $(modules:.ko=$(prelink-ext).o) FORCE $(call if_changed,modpost) targets += $(output-symdump)
scripts/link-vmlinux.sh +24 -8
@@ -52,6 +52,14 @@ modpost_link() ${KBUILD_VMLINUX_LIBS} \ --end-group" + if [ -n "${CONFIG_LTO_CLANG}" ]; then + # This might take a while, so indicate that we're doing + # an LTO link + info LTO ${1} + else + info LD ${1} + fi + ${LD} ${KBUILD_LDFLAGS} -r -o ${1} ${objects} }
@@ -99,13 +107,22 @@ vmlinux_link() fi if [ "${SRCARCH}" != "um" ]; then - objects="--whole-archive \ - ${KBUILD_VMLINUX_OBJS} \ - --no-whole-archive \ - --start-group \ - ${KBUILD_VMLINUX_LIBS} \ - --end-group \ - ${@}" + if [ -n "${CONFIG_LTO_CLANG}" ]; then + # Use vmlinux.o instead of performing the slow LTO + # link again. + objects="--whole-archive \ + vmlinux.o \ + --no-whole-archive \ + ${@}" + else + objects="--whole-archive \ + ${KBUILD_VMLINUX_OBJS} \ + --no-whole-archive \ + --start-group \ + ${KBUILD_VMLINUX_LIBS} \ + --end-group \ + ${@}" + fi ${LD} ${KBUILD_LDFLAGS} ${LDFLAGS_vmlinux} \ ${strip_debug#-Wl,} \
@@ -270,7 +287,6 @@ fi; ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1 #link vmlinux.o -info LD vmlinux.o modpost_link vmlinux.o objtool_link vmlinux.o
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Nick Desaulniers
reviewerRe: [PATCH 02/22] kbuild: add support for Clang LTO
Quoted 59 lines · Sami Tolvanen
This change adds build system support for Clang's Link Time Optimization (LTO). With -flto, instead of ELF object files, Clang produces LLVM bitcode, which is compiled into native code at link time, allowing the final binary to be optimized globally. For more details, see:
https://llvm.org/docs/LinkTimeOptimization.html
The
KconfigoptionCONFIG_LTO_CLANGis implemented as a choice, which defaults to LTO being disabled. To use LTO, the architecture must selectARCH_SUPPORTS_LTO_CLANGand support:- compiling with Clang,
- compiling inline assembly with Clang's integrated assembler,
- and linking with LLD.While using full LTO results in the best runtime performance, the compilation is not scalable in time or memory.
CONFIG_THINLTOenables ThinLTO, which allows parallel optimization and faster incremental builds. ThinLTO is used by default if the architecture also selectsARCH_SUPPORTS_THINLTO:https://clang.llvm.org/docs/ThinLTO.html
To enable LTO, LLVM tools must be used to handle bitcode files. The easiest way is to pass the LLVM=1 option to make:
$ make LLVM=1 defconfig $ scripts/config -e LTO_CLANG $ make LLVM=1Alternatively, at least the following LLVM tools must be used:
CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm
To prepare for LTO support with other compilers, common parts are gated behind the
CONFIG_LTOoption, and LTO can be disabled for specific files by filtering outCC_FLAGS_LTO.Note that support for
DYNAMIC_FTRACEand MODVERSIONS are added in follow-up patches.Signed-off-by Sami Tolvanen <[email protected]>--- Makefile | 16 ++++++++ arch/Kconfig | 66 +++++++++++++++++++++++++++++++ include/asm-generic/vmlinux.lds.h | 11 ++++-- scripts/Makefile.build | 9 ++++- scripts/Makefile.modfinal | 9 ++++- scripts/Makefile.modpost | 24 ++++++++++- scripts/link-vmlinux.sh | 32 +++++++++++---- 7 files changed, 151 insertions(+), 16 deletions(-)Makefile +0
-0
Makefile KBUILD_CFLAGS += $(CC_FLAGS_SCS) · line 891
Quoted 6 lines
Makefile +3
-0@@ -886,6 +886,22 @@ KBUILD_CFLAGS += $(CC_FLAGS_SCS) export CC_FLAGS_SCS endif +ifdef CONFIG_LTO_CLANG +ifdef CONFIG_THINLTO +CC_FLAGS_LTO_CLANG := -flto=thin $(call cc-option, -fsplit-lto-unit)
The kconfig change gates this on clang-11; do we still need the cc-option check here, or can we hardcode the use of -fsplit-lto-unit? Playing with the flag in godbolt, it looks like clang-8 had support for this flag.
Makefile KBUILD_CFLAGS += $(CC_FLAGS_SCS) · line 892
Quoted 1 line
Makefile +1
-0+KBUILD_LDFLAGS += --thinlto-cache-dir=.thinlto-cache
It might be nice to have make distclean or even make clean scrub the .thinlto-cache? Also, I verified that the .gitignore rule for .* properly ignores this dir.
Quoted 281 lines
Makefile +12
-0+else +CC_FLAGS_LTO_CLANG := -flto +endif +CC_FLAGS_LTO_CLANG += -fvisibility=default +endif + +ifdef CONFIG_LTO +CC_FLAGS_LTO := $(CC_FLAGS_LTO_CLANG) +KBUILD_CFLAGS += $(CC_FLAGS_LTO) +export CC_FLAGS_LTO +endif + # arch Makefile may override CC so keep this after arch Makefile is included NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)arch/Kconfig +66
-0@@ -552,6 +552,72 @@ config SHADOW_CALL_STACK reading and writing arbitrary memory may be able to locate them and hijack control flow by modifying the stacks. +config LTO + bool + +config ARCH_SUPPORTS_LTO_CLANG + bool + help + An architecture should select this option if it supports: + - compiling with Clang, + - compiling inline assembly with Clang's integrated assembler, + - and linking with LLD. + +config ARCH_SUPPORTS_THINLTO + bool + help + An architecture should select this option if it supports Clang's + ThinLTO. + +config THINLTO + bool "Clang ThinLTO" + depends on LTO_CLANG && ARCH_SUPPORTS_THINLTO + default y + help + This option enables Clang's ThinLTO, which allows for parallel + optimization and faster incremental compiles. More information + can be found from Clang's documentation: + + https://clang.llvm.org/docs/ThinLTO.html + +choice + prompt "Link Time Optimization (LTO)" + default LTO_NONE + help + This option enables Link Time Optimization (LTO), which allows the + compiler to optimize binaries globally. + + If unsure, select LTO_NONE. + +config LTO_NONE + bool "None" + +config LTO_CLANG + bool "Clang's Link Time Optimization (EXPERIMENTAL)" + depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD + depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm) + depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) + depends on ARCH_SUPPORTS_LTO_CLANG + depends on !FTRACE_MCOUNT_RECORD + depends on !KASAN + depends on !MODVERSIONS + select LTO + help + This option enables Clang's Link Time Optimization (LTO), which + allows the compiler to optimize the kernel globally. If you enable + this option, the compiler generates LLVM bitcode instead of ELF + object files, and the actual compilation from bitcode happens at + the LTO link step, which may take several minutes depending on the + kernel configuration. More information can be found from LLVM's + documentation: + + https://llvm.org/docs/LinkTimeOptimization.html + + To select this option, you also need to use LLVM tools to handle + the bitcode by passing LLVM=1 to make. + +endchoice + config HAVE_ARCH_WITHIN_STACK_FRAMES bool helpinclude/asm-generic/vmlinux.lds.h +7
-4@@ -89,15 +89,18 @@* .data. We don't want to pull in .data..other sections, which Linux * has defined. Same for text and bss. * +* With LTO_CLANG, the linker also splits sections by default, so we need +* these macros to combine the sections during the final link. +* * RODATA_MAIN is not used because existing code already defines .rodata.x * sections to be brought in with rodata. */ -#ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION +#if defined(CONFIG_LD_DEAD_CODE_DATA_ELIMINATION ) || defined(CONFIG_LTO_CLANG )#define TEXT_MAIN .text .text.[0-9a-zA-Z_]* -#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..LPBX* +#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..L* .data..compoundliteral*#define SDATA_MAIN .sdata .sdata.[0-9a-zA-Z_]* -#define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]* -#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]* +#define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]* .rodata..L* +#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]* .bss..compoundliteral*#define SBSS_MAIN .sbss .sbss.[0-9a-zA-Z_]*#else #define TEXT_MAIN .textscripts/Makefile.build +8
-1@@ -108,7 +108,7 @@ endif # --------------------------------------------------------------------------- quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ - cmd_cc_s_c = $(CC) $(filter-out $(DEBUG_CFLAGS), $(c_flags)) $(DISABLE_LTO) -fverbose-asm -S -o $@ $< + cmd_cc_s_c = $(CC) $(filter-out $(DEBUG_CFLAGS) $(CC_FLAGS_LTO), $(c_flags)) -fverbose-asm -S -o $@ $< $(obj)/%.s: $(src)/%.c FORCE $(call if_changed_dep,cc_s_c)@@ -424,8 +424,15 @@ $(obj)/lib.a: $(lib-y) FORCE # Do not replace $(filter %.o,^) with $(real-prereqs). When a single object # module is turned into a multi object module, $^ will contain header file # dependencies recorded in the .*.cmd file. +ifdef CONFIG_LTO_CLANG +quiet_cmd_link_multi-m = AR [M] $@ +cmd_link_multi-m = \ + rm -f $@; \ + $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(filter %.o,$^) +else quiet_cmd_link_multi-m = LD [M] $@ cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^) +endif $(multi-used-m): FORCE $(call if_changed,link_multi-m)scripts/Makefile.modfinal +8
-1@@ -6,6 +6,7 @@ PHONY := __modfinal __modfinal: +include $(objtree)/include/config/auto.conf include $(srctree)/scripts/Kbuild.include # for c_flags@@ -29,6 +30,12 @@ quiet_cmd_cc_o_c = CC [M] $@ ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink) +ifdef CONFIG_LTO_CLANG +# With CONFIG_LTO_CLANG, reuse the object file we compiled for modpost to +# avoid a second slow LTO link +prelink-ext := .lto +endif + quiet_cmd_ld_ko_o = LD [M] $@ cmd_ld_ko_o = \ $(LD) -r $(KBUILD_LDFLAGS) \@@ -37,7 +44,7 @@ quiet_cmd_ld_ko_o = LD [M] $@ -o $@ $(filter %.o, $^); \ $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) -$(modules): %.ko: %.o %.mod.o $(KBUILD_LDS_MODULE) FORCE +$(modules): %.ko: %$(prelink-ext).o %.mod.o $(KBUILD_LDS_MODULE) FORCE +$(call if_changed,ld_ko_o) targets += $(modules) $(modules:.ko=.mod.o)scripts/Makefile.modpost +22
-2@@ -102,12 +102,32 @@ $(input-symdump): @echo >&2 'WARNING: Symbol version dump "$@" is missing.' @echo >&2 ' Modules may not have dependencies or modversions.' +ifdef CONFIG_LTO_CLANG +# With CONFIG_LTO_CLANG, .o files might be LLVM bitcode, so we need to run +# LTO to compile them into native code before running modpost +prelink-ext = .lto + +quiet_cmd_cc_lto_link_modules = LTO [M] $@ +cmd_cc_lto_link_modules = \ + $(LD) $(ld_flags) -r -o $@ \ + --whole-archive $(filter-out FORCE,$^) + +%.lto.o: %.o FORCE + $(call if_changed,cc_lto_link_modules) + +PHONY += FORCE +FORCE: + +endif + +modules := $(sort $(shell cat $(MODORDER))) + # Read out modules.order to pass in modpost. # Otherwise, allmodconfig would fail with "Argument list too long". quiet_cmd_modpost = MODPOST $@ - cmd_modpost = sed 's/ko$$/o/' $< | $(MODPOST) -T - + cmd_modpost = sed 's/\.ko$$/$(prelink-ext)\.o/' $< | $(MODPOST) -T - -$(output-symdump): $(MODORDER) $(input-symdump) FORCE +$(output-symdump): $(MODORDER) $(input-symdump) $(modules:.ko=$(prelink-ext).o) FORCE $(call if_changed,modpost) targets += $(output-symdump)scripts/link-vmlinux.sh +24
-9@@ -52,6 +52,14 @@ modpost_link() ${KBUILD_VMLINUX_LIBS} \ --end-group" + if [ -n "${CONFIG_LTO_CLANG}" ]; then + # This might take a while, so indicate that we're doing + # an LTO link + info LTO ${1} + else + info LD ${1} + fi + ${LD} ${KBUILD_LDFLAGS} -r -o ${1} ${objects} }@@ -99,13 +107,22 @@ vmlinux_link() fi if [ "${SRCARCH}" != "um" ]; then - objects="--whole-archive \ - ${KBUILD_VMLINUX_OBJS} \ - --no-whole-archive \ - --start-group \ - ${KBUILD_VMLINUX_LIBS} \ - --end-group \ - ${@}" + if [ -n "${CONFIG_LTO_CLANG}" ]; then + # Use vmlinux.o instead of performing the slow LTO + # link again. + objects="--whole-archive \ + vmlinux.o \ + --no-whole-archive \ + ${@}" + else + objects="--whole-archive \ + ${KBUILD_VMLINUX_OBJS} \ + --no-whole-archive \ + --start-group \ + ${KBUILD_VMLINUX_LIBS} \ + --end-group \ + ${@}" + fi ${LD} ${KBUILD_LDFLAGS} ${LDFLAGS_vmlinux} \ ${strip_debug#-Wl,} \@@ -270,7 +287,6 @@ fi; ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1 #link vmlinux.o -info LD vmlinux.o modpost_link vmlinux.o objtool_link vmlinux.o --2.27.0.212.ge8ba1cc988-goog
Signature · 2 lines
Thanks, ~Nick Desaulniers
Sami Tolvanen
maintainerRe: [PATCH 02/22] kbuild: add support for Clang LTO
Quoted 10 lines · Nick Desaulniers
Quoted 9 lines · Sami Tolvanen
Makefile +0
-0@@ -886,6 +886,22 @@ KBUILD_CFLAGS += $(CC_FLAGS_SCS) export CC_FLAGS_SCS endif
Quoted 8 lines
Makefile KBUILD_CFLAGS += $(CC_FLAGS_SCS) · line 891
Quoted 3 lines
Makefile +3
-0+ifdef CONFIG_LTO_CLANG +ifdef CONFIG_THINLTO +CC_FLAGS_LTO_CLANG := -flto=thin $(call cc-option, -fsplit-lto-unit)The kconfig change gates this on clang-11; do we still need the cc-option check here, or can we hardcode the use of -fsplit-lto-unit? Playing with the flag in godbolt, it looks like clang-8 had support for this flag.
True, we don't need cc-option here anymore. I'll remove it, thanks.
Quoted 5 lines
Makefile KBUILD_CFLAGS += $(CC_FLAGS_SCS) · line 892
Quoted 1 line
Makefile +1
-0+KBUILD_LDFLAGS += --thinlto-cache-dir=.thinlto-cacheIt might be nice to have
make distcleanor evenmake cleanscrub the .thinlto-cache? Also, I verified that the.gitignorerule for.*properly ignores this dir.
Sure, distclean sounds appropriate to me.
Sami
Re: [PATCH 02/22] kbuild: add support for Clang LTO
In reply to Sami TolvanenHi Sami,
Quoted 121 lines · Sami Tolvanen' via Clang Built Linux
This change adds build system support for Clang's Link Time Optimization (LTO). With -flto, instead of ELF object files, Clang produces LLVM bitcode, which is compiled into native code at link time, allowing the final binary to be optimized globally. For more details, see:
https://llvm.org/docs/LinkTimeOptimization.html
The
KconfigoptionCONFIG_LTO_CLANGis implemented as a choice, which defaults to LTO being disabled. To use LTO, the architecture must selectARCH_SUPPORTS_LTO_CLANGand support:- compiling with Clang,
- compiling inline assembly with Clang's integrated assembler,
- and linking with LLD.While using full LTO results in the best runtime performance, the compilation is not scalable in time or memory.
CONFIG_THINLTOenables ThinLTO, which allows parallel optimization and faster incremental builds. ThinLTO is used by default if the architecture also selectsARCH_SUPPORTS_THINLTO:https://clang.llvm.org/docs/ThinLTO.html
To enable LTO, LLVM tools must be used to handle bitcode files. The easiest way is to pass the LLVM=1 option to make:
$ make LLVM=1 defconfig $ scripts/config -e LTO_CLANG $ make LLVM=1Alternatively, at least the following LLVM tools must be used:
CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm
To prepare for LTO support with other compilers, common parts are gated behind the
CONFIG_LTOoption, and LTO can be disabled for specific files by filtering outCC_FLAGS_LTO.Note that support for
DYNAMIC_FTRACEand MODVERSIONS are added in follow-up patches.Signed-off-by Sami Tolvanen <[email protected]>--- Makefile | 16 ++++++++ arch/Kconfig | 66 +++++++++++++++++++++++++++++++ include/asm-generic/vmlinux.lds.h | 11 ++++-- scripts/Makefile.build | 9 ++++- scripts/Makefile.modfinal | 9 ++++- scripts/Makefile.modpost | 24 ++++++++++- scripts/link-vmlinux.sh | 32 +++++++++++---- 7 files changed, 151 insertions(+), 16 deletions(-)Makefile +16
-0@@ -886,6 +886,22 @@ KBUILD_CFLAGS += $(CC_FLAGS_SCS) export CC_FLAGS_SCS endif +ifdef CONFIG_LTO_CLANG +ifdef CONFIG_THINLTO +CC_FLAGS_LTO_CLANG := -flto=thin $(call cc-option, -fsplit-lto-unit) +KBUILD_LDFLAGS += --thinlto-cache-dir=.thinlto-cache +else +CC_FLAGS_LTO_CLANG := -flto +endif +CC_FLAGS_LTO_CLANG += -fvisibility=default +endif + +ifdef CONFIG_LTO +CC_FLAGS_LTO := $(CC_FLAGS_LTO_CLANG) +KBUILD_CFLAGS += $(CC_FLAGS_LTO) +export CC_FLAGS_LTO +endif + # arch Makefile may override CC so keep this after arch Makefile is included NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)arch/Kconfig +33
-0@@ -552,6 +552,72 @@ config SHADOW_CALL_STACK reading and writing arbitrary memory may be able to locate them and hijack control flow by modifying the stacks. +config LTO + bool + +config ARCH_SUPPORTS_LTO_CLANG + bool + help + An architecture should select this option if it supports: + - compiling with Clang, + - compiling inline assembly with Clang's integrated assembler, + - and linking with LLD. + +config ARCH_SUPPORTS_THINLTO + bool + help + An architecture should select this option if it supports Clang's + ThinLTO. + +config THINLTO + bool "Clang ThinLTO" + depends on LTO_CLANG && ARCH_SUPPORTS_THINLTO + default y + help + This option enables Clang's ThinLTO, which allows for parallel + optimization and faster incremental compiles. More information + can be found from Clang's documentation: + + https://clang.llvm.org/docs/ThinLTO.html + +choice + prompt "Link Time Optimization (LTO)" + default LTO_NONE + help + This option enables Link Time Optimization (LTO), which allows the
arch/Kconfig config SHADOW_CALL_STACK · line 597
Quoted 10 lines
arch/Kconfig +10
-0+ compiler to optimize binaries globally. + + If unsure, select LTO_NONE. + +config LTO_NONE + bool "None" + +config LTO_CLANG + bool "Clang's Link Time Optimization (EXPERIMENTAL)" + depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD
I am curious, what is the reason for gating this at clang 11.0.0?
Presumably this? https://github.com/ClangBuiltLinux/linux/issues/510
It might be nice to notate this so that we do not have to wonder :)
Cheers,
Nathan
Sami Tolvanen
maintainerRe: [PATCH 02/22] kbuild: add support for Clang LTO
Quoted 137 lines · Nathan Chancellor
Hi Sami,
Quoted 121 lines · Sami Tolvanen' via Clang Built Linux
This change adds build system support for Clang's Link Time Optimization (LTO). With -flto, instead of ELF object files, Clang produces LLVM bitcode, which is compiled into native code at link time, allowing the final binary to be optimized globally. For more details, see:
https://llvm.org/docs/LinkTimeOptimization.html
The
KconfigoptionCONFIG_LTO_CLANGis implemented as a choice, which defaults to LTO being disabled. To use LTO, the architecture must selectARCH_SUPPORTS_LTO_CLANGand support:- compiling with Clang,
- compiling inline assembly with Clang's integrated assembler,
- and linking with LLD.While using full LTO results in the best runtime performance, the compilation is not scalable in time or memory.
CONFIG_THINLTOenables ThinLTO, which allows parallel optimization and faster incremental builds. ThinLTO is used by default if the architecture also selectsARCH_SUPPORTS_THINLTO:https://clang.llvm.org/docs/ThinLTO.html
To enable LTO, LLVM tools must be used to handle bitcode files. The easiest way is to pass the LLVM=1 option to make:
$ make LLVM=1 defconfig $ scripts/config -e LTO_CLANG $ make LLVM=1Alternatively, at least the following LLVM tools must be used:
CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm
To prepare for LTO support with other compilers, common parts are gated behind the
CONFIG_LTOoption, and LTO can be disabled for specific files by filtering outCC_FLAGS_LTO.Note that support for
DYNAMIC_FTRACEand MODVERSIONS are added in follow-up patches.Signed-off-by Sami Tolvanen <[email protected]>--- Makefile | 16 ++++++++ arch/Kconfig | 66 +++++++++++++++++++++++++++++++ include/asm-generic/vmlinux.lds.h | 11 ++++-- scripts/Makefile.build | 9 ++++- scripts/Makefile.modfinal | 9 ++++- scripts/Makefile.modpost | 24 ++++++++++- scripts/link-vmlinux.sh | 32 +++++++++++---- 7 files changed, 151 insertions(+), 16 deletions(-)Makefile +16
-0@@ -886,6 +886,22 @@ KBUILD_CFLAGS += $(CC_FLAGS_SCS) export CC_FLAGS_SCS endif +ifdef CONFIG_LTO_CLANG +ifdef CONFIG_THINLTO +CC_FLAGS_LTO_CLANG := -flto=thin $(call cc-option, -fsplit-lto-unit) +KBUILD_LDFLAGS += --thinlto-cache-dir=.thinlto-cache +else +CC_FLAGS_LTO_CLANG := -flto +endif +CC_FLAGS_LTO_CLANG += -fvisibility=default +endif + +ifdef CONFIG_LTO +CC_FLAGS_LTO := $(CC_FLAGS_LTO_CLANG) +KBUILD_CFLAGS += $(CC_FLAGS_LTO) +export CC_FLAGS_LTO +endif + # arch Makefile may override CC so keep this after arch Makefile is included NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)arch/Kconfig +33
-0@@ -552,6 +552,72 @@ config SHADOW_CALL_STACK reading and writing arbitrary memory may be able to locate them and hijack control flow by modifying the stacks. +config LTO + bool + +config ARCH_SUPPORTS_LTO_CLANG + bool + help + An architecture should select this option if it supports: + - compiling with Clang, + - compiling inline assembly with Clang's integrated assembler, + - and linking with LLD. + +config ARCH_SUPPORTS_THINLTO + bool + help + An architecture should select this option if it supports Clang's + ThinLTO. + +config THINLTO + bool "Clang ThinLTO" + depends on LTO_CLANG && ARCH_SUPPORTS_THINLTO + default y + help + This option enables Clang's ThinLTO, which allows for parallel + optimization and faster incremental compiles. More information + can be found from Clang's documentation: + + https://clang.llvm.org/docs/ThinLTO.html + +choice + prompt "Link Time Optimization (LTO)" + default LTO_NONE + help + This option enables Link Time Optimization (LTO), which allows thearch/Kconfig config SHADOW_CALL_STACK · line 597
Quoted 10 lines
arch/Kconfig +10
-0+ compiler to optimize binaries globally. + + If unsure, select LTO_NONE. + +config LTO_NONE + bool "None" + +config LTO_CLANG + bool "Clang's Link Time Optimization (EXPERIMENTAL)" + depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLDI am curious, what is the reason for gating this at clang 11.0.0?
Quoted 3 lines
Presumably this? https://github.com/ClangBuiltLinux/linux/issues/510
It might be nice to notate this so that we do not have to wonder :)
Yes, that's the reason. I'll add a note about it. Thanks!
Sami
Sami Tolvanen
maintainerPATCH 3/22 kbuild: lto: fix module versioning
In reply to Sami TolvanenWith CONFIG_MODVERSIONS, version information is linked into each compilation unit that exports symbols. With LTO, we cannot use this method as all C code is compiled into LLVM bitcode instead. This change collects symbol versions into .symversions files and merges them in link-vmlinux.sh where they are all linked into vmlinux.o at the same time.
--- .gitignore | 1 + Makefile | 3 ++- arch/Kconfig | 1 - scripts/Makefile.build | 33 +++++++++++++++++++++++++++++++-- scripts/Makefile.modpost | 2 ++ scripts/link-vmlinux.sh | 25 ++++++++++++++++++++++++- 6 files changed, 60 insertions(+), 5 deletions(-)
.gitignore +1 -0
@@ -41,6 +41,7 @@ *.so.dbg *.su *.symtypes +*.symversions *.tab.[ch] *.tar *.xz
Makefile +2 -1
@@ -1793,7 +1793,8 @@ clean: $(clean-dirs) -o -name '.tmp_*.o.*' \ -o -name '*.c.[012]*.*' \ -o -name '*.ll' \ - -o -name '*.gcno' \) -type f -print | xargs rm -f + -o -name '*.gcno' \ + -o -name '*.*.symversions' \) -type f -print | xargs rm -f # Generate tags for editors # ---------------------------------------------------------------------------
arch/Kconfig +0 -1
@@ -600,7 +600,6 @@ config LTO_CLANG depends on ARCH_SUPPORTS_LTO_CLANG depends on !FTRACE_MCOUNT_RECORD depends on !KASAN - depends on !MODVERSIONS select LTO help This option enables Clang's Link Time Optimization (LTO), which
scripts/Makefile.build +31 -2
@@ -163,6 +163,15 @@ ifdef CONFIG_MODVERSIONS # the actual value of the checksum generated by genksyms # o remove .tmp_<file>.o to <file>.o +ifdef CONFIG_LTO_CLANG +# Generate .o.symversions files for each .o with exported symbols, and link these +# to the kernel and/or modules at the end. +cmd_modversions_c = \ + if $(NM) $@ 2>/dev/null | grep -q __ksymtab; then \ + $(call cmd_gensymtypes_c,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ + > [email protected]; \ + fi; +else cmd_modversions_c = \ if $(OBJDUMP) -h $@ | grep -q __ksymtab; then \ $(call cmd_gensymtypes_c,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \
@@ -174,6 +183,7 @@ cmd_modversions_c = \ rm -f $(@D)/.tmp_$(@F:.o=.ver); \ fi endif +endif ifdef CONFIG_FTRACE_MCOUNT_RECORD ifndef CC_USING_RECORD_MCOUNT
@@ -389,6 +399,18 @@ $(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtree)/scripts/asn1_compiler $(subdir-builtin): $(obj)/%/built-in.a: $(obj)/% ; $(subdir-modorder): $(obj)/%/modules.order: $(obj)/% ; +# combine symversions for later processing +quiet_cmd_update_lto_symversions = SYMVER $@ +ifeq ($(CONFIG_LTO_CLANG) $(CONFIG_MODVERSIONS),y y) + cmd_update_lto_symversions = \ + rm -f [email protected] \ + $(foreach n, $(filter-out FORCE,$^), \ + $(if $(wildcard $(n).symversions), \ + ; cat $(n).symversions >> [email protected])) +else + cmd_update_lto_symversions = echo >/dev/null +endif + # # Rule to compile a set of .o files into one .a file (without symbol table) #
@@ -396,8 +418,11 @@ $(subdir-modorder): $(obj)/%/modules.order: $(obj)/% ; quiet_cmd_ar_builtin = AR $@ cmd_ar_builtin = rm -f $@; $(AR) cDPrST $@ $(real-prereqs) +quiet_cmd_ar_and_symver = AR $@ + cmd_ar_and_symver = $(cmd_update_lto_symversions); $(cmd_ar_builtin) + $(obj)/built-in.a: $(real-obj-y) FORCE - $(call if_changed,ar_builtin) + $(call if_changed,ar_and_symver) # # Rule to create modules.order file
@@ -417,8 +442,11 @@ $(obj)/modules.order: $(obj-m) FORCE # # Rule to compile a set of .o files into one .a file (with symbol table) # +quiet_cmd_ar_lib = AR $@ + cmd_ar_lib = $(cmd_update_lto_symversions); $(cmd_ar) + $(obj)/lib.a: $(lib-y) FORCE - $(call if_changed,ar) + $(call if_changed,ar_lib) # NOTE: # Do not replace $(filter %.o,^) with $(real-prereqs). When a single object
@@ -427,6 +455,7 @@ $(obj)/lib.a: $(lib-y) FORCE ifdef CONFIG_LTO_CLANG quiet_cmd_link_multi-m = AR [M] $@ cmd_link_multi-m = \ + $(cmd_update_lto_symversions); \ rm -f $@; \ $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(filter %.o,$^) else
scripts/Makefile.modpost +2 -0
@@ -110,6 +110,8 @@ prelink-ext = .lto quiet_cmd_cc_lto_link_modules = LTO [M] $@ cmd_cc_lto_link_modules = \ $(LD) $(ld_flags) -r -o $@ \ + $(shell [ -s $(@:.lto.o=.o.symversions) ] && \ + echo -T $(@:.lto.o=.o.symversions)) \ --whole-archive $(filter-out FORCE,$^) %.lto.o: %.o FORCE
scripts/link-vmlinux.sh +24 -1
@@ -39,11 +39,28 @@ info() fi } +# If CONFIG_LTO_CLANG is selected, collect generated symbol versions into +# .tmp_symversions.lds +gen_symversions() +{ + info GEN .tmp_symversions.lds + rm -f .tmp_symversions.lds + + for a in ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}; do + for o in $(${AR} t $a 2>/dev/null); do + if [ -f ${o}.symversions ]; then + cat ${o}.symversions >> .tmp_symversions.lds + fi + done + done +} + # Link of vmlinux.o used for section mismatch analysis # ${1} output file modpost_link() { local objects + local lds="" objects="--whole-archive \ ${KBUILD_VMLINUX_OBJS} \
@@ -53,6 +70,11 @@ modpost_link() --end-group" if [ -n "${CONFIG_LTO_CLANG}" ]; then + if [ -n "${CONFIG_MODVERSIONS}" ]; then + gen_symversions + lds="${lds} -T .tmp_symversions.lds" + fi + # This might take a while, so indicate that we're doing # an LTO link info LTO ${1}
@@ -60,7 +82,7 @@ modpost_link() info LD ${1} fi - ${LD} ${KBUILD_LDFLAGS} -r -o ${1} ${objects} + ${LD} ${KBUILD_LDFLAGS} -r -o ${1} ${lds} ${objects} } objtool_link()
@@ -238,6 +260,7 @@ cleanup() { rm -f .btf.* rm -f .tmp_System.map + rm -f .tmp_symversions.lds rm -f .tmp_vmlinux* rm -f System.map rm -f vmlinux
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Sami Tolvanen
maintainerPATCH 4/22 kbuild: lto: fix recordmcount
In reply to Sami TolvanenWith LTO, LLVM bitcode won't be compiled into native code until modpost_link. This change postpones calls to recordmcount until after this step.
In order to exclude specific functions from inspection, we add a new code section .text..nomcount, which we tell recordmcount to ignore, and a __nomcount attribute for moving functions to this section.
--- Makefile | 2 +- arch/Kconfig | 2 +- include/asm-generic/vmlinux.lds.h | 1 + include/linux/compiler-clang.h | 4 ++++ include/linux/compiler_types.h | 4 ++++ kernel/trace/ftrace.c | 1 + scripts/Makefile.build | 9 +++++++++ scripts/Makefile.modfinal | 18 ++++++++++++++++-- scripts/link-vmlinux.sh | 29 +++++++++++++++++++++++++++++ scripts/recordmcount.c | 3 ++- 10 files changed, 68 insertions(+), 5 deletions(-)
Makefile +1 -1
@@ -861,7 +861,7 @@ KBUILD_AFLAGS += $(CC_FLAGS_USING) ifdef CONFIG_DYNAMIC_FTRACE ifdef CONFIG_HAVE_C_RECORDMCOUNT BUILD_C_RECORDMCOUNT := y - export BUILD_C_RECORDMCOUNT + export BUILD_C_RECORDMCOUNT RECORDMCOUNT_WARN endif endif endif
arch/Kconfig +1 -1
@@ -598,7 +598,7 @@ config LTO_CLANG depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm) depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) depends on ARCH_SUPPORTS_LTO_CLANG - depends on !FTRACE_MCOUNT_RECORD + depends on !FTRACE_MCOUNT_RECORD || HAVE_C_RECORDMCOUNT depends on !KASAN select LTO help
include/asm-generic/vmlinux.lds.h +1 -0
@@ -565,6 +565,7 @@ *(.text.hot TEXT_MAIN .text.fixup .text.unlikely) \ NOINSTR_TEXT \ *(.text..refcount) \ + *(.text..nomcount) \ *(.ref.text) \ MEM_KEEP(init.text*) \ MEM_KEEP(exit.text*) \
include/linux/compiler-clang.h +4 -0
@@ -55,3 +55,7 @@#if __has_feature (shadow_call_stack)# define __noscs __attribute__((__no_sanitize__("shadow-call-stack")))#endif + +#if defined(CONFIG_LTO_CLANG ) && defined(CONFIG_FTRACE_MCOUNT_RECORD ) +#define __nomcount __attribute__((__section__(".text..nomcount"))) +#endif
include/linux/compiler_types.h +4 -0
@@ -233,6 +233,10 @@ struct ftrace_likely_data {# define __noscs#endif +#ifndef __nomcount +# define __nomcount +#endif +#ifndef asm_volatile_goto #define asm_volatile_goto(x...) asm goto(x)#endif
kernel/trace/ftrace.c +1 -0
@@ -6062,6 +6062,7 @@ static int ftrace_cmp_ips(const void *a, const void *b)return 0 ; } +__nomcount static int ftrace_process_locs(struct module *mod,unsigned long *start,unsigned long *end)
scripts/Makefile.build +9 -0
@@ -187,6 +187,9 @@ endif ifdef CONFIG_FTRACE_MCOUNT_RECORD ifndef CC_USING_RECORD_MCOUNT +ifndef CC_USING_PATCHABLE_FUNCTION_ENTRY +# With LTO, we postpone recordmcount until we compile a native binary +ifndef CONFIG_LTO_CLANG # compiler will not generate __mcount_loc use recordmcount or recordmcount.pl ifdef BUILD_C_RECORDMCOUNT ifeq ("$(origin RECORDMCOUNT_WARN)", "command line")
@@ -200,6 +203,8 @@ sub_cmd_record_mcount = \ if [ $(@) != "scripts/mod/empty.o" ]; then \ $(objtree)/scripts/recordmcount $(RECORDMCOUNT_FLAGS) "$(@)"; \ fi; +endif # CONFIG_LTO_CLANG + recordmcount_source := $(srctree)/scripts/recordmcount.c \ $(srctree)/scripts/recordmcount.h else
@@ -209,11 +214,15 @@ sub_cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS)" \ "$(LD) $(KBUILD_LDFLAGS)" "$(NM)" "$(RM)" "$(MV)" \ "$(if $(part-of-module),1,0)" "$(@)"; + recordmcount_source := $(srctree)/scripts/recordmcount.pl endif # BUILD_C_RECORDMCOUNT +ifndef CONFIG_LTO_CLANG cmd_record_mcount = $(if $(findstring $(strip $(CC_FLAGS_FTRACE)),$(_c_flags)), \ $(sub_cmd_record_mcount)) +endif # CONFIG_LTO_CLANG endif # CC_USING_RECORD_MCOUNT +endif # CC_USING_PATCHABLE_FUNCTION_ENTRY endif # CONFIG_FTRACE_MCOUNT_RECORD ifdef CONFIG_STACK_VALIDATION
scripts/Makefile.modfinal +16 -2
@@ -34,10 +34,24 @@ ifdef CONFIG_LTO_CLANG # With CONFIG_LTO_CLANG, reuse the object file we compiled for modpost to # avoid a second slow LTO link prelink-ext := .lto -endif + +# ELF processing was skipped earlier because we didn't have native code, +# so let's now process the prelinked binary before we link the module. + +ifdef CONFIG_FTRACE_MCOUNT_RECORD +ifndef CC_USING_RECORD_MCOUNT +ifndef CC_USING_PATCHABLE_FUNCTION_ENTRY +cmd_ld_ko_o += $(objtree)/scripts/recordmcount $(RECORDMCOUNT_FLAGS) \ + $(@:.ko=$(prelink-ext).o); + +endif # CC_USING_PATCHABLE_FUNCTION_ENTRY +endif # CC_USING_RECORD_MCOUNT +endif # CONFIG_FTRACE_MCOUNT_RECORD + +endif # CONFIG_LTO_CLANG quiet_cmd_ld_ko_o = LD [M] $@ - cmd_ld_ko_o = \ + cmd_ld_ko_o += \ $(LD) -r $(KBUILD_LDFLAGS) \ $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \ $(addprefix -T , $(KBUILD_LDS_MODULE)) \
scripts/link-vmlinux.sh +29 -0
@@ -108,6 +108,29 @@ objtool_link() fi } +# If CONFIG_LTO_CLANG is selected, we postpone running recordmcount until +# we have compiled LLVM IR to an object file. +recordmcount() +{ + if [ "${CONFIG_LTO_CLANG} ${CONFIG_FTRACE_MCOUNT_RECORD}" != "y y" ]; then + return + fi + + if [ -n "${CC_USING_RECORD_MCOUNT}" ]; then + return + fi + if [ -n "${CC_USING_PATCHABLE_FUNCTION_ENTRY}" ]; then + return + fi + + local flags="" + + [ -n "${RECORDMCOUNT_WARN}" ] && flags="-w" + + info MCOUNT $* + ${objtree}/scripts/recordmcount ${flags} $* +} + # Link of vmlinux # ${1} - output file # ${2}, ${3}, ... - optional extra .o files
@@ -316,6 +339,12 @@ objtool_link vmlinux.o # modpost vmlinux.o to check for section mismatches ${MAKE} -f "${srctree}/scripts/Makefile.modpost" MODPOST_VMLINUX=1 +if [ -n "${CONFIG_LTO_CLANG}" ]; then + # If we postponed ELF processing steps due to LTO, process + # vmlinux.o instead. + recordmcount vmlinux.o +fi + info MODINFO modules.builtin.modinfo ${OBJCOPY} -j .modinfo -O binary vmlinux.o modules.builtin.modinfo info GEN modules.builtin
scripts/recordmcount.c +2 -1
@@ -404,7 +404,8 @@ static uint32_t (*w2)(uint16_t);/* Names of the sections that could contain calls to mcount. */ static int is_mcounted_section_name (char const *const txtname) { -return strncmp (".text" , txtname,5 ) ==0 || +return (strncmp (".text" , txtname,5 ) ==0 && +strcmp (".text..nomcount" , txtname) !=0 ) ||strcmp (".init.text" , txtname) ==0 ||strcmp (".ref.text" , txtname) ==0 || strcmp(".sched.text", txtname) == 0 ||
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Peter Zijlstra
maintainerRe: [PATCH 04/22] kbuild: lto: fix recordmcount
Quoted 7 lines · Sami Tolvanen
With LTO, LLVM bitcode won't be compiled into native code until
modpost_link. This change postpones calls to recordmcount until after this step.In order to exclude specific functions from inspection, we add a new code section .text..nomcount, which we tell recordmcount to ignore, and a
__nomcountattribute for moving functions to this section.
I'm confused, you only add this to functions in ftrace itself, which is compiled with:
KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS))
and so should not have mcount/fentry sites anyway. So what's the point of ignoring them further?
This Changelog does not explain.
Sami Tolvanen
maintainerRe: [PATCH 04/22] kbuild: lto: fix recordmcount
Quoted 12 lines · Peter Zijlstra
Quoted 7 lines · Sami Tolvanen
With LTO, LLVM bitcode won't be compiled into native code until
modpost_link. This change postpones calls to recordmcount until after this step.In order to exclude specific functions from inspection, we add a new code section .text..nomcount, which we tell recordmcount to ignore, and a
__nomcountattribute for moving functions to this section.I'm confused, you only add this to functions in ftrace itself, which is compiled with:
Quoted 6 lines
KBUILD_CFLAGS= $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS))and so should not have mcount/fentry sites anyway. So what's the point of ignoring them further?
This Changelog does not explain.
Normally, recordmcount ignores each ftrace.o file, but since we are running it on vmlinux.o, we need another way to stop it from looking at references to mcount/fentry that are not calls. Here's a comment from recordmcount.c:
/*
* The file kernel/trace/ftrace.o references the mcount
* function but does not call it. Since ftrace.o should
* not be traced anyway, we just skip it.
*/
But I agree, the commit message could use more defails. Also +Steven for thoughts about this approach.
Sami
Peter Zijlstra
maintainerRe: [PATCH 04/22] kbuild: lto: fix recordmcount
Quoted 25 lines · Sami Tolvanen
Quoted 12 lines · Peter Zijlstra
Quoted 7 lines · Sami Tolvanen
With LTO, LLVM bitcode won't be compiled into native code until
modpost_link. This change postpones calls to recordmcount until after this step.In order to exclude specific functions from inspection, we add a new code section .text..nomcount, which we tell recordmcount to ignore, and a
__nomcountattribute for moving functions to this section.I'm confused, you only add this to functions in ftrace itself, which is compiled with:
Quoted 6 lines
KBUILD_CFLAGS= $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS))and so should not have mcount/fentry sites anyway. So what's the point of ignoring them further?
This Changelog does not explain.
Normally, recordmcount ignores each ftrace.o file, but since we are running it on vmlinux.o, we need another way to stop it from looking at references to mcount/fentry that are not calls. Here's a comment from
recordmcount.c:
Quoted 8 lines
/*
* The filekernel/trace/ftrace.oreferences the mcount
* function but does not call it. Since ftrace.o should
* not be traced anyway, we just skip it.
*/But I agree, the commit message could use more defails. Also +Steven for thoughts about this approach.
Ah, is thi because recordmcount isn't smart enough to know the difference between "CALL $mcount" and any other RELA that has mcount?
At least for x86_64 I can do a really quick take for a recordmcount pass in objtool, but I suppose you also need this for ARM64 ?
Sami Tolvanen
maintainerRe: [PATCH 04/22] kbuild: lto: fix recordmcount
Quoted 32 lines · Peter Zijlstra
Quoted 31 lines · Sami Tolvanen
Quoted 12 lines · Peter Zijlstra
Quoted 7 lines · Sami Tolvanen
With LTO, LLVM bitcode won't be compiled into native code until
modpost_link. This change postpones calls to recordmcount until after this step.In order to exclude specific functions from inspection, we add a new code section .text..nomcount, which we tell recordmcount to ignore, and a
__nomcountattribute for moving functions to this section.I'm confused, you only add this to functions in ftrace itself, which is compiled with:
Quoted 6 lines
KBUILD_CFLAGS= $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS))and so should not have mcount/fentry sites anyway. So what's the point of ignoring them further?
This Changelog does not explain.
Normally, recordmcount ignores each ftrace.o file, but since we are running it on vmlinux.o, we need another way to stop it from looking at references to mcount/fentry that are not calls. Here's a comment from
recordmcount.c:/*
* The filekernel/trace/ftrace.oreferences the mcount
* function but does not call it. Since ftrace.o should
* not be traced anyway, we just skip it.
*/
Quoted 5 lines
Quoted 2 lines
But I agree, the commit message could use more defails. Also +Steven for thoughts about this approach.
Ah, is thi because recordmcount isn't smart enough to know the difference between "CALL $mcount" and any other RELA that has mcount?
Yes.
Quoted 2 lines
At least for
x86_64I can do a really quick take for a recordmcount pass in objtool, but I suppose you also need this for ARM64 ?
Sure, sounds good. arm64 uses -fpatchable-function-entry with clang, so we don't need recordmcount there.
Sami
Peter Zijlstra
maintainerRFC PATCH 1/1 objtool,x86_64: Replace recordmcount with objtool
Quoted 7 lines · Sami Tolvanen
Quoted 2 lines · Peter Zijlstra
At least for
x86_64I can do a really quick take for a recordmcount pass in objtool, but I suppose you also need this for ARM64 ?Sure, sounds good. arm64 uses -fpatchable-function-entry with clang, so we don't need recordmcount there.
This is on top of my local pile:
git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git master
which notably includes the static_call series.
Not boot tested, but it generates the required sections and they look more or less as expected, ymmv.
--- arch/x86/Kconfig | 1 - scripts/Makefile.build | 3 ++ scripts/link-vmlinux.sh | 2 +- tools/objtool/builtin-check.c | 9 ++--- tools/objtool/builtin.h | 2 +- tools/objtool/check.c | 81 +++++++++++++++++++++++++++++++++++++++++++ tools/objtool/check.h | 1 + tools/objtool/objtool.h | 1 + 8 files changed, 91 insertions(+), 9 deletions(-)
arch/x86/Kconfig +0 -1
@@ -174,7 +174,6 @@ config X86 select HAVE_EXIT_THREAD select HAVE_FAST_GUP select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE - select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_TRACER select HAVE_GCC_PLUGINS
scripts/Makefile.build +3 -0
@@ -227,6 +227,9 @@ endif ifdef CONFIG_X86_SMAP objtool_args += --uaccess endif +ifdef CONFIG_DYNAMIC_FTRACE + objtool_args += --mcount +endif # 'OBJECT_FILES_NON_STANDARD := y': skip objtool checking for a directory # 'OBJECT_FILES_NON_STANDARD_foo.o := 'y': skip objtool checking for a file
scripts/link-vmlinux.sh +1 -1
@@ -60,7 +60,7 @@ objtool_link() local objtoolopt; if [ -n "${CONFIG_VMLINUX_VALIDATION}" ]; then - objtoolopt="check" + objtoolopt="check --vmlinux" if [ -z "${CONFIG_FRAME_POINTER}" ]; then objtoolopt="${objtoolopt} --no-fp" fi
tools/objtool/builtin-check.c +3 -6
@@ -18,7 +18,7 @@#include "builtin.h" #include "objtool.h" -bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, fpu; +bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, fpu, mcount;static const char *const check_usage[] = {"objtool check [<options>] file.o" ,
@@ -36,12 +36,13 @@ const struct option check_options[] = {OPT_BOOLEAN ('d' ,"duplicate" , &validate_dup,"duplicate validation for vmlinux.o" ),OPT_BOOLEAN ('l' ,"vmlinux" , &vmlinux,"vmlinux.o validation" ),OPT_BOOLEAN ('F' ,"fpu" , &fpu,"validate FPU context" ), +OPT_BOOLEAN ('M' ,"mcount" , &mcount,"generate __mcount_loc" ), OPT_END(), };int cmd_check (int argc,const char **argv) { -const char *objname, *s; +const char *objname; argc =parse_options (argc, argv, check_options, check_usage,0 );
@@ -50,9 +51,5 @@ int cmd_check(int argc, const char **argv) objname = argv[0 ]; - s =strstr (objname,"vmlinux.o" ); -if (s && !s[9 ]) - vmlinux = true; -return check (objname, false); }
tools/objtool/builtin.h +1 -1
@@ -8,7 +8,7 @@#include <subcmd/parse-options.h> extern const struct option check_options[]; -extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, fpu; +extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, fpu, mcount;extern int cmd_check (int argc,const char **argv);extern int cmd_orc (int argc,const char **argv);
tools/objtool/check.c +81 -0
105 lines not on this page · raw message
tools/objtool/check.h +1 -0
@@ -24,6 +24,7 @@ struct instruction {struct list_head list;struct hlist_node hash;struct list_head static_call_node; +struct list_head mcount_loc_node;struct section *sec;unsigned long offset;unsigned int len;
tools/objtool/objtool.h +1 -0
@@ -17,6 +17,7 @@ struct objtool_file {struct list_head insn_list;DECLARE_HASHTABLE (insn_hash,20 );struct list_head static_call_list; +struct list_head mcount_loc_list;bool ignore_unreachables, c_file, hints, rodata; };
Nick Desaulniers
reviewerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 160 lines · Peter Zijlstra
Quoted 7 lines · Sami Tolvanen
Quoted 2 lines · Peter Zijlstra
At least for
x86_64I can do a really quick take for a recordmcount pass in objtool, but I suppose you also need this for ARM64 ?Sure, sounds good. arm64 uses -fpatchable-function-entry with clang, so we don't need recordmcount there.
This is on top of my local pile:
git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.gitmasterwhich notably includes the
static_callseries.Not boot tested, but it generates the required sections and they look more or less as expected, ymmv.
--- arch/x86/Kconfig | 1 - scripts/Makefile.build | 3 ++ scripts/link-vmlinux.sh | 2 +- tools/objtool/builtin-check.c | 9 ++--- tools/objtool/builtin.h | 2 +- tools/objtool/check.c | 81 +++++++++++++++++++++++++++++++++++++++++++ tools/objtool/check.h | 1 + tools/objtool/objtool.h | 1 + 8 files changed, 91 insertions(+), 9 deletions(-)arch/x86/Kconfig +0
-1@@ -174,7 +174,6 @@ config X86 select HAVE_EXIT_THREAD select HAVE_FAST_GUP select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE - select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_TRACER select HAVE_GCC_PLUGINSscripts/Makefile.build +3
-0@@ -227,6 +227,9 @@ endif ifdef CONFIG_X86_SMAP objtool_args += --uaccess endif +ifdef CONFIG_DYNAMIC_FTRACE + objtool_args += --mcount +endif # 'OBJECT_FILES_NON_STANDARD := y': skip objtool checking for a directory # 'OBJECT_FILES_NON_STANDARD_foo.o := 'y': skip objtool checking for a filescripts/link-vmlinux.sh +1
-1@@ -60,7 +60,7 @@ objtool_link() local objtoolopt; if [ -n "${CONFIG_VMLINUX_VALIDATION}" ]; then - objtoolopt="check" + objtoolopt="check --vmlinux" if [ -z "${CONFIG_FRAME_POINTER}" ]; then objtoolopt="${objtoolopt} --no-fp" fitools/objtool/builtin-check.c +3
-6@@ -18,7 +18,7 @@#include "builtin.h" #include "objtool.h" -bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, fpu; +bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, fpu, mcount;static const char *const check_usage[] = {"objtool check [<options>] file.o" ,@@ -36,12 +36,13 @@ const struct option check_options[] = {OPT_BOOLEAN ('d' ,"duplicate" , &validate_dup,"duplicate validation for vmlinux.o" ),OPT_BOOLEAN ('l' ,"vmlinux" , &vmlinux,"vmlinux.o validation" ),OPT_BOOLEAN ('F' ,"fpu" , &fpu,"validate FPU context" ), +OPT_BOOLEAN ('M' ,"mcount" , &mcount,"generate __mcount_loc" ), OPT_END(), };int cmd_check (int argc,const char **argv) { -const char *objname, *s; +const char *objname; argc =parse_options (argc, argv, check_options, check_usage,0 );@@ -50,9 +51,5 @@ int cmd_check(int argc, const char **argv) objname = argv[0 ]; - s =strstr (objname,"vmlinux.o" ); -if (s && !s[9 ]) - vmlinux = true; -return check (objname, false); }tools/objtool/builtin.h +1
-1@@ -8,7 +8,7 @@#include <subcmd/parse-options.h> extern const struct option check_options[]; -extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, fpu; +extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, fpu, mcount;extern int cmd_check (int argc,const char **argv);extern int cmd_orc (int argc,const char **argv);tools/objtool/check.c +32
-0@@ -533,6 +533,65 @@ static int create_static_call_sections(struct objtool_file *file)return 0 ; } +static int create_mcount_loc_sections (struct objtool_file *file) +{ +struct section *sec, *reloc_sec; +struct reloc *reloc; +unsigned long *loc; +struct instruction *insn; +int idx; + + sec =find_section_by_name (file->elf,"__mcount_loc" ); +if (sec) { +INIT_LIST_HEAD (&file->mcount_loc_list); +WARN ("file already has __mcount_loc section, skipping" ); +return 0 ; + } + +if (list_empty (&file->mcount_loc_list)) +return 0 ; + + idx =0 ; +list_for_each_entry (insn, &file->mcount_loc_list, mcount_loc_node) + idx++; + + sec =elf_create_section (file->elf,"__mcount_loc" ,0 ,sizeof (unsigned long ), idx); +if (!sec) +return -1 ; + + reloc_sec =elf_create_reloc_section (file->elf, sec,SHT_RELA ); +if (!reloc_sec) +return -1 ; + + idx =0 ; +list_for_each_entry (insn, &file->mcount_loc_list, mcount_loc_node) {
tools/objtool/check.c static int create_static_call_sections(struct objtool_file *file) · line 577
Quoted 10 lines
tools/objtool/check.c +10
-0+ + loc = (unsigned long *)sec->data->d_buf + idx; +memset (loc,0 ,sizeof (unsigned long )); + + reloc =malloc (sizeof (*reloc)); +if (!reloc) { +perror ("malloc" ); +return -1 ; + } +memset (reloc,0 ,sizeof (*reloc));
calloc(1, sizeof(*reloc))?
Quoted 87 lines
tools/objtool/check.c +39
-0+ + reloc->sym = insn->sec->sym; + reloc->addend = insn->offset; + reloc->type =R_X86_64_64 ; + reloc->offset = idx *sizeof (unsigned long ); + reloc->sec = reloc_sec; +elf_add_reloc (file->elf, reloc); + + idx++; + } + +if (elf_rebuild_reloc_section (file->elf, reloc_sec)) +return -1 ; + +return 0 ; +} +/* * Warnings shouldn't be reported for ignored functions. */ @@ -892,6 +951,22 @@ static int add_call_destinations(struct objtool_file *file) insn->type =INSN_NOP ; } +if (mcount && !strcmp (insn->call_dest->name,"__fentry__" )) { +if (reloc) { + reloc->type =R_NONE ; +elf_write_reloc (file->elf, reloc); + } + +elf_write_insn (file->elf, insn->sec, + insn->offset, insn->len, +arch_nop_insn (insn->len)); + + insn->type =INSN_NOP ; + +list_add_tail (&insn->mcount_loc_node, + &file->mcount_loc_list); + } +/* * Whatever stack impact regular CALLs have, should be undone * by the RETURN of the called function. @@ -3004,6 +3079,7 @@ int check(const char *_objname, bool orc)INIT_LIST_HEAD (&file.insn_list);hash_init (file.insn_hash);INIT_LIST_HEAD (&file.static_call_list); +INIT_LIST_HEAD (&file.mcount_loc_list); file.c_file = !vmlinux &&find_section_by_name (file.elf,".comment" ); file.ignore_unreachables = no_unreachable; file.hints = false;@@ -3056,6 +3132,11 @@ int check(const char *_objname, bool orc) goto out; warnings += ret; + ret =create_mcount_loc_sections (&file); +if (ret <0 ) + goto out; + warnings += ret; +if (orc) { ret =create_orc (&file);if (ret <0 )tools/objtool/check.h +1
-0@@ -24,6 +24,7 @@ struct instruction {struct list_head list;struct hlist_node hash;struct list_head static_call_node; +struct list_head mcount_loc_node;struct section *sec;unsigned long offset;unsigned int len;tools/objtool/objtool.h +1
-0@@ -17,6 +17,7 @@ struct objtool_file {struct list_head insn_list;DECLARE_HASHTABLE (insn_hash,20 );struct list_head static_call_list; +struct list_head mcount_loc_list;bool ignore_unreachables, c_file, hints, rodata; };
Signature · 2 lines
Thanks, ~Nick Desaulniers
Sami Tolvanen
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
In reply to Peter ZijlstraQuoted 34 lines · Peter Zijlstra
Quoted 7 lines · Sami Tolvanen
Quoted 2 lines · Peter Zijlstra
At least for
x86_64I can do a really quick take for a recordmcount pass in objtool, but I suppose you also need this for ARM64 ?Sure, sounds good. arm64 uses -fpatchable-function-entry with clang, so we don't need recordmcount there.
This is on top of my local pile:
git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.gitmasterwhich notably includes the
static_callseries.Not boot tested, but it generates the required sections and they look more or less as expected, ymmv.
--- arch/x86/Kconfig | 1 - scripts/Makefile.build | 3 ++ scripts/link-vmlinux.sh | 2 +- tools/objtool/builtin-check.c | 9 ++--- tools/objtool/builtin.h | 2 +- tools/objtool/check.c | 81 +++++++++++++++++++++++++++++++++++++++++++ tools/objtool/check.h | 1 + tools/objtool/objtool.h | 1 + 8 files changed, 91 insertions(+), 9 deletions(-)arch/x86/Kconfig +0
-0
arch/x86/Kconfig config X86 · line 179
Quoted 7 lines
arch/x86/Kconfig +0
-1@@ -174,7 +174,6 @@ config X86 select HAVE_EXIT_THREAD select HAVE_FAST_GUP select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE - select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_TRACER select HAVE_GCC_PLUGINS
This breaks DYNAMIC_FTRACE according to kernel/trace/ftrace.c:
#ifndef CONFIG_FTRACE_MCOUNT_RECORD # error Dynamic ftrace depends on MCOUNT_RECORD #endif
And the build errors after that seem to confirm this. It looks like we might need another flag to skip recordmcount.
Anyway, since objtool is run before recordmcount, I just left this unchanged for testing and ignored the recordmcount warnings about __mcount_loc already existing. Something is a bit off still though, I see this at boot:
------------[ ftrace bug ]------------
ftrace failed to modify
[<ffffffff81000660>] __tracepoint_iter_initcall_level+0x0/0x40 actual: 0f:1f:44:00:00 Initializing ftrace call sites ftrace record flags: 0 (0) expected tramp: ffffffff81056500 ------------[ cut here ]------------
Otherwise, this looks pretty good.
Sami
Peter Zijlstra
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 18 lines · Sami Tolvanen
Quoted 8 lines
Not boot tested, but it generates the required sections and they look more or less as expected, ymmv.
arch/x86/Kconfig +0
-0arch/x86/Kconfig config X86 · line 179
Quoted 7 lines
arch/x86/Kconfig +0
-1@@ -174,7 +174,6 @@ config X86 select HAVE_EXIT_THREAD select HAVE_FAST_GUP select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE - select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_TRACER select HAVE_GCC_PLUGINSThis breaks
DYNAMIC_FTRACEaccording tokernel/trace/ftrace.c:
Quoted 6 lines
#ifndef CONFIG_FTRACE_MCOUNT_RECORD # error Dynamic ftrace depends on MCOUNT_RECORD #endifAnd the build errors after that seem to confirm this. It looks like we might need another flag to skip recordmcount.
Hurm, Steve, how you want to do that?
Quoted 14 lines
Anyway, since objtool is run before recordmcount, I just left this unchanged for testing and ignored the recordmcount warnings about
__mcount_localready existing. Something is a bit off still though, I see this at boot:------------[ ftrace bug ]------------
ftrace failed to modify[<ffffffff81000660>] __tracepoint_iter_initcall_level+0x0/0x40 actual: 0f:1f:44:00:00 Initializing ftrace call sites ftrace record flags: 0 (0) expected tramp: ffffffff81056500 ------------[ cut here ]------------
Quoted 1 line
Otherwise, this looks pretty good.
Ha! it is trying to convert the "CALL __fentry__" into a NOP and not finding the CALL -- because objtool already made it a NOP...
Weird, I thought recordmcount would also write NOPs, it certainly has code for that. I suppose we can use CC_USING_NOP_MCOUNT to avoid those, but I'd rather Steve explain this before I wreck things further.
Peter Zijlstra
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 16 lines · Peter Zijlstra
Quoted 14 lines · Sami Tolvanen
Anyway, since objtool is run before recordmcount, I just left this unchanged for testing and ignored the recordmcount warnings about
__mcount_localready existing. Something is a bit off still though, I see this at boot:------------[ ftrace bug ]------------
ftrace failed to modify[<ffffffff81000660>] __tracepoint_iter_initcall_level+0x0/0x40 actual: 0f:1f:44:00:00 Initializing ftrace call sites ftrace record flags: 0 (0) expected tramp: ffffffff81056500 ------------[ cut here ]------------
Quoted 8 lines
Quoted 1 line
Otherwise, this looks pretty good.
Ha! it is trying to convert the "CALL
__fentry__" into a NOP and not finding the CALL -- because objtool already made it a NOP...Weird, I thought recordmcount would also write NOPs, it certainly has code for that. I suppose we can use
CC_USING_NOP_MCOUNTto avoid those, but I'd rather Steve explain this before I wreck things further.
Something like so would ignore whatever text is there and rewrite it with ideal_nop.
---
arch/x86/kernel/ftrace.c +7 -6
@@ -109,9 +109,11 @@ static int __ref ftrace_modify_code_direct(unsigned long ip, const char *old_code, const char *new_code) { - int ret = ftrace_verify_code(ip, old_code); -if (ret) -return ret; + if (old_code) { + int ret = ftrace_verify_code(ip, old_code); +if (ret) +return ret; + }/* replace the text with the new text */ if (ftrace_poke_late)
@@ -124,9 +126,8 @@ ftrace_modify_code_direct(unsigned long ip, const char *old_code,int ftrace_make_nop (struct module *mod,struct dyn_ftrace *rec,unsigned long addr) {unsigned long ip = rec->ip; -const char *new, *old; +const char *new; - old =ftrace_call_replace (ip, addr); new =ftrace_nop_replace ();/*
@@ -138,7 +139,7 @@ int ftrace_make_nop(struct module *mod, struct dyn_ftrace *rec, unsigned long ad* just modify the code directly. */ if (addr ==MCOUNT_ADDR ) -return ftrace_modify_code_direct (ip, old, new); +return ftrace_modify_code_direct (ip,NULL , new);/* * x86 overrides ftrace_replace_code -- this function will never be used
Sami Tolvanen
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
In reply to Peter ZijlstraQuoted 21 lines · Peter Zijlstra
Quoted 18 lines · Sami Tolvanen
Quoted 8 lines
Not boot tested, but it generates the required sections and they look more or less as expected, ymmv.
arch/x86/Kconfig +0
-0arch/x86/Kconfig config X86 · line 179
Quoted 7 lines
arch/x86/Kconfig +0
-1@@ -174,7 +174,6 @@ config X86 select HAVE_EXIT_THREAD select HAVE_FAST_GUP select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE - select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_TRACER select HAVE_GCC_PLUGINSThis breaks
DYNAMIC_FTRACEaccording tokernel/trace/ftrace.c:
Quoted 8 lines
Quoted 6 lines
#ifndef CONFIG_FTRACE_MCOUNT_RECORD # error Dynamic ftrace depends on MCOUNT_RECORD #endifAnd the build errors after that seem to confirm this. It looks like we might need another flag to skip recordmcount.
Hurm, Steve, how you want to do that?
Steven, did you have any thoughts about this? Moving recordmcount to an objtool pass that knows about call sites feels like a much cleaner solution than annotating kernel code to avoid unwanted relocations.
Sami
Steven Rostedt
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 26 lines · On Fri, 17 Jul 2020 10:28:13 -0700 Sami Tolvanen <[email protected]>…
Quoted 25 lines · Peter Zijlstra
Quoted 22 lines · Sami Tolvanen
Quoted 8 lines
Not boot tested, but it generates the required sections and they look more or less as expected, ymmv.
arch/x86/Kconfig +0
-0arch/x86/Kconfig config X86 · line 179
Quoted 7 lines
arch/x86/Kconfig +0
-1@@ -174,7 +174,6 @@ config X86 select HAVE_EXIT_THREAD select HAVE_FAST_GUP select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE - select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_TRACER select HAVE_GCC_PLUGINSThis breaks
DYNAMIC_FTRACEaccording tokernel/trace/ftrace.c:#ifndef CONFIG_FTRACE_MCOUNT_RECORD # error Dynamic ftrace depends on MCOUNT_RECORD #endif
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
And the build errors after that seem to confirm this. It looks like we might need another flag to skip recordmcount.
Hurm, Steve, how you want to do that?
Steven, did you have any thoughts about this? Moving recordmcount to an objtool pass that knows about call sites feels like a much cleaner solution than annotating kernel code to avoid unwanted relocations.
Bah, I started to reply to this then went to look for details, got distracted, forgot about it, my laptop crashed (due to a zoom call), and I lost the email I was writing (haven't looked in the drafts folder, but my idea about this has changed since anyway).
So the problem is that we process mcount references in other areas and that confuses the ftrace modification portion?
Someone just submitted a patch for arm64 for this:
https://lore.kernel.org/r/[email protected]
Is that what you want?
-- Steve
Sami Tolvanen
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 40 lines · Steven Rostedt
Quoted 26 lines · On Fri, 17 Jul 2020 10:28:13 -0700 Sami Tolvanen <[email protected]>…
Quoted 25 lines · Peter Zijlstra
Quoted 22 lines · Sami Tolvanen
Quoted 8 lines
Not boot tested, but it generates the required sections and they look more or less as expected, ymmv.
arch/x86/Kconfig +0
-0arch/x86/Kconfig config X86 · line 179
Quoted 7 lines
arch/x86/Kconfig +0
-1@@ -174,7 +174,6 @@ config X86 select HAVE_EXIT_THREAD select HAVE_FAST_GUP select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE - select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_TRACER select HAVE_GCC_PLUGINSThis breaks
DYNAMIC_FTRACEaccording tokernel/trace/ftrace.c:#ifndef CONFIG_FTRACE_MCOUNT_RECORD # error Dynamic ftrace depends on MCOUNT_RECORD #endifQuoted 9 lines
Quoted 4 lines
Quoted 2 lines
And the build errors after that seem to confirm this. It looks like we might need another flag to skip recordmcount.
Hurm, Steve, how you want to do that?
Steven, did you have any thoughts about this? Moving recordmcount to an objtool pass that knows about call sites feels like a much cleaner solution than annotating kernel code to avoid unwanted relocations.
Quoted 7 lines
Bah, I started to reply to this then went to look for details, got distracted, forgot about it, my laptop crashed (due to a zoom call), and I lost the email I was writing (haven't looked in the drafts folder, but my idea about this has changed since anyway).
So the problem is that we process mcount references in other areas and that confuses the ftrace modification portion?
Correct.
Quoted 5 lines
Someone just submitted a patch for arm64 for this:
https://lore.kernel.org/r/[email protected]
Is that what you want?
That looks like the same issue, but we need to fix this on x86 instead.
Sami
Steven Rostedt
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 7 lines · On Fri, 17 Jul 2020 10:47:51 -0700 Sami Tolvanen <[email protected]>…
Quoted 5 lines
Someone just submitted a patch for arm64 for this:
https://lore.kernel.org/r/[email protected]
Is that what you want?
That looks like the same issue, but we need to fix this on x86 instead.
Does x86 have a way to differentiate between the two that record mcount can check?
-- Steve
Sami Tolvanen
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 6 lines · Steven Rostedt
Quoted 2 lines · On Fri, 17 Jul 2020 10:47:51 -0700 Sami Tolvanen <[email protected]>…
Quoted 2 lines
Someone just submitted a patch for arm64 for this:
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
https://lore.kernel.org/r/[email protected]
Is that what you want?
That looks like the same issue, but we need to fix this on x86 instead.
Does x86 have a way to differentiate between the two that record mcount can check?
I'm not sure if looking at the relocation alone is sufficient on x86, we might also have to decode the instruction, which is what objtool does. Did you have any thoughts on Peter's patch, or my initial suggestion, which adds a __nomcount attribute to affected functions?
Sami
Steven Rostedt
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 7 lines · On Mon, 20 Jul 2020 09:52:37 -0700 Sami Tolvanen <[email protected]>…
Quoted 2 lines
Does x86 have a way to differentiate between the two that record mcount can check?
I'm not sure if looking at the relocation alone is sufficient on x86, we might also have to decode the instruction, which is what objtool does. Did you have any thoughts on Peter's patch, or my initial suggestion, which adds a
__nomcountattribute to affected functions?
There's a lot of code in this thread. Can you give me the message-id of Peter's patch in question.
Thanks,
-- Steve
Sami Tolvanen
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 7 lines · Steven Rostedt
Quoted 3 lines · On Mon, 20 Jul 2020 09:52:37 -0700 Sami Tolvanen <[email protected]>…
Quoted 2 lines
Does x86 have a way to differentiate between the two that record mcount can check?
Quoted 7 lines
Quoted 4 lines
I'm not sure if looking at the relocation alone is sufficient on x86, we might also have to decode the instruction, which is what objtool does. Did you have any thoughts on Peter's patch, or my initial suggestion, which adds a
__nomcountattribute to affected functions?There's a lot of code in this thread. Can you give me the message-id of Peter's patch in question.
Sure, I was referring to the objtool patch in this message:
https://lore.kernel.org/lkml/[email protected]/
Sami
Steven Rostedt
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
In reply to Peter ZijlstraQuoted 20 lines · On Fri, 26 Jun 2020 13:29:31 +0200 Peter Zijlstra <[email protected]> wrote:
Quoted 18 lines · Sami Tolvanen
Quoted 8 lines
Not boot tested, but it generates the required sections and they look more or less as expected, ymmv.
arch/x86/Kconfig +0
-0arch/x86/Kconfig config X86 · line 179
Quoted 7 lines
arch/x86/Kconfig +0
-1@@ -174,7 +174,6 @@ config X86 select HAVE_EXIT_THREAD select HAVE_FAST_GUP select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE - select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_TRACER select HAVE_GCC_PLUGINSThis breaks
DYNAMIC_FTRACEaccording tokernel/trace/ftrace.c:
Quoted 8 lines
Quoted 6 lines
#ifndef CONFIG_FTRACE_MCOUNT_RECORD # error Dynamic ftrace depends on MCOUNT_RECORD #endifAnd the build errors after that seem to confirm this. It looks like we might need another flag to skip recordmcount.
Hurm, Steve, how you want to do that?
That was added when we removed that dangerous daemon that did the updates, and was added to make sure it didn't come back.
We can probably just get rid of it.
Quoted 15 lines
Quoted 15 lines
Anyway, since objtool is run before recordmcount, I just left this unchanged for testing and ignored the recordmcount warnings about
__mcount_localready existing. Something is a bit off still though, I see this at boot:------------[ ftrace bug ]------------
ftrace failed to modify[<ffffffff81000660>] __tracepoint_iter_initcall_level+0x0/0x40 actual: 0f:1f:44:00:00 Initializing ftrace call sites ftrace record flags: 0 (0) expected tramp: ffffffff81056500 ------------[ cut here ]------------
Quoted 8 lines
Quoted 1 line
Otherwise, this looks pretty good.
Ha! it is trying to convert the "CALL
__fentry__" into a NOP and not finding the CALL -- because objtool already made it a NOP...Weird, I thought recordmcount would also write NOPs, it certainly has code for that. I suppose we can use
CC_USING_NOP_MCOUNTto avoid those, but I'd rather Steve explain this before I wreck things further.
The reason for not having recordmcount insert all the nops, is because x86 has more than one optimal nop which is determined by the machine it runs on, and not at compile time. So we figured just updated it then.
We can change it to be a nop on boot, and just modify it if it's not the optimal nop already.
That said, Andi Kleen added an option to gcc called -mnop-mcount which will have gcc do both create the mcount section and convert the calls into nops. When doing so, it defines CC_USING_NOP_MCOUNT which will tell ftrace to expect the calls to already be converted.
-- Steve
Peter Zijlstra
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 7 lines · Steven Rostedt
Quoted 6 lines
Ha! it is trying to convert the "CALL
__fentry__" into a NOP and not finding the CALL -- because objtool already made it a NOP...Weird, I thought recordmcount would also write NOPs, it certainly has code for that. I suppose we can use
CC_USING_NOP_MCOUNTto avoid those, but I'd rather Steve explain this before I wreck things further.
Quoted 6 lines
The reason for not having recordmcount insert all the nops, is because x86 has more than one optimal nop which is determined by the machine it runs on, and not at compile time. So we figured just updated it then.
We can change it to be a nop on boot, and just modify it if it's not the optimal nop already.
Right, I throught that's what we'd be doing already, anyway:
Quoted 4 lines
That said, Andi Kleen added an option to gcc called -mnop-mcount which will have gcc do both create the mcount section and convert the calls into nops. When doing so, it defines
CC_USING_NOP_MCOUNTwhich will tell ftrace to expect the calls to already be converted.
That seems like the much easier solution, then we can forget about recordmcount / objtool entirely for this.
Steven Rostedt
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 7 lines · On Wed, 22 Jul 2020 20:41:37 +0200 Peter Zijlstra <[email protected]> wrote:
Quoted 4 lines
That said, Andi Kleen added an option to gcc called -mnop-mcount which will have gcc do both create the mcount section and convert the calls into nops. When doing so, it defines
CC_USING_NOP_MCOUNTwhich will tell ftrace to expect the calls to already be converted.That seems like the much easier solution, then we can forget about recordmcount / objtool entirely for this.
Of course that was only for some gcc compilers, and I'm not sure if clang can do this.
Or do you just see all compilers doing this in the future, and not worrying about record-mcount at all, and bothering with objtool?
-- Steve
Sami Tolvanen
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 9 lines · Steven Rostedt
Quoted 5 lines · On Wed, 22 Jul 2020 20:41:37 +0200 Peter Zijlstra <[email protected]> wrote:
Quoted 4 lines
That said, Andi Kleen added an option to gcc called -mnop-mcount which will have gcc do both create the mcount section and convert the calls into nops. When doing so, it defines
CC_USING_NOP_MCOUNTwhich will tell ftrace to expect the calls to already be converted.
Quoted 8 lines
Quoted 2 lines
That seems like the much easier solution, then we can forget about recordmcount / objtool entirely for this.
Of course that was only for some gcc compilers, and I'm not sure if clang can do this.
Or do you just see all compilers doing this in the future, and not worrying about record-mcount at all, and bothering with objtool?
Clang appears to only support -mrecord-mcount and -mnop-mcount for s390, so we still need recordmcount / objtool for x86.
Sami
Peter Zijlstra
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
In reply to Steven RostedtQuoted 8 lines · Steven Rostedt
Quoted 5 lines · On Wed, 22 Jul 2020 20:41:37 +0200 Peter Zijlstra <[email protected]> wrote:
Quoted 4 lines
That said, Andi Kleen added an option to gcc called -mnop-mcount which will have gcc do both create the mcount section and convert the calls into nops. When doing so, it defines
CC_USING_NOP_MCOUNTwhich will tell ftrace to expect the calls to already be converted.
Quoted 8 lines
Quoted 2 lines
That seems like the much easier solution, then we can forget about recordmcount / objtool entirely for this.
Of course that was only for some gcc compilers, and I'm not sure if clang can do this.
Or do you just see all compilers doing this in the future, and not worrying about record-mcount at all, and bothering with objtool?
I got the GCC version wrong :/ Both -mnop-mcount and -mrecord-mcount landed in GCC-5, where our minimum GCC is now at 4.9.
Anyway, what do you prefer, I suppose I can make objtool whatever we need, that patch is trivial. Simply recording the sites and not rewriting them should be simple enough.
Steven Rostedt
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 3 lines · On Thu, 23 Jul 2020 01:56:20 +0200 Peter Zijlstra <[email protected]> wrote:
Anyway, what do you prefer, I suppose I can make objtool whatever we need, that patch is trivial. Simply recording the sites and not rewriting them should be simple enough.
Either way. If objtool turns it into nops, just make it where we can enable -DCC_USING_NOP_MCOUNT set, and the kernel will be unaware.
Or if you just add the locations, then that would work too.
-- Steve
Sami Tolvanen
maintainerRe: [RFC][PATCH] objtool,x86_64: Replace recordmcount with objtool
Quoted 11 lines · Steven Rostedt
Quoted 3 lines · On Thu, 23 Jul 2020 01:56:20 +0200 Peter Zijlstra <[email protected]> wrote:
Anyway, what do you prefer, I suppose I can make objtool whatever we need, that patch is trivial. Simply recording the sites and not rewriting them should be simple enough.
Either way. If objtool turns it into nops, just make it where we can enable -DCC_USING_NOP_MCOUNT set, and the kernel will be unaware.
Or if you just add the locations, then that would work too.
I took Peter's earlier patch, rebased it on top of the current mainline tree for easier testing, and tweaked the makefiles to only use objtool --mcount when CONFIG_STACK_VALIDATION is enabled and the compiler supports -mfentry. This works for me with both gcc and clang. Thoughts?
Sami
--- Makefile | 38 ++++++++++++---- arch/x86/Kconfig | 1 + kernel/trace/Kconfig | 5 +++ scripts/Makefile.build | 9 ++-- tools/objtool/builtin-check.c | 3 +- tools/objtool/builtin.h | 2 +- tools/objtool/check.c | 83 +++++++++++++++++++++++++++++++++++ tools/objtool/check.h | 1 + tools/objtool/objtool.h | 1 + 9 files changed, 129 insertions(+), 14 deletions(-)
Makefile +30 -8
@@ -864,17 +864,34 @@ ifdef CONFIG_HAVE_FENTRY ifeq ($(call cc-option-yn, -mfentry),y) CC_FLAGS_FTRACE += -mfentry CC_FLAGS_USING += -DCC_USING_FENTRY + export CC_USING_FENTRY := 1 endif endif export CC_FLAGS_FTRACE -KBUILD_CFLAGS += $(CC_FLAGS_FTRACE) $(CC_FLAGS_USING) -KBUILD_AFLAGS += $(CC_FLAGS_USING) ifdef CONFIG_DYNAMIC_FTRACE - ifdef CONFIG_HAVE_C_RECORDMCOUNT - BUILD_C_RECORDMCOUNT := y - export BUILD_C_RECORDMCOUNT - endif + ifndef CC_USING_RECORD_MCOUNT + ifndef CC_USING_PATCHABLE_FUNCTION_ENTRY + # use objtool or recordmcount to generate mcount tables + ifdef CONFIG_HAVE_OBJTOOL_MCOUNT + ifdef CC_USING_FENTRY + USE_OBJTOOL_MCOUNT := y + CC_FLAGS_USING += -DCC_USING_NOP_MCOUNT + export USE_OBJTOOL_MCOUNT + endif + endif + ifndef USE_OBJTOOL_MCOUNT + USE_RECORDMCOUNT := y + export USE_RECORDMCOUNT + ifdef CONFIG_HAVE_C_RECORDMCOUNT + BUILD_C_RECORDMCOUNT := y + export BUILD_C_RECORDMCOUNT + endif + endif + endif + endif endif +KBUILD_CFLAGS += $(CC_FLAGS_FTRACE) $(CC_FLAGS_USING) +KBUILD_AFLAGS += $(CC_FLAGS_USING) endif # We trigger additional mismatches with less inlining
@@ -1211,11 +1228,16 @@ uapi-asm-generic: PHONY += prepare-objtool prepare-resolve_btfids prepare-objtool: $(objtool_target) ifeq ($(SKIP_STACK_VALIDATION),1) +objtool-lib-prompt := "please install libelf-dev, libelf-devel or elfutils-libelf-devel" +ifdef USE_OBJTOOL_MCOUNT + @echo "error: Cannot generate __mcount_loc for CONFIG_DYNAMIC_FTRACE=y, $(objtool-lib-prompt)" >&2 + @false +endif ifdef CONFIG_UNWINDER_ORC - @echo "error: Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2 + @echo "error: Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, $(objtool-lib-prompt)" >&2 @false else - @echo "warning: Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2 + @echo "warning: Cannot use CONFIG_STACK_VALIDATION=y, $(objtool-lib-prompt)" >&2 endif endif
arch/x86/Kconfig +1 -0
@@ -163,6 +163,7 @@ config X86 select HAVE_CMPXCHG_LOCAL select HAVE_CONTEXT_TRACKING if X86_64 select HAVE_C_RECORDMCOUNT + select HAVE_OBJTOOL_MCOUNT if STACK_VALIDATION select HAVE_DEBUG_KMEMLEAK select HAVE_DMA_CONTIGUOUS select HAVE_DYNAMIC_FTRACE
kernel/trace/Kconfig +5 -0
@@ -56,6 +56,11 @@ config HAVE_C_RECORDMCOUNT help C version of recordmcount available? +config HAVE_OBJTOOL_MCOUNT + bool + help + Arch supports objtool --mcount + config TRACER_MAX_TRACE bool
scripts/Makefile.build +5 -4
@@ -175,8 +175,7 @@ cmd_modversions_c = \ fi endif -ifdef CONFIG_FTRACE_MCOUNT_RECORD -ifndef CC_USING_RECORD_MCOUNT +ifdef USE_RECORDMCOUNT # compiler will not generate __mcount_loc use recordmcount or recordmcount.pl ifdef BUILD_C_RECORDMCOUNT ifeq ("$(origin RECORDMCOUNT_WARN)", "command line")
@@ -203,8 +202,7 @@ recordmcount_source := $(srctree)/scripts/recordmcount.pl endif # BUILD_C_RECORDMCOUNT cmd_record_mcount = $(if $(findstring $(strip $(CC_FLAGS_FTRACE)),$(_c_flags)), \ $(sub_cmd_record_mcount)) -endif # CC_USING_RECORD_MCOUNT -endif # CONFIG_FTRACE_MCOUNT_RECORD +endif # USE_RECORDMCOUNT ifdef CONFIG_STACK_VALIDATION ifneq ($(SKIP_STACK_VALIDATION),1)
@@ -227,6 +225,9 @@ endif ifdef CONFIG_X86_SMAP objtool_args += --uaccess endif +ifdef USE_OBJTOOL_MCOUNT + objtool_args += --mcount +endif # 'OBJECT_FILES_NON_STANDARD := y': skip objtool checking for a directory # 'OBJECT_FILES_NON_STANDARD_foo.o := 'y': skip objtool checking for a file
tools/objtool/builtin-check.c +2 -1
@@ -18,7 +18,7 @@#include "builtin.h" #include "objtool.h" -bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux; +bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, mcount;static const char *const check_usage[] = {"objtool check [<options>] file.o" ,
@@ -35,6 +35,7 @@ const struct option check_options[] = {OPT_BOOLEAN ('s' ,"stats" , &stats,"print statistics" ),OPT_BOOLEAN ('d' ,"duplicate" , &validate_dup,"duplicate validation for vmlinux.o" ),OPT_BOOLEAN ('l' ,"vmlinux" , &vmlinux,"vmlinux.o validation" ), +OPT_BOOLEAN ('M' ,"mcount" , &mcount,"generate __mcount_loc" ), OPT_END(), };
tools/objtool/builtin.h +1 -1
@@ -8,7 +8,7 @@#include <subcmd/parse-options.h> extern const struct option check_options[]; -extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux; +extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, mcount;extern int cmd_check (int argc,const char **argv);extern int cmd_orc (int argc,const char **argv);
tools/objtool/check.c +83 -0
107 lines not on this page · raw message
tools/objtool/check.h +1 -0
@@ -22,6 +22,7 @@ struct insn_state {struct instruction {struct list_head list;struct hlist_node hash; +struct list_head mcount_loc_node;struct section *sec;unsigned long offset;unsigned int len;
tools/objtool/objtool.h +1 -0
@@ -16,6 +16,7 @@ struct objtool_file {struct elf *elf;struct list_head insn_list;DECLARE_HASHTABLE (insn_hash,20 ); +struct list_head mcount_loc_list;bool ignore_unreachables, c_file, hints, rodata; };
Sami Tolvanen
maintainerPATCH 5/22 kbuild: lto: postpone objtool
In reply to Sami TolvanenWith LTO, LLVM bitcode won't be compiled into native code until modpost_link, or modfinal for modules. This change postpones calls to objtool until after these steps.
--- include/linux/compiler.h | 2 +- lib/Kconfig.debug | 2 +- scripts/Makefile.build | 2 ++ scripts/Makefile.modfinal | 15 +++++++++++++++ 4 files changed, 19 insertions(+), 2 deletions(-)
include/linux/compiler.h +1 -1
@@ -120,7 +120,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,/* Annotate a C jump table to allow objtool to follow the code flow */ #define __annotate_jump_table __section(.rodata..c_jump_table) -#ifdef CONFIG_DEBUG_ENTRY +#if defined(CONFIG_DEBUG_ENTRY ) || defined(CONFIG_LTO_CLANG )/* Begin/end of an instrumentation safe region */ #define instrumentation_begin () ({ \ asm volatile("%c0:\n\t" \
lib/Kconfig.debug +1 -1
@@ -399,7 +399,7 @@ config STACK_VALIDATION config VMLINUX_VALIDATION bool - depends on STACK_VALIDATION && DEBUG_ENTRY && !PARAVIRT + depends on STACK_VALIDATION && (DEBUG_ENTRY || LTO_CLANG) && !PARAVIRT default y config DEBUG_FORCE_WEAK_PER_CPU
scripts/Makefile.build +2 -0
@@ -226,6 +226,7 @@ endif # CC_USING_PATCHABLE_FUNCTION_ENTRY endif # CONFIG_FTRACE_MCOUNT_RECORD ifdef CONFIG_STACK_VALIDATION +ifndef CONFIG_LTO_CLANG ifneq ($(SKIP_STACK_VALIDATION),1) __objtool_obj := $(objtree)/tools/objtool/objtool
@@ -258,6 +259,7 @@ objtool_obj = $(if $(patsubst y%,, \ $(__objtool_obj)) endif # SKIP_STACK_VALIDATION +endif # CONFIG_LTO_CLANG endif # CONFIG_STACK_VALIDATION # Rebuild all objects when objtool changes, or is enabled/disabled.
scripts/Makefile.modfinal +15 -0
@@ -48,6 +48,21 @@ endif # CC_USING_PATCHABLE_FUNCTION_ENTRY endif # CC_USING_RECORD_MCOUNT endif # CONFIG_FTRACE_MCOUNT_RECORD +ifdef CONFIG_STACK_VALIDATION +ifneq ($(SKIP_STACK_VALIDATION),1) +cmd_ld_ko_o += \ + $(objtree)/tools/objtool/objtool \ + $(if $(CONFIG_UNWINDER_ORC),orc generate,check) \ + --module \ + $(if $(CONFIG_FRAME_POINTER),,--no-fp) \ + $(if $(CONFIG_GCOV_KERNEL),--no-unreachable,) \ + $(if $(CONFIG_RETPOLINE),--retpoline,) \ + $(if $(CONFIG_X86_SMAP),--uaccess,) \ + $(@:.ko=$(prelink-ext).o); + +endif # SKIP_STACK_VALIDATION +endif # CONFIG_STACK_VALIDATION + endif # CONFIG_LTO_CLANG quiet_cmd_ld_ko_o = LD [M] $@
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Peter Zijlstra
maintainerRe: [PATCH 05/22] kbuild: lto: postpone objtool
include/linux/compiler.h void ftrace_likely_update(struct ftrace_likely_data *f, int val, · line 126
Quoted 13 lines · Sami Tolvanen
include/linux/compiler.h +1
-1@@ -120,7 +120,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,/* Annotate a C jump table to allow objtool to follow the code flow */ #define __annotate_jump_table __section(.rodata..c_jump_table) -#ifdef CONFIG_DEBUG_ENTRY +#if defined(CONFIG_DEBUG_ENTRY ) || defined(CONFIG_LTO_CLANG )/* Begin/end of an instrumentation safe region */ #define instrumentation_begin () ({ \ asm volatile("%c0:\n\t" \
Why would you be doing noinstr validation for lto builds? That doesn't make sense.
lib/Kconfig.debug config STACK_VALIDATION · line 404
Quoted 12 lines
lib/Kconfig.debug +1
-1@@ -399,7 +399,7 @@ config STACK_VALIDATION config VMLINUX_VALIDATION bool - depends on STACK_VALIDATION && DEBUG_ENTRY && !PARAVIRT + depends on STACK_VALIDATION && (DEBUG_ENTRY || LTO_CLANG) && !PARAVIRT default y
For that very same reason you shouldn't be excluding paravirt either.
Quoted 12 lines
scripts/Makefile.modfinal +4
-0@@ -48,6 +48,21 @@ endif # CC_USING_PATCHABLE_FUNCTION_ENTRY endif # CC_USING_RECORD_MCOUNT endif # CONFIG_FTRACE_MCOUNT_RECORD +ifdef CONFIG_STACK_VALIDATION +ifneq ($(SKIP_STACK_VALIDATION),1) +cmd_ld_ko_o += \ + $(objtree)/tools/objtool/objtool \
scripts/Makefile.modfinal endif # CC_USING_PATCHABLE_FUNCTION_ENTRY · line 64
Quoted 10 lines
scripts/Makefile.modfinal +10
-0+ $(if $(CONFIG_UNWINDER_ORC),orc generate,check) \ + --module \ + $(if $(CONFIG_FRAME_POINTER),,--no-fp) \ + $(if $(CONFIG_GCOV_KERNEL),--no-unreachable,) \ + $(if $(CONFIG_RETPOLINE),--retpoline,) \ + $(if $(CONFIG_X86_SMAP),--uaccess,) \ + $(@:.ko=$(prelink-ext).o); + +endif # SKIP_STACK_VALIDATION +endif # CONFIG_STACK_VALIDATION
What about the objtool invocation from link-vmlinux.sh ?
Sami Tolvanen
maintainerRe: [PATCH 05/22] kbuild: lto: postpone objtool
Quoted 9 lines · Peter Zijlstra
Quoted 8 lines · Sami Tolvanen
include/linux/compiler.h +0
-0@@ -120,7 +120,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,/* Annotate a C jump table to allow objtool to follow the code flow */ #define __annotate_jump_table __section(.rodata..c_jump_table)
Quoted 8 lines
include/linux/compiler.h void ftrace_likely_update(struct ftrace_likely_data *f, int val, · line 126
Quoted 5 lines
include/linux/compiler.h +1
-1-#ifdef CONFIG_DEBUG_ENTRY +#if defined(CONFIG_DEBUG_ENTRY ) || defined(CONFIG_LTO_CLANG )/* Begin/end of an instrumentation safe region */ #define instrumentation_begin () ({ \ asm volatile("%c0:\n\t" \Why would you be doing noinstr validation for lto builds? That doesn't make sense.
This is just to avoid a ton of noinstr warnings when we run objtool on vmlinux.o, but I'm also fine with skipping noinstr validation with LTO.
Quoted 8 lines
Quoted 8 lines
include/linux/compiler.h +8
-0+ifdef CONFIG_STACK_VALIDATION +ifneq ($(SKIP_STACK_VALIDATION),1) +cmd_ld_ko_o += \ + $(objtree)/tools/objtool/objtool \ + $(if $(CONFIG_UNWINDER_ORC),orc generate,check) \ + --module \ + $(if $(CONFIG_FRAME_POINTER),,--no-fp) \ + $(if $(CONFIG_GCOV_KERNEL),--no-unreachable,) \
Quoted 8 lines
include/linux/compiler.h
Quoted 6 lines
include/linux/compiler.h +6
-0+ $(if $(CONFIG_RETPOLINE),--retpoline,) \ + $(if $(CONFIG_X86_SMAP),--uaccess,) \ + $(@:.ko=$(prelink-ext).o); + +endif # SKIP_STACK_VALIDATION +endif # CONFIG_STACK_VALIDATIONWhat about the objtool invocation from
link-vmlinux.sh?
What about it? The existing objtool_link invocation in link-vmlinux.sh works fine for our purposes as well.
Sami
Peter Zijlstra
maintainerRe: [PATCH 05/22] kbuild: lto: postpone objtool
Quoted 19 lines · Sami Tolvanen
Quoted 9 lines · Peter Zijlstra
Quoted 8 lines · Sami Tolvanen
include/linux/compiler.h +0
-0@@ -120,7 +120,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,/* Annotate a C jump table to allow objtool to follow the code flow */ #define __annotate_jump_table __section(.rodata..c_jump_table)Quoted 8 lines
include/linux/compiler.h void ftrace_likely_update(struct ftrace_likely_data *f, int val, · line 126
Quoted 5 lines
include/linux/compiler.h +1
-1-#ifdef CONFIG_DEBUG_ENTRY +#if defined(CONFIG_DEBUG_ENTRY ) || defined(CONFIG_LTO_CLANG )/* Begin/end of an instrumentation safe region */ #define instrumentation_begin () ({ \ asm volatile("%c0:\n\t" \Why would you be doing noinstr validation for lto builds? That doesn't make sense.
Quoted 2 lines
This is just to avoid a ton of noinstr warnings when we run objtool on vmlinux.o, but I'm also fine with skipping noinstr validation with LTO.
Right, then we need to make --no-vmlinux work properly when !DEBUG_ENTRY, which I think might be buggered due to us overriding the argument when the objname ends with "vmlinux.o".
Quoted 17 lines
Quoted 8 lines
Quoted 8 lines
include/linux/compiler.h +8
-0+ifdef CONFIG_STACK_VALIDATION +ifneq ($(SKIP_STACK_VALIDATION),1) +cmd_ld_ko_o += \ + $(objtree)/tools/objtool/objtool \ + $(if $(CONFIG_UNWINDER_ORC),orc generate,check) \ + --module \ + $(if $(CONFIG_FRAME_POINTER),,--no-fp) \ + $(if $(CONFIG_GCOV_KERNEL),--no-unreachable,) \Quoted 8 lines
include/linux/compiler.h
Quoted 6 lines
include/linux/compiler.h +6
-0+ $(if $(CONFIG_RETPOLINE),--retpoline,) \ + $(if $(CONFIG_X86_SMAP),--uaccess,) \ + $(@:.ko=$(prelink-ext).o); + +endif # SKIP_STACK_VALIDATION +endif # CONFIG_STACK_VALIDATIONWhat about the objtool invocation from
link-vmlinux.sh?
Quoted 2 lines
What about it? The existing
objtool_linkinvocation inlink-vmlinux.shworks fine for our purposes as well.
Well, I was wondering why you're adding yet another objtool invocation while we already have one.
Sami Tolvanen
maintainerRe: [PATCH 05/22] kbuild: lto: postpone objtool
Quoted 20 lines · Peter Zijlstra
Quoted 19 lines · Sami Tolvanen
Quoted 17 lines · Peter Zijlstra
include/linux/compiler.h void ftrace_likely_update(struct ftrace_likely_data *f, int val, · line 126
Quoted 13 lines · Sami Tolvanen
include/linux/compiler.h +1
-1@@ -120,7 +120,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,/* Annotate a C jump table to allow objtool to follow the code flow */ #define __annotate_jump_table __section(.rodata..c_jump_table) -#ifdef CONFIG_DEBUG_ENTRY +#if defined(CONFIG_DEBUG_ENTRY ) || defined(CONFIG_LTO_CLANG )/* Begin/end of an instrumentation safe region */ #define instrumentation_begin () ({ \ asm volatile("%c0:\n\t" \Why would you be doing noinstr validation for lto builds? That doesn't make sense.
Quoted 6 lines
Quoted 2 lines
This is just to avoid a ton of noinstr warnings when we run objtool on vmlinux.o, but I'm also fine with skipping noinstr validation with LTO.
Right, then we need to make --no-vmlinux work properly when !DEBUG_ENTRY, which I think might be buggered due to us overriding the argument when the objname ends with "vmlinux.o".
Right. Can we just remove that and pass --vmlinux to objtool in link-vmlinux.sh, or is the override necessary somewhere else?
Quoted 17 lines
Quoted 17 lines
Quoted 16 lines
Quoted 4 lines
include/linux/compiler.h +4
-0+ifdef CONFIG_STACK_VALIDATION +ifneq ($(SKIP_STACK_VALIDATION),1) +cmd_ld_ko_o += \ +$ (objtree)/tools/objtool/objtool \include/linux/compiler.h
Quoted 10 lines
include/linux/compiler.h +10
-0+ $(if $(CONFIG_UNWINDER_ORC),orc generate,check) \ + --module \ + $(if $(CONFIG_FRAME_POINTER),,--no-fp) \ + $(if $(CONFIG_GCOV_KERNEL),--no-unreachable,) \ + $(if $(CONFIG_RETPOLINE),--retpoline,) \ + $(if $(CONFIG_X86_SMAP),--uaccess,) \ + $(@:.ko=$(prelink-ext).o); + +endif # SKIP_STACK_VALIDATION +endif # CONFIG_STACK_VALIDATIONWhat about the objtool invocation from
link-vmlinux.sh?
Quoted 5 lines
Quoted 2 lines
What about it? The existing
objtool_linkinvocation inlink-vmlinux.shworks fine for our purposes as well.Well, I was wondering why you're adding yet another objtool invocation while we already have one.
Because we can't run objtool until we have compiled bitcode to native code, so for modules, we're need another invocation after everything has been compiled.
Sami
Peter Zijlstra
maintainerRe: [PATCH 05/22] kbuild: lto: postpone objtool
Quoted 8 lines · Sami Tolvanen
Quoted 3 lines · Peter Zijlstra
Right, then we need to make --no-vmlinux work properly when !DEBUG_ENTRY, which I think might be buggered due to us overriding the argument when the objname ends with "vmlinux.o".
Right. Can we just remove that and pass --vmlinux to objtool in
link-vmlinux.sh, or is the override necessary somewhere else?
Think we can remove it; it was just convenient when running manually.
Quoted 20 lines
Quoted 20 lines
Quoted 19 lines
Quoted 8 lines
Quoted 8 lines
scripts/Makefile.modfinal +8
-0+ifdef CONFIG_STACK_VALIDATION +ifneq ($(SKIP_STACK_VALIDATION),1) +cmd_ld_ko_o += \ + $(objtree)/tools/objtool/objtool \ + $(if $(CONFIG_UNWINDER_ORC),orc generate,check) \ + --module \ + $(if $(CONFIG_FRAME_POINTER),,--no-fp) \ + $(if $(CONFIG_GCOV_KERNEL),--no-unreachable,) \Quoted 8 lines
scripts/Makefile.modfinal endif # CC_USING_PATCHABLE_FUNCTION_ENTRY · line 64
Quoted 6 lines
scripts/Makefile.modfinal +6
-0+ $(if $(CONFIG_RETPOLINE),--retpoline,) \ + $(if $(CONFIG_X86_SMAP),--uaccess,) \ + $(@:.ko=$(prelink-ext).o); + +endif # SKIP_STACK_VALIDATION +endif # CONFIG_STACK_VALIDATIONWhat about the objtool invocation from
link-vmlinux.sh?What about it? The existing
objtool_linkinvocation inlink-vmlinux.shworks fine for our purposes as well.
Quoted 6 lines
Quoted 2 lines
Well, I was wondering why you're adding yet another objtool invocation while we already have one.
Because we can't run objtool until we have compiled bitcode to native code, so for modules, we're need another invocation after everything has been compiled.
Well, that I understand, my question was why we need one in scripts/link-vmlinux.sh and an additional one. I think we're just talking past one another and agree we only need one.
Sami Tolvanen
maintainerRe: [PATCH 05/22] kbuild: lto: postpone objtool
Quoted 11 lines · Peter Zijlstra
Quoted 8 lines · Sami Tolvanen
Quoted 3 lines · Peter Zijlstra
Right, then we need to make --no-vmlinux work properly when !DEBUG_ENTRY, which I think might be buggered due to us overriding the argument when the objname ends with "vmlinux.o".
Right. Can we just remove that and pass --vmlinux to objtool in
link-vmlinux.sh, or is the override necessary somewhere else?Think we can remove it; it was just convenient when running manually.
Great, I'll change this in v2.
Quoted 23 lines
Quoted 23 lines
Quoted 22 lines
Quoted 17 lines
Quoted 8 lines
Quoted 8 lines
scripts/Makefile.modfinal +8
-0+ifdef CONFIG_STACK_VALIDATION +ifneq ($(SKIP_STACK_VALIDATION),1) +cmd_ld_ko_o += \ + $(objtree)/tools/objtool/objtool \ + $(if $(CONFIG_UNWINDER_ORC),orc generate,check) \ + --module \ + $(if $(CONFIG_FRAME_POINTER),,--no-fp) \ + $(if $(CONFIG_GCOV_KERNEL),--no-unreachable,) \Quoted 8 lines
scripts/Makefile.modfinal endif # CC_USING_PATCHABLE_FUNCTION_ENTRY · line 64
Quoted 6 lines
scripts/Makefile.modfinal +6
-0+ $(if $(CONFIG_RETPOLINE),--retpoline,) \ + $(if $(CONFIG_X86_SMAP),--uaccess,) \ + $(@:.ko=$(prelink-ext).o); + +endif # SKIP_STACK_VALIDATION +endif # CONFIG_STACK_VALIDATIONWhat about the objtool invocation from
link-vmlinux.sh?Quoted 2 lines
What about it? The existing
objtool_linkinvocation inlink-vmlinux.shworks fine for our purposes as well.Well, I was wondering why you're adding yet another objtool invocation while we already have one.
Quoted 7 lines
Quoted 3 lines
Because we can't run objtool until we have compiled bitcode to native code, so for modules, we're need another invocation after everything has been compiled.
Well, that I understand, my question was why we need one in
scripts/link-vmlinux.shand an additional one. I think we're just talking past one another and agree we only need one.
We need just one for vmlinux.o, but this rule adds an objtool invocation for kernel modules, which we also couldn't check earlier. We link all the bitcode for modules into <module>.lto.o and run modpost and objtool on that before building the final .ko.
Sami
Sami Tolvanen
maintainerPATCH 6/22 kbuild: lto: limit inlining
In reply to Sami TolvanenThis change limits function inlining across translation unit boundaries in order to reduce the binary size with LTO.
The -import-instr-limit flag defines a size limit, as the number of LLVM IR instructions, for importing functions from other TUs. The default value is 100, and decreasing it to 5 reduces the size of a stripped arm64 defconfig vmlinux by 11%.
--- Makefile | 4 ++++ 1 file changed, 4 insertions(+)
Makefile +4 -0
@@ -894,6 +894,10 @@ else CC_FLAGS_LTO_CLANG := -flto endif CC_FLAGS_LTO_CLANG += -fvisibility=default + +# Limit inlining across translation units to reduce binary size +LD_FLAGS_LTO_CLANG := -mllvm -import-instr-limit=5 +KBUILD_LDFLAGS += $(LD_FLAGS_LTO_CLANG) endif ifdef CONFIG_LTO
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Peter Zijlstra
maintainerRe: [PATCH 06/22] kbuild: lto: limit inlining
Quoted 7 lines · Sami Tolvanen
This change limits function inlining across translation unit boundaries in order to reduce the binary size with LTO.
The -import-instr-limit flag defines a size limit, as the number of LLVM IR instructions, for importing functions from other TUs. The default value is 100, and decreasing it to 5 reduces the size of a stripped arm64 defconfig vmlinux by 11%.
Is that also the right number for x86? What about the effect on performance? What did 6 do? or 4?
Quoted 24 lines
Suggested-by George Burgess IV <[email protected]>Signed-off-by Sami Tolvanen <[email protected]>--- Makefile | 4 ++++ 1 file changed, 4 insertions(+)Makefile +4
-0@@ -894,6 +894,10 @@ else CC_FLAGS_LTO_CLANG := -flto endif CC_FLAGS_LTO_CLANG += -fvisibility=default + +# Limit inlining across translation units to reduce binary size +LD_FLAGS_LTO_CLANG := -mllvm -import-instr-limit=5 +KBUILD_LDFLAGS += $(LD_FLAGS_LTO_CLANG) endif ifdef CONFIG_LTOSignature · 1 line
2.27.0.212.ge8ba1cc988-goog
Sami Tolvanen
maintainerRe: [PATCH 06/22] kbuild: lto: limit inlining
Quoted 11 lines · Peter Zijlstra
Quoted 7 lines · Sami Tolvanen
This change limits function inlining across translation unit boundaries in order to reduce the binary size with LTO.
The -import-instr-limit flag defines a size limit, as the number of LLVM IR instructions, for importing functions from other TUs. The default value is 100, and decreasing it to 5 reduces the size of a stripped arm64 defconfig vmlinux by 11%.
Is that also the right number for x86? What about the effect on performance? What did 6 do? or 4?
This is the size limit we decided on for Android after testing on arm64, but the number is obviously a compromise between code size and performance. I'd be happy to benchmark this further once other concerns have been resolved.
Sami
Sami Tolvanen
maintainerPATCH 7/22 kbuild: lto: merge module sections
In reply to Sami TolvanenLLD always splits sections with LTO, which increases module sizes. This change adds a linker script that merges the split sections in the final module and discards the .eh_frame section that LLD may generate.
--- Makefile | 2 ++ scripts/module-lto.lds | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 scripts/module-lto.lds
Makefile +2 -0
@@ -898,6 +898,8 @@ CC_FLAGS_LTO_CLANG += -fvisibility=default # Limit inlining across translation units to reduce binary size LD_FLAGS_LTO_CLANG := -mllvm -import-instr-limit=5 KBUILD_LDFLAGS += $(LD_FLAGS_LTO_CLANG) + +KBUILD_LDS_MODULE += $(srctree)/scripts/module-lto.lds endif ifdef CONFIG_LTO
scripts/module-lto.lds new file +26 -0
@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * With CONFIG_LTO_CLANG, LLD always enables -fdata-sections and + * -ffunction-sections, which increases the size of the final module. + * Merge the split sections in the final binary. + */ +SECTIONS { + __patchable_function_entries : { *(__patchable_function_entries) } + + .bss : { + *(.bss .bss.[0-9a-zA-Z_]*) + *(.bss..L* .bss..compoundliteral*) + } + + .data : { + *(.data .data.[0-9a-zA-Z_]*) + *(.data..L* .data..compoundliteral*) + } + + .rodata : { + *(.rodata .rodata.[0-9a-zA-Z_]*) + *(.rodata..L* .rodata..compoundliteral*) + } + + .text : { *(.text .text.[0-9a-zA-Z_]*) } +}
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Nick Desaulniers
reviewerRe: [PATCH 07/22] kbuild: lto: merge module sections
Quoted 4 lines · Sami Tolvanen
LLD always splits sections with LTO, which increases module sizes. This change adds a linker script that merges the split sections in the final module and discards the .eh_frame section that LLD may generate.
For discarding .eh_frame, Kees is currently fighting with a series that I would really like to see land that enables warnings on orphan section placement. I don't see any new flags to inhibit .eh_frame generation, or discard it in the linker script, so I'd expect it to be treated as an orphan section and kept. Was that missed, or should that be removed from the commit message?
Quoted 57 lines
Suggested-by Nick Desaulniers <[email protected]>Signed-off-by Sami Tolvanen <[email protected]>--- Makefile | 2 ++ scripts/module-lto.lds | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 scripts/module-lto.ldsMakefile +2
-0@@ -898,6 +898,8 @@ CC_FLAGS_LTO_CLANG += -fvisibility=default # Limit inlining across translation units to reduce binary size LD_FLAGS_LTO_CLANG := -mllvm -import-instr-limit=5 KBUILD_LDFLAGS += $(LD_FLAGS_LTO_CLANG) + +KBUILD_LDS_MODULE += $(srctree)/scripts/module-lto.lds endif ifdef CONFIG_LTOscripts/module-lto.lds new file +26
-1@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * With CONFIG_LTO_CLANG, LLD always enables -fdata-sections and + * -ffunction-sections, which increases the size of the final module. + * Merge the split sections in the final binary. + */ +SECTIONS { + __patchable_function_entries : { *(__patchable_function_entries) } + + .bss : { + *(.bss .bss.[0-9a-zA-Z_]*) + *(.bss..L* .bss..compoundliteral*) + } + + .data : { + *(.data .data.[0-9a-zA-Z_]*) + *(.data..L* .data..compoundliteral*) + } + + .rodata : { + *(.rodata .rodata.[0-9a-zA-Z_]*) + *(.rodata..L* .rodata..compoundliteral*) + } + + .text : { *(.text .text.[0-9a-zA-Z_]*) } +} --2.27.0.212.ge8ba1cc988-goog
Signature · 2 lines
Thanks, ~Nick Desaulniers
Sami Tolvanen
maintainerRe: [PATCH 07/22] kbuild: lto: merge module sections
Quoted 6 lines · Nick Desaulniers' via Clang Built Linux
Quoted 4 lines · Sami Tolvanen
LLD always splits sections with LTO, which increases module sizes. This change adds a linker script that merges the split sections in the final module and discards the .eh_frame section that LLD may generate.
Quoted 6 lines
For discarding .eh_frame, Kees is currently fighting with a series that I would really like to see land that enables warnings on orphan section placement. I don't see any new flags to inhibit .eh_frame generation, or discard it in the linker script, so I'd expect it to be treated as an orphan section and kept. Was that missed, or should that be removed from the commit message?
It should be removed from the commit message, thanks for pointing it out.
Sami
Sami Tolvanen
maintainerPATCH 8/22 kbuild: lto: remove duplicate dependencies from .mod files
In reply to Sami TolvanenWith LTO, llvm-nm prints out symbols for each archive member separately, which results in a lot of duplicate dependencies in the .mod file when CONFIG_TRIM_UNUSED_SYMS is enabled. When a module consists of several compilation units, the output can exceed the default xargs command size limit and split the dependency list to multiple lines, which results in used symbols getting trimmed.
This change removes duplicate dependencies, which will reduce the probability of this happening and makes .mod files smaller and easier to read.
--- scripts/Makefile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.build +1 -1
@@ -291,7 +291,7 @@ endef # List module undefined symbols (or empty line if not enabled) ifdef CONFIG_TRIM_UNUSED_KSYMS -cmd_undef_syms = $(NM) $< | sed -n 's/^ *U //p' | xargs echo +cmd_undef_syms = $(NM) $< | sed -n 's/^ *U //p' | sort -u | xargs echo else cmd_undef_syms = echo endif
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Re: [PATCH 08/22] kbuild: lto: remove duplicate dependencies from .mod files
Quoted 8 lines · Sami Tolvanen
With LTO, llvm-nm prints out symbols for each archive member separately, which results in a lot of duplicate dependencies in the .mod file when
CONFIG_TRIM_UNUSED_SYMSis enabled. When a module consists of several compilation units, the output can exceed the default xargs command size limit and split the dependency list to multiple lines, which results in used symbols getting trimmed.
Quoted 5 lines
This change removes duplicate dependencies, which will reduce the probability of this happening and makes .mod files smaller and easier to read.
Signed-off-by Sami Tolvanen <[email protected]>
Quoted 20 lines
--- scripts/Makefile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/Makefile.build +1
-2@@ -291,7 +291,7 @@ endef # List module undefined symbols (or empty line if not enabled) ifdef CONFIG_TRIM_UNUSED_KSYMS -cmd_undef_syms = $(NM) $< | sed -n 's/^ *U //p' | xargs echo +cmd_undef_syms = $(NM) $< | sed -n 's/^ *U //p' | sort -u | xargs echo else cmd_undef_syms = echo endif --2.27.0.212.ge8ba1cc988-goog
Signature · 2 lines
Thanks, ~Nick Desaulniers
Sami Tolvanen
maintainerPATCH 9/22 init: lto: ensure initcall ordering
In reply to Sami TolvanenWith LTO, the compiler doesn't necessarily obey the link order for initcalls, and initcall variables need globally unique names to avoid collisions at link time.
This change exports __KBUILD_MODNAME and adds the initcall_id() macro, which uses it together with __COUNTER__ and __LINE__ to help ensure these variables have unique names, and moves each variable to its own section when LTO is enabled, so the correct order can be specified using a linker script.
The generate_initcall_ordering.pl script uses nm to find initcalls from the object files passed to the linker, and generates a linker script that specifies the intended order. With LTO, the script is called in link-vmlinux.sh.
--- include/linux/init.h | 52 +++++- scripts/Makefile.lib | 6 +- scripts/generate_initcall_order.pl | 270 +++++++++++++++++++++++++++++ scripts/link-vmlinux.sh | 14 ++ 4 files changed, 333 insertions(+), 9 deletions(-) create mode 100755 scripts/generate_initcall_order.pl
include/linux/init.h +45 -7
@@ -184,19 +184,57 @@ extern bool initcall_debug;* as KEEP() in the linker script. */ +/* Format: <modname>__<counter>_<line>_<fn> */ +#define __initcall_id (fn) \ + __PASTE(__KBUILD_MODNAME, \ + __PASTE(__, \ + __PASTE(__COUNTER__, \ + __PASTE(_, \ + __PASTE(__LINE__, \ + __PASTE(_, fn)))))) + +/* Format: __<prefix>__<iid><id> */ +#define __initcall_name (prefix, __iid, id) \ + __PASTE(__, \ + __PASTE(prefix, \ + __PASTE(__, \ + __PASTE(__iid, id)))) + +#ifdef CONFIG_LTO_CLANG +/* +* With LTO, the compiler doesn't necessarily obey link order for +* initcalls. In order to preserve the correct order, we add each +* variable into its own section and generate a linker script (in +* scripts/link-vmlinux.sh) to specify the order of the sections. +*/ +#define __initcall_section (__sec, __iid) \ + #__sec ".init.." #__iid +#else +#define __initcall_section (__sec, __iid) \ + #__sec ".init" +#endif +#ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS -#define ___define_initcall (fn, id, __sec) \ +#define ____define_initcall (fn, __name, __sec) \ __ADDRESSABLE(fn) \ - asm(".section \"" #__sec ".init\", \"a\" \n" \ - "__initcall_" #fn #id ": \n" \ + asm(".section \"" __sec "\", \"a\" \n" \ + __stringify(__name) ": \n" \ ".long " #fn " - . \n" \ ".previous \n");#else -#define ___define_initcall (fn, id, __sec) \ - static initcall_t __initcall_##fn##id __used \ - __attribute__((__section__(#__sec ".init"))) = fn; +#define ____define_initcall (fn, __name, __sec) \ + static initcall_t __name __used \ + __attribute__((__section__(__sec))) = fn;#endif +#define __unique_initcall (fn, id, __sec, __iid) \ + ____define_initcall(fn, \ + __initcall_name(initcall, __iid, id), \ + __initcall_section(__sec, __iid)) + +#define ___define_initcall (fn, id, __sec) \ + __unique_initcall(fn, id, __sec, __initcall_id(fn)) +#define __define_initcall (fn, id) ___define_initcall(fn, id, .initcall##id)/*
@@ -236,7 +274,7 @@ extern bool initcall_debug;#define __exitcall (fn) \ static exitcall_t __exitcall_##fn __exit_call = fn -#define console_initcall (fn) ___define_initcall(fn,, .con_initcall) +#define console_initcall (fn) ___define_initcall(fn, con, .con_initcall)struct obs_kernel_param {const char *str;
scripts/Makefile.lib +4 -2
@@ -106,9 +106,11 @@ target-stem = $(basename $(patsubst $(obj)/%,%,$@)) # These flags are needed for modversions and compiling, so we define them here # $(modname_flags) defines KBUILD_MODNAME as the name of the module it will # end up in (or would, if it gets compiled in) -name-fix = $(call stringify,$(subst $(comma),_,$(subst -,_,$1))) +name-fix-token = $(subst $(comma),_,$(subst -,_,$1)) +name-fix = $(call stringify,$(call name-fix-token,$1)) basename_flags = -DKBUILD_BASENAME=$(call name-fix,$(basetarget)) -modname_flags = -DKBUILD_MODNAME=$(call name-fix,$(modname)) +modname_flags = -DKBUILD_MODNAME=$(call name-fix,$(modname)) \ + -D__KBUILD_MODNAME=$(call name-fix-token,$(modname)) modfile_flags = -DKBUILD_MODFILE=$(call stringify,$(modfile)) orig_c_flags = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) \
scripts/generate_initcall_order.pl new file +270 -0
270 lines not on this page · raw message
scripts/link-vmlinux.sh +14 -0
@@ -39,6 +39,16 @@ info() fi } +# Generate a linker script to ensure correct ordering of initcalls. +gen_initcalls() +{ + info GEN .tmp_initcalls.lds + + ${srctree}/scripts/generate_initcall_order.pl \ + ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS} \ + > .tmp_initcalls.lds +} + # If CONFIG_LTO_CLANG is selected, collect generated symbol versions into # .tmp_symversions.lds gen_symversions()
@@ -70,6 +80,9 @@ modpost_link() --end-group" if [ -n "${CONFIG_LTO_CLANG}" ]; then + gen_initcalls + lds="-T .tmp_initcalls.lds" + if [ -n "${CONFIG_MODVERSIONS}" ]; then gen_symversions lds="${lds} -T .tmp_symversions.lds"
@@ -283,6 +296,7 @@ cleanup() { rm -f .btf.* rm -f .tmp_System.map + rm -f .tmp_initcalls.lds rm -f .tmp_symversions.lds rm -f .tmp_vmlinux* rm -f System.map
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
kernel test robot
build botRe: [PATCH 09/22] init: lto: ensure initcall ordering
Thank you for the patch! Yet something to improve:
Hi Sami,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on 26e122e97a3d0390ebec389347f64f3730fdf48f]
url: https://github.com/0day-ci/linux/commits/Sami-Tolvanen/add-support-for-Clang-LTO/20200625-043816 base: 26e122e97a3d0390ebec389347f64f3730fdf48f config: m68k-defconfig (attached as .config) compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
All error/warnings (new ones prefixed by >>):
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:13,
from ./arch/m68k/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:11,
from drivers/ide/gayle.c:13:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from drivers/ide/gayle.c:12:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
144 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
In file included from <command-line>:
drivers/ide/gayle.c: At top level:
>> arch/m68k/include/asm/amigayle.h:57:66: error: pasting ")" and "__279_185_amiga_gayle_ide_driver_init" does not give a valid preprocessing token
57 | #define gayle (*(volatile struct GAYLE *)(zTwoBase+GAYLE_ADDRESS))
| ^
include/linux/compiler_types.h:53:23: note: in definition of macro '___PASTE'
53 | #define ___PASTE(a,b) a##b
| ^
>> include/linux/init.h:189:2: note: in expansion of macro '__PASTE'
189 | __PASTE(__KBUILD_MODNAME, \
| ^~~~~~~
>> <command-line>: note: in expansion of macro 'gayle'
>> include/linux/init.h:189:10: note: in expansion of macro '__KBUILD_MODNAME'
189 | __PASTE(__KBUILD_MODNAME, \
| ^~~~~~~~~~~~~~~~
>> include/linux/init.h:236:35: note: in expansion of macro '__initcall_id'
236 | __unique_initcall(fn, id, __sec, __initcall_id(fn))
| ^~~~~~~~~~~~~
include/linux/init.h:238:35: note: in expansion of macro '___define_initcall'
238 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:267:30: note: in expansion of macro '__define_initcall'
267 | #define device_initcall(fn) __define_initcall(fn, 6)
| ^~~~~~~~~~~~~~~~~
>> include/linux/init.h:272:24: note: in expansion of macro 'device_initcall'
272 | #define __initcall(fn) device_initcall(fn)
| ^~~~~~~~~~~~~~~
>> include/linux/module.h:88:24: note: in expansion of macro '__initcall'
88 | #define module_init(x) __initcall(x);
| ^~~~~~~~~~
include/linux/platform_device.h:271:1: note: in expansion of macro 'module_init'
271 | module_init(__platform_driver##_init); \
| ^~~~~~~~~~~
drivers/ide/gayle.c:185:1: note: in expansion of macro 'module_platform_driver_probe'
185 | module_platform_driver_probe(amiga_gayle_ide_driver, amiga_gayle_ide_probe);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/init.h:200:10: error: pasting "__" and "(" does not give a valid preprocessing token
200 | __PASTE(__, \
| ^~
include/linux/compiler_types.h:53:23: note: in definition of macro '___PASTE'
53 | #define ___PASTE(a,b) a##b
| ^
include/linux/init.h:200:2: note: in expansion of macro '__PASTE'
200 | __PASTE(__, \
| ^~~~~~~
>> include/linux/init.h:232:3: note: in expansion of macro '__initcall_name'
232 | __initcall_name(initcall, __iid, id), \
| ^~~~~~~~~~~~~~~
>> include/linux/init.h:236:2: note: in expansion of macro '__unique_initcall'
236 | __unique_initcall(fn, id, __sec, __initcall_id(fn))
| ^~~~~~~~~~~~~~~~~
include/linux/init.h:238:35: note: in expansion of macro '___define_initcall'
238 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:267:30: note: in expansion of macro '__define_initcall'
267 | #define device_initcall(fn) __define_initcall(fn, 6)
| ^~~~~~~~~~~~~~~~~
>> include/linux/init.h:272:24: note: in expansion of macro 'device_initcall'
272 | #define __initcall(fn) device_initcall(fn)
| ^~~~~~~~~~~~~~~
>> include/linux/module.h:88:24: note: in expansion of macro '__initcall'
88 | #define module_init(x) __initcall(x);
| ^~~~~~~~~~
include/linux/platform_device.h:271:1: note: in expansion of macro 'module_init'
271 | module_init(__platform_driver##_init); \
| ^~~~~~~~~~~
drivers/ide/gayle.c:185:1: note: in expansion of macro 'module_platform_driver_probe'
185 | module_platform_driver_probe(amiga_gayle_ide_driver, amiga_gayle_ide_probe);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:6,
from include/linux/kernel.h:15,
from include/asm-generic/bug.h:19,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from drivers/ide/gayle.c:12:
>> arch/m68k/include/asm/amigayle.h:57:16: error: expected declaration specifiers or '...' before '*' token
57 | #define gayle (*(volatile struct GAYLE *)(zTwoBase+GAYLE_ADDRESS))
| ^
include/linux/init.h:226:20: note: in definition of macro '____define_initcall'
226 | static initcall_t __name __used \
| ^~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/init.h:198:2: note: in expansion of macro '__PASTE'
198 | __PASTE(__, \
| ^~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/init.h:199:2: note: in expansion of macro '__PASTE'
199 | __PASTE(prefix, \
| ^~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/init.h:200:2: note: in expansion of macro '__PASTE'
200 | __PASTE(__, \
| ^~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/init.h:201:2: note: in expansion of macro '__PASTE'
201 | __PASTE(__iid, id))))
| ^~~~~~~
>> include/linux/init.h:232:3: note: in expansion of macro '__initcall_name'
232 | __initcall_name(initcall, __iid, id), \
| ^~~~~~~~~~~~~~~
>> include/linux/init.h:236:2: note: in expansion of macro '__unique_initcall'
236 | __unique_initcall(fn, id, __sec, __initcall_id(fn))
| ^~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
>> include/linux/init.h:189:2: note: in expansion of macro '__PASTE'
189 | __PASTE(__KBUILD_MODNAME, \
| ^~~~~~~
>> <command-line>: note: in expansion of macro 'gayle'
>> include/linux/init.h:189:10: note: in expansion of macro '__KBUILD_MODNAME'
189 | __PASTE(__KBUILD_MODNAME, \
| ^~~~~~~~~~~~~~~~
>> include/linux/init.h:236:35: note: in expansion of macro '__initcall_id'
236 | __unique_initcall(fn, id, __sec, __initcall_id(fn))
| ^~~~~~~~~~~~~
include/linux/init.h:238:35: note: in expansion of macro '___define_initcall'
238 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:267:30: note: in expansion of macro '__define_initcall'
267 | #define device_initcall(fn) __define_initcall(fn, 6)
| ^~~~~~~~~~~~~~~~~
>> include/linux/init.h:272:24: note: in expansion of macro 'device_initcall'
272 | #define __initcall(fn) device_initcall(fn)
| ^~~~~~~~~~~~~~~
include/linux/module.h:88:24: note: in expansion of macro '__initcall'
88 | #define module_init(x) __initcall(x);
| ^~~~~~~~~~
include/linux/platform_device.h:271:1: note: in expansion of macro 'module_init'
271 | module_init(__platform_driver##_init); \
| ^~~~~~~~~~~
drivers/ide/gayle.c:185:1: note: in expansion of macro 'module_platform_driver_probe'
185 | module_platform_driver_probe(amiga_gayle_ide_driver, amiga_gayle_ide_probe);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/ide/gayle.c:19:
drivers/ide/gayle.c:185:30: warning: 'amiga_gayle_ide_driver_init' defined but not used [-Wunused-function]
185 | module_platform_driver_probe(amiga_gayle_ide_driver, amiga_gayle_ide_probe);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/platform_device.h:266:19: note: in definition of macro 'module_platform_driver_probe'
266 | static int __init __platform_driver##_init(void) \
| ^~~~~~~~~~~~~~~~~vim +200 include/linux/init.h
170
171 /*
172 * initcalls are now grouped by functionality into separate
173 * subsections. Ordering inside the subsections is determined
174 * by link order.
175 * For backwards compatibility, initcall() puts the call in
176 * the device init subsection.
177 *
178 * The `id' arg to __define_initcall() is needed so that multiple initcalls
179 * can point at the same handler without causing duplicate-symbol build errors.
180 *
181 * Initcalls are run by placing pointers in initcall sections that the
182 * kernel iterates at runtime. The linker can do dead code / data elimination
183 * and remove that completely, so the initcall sections have to be marked
184 * as KEEP() in the linker script.
185 */
186
187 /* Format: <modname>__<counter>_<line>_<fn> */
188 #define __initcall_id(fn) \
> 189 __PASTE(__KBUILD_MODNAME, \
190 __PASTE(__, \
191 __PASTE(__COUNTER__, \
192 __PASTE(_, \
193 __PASTE(__LINE__, \
194 __PASTE(_, fn))))))
195
196 /* Format: __<prefix>__<iid><id> */
197 #define __initcall_name(prefix, __iid, id) \
198 __PASTE(__, \
199 __PASTE(prefix, \
> 200 __PASTE(__, \
201 __PASTE(__iid, id))))
202
203 #ifdef CONFIG_LTO_CLANG
204 /*
205 * With LTO, the compiler doesn't necessarily obey link order for
206 * initcalls. In order to preserve the correct order, we add each
207 * variable into its own section and generate a linker script (in
208 * scripts/link-vmlinux.sh) to specify the order of the sections.
209 */
210 #define __initcall_section(__sec, __iid) \
211 #__sec ".init.." #__iid
212 #else
213 #define __initcall_section(__sec, __iid) \
214 #__sec ".init"
215 #endif
216
217 #ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS
218 #define ____define_initcall(fn, __name, __sec) \
219 __ADDRESSABLE(fn) \
220 asm(".section \"" __sec "\", \"a\" \n" \
221 __stringify(__name) ": \n" \
222 ".long " #fn " - . \n" \
223 ".previous \n");
224 #else
225 #define ____define_initcall(fn, __name, __sec) \
226 static initcall_t __name __used \
227 __attribute__((__section__(__sec))) = fn;
228 #endif
229
230 #define __unique_initcall(fn, id, __sec, __iid) \
231 ____define_initcall(fn, \
> 232 __initcall_name(initcall, __iid, id), \
233 __initcall_section(__sec, __iid))
234
235 #define ___define_initcall(fn, id, __sec) \
> 236 __unique_initcall(fn, id, __sec, __initcall_id(fn))
237
238 #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
239
240 /*
241 * Early initcalls run before initializing SMP.
242 *
243 * Only for built-in code, not modules.
244 */
245 #define early_initcall(fn) __define_initcall(fn, early)
246
247 /*
248 * A "pure" initcall has no dependencies on anything else, and purely
249 * initializes variables that couldn't be statically initialized.
250 *
251 * This only exists for built-in code, not for modules.
252 * Keep main.c:initcall_level_names[] in sync.
253 */
254 #define pure_initcall(fn) __define_initcall(fn, 0)
255
256 #define core_initcall(fn) __define_initcall(fn, 1)
257 #define core_initcall_sync(fn) __define_initcall(fn, 1s)
258 #define postcore_initcall(fn) __define_initcall(fn, 2)
259 #define postcore_initcall_sync(fn) __define_initcall(fn, 2s)
260 #define arch_initcall(fn) __define_initcall(fn, 3)
261 #define arch_initcall_sync(fn) __define_initcall(fn, 3s)
262 #define subsys_initcall(fn) __define_initcall(fn, 4)
263 #define subsys_initcall_sync(fn) __define_initcall(fn, 4s)
264 #define fs_initcall(fn) __define_initcall(fn, 5)
265 #define fs_initcall_sync(fn) __define_initcall(fn, 5s)
266 #define rootfs_initcall(fn) __define_initcall(fn, rootfs)
267 #define device_initcall(fn) __define_initcall(fn, 6)
268 #define device_initcall_sync(fn) __define_initcall(fn, 6s)
269 #define late_initcall(fn) __define_initcall(fn, 7)
270 #define late_initcall_sync(fn) __define_initcall(fn, 7s)
271
> 272 #define __initcall(fn) device_initcall(fn)273
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
kernel test robot
build botRe: [PATCH 09/22] init: lto: ensure initcall ordering
In reply to Sami TolvanenThank you for the patch! Yet something to improve:
Hi Sami,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on 26e122e97a3d0390ebec389347f64f3730fdf48f]
url: https://github.com/0day-ci/linux/commits/Sami-Tolvanen/add-support-for-Clang-LTO/20200625-043816 base: 26e122e97a3d0390ebec389347f64f3730fdf48f config: m68k-allyesconfig (attached as .config) compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
All errors (new ones prefixed by >>):
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:13,
from ./arch/m68k/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:10,
from include/linux/interrupt.h:11,
from drivers/ide/gayle.c:13:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
In file included from include/asm-generic/bug.h:5,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from drivers/ide/gayle.c:12:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from drivers/ide/gayle.c:12:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
144 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
In file included from <command-line>:
drivers/ide/gayle.c: At top level:
>> arch/m68k/include/asm/amigayle.h:57:66: error: pasting ")" and "__282_185_amiga_gayle_ide_driver_init" does not give a valid preprocessing token
57 | #define gayle (*(volatile struct GAYLE *)(zTwoBase+GAYLE_ADDRESS))
| ^
include/linux/compiler_types.h:53:23: note: in definition of macro '___PASTE'
53 | #define ___PASTE(a,b) a##b
| ^
include/linux/init.h:189:2: note: in expansion of macro '__PASTE'
189 | __PASTE(__KBUILD_MODNAME, \
| ^~~~~~~
<command-line>: note: in expansion of macro 'gayle'
include/linux/init.h:189:10: note: in expansion of macro '__KBUILD_MODNAME'
189 | __PASTE(__KBUILD_MODNAME, \
| ^~~~~~~~~~~~~~~~
include/linux/init.h:236:35: note: in expansion of macro '__initcall_id'
236 | __unique_initcall(fn, id, __sec, __initcall_id(fn))
| ^~~~~~~~~~~~~
include/linux/init.h:238:35: note: in expansion of macro '___define_initcall'
238 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:267:30: note: in expansion of macro '__define_initcall'
267 | #define device_initcall(fn) __define_initcall(fn, 6)
| ^~~~~~~~~~~~~~~~~
include/linux/init.h:272:24: note: in expansion of macro 'device_initcall'
272 | #define __initcall(fn) device_initcall(fn)
| ^~~~~~~~~~~~~~~
include/linux/module.h:88:24: note: in expansion of macro '__initcall'
88 | #define module_init(x) __initcall(x);
| ^~~~~~~~~~
include/linux/platform_device.h:271:1: note: in expansion of macro 'module_init'
271 | module_init(__platform_driver##_init); \
| ^~~~~~~~~~~
drivers/ide/gayle.c:185:1: note: in expansion of macro 'module_platform_driver_probe'
185 | module_platform_driver_probe(amiga_gayle_ide_driver, amiga_gayle_ide_probe);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/init.h:200:10: error: pasting "__" and "(" does not give a valid preprocessing token
200 | __PASTE(__, \
| ^~
include/linux/compiler_types.h:53:23: note: in definition of macro '___PASTE'
53 | #define ___PASTE(a,b) a##b
| ^
include/linux/init.h:200:2: note: in expansion of macro '__PASTE'
200 | __PASTE(__, \
| ^~~~~~~
include/linux/init.h:232:3: note: in expansion of macro '__initcall_name'
232 | __initcall_name(initcall, __iid, id), \
| ^~~~~~~~~~~~~~~
include/linux/init.h:236:2: note: in expansion of macro '__unique_initcall'
236 | __unique_initcall(fn, id, __sec, __initcall_id(fn))
| ^~~~~~~~~~~~~~~~~
include/linux/init.h:238:35: note: in expansion of macro '___define_initcall'
238 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:267:30: note: in expansion of macro '__define_initcall'
267 | #define device_initcall(fn) __define_initcall(fn, 6)
| ^~~~~~~~~~~~~~~~~
include/linux/init.h:272:24: note: in expansion of macro 'device_initcall'
272 | #define __initcall(fn) device_initcall(fn)
| ^~~~~~~~~~~~~~~
include/linux/module.h:88:24: note: in expansion of macro '__initcall'
88 | #define module_init(x) __initcall(x);
| ^~~~~~~~~~
include/linux/platform_device.h:271:1: note: in expansion of macro 'module_init'
271 | module_init(__platform_driver##_init); \
| ^~~~~~~~~~~
drivers/ide/gayle.c:185:1: note: in expansion of macro 'module_platform_driver_probe'
185 | module_platform_driver_probe(amiga_gayle_ide_driver, amiga_gayle_ide_probe);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:6,
from include/linux/kernel.h:15,
from include/asm-generic/bug.h:19,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from drivers/ide/gayle.c:12:
arch/m68k/include/asm/amigayle.h:57:16: error: expected declaration specifiers or '...' before '*' token
57 | #define gayle (*(volatile struct GAYLE *)(zTwoBase+GAYLE_ADDRESS))
| ^
include/linux/init.h:226:20: note: in definition of macro '____define_initcall'
226 | static initcall_t __name __used \
| ^~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/init.h:198:2: note: in expansion of macro '__PASTE'
198 | __PASTE(__, \
| ^~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/init.h:199:2: note: in expansion of macro '__PASTE'
199 | __PASTE(prefix, \
| ^~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/init.h:200:2: note: in expansion of macro '__PASTE'
200 | __PASTE(__, \
| ^~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)vim +57 arch/m68k/include/asm/amigayle.h
^1da177e4c3f41 include/asm-m68k/amigayle.h Linus Torvalds 2005-04-16 53 ^1da177e4c3f41 include/asm-m68k/amigayle.h Linus Torvalds 2005-04-16 54 #define GAYLE_RESET (0xa40000) /* write 0x00 to start reset, ^1da177e4c3f41 include/asm-m68k/amigayle.h Linus Torvalds 2005-04-16 55 read 1 byte to stop reset */ ^1da177e4c3f41 include/asm-m68k/amigayle.h Linus Torvalds 2005-04-16 56
^1da177e4c3f41 include/asm-m68k/amigayle.h Linus Torvalds 2005-04-16 @57 #define gayle (*(volatile struct GAYLE *)(zTwoBase+GAYLE_ADDRESS)) ^1da177e4c3f41 include/asm-m68k/amigayle.h Linus Torvalds 2005-04-16 58 #define gayle_reset (*(volatile u_char *)(zTwoBase+GAYLE_RESET)) ^1da177e4c3f41 include/asm-m68k/amigayle.h Linus Torvalds 2005-04-16 59
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
Sami Tolvanen
maintainerPATCH 10/22 init: lto: fix PREL32 relocations
In reply to Sami TolvanenWith LTO, the compiler can rename static functions to avoid global naming collisions. As initcall functions are typically static, renaming can break references to them in inline assembly. This change adds a global stub with a stable name for each initcall to fix the issue when PREL32 relocations are used.
--- include/linux/init.h | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-)
include/linux/init.h +26 -4
@@ -209,26 +209,48 @@ extern bool initcall_debug;*/ #define __initcall_section (__sec, __iid) \ #__sec ".init.." #__iid + +/* +* With LTO, the compiler can rename static functions to avoid +* global naming collisions. We use a global stub function for +* initcalls to create a stable symbol name whose address can be +* taken in inline assembly when PREL32 relocations are used. +*/ +#define __initcall_stub (fn, __iid, id) \ + __initcall_name(initstub, __iid, id) + +#define __define_initcall_stub (__stub, fn) \ + int __init __stub(void) \ + { \ + return fn(); \ + } \ + __ADDRESSABLE(__stub)#else #define __initcall_section (__sec, __iid) \ #__sec ".init" + +#define __initcall_stub (fn, __iid, id) fn + +#define __define_initcall_stub (__stub, fn) \ + __ADDRESSABLE(fn)#endif #ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS -#define ____define_initcall (fn, __name, __sec) \ - __ADDRESSABLE(fn) \ +#define ____define_initcall (fn, __stub, __name, __sec) \ + __define_initcall_stub(__stub, fn) \ asm(".section \"" __sec "\", \"a\" \n" \ __stringify(__name) ": \n" \ - ".long " #fn " - . \n" \ + ".long " __stringify(__stub) " - . \n" \ ".previous \n");#else -#define ____define_initcall (fn, __name, __sec) \ +#define ____define_initcall (fn, __unused, __name, __sec) \ static initcall_t __name __used \ __attribute__((__section__(__sec))) = fn;#endif #define __unique_initcall (fn, id, __sec, __iid) \ ____define_initcall(fn, \ + __initcall_stub(fn, __iid, id), \ __initcall_name(initcall, __iid, id), \ __initcall_section(__sec, __iid))
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Sami Tolvanen
maintainerPATCH 11/22 pci: lto: fix PREL32 relocations
In reply to Sami TolvanenWith LTO, the compiler can rename static functions to avoid global naming collisions. As PCI fixup functions are typically static, renaming can break references to them in inline assembly. This change adds a global stub to DECLARE_PCI_FIXUP_SECTION to fix the issue when PREL32 relocations are used.
--- include/linux/pci.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
include/linux/pci.h +10 -5
@@ -1909,19 +1909,24 @@ enum pci_fixup_pass { };#ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS -#define __DECLARE_PCI_FIXUP_SECTION (sec, name, vendor, device, class, \ - class_shift, hook) \ - __ADDRESSABLE(hook) \ +#define ___DECLARE_PCI_FIXUP_SECTION (sec, name, vendor, device, class, \ + class_shift, hook, stub) \ + void stub(struct pci_dev *dev) { hook(dev); } \ asm(".section " #sec ", \"a\" \n" \ ".balign 16 \n" \ ".short " #vendor ", " #device " \n" \ ".long " #class ", " #class_shift " \n" \ - ".long " #hook " - . \n" \ + ".long " #stub " - . \n" \ ".previous \n"); + +#define __DECLARE_PCI_FIXUP_SECTION (sec, name, vendor, device, class, \ + class_shift, hook, stub) \ + ___DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ + class_shift, hook, stub)#define DECLARE_PCI_FIXUP_SECTION (sec, name, vendor, device, class, \ class_shift, hook) \ __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ - class_shift, hook) + class_shift, hook, __UNIQUE_ID(hook))#else /* Anonymous variables would be nice... */ #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class, \
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
kernel test robot
build botRe: [PATCH 11/22] pci: lto: fix PREL32 relocations
Thank you for the patch! Perhaps something to improve:
Hi Sami,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on 26e122e97a3d0390ebec389347f64f3730fdf48f]
url: https://github.com/0day-ci/linux/commits/Sami-Tolvanen/add-support-for-Clang-LTO/20200625-043816 base: 26e122e97a3d0390ebec389347f64f3730fdf48f config: i386-alldefconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
All warnings (new ones prefixed by >>):
In file included from arch/x86/kernel/pci-dma.c:9:
>> include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_via_no_dac190' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
>> include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
>> include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'
1929 | class_shift, hook, __UNIQUE_ID(hook))
| ^~~~~~~~~~~
>> include/linux/pci.h:1949:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'
1949 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/pci-dma.c:154:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_CLASS_FINAL' 154 | DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/kernel/quirks.c:6:
>> include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet180' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
>> include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
>> include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'
1929 | class_shift, hook, __UNIQUE_ID(hook))
| ^~~~~~~~~~~
include/linux/pci.h:1976:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'
1976 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kernel/quirks.c:156:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_HEADER'
156 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0,
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet181' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
>> include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
>> include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'
1929 | class_shift, hook, __UNIQUE_ID(hook))
| ^~~~~~~~~~~
include/linux/pci.h:1976:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'
1976 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/quirks.c:158:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_HEADER'
158 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0,
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet182' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
>> include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
>> include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'
1929 | class_shift, hook, __UNIQUE_ID(hook))
| ^~~~~~~~~~~
include/linux/pci.h:1976:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'
1976 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/quirks.c:160:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_HEADER'
160 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1,
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet183' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'
1929 | class_shift, hook, __UNIQUE_ID(hook))
| ^~~~~~~~~~~
include/linux/pci.h:1976:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'
1976 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/quirks.c:162:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_HEADER'
162 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0,
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet184' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'
1929 | class_shift, hook, __UNIQUE_ID(hook))
| ^~~~~~~~~~~
include/linux/pci.h:1976:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'
1976 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/quirks.c:164:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_HEADER'
164 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1,
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet185' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'
1929 | class_shift, hook, __UNIQUE_ID(hook))
| ^~~~~~~~~~~
include/linux/pci.h:1976:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'
1976 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/quirks.c:166:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_HEADER'
166 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_31,
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet186' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
--
In file included from drivers/pci/vpd.c:8:
>> include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_f0_vpd_link180' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
>> include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
>> include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'
1929 | class_shift, hook, __UNIQUE_ID(hook))
| ^~~~~~~~~~~
include/linux/pci.h:1941:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'
1941 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pci/vpd.c:543:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_CLASS_EARLY'
543 | DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_blacklist_vpd181' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
>> include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
>> include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'
1929 | class_shift, hook, __UNIQUE_ID(hook))
| ^~~~~~~~~~~
include/linux/pci.h:1979:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'
1979 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/pci/vpd.c:560:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_FINAL'
560 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x0060, quirk_blacklist_vpd);
| ^~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_blacklist_vpd182' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
>> include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
>> include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
>> include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'
1929 | class_shift, hook, __UNIQUE_ID(hook))
| ^~~~~~~~~~~
include/linux/pci.h:1979:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'
1979 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pci/vpd.c:561:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_FINAL'
561 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x007c, quirk_blacklist_vpd);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_blacklist_vpd183' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'
1929 | class_shift, hook, __UNIQUE_ID(hook))
| ^~~~~~~~~~~
include/linux/pci.h:1979:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'
1979 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pci/vpd.c:562:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_FINAL'
562 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x0413, quirk_blacklist_vpd);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_blacklist_vpd184' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'
1929 | class_shift, hook, __UNIQUE_ID(hook))
| ^~~~~~~~~~~
include/linux/pci.h:1979:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'
1979 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pci/vpd.c:563:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_FINAL'
563 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x0078, quirk_blacklist_vpd);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_blacklist_vpd185' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION'
1914 | void stub(struct pci_dev *dev) { hook(dev); } \
| ^~~~
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'
1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'
54 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE'
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'
1929 | class_shift, hook, __UNIQUE_ID(hook))
| ^~~~~~~~~~~
include/linux/pci.h:1979:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'
1979 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pci/vpd.c:564:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_FINAL'
564 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x0079, quirk_blacklist_vpd);
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_blacklist_vpd186' [-Wmissing-prototypes]
72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)..
vim +/__DECLARE_PCI_FIXUP_SECTION +1928 include/linux/pci.h
^1da177e4c3f415 Linus Torvalds 2005-04-16 1910
c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1911 #ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS
b1b820bb0420d08 Sami Tolvanen 2020-06-24 1912 #define ___DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
b1b820bb0420d08 Sami Tolvanen 2020-06-24 1913 class_shift, hook, stub) \
b1b820bb0420d08 Sami Tolvanen 2020-06-24 @1914 void stub(struct pci_dev *dev) { hook(dev); } \
c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1915 asm(".section " #sec ", \"a\" \n" \
c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1916 ".balign 16 \n" \
c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1917 ".short " #vendor ", " #device " \n" \
c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1918 ".long " #class ", " #class_shift " \n" \
b1b820bb0420d08 Sami Tolvanen 2020-06-24 1919 ".long " #stub " - . \n" \
c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1920 ".previous \n");
b1b820bb0420d08 Sami Tolvanen 2020-06-24 1921
b1b820bb0420d08 Sami Tolvanen 2020-06-24 1922 #define __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
b1b820bb0420d08 Sami Tolvanen 2020-06-24 1923 class_shift, hook, stub) \
b1b820bb0420d08 Sami Tolvanen 2020-06-24 1924 ___DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
b1b820bb0420d08 Sami Tolvanen 2020-06-24 1925 class_shift, hook, stub)
c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1926 #define DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1927 class_shift, hook) \
c9d8b55fa019162 Ard Biesheuvel 2018-08-21 @1928 __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \
b1b820bb0420d08 Sami Tolvanen 2020-06-24 @1929 class_shift, hook, __UNIQUE_ID(hook))
c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1930 #else
^1da177e4c3f415 Linus Torvalds 2005-04-16 1931 /* Anonymous variables would be nice... */
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1932 #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class, \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1933 class_shift, hook) \
ecf61c78bd787b9 Michal Marek 2013-11-11 1934 static const struct pci_fixup __PASTE(__pci_fixup_##name,__LINE__) __used \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1935 __attribute__((__section__(#section), aligned((sizeof(void *))))) \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1936 = { vendor, device, class, class_shift, hook };
c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1937 #endif
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1938
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1939 #define DECLARE_PCI_FIXUP_CLASS_EARLY(vendor, device, class, \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1940 class_shift, hook) \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1941 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \
ecf61c78bd787b9 Michal Marek 2013-11-11 1942 hook, vendor, device, class, class_shift, hook)
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1943 #define DECLARE_PCI_FIXUP_CLASS_HEADER(vendor, device, class, \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1944 class_shift, hook) \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1945 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \
ecf61c78bd787b9 Michal Marek 2013-11-11 1946 hook, vendor, device, class, class_shift, hook)
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1947 #define DECLARE_PCI_FIXUP_CLASS_FINAL(vendor, device, class, \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1948 class_shift, hook) \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 @1949 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \
ecf61c78bd787b9 Michal Marek 2013-11-11 1950 hook, vendor, device, class, class_shift, hook)
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1951 #define DECLARE_PCI_FIXUP_CLASS_ENABLE(vendor, device, class, \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1952 class_shift, hook) \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1953 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \
ecf61c78bd787b9 Michal Marek 2013-11-11 1954 hook, vendor, device, class, class_shift, hook)
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1955 #define DECLARE_PCI_FIXUP_CLASS_RESUME(vendor, device, class, \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1956 class_shift, hook) \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1957 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \
0aa0f5d1084ca1c Bjorn Helgaas 2017-12-02 1958 resume##hook, vendor, device, class, class_shift, hook)
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1959 #define DECLARE_PCI_FIXUP_CLASS_RESUME_EARLY(vendor, device, class, \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1960 class_shift, hook) \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1961 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume_early, \
0aa0f5d1084ca1c Bjorn Helgaas 2017-12-02 1962 resume_early##hook, vendor, device, class, class_shift, hook)
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1963 #define DECLARE_PCI_FIXUP_CLASS_SUSPEND(vendor, device, class, \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1964 class_shift, hook) \
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1965 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \
0aa0f5d1084ca1c Bjorn Helgaas 2017-12-02 1966 suspend##hook, vendor, device, class, class_shift, hook)
7d2a01b87f1682f Andreas Noever 2014-06-03 1967 #define DECLARE_PCI_FIXUP_CLASS_SUSPEND_LATE(vendor, device, class, \
7d2a01b87f1682f Andreas Noever 2014-06-03 1968 class_shift, hook) \
7d2a01b87f1682f Andreas Noever 2014-06-03 1969 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend_late, \
0aa0f5d1084ca1c Bjorn Helgaas 2017-12-02 1970 suspend_late##hook, vendor, device, class, class_shift, hook)
f4ca5c6a56278ca Yinghai Lu 2012-02-23 1971 ---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
Nick Desaulniers
reviewerRe: [PATCH 11/22] pci: lto: fix PREL32 relocations
Quoted 7 lines · kernel test robot
Hi Sami,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on
26e122e97a3d0390ebec389347f64f3730fdf48f]
Quoted 7 lines
url: https://github.com/0day-ci/linux/commits/Sami-Tolvanen/add-support-for-Clang-LTO/20200625-043816 base: 26e122e97a3d0390ebec389347f64f3730fdf48f config: i386-alldefconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=i386
Note: W=1 ^
Quoted 6 lines
If you fix the issue, kindly add following tag as appropriate
Reported-by kernel test robot <[email protected]>All warnings (new ones prefixed by >>):
Quoted 7 lines
In file included from
arch/x86/kernel/pci-dma.c:9:Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_via_no_dac190' [-Wmissing-prototypes]72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~
Should stub be qualified as static inline? https://godbolt.org/z/cPBXxW
Or should stub be declared in this header, but implemented in a .c file? (I'm guessing the former, since the hook callback comes from the macro).
Quoted 471 lines
Quoted 1 line
Quoted 1 line
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'1929 | class_shift, hook, __UNIQUE_ID(hook)) | ^~~~~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1949:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION'1949 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
arch/x86/kernel/pci-dma.c:154:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_CLASS_FINAL'154 | DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_VIA,
PCI_ANY_ID,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included fromarch/x86/kernel/quirks.c:6:Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet180' [-Wmissing-prototypes]72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'1929 | class_shift, hook, __UNIQUE_ID(hook)) | ^~~~~~~~~~~ include/linux/pci.h:1976:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION' 1976 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
arch/x86/kernel/quirks.c:156:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_HEADER'156 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0, | ^~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet181' [-Wmissing-prototypes]72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'1929 | class_shift, hook, __UNIQUE_ID(hook)) | ^~~~~~~~~~~ include/linux/pci.h:1976:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION' 1976 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/kernel/quirks.c:158:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_HEADER' 158 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0, | ^~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet182' [-Wmissing-prototypes]72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'1929 | class_shift, hook, __UNIQUE_ID(hook)) | ^~~~~~~~~~~ include/linux/pci.h:1976:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION' 1976 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/kernel/quirks.c:160:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_HEADER' 160 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, | ^~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet183' [-Wmissing-prototypes]72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~ include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION' 1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE' 54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~ include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE' 54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~ include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID' 1929 | class_shift, hook, __UNIQUE_ID(hook)) | ^~~~~~~~~~~ include/linux/pci.h:1976:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION' 1976 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/kernel/quirks.c:162:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_HEADER' 162 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0, | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet184' [-Wmissing-prototypes] 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~ include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION' 1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE' 54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~ include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE' 54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~ include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID' 1929 | class_shift, hook, __UNIQUE_ID(hook)) | ^~~~~~~~~~~ include/linux/pci.h:1976:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION' 1976 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/kernel/quirks.c:164:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_HEADER' 164 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1, | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet185' [-Wmissing-prototypes] 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~ include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION' 1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE' 54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~ include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE' 54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~ include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID' 1929 | class_shift, hook, __UNIQUE_ID(hook)) | ^~~~~~~~~~~ include/linux/pci.h:1976:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION' 1976 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/kernel/quirks.c:166:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_HEADER' 166 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_31, | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_ich_force_enable_hpet186' [-Wmissing-prototypes] 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~ include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION' 1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE' 54 | #define __PASTE(a,b) ___PASTE(a,b)--
In file included fromdrivers/pci/vpd.c:8:Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_f0_vpd_link180' [-Wmissing-prototypes]72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'1929 | class_shift, hook, __UNIQUE_ID(hook)) | ^~~~~~~~~~~ include/linux/pci.h:1941:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION' 1941 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
drivers/pci/vpd.c:543:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_CLASS_EARLY'543 | DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL,
PCI_ANY_ID,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_blacklist_vpd181' [-Wmissing-prototypes]72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'1929 | class_shift, hook, __UNIQUE_ID(hook)) | ^~~~~~~~~~~ include/linux/pci.h:1979:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION' 1979 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
drivers/pci/vpd.c:560:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_FINAL'560 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x0060, quirk_blacklist_vpd); | ^~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_blacklist_vpd182' [-Wmissing-prototypes]72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION'1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE'72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE'54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~Quoted 1 line
Quoted 1 line
include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID'1929 | class_shift, hook, __UNIQUE_ID(hook)) | ^~~~~~~~~~~ include/linux/pci.h:1979:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION' 1979 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pci/vpd.c:561:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_FINAL' 561 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x007c, quirk_blacklist_vpd); | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_blacklist_vpd183' [-Wmissing-prototypes] 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~ include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION' 1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE' 54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~ include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE' 54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~ include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID' 1929 | class_shift, hook, __UNIQUE_ID(hook)) | ^~~~~~~~~~~ include/linux/pci.h:1979:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION' 1979 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pci/vpd.c:562:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_FINAL' 562 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x0413, quirk_blacklist_vpd); | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_blacklist_vpd184' [-Wmissing-prototypes] 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~ include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION' 1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE' 54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~ include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE' 54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~ include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID' 1929 | class_shift, hook, __UNIQUE_ID(hook)) | ^~~~~~~~~~~ include/linux/pci.h:1979:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION' 1979 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pci/vpd.c:563:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_FINAL' 563 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x0078, quirk_blacklist_vpd); | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_blacklist_vpd185' [-Wmissing-prototypes] 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~ include/linux/pci.h:1928:2: note: in expansion of macro '__DECLARE_PCI_FIXUP_SECTION' 1928 | __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE' 54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:29: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~ include/linux/compiler_types.h:54:22: note: in expansion of macro '___PASTE' 54 | #define __PASTE(a,b) ___PASTE(a,b) | ^~~~~~~~ include/linux/compiler-gcc.h:72:37: note: in expansion of macro '__PASTE' 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~ include/linux/pci.h:1929:26: note: in expansion of macro '__UNIQUE_ID' 1929 | class_shift, hook, __UNIQUE_ID(hook)) | ^~~~~~~~~~~ include/linux/pci.h:1979:2: note: in expansion of macro 'DECLARE_PCI_FIXUP_SECTION' 1979 | DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pci/vpd.c:564:1: note: in expansion of macro 'DECLARE_PCI_FIXUP_FINAL' 564 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LSI_LOGIC, 0x0079, quirk_blacklist_vpd); | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_quirk_blacklist_vpd186' [-Wmissing-prototypes] 72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)..
vim +/__DECLARE_PCI_FIXUP_SECTION +1928
include/linux/pci.h^1da177e4c3f415 Linus Torvalds 2005-04-16 1910 c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1911 #ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS b1b820bb0420d08 Sami Tolvanen 2020-06-24 1912 #define ___DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ b1b820bb0420d08 Sami Tolvanen 2020-06-24 1913 class_shift, hook, stub) \ b1b820bb0420d08 Sami Tolvanen 2020-06-24 @1914 void stub(struct pci_dev *dev) { hook(dev); } \ c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1915 asm(".section " #sec ", \"a\" \n" \ c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1916 ".balign 16 \n" \ c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1917 ".short " #vendor ", " #device " \n" \ c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1918 ".long " #class ", " #class_shift " \n" \ b1b820bb0420d08 Sami Tolvanen 2020-06-24 1919 ".long " #stub " - . \n" \ c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1920 ".previous \n"); b1b820bb0420d08 Sami Tolvanen 2020-06-24 1921 b1b820bb0420d08 Sami Tolvanen 2020-06-24 1922 #define __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ b1b820bb0420d08 Sami Tolvanen 2020-06-24 1923 class_shift, hook, stub) \ b1b820bb0420d08 Sami Tolvanen 2020-06-24 1924 ___DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ b1b820bb0420d08 Sami Tolvanen 2020-06-24 1925 class_shift, hook, stub) c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1926 #define DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1927 class_shift, hook) \ c9d8b55fa019162 Ard Biesheuvel 2018-08-21 @1928 __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ b1b820bb0420d08 Sami Tolvanen 2020-06-24 @1929 class_shift, hook, __UNIQUE_ID(hook)) c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1930 #else ^1da177e4c3f415 Linus Torvalds 2005-04-16 1931 /* Anonymous variables would be nice... */ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1932 #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class, \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1933 class_shift, hook) \ ecf61c78bd787b9 Michal Marek 2013-11-11 1934 static const struct pci_fixup __PASTE(__pci_fixup_##name,__LINE__) __used \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1935 __attribute__((__section__(#section), aligned((sizeof(void *))))) \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1936 = { vendor, device, class, class_shift, hook }; c9d8b55fa019162 Ard Biesheuvel 2018-08-21 1937 #endif f4ca5c6a56278ca Yinghai Lu 2012-02-23 1938 f4ca5c6a56278ca Yinghai Lu 2012-02-23 1939 #define DECLARE_PCI_FIXUP_CLASS_EARLY(vendor, device, class, \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1940 class_shift, hook) \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1941 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \ ecf61c78bd787b9 Michal Marek 2013-11-11 1942 hook, vendor, device, class, class_shift, hook) f4ca5c6a56278ca Yinghai Lu 2012-02-23 1943 #define DECLARE_PCI_FIXUP_CLASS_HEADER(vendor, device, class, \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1944 class_shift, hook) \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1945 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \ ecf61c78bd787b9 Michal Marek 2013-11-11 1946 hook, vendor, device, class, class_shift, hook) f4ca5c6a56278ca Yinghai Lu 2012-02-23 1947 #define DECLARE_PCI_FIXUP_CLASS_FINAL(vendor, device, class, \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1948 class_shift, hook) \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 @1949 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \ ecf61c78bd787b9 Michal Marek 2013-11-11 1950 hook, vendor, device, class, class_shift, hook) f4ca5c6a56278ca Yinghai Lu 2012-02-23 1951 #define DECLARE_PCI_FIXUP_CLASS_ENABLE(vendor, device, class, \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1952 class_shift, hook) \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1953 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ ecf61c78bd787b9 Michal Marek 2013-11-11 1954 hook, vendor, device, class, class_shift, hook) f4ca5c6a56278ca Yinghai Lu 2012-02-23 1955 #define DECLARE_PCI_FIXUP_CLASS_RESUME(vendor, device, class, \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1956 class_shift, hook) \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1957 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \ 0aa0f5d1084ca1c Bjorn Helgaas 2017-12-02 1958 resume##hook, vendor, device, class, class_shift, hook) f4ca5c6a56278ca Yinghai Lu 2012-02-23 1959 #define DECLARE_PCI_FIXUP_CLASS_RESUME_EARLY(vendor, device, class, \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1960 class_shift, hook) \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1961 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume_early, \ 0aa0f5d1084ca1c Bjorn Helgaas 2017-12-02 1962 resume_early##hook, vendor, device, class, class_shift, hook) f4ca5c6a56278ca Yinghai Lu 2012-02-23 1963 #define DECLARE_PCI_FIXUP_CLASS_SUSPEND(vendor, device, class, \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1964 class_shift, hook) \ f4ca5c6a56278ca Yinghai Lu 2012-02-23 1965 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ 0aa0f5d1084ca1c Bjorn Helgaas 2017-12-02 1966 suspend##hook, vendor, device, class, class_shift, hook) 7d2a01b87f1682f Andreas Noever 2014-06-03 1967 #define DECLARE_PCI_FIXUP_CLASS_SUSPEND_LATE(vendor, device, class, \ 7d2a01b87f1682f Andreas Noever 2014-06-03 1968 class_shift, hook) \ 7d2a01b87f1682f Andreas Noever 2014-06-03 1969 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend_late, \ 0aa0f5d1084ca1c Bjorn Helgaas 2017-12-02 1970 suspend_late##hook, vendor, device, class, class_shift, hook) f4ca5c6a56278ca Yinghai Lu 2012-02-23 1971---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Signature · 2 lines
Thanks, ~Nick Desaulniers
Sami Tolvanen
maintainerRe: [PATCH 11/22] pci: lto: fix PREL32 relocations
Quoted 32 lines · Nick Desaulniers
Quoted 7 lines · kernel test robot
Hi Sami,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on
26e122e97a3d0390ebec389347f64f3730fdf48f]Quoted 7 lines
url: https://github.com/0day-ci/linux/commits/Sami-Tolvanen/add-support-for-Clang-LTO/20200625-043816 base: 26e122e97a3d0390ebec389347f64f3730fdf48f config: i386-alldefconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=i386Note: W=1 ^
Quoted 6 lines
If you fix the issue, kindly add following tag as appropriate
Reported-by kernel test robot <[email protected]>All warnings (new ones prefixed by >>):
Quoted 7 lines
In file included from
arch/x86/kernel/pci-dma.c:9:Quoted 1 line
Quoted 1 line
include/linux/compiler-gcc.h:72:45: warning: no previous prototype for '__UNIQUE_ID_via_no_dac190' [-Wmissing-prototypes]72 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ^~~~~~~~~~~~ include/linux/pci.h:1914:7: note: in definition of macro '___DECLARE_PCI_FIXUP_SECTION' 1914 | void stub(struct pci_dev *dev) { hook(dev); } \ | ^~~~
Quoted 4 lines
Should
stubbe qualified asstatic inline? https://godbolt.org/z/cPBXxW
Or should stub be declared in this header, but implemented in a .c file? (I'm guessing the former, since thehookcallback comes from the macro).
Does static inline guarantee that the compiler won't rename the symbol? The purpose of this change is to have a stable symbol name, which we can safely use in inline assembly.
Sami
Re: [PATCH 11/22] pci: lto: fix PREL32 relocations
In reply to Sami TolvanenOK by me, but please update the subject to match convention:
PCI: Fix PREL32 relocations for LTO
and include a hint in the commit log about what LTO is. At least expand the initialism once. Googling for "LTO" isn't very useful.
With Clang's Link Time Optimization (LTO), the compiler ... ?
Quoted 7 lines · Sami Tolvanen
With LTO, the compiler can rename static functions to avoid global naming collisions. As PCI fixup functions are typically static, renaming can break references to them in inline assembly. This change adds a global stub to
DECLARE_PCI_FIXUP_SECTIONto fix the issue when PREL32 relocations are used.Signed-off-by Sami Tolvanen <[email protected]>
Quoted 41 lines
--- include/linux/pci.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)include/linux/pci.h +10
-5@@ -1909,19 +1909,24 @@ enum pci_fixup_pass { };#ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS -#define __DECLARE_PCI_FIXUP_SECTION (sec, name, vendor, device, class, \ - class_shift, hook) \ - __ADDRESSABLE(hook) \ +#define ___DECLARE_PCI_FIXUP_SECTION (sec, name, vendor, device, class, \ + class_shift, hook, stub) \ + void stub(struct pci_dev *dev) { hook(dev); } \ asm(".section " #sec ", \"a\" \n" \ ".balign 16 \n" \ ".short " #vendor ", " #device " \n" \ ".long " #class ", " #class_shift " \n" \ - ".long " #hook " - . \n" \ + ".long " #stub " - . \n" \ ".previous \n"); + +#define __DECLARE_PCI_FIXUP_SECTION (sec, name, vendor, device, class, \ + class_shift, hook, stub) \ + ___DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ + class_shift, hook, stub)#define DECLARE_PCI_FIXUP_SECTION (sec, name, vendor, device, class, \ class_shift, hook) \ __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ - class_shift, hook) + class_shift, hook, __UNIQUE_ID(hook))#else /* Anonymous variables would be nice... */ #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class, \Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Sami Tolvanen
maintainerRe: [PATCH 11/22] pci: lto: fix PREL32 relocations
Hi Bjorn,
Quoted 9 lines · Bjorn Helgaas
OK by me, but please update the subject to match convention:
PCI: Fix PREL32 relocations for LTO
and include a hint in the commit log about what LTO is. At least expand the initialism once. Googling for "LTO" isn't very useful.
With Clang's Link Time Optimization (LTO), the compiler ... ?
Sure, I'll change this in the next version. Thanks for taking a look!
Sami
Sami Tolvanen
maintainerPATCH 12/22 modpost: lto: strip .lto from module names
In reply to Sami TolvanenWith LTO, everything is compiled into LLVM bitcode, so we have to link each module into native code before modpost. Kbuild uses the .lto.o suffix for these files, which also ends up in module information. This change strips the unnecessary .lto suffix from the module name.
--- scripts/mod/modpost.c | 16 +++++++--------- scripts/mod/modpost.h | 9 +++++++++ scripts/mod/sumversion.c | 6 +++++- 3 files changed, 21 insertions(+), 10 deletions(-)
scripts/mod/modpost.c +7 -9
@@ -17,7 +17,6 @@#include <ctype.h> #include <string.h> #include <limits.h> -#include <stdbool.h> #include <errno.h> #include "modpost.h" #include "../../include/linux/license.h"
@@ -80,14 +79,6 @@ modpost_log(enum loglevel loglevel, const char *fmt, ...)exit (1 ); } -static inline bool strends (const char *str,const char *postfix) -{ -if (strlen (str) <strlen (postfix)) -return false; - -return strcmp (str +strlen (str) -strlen (postfix), postfix) ==0 ; -} -void *do_nofail (void *ptr,const char *expr) {if (!ptr)
@@ -1975,6 +1966,10 @@ static char *remove_dot(char *s)size_t m =strspn (s + n +1 ,"0123456789" );if (m && (s[n + m] =='.' || s[n + m] ==0 )) s[n] =0 ; + +/* strip trailing .lto */ +if (strends (s,".lto" )) + s[strlen (s) -4 ] ='\0' ; }return s; }
@@ -1998,6 +1993,9 @@ static void read_symbols(const char *modname)/* strip trailing .o */ tmp =NOFAIL (strdup (modname)); tmp[strlen (tmp) -2 ] ='\0' ; +/* strip trailing .lto */ +if (strends (tmp,".lto" )) + tmp[strlen (tmp) -4 ] ='\0' ; mod =new_module (tmp);free (tmp); }
scripts/mod/modpost.h +9 -0
@@ -2,6 +2,7 @@#include <stdio.h> #include <stdlib.h> #include <stdarg.h> +#include <stdbool.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h>
@@ -180,6 +181,14 @@ static inline unsigned int get_secindex(const struct elf_info *info,return info->symtab_shndx_start[sym - info->symtab_start]; } +static inline bool strends (const char *str,const char *postfix) +{ +if (strlen (str) <strlen (postfix)) +return false; + +return strcmp (str +strlen (str) -strlen (postfix), postfix) ==0 ; +} +/* file2alias.c */ extern unsigned int cross_build; void handle_moddevtable(struct module *mod, struct elf_info *info,
scripts/mod/sumversion.c +5 -1
@@ -391,10 +391,14 @@ void get_src_version(const char *modname, char sum[], unsigned sumlen)struct md4_ctx md;char *fname;char filelist[PATH_MAX +1 ]; +int postfix_len =1 ; + +if (strends (modname,".lto.o" )) + postfix_len =5 ;/* objects for a module are listed in the first line of *.mod file. */ snprintf (filelist,sizeof (filelist),"%.*smod" , - (int )strlen (modname) -1 , modname); + (int )strlen (modname) - postfix_len, modname); buf =read_text_file (filelist);
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Re: [PATCH 12/22] modpost: lto: strip .lto from module names
Quoted 19 lines · Sami Tolvanen
With LTO, everything is compiled into LLVM bitcode, so we have to link each module into native code before modpost.
Kbuilduses the .lto.o suffix for these files, which also ends up in module information. This change strips the unnecessary .lto suffix from the module name.Suggested-by Bill Wendling <[email protected]>Signed-off-by Sami Tolvanen <[email protected]>--- scripts/mod/modpost.c | 16 +++++++--------- scripts/mod/modpost.h | 9 +++++++++ scripts/mod/sumversion.c | 6 +++++- 3 files changed, 21 insertions(+), 10 deletions(-)scripts/mod/modpost.c +0
-0
scripts/mod/modpost.c line 20
Quoted 4 lines
scripts/mod/modpost.c +0
-1@@ -17,7 +17,6 @@#include <ctype.h> #include <string.h> #include <limits.h> -#include <stdbool.h>
It looks like bool is used in the function signatures of other functions in this TU, I'm not the biggest fan of hoisting the includes out of the .c source into the header (I'd keep it in both), but I don't feel strongly enough to NACK.
Quoted 89 lines
scripts/mod/modpost.c +7
-8#include <errno.h> #include "modpost.h" #include "../../include/linux/license.h" @@ -80,14 +79,6 @@ modpost_log(enum loglevel loglevel, const char *fmt, ...)exit (1 ); } -static inline bool strends (const char *str,const char *postfix) -{ -if (strlen (str) <strlen (postfix)) -return false; - -return strcmp (str +strlen (str) -strlen (postfix), postfix) ==0 ; -} -void *do_nofail (void *ptr,const char *expr) {if (!ptr)@@ -1975,6 +1966,10 @@ static char *remove_dot(char *s)size_t m =strspn (s + n +1 ,"0123456789" );if (m && (s[n + m] =='.' || s[n + m] ==0 )) s[n] =0 ; + +/* strip trailing .lto */ +if (strends (s,".lto" )) + s[strlen (s) -4 ] ='\0' ; }return s; }@@ -1998,6 +1993,9 @@ static void read_symbols(const char *modname)/* strip trailing .o */ tmp =NOFAIL (strdup (modname)); tmp[strlen (tmp) -2 ] ='\0' ; +/* strip trailing .lto */ +if (strends (tmp,".lto" )) + tmp[strlen (tmp) -4 ] ='\0' ; mod =new_module (tmp);free (tmp); }scripts/mod/modpost.h +9
-0@@ -2,6 +2,7 @@#include <stdio.h> #include <stdlib.h> #include <stdarg.h> +#include <stdbool.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> @@ -180,6 +181,14 @@ static inline unsigned int get_secindex(const struct elf_info *info,return info->symtab_shndx_start[sym - info->symtab_start]; } +static inline bool strends (const char *str,const char *postfix) +{ +if (strlen (str) <strlen (postfix)) +return false; + +return strcmp (str +strlen (str) -strlen (postfix), postfix) ==0 ; +} +/* file2alias.c */ extern unsigned int cross_build; void handle_moddevtable(struct module *mod, struct elf_info *info,scripts/mod/sumversion.c +5
-2@@ -391,10 +391,14 @@ void get_src_version(const char *modname, char sum[], unsigned sumlen)struct md4_ctx md;char *fname;char filelist[PATH_MAX +1 ]; +int postfix_len =1 ; + +if (strends (modname,".lto.o" )) + postfix_len =5 ;/* objects for a module are listed in the first line of *.mod file. */ snprintf (filelist,sizeof (filelist),"%.*smod" , - (int )strlen (modname) -1 , modname); + (int )strlen (modname) - postfix_len, modname); buf =read_text_file (filelist); --2.27.0.212.ge8ba1cc988-goog
Signature · 2 lines
Thanks, ~Nick Desaulniers
Sami Tolvanen
maintainerPATCH 13/22 scripts/mod: disable LTO for empty.c
In reply to Sami TolvanenWith CONFIG_LTO_CLANG, clang generates LLVM IR instead of ELF object files. As empty.o is used for probing target properties, disable LTO for it to produce an object file instead.
--- scripts/mod/Makefile | 1 + 1 file changed, 1 insertion(+)
scripts/mod/Makefile +1 -0
@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 OBJECT_FILES_NON_STANDARD := y +CFLAGS_REMOVE_empty.o += $(CC_FLAGS_LTO) hostprogs := modpost mk_elfconfig always-y := $(hostprogs) empty.o
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Re: [PATCH 13/22] scripts/mod: disable LTO for empty.c
Quoted 6 lines · Sami Tolvanen
With
CONFIG_LTO_CLANG, clang generates LLVM IR instead of ELF object files. As empty.o is used for probing target properties, disable LTO for it to produce an object file instead.Signed-off-by Sami Tolvanen <[email protected]>
Quoted 18 lines
--- scripts/mod/Makefile | 1 + 1 file changed, 1 insertion(+)scripts/mod/Makefile +1
-1@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 OBJECT_FILES_NON_STANDARD := y +CFLAGS_REMOVE_empty.o += $(CC_FLAGS_LTO) hostprogs := modpost mk_elfconfig always-y := $(hostprogs) empty.o --2.27.0.212.ge8ba1cc988-goog
Signature · 2 lines
Thanks, ~Nick Desaulniers
Sami Tolvanen
maintainerPATCH 14/22 efi/libstub: disable LTO
In reply to Sami TolvanenWith CONFIG_LTO_CLANG, we produce LLVM bitcode instead of ELF object files. Since LTO is not really needed here and the Makefile assumes we produce an object file, disable LTO for libstub.
--- drivers/firmware/efi/libstub/Makefile | 2 ++ 1 file changed, 2 insertions(+)
drivers/firmware/efi/libstub/Makefile +2 -0
@@ -35,6 +35,8 @@ KBUILD_CFLAGS := $(cflags-y) -Os -DDISABLE_BRANCH_PROFILING \ # remove SCS flags from all objects in this directory KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS)) +# disable LTO +KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS)) GCOV_PROFILE := n # Sanitizer runtimes are unavailable and cannot be linked here.
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Sami Tolvanen
maintainerPATCH 15/22 drivers/misc/lkdtm: disable LTO for rodata.o
In reply to Sami TolvanenDisable LTO for rodata.o to allow objcopy to be used to manipulate sections.
--- drivers/misc/lkdtm/Makefile | 1 + 1 file changed, 1 insertion(+)
drivers/misc/lkdtm/Makefile +1 -0
@@ -13,6 +13,7 @@ lkdtm-$(CONFIG_LKDTM) += cfi.o KASAN_SANITIZE_stackleak.o := n KCOV_INSTRUMENT_rodata.o := n +CFLAGS_REMOVE_rodata.o += $(CC_FLAGS_LTO) OBJCOPYFLAGS := OBJCOPYFLAGS_rodata_objcopy.o := \
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Sami Tolvanen
maintainerPATCH 16/22 arm64: export CC_USING_PATCHABLE_FUNCTION_ENTRY
In reply to Sami TolvanenSince arm64 does not use -pg in CC_FLAGS_FTRACE with DYNAMIC_FTRACE_WITH_REGS, skip running recordmcount by exporting CC_USING_PATCHABLE_FUNCTION_ENTRY.
--- arch/arm64/Makefile | 1 + 1 file changed, 1 insertion(+)
arch/arm64/Makefile +1 -0
@@ -115,6 +115,7 @@ endif ifeq ($(CONFIG_DYNAMIC_FTRACE_WITH_REGS),y) KBUILD_CPPFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY CC_FLAGS_FTRACE := -fpatchable-function-entry=2 + export CC_USING_PATCHABLE_FUNCTION_ENTRY := 1 endif # Default value
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Sami Tolvanen
maintainerPATCH 17/22 arm64: vdso: disable LTO
In reply to Sami TolvanenFilter out CC_FLAGS_LTO for the vDSO.
--- arch/arm64/kernel/vdso/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/vdso/Makefile +2 -2
@@ -29,8 +29,8 @@ ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \ ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18 ccflags-y += -DDISABLE_BRANCH_PROFILING -CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) -KBUILD_CFLAGS += $(DISABLE_LTO) +CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) \ + $(CC_FLAGS_LTO) KASAN_SANITIZE := n UBSAN_SANITIZE := n OBJECT_FILES_NON_STANDARD := y
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Nick Desaulniers
reviewerRe: [PATCH 17/22] arm64: vdso: disable LTO
Quoted 2 lines · Sami Tolvanen
Filter out
CC_FLAGS_LTOfor the vDSO.
Just curious about this patch (and the following one for x86's vdso), do you happen to recall specifically what the issues with the vdso's are?
Quoted 24 lines
Signed-off-by Sami Tolvanen <[email protected]>--- arch/arm64/kernel/vdso/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/kernel/vdso/Makefile +2
-3@@ -29,8 +29,8 @@ ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \ ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18 ccflags-y += -DDISABLE_BRANCH_PROFILING -CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) -KBUILD_CFLAGS += $(DISABLE_LTO) +CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) \ + $(CC_FLAGS_LTO) KASAN_SANITIZE := n UBSAN_SANITIZE := n OBJECT_FILES_NON_STANDARD := y --2.27.0.212.ge8ba1cc988-goog
Signature · 2 lines
Thanks, ~Nick Desaulniers
Nick Desaulniers
reviewerRe: [PATCH 17/22] arm64: vdso: disable LTO
Quoted 8 lines · Nick Desaulniers
Quoted 2 lines · Sami Tolvanen
Filter out
CC_FLAGS_LTOfor the vDSO.Just curious about this patch (and the following one for x86's vdso), do you happen to recall specifically what the issues with the vdso's are?
+ Andi (tangential, I actually have a bunch of tabs open with slides from http://halobates.de/ right now)58edae3aac9f267424d5a22124
$ git log -S DISABLE_LTO
Quoted 23 lines
Quoted 23 lines
Signed-off-by Sami Tolvanen <[email protected]>--- arch/arm64/kernel/vdso/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/kernel/vdso/Makefile +2
-3@@ -29,8 +29,8 @@ ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \ ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18 ccflags-y += -DDISABLE_BRANCH_PROFILING -CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) -KBUILD_CFLAGS += $(DISABLE_LTO) +CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) \ + $(CC_FLAGS_LTO) KASAN_SANITIZE := n UBSAN_SANITIZE := n OBJECT_FILES_NON_STANDARD := y --
Signature · 2 lines
Thanks, ~Nick Desaulniers
Re: [PATCH 17/22] arm64: vdso: disable LTO
Quoted 11 lines · Nick Desaulniers
Quoted 8 lines · Nick Desaulniers
Quoted 2 lines · Sami Tolvanen
Filter out
CC_FLAGS_LTOfor the vDSO.Just curious about this patch (and the following one for x86's vdso), do you happen to recall specifically what the issues with the vdso's are?
Quoted 5 lines
+ Andi (tangential, I actually have a bunch of tabs open with slides from http://halobates.de/ right now)
58edae3aac9f267424d5a22124$ git log -S DISABLE_LTO
I think I did it originally because the vDSO linker step didn't do all the magic needed for gcc LTO. But it also doesn't seem to be very useful for just a few functions that don't have complex interactions, and somewhat risky for violating some assumptions.
-Andi
Sami Tolvanen
maintainerRe: [PATCH 17/22] arm64: vdso: disable LTO
In reply to Nick DesaulniersQuoted 7 lines · Nick Desaulniers' via Clang Built Linux
Quoted 2 lines · Sami Tolvanen
Filter out
CC_FLAGS_LTOfor the vDSO.Just curious about this patch (and the following one for x86's vdso), do you happen to recall specifically what the issues with the vdso's are?
I recall the compiler optimizing away functions at some point, but as LTO is not really needed in the vDSO, it's just easiest to disable it there.
Sami
Nick Desaulniers
reviewerRe: [PATCH 17/22] arm64: vdso: disable LTO
Quoted 6 lines · Sami Tolvanen
Quoted 4 lines · Nick Desaulniers' via Clang Built Linux
Quoted 2 lines · Sami Tolvanen
Filter out
CC_FLAGS_LTOfor the vDSO.
Quoted 7 lines
Quoted 3 lines
Just curious about this patch (and the following one for x86's vdso), do you happen to recall specifically what the issues with the vdso's are?
I recall the compiler optimizing away functions at some point, but as LTO is not really needed in the vDSO, it's just easiest to disable it there.
Sounds fishy; with extern linkage then I would think it's not safe to eliminate functions. Probably unnecessary for the initial implementation, and something we can follow up on, but always good to have an answer to the inevitable question "why?" in the commit message.
Signature · 2 lines
Thanks, ~Nick Desaulniers
Sami Tolvanen
maintainerRe: [PATCH 17/22] arm64: vdso: disable LTO
Quoted 15 lines · Nick Desaulniers
Quoted 6 lines · Sami Tolvanen
Quoted 4 lines · Nick Desaulniers' via Clang Built Linux
Quoted 2 lines · Sami Tolvanen
Filter out
CC_FLAGS_LTOfor the vDSO.Quoted 7 lines
Quoted 3 lines
Just curious about this patch (and the following one for x86's vdso), do you happen to recall specifically what the issues with the vdso's are?
I recall the compiler optimizing away functions at some point, but as LTO is not really needed in the vDSO, it's just easiest to disable it there.
Quoted 5 lines
Sounds fishy; with extern linkage then I would think it's not safe to eliminate functions. Probably unnecessary for the initial implementation, and something we can follow up on, but always good to have an answer to the inevitable question "why?" in the commit message.
Sure. I can test this again with the current toolchain to see if there are still problems.
Sami
Sami Tolvanen
maintainerPATCH 18/22 arm64: allow LTO_CLANG and THINLTO to be selected
In reply to Sami TolvanenAllow CONFIG_LTO_CLANG and CONFIG_THINLTO to be enabled.
--- arch/arm64/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/Kconfig +2 -0
@@ -72,6 +72,8 @@ config ARM64 select ARCH_USE_SYM_ANNOTATIONS select ARCH_SUPPORTS_MEMORY_FAILURE select ARCH_SUPPORTS_SHADOW_CALL_STACK if CC_HAVE_SHADOW_CALL_STACK + select ARCH_SUPPORTS_LTO_CLANG + select ARCH_SUPPORTS_THINLTO select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && (GCC_VERSION >= 50000 || CC_IS_CLANG) select ARCH_SUPPORTS_NUMA_BALANCING
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Sami Tolvanen
maintainerPATCH 19/22 x86, vdso: disable LTO only for vDSO
In reply to Sami TolvanenRemove the undefined DISABLE_LTO flag from the vDSO, and filter out CC_FLAGS_LTO flags instead where needed.
--- arch/x86/entry/vdso/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/x86/entry/vdso/Makefile +2 -3
@@ -9,8 +9,6 @@ ARCH_REL_TYPE_ABS := R_X86_64_JUMP_SLOT|R_X86_64_GLOB_DAT|R_X86_64_RELATIVE| ARCH_REL_TYPE_ABS += R_386_GLOB_DAT|R_386_JMP_SLOT|R_386_RELATIVE include $(srctree)/lib/vdso/Makefile -KBUILD_CFLAGS += $(DISABLE_LTO) - # Sanitizer runtimes are unavailable and cannot be linked here. KASAN_SANITIZE := n UBSAN_SANITIZE := n
@@ -92,7 +90,7 @@ ifneq ($(RETPOLINE_VDSO_CFLAGS),) endif endif -$(vobjs): KBUILD_CFLAGS := $(filter-out $(GCC_PLUGINS_CFLAGS) $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS)) $(CFL) +$(vobjs): KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO) $(GCC_PLUGINS_CFLAGS) $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS)) $(CFL) # # vDSO code runs in userspace and -pg doesn't help with profiling anyway.
@@ -150,6 +148,7 @@ KBUILD_CFLAGS_32 := $(filter-out -fno-pic,$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out -mfentry,$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out $(GCC_PLUGINS_CFLAGS),$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 := $(filter-out $(RETPOLINE_CFLAGS),$(KBUILD_CFLAGS_32)) +KBUILD_CFLAGS_32 := $(filter-out $(CC_FLAGS_LTO),$(KBUILD_CFLAGS_32)) KBUILD_CFLAGS_32 += -m32 -msoft-float -mregparm=0 -fpic KBUILD_CFLAGS_32 += $(call cc-option, -fno-stack-protector) KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls)
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Sami Tolvanen
maintainerPATCH 20/22 x86, ftrace: disable recordmcount for ftrace_make_nop
In reply to Sami TolvanenIgnore mcount relocations in ftrace_make_nop.
--- arch/x86/kernel/ftrace.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/kernel/ftrace.c +1 -0
@@ -121,6 +121,7 @@ ftrace_modify_code_direct(unsigned long ip, const char *old_code,return 0 ; } +__nomcount int ftrace_make_nop(struct module *mod, struct dyn_ftrace *rec, unsigned long addr) {unsigned long ip = rec->ip;
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Sami Tolvanen
maintainerPATCH 21/22 x86, relocs: Ignore L4_PAGE_OFFSET relocations
In reply to Sami TolvanenL4_PAGE_OFFSET is a constant value, so don't warn about absolute relocations.
--- arch/x86/tools/relocs.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/tools/relocs.c +1 -0
@@ -47,6 +47,7 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = { [S_ABS] ="^(xen_irq_disable_direct_reloc$|" "xen_save_fl_direct_reloc$|" +"L4_PAGE_OFFSET|" "VDSO|" "__crc_)",
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Sami Tolvanen
maintainerPATCH 22/22 x86, build: allow LTO_CLANG and THINLTO to be selected
In reply to Sami TolvanenAllow CONFIG_LTO_CLANG and CONFIG_THINLTO to be enabled.
--- arch/x86/Kconfig | 2 ++ arch/x86/Makefile | 5 +++++ 2 files changed, 7 insertions(+)
arch/x86/Kconfig +2 -0
@@ -92,6 +92,8 @@ config X86 select ARCH_SUPPORTS_ACPI select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_SUPPORTS_NUMA_BALANCING if X86_64 + select ARCH_SUPPORTS_LTO_CLANG if X86_64 + select ARCH_SUPPORTS_THINLTO if X86_64 select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_QUEUED_RWLOCKS select ARCH_USE_QUEUED_SPINLOCKS
arch/x86/Makefile +5 -0
@@ -188,6 +188,11 @@ ifdef CONFIG_X86_64 KBUILD_LDFLAGS += $(call ld-option, -z max-page-size=0x200000) endif +ifdef CONFIG_LTO_CLANG +KBUILD_LDFLAGS += -plugin-opt=-code-model=kernel \ + -plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8) +endif + # Workaround for a gcc prelease that unfortunately was shipped in a suse release KBUILD_CFLAGS += -Wno-sign-compare #
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Peter Zijlstra
maintainerQuoted 7 lines · Sami Tolvanen
This patch series adds support for building
x86_64and arm64 kernels with Clang's Link Time Optimization (LTO).In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI kernels since 2018.
Quoted 7 lines
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Note that first objtool patch in the series is already in linux-next, but as it's needed with LTO, I'm including it also here to make testing easier.
I'm very sad that yet again, memory ordering isn't addressed. LTO vastly increases the range of the optimizer to wreck things.
Sami Tolvanen
maintainerQuoted 12 lines · Peter Zijlstra
Quoted 11 lines · Sami Tolvanen
This patch series adds support for building
x86_64and arm64 kernels with Clang's Link Time Optimization (LTO).In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI kernels since 2018.
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Quoted 6 lines
Quoted 3 lines
Note that first objtool patch in the series is already in linux-next, but as it's needed with LTO, I'm including it also here to make testing easier.
I'm very sad that yet again, memory ordering isn't addressed. LTO vastly increases the range of the optimizer to wreck things.
I believe Will has some thoughts about this, and patches, but I'll let him talk about it.
Sami
Will Deacon
maintainerQuoted 17 lines · Sami Tolvanen
Quoted 16 lines · Peter Zijlstra
Quoted 14 lines · Sami Tolvanen
This patch series adds support for building
x86_64and arm64 kernels with Clang's Link Time Optimization (LTO).In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI kernels since 2018.
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Note that first objtool patch in the series is already in linux-next, but as it's needed with LTO, I'm including it also here to make testing easier.
Quoted 5 lines
Quoted 2 lines
I'm very sad that yet again, memory ordering isn't addressed. LTO vastly increases the range of the optimizer to wreck things.
I believe Will has some thoughts about this, and patches, but I'll let him talk about it.
Thanks for reminding me! I will get patches out ASAP (I've been avoiding the rebase from hell, but this is the motivation I need).
Will
Nick Desaulniers
reviewerQuoted 13 lines · Peter Zijlstra
Quoted 11 lines · Sami Tolvanen
This patch series adds support for building
x86_64and arm64 kernels with Clang's Link Time Optimization (LTO).In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI kernels since 2018.
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Quoted 6 lines
Quoted 3 lines
Note that first objtool patch in the series is already in linux-next, but as it's needed with LTO, I'm including it also here to make testing easier.
I'm very sad that yet again, memory ordering isn't addressed. LTO vastly increases the range of the optimizer to wreck things.
Hi Peter, could you expand on the issue for the folks on the thread? I'm happy to try to hack something up in LLVM if we check that X does or does not happen; maybe we can even come up with some concrete test cases that can be added to LLVM's codebase?
Signature · 2 lines
Thanks, ~Nick Desaulniers
Peter Zijlstra
maintainerQuoted 18 lines · Nick Desaulniers
Quoted 17 lines · Peter Zijlstra
Quoted 14 lines · Sami Tolvanen
This patch series adds support for building
x86_64and arm64 kernels with Clang's Link Time Optimization (LTO).In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI kernels since 2018.
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Note that first objtool patch in the series is already in linux-next, but as it's needed with LTO, I'm including it also here to make testing easier.
Quoted 7 lines
Quoted 2 lines
I'm very sad that yet again, memory ordering isn't addressed. LTO vastly increases the range of the optimizer to wreck things.
Hi Peter, could you expand on the issue for the folks on the thread? I'm happy to try to hack something up in LLVM if we check that X does or does not happen; maybe we can even come up with some concrete test cases that can be added to LLVM's codebase?
I'm sure Will will respond, but the basic issue is the trainwreck C11 made of dependent loads.
Anyway, here's a link to the last time this came up:
Peter Zijlstra
maintainerQuoted 27 lines · Peter Zijlstra
Quoted 18 lines · Nick Desaulniers
Quoted 17 lines · Peter Zijlstra
Quoted 14 lines · Sami Tolvanen
This patch series adds support for building
x86_64and arm64 kernels with Clang's Link Time Optimization (LTO).In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI kernels since 2018.
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Note that first objtool patch in the series is already in linux-next, but as it's needed with LTO, I'm including it also here to make testing easier.
Quoted 7 lines
Quoted 2 lines
I'm very sad that yet again, memory ordering isn't addressed. LTO vastly increases the range of the optimizer to wreck things.
Hi Peter, could you expand on the issue for the folks on the thread? I'm happy to try to hack something up in LLVM if we check that X does or does not happen; maybe we can even come up with some concrete test cases that can be added to LLVM's codebase?
Quoted 6 lines
I'm sure Will will respond, but the basic issue is the trainwreck C11 made of dependent loads.
Anyway, here's a link to the last time this came up:
Another good read:
https://lore.kernel.org/lkml/[email protected]/
and having (partially) re-read that, I now worry intensily about things like latch_tree_find(), cyc2ns_read_begin, __ktime_get_fast_ns().
It looks like kernel/time/sched_clock.c uses raw_read_seqcount() which deviates from the above patterns by, for some reason, using a primitive that includes an extra smp_rmb().
And this is just the few things I could remember off the top of my head, who knows what else is out there.
Peter Zijlstra
maintainerQuoted 16 lines · Peter Zijlstra
Quoted 6 lines · Peter Zijlstra
I'm sure Will will respond, but the basic issue is the trainwreck C11 made of dependent loads.
Anyway, here's a link to the last time this came up:
Another good read:
https://lore.kernel.org/lkml/[email protected]/
and having (partially) re-read that, I now worry intensily about things like
latch_tree_find(),cyc2ns_read_begin,__ktime_get_fast_ns().
Quoted 6 lines
It looks like
kernel/time/sched_clock.cusesraw_read_seqcount()which deviates from the above patterns by, for some reason, using a primitive that includes an extrasmp_rmb().And this is just the few things I could remember off the top of my head, who knows what else is out there.
As an example, let us consider __ktime_get_fast_ns(), the critical bit is:
seq = raw_read_seqcount_latch(&tkf->seq); tkr = tkf->base + (seq & 0x01); now = tkr->base;
And we hard rely on that being a dependent load, so:
LOAD seq, (tkf->seq)
LOAD tkr, tkf->base AND seq, 1 MUL seq, sizeof(tk_read_base)
ADD tkr, seq
LOAD now, (tkr->base)
Such that we obtain 'now' as a direct dependency on 'seq'. This ensures the loads are ordered.
A compiler can wreck this by translating it into something like:
LOAD seq, (tkf->seq)
LOAD tkr, tkf->base
AND seq, 1
CMP seq, 0
JE 1f
ADD tkr, sizeof(tk_read_base)
1:
LOAD now, (tkr->base)
Because now the machine can speculate and load now before seq, breaking the ordering.
I was asked for input on this, and after a few days digging through some history, thought I'd comment. Hope you don't mind.
Quoted 12 lines · Peter Zijlstra
Quoted 11 lines · Peter Zijlstra
Quoted 6 lines · Peter Zijlstra
I'm sure Will will respond, but the basic issue is the trainwreck C11 made of dependent loads.
Anyway, here's a link to the last time this came up:
Another good read:
[...]
Quoted 2 lines
Because now the machine can speculate and load now before seq, breaking the ordering.
First of all, I agree with the concerns, but not because of LTO.
To set the stage better, and summarize the fundamental problem again:
we're in the unfortunate situation that no compiler today has a way to _efficiently_ deal with C11's memory_order_consume
[https://lwn.net/Articles/588300/]. If we did, we could just use that and be done with it. But, sadly, that doesn't seem possible right now -- compilers just say consume==acquire. Will suggests doing the same in the
kernel: https://lkml.kernel.org/r/[email protected]
What we're most worried about right now is the existence of compiler transformations that could break data dependencies by e.g. turning them into control dependencies.
If this is a real worry, I don't think LTO is the magical feature that will uncover those optimizations. If these compiler transformations are real, they also exist in a normal build! And if we are worried about them, we need to stop relying on dependent load ordering across the board; or switch to -O0 for everything. Clearly, we don't want either.
Why do we think LTO is special?
With LTO, Clang just emits LLVM bitcode instead of ELF objects, and during the linker stage intermodular optimizations across translation unit boundaries are done that might not be possible otherwise
[https://llvm.org/docs/LinkTimeOptimization.html]. From the memory model side of things, if we could fully convey our intent to the compiler (the imaginary consume), there would be no problem, because all optimization stages from bitcode generation to the final machine code generation after LTO know about the intended semantics. (Also, keep in mind that LTO is _not_ doing post link optimization of machine code binaries!)
But as far as we can tell, there is no evidence of the dreaded "data dependency to control dependency" conversion with LTO that isn't there in non-LTO builds, if it's even there at all. Has the data to control dependency conversion been encountered in the wild? If not, is the resulting reaction an overreaction? If so, we need to be careful blaming LTO for something that it isn't even guilty of.
So, we are probably better off untangling LTO from the story:
1. LTO or no LTO does not matter. The LTO series should not get tangled up with memory model issues.
2. The memory model question and problems need to be answered and addressed separately.
Thoughts?
Thanks,
-- Marco
Peter Zijlstra
maintainerQuoted 2 lines · Marco Elver
I was asked for input on this, and after a few days digging through some history, thought I'd comment. Hope you don't mind.
Not at all, being the one that asked :-)
Quoted 8 lines
First of all, I agree with the concerns, but not because of LTO.
To set the stage better, and summarize the fundamental problem again:
we're in the unfortunate situation that no compiler today has a way to _efficiently_ deal with C11'smemory_order_consume
[https://lwn.net/Articles/588300/]. If we did, we could just use that and be done with it. But, sadly, that doesn't seem possible right now -- compilers just say consume==acquire.
I'm not convinced C11 memory_order_consume would actually work for us, even if it would work. That is, given:
https://lore.kernel.org/lkml/[email protected]/
only pointers can have consume, but like I pointed out, we have code that relies on dependent loads from integers.
Quoted 2 lines
Will suggests doing the same in the
kernel: https://lkml.kernel.org/r/[email protected]
PowerPC would need a similar thing, it too will not preserve causality for control dependecies.
Quoted 3 lines
What we're most worried about right now is the existence of compiler transformations that could break data dependencies by e.g. turning them into control dependencies.
Correct.
Quoted 3 lines
If this is a real worry, I don't think LTO is the magical feature that will uncover those optimizations. If these compiler transformations are real, they also exist in a normal build!
Agreed, _however_ with the caveat that LTO could make them more common.
After all, with whole program analysis, the compiler might be able to more easily determine that our pointer @ptr is only ever assigned the values of &A, &B or &C, while without that visibility it would not be able to determine this.
Once it knows @ptr has a limited number of determined values, the conversion into control dependencies becomes much more likely.
Quoted 3 lines
And if we are worried about them, we need to stop relying on dependent load ordering across the board; or switch to -O0 for everything. Clearly, we don't want either.
Agreed.
Quoted 1 line
Why do we think LTO is special?
As argued above, whole-program analysis would make it more likely. But I agree the fundamental problem exists independent from LTO.
Quoted 6 lines
But as far as we can tell, there is no evidence of the dreaded "data dependency to control dependency" conversion with LTO that isn't there in non-LTO builds, if it's even there at all. Has the data to control dependency conversion been encountered in the wild? If not, is the resulting reaction an overreaction? If so, we need to be careful blaming LTO for something that it isn't even guilty of.
It is mostly paranoia; in a large part driven by the fact that even if such a conversion were to be done, it could go a very long time without actually causing problems, and longer still for such problems to be traced back to such an 'optimization'.
That is, the collective hurt from debugging too many ordering issues.
Quoted 9 lines
So, we are probably better off untangling LTO from the story:
1. LTO or no LTO does not matter. The LTO series should not get tangled up with memory model issues.
2. The memory model question and problems need to be answered and addressed separately.
Thoughts?
How hard would it be to creates something that analyzes a build and looks for all 'dependent load -> control dependency' transformations headed by a volatile (and/or from asm) load and issues a warning for them?
This would give us an indication of how valuable this transformation is for the kernel. I'm hoping/expecting it's vanishingly rare, but what do I know.
Quoted 15 lines · Peter Zijlstra
Quoted 2 lines · Marco Elver
I was asked for input on this, and after a few days digging through some history, thought I'd comment. Hope you don't mind.
Not at all, being the one that asked :-)
Quoted 8 lines
First of all, I agree with the concerns, but not because of LTO.
To set the stage better, and summarize the fundamental problem again:
we're in the unfortunate situation that no compiler today has a way to _efficiently_ deal with C11'smemory_order_consume
[https://lwn.net/Articles/588300/]. If we did, we could just use that and be done with it. But, sadly, that doesn't seem possible right now -- compilers just say consume==acquire.
Quoted 7 lines
I'm not convinced C11
memory_order_consumewould actually work for us, even if it would work. That is, given:https://lore.kernel.org/lkml/[email protected]/
only pointers can have consume, but like I pointed out, we have code that relies on dependent loads from integers.
I agree that C11 memory_order_consume is not normally what we want, given that it is universally promoted to memory_order_acquire.
However, dependent loads from integers are, if anything, more difficult to defend from the compiler than are control dependencies. This applies doubly to integers that are used to index two-element arrays, in which case you are just asking the compiler to destroy your dependent loads by converting them into control dependencies.
Quoted 18 lines
Quoted 2 lines
Will suggests doing the same in the
kernel: https://lkml.kernel.org/r/[email protected]PowerPC would need a similar thing, it too will not preserve causality for control dependecies.
Quoted 3 lines
What we're most worried about right now is the existence of compiler transformations that could break data dependencies by e.g. turning them into control dependencies.
Correct.
Quoted 3 lines
If this is a real worry, I don't think LTO is the magical feature that will uncover those optimizations. If these compiler transformations are real, they also exist in a normal build!
Agreed, _however_ with the caveat that LTO could make them more common.
Quoted 7 lines
After all, with whole program analysis, the compiler might be able to more easily determine that our pointer @ptr is only ever assigned the values of &A, &B or &C, while without that visibility it would not be able to determine this.
Once it knows @ptr has a limited number of determined values, the conversion into control dependencies becomes much more likely.
Which would of course break dependent loads.
Quoted 35 lines
Quoted 3 lines
And if we are worried about them, we need to stop relying on dependent load ordering across the board; or switch to -O0 for everything. Clearly, we don't want either.
Agreed.
Quoted 1 line
Why do we think LTO is special?
As argued above, whole-program analysis would make it more likely. But I agree the fundamental problem exists independent from LTO.
Quoted 6 lines
But as far as we can tell, there is no evidence of the dreaded "data dependency to control dependency" conversion with LTO that isn't there in non-LTO builds, if it's even there at all. Has the data to control dependency conversion been encountered in the wild? If not, is the resulting reaction an overreaction? If so, we need to be careful blaming LTO for something that it isn't even guilty of.
It is mostly paranoia; in a large part driven by the fact that even if such a conversion were to be done, it could go a very long time without actually causing problems, and longer still for such problems to be traced back to such an 'optimization'.
That is, the collective hurt from debugging too many ordering issues.
Quoted 9 lines
So, we are probably better off untangling LTO from the story:
1. LTO or no LTO does not matter. The LTO series should not get tangled up with memory model issues.
2. The memory model question and problems need to be answered and addressed separately.
Thoughts?
Quoted 9 lines
How hard would it be to creates something that analyzes a build and looks for all 'dependent load -> control dependency' transformations headed by a volatile (and/or from asm) load and issues a warning for them?
This would give us an indication of how valuable this transformation is for the kernel. I'm hoping/expecting it's vanishingly rare, but what do I know.
This could be quite useful!
Thanx, Paul
Peter Zijlstra
maintainerQuoted 10 lines · Paul E. McKenney
Quoted 7 lines · Peter Zijlstra
I'm not convinced C11
memory_order_consumewould actually work for us, even if it would work. That is, given:https://lore.kernel.org/lkml/[email protected]/
only pointers can have consume, but like I pointed out, we have code that relies on dependent loads from integers.
Quoted 8 lines
I agree that C11
memory_order_consumeis not normally what we want, given that it is universally promoted tomemory_order_acquire.However, dependent loads from integers are, if anything, more difficult to defend from the compiler than are control dependencies. This applies doubly to integers that are used to index two-element arrays, in which case you are just asking the compiler to destroy your dependent loads by converting them into control dependencies.
Yes, I'm aware. However, as you might know, I'm firmly in the 'C is a glorified assembler' camp (as I expect most actual OS people are, out of necessity if nothing else) and if I wanted a control dependency I would've bloody well written one.
I think an optimizing compiler is awesome, but only in so far as that optimization is actually helpful -- and yes, I just stepped into a giant twilight zone there. That is, any optimization that has _any_ controversy should be controllable (like -fno-strict-overflow -fno-strict-aliasing) and I'd very much like the same here.
In a larger context, I still think that eliminating speculative stores is both necessary and sufficient to avoid out-of-thin-air. So I'd also love to get some control on that.
From: Peter Zijlstra
Quoted 21 lines
Sent: 01 July 2020 10:11
Quoted 10 lines · Paul E. McKenney
Quoted 7 lines · Peter Zijlstra
I'm not convinced C11
memory_order_consumewould actually work for us, even if it would work. That is, given:https://lore.kernel.org/lkml/[email protected]/
only pointers can have consume, but like I pointed out, we have code that relies on dependent loads from integers.
Quoted 8 lines
I agree that C11
memory_order_consumeis not normally what we want, given that it is universally promoted tomemory_order_acquire.However, dependent loads from integers are, if anything, more difficult to defend from the compiler than are control dependencies. This applies doubly to integers that are used to index two-element arrays, in which case you are just asking the compiler to destroy your dependent loads by converting them into control dependencies.
Quoted 4 lines
Yes, I'm aware. However, as you might know, I'm firmly in the 'C is a glorified assembler' camp (as I expect most actual OS people are, out of necessity if nothing else) and if I wanted a control dependency I would've bloody well written one.
I write in C because doing register tracking is hard :-) I've got an hdlc implementation in C that is carefully adjusted so that the worst case path is bounded.
I probably know every one of the 1000 instructions in it.
Would an asm statement that uses the same 'register' for input and output but doesn't actually do anything help?
It won't generate any code, but the compiler ought to assume that it might change the value - so can't do optimisations that track the value across the call.
Quoted 5 lines
I think an optimizing compiler is awesome, but only in so far as that optimization is actually helpful -- and yes, I just stepped into a giant twilight zone there. That is, any optimization that has _any_ controversy should be controllable (like -fno-strict-overflow -fno-strict-aliasing) and I'd very much like the same here.
I'm fed up of gcc generating the code that uses SIMD instructions for the 'tail' loop at the end of a function that is already doing SIMD operations for the main part of the loop.
And compilers that convert a byte copy loop to 'rep movsb'. If I'm copying 3 or 4 bytes I don't want a 40 clock overhead.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
Quoted 32 lines · David Laight
From: Peter Zijlstra
Quoted 21 lines
Sent: 01 July 2020 10:11
Quoted 10 lines · Paul E. McKenney
Quoted 7 lines · Peter Zijlstra
I'm not convinced C11
memory_order_consumewould actually work for us, even if it would work. That is, given:https://lore.kernel.org/lkml/[email protected]/
only pointers can have consume, but like I pointed out, we have code that relies on dependent loads from integers.
Quoted 8 lines
I agree that C11
memory_order_consumeis not normally what we want, given that it is universally promoted tomemory_order_acquire.However, dependent loads from integers are, if anything, more difficult to defend from the compiler than are control dependencies. This applies doubly to integers that are used to index two-element arrays, in which case you are just asking the compiler to destroy your dependent loads by converting them into control dependencies.
Quoted 4 lines
Yes, I'm aware. However, as you might know, I'm firmly in the 'C is a glorified assembler' camp (as I expect most actual OS people are, out of necessity if nothing else) and if I wanted a control dependency I would've bloody well written one.
I write in C because doing register tracking is hard :-) I've got an hdlc implementation in C that is carefully adjusted so that the worst case path is bounded.
I probably know every one of the 1000 instructions in it.
Quoted 5 lines
Would an asm statement that uses the same 'register' for input and output but doesn't actually do anything help?
It won't generate any code, but the compiler ought to assume that it might change the value - so can't do optimisations that track the value across the call.
It might replace the volatile load, but there are optimizations that apply to the downstream code as well.
Or are you suggesting periodically pushing the dependent variable through this asm? That might work, but it would be easier and more maintainable to just mark the variable.
Quoted 11 lines
Quoted 5 lines
I think an optimizing compiler is awesome, but only in so far as that optimization is actually helpful -- and yes, I just stepped into a giant twilight zone there. That is, any optimization that has _any_ controversy should be controllable (like -fno-strict-overflow -fno-strict-aliasing) and I'd very much like the same here.
I'm fed up of gcc generating the code that uses SIMD instructions for the 'tail' loop at the end of a function that is already doing SIMD operations for the main part of the loop.
And compilers that convert a byte copy loop to 'rep movsb'. If I'm copying 3 or 4 bytes I don't want a 40 clock overhead.
Agreed, compilers can often be all too "helpful". :-(
Thanx, Paul
From: Paul E. McKenney
Quoted 1 line
Sent: 01 July 2020 17:06
...
Quoted 6 lines
Quoted 5 lines
Would an asm statement that uses the same 'register' for input and output but doesn't actually do anything help?
It won't generate any code, but the compiler ought to assume that it might change the value - so can't do optimisations that track the value across the call.
Quoted 6 lines
It might replace the volatile load, but there are optimizations that apply to the downstream code as well.
Or are you suggesting periodically pushing the dependent variable through this asm? That might work, but it would be easier and more maintainable to just mark the variable.
Marking the variable requires compiler support.
Although what 'volatile register int foo;' means might be interesting.
So I was thinking that in the case mentioned earlier you do:
ptr += LAUNDER(offset & 1); to ensure the compiler didn't convert to: if (offset & 1) ptr++;
(Which is probably a pessimisation - the reverse is likely better.)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
Quoted 16 lines · David Laight
From: Paul E. McKenney
Quoted 1 line
Sent: 01 July 2020 17:06
...
Quoted 6 lines
Quoted 5 lines
Would an asm statement that uses the same 'register' for input and output but doesn't actually do anything help?
It won't generate any code, but the compiler ought to assume that it might change the value - so can't do optimisations that track the value across the call.Quoted 6 lines
It might replace the volatile load, but there are optimizations that apply to the downstream code as well.
Or are you suggesting periodically pushing the dependent variable through this asm? That might work, but it would be easier and more maintainable to just mark the variable.
Quoted 8 lines
Marking the variable requires compiler support.
Although what 'volatile register int foo;' means might be interesting.So I was thinking that in the case mentioned earlier you do:
ptr += LAUNDER(offset & 1); to ensure the compiler didn't convert to: if (offset & 1) ptr++;(Which is probably a pessimisation - the reverse is likely better.)
Indeed, Akshat's prototype follows the "volatile" qualifier in many ways. https://github.com/AKG001/gcc/
Thanx, Paul
Quoted 52 lines · Paul E. McKenney
Quoted 11 lines · Peter Zijlstra
Quoted 8 lines · Marco Elver
First of all, I agree with the concerns, but not because of LTO.
To set the stage better, and summarize the fundamental problem again:
we're in the unfortunate situation that no compiler today has a way to _efficiently_ deal with C11'smemory_order_consume
[https://lwn.net/Articles/588300/]. If we did, we could just use that and be done with it. But, sadly, that doesn't seem possible right now -- compilers just say consume==acquire.Quoted 7 lines
I'm not convinced C11
memory_order_consumewould actually work for us, even if it would work. That is, given:https://lore.kernel.org/lkml/[email protected]/
only pointers can have consume, but like I pointed out, we have code that relies on dependent loads from integers.
I agree that C11
memory_order_consumeis not normally what we want, given that it is universally promoted tomemory_order_acquire.However, dependent loads from integers are, if anything, more difficult to defend from the compiler than are control dependencies. This applies doubly to integers that are used to index two-element arrays, in which case you are just asking the compiler to destroy your dependent loads by converting them into control dependencies.
Quoted 23 lines
Quoted 2 lines
Will suggests doing the same in the
kernel: https://lkml.kernel.org/r/[email protected]PowerPC would need a similar thing, it too will not preserve causality for control dependecies.
Quoted 3 lines
What we're most worried about right now is the existence of compiler transformations that could break data dependencies by e.g. turning them into control dependencies.
Correct.
Quoted 3 lines
If this is a real worry, I don't think LTO is the magical feature that will uncover those optimizations. If these compiler transformations are real, they also exist in a normal build!
Agreed, _however_ with the caveat that LTO could make them more common.
After all, with whole program analysis, the compiler might be able to more easily determine that our pointer @ptr is only ever assigned the values of &A, &B or &C, while without that visibility it would not be able to determine this.
Quoted 44 lines
Quoted 2 lines
Once it knows @ptr has a limited number of determined values, the conversion into control dependencies becomes much more likely.
Which would of course break dependent loads.
Quoted 39 lines
Quoted 3 lines
And if we are worried about them, we need to stop relying on dependent load ordering across the board; or switch to -O0 for everything. Clearly, we don't want either.
Agreed.
Quoted 1 line
Why do we think LTO is special?
As argued above, whole-program analysis would make it more likely. But I agree the fundamental problem exists independent from LTO.
Quoted 6 lines
But as far as we can tell, there is no evidence of the dreaded "data dependency to control dependency" conversion with LTO that isn't there in non-LTO builds, if it's even there at all. Has the data to control dependency conversion been encountered in the wild? If not, is the resulting reaction an overreaction? If so, we need to be careful blaming LTO for something that it isn't even guilty of.
It is mostly paranoia; in a large part driven by the fact that even if such a conversion were to be done, it could go a very long time without actually causing problems, and longer still for such problems to be traced back to such an 'optimization'.
That is, the collective hurt from debugging too many ordering issues.
Quoted 9 lines
So, we are probably better off untangling LTO from the story:
1. LTO or no LTO does not matter. The LTO series should not get tangled up with memory model issues.
2. The memory model question and problems need to be answered and addressed separately.
Thoughts?
How hard would it be to creates something that analyzes a build and looks for all 'dependent load -> control dependency' transformations headed by a volatile (and/or from asm) load and issues a warning for them?
I was thinking about this, but in the context of the "auto-promote to acquire" which you didn't like. Issuing a warning should certainly be simpler.
I think there is no one place where we know these transformations happen, but rather, need to analyze the IR before transformations, take note of all the dependent loads headed by volatile+asm, and then run an analysis after optimizations checking the dependencies are still there.
Quoted 5 lines
Quoted 3 lines
This would give us an indication of how valuable this transformation is for the kernel. I'm hoping/expecting it's vanishingly rare, but what do I know.
This could be quite useful!
We might then even be able to say, "if you get this warning, turn on CONFIG_ACQUIRE_READ_DEPENDENCIES" (or however the option will be named). Or some other tricks, like automatically recompile the TU where this happens with the option. But again, this is not something that should specifically block LTO, because if we have this, we'll need to turn it on for everything.
Thanks,
-- Marco
Will Deacon
maintainerQuoted 32 lines · Marco Elver
Quoted 10 lines · Paul E. McKenney
Quoted 9 lines · Peter Zijlstra
Quoted 8 lines · Marco Elver
So, we are probably better off untangling LTO from the story:
1. LTO or no LTO does not matter. The LTO series should not get tangled up with memory model issues.
2. The memory model question and problems need to be answered and addressed separately.
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Thoughts?
How hard would it be to creates something that analyzes a build and looks for all 'dependent load -> control dependency' transformations headed by a volatile (and/or from asm) load and issues a warning for them?
I was thinking about this, but in the context of the "auto-promote to acquire" which you didn't like. Issuing a warning should certainly be simpler.
I think there is no one place where we know these transformations happen, but rather, need to analyze the IR before transformations, take note of all the dependent loads headed by volatile+asm, and then run an analysis after optimizations checking the dependencies are still there.
Quoted 4 lines
Quoted 3 lines
This would give us an indication of how valuable this transformation is for the kernel. I'm hoping/expecting it's vanishingly rare, but what do I know.
Quoted 8 lines
Quoted 1 line
This could be quite useful!
We might then even be able to say, "if you get this warning, turn on
CONFIG_ACQUIRE_READ_DEPENDENCIES" (or however the option will be named). Or some other tricks, like automatically recompile the TU where this happens with the option. But again, this is not something that should specifically block LTO, because if we have this, we'll need to turn it on for everything.
I'm not especially keen on solving this with additional config options -- all it does it further fragment the number of kernels we have to care about and distributions really won't be in a position to know whether this should be enabled or not. I would prefer that the build fails, and we figure out which compiler switch we need to stop the harmful optimisation taking place. As Peter says, it _should_ be a rare thing to see (empirically, the kernel seems to be getting away with it so far).
The problem, as I see it, is that the C language doesn't provide us with a way to express dependency ordering and so we're at the mercy of the compiler when we roll our own implementation. Paul continues to fight the good fight at committee meetings to improve the situation, but in the meantime we'd benefit from two things:
1. A way to disable any compiler optimisations that break our dependency ordering in spite of READ_ONCE()
2. A way to detect at build time if these harmful optimisations are taking place
Finally, while I agree that this problem isn't limited to LTO, my fear is that LTO provides enough information for address dependencies headed by a READ_ONCE() to be converted to control dependencies when some common values of the pointer can be determined by the compiler. If we can rule this sort of thing out, then great, but in the absence of (2) I think throwing in an acquire is a sensible safety measure. Doesn't CFI rely on LTO to do something similar for indirect branch targets, or have I got that totally mixed up?
Will
Peter Zijlstra
maintainerQuoted 15 lines · Marco Elver
Quoted 9 lines · Paul E. McKenney
Quoted 8 lines · Peter Zijlstra
Quoted 1 line · Marco Elver
Thoughts?
How hard would it be to creates something that analyzes a build and looks for all 'dependent load -> control dependency' transformations headed by a volatile (and/or from asm) load and issues a warning for them?
I was thinking about this, but in the context of the "auto-promote to acquire" which you didn't like. Issuing a warning should certainly be simpler.
Quoted 5 lines
I think there is no one place where we know these transformations happen, but rather, need to analyze the IR before transformations, take note of all the dependent loads headed by volatile+asm, and then run an analysis after optimizations checking the dependencies are still there.
Urgh, that sounds nasty. The thing is, as I've hinted at in my other reply, I would really like a compiler switch to disable this optimization entirely -- knowing how relevant the trnaformation is, is simply a first step towards that.
In order to control the tranformation, you have to actually know where in the optimization passes it happens.
Also, if (big if in my book) we find the optimization is actually beneficial, we can invert the warning when using the switch and warn about lost optimization possibilities and manually re-write the code to use control deps.
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
This would give us an indication of how valuable this transformation is for the kernel. I'm hoping/expecting it's vanishingly rare, but what do I know.
This could be quite useful!
We might then even be able to say, "if you get this warning, turn on
CONFIG_ACQUIRE_READ_DEPENDENCIES" (or however the option will be named).
I was going to suggest: if this happens, employ -fno-wreck-dependencies :-)
Quoted 27 lines · Peter Zijlstra
Quoted 15 lines · Marco Elver
Quoted 9 lines · Paul E. McKenney
Quoted 8 lines · Peter Zijlstra
Quoted 1 line · Marco Elver
Thoughts?
How hard would it be to creates something that analyzes a build and looks for all 'dependent load -> control dependency' transformations headed by a volatile (and/or from asm) load and issues a warning for them?
I was thinking about this, but in the context of the "auto-promote to acquire" which you didn't like. Issuing a warning should certainly be simpler.
Quoted 5 lines
I think there is no one place where we know these transformations happen, but rather, need to analyze the IR before transformations, take note of all the dependent loads headed by volatile+asm, and then run an analysis after optimizations checking the dependencies are still there.
Urgh, that sounds nasty. The thing is, as I've hinted at in my other reply, I would really like a compiler switch to disable this optimization entirely -- knowing how relevant the trnaformation is, is simply a first step towards that.
Quoted 7 lines
In order to control the tranformation, you have to actually know where in the optimization passes it happens.
Also, if (big if in my book) we find the optimization is actually beneficial, we can invert the warning when using the switch and warn about lost optimization possibilities and manually re-write the code to use control deps.
There are lots of optimization passes and any of them might decide to destroy dependencies. :-(
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
This would give us an indication of how valuable this transformation is for the kernel. I'm hoping/expecting it's vanishingly rare, but what do I know.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
This could be quite useful!
We might then even be able to say, "if you get this warning, turn on
CONFIG_ACQUIRE_READ_DEPENDENCIES" (or however the option will be named).I was going to suggest: if this happens, employ -fno-wreck-dependencies :-)
The current state in the C++ committee is that marking variables carrying dependencies is the way forward. This is of course not what the Linux kernel community does, but it should not be hard to have a -fall-variables-dependent or some such that causes all variables to be treated as if they were marked. Though I was hoping for only pointers. Are they -sure- that they -absolutely- need to carry dependencies through integers???
Anyway, the next step is to provide this functionality in one of the major compilers. Akshat Garg started this in GCC as a GSoC project by duplicating "volatile" functionality with a _Dependent_ptr keyword. Next steps would include removing "volatile" functionality not required for dependencies. Here is a random posting, which if I remember correctly raised some doubts as to whether "volatile" was really carried through everywhere that it needs to for things like LTO:
https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00139.html
What happened to this effort? Akshat graduated and got an unrelated job, you know, the usual. ;-)
Thanx, Paul
Peter Zijlstra
maintainerQuoted 7 lines · Paul E. McKenney
The current state in the C++ committee is that marking variables carrying dependencies is the way forward. This is of course not what the Linux kernel community does, but it should not be hard to have a -fall-variables-dependent or some such that causes all variables to be treated as if they were marked. Though I was hoping for only pointers. Are they -sure- that they -absolutely- need to carry dependencies through integers???
What's 'need'? :-)
I'm thinking __ktime_get_fast_ns() is better off with a dependent load than it is with an extra smp_rmb().
Yes we can stick an smp_rmb() in there, but I don't like it. Like I wrote earlier, if I wanted a control dependency, I'd have written one.
Quoted 11 lines · Peter Zijlstra
Quoted 7 lines · Paul E. McKenney
The current state in the C++ committee is that marking variables carrying dependencies is the way forward. This is of course not what the Linux kernel community does, but it should not be hard to have a -fall-variables-dependent or some such that causes all variables to be treated as if they were marked. Though I was hoping for only pointers. Are they -sure- that they -absolutely- need to carry dependencies through integers???
What's 'need'? :-)
Turning off all dependency-killing optimizations on all pointers is likely a non-event. Turning off all dependency-killing optimizations on all integers is not the road to happiness.
So whatever "need" might be, it would need to be rather earthshaking. ;-) It is probably not -that- hard to convert to pointers, even if they are indexing multiple arrays.
Quoted 5 lines
I'm thinking
__ktime_get_fast_ns()is better off with a dependent load than it is with an extrasmp_rmb().Yes we can stick an
smp_rmb()in there, but I don't like it. Like I wrote earlier, if I wanted a control dependency, I'd have written one.
No argument here.
But it looks like we are going to have to tell the compiler.
Thanx, Paul
Peter Zijlstra
maintainerQuoted 1 line · Paul E. McKenney
But it looks like we are going to have to tell the compiler.
What does the current proposal look like? I can certainly annotate the seqcount latch users, but who knows what other code is out there....
Quoted 6 lines · Peter Zijlstra
Quoted 1 line · Paul E. McKenney
But it looks like we are going to have to tell the compiler.
What does the current proposal look like? I can certainly annotate the seqcount latch users, but who knows what other code is out there....
For pointers, yes, within the Linux kernel it is hopeless, thus the thought of a -fall-dependent-ptr or some such that makes the compiler pretend that each and every pointer is marked with the _Dependent_ptr qualifier.
New non-Linux-kernel code might want to use his qualifier explicitly, perhaps something like the following:
_Dependent_ptr struct foo *p; // Or maybe after the "*"? rcu_read_lock(); p = rcu_dereference(gp); // And so on...
If a function is to take a dependent pointer as a function argument, then the corresponding parameter need the _Dependent_ptr marking. Ditto for return values.
The proposal did not cover integers due to concerns about the number of optimization passes that would need to be reviewed to make that work. Nevertheless, using a marked integer would be safer than using an unmarked one, and if the review can be carried out, why not? Maybe something like this:
_Dependent_ptr int idx; rcu_read_lock(); idx = READ_ONCE(gidx); d = rcuarray[idx]; rcu_read_unlock(); do_something_with(d);
So use of this qualifier is quite reasonable.
The prototype for GCC is here: https://github.com/AKG001/gcc/
Thanx, Paul
Peter Zijlstra
maintainerQuoted 13 lines · Paul E. McKenney
Quoted 6 lines · Peter Zijlstra
Quoted 1 line · Paul E. McKenney
But it looks like we are going to have to tell the compiler.
What does the current proposal look like? I can certainly annotate the seqcount latch users, but who knows what other code is out there....
For pointers, yes, within the Linux kernel it is hopeless, thus the thought of a -fall-dependent-ptr or some such that makes the compiler pretend that each and every pointer is marked with the
_Dependent_ptrqualifier.
Quoted 4 lines
New non-Linux-kernel code might want to use his qualifier explicitly, perhaps something like the following:
_Dependent_ptrstruct foo *p; // Or maybe after the "*"?
After, as you've written it, it's a pointer to a '_Dependent struct foo'.
Quoted 23 lines
rcu_read_lock(); p = rcu_dereference(gp); // And so on...If a function is to take a dependent pointer as a function argument, then the corresponding parameter need the
_Dependent_ptrmarking. Ditto for return values.The proposal did not cover integers due to concerns about the number of optimization passes that would need to be reviewed to make that work. Nevertheless, using a marked integer would be safer than using an unmarked one, and if the review can be carried out, why not? Maybe something like this:
_Dependent_ptr int idx; rcu_read_lock(); idx = READ_ONCE(gidx); d = rcuarray[idx]; rcu_read_unlock(); do_something_with(d);
Quoted 1 line
So use of this qualifier is quite reasonable.
The above usage might warrant a rename of the qualifier though, since clearly there isn't anything ptr around.
Quoted 1 line
The prototype for GCC is here: https://github.com/AKG001/gcc/
Thanks! Those test cases are somewhat over qualified though:
static volatile _Atomic (TYPE) * _Dependent_ptr a; \
Also, if C goes and specifies load dependencies, in any form, is then not the corrolary that they need to specify control dependencies? How else can they exclude the transformation.
And of course, once we're there, can we get explicit support for control dependencies too? :-) :-)
Peter Zijlstra
maintainerQuoted 5 lines · Peter Zijlstra
Quoted 1 line
The prototype for GCC is here: https://github.com/AKG001/gcc/
Thanks! Those test cases are somewhat over qualified though:
static volatile _Atomic (TYPE) * _Dependent_ptr a; \
One question though; since its a qualifier, and we've recently spend a whole lot of effort to strip qualifiers in say READ_ONCE(), how does, and how do we want, this qualifier to behave.
C++ has very convenient means of manipulating qualifiers, so it's not much of a problem there, but for C it is, as we've found, really quite cumbersome. Even with _Generic() we can't manipulate individual qualifiers afaict.
Quoted 10 lines · Peter Zijlstra
Quoted 5 lines · Peter Zijlstra
Quoted 1 line
The prototype for GCC is here: https://github.com/AKG001/gcc/
Thanks! Those test cases are somewhat over qualified though:
static volatile _Atomic (TYPE) * _Dependent_ptr a; \One question though; since its a qualifier, and we've recently spend a whole lot of effort to strip qualifiers in say
READ_ONCE(), how does, and how do we want, this qualifier to behave.
Dereferencing a _Dependent_ptr pointer gives you something that is not _Dependent_ptr, unless the declaration was like this:
_Dependent_ptr _Atomic (TYPE) * _Dependent_ptr a;
And if I recall correctly, the current state is that assigning a _Dependent_ptr variable to a non-_Dependent_ptr variable strips this marking (though the thought was to be able to ask for a warning).
So, yes, it would be nice to be able to explicitly strip the _Dependent_ptr, perhaps the kill_dependency() macro, which is already in the C standard.
Quoted 4 lines
C++ has very convenient means of manipulating qualifiers, so it's not much of a problem there, but for C it is, as we've found, really quite cumbersome. Even with
_Generic()we can't manipulate individual qualifiers afaict.
Fair point, and in C++ this is a templated class, at least in the same sense that std::atomic<> is a templated class.
But in this case, would kill_dependency do what you want?
Thanx, Paul
Quoted 14 lines · Peter Zijlstra
Quoted 13 lines · Paul E. McKenney
Quoted 6 lines · Peter Zijlstra
Quoted 1 line · Paul E. McKenney
But it looks like we are going to have to tell the compiler.
What does the current proposal look like? I can certainly annotate the seqcount latch users, but who knows what other code is out there....
For pointers, yes, within the Linux kernel it is hopeless, thus the thought of a -fall-dependent-ptr or some such that makes the compiler pretend that each and every pointer is marked with the
_Dependent_ptrqualifier.
Quoted 7 lines
Quoted 4 lines
New non-Linux-kernel code might want to use his qualifier explicitly, perhaps something like the following:
_Dependent_ptrstruct foo *p; // Or maybe after the "*"?After, as you've written it, it's a pointer to a '
_Dependentstruct foo'.
Yeah, I have to look that up every time. :-/
Thank you for checking!
Quoted 22 lines
Quoted 22 lines
rcu_read_lock(); p = rcu_dereference(gp); // And so on...If a function is to take a dependent pointer as a function argument, then the corresponding parameter need the
_Dependent_ptrmarking. Ditto for return values.The proposal did not cover integers due to concerns about the number of optimization passes that would need to be reviewed to make that work. Nevertheless, using a marked integer would be safer than using an unmarked one, and if the review can be carried out, why not? Maybe something like this:
_Dependent_ptr int idx; rcu_read_lock(); idx = READ_ONCE(gidx); d = rcuarray[idx]; rcu_read_unlock(); do_something_with(d);
Quoted 4 lines
Quoted 1 line
So use of this qualifier is quite reasonable.
The above usage might warrant a rename of the qualifier though, since clearly there isn't anything ptr around.
Given the large number of additional optimizations that need to be suppressed in the non-pointer case, any discouragement based on the "_ptr" at the end of the name is all to the good.
And if that line of reasoning is unconvincing, please look at the program at the end of this email, which compiles without errors with -Wall and gives the expected output. ;-)
Quoted 5 lines
Quoted 1 line
The prototype for GCC is here: https://github.com/AKG001/gcc/
Thanks! Those test cases are somewhat over qualified though:
static volatile _Atomic (TYPE) * _Dependent_ptr a; \
Especially given that in C, _Atomic operations are implicitly volatile. But this is likely a holdover from Akshat's implementation strategy, which was to pattern _Dependent_ptr after the volatile keyword.
Quoted 3 lines
Also, if C goes and specifies load dependencies, in any form, is then not the corrolary that they need to specify control dependencies? How else can they exclude the transformation.
By requiring that any temporaries generated from variables that are marked _Dependent_ptr also be marked _Dependent_ptr. This is of course one divergence of _Dependent_ptr from the volatile keyword.
Quoted 2 lines
And of course, once we're there, can we get explicit support for control dependencies too? :-) :-)
Keep talking like this and I am going to make sure that you attend a standards committee meeting. If need be, by arranging for you to be physically dragged there. ;-)
More seriously, for control dependencies, the variable that would need to be marked would be the program counter, which might require some additional syntax.
Thanx, Paul
------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int foo(int *p, int i)
{
return i[p];
}int arr[] = { 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, };
int main(int argc, char *argv[])
{
int i = atoi(argv[1]);
printf("%d[arr] = %d\n", i, foo(arr, i));
return 0;
}Quoted 4 lines · Paul E. McKenney
Quoted 3 lines · Peter Zijlstra
Quoted 2 lines · Paul E. McKenney
Quoted 1 line · Peter Zijlstra
On Wed, Jul 01, 2020 at 09:03:38AM -0700, Paul E. McKenney wrote:
[ . . . ]
Quoted 11 lines
Quoted 3 lines
Also, if C goes and specifies load dependencies, in any form, is then not the corrolary that they need to specify control dependencies? How else can they exclude the transformation.
By requiring that any temporaries generated from variables that are marked
_Dependent_ptralso be marked_Dependent_ptr. This is of course one divergence of_Dependent_ptrfrom the volatile keyword.Quoted 2 lines
And of course, once we're there, can we get explicit support for control dependencies too? :-) :-)
Quoted 7 lines
Keep talking like this and I am going to make sure that you attend a standards committee meeting. If need be, by arranging for you to be physically dragged there. ;-)
More seriously, for control dependencies, the variable that would need to be marked would be the program counter, which might require some additional syntax.
And perhaps more constructively, we do need to prioritize address and data dependencies over control dependencies. For one thing, there are a lot more address/data dependencies in existing code than there are control dependencies, and (sadly, perhaps more importantly) there are a lot more people who are convinced that address/data dependencies are important.
For another (admittedly more theoretical) thing, the OOTA scenarios stemming from control dependencies are a lot less annoying than those from address/data dependencies.
And address/data dependencies are as far as I know vulnerable to things like conditional-move instructions that can cause problems for control dependencies.
Nevertheless, yes, control dependencies also need attention.
Thanx, Paul
Peter Zijlstra
maintainerQuoted 5 lines · Paul E. McKenney
And perhaps more constructively, we do need to prioritize address and data dependencies over control dependencies. For one thing, there are a lot more address/data dependencies in existing code than there are control dependencies, and (sadly, perhaps more importantly) there are a lot more people who are convinced that address/data dependencies are important.
If they do not consider their Linux OS running correctly :-)
Quoted 9 lines
For another (admittedly more theoretical) thing, the OOTA scenarios stemming from control dependencies are a lot less annoying than those from address/data dependencies.
And address/data dependencies are as far as I know vulnerable to things like conditional-move instructions that can cause problems for control dependencies.
Nevertheless, yes, control dependencies also need attention.
Today I added one more \o/
Quoted 9 lines · Peter Zijlstra
Quoted 5 lines · Paul E. McKenney
And perhaps more constructively, we do need to prioritize address and data dependencies over control dependencies. For one thing, there are a lot more address/data dependencies in existing code than there are control dependencies, and (sadly, perhaps more importantly) there are a lot more people who are convinced that address/data dependencies are important.
If they do not consider their Linux OS running correctly :-)
Many of them really do not care at all. In fact, some would consider Linux failing to run as an added bonus.
Quoted 11 lines
Quoted 9 lines
For another (admittedly more theoretical) thing, the OOTA scenarios stemming from control dependencies are a lot less annoying than those from address/data dependencies.
And address/data dependencies are as far as I know vulnerable to things like conditional-move instructions that can cause problems for control dependencies.
Nevertheless, yes, control dependencies also need attention.
Today I added one more \o/
Just make sure you continually check to make sure that compilers don't break it, along with the others you have added. ;-)
Thanx, Paul
Peter Zijlstra
maintainerQuoted 7 lines · Paul E. McKenney
Quoted 3 lines · Peter Zijlstra
On Mon, Jul 06, 2020 at 09:26:33AM -0700, Paul E. McKenney wrote:
If they do not consider their Linux OS running correctly :-)
Many of them really do not care at all. In fact, some would consider Linux failing to run as an added bonus.
This I think is why we have compiler people in the thread that care a lot more.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Nevertheless, yes, control dependencies also need attention.
Today I added one more \o/
Just make sure you continually check to make sure that compilers don't break it, along with the others you have added. ;-)
There's:
kernel/locking/mcs_spinlock.h: smp_cond_load_acquire(l, VAL); \ kernel/sched/core.c: smp_cond_load_acquire(&p->on_cpu, !VAL); kernel/smp.c: smp_cond_load_acquire(&csd->node.u_flags, !(VAL & CSD_FLAG_LOCK));
arch/x86/kernel/alternative.c: atomic_cond_read_acquire(&desc.refs, !VAL); kernel/locking/qrwlock.c: atomic_cond_read_acquire(&lock->cnts, !(VAL & _QW_LOCKED)); kernel/locking/qrwlock.c: atomic_cond_read_acquire(&lock->cnts, !(VAL & _QW_LOCKED)); kernel/locking/qrwlock.c: atomic_cond_read_acquire(&lock->cnts, VAL == _QW_WAITING); kernel/locking/qspinlock.c: atomic_cond_read_acquire(&lock->val, !(VAL & _Q_LOCKED_MASK)); kernel/locking/qspinlock.c: val = atomic_cond_read_acquire(&lock->val, !(VAL & _Q_LOCKED_PENDING_MASK));
include/linux/refcount.h: smp_acquire__after_ctrl_dep(); ipc/mqueue.c: smp_acquire__after_ctrl_dep(); ipc/msg.c: smp_acquire__after_ctrl_dep(); ipc/sem.c: smp_acquire__after_ctrl_dep(); kernel/locking/rwsem.c: smp_acquire__after_ctrl_dep(); kernel/sched/core.c: smp_acquire__after_ctrl_dep();
kernel/events/ring_buffer.c:__perf_output_begin()
And I'm fairly sure I'm forgetting some... One could argue there's too many of them to check already.
Both GCC and CLANG had better think about it.
Quoted 11 lines · Peter Zijlstra
Quoted 7 lines · Paul E. McKenney
Quoted 3 lines · Peter Zijlstra
On Mon, Jul 06, 2020 at 09:26:33AM -0700, Paul E. McKenney wrote:
If they do not consider their Linux OS running correctly :-)
Many of them really do not care at all. In fact, some would consider Linux failing to run as an added bonus.
This I think is why we have compiler people in the thread that care a lot more.
Here is hoping! ;-)
Quoted 27 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Nevertheless, yes, control dependencies also need attention.
Today I added one more \o/
Just make sure you continually check to make sure that compilers don't break it, along with the others you have added. ;-)
There's:
kernel/locking/mcs_spinlock.h: smp_cond_load_acquire(l, VAL); \ kernel/sched/core.c: smp_cond_load_acquire(&p->on_cpu, !VAL); kernel/smp.c: smp_cond_load_acquire(&csd->node.u_flags, !(VAL & CSD_FLAG_LOCK));arch/x86/kernel/alternative.c: atomic_cond_read_acquire(&desc.refs, !VAL); kernel/locking/qrwlock.c: atomic_cond_read_acquire(&lock->cnts, !(VAL & _QW_LOCKED)); kernel/locking/qrwlock.c: atomic_cond_read_acquire(&lock->cnts, !(VAL & _QW_LOCKED)); kernel/locking/qrwlock.c: atomic_cond_read_acquire(&lock->cnts, VAL == _QW_WAITING); kernel/locking/qspinlock.c: atomic_cond_read_acquire(&lock->val, !(VAL & _Q_LOCKED_MASK)); kernel/locking/qspinlock.c: val = atomic_cond_read_acquire(&lock->val, !(VAL & _Q_LOCKED_PENDING_MASK));include/linux/refcount.h: smp_acquire__after_ctrl_dep(); ipc/mqueue.c: smp_acquire__after_ctrl_dep(); ipc/msg.c: smp_acquire__after_ctrl_dep(); ipc/sem.c: smp_acquire__after_ctrl_dep(); kernel/locking/rwsem.c: smp_acquire__after_ctrl_dep(); kernel/sched/core.c: smp_acquire__after_ctrl_dep();
Quoted 6 lines
kernel/events/ring_buffer.c:__perf_output_begin()
And I'm fairly sure I'm forgetting some... One could argue there's too many of them to check already.
Both GCC and CLANG had better think about it.
That would be good!
I won't list the number of address/data dependencies given that there are well over a thousand of them.
Thanx, Paul
Quoted 8 lines · Sami Tolvanen' via Clang Built Linux
This patch series adds support for building
x86_64and arm64 kernels with Clang's Link Time Optimization (LTO).In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI kernels since 2018.
Quoted 7 lines
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Note that first objtool patch in the series is already in linux-next, but as it's needed with LTO, I'm including it also here to make testing easier.
I put this series on a testing branch, and 0-day bot started reporting some issues.
(but 0-day bot is quieter than I expected. Perhaps, 0-day bot does not turn on LLVM=1 ?)
I also got an error for
ARCH=arm64 allyesconfig + CONFIG_LTO_CLANG=y
$ make ARCH=arm64 LLVM=1 LLVM_IAS=1 CROSS_COMPILE=~/tools/aarch64-linaro-7.5/bin/aarch64-linux-gnu- -j24
...
GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC init/version.o AR init/built-in.a GEN .tmp_initcalls.lds GEN .tmp_symversions.lds LTO vmlinux.o
MODPOST vmlinux.symvers
MODINFO modules.builtin.modinfo
GEN modules.builtin
LD .tmp_vmlinux.kallsyms1
ld.lld: error: undefined symbol: __compiletime_assert_905
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
irqbypass.cvmlinux.o:(jeq_imm)
make: *** [Makefile:1161: vmlinux] Error 1
Quoted 71 lines
Sami Tolvanen (22):
objtool: usesh_infoto find the base for .rela sections
kbuild: add support for Clang LTO
kbuild: lto: fix module versioning
kbuild: lto: fix recordmcount
kbuild: lto: postpone objtool
kbuild: lto: limit inlining
kbuild: lto: merge module sections
kbuild: lto: remove duplicate dependencies from .mod files
init: lto: ensure initcall ordering
init: lto: fix PREL32 relocations
pci: lto: fix PREL32 relocations
modpost: lto: strip .lto from module namesscripts/mod: disable LTO forempty.cefi/libstub: disable LTO
drivers/misc/lkdtm: disable LTO for rodata.o
arm64: exportCC_USING_PATCHABLE_FUNCTION_ENTRY
arm64: vdso: disable LTO
arm64: allowLTO_CLANGand THINLTO to be selected x86, vdso: disable LTO only for vDSO
x86, ftrace: disable recordmcount forftrace_make_nopx86, relocs: IgnoreL4_PAGE_OFFSETrelocations x86, build: allowLTO_CLANGand THINLTO to be selected.gitignore | 1 + Makefile | 27 ++- arch/Kconfig | 65 +++++++ arch/arm64/Kconfig | 2 + arch/arm64/Makefile | 1 + arch/arm64/kernel/vdso/Makefile | 4 +- arch/x86/Kconfig | 2 + arch/x86/Makefile | 5 + arch/x86/entry/vdso/Makefile | 5 +- arch/x86/kernel/ftrace.c | 1 + arch/x86/tools/relocs.c | 1 + drivers/firmware/efi/libstub/Makefile | 2 + drivers/misc/lkdtm/Makefile | 1 + include/asm-generic/vmlinux.lds.h | 12 +- include/linux/compiler-clang.h | 4 + include/linux/compiler.h | 2 +- include/linux/compiler_types.h | 4 + include/linux/init.h | 78 +++++++- include/linux/pci.h | 15 +- kernel/trace/ftrace.c | 1 + lib/Kconfig.debug | 2 +- scripts/Makefile.build | 55 +++++- scripts/Makefile.lib | 6 +- scripts/Makefile.modfinal | 40 +++- scripts/Makefile.modpost | 26 ++- scripts/generate_initcall_order.pl | 270 ++++++++++++++++++++++++++ scripts/link-vmlinux.sh | 100 +++++++++- scripts/mod/Makefile | 1 + scripts/mod/modpost.c | 16 +- scripts/mod/modpost.h | 9 + scripts/mod/sumversion.c | 6 +- scripts/module-lto.lds | 26 +++ scripts/recordmcount.c | 3 +- tools/objtool/elf.c | 2 +- 34 files changed, 737 insertions(+), 58 deletions(-) create mode 100755 scripts/generate_initcall_order.pl create mode 100644 scripts/module-lto.ldsbase-commit:
26e122e97a3d0390ebec389347f64f3730fdf48f--
2.27.0.212.ge8ba1cc988-goog--
You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200624203200.78870-1-samitolvanen%40google.com.
Sami Tolvanen
maintainerHi Masahiro,
Quoted 14 lines · Masahiro Yamada
Quoted 12 lines · Sami Tolvanen' via Clang Built Linux
This patch series adds support for building
x86_64and arm64 kernels with Clang's Link Time Optimization (LTO).In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI kernels since 2018.
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Quoted 7 lines
Quoted 3 lines
Note that first objtool patch in the series is already in linux-next, but as it's needed with LTO, I'm including it also here to make testing easier.
I put this series on a testing branch, and 0-day bot started reporting some issues.
Yes, I'll fix those issues in v2.
Quoted 2 lines
(but 0-day bot is quieter than I expected. Perhaps, 0-day bot does not turn on LLVM=1 ?)
In order for it to test an LTO build, it would need to enable LTO_CLANG explicitly though, in addition to LLVM=1.
Quoted 19 lines
I also got an error for
ARCH=arm64 allyesconfig +CONFIG_LTO_CLANG=y$ make ARCH=arm64 LLVM=1 LLVM_IAS=1 CROSS_COMPILE=~/tools/aarch64-linaro-7.5/bin/aarch64-linux-gnu- -j24...
GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC init/version.o AR init/built-in.a GEN .tmp_initcalls.lds GEN .tmp_symversions.lds LTO vmlinux.o
Quoted 8 lines
MODPOST vmlinux.symvers
MODINFO modules.builtin.modinfo
GEN modules.builtin
LD .tmp_vmlinux.kallsyms1
ld.lld: error: undefined symbol:__compiletime_assert_905Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
irqbypass.cvmlinux.o:(jeq_imm)make: *** [Makefile:1161: vmlinux] Error 1
I can reproduce this with ToT LLVM and it's BUILD_BUG_ON_MSG(..., "value too large for the field") in drivers/net/ethernet/netronome/nfp/bpf/jit.c. Specifically, the FIELD_FIT / __BF_FIELD_CHECK macro in ur_load_imm_any.
This compiles just fine with an earlier LLVM revision, so it could be a relatively recent regression. I'll take a look. Thanks for catching this!
Sami
Sami Tolvanen
maintainerQuoted 29 lines · Sami Tolvanen
Hi Masahiro,
Quoted 26 lines · Masahiro Yamada
I also got an error for
ARCH=arm64 allyesconfig +CONFIG_LTO_CLANG=y$ make ARCH=arm64 LLVM=1 LLVM_IAS=1 CROSS_COMPILE=~/tools/aarch64-linaro-7.5/bin/aarch64-linux-gnu- -j24...
GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC init/version.o AR init/built-in.a GEN .tmp_initcalls.lds GEN .tmp_symversions.lds LTO vmlinux.oMODPOST vmlinux.symvers
MODINFO modules.builtin.modinfo
GEN modules.builtin
LD .tmp_vmlinux.kallsyms1
ld.lld: error: undefined symbol:__compiletime_assert_905Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
irqbypass.cvmlinux.o:(jeq_imm)
Quoted 8 lines
Quoted 1 line
make: *** [Makefile:1161: vmlinux] Error 1
I can reproduce this with ToT LLVM and it's
BUILD_BUG_ON_MSG(..., "value too large for the field")indrivers/net/ethernet/netronome/nfp/bpf/jit.c. Specifically, theFIELD_FIT/__BF_FIELD_CHECKmacro inur_load_imm_any.This compiles just fine with an earlier LLVM revision, so it could be a relatively recent regression. I'll take a look. Thanks for catching this!
After spending some time debugging this with Nick, it looks like the error is caused by a recent optimization change in LLVM, which together with the inlining of ur_load_imm_any into jeq_imm, changes a runtime check in FIELD_FIT that would always fail, to a compile-time check that breaks the build. In jeq_imm, we have:
/* struct bpf_insn: _s32 imm */
u64 imm = insn->imm; /* sign extend */
...
if (imm >> 32) { /* non-zero only if insn->imm is negative */
/* inlined from ur_load_imm_any */
u32 __imm = imm >> 32; /* therefore, always 0xffffffff */
/*
* __imm has a value known at compile-time, which means
* __builtin_constant_p(__imm) is true and we end up with
* essentially this in __BF_FIELD_CHECK:
*/
if (__builtin_constant_p(__imm) && __imm <= 255)
__compiletime_assert_N();The compile-time check comes from the following BUILD_BUG_ON_MSG:
#define __BF_FIELD_CHECK(_mask, _reg, _val, _pfx) \
...
BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
~((_mask) >> __bf_shf(_mask)) & (_val) : 0, \
_pfx "value too large for the field"); \While we could stop the compiler from performing this optimization by telling it to never inline ur_load_imm_any, we feel like a better fix might be to replace FIELD_FIT(UR_REG_IMM_MAX, imm) with a simple imm <= UR_REG_IMM_MAX check that won't trip a compile-time assertion even when the condition is known to fail.
Jiong, Jakub, do you see any issues here?
Sami
Sami Tolvanen
maintainerQuoted 6 lines · Sami Tolvanen
After spending some time debugging this with Nick, it looks like the error is caused by a recent optimization change in LLVM, which together with the inlining of
ur_load_imm_anyintojeq_imm, changes a runtime check inFIELD_FITthat would always fail, to a compile-time check that breaks the build. Injeq_imm, we have:
Quoted 13 lines
/* struct bpf_insn: _s32 imm */
u64 imm = insn->imm; /* sign extend */
...
if (imm >> 32) { /* non-zero only if insn->imm is negative */
/* inlined from ur_load_imm_any */
u32 __imm = imm >> 32; /* therefore, always 0xffffffff */
/*
* __imm has a value known at compile-time, which means
* __builtin_constant_p(__imm) is true and we end up with
* essentially this in __BF_FIELD_CHECK:
*/
if (__builtin_constant_p(__imm) && __imm <= 255)Should be __imm > 255, of course, which means the compiler will generate a call to __compiletime_assert.
Quoted 1 line
Jiong, Jakub, do you see any issues here?
(Jiong's email bounced, so removing from the recipient list.)
Sami
Quoted 21 lines · On Tue, 7 Jul 2020 09:05:28 -0700 Sami Tolvanen wrote:
Quoted 6 lines · Sami Tolvanen
After spending some time debugging this with Nick, it looks like the error is caused by a recent optimization change in LLVM, which together with the inlining of
ur_load_imm_anyintojeq_imm, changes a runtime check inFIELD_FITthat would always fail, to a compile-time check that breaks the build. Injeq_imm, we have:Quoted 13 lines
/* struct bpf_insn: _s32 imm */ u64 imm = insn->imm; /* sign extend */ ... if (imm >> 32) { /* non-zero only if insn->imm is negative */ /* inlined from ur_load_imm_any */ u32 __imm = imm >> 32; /* therefore, always 0xffffffff */ /* * __imm has a value known at compile-time, which means * __builtin_constant_p(__imm) is true and we end up with * essentially this in __BF_FIELD_CHECK: */ if (__builtin_constant_p(__imm) && __imm <= 255)
Quoted 2 lines
Should be
__imm> 255, of course, which means the compiler will generate a call to__compiletime_assert.
I think FIELD_FIT() should not pass the value into __BF_FIELD_CHECK().
So:
include/linux/bitfield.h +1 -1
@@ -77,7 +77,7 @@*/ #define FIELD_FIT (_mask, _val) \ ({ \ - __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_FIT: "); \ + __BF_FIELD_CHECK(_mask, 0ULL, 0ULL, "FIELD_FIT: "); \ !((((typeof(_mask))_val) << __bf_shf(_mask)) & ~(_mask)); \ })
It's perfectly legal to pass a constant which does not fit, in which case FIELD_FIT() should just return false not break the build.
Right?
Nick Desaulniers
reviewerQuoted 42 lines · Jakub Kicinski
Quoted 15 lines · Sami Tolvanen
Quoted 13 lines
After spending some time debugging this with Nick, it looks like the error is caused by a recent optimization change in LLVM, which together with the inlining of
ur_load_imm_anyintojeq_imm, changes a runtime check inFIELD_FITthat would always fail, to a compile-time check that breaks the build. Injeq_imm, we have:/* struct bpf_insn: _s32 imm */ u64 imm = insn->imm; /* sign extend */ ... if (imm >> 32) { /* non-zero only if insn->imm is negative */ /* inlined from ur_load_imm_any */ u32 __imm = imm >> 32; /* therefore, always 0xffffffff */Quoted 6 lines
Quoted 6 lines
/*
*__immhas a value known at compile-time, which means
*__builtin_constant_p(__imm)is true and we end up with
* essentially this in__BF_FIELD_CHECK:
*/
if (__builtin_constant_p(__imm)&&__imm> 255)I think
FIELD_FIT()should not pass the value into__BF_FIELD_CHECK().So:
include/linux/bitfield.h +1
-1@@ -77,7 +77,7 @@*/ #define FIELD_FIT (_mask, _val) \ ({ \ - __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_FIT: "); \ + __BF_FIELD_CHECK(_mask, 0ULL, 0ULL, "FIELD_FIT: "); \ !((((typeof(_mask))_val) << __bf_shf(_mask)) & ~(_mask)); \ })It's perfectly legal to pass a constant which does not fit, in which case
FIELD_FIT()should just return false not break the build.
Quoted 1 line
Right?
I see the value of the __builtin_constant_p check; this is just a very interesting case where rather than an integer literal appearing in the source, the compiler is able to deduce that the parameter can only have one value in one case, and allows __builtin_constant_p to evaluate to true for it.
I had definitely asked Sami about the comment above FIELD_FIT:
"""
76 * Return: true if @_val can fit inside @_mask, false if @_val is
too big.
"""
in which FIELD_FIT doesn't return false if @_val is too big and a compile time constant. (Rather it breaks the build).
Of the 14 expansion sites of FIELD_FIT I see in mainline, it doesn't look like any integral literals are passed, so maybe the compile time checks of _val are of little value for FIELD_FIT.
So I think your suggested diff is the most concise fix.
Signature · 2 lines
Thanks, ~Nick Desaulniers
Quoted 59 lines · On Tue, 7 Jul 2020 10:17:25 -0700 Nick Desaulniers wrote:
Quoted 42 lines · Jakub Kicinski
Quoted 15 lines · Sami Tolvanen
Quoted 13 lines
After spending some time debugging this with Nick, it looks like the error is caused by a recent optimization change in LLVM, which together with the inlining of
ur_load_imm_anyintojeq_imm, changes a runtime check inFIELD_FITthat would always fail, to a compile-time check that breaks the build. Injeq_imm, we have:/* struct bpf_insn: _s32 imm */ u64 imm = insn->imm; /* sign extend */ ... if (imm >> 32) { /* non-zero only if insn->imm is negative */ /* inlined from ur_load_imm_any */ u32 __imm = imm >> 32; /* therefore, always 0xffffffff */Quoted 6 lines
Quoted 6 lines
/*
*__immhas a value known at compile-time, which means
*__builtin_constant_p(__imm)is true and we end up with
* essentially this in__BF_FIELD_CHECK:
*/
if (__builtin_constant_p(__imm)&&__imm> 255)I think
FIELD_FIT()should not pass the value into__BF_FIELD_CHECK().So:
include/linux/bitfield.h +1
-1@@ -77,7 +77,7 @@*/ #define FIELD_FIT (_mask, _val) \ ({ \ - __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_FIT: "); \ + __BF_FIELD_CHECK(_mask, 0ULL, 0ULL, "FIELD_FIT: "); \ !((((typeof(_mask))_val) << __bf_shf(_mask)) & ~(_mask)); \ })It's perfectly legal to pass a constant which does not fit, in which case
FIELD_FIT()should just return false not break the build.Quoted 1 line
Right?
I see the value of the
__builtin_constant_pcheck; this is just a very interesting case where rather than an integer literal appearing in the source, the compiler is able to deduce that the parameter can only have one value in one case, and allows__builtin_constant_pto evaluate to true for it.I had definitely asked Sami about the comment above
FIELD_FIT:
"""
76 * Return: true if @_val can fit inside @_mask, false if @_val is
too big.
"""
in whichFIELD_FITdoesn't return false if @_val is too big and a compile time constant. (Rather it breaks the build).
Quoted 3 lines
Of the 14 expansion sites of
FIELD_FITI see in mainline, it doesn't look like any integral literals are passed, so maybe the compile time checks of_valare of little value forFIELD_FIT.
Also I just double checked and all FIELD_FIT() uses check the return value.
Quoted 1 line
So I think your suggested diff is the most concise fix.
Feel free to submit that officially as a patch if it fixes the build for you, here's my sign-off:
Dear Sami,
Am 24.06.20 um 22:31 schrieb Sami Tolvanen:
Quoted 7 lines
This patch series adds support for building
x86_64and arm64 kernels with Clang's Link Time Optimization (LTO).In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI kernels since 2018.
Quoted 7 lines
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Note that first objtool patch in the series is already in linux-next, but as it's needed with LTO, I'm including it also here to make testing easier.
[…]
Thank you very much for sending these changes.
Do you have a branch, where your current work can be pulled from? Your branch on GitHub [1] seems 15 months old.
Out of curiosity, I applied the changes, allowed the selection for i386 (x86), and with Clang 1:11~++20200701093119+ffee8040534-1~exp1 from Debian experimental, it failed with Invalid absolute R_386_32 relocation: KERNEL_PAGES:
Quoted 4 lines
make -f
./scripts/Makefile.buildobj=arch/x86/bootarch/x86/boot/bzImage
make -f./scripts/Makefile.buildobj=arch/x86/boot/compressedarch/x86/boot/compressed/vmlinux
llvm-nm vmlinux | sed -n -e 's/^\([0-9a-fA-F]*\) [ABCDGRSTVW] \(_text\|__bss_start\|_end\)$/#defineVO__AC(0x,UL)/p' >arch/x86/boot/compressed/../voffset.h
clang -Wp,-MMD,arch/x86/boot/compressed/.misc.o.d -nostdinc -isystem/usr/lib/llvm-11/lib/clang/11.0.0/include-I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include./include/linux/kconfig.h-include./include/linux/compiler_types.h-D__KERNEL__ -Qunused-arguments -m32 -O2 -fno-strict-aliasing -fPIE -DDISABLE_BRANCH_PROFILING -march=i386 -mno-mmx -mno-sse -ffreestanding -fno-stack-protector -Wno-address-of-packed-member -Wno-gnu -Wno-pointer-sign -fmacro-prefix-map=./= -fno-asynchronous-unwind-tables -DKBUILD_MODFILE='"arch/x86/boot/compressed/misc"' -DKBUILD_BASENAME='"misc"' -DKBUILD_MODNAME='"misc"' -D__KBUILD_MODNAME=misc -c -oarch/x86/boot/compressed/mi
sc.o arch/x86/boot/compressed/misc.c
Quoted 7 lines
llvm-objcopy -R .comment -S vmlinux
arch/x86/boot/compressed/vmlinux.bin
arch/x86/tools/relocsvmlinux > arch/x86/boot/compressed/vmlinux.relocs;arch/x86/tools/relocs --abs-relocs vmlinux
Invalid absoluteR_386_32relocation:KERNEL_PAGES
make[2]: *** [arch/x86/boot/compressed/Makefile:134:arch/x86/boot/compressed/vmlinux.relocs] Error 1 make[2]: *** Deleting file 'arch/x86/boot/compressed/vmlinux.relocs'
make[1]: *** [arch/x86/boot/Makefile:115:arch/x86/boot/compressed/vmlinux] Error 2
make: *** [arch/x86/Makefile:268: bzImage] Error 2
Kind regards,
Paul
Quoted 20 lines · Paul Menzel
Dear Sami,
Am 24.06.20 um 22:31 schrieb Sami Tolvanen:
Quoted 7 lines
This patch series adds support for building
x86_64and arm64 kernels with Clang's Link Time Optimization (LTO).In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI kernels since 2018.
Quoted 7 lines
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Note that first objtool patch in the series is already in linux-next, but as it's needed with LTO, I'm including it also here to make testing easier.
Quoted 7 lines
[…]
Thank you very much for sending these changes.
Do you have a branch, where your current work can be pulled from? Your branch on GitHub [1] seems 15 months old.
Agreed it's easier to git-pull.
I have seen [1] - not sure if this is the latest version. Alternatively, you can check patchwork LKML by searching for $submitter. ( You can open patch 01/22 and download the whole patch-series by following the link "series", see [3]. )
- Sedat -
[1] https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=lto
[2] https://lore.kernel.org/patchwork/project/lkml/list/?series=&submitter=19676
[3] https://lore.kernel.org/patchwork/series/450026/mbox/
Quoted 35 lines · Sedat Dilek
Quoted 20 lines · Paul Menzel
Dear Sami,
Am 24.06.20 um 22:31 schrieb Sami Tolvanen:
Quoted 7 lines
This patch series adds support for building
x86_64and arm64 kernels with Clang's Link Time Optimization (LTO).In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI kernels since 2018.
Quoted 7 lines
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Note that first objtool patch in the series is already in linux-next, but as it's needed with LTO, I'm including it also here to make testing easier.
Quoted 7 lines
[…]
Thank you very much for sending these changes.
Do you have a branch, where your current work can be pulled from? Your branch on GitHub [1] seems 15 months old.
Agreed it's easier to git-pull.
I have seen [1] - not sure if this is the latest version. Alternatively, you can check patchwork LKML by searching for $submitter. ( You can open patch 01/22 and download the whole patch-series by following the link "series", see [3]. )
Quoted 6 lines
- Sedat -
[1] https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=lto
[2] https://lore.kernel.org/patchwork/project/lkml/list/?series=&submitter=19676
[3] https://lore.kernel.org/patchwork/series/450026/mbox/
Sami tagged this series on his GitHub:
https://github.com/samitolvanen/linux/releases/tag/lto-v1
git pull https://github.com/samitolvanen/linux lto-v1
Otherwise, he is updating the clang-cfi branch that includes both the LTO and CFI patchsets. You can pull that and just turn on CONFIG_LTO_CLANG.
Lastly, for the future, I would recommend grabbing b4 to easily apply patches (specifically full series) from lore.kernel.org.
https://git.kernel.org/pub/scm/utils/b4/b4.git/
https://git.kernel.org/pub/scm/utils/b4/b4.git/tree/README.rst
You could grab this series and apply it easily by either downloading the mbox file and following the instructions it gives for applying the mbox file:
$ b4 am [email protected]
or I prefer piping so that I don't have to clean up later:
$ b4 am -o - [email protected] | git am
Cheers,
Nathan
Quoted 64 lines · Nathan Chancellor
Quoted 35 lines · Sedat Dilek
Quoted 20 lines · Paul Menzel
Dear Sami,
Am 24.06.20 um 22:31 schrieb Sami Tolvanen:
Quoted 7 lines
This patch series adds support for building
x86_64and arm64 kernels with Clang's Link Time Optimization (LTO).In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI kernels since 2018.
Quoted 7 lines
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Note that first objtool patch in the series is already in linux-next, but as it's needed with LTO, I'm including it also here to make testing easier.
Quoted 7 lines
[…]
Thank you very much for sending these changes.
Do you have a branch, where your current work can be pulled from? Your branch on GitHub [1] seems 15 months old.
Agreed it's easier to git-pull.
I have seen [1] - not sure if this is the latest version. Alternatively, you can check patchwork LKML by searching for $submitter. ( You can open patch 01/22 and download the whole patch-series by following the link "series", see [3]. )Quoted 6 lines
- Sedat -
[1] https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=lto
[2] https://lore.kernel.org/patchwork/project/lkml/list/?series=&submitter=19676
[3] https://lore.kernel.org/patchwork/series/450026/mbox/Sami tagged this series on his GitHub:
https://github.com/samitolvanen/linux/releases/tag/lto-v1
git pull https://github.com/samitolvanen/linux lto-v1
Otherwise, he is updating the clang-cfi branch that includes both the LTO and CFI patchsets. You can pull that and just turn on
CONFIG_LTO_CLANG.Lastly, for the future, I would recommend grabbing b4 to easily apply patches (specifically full series) from lore.kernel.org.
https://git.kernel.org/pub/scm/utils/b4/b4.git/
https://git.kernel.org/pub/scm/utils/b4/b4.git/tree/README.rstYou could grab this series and apply it easily by either downloading the mbox file and following the instructions it gives for applying the mbox file:
Quoted 6 lines
$ b4 am [email protected]or I prefer piping so that I don't have to clean up later:
$ b4 am -o - [email protected] | git am
It is always a pleasure to read your replies and enrich my know-how beyond Linux-kernel hacking :-).
Thanks for the tip with "b4" tool.
Might add this to our ClangBuiltLinux wiki "Command line tips and tricks"?
- Sedat -
[1] https://github.com/ClangBuiltLinux/linux/wiki/Command-line-tips-and-tricks
Nick Desaulniers
reviewerQuoted 24 lines · Sedat Dilek
Quoted 11 lines · Nathan Chancellor
Lastly, for the future, I would recommend grabbing b4 to easily apply patches (specifically full series) from lore.kernel.org.
https://git.kernel.org/pub/scm/utils/b4/b4.git/
https://git.kernel.org/pub/scm/utils/b4/b4.git/tree/README.rstYou could grab this series and apply it easily by either downloading the mbox file and following the instructions it gives for applying the mbox file:
Quoted 6 lines
$ b4 am [email protected]or I prefer piping so that I don't have to clean up later:
$ b4 am -o - [email protected] | git amIt is always a pleasure to read your replies and enrich my know-how beyond Linux-kernel hacking :-).
Quoted 6 lines
Thanks for the tip with "b4" tool.
Might add this to our ClangBuiltLinux wiki "Command line tips and tricks"?- Sedat -
[1] https://github.com/ClangBuiltLinux/linux/wiki/Command-line-tips-and-tricks
Good idea, done.
Signature · 2 lines
Thanks, ~Nick Desaulniers
Sami Tolvanen
maintainerQuoted 4 lines · Paul Menzel
Thank you very much for sending these changes.
Do you have a branch, where your current work can be pulled from? Your branch on GitHub [1] seems 15 months old.
The clang-lto branch is rebased regularly on top of Linus' tree. GitHub just looks at the commit date of the last commit in the tree, which isn't all that informative.
Quoted 4 lines
Out of curiosity, I applied the changes, allowed the selection for i386 (x86), and with Clang 1:11~++20200701093119+ffee8040534-1~exp1 from Debian experimental, it failed with `Invalid absolute
R_386_32
relocation: KERNEL_PAGES`:
I haven't looked at getting this to work on i386, which is why we only select ARCH_SUPPORTS_LTO for x86_64. I would expect there to be a few issues to address.
Quoted 2 lines
Quoted 2 lines
arch/x86/tools/relocsvmlinux > arch/x86/boot/compressed/vmlinux.relocs;arch/x86/tools/relocs --abs-relocs vmlinux
Invalid absoluteR_386_32relocation:KERNEL_PAGES
KERNEL_PAGES looks like a constant, so it's probably safe to ignore the absolute relocation in tools/relocs.c.
Sami
Dear Sami,
Am 13.07.20 um 01:34 schrieb Sami Tolvanen:
Quoted 9 lines · Paul Menzel
Quoted 4 lines
Thank you very much for sending these changes.
Do you have a branch, where your current work can be pulled from? Your branch on GitHub [1] seems 15 months old.
The clang-lto branch is rebased regularly on top of Linus' tree. GitHub just looks at the commit date of the last commit in the tree, which isn't all that informative.
Thank you for clearing this up, and sorry for not checking myself.
Quoted 9 lines
Quoted 4 lines
Out of curiosity, I applied the changes, allowed the selection for i386 (x86), and with Clang 1:11~++20200701093119+ffee8040534-1~exp1 from Debian experimental, it failed with `Invalid absolute
R_386_32
relocation: KERNEL_PAGES`:I haven't looked at getting this to work on i386, which is why we only select
ARCH_SUPPORTS_LTOforx86_64. I would expect there to be a few issues to address.
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
arch/x86/tools/relocs vmlinux > arch/x86/boot/compressed/vmlinux.relocs;arch/x86/tools/relocs --abs-relocs vmlinuxInvalid absolute
R_386_32relocation:KERNEL_PAGES
KERNEL_PAGESlooks like a constant, so it's probably safe to ignore the absolute relocation intools/relocs.c.
Thank you for pointing me to the right direction. I am happy to report, that with the diff below (no idea to what list to add the string), Linux 5.8-rc5 with the LLVM/Clang/LTO patches on top, builds and boots on the ASRock E350M1.
```
diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
index 8f3bf34840cef..e91af127ed3c0 100644
--- a/arch/x86/tools/relocs.c
+++ b/arch/x86/tools/relocs.c
@@ -79,6 +79,7 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = {
"__end_rodata_hpage_align|"
#endif
"__vvar_page|"
+ "KERNEL_PAGES|"
"_end)$"
};
```Kind regards,
Paul
Quoted 50 lines · Paul Menzel
Dear Sami,
Am 13.07.20 um 01:34 schrieb Sami Tolvanen:
Quoted 9 lines · Paul Menzel
Quoted 4 lines
Thank you very much for sending these changes.
Do you have a branch, where your current work can be pulled from? Your branch on GitHub [1] seems 15 months old.
The clang-lto branch is rebased regularly on top of Linus' tree. GitHub just looks at the commit date of the last commit in the tree, which isn't all that informative.
Thank you for clearing this up, and sorry for not checking myself.
Quoted 9 lines
Quoted 4 lines
Out of curiosity, I applied the changes, allowed the selection for i386 (x86), and with Clang 1:11~++20200701093119+ffee8040534-1~exp1 from Debian experimental, it failed with `Invalid absolute
R_386_32
relocation: KERNEL_PAGES`:I haven't looked at getting this to work on i386, which is why we only select
ARCH_SUPPORTS_LTOforx86_64. I would expect there to be a few issues to address.Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
arch/x86/tools/relocs vmlinux > arch/x86/boot/compressed/vmlinux.relocs;arch/x86/tools/relocs --abs-relocs vmlinuxInvalid absolute
R_386_32relocation:KERNEL_PAGES
KERNEL_PAGESlooks like a constant, so it's probably safe to ignore the absolute relocation intools/relocs.c.Thank you for pointing me to the right direction. I am happy to report, that with the diff below (no idea to what list to add the string), Linux 5.8-rc5 with the LLVM/Clang/LTO patches on top, builds and boots on the ASRock E350M1.
```
arch/x86/tools/relocs.c +1
-0@@ -79,6 +79,7 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = {"__end_rodata_hpage_align|" #endif"__vvar_page|" +"KERNEL_PAGES|" "_end)$" };
Quoted 2 lines
```
What llvm-toolchain and version did you use?
Can you post your linux-config?
Thanks.
- Sedat -
Dear Sedat,
Am 14.07.20 um 14:35 schrieb Sedat Dilek:
Quoted 35 lines · Paul Menzel
Quoted 34 lines
Am 13.07.20 um 01:34 schrieb Sami Tolvanen:
Quoted 9 lines · Paul Menzel
Quoted 4 lines
Thank you very much for sending these changes.
Do you have a branch, where your current work can be pulled from? Your branch on GitHub [1] seems 15 months old.
The clang-lto branch is rebased regularly on top of Linus' tree. GitHub just looks at the commit date of the last commit in the tree, which isn't all that informative.
Thank you for clearing this up, and sorry for not checking myself.
Quoted 9 lines
Quoted 4 lines
Out of curiosity, I applied the changes, allowed the selection for i386 (x86), and with Clang 1:11~++20200701093119+ffee8040534-1~exp1 from Debian experimental, it failed with `Invalid absolute
R_386_32
relocation: KERNEL_PAGES`:I haven't looked at getting this to work on i386, which is why we only select
ARCH_SUPPORTS_LTOforx86_64. I would expect there to be a few issues to address.Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
arch/x86/tools/relocs vmlinux > arch/x86/boot/compressed/vmlinux.relocs;arch/x86/tools/relocs --abs-relocs vmlinuxInvalid absolute
R_386_32relocation:KERNEL_PAGES
KERNEL_PAGESlooks like a constant, so it's probably safe to ignore the absolute relocation intools/relocs.c.Thank you for pointing me to the right direction. I am happy to report, that with the diff below (no idea to what list to add the string), Linux 5.8-rc5 with the LLVM/Clang/LTO patches on top, builds and boots on the ASRock E350M1.
Quoted 16 lines
Quoted 13 lines
```
arch/x86/tools/relocs.c +1
-0@@ -79,6 +79,7 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = {"__end_rodata_hpage_align|" #endif"__vvar_page|" +"KERNEL_PAGES|" "_end)$" };Quoted 1 line
```
What llvm-toolchain and version did you use?
See above. ;-) Clang 1:11~++20200701093119+ffee8040534-1~exp1 from Debian experimental and the build command below.
make bindeb-pkg -j32 ARCH=i386 LLVM=1
Quoted 1 line
Can you post your linux-config?
Sure. Attached.
$ grep _LTO config-5.8.0-rc5-00107-g5b634a79fc2fa
CONFIG_LTO=y
CONFIG_ARCH_SUPPORTS_LTO_CLANG=y
# CONFIG_LTO_NONE is not set
CONFIG_LTO_CLANG=yKind regards,
Paul
#
# Automatically generated file; DO NOT EDIT.
# Linux/i386 5.8.0-rc5 Kernel Configuration
#CONFIG_CC_VERSION_TEXT="Debian clang version 11.0.0-++20200701093119+ffee8040534-1~exp1 " CONFIG_GCC_VERSION=0CONFIG_LD_VERSION=0CONFIG_CC_IS_CLANG=yCONFIG_LD_IS_LLD=yCONFIG_CLANG_VERSION=110000CONFIG_CC_HAS_ASM_GOTO=yCONFIG_CC_HAS_ASM_GOTO_OUTPUT=yCONFIG_TOOLS_SUPPORT_RELR=yCONFIG_CC_HAS_ASM_INLINE=yCONFIG_IRQ_WORK=yCONFIG_BUILDTIME_TABLE_SORT=yCONFIG_THREAD_INFO_IN_TASK=y
#
# General setup
#CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not setCONFIG_LOCALVERSION=""CONFIG_LOCALVERSION_AUTO=yCONFIG_BUILD_SALT=""CONFIG_HAVE_KERNEL_GZIP=yCONFIG_HAVE_KERNEL_BZIP2=yCONFIG_HAVE_KERNEL_LZMA=yCONFIG_HAVE_KERNEL_XZ=yCONFIG_HAVE_KERNEL_LZO=yCONFIG_HAVE_KERNEL_LZ4=y
# CONFIG_KERNEL_GZIP is not set
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not setCONFIG_KERNEL_LZ4=yCONFIG_DEFAULT_INIT=""CONFIG_DEFAULT_HOSTNAME="(none)"CONFIG_SWAP=yCONFIG_SYSVIPC=yCONFIG_SYSVIPC_SYSCTL=yCONFIG_POSIX_MQUEUE=yCONFIG_POSIX_MQUEUE_SYSCTL=y
# CONFIG_WATCH_QUEUE is not setCONFIG_CROSS_MEMORY_ATTACH=y
# CONFIG_USELIB is not setCONFIG_AUDIT=yCONFIG_HAVE_ARCH_AUDITSYSCALL=yCONFIG_AUDITSYSCALL=y
#
# IRQ subsystem
#CONFIG_GENERIC_IRQ_PROBE=yCONFIG_GENERIC_IRQ_SHOW=yCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=yCONFIG_GENERIC_PENDING_IRQ=yCONFIG_GENERIC_IRQ_MIGRATION=yCONFIG_GENERIC_IRQ_INJECTION=yCONFIG_HARDIRQS_SW_RESEND=yCONFIG_IRQ_DOMAIN=yCONFIG_IRQ_DOMAIN_HIERARCHY=yCONFIG_GENERIC_MSI_IRQ=yCONFIG_GENERIC_MSI_IRQ_DOMAIN=yCONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=yCONFIG_GENERIC_IRQ_RESERVATION_MODE=yCONFIG_IRQ_FORCED_THREADING=yCONFIG_SPARSE_IRQ=y
# CONFIG_GENERIC_IRQ_DEBUGFS is not set
# end of IRQ subsystem
CONFIG_CLOCKSOURCE_WATCHDOG=yCONFIG_ARCH_CLOCKSOURCE_INIT=yCONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=yCONFIG_GENERIC_TIME_VSYSCALL=yCONFIG_GENERIC_CLOCKEVENTS=yCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=yCONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=yCONFIG_GENERIC_CMOS_UPDATE=y
#
# Timers subsystem
#CONFIG_TICK_ONESHOT=yCONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not setCONFIG_NO_HZ_IDLE=yCONFIG_NO_HZ=yCONFIG_HIGH_RES_TIMERS=y
# end of Timers subsystem
# CONFIG_PREEMPT_NONE is not setCONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
#
# CPU/Task time and stats accounting
#CONFIG_TICK_CPU_ACCOUNTING=yCONFIG_IRQ_TIME_ACCOUNTING=yCONFIG_HAVE_SCHED_AVG_IRQ=y
# CONFIG_SCHED_THERMAL_PRESSURE is not setCONFIG_BSD_PROCESS_ACCT=yCONFIG_BSD_PROCESS_ACCT_V3=yCONFIG_TASKSTATS=yCONFIG_TASK_DELAY_ACCT=yCONFIG_TASK_XACCT=yCONFIG_TASK_IO_ACCOUNTING=yCONFIG_PSI=y
# CONFIG_PSI_DEFAULT_DISABLED is not set
# end of CPU/Task time and stats accounting
CONFIG_CPU_ISOLATION=y
#
# RCU Subsystem
#CONFIG_TREE_RCU=y
# CONFIG_RCU_EXPERT is not setCONFIG_SRCU=yCONFIG_TREE_SRCU=yCONFIG_TASKS_RCU_GENERIC=yCONFIG_TASKS_RUDE_RCU=yCONFIG_RCU_STALL_COMMON=yCONFIG_RCU_NEED_SEGCBLIST=y
# end of RCU Subsystem
# CONFIG_IKCONFIG is not set
# CONFIG_IKHEADERS is not setCONFIG_LOG_BUF_SHIFT=18CONFIG_LOG_CPU_MAX_BUF_SHIFT=12CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
#
# Scheduler features
#
# CONFIG_UCLAMP_TASK is not set
# end of Scheduler features
CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=yCONFIG_CGROUPS=yCONFIG_PAGE_COUNTER=yCONFIG_MEMCG=yCONFIG_MEMCG_SWAP=yCONFIG_MEMCG_KMEM=yCONFIG_BLK_CGROUP=yCONFIG_CGROUP_WRITEBACK=yCONFIG_CGROUP_SCHED=yCONFIG_FAIR_GROUP_SCHED=y
# CONFIG_CFS_BANDWIDTH is not set
# CONFIG_RT_GROUP_SCHED is not setCONFIG_CGROUP_PIDS=y
# CONFIG_CGROUP_RDMA is not setCONFIG_CGROUP_FREEZER=yCONFIG_CGROUP_HUGETLB=yCONFIG_CPUSETS=yCONFIG_PROC_PID_CPUSET=yCONFIG_CGROUP_DEVICE=y
# CONFIG_CGROUP_CPUACCT is not setCONFIG_CGROUP_PERF=yCONFIG_CGROUP_BPF=y
# CONFIG_CGROUP_DEBUG is not setCONFIG_SOCK_CGROUP_DATA=yCONFIG_NAMESPACES=yCONFIG_UTS_NS=yCONFIG_TIME_NS=yCONFIG_IPC_NS=yCONFIG_USER_NS=yCONFIG_PID_NS=yCONFIG_NET_NS=y
# CONFIG_CHECKPOINT_RESTORE is not set
# CONFIG_SCHED_AUTOGROUP is not set
# CONFIG_SYSFS_DEPRECATED is not setCONFIG_RELAY=yCONFIG_BLK_DEV_INITRD=yCONFIG_INITRAMFS_SOURCE=""CONFIG_RD_GZIP=yCONFIG_RD_BZIP2=yCONFIG_RD_LZMA=yCONFIG_RD_XZ=yCONFIG_RD_LZO=yCONFIG_RD_LZ4=y
# CONFIG_BOOT_CONFIG is not setCONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not setCONFIG_SYSCTL=yCONFIG_HAVE_UID16=yCONFIG_SYSCTL_EXCEPTION_TRACE=yCONFIG_HAVE_PCSPKR_PLATFORM=yCONFIG_BPF=yCONFIG_EXPERT=yCONFIG_UID16=yCONFIG_MULTIUSER=yCONFIG_SGETMASK_SYSCALL=yCONFIG_SYSFS_SYSCALL=yCONFIG_FHANDLE=yCONFIG_POSIX_TIMERS=yCONFIG_PRINTK=yCONFIG_PRINTK_NMI=yCONFIG_BUG=yCONFIG_ELF_CORE=yCONFIG_PCSPKR_PLATFORM=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_FUTEX_PI=yCONFIG_EPOLL=yCONFIG_SIGNALFD=yCONFIG_TIMERFD=yCONFIG_EVENTFD=yCONFIG_SHMEM=yCONFIG_AIO=yCONFIG_IO_URING=yCONFIG_ADVISE_SYSCALLS=yCONFIG_MEMBARRIER=yCONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not setCONFIG_KALLSYMS_BASE_RELATIVE=yCONFIG_BPF_SYSCALL=yCONFIG_USERFAULTFD=yCONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=yCONFIG_RSEQ=y
# CONFIG_DEBUG_RSEQ is not set
# CONFIG_EMBEDDED is not setCONFIG_HAVE_PERF_EVENTS=y
# CONFIG_PC104 is not set
#
# Kernel Performance Events And Counters
#CONFIG_PERF_EVENTS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
# end of Kernel Performance Events And Counters
CONFIG_VM_EVENT_COUNTERS=yCONFIG_SLUB_DEBUG=y
# CONFIG_SLUB_MEMCG_SYSFS_ON is not set
# CONFIG_COMPAT_BRK is not set
# CONFIG_SLAB is not setCONFIG_SLUB=y
# CONFIG_SLOB is not setCONFIG_SLAB_MERGE_DEFAULT=yCONFIG_SLAB_FREELIST_RANDOM=y
# CONFIG_SLAB_FREELIST_HARDENED is not set
# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not setCONFIG_SLUB_CPU_PARTIAL=yCONFIG_PROFILING=yCONFIG_TRACEPOINTS=y
# end of General setup
CONFIG_X86_32=yCONFIG_FORCE_DYNAMIC_FTRACE=yCONFIG_X86=yCONFIG_INSTRUCTION_DECODER=yCONFIG_OUTPUT_FORMAT="elf32-i386"CONFIG_LOCKDEP_SUPPORT=yCONFIG_STACKTRACE_SUPPORT=yCONFIG_MMU=yCONFIG_ARCH_MMAP_RND_BITS_MIN=8CONFIG_ARCH_MMAP_RND_BITS_MAX=16CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16CONFIG_GENERIC_ISA_DMA=yCONFIG_GENERIC_BUG=yCONFIG_ARCH_MAY_HAVE_PC_FDC=yCONFIG_GENERIC_CALIBRATE_DELAY=yCONFIG_ARCH_HAS_CPU_RELAX=yCONFIG_ARCH_HAS_CACHE_LINE_SIZE=yCONFIG_ARCH_HAS_FILTER_PGPROT=yCONFIG_HAVE_SETUP_PER_CPU_AREA=yCONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=yCONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=yCONFIG_ARCH_HIBERNATION_POSSIBLE=yCONFIG_ARCH_SUSPEND_POSSIBLE=yCONFIG_ARCH_WANT_GENERAL_HUGETLB=yCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=yCONFIG_X86_32_SMP=yCONFIG_ARCH_SUPPORTS_UPROBES=yCONFIG_FIX_EARLYCON_MEM=yCONFIG_PGTABLE_LEVELS=2CONFIG_CC_HAS_SANE_STACKPROTECTOR=y
#
# Processor type and features
#CONFIG_ZONE_DMA=yCONFIG_SMP=yCONFIG_X86_FEATURE_NAMES=y
# CONFIG_X86_MPPARSE is not set
# CONFIG_GOLDFISH is not setCONFIG_RETPOLINE=y
# CONFIG_X86_CPU_RESCTRL is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_EXTENDED_PLATFORM is not set
# CONFIG_X86_INTEL_LPSS is not set
# CONFIG_X86_AMD_PLATFORM_DEVICE is not set
# CONFIG_IOSF_MBI is not set
# CONFIG_X86_32_IRIS is not setCONFIG_SCHED_OMIT_FRAME_POINTER=y
# CONFIG_HYPERVISOR_GUEST is not set
# CONFIG_M486SX is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not setCONFIG_MK8=y
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MELAN is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MCORE2 is not set
# CONFIG_MATOM is not set
# CONFIG_X86_GENERIC is not setCONFIG_X86_INTERNODE_CACHE_SHIFT=6CONFIG_X86_L1_CACHE_SHIFT=6CONFIG_X86_INTEL_USERCOPY=yCONFIG_X86_USE_PPRO_CHECKSUM=yCONFIG_X86_TSC=yCONFIG_X86_CMPXCHG64=yCONFIG_X86_CMOV=yCONFIG_X86_MINIMUM_CPU_FAMILY=6CONFIG_X86_DEBUGCTLMSR=yCONFIG_IA32_FEAT_CTL=yCONFIG_X86_VMX_FEATURE_NAMES=yCONFIG_PROCESSOR_SELECT=yCONFIG_CPU_SUP_INTEL=y
# CONFIG_CPU_SUP_CYRIX_32 is not setCONFIG_CPU_SUP_AMD=y
# CONFIG_CPU_SUP_HYGON is not set
# CONFIG_CPU_SUP_CENTAUR is not set
# CONFIG_CPU_SUP_TRANSMETA_32 is not set
# CONFIG_CPU_SUP_UMC_32 is not set
# CONFIG_CPU_SUP_ZHAOXIN is not setCONFIG_HPET_TIMER=yCONFIG_HPET_EMULATE_RTC=yCONFIG_DMI=yCONFIG_NR_CPUS_RANGE_BEGIN=2CONFIG_NR_CPUS_RANGE_END=8CONFIG_NR_CPUS_DEFAULT=8CONFIG_NR_CPUS=4CONFIG_SCHED_SMT=yCONFIG_SCHED_MC=yCONFIG_SCHED_MC_PRIO=yCONFIG_X86_LOCAL_APIC=yCONFIG_X86_IO_APIC=yCONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=yCONFIG_X86_MCE=y
# CONFIG_X86_MCELOG_LEGACY is not set
# CONFIG_X86_MCE_INTEL is not setCONFIG_X86_MCE_AMD=y
# CONFIG_X86_ANCIENT_MCE is not setCONFIG_X86_MCE_THRESHOLD=y
# CONFIG_X86_MCE_INJECT is not set
#
# Performance monitoring
#CONFIG_PERF_EVENTS_INTEL_UNCORE=mCONFIG_PERF_EVENTS_INTEL_RAPL=mCONFIG_PERF_EVENTS_INTEL_CSTATE=mCONFIG_PERF_EVENTS_AMD_POWER=m
# end of Performance monitoring
# CONFIG_X86_LEGACY_VM86 is not set CONFIG_X86_IOPL_IOPERM=y
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_X86_REBOOTFIXUPS is not set
# CONFIG_MICROCODE is not setCONFIG_X86_MSR=yCONFIG_X86_CPUID=y
# CONFIG_NOHIGHMEM is not setCONFIG_HIGHMEM4G=y
# CONFIG_HIGHMEM64G is not set CONFIG_VMSPLIT_3G=y
# CONFIG_VMSPLIT_3G_OPT is not set
# CONFIG_VMSPLIT_2G is not set
# CONFIG_VMSPLIT_2G_OPT is not set
# CONFIG_VMSPLIT_1G is not set CONFIG_PAGE_OFFSET=0xC0000000CONFIG_HIGHMEM=y
# CONFIG_X86_CPA_STATISTICS is not set CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ILLEGAL_POINTER_VALUE=0
# CONFIG_HIGHPTE is not set CONFIG_X86_CHECK_BIOS_CORRUPTION=y
# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set CONFIG_X86_RESERVE_LOW=64CONFIG_MTRR=yCONFIG_MTRR_SANITIZER=y CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0 CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1 CONFIG_X86_PAT=yCONFIG_ARCH_USES_PG_UNCACHED=y CONFIG_ARCH_RANDOM=yCONFIG_X86_SMAP=yCONFIG_X86_UMIP=y CONFIG_X86_INTEL_TSX_MODE_OFF=y
# CONFIG_X86_INTEL_TSX_MODE_ON is not set
# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
# CONFIG_EFI is not setCONFIG_SECCOMP=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not setCONFIG_HZ_1000=yCONFIG_HZ=1000CONFIG_SCHED_HRTICK=yCONFIG_KEXEC=yCONFIG_CRASH_DUMP=y CONFIG_PHYSICAL_START=0x1000000 CONFIG_RELOCATABLE=yCONFIG_RANDOMIZE_BASE=yCONFIG_X86_NEED_RELOCS=y CONFIG_PHYSICAL_ALIGN=0x1000000 CONFIG_HOTPLUG_CPU=y
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
# CONFIG_COMPAT_VDSO is not set
# CONFIG_CMDLINE_BOOL is not set
# CONFIG_MODIFY_LDT_SYSCALL is not set
# end of Processor type and features
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
#
# Power management and ACPI options
#CONFIG_SUSPEND=yCONFIG_SUSPEND_FREEZER=y
# CONFIG_SUSPEND_SKIP_SYNC is not set
# CONFIG_HIBERNATION is not setCONFIG_PM_SLEEP=yCONFIG_PM_SLEEP_SMP=y
# CONFIG_PM_AUTOSLEEP is not set
# CONFIG_PM_WAKELOCKS is not setCONFIG_PM=yCONFIG_PM_DEBUG=yCONFIG_PM_ADVANCED_DEBUG=y
# CONFIG_PM_TEST_SUSPEND is not setCONFIG_PM_SLEEP_DEBUG=y
# CONFIG_DPM_WATCHDOG is not setCONFIG_PM_TRACE=yCONFIG_PM_TRACE_RTC=yCONFIG_PM_CLK=y
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
# CONFIG_ENERGY_MODEL is not setCONFIG_ARCH_SUPPORTS_ACPI=yCONFIG_ACPI=yCONFIG_ACPI_LEGACY_TABLES_LOOKUP=yCONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=yCONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
# CONFIG_ACPI_DEBUGGER is not set
# CONFIG_ACPI_SPCR_TABLE is not setCONFIG_ACPI_SLEEP=y
# CONFIG_ACPI_PROCFS_POWER is not set
# CONFIG_ACPI_REV_OVERRIDE_POSSIBLE is not setCONFIG_ACPI_EC_DEBUGFS=m
# CONFIG_ACPI_AC is not set
# CONFIG_ACPI_BATTERY is not setCONFIG_ACPI_BUTTON=yCONFIG_ACPI_VIDEO=mCONFIG_ACPI_FAN=y
# CONFIG_ACPI_TAD is not set
# CONFIG_ACPI_DOCK is not setCONFIG_ACPI_CPU_FREQ_PSS=yCONFIG_ACPI_PROCESSOR_CSTATE=yCONFIG_ACPI_PROCESSOR_IDLE=yCONFIG_ACPI_PROCESSOR=y
# CONFIG_ACPI_IPMI is not setCONFIG_ACPI_HOTPLUG_CPU=yCONFIG_ACPI_PROCESSOR_AGGREGATOR=mCONFIG_ACPI_THERMAL=yCONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=yCONFIG_ACPI_TABLE_UPGRADE=yCONFIG_ACPI_DEBUG=yCONFIG_ACPI_PCI_SLOT=yCONFIG_ACPI_CONTAINER=yCONFIG_ACPI_HOTPLUG_IOAPIC=y
# CONFIG_ACPI_SBS is not setCONFIG_ACPI_HED=yCONFIG_ACPI_CUSTOM_METHOD=m
# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not setCONFIG_HAVE_ACPI_APEI=yCONFIG_HAVE_ACPI_APEI_NMI=y
# CONFIG_ACPI_APEI is not setCONFIG_DPTF_POWER=mCONFIG_PMIC_OPREGION=yCONFIG_ACPI_CONFIGFS=mCONFIG_X86_PM_TIMER=y
# CONFIG_SFI is not set
# CONFIG_APM is not set
#
# CPU Frequency scaling
#CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_GOV_ATTR_SET=y CONFIG_CPU_FREQ_GOV_COMMON=y CONFIG_CPU_FREQ_STAT=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
#
# CPU frequency scaling drivers
#CONFIG_X86_INTEL_PSTATE=y
# CONFIG_X86_PCC_CPUFREQ is not setCONFIG_X86_ACPI_CPUFREQ=m
# CONFIG_X86_ACPI_CPUFREQ_CPB is not set
# CONFIG_X86_POWERNOW_K6 is not set
# CONFIG_X86_POWERNOW_K7 is not setCONFIG_X86_POWERNOW_K8=mCONFIG_X86_AMD_FREQ_SENSITIVITY=m
# CONFIG_X86_GX_SUSPMOD is not set
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_SPEEDSTEP_ICH is not set
# CONFIG_X86_SPEEDSTEP_SMI is not setCONFIG_X86_P4_CLOCKMOD=m
# CONFIG_X86_CPUFREQ_NFORCE2 is not set
# CONFIG_X86_LONGRUN is not set
# CONFIG_X86_LONGHAUL is not set
# CONFIG_X86_E_POWERSAVER is not set
#
# shared options # CONFIG_X86_SPEEDSTEP_LIB=m # end of CPU Frequency scaling
#
# CPU Idle
#CONFIG_CPU_IDLE=y
# CONFIG_CPU_IDLE_GOV_LADDER is not setCONFIG_CPU_IDLE_GOV_MENU=y
# CONFIG_CPU_IDLE_GOV_TEO is not set
# end of CPU Idle
# CONFIG_INTEL_IDLE is not set
# end of Power management and ACPI options
#
# Bus options (PCI etc.)
#
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not setCONFIG_PCI_GOANY=yCONFIG_PCI_BIOS=yCONFIG_PCI_DIRECT=yCONFIG_PCI_MMCONFIG=y
# CONFIG_PCI_CNB20LE_QUIRK is not set
# CONFIG_ISA_BUS is not setCONFIG_ISA_DMA_API=y
# CONFIG_ISA is not set
# CONFIG_SCx200 is not set
# CONFIG_OLPC is not set
# CONFIG_ALIX is not set
# CONFIG_NET5501 is not set
# CONFIG_GEOS is not setCONFIG_AMD_NB=y
# CONFIG_X86_SYSFB is not set
# end of Bus options (PCI etc.)
#
# Binary Emulations
#CONFIG_COMPAT_32=y
# end of Binary Emulations
CONFIG_HAVE_ATOMIC_IOMAP=y
#
# Firmware Drivers
#
# CONFIG_EDD is not setCONFIG_FIRMWARE_MEMMAP=yCONFIG_DMIID=yCONFIG_DMI_SYSFS=yCONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# CONFIG_ISCSI_IBFT is not set
# CONFIG_FW_CFG_SYSFS is not setCONFIG_GOOGLE_FIRMWARE=y
# CONFIG_GOOGLE_SMI is not setCONFIG_GOOGLE_COREBOOT_TABLE=mCONFIG_GOOGLE_MEMCONSOLE=m
# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not setCONFIG_GOOGLE_MEMCONSOLE_COREBOOT=m
# CONFIG_GOOGLE_VPD is not setCONFIG_EFI_EARLYCON=y
#
# Tegra firmware driver
#
# end of Tegra firmware driver # end of Firmware Drivers
CONFIG_HAVE_KVM=y
# CONFIG_VIRTUALIZATION is not setCONFIG_AS_AVX512=yCONFIG_AS_SHA1_NI=yCONFIG_AS_SHA256_NI=yCONFIG_AS_TPAUSE=y
#
# General architecture-dependent options
#CONFIG_CRASH_CORE=yCONFIG_KEXEC_CORE=yCONFIG_HOTPLUG_SMT=y
# CONFIG_OPROFILE is not setCONFIG_HAVE_OPROFILE=yCONFIG_OPROFILE_NMI_TIMER=yCONFIG_KPROBES=yCONFIG_JUMP_LABEL=y
# CONFIG_STATIC_KEYS_SELFTEST is not setCONFIG_OPTPROBES=yCONFIG_KPROBES_ON_FTRACE=yCONFIG_UPROBES=yCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=yCONFIG_ARCH_USE_BUILTIN_BSWAP=yCONFIG_KRETPROBES=yCONFIG_HAVE_IOREMAP_PROT=yCONFIG_HAVE_KPROBES=yCONFIG_HAVE_KRETPROBES=yCONFIG_HAVE_OPTPROBES=yCONFIG_HAVE_KPROBES_ON_FTRACE=yCONFIG_HAVE_FUNCTION_ERROR_INJECTION=yCONFIG_HAVE_NMI=yCONFIG_HAVE_ARCH_TRACEHOOK=yCONFIG_HAVE_DMA_CONTIGUOUS=yCONFIG_GENERIC_SMP_IDLE_THREAD=yCONFIG_ARCH_HAS_FORTIFY_SOURCE=yCONFIG_ARCH_HAS_SET_MEMORY=yCONFIG_ARCH_HAS_SET_DIRECT_MAP=yCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=yCONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=yCONFIG_ARCH_32BIT_OFF_T=yCONFIG_HAVE_ASM_MODVERSIONS=yCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=yCONFIG_HAVE_RSEQ=yCONFIG_HAVE_FUNCTION_ARG_ACCESS_API=yCONFIG_HAVE_HW_BREAKPOINT=yCONFIG_HAVE_MIXED_BREAKPOINTS_REGS=yCONFIG_HAVE_USER_RETURN_NOTIFIER=yCONFIG_HAVE_PERF_EVENTS_NMI=yCONFIG_HAVE_HARDLOCKUP_DETECTOR_PERF=yCONFIG_HAVE_PERF_REGS=yCONFIG_HAVE_PERF_USER_STACK_DUMP=yCONFIG_HAVE_ARCH_JUMP_LABEL=yCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=yCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=yCONFIG_HAVE_ALIGNED_STRUCT_PAGE=yCONFIG_HAVE_CMPXCHG_LOCAL=yCONFIG_HAVE_CMPXCHG_DOUBLE=yCONFIG_ARCH_WANT_IPC_PARSE_VERSION=yCONFIG_HAVE_ARCH_SECCOMP_FILTER=yCONFIG_SECCOMP_FILTER=yCONFIG_HAVE_ARCH_STACKLEAK=yCONFIG_HAVE_STACKPROTECTOR=yCONFIG_CC_HAS_STACKPROTECTOR_NONE=yCONFIG_STACKPROTECTOR=yCONFIG_STACKPROTECTOR_STRONG=yCONFIG_LTO=yCONFIG_ARCH_SUPPORTS_LTO_CLANG=yCONFIG_ARCH_SUPPORTS_THINLTO=yCONFIG_THINLTO=y
# CONFIG_LTO_NONE is not setCONFIG_LTO_CLANG=yCONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=yCONFIG_HAVE_IRQ_TIME_ACCOUNTING=yCONFIG_HAVE_MOVE_PMD=yCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=yCONFIG_ARCH_WANT_HUGE_PMD_SHARE=yCONFIG_HAVE_MOD_ARCH_SPECIFIC=yCONFIG_MODULES_USE_ELF_REL=yCONFIG_ARCH_HAS_ELF_RANDOMIZE=yCONFIG_HAVE_ARCH_MMAP_RND_BITS=yCONFIG_HAVE_EXIT_THREAD=yCONFIG_ARCH_MMAP_RND_BITS=8CONFIG_HAVE_COPY_THREAD_TLS=yCONFIG_CLONE_BACKWARDS=yCONFIG_OLD_SIGSUSPEND3=yCONFIG_OLD_SIGACTION=yCONFIG_COMPAT_32BIT_TIME=yCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=yCONFIG_STRICT_KERNEL_RWX=yCONFIG_ARCH_HAS_STRICT_MODULE_RWX=yCONFIG_STRICT_MODULE_RWX=yCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=yCONFIG_ARCH_USE_MEMREMAP_PROT=y
# CONFIG_LOCK_EVENT_COUNTS is not setCONFIG_ARCH_HAS_MEM_ENCRYPT=y
#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not setCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
# end of GCOV-based kernel profiling
CONFIG_HAVE_GCC_PLUGINS=y
# end of General architecture-dependent options
CONFIG_RT_MUTEXES=yCONFIG_BASE_SMALL=0CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
# CONFIG_MODULE_SIG is not set
# CONFIG_MODULE_COMPRESS is not set
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set CONFIG_UNUSED_SYMBOLS=y CONFIG_MODULES_TREE_LOOKUP=yCONFIG_BLOCK=yCONFIG_BLK_SCSI_REQUEST=y CONFIG_BLK_CGROUP_RWSTAT=yCONFIG_BLK_DEV_BSG=yCONFIG_BLK_DEV_BSGLIB=y CONFIG_BLK_DEV_INTEGRITY=y CONFIG_BLK_DEV_INTEGRITY_T10=y
# CONFIG_BLK_DEV_ZONED is not set CONFIG_BLK_DEV_THROTTLING=y
# CONFIG_BLK_DEV_THROTTLING_LOW is not set
# CONFIG_BLK_CMDLINE_PARSER is not set
# CONFIG_BLK_WBT is not set
# CONFIG_BLK_CGROUP_IOLATENCY is not set
# CONFIG_BLK_CGROUP_IOCOST is not set CONFIG_BLK_DEBUG_FS=y
# CONFIG_BLK_SED_OPAL is not set
# CONFIG_BLK_INLINE_ENCRYPTION is not set
#
# Partition Types
#CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not setCONFIG_AIX_PARTITION=yCONFIG_OSF_PARTITION=yCONFIG_AMIGA_PARTITION=y
# CONFIG_ATARI_PARTITION is not setCONFIG_MAC_PARTITION=yCONFIG_MSDOS_PARTITION=yCONFIG_BSD_DISKLABEL=yCONFIG_MINIX_SUBPARTITION=yCONFIG_SOLARIS_X86_PARTITION=yCONFIG_UNIXWARE_DISKLABEL=yCONFIG_LDM_PARTITION=y
# CONFIG_LDM_DEBUG is not setCONFIG_SGI_PARTITION=y
# CONFIG_ULTRIX_PARTITION is not setCONFIG_SUN_PARTITION=yCONFIG_KARMA_PARTITION=yCONFIG_EFI_PARTITION=y
# CONFIG_SYSV68_PARTITION is not set
# CONFIG_CMDLINE_PARTITION is not set
# end of Partition Types
CONFIG_BLK_MQ_PCI=yCONFIG_BLK_PM=y
#
# IO Schedulers
#CONFIG_MQ_IOSCHED_DEADLINE=yCONFIG_MQ_IOSCHED_KYBER=y
# CONFIG_IOSCHED_BFQ is not set
# end of IO Schedulers
CONFIG_PADATA=yCONFIG_ASN1=yCONFIG_INLINE_SPIN_UNLOCK_IRQ=yCONFIG_INLINE_READ_UNLOCK=yCONFIG_INLINE_READ_UNLOCK_IRQ=yCONFIG_INLINE_WRITE_UNLOCK=yCONFIG_INLINE_WRITE_UNLOCK_IRQ=yCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=yCONFIG_MUTEX_SPIN_ON_OWNER=yCONFIG_RWSEM_SPIN_ON_OWNER=yCONFIG_LOCK_SPIN_ON_OWNER=yCONFIG_ARCH_USE_QUEUED_SPINLOCKS=yCONFIG_QUEUED_SPINLOCKS=yCONFIG_ARCH_USE_QUEUED_RWLOCKS=yCONFIG_QUEUED_RWLOCKS=yCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=yCONFIG_ARCH_HAS_SYNC_CORE_BEFORE_USERMODE=yCONFIG_ARCH_HAS_SYSCALL_WRAPPER=yCONFIG_FREEZER=y
#
# Executable file formats
#CONFIG_BINFMT_ELF=yCONFIG_ELFCORE=yCONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=yCONFIG_BINFMT_SCRIPT=yCONFIG_BINFMT_MISC=mCONFIG_COREDUMP=y
# end of Executable file formats
#
# Memory Management options
#CONFIG_SELECT_MEMORY_MODEL=y
# CONFIG_FLATMEM_MANUAL is not setCONFIG_SPARSEMEM_MANUAL=yCONFIG_SPARSEMEM=yCONFIG_HAVE_MEMORY_PRESENT=yCONFIG_SPARSEMEM_STATIC=yCONFIG_HAVE_FAST_GUP=yCONFIG_MEMORY_ISOLATION=yCONFIG_SPLIT_PTLOCK_CPUS=4CONFIG_COMPACTION=y
# CONFIG_PAGE_REPORTING is not setCONFIG_MIGRATION=yCONFIG_CONTIG_ALLOC=yCONFIG_BOUNCE=yCONFIG_VIRT_TO_BUS=yCONFIG_MMU_NOTIFIER=yCONFIG_KSM=yCONFIG_DEFAULT_MMAP_MIN_ADDR=65536CONFIG_TRANSPARENT_HUGEPAGE=y
# CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not setCONFIG_TRANSPARENT_HUGEPAGE_MADVISE=yCONFIG_CLEANCACHE=yCONFIG_FRONTSWAP=yCONFIG_CMA=y
# CONFIG_CMA_DEBUG is not set
# CONFIG_CMA_DEBUGFS is not setCONFIG_CMA_AREAS=7
# CONFIG_ZSWAP is not set
# CONFIG_ZPOOL is not set
# CONFIG_ZBUD is not set
# CONFIG_ZSMALLOC is not setCONFIG_GENERIC_EARLY_IOREMAP=y
# CONFIG_IDLE_PAGE_TRACKING is not setCONFIG_FRAME_VECTOR=y
# CONFIG_PERCPU_STATS is not set
# CONFIG_GUP_BENCHMARK is not set
# CONFIG_READ_ONLY_THP_FOR_FS is not setCONFIG_ARCH_HAS_PTE_SPECIAL=y
# end of Memory Management options
CONFIG_NET=yCONFIG_NET_INGRESS=yCONFIG_NET_EGRESS=yCONFIG_SKB_EXTENSIONS=y
#
# Networking options
#CONFIG_PACKET=mCONFIG_PACKET_DIAG=mCONFIG_UNIX=yCONFIG_UNIX_SCM=yCONFIG_UNIX_DIAG=m
# CONFIG_TLS is not setCONFIG_XFRM=yCONFIG_XFRM_ALGO=yCONFIG_XFRM_USER=y
# CONFIG_XFRM_INTERFACE is not set
# CONFIG_XFRM_SUB_POLICY is not setCONFIG_XFRM_MIGRATE=y
# CONFIG_XFRM_STATISTICS is not setCONFIG_XFRM_AH=mCONFIG_XFRM_ESP=mCONFIG_XFRM_IPCOMP=mCONFIG_NET_KEY=mCONFIG_NET_KEY_MIGRATE=y
# CONFIG_XDP_SOCKETS is not setCONFIG_INET=yCONFIG_IP_MULTICAST=yCONFIG_IP_ADVANCED_ROUTER=yCONFIG_IP_FIB_TRIE_STATS=yCONFIG_IP_MULTIPLE_TABLES=yCONFIG_IP_ROUTE_MULTIPATH=yCONFIG_IP_ROUTE_VERBOSE=yCONFIG_IP_ROUTE_CLASSID=y
# CONFIG_IP_PNP is not setCONFIG_NET_IPIP=mCONFIG_NET_IPGRE_DEMUX=mCONFIG_NET_IP_TUNNEL=mCONFIG_NET_IPGRE=mCONFIG_NET_IPGRE_BROADCAST=yCONFIG_IP_MROUTE_COMMON=yCONFIG_IP_MROUTE=yCONFIG_IP_MROUTE_MULTIPLE_TABLES=yCONFIG_IP_PIMSM_V1=yCONFIG_IP_PIMSM_V2=yCONFIG_SYN_COOKIES=yCONFIG_NET_IPVTI=mCONFIG_NET_UDP_TUNNEL=mCONFIG_NET_FOU=m
# CONFIG_NET_FOU_IP_TUNNELS is not setCONFIG_INET_AH=mCONFIG_INET_ESP=m
# CONFIG_INET_ESP_OFFLOAD is not set
# CONFIG_INET_ESPINTCP is not setCONFIG_INET_IPCOMP=mCONFIG_INET_XFRM_TUNNEL=mCONFIG_INET_TUNNEL=mCONFIG_INET_DIAG=mCONFIG_INET_TCP_DIAG=mCONFIG_INET_UDP_DIAG=m
# CONFIG_INET_RAW_DIAG is not setCONFIG_INET_DIAG_DESTROY=y
# CONFIG_TCP_CONG_ADVANCED is not setCONFIG_TCP_CONG_CUBIC=yCONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not setCONFIG_IPV6=mCONFIG_IPV6_ROUTER_PREF=yCONFIG_IPV6_ROUTE_INFO=yCONFIG_IPV6_OPTIMISTIC_DAD=yCONFIG_INET6_AH=mCONFIG_INET6_ESP=m
# CONFIG_INET6_ESP_OFFLOAD is not set
# CONFIG_INET6_ESPINTCP is not setCONFIG_INET6_IPCOMP=mCONFIG_IPV6_MIP6=mCONFIG_IPV6_ILA=mCONFIG_INET6_XFRM_TUNNEL=mCONFIG_INET6_TUNNEL=mCONFIG_IPV6_VTI=mCONFIG_IPV6_SIT=mCONFIG_IPV6_SIT_6RD=yCONFIG_IPV6_NDISC_NODETYPE=yCONFIG_IPV6_TUNNEL=m
# CONFIG_IPV6_GRE is not setCONFIG_IPV6_FOU=mCONFIG_IPV6_MULTIPLE_TABLES=yCONFIG_IPV6_SUBTREES=yCONFIG_IPV6_MROUTE=yCONFIG_IPV6_MROUTE_MULTIPLE_TABLES=yCONFIG_IPV6_PIMSM_V2=y
# CONFIG_IPV6_SEG6_LWTUNNEL is not set
# CONFIG_IPV6_SEG6_HMAC is not set
# CONFIG_IPV6_RPL_LWTUNNEL is not set
# CONFIG_NETLABEL is not set
# CONFIG_MPTCP is not setCONFIG_NETWORK_SECMARK=yCONFIG_NET_PTP_CLASSIFY=yCONFIG_NETWORK_PHY_TIMESTAMPING=yCONFIG_NETFILTER=yCONFIG_NETFILTER_ADVANCED=yCONFIG_BRIDGE_NETFILTER=m
#
# Core Netfilter Configuration
#CONFIG_NETFILTER_INGRESS=yCONFIG_NETFILTER_NETLINK=mCONFIG_NETFILTER_FAMILY_BRIDGE=yCONFIG_NETFILTER_FAMILY_ARP=yCONFIG_NETFILTER_NETLINK_ACCT=mCONFIG_NETFILTER_NETLINK_QUEUE=mCONFIG_NETFILTER_NETLINK_LOG=mCONFIG_NETFILTER_NETLINK_OSF=mCONFIG_NF_CONNTRACK=mCONFIG_NF_LOG_COMMON=m
# CONFIG_NF_LOG_NETDEV is not setCONFIG_NETFILTER_CONNCOUNT=mCONFIG_NF_CONNTRACK_MARK=yCONFIG_NF_CONNTRACK_SECMARK=yCONFIG_NF_CONNTRACK_ZONES=yCONFIG_NF_CONNTRACK_PROCFS=yCONFIG_NF_CONNTRACK_EVENTS=y
# CONFIG_NF_CONNTRACK_TIMEOUT is not setCONFIG_NF_CONNTRACK_TIMESTAMP=yCONFIG_NF_CONNTRACK_LABELS=yCONFIG_NF_CT_PROTO_DCCP=yCONFIG_NF_CT_PROTO_GRE=yCONFIG_NF_CT_PROTO_SCTP=yCONFIG_NF_CT_PROTO_UDPLITE=yCONFIG_NF_CONNTRACK_AMANDA=mCONFIG_NF_CONNTRACK_FTP=mCONFIG_NF_CONNTRACK_H323=mCONFIG_NF_CONNTRACK_IRC=mCONFIG_NF_CONNTRACK_BROADCAST=mCONFIG_NF_CONNTRACK_NETBIOS_NS=mCONFIG_NF_CONNTRACK_SNMP=mCONFIG_NF_CONNTRACK_PPTP=mCONFIG_NF_CONNTRACK_SANE=mCONFIG_NF_CONNTRACK_SIP=mCONFIG_NF_CONNTRACK_TFTP=mCONFIG_NF_CT_NETLINK=m
# CONFIG_NETFILTER_NETLINK_GLUE_CT is not setCONFIG_NF_NAT=mCONFIG_NF_NAT_AMANDA=mCONFIG_NF_NAT_FTP=mCONFIG_NF_NAT_IRC=mCONFIG_NF_NAT_SIP=mCONFIG_NF_NAT_TFTP=mCONFIG_NF_NAT_REDIRECT=yCONFIG_NF_NAT_MASQUERADE=yCONFIG_NETFILTER_SYNPROXY=mCONFIG_NF_TABLES=m
# CONFIG_NF_TABLES_INET is not set
# CONFIG_NF_TABLES_NETDEV is not set
# CONFIG_NFT_NUMGEN is not setCONFIG_NFT_CT=mCONFIG_NFT_COUNTER=m
# CONFIG_NFT_CONNLIMIT is not setCONFIG_NFT_LOG=mCONFIG_NFT_LIMIT=mCONFIG_NFT_MASQ=mCONFIG_NFT_REDIR=m
# CONFIG_NFT_TUNNEL is not set
# CONFIG_NFT_OBJREF is not setCONFIG_NFT_QUEUE=m
# CONFIG_NFT_QUOTA is not setCONFIG_NFT_REJECT=mCONFIG_NFT_COMPAT=mCONFIG_NFT_HASH=m
# CONFIG_NFT_XFRM is not set
# CONFIG_NFT_SOCKET is not set
# CONFIG_NFT_OSF is not set
# CONFIG_NFT_TPROXY is not set
# CONFIG_NFT_SYNPROXY is not set
# CONFIG_NF_FLOW_TABLE is not setCONFIG_NETFILTER_XTABLES=y
#
# Xtables combined modules
#CONFIG_NETFILTER_XT_MARK=mCONFIG_NETFILTER_XT_CONNMARK=mCONFIG_NETFILTER_XT_SET=m
#
# Xtables targets
#CONFIG_NETFILTER_XT_TARGET_AUDIT=m CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_TARGET_CT=m CONFIG_NETFILTER_XT_TARGET_DSCP=m CONFIG_NETFILTER_XT_TARGET_HL=m CONFIG_NETFILTER_XT_TARGET_HMARK=m CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m CONFIG_NETFILTER_XT_TARGET_LED=m CONFIG_NETFILTER_XT_TARGET_LOG=m CONFIG_NETFILTER_XT_TARGET_MARK=m CONFIG_NETFILTER_XT_NAT=m CONFIG_NETFILTER_XT_TARGET_NETMAP=m CONFIG_NETFILTER_XT_TARGET_NFLOG=m CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m CONFIG_NETFILTER_XT_TARGET_RATEEST=m CONFIG_NETFILTER_XT_TARGET_REDIRECT=m
# CONFIG_NETFILTER_XT_TARGET_MASQUERADE is not set CONFIG_NETFILTER_XT_TARGET_TEE=m CONFIG_NETFILTER_XT_TARGET_TPROXY=m CONFIG_NETFILTER_XT_TARGET_TRACE=m CONFIG_NETFILTER_XT_TARGET_SECMARK=m CONFIG_NETFILTER_XT_TARGET_TCPMSS=m CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
#
# Xtables matches
#CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=mCONFIG_NETFILTER_XT_MATCH_BPF=mCONFIG_NETFILTER_XT_MATCH_CGROUP=mCONFIG_NETFILTER_XT_MATCH_CLUSTER=mCONFIG_NETFILTER_XT_MATCH_COMMENT=mCONFIG_NETFILTER_XT_MATCH_CONNBYTES=mCONFIG_NETFILTER_XT_MATCH_CONNLABEL=mCONFIG_NETFILTER_XT_MATCH_CONNLIMIT=mCONFIG_NETFILTER_XT_MATCH_CONNMARK=mCONFIG_NETFILTER_XT_MATCH_CONNTRACK=mCONFIG_NETFILTER_XT_MATCH_CPU=mCONFIG_NETFILTER_XT_MATCH_DCCP=mCONFIG_NETFILTER_XT_MATCH_DEVGROUP=mCONFIG_NETFILTER_XT_MATCH_DSCP=mCONFIG_NETFILTER_XT_MATCH_ECN=mCONFIG_NETFILTER_XT_MATCH_ESP=mCONFIG_NETFILTER_XT_MATCH_HASHLIMIT=mCONFIG_NETFILTER_XT_MATCH_HELPER=mCONFIG_NETFILTER_XT_MATCH_HL=mCONFIG_NETFILTER_XT_MATCH_IPCOMP=mCONFIG_NETFILTER_XT_MATCH_IPRANGE=mCONFIG_NETFILTER_XT_MATCH_IPVS=mCONFIG_NETFILTER_XT_MATCH_L2TP=mCONFIG_NETFILTER_XT_MATCH_LENGTH=mCONFIG_NETFILTER_XT_MATCH_LIMIT=mCONFIG_NETFILTER_XT_MATCH_MAC=mCONFIG_NETFILTER_XT_MATCH_MARK=mCONFIG_NETFILTER_XT_MATCH_MULTIPORT=mCONFIG_NETFILTER_XT_MATCH_NFACCT=mCONFIG_NETFILTER_XT_MATCH_OSF=mCONFIG_NETFILTER_XT_MATCH_OWNER=mCONFIG_NETFILTER_XT_MATCH_POLICY=mCONFIG_NETFILTER_XT_MATCH_PHYSDEV=mCONFIG_NETFILTER_XT_MATCH_PKTTYPE=mCONFIG_NETFILTER_XT_MATCH_QUOTA=mCONFIG_NETFILTER_XT_MATCH_RATEEST=mCONFIG_NETFILTER_XT_MATCH_REALM=mCONFIG_NETFILTER_XT_MATCH_RECENT=mCONFIG_NETFILTER_XT_MATCH_SCTP=m
# CONFIG_NETFILTER_XT_MATCH_SOCKET is not setCONFIG_NETFILTER_XT_MATCH_STATE=mCONFIG_NETFILTER_XT_MATCH_STATISTIC=mCONFIG_NETFILTER_XT_MATCH_STRING=mCONFIG_NETFILTER_XT_MATCH_TCPMSS=mCONFIG_NETFILTER_XT_MATCH_TIME=mCONFIG_NETFILTER_XT_MATCH_U32=m
# end of Core Netfilter Configuration
CONFIG_IP_SET=mCONFIG_IP_SET_MAX=256CONFIG_IP_SET_BITMAP_IP=mCONFIG_IP_SET_BITMAP_IPMAC=mCONFIG_IP_SET_BITMAP_PORT=mCONFIG_IP_SET_HASH_IP=mCONFIG_IP_SET_HASH_IPMARK=mCONFIG_IP_SET_HASH_IPPORT=mCONFIG_IP_SET_HASH_IPPORTIP=mCONFIG_IP_SET_HASH_IPPORTNET=m
# CONFIG_IP_SET_HASH_IPMAC is not setCONFIG_IP_SET_HASH_MAC=mCONFIG_IP_SET_HASH_NETPORTNET=mCONFIG_IP_SET_HASH_NET=mCONFIG_IP_SET_HASH_NETNET=mCONFIG_IP_SET_HASH_NETPORT=mCONFIG_IP_SET_HASH_NETIFACE=mCONFIG_IP_SET_LIST_SET=mCONFIG_IP_VS=mCONFIG_IP_VS_IPV6=y
# CONFIG_IP_VS_DEBUG is not setCONFIG_IP_VS_TAB_BITS=12
#
# IPVS transport protocol load balancing support
#CONFIG_IP_VS_PROTO_TCP=yCONFIG_IP_VS_PROTO_UDP=yCONFIG_IP_VS_PROTO_AH_ESP=yCONFIG_IP_VS_PROTO_ESP=yCONFIG_IP_VS_PROTO_AH=yCONFIG_IP_VS_PROTO_SCTP=y
#
# IPVS scheduler
#CONFIG_IP_VS_RR=mCONFIG_IP_VS_WRR=mCONFIG_IP_VS_LC=mCONFIG_IP_VS_WLC=mCONFIG_IP_VS_FO=mCONFIG_IP_VS_OVF=mCONFIG_IP_VS_LBLC=mCONFIG_IP_VS_LBLCR=mCONFIG_IP_VS_DH=mCONFIG_IP_VS_SH=m
# CONFIG_IP_VS_MH is not setCONFIG_IP_VS_SED=mCONFIG_IP_VS_NQ=m
#
# IPVS SH scheduler
#CONFIG_IP_VS_SH_TAB_BITS=8
#
# IPVS MH scheduler
#CONFIG_IP_VS_MH_TAB_INDEX=12
#
# IPVS application helper
#CONFIG_IP_VS_FTP=mCONFIG_IP_VS_NFCT=yCONFIG_IP_VS_PE_SIP=m
#
# IP: Netfilter Configuration
#CONFIG_NF_DEFRAG_IPV4=m
# CONFIG_NF_SOCKET_IPV4 is not setCONFIG_NF_TPROXY_IPV4=m
# CONFIG_NF_TABLES_IPV4 is not set
# CONFIG_NF_TABLES_ARP is not setCONFIG_NF_DUP_IPV4=mCONFIG_NF_LOG_ARP=mCONFIG_NF_LOG_IPV4=mCONFIG_NF_REJECT_IPV4=yCONFIG_NF_NAT_SNMP_BASIC=mCONFIG_NF_NAT_PPTP=mCONFIG_NF_NAT_H323=mCONFIG_IP_NF_IPTABLES=yCONFIG_IP_NF_MATCH_AH=mCONFIG_IP_NF_MATCH_ECN=mCONFIG_IP_NF_MATCH_RPFILTER=mCONFIG_IP_NF_MATCH_TTL=mCONFIG_IP_NF_FILTER=yCONFIG_IP_NF_TARGET_REJECT=yCONFIG_IP_NF_TARGET_SYNPROXY=m
# CONFIG_IP_NF_NAT is not setCONFIG_IP_NF_MANGLE=m
# CONFIG_IP_NF_TARGET_CLUSTERIP is not setCONFIG_IP_NF_TARGET_ECN=mCONFIG_IP_NF_TARGET_TTL=mCONFIG_IP_NF_RAW=mCONFIG_IP_NF_SECURITY=mCONFIG_IP_NF_ARPTABLES=mCONFIG_IP_NF_ARPFILTER=mCONFIG_IP_NF_ARP_MANGLE=m
# end of IP: Netfilter Configuration
#
# IPv6: Netfilter Configuration
#
# CONFIG_NF_SOCKET_IPV6 is not setCONFIG_NF_TPROXY_IPV6=m
# CONFIG_NF_TABLES_IPV6 is not setCONFIG_NF_DUP_IPV6=mCONFIG_NF_REJECT_IPV6=mCONFIG_NF_LOG_IPV6=mCONFIG_IP6_NF_IPTABLES=mCONFIG_IP6_NF_MATCH_AH=mCONFIG_IP6_NF_MATCH_EUI64=mCONFIG_IP6_NF_MATCH_FRAG=mCONFIG_IP6_NF_MATCH_OPTS=mCONFIG_IP6_NF_MATCH_HL=mCONFIG_IP6_NF_MATCH_IPV6HEADER=mCONFIG_IP6_NF_MATCH_MH=mCONFIG_IP6_NF_MATCH_RPFILTER=mCONFIG_IP6_NF_MATCH_RT=m
# CONFIG_IP6_NF_MATCH_SRH is not setCONFIG_IP6_NF_TARGET_HL=mCONFIG_IP6_NF_FILTER=mCONFIG_IP6_NF_TARGET_REJECT=mCONFIG_IP6_NF_TARGET_SYNPROXY=mCONFIG_IP6_NF_MANGLE=mCONFIG_IP6_NF_RAW=mCONFIG_IP6_NF_SECURITY=m
# CONFIG_IP6_NF_NAT is not set
# end of IPv6: Netfilter Configuration
CONFIG_NF_DEFRAG_IPV6=m
# CONFIG_NF_TABLES_BRIDGE is not set
# CONFIG_NF_CONNTRACK_BRIDGE is not setCONFIG_BRIDGE_NF_EBTABLES=mCONFIG_BRIDGE_EBT_BROUTE=mCONFIG_BRIDGE_EBT_T_FILTER=mCONFIG_BRIDGE_EBT_T_NAT=mCONFIG_BRIDGE_EBT_802_3=mCONFIG_BRIDGE_EBT_AMONG=mCONFIG_BRIDGE_EBT_ARP=mCONFIG_BRIDGE_EBT_IP=mCONFIG_BRIDGE_EBT_IP6=mCONFIG_BRIDGE_EBT_LIMIT=mCONFIG_BRIDGE_EBT_MARK=mCONFIG_BRIDGE_EBT_PKTTYPE=mCONFIG_BRIDGE_EBT_STP=mCONFIG_BRIDGE_EBT_VLAN=mCONFIG_BRIDGE_EBT_ARPREPLY=mCONFIG_BRIDGE_EBT_DNAT=mCONFIG_BRIDGE_EBT_MARK_T=mCONFIG_BRIDGE_EBT_REDIRECT=mCONFIG_BRIDGE_EBT_SNAT=mCONFIG_BRIDGE_EBT_LOG=mCONFIG_BRIDGE_EBT_NFLOG=m
# CONFIG_BPFILTER is not setCONFIG_IP_DCCP=mCONFIG_INET_DCCP_DIAG=m
#
# DCCP CCIDs Configuration
#
# CONFIG_IP_DCCP_CCID2_DEBUG is not setCONFIG_IP_DCCP_CCID3=y
# CONFIG_IP_DCCP_CCID3_DEBUG is not setCONFIG_IP_DCCP_TFRC_LIB=y
# end of DCCP CCIDs Configuration
#
# DCCP Kernel Hacking
#
# CONFIG_IP_DCCP_DEBUG is not set
# end of DCCP Kernel Hacking
CONFIG_IP_SCTP=m
# CONFIG_SCTP_DBG_OBJCNT is not set
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5 is not setCONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1=y
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not setCONFIG_SCTP_COOKIE_HMAC_MD5=yCONFIG_SCTP_COOKIE_HMAC_SHA1=yCONFIG_INET_SCTP_DIAG=mCONFIG_RDS=mCONFIG_RDS_TCP=m
# CONFIG_RDS_DEBUG is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_L2TP is not setCONFIG_STP=mCONFIG_GARP=mCONFIG_MRP=mCONFIG_BRIDGE=mCONFIG_BRIDGE_IGMP_SNOOPING=yCONFIG_BRIDGE_VLAN_FILTERING=y
# CONFIG_BRIDGE_MRP is not setCONFIG_HAVE_NET_DSA=yCONFIG_NET_DSA=m
# CONFIG_NET_DSA_TAG_AR9331 is not setCONFIG_NET_DSA_TAG_BRCM_COMMON=mCONFIG_NET_DSA_TAG_BRCM=mCONFIG_NET_DSA_TAG_BRCM_PREPEND=m
# CONFIG_NET_DSA_TAG_GSWIP is not setCONFIG_NET_DSA_TAG_DSA=mCONFIG_NET_DSA_TAG_EDSA=m
# CONFIG_NET_DSA_TAG_MTK is not set
# CONFIG_NET_DSA_TAG_KSZ is not set
# CONFIG_NET_DSA_TAG_OCELOT is not set
# CONFIG_NET_DSA_TAG_QCA is not set
# CONFIG_NET_DSA_TAG_LAN9303 is not set
# CONFIG_NET_DSA_TAG_SJA1105 is not setCONFIG_NET_DSA_TAG_TRAILER=mCONFIG_VLAN_8021Q=mCONFIG_VLAN_8021Q_GVRP=yCONFIG_VLAN_8021Q_MVRP=y
# CONFIG_DECNET is not setCONFIG_LLC=m
# CONFIG_LLC2 is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_PHONET is not set
# CONFIG_6LOWPAN is not set
# CONFIG_IEEE802154 is not setCONFIG_NET_SCHED=y
#
# Queueing/Scheduling
#CONFIG_NET_SCH_CBQ=mCONFIG_NET_SCH_HTB=mCONFIG_NET_SCH_HFSC=mCONFIG_NET_SCH_PRIO=mCONFIG_NET_SCH_MULTIQ=mCONFIG_NET_SCH_RED=mCONFIG_NET_SCH_SFB=mCONFIG_NET_SCH_SFQ=mCONFIG_NET_SCH_TEQL=mCONFIG_NET_SCH_TBF=m
# CONFIG_NET_SCH_CBS is not set
# CONFIG_NET_SCH_ETF is not set
# CONFIG_NET_SCH_TAPRIO is not setCONFIG_NET_SCH_GRED=mCONFIG_NET_SCH_DSMARK=mCONFIG_NET_SCH_NETEM=mCONFIG_NET_SCH_DRR=mCONFIG_NET_SCH_MQPRIO=m
# CONFIG_NET_SCH_SKBPRIO is not setCONFIG_NET_SCH_CHOKE=mCONFIG_NET_SCH_QFQ=mCONFIG_NET_SCH_CODEL=mCONFIG_NET_SCH_FQ_CODEL=y
# CONFIG_NET_SCH_CAKE is not setCONFIG_NET_SCH_FQ=mCONFIG_NET_SCH_HHF=mCONFIG_NET_SCH_PIE=m
# CONFIG_NET_SCH_FQ_PIE is not setCONFIG_NET_SCH_INGRESS=mCONFIG_NET_SCH_PLUG=m
# CONFIG_NET_SCH_ETS is not set
# CONFIG_NET_SCH_DEFAULT is not set
#
# Classification
#CONFIG_NET_CLS=yCONFIG_NET_CLS_BASIC=mCONFIG_NET_CLS_TCINDEX=mCONFIG_NET_CLS_ROUTE4=mCONFIG_NET_CLS_FW=mCONFIG_NET_CLS_U32=mCONFIG_CLS_U32_PERF=yCONFIG_CLS_U32_MARK=yCONFIG_NET_CLS_RSVP=mCONFIG_NET_CLS_RSVP6=mCONFIG_NET_CLS_FLOW=mCONFIG_NET_CLS_CGROUP=yCONFIG_NET_CLS_BPF=mCONFIG_NET_CLS_FLOWER=mCONFIG_NET_CLS_MATCHALL=mCONFIG_NET_EMATCH=yCONFIG_NET_EMATCH_STACK=32CONFIG_NET_EMATCH_CMP=mCONFIG_NET_EMATCH_NBYTE=mCONFIG_NET_EMATCH_U32=mCONFIG_NET_EMATCH_META=mCONFIG_NET_EMATCH_TEXT=mCONFIG_NET_EMATCH_IPSET=m
# CONFIG_NET_EMATCH_IPT is not setCONFIG_NET_CLS_ACT=yCONFIG_NET_ACT_POLICE=mCONFIG_NET_ACT_GACT=mCONFIG_GACT_PROB=yCONFIG_NET_ACT_MIRRED=m
# CONFIG_NET_ACT_SAMPLE is not setCONFIG_NET_ACT_IPT=mCONFIG_NET_ACT_NAT=mCONFIG_NET_ACT_PEDIT=mCONFIG_NET_ACT_SIMP=mCONFIG_NET_ACT_SKBEDIT=mCONFIG_NET_ACT_CSUM=m
# CONFIG_NET_ACT_MPLS is not setCONFIG_NET_ACT_VLAN=mCONFIG_NET_ACT_BPF=mCONFIG_NET_ACT_CONNMARK=m
# CONFIG_NET_ACT_CTINFO is not set
# CONFIG_NET_ACT_SKBMOD is not setCONFIG_NET_ACT_IFE=m
# CONFIG_NET_ACT_TUNNEL_KEY is not set
# CONFIG_NET_ACT_GATE is not setCONFIG_NET_IFE_SKBMARK=mCONFIG_NET_IFE_SKBPRIO=m
# CONFIG_NET_IFE_SKBTCINDEX is not setCONFIG_NET_TC_SKB_EXT=yCONFIG_NET_SCH_FIFO=y
# CONFIG_DCB is not setCONFIG_DNS_RESOLVER=m
# CONFIG_BATMAN_ADV is not set
# CONFIG_OPENVSWITCH is not setCONFIG_VSOCKETS=m
# CONFIG_VSOCKETS_DIAG is not setCONFIG_VSOCKETS_LOOPBACK=mCONFIG_VIRTIO_VSOCKETS_COMMON=mCONFIG_NETLINK_DIAG=mCONFIG_MPLS=yCONFIG_NET_MPLS_GSO=mCONFIG_MPLS_ROUTING=mCONFIG_MPLS_IPTUNNEL=m
# CONFIG_NET_NSH is not set
# CONFIG_HSR is not setCONFIG_NET_SWITCHDEV=y
# CONFIG_NET_L3_MASTER_DEV is not set
# CONFIG_QRTR is not set
# CONFIG_NET_NCSI is not setCONFIG_RPS=yCONFIG_RFS_ACCEL=yCONFIG_XPS=yCONFIG_CGROUP_NET_PRIO=yCONFIG_CGROUP_NET_CLASSID=yCONFIG_NET_RX_BUSY_POLL=yCONFIG_BQL=y
# CONFIG_BPF_JIT is not set
# CONFIG_BPF_STREAM_PARSER is not setCONFIG_NET_FLOW_LIMIT=y
#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NET_DROP_MONITOR is not set
# end of Network testing # end of Networking options
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_AF_KCM is not setCONFIG_FIB_RULES=y
# CONFIG_WIRELESS is not set
# CONFIG_WIMAX is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
# CONFIG_NFC is not set
# CONFIG_PSAMPLE is not setCONFIG_NET_IFE=mCONFIG_LWTUNNEL=yCONFIG_LWTUNNEL_BPF=yCONFIG_DST_CACHE=yCONFIG_GRO_CELLS=yCONFIG_NET_DEVLINK=y
# CONFIG_FAILOVER is not setCONFIG_ETHTOOL_NETLINK=yCONFIG_HAVE_EBPF_JIT=y
#
# Device Drivers
#CONFIG_HAVE_EISA=y
# CONFIG_EISA is not setCONFIG_HAVE_PCI=yCONFIG_PCI=yCONFIG_PCI_DOMAINS=yCONFIG_PCIEPORTBUS=yCONFIG_PCIEAER=yCONFIG_PCIEAER_INJECT=mCONFIG_PCIE_ECRC=yCONFIG_PCIEASPM=yCONFIG_PCIEASPM_DEFAULT=y
# CONFIG_PCIEASPM_POWERSAVE is not set
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
# CONFIG_PCIEASPM_PERFORMANCE is not setCONFIG_PCIE_PME=yCONFIG_PCIE_DPC=y
# CONFIG_PCIE_PTM is not set
# CONFIG_PCIE_BW is not set
# CONFIG_PCIE_EDR is not setCONFIG_PCI_MSI=yCONFIG_PCI_MSI_IRQ_DOMAIN=yCONFIG_PCI_QUIRKS=y
# CONFIG_PCI_DEBUG is not set
# CONFIG_PCI_REALLOC_ENABLE_AUTO is not setCONFIG_PCI_STUB=y
# CONFIG_PCI_PF_STUB is not setCONFIG_PCI_ATS=yCONFIG_PCI_LOCKLESS_CONFIG=yCONFIG_PCI_IOV=yCONFIG_PCI_PRI=yCONFIG_PCI_PASID=yCONFIG_PCI_LABEL=y
# CONFIG_HOTPLUG_PCI is not set
#
# PCI controller drivers
#
#
# DesignWare PCI Core Support
#
# CONFIG_PCIE_DW_PLAT_HOST is not set
# CONFIG_PCI_MESON is not set
# end of DesignWare PCI Core Support
#
# Mobiveil PCIe Core Support
#
# end of Mobiveil PCIe Core Support
#
# Cadence PCIe controllers support
#
# end of Cadence PCIe controllers support # end of PCI controller drivers
#
# PCI Endpoint
#
# CONFIG_PCI_ENDPOINT is not set
# end of PCI Endpoint
#
# PCI switch controller drivers
#
# CONFIG_PCI_SW_SWITCHTEC is not set
# end of PCI switch controller drivers
# CONFIG_PCCARD is not set
# CONFIG_RAPIDIO is not set
#
# Generic Driver Options
#
# CONFIG_UEVENT_HELPER is not setCONFIG_DEVTMPFS=yCONFIG_DEVTMPFS_MOUNT=yCONFIG_STANDALONE=yCONFIG_PREVENT_FIRMWARE_BUILD=y
#
# Firmware loader
#CONFIG_FW_LOADER=yCONFIG_EXTRA_FIRMWARE="radeon/PALM_me.bin radeon/PALM_pfp.bin radeon/SUMO_rlc.bin radeon/SUMO_uvd.bin radeon/ARUBA_pfp.bin radeon/ARUBA_me.bin radeon/ARUBA_rlc.bin radeon/TAHITI_uvd.bin radeon/TAHITI_vce.bin radeon/TAHITI_rlc.bin" CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
# CONFIG_FW_LOADER_USER_HELPER is not set
# CONFIG_FW_LOADER_COMPRESS is not setCONFIG_FW_CACHE=y
# end of Firmware loader
CONFIG_ALLOW_DEV_COREDUMP=y
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set
# CONFIG_TEST_ASYNC_DRIVER_PROBE is not setCONFIG_GENERIC_CPU_AUTOPROBE=yCONFIG_GENERIC_CPU_VULNERABILITIES=yCONFIG_REGMAP=yCONFIG_REGMAP_I2C=mCONFIG_DMA_SHARED_BUFFER=y
# CONFIG_DMA_FENCE_TRACE is not set
# end of Generic Driver Options
#
# Bus devices
#
# CONFIG_MHI_BUS is not set
# end of Bus devices
CONFIG_CONNECTOR=m
# CONFIG_GNSS is not set
# CONFIG_MTD is not set
# CONFIG_OF is not setCONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
# CONFIG_PARPORT is not setCONFIG_PNP=y
# CONFIG_PNP_DEBUG_MESSAGES is not set
#
# Protocols
#CONFIG_PNPACPI=yCONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_NULL_BLK is not set
# CONFIG_BLK_DEV_FD is not setCONFIG_CDROM=y
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
# CONFIG_BLK_DEV_UMEM is not setCONFIG_BLK_DEV_LOOP=mCONFIG_BLK_DEV_LOOP_MIN_COUNT=0
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_BLK_DEV_DRBD is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_SX8 is not setCONFIG_BLK_DEV_RAM=mCONFIG_BLK_DEV_RAM_COUNT=16CONFIG_BLK_DEV_RAM_SIZE=16384
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set
# CONFIG_BLK_DEV_RBD is not set
# CONFIG_BLK_DEV_RSXX is not set
#
# NVME Support
#
# CONFIG_BLK_DEV_NVME is not set
# CONFIG_NVME_FC is not set
# CONFIG_NVME_TARGET is not set
# end of NVME Support
#
# Misc devices
#
# CONFIG_AD525X_DPOT is not set
# CONFIG_DUMMY_IRQ is not set
# CONFIG_IBM_ASM is not set
# CONFIG_PHANTOM is not setCONFIG_TIFM_CORE=m
# CONFIG_TIFM_7XX1 is not set
# CONFIG_ICS932S401 is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_HP_ILO is not set
# CONFIG_APDS9802ALS is not set
# CONFIG_ISL29003 is not set
# CONFIG_ISL29020 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_SENSORS_BH1770 is not set
# CONFIG_SENSORS_APDS990X is not set
# CONFIG_HMC6352 is not set
# CONFIG_DS1682 is not set
# CONFIG_PCH_PHUB is not set
# CONFIG_SRAM is not set
# CONFIG_PCI_ENDPOINT_TEST is not set
# CONFIG_XILINX_SDFEC is not set
# CONFIG_PVPANIC is not set
# CONFIG_C2PORT is not set
#
# EEPROM support
#CONFIG_EEPROM_AT24=mCONFIG_EEPROM_LEGACY=mCONFIG_EEPROM_MAX6875=mCONFIG_EEPROM_93CX6=m
# CONFIG_EEPROM_IDT_89HPESX is not set
# CONFIG_EEPROM_EE1004 is not set
# end of EEPROM support
CONFIG_CB710_CORE=m
# CONFIG_CB710_DEBUG is not setCONFIG_CB710_DEBUG_ASSUMPTIONS=y
#
# Texas Instruments shared transport line discipline #
# CONFIG_TI_ST is not set
# end of Texas Instruments shared transport line discipline
# CONFIG_SENSORS_LIS3_I2C is not setCONFIG_ALTERA_STAPL=mCONFIG_INTEL_MEI=mCONFIG_INTEL_MEI_ME=mCONFIG_INTEL_MEI_TXE=m
# CONFIG_VMWARE_VMCI is not set
#
# Intel MIC & related support
#
# CONFIG_VOP_BUS is not set
# end of Intel MIC & related support
# CONFIG_ECHO is not set
# CONFIG_MISC_ALCOR_PCI is not set
# CONFIG_MISC_RTSX_PCI is not set
# CONFIG_MISC_RTSX_USB is not set
# CONFIG_HABANA_AI is not set
# end of Misc devices
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
#
# SCSI device support
#CONFIG_SCSI_MOD=yCONFIG_RAID_ATTRS=mCONFIG_SCSI=yCONFIG_SCSI_DMA=yCONFIG_SCSI_NETLINK=yCONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
#CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not setCONFIG_BLK_DEV_SR=yCONFIG_CHR_DEV_SG=y
# CONFIG_CHR_DEV_SCH is not setCONFIG_SCSI_CONSTANTS=yCONFIG_SCSI_LOGGING=yCONFIG_SCSI_SCAN_ASYNC=y
#
# SCSI Transports
#CONFIG_SCSI_SPI_ATTRS=mCONFIG_SCSI_FC_ATTRS=mCONFIG_SCSI_ISCSI_ATTRS=mCONFIG_SCSI_SAS_ATTRS=mCONFIG_SCSI_SAS_LIBSAS=mCONFIG_SCSI_SAS_ATA=yCONFIG_SCSI_SAS_HOST_SMP=yCONFIG_SCSI_SRP_ATTRS=m
# end of SCSI Transports
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not setCONFIG_ISCSI_BOOT_SYSFS=m
# CONFIG_SCSI_CXGB3_ISCSI is not set
# CONFIG_SCSI_CXGB4_ISCSI is not set
# CONFIG_SCSI_BNX2_ISCSI is not set
# CONFIG_BE2ISCSI is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_HPSA is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_3W_SAS is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_MVSAS is not set
# CONFIG_SCSI_MVUMI is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_SCSI_ESAS2R is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not setCONFIG_SCSI_MPT3SAS=mCONFIG_SCSI_MPT2SAS_MAX_SGE=128CONFIG_SCSI_MPT3SAS_MAX_SGE=128
# CONFIG_SCSI_MPT2SAS is not set
# CONFIG_SCSI_SMARTPQI is not set
# CONFIG_SCSI_UFSHCD is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_MYRB is not set
# CONFIG_SCSI_MYRS is not set
# CONFIG_VMWARE_PVSCSI is not set
# CONFIG_LIBFC is not set
# CONFIG_SCSI_SNIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_FDOMAIN_PCI is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_ISCI is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_WD719X is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_PMCRAID is not set
# CONFIG_SCSI_PM8001 is not set
# CONFIG_SCSI_BFA_FC is not set
# CONFIG_SCSI_CHELSIO_FCOE is not setCONFIG_SCSI_DH=yCONFIG_SCSI_DH_RDAC=mCONFIG_SCSI_DH_HP_SW=mCONFIG_SCSI_DH_EMC=mCONFIG_SCSI_DH_ALUA=m
# end of SCSI device support
CONFIG_ATA=yCONFIG_SATA_HOST=yCONFIG_PATA_TIMINGS=yCONFIG_ATA_VERBOSE_ERROR=yCONFIG_ATA_FORCE=yCONFIG_ATA_ACPI=y
# CONFIG_SATA_ZPODD is not setCONFIG_SATA_PMP=y
#
# Controllers with non-SFF native interface
#CONFIG_SATA_AHCI=yCONFIG_SATA_MOBILE_LPM_POLICY=0
# CONFIG_SATA_AHCI_PLATFORM is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_SATA_ACARD_AHCI is not set
# CONFIG_SATA_SIL24 is not setCONFIG_ATA_SFF=y
#
# SFF controllers with custom DMA interface
#
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_SX4 is not setCONFIG_ATA_BMDMA=y
#
# SATA SFF controllers with BMDMA
#
# CONFIG_ATA_PIIX is not set
# CONFIG_SATA_DWC is not set
# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_SVW is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
#
# PATA SFF controllers with BMDMA
#
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_ATP867X is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CS5535 is not set
# CONFIG_PATA_CS5536 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RDC is not set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SCH is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_TOSHIBA is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
#
# PIO-only SFF controllers
#
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_PLATFORM is not set
# CONFIG_PATA_RZ1000 is not set
#
# Generic fallback / legacy drivers
#
# CONFIG_PATA_ACPI is not set
# CONFIG_ATA_GENERIC is not set
# CONFIG_PATA_LEGACY is not setCONFIG_MD=y
# CONFIG_BLK_DEV_MD is not set
# CONFIG_BCACHE is not setCONFIG_BLK_DEV_DM_BUILTIN=yCONFIG_BLK_DEV_DM=y
# CONFIG_DM_DEBUG is not set
# CONFIG_DM_UNSTRIPED is not setCONFIG_DM_CRYPT=y
# CONFIG_DM_SNAPSHOT is not set
# CONFIG_DM_THIN_PROVISIONING is not set
# CONFIG_DM_CACHE is not set
# CONFIG_DM_WRITECACHE is not set
# CONFIG_DM_EBS is not set
# CONFIG_DM_ERA is not set
# CONFIG_DM_CLONE is not set
# CONFIG_DM_MIRROR is not set
# CONFIG_DM_RAID is not set
# CONFIG_DM_ZERO is not set
# CONFIG_DM_MULTIPATH is not set
# CONFIG_DM_DELAY is not set
# CONFIG_DM_DUST is not set
# CONFIG_DM_INIT is not setCONFIG_DM_UEVENT=y
# CONFIG_DM_FLAKEY is not set
# CONFIG_DM_VERITY is not set
# CONFIG_DM_SWITCH is not set
# CONFIG_DM_LOG_WRITES is not set
# CONFIG_DM_INTEGRITY is not set
# CONFIG_TARGET_CORE is not set
# CONFIG_FUSION is not set
#
# IEEE 1394 (FireWire) support
#CONFIG_FIREWIRE=mCONFIG_FIREWIRE_OHCI=mCONFIG_FIREWIRE_SBP2=mCONFIG_FIREWIRE_NET=mCONFIG_FIREWIRE_NOSY=m
# end of IEEE 1394 (FireWire) support
# CONFIG_MACINTOSH_DRIVERS is not setCONFIG_NETDEVICES=yCONFIG_MII=mCONFIG_NET_CORE=y
# CONFIG_BONDING is not set
# CONFIG_DUMMY is not set
# CONFIG_WIREGUARD is not set
# CONFIG_EQUALIZER is not set
# CONFIG_NET_FC is not set
# CONFIG_IFB is not set
# CONFIG_NET_TEAM is not set
# CONFIG_MACVLAN is not set
# CONFIG_IPVLAN is not set
# CONFIG_VXLAN is not set
# CONFIG_GENEVE is not set
# CONFIG_BAREUDP is not set
# CONFIG_GTP is not set
# CONFIG_MACSEC is not setCONFIG_NETCONSOLE=mCONFIG_NETCONSOLE_DYNAMIC=yCONFIG_NETPOLL=yCONFIG_NET_POLL_CONTROLLER=yCONFIG_TUN=m
# CONFIG_TUN_VNET_CROSS_LE is not set
# CONFIG_VETH is not set
# CONFIG_NLMON is not set
# CONFIG_ARCNET is not set
#
# Distributed Switch Architecture drivers
#CONFIG_B53=mCONFIG_B53_MDIO_DRIVER=m CONFIG_B53_MMAP_DRIVER=m CONFIG_B53_SRAB_DRIVER=m
# CONFIG_B53_SERDES is not set
# CONFIG_NET_DSA_BCM_SF2 is not set
# CONFIG_NET_DSA_LOOP is not set
# CONFIG_NET_DSA_LANTIQ_GSWIP is not set
# CONFIG_NET_DSA_MT7530 is not set CONFIG_NET_DSA_MV88E6060=m
# CONFIG_NET_DSA_MICROCHIP_KSZ9477 is not set # CONFIG_NET_DSA_MICROCHIP_KSZ8795 is not set CONFIG_NET_DSA_MV88E6XXX=m CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y
# CONFIG_NET_DSA_AR9331 is not set
# CONFIG_NET_DSA_QCA8K is not set
# CONFIG_NET_DSA_REALTEK_SMI is not set
# CONFIG_NET_DSA_SMSC_LAN9303_I2C is not set # CONFIG_NET_DSA_SMSC_LAN9303_MDIO is not set # CONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM is not set
# end of Distributed Switch Architecture drivers
CONFIG_ETHERNET=yCONFIG_MDIO=mCONFIG_NET_VENDOR_3COM=y
# CONFIG_VORTEX is not set
# CONFIG_TYPHOON is not set
# CONFIG_NET_VENDOR_ADAPTEC is not set
# CONFIG_NET_VENDOR_AGERE is not set
# CONFIG_NET_VENDOR_ALACRITECH is not set
# CONFIG_NET_VENDOR_ALTEON is not set
# CONFIG_ALTERA_TSE is not set
# CONFIG_NET_VENDOR_AMAZON is not set
# CONFIG_NET_VENDOR_AMD is not set
# CONFIG_NET_VENDOR_AQUANTIA is not set
# CONFIG_NET_VENDOR_ARC is not set
# CONFIG_NET_VENDOR_ATHEROS is not set
# CONFIG_NET_VENDOR_AURORA is not set
# CONFIG_NET_VENDOR_BROADCOM is not set
# CONFIG_NET_VENDOR_BROCADE is not setCONFIG_NET_VENDOR_CADENCE=y
# CONFIG_MACB is not set
# CONFIG_NET_VENDOR_CAVIUM is not set
# CONFIG_NET_VENDOR_CHELSIO is not set
# CONFIG_NET_VENDOR_CISCO is not set
# CONFIG_NET_VENDOR_CORTINA is not set
# CONFIG_CX_ECAT is not set
# CONFIG_DNET is not set
# CONFIG_NET_VENDOR_DEC is not set
# CONFIG_NET_VENDOR_DLINK is not set
# CONFIG_NET_VENDOR_EMULEX is not set
# CONFIG_NET_VENDOR_EZCHIP is not setCONFIG_NET_VENDOR_GOOGLE=y
# CONFIG_GVE is not set
# CONFIG_NET_VENDOR_HUAWEI is not set
# CONFIG_NET_VENDOR_I825XX is not setCONFIG_NET_VENDOR_INTEL=y
# CONFIG_E100 is not setCONFIG_E1000=mCONFIG_E1000E=mCONFIG_E1000E_HWTS=yCONFIG_IGB=mCONFIG_IGB_HWMON=yCONFIG_IGBVF=mCONFIG_IXGB=mCONFIG_IXGBE=mCONFIG_IXGBE_HWMON=yCONFIG_IXGBEVF=mCONFIG_I40E=mCONFIG_IAVF=mCONFIG_I40EVF=m
# CONFIG_ICE is not setCONFIG_FM10K=m
# CONFIG_IGC is not set
# CONFIG_JME is not set
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MELLANOX is not set
# CONFIG_NET_VENDOR_MICREL is not setCONFIG_NET_VENDOR_MICROCHIP=y
# CONFIG_LAN743X is not setCONFIG_NET_VENDOR_MICROSEMI=y
# CONFIG_MSCC_OCELOT_SWITCH is not set
# CONFIG_NET_VENDOR_MYRI is not set
# CONFIG_FEALNX is not set
# CONFIG_NET_VENDOR_NATSEMI is not setCONFIG_NET_VENDOR_NETERION=y
# CONFIG_S2IO is not set
# CONFIG_VXGE is not set
# CONFIG_NET_VENDOR_NETRONOME is not setCONFIG_NET_VENDOR_NI=y
# CONFIG_NI_XGE_MANAGEMENT_ENET is not set
# CONFIG_NET_VENDOR_NVIDIA is not set
# CONFIG_NET_VENDOR_OKI is not set
# CONFIG_ETHOC is not setCONFIG_NET_VENDOR_PACKET_ENGINES=y
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not setCONFIG_NET_VENDOR_PENSANDO=y
# CONFIG_NET_VENDOR_QLOGIC is not set
# CONFIG_NET_VENDOR_QUALCOMM is not set
# CONFIG_NET_VENDOR_RDC is not setCONFIG_NET_VENDOR_REALTEK=yCONFIG_8139CP=mCONFIG_8139TOO=m
# CONFIG_8139TOO_PIO is not set
# CONFIG_8139TOO_TUNE_TWISTER is not setCONFIG_8139TOO_8129=y
# CONFIG_8139_OLD_RX_RESET is not setCONFIG_R8169=m
# CONFIG_NET_VENDOR_RENESAS is not set
# CONFIG_NET_VENDOR_ROCKER is not set
# CONFIG_NET_VENDOR_SAMSUNG is not set
# CONFIG_NET_VENDOR_SEEQ is not set
# CONFIG_NET_VENDOR_SOLARFLARE is not set
# CONFIG_NET_VENDOR_SILAN is not set
# CONFIG_NET_VENDOR_SIS is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_SOCIONEXT is not set
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_SUN is not set
# CONFIG_NET_VENDOR_SYNOPSYS is not set
# CONFIG_NET_VENDOR_TEHUTI is not set
# CONFIG_NET_VENDOR_TI is not set
# CONFIG_NET_VENDOR_VIA is not set
# CONFIG_NET_VENDOR_WIZNET is not setCONFIG_NET_VENDOR_XILINX=y
# CONFIG_XILINX_AXI_EMAC is not set
# CONFIG_XILINX_LL_TEMAC is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_NET_SB1000 is not setCONFIG_MDIO_DEVICE=yCONFIG_MDIO_BUS=y
# CONFIG_MDIO_BCM_UNIMAC is not set
# CONFIG_MDIO_BITBANG is not set
# CONFIG_MDIO_MSCC_MIIM is not set
# CONFIG_MDIO_MVUSB is not set
# CONFIG_MDIO_XPCS is not setCONFIG_PHYLINK=mCONFIG_PHYLIB=yCONFIG_SWPHY=y
# CONFIG_LED_TRIGGER_PHY is not set
#
# MII PHY device drivers
#
# CONFIG_SFP is not set
# CONFIG_ADIN_PHY is not set
# CONFIG_AMD_PHY is not set
# CONFIG_AQUANTIA_PHY is not set
# CONFIG_AX88796B_PHY is not setCONFIG_BCM7XXX_PHY=m
# CONFIG_BCM87XX_PHY is not setCONFIG_BCM_NET_PHYLIB=m
# CONFIG_BROADCOM_PHY is not set
# CONFIG_BCM54140_PHY is not set
# CONFIG_BCM84881_PHY is not set
# CONFIG_CICADA_PHY is not set
# CONFIG_CORTINA_PHY is not set
# CONFIG_DAVICOM_PHY is not set
# CONFIG_DP83822_PHY is not set
# CONFIG_DP83TC811_PHY is not set
# CONFIG_DP83848_PHY is not set
# CONFIG_DP83867_PHY is not set
# CONFIG_DP83869_PHY is not setCONFIG_FIXED_PHY=y
# CONFIG_ICPLUS_PHY is not setCONFIG_INTEL_XWAY_PHY=m
# CONFIG_LSI_ET1011C_PHY is not setCONFIG_LXT_PHY=m
# CONFIG_MARVELL_PHY is not set
# CONFIG_MARVELL_10G_PHY is not set
# CONFIG_MICREL_PHY is not setCONFIG_MICROCHIP_PHY=m
# CONFIG_MICROCHIP_T1_PHY is not set
# CONFIG_MICROSEMI_PHY is not set
# CONFIG_NATIONAL_PHY is not set
# CONFIG_NXP_TJA11XX_PHY is not set
# CONFIG_QSEMI_PHY is not setCONFIG_REALTEK_PHY=m
# CONFIG_RENESAS_PHY is not set
# CONFIG_ROCKCHIP_PHY is not set
# CONFIG_SMSC_PHY is not set
# CONFIG_STE10XP is not set
# CONFIG_TERANETICS_PHY is not set
# CONFIG_VITESSE_PHY is not set
# CONFIG_XILINX_GMII2RGMII is not setCONFIG_PPP=m
# CONFIG_PPP_BSDCOMP is not set
# CONFIG_PPP_DEFLATE is not set
# CONFIG_PPP_FILTER is not set
# CONFIG_PPP_MPPE is not set
# CONFIG_PPP_MULTILINK is not set
# CONFIG_PPPOE is not set
# CONFIG_PPTP is not set
# CONFIG_PPP_ASYNC is not set
# CONFIG_PPP_SYNC_TTY is not set
# CONFIG_SLIP is not setCONFIG_SLHC=m
# CONFIG_USB_NET_DRIVERS is not set
# CONFIG_WLAN is not set
#
# Enable WiMAX (Networking options) to see the WiMAX drivers #
# CONFIG_WAN is not set
# CONFIG_VMXNET3 is not set
# CONFIG_FUJITSU_ES is not set
# CONFIG_NETDEVSIM is not set
# CONFIG_NET_FAILOVER is not set
# CONFIG_ISDN is not set
# CONFIG_NVM is not set
#
# Input device support
#CONFIG_INPUT=yCONFIG_INPUT_LEDS=yCONFIG_INPUT_FF_MEMLESS=mCONFIG_INPUT_POLLDEV=mCONFIG_INPUT_SPARSEKMAP=m
# CONFIG_INPUT_MATRIXKMAP is not set
#
# Userland interfaces
#CONFIG_INPUT_MOUSEDEV=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not setCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768CONFIG_INPUT_JOYDEV=mCONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set
#
# Input Device Drivers
#CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_ADP5588 is not set
# CONFIG_KEYBOARD_ADP5589 is not setCONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_QT1050 is not set
# CONFIG_KEYBOARD_QT1070 is not set
# CONFIG_KEYBOARD_QT2160 is not set
# CONFIG_KEYBOARD_DLINK_DIR685 is not set
# CONFIG_KEYBOARD_LKKBD is not setCONFIG_KEYBOARD_GPIO=m
# CONFIG_KEYBOARD_GPIO_POLLED is not set
# CONFIG_KEYBOARD_TCA6416 is not set
# CONFIG_KEYBOARD_TCA8418 is not set
# CONFIG_KEYBOARD_MATRIX is not set
# CONFIG_KEYBOARD_LM8323 is not set
# CONFIG_KEYBOARD_LM8333 is not set
# CONFIG_KEYBOARD_MAX7359 is not set
# CONFIG_KEYBOARD_MCS is not set
# CONFIG_KEYBOARD_MPR121 is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_OPENCORES is not set
# CONFIG_KEYBOARD_SAMSUNG is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set
# CONFIG_KEYBOARD_XTKBD is not setCONFIG_INPUT_MOUSE=yCONFIG_MOUSE_PS2=yCONFIG_MOUSE_PS2_ALPS=yCONFIG_MOUSE_PS2_BYD=yCONFIG_MOUSE_PS2_LOGIPS2PP=yCONFIG_MOUSE_PS2_SYNAPTICS=yCONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=yCONFIG_MOUSE_PS2_CYPRESS=yCONFIG_MOUSE_PS2_LIFEBOOK=yCONFIG_MOUSE_PS2_TRACKPOINT=yCONFIG_MOUSE_PS2_ELANTECH=yCONFIG_MOUSE_PS2_ELANTECH_SMBUS=yCONFIG_MOUSE_PS2_SENTELIC=y
# CONFIG_MOUSE_PS2_TOUCHKIT is not setCONFIG_MOUSE_PS2_FOCALTECH=yCONFIG_MOUSE_PS2_SMBUS=yCONFIG_MOUSE_SERIAL=m
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_BCM5974 is not set
# CONFIG_MOUSE_CYAPA is not setCONFIG_MOUSE_ELAN_I2C=mCONFIG_MOUSE_ELAN_I2C_I2C=yCONFIG_MOUSE_ELAN_I2C_SMBUS=y
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_MOUSE_GPIO is not setCONFIG_MOUSE_SYNAPTICS_I2C=mCONFIG_MOUSE_SYNAPTICS_USB=mCONFIG_INPUT_JOYSTICK=yCONFIG_JOYSTICK_ANALOG=m
# CONFIG_JOYSTICK_A3D is not set
# CONFIG_JOYSTICK_ADI is not set
# CONFIG_JOYSTICK_COBRA is not set
# CONFIG_JOYSTICK_GF2K is not set
# CONFIG_JOYSTICK_GRIP is not set
# CONFIG_JOYSTICK_GRIP_MP is not set
# CONFIG_JOYSTICK_GUILLEMOT is not set
# CONFIG_JOYSTICK_INTERACT is not set
# CONFIG_JOYSTICK_SIDEWINDER is not set
# CONFIG_JOYSTICK_TMDC is not set
# CONFIG_JOYSTICK_IFORCE is not set
# CONFIG_JOYSTICK_WARRIOR is not set
# CONFIG_JOYSTICK_MAGELLAN is not set
# CONFIG_JOYSTICK_SPACEORB is not set
# CONFIG_JOYSTICK_SPACEBALL is not set
# CONFIG_JOYSTICK_STINGER is not set
# CONFIG_JOYSTICK_TWIDJOY is not set
# CONFIG_JOYSTICK_ZHENHUA is not set
# CONFIG_JOYSTICK_AS5011 is not set
# CONFIG_JOYSTICK_JOYDUMP is not setCONFIG_JOYSTICK_XPAD=mCONFIG_JOYSTICK_XPAD_FF=yCONFIG_JOYSTICK_XPAD_LEDS=y
# CONFIG_JOYSTICK_PXRC is not set
# CONFIG_JOYSTICK_FSIA6B is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not setCONFIG_INPUT_MISC=y
# CONFIG_INPUT_AD714X is not set
# CONFIG_INPUT_BMA150 is not set
# CONFIG_INPUT_E3X0_BUTTON is not set
# CONFIG_INPUT_PCSPKR is not set
# CONFIG_INPUT_MMA8450 is not set
# CONFIG_INPUT_APANEL is not set
# CONFIG_INPUT_GPIO_BEEPER is not set
# CONFIG_INPUT_GPIO_DECODER is not set
# CONFIG_INPUT_GPIO_VIBRA is not set
# CONFIG_INPUT_WISTRON_BTNS is not set
# CONFIG_INPUT_ATLAS_BTNS is not set
# CONFIG_INPUT_ATI_REMOTE2 is not set
# CONFIG_INPUT_KEYSPAN_REMOTE is not set
# CONFIG_INPUT_KXTJ9 is not set
# CONFIG_INPUT_POWERMATE is not set
# CONFIG_INPUT_YEALINK is not set
# CONFIG_INPUT_CM109 is not set
# CONFIG_INPUT_UINPUT is not set
# CONFIG_INPUT_PCF8574 is not set
# CONFIG_INPUT_PWM_BEEPER is not set
# CONFIG_INPUT_PWM_VIBRA is not set
# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
# CONFIG_INPUT_ADXL34X is not set
# CONFIG_INPUT_IMS_PCU is not set
# CONFIG_INPUT_IQS269A is not set
# CONFIG_INPUT_CMA3000 is not set
# CONFIG_INPUT_IDEAPAD_SLIDEBAR is not set
# CONFIG_INPUT_SOC_BUTTON_ARRAY is not set
# CONFIG_INPUT_DRV260X_HAPTICS is not set
# CONFIG_INPUT_DRV2665_HAPTICS is not set
# CONFIG_INPUT_DRV2667_HAPTICS is not setCONFIG_RMI4_CORE=m
# CONFIG_RMI4_I2C is not set
# CONFIG_RMI4_SMB is not setCONFIG_RMI4_F03=yCONFIG_RMI4_F03_SERIO=mCONFIG_RMI4_2D_SENSOR=yCONFIG_RMI4_F11=yCONFIG_RMI4_F12=yCONFIG_RMI4_F30=y
# CONFIG_RMI4_F34 is not set
# CONFIG_RMI4_F54 is not set
# CONFIG_RMI4_F55 is not set
#
# Hardware I/O ports
#CONFIG_SERIO=yCONFIG_ARCH_MIGHT_HAVE_PC_SERIO=yCONFIG_SERIO_I8042=yCONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PCIPS2 is not setCONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_SERIO_ALTERA_PS2 is not set
# CONFIG_SERIO_PS2MULT is not set
# CONFIG_SERIO_ARC_PS2 is not set
# CONFIG_SERIO_GPIO_PS2 is not set
# CONFIG_USERIO is not setCONFIG_GAMEPORT=m
# CONFIG_GAMEPORT_NS558 is not set
# CONFIG_GAMEPORT_L4 is not set
# CONFIG_GAMEPORT_EMU10K1 is not set
# CONFIG_GAMEPORT_FM801 is not set
# end of Hardware I/O ports # end of Input device support
#
# Character devices
#CONFIG_TTY=yCONFIG_VT=yCONFIG_CONSOLE_TRANSLATIONS=yCONFIG_VT_CONSOLE=yCONFIG_VT_CONSOLE_SLEEP=yCONFIG_HW_CONSOLE=yCONFIG_VT_HW_CONSOLE_BINDING=yCONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not setCONFIG_LDISC_AUTOLOAD=y
#
# Serial drivers
#CONFIG_SERIAL_EARLYCON=y CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set CONFIG_SERIAL_8250_PNP=y
# CONFIG_SERIAL_8250_16550A_VARIANTS is not set # CONFIG_SERIAL_8250_FINTEK is not set CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DMA=y CONFIG_SERIAL_8250_PCI=y
# CONFIG_SERIAL_8250_EXAR is not set CONFIG_SERIAL_8250_NR_UARTS=32 CONFIG_SERIAL_8250_RUNTIME_UARTS=32 CONFIG_SERIAL_8250_EXTENDED=y CONFIG_SERIAL_8250_MANY_PORTS=y CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SERIAL_8250_DETECT_IRQ is not set CONFIG_SERIAL_8250_RSA=y CONFIG_SERIAL_8250_DWLIB=y CONFIG_SERIAL_8250_DW=y CONFIG_SERIAL_8250_RT288X=y CONFIG_SERIAL_8250_LPSS=y CONFIG_SERIAL_8250_MID=y
#
# Non-8250 serial port support
#
# CONFIG_SERIAL_UARTLITE is not setCONFIG_SERIAL_CORE=yCONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set
# CONFIG_SERIAL_LANTIQ is not set
# CONFIG_SERIAL_SCCNXP is not set
# CONFIG_SERIAL_SC16IS7XX is not set
# CONFIG_SERIAL_TIMBERDALE is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
# CONFIG_SERIAL_PCH_UART is not set
# CONFIG_SERIAL_ARC is not set
# CONFIG_SERIAL_RP2 is not set
# CONFIG_SERIAL_FSL_LPUART is not set
# CONFIG_SERIAL_FSL_LINFLEXUART is not set
# CONFIG_SERIAL_SPRD is not set
# end of Serial drivers
CONFIG_SERIAL_MCTRL_GPIO=y
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_N_GSM is not set
# CONFIG_NOZOMI is not set
# CONFIG_NULL_TTY is not set
# CONFIG_TRACE_SINK is not set
# CONFIG_SERIAL_DEV_BUS is not set
# CONFIG_TTY_PRINTK is not setCONFIG_IPMI_HANDLER=mCONFIG_IPMI_DMI_DECODE=yCONFIG_IPMI_PLAT_DATA=y
# CONFIG_IPMI_PANIC_EVENT is not setCONFIG_IPMI_DEVICE_INTERFACE=mCONFIG_IPMI_SI=mCONFIG_IPMI_SSIF=mCONFIG_IPMI_WATCHDOG=mCONFIG_IPMI_POWEROFF=m
# CONFIG_IPMB_DEVICE_INTERFACE is not setCONFIG_HW_RANDOM=y
# CONFIG_HW_RANDOM_TIMERIOMEM is not setCONFIG_HW_RANDOM_INTEL=yCONFIG_HW_RANDOM_AMD=yCONFIG_HW_RANDOM_GEODE=y
# CONFIG_HW_RANDOM_VIA is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set
# CONFIG_MWAVE is not set
# CONFIG_PC8736x_GPIO is not set
# CONFIG_NSC_GPIO is not setCONFIG_DEVMEM=y
# CONFIG_DEVKMEM is not setCONFIG_NVRAM=yCONFIG_RAW_DRIVER=yCONFIG_MAX_RAW_DEVS=8192CONFIG_DEVPORT=yCONFIG_HPET=y
# CONFIG_HPET_MMAP is not setCONFIG_HANGCHECK_TIMER=mCONFIG_TCG_TPM=mCONFIG_HW_RANDOM_TPM=yCONFIG_TCG_TIS_CORE=mCONFIG_TCG_TIS=m
# CONFIG_TCG_TIS_I2C_ATMEL is not set
# CONFIG_TCG_TIS_I2C_INFINEON is not set
# CONFIG_TCG_TIS_I2C_NUVOTON is not setCONFIG_TCG_NSC=mCONFIG_TCG_ATMEL=mCONFIG_TCG_INFINEON=mCONFIG_TCG_CRB=m
# CONFIG_TCG_VTPM_PROXY is not set
# CONFIG_TCG_TIS_ST33ZP24_I2C is not set
# CONFIG_TELCLOCK is not set
# CONFIG_XILLYBUS is not set
# end of Character devices
CONFIG_RANDOM_TRUST_CPU=y
# CONFIG_RANDOM_TRUST_BOOTLOADER is not set
#
# I2C support
#CONFIG_I2C=yCONFIG_ACPI_I2C_OPREGION=yCONFIG_I2C_BOARDINFO=yCONFIG_I2C_COMPAT=yCONFIG_I2C_CHARDEV=mCONFIG_I2C_MUX=m
#
# Multiplexer I2C Chip support
#
# CONFIG_I2C_MUX_GPIO is not set
# CONFIG_I2C_MUX_LTC4306 is not set
# CONFIG_I2C_MUX_PCA9541 is not set
# CONFIG_I2C_MUX_PCA954x is not set
# CONFIG_I2C_MUX_REG is not set
# CONFIG_I2C_MUX_MLXCPLD is not set
# end of Multiplexer I2C Chip support
CONFIG_I2C_HELPER_AUTO=yCONFIG_I2C_SMBUS=mCONFIG_I2C_ALGOBIT=m
#
# I2C Hardware Bus support
#
#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_AMD_MP2 is not setCONFIG_I2C_I801=m
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_ISMT is not setCONFIG_I2C_PIIX4=m
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_NVIDIA_GPU is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
#
# ACPI drivers
#
# CONFIG_I2C_SCMI is not set
#
# I2C system bus drivers (mostly embedded / system-on-chip) #
# CONFIG_I2C_CBUS_GPIO is not set
# CONFIG_I2C_DESIGNWARE_PLATFORM is not set
# CONFIG_I2C_DESIGNWARE_PCI is not set
# CONFIG_I2C_EG20T is not set
# CONFIG_I2C_EMEV2 is not set
# CONFIG_I2C_GPIO is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_SIMTEC is not set
# CONFIG_I2C_XILINX is not set
#
# External I2C/SMBus adapter drivers
#
# CONFIG_I2C_DIOLAN_U2C is not set
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set
# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_TINY_USB is not set
#
# Other I2C/SMBus bus drivers
#
# CONFIG_SCx200_ACB is not set
# end of I2C Hardware Bus support
CONFIG_I2C_STUB=mCONFIG_I2C_SLAVE=yCONFIG_I2C_SLAVE_EEPROM=m
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# end of I2C support
# CONFIG_I3C is not set
# CONFIG_SPI is not set
# CONFIG_SPMI is not set
# CONFIG_HSI is not set
# CONFIG_PPS is not set
#
# PTP clock support
#
# CONFIG_PTP_1588_CLOCK is not set
# CONFIG_PTP_1588_CLOCK_PCH is not set
# end of PTP clock support
CONFIG_PINCTRL=yCONFIG_PINMUX=yCONFIG_PINCONF=yCONFIG_GENERIC_PINCONF=y
# CONFIG_DEBUG_PINCTRL is not setCONFIG_PINCTRL_AMD=m
# CONFIG_PINCTRL_MCP23S08 is not set
# CONFIG_PINCTRL_SX150X is not set
# CONFIG_PINCTRL_BAYTRAIL is not set
# CONFIG_PINCTRL_CHERRYVIEW is not set
# CONFIG_PINCTRL_LYNXPOINT is not set
# CONFIG_PINCTRL_BROXTON is not set
# CONFIG_PINCTRL_CANNONLAKE is not set
# CONFIG_PINCTRL_CEDARFORK is not set
# CONFIG_PINCTRL_DENVERTON is not set
# CONFIG_PINCTRL_GEMINILAKE is not set
# CONFIG_PINCTRL_ICELAKE is not set
# CONFIG_PINCTRL_JASPERLAKE is not set
# CONFIG_PINCTRL_LEWISBURG is not set
# CONFIG_PINCTRL_SUNRISEPOINT is not set
# CONFIG_PINCTRL_TIGERLAKE is not setCONFIG_GPIOLIB=yCONFIG_GPIOLIB_FASTPATH_LIMIT=512CONFIG_GPIO_ACPI=yCONFIG_GPIOLIB_IRQCHIP=y
# CONFIG_DEBUG_GPIO is not setCONFIG_GPIO_SYSFS=y
#
# Memory mapped GPIO drivers
#
# CONFIG_GPIO_AMDPT is not set
# CONFIG_GPIO_DWAPB is not set
# CONFIG_GPIO_GENERIC_PLATFORM is not setCONFIG_GPIO_ICH=m
# CONFIG_GPIO_MB86S7X is not set
# CONFIG_GPIO_VX855 is not set
# CONFIG_GPIO_XILINX is not set
# CONFIG_GPIO_AMD_FCH is not set
# end of Memory mapped GPIO drivers
#
# Port-mapped I/O GPIO drivers
#
# CONFIG_GPIO_F7188X is not set
# CONFIG_GPIO_IT87 is not set
# CONFIG_GPIO_SCH is not set
# CONFIG_GPIO_SCH311X is not set
# CONFIG_GPIO_WINBOND is not set
# CONFIG_GPIO_WS16C48 is not set
# end of Port-mapped I/O GPIO drivers
#
# I2C GPIO expanders
#
# CONFIG_GPIO_ADP5588 is not set
# CONFIG_GPIO_MAX7300 is not set
# CONFIG_GPIO_MAX732X is not set
# CONFIG_GPIO_PCA953X is not set
# CONFIG_GPIO_PCF857X is not set
# CONFIG_GPIO_TPIC2810 is not set
# end of I2C GPIO expanders
#
# MFD GPIO expanders
#
# end of MFD GPIO expanders
#
# PCI GPIO expanders
#
# CONFIG_GPIO_AMD8111 is not set
# CONFIG_GPIO_BT8XX is not set
# CONFIG_GPIO_ML_IOH is not set
# CONFIG_GPIO_PCH is not set
# CONFIG_GPIO_PCI_IDIO_16 is not set
# CONFIG_GPIO_PCIE_IDIO_24 is not set
# CONFIG_GPIO_RDC321X is not set
# end of PCI GPIO expanders
#
# USB GPIO expanders
#
# end of USB GPIO expanders
# CONFIG_GPIO_AGGREGATOR is not set
# CONFIG_GPIO_MOCKUP is not set
# CONFIG_W1 is not set
# CONFIG_POWER_AVS is not setCONFIG_POWER_RESET=y
# CONFIG_POWER_RESET_RESTART is not setCONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not setCONFIG_POWER_SUPPLY_HWMON=y
# CONFIG_PDA_POWER is not set
# CONFIG_TEST_POWER is not set
# CONFIG_CHARGER_ADP5061 is not set
# CONFIG_BATTERY_CW2015 is not set
# CONFIG_BATTERY_DS2780 is not set
# CONFIG_BATTERY_DS2781 is not set
# CONFIG_BATTERY_DS2782 is not set
# CONFIG_BATTERY_SBS is not set
# CONFIG_CHARGER_SBS is not set
# CONFIG_MANAGER_SBS is not set
# CONFIG_BATTERY_BQ27XXX is not set
# CONFIG_BATTERY_MAX17040 is not set
# CONFIG_BATTERY_MAX17042 is not set
# CONFIG_CHARGER_ISP1704 is not set
# CONFIG_CHARGER_MAX8903 is not set
# CONFIG_CHARGER_LP8727 is not set
# CONFIG_CHARGER_GPIO is not set
# CONFIG_CHARGER_LT3651 is not set
# CONFIG_CHARGER_BQ2415X is not set
# CONFIG_CHARGER_BQ24190 is not set
# CONFIG_CHARGER_BQ24257 is not set
# CONFIG_CHARGER_BQ24735 is not set
# CONFIG_CHARGER_BQ25890 is not set
# CONFIG_CHARGER_SMB347 is not set
# CONFIG_BATTERY_GAUGE_LTC2941 is not set
# CONFIG_CHARGER_RT9455 is not set
# CONFIG_CHARGER_BD99954 is not setCONFIG_HWMON=yCONFIG_HWMON_VID=m
# CONFIG_HWMON_DEBUG_CHIP is not set
#
# Native drivers
#
# CONFIG_SENSORS_ABITUGURU is not set
# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_AD7414 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM1177 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADT7410 is not set
# CONFIG_SENSORS_ADT7411 is not set
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7475 is not set
# CONFIG_SENSORS_AS370 is not set
# CONFIG_SENSORS_ASC7621 is not set
# CONFIG_SENSORS_AXI_FAN_CONTROL is not set
# CONFIG_SENSORS_K8TEMP is not setCONFIG_SENSORS_K10TEMP=mCONFIG_SENSORS_FAM15H_POWER=mCONFIG_SENSORS_AMD_ENERGY=m
# CONFIG_SENSORS_APPLESMC is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ASPEED is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_DRIVETEMP is not set
# CONFIG_SENSORS_DS620 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_DELL_SMM is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_FSCHMD is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_G760A is not set
# CONFIG_SENSORS_G762 is not set
# CONFIG_SENSORS_HIH6130 is not set
# CONFIG_SENSORS_IBMAEM is not set
# CONFIG_SENSORS_IBMPEX is not set
# CONFIG_SENSORS_I5500 is not set
# CONFIG_SENSORS_CORETEMP is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_JC42 is not set
# CONFIG_SENSORS_POWR1220 is not set
# CONFIG_SENSORS_LINEAGE is not set
# CONFIG_SENSORS_LTC2945 is not set
# CONFIG_SENSORS_LTC2947_I2C is not set
# CONFIG_SENSORS_LTC2990 is not set
# CONFIG_SENSORS_LTC4151 is not set
# CONFIG_SENSORS_LTC4215 is not set
# CONFIG_SENSORS_LTC4222 is not set
# CONFIG_SENSORS_LTC4245 is not set
# CONFIG_SENSORS_LTC4260 is not set
# CONFIG_SENSORS_LTC4261 is not set
# CONFIG_SENSORS_MAX16065 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX1668 is not set
# CONFIG_SENSORS_MAX197 is not set
# CONFIG_SENSORS_MAX31730 is not set
# CONFIG_SENSORS_MAX6621 is not set
# CONFIG_SENSORS_MAX6639 is not set
# CONFIG_SENSORS_MAX6642 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_MAX6697 is not set
# CONFIG_SENSORS_MAX31790 is not set
# CONFIG_SENSORS_MCP3021 is not set
# CONFIG_SENSORS_TC654 is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM73 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_LM95234 is not set
# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_LM95245 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_NTC_THERMISTOR is not set
# CONFIG_SENSORS_NCT6683 is not setCONFIG_SENSORS_NCT6775=m
# CONFIG_SENSORS_NCT7802 is not set
# CONFIG_SENSORS_NPCM7XX is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_PMBUS is not set
# CONFIG_SENSORS_SHT15 is not set
# CONFIG_SENSORS_SHT21 is not set
# CONFIG_SENSORS_SHT3x is not set
# CONFIG_SENSORS_SHTC1 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_EMC1403 is not set
# CONFIG_SENSORS_EMC2103 is not set
# CONFIG_SENSORS_EMC6W201 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_STTS751 is not set
# CONFIG_SENSORS_SMM665 is not set
# CONFIG_SENSORS_ADC128D818 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_AMC6821 is not set
# CONFIG_SENSORS_INA209 is not set
# CONFIG_SENSORS_INA2XX is not set
# CONFIG_SENSORS_INA3221 is not set
# CONFIG_SENSORS_TC74 is not set
# CONFIG_SENSORS_THMC50 is not set
# CONFIG_SENSORS_TMP102 is not set
# CONFIG_SENSORS_TMP103 is not set
# CONFIG_SENSORS_TMP108 is not set
# CONFIG_SENSORS_TMP401 is not set
# CONFIG_SENSORS_TMP421 is not set
# CONFIG_SENSORS_TMP513 is not set
# CONFIG_SENSORS_VIA_CPUTEMP is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83773G is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83795 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83L786NG is not set
# CONFIG_SENSORS_W83627HF is not setCONFIG_SENSORS_W83627EHF=m
#
# ACPI drivers
#
# CONFIG_SENSORS_ACPI_POWER is not set
# CONFIG_SENSORS_ATK0110 is not set CONFIG_THERMAL=y
# CONFIG_THERMAL_STATISTICS is not set CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 CONFIG_THERMAL_HWMON=y CONFIG_THERMAL_WRITABLE_TRIPS=y CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set # CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set CONFIG_THERMAL_GOV_FAIR_SHARE=y CONFIG_THERMAL_GOV_STEP_WISE=y CONFIG_THERMAL_GOV_BANG_BANG=y CONFIG_THERMAL_GOV_USER_SPACE=y
# CONFIG_CLOCK_THERMAL is not set
# CONFIG_DEVFREQ_THERMAL is not set
# CONFIG_THERMAL_EMULATION is not set
#
# Intel thermal drivers
#
# CONFIG_INTEL_POWERCLAMP is not set
# CONFIG_INTEL_SOC_DTS_THERMAL is not set
#
# ACPI INT340X thermal drivers
#
# CONFIG_INT340X_THERMAL is not set
# end of ACPI INT340X thermal drivers
# CONFIG_INTEL_PCH_THERMAL is not set
# end of Intel thermal drivers
# CONFIG_WATCHDOG is not setCONFIG_SSB_POSSIBLE=y
# CONFIG_SSB is not setCONFIG_BCMA_POSSIBLE=y
# CONFIG_BCMA is not set
#
# Multifunction device drivers
#CONFIG_MFD_CORE=m
# CONFIG_MFD_CS5535 is not set
# CONFIG_MFD_AS3711 is not set
# CONFIG_PMIC_ADP5520 is not set
# CONFIG_MFD_AAT2870_CORE is not set
# CONFIG_MFD_BCM590XX is not set
# CONFIG_MFD_BD9571MWV is not set
# CONFIG_MFD_AXP20X_I2C is not set
# CONFIG_MFD_MADERA is not set
# CONFIG_PMIC_DA903X is not set
# CONFIG_MFD_DA9052_I2C is not set
# CONFIG_MFD_DA9055 is not set
# CONFIG_MFD_DA9062 is not set
# CONFIG_MFD_DA9063 is not set
# CONFIG_MFD_DA9150 is not set
# CONFIG_MFD_DLN2 is not set
# CONFIG_MFD_MC13XXX_I2C is not set
# CONFIG_MFD_MP2629 is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_HTC_I2CPLD is not set
# CONFIG_MFD_INTEL_QUARK_I2C_GPIO is not setCONFIG_LPC_ICH=mCONFIG_LPC_SCH=m
# CONFIG_INTEL_SOC_PMIC_CHTDC_TI is not set
# CONFIG_MFD_INTEL_LPSS_ACPI is not set
# CONFIG_MFD_INTEL_LPSS_PCI is not set
# CONFIG_MFD_IQS62X is not set
# CONFIG_MFD_JANZ_CMODIO is not set
# CONFIG_MFD_KEMPLD is not set
# CONFIG_MFD_88PM800 is not set
# CONFIG_MFD_88PM805 is not set
# CONFIG_MFD_88PM860X is not set
# CONFIG_MFD_MAX14577 is not set
# CONFIG_MFD_MAX77693 is not set
# CONFIG_MFD_MAX77843 is not set
# CONFIG_MFD_MAX8907 is not set
# CONFIG_MFD_MAX8925 is not set
# CONFIG_MFD_MAX8997 is not set
# CONFIG_MFD_MAX8998 is not set
# CONFIG_MFD_MT6360 is not set
# CONFIG_MFD_MT6397 is not set
# CONFIG_MFD_MENF21BMC is not set
# CONFIG_MFD_VIPERBOARD is not set
# CONFIG_MFD_RETU is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_MFD_RDC321X is not set
# CONFIG_MFD_RT5033 is not set
# CONFIG_MFD_RC5T583 is not set
# CONFIG_MFD_SEC_CORE is not set
# CONFIG_MFD_SI476X_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_MFD_SKY81452 is not set
# CONFIG_MFD_SMSC is not set
# CONFIG_ABX500_CORE is not set
# CONFIG_MFD_SYSCON is not set
# CONFIG_MFD_TI_AM335X_TSCADC is not set
# CONFIG_MFD_LP3943 is not set
# CONFIG_MFD_LP8788 is not set
# CONFIG_MFD_TI_LMU is not set
# CONFIG_MFD_PALMAS is not set
# CONFIG_TPS6105X is not set
# CONFIG_TPS65010 is not set
# CONFIG_TPS6507X is not set
# CONFIG_MFD_TPS65086 is not set
# CONFIG_MFD_TPS65090 is not set
# CONFIG_MFD_TI_LP873X is not set
# CONFIG_MFD_TPS6586X is not set
# CONFIG_MFD_TPS65910 is not set
# CONFIG_MFD_TPS65912_I2C is not set
# CONFIG_MFD_TPS80031 is not set
# CONFIG_TWL4030_CORE is not set
# CONFIG_TWL6040_CORE is not set
# CONFIG_MFD_WL1273_CORE is not set
# CONFIG_MFD_LM3533 is not set
# CONFIG_MFD_TIMBERDALE is not set
# CONFIG_MFD_TQMX86 is not set
# CONFIG_MFD_VX855 is not set
# CONFIG_MFD_ARIZONA_I2C is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM831X_I2C is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_WM8994 is not set
# end of Multifunction device drivers
# CONFIG_REGULATOR is not set
# CONFIG_RC_CORE is not set
# CONFIG_MEDIA_CEC_SUPPORT is not setCONFIG_MEDIA_SUPPORT=m
# CONFIG_MEDIA_SUPPORT_FILTER is not setCONFIG_MEDIA_SUBDRV_AUTOSELECT=y
#
# Media device types
#CONFIG_MEDIA_CAMERA_SUPPORT=yCONFIG_MEDIA_ANALOG_TV_SUPPORT=yCONFIG_MEDIA_DIGITAL_TV_SUPPORT=yCONFIG_MEDIA_RADIO_SUPPORT=yCONFIG_MEDIA_SDR_SUPPORT=yCONFIG_MEDIA_PLATFORM_SUPPORT=yCONFIG_MEDIA_TEST_SUPPORT=y
# end of Media device types
#
# Media core support
#CONFIG_VIDEO_DEV=m
# CONFIG_MEDIA_CONTROLLER is not setCONFIG_DVB_CORE=m
# end of Media core support
#
# Video4Linux options
#CONFIG_VIDEO_V4L2=mCONFIG_VIDEO_V4L2_I2C=y
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
# end of Video4Linux options
#
# Digital TV options
#
# CONFIG_DVB_MMAP is not setCONFIG_DVB_NET=yCONFIG_DVB_MAX_ADAPTERS=16CONFIG_DVB_DYNAMIC_MINORS=y
# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set
# CONFIG_DVB_ULE_DEBUG is not set
# end of Digital TV options
#
# Media drivers
#CONFIG_MEDIA_USB_SUPPORT=y
#
# Webcam devices
#
# CONFIG_USB_VIDEO_CLASS is not setCONFIG_USB_GSPCA=m
# CONFIG_USB_M5602 is not set
# CONFIG_USB_STV06XX is not set
# CONFIG_USB_GL860 is not set
# CONFIG_USB_GSPCA_BENQ is not set
# CONFIG_USB_GSPCA_CONEX is not set
# CONFIG_USB_GSPCA_CPIA1 is not set
# CONFIG_USB_GSPCA_DTCS033 is not set
# CONFIG_USB_GSPCA_ETOMS is not set
# CONFIG_USB_GSPCA_FINEPIX is not set
# CONFIG_USB_GSPCA_JEILINJ is not set
# CONFIG_USB_GSPCA_JL2005BCD is not set
# CONFIG_USB_GSPCA_KINECT is not set
# CONFIG_USB_GSPCA_KONICA is not set
# CONFIG_USB_GSPCA_MARS is not set
# CONFIG_USB_GSPCA_MR97310A is not set
# CONFIG_USB_GSPCA_NW80X is not set
# CONFIG_USB_GSPCA_OV519 is not set
# CONFIG_USB_GSPCA_OV534 is not set
# CONFIG_USB_GSPCA_OV534_9 is not set
# CONFIG_USB_GSPCA_PAC207 is not set
# CONFIG_USB_GSPCA_PAC7302 is not set
# CONFIG_USB_GSPCA_PAC7311 is not set
# CONFIG_USB_GSPCA_SE401 is not set
# CONFIG_USB_GSPCA_SN9C2028 is not set
# CONFIG_USB_GSPCA_SN9C20X is not set
# CONFIG_USB_GSPCA_SONIXB is not set
# CONFIG_USB_GSPCA_SONIXJ is not set
# CONFIG_USB_GSPCA_SPCA500 is not set
# CONFIG_USB_GSPCA_SPCA501 is not set
# CONFIG_USB_GSPCA_SPCA505 is not set
# CONFIG_USB_GSPCA_SPCA506 is not set
# CONFIG_USB_GSPCA_SPCA508 is not setCONFIG_USB_GSPCA_SPCA561=m
# CONFIG_USB_GSPCA_SPCA1528 is not set
# CONFIG_USB_GSPCA_SQ905 is not set
# CONFIG_USB_GSPCA_SQ905C is not set
# CONFIG_USB_GSPCA_SQ930X is not set
# CONFIG_USB_GSPCA_STK014 is not set
# CONFIG_USB_GSPCA_STK1135 is not set
# CONFIG_USB_GSPCA_STV0680 is not set
# CONFIG_USB_GSPCA_SUNPLUS is not set
# CONFIG_USB_GSPCA_T613 is not set
# CONFIG_USB_GSPCA_TOPRO is not set
# CONFIG_USB_GSPCA_TOUPTEK is not set
# CONFIG_USB_GSPCA_TV8532 is not set
# CONFIG_USB_GSPCA_VC032X is not set
# CONFIG_USB_GSPCA_VICAM is not set
# CONFIG_USB_GSPCA_XIRLINK_CIT is not set
# CONFIG_USB_GSPCA_ZC3XX is not set
# CONFIG_USB_PWC is not set
# CONFIG_VIDEO_CPIA2 is not set
# CONFIG_USB_ZR364XX is not set
# CONFIG_USB_STKWEBCAM is not set
# CONFIG_USB_S2255 is not set
# CONFIG_VIDEO_USBTV is not set
#
# Analog TV USB devices
#
# CONFIG_VIDEO_PVRUSB2 is not set
# CONFIG_VIDEO_HDPVR is not set
# CONFIG_VIDEO_STK1160_COMMON is not set
# CONFIG_VIDEO_GO7007 is not set
#
# Analog/digital TV USB devices
#
# CONFIG_VIDEO_AU0828 is not set
# CONFIG_VIDEO_CX231XX is not set
#
# Digital TV USB devices
#
# CONFIG_DVB_USB_V2 is not set
# CONFIG_DVB_TTUSB_BUDGET is not set
# CONFIG_DVB_TTUSB_DEC is not set
# CONFIG_SMS_USB_DRV is not set
# CONFIG_DVB_B2C2_FLEXCOP_USB is not set
# CONFIG_DVB_AS102 is not set
#
# Webcam, TV (analog/digital) USB devices
#
# CONFIG_VIDEO_EM28XX is not set
#
# Software defined radio USB devices
#
# CONFIG_USB_AIRSPY is not set
# CONFIG_USB_HACKRF is not set
# CONFIG_MEDIA_PCI_SUPPORT is not setCONFIG_RADIO_ADAPTERS=y
# CONFIG_RADIO_SI470X is not set
# CONFIG_RADIO_SI4713 is not set
# CONFIG_USB_MR800 is not set
# CONFIG_USB_DSBR is not set
# CONFIG_RADIO_MAXIRADIO is not set
# CONFIG_RADIO_SHARK is not set
# CONFIG_RADIO_SHARK2 is not set
# CONFIG_USB_KEENE is not set
# CONFIG_USB_RAREMONO is not set
# CONFIG_USB_MA901 is not set
# CONFIG_RADIO_TEA5764 is not set
# CONFIG_RADIO_SAA7706H is not set
# CONFIG_RADIO_TEF6862 is not set
# CONFIG_RADIO_WL1273 is not setCONFIG_VIDEOBUF2_CORE=mCONFIG_VIDEOBUF2_V4L2=mCONFIG_VIDEOBUF2_MEMOPS=mCONFIG_VIDEOBUF2_VMALLOC=m
# CONFIG_V4L_PLATFORM_DRIVERS is not set
# CONFIG_V4L_MEM2MEM_DRIVERS is not set
# CONFIG_DVB_PLATFORM_DRIVERS is not set
# CONFIG_SDR_PLATFORM_DRIVERS is not set
# CONFIG_V4L_TEST_DRIVERS is not set
#
# FireWire (IEEE 1394) Adapters
#
# CONFIG_DVB_FIREDTV is not set
# end of Media drivers
#
# Media ancillary drivers
#CONFIG_MEDIA_ATTACH=y
#
# Audio decoders, processors and mixers
#
# CONFIG_VIDEO_TVAUDIO is not set
# CONFIG_VIDEO_TDA7432 is not set
# CONFIG_VIDEO_TDA9840 is not set
# CONFIG_VIDEO_TEA6415C is not set
# CONFIG_VIDEO_TEA6420 is not set
# CONFIG_VIDEO_MSP3400 is not set
# CONFIG_VIDEO_CS3308 is not set
# CONFIG_VIDEO_CS5345 is not set
# CONFIG_VIDEO_CS53L32A is not set
# CONFIG_VIDEO_TLV320AIC23B is not set
# CONFIG_VIDEO_UDA1342 is not set
# CONFIG_VIDEO_WM8775 is not set
# CONFIG_VIDEO_WM8739 is not set
# CONFIG_VIDEO_VP27SMPX is not set
# CONFIG_VIDEO_SONY_BTF_MPX is not set
# end of Audio decoders, processors and mixers
#
# RDS decoders
#
# CONFIG_VIDEO_SAA6588 is not set
# end of RDS decoders
#
# Video decoders
#
# CONFIG_VIDEO_ADV7180 is not set
# CONFIG_VIDEO_ADV7183 is not set
# CONFIG_VIDEO_ADV7604 is not set
# CONFIG_VIDEO_ADV7842 is not set
# CONFIG_VIDEO_BT819 is not set
# CONFIG_VIDEO_BT856 is not set
# CONFIG_VIDEO_BT866 is not set
# CONFIG_VIDEO_KS0127 is not set
# CONFIG_VIDEO_ML86V7667 is not set
# CONFIG_VIDEO_SAA7110 is not set
# CONFIG_VIDEO_SAA711X is not set
# CONFIG_VIDEO_TC358743 is not set
# CONFIG_VIDEO_TVP514X is not set
# CONFIG_VIDEO_TVP5150 is not set
# CONFIG_VIDEO_TVP7002 is not set
# CONFIG_VIDEO_TW2804 is not set
# CONFIG_VIDEO_TW9903 is not set
# CONFIG_VIDEO_TW9906 is not set
# CONFIG_VIDEO_TW9910 is not set
# CONFIG_VIDEO_VPX3220 is not set
#
# Video and audio decoders
#
# CONFIG_VIDEO_SAA717X is not set
# CONFIG_VIDEO_CX25840 is not set
# end of Video decoders
#
# Video encoders
#
# CONFIG_VIDEO_SAA7127 is not set
# CONFIG_VIDEO_SAA7185 is not set
# CONFIG_VIDEO_ADV7170 is not set
# CONFIG_VIDEO_ADV7175 is not set
# CONFIG_VIDEO_ADV7343 is not set
# CONFIG_VIDEO_ADV7393 is not set
# CONFIG_VIDEO_ADV7511 is not set
# CONFIG_VIDEO_AD9389B is not set
# CONFIG_VIDEO_AK881X is not set
# CONFIG_VIDEO_THS8200 is not set
# end of Video encoders
#
# Video improvement chips
#
# CONFIG_VIDEO_UPD64031A is not set
# CONFIG_VIDEO_UPD64083 is not set
# end of Video improvement chips
#
# Audio/Video compression chips
#
# CONFIG_VIDEO_SAA6752HS is not set
# end of Audio/Video compression chips
#
# SDR tuner chips
#
# CONFIG_SDR_MAX2175 is not set
# end of SDR tuner chips
#
# Miscellaneous helper chips
#
# CONFIG_VIDEO_THS7303 is not set
# CONFIG_VIDEO_M52790 is not set
# CONFIG_VIDEO_I2C is not set
# CONFIG_VIDEO_ST_MIPID02 is not set
# end of Miscellaneous helper chips
#
# Camera sensor devices
#
# CONFIG_VIDEO_HI556 is not set
# CONFIG_VIDEO_IMX219 is not set
# CONFIG_VIDEO_IMX258 is not set
# CONFIG_VIDEO_IMX274 is not set
# CONFIG_VIDEO_IMX290 is not set
# CONFIG_VIDEO_IMX319 is not set
# CONFIG_VIDEO_IMX355 is not set
# CONFIG_VIDEO_OV2640 is not set
# CONFIG_VIDEO_OV2659 is not set
# CONFIG_VIDEO_OV2680 is not set
# CONFIG_VIDEO_OV2685 is not set
# CONFIG_VIDEO_OV2740 is not set
# CONFIG_VIDEO_OV5647 is not set
# CONFIG_VIDEO_OV6650 is not set
# CONFIG_VIDEO_OV5670 is not set
# CONFIG_VIDEO_OV5675 is not set
# CONFIG_VIDEO_OV5695 is not set
# CONFIG_VIDEO_OV7251 is not set
# CONFIG_VIDEO_OV772X is not set
# CONFIG_VIDEO_OV7640 is not set
# CONFIG_VIDEO_OV7670 is not set
# CONFIG_VIDEO_OV7740 is not set
# CONFIG_VIDEO_OV8856 is not set
# CONFIG_VIDEO_OV9640 is not set
# CONFIG_VIDEO_OV9650 is not set
# CONFIG_VIDEO_OV13858 is not set
# CONFIG_VIDEO_VS6624 is not set
# CONFIG_VIDEO_MT9M001 is not set
# CONFIG_VIDEO_MT9M032 is not set
# CONFIG_VIDEO_MT9M111 is not set
# CONFIG_VIDEO_MT9P031 is not set
# CONFIG_VIDEO_MT9T001 is not set
# CONFIG_VIDEO_MT9T112 is not set
# CONFIG_VIDEO_MT9V011 is not set
# CONFIG_VIDEO_MT9V032 is not set
# CONFIG_VIDEO_MT9V111 is not set
# CONFIG_VIDEO_SR030PC30 is not set
# CONFIG_VIDEO_NOON010PC30 is not set
# CONFIG_VIDEO_M5MOLS is not set
# CONFIG_VIDEO_RJ54N1 is not set
# CONFIG_VIDEO_S5K6AA is not set
# CONFIG_VIDEO_S5K6A3 is not set
# CONFIG_VIDEO_S5K4ECGX is not set
# CONFIG_VIDEO_S5K5BAF is not set
# CONFIG_VIDEO_SMIAPP is not set
# CONFIG_VIDEO_ET8EK8 is not set
# end of Camera sensor devices
#
# Lens drivers
#
# CONFIG_VIDEO_AD5820 is not set
# CONFIG_VIDEO_AK7375 is not set
# CONFIG_VIDEO_DW9714 is not set
# CONFIG_VIDEO_DW9807_VCM is not set
# end of Lens drivers
#
# Flash devices
#
# CONFIG_VIDEO_ADP1653 is not set
# CONFIG_VIDEO_LM3560 is not set
# CONFIG_VIDEO_LM3646 is not set
# end of Flash devices
#
# SPI helper chips
#
# end of SPI helper chips
CONFIG_MEDIA_TUNER=m
#
# Customize TV tuners
#CONFIG_MEDIA_TUNER_SIMPLE=m
# CONFIG_MEDIA_TUNER_TDA18250 is not setCONFIG_MEDIA_TUNER_TDA8290=mCONFIG_MEDIA_TUNER_TDA827X=mCONFIG_MEDIA_TUNER_TDA18271=mCONFIG_MEDIA_TUNER_TDA9887=mCONFIG_MEDIA_TUNER_TEA5761=mCONFIG_MEDIA_TUNER_TEA5767=mCONFIG_MEDIA_TUNER_MT20XX=m
# CONFIG_MEDIA_TUNER_MT2060 is not set
# CONFIG_MEDIA_TUNER_MT2063 is not set
# CONFIG_MEDIA_TUNER_MT2266 is not set
# CONFIG_MEDIA_TUNER_MT2131 is not set
# CONFIG_MEDIA_TUNER_QT1010 is not setCONFIG_MEDIA_TUNER_XC2028=mCONFIG_MEDIA_TUNER_XC5000=mCONFIG_MEDIA_TUNER_XC4000=m
# CONFIG_MEDIA_TUNER_MXL5005S is not set
# CONFIG_MEDIA_TUNER_MXL5007T is not setCONFIG_MEDIA_TUNER_MC44S803=m
# CONFIG_MEDIA_TUNER_MAX2165 is not set
# CONFIG_MEDIA_TUNER_TDA18218 is not set
# CONFIG_MEDIA_TUNER_FC0011 is not set
# CONFIG_MEDIA_TUNER_FC0012 is not set
# CONFIG_MEDIA_TUNER_FC0013 is not set
# CONFIG_MEDIA_TUNER_TDA18212 is not set
# CONFIG_MEDIA_TUNER_E4000 is not set
# CONFIG_MEDIA_TUNER_FC2580 is not set
# CONFIG_MEDIA_TUNER_M88RS6000T is not set
# CONFIG_MEDIA_TUNER_TUA9001 is not set
# CONFIG_MEDIA_TUNER_SI2157 is not set
# CONFIG_MEDIA_TUNER_IT913X is not set
# CONFIG_MEDIA_TUNER_R820T is not set
# CONFIG_MEDIA_TUNER_MXL301RF is not set
# CONFIG_MEDIA_TUNER_QM1D1C0042 is not set
# CONFIG_MEDIA_TUNER_QM1D1B0004 is not set
# end of Customize TV tuners
#
# Customise DVB Frontends
#
#
# Multistandard (satellite) frontends
#
# CONFIG_DVB_STB0899 is not set
# CONFIG_DVB_STB6100 is not set
# CONFIG_DVB_STV090x is not set
# CONFIG_DVB_STV0910 is not set
# CONFIG_DVB_STV6110x is not set
# CONFIG_DVB_STV6111 is not set
# CONFIG_DVB_MXL5XX is not set
# CONFIG_DVB_M88DS3103 is not set
#
# Multistandard (cable + terrestrial) frontends
#
# CONFIG_DVB_DRXK is not set
# CONFIG_DVB_TDA18271C2DD is not set
# CONFIG_DVB_SI2165 is not set
# CONFIG_DVB_MN88472 is not set
# CONFIG_DVB_MN88473 is not set
#
# DVB-S (satellite) frontends
#
# CONFIG_DVB_CX24110 is not set
# CONFIG_DVB_CX24123 is not set
# CONFIG_DVB_MT312 is not set
# CONFIG_DVB_ZL10036 is not set
# CONFIG_DVB_ZL10039 is not set
# CONFIG_DVB_S5H1420 is not set
# CONFIG_DVB_STV0288 is not set
# CONFIG_DVB_STB6000 is not set
# CONFIG_DVB_STV0299 is not set
# CONFIG_DVB_STV6110 is not set
# CONFIG_DVB_STV0900 is not set
# CONFIG_DVB_TDA8083 is not set
# CONFIG_DVB_TDA10086 is not set
# CONFIG_DVB_TDA8261 is not set
# CONFIG_DVB_VES1X93 is not set
# CONFIG_DVB_TUNER_ITD1000 is not set
# CONFIG_DVB_TUNER_CX24113 is not set
# CONFIG_DVB_TDA826X is not set
# CONFIG_DVB_TUA6100 is not set
# CONFIG_DVB_CX24116 is not set
# CONFIG_DVB_CX24117 is not set
# CONFIG_DVB_CX24120 is not set
# CONFIG_DVB_SI21XX is not set
# CONFIG_DVB_TS2020 is not set
# CONFIG_DVB_DS3000 is not set
# CONFIG_DVB_MB86A16 is not set
# CONFIG_DVB_TDA10071 is not set
#
# DVB-T (terrestrial) frontends
#
# CONFIG_DVB_SP8870 is not set
# CONFIG_DVB_SP887X is not set
# CONFIG_DVB_CX22700 is not set
# CONFIG_DVB_CX22702 is not set
# CONFIG_DVB_S5H1432 is not set
# CONFIG_DVB_DRXD is not set
# CONFIG_DVB_L64781 is not set
# CONFIG_DVB_TDA1004X is not set
# CONFIG_DVB_NXT6000 is not set
# CONFIG_DVB_MT352 is not set
# CONFIG_DVB_ZL10353 is not set
# CONFIG_DVB_DIB3000MB is not set
# CONFIG_DVB_DIB3000MC is not set
# CONFIG_DVB_DIB7000M is not set
# CONFIG_DVB_DIB7000P is not set
# CONFIG_DVB_DIB9000 is not set
# CONFIG_DVB_TDA10048 is not set
# CONFIG_DVB_AF9013 is not set
# CONFIG_DVB_EC100 is not set
# CONFIG_DVB_STV0367 is not set
# CONFIG_DVB_CXD2820R is not set
# CONFIG_DVB_CXD2841ER is not set
# CONFIG_DVB_RTL2830 is not set
# CONFIG_DVB_RTL2832 is not set
# CONFIG_DVB_RTL2832_SDR is not set
# CONFIG_DVB_SI2168 is not set
# CONFIG_DVB_ZD1301_DEMOD is not set
#
# DVB-C (cable) frontends
#
# CONFIG_DVB_VES1820 is not set
# CONFIG_DVB_TDA10021 is not set
# CONFIG_DVB_TDA10023 is not set
# CONFIG_DVB_STV0297 is not set
#
# ATSC (North American/Korean Terrestrial/Cable DTV) frontends #
# CONFIG_DVB_NXT200X is not set
# CONFIG_DVB_OR51211 is not set
# CONFIG_DVB_OR51132 is not set
# CONFIG_DVB_BCM3510 is not set
# CONFIG_DVB_LGDT330X is not set
# CONFIG_DVB_LGDT3305 is not set
# CONFIG_DVB_LGDT3306A is not set
# CONFIG_DVB_LG2160 is not set
# CONFIG_DVB_S5H1409 is not set
# CONFIG_DVB_AU8522_DTV is not set
# CONFIG_DVB_AU8522_V4L is not set
# CONFIG_DVB_S5H1411 is not set
#
# ISDB-T (terrestrial) frontends
#
# CONFIG_DVB_S921 is not set
# CONFIG_DVB_DIB8000 is not set
# CONFIG_DVB_MB86A20S is not set
#
# ISDB-S (satellite) & ISDB-T (terrestrial) frontends #
# CONFIG_DVB_TC90522 is not set
# CONFIG_DVB_MN88443X is not set
#
# Digital terrestrial only tuners/PLL
#
# CONFIG_DVB_PLL is not set
# CONFIG_DVB_TUNER_DIB0070 is not set
# CONFIG_DVB_TUNER_DIB0090 is not set
#
# SEC control devices for DVB-S
#
# CONFIG_DVB_DRX39XYJ is not set
# CONFIG_DVB_LNBH25 is not set
# CONFIG_DVB_LNBH29 is not set
# CONFIG_DVB_LNBP21 is not set
# CONFIG_DVB_LNBP22 is not set
# CONFIG_DVB_ISL6405 is not set
# CONFIG_DVB_ISL6421 is not set
# CONFIG_DVB_ISL6423 is not set
# CONFIG_DVB_A8293 is not set
# CONFIG_DVB_LGS8GL5 is not set
# CONFIG_DVB_LGS8GXX is not set
# CONFIG_DVB_ATBM8830 is not set
# CONFIG_DVB_TDA665x is not set
# CONFIG_DVB_IX2505V is not set
# CONFIG_DVB_M88RS2000 is not set
# CONFIG_DVB_AF9033 is not set
# CONFIG_DVB_HORUS3A is not set
# CONFIG_DVB_ASCOT2E is not set
# CONFIG_DVB_HELENE is not set
#
# Common Interface (EN50221) controller drivers
#
# CONFIG_DVB_CXD2099 is not set
# CONFIG_DVB_SP2 is not set
# end of Customise DVB Frontends
#
# Tools to develop new frontends
#
# CONFIG_DVB_DUMMY_FE is not set
# end of Media ancillary drivers
#
# Graphics support
#CONFIG_AGP=m
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
# CONFIG_AGP_INTEL is not set
# CONFIG_AGP_NVIDIA is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_EFFICEON is not set
# CONFIG_VGA_ARB is not set
# CONFIG_VGA_SWITCHEROO is not set CONFIG_DRM=mCONFIG_DRM_DP_AUX_CHARDEV=y
# CONFIG_DRM_DEBUG_SELFTEST is not set CONFIG_DRM_KMS_HELPER=m CONFIG_DRM_KMS_FB_HELPER=y
# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set CONFIG_DRM_FBDEV_EMULATION=y CONFIG_DRM_FBDEV_OVERALLOC=100
# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set CONFIG_DRM_LOAD_EDID_FIRMWARE=y
# CONFIG_DRM_DP_CEC is not set CONFIG_DRM_TTM=mCONFIG_DRM_SCHED=m
#
# I2C encoder or helper chips
#
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_I2C_NXP_TDA9950 is not set
# end of I2C encoder or helper chips
#
# ARM devices
#
# end of ARM devices
CONFIG_DRM_RADEON=mCONFIG_DRM_RADEON_USERPTR=yCONFIG_DRM_AMDGPU=m
# CONFIG_DRM_AMDGPU_SI is not set
# CONFIG_DRM_AMDGPU_CIK is not set
# CONFIG_DRM_AMDGPU_USERPTR is not set
# CONFIG_DRM_AMDGPU_GART_DEBUGFS is not set
#
# ACP (Audio CoProcessor) Configuration
#
# CONFIG_DRM_AMD_ACP is not set
# end of ACP (Audio CoProcessor) Configuration
#
# Display Engine Configuration
#CONFIG_DRM_AMD_DC=yCONFIG_DRM_AMD_DC_DCN=y
# CONFIG_DRM_AMD_DC_HDCP is not set
# CONFIG_DEBUG_KERNEL_DC is not set
# end of Display Engine Configuration
# CONFIG_DRM_NOUVEAU is not set
# CONFIG_DRM_I915 is not set
# CONFIG_DRM_VGEM is not set
# CONFIG_DRM_VKMS is not set
# CONFIG_DRM_VMWGFX is not set
# CONFIG_DRM_GMA500 is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_QXL is not set
# CONFIG_DRM_BOCHS is not setCONFIG_DRM_PANEL=y
#
# Display Panels
#
# end of Display Panels
CONFIG_DRM_BRIDGE=yCONFIG_DRM_PANEL_BRIDGE=y
#
# Display Interface Bridges
#CONFIG_DRM_ANALOGIX_ANX78XX=mCONFIG_DRM_ANALOGIX_DP=m
# end of Display Interface Bridges
# CONFIG_DRM_ETNAVIV is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_GM12U320 is not set
# CONFIG_DRM_VBOXVIDEO is not set
# CONFIG_DRM_LEGACY is not setCONFIG_DRM_PANEL_ORIENTATION_QUIRKS=m
#
# Frame buffer Devices
#CONFIG_FB_CMDLINE=yCONFIG_FB_NOTIFY=yCONFIG_FB=y
# CONFIG_FIRMWARE_EDID is not setCONFIG_FB_CFB_FILLRECT=mCONFIG_FB_CFB_COPYAREA=mCONFIG_FB_CFB_IMAGEBLIT=mCONFIG_FB_SYS_FILLRECT=mCONFIG_FB_SYS_COPYAREA=mCONFIG_FB_SYS_IMAGEBLIT=m
# CONFIG_FB_FOREIGN_ENDIAN is not setCONFIG_FB_SYS_FOPS=mCONFIG_FB_DEFERRED_IO=y
# CONFIG_FB_MODE_HELPERS is not setCONFIG_FB_TILEBLITTING=y
#
# Frame buffer hardware drivers
#
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_UVESA is not set
# CONFIG_FB_VESA is not set
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_OPENCORES is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_I740 is not set
# CONFIG_FB_LE80578 is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_VIA is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_GEODE is not set
# CONFIG_FB_SMSCUFX is not set
# CONFIG_FB_UDL is not set
# CONFIG_FB_IBM_GXT4500 is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_SIMPLE is not set
# CONFIG_FB_SM712 is not set
# end of Frame buffer Devices
#
# Backlight & LCD device support
#CONFIG_LCD_CLASS_DEVICE=mCONFIG_LCD_PLATFORM=mCONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_GENERIC is not set
# CONFIG_BACKLIGHT_PWM is not setCONFIG_BACKLIGHT_APPLE=m
# CONFIG_BACKLIGHT_QCOM_WLED is not set
# CONFIG_BACKLIGHT_SAHARA is not set
# CONFIG_BACKLIGHT_ADP8860 is not set
# CONFIG_BACKLIGHT_ADP8870 is not set
# CONFIG_BACKLIGHT_LM3630A is not set
# CONFIG_BACKLIGHT_LM3639 is not setCONFIG_BACKLIGHT_LP855X=m
# CONFIG_BACKLIGHT_GPIO is not set
# CONFIG_BACKLIGHT_LV5207LP is not set
# CONFIG_BACKLIGHT_BD6107 is not set
# CONFIG_BACKLIGHT_ARCXCNN is not set
# end of Backlight & LCD device support
CONFIG_HDMI=y
#
# Console display driver support
#CONFIG_VGA_CONSOLE=y CONFIG_VGACON_SOFT_SCROLLBACK=y CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 CONFIG_VGACON_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT=y CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE_COLUMNS=80 CONFIG_DUMMY_CONSOLE_ROWS=25 CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set
# end of Console display driver support
# CONFIG_LOGO is not set
# end of Graphics support
CONFIG_SOUND=mCONFIG_SND=mCONFIG_SND_TIMER=mCONFIG_SND_PCM=mCONFIG_SND_SEQ_DEVICE=mCONFIG_SND_JACK=yCONFIG_SND_JACK_INPUT_DEV=y
# CONFIG_SND_OSSEMUL is not setCONFIG_SND_PCM_TIMER=yCONFIG_SND_HRTIMER=mCONFIG_SND_DYNAMIC_MINORS=yCONFIG_SND_MAX_CARDS=32
# CONFIG_SND_SUPPORT_OLD_API is not setCONFIG_SND_PROC_FS=y
# CONFIG_SND_VERBOSE_PROCFS is not set
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not setCONFIG_SND_VMASTER=yCONFIG_SND_DMA_SGBUF=yCONFIG_SND_SEQUENCER=mCONFIG_SND_SEQ_DUMMY=mCONFIG_SND_SEQ_HRTIMER_DEFAULT=yCONFIG_SND_DRIVERS=y
# CONFIG_SND_PCSP is not set
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_ALOOP is not set
# CONFIG_SND_VIRMIDI is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not setCONFIG_SND_PCI=y
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS300 is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ASIHPI is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AW2 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_OXYGEN is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS5530 is not set
# CONFIG_SND_CS5535AUDIO is not set
# CONFIG_SND_CTXFI is not set
# CONFIG_SND_DARLA20 is not set
# CONFIG_SND_GINA20 is not set
# CONFIG_SND_LAYLA20 is not set
# CONFIG_SND_DARLA24 is not set
# CONFIG_SND_GINA24 is not set
# CONFIG_SND_LAYLA24 is not set
# CONFIG_SND_MONA is not set
# CONFIG_SND_MIA is not set
# CONFIG_SND_ECHO3G is not set
# CONFIG_SND_INDIGO is not set
# CONFIG_SND_INDIGOIO is not set
# CONFIG_SND_INDIGODJ is not set
# CONFIG_SND_INDIGOIOX is not set
# CONFIG_SND_INDIGODJX is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_LOLA is not set
# CONFIG_SND_LX6464ES is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_PCXHR is not set
# CONFIG_SND_RIPTIDE is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_SE6X is not set
# CONFIG_SND_SIS7019 is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VIRTUOSO is not set
# CONFIG_SND_VX222 is not set
# CONFIG_SND_YMFPCI is not set
#
# HD-Audio
#CONFIG_SND_HDA=mCONFIG_SND_HDA_INTEL=m
# CONFIG_SND_HDA_HWDEP is not set
# CONFIG_SND_HDA_RECONFIG is not set
# CONFIG_SND_HDA_INPUT_BEEP is not set
# CONFIG_SND_HDA_PATCH_LOADER is not setCONFIG_SND_HDA_CODEC_REALTEK=m
# CONFIG_SND_HDA_CODEC_ANALOG is not set
# CONFIG_SND_HDA_CODEC_SIGMATEL is not set
# CONFIG_SND_HDA_CODEC_VIA is not setCONFIG_SND_HDA_CODEC_HDMI=m
# CONFIG_SND_HDA_CODEC_CIRRUS is not set
# CONFIG_SND_HDA_CODEC_CONEXANT is not set
# CONFIG_SND_HDA_CODEC_CA0110 is not set
# CONFIG_SND_HDA_CODEC_CA0132 is not set
# CONFIG_SND_HDA_CODEC_CMEDIA is not set
# CONFIG_SND_HDA_CODEC_SI3054 is not setCONFIG_SND_HDA_GENERIC=mCONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
# end of HD-Audio
CONFIG_SND_HDA_CORE=mCONFIG_SND_HDA_COMPONENT=yCONFIG_SND_HDA_PREALLOC_SIZE=0CONFIG_SND_INTEL_NHLT=yCONFIG_SND_INTEL_DSP_CONFIG=m
# CONFIG_SND_USB is not set
# CONFIG_SND_FIREWIRE is not set
# CONFIG_SND_SOC is not set
# CONFIG_SND_X86 is not set
#
# HID support
#CONFIG_HID=yCONFIG_HID_BATTERY_STRENGTH=yCONFIG_HIDRAW=yCONFIG_UHID=mCONFIG_HID_GENERIC=y
#
# Special HID drivers
#
# CONFIG_HID_A4TECH is not set
# CONFIG_HID_ACCUTOUCH is not set
# CONFIG_HID_ACRUX is not set
# CONFIG_HID_APPLE is not set
# CONFIG_HID_APPLEIR is not setCONFIG_HID_ASUS=m
# CONFIG_HID_AUREAL is not set
# CONFIG_HID_BELKIN is not set
# CONFIG_HID_BETOP_FF is not set
# CONFIG_HID_BIGBEN_FF is not set
# CONFIG_HID_CHERRY is not set
# CONFIG_HID_CHICONY is not set
# CONFIG_HID_CORSAIR is not set
# CONFIG_HID_COUGAR is not set
# CONFIG_HID_MACALLY is not set
# CONFIG_HID_PRODIKEYS is not set
# CONFIG_HID_CMEDIA is not set
# CONFIG_HID_CP2112 is not set
# CONFIG_HID_CREATIVE_SB0540 is not set
# CONFIG_HID_CYPRESS is not set
# CONFIG_HID_DRAGONRISE is not set
# CONFIG_HID_EMS_FF is not set
# CONFIG_HID_ELAN is not set
# CONFIG_HID_ELECOM is not set
# CONFIG_HID_ELO is not set
# CONFIG_HID_EZKEY is not set
# CONFIG_HID_GEMBIRD is not set
# CONFIG_HID_GFRM is not set
# CONFIG_HID_GLORIOUS is not set
# CONFIG_HID_HOLTEK is not set
# CONFIG_HID_GT683R is not set
# CONFIG_HID_KEYTOUCH is not set
# CONFIG_HID_KYE is not set
# CONFIG_HID_UCLOGIC is not set
# CONFIG_HID_WALTOP is not set
# CONFIG_HID_VIEWSONIC is not set
# CONFIG_HID_GYRATION is not set
# CONFIG_HID_ICADE is not setCONFIG_HID_ITE=m
# CONFIG_HID_JABRA is not set
# CONFIG_HID_TWINHAN is not set
# CONFIG_HID_KENSINGTON is not set
# CONFIG_HID_LCPOWER is not set
# CONFIG_HID_LED is not setCONFIG_HID_LENOVO=mCONFIG_HID_LOGITECH=mCONFIG_HID_LOGITECH_DJ=mCONFIG_HID_LOGITECH_HIDPP=mCONFIG_LOGITECH_FF=yCONFIG_LOGIRUMBLEPAD2_FF=yCONFIG_LOGIG940_FF=yCONFIG_LOGIWHEELS_FF=y
# CONFIG_HID_MAGICMOUSE is not set
# CONFIG_HID_MALTRON is not set
# CONFIG_HID_MAYFLASH is not set
# CONFIG_HID_REDRAGON is not setCONFIG_HID_MICROSOFT=m
# CONFIG_HID_MONTEREY is not setCONFIG_HID_MULTITOUCH=m
# CONFIG_HID_NTI is not set
# CONFIG_HID_NTRIG is not set
# CONFIG_HID_ORTEK is not set
# CONFIG_HID_PANTHERLORD is not set
# CONFIG_HID_PENMOUNT is not set
# CONFIG_HID_PETALYNX is not set
# CONFIG_HID_PICOLCD is not set
# CONFIG_HID_PLANTRONICS is not set
# CONFIG_HID_PRIMAX is not set
# CONFIG_HID_RETRODE is not set
# CONFIG_HID_ROCCAT is not set
# CONFIG_HID_SAITEK is not set
# CONFIG_HID_SAMSUNG is not set
# CONFIG_HID_SONY is not set
# CONFIG_HID_SPEEDLINK is not set
# CONFIG_HID_STEAM is not setCONFIG_HID_STEELSERIES=mCONFIG_HID_SUNPLUS=mCONFIG_HID_RMI=m
# CONFIG_HID_GREENASIA is not set
# CONFIG_HID_SMARTJOYPLUS is not set
# CONFIG_HID_TIVO is not set
# CONFIG_HID_TOPSEED is not set
# CONFIG_HID_THINGM is not set
# CONFIG_HID_THRUSTMASTER is not set
# CONFIG_HID_UDRAW_PS3 is not set
# CONFIG_HID_U2FZERO is not setCONFIG_HID_WACOM=m
# CONFIG_HID_WIIMOTE is not set
# CONFIG_HID_XINMO is not set
# CONFIG_HID_ZEROPLUS is not set
# CONFIG_HID_ZYDACRON is not setCONFIG_HID_SENSOR_HUB=m
# CONFIG_HID_SENSOR_CUSTOM_SENSOR is not setCONFIG_HID_ALPS=m
# CONFIG_HID_MCP2221 is not set
# end of Special HID drivers
#
# USB HID support
#CONFIG_USB_HID=yCONFIG_HID_PID=yCONFIG_USB_HIDDEV=y
# end of USB HID support
#
# I2C HID support
#CONFIG_I2C_HID=m
# end of I2C HID support # end of HID support
CONFIG_USB_OHCI_LITTLE_ENDIAN=yCONFIG_USB_SUPPORT=yCONFIG_USB_COMMON=y
# CONFIG_USB_LED_TRIG is not setCONFIG_USB_ULPI_BUS=m
# CONFIG_USB_CONN_GPIO is not setCONFIG_USB_ARCH_HAS_HCD=yCONFIG_USB=yCONFIG_USB_PCI=yCONFIG_USB_ANNOUNCE_NEW_DEVICES=y
#
# Miscellaneous USB options
#CONFIG_USB_DEFAULT_PERSIST=y
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_OTG is not set
# CONFIG_USB_OTG_WHITELIST is not set
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
# CONFIG_USB_LEDS_TRIGGER_USBPORT is not setCONFIG_USB_AUTOSUSPEND_DELAY=2CONFIG_USB_MON=m
#
# USB Host Controller Drivers
#
# CONFIG_USB_C67X00_HCD is not setCONFIG_USB_XHCI_HCD=m
# CONFIG_USB_XHCI_DBGCAP is not setCONFIG_USB_XHCI_PCI=m
# CONFIG_USB_XHCI_PCI_RENESAS is not set
# CONFIG_USB_XHCI_PLATFORM is not setCONFIG_USB_EHCI_HCD=mCONFIG_USB_EHCI_ROOT_HUB_TT=yCONFIG_USB_EHCI_TT_NEWSCHED=yCONFIG_USB_EHCI_PCI=m
# CONFIG_USB_EHCI_FSL is not set
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_FOTG210_HCD is not setCONFIG_USB_OHCI_HCD=mCONFIG_USB_OHCI_HCD_PCI=m
# CONFIG_USB_OHCI_HCD_PLATFORM is not set
# CONFIG_USB_UHCI_HCD is not set
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
# CONFIG_USB_HCD_TEST_MODE is not set
#
# USB Device Class drivers
#CONFIG_USB_ACM=mCONFIG_USB_PRINTER=mCONFIG_USB_WDM=mCONFIG_USB_TMC=m
#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may #
#
# also be needed; see USB_STORAGE Help for more info # # CONFIG_USB_STORAGE is not set
#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
# CONFIG_USBIP_CORE is not set
# CONFIG_USB_CDNS3 is not set
# CONFIG_USB_MUSB_HDRC is not set
# CONFIG_USB_DWC3 is not set
# CONFIG_USB_DWC2 is not set
# CONFIG_USB_CHIPIDEA is not set
# CONFIG_USB_ISP1760 is not set
#
# USB port drivers
#CONFIG_USB_SERIAL=yCONFIG_USB_SERIAL_CONSOLE=yCONFIG_USB_SERIAL_GENERIC=yCONFIG_USB_SERIAL_SIMPLE=mCONFIG_USB_SERIAL_AIRCABLE=mCONFIG_USB_SERIAL_ARK3116=mCONFIG_USB_SERIAL_BELKIN=mCONFIG_USB_SERIAL_CH341=mCONFIG_USB_SERIAL_WHITEHEAT=mCONFIG_USB_SERIAL_DIGI_ACCELEPORT=mCONFIG_USB_SERIAL_CP210X=mCONFIG_USB_SERIAL_CYPRESS_M8=mCONFIG_USB_SERIAL_EMPEG=mCONFIG_USB_SERIAL_FTDI_SIO=mCONFIG_USB_SERIAL_VISOR=mCONFIG_USB_SERIAL_IPAQ=mCONFIG_USB_SERIAL_IR=mCONFIG_USB_SERIAL_EDGEPORT=mCONFIG_USB_SERIAL_EDGEPORT_TI=m
# CONFIG_USB_SERIAL_F81232 is not set
# CONFIG_USB_SERIAL_F8153X is not setCONFIG_USB_SERIAL_GARMIN=mCONFIG_USB_SERIAL_IPW=mCONFIG_USB_SERIAL_IUU=mCONFIG_USB_SERIAL_KEYSPAN_PDA=mCONFIG_USB_SERIAL_KEYSPAN=mCONFIG_USB_SERIAL_KLSI=mCONFIG_USB_SERIAL_KOBIL_SCT=mCONFIG_USB_SERIAL_MCT_U232=m
# CONFIG_USB_SERIAL_METRO is not setCONFIG_USB_SERIAL_MOS7720=mCONFIG_USB_SERIAL_MOS7840=m
# CONFIG_USB_SERIAL_MXUPORT is not setCONFIG_USB_SERIAL_NAVMAN=mCONFIG_USB_SERIAL_PL2303=mCONFIG_USB_SERIAL_OTI6858=mCONFIG_USB_SERIAL_QCAUX=mCONFIG_USB_SERIAL_QUALCOMM=mCONFIG_USB_SERIAL_SPCP8X5=mCONFIG_USB_SERIAL_SAFE=mCONFIG_USB_SERIAL_SAFE_PADDED=yCONFIG_USB_SERIAL_SIERRAWIRELESS=mCONFIG_USB_SERIAL_SYMBOL=mCONFIG_USB_SERIAL_TI=mCONFIG_USB_SERIAL_CYBERJACK=mCONFIG_USB_SERIAL_XIRCOM=mCONFIG_USB_SERIAL_WWAN=mCONFIG_USB_SERIAL_OPTION=mCONFIG_USB_SERIAL_OMNINET=mCONFIG_USB_SERIAL_OPTICON=mCONFIG_USB_SERIAL_XSENS_MT=m
# CONFIG_USB_SERIAL_WISHBONE is not setCONFIG_USB_SERIAL_SSU100=mCONFIG_USB_SERIAL_QT2=m
# CONFIG_USB_SERIAL_UPD78F0730 is not setCONFIG_USB_SERIAL_DEBUG=m
#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_SEVSEG is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_APPLE_MFI_FASTCHARGE is not set
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set
# CONFIG_USB_EHSET_TEST_FIXTURE is not set
# CONFIG_USB_ISIGHTFW is not set
# CONFIG_USB_YUREX is not setCONFIG_USB_EZUSB_FX2=m
# CONFIG_USB_HUB_USB251XB is not set
# CONFIG_USB_HSIC_USB3503 is not set
# CONFIG_USB_HSIC_USB4604 is not set
# CONFIG_USB_LINK_LAYER_TEST is not set
# CONFIG_USB_CHAOSKEY is not set
#
# USB Physical Layer drivers
#CONFIG_USB_PHY=yCONFIG_NOP_USB_XCEIV=m
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_USB_ISP1301 is not set
# end of USB Physical Layer drivers
# CONFIG_USB_GADGET is not setCONFIG_TYPEC=mCONFIG_TYPEC_TCPM=m
# CONFIG_TYPEC_TCPCI is not set
# CONFIG_TYPEC_FUSB302 is not setCONFIG_TYPEC_UCSI=m
# CONFIG_UCSI_CCG is not setCONFIG_UCSI_ACPI=m
# CONFIG_TYPEC_HD3SS3220 is not set
# CONFIG_TYPEC_TPS6598X is not set
#
# USB Type-C Multiplexer/DeMultiplexer Switch support #
# CONFIG_TYPEC_MUX_PI3USB30532 is not set
# end of USB Type-C Multiplexer/DeMultiplexer Switch support
#
# USB Type-C Alternate Mode drivers
#
# CONFIG_TYPEC_DP_ALTMODE is not set
# end of USB Type-C Alternate Mode drivers
CONFIG_USB_ROLE_SWITCH=m
# CONFIG_USB_ROLES_INTEL_XHCI is not set
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not setCONFIG_NEW_LEDS=yCONFIG_LEDS_CLASS=yCONFIG_LEDS_CLASS_FLASH=m
# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set
#
# LED drivers
#
# CONFIG_LEDS_APU is not set
# CONFIG_LEDS_AS3645A is not setCONFIG_LEDS_LM3530=m
# CONFIG_LEDS_LM3532 is not set
# CONFIG_LEDS_LM3642 is not set
# CONFIG_LEDS_LM3601X is not set
# CONFIG_LEDS_PCA9532 is not set
# CONFIG_LEDS_GPIO is not setCONFIG_LEDS_LP3944=mCONFIG_LEDS_LP3952=m
# CONFIG_LEDS_LP5521 is not set
# CONFIG_LEDS_LP5523 is not set
# CONFIG_LEDS_LP5562 is not set
# CONFIG_LEDS_LP8501 is not setCONFIG_LEDS_CLEVO_MAIL=m
# CONFIG_LEDS_PCA955X is not set
# CONFIG_LEDS_PCA963X is not set
# CONFIG_LEDS_PWM is not set
# CONFIG_LEDS_BD2802 is not setCONFIG_LEDS_INTEL_SS4200=m
# CONFIG_LEDS_TCA6507 is not set
# CONFIG_LEDS_TLC591XX is not set
# CONFIG_LEDS_LM355x is not set
# CONFIG_LEDS_OT200 is not set
#
# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) #CONFIG_LEDS_BLINKM=m
# CONFIG_LEDS_MLXCPLD is not set
# CONFIG_LEDS_MLXREG is not set
# CONFIG_LEDS_USER is not set
# CONFIG_LEDS_NIC78BX is not set
# CONFIG_LEDS_TI_LMU_COMMON is not set
# CONFIG_LEDS_SGM3140 is not set
#
# LED Triggers
#CONFIG_LEDS_TRIGGERS=yCONFIG_LEDS_TRIGGER_TIMER=mCONFIG_LEDS_TRIGGER_ONESHOT=mCONFIG_LEDS_TRIGGER_DISK=yCONFIG_LEDS_TRIGGER_HEARTBEAT=mCONFIG_LEDS_TRIGGER_BACKLIGHT=m
# CONFIG_LEDS_TRIGGER_CPU is not set
# CONFIG_LEDS_TRIGGER_ACTIVITY is not setCONFIG_LEDS_TRIGGER_GPIO=mCONFIG_LEDS_TRIGGER_DEFAULT_ON=m
#
# iptables trigger is under Netfilter config (LED target) # CONFIG_LEDS_TRIGGER_TRANSIENT=m CONFIG_LEDS_TRIGGER_CAMERA=m CONFIG_LEDS_TRIGGER_PANIC=y # CONFIG_LEDS_TRIGGER_NETDEV is not set # CONFIG_LEDS_TRIGGER_PATTERN is not set # CONFIG_LEDS_TRIGGER_AUDIO is not set # CONFIG_ACCESSIBILITY is not set # CONFIG_INFINIBAND is not set CONFIG_EDAC_ATOMIC_SCRUB=y CONFIG_EDAC_SUPPORT=y # CONFIG_EDAC is not set CONFIG_RTC_LIB=y CONFIG_RTC_MC146818_LIB=y CONFIG_RTC_CLASS=y CONFIG_RTC_HCTOSYS=y CONFIG_RTC_HCTOSYS_DEVICE="rtc0" # CONFIG_RTC_SYSTOHC is not set # CONFIG_RTC_DEBUG is not set CONFIG_RTC_NVMEM=y
#
# RTC interfaces
#CONFIG_RTC_INTF_SYSFS=yCONFIG_RTC_INTF_PROC=yCONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set
#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_ABB5ZES3 is not set
# CONFIG_RTC_DRV_ABEOZ9 is not set
# CONFIG_RTC_DRV_ABX80X is not set
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_ISL12022 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8523 is not set
# CONFIG_RTC_DRV_PCF85063 is not set
# CONFIG_RTC_DRV_PCF85363 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_BQ32K is not set
# CONFIG_RTC_DRV_S35390A is not set
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8010 is not set
# CONFIG_RTC_DRV_RX8581 is not set
# CONFIG_RTC_DRV_RX8025 is not set
# CONFIG_RTC_DRV_EM3027 is not set
# CONFIG_RTC_DRV_RV3028 is not set
# CONFIG_RTC_DRV_RV8803 is not set
# CONFIG_RTC_DRV_SD3078 is not set
#
# SPI RTC drivers
#CONFIG_RTC_I2C_AND_SPI=y
#
# SPI and I2C RTC drivers
#
# CONFIG_RTC_DRV_DS3232 is not set
# CONFIG_RTC_DRV_PCF2127 is not set
# CONFIG_RTC_DRV_RV3029C2 is not set
#
# Platform RTC drivers
#CONFIG_RTC_DRV_CMOS=y
# CONFIG_RTC_DRV_DS1286 is not set
# CONFIG_RTC_DRV_DS1511 is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1685_FAMILY is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_DS2404 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T35 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_MSM6242 is not set
# CONFIG_RTC_DRV_BQ4802 is not set
# CONFIG_RTC_DRV_RP5C01 is not set
# CONFIG_RTC_DRV_V3020 is not set
#
# on-CPU RTC drivers
#
# CONFIG_RTC_DRV_FTRTC010 is not set
#
# HID Sensor RTC drivers
#CONFIG_DMADEVICES=y
# CONFIG_DMADEVICES_DEBUG is not set
#
# DMA Devices
#CONFIG_DMA_ENGINE=yCONFIG_DMA_VIRTUAL_CHANNELS=yCONFIG_DMA_ACPI=y
# CONFIG_ALTERA_MSGDMA is not setCONFIG_INTEL_IDMA64=m
# CONFIG_PCH_DMA is not set
# CONFIG_PLX_DMA is not set
# CONFIG_QCOM_HIDMA_MGMT is not set
# CONFIG_QCOM_HIDMA is not setCONFIG_DW_DMAC_CORE=yCONFIG_DW_DMAC=mCONFIG_DW_DMAC_PCI=y
# CONFIG_DW_EDMA is not set
# CONFIG_DW_EDMA_PCIE is not setCONFIG_HSU_DMA=y
# CONFIG_SF_PDMA is not set
#
# DMA Clients
#CONFIG_ASYNC_TX_DMA=y
# CONFIG_DMATEST is not set
#
# DMABUF options
#CONFIG_SYNC_FILE=yCONFIG_SW_SYNC=y
# CONFIG_UDMABUF is not set
# CONFIG_DMABUF_MOVE_NOTIFY is not set
# CONFIG_DMABUF_SELFTESTS is not set
# CONFIG_DMABUF_HEAPS is not set
# end of DMABUF options
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set
# CONFIG_VIRT_DRIVERS is not setCONFIG_VIRTIO_MENU=y
# CONFIG_VIRTIO_PCI is not set
# CONFIG_VIRTIO_MMIO is not set
# CONFIG_VDPA is not setCONFIG_VHOST_MENU=y
# CONFIG_VHOST_NET is not set
# CONFIG_VHOST_VSOCK is not set
# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set
#
# Microsoft Hyper-V guest support
#
# end of Microsoft Hyper-V guest support
# CONFIG_GREYBUS is not set
# CONFIG_STAGING is not set
# CONFIG_X86_PLATFORM_DEVICES is not set
# CONFIG_PMC_ATOM is not set
# CONFIG_MFD_CROS_EC is not set
# CONFIG_CHROME_PLATFORMS is not set
# CONFIG_MELLANOX_PLATFORM is not setCONFIG_HAVE_CLK=yCONFIG_CLKDEV_LOOKUP=yCONFIG_HAVE_CLK_PREPARE=yCONFIG_COMMON_CLK=y
# CONFIG_COMMON_CLK_MAX9485 is not set
# CONFIG_COMMON_CLK_SI5341 is not set
# CONFIG_COMMON_CLK_SI5351 is not set
# CONFIG_COMMON_CLK_SI544 is not set
# CONFIG_COMMON_CLK_CDCE706 is not set
# CONFIG_COMMON_CLK_CS2000_CP is not set
# CONFIG_COMMON_CLK_PWM is not set
# CONFIG_HWSPINLOCK is not set
#
# Clock Source drivers
#CONFIG_CLKSRC_I8253=yCONFIG_CLKEVT_I8253=yCONFIG_I8253_LOCK=yCONFIG_CLKBLD_I8253=y
# end of Clock Source drivers
# CONFIG_MAILBOX is not setCONFIG_IOMMU_SUPPORT=y
#
# Generic IOMMU Pagetable Support
#
# end of Generic IOMMU Pagetable Support
# CONFIG_IOMMU_DEBUGFS is not set
# CONFIG_INTEL_IOMMU is not set
#
# Remoteproc drivers
#
# CONFIG_REMOTEPROC is not set
# end of Remoteproc drivers
#
# Rpmsg drivers
#
# CONFIG_RPMSG_VIRTIO is not set
# end of Rpmsg drivers
# CONFIG_SOUNDWIRE is not set
#
# SOC (System On Chip) specific Drivers
#
#
# Amlogic SoC drivers
#
# end of Amlogic SoC drivers
#
# Aspeed SoC drivers
#
# end of Aspeed SoC drivers
#
# Broadcom SoC drivers
#
# end of Broadcom SoC drivers
#
# NXP/Freescale QorIQ SoC drivers
#
# end of NXP/Freescale QorIQ SoC drivers
#
# i.MX SoC drivers
#
# end of i.MX SoC drivers
#
# Qualcomm SoC drivers
#
# end of Qualcomm SoC drivers
# CONFIG_SOC_TI is not set
#
# Xilinx SoC drivers
#
# CONFIG_XILINX_VCU is not set
# end of Xilinx SoC drivers # end of SOC (System On Chip) specific Drivers
CONFIG_PM_DEVFREQ=y
#
# DEVFREQ Governors
#CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=m
# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set
# CONFIG_DEVFREQ_GOV_POWERSAVE is not set
# CONFIG_DEVFREQ_GOV_USERSPACE is not set
# CONFIG_DEVFREQ_GOV_PASSIVE is not set
#
# DEVFREQ Drivers
#
# CONFIG_PM_DEVFREQ_EVENT is not setCONFIG_EXTCON=y
#
# Extcon Device Drivers
#
# CONFIG_EXTCON_FSA9480 is not set
# CONFIG_EXTCON_GPIO is not set
# CONFIG_EXTCON_INTEL_INT3496 is not set
# CONFIG_EXTCON_MAX3355 is not set
# CONFIG_EXTCON_PTN5150 is not set
# CONFIG_EXTCON_RT8973A is not set
# CONFIG_EXTCON_SM5502 is not set
# CONFIG_EXTCON_USB_GPIO is not set
# CONFIG_MEMORY is not set
# CONFIG_IIO is not set
# CONFIG_NTB is not set
# CONFIG_VME_BUS is not setCONFIG_PWM=yCONFIG_PWM_SYSFS=y
# CONFIG_PWM_DEBUG is not setCONFIG_PWM_LPSS=mCONFIG_PWM_LPSS_PCI=mCONFIG_PWM_LPSS_PLATFORM=m
# CONFIG_PWM_PCA9685 is not set
#
# IRQ chip support
#
# end of IRQ chip support
# CONFIG_IPACK_BUS is not set
# CONFIG_RESET_CONTROLLER is not set
#
# PHY Subsystem
#CONFIG_GENERIC_PHY=y
# CONFIG_BCM_KONA_USB2_PHY is not set
# CONFIG_PHY_PXA_28NM_HSIC is not set
# CONFIG_PHY_PXA_28NM_USB2 is not set
# CONFIG_PHY_QCOM_USB_HS is not set
# CONFIG_PHY_QCOM_USB_HSIC is not set
# CONFIG_PHY_TUSB1210 is not set
# CONFIG_PHY_INTEL_EMMC is not set
# end of PHY Subsystem
CONFIG_POWERCAP=y
# CONFIG_IDLE_INJECT is not set
# CONFIG_MCB is not set
#
# Performance monitor support
#
# end of Performance monitor support
CONFIG_RAS=y
# CONFIG_USB4 is not set
#
# Android
#
# CONFIG_ANDROID is not set
# end of Android
CONFIG_DAX=y
# CONFIG_DEV_DAX is not setCONFIG_NVMEM=yCONFIG_NVMEM_SYSFS=y
#
# HW tracing support
#
# CONFIG_STM is not set
# CONFIG_INTEL_TH is not set
# end of HW tracing support
# CONFIG_FPGA is not set
# CONFIG_TEE is not setCONFIG_PM_OPP=y
# CONFIG_SIOX is not set
# CONFIG_SLIMBUS is not set
# CONFIG_INTERCONNECT is not set
# CONFIG_COUNTER is not set
# CONFIG_MOST is not set
# end of Device Drivers
#
# File systems
#CONFIG_DCACHE_WORD_ACCESS=y CONFIG_VALIDATE_FS_PARSER=yCONFIG_FS_IOMAP=y
# CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS is not setCONFIG_EXT4_FS=yCONFIG_EXT4_USE_FOR_EXT2=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y
# CONFIG_EXT4_DEBUG is not setCONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not set CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_BTRFS_FS is not set
# CONFIG_NILFS2_FS is not set
# CONFIG_F2FS_FS is not setCONFIG_FS_DAX=yCONFIG_FS_POSIX_ACL=yCONFIG_EXPORTFS=yCONFIG_EXPORTFS_BLOCK_OPS=y CONFIG_FILE_LOCKING=y
# CONFIG_MANDATORY_FILE_LOCKING is not set
# CONFIG_FS_ENCRYPTION is not set
# CONFIG_FS_VERITY is not set CONFIG_FSNOTIFY=yCONFIG_DNOTIFY=yCONFIG_INOTIFY_USER=yCONFIG_FANOTIFY=y CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y CONFIG_QUOTA=y CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not set
# CONFIG_QUOTA_DEBUG is not set CONFIG_QUOTA_TREE=y
# CONFIG_QFMT_V1 is not setCONFIG_QFMT_V2=yCONFIG_QUOTACTL=yCONFIG_AUTOFS4_FS=yCONFIG_AUTOFS_FS=yCONFIG_FUSE_FS=mCONFIG_CUSE=m
# CONFIG_VIRTIO_FS is not set CONFIG_OVERLAY_FS=m
# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
# CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW is not set # CONFIG_OVERLAY_FS_INDEX is not set
# CONFIG_OVERLAY_FS_METACOPY is not set
#
# Caches
#CONFIG_FSCACHE=mCONFIG_FSCACHE_STATS=y
# CONFIG_FSCACHE_HISTOGRAM is not set
# CONFIG_FSCACHE_DEBUG is not setCONFIG_FSCACHE_OBJECT_LIST=yCONFIG_CACHEFILES=m
# CONFIG_CACHEFILES_DEBUG is not set
# CONFIG_CACHEFILES_HISTOGRAM is not set
# end of Caches
#
# CD-ROM/DVD Filesystems
#CONFIG_ISO9660_FS=mCONFIG_JOLIET=yCONFIG_ZISOFS=yCONFIG_UDF_FS=m
# end of CD-ROM/DVD Filesystems
#
# DOS/FAT/EXFAT/NT Filesystems
#CONFIG_FAT_FS=mCONFIG_MSDOS_FS=mCONFIG_VFAT_FS=mCONFIG_FAT_DEFAULT_CODEPAGE=437CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
# CONFIG_FAT_DEFAULT_UTF8 is not set
# CONFIG_EXFAT_FS is not setCONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set
# end of DOS/FAT/EXFAT/NT Filesystems
#
# Pseudo filesystems
#CONFIG_PROC_FS=yCONFIG_PROC_KCORE=yCONFIG_PROC_VMCORE=y
# CONFIG_PROC_VMCORE_DEVICE_DUMP is not setCONFIG_PROC_SYSCTL=yCONFIG_PROC_PAGE_MONITOR=yCONFIG_PROC_CHILDREN=yCONFIG_PROC_PID_ARCH_STATUS=yCONFIG_KERNFS=yCONFIG_SYSFS=yCONFIG_TMPFS=yCONFIG_TMPFS_POSIX_ACL=yCONFIG_TMPFS_XATTR=yCONFIG_HUGETLBFS=yCONFIG_HUGETLB_PAGE=yCONFIG_MEMFD_CREATE=yCONFIG_CONFIGFS_FS=y
# end of Pseudo filesystems
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ORANGEFS_FS is not set
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_ECRYPT_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not setCONFIG_CRAMFS=mCONFIG_CRAMFS_BLOCKDEV=yCONFIG_SQUASHFS=mCONFIG_SQUASHFS_FILE_CACHE=y
# CONFIG_SQUASHFS_FILE_DIRECT is not setCONFIG_SQUASHFS_DECOMP_SINGLE=y
# CONFIG_SQUASHFS_DECOMP_MULTI is not set
# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not setCONFIG_SQUASHFS_XATTR=yCONFIG_SQUASHFS_ZLIB=yCONFIG_SQUASHFS_LZ4=yCONFIG_SQUASHFS_LZO=yCONFIG_SQUASHFS_XZ=y
# CONFIG_SQUASHFS_ZSTD is not set
# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set
# CONFIG_SQUASHFS_EMBEDDED is not setCONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX6FS_FS is not setCONFIG_ROMFS_FS=mCONFIG_ROMFS_BACKED_BY_BLOCK=yCONFIG_ROMFS_ON_BLOCK=yCONFIG_PSTORE=yCONFIG_PSTORE_DEFLATE_COMPRESS=y
# CONFIG_PSTORE_LZO_COMPRESS is not set
# CONFIG_PSTORE_LZ4_COMPRESS is not set
# CONFIG_PSTORE_LZ4HC_COMPRESS is not set
# CONFIG_PSTORE_842_COMPRESS is not set
# CONFIG_PSTORE_ZSTD_COMPRESS is not setCONFIG_PSTORE_COMPRESS=yCONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=yCONFIG_PSTORE_COMPRESS_DEFAULT="deflate"
# CONFIG_PSTORE_CONSOLE is not set
# CONFIG_PSTORE_PMSG is not set
# CONFIG_PSTORE_FTRACE is not setCONFIG_PSTORE_RAM=m
# CONFIG_PSTORE_BLK is not set
# CONFIG_SYSV_FS is not setCONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set
# CONFIG_UFS_DEBUG is not set
# CONFIG_EROFS_FS is not set
# CONFIG_NETWORK_FILESYSTEMS is not setCONFIG_NLS=yCONFIG_NLS_DEFAULT="utf8"CONFIG_NLS_CODEPAGE_437=yCONFIG_NLS_CODEPAGE_737=mCONFIG_NLS_CODEPAGE_775=mCONFIG_NLS_CODEPAGE_850=mCONFIG_NLS_CODEPAGE_852=mCONFIG_NLS_CODEPAGE_855=mCONFIG_NLS_CODEPAGE_857=mCONFIG_NLS_CODEPAGE_860=mCONFIG_NLS_CODEPAGE_861=mCONFIG_NLS_CODEPAGE_862=mCONFIG_NLS_CODEPAGE_863=mCONFIG_NLS_CODEPAGE_864=mCONFIG_NLS_CODEPAGE_865=mCONFIG_NLS_CODEPAGE_866=mCONFIG_NLS_CODEPAGE_869=mCONFIG_NLS_CODEPAGE_936=mCONFIG_NLS_CODEPAGE_950=mCONFIG_NLS_CODEPAGE_932=mCONFIG_NLS_CODEPAGE_949=mCONFIG_NLS_CODEPAGE_874=mCONFIG_NLS_ISO8859_8=mCONFIG_NLS_CODEPAGE_1250=mCONFIG_NLS_CODEPAGE_1251=mCONFIG_NLS_ASCII=yCONFIG_NLS_ISO8859_1=mCONFIG_NLS_ISO8859_2=mCONFIG_NLS_ISO8859_3=mCONFIG_NLS_ISO8859_4=mCONFIG_NLS_ISO8859_5=mCONFIG_NLS_ISO8859_6=mCONFIG_NLS_ISO8859_7=mCONFIG_NLS_ISO8859_9=mCONFIG_NLS_ISO8859_13=mCONFIG_NLS_ISO8859_14=mCONFIG_NLS_ISO8859_15=mCONFIG_NLS_KOI8_R=mCONFIG_NLS_KOI8_U=mCONFIG_NLS_MAC_ROMAN=mCONFIG_NLS_MAC_CELTIC=mCONFIG_NLS_MAC_CENTEURO=mCONFIG_NLS_MAC_CROATIAN=mCONFIG_NLS_MAC_CYRILLIC=mCONFIG_NLS_MAC_GAELIC=mCONFIG_NLS_MAC_GREEK=mCONFIG_NLS_MAC_ICELAND=mCONFIG_NLS_MAC_INUIT=mCONFIG_NLS_MAC_ROMANIAN=mCONFIG_NLS_MAC_TURKISH=mCONFIG_NLS_UTF8=mCONFIG_DLM=mCONFIG_DLM_DEBUG=y
# CONFIG_UNICODE is not setCONFIG_IO_WQ=y
# end of File systems
#
# Security options
#CONFIG_KEYS=y
# CONFIG_KEYS_REQUEST_CACHE is not set
# CONFIG_PERSISTENT_KEYRINGS is not set
# CONFIG_TRUSTED_KEYS is not set
# CONFIG_ENCRYPTED_KEYS is not setCONFIG_KEY_DH_OPERATIONS=y
# CONFIG_SECURITY_DMESG_RESTRICT is not setCONFIG_SECURITY=yCONFIG_SECURITY_WRITABLE_HOOKS=yCONFIG_SECURITYFS=yCONFIG_SECURITY_NETWORK=yCONFIG_SECURITY_NETWORK_XFRM=y
# CONFIG_SECURITY_PATH is not set CONFIG_LSM_MMAP_MIN_ADDR=65536 CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y CONFIG_HARDENED_USERCOPY=yCONFIG_HARDENED_USERCOPY_FALLBACK=y
# CONFIG_HARDENED_USERCOPY_PAGESPAN is not set CONFIG_FORTIFY_SOURCE=y
# CONFIG_STATIC_USERMODEHELPER is not set CONFIG_SECURITY_SELINUX=yCONFIG_SECURITY_SELINUX_BOOTPARAM=y CONFIG_SECURITY_SELINUX_DISABLE=y CONFIG_SECURITY_SELINUX_DEVELOP=y CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 CONFIG_SECURITY_SELINUX_SIDTAB_HASH_BITS=9 CONFIG_SECURITY_SELINUX_SID2STR_CACHE_SIZE=256
# CONFIG_SECURITY_SMACK is not set
# CONFIG_SECURITY_TOMOYO is not set
# CONFIG_SECURITY_APPARMOR is not set
# CONFIG_SECURITY_LOADPIN is not set
# CONFIG_SECURITY_YAMA is not set
# CONFIG_SECURITY_SAFESETID is not set
# CONFIG_SECURITY_LOCKDOWN_LSM is not set
# CONFIG_INTEGRITY is not setCONFIG_DEFAULT_SECURITY_SELINUX=y
# CONFIG_DEFAULT_SECURITY_DAC is not set CONFIG_LSM="yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor"
#
# Kernel hardening options
#
#
# Memory initialization
#CONFIG_CC_HAS_AUTO_VAR_INIT=yCONFIG_INIT_STACK_NONE=y
# CONFIG_INIT_STACK_ALL is not set
# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
# end of Memory initialization # end of Kernel hardening options # end of Security options
CONFIG_CRYPTO=y
#
# Crypto core or helper
#CONFIG_CRYPTO_ALGAPI=yCONFIG_CRYPTO_ALGAPI2=yCONFIG_CRYPTO_AEAD=yCONFIG_CRYPTO_AEAD2=yCONFIG_CRYPTO_SKCIPHER=yCONFIG_CRYPTO_SKCIPHER2=yCONFIG_CRYPTO_HASH=yCONFIG_CRYPTO_HASH2=yCONFIG_CRYPTO_RNG=yCONFIG_CRYPTO_RNG2=yCONFIG_CRYPTO_RNG_DEFAULT=mCONFIG_CRYPTO_AKCIPHER2=yCONFIG_CRYPTO_AKCIPHER=yCONFIG_CRYPTO_KPP2=yCONFIG_CRYPTO_KPP=yCONFIG_CRYPTO_ACOMP2=yCONFIG_CRYPTO_MANAGER=yCONFIG_CRYPTO_MANAGER2=yCONFIG_CRYPTO_USER=m
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
# CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not setCONFIG_CRYPTO_GF128MUL=yCONFIG_CRYPTO_NULL=yCONFIG_CRYPTO_NULL2=yCONFIG_CRYPTO_PCRYPT=mCONFIG_CRYPTO_CRYPTD=yCONFIG_CRYPTO_AUTHENC=yCONFIG_CRYPTO_TEST=m
#
# Public-key cryptography
#CONFIG_CRYPTO_RSA=yCONFIG_CRYPTO_DH=yCONFIG_CRYPTO_ECC=mCONFIG_CRYPTO_ECDH=m
# CONFIG_CRYPTO_ECRDSA is not set
# CONFIG_CRYPTO_CURVE25519 is not set
#
# Authenticated Encryption with Associated Data
#CONFIG_CRYPTO_CCM=mCONFIG_CRYPTO_GCM=mCONFIG_CRYPTO_CHACHA20POLY1305=m
# CONFIG_CRYPTO_AEGIS128 is not setCONFIG_CRYPTO_SEQIV=mCONFIG_CRYPTO_ECHAINIV=m
#
# Block modes
#CONFIG_CRYPTO_CBC=y
# CONFIG_CRYPTO_CFB is not setCONFIG_CRYPTO_CTR=mCONFIG_CRYPTO_CTS=mCONFIG_CRYPTO_ECB=yCONFIG_CRYPTO_LRW=y
# CONFIG_CRYPTO_OFB is not setCONFIG_CRYPTO_PCBC=mCONFIG_CRYPTO_XTS=yCONFIG_CRYPTO_KEYWRAP=m
# CONFIG_CRYPTO_ADIANTUM is not setCONFIG_CRYPTO_ESSIV=y
#
# Hash modes
#CONFIG_CRYPTO_CMAC=mCONFIG_CRYPTO_HMAC=yCONFIG_CRYPTO_XCBC=mCONFIG_CRYPTO_VMAC=m
#
# Digest
#CONFIG_CRYPTO_CRC32C=yCONFIG_CRYPTO_CRC32C_INTEL=yCONFIG_CRYPTO_CRC32=yCONFIG_CRYPTO_CRC32_PCLMUL=y
# CONFIG_CRYPTO_XXHASH is not set
# CONFIG_CRYPTO_BLAKE2B is not set
# CONFIG_CRYPTO_BLAKE2S is not setCONFIG_CRYPTO_CRCT10DIF=yCONFIG_CRYPTO_GHASH=yCONFIG_CRYPTO_POLY1305=mCONFIG_CRYPTO_MD4=mCONFIG_CRYPTO_MD5=yCONFIG_CRYPTO_MICHAEL_MIC=mCONFIG_CRYPTO_RMD128=mCONFIG_CRYPTO_RMD160=mCONFIG_CRYPTO_RMD256=mCONFIG_CRYPTO_RMD320=mCONFIG_CRYPTO_SHA1=yCONFIG_CRYPTO_SHA256=yCONFIG_CRYPTO_SHA512=mCONFIG_CRYPTO_SHA3=m
# CONFIG_CRYPTO_SM3 is not set
# CONFIG_CRYPTO_STREEBOG is not setCONFIG_CRYPTO_TGR192=mCONFIG_CRYPTO_WP512=m
#
# Ciphers
#CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_AES_TI is not set
# CONFIG_CRYPTO_AES_NI_INTEL is not setCONFIG_CRYPTO_ANUBIS=mCONFIG_CRYPTO_ARC4=mCONFIG_CRYPTO_BLOWFISH=mCONFIG_CRYPTO_BLOWFISH_COMMON=mCONFIG_CRYPTO_CAMELLIA=mCONFIG_CRYPTO_CAST_COMMON=mCONFIG_CRYPTO_CAST5=mCONFIG_CRYPTO_CAST6=mCONFIG_CRYPTO_DES=mCONFIG_CRYPTO_FCRYPT=mCONFIG_CRYPTO_KHAZAD=mCONFIG_CRYPTO_SALSA20=mCONFIG_CRYPTO_CHACHA20=mCONFIG_CRYPTO_SEED=mCONFIG_CRYPTO_SERPENT=m
# CONFIG_CRYPTO_SERPENT_SSE2_586 is not set
# CONFIG_CRYPTO_SM4 is not setCONFIG_CRYPTO_TEA=mCONFIG_CRYPTO_TWOFISH=mCONFIG_CRYPTO_TWOFISH_COMMON=m
# CONFIG_CRYPTO_TWOFISH_586 is not set
#
# Compression
#CONFIG_CRYPTO_DEFLATE=yCONFIG_CRYPTO_LZO=yCONFIG_CRYPTO_842=mCONFIG_CRYPTO_LZ4=mCONFIG_CRYPTO_LZ4HC=m
# CONFIG_CRYPTO_ZSTD is not set
#
# Random Number Generation
#CONFIG_CRYPTO_ANSI_CPRNG=mCONFIG_CRYPTO_DRBG_MENU=mCONFIG_CRYPTO_DRBG_HMAC=yCONFIG_CRYPTO_DRBG_HASH=yCONFIG_CRYPTO_DRBG_CTR=yCONFIG_CRYPTO_DRBG=mCONFIG_CRYPTO_JITTERENTROPY=mCONFIG_CRYPTO_USER_API=yCONFIG_CRYPTO_USER_API_HASH=yCONFIG_CRYPTO_USER_API_SKCIPHER=yCONFIG_CRYPTO_USER_API_RNG=yCONFIG_CRYPTO_USER_API_AEAD=y
# CONFIG_CRYPTO_STATS is not setCONFIG_CRYPTO_HASH_INFO=y
#
# Crypto library routines
#CONFIG_CRYPTO_LIB_AES=yCONFIG_CRYPTO_LIB_ARC4=m
# CONFIG_CRYPTO_LIB_BLAKE2S is not setCONFIG_CRYPTO_LIB_CHACHA_GENERIC=m
# CONFIG_CRYPTO_LIB_CHACHA is not set
# CONFIG_CRYPTO_LIB_CURVE25519 is not setCONFIG_CRYPTO_LIB_DES=mCONFIG_CRYPTO_LIB_POLY1305_RSIZE=1CONFIG_CRYPTO_LIB_POLY1305_GENERIC=m
# CONFIG_CRYPTO_LIB_POLY1305 is not set
# CONFIG_CRYPTO_LIB_CHACHA20POLY1305 is not setCONFIG_CRYPTO_LIB_SHA256=yCONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_PADLOCK is not set
# CONFIG_CRYPTO_DEV_GEODE is not set
# CONFIG_CRYPTO_DEV_HIFN_795X is not set
# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set
# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not setCONFIG_CRYPTO_DEV_CCP=yCONFIG_CRYPTO_DEV_CCP_DD=mCONFIG_CRYPTO_DEV_SP_CCP=yCONFIG_CRYPTO_DEV_CCP_CRYPTO=m
# CONFIG_CRYPTO_DEV_CCP_DEBUGFS is not set
# CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set
# CONFIG_CRYPTO_DEV_QAT_C3XXX is not set
# CONFIG_CRYPTO_DEV_QAT_C62X is not set
# CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set
# CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set
# CONFIG_CRYPTO_DEV_QAT_C62XVF is not set
# CONFIG_CRYPTO_DEV_SAFEXCEL is not set
# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not setCONFIG_ASYMMETRIC_KEY_TYPE=yCONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=yCONFIG_X509_CERTIFICATE_PARSER=y
# CONFIG_PKCS8_PRIVATE_KEY_PARSER is not setCONFIG_PKCS7_MESSAGE_PARSER=y
#
# Certificates for signature checking
#CONFIG_SYSTEM_TRUSTED_KEYRING=yCONFIG_SYSTEM_TRUSTED_KEYS=""
# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set
# CONFIG_SECONDARY_TRUSTED_KEYRING is not set
# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set
# end of Certificates for signature checking
CONFIG_BINARY_PRINTF=y
#
# Library routines
#
# CONFIG_PACKING is not setCONFIG_BITREVERSE=yCONFIG_GENERIC_STRNCPY_FROM_USER=yCONFIG_GENERIC_STRNLEN_USER=yCONFIG_GENERIC_NET_UTILS=yCONFIG_GENERIC_FIND_FIRST_BIT=yCONFIG_CORDIC=m
# CONFIG_PRIME_NUMBERS is not setCONFIG_RATIONAL=yCONFIG_GENERIC_PCI_IOMAP=yCONFIG_GENERIC_IOMAP=yCONFIG_ARCH_HAS_FAST_MULTIPLIER=yCONFIG_ARCH_USE_SYM_ANNOTATIONS=yCONFIG_CRC_CCITT=yCONFIG_CRC16=yCONFIG_CRC_T10DIF=yCONFIG_CRC_ITU_T=mCONFIG_CRC32=y
# CONFIG_CRC32_SELFTEST is not setCONFIG_CRC32_SLICEBY8=y
# CONFIG_CRC32_SLICEBY4 is not set
# CONFIG_CRC32_SARWATE is not set
# CONFIG_CRC32_BIT is not set
# CONFIG_CRC64 is not set
# CONFIG_CRC4 is not setCONFIG_CRC7=mCONFIG_LIBCRC32C=yCONFIG_CRC8=mCONFIG_XXHASH=yCONFIG_AUDIT_GENERIC=y
# CONFIG_RANDOM32_SELFTEST is not setCONFIG_842_COMPRESS=mCONFIG_842_DECOMPRESS=mCONFIG_ZLIB_INFLATE=yCONFIG_ZLIB_DEFLATE=yCONFIG_LZO_COMPRESS=yCONFIG_LZO_DECOMPRESS=yCONFIG_LZ4_COMPRESS=mCONFIG_LZ4HC_COMPRESS=mCONFIG_LZ4_DECOMPRESS=yCONFIG_XZ_DEC=yCONFIG_XZ_DEC_X86=yCONFIG_XZ_DEC_POWERPC=yCONFIG_XZ_DEC_IA64=yCONFIG_XZ_DEC_ARM=yCONFIG_XZ_DEC_ARMTHUMB=yCONFIG_XZ_DEC_SPARC=yCONFIG_XZ_DEC_BCJ=y
# CONFIG_XZ_DEC_TEST is not setCONFIG_DECOMPRESS_GZIP=yCONFIG_DECOMPRESS_BZIP2=yCONFIG_DECOMPRESS_LZMA=yCONFIG_DECOMPRESS_XZ=yCONFIG_DECOMPRESS_LZO=yCONFIG_DECOMPRESS_LZ4=yCONFIG_GENERIC_ALLOCATOR=yCONFIG_REED_SOLOMON=mCONFIG_REED_SOLOMON_ENC8=yCONFIG_REED_SOLOMON_DEC8=yCONFIG_TEXTSEARCH=yCONFIG_TEXTSEARCH_KMP=mCONFIG_TEXTSEARCH_BM=mCONFIG_TEXTSEARCH_FSM=mCONFIG_INTERVAL_TREE=yCONFIG_XARRAY_MULTI=yCONFIG_ASSOCIATIVE_ARRAY=yCONFIG_HAS_IOMEM=yCONFIG_HAS_IOPORT_MAP=yCONFIG_HAS_DMA=yCONFIG_NEED_SG_DMA_LENGTH=y
# CONFIG_DMA_CMA is not set
# CONFIG_DMA_API_DEBUG is not setCONFIG_SGL_ALLOC=yCONFIG_CHECK_SIGNATURE=yCONFIG_CPU_RMAP=yCONFIG_DQL=yCONFIG_GLOB=y
# CONFIG_GLOB_SELFTEST is not setCONFIG_NLATTR=yCONFIG_CLZ_TAB=yCONFIG_IRQ_POLL=yCONFIG_MPILIB=yCONFIG_OID_REGISTRY=yCONFIG_HAVE_GENERIC_VDSO=yCONFIG_GENERIC_GETTIMEOFDAY=yCONFIG_GENERIC_VDSO_32=yCONFIG_GENERIC_VDSO_TIME_NS=yCONFIG_FONT_SUPPORT=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=yCONFIG_SG_POOL=yCONFIG_ARCH_STACKWALK=yCONFIG_SBITMAP=y
# CONFIG_STRING_SELFTEST is not set
# end of Library routines
#
# Kernel hacking
#
#
# printk and dmesg options # CONFIG_PRINTK_TIME=y # CONFIG_PRINTK_CALLER is not set CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 CONFIG_CONSOLE_LOGLEVEL_QUIET=4 CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 # CONFIG_BOOT_PRINTK_DELAY is not set CONFIG_DYNAMIC_DEBUG=y CONFIG_DYNAMIC_DEBUG_CORE=y CONFIG_SYMBOLIC_ERRNAME=y CONFIG_DEBUG_BUGVERBOSE=y # end of printk and dmesg options
#
# Compile-time checks and compiler options
#
# CONFIG_DEBUG_INFO is not setCONFIG_ENABLE_MUST_CHECK=yCONFIG_FRAME_WARN=2048CONFIG_STRIP_ASM_SYMS=y
# CONFIG_READABLE_ASM is not set
# CONFIG_HEADERS_INSTALL is not set
# CONFIG_DEBUG_SECTION_MISMATCH is not set
# CONFIG_SECTION_MISMATCH_WARN_ONLY is not setCONFIG_FRAME_POINTER=y
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
# end of Compile-time checks and compiler options
#
# Generic Kernel Debugging Instruments
#CONFIG_MAGIC_SYSRQ=yCONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x0
# CONFIG_MAGIC_SYSRQ_SERIAL is not setCONFIG_DEBUG_FS=yCONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not setCONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y
# CONFIG_UBSAN is not set
# end of Generic Kernel Debugging Instruments
CONFIG_DEBUG_KERNEL=yCONFIG_DEBUG_MISC=y
#
# Memory Debugging
#
# CONFIG_PAGE_EXTENSION is not set
# CONFIG_DEBUG_PAGEALLOC is not set
# CONFIG_PAGE_OWNER is not set
# CONFIG_PAGE_POISONING is not set
# CONFIG_DEBUG_PAGE_REF is not set
# CONFIG_DEBUG_RODATA_TEST is not setCONFIG_ARCH_HAS_DEBUG_WX=yCONFIG_DEBUG_WX=yCONFIG_GENERIC_PTDUMP=yCONFIG_PTDUMP_CORE=y
# CONFIG_PTDUMP_DEBUGFS is not set
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not setCONFIG_HAVE_DEBUG_KMEMLEAK=yCONFIG_DEBUG_KMEMLEAK=yCONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE=16000
# CONFIG_DEBUG_KMEMLEAK_TEST is not set
# CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not setCONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_SCHED_STACK_END_CHECK is not setCONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_VM_PGTABLE is not setCONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
# CONFIG_DEBUG_VIRTUAL is not set
# CONFIG_DEBUG_MEMORY_INIT is not set
# CONFIG_DEBUG_PER_CPU_MAPS is not set
# CONFIG_DEBUG_HIGHMEM is not setCONFIG_HAVE_DEBUG_STACKOVERFLOW=y
# CONFIG_DEBUG_STACKOVERFLOW is not setCONFIG_CC_HAS_KASAN_GENERIC=yCONFIG_CC_HAS_KASAN_SW_TAGS=yCONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=yCONFIG_KASAN_STACK=0
# end of Memory Debugging
# CONFIG_DEBUG_SHIRQ is not set
#
# Debug Oops, Lockups and Hangs
#
# CONFIG_PANIC_ON_OOPS is not setCONFIG_PANIC_ON_OOPS_VALUE=0CONFIG_PANIC_TIMEOUT=0
# CONFIG_SOFTLOCKUP_DETECTOR is not set
# CONFIG_HARDLOCKUP_DETECTOR is not set
# CONFIG_DETECT_HUNG_TASK is not set
# CONFIG_WQ_WATCHDOG is not set
# CONFIG_TEST_LOCKUP is not set
# end of Debug Oops, Lockups and Hangs
#
# Scheduler Debugging
#CONFIG_SCHED_DEBUG=yCONFIG_SCHED_INFO=yCONFIG_SCHEDSTATS=y
# end of Scheduler Debugging
# CONFIG_DEBUG_TIMEKEEPING is not set
#
# Lock Debugging (spinlocks, mutexes, etc...)
#CONFIG_LOCK_DEBUGGING_SUPPORT=y
# CONFIG_PROVE_LOCKING is not set
# CONFIG_LOCK_STAT is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
# CONFIG_DEBUG_RWSEMS is not set
# CONFIG_DEBUG_LOCK_ALLOC is not set
# CONFIG_DEBUG_ATOMIC_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_LOCK_TORTURE_TEST is not set
# CONFIG_WW_MUTEX_SELFTEST is not set
# end of Lock Debugging (spinlocks, mutexes, etc...)
CONFIG_STACKTRACE=y
# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set
# CONFIG_DEBUG_KOBJECT is not set
#
# Debug kernel data structures
#
# CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_PLIST is not set
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_BUG_ON_DATA_CORRUPTION is not set
# end of Debug kernel data structures
# CONFIG_DEBUG_CREDENTIALS is not set
#
# RCU Debugging
#
# CONFIG_RCU_PERF_TEST is not set
# CONFIG_RCU_TORTURE_TEST is not setCONFIG_RCU_CPU_STALL_TIMEOUT=60CONFIG_RCU_TRACE=y
# CONFIG_RCU_EQS_DEBUG is not set
# end of RCU Debugging
# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set
# CONFIG_LATENCYTOP is not setCONFIG_USER_STACKTRACE_SUPPORT=yCONFIG_NOP_TRACER=yCONFIG_HAVE_FUNCTION_TRACER=yCONFIG_HAVE_FUNCTION_GRAPH_TRACER=yCONFIG_HAVE_DYNAMIC_FTRACE=yCONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=yCONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=yCONFIG_HAVE_FTRACE_MCOUNT_RECORD=yCONFIG_HAVE_SYSCALL_TRACEPOINTS=yCONFIG_HAVE_FENTRY=yCONFIG_HAVE_C_RECORDMCOUNT=yCONFIG_TRACER_MAX_TRACE=yCONFIG_TRACE_CLOCK=yCONFIG_RING_BUFFER=yCONFIG_EVENT_TRACING=yCONFIG_CONTEXT_SWITCH_TRACER=yCONFIG_TRACING=yCONFIG_GENERIC_TRACER=yCONFIG_TRACING_SUPPORT=yCONFIG_FTRACE=y
# CONFIG_BOOTTIME_TRACING is not setCONFIG_FUNCTION_TRACER=yCONFIG_FUNCTION_GRAPH_TRACER=yCONFIG_DYNAMIC_FTRACE=yCONFIG_DYNAMIC_FTRACE_WITH_REGS=yCONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=yCONFIG_FUNCTION_PROFILER=yCONFIG_STACK_TRACER=y
# CONFIG_IRQSOFF_TRACER is not setCONFIG_SCHED_TRACER=y
# CONFIG_HWLAT_TRACER is not setCONFIG_MMIOTRACE=yCONFIG_FTRACE_SYSCALLS=yCONFIG_TRACER_SNAPSHOT=y
# CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP is not setCONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not setCONFIG_BLK_DEV_IO_TRACE=yCONFIG_KPROBE_EVENTS=y
# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not setCONFIG_UPROBE_EVENTS=yCONFIG_BPF_EVENTS=yCONFIG_DYNAMIC_EVENTS=yCONFIG_PROBE_EVENTS=y
# CONFIG_BPF_KPROBE_OVERRIDE is not setCONFIG_FTRACE_MCOUNT_RECORD=y
# CONFIG_SYNTH_EVENTS is not set
# CONFIG_HIST_TRIGGERS is not set
# CONFIG_TRACE_EVENT_INJECT is not set
# CONFIG_TRACEPOINT_BENCHMARK is not setCONFIG_RING_BUFFER_BENCHMARK=m
# CONFIG_TRACE_EVAL_MAP_FILE is not set
# CONFIG_FTRACE_STARTUP_TEST is not set
# CONFIG_RING_BUFFER_STARTUP_TEST is not set
# CONFIG_MMIOTRACE_TEST is not set
# CONFIG_PREEMPTIRQ_DELAY_TEST is not set
# CONFIG_KPROBE_EVENT_GEN_TEST is not setCONFIG_PROVIDE_OHCI1394_DMA_INIT=y
# CONFIG_SAMPLES is not setCONFIG_HAVE_KCSAN_COMPILER=yCONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=yCONFIG_STRICT_DEVMEM=yCONFIG_IO_STRICT_DEVMEM=y
#
# x86 Debugging # CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_X86_VERBOSE_BOOTUP is not set CONFIG_EARLY_PRINTK=y # CONFIG_EARLY_PRINTK_DBGP is not set # CONFIG_EARLY_PRINTK_USB_XDBC is not set # CONFIG_DEBUG_TLBFLUSH is not set CONFIG_HAVE_MMIOTRACE_SUPPORT=y # CONFIG_X86_DECODER_SELFTEST is not set CONFIG_IO_DELAY_0X80=y # CONFIG_IO_DELAY_0XED is not set # CONFIG_IO_DELAY_UDELAY is not set # CONFIG_IO_DELAY_NONE is not set # CONFIG_DEBUG_BOOT_PARAMS is not set # CONFIG_CPA_DEBUG is not set # CONFIG_DEBUG_ENTRY is not set # CONFIG_DEBUG_NMI_SELFTEST is not set # CONFIG_X86_DEBUG_FPU is not set # CONFIG_PUNIT_ATOM_DEBUG is not set CONFIG_UNWINDER_FRAME_POINTER=y # CONFIG_UNWINDER_GUESS is not set # end of x86 Debugging
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
# CONFIG_NOTIFIER_ERROR_INJECTION is not setCONFIG_FUNCTION_ERROR_INJECTION=y
# CONFIG_FAULT_INJECTION is not setCONFIG_CC_HAS_SANCOV_TRACE_PC=y
# CONFIG_RUNTIME_TESTING_MENU is not set
# CONFIG_MEMTEST is not set
# end of Kernel Testing and Coverage # end of Kernel hacking
Sami Tolvanen
maintainerv2 cover Add support for Clang LTO
In reply to Sami TolvanenThis patch series adds support for building x86_64 and arm64 kernels with Clang's Link Time Optimization (LTO).
In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google has shipped millions of Pixel devices running three major kernel versions with LTO+CFI since 2018.
Most of the patches are build system changes for handling LLVM bitcode, which Clang produces with LTO instead of ELF object files, postponing ELF processing until a later stage, and ensuring initcall ordering.
Note that patches 1-4 are not directly related to LTO, but are needed to compile LTO kernels with ToT Clang, so I'm including them in the series for your convenience:
- Patches 1-3 are required for building the kernel with ToT Clang, and IAS, and patch 4 is needed to build allmodconfig with LTO.
- Patches 3-4 are already in linux-next, but not yet in 5.9-rc.
---
Changes in v2:
- Fixed -Wmissing-prototypes warnings with W=1.
- Dropped cc-option from -fsplit-lto-unit and added .thinlto-cache scrubbing to make distclean.
- Added a comment about Clang >=11 being required.
- Added a patch to disable LTO for the arm64 KVM nVHE code.
- Disabled objtool's noinstr validation with LTO unless enabled.
- Included Peter's proposed objtool mcount patch in the series and replaced recordmcount with the objtool pass to avoid whitelisting relocations that are not calls.
- Updated several commit messages with better explanations.
Arvind Sankar (2):
x86/boot/compressed: Disable relocation relaxation x86/asm: Replace __force_order with memory clobber
Luca Stefani (1):
RAS/CEC: Fix cec_init() prototype
Nick Desaulniers (1):
lib/string.c: implement stpcpy
Peter Zijlstra (1):
objtool: Add a pass for generating __mcount_loc
Sami Tolvanen (23):
objtool: Don't autodetect vmlinux.o
kbuild: add support for objtool mcount
x86, build: use objtool mcount
kbuild: add support for Clang LTO
kbuild: lto: fix module versioning
kbuild: lto: postpone objtool
kbuild: lto: limit inlining
kbuild: lto: merge module sections
kbuild: lto: remove duplicate dependencies from .mod files
init: lto: ensure initcall ordering
init: lto: fix PREL32 relocations
PCI: Fix PREL32 relocations for LTO
modpost: lto: strip .lto from module names scripts/mod: disable LTO for empty.c efi/libstub: disable LTO
drivers/misc/lkdtm: disable LTO for rodata.o
arm64: export CC_USING_PATCHABLE_FUNCTION_ENTRY
arm64: vdso: disable LTO
KVM: arm64: disable LTO for the nVHE directory
arm64: allow LTO_CLANG and THINLTO to be selected x86, vdso: disable LTO only for vDSO
x86, relocs: Ignore L4_PAGE_OFFSET relocations x86, build: allow LTO_CLANG and THINLTO to be selected
.gitignore | 1 + Makefile | 65 ++++++- arch/Kconfig | 67 +++++++ arch/arm64/Kconfig | 2 + arch/arm64/Makefile | 1 + arch/arm64/kernel/vdso/Makefile | 4 +- arch/arm64/kvm/hyp/nvhe/Makefile | 4 +- arch/x86/Kconfig | 3 + arch/x86/Makefile | 5 + arch/x86/boot/compressed/Makefile | 2 + arch/x86/boot/compressed/pgtable_64.c | 9 - arch/x86/entry/vdso/Makefile | 5 +- arch/x86/include/asm/special_insns.h | 28 +-- arch/x86/kernel/cpu/common.c | 4 +- arch/x86/tools/relocs.c | 1 + drivers/firmware/efi/libstub/Makefile | 2 + drivers/misc/lkdtm/Makefile | 1 + drivers/ras/cec.c | 9 +- include/asm-generic/vmlinux.lds.h | 11 +- include/linux/init.h | 79 +++++++- include/linux/pci.h | 19 +- kernel/trace/Kconfig | 5 + lib/string.c | 24 +++ scripts/Makefile.build | 55 +++++- scripts/Makefile.lib | 6 +- scripts/Makefile.modfinal | 31 ++- scripts/Makefile.modpost | 26 ++- scripts/generate_initcall_order.pl | 270 ++++++++++++++++++++++++++ scripts/link-vmlinux.sh | 94 ++++++++- scripts/mod/Makefile | 1 + scripts/mod/modpost.c | 16 +- scripts/mod/modpost.h | 9 + scripts/mod/sumversion.c | 6 +- scripts/module-lto.lds | 26 +++ tools/objtool/builtin-check.c | 13 +- tools/objtool/builtin.h | 2 +- tools/objtool/check.c | 83 ++++++++ tools/objtool/check.h | 1 + tools/objtool/objtool.h | 1 + 39 files changed, 883 insertions(+), 108 deletions(-) create mode 100755 scripts/generate_initcall_order.pl create mode 100644 scripts/module-lto.lds
base-commit: e28f0104343d0c132fa37f479870c9e43355fee4
Signature · 1 line
2.28.0.402.g5ffc5be6b7-goog
Sami Tolvanen
maintainerPATCH v2 1/28 x86/boot/compressed: Disable relocation relaxation
From: Arvind Sankar <[email protected]>
The x86-64 psABI [0] specifies special relocation types (R_X86_64_[REX_]GOTPCRELX) for indirection through the Global Offset Table, semantically equivalent to R_X86_64_GOTPCREL, which the linker can take advantage of for optimization (relaxation) at link time. This is supported by LLD and binutils versions 2.26 onwards.
The compressed kernel is position-independent code, however, when using LLD or binutils versions before 2.27, it must be linked without the -pie option. In this case, the linker may optimize certain instructions into a non-position-independent form, by converting foo@GOTPCREL(%rip) to $foo.
This potential issue has been present with LLD and binutils-2.26 for a long time, but it has never manifested itself before now:
- LLD and binutils-2.26 only relax
movq foo@GOTPCREL(%rip), %reg
to
leaq foo(%rip), %reg which is still position-independent, rather than mov $foo, %reg
which is permitted by the psABI when -pie is not enabled.
- gcc happens to only generate GOTPCREL relocations on mov instructions.
- clang does generate GOTPCREL relocations on non-mov instructions, but when building the compressed kernel, it uses its integrated assembler (due to the redefinition of KBUILD_CFLAGS dropping -no-integrated-as), which has so far defaulted to not generating the GOTPCRELX relocations.
Nick Desaulniers reports [1,2]:
A recent change [3] to a default value of configuration variable (ENABLE_X86_RELAX_RELOCATIONS OFF -> ON) in LLVM now causes Clang's integrated assembler to emit R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX relocations. LLD will relax instructions with these relocations based on whether the image is being linked as position independent or not. When not, then LLD will relax these instructions to use absolute addressing mode (R_RELAX_GOT_PC_NOPIC). This causes kernels built with Clang and linked with LLD to fail to boot.
Patch series [4] is a solution to allow the compressed kernel to be linked with -pie unconditionally, but even if merged is unlikely to be backported. As a simple solution that can be applied to stable as well, prevent the assembler from generating the relaxed relocation types using the -mrelax-relocations=no option. For ease of backporting, do this unconditionally.
[0] https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/linker-optimization.tex#L65
[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://github.com/ClangBuiltLinux/linux/issues/1121
[3] https://reviews.llvm.org/rGc41a18cf61790fc898dcda1055c3efbf442c14c0
[4] https://lore.kernel.org/lkml/[email protected]/
--- arch/x86/boot/compressed/Makefile | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/boot/compressed/Makefile +2 -0
@@ -43,6 +43,8 @@ KBUILD_CFLAGS += -Wno-pointer-sign KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += -D__DISABLE_EXPORTS +# Disable relocation relaxation in case the link is not PIE. +KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mrelax-relocations=no) KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ GCOV_PROFILE := n
Signature · 1 line
2.28.0.402.g5ffc5be6b7-goog
Re: [PATCH v2 01/28] x86/boot/compressed: Disable relocation relaxation
Quoted 46 lines · Sami Tolvanen
From: Arvind Sankar <[email protected]>
The x86-64 psABI [0] specifies special relocation types (R_X86_64_[REX_]GOTPCRELX) for indirection through the Global Offset Table, semantically equivalent to
R_X86_64_GOTPCREL, which the linker can take advantage of for optimization (relaxation) at link time. This is supported by LLD and binutils versions 2.26 onwards.The compressed kernel is position-independent code, however, when using LLD or binutils versions before 2.27, it must be linked without the -pie option. In this case, the linker may optimize certain instructions into a non-position-independent form, by converting foo@GOTPCREL(%rip) to $foo.
This potential issue has been present with LLD and binutils-2.26 for a long time, but it has never manifested itself before now:
- LLD and binutils-2.26 only relax
movq foo@GOTPCREL(%rip), %reg
toleaq foo(%rip), %reg which is still position-independent, rather than mov $foo, %regwhich is permitted by the psABI when -pie is not enabled.
- gcc happens to only generate GOTPCREL relocations on mov instructions.
- clang does generate GOTPCREL relocations on non-mov instructions, but when building the compressed kernel, it uses its integrated assembler (due to the redefinition ofKBUILD_CFLAGSdropping -no-integrated-as), which has so far defaulted to not generating the GOTPCRELX relocations.Nick Desaulniers reports [1,2]:
A recent change [3] to a default value of configuration variable (ENABLE_X86_RELAX_RELOCATIONSOFF -> ON) in LLVM now causes Clang's integrated assembler to emit R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX relocations. LLD will relax instructions with these relocations based on whether the image is being linked as position independent or not. When not, then LLD will relax these instructions to use absolute addressing mode (R_RELAX_GOT_PC_NOPIC). This causes kernels built with Clang and linked with LLD to fail to boot.Patch series [4] is a solution to allow the compressed kernel to be linked with -pie unconditionally, but even if merged is unlikely to be backported. As a simple solution that can be applied to stable as well, prevent the assembler from generating the relaxed relocation types using the -mrelax-relocations=no option. For ease of backporting, do this unconditionally.
Quoted 8 lines
[0] https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/linker-optimization.tex#L65
[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://github.com/ClangBuiltLinux/linux/issues/1121
[3] https://reviews.llvm.org/rGc41a18cf61790fc898dcda1055c3efbf442c14c0
[4] https://lore.kernel.org/lkml/[email protected]/Reported-by Nick Desaulniers <[email protected]>Signed-off-by Arvind Sankar <[email protected]>
Signature · 1 line
Kees Cook
Re: [PATCH v2 01/28] x86/boot/compressed: Disable relocation relaxation
Quoted 16 lines · Kees Cook
Quoted 15 lines · Sami Tolvanen
From: Arvind Sankar <[email protected]>
Patch series [4] is a solution to allow the compressed kernel to be linked with -pie unconditionally, but even if merged is unlikely to be backported. As a simple solution that can be applied to stable as well, prevent the assembler from generating the relaxed relocation types using the -mrelax-relocations=no option. For ease of backporting, do this unconditionally.
[0] https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/linker-optimization.tex#L65
[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://github.com/ClangBuiltLinux/linux/issues/1121
[3] https://reviews.llvm.org/rGc41a18cf61790fc898dcda1055c3efbf442c14c0
[4] https://lore.kernel.org/lkml/[email protected]/
Quoted 7 lines
Quoted 2 lines
Reported-by Nick Desaulniers <[email protected]>Signed-off-by Arvind Sankar <[email protected]>Reviewed-by Kees Cook <[email protected]>Signature · 1 line
Kees Cook
Note that since [4] is now in tip, assuming it doesn't get dropped for some reason, this patch isn't necessary unless you need to backport this LTO series to 5.9 or below.
Thanks.
Re: [PATCH v2 01/28] x86/boot/compressed: Disable relocation relaxation
Quoted 22 lines · Arvind Sankar
Quoted 21 lines · Kees Cook
Quoted 9 lines · Sami Tolvanen
From: Arvind Sankar <[email protected]>
Patch series [4] is a solution to allow the compressed kernel to be linked with -pie unconditionally, but even if merged is unlikely to be backported. As a simple solution that can be applied to stable as well, prevent the assembler from generating the relaxed relocation types using the -mrelax-relocations=no option. For ease of backporting, do this unconditionally.
Quoted 8 lines
[0] https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/linker-optimization.tex#L65
[1] https://lore.kernel.org/lkml/[email protected]/
[2] https://github.com/ClangBuiltLinux/linux/issues/1121
[3] https://reviews.llvm.org/rGc41a18cf61790fc898dcda1055c3efbf442c14c0
[4] https://lore.kernel.org/lkml/[email protected]/Reported-by Nick Desaulniers <[email protected]>Signed-off-by Arvind Sankar <[email protected]>Reviewed-by Kees Cook <[email protected]>
Quoted 8 lines
Quoted 2 lines
Signature · 1 line
Kees CookNote that since [4] is now in tip, assuming it doesn't get dropped for some reason, this patch isn't necessary unless you need to backport this LTO series to 5.9 or below.
Thanks.
It is still necessary for tip of tree LLVM to work properly (specifically clang and ld.lld) regardless of whether or not LTO is used.
[4] also fixes it but I don't think it can be backported to stable so it would still be nice to get it picked up so that it can be sent back there. We have been carrying it in our CI for a decent amount of time...
Cheers,
Nathan
Sasha Levin
maintainerRe: [PATCH v2 01/28] x86/boot/compressed: Disable relocation relaxation
In reply to Sami TolvanenHi
[This is an automated email]
This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all
The bot has tested the following trees: v5.8.6, v5.4.62, v4.19.143, v4.14.196, v4.9.235, v4.4.235.
v5.8.6: Failed to apply! Possible dependencies:
fb46d057db82 ("x86: Add support for ZSTD compressed kernel")
v5.4.62: Failed to apply! Possible dependencies:
003602ad5516 ("x86/*/Makefile: Use -fno-asynchronous-unwind-tables to suppress .eh_frame sections") 9e2276fa6eb3 ("arch/x86/boot: Use prefix map to avoid embedded paths") fb46d057db82 ("x86: Add support for ZSTD compressed kernel")
v4.19.143: Failed to apply! Possible dependencies:
003602ad5516 ("x86/*/Makefile: Use -fno-asynchronous-unwind-tables to suppress .eh_frame sections") 30cc0b6c1220 ("doc: add boot protocol 2.13 description to Documentation/x86/boot.txt") 384184044981 ("x86/boot: Mostly revert commit ae7e1238e68f2a ("Add ACPI RSDP address to setup_header")") 9e2276fa6eb3 ("arch/x86/boot: Use prefix map to avoid embedded paths")
ae7e1238e68f ("x86/boot: Add ACPI RSDP address to setup_header")
c5ed311b4e31 ("x86, boot: documentation whitespace fixup")
f1f238a9f1ca ("Documentation: x86: convert boot.txt to reST")
fb46d057db82 ("x86: Add support for ZSTD compressed kernel")
v4.14.196: Failed to apply! Possible dependencies:
003602ad5516 ("x86/*/Makefile: Use -fno-asynchronous-unwind-tables to suppress .eh_frame sections") 0b3e336601b8 ("arm64: Add support for STACKLEAK gcc plugin")
1fc5dce78ad1 ("arm64/sve: Low-level SVE architectural state manipulation functions") 2d2123bc7c7f ("arm64/sve: Add prctl controls for userspace vector length management") 33b6d03469b2 ("efi: call get_event_log before ExitBootServices")
36b649760e94 ("efi: Use string literals for efi_char16_t variable initializers") 3db5e0ba8b8f ("efi/libstub: Disable some warnings for x86{,_64}")
6c3b56b19730 ("x86/boot: Disable Clang warnings about GNU extensions") 7582e22038a2 ("arm64/sve: Backend logic for setting the vector length") 9e2276fa6eb3 ("arch/x86/boot: Use prefix map to avoid embedded paths") 9e8084d3f761 ("arm64: Implement thread_struct whitelist for hardened usercopy") bc0ee4760364 ("arm64/sve: Core task context handling")
ce279d374ff3 ("efi/libstub: Only disable stackleak plugin for arm64")
dca5203e3fe2 ("x86/boot: Add -Wno-pointer-sign to KBUILD_CFLAGS")
f779ca740f25 ("efi: Make const array 'apple' static")
v4.9.235: Failed to apply! Possible dependencies:
003602ad5516 ("x86/*/Makefile: Use -fno-asynchronous-unwind-tables to suppress .eh_frame sections")
06cbbac0f57d ("x86/build: Don't use $(LINUXINCLUDE) twice")
0acba3f91823 ("x86/boot/build: Remove always empty $(USERINCLUDE)")
2959c95d510c ("efi/capsule: Add support for Quark security header")
36b649760e94 ("efi: Use string literals for efi_char16_t variable initializers")
3db5e0ba8b8f ("efi/libstub: Disable some warnings for x86{,_64}")
46cd4b75cd0e ("efi: Add device path parser")
5520b7e7d2d2 ("x86/boot/e820: Remove spurious asm/e820/api.h inclusions")
568bc4e87033 ("efi/arm*/libstub: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table")
58c5475aba67 ("x86/efi: Retrieve and assign Apple device properties")
66441bd3cfdc ("x86/boot/e820: Move asm/e820.h to asm/e820/api.h")
6c3b56b19730 ("x86/boot: Disable Clang warnings about GNU extensions")
70a9d8184cce ("x86/boot/e820: Introduce arch/x86/include/asm/e820/types.h")
846221cfb8f6 ("Remove references to dead make variable LINUX_INCLUDE")
9d2f86c6cad5 ("x86: Make E820_X_MAX unconditionally larger than E820MAX")
9e2276fa6eb3 ("arch/x86/boot: Use prefix map to avoid embedded paths")
dca5203e3fe2 ("x86/boot: Add -Wno-pointer-sign to KBUILD_CFLAGS")
f779ca740f25 ("efi: Make const array 'apple' static")v4.4.235: Failed to apply! Possible dependencies:
0acba3f91823 ("x86/boot/build: Remove always empty $(USERINCLUDE)") 21266be9ed54 ("arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug") 9e2276fa6eb3 ("arch/x86/boot: Use prefix map to avoid embedded paths") c6d308534aef ("UBSAN: run-time undefined behavior sanity checker")
NOTE: The patch will not be queued to stable trees until it is upstream.
How should we proceed with this patch?
Signature · 2 lines
Thanks Sasha
Sami Tolvanen
maintainerPATCH v2 2/28 x86/asm: Replace __force_order with memory clobber
In reply to Sami TolvanenFrom: Arvind Sankar <[email protected]>
The CRn accessor functions use __force_order as a dummy operand to prevent the compiler from reordering CRn reads/writes with respect to each other.
The fact that the asm is volatile should be enough to prevent this:
volatile asm statements should be executed in program order. However GCC 4.9.x and 5.x have a bug that might result in reordering. This was fixed in 8.1, 7.3 and 6.5. Versions prior to these, including 5.x and 4.9.x, may reorder volatile asm statements with respect to each other.
There are some issues with __force_order as implemented:
- It is used only as an input operand for the write functions, and hence doesn't do anything additional to prevent reordering writes.
- It allows memory accesses to be cached/reordered across write functions, but CRn writes affect the semantics of memory accesses, so this could be dangerous.
- __force_order is not actually defined in the kernel proper, but the LLVM toolchain can in some cases require a definition: LLVM (as well as GCC 4.9) requires it for PIE code, which is why the compressed kernel has a definition, but also the clang integrated assembler may consider the address of __force_order to be significant, resulting in a reference that requires a definition.
Fix this by:
- Using a memory clobber for the write functions to additionally prevent caching/reordering memory accesses across CRn writes.
- Using a dummy input operand with an arbitrary constant address for the read functions, instead of a global variable. This will prevent reads from being reordered across writes, while allowing memory loads to be cached/reordered across CRn reads, which should be safe.
--- arch/x86/boot/compressed/pgtable_64.c | 9 --------- arch/x86/include/asm/special_insns.h | 28 ++++++++++++++------------- arch/x86/kernel/cpu/common.c | 4 ++-- 3 files changed, 17 insertions(+), 24 deletions(-)
arch/x86/boot/compressed/pgtable_64.c +0 -9
@@ -5,15 +5,6 @@#include "pgtable.h" #include "../string.h" -/* -* __force_order is used by special_insns.h asm code to force instruction -* serialization. -* -* It is not referenced from the code, but GCC < 5 with -fPIE would fail -* due to an undefined symbol. Define it to make these ancient GCCs work. -*/ -unsigned long __force_order; -#define BIOS_START_MIN 0x20000U/* 128K, less than this is insane */ #define BIOS_START_MAX 0x9f000U/* 640K, absolute maximum */
arch/x86/include/asm/special_insns.h +15 -13
@@ -11,45 +11,47 @@#include <linux/jump_label.h> /* -* Volatile isn't enough to prevent the compiler from reordering the -* read/write functions for the control registers and messing everything up. -* A memory clobber would solve the problem, but would prevent reordering of -* all loads stores around it, which can hurt performance. Solution is to -* use a variable and mimic reads and writes to it to enforce serialization +* The compiler should not reorder volatile asm statements with respect to each +* other: they should execute in program order. However GCC 4.9.x and 5.x have +* a bug (which was fixed in 8.1, 7.3 and 6.5) where they might reorder +* volatile asm. The write functions are not affected since they have memory +* clobbers preventing reordering. To prevent reads from being reordered with +* respect to writes, use a dummy memory operand. */ -extern unsigned long __force_order; + +#define __FORCE_ORDER "m"(*(unsigned int *)0x1000UL)void native_write_cr0 (unsigned long val);static inline unsigned long native_read_cr0 (void ) {unsigned long val; - asmvolatile ("mov %%cr0,%0\n\t" :"=r" (val),"=m" (__force_order)); + asm volatile("mov %%cr0,%0\n\t" : "=r" (val) : __FORCE_ORDER);return val; }static __always_inline unsigned long native_read_cr2 (void ) {unsigned long val; - asmvolatile ("mov %%cr2,%0\n\t" :"=r" (val),"=m" (__force_order)); + asm volatile("mov %%cr2,%0\n\t" : "=r" (val) : __FORCE_ORDER);return val; } static __always_inline void native_write_cr2(unsigned long val) { - asmvolatile ("mov %0,%%cr2" : :"r" (val),"m" (__force_order)); + asmvolatile ("mov %0,%%cr2" : :"r" (val) :"memory" ); }static inline unsigned long __native_read_cr3 (void ) {unsigned long val; - asmvolatile ("mov %%cr3,%0\n\t" :"=r" (val),"=m" (__force_order)); + asm volatile("mov %%cr3,%0\n\t" : "=r" (val) : __FORCE_ORDER);return val; }static inline void native_write_cr3 (unsigned long val) { - asmvolatile ("mov %0,%%cr3" : :"r" (val),"m" (__force_order)); + asmvolatile ("mov %0,%%cr3" : :"r" (val) :"memory" ); }static inline unsigned long native_read_cr4 (void )
@@ -64,10 +66,10 @@ static inline unsigned long native_read_cr4(void) asm volatile("1: mov %%cr4, %0\n" "2:\n" _ASM_EXTABLE(1b, 2b) - : "=r" (val), "=m" (__force_order) : "0" (0)); + : "=r" (val) : "0" (0), __FORCE_ORDER); #else/* CR4 always exists on x86_64. */ - asmvolatile ("mov %%cr4,%0\n\t" :"=r" (val),"=m" (__force_order)); + asm volatile("mov %%cr4,%0\n\t" : "=r" (val) : __FORCE_ORDER);#endif return val; }
arch/x86/kernel/cpu/common.c +2 -2
@@ -359,7 +359,7 @@ void native_write_cr0(unsigned long val)unsigned long bits_missing =0 ; set_register: - asmvolatile ("mov %0,%%cr0" :"+r" (val),"+m" (__force_order)); + asmvolatile ("mov %0,%%cr0" :"+r" (val) : :"memory" );if (static_branch_likely (&cr_pinning)) {if (unlikely ((val &X86_CR0_WP ) !=X86_CR0_WP )) {
@@ -378,7 +378,7 @@ void native_write_cr4(unsigned long val)unsigned long bits_changed =0 ; set_register: - asmvolatile ("mov %0,%%cr4" :"+r" (val),"+m" (cr4_pinned_bits)); + asmvolatile ("mov %0,%%cr4" :"+r" (val) : :"memory" );if (static_branch_likely (&cr_pinning)) {if (unlikely ((val & cr4_pinned_mask) != cr4_pinned_bits)) {
Signature · 1 line
2.28.0.402.g5ffc5be6b7-goog
Re: [PATCH v2 02/28] x86/asm: Replace __force_order with memory clobber
Quoted 33 lines · Sami Tolvanen
From: Arvind Sankar <[email protected]>
The CRn accessor functions use
__force_orderas a dummy operand to prevent the compiler from reordering CRn reads/writes with respect to each other.The fact that the asm is volatile should be enough to prevent this:
volatile asm statements should be executed in program order. However GCC 4.9.x and 5.x have a bug that might result in reordering. This was fixed in 8.1, 7.3 and 6.5. Versions prior to these, including 5.x and 4.9.x, may reorder volatile asm statements with respect to each other.There are some issues with
__force_orderas implemented:
- It is used only as an input operand for the write functions, and hence doesn't do anything additional to prevent reordering writes.
- It allows memory accesses to be cached/reordered across write functions, but CRn writes affect the semantics of memory accesses, so this could be dangerous.
-__force_orderis not actually defined in the kernel proper, but the LLVM toolchain can in some cases require a definition: LLVM (as well as GCC 4.9) requires it for PIE code, which is why the compressed kernel has a definition, but also the clang integrated assembler may consider the address of__force_orderto be significant, resulting in a reference that requires a definition.Fix this by:
- Using a memory clobber for the write functions to additionally prevent caching/reordering memory accesses across CRn writes.
- Using a dummy input operand with an arbitrary constant address for the read functions, instead of a global variable. This will prevent reads from being reordered across writes, while allowing memory loads to be cached/reordered across CRn reads, which should be safe.
Quoted 1 line
Signed-off-by Arvind Sankar <[email protected]>
In the primary thread for this patch I sent a Reviewed tag, but for good measure, here it is again:
Signature · 1 line
Kees Cook
Sami Tolvanen
maintainerPATCH v2 3/28 lib/string.c: implement stpcpy
In reply to Sami TolvanenFrom: Nick Desaulniers <[email protected]>
LLVM implemented a recent "libcall optimization" that lowers calls to sprintf(dest, "%s", str) where the return value is used to stpcpy(dest, str) - dest. This generally avoids the machinery involved in parsing format strings. stpcpy is just like strcpy except it returns the pointer to the new tail of dest. This optimization was introduced into clang-12.
Implement this so that we don't observe linkage failures due to missing symbol definitions for stpcpy.
Similar to last year's fire drill with:
commit 5f074f3e192f ("lib/string.c: implement a basic bcmp")
The kernel is somewhere between a "freestanding" environment (no full libc) and "hosted" environment (many symbols from libc exist with the same type, function signature, and semantics).
As H. Peter Anvin notes, there's not really a great way to inform the compiler that you're targeting a freestanding environment but would like to opt-in to some libcall optimizations (see pr/47280 below), rather than opt-out.
Arvind notes, -fno-builtin-* behaves slightly differently between GCC and Clang, and Clang is missing many __builtin_* definitions, which I consider a bug in Clang and am working on fixing.
Masahiro summarizes the subtle distinction between compilers justly:
To prevent transformation from foo() into bar(), there are two ways in Clang to do that; -fno-builtin-foo, and -fno-builtin-bar. There is only one in GCC; -fno-buitin-foo.
(Any difference in that behavior in Clang is likely a bug from a missing __builtin_* definition.)
Masahiro also notes:
We want to disable optimization from foo() to bar(),
but we may still benefit from the optimization from foo() into something else. If GCC implements the same transform, we would run into a problem because it is not -fno-builtin-bar, but -fno-builtin-foo that disables that optimization.
In this regard, -fno-builtin-foo would be more future-proof than -fno-built-bar, but -fno-builtin-foo is still potentially overkill. We may want to prevent calls from foo() being optimized into calls to bar(), but we still may want other optimization on calls to foo().
It seems that compilers today don't quite provide the fine grain control over which libcall optimizations pseudo-freestanding environments would prefer.
Finally, Kees notes that this interface is unsafe, so we should not encourage its use. As such, I've removed the declaration from any header, but it still needs to be exported to avoid linkage errors in modules.
--- lib/string.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
lib/string.c +24 -0
@@ -272,6 +272,30 @@ ssize_t strscpy_pad(char *dest, const char *src, size_t count) }EXPORT_SYMBOL (strscpy_pad); +/** +* stpcpy - copy a string from src to dest returning a pointer to the new end +* of dest, including src's %NUL-terminator. May overrun dest. +* @dest: pointer to end of string being copied into. Must be large enough +* to receive copy. +* @src: pointer to the beginning of string being copied from. Must not overlap +* dest. +* +* stpcpy differs from strcpy in a key way: the return value is the new +* %NUL-terminated character. (for strcpy, the return value is a pointer to +* src. This interface is considered unsafe as it doesn't perform bounds +* checking of the inputs. As such it's not recommended for usage. Instead, +* its definition is provided in case the compiler lowers other libcalls to +* stpcpy. +*/ +char *stpcpy (char *__restrict__ dest,const char *__restrict__ src); +char *stpcpy (char *__restrict__ dest,const char *__restrict__ src) +{ +while ((*dest++ = *src++) !='\0' ) +/* nothing */ ; +return --dest; +} +EXPORT_SYMBOL (stpcpy); +#ifndef __HAVE_ARCH_STRCAT/** * strcat - Append one %NUL-terminated string to another
Signature · 1 line
2.28.0.402.g5ffc5be6b7-goog
Re: [PATCH v2 03/28] lib/string.c: implement stpcpy
Quoted 57 lines · Sami Tolvanen
From: Nick Desaulniers <[email protected]>
LLVM implemented a recent "libcall optimization" that lowers calls to
sprintf(dest, "%s", str)where the return value is used tostpcpy(dest, str) - dest. This generally avoids the machinery involved in parsing format strings.stpcpyis just likestrcpyexcept it returns the pointer to the new tail ofdest. This optimization was introduced into clang-12.Implement this so that we don't observe linkage failures due to missing symbol definitions for
stpcpy.Similar to last year's fire drill with:
commit5f074f3e192f("lib/string.c: implement a basic bcmp")The kernel is somewhere between a "freestanding" environment (no full libc) and "hosted" environment (many symbols from libc exist with the same type, function signature, and semantics).
As H. Peter Anvin notes, there's not really a great way to inform the compiler that you're targeting a freestanding environment but would like to opt-in to some libcall optimizations (see pr/47280 below), rather than opt-out.
Arvind notes, -fno-builtin-* behaves slightly differently between GCC and Clang, and Clang is missing many __builtin_* definitions, which I consider a bug in Clang and am working on fixing.
Masahiro summarizes the subtle distinction between compilers justly:
To prevent transformation fromfoo()intobar(), there are two ways in Clang to do that; -fno-builtin-foo, and -fno-builtin-bar. There is only one in GCC; -fno-buitin-foo.(Any difference in that behavior in Clang is likely a bug from a missing __builtin_* definition.)
Masahiro also notes:
We want to disable optimization fromfoo()tobar(),
but we may still benefit from the optimization fromfoo()into something else. If GCC implements the same transform, we would run into a problem because it is not -fno-builtin-bar, but -fno-builtin-foo that disables that optimization.In this regard, -fno-builtin-foo would be more future-proof than -fno-built-bar, but -fno-builtin-foo is still potentially overkill. We may want to prevent calls from
foo()being optimized into calls tobar(), but we still may want other optimization on calls tofoo().It seems that compilers today don't quite provide the fine grain control over which libcall optimizations pseudo-freestanding environments would prefer.
Finally, Kees notes that this interface is unsafe, so we should not encourage its use. As such, I've removed the declaration from any header, but it still needs to be exported to avoid linkage errors in modules.
Quoted 7 lines
Reported-by Sami Tolvanen <[email protected]>Suggested-by Andy Lavr <[email protected]>Suggested-by Arvind Sankar <[email protected]>Suggested-by Joe Perches <[email protected]>Suggested-by Masahiro Yamada <[email protected]>Suggested-by Rasmus Villemoes <[email protected]>Signed-off-by Nick Desaulniers <[email protected]>
As you mentioned, this is in -next already (via -mm). I think I sent a tag for this before, but maybe akpm missed it, so for good measure:
Signature · 1 line
Kees Cook
Sasha Levin
maintainerRe: [PATCH v2 03/28] lib/string.c: implement stpcpy
In reply to Sami TolvanenHi
[This is an automated email]
This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all
The bot has tested the following trees: v5.8.6, v5.4.62, v4.19.143, v4.14.196, v4.9.235, v4.4.235.
v5.8.6: Build OK!
v5.4.62: Build OK!
v4.19.143: Failed to apply! Possible dependencies:
458a3bf82df4 ("lib/string: Add strscpy_pad() function")v4.14.196: Failed to apply! Possible dependencies:
458a3bf82df4 ("lib/string: Add strscpy_pad() function")v4.9.235: Failed to apply! Possible dependencies:
458a3bf82df4 ("lib/string: Add strscpy_pad() function")v4.4.235: Failed to apply! Possible dependencies:
458a3bf82df4 ("lib/string: Add strscpy_pad() function")NOTE: The patch will not be queued to stable trees until it is upstream.
How should we proceed with this patch?
Signature · 2 lines
Thanks Sasha
Sami Tolvanen
maintainerPATCH v2 4/28 RAS/CEC: Fix cec_init() prototype
In reply to Sami TolvanenFrom: Luca Stefani <[email protected]>
late_initcall() expects a function that returns an integer. Update the function signature to match.
[ bp: Massage commit message into proper sentences. ]
--- drivers/ras/cec.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/ras/cec.c +5 -4
@@ -553,20 +553,20 @@ static struct notifier_block cec_nb = { .priority = MCE_PRIO_CEC, }; -static void __init cec_init (void ) +static int __init cec_init (void ) {if (ce_arr.disabled) -return ; +return -ENODEV ; ce_arr.array = (void *)get_zeroed_page (GFP_KERNEL );if (!ce_arr.array) {pr_err ("Error allocating CE array page!\n" ); -return ; +return -ENOMEM ; }if (create_debugfs_nodes ()) {free_page ((unsigned long )ce_arr.array); -return ; +return -ENOMEM ; }INIT_DELAYED_WORK (&cec_work, cec_work_fn);
@@ -575,6 +575,7 @@ static void __init cec_init(void)mce_register_decode_chain (&cec_nb);pr_info ("Correctable Errors collector initialized.\n" ); +return 0 ; }late_initcall (cec_init);
Signature · 1 line
2.28.0.402.g5ffc5be6b7-goog
Re: [PATCH v2 04/28] RAS/CEC: Fix cec_init() prototype
Quoted 9 lines · Sami Tolvanen
From: Luca Stefani <[email protected]>
late_initcall()expects a function that returns an integer. Update the function signature to match.[ bp: Massage commit message into proper sentences. ]
Fixes 9554bfe403nd ("x86/mce: Convert the CEC to use the MCE notifier")Signed-off-by Luca Stefani <[email protected]>
I don't see this in -next yet (next-20200903), but given Boris's SoB, I suspect it just hasn't snuck it's way there from -tip. Regardless:
Signature · 1 line
Kees Cook
Sami Tolvanen
maintainerPATCH v2 5/28 objtool: Add a pass for generating __mcount_loc
In reply to Sami TolvanenFrom: Peter Zijlstra <[email protected]>
Add the --mcount option for generating __mcount_loc sections needed for dynamic ftrace. Using this pass requires the kernel to be compiled with -mfentry and CC_USING_NOP_MCOUNT to be defined in Makefile.
[Sami: rebased to mainline, dropped config changes, fixed to actually use
--mcount, and wrote a commit message.]
--- tools/objtool/builtin-check.c | 3 +- tools/objtool/builtin.h | 2 +- tools/objtool/check.c | 83 +++++++++++++++++++++++++++++++++++ tools/objtool/check.h | 1 + tools/objtool/objtool.h | 1 + 5 files changed, 88 insertions(+), 2 deletions(-)
tools/objtool/builtin-check.c +2 -1
@@ -18,7 +18,7 @@#include "builtin.h" #include "objtool.h" -bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux; +bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, mcount;static const char *const check_usage[] = {"objtool check [<options>] file.o" ,
@@ -35,6 +35,7 @@ const struct option check_options[] = {OPT_BOOLEAN ('s' ,"stats" , &stats,"print statistics" ),OPT_BOOLEAN ('d' ,"duplicate" , &validate_dup,"duplicate validation for vmlinux.o" ),OPT_BOOLEAN ('l' ,"vmlinux" , &vmlinux,"vmlinux.o validation" ), +OPT_BOOLEAN ('M' ,"mcount" , &mcount,"generate __mcount_loc" ), OPT_END(), };
tools/objtool/builtin.h +1 -1
@@ -8,7 +8,7 @@#include <subcmd/parse-options.h> extern const struct option check_options[]; -extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux; +extern bool no_fp, no_unreachable, retpoline, module, backtrace, uaccess, stats, validate_dup, vmlinux, mcount;extern int cmd_check (int argc,const char **argv);extern int cmd_orc (int argc,const char **argv);
tools/objtool/check.c +83 -0
107 lines not on this page · raw message
tools/objtool/check.h +1 -0
@@ -22,6 +22,7 @@ struct insn_state {struct instruction {struct list_head list;struct hlist_node hash; +struct list_head mcount_loc_node;struct section *sec;unsigned long offset;unsigned int len;
tools/objtool/objtool.h +1 -0
@@ -16,6 +16,7 @@ struct objtool_file {struct elf *elf;struct list_head insn_list;DECLARE_HASHTABLE (insn_hash,20 ); +struct list_head mcount_loc_list;bool ignore_unreachables, c_file, hints, rodata; };
Signature · 1 line
2.28.0.402.g5ffc5be6b7-goog
Re: [PATCH v2 05/28] objtool: Add a pass for generating __mcount_loc
Quoted 9 lines · Sami Tolvanen
From: Peter Zijlstra <[email protected]>
Add the --mcount option for generating
__mcount_locsections needed for dynamic ftrace. Using this pass requires the kernel to be compiled with -mfentry andCC_USING_NOP_MCOUNTto be defined inMakefile.
Hmm, I'm not sure why this hasn't gotten picked up yet. Is this expected to go through -tip or something else?
Signature · 1 line
Kees Cook
Sami Tolvanen
maintainerRe: [PATCH v2 05/28] objtool: Add a pass for generating __mcount_loc
Quoted 9 lines · Kees Cook
Quoted 7 lines · Sami Tolvanen
From: Peter Zijlstra <[email protected]>
Add the --mcount option for generating
__mcount_locsections needed for dynamic ftrace. Using this pass requires the kernel to be compiled with -mfentry andCC_USING_NOP_MCOUNTto be defined inMakefile.
Quoted 5 lines
Quoted 2 lines
Hmm, I'm not sure why this hasn't gotten picked up yet. Is this expected to go through -tip or something else?
Note that I picked up this patch from Peter's original email, to which I included a link in the commit message, but it wasn't officially submitted as a patch. However, the previous discussion seems to have died, so I included the patch in this series, as it cleanly solves the problem of whitelisting non-call references to __fentry__. I was hoping for Peter and Steven to comment on how they prefer to proceed here.
Sami