lore.kernel.org

From: Nathan Chancellor <nathan@kernel.org>
To: Paul Moore <paul@paul-moore.com>, Eric Paris <eparis@redhat.com>
Cc: Ricardo Robaina <rrobaina@redhat.com>,
	Waiman Long <longman@redhat.com>,
	 Richard Guy Briggs <rgb@redhat.com>,
	audit@vger.kernel.org,  linux-kernel@vger.kernel.org,
	stable@vger.kernel.org,  Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH] audit: Update audit_alloc_mark() and audit_dupe_exe() CONFIG_AUDITSYSCALL=n stubs
Date: Wed, 27 May 2026 10:45:26 -0700	[thread overview]
Message-ID: <20260527-audit-update-macro-stubs-v1-1-8cda8dbdae0a@kernel.org> (raw)
Commit 84470b80b7b0 ("audit: fix recursive locking deadlock in
audit_dupe_exe()") added a ctx parameter to audit_alloc_mark() and
audit_dupe_exe() but did not update the macro stubs used when
CONFIG_AUDITSYSCALL is not enabled, resulting in a build error for this
configuration:
  kernel/auditfilter.c: In function 'audit_data_to_entry':
  kernel/auditfilter.c:592:85: error: macro 'audit_alloc_mark' passed 4 arguments, but takes just 3
    592 |                         audit_mark = audit_alloc_mark(&entry->rule, str, f_val, NULL);
        |                                                                                     ^
  In file included from kernel/auditfilter.c:23:
  kernel/audit.h:327:9: note: macro 'audit_alloc_mark' defined here
    327 | #define audit_alloc_mark(k, p, l) (ERR_PTR(-EINVAL))
        |         ^~~~~~~~~~~~~~~~
  kernel/auditfilter.c:592:38: error: 'audit_alloc_mark' undeclared (first use in this function)
    592 |                         audit_mark = audit_alloc_mark(&entry->rule, str, f_val, NULL);
        |                                      ^~~~~~~~~~~~~~~~
  kernel/auditfilter.c:592:38: note: 'audit_alloc_mark' is a function-like macro and might be used incorrectly
  kernel/auditfilter.c:592:38: note: each undeclared identifier is reported only once for each function it appears in
  kernel/auditfilter.c: In function 'audit_dupe_rule':
  kernel/auditfilter.c:879:59: error: macro 'audit_dupe_exe' passed 3 arguments, but takes just 2
    879 |                         err = audit_dupe_exe(new, old, ctx);
        |                                                           ^
  kernel/audit.h:333:9: note: macro 'audit_dupe_exe' defined here
    333 | #define audit_dupe_exe(n, o) (-EINVAL)
        |         ^~~~~~~~~~~~~~
  kernel/auditfilter.c:879:31: error: 'audit_dupe_exe' undeclared (first use in this function)
    879 |                         err = audit_dupe_exe(new, old, ctx);
        |                               ^~~~~~~~~~~~~~
  kernel/auditfilter.c:879:31: note: 'audit_dupe_exe' is a function-like macro and might be used incorrectly
Update the macros with the correct number of parameters to resolve the
build error.
Cc: stable@vger.kernel.org
Fixes: 84470b80b7b0 ("audit: fix recursive locking deadlock in audit_dupe_exe()")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 kernel/audit.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/audit.h b/kernel/audit.h
index f1a77aef4533..92d5e723d570 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -324,13 +324,13 @@ extern struct list_head *audit_killed_trees(void);
 #define audit_watch_path(w) ""
 #define audit_watch_compare(w, i, d) 0
-#define audit_alloc_mark(k, p, l) (ERR_PTR(-EINVAL))
+#define audit_alloc_mark(k, p, l, c) (ERR_PTR(-EINVAL))
 #define audit_mark_path(m) ""
 #define audit_remove_mark(m) do { } while (0)
 #define audit_remove_mark_rule(k) do { } while (0)
 #define audit_mark_compare(m, i, d) 0
 #define audit_exe_compare(t, m) (-EINVAL)
-#define audit_dupe_exe(n, o) (-EINVAL)
+#define audit_dupe_exe(n, o, c) (-EINVAL)

 #define audit_remove_tree_rule(rule) BUG()
 #define audit_add_tree_rule(rule) -EINVAL
---
base-commit: 82bc8394b1aa74aedb9827da7730cfa6639716fd
change-id: 20260527-audit-update-macro-stubs-6e4d8e8a826e
Best regards,
--
Cheers,
Nathan

next             reply	other threads:[~2026-05-27 17:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27 17:45 Nathan Chancellor [this message]
2026-05-27 18:54 ` [PATCH] audit: Update audit_alloc_mark() and audit_dupe_exe() CONFIG_AUDITSYSCALL=n stubs Ricardo Robaina
2026-05-27 19:13   ` Paul Moore
2026-05-27 19:24     ` Ricardo Robaina
2026-05-27 21:12     ` Nathan Chancellor
2026-05-27 23:28       ` 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=20260527-audit-update-macro-stubs-v1-1-8cda8dbdae0a@kernel.org \
    --to=nathan@kernel.org \
    --cc=audit@vger.kernel.org \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=rgb@redhat.com \
    --cc=rrobaina@redhat.com \
    --cc=stable@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.

Read the original on lore.kernel.org ↗