Linux-audit Archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: linux-audit@redhat.com
Cc: Gaosheng Cui <cuigaosheng1@huawei.com>
Subject: Re: [PATCH] audit: ensure userspace is penalized the same as the kernel when under pressure
Date: Wed, 15 Dec 2021 13:15:17 -0500	[thread overview]
Message-ID: <CAHC9VhRBHJTga3sACQykafgULpmi_ETTWnj1XTdmNB71K7HHgg@mail.gmail.com> (raw)
In-Reply-To: <163949858723.23091.5301356986109432893.stgit@olly>

On Tue, Dec 14, 2021 at 11:16 AM Paul Moore <paul@paul-moore.com> wrote:
>
> Due to the audit control mutex necessary for serializing audit
> userspace messages we haven't been able to block/penalize userspace
> processes that attempt to send audit records while the system is
> under audit pressure.  The result is that privileged userspace
> applications have a priority boost with respect to audit as they are
> not bound by the same audit queue throttling as the other tasks on
> the system.
>
> This patch attempts to restore some balance to the system when under
> audit pressure by blocking these privileged userspace tasks after
> they have finished their audit processing, and dropped the audit
> control mutex, but before they return to userspace.
>
> Reported-by: Gaosheng Cui <cuigaosheng1@huawei.com>
> Signed-off-by: Paul Moore <paul@paul-moore.com>
> ---
>  kernel/audit.c |   18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)

FYI, I just merged this into audit/next; thanks for the testing/review
help everyone!

-- 
paul moore
www.paul-moore.com

--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit


      parent reply	other threads:[~2021-12-15 18:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14 16:16 [PATCH] audit: ensure userspace is penalized the same as the kernel when under pressure Paul Moore
2021-12-15  1:26 ` cuigaosheng
2021-12-15 17:42 ` Richard Guy Briggs
2021-12-15 18:15 ` Paul Moore [this message]

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=CAHC9VhRBHJTga3sACQykafgULpmi_ETTWnj1XTdmNB71K7HHgg@mail.gmail.com \
    --to=paul@paul-moore.com \
    --cc=cuigaosheng1@huawei.com \
    --cc=linux-audit@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).