Commit 29d444b2 authored by Paul Moore's avatar Paul Moore Committed by Zheng Zengkai
Browse files

audit: ensure userspace is penalized the same as the kernel when under pressure

maillist inclusion
category: bugfix
bugzilla: 185906 https://gitee.com/openeuler/kernel/issues/I4N958?from=project-issue
CVE: NA

Reference: https://patchwork.kernel.org/project/linux-audit/patch/163949858723.23091.5301356986109432893.stgit@olly/



-------------------------------------------------------------------

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: default avatarGaosheng Cui <cuigaosheng1@huawei.com>
Tested-by: default avatarGaosheng Cui <cuigaosheng1@huawei.com>
Reviewed-by: default avatarRichard Guy Briggs <rgb@redhat.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
Signed-off-by: default avatarCui GaoSheng <cuigaosheng1@huawei.com>
Reviewed-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent bd8698d8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment