Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'x86_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Borislav Petkov:

- A defconfig fix (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 (Arvind
Sankar)

- A fix for the "bad bp value" warning issued by the frame-pointer
unwinder (Josh Poimboeuf)

* tag 'x86_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/unwind/fp: Fix FP unwinding in ret_from_fork
x86/boot/compressed: Disable relocation relaxation
x86/defconfigs: Explicitly unset CONFIG_64BIT in i386_defconfig

+24 -1
+2
arch/x86/boot/compressed/Makefile
··· 43 43 KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) 44 44 KBUILD_CFLAGS += -fno-asynchronous-unwind-tables 45 45 KBUILD_CFLAGS += -D__DISABLE_EXPORTS 46 + # Disable relocation relaxation in case the link is not PIE. 47 + KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mrelax-relocations=no) 46 48 47 49 KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 48 50 GCOV_PROFILE := n
+1
arch/x86/configs/i386_defconfig
··· 19 19 CONFIG_BLK_DEV_INITRD=y 20 20 # CONFIG_COMPAT_BRK is not set 21 21 CONFIG_PROFILING=y 22 + # CONFIG_64BIT is not set 22 23 CONFIG_SMP=y 23 24 CONFIG_X86_GENERIC=y 24 25 CONFIG_HPET_TIMER=y
+19
arch/x86/include/asm/frame.h
··· 60 60 #define FRAME_END "pop %" _ASM_BP "\n" 61 61 62 62 #ifdef CONFIG_X86_64 63 + 63 64 #define ENCODE_FRAME_POINTER \ 64 65 "lea 1(%rsp), %rbp\n\t" 66 + 67 + static inline unsigned long encode_frame_pointer(struct pt_regs *regs) 68 + { 69 + return (unsigned long)regs + 1; 70 + } 71 + 65 72 #else /* !CONFIG_X86_64 */ 73 + 66 74 #define ENCODE_FRAME_POINTER \ 67 75 "movl %esp, %ebp\n\t" \ 68 76 "andl $0x7fffffff, %ebp\n\t" 77 + 78 + static inline unsigned long encode_frame_pointer(struct pt_regs *regs) 79 + { 80 + return (unsigned long)regs & 0x7fffffff; 81 + } 82 + 69 83 #endif /* CONFIG_X86_64 */ 70 84 71 85 #endif /* __ASSEMBLY__ */ ··· 96 82 #else /* !__ASSEMBLY */ 97 83 98 84 #define ENCODE_FRAME_POINTER 85 + 86 + static inline unsigned long encode_frame_pointer(struct pt_regs *regs) 87 + { 88 + return 0; 89 + } 99 90 100 91 #endif 101 92
+2 -1
arch/x86/kernel/process.c
··· 42 42 #include <asm/spec-ctrl.h> 43 43 #include <asm/io_bitmap.h> 44 44 #include <asm/proto.h> 45 + #include <asm/frame.h> 45 46 46 47 #include "process.h" 47 48 ··· 134 133 fork_frame = container_of(childregs, struct fork_frame, regs); 135 134 frame = &fork_frame->frame; 136 135 137 - frame->bp = 0; 136 + frame->bp = encode_frame_pointer(childregs); 138 137 frame->ret_addr = (unsigned long) ret_from_fork; 139 138 p->thread.sp = (unsigned long) fork_frame; 140 139 p->thread.io_bitmap = NULL;