History

Merge tag 'x86_build_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 build updates from Borislav Petkov: - Fix stack protector builds when cross compiling with Clang - Other Kbuild improvements and fixes * tag 'x86_build_for_v6.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/purgatory: Omit use of bin2c x86/purgatory: Hard-code obj-y in Makefile x86/build: Remove unused OBJECT_FILES_NON_STANDARD_test_nx.o x86/Kconfig: Fix CONFIG_CC_HAS_SANE_STACKPROTECTOR when cross compiling with clang

Linus Torvalds committed 4 years ago

Commit 8b705452 parents ecf9b7b 2d17bd26 files · +20 −15Browse files

Unified · Split

6 files
  1. arch/x86/.gitignore +0 −2
  2. arch/x86/Kconfig +2 −3
  3. arch/x86/kernel/Makefile +0 −2
  4. arch/x86/purgatory/Makefile +2 −8
  5. arch/x86/purgatory/kexec-purgatory.S +14 −0
  6. scripts/remove-stale-files +2 −0
arch/x86/.gitignore+0−2
@@ -3,6 +3,4 @@ boot/compressed/vmlinux · 2 unmodified lines
3tools/test_get_len3tools/test_get_len
4tools/insn_sanity4tools/insn_sanity
5tools/insn_decoder_test5tools/insn_decoder_test
6purgatory/kexec-purgatory.c
7purgatory/purgatory.ro6purgatory/purgatory.ro
8
arch/x86/Kconfig+2−3
@@ -392,8 +392,8 @@ config PGTABLE_LEVELS · 391 unmodified lines
392 392
393config CC_HAS_SANE_STACKPROTECTOR393config CC_HAS_SANE_STACKPROTECTOR
394 bool394 bool
395 default $(success,$(srctree)/scripts/gcc-x86_64-has-stack-protector.sh $(CC)) if 64BIT395 default $(success,$(srctree)/scripts/gcc-x86_64-has-stack-protector.sh $(CC) $(CLANG_FLAGS)) if 64BIT
396 default $(success,$(srctree)/scripts/gcc-x86_32-has-stack-protector.sh $(CC))396 default $(success,$(srctree)/scripts/gcc-x86_32-has-stack-protector.sh $(CC) $(CLANG_FLAGS))
397 help397 help
398 We have to make sure stack protector is unconditionally disabled if398 We have to make sure stack protector is unconditionally disabled if
399 the compiler produces broken code or if it does not let us control399 the compiler produces broken code or if it does not let us control
@@ -2010,7 +2010,6 @@ config KEXEC · 1610 unmodified lines
2010config KEXEC_FILE2010config KEXEC_FILE
2011 bool "kexec file based system call"2011 bool "kexec file based system call"
2012 select KEXEC_CORE2012 select KEXEC_CORE
2013 select BUILD_BIN2C
2014 depends on X86_642013 depends on X86_64
2015 depends on CRYPTO=y2014 depends on CRYPTO=y
2016 depends on CRYPTO_SHA256=y2015 depends on CRYPTO_SHA256=y
arch/x86/kernel/Makefile+0−2
@@ -34,8 +34,6 @@ KASAN_SANITIZE_sev.o := n · 33 unmodified lines
34# by several compilation units. To be safe, disable all instrumentation.34# by several compilation units. To be safe, disable all instrumentation.
35KCSAN_SANITIZE := n35KCSAN_SANITIZE := n
36 36
37OBJECT_FILES_NON_STANDARD_test_nx.o := y
38
39# If instrumentation of this dir is enabled, boot hangs during first second.37# If instrumentation of this dir is enabled, boot hangs during first second.
40# Probably could be more selective here, but note that files related to irqs,38# Probably could be more selective here, but note that files related to irqs,
41# boot, dumpstack/stacktrace, etc are either non-interesting or can lead to39# boot, dumpstack/stacktrace, etc are either non-interesting or can lead to
arch/x86/purgatory/Makefile+2−8
@@ -73,12 +73,6 @@ $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE · 72 unmodified lines
73$(obj)/purgatory.chk: $(obj)/purgatory.ro FORCE73$(obj)/purgatory.chk: $(obj)/purgatory.ro FORCE
74 $(call if_changed,ld)74 $(call if_changed,ld)
75 75
76targets += kexec-purgatory.c76$(obj)/kexec-purgatory.o: $(obj)/purgatory.ro $(obj)/purgatory.chk
77 77
78quiet_cmd_bin2c = BIN2C $@78obj-y += kexec-purgatory.o
79 cmd_bin2c = $(objtree)/scripts/bin2c kexec_purgatory < $< > $@
80
81$(obj)/kexec-purgatory.c: $(obj)/purgatory.ro $(obj)/purgatory.chk FORCE
82 $(call if_changed,bin2c)
83
84obj-$(CONFIG_KEXEC_FILE) += kexec-purgatory.o
arch/x86/purgatory/kexec-purgatory.S+14−0
@@ -0,0 +1,14 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2
3 .section .rodata, "a"
4
5 .align 8
6kexec_purgatory:
7 .globl kexec_purgatory
8 .incbin "arch/x86/purgatory/purgatory.ro"
9.Lkexec_purgatory_end:
10
11 .align 8
12kexec_purgatory_size:
13 .globl kexec_purgatory_size
14 .quad .Lkexec_purgatory_end - kexec_purgatory
scripts/remove-stale-files+2−0
@@ -41,3 +41,5 @@ if [ -n "${building_out_of_srctree}" ]; then · 40 unmodified lines
41fi41fi
42 42
43rm -f scripts/extract-cert43rm -f scripts/extract-cert
44
45rm -f arch/x86/purgatory/kexec-purgatory.c