diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-09 18:09:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-09 18:09:55 -0500 |
commit | 8586ca8a214471e4573d76356aabe890bfecdc8a (patch) | |
tree | c64f9f0f8945719e67f91007cf8b369be5d8e04f | |
parent | ebbd30004d6cfa747723b3ac6ee1a97795f797ba (diff) | |
parent | ac3e233d29f7f77f28243af0132057d378d3ea58 (diff) |
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
"Three fixes: a boot parameter re-(re-)fix, a retpoline build artifact
fix and an LLVM workaround"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/vdso: Drop implicit common-page-size linker flag
x86/build: Fix compiler support check for CONFIG_RETPOLINE
x86/boot: Clear RSDP address in boot_params for broken loaders
-rw-r--r-- | arch/x86/Makefile | 10 | ||||
-rw-r--r-- | arch/x86/entry/vdso/Makefile | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/bootparam_utils.h | 1 |
3 files changed, 10 insertions, 5 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index f5d7f4134524..75ef499a66e2 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
@@ -220,9 +220,6 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables | |||
220 | 220 | ||
221 | # Avoid indirect branches in kernel to deal with Spectre | 221 | # Avoid indirect branches in kernel to deal with Spectre |
222 | ifdef CONFIG_RETPOLINE | 222 | ifdef CONFIG_RETPOLINE |
223 | ifeq ($(RETPOLINE_CFLAGS),) | ||
224 | $(error You are building kernel with non-retpoline compiler, please update your compiler.) | ||
225 | endif | ||
226 | KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) | 223 | KBUILD_CFLAGS += $(RETPOLINE_CFLAGS) |
227 | endif | 224 | endif |
228 | 225 | ||
@@ -307,6 +304,13 @@ ifndef CC_HAVE_ASM_GOTO | |||
307 | @echo Compiler lacks asm-goto support. | 304 | @echo Compiler lacks asm-goto support. |
308 | @exit 1 | 305 | @exit 1 |
309 | endif | 306 | endif |
307 | ifdef CONFIG_RETPOLINE | ||
308 | ifeq ($(RETPOLINE_CFLAGS),) | ||
309 | @echo "You are building kernel with non-retpoline compiler." >&2 | ||
310 | @echo "Please update your compiler." >&2 | ||
311 | @false | ||
312 | endif | ||
313 | endif | ||
310 | 314 | ||
311 | archclean: | 315 | archclean: |
312 | $(Q)rm -rf $(objtree)/arch/i386 | 316 | $(Q)rm -rf $(objtree)/arch/i386 |
diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile index 141d415a8c80..0624bf2266fd 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile | |||
@@ -47,7 +47,7 @@ targets += $(vdso_img_sodbg) $(vdso_img-y:%=vdso%.so) | |||
47 | CPPFLAGS_vdso.lds += -P -C | 47 | CPPFLAGS_vdso.lds += -P -C |
48 | 48 | ||
49 | VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -soname linux-vdso.so.1 --no-undefined \ | 49 | VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -soname linux-vdso.so.1 --no-undefined \ |
50 | -z max-page-size=4096 -z common-page-size=4096 | 50 | -z max-page-size=4096 |
51 | 51 | ||
52 | $(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE | 52 | $(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE |
53 | $(call if_changed,vdso) | 53 | $(call if_changed,vdso) |
@@ -98,7 +98,7 @@ CFLAGS_REMOVE_vvar.o = -pg | |||
98 | 98 | ||
99 | CPPFLAGS_vdsox32.lds = $(CPPFLAGS_vdso.lds) | 99 | CPPFLAGS_vdsox32.lds = $(CPPFLAGS_vdso.lds) |
100 | VDSO_LDFLAGS_vdsox32.lds = -m elf32_x86_64 -soname linux-vdso.so.1 \ | 100 | VDSO_LDFLAGS_vdsox32.lds = -m elf32_x86_64 -soname linux-vdso.so.1 \ |
101 | -z max-page-size=4096 -z common-page-size=4096 | 101 | -z max-page-size=4096 |
102 | 102 | ||
103 | # x32-rebranded versions | 103 | # x32-rebranded versions |
104 | vobjx32s-y := $(vobjs-y:.o=-x32.o) | 104 | vobjx32s-y := $(vobjs-y:.o=-x32.o) |
diff --git a/arch/x86/include/asm/bootparam_utils.h b/arch/x86/include/asm/bootparam_utils.h index a07ffd23e4dd..f6f6ef436599 100644 --- a/arch/x86/include/asm/bootparam_utils.h +++ b/arch/x86/include/asm/bootparam_utils.h | |||
@@ -36,6 +36,7 @@ static void sanitize_boot_params(struct boot_params *boot_params) | |||
36 | */ | 36 | */ |
37 | if (boot_params->sentinel) { | 37 | if (boot_params->sentinel) { |
38 | /* fields in boot_params are left uninitialized, clear them */ | 38 | /* fields in boot_params are left uninitialized, clear them */ |
39 | boot_params->acpi_rsdp_addr = 0; | ||
39 | memset(&boot_params->ext_ramdisk_image, 0, | 40 | memset(&boot_params->ext_ramdisk_image, 0, |
40 | (char *)&boot_params->efi_info - | 41 | (char *)&boot_params->efi_info - |
41 | (char *)&boot_params->ext_ramdisk_image); | 42 | (char *)&boot_params->ext_ramdisk_image); |