From: Paul Moore <pmoore@redhat.com>
To: Richard Guy Briggs <rgb@redhat.com>
Cc: linux-audit@redhat.com, viro@zeniv.linux.org.uk,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 5/5] audit: replace getname()/putname() hacks with reference counters
Date: Wed, 14 Jan 2015 16:45:06 -0500 [thread overview]
Message-ID: <2531966.CgBBZnoLxq@sifl> (raw)
In-Reply-To: <20150114213717.GQ29998@madcap2.tricolour.ca>
On Wednesday, January 14, 2015 04:37:17 PM Richard Guy Briggs wrote:
> On 15/01/08, Paul Moore wrote:
> > In order to ensure that filenames are not released before the audit
> > subsystem is done with the strings there are a number of hacks built
> > into the fs and audit subsystems around getname() and putname(). To
> > say these hacks are "ugly" would be kind.
> >
> > This patch removes the filename hackery in favor of a more
> > conventional reference count based approach. The diffstat below tells
> > most of the story; lots of audit/fs specific code is replaced with a
> > traditional reference count based approach that is easily understood,
> > even by those not familiar with the audit and/or fs subsystems.
> >
> > Signed-off-by: Paul Moore <pmoore@redhat.com>
>
> The only nit I've got is "refcnt" enlarges "struct filename" where I
> would have used a bitfield with "separate".
>
> Otherwise, this looks like an improvement. Thanks.
I agree that it is unfortunate that struct filename increases, but it seemed
liked a valid tradeoff considering that we got to remove the
getname()/putname() hacks in favor of a more traditional approach.
As far the int versus bitfield, I suppose I favor the int in this particular
case, but if the fs folks want a bitfield I can do that.
> Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
Thanks for taking the time to review the patchset.
--
paul moore
security @ redhat
next prev parent reply other threads:[~2015-01-14 21:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 16:50 [RFC PATCH 0/5] Overhaul the audit filename handling Paul Moore
2015-01-08 16:50 ` [RFC PATCH 1/5] fs: rework getname_kernel to handle up to PATH_MAX sized filenames Paul Moore
2015-01-14 21:02 ` Richard Guy Briggs
2015-01-08 16:50 ` [RFC PATCH 2/5] fs: create proper filename objects using getname_kernel() Paul Moore
2015-01-14 21:03 ` Richard Guy Briggs
2015-01-08 16:50 ` [RFC PATCH 3/5] audit: enable filename recording via getname_kernel() Paul Moore
2015-01-14 21:09 ` Richard Guy Briggs
2015-01-08 16:50 ` [RFC PATCH 4/5] audit: fix filename matching in __audit_inode() and __audit_inode_child() Paul Moore
2015-01-14 21:21 ` Richard Guy Briggs
2015-01-08 16:50 ` [RFC PATCH 5/5] audit: replace getname()/putname() hacks with reference counters Paul Moore
2015-01-14 21:37 ` Richard Guy Briggs
2015-01-14 21:45 ` Paul Moore [this message]
2015-01-12 21:03 ` [RFC PATCH 0/5] Overhaul the audit filename handling Paul Moore
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=2531966.CgBBZnoLxq@sifl \
--to=pmoore@redhat.com \
--cc=linux-audit@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rgb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).