From: Eric Paris <eparis@redhat.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: linux-audit@redhat.com, Andi Kleen <andi@firstfloor.org>,
linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH v2.1] audit: Only use the syscall slowpath when syscall audit rules exist
Date: Wed, 05 Feb 2014 14:46:35 +0100 [thread overview]
Message-ID: <1391607995.13157.24.camel@localhost> (raw)
In-Reply-To: <377a1c5ce05e25b068cf7576d094885c1396c6bc.1391454589.git.luto@amacapital.net>
On Mon, 2014-02-03 at 11:11 -0800, Andy Lutomirski wrote:
> +void audit_inc_n_rules()
> +{
> + struct task_struct *p, *g;
> + unsigned long flags;
> +
> + read_lock_irqsave(&tasklist_lock, flags);
> + if (audit_n_rules++ == 0) {
I know it's right, but it's too clever for me :) If we do end up
adding something like this Can we just do:
if (!audit_n_rules) {}
audit_n_rules++
I like dumb code :)
> + do_each_thread(g, p) {
> + if (p->audit_context)
> + set_tsk_thread_flag(p, TIF_SYSCALL_AUDIT);
> + } while_each_thread(g, p);
> + }
> + read_unlock_irqrestore(&tasklist_lock, flags);
> +}
WARNING: multiple messages have this Message-ID (diff)
From: Eric Paris <eparis@redhat.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: linux-audit@redhat.com, linux-kernel@vger.kernel.org,
Andi Kleen <andi@firstfloor.org>, Oleg Nesterov <oleg@redhat.com>,
Steve Grubb <sgrubb@redhat.com>
Subject: Re: [PATCH v2.1] audit: Only use the syscall slowpath when syscall audit rules exist
Date: Wed, 05 Feb 2014 14:46:35 +0100 [thread overview]
Message-ID: <1391607995.13157.24.camel@localhost> (raw)
In-Reply-To: <377a1c5ce05e25b068cf7576d094885c1396c6bc.1391454589.git.luto@amacapital.net>
On Mon, 2014-02-03 at 11:11 -0800, Andy Lutomirski wrote:
> +void audit_inc_n_rules()
> +{
> + struct task_struct *p, *g;
> + unsigned long flags;
> +
> + read_lock_irqsave(&tasklist_lock, flags);
> + if (audit_n_rules++ == 0) {
I know it's right, but it's too clever for me :) If we do end up
adding something like this Can we just do:
if (!audit_n_rules) {}
audit_n_rules++
I like dumb code :)
> + do_each_thread(g, p) {
> + if (p->audit_context)
> + set_tsk_thread_flag(p, TIF_SYSCALL_AUDIT);
> + } while_each_thread(g, p);
> + }
> + read_unlock_irqrestore(&tasklist_lock, flags);
> +}
next prev parent reply other threads:[~2014-02-05 13:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 19:11 [PATCH v2.1] audit: Only use the syscall slowpath when syscall audit rules exist Andy Lutomirski
2014-02-03 20:35 ` Eric Paris
2014-02-03 21:09 ` Andy Lutomirski
2014-02-04 16:50 ` Oleg Nesterov
2014-02-04 18:11 ` Andy Lutomirski
2014-02-04 19:11 ` Oleg Nesterov
2014-02-04 19:32 ` Andy Lutomirski
2014-02-05 13:46 ` Eric Paris [this message]
2014-02-05 13:46 ` Eric Paris
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=1391607995.13157.24.camel@localhost \
--to=eparis@redhat.com \
--cc=andi@firstfloor.org \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=oleg@redhat.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 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.