From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 793CB386FC31; Wed, 26 May 2021 22:06:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 793CB386FC31 From: "guillaume at morinfr dot org" To: systemtap@sourceware.org Subject: [Bug tapsets/26184] fullpath_struct_file does not handle struct dentry on 5.6.19-300.fc32.x86_64 Date: Wed, 26 May 2021 22:06:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: tapsets X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: guillaume at morinfr dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 May 2021 22:06:21 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26184 --- Comment #5 from Guillaume Morin --- This appears to be still present in systemtap 4.5. This simple workaround seems to fix the problem: --- a/tapset/linux/dentry.stp 2021-05-26 17:44:48.283925000 -0400 +++ b/tapset/linux/dentry.stp 2021-05-26 17:44:59.122807962 -0400 @@ -264,7 +264,7 @@ /* RHEL7+ kernels */ if (! @type_member_defined("vfsmount", mnt_parent))= { /* Global root? */ - if (mnt !=3D mnt->mnt_parent) { + if (mnt && mnt !=3D mnt->mnt_parent) { dentry =3D mnt->mnt_mountpoint vfsmnt =3D & mnt->mnt_parent->mnt mnt =3D mnt->mnt_parent However, mnt should not be 0 at that point in the code. The mnt var should = be defined if @type_member_defined("mount", mnt_parent) is true and it should = be the case in any kernel released in the past 10 years. _But_ I verified that it does not evaluate to true with the example given by the original reporter (stap -v -c /bin/false -e 'probe process.begin { printf("%s\n", fullpath_struct_file(task_current(), current_exe_file())); exit(); }'). I also can reproduce with a completely different example (a longer one). I could provide it if necessary but the original reproducer is simple enough. It does look like a bug similar to https://sourceware.org/bugzilla/show_bug.cgi?id=3D20672 --=20 You are receiving this mail because: You are the assignee for the bug.=