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: <20250601055027.3661480-1-tony.ambardar@gmail.com>
Date: Sat, 31 May 2025 22:50:27 -0700
From: Tony Ambardar <tony.ambardar@...il.com>
To: linux-kernel@...r.kernel.org,
	linux-debuggers@...r.kernel.org
Cc: Tony Ambardar <tony.ambardar@...il.com>,
	Jan Kiszka <jan.kiszka@...mens.com>,
	Kieran Bingham <kbingham@...nel.org>,
	Stephen Brennan <stephen.s.brennan@...cle.com>,
	Christian Brauner <brauner@...nel.org>
Subject: [PATCH v1] scripts/gdb: fix parsing of MNT_* constants

Recently, constants in linux/mount.h were changed from integer macros
parsable by LX_VALUE() to enums which are not, thus breaking gdb python
scripts:

  Reading symbols from vmlinux...
  Traceback (most recent call last):
    File ".../linux/vmlinux-gdb.py", line 25, in <module>
      import linux.constants
    File ".../linux/scripts/gdb/linux/constants.py", line 19, in <module>
      LX_MNT_NOSUID = MNT_NOSUID
  NameError: name 'MNT_NOSUID' is not defined

Update to parse with LX_GDBPARSED(), which correctly handles enums.

Fixes: 101f2bbab541 ("fs: convert mount flags to enum")
Signed-off-by: Tony Ambardar <tony.ambardar@...il.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 fd6bd69c5096..d5e3069f42a7 100644
--- a/scripts/gdb/linux/constants.py.in
+++ b/scripts/gdb/linux/constants.py.in
@@ -73,12 +73,12 @@ if IS_BUILTIN(CONFIG_MODULES):
     LX_GDBPARSED(MOD_RO_AFTER_INIT)
 
 /* linux/mount.h */
-LX_VALUE(MNT_NOSUID)
-LX_VALUE(MNT_NODEV)
-LX_VALUE(MNT_NOEXEC)
-LX_VALUE(MNT_NOATIME)
-LX_VALUE(MNT_NODIRATIME)
-LX_VALUE(MNT_RELATIME)
+LX_GDBPARSED(MNT_NOSUID)
+LX_GDBPARSED(MNT_NODEV)
+LX_GDBPARSED(MNT_NOEXEC)
+LX_GDBPARSED(MNT_NOATIME)
+LX_GDBPARSED(MNT_NODIRATIME)
+LX_GDBPARSED(MNT_RELATIME)
 
 /* linux/threads.h */
 LX_VALUE(NR_CPUS)
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ