x86/urgent for v5.9-rc6
Hi Linus,
please pull the x86/urgent pile accumulated so far.
Thx.
---
The following changes since commit f4d51dffc6c01a9e94650d95ce0104964f8ae822:
Linux 5.9-rc4 (2020-09-06 17:11:40 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tags/x86_urgent_for_v5.9_rc6
for you to fetch changes up to 6f9885a36c006d798319661fa849f9c2922223b9:
x86/unwind/fp: Fix FP unwinding in ret_from_fork (2020-09-18 09:59:40 +0200)
----------------------------------------------------------------
* A defconfig fix, from Daniel Díaz.
* Disable relocation relaxation for the compressed kernel when not built as -pie as in that case kernels built with clang and linked with LLD fail to boot due to the linker optimizing some instructions in non-PIE form; the gory details in the commit message, from Arvind Sankar.
* A fix for the "bad bp value" warning issued by the frame-pointer unwinder, from Josh Poimboeuf.
----------------------------------------------------------------
Arvind Sankar (1):
x86/boot/compressed: Disable relocation relaxation
Daniel Díaz (1):
x86/defconfigs: Explicitly unset CONFIG_64BIT in i386_defconfig
Josh Poimboeuf (1):
x86/unwind/fp: Fix FP unwinding in ret_from_fork
arch/x86/boot/compressed/Makefile | 2 ++ arch/x86/configs/i386_defconfig | 1 + arch/x86/include/asm/frame.h | 19 +++++++++++++++++++ arch/x86/kernel/process.c | 3 ++- 4 files changed, 24 insertions(+), 1 deletion(-)
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
arch/x86/configs/i386_defconfig +1 -0
@@ -19,6 +19,7 @@ CONFIG_CGROUP_CPUACCT=y CONFIG_BLK_DEV_INITRD=y # CONFIG_COMPAT_BRK is not set CONFIG_PROFILING=y +# CONFIG_64BIT is not set CONFIG_SMP=y CONFIG_X86_GENERIC=y CONFIG_HPET_TIMER=y
arch/x86/include/asm/frame.h +19 -0
@@ -60,12 +60,26 @@#define FRAME_END "pop %" _ASM_BP "\n"#ifdef CONFIG_X86_64 +#define ENCODE_FRAME_POINTER \ "lea 1(%rsp), %rbp\n\t" + +static inline unsigned long encode_frame_pointer (struct pt_regs *regs) +{ +return (unsigned long )regs +1 ; +} +#else /* !CONFIG_X86_64 */ +#define ENCODE_FRAME_POINTER \ "movl %esp, %ebp\n\t" \ "andl $0x7fffffff, %ebp\n\t" + +static inline unsigned long encode_frame_pointer (struct pt_regs *regs) +{ +return (unsigned long )regs &0x7fffffff ; +} +#endif /* CONFIG_X86_64 */ #endif /* __ASSEMBLY__ */
@@ -83,6 +97,11 @@#define ENCODE_FRAME_POINTER +static inline unsigned long encode_frame_pointer (struct pt_regs *regs) +{ +return 0 ; +} +#endif #define FRAME_BEGIN
arch/x86/kernel/process.c +2 -1
@@ -42,6 +42,7 @@#include <asm/spec-ctrl.h> #include <asm/io_bitmap.h> #include <asm/proto.h> +#include <asm/frame.h> #include "process.h"
@@ -133,7 +134,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, unsigned long arg, fork_frame = container_of(childregs, struct fork_frame, regs); frame = &fork_frame->frame; - frame->bp =0 ; + frame->bp =encode_frame_pointer (childregs); frame->ret_addr = (unsigned long ) ret_from_fork; p->thread.sp = (unsigned long ) fork_frame; p->thread.io_bitmap =NULL ;
Signature · 4 lines
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG NürnbergThe pull request you sent on Sun, 20 Sep 2020 21:23:15 +0200:
The pull request you sent on Sun, 20 Sep 2020 21:23:15 +0200:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gittags/x86_urgent_for_v5.9_rc6
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/217eee7231e4b70995bfc24d279c61f6fefbf5d6
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html