All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <clm@fb.com>
To: Paul Moore <paul@paul-moore.com>
Cc: Eric Paris <eparis@redhat.com>,
	Dave Jones <davej@codemonkey.org.uk>,
	"linux-audit@redhat.com" <linux-audit@redhat.com>,
	Kyle McMartin <jkkm@fb.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] audit: set context->dummy even when audit is off
Date: Tue, 5 Nov 2019 00:39:21 +0000	[thread overview]
Message-ID: <5E08422A-BFE2-4515-A804-3DB42B7D8550@fb.com> (raw)
In-Reply-To: <CAHC9VhR92Ade8_d1UnTy4_hJDxmwZPU31eubnrq=ejPBjkTS4w@mail.gmail.com>

On 4 Nov 2019, at 19:15, Paul Moore wrote:

> On Fri, Nov 1, 2019 at 9:24 AM Chris Mason <clm@fb.com> wrote:
>> On 31 Oct 2019, at 19:27, Paul Moore wrote:
>>> It's been a while, but I thought we suggested Dave try running
>>> 'auditctl -a never,task' to see if that would solve his problem and 
>>> I
>>> believe his answer was no, which confused me a bit as the
>>> audit_filter_task() call in audit_alloc() should see that rule and
>>> return a state of AUDIT_DISABLED which not only prevents 
>>> audit_alloc()
>>> from allocating an audit_context (and remember if the audit_context 
>>> is
>>> NULL then audit_dummy_context() returns true), but it also clears 
>>> the
>>> TIF_SYSCALL_AUDIT flag (which I'm guessing you also want).
>>
>> Thanks for the reminder on this part, I meant to test it.  Yes, 
>> auditctl
>> -a never,task does stop the messages, even without my patch applied.
>
> I'm glad to hear that worked, I was going to be *very* confused if you
> came back and said you were still seeing NTP records.
>
> I would suggest that regardless of what happens with audit_enabled you
> likely want to keep this audit rule as part of your boot
> configuration, not only does it squelch the audit records, but it
> should improve performance as well (at the cost of no syscall
> auditing).  A number of Linux distros have this as their default at
> boot.
>

Definitely, we'll be testing auditctl -a never,task internally.  Before 
we went down that path I wanted to fully understand what was going on, 
but I think all the big questions have been answered at this point.

I'm happy to try variations on my patch, but if you want to include it, 
please do remember that I've really only tested it with auditing off.

-chris

  reply	other threads:[~2019-11-05  0:39 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-23 15:50 ntp audit spew Dave Jones
2019-09-23 16:14 ` Paul Moore
2019-09-23 16:58   ` Dave Jones
2019-09-23 18:57     ` Paul Moore
2019-09-23 19:49       ` Dave Jones
2019-09-23 19:49         ` Eric Paris
2019-09-24  2:39           ` Paul Moore
2019-09-24 13:30           ` Steve Grubb
2019-09-23 21:00   ` Richard Guy Briggs
2019-09-24  3:01     ` Paul Moore
2019-09-24 13:50       ` Richard Guy Briggs
2019-09-24 17:05         ` Paul Moore
2019-09-26 15:50           ` Paul Moore
2019-09-24 13:19   ` Steve Grubb
2019-09-24 17:01     ` Paul Moore
2019-10-31 16:39   ` [PATCH] audit: set context->dummy even when audit is off Chris Mason
2019-10-31 16:39     ` Chris Mason
2019-10-31 23:27     ` Paul Moore
2019-11-01 13:24       ` Chris Mason
2019-11-01 14:16         ` Steve Grubb
2019-11-01 14:26           ` Lenny Bruzenak
2019-11-01 14:49             ` Steve Grubb
2019-11-01 14:58               ` Lenny Bruzenak
2019-11-01 15:55           ` Chris Mason
2019-11-05  0:15         ` Paul Moore
2019-11-05  0:39           ` Chris Mason [this message]
2019-11-05  0:45             ` 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=5E08422A-BFE2-4515-A804-3DB42B7D8550@fb.com \
    --to=clm@fb.com \
    --cc=davej@codemonkey.org.uk \
    --cc=eparis@redhat.com \
    --cc=jkkm@fb.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@paul-moore.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.