]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
apparmor: fix label and profile debug macros
authorJohn Johansen <john.johansen@canonical.com>
Sun, 2 Nov 2025 09:36:57 +0000 (01:36 -0800)
committerJohn Johansen <john.johansen@canonical.com>
Thu, 29 Jan 2026 09:27:54 +0000 (01:27 -0800)
The label and profile debug macros were not correctly pasting their
var args.

Reviewed-by: Georgia Garcia <georgia.garcia@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/include/lib.h

index 7ca8a92c449ce63f5bf2569b6c7402b498209e9b..73ec624fd8c4dc1e77c4fbc86ff7e3845ff81c7b 100644 (file)
@@ -47,9 +47,11 @@ extern struct aa_dfa *stacksplitdfa;
 #define AA_DEBUG_LABEL(LAB, X, fmt, args...)                           \
 do {                                                                   \
        if ((LAB)->flags & FLAG_DEBUG1)                                 \
-               AA_DEBUG(X, fmt, args);                                 \
+               AA_DEBUG(X, fmt, ##args);                               \
 } while (0)
 
+#define AA_DEBUG_PROFILE(PROF, X, fmt...) AA_DEBUG_LABEL(&(PROF)->label, X, ##fmt)
+
 #define AA_WARN(X) WARN((X), "APPARMOR WARN %s: %s\n", __func__, #X)
 
 #define AA_BUG(X, args...)                                                 \