Skip to content

Commit 8b70545

Browse files
committed
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
2 parents ecf9b7b + 2d17bd2 commit 8b70545

File tree

6 files changed

+20
-15
lines changed

6 files changed

+20
-15
lines changed

arch/x86/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ boot/compressed/vmlinux
33
tools/test_get_len
44
tools/insn_sanity
55
tools/insn_decoder_test
6-
purgatory/kexec-purgatory.c
76
purgatory/purgatory.ro
8-

arch/x86/Kconfig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,8 @@ config PGTABLE_LEVELS
392392

393393
config CC_HAS_SANE_STACKPROTECTOR
394394
bool
395-
default $(success,$(srctree)/scripts/gcc-x86_64-has-stack-protector.sh $(CC)) if 64BIT
396-
default $(success,$(srctree)/scripts/gcc-x86_32-has-stack-protector.sh $(CC))
395+
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) $(CLANG_FLAGS))
397397
help
398398
We have to make sure stack protector is unconditionally disabled if
399399
the compiler produces broken code or if it does not let us control
@@ -2010,7 +2010,6 @@ config KEXEC
20102010
config KEXEC_FILE
20112011
bool "kexec file based system call"
20122012
select KEXEC_CORE
2013-
select BUILD_BIN2C
20142013
depends on X86_64
20152014
depends on CRYPTO=y
20162015
depends on CRYPTO_SHA256=y

arch/x86/kernel/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ KASAN_SANITIZE_sev.o := n
3434
# by several compilation units. To be safe, disable all instrumentation.
3535
KCSAN_SANITIZE := n
3636

37-
OBJECT_FILES_NON_STANDARD_test_nx.o := y
38-
3937
# If instrumentation of this dir is enabled, boot hangs during first second.
4038
# Probably could be more selective here, but note that files related to irqs,
4139
# boot, dumpstack/stacktrace, etc are either non-interesting or can lead to

arch/x86/purgatory/Makefile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,6 @@ $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
7373
$(obj)/purgatory.chk: $(obj)/purgatory.ro FORCE
7474
$(call if_changed,ld)
7575

76-
targets += kexec-purgatory.c
76+
$(obj)/kexec-purgatory.o: $(obj)/purgatory.ro $(obj)/purgatory.chk
7777

78-
quiet_cmd_bin2c = BIN2C $@
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-
84-
obj-$(CONFIG_KEXEC_FILE) += kexec-purgatory.o
78+
obj-y += kexec-purgatory.o

arch/x86/purgatory/kexec-purgatory.S

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
.section .rodata, "a"
4+
5+
.align 8
6+
kexec_purgatory:
7+
.globl kexec_purgatory
8+
.incbin "arch/x86/purgatory/purgatory.ro"
9+
.Lkexec_purgatory_end:
10+
11+
.align 8
12+
kexec_purgatory_size:
13+
.globl kexec_purgatory_size
14+
.quad .Lkexec_purgatory_end - kexec_purgatory

scripts/remove-stale-files

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ if [ -n "${building_out_of_srctree}" ]; then
4141
fi
4242

4343
rm -f scripts/extract-cert
44+
45+
rm -f arch/x86/purgatory/kexec-purgatory.c

0 commit comments

Comments
 (0)