mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Drif Abdelmalek Mohamed Said <drifabdelmalekmohamedsaid@gmail.com>
To: paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com
Cc: linux-security-module@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	sashiko-bot@kernel.org
Subject: Re: [PATCH v2] lsm: don't call d_path() when current->fs is NULL
Date: Sat, 21 Nov 2026 11:08:32 +0100	[thread overview]
Message-ID: <20261121100832.499-1-drifabdelmalekmohamedsaid@gmail.com> (raw)
In-Reply-To: <481c20b898f003247763475ef417c321@paul-moore.com>

Hello Paul,
Thanks for the reply,

>  static void audit_log_lsm_path(ab, inode, path)
>  {
>    if (current->fs)
>      audit_log_d_path(...);
>    else if (inode)
>      audit_log_lsm_inode(ab, inode)
>    else
>      audit_log_format(ab, " path=?");
>  }

I got your intention in your v1's reply, but i think that changes the current behaviour,
if current->fs is not NULL, then this would only log path, without inode, whereas current
code for example here:

case LSM_AUDIT_DATA_PATH: {
	struct inode *inode;

	audit_log_d_path(ab, " path=", &a->u.path);

	inode = d_backing_inode(a->u.path.dentry);
	if (inode) {
		audit_log_format(ab, " dev=");
		audit_log_untrustedstring(ab, inode->i_sb->s_id);
		audit_log_format(ab, " ino=%llu", inode->i_ino);
	}
	break;
}

if path is logged, and most probably also inode, and your suggested change only logs one of them,
Is that intentional, or am i not getting something right?
In either case, i would happily send v3 with suggested change.

Cordially,

       reply	other threads:[~2026-11-21 10:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <481c20b898f003247763475ef417c321@paul-moore.com>
2026-11-21 10:08 ` Drif Abdelmalek Mohamed Said [this message]
2026-11-06 11:10 Drif Abdelmalek Mohamed Said

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261121100832.499-1-drifabdelmalekmohamedsaid@gmail.com \
    --to=drifabdelmalekmohamedsaid@gmail.com \
    --cc=jmorris@namei.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=sashiko-bot@kernel.org \
    --cc=serge@hallyn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®