From: Peter Zijlstra <peterz@infradead.org>
To: Paul Moore <paul@paul-moore.com>
Cc: Dmitry Vyukov <dvyukov@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-audit@redhat.com, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH 4.10 070/111] audit: fix auditd/kernel connection state tracking
Date: Tue, 20 Feb 2018 15:06:40 +0100 [thread overview]
Message-ID: <20180220140640.GE25201@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAHC9VhTOxzcJpVSFDign56jkkruQjujTp7GQzk107FNWYTXRYg@mail.gmail.com>
On Tue, Feb 20, 2018 at 08:25:21AM -0500, Paul Moore wrote:
> On Tue, Feb 20, 2018 at 7:37 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Tue, Mar 28, 2017 at 02:30:56PM +0200, Greg Kroah-Hartman wrote:
> >> 4.10-stable review patch. If anyone has any objections, please let me know.
> >
> >> + if (!(auditd_test_task(current) ||
> >> + (current == __mutex_owner(&audit_cmd_mutex)))) {
> >> + long stime = audit_backlog_wait_time;
> >
> > Since I cannot find the original email on lkml, NAK on this.
> > __mutex_owner() is not a general purpose helper function.
>
> Since this code also exists in the current kernel, I need to ask what
> recommended alternatives exist for determining the mutex owner?
>
> I imagine we could track the mutex owner separately in the audit
> subsystem, but I'd much prefer to leverage an existing mechanism if
> possible.
It's not at all clear to me what that code does, I just stumbled upon
__mutex_owner() outside of the mutex code itself and went WTF.
The comment (aside from having the most horribly style) is wrong too,
because it claims it will not block when we hold that lock, while,
afaict, it will in fact do just that.
Maybe if you could explain how that code is supposed to work and why it
doesn't know if it holds a lock I could make a suggestion...
next prev parent reply other threads:[~2018-02-20 14:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170328122915.640228468@linuxfoundation.org>
[not found] ` <20170328122918.597715642@linuxfoundation.org>
[not found] ` <20180220123757.GE25314@hirez.programming.kicks-ass.net>
2018-02-20 13:25 ` [PATCH 4.10 070/111] audit: fix auditd/kernel connection state tracking Paul Moore
2018-02-20 14:06 ` Peter Zijlstra [this message]
2018-02-20 14:51 ` Paul Moore
2018-02-20 15:18 ` Peter Zijlstra
2018-02-20 17:06 ` Paul Moore
2018-02-21 8:46 ` Ingo Molnar
2018-02-21 9:15 ` Peter Zijlstra
2018-02-21 23:04 ` 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=20180220140640.GE25201@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=dvyukov@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=stable@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