From: Eric Paris <eparis@redhat.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: linux-arch <linux-arch@vger.kernel.org>,
Andi Kleen <andi@firstfloor.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Oleg Nesterov <oleg@redhat.com>,
linux-audit@redhat.com, Jonas Bonn <jonas.bonn@gmail.com>
Subject: Re: [ARCH question] Do syscall_get_nr and syscall_get_arguments always work?
Date: Wed, 19 Feb 2014 16:18:20 -0500 [thread overview]
Message-ID: <1392844700.2165.70.camel@flatline.rdu.redhat.com> (raw)
In-Reply-To: <CALCETrXnLfqo=VyaM7TyDAmjXyZDoztzmaNxkLudoSN7OZBd4Q@mail.gmail.com>
On Tue, 2014-02-18 at 19:09 -0800, Andy Lutomirski wrote:
> On Tue, Feb 18, 2014 at 11:39 AM, Eric Paris <eparis@redhat.com> wrote:
> > Al just indicated to me that on at least ia64, syscall_get_arguments()
> > is really expensive. So maybe not a deal breaker, but sounds like we'd
> > lose a lot of performance trying to get them at syscall exit...
> >
>
> I wonder how slow syscall_get_arguments has to be before it's a real
> problem. Remember that we only need to call it when we already know
> that an audit record needs to be written (or if a syscall argument is
> used in a filter rule, I suppose -- I'm sure sure whether that's
> possible).
It's possible to include a0-a3 in syscall filter rules. (Al wasn't
supportive of killing __audit_syscall_entry(). He mentioned in
particular difficulties around audit_get_stamp(). Won't pretend to have
my head wrapped around what he was referring to...
> But I think this is still a bit of a lost cause. Currently, if I'm
> reading the code correctly, signal delivery to a non-auditd process
> can result in writing an audit event.
So? The info we collect about the target of the signal is not related
to the changes you are discussing. The work/collection is done as the
task 'sending' the signal (and will only be emitted on syscall exit)
> If the signal is delivered
> during a syscall, then current code will write an audit record for
> that syscall on syscall exit.
Right, so we only care about if the sender has its audit_context all set
up. We'll only send a record on syscall exit...
> If we want to preserve that behavior without a syscall audit hook,
> then the signal delivery code needs to know whether it's in the middle
> of a syscall. AFAIK this is not possible.
Clearly we need a syscall exit hook, I agree with that...
> On the other hand, most interesting signals are probably *not* the
> result of a syscall anyway, so it may make sense to just remove that
> code entirely.
>
> TBH, as long as something happens to get rid of audit overhead when
> there are no rules, my interest in personally writing something fancy
> to make the nonzero-number-of-rules case have less overhead is rather
> low.
That's fair :)
>
> --Andy
next prev parent reply other threads:[~2014-02-19 21:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 23:50 [ARCH question] Do syscall_get_nr and syscall_get_arguments always work? Andy Lutomirski
2014-02-07 12:58 ` Jonas Bonn
2014-02-07 16:40 ` Andy Lutomirski
2014-02-18 19:39 ` Eric Paris
2014-02-19 3:09 ` Andy Lutomirski
2014-02-19 21:18 ` Eric Paris [this message]
2014-02-21 21:21 ` Richard Guy Briggs
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=1392844700.2165.70.camel@flatline.rdu.redhat.com \
--to=eparis@redhat.com \
--cc=andi@firstfloor.org \
--cc=jonas.bonn@gmail.com \
--cc=linux-arch@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox