Commit 9d7d4ad2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'objtool-core-2024-11-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull objtool updates from Ingo Molnar:

 - Detect non-relocated text references for more robust
   IBT sealing (Josh Poimboeuf)

 - Fix build error when building stripped down
   UAPI headers (HONG Yifan)

 - Exclude __tracepoints data from ENDBR checks to fix
   false positives on clang builds (Peter Zijlstra)

 - Fix ORC unwind for newly forked tasks (Zheng Yejian)

 - Fix readelf related faddr2line regression (Carlos Llamas)

* tag 'objtool-core-2024-11-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool: Exclude __tracepoints data from ENDBR checks
  Revert "scripts/faddr2line: Check only two symbols when calculating symbol size"
  x86/unwind/orc: Fix unwind for newly forked tasks
  objtool: Also include tools/include/uapi
  objtool: Detect non-relocated text references
parents 364eeb79 d5173f75
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ SYM_FUNC_START(do_suspend_lowlevel)

	.align 4
.Lresume_point:
	ANNOTATE_NOENDBR
	/* We don't restore %rax, it must be 0 anyway */
	movq	$saved_context, %rax
	movq	saved_context_cr4(%rax), %rbx
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ SYM_CODE_START_NOALIGN(startup_64)
	lretq

.Lon_kernel_cs:
	ANNOTATE_NOENDBR
	UNWIND_HINT_END_OF_STACK

#ifdef CONFIG_AMD_MEM_ENCRYPT
+1 −1
Original line number Diff line number Diff line
@@ -723,7 +723,7 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task,
		state->sp = task->thread.sp + sizeof(*frame);
		state->bp = READ_ONCE_NOCHECK(frame->bp);
		state->ip = READ_ONCE_NOCHECK(frame->ret_addr);
		state->signal = (void *)state->ip == ret_from_fork;
		state->signal = (void *)state->ip == ret_from_fork_asm;
	}

	if (get_stack_info((unsigned long *)state->sp, state->task,
+1 −1
Original line number Diff line number Diff line
@@ -252,7 +252,7 @@ __faddr2line() {
				found=2
				break
			fi
		done < <(echo "${ELF_SYMS}" | sed 's/\[.*\]//' | ${AWK} -v sec=$sym_sec '$7 == sec' | sort --key=2 | ${GREP} -A1 --no-group-separator " ${sym_name}$")
		done < <(echo "${ELF_SYMS}" | sed 's/\[.*\]//' | ${AWK} -v sec=$sym_sec '$7 == sec' | sort --key=2)

		if [[ $found = 0 ]]; then
			warn "can't find symbol: sym_name: $sym_name sym_sec: $sym_sec sym_addr: $sym_addr sym_elf_size: $sym_elf_size"
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ LIBELF_LIBS := $(shell $(HOSTPKG_CONFIG) libelf --libs 2>/dev/null || echo -lel
all: $(OBJTOOL)

INCLUDES := -I$(srctree)/tools/include \
	    -I$(srctree)/tools/include/uapi \
	    -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
	    -I$(srctree)/tools/arch/$(SRCARCH)/include	\
	    -I$(srctree)/tools/objtool/include \
Loading