lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <172043936523.2215.14997470133117283568.tip-bot2@tip-bot2>
Date: Mon, 08 Jul 2024 11:49:25 -0000
From: "tip-bot2 for Brian Johannesmeyer" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Brian Johannesmeyer <bjohannesmeyer@...il.com>,
 Josh Poimboeuf <jpoimboe@...nel.org>, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject: [tip: objtool/core] scripts/faddr2line: Remove call to addr2line from
 find_dir_prefix()

The following commit has been merged into the objtool/core branch of tip:

Commit-ID:     406b5c12aad8110e1b1f9355f176cac43cd1fecb
Gitweb:        https://git.kernel.org/tip/406b5c12aad8110e1b1f9355f176cac43cd1fecb
Author:        Brian Johannesmeyer <bjohannesmeyer@...il.com>
AuthorDate:    Mon, 15 Apr 2024 16:55:37 +02:00
Committer:     Josh Poimboeuf <jpoimboe@...nel.org>
CommitterDate: Tue, 02 Jul 2024 23:38:37 -07:00

scripts/faddr2line: Remove call to addr2line from find_dir_prefix()

Use the single long-running faddr2line process from find_dir_prefix().

Signed-off-by: Brian Johannesmeyer <bjohannesmeyer@...il.com>
Link: https://lore.kernel.org/r/20240415145538.1938745-7-bjohannesmeyer@gmail.com
Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
---
 scripts/faddr2line | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/scripts/faddr2line b/scripts/faddr2line
index 48fc8cf..1fa6bee 100755
--- a/scripts/faddr2line
+++ b/scripts/faddr2line
@@ -85,15 +85,17 @@ command -v ${ADDR2LINE} >/dev/null 2>&1 || die "${ADDR2LINE} isn't installed"
 # init/main.c!  This only works for vmlinux.  Otherwise it falls back to
 # printing the absolute path.
 find_dir_prefix() {
-	local objfile=$1
-
 	local start_kernel_addr=$(echo "${ELF_SYMS}" | sed 's/\[.*\]//' |
 		${AWK} '$8 == "start_kernel" {printf "0x%s", $2}')
 	[[ -z $start_kernel_addr ]] && return
 
-	local file_line=$(${ADDR2LINE} -e $objfile $start_kernel_addr)
-	[[ -z $file_line ]] && return
+	run_addr2line ${start_kernel_addr} ""
+	[[ -z $ADDR2LINE_OUT ]] && return
 
+	local file_line=${ADDR2LINE_OUT#* at }
+	if [[ -z $file_line ]] || [[ $file_line = $ADDR2LINE_OUT ]]; then
+		return
+	fi
 	local prefix=${file_line%init/main.c:*}
 	if [[ -z $prefix ]] || [[ $prefix = $file_line ]]; then
 		return
@@ -350,7 +352,7 @@ echo "${ELF_SECHEADERS}" | ${GREP} -q '\.debug_info' || die "CONFIG_DEBUG_INFO n
 init_addr2line $objfile
 
 DIR_PREFIX=supercalifragilisticexpialidocious
-find_dir_prefix $objfile
+find_dir_prefix
 
 FIRST=1
 while [[ $# -gt 0 ]]; do

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ