[tip: timers/vdso] powerpc/audit: Directly include unistd_32.h from compat_audit.c

tip-bot2 for Thomas Weißschuh posted 1 patch 3 weeks, 6 days ago
arch/powerpc/kernel/compat_audit.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[tip: timers/vdso] powerpc/audit: Directly include unistd_32.h from compat_audit.c
Posted by tip-bot2 for Thomas Weißschuh 3 weeks, 6 days ago
The following commit has been merged into the timers/vdso branch of tip:

Commit-ID:     9b444349a2e96745fc172e161539594ee1f0239e
Gitweb:        https://git.kernel.org/tip/9b444349a2e96745fc172e161539594ee1f0239e
Author:        Thomas Weißschuh <thomas.weissschuh@linutronix.de>
AuthorDate:    Mon, 02 Mar 2026 08:58:40 +01:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Wed, 11 Mar 2026 10:15:43 +01:00

powerpc/audit: Directly include unistd_32.h from compat_audit.c

This source file undefines '__powerpc64__' to get the 32-bit system call
numbers from asm/unistd.h. However this symbol is also evaluated by
other headers, among them is asm/bitsperlong.h. The undefinition leads
to an inconsistency between __BITS_PER_LONG and the C type 'long'.
An upcoming consistency check will be tripped by this.

Directly include asm/unistd_32.h to get access to the 32-bit system call
numbers instead.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260302-vdso-compat-checkflags-v2-4-78e55baa58ba@linutronix.de
---
 arch/powerpc/kernel/compat_audit.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/compat_audit.c b/arch/powerpc/kernel/compat_audit.c
index 57b38c5..b4d81a5 100644
--- a/arch/powerpc/kernel/compat_audit.c
+++ b/arch/powerpc/kernel/compat_audit.c
@@ -1,7 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
-#undef __powerpc64__
 #include <linux/audit_arch.h>
-#include <asm/unistd.h>
+#include <asm/unistd_32.h>
 
 #include "audit_32.h"