Skip to content

Commit 6a59cb5

Browse files
ffainelliakpm00
authored andcommitted
scripts/gdb: fix SB_* constants parsing
--0000000000009a0c9905fd9173ad Content-Transfer-Encoding: 8bit After f15afbd ("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. f15afbd ("fs: fix undefined behavior in bit shift for SB_NOUSER") Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Florian Fainelli <[email protected]> Acked-by: Christian Brauner <[email protected]> Cc: Hao Ge <[email protected]> Cc: Jan Kiszka <[email protected]> Cc: Kieran Bingham <[email protected]> Cc: Luis Chamberlain <[email protected]> Cc: Pankaj Raghav <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 2049a7d commit 6a59cb5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scripts/gdb/linux/constants.py.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ if IS_BUILTIN(CONFIG_COMMON_CLK):
4848
LX_GDBPARSED(CLK_GET_RATE_NOCACHE)
4949

5050
/* linux/fs.h */
51-
LX_VALUE(SB_RDONLY)
52-
LX_VALUE(SB_SYNCHRONOUS)
53-
LX_VALUE(SB_MANDLOCK)
54-
LX_VALUE(SB_DIRSYNC)
55-
LX_VALUE(SB_NOATIME)
56-
LX_VALUE(SB_NODIRATIME)
51+
LX_GDBPARSED(SB_RDONLY)
52+
LX_GDBPARSED(SB_SYNCHRONOUS)
53+
LX_GDBPARSED(SB_MANDLOCK)
54+
LX_GDBPARSED(SB_DIRSYNC)
55+
LX_GDBPARSED(SB_NOATIME)
56+
LX_GDBPARSED(SB_NODIRATIME)
5757

5858
/* linux/htimer.h */
5959
LX_GDBPARSED(hrtimer_resolution)

0 commit comments

Comments
 (0)