From: Steve Grubb <sgrubb@redhat.com>
To: Ricardo Robaina <rrobaina@redhat.com>, Paul Moore <paul@paul-moore.com>
Cc: audit@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, eparis@redhat.com,
viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz
Subject: Re: [PATCH] audit: add MOVE_MOUNT auxiliary record to log mount relocation
Date: Wed, 12 Aug 2026 16:19:34 -0400 [thread overview]
Message-ID: <gKPBCNAOSa-tEF8t5Pm2xQ@redhat.com> (raw)
In-Reply-To: <CAHC9VhSjEt_-Bsra4AEqWv+Daw5Ff=gqy7dX4Ah11RVhdyCBUQ@mail.gmail.com>
On Wednesday, August 12, 2026 12:03:17 PM Eastern Daylight Time Paul Moore
wrote:
> On Wed, Aug 12, 2026 at 10:40 AM Ricardo Robaina <rrobaina@redhat.com>
wrote:
> > On Tue, Jul 28, 2026 at 6:22 PM Paul Moore <paul@paul-moore.com> wrote:
> > > On Mon, Jul 13, 2026 at 1:00 PM Ricardo Robaina <rrobaina@redhat.com>
wrote:
> > > > Modern mount tools (util-linux >= 2.39.1) use the new mount API
> > > > (fsopen, fsconfig, fsmount, move_mount) instead of the legacy
> > > > mount(2)
> > > > syscall. The generic SYSCALL audit record logs the move_mount syscall
> > > > but does not capture the flags argument, creating an audit gap for
> > > > mount relocation operations.
> > > >
> > > > Add a MOVE_MOUNT auxiliary record that logs the flags argument passed
> > > > to move_mount(2). Pathnames and file descriptors are captured through
> > > > existing PATH records and SYSCALL record arguments.
> > > >
> > > > ----
> > > > type=PATH : item=0 name=/mnt/test_src inode=1 dev=00:41 ...
> > > > type=SYSCALL : arch=x86_64 syscall=move_mount ...
> > > > type=MOVE_MOUNT : fs_flags=0x4
> > > > ----
> > > > type=PATH : item=0 name=/mnt/test_dst inode=27460862 dev=fc:00 ...
> > > > type=SYSCALL : arch=x86_64 syscall=move_mount ...
> > > > type=MOVE_MOUNT : fs_flags=0x4
> > > >
> > > > Link: https://github.com/linux-audit/audit-kernel/issues/152
> > > > Link: https://github.com/linux-audit/audit-kernel/issues/153
> > > > Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
> > > > ---
> > > >
> > > > fs/namespace.c | 3 +++
> > > > include/linux/audit.h | 10 ++++++++++
> > > > include/uapi/linux/audit.h | 1 +
> > > > kernel/auditsc.c | 13 +++++++++++++
> > > > 4 files changed, 27 insertions(+)
> >
> > Thanks for reviewing this patch, Paul!
> >
> > > This is because we only log the first four syscall parameters,
> > > correct? To put this another way, if we logged all six syscall
> > > parameters this wouldn't be an issue, yes?
> >
> > Yes, that's correct.
> >
> > > I'm aware of the argument for only logging the first four parameters,
> > > but I've always thought it was a rather foolish decision. Perhaps now
> > > is the time to spend to investigate adding those two missing
> > > parameters to the SYSCALL record so we don't have to worry about hacky
> > > workarounds like this (to be clear, I know this hacky workaround isn't
> > > your fault, you are just trying to make the best of a kludgy thing
> > > <g>).
> >
> > I completely agree that's the right thing to do, and I'm happy to hear
> > that you'd be open to it.
> >
> > I did a quick check and there are 100+ syscalls (~18% of the total)
> > with more than 4 arguments
> >
> > --around 67 of which pass audit-relevant scalars (flags, sizes,
> >
> > modes) in the 5th or 6th position
> > that are currently lost.
> >
> > I'll look into it. Please disregard this patch in the meantime.
>
> Thanks Ricardo, I think this would be a great improvement!
>
> I'm particularly curious to see what old/existing userspace tooling
> will do if we add the last two syscall arguments immediately after the
> first four.
It would ignore them. During search, it grabs a0 and a1, then skips to ppid.
In the output phase, it should also ignore them since there's no code to
interpret them.
> If we have to we can add them to the end, but if it
> doesn't break anything it would be preferable to add them inline with
> the other parameters.
I'd also prefer inline. That's the most natural view.
-Steve
next prev parent reply other threads:[~2026-08-12 20:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 17:00 [PATCH] audit: add MOVE_MOUNT auxiliary record to log mount relocation Ricardo Robaina
2026-07-21 22:17 ` Richard Guy Briggs
2026-07-22 15:59 ` Christian Brauner
2026-07-28 21:22 ` Paul Moore
2026-08-12 14:39 ` Ricardo Robaina
2026-08-12 16:00 ` Steve Grubb
2026-08-12 16:05 ` Paul Moore
2026-08-12 16:03 ` Paul Moore
2026-08-12 20:19 ` Steve Grubb [this message]
2026-08-12 20:43 ` Ricardo Robaina
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=gKPBCNAOSa-tEF8t5Pm2xQ@redhat.com \
--to=sgrubb@redhat.com \
--cc=audit@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=eparis@redhat.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=rrobaina@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.