mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RESEND] scripts/gdb: Use d_shortname instead of d_iname
@ 2025-05-25 21:37 Illia Ostapyshyn
  2025-05-25 21:41 ` Al Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Illia Ostapyshyn @ 2025-05-25 21:37 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jan Kiszka, Kieran Bingham, Al Viro, Andrew Morton, Illia Ostapyshyn

Commit 58cf9c383c5c68666808 ("dcache: back inline names with a
struct-wrapped array of unsigned long") introduced a d_shortname union
in place of d_iname.  However, the gdb scripts for vfs still reference
the old field.  Update the scripts to reference the correct field and
union member.

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 c77b9ce75f6d..b5fbb18ccb77 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_iname'].string()
+    return p + d['d_shortname']['string'].string()
 
 class DentryName(gdb.Function):
     """Return string of the full path of a dentry.
-- 
2.49.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RESEND] scripts/gdb: Use d_shortname instead of d_iname
  2025-05-25 21:37 [PATCH RESEND] scripts/gdb: Use d_shortname instead of d_iname Illia Ostapyshyn
@ 2025-05-25 21:41 ` Al Viro
  2025-05-25 22:00   ` Illia Ostapyshyn
  0 siblings, 1 reply; 3+ messages in thread
From: Al Viro @ 2025-05-25 21:41 UTC (permalink / raw)
  To: Illia Ostapyshyn; +Cc: linux-kernel, Jan Kiszka, Kieran Bingham, Andrew Morton

On Sun, May 25, 2025 at 11:37:10PM +0200, Illia Ostapyshyn wrote:
> Commit 58cf9c383c5c68666808 ("dcache: back inline names with a
> struct-wrapped array of unsigned long") introduced a d_shortname union
> in place of d_iname.  However, the gdb scripts for vfs still reference
> the old field.  Update the scripts to reference the correct field and
> union member.

You do realize that for dentries with names longer than 40 characters
that field contains garbage, right?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH RESEND] scripts/gdb: Use d_shortname instead of d_iname
  2025-05-25 21:41 ` Al Viro
@ 2025-05-25 22:00   ` Illia Ostapyshyn
  0 siblings, 0 replies; 3+ messages in thread
From: Illia Ostapyshyn @ 2025-05-25 22:00 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-kernel, Jan Kiszka, Kieran Bingham, Andrew Morton


[-- Attachment #1.1.1: Type: text/plain, Size: 236 bytes --]

On 5/25/25 23:41, Al Viro wrote:
> You do realize that for dentries with names longer than 40 characters
> that field contains garbage, right?

Is d_name.name a better choice here?  It seems to always reference the
full valid name.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 963 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-25 22:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-25 21:37 [PATCH RESEND] scripts/gdb: Use d_shortname instead of d_iname Illia Ostapyshyn
2025-05-25 21:41 ` Al Viro
2025-05-25 22:00   ` Illia Ostapyshyn

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®