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-next>] [day] [month] [year] [list]
Message-Id: <20240605123128.3524629-1-florian.fainelli@broadcom.com>
Date: Wed,  5 Jun 2024 05:31:27 -0700
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: stable@...r.kernel.org
Cc: Florian Fainelli <florian.fainelli@...adcom.com>,
	Christian Brauner <brauner@...nel.org>,
	Hao Ge <gehao@...inos.cn>,
	Jan Kiszka <jan.kiszka@...mens.com>,
	Kieran Bingham <kbingham@...nel.org>,
	Luis Chamberlain <mcgrof@...nel.org>,
	Pankaj Raghav <p.raghav@...sung.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Kuan-Ying Lee <Kuan-Ying.Lee@...iatek.com>,
	Christophe Leroy <christophe.leroy@...roup.eu>,
	Paolo Bonzini <pbonzini@...hat.com>,
	Helge Deller <deller@....de>,
	Clément Léger <cleger@...osinc.com>,
	Arnd Bergmann <arnd@...db.de>,
	linux-kernel@...r.kernel.org (open list),
	kapil.hali@...adcom.com,
	justin.chen@...adcom.com
Subject: [PATCH stable 5.15] scripts/gdb: fix SB_* constants parsing

commit 6a59cb5158bff13b80f116305155fbe4967a5010 upstream

--0000000000009a0c9905fd9173ad
Content-Transfer-Encoding: 8bit

After f15afbd34d8f ("fs: fix undefined behavior in bit shift for
SB_NOUSER") the constants were changed from plain integers which
LX_VALUE() can parse to constants using the BIT() macro which causes the
following:

Reading symbols from build/linux-custom/vmlinux...done.
Traceback (most recent call last):
  File "/home/fainelli/work/buildroot/output/arm64/build/linux-custom/vmlinux-gdb.py", line 25, in <module>
    import linux.constants
  File "/home/fainelli/work/buildroot/output/arm64/build/linux-custom/scripts/gdb/linux/constants.py", line 5
    LX_SB_RDONLY = ((((1UL))) << (0))

Use LX_GDBPARSED() which does not suffer from that issue.

Fixes: f15afbd34d8f ("fs: fix undefined behavior in bit shift for SB_NOUSER")
Link: https://lkml.kernel.org/r/20230607221337.2781730-1-florian.fainelli@broadcom.com
Signed-off-by: Florian Fainelli <florian.fainelli@...adcom.com>
Acked-by: Christian Brauner <brauner@...nel.org>
Cc: Hao Ge <gehao@...inos.cn>
Cc: Jan Kiszka <jan.kiszka@...mens.com>
Cc: Kieran Bingham <kbingham@...nel.org>
Cc: Luis Chamberlain <mcgrof@...nel.org>
Cc: Pankaj Raghav <p.raghav@...sung.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Florian Fainelli <florian.fainelli@...adcom.com>
---
 scripts/gdb/linux/constants.py.in | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in
index 08f0587d15ea..0ff707bc1896 100644
--- a/scripts/gdb/linux/constants.py.in
+++ b/scripts/gdb/linux/constants.py.in
@@ -46,12 +46,12 @@ if IS_BUILTIN(CONFIG_COMMON_CLK):
     LX_GDBPARSED(CLK_GET_RATE_NOCACHE)
 
 /* linux/fs.h */
-LX_VALUE(SB_RDONLY)
-LX_VALUE(SB_SYNCHRONOUS)
-LX_VALUE(SB_MANDLOCK)
-LX_VALUE(SB_DIRSYNC)
-LX_VALUE(SB_NOATIME)
-LX_VALUE(SB_NODIRATIME)
+LX_GDBPARSED(SB_RDONLY)
+LX_GDBPARSED(SB_SYNCHRONOUS)
+LX_GDBPARSED(SB_MANDLOCK)
+LX_GDBPARSED(SB_DIRSYNC)
+LX_GDBPARSED(SB_NOATIME)
+LX_GDBPARSED(SB_NODIRATIME)
 
 /* linux/htimer.h */
 LX_GDBPARSED(hrtimer_resolution)
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ