aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-28 14:28:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-28 14:28:14 -0400
commitc38c04c630a5fb626e93b7530671a67feab9596c (patch)
tree71785da6c999336560c4f1482afc13d20acb5549
parenta8006bd915095c40098bfcb684cc2bdfb414dc0d (diff)
parent1c27f646b18fb56308dff82784ca61951bad0b48 (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: "Misc fixes: three build fixes, an unwinder fix and a microcode loader fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/AMD: Fix more fallout from CONFIG_RANDOMIZE_MEMORY=y x86: Fix export for mcount and __fentry__ x86/quirks: Hide maybe-uninitialized warning x86/build: Fix build with older GCC versions x86/unwind: Fix empty stack dereference in guess unwinder
-rw-r--r--arch/x86/entry/Makefile4
-rw-r--r--arch/x86/kernel/cpu/microcode/amd.c2
-rw-r--r--arch/x86/kernel/mcount_64.S3
-rw-r--r--arch/x86/kernel/quirks.c3
-rw-r--r--arch/x86/kernel/unwind_guess.c9
5 files changed, 14 insertions, 7 deletions
diff --git a/arch/x86/entry/Makefile b/arch/x86/entry/Makefile
index 77f28ce9c646..9976fcecd17e 100644
--- a/arch/x86/entry/Makefile
+++ b/arch/x86/entry/Makefile
@@ -5,8 +5,8 @@
5OBJECT_FILES_NON_STANDARD_entry_$(BITS).o := y 5OBJECT_FILES_NON_STANDARD_entry_$(BITS).o := y
6OBJECT_FILES_NON_STANDARD_entry_64_compat.o := y 6OBJECT_FILES_NON_STANDARD_entry_64_compat.o := y
7 7
8CFLAGS_syscall_64.o += -Wno-override-init 8CFLAGS_syscall_64.o += $(call cc-option,-Wno-override-init,)
9CFLAGS_syscall_32.o += -Wno-override-init 9CFLAGS_syscall_32.o += $(call cc-option,-Wno-override-init,)
10obj-y := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o 10obj-y := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o
11obj-y += common.o 11obj-y += common.o
12 12
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index 620ab06bcf45..017bda12caae 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -429,7 +429,7 @@ int __init save_microcode_in_initrd_amd(void)
429 * We need the physical address of the container for both bitness since 429 * We need the physical address of the container for both bitness since
430 * boot_params.hdr.ramdisk_image is a physical address. 430 * boot_params.hdr.ramdisk_image is a physical address.
431 */ 431 */
432 cont = __pa(container); 432 cont = __pa_nodebug(container);
433 cont_va = container; 433 cont_va = container;
434#endif 434#endif
435 435
diff --git a/arch/x86/kernel/mcount_64.S b/arch/x86/kernel/mcount_64.S
index efe73aacf966..7b0d3da52fb4 100644
--- a/arch/x86/kernel/mcount_64.S
+++ b/arch/x86/kernel/mcount_64.S
@@ -18,8 +18,10 @@
18 18
19#ifdef CC_USING_FENTRY 19#ifdef CC_USING_FENTRY
20# define function_hook __fentry__ 20# define function_hook __fentry__
21EXPORT_SYMBOL(__fentry__)
21#else 22#else
22# define function_hook mcount 23# define function_hook mcount
24EXPORT_SYMBOL(mcount)
23#endif 25#endif
24 26
25/* All cases save the original rbp (8 bytes) */ 27/* All cases save the original rbp (8 bytes) */
@@ -295,7 +297,6 @@ trace:
295 jmp fgraph_trace 297 jmp fgraph_trace
296END(function_hook) 298END(function_hook)
297#endif /* CONFIG_DYNAMIC_FTRACE */ 299#endif /* CONFIG_DYNAMIC_FTRACE */
298EXPORT_SYMBOL(function_hook)
299#endif /* CONFIG_FUNCTION_TRACER */ 300#endif /* CONFIG_FUNCTION_TRACER */
300 301
301#ifdef CONFIG_FUNCTION_GRAPH_TRACER 302#ifdef CONFIG_FUNCTION_GRAPH_TRACER
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index 51402a7e4ca6..0bee04d41bed 100644
--- a/arch/x86/kernel/quirks.c
+++ b/arch/x86/kernel/quirks.c
@@ -625,8 +625,6 @@ static void amd_disable_seq_and_redirect_scrub(struct pci_dev *dev)
625DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3, 625DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3,
626 amd_disable_seq_and_redirect_scrub); 626 amd_disable_seq_and_redirect_scrub);
627 627
628#endif
629
630#if defined(CONFIG_X86_64) && defined(CONFIG_X86_MCE) 628#if defined(CONFIG_X86_64) && defined(CONFIG_X86_MCE)
631#include <linux/jump_label.h> 629#include <linux/jump_label.h>
632#include <asm/string_64.h> 630#include <asm/string_64.h>
@@ -657,3 +655,4 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2fc0, quirk_intel_brickland_xeon_
657DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fc0, quirk_intel_brickland_xeon_ras_cap); 655DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fc0, quirk_intel_brickland_xeon_ras_cap);
658DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2083, quirk_intel_purley_xeon_ras_cap); 656DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2083, quirk_intel_purley_xeon_ras_cap);
659#endif 657#endif
658#endif
diff --git a/arch/x86/kernel/unwind_guess.c b/arch/x86/kernel/unwind_guess.c
index 9298993dc8b7..2d721e533cf4 100644
--- a/arch/x86/kernel/unwind_guess.c
+++ b/arch/x86/kernel/unwind_guess.c
@@ -47,7 +47,14 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task,
47 get_stack_info(first_frame, state->task, &state->stack_info, 47 get_stack_info(first_frame, state->task, &state->stack_info,
48 &state->stack_mask); 48 &state->stack_mask);
49 49
50 if (!__kernel_text_address(*first_frame)) 50 /*
51 * The caller can provide the address of the first frame directly
52 * (first_frame) or indirectly (regs->sp) to indicate which stack frame
53 * to start unwinding at. Skip ahead until we reach it.
54 */
55 if (!unwind_done(state) &&
56 (!on_stack(&state->stack_info, first_frame, sizeof(long)) ||
57 !__kernel_text_address(*first_frame)))
51 unwind_next_frame(state); 58 unwind_next_frame(state);
52} 59}
53EXPORT_SYMBOL_GPL(__unwind_start); 60EXPORT_SYMBOL_GPL(__unwind_start);