| 2a0a3080 | 23-Dec-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
kbuild: uapi: drop dependency on CC_CAN_LINK
The header tests try to compile each header. Some UAPI headers depend on libc headers so they need a full userspace toolchain to build. This dependency i
kbuild: uapi: drop dependency on CC_CAN_LINK
The header tests try to compile each header. Some UAPI headers depend on libc headers so they need a full userspace toolchain to build. This dependency is expressed in kconfig as a dependency on CC_CAN_LINK. Many kernel builds do not satisfy CC_CAN_LINK as they only use a minimal kernel (cross-) compiler. In those configurations the UAPI headers are not tested at all.
However most UAPI headers do not even depend on any libc headers, and such dependencies are undesired in any case. Also the static analysis performed by headers_check.pl does not need CC_CAN_LINK.
Drop the hard dependency on CC_CAN_LINK and instead skip the affected compilation step for exactly those headers which require libc.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Link: https://patch.msgid.link/20251223-uapi-nostdinc-v1-5-d91545d794f7@linutronix.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>
show more ...
|
| 4ac85d9b | 23-Dec-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
kbuild: uapi: split out command conditions into variables
The condition logic will become a bit more complicated.
Split them out into dedicated variables so they stay readable.
Signed-off-by: Thom
kbuild: uapi: split out command conditions into variables
The condition logic will become a bit more complicated.
Split them out into dedicated variables so they stay readable.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Link: https://patch.msgid.link/20251223-uapi-nostdinc-v1-4-d91545d794f7@linutronix.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>
show more ...
|
| e2772ba5 | 23-Dec-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
kbuild: uapi: don't compile test bpf_perf_event.h on xtensa
The xtensa UAPI headers do not provide 'struct pt_regs', triggering an error:
usr/include/linux/bpf_perf_event.h:14:28: error: field 'reg
kbuild: uapi: don't compile test bpf_perf_event.h on xtensa
The xtensa UAPI headers do not provide 'struct pt_regs', triggering an error:
usr/include/linux/bpf_perf_event.h:14:28: error: field 'regs' has incomplete type
Disable the header tests for this file on xtensa.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Link: https://patch.msgid.link/20251223-uapi-nostdinc-v1-3-d91545d794f7@linutronix.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>
show more ...
|
| 2d7eda1d | 24-Oct-2025 |
Nathan Chancellor <nathan@kernel.org> |
kbuild: uapi: Drop types.h check from headers_check.pl
Since commit d6fc9fcbaa65 ("kbuild: compile-test exported headers to ensure they are self-contained"), the UAPI headers are compile tested stan
kbuild: uapi: Drop types.h check from headers_check.pl
Since commit d6fc9fcbaa65 ("kbuild: compile-test exported headers to ensure they are self-contained"), the UAPI headers are compile tested standalone with the compiler. This compile testing will catch a missing include of types.h, making the types.h checking in headers_check.pl originally added in commit 483b41218fa9 ("kbuild: add checks for include of linux/types in userspace headers") obsolete.
Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Link: https://patch.msgid.link/20251023-headers-pl-drop-check-sizes-v1-1-18bd21cf8f5e@kernel.org Signed-off-by: Nicolas Schier <nsc@kernel.org>
show more ...
|
| b8d762c9 | 13-Aug-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
kbuild: uapi: upgrade check_declarations() warning to error
No problematic declarations exist anymore.
Make sure it stays this way.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de
kbuild: uapi: upgrade check_declarations() warning to error
No problematic declarations exist anymore.
Make sure it stays this way.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: Nicolas Schier <nsc@kernel.org> Link: https://lore.kernel.org/r/20250813-kbuild-hdrtest-fixes-v2-5-8a7921ca3a03@linutronix.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>
show more ...
|
| c3a9d74e | 13-Aug-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
kbuild: uapi: upgrade check_sizetypes() warning to error
No problematic type usages exist anymore.
Make sure it stays this way.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Re
kbuild: uapi: upgrade check_sizetypes() warning to error
No problematic type usages exist anymore.
Make sure it stays this way.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: Nicolas Schier <nsc@kernel.org> Link: https://lore.kernel.org/r/20250813-kbuild-hdrtest-fixes-v2-4-8a7921ca3a03@linutronix.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>
show more ...
|
| 24b1bd64 | 13-Aug-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
kbuild: uapi: upgrade warning on asm/types.h inclusion to error
No usages of '#include <asm/types.h> in the UAPI headers exist anymore.
Make sure it stays this way.
Add a semicolon to the end of t
kbuild: uapi: upgrade warning on asm/types.h inclusion to error
No usages of '#include <asm/types.h> in the UAPI headers exist anymore.
Make sure it stays this way.
Add a semicolon to the end of the previous printf call to keep the syntax valid.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: Nicolas Schier <nsc@kernel.org> Link: https://lore.kernel.org/r/20250813-kbuild-hdrtest-fixes-v2-3-8a7921ca3a03@linutronix.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>
show more ...
|
| 3788d69d | 13-Aug-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
kbuild: uapi: fail header test on compiler warnings
Compiler warnings also indicate issues with the headers.
Make sure they don't go unnoticed.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@l
kbuild: uapi: fail header test on compiler warnings
Compiler warnings also indicate issues with the headers.
Make sure they don't go unnoticed.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: Nicolas Schier <nsc@kernel.org> Link: https://lore.kernel.org/r/20250813-kbuild-hdrtest-fixes-v2-2-8a7921ca3a03@linutronix.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>
show more ...
|
| 31a088b6 | 04-Apr-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
sparc: add asm/stat.h to UAPI compile-test coverage
asm/stat.h is currently excluded from the UAPI compile-test for ARCH=sparc because of the errors like follows:
In file included from <command-l
sparc: add asm/stat.h to UAPI compile-test coverage
asm/stat.h is currently excluded from the UAPI compile-test for ARCH=sparc because of the errors like follows:
In file included from <command-line>: ./usr/include/asm/stat.h:11:2: error: unknown type name 'ino_t' 11 | ino_t st_ino; | ^~~~~ HDRTEST usr/include/asm/param.h ./usr/include/asm/stat.h:12:2: error: unknown type name 'mode_t' 12 | mode_t st_mode; | ^~~~~~ ./usr/include/asm/stat.h:14:2: error: unknown type name 'uid_t' 14 | uid_t st_uid; | ^~~~~ ./usr/include/asm/stat.h:15:2: error: unknown type name 'gid_t' 15 | gid_t st_gid; | ^~~~~
The errors can be fixed by prefixing the types with __kernel_.
Then, remove the no-header-test entry from user/include/Makefile.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christoph Hellwig <hch@lst.de>
show more ...
|
| c01013a2 | 04-Apr-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
powerpc: add asm/stat.h to UAPI compile-test coverage
asm/stat.h is currently excluded from the UAPI compile-test for ARCH=powerpc because of the errors like follows:
HDRTEST usr/include/asm/st
powerpc: add asm/stat.h to UAPI compile-test coverage
asm/stat.h is currently excluded from the UAPI compile-test for ARCH=powerpc because of the errors like follows:
HDRTEST usr/include/asm/stat.h In file included from <command-line>:32: ./usr/include/asm/stat.h:32:2: error: unknown type name 'ino_t' 32 | ino_t st_ino; | ^~~~~ ./usr/include/asm/stat.h:35:2: error: unknown type name 'mode_t' 35 | mode_t st_mode; | ^~~~~~ ./usr/include/asm/stat.h:40:2: error: unknown type name 'uid_t' 40 | uid_t st_uid; | ^~~~~ ./usr/include/asm/stat.h:41:2: error: unknown type name 'gid_t' 41 | gid_t st_gid; | ^~~~~
The errors can be fixed by prefixing the types with __kernel_.
Then, remove the no-header-test entry from user/include/Makefile.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christoph Hellwig <hch@lst.de>
show more ...
|
| 8c1a381a | 04-Apr-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
mips: add asm/stat.h to UAPI compile-test coverage
asm/stat.h is currently excluded from the UAPI compile-test for ARCH=mips because of the errors like follows:
HDRTEST usr/include/asm/stat.h
mips: add asm/stat.h to UAPI compile-test coverage
asm/stat.h is currently excluded from the UAPI compile-test for ARCH=mips because of the errors like follows:
HDRTEST usr/include/asm/stat.h In file included from <command-line>:32: ./usr/include/asm/stat.h:22:2: error: unknown type name 'ino_t' 22 | ino_t st_ino; | ^~~~~ ./usr/include/asm/stat.h:23:2: error: unknown type name 'mode_t' 23 | mode_t st_mode; | ^~~~~~ ./usr/include/asm/stat.h:25:2: error: unknown type name 'uid_t' 25 | uid_t st_uid; | ^~~~~ ./usr/include/asm/stat.h:26:2: error: unknown type name 'gid_t' 26 | gid_t st_gid; | ^~~~~ ./usr/include/asm/stat.h:58:2: error: unknown type name 'mode_t' 58 | mode_t st_mode; | ^~~~~~ ./usr/include/asm/stat.h:61:2: error: unknown type name 'uid_t' 61 | uid_t st_uid; | ^~~~~ ./usr/include/asm/stat.h:62:2: error: unknown type name 'gid_t' 62 | gid_t st_gid; | ^~~~~
The errors can be fixed by prefixing the types with __kernel_.
Then, remove the no-header-test entry from user/include/Makefile.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christoph Hellwig <hch@lst.de>
show more ...
|
| 5c41778e | 04-Apr-2022 |
Masahiro Yamada <masahiroy@kernel.org> |
riscv: add linux/bpf_perf_event.h to UAPI compile-test coverage
I can compile this for ARCH=riscv with CONFIG_UAPI_HEADER_TEST=y.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by
riscv: add linux/bpf_perf_event.h to UAPI compile-test coverage
I can compile this for ARCH=riscv with CONFIG_UAPI_HEADER_TEST=y.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christoph Hellwig <hch@lst.de>
show more ...
|