linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Paris <eparis@redhat.com>
To: Miloslav Trmac <mitr@redhat.com>
Cc: linux-audit@redhat.com, linux-kernel@vger.kernel.org,
	anton@samba.org, Al Viro <viro@zeniv.linux.org.uk>,
	Michael Neuling <mikey@neuling.org>
Subject: Re: [PATCH] audit: speedup for syscalls when auditing is disabled
Date: Tue, 24 Aug 2010 11:17:44 -0400	[thread overview]
Message-ID: <1282663064.13142.113.camel@localhost.localdomain> (raw)
In-Reply-To: <1147049992.1241541282662896620.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>

On Tue, 2010-08-24 at 11:14 -0400, Miloslav Trmac wrote:
> ----- "Eric Paris" <eparis@redhat.com> wrote:
> > Add a new spot in the assembly which will call a function which will
> > check if audit_n_rules > 0 and if so will set TIF_SYSCALL_AUDIT and if
> > not will clear TIF_SYSCALL_AUDIT?  It might make things slightly worse
> > on systems which explictly disable audit and the flag would always be
> > clear on every task (like you did with the explicit rule) but I'm
> > guessing might be a win on systems with no rules which are wasting time
> > on the audit slow path.....
> Is "audit_n_rules" a specific enough trigger?  Right now, even if
> there are no rules configured at all, audit_log_start() while
> processing a syscall will mark that syscall for auditing, and all
> collected information about the syscall will be logged at syscall
> exit.
> 
> Would the suggested change break this behavior?

That's correct, if there are 0 rules we still collect information while
knowing that it will get thrown away at the end (since obviously no rule
is going to switch the state from 'build' to 'on')

The only real loss is that a syscall in progress when a rule is loaded
would get audited today and wouldn't get audited with my new proposal.
I don't see that as an unacceptable race.....

-Eric


  reply	other threads:[~2010-08-24 15:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-20  2:13 [PATCH] audit: speedup for syscalls when auditing is disabled Michael Neuling
2010-08-23 17:56 ` Eric Paris
2010-08-24  2:11   ` Michael Neuling
2010-08-24  3:43     ` Eric Paris
2010-08-24  5:56       ` Michael Neuling
2010-08-24  5:56       ` Michael Neuling
2010-08-24 20:06         ` Eric Paris
2010-08-24 15:14       ` Miloslav Trmac
2010-08-24 15:17         ` Eric Paris [this message]
2010-08-25  3:11       ` Michael Neuling
2010-08-25 11:59         ` Eric Paris
2010-08-26  3:34           ` Anton Blanchard
2010-08-27 17:49             ` Eric Paris
2010-08-24  2:16   ` Anton Blanchard
2010-08-24  3:51     ` 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=1282663064.13142.113.camel@localhost.localdomain \
    --to=eparis@redhat.com \
    --cc=anton@samba.org \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikey@neuling.org \
    --cc=mitr@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).