* [PATCH] scripts: gdb: vfs: Support external dentry names
@ 2025-06-29 0:38 Illia Ostapyshyn
2025-07-01 17:48 ` Florian Fainelli
0 siblings, 1 reply; 2+ messages in thread
From: Illia Ostapyshyn @ 2025-06-29 0:38 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel
Cc: Jan Kiszka, Kieran Bingham, Al Viro, Andrew Morton,
Florian Fainelli, Jan Kara, Christian Brauner, Illia Ostapyshyn
d_shortname of struct dentry only reserves D_NAME_INLINE_LEN characters
and contains garbage for longer names. Use d_name instead, which always
references the valid name.
Link: https://lore.kernel.org/all/20250525213709.878287-2-illia@yshyn.com/
Fixes: 79300ac805b672a84b64 ("scripts/gdb: fix dentry_name() lookup")
Signed-off-by: Illia Ostapyshyn <illia@yshyn.com>
---
scripts/gdb/linux/vfs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/gdb/linux/vfs.py b/scripts/gdb/linux/vfs.py
index b5fbb18ccb77..9e921b645a68 100644
--- a/scripts/gdb/linux/vfs.py
+++ b/scripts/gdb/linux/vfs.py
@@ -22,7 +22,7 @@ def dentry_name(d):
if parent == d or parent == 0:
return ""
p = dentry_name(d['d_parent']) + "/"
- return p + d['d_shortname']['string'].string()
+ return p + d['d_name']['name'].string()
class DentryName(gdb.Function):
"""Return string of the full path of a dentry.
base-commit: dfba48a70cb68888efb494c9642502efe73614ed
--
2.49.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] scripts: gdb: vfs: Support external dentry names
2025-06-29 0:38 [PATCH] scripts: gdb: vfs: Support external dentry names Illia Ostapyshyn
@ 2025-07-01 17:48 ` Florian Fainelli
0 siblings, 0 replies; 2+ messages in thread
From: Florian Fainelli @ 2025-07-01 17:48 UTC (permalink / raw)
To: Illia Ostapyshyn, linux-kernel, linux-fsdevel
Cc: Jan Kiszka, Kieran Bingham, Al Viro, Andrew Morton, Jan Kara,
Christian Brauner
On 6/28/25 17:38, Illia Ostapyshyn wrote:
> d_shortname of struct dentry only reserves D_NAME_INLINE_LEN characters
> and contains garbage for longer names. Use d_name instead, which always
> references the valid name.
>
> Link: https://lore.kernel.org/all/20250525213709.878287-2-illia@yshyn.com/
> Fixes: 79300ac805b672a84b64 ("scripts/gdb: fix dentry_name() lookup")
> Signed-off-by: Illia Ostapyshyn <illia@yshyn.com>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Thanks Illia!
--
Florian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-01 17:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-29 0:38 [PATCH] scripts: gdb: vfs: Support external dentry names Illia Ostapyshyn
2025-07-01 17:48 ` Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®