From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: Rik Faith <faith@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Light-weight Auditing Framework
Date: Wed, 17 Mar 2004 16:45:02 -0800 [thread overview]
Message-ID: <20040318004502.GA2595@us.ibm.com> (raw)
In-Reply-To: <16472.5852.375648.739489@neuro.alephnull.com>
On Wed, Mar 17, 2004 at 04:14:04AM -0500, Rik Faith wrote:
> On Fri 12 Mar 2004 10:50:33 -0800,
> Paul E. McKenney <paulmck@us.ibm.com> wrote:
> > o I don't see any rcu_read_lock() or rcu_read_unlock() calls.
>
> Fixed.
Much improved!
Since audit_receive_filter() is only called with audit_netlink_sem
held, it cannot race with either audit_del_rule() or audit_add_rule(),
so the list_for_each_entry_rcu()s may be replaced by
list_for_each_entry()s, and the rcu_read_{un,}lock()s removed.
Not a fatal problem, just a bit of unnecessary overhead.
The others look good!
> > o Presumably something surrounding netlink_kernel_create()
> > ensures that only one instance of audit_del_rule() will
> > be executing at a given time. If not, some locking is
> > needed.
>
> I was unable to find anything, so I added a semaphore to the receive
> routine, and comments to the add and delete routines.
Looks good!
> > o The audit_add_rule() function also needs something to prevent
> > races with other audit_add_rule() and audit_del_rule()
> > instances.
>
> This is also handled by the semaphore.
Ditto!
> Thanks for your comments! This patch is against 2.6.5-rc1-mm1. It also
> corrects a problem that could trigger a BUG() near boot time.
>
> audit.c | 9 +++++++++
> auditsc.c | 38 +++++++++++++++++++++++++++++---------
> 2 files changed, 38 insertions(+), 9 deletions(-)
Glad to help!
Thanx, Paul
next prev parent reply other threads:[~2004-03-18 0:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-11 14:25 [PATCH] Light-weight Auditing Framework Rik Faith
2004-03-11 14:49 ` Stephen Smalley
2004-03-11 19:21 ` Andrew Morton
2004-03-12 5:21 ` Rik Faith
2004-03-12 15:18 ` Rik Faith
2004-03-12 6:02 ` James Morris
2004-03-12 18:50 ` Paul E. McKenney
2004-03-17 9:14 ` Rik Faith
2004-03-18 0:45 ` Paul E. McKenney [this message]
2004-03-23 20:55 ` Rik Faith
2004-03-24 13:44 ` Rik Faith
2004-03-25 3:01 ` Paul E. McKenney
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=20040318004502.GA2595@us.ibm.com \
--to=paulmck@us.ibm.com \
--cc=akpm@osdl.org \
--cc=faith@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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