From: Fan Wu <wufan@kernel.org>
To: linux-security-module@vger.kernel.org
Subject: [PATCH 5/6] ipe: fix enforcement audit
Date: Fri, 2 Oct 2026 19:51:34 -0700 [thread overview]
Message-ID: <20261003025135.3666767-6-wufan@kernel.org> (raw)
In-Reply-To: <20261003025135.3666767-1-wufan@kernel.org>
ipe_audit_enforce() starts an audit buffer but writes the state change
with audit_log(), which logs its own record. Ending the unused buffer
then emits an extra empty AUDIT_MAC_STATUS record.
Remove the unused buffer and log the state change with audit_log()
alone.
Fixes: a68916eaedcd ("ipe: add permissive toggle")
Assisted-by: LLM
Signed-off-by: Fan Wu <wufan@kernel.org>
---
security/ipe/audit.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/security/ipe/audit.c b/security/ipe/audit.c
index 5b4f24914c74..b6f8fb54085a 100644
--- a/security/ipe/audit.c
+++ b/security/ipe/audit.c
@@ -262,18 +262,10 @@ void ipe_audit_policy_load(const struct ipe_policy *const p)
*/
void ipe_audit_enforce(bool new_enforce, bool old_enforce)
{
- struct audit_buffer *ab;
-
- ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_MAC_STATUS);
- if (!ab)
- return;
-
audit_log(audit_context(), GFP_KERNEL, AUDIT_MAC_STATUS,
"enforcing=%d old_enforcing=%d auid=%u ses=%u"
" enabled=1 old-enabled=1 lsm=ipe res=1",
new_enforce, old_enforce,
from_kuid(&init_user_ns, audit_get_loginuid(current)),
audit_get_sessionid(current));
-
- audit_log_end(ab);
}
--
2.55.0
next prev parent reply other threads:[~2026-10-03 2:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 2:51 [PATCH 0/6] ipe: cleanups, an audit fix and updated links Fan Wu
2026-10-03 2:51 ` [PATCH 1/6] ipe: constify token_default() Fan Wu
2026-10-03 2:56 ` sashiko-bot
2026-10-03 2:51 ` [PATCH 2/6] ipe: use designated initializers for audit name tables Fan Wu
2026-10-03 2:59 ` sashiko-bot
2026-10-03 2:51 ` [PATCH 3/6] ipe: check parser token table sizes Fan Wu
2026-10-03 2:56 ` sashiko-bot
2026-10-03 2:51 ` [PATCH 4/6] ipe: correct policy text ownership comment Fan Wu
2026-10-03 2:57 ` sashiko-bot
2026-10-03 2:51 ` Fan Wu [this message]
2026-10-03 2:55 ` [PATCH 5/6] ipe: fix enforcement audit sashiko-bot
2026-10-03 2:51 ` [PATCH 6/6] ipe: update the project and test suite links Fan Wu
2026-10-03 2:55 ` sashiko-bot
2026-10-06 16:59 ` [PATCH 0/6] ipe: cleanups, an audit fix and updated links Fan Wu
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=20261003025135.3666767-6-wufan@kernel.org \
--to=wufan@kernel.org \
--cc=linux-security-module@vger.kernel.org \
/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.