Linux-audit Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Cc: Richard Guy Briggs <rgb@redhat.com>
Subject: Re: [RFC][PATCH] audit: add feature audit_lost reset
Date: Wed, 07 Dec 2016 10:53:04 -0500	[thread overview]
Message-ID: <25564022.n3eyru8ApV@x2> (raw)
In-Reply-To: <CAHC9VhQCaJwoMw+dvHF5S9x9Jy1jXAMx_kGGXPHthfQXDUW06g@mail.gmail.com>

On Wednesday, December 7, 2016 10:05:30 AM EST Paul Moore wrote:
> On Tue, Dec 6, 2016 at 10:32 PM, Richard Guy Briggs <rgb@redhat.com> wrote:
> > On 2016-12-06 19:17, Paul Moore wrote:
> >> On Tue, Dec 6, 2016 at 12:13 AM, Richard Guy Briggs <rgb@redhat.com> 
> >> Okay, back up ... this whole mess about atomic_xchg() was always
> >> unrelated to my original suggestion, let's focus on my original
> >> comment ... don't reset the counter on a AUDIT_GET, reset it on a
> >> AUDIT_SET with an AUDIT_STATUS_LOST, does that make sense?
> > 
> > I understood that.  It sounds like a nice simple and straightforward
> > method to do it but for the question of accuracy.  Please rewind to my
> > fundamental point: How do we get an accurate reading of the last value
> > of audit_lost before resetting it?
> 
> Okay, I thought you were worried about a different race, which is why
> this discussion wasn't making much sense to me.  I understand your
> point, but I really dislike the API; although that's not your fault,
> it's really the only way to do it via AUDIT_GET.
> 
> I'd much prefer we go with the cleaner AUDIT_SET approach and just not
> worry about the small race window.  It would only be an issue if you
> reset the count under heavy audit load, and why would you reset the
> lost value if you were under a heavy audit load?  That just doesn't
> make sense.
> 
> I suppose we should hear from Steve on this since he was the one who
> has been asking for this feature, although I'm pretty sure I know what
> he is going to say.

To start with, this request comes from users of the audit system. I just 
passed along the request. The issue is that when you do auditctl -s, you get 
the number of records lost. If you do it the next day, you have to do math to 
see what the one day delta is. So, to make reporting easy, they want it to be 
reset whenever they do audictl -s.

You could also make a AUDIT_GET_RESET that gets the status and resets the 
number atomically. Then I can add another commandline option to auditctl that 
allows an admin to say also reset the counters. If that command line option is 
passed, I call AUDIT_GET_RESET otherwise I call AUDIT_GET. Thought?

-Steve

  reply	other threads:[~2016-12-07 15:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-05  8:02 [RFC][PATCH] audit: add feature audit_lost reset Richard Guy Briggs
2016-12-05 16:02 ` Paul Moore
2016-12-05 16:52   ` Richard Guy Briggs
2016-12-05 17:48     ` Paul Moore
2016-12-06  5:13       ` Richard Guy Briggs
2016-12-07  0:17         ` Paul Moore
2016-12-07  3:32           ` Richard Guy Briggs
2016-12-07 15:05             ` Paul Moore
2016-12-07 15:53               ` Steve Grubb [this message]
2016-12-07 15:58                 ` Richard Guy Briggs
2016-12-07 23:10                   ` Paul Moore
2016-12-07 23:30                     ` Steve Grubb
2016-12-07 23:45                       ` Paul Moore
2016-12-08  3:53                         ` Richard Guy Briggs
2016-12-08 14:05                           ` Paul Moore
2016-12-09  7:00                             ` Richard Guy Briggs
2016-12-09 23:46                               ` Paul Moore
2016-12-10 20:40                                 ` Steve Grubb
2016-12-12 20:53                                   ` Paul Moore
2016-12-07 15:55               ` 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=25564022.n3eyru8ApV@x2 \
    --to=sgrubb@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=rgb@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