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>] [day] [month] [year] [list]
Message-Id: <20250328073802.3391960-1-wangzq.jn@gmail.com>
Date: Fri, 28 Mar 2025 15:38:02 +0800
From: John Wang <wangzq.jn@...il.com>
To: wangzhiqiang02@...system.com,
	Josh Poimboeuf <jpoimboe@...nel.org>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] scripts/faddr2line: Set LANG=C to enforce ASCII output

Force tools like readelf to use the POSIX/C locale by exporting LANG=C
This ensures ASCII-only output and avoids locale-specific
characters(e.g., UTF-8 symbols or translated strings), which could
break text processing utilities like sed in the script

Signed-off-by: John Wang <wangzq.jn@...il.com>
---
 scripts/faddr2line | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/faddr2line b/scripts/faddr2line
index 1fa6beef9f97..1f364fbb0cd8 100755
--- a/scripts/faddr2line
+++ b/scripts/faddr2line
@@ -76,6 +76,10 @@ ADDR2LINE="${UTIL_PREFIX}addr2line${UTIL_SUFFIX}"
 AWK="awk"
 GREP="grep"
 
+# Enforce ASCII-only output from tools like readelf
+# ensuring sed processes strings correctly.
+export LANG=C
+
 command -v ${AWK} >/dev/null 2>&1 || die "${AWK} isn't installed"
 command -v ${READELF} >/dev/null 2>&1 || die "${READELF} isn't installed"
 command -v ${ADDR2LINE} >/dev/null 2>&1 || die "${ADDR2LINE} isn't installed"
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ