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 'objtool-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull unwinder fixes from Thomas Gleixner:
"A set of unwinder and tooling fixes:

- Ensure that the stack pointer on x86 is aligned again so that the
unwinder does not read past the end of the stack

- Discard .note.gnu.property section which has a pointlessly
different alignment than the other note sections. That confuses
tooling of all sorts including readelf, libbpf and pahole"

* tag 'objtool-urgent-2023-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/show_trace_log_lvl: Ensure stack pointer is aligned, again
vmlinux.lds.h: Discard .note.gnu.property section

+13 -3
+5 -2
arch/x86/kernel/dumpstack.c
··· 195 195 printk("%sCall Trace:\n", log_lvl); 196 196 197 197 unwind_start(&state, task, regs, stack); 198 - stack = stack ? : get_stack_pointer(task, regs); 199 198 regs = unwind_get_entry_regs(&state, &partial); 200 199 201 200 /* ··· 213 214 * - hardirq stack 214 215 * - entry stack 215 216 */ 216 - for ( ; stack; stack = PTR_ALIGN(stack_info.next_sp, sizeof(long))) { 217 + for (stack = stack ?: get_stack_pointer(task, regs); 218 + stack; 219 + stack = stack_info.next_sp) { 217 220 const char *stack_name; 221 + 222 + stack = PTR_ALIGN(stack, sizeof(long)); 218 223 219 224 if (get_stack_info(stack, task, &stack_info, &visit_mask)) { 220 225 /*
+8 -1
include/asm-generic/vmlinux.lds.h
··· 891 891 /* 892 892 * Discard .note.GNU-stack, which is emitted as PROGBITS by the compiler. 893 893 * Otherwise, the type of .notes section would become PROGBITS instead of NOTES. 894 + * 895 + * Also, discard .note.gnu.property, otherwise it forces the notes section to 896 + * be 8-byte aligned which causes alignment mismatches with the kernel's custom 897 + * 4-byte aligned notes. 894 898 */ 895 899 #define NOTES \ 896 - /DISCARD/ : { *(.note.GNU-stack) } \ 900 + /DISCARD/ : { \ 901 + *(.note.GNU-stack) \ 902 + *(.note.gnu.property) \ 903 + } \ 897 904 .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \ 898 905 BOUNDED_SECTION_BY(.note.*, _notes) \ 899 906 } NOTES_HEADERS \