Skip to contentSkip to conversation

/usr/aarch64-linux-gnu/include/linux/types.h:12: Error: unknown mnemonic `typedef' -- `typedef __signed__ __int128 __s128 __attribute__((aligned(16)))'

PATCH kernel test robot 3 participants 7 messages Oct 29 – Nov 2

Subsystems (2)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git asm-generic
head:   dd7cc8c26b6a37a54adc5ce38d286521b7201044
commit: dd7cc8c26b6a37a54adc5ce38d286521b7201044 [15/15] treewide: Stop defining __ASSEMBLY__ for assembler files
config: arm64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20261029/[email protected]/config)
compiler: aarch64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261029/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

Note: the arnd-asm-generic/asm-generic HEAD dd7cc8c26b6a37a54adc5ce38d286521b7201044 builds fine.
It only hurts bisectability.

All errors (new ones prefixed by >>):

/usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h: Assembler messages:

>> /usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:20: Error: unknown mnemonic `typedef' -- `typedef __signed__ char __s8'
>> /usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:21: Error: unknown mnemonic `typedef' -- `typedef unsigned char __u8'
>> /usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:23: Error: unknown mnemonic `typedef' -- `typedef __signed__ short __s16'
>> /usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:24: Error: unknown mnemonic `typedef' -- `typedef unsigned short __u16'
>> /usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:26: Error: unknown mnemonic `typedef' -- `typedef __signed__ int __s32'
>> /usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:27: Error: unknown mnemonic `typedef' -- `typedef unsigned int __u32'
>> /usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:30: Error: unknown mnemonic `__extension__' -- `__extension__ typedef __signed__ long long __s64'
>> /usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:31: Error: unknown mnemonic `__extension__' -- `__extension__ typedef unsigned long long __u64'
>> /usr/aarch64-linux-gnu/include/linux/posix_types.h:25: Error: unknown mnemonic `typedef' -- `typedef struct{'
>> /usr/aarch64-linux-gnu/include/linux/posix_types.h:26: Error: unknown mnemonic `unsigned' -- `unsigned long fds_bits[1024/(8*sizeof(long))]'
>> /usr/aarch64-linux-gnu/include/linux/posix_types.h:27: Error: junk at end of line, first unrecognized character is `}'
>> /usr/aarch64-linux-gnu/include/linux/posix_types.h:30: Error: unknown mnemonic `typedef' -- `typedef void(*__kernel_sighandler_t)(int)'
>> /usr/aarch64-linux-gnu/include/linux/posix_types.h:33: Error: unknown mnemonic `typedef' -- `typedef int __kernel_key_t'
>> /usr/aarch64-linux-gnu/include/linux/posix_types.h:34: Error: unknown mnemonic `typedef' -- `typedef int __kernel_mqd_t'
>> /usr/aarch64-linux-gnu/include/asm/posix_types.h:5: Error: unknown mnemonic `typedef' -- `typedef unsigned short __kernel_old_uid_t'
>> /usr/aarch64-linux-gnu/include/asm/posix_types.h:6: Error: unknown mnemonic `typedef' -- `typedef unsigned short __kernel_old_gid_t'
>> /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:15: Error: unknown mnemonic `typedef' -- `typedef long __kernel_long_t'
>> /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:16: Error: unknown mnemonic `typedef' -- `typedef unsigned long __kernel_ulong_t'
>> /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:20: Error: unknown mnemonic `typedef' -- `typedef __kernel_ulong_t __kernel_ino_t'
>> /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:24: Error: unknown mnemonic `typedef' -- `typedef unsigned int __kernel_mode_t'

/usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:28: Error: unknown mnemonic typedef' -- typedef int __kernel_pid_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:32: Error: unknown mnemonic typedef' -- typedef int __kernel_ipc_pid_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:36: Error: unknown mnemonic typedef' -- typedef unsigned int __kernel_uid_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:37: Error: unknown mnemonic typedef' -- typedef unsigned int __kernel_gid_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:41: Error: unknown mnemonic typedef' -- typedef __kernel_long_t __kernel_suseconds_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:45: Error: unknown mnemonic typedef' -- typedef int __kernel_daddr_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:49: Error: unknown mnemonic typedef' -- typedef unsigned int __kernel_uid32_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:50: Error: unknown mnemonic typedef' -- typedef unsigned int __kernel_gid32_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:59: Error: unknown mnemonic typedef' -- typedef unsigned int __kernel_old_dev_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:72: Error: unknown mnemonic typedef' -- typedef __kernel_ulong_t __kernel_size_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:73: Error: unknown mnemonic typedef' -- typedef __kernel_long_t __kernel_ssize_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:74: Error: unknown mnemonic typedef' -- typedef __kernel_long_t __kernel_ptrdiff_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:79: Error: unknown mnemonic typedef' -- typedef struct{' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:80: Error: unknown mnemonic int' -- int val[2]' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:81: Error: junk at end of line, first unrecognized character is }' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:87: Error: unknown mnemonic typedef' -- typedef __kernel_long_t __kernel_off_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:88: Error: unknown mnemonic typedef' -- typedef long long __kernel_loff_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:89: Error: unknown mnemonic typedef' -- typedef __kernel_long_t __kernel_old_time_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:90: Error: unknown mnemonic typedef' -- typedef __kernel_long_t __kernel_time_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:91: Error: unknown mnemonic typedef' -- typedef long long __kernel_time64_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:92: Error: unknown mnemonic typedef' -- typedef __kernel_long_t __kernel_clock_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:93: Error: unknown mnemonic typedef' -- typedef int __kernel_timer_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:94: Error: unknown mnemonic typedef' -- typedef int __kernel_clockid_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:95: Error: unknown mnemonic typedef' -- typedef char*__kernel_caddr_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:96: Error: unknown mnemonic typedef' -- typedef unsigned short __kernel_uid16_t' /usr/aarch64-linux-gnu/include/asm-generic/posix_types.h:97: Error: unknown mnemonic typedef' -- typedef unsigned short __kernel_gid16_t' /usr/aarch64-linux-gnu/include/linux/types.h:12: Error: unknown mnemonic typedef' -- typedef __signed__ __int128 __s128 __attribute__((aligned(16)))' /usr/aarch64-linux-gnu/include/linux/types.h:13: Error: unknown mnemonic typedef' -- typedef unsigned __int128 __u128 __attribute__((aligned(16)))' /usr/aarch64-linux-gnu/include/linux/types.h:31: Error: unknown mnemonic typedef' -- typedef __u16 __le16' /usr/aarch64-linux-gnu/include/linux/types.h:32: Error: unknown mnemonic typedef' -- typedef __u16 __be16' /usr/aarch64-linux-gnu/include/linux/types.h:33: Error: unknown mnemonic typedef' -- typedef __u32 __le32' /usr/aarch64-linux-gnu/include/linux/types.h:34: Error: unknown mnemonic typedef' -- typedef __u32 __be32' /usr/aarch64-linux-gnu/include/linux/types.h:35: Error: unknown mnemonic typedef' -- typedef __u64 __le64' /usr/aarch64-linux-gnu/include/linux/types.h:36: Error: unknown mnemonic typedef' -- typedef __u64 __be64' /usr/aarch64-linux-gnu/include/linux/types.h:38: Error: unknown mnemonic typedef' -- typedef __u16 __sum16' /usr/aarch64-linux-gnu/include/linux/types.h:39: Error: unknown mnemonic typedef' -- typedef __u32 __wsum' /usr/aarch64-linux-gnu/include/linux/types.h:55: Error: unknown mnemonic typedef' -- typedef unsigned __poll_t' /usr/aarch64-linux-gnu/include/asm/ptrace.h:88: Error: unknown mnemonic struct' -- struct user_pt_regs{' /usr/aarch64-linux-gnu/include/asm/ptrace.h:89: Error: unknown mnemonic __u64' -- __u64 regs[31]' /usr/aarch64-linux-gnu/include/asm/ptrace.h:90: Error: unknown mnemonic __u64' -- __u64 sp' /usr/aarch64-linux-gnu/include/asm/ptrace.h:91: Error: unknown mnemonic __u64' -- __u64 pc' /usr/aarch64-linux-gnu/include/asm/ptrace.h:92: Error: unknown mnemonic __u64' -- __u64 pstate' /usr/aarch64-linux-gnu/include/asm/ptrace.h:93: Error: junk at end of line, first unrecognized character is }' /usr/aarch64-linux-gnu/include/asm/ptrace.h:95: Error: unknown mnemonic struct' -- struct user_fpsimd_state{' /usr/aarch64-linux-gnu/include/asm/ptrace.h:96: Error: unknown mnemonic __uint128_t' -- __uint128_t vregs[32]' /usr/aarch64-linux-gnu/include/asm/ptrace.h:97: Error: unknown mnemonic __u32' -- __u32 fpsr' /usr/aarch64-linux-gnu/include/asm/ptrace.h:98: Error: unknown mnemonic __u32' -- __u32 fpcr' /usr/aarch64-linux-gnu/include/asm/ptrace.h:99: Error: unknown mnemonic __u32' -- __u32 __reserved[2]' /usr/aarch64-linux-gnu/include/asm/ptrace.h:100: Error: junk at end of line, first unrecognized character is }' /usr/aarch64-linux-gnu/include/asm/ptrace.h:102: Error: unknown mnemonic struct' -- struct user_hwdebug_state{' /usr/aarch64-linux-gnu/include/asm/ptrace.h:103: Error: unknown mnemonic __u32' -- __u32 dbg_info' /usr/aarch64-linux-gnu/include/asm/ptrace.h:104: Error: unknown mnemonic __u32' -- __u32 pad' /usr/aarch64-linux-gnu/include/asm/ptrace.h:105: Error: unknown mnemonic struct' -- struct {' /usr/aarch64-linux-gnu/include/asm/ptrace.h:106: Error: unknown mnemonic __u64' -- __u64 addr' /usr/aarch64-linux-gnu/include/asm/ptrace.h:107: Error: unknown mnemonic __u32' -- __u32 ctrl' /usr/aarch64-linux-gnu/include/asm/ptrace.h:108: Error: unknown mnemonic __u32' -- __u32 pad' /usr/aarch64-linux-gnu/include/asm/ptrace.h:109: Error: junk at end of line, first unrecognized character is }' /usr/aarch64-linux-gnu/include/asm/ptrace.h:110: Error: junk at end of line, first unrecognized character is }' /usr/aarch64-linux-gnu/include/asm/ptrace.h:114: Error: unknown mnemonic struct' -- struct user_sve_header{' /usr/aarch64-linux-gnu/include/asm/ptrace.h:115: Error: unknown mnemonic __u32' -- __u32 size' /usr/aarch64-linux-gnu/include/asm/ptrace.h:116: Error: unknown mnemonic __u32' -- __u32 max_size' /usr/aarch64-linux-gnu/include/asm/ptrace.h:117: Error: unknown mnemonic __u16' -- __u16 vl' /usr/aarch64-linux-gnu/include/asm/ptrace.h:118: Error: unknown mnemonic __u16' -- __u16 max_vl' /usr/aarch64-linux-gnu/include/asm/ptrace.h:119: Error: unknown mnemonic __u16' -- __u16 flags' /usr/aarch64-linux-gnu/include/asm/ptrace.h:120: Error: unknown mnemonic __u16' -- __u16 __reserved' /usr/aarch64-linux-gnu/include/asm/ptrace.h:121: Error: junk at end of line, first unrecognized character is }' /usr/aarch64-linux-gnu/include/asm/ptrace.h:253: Error: unknown mnemonic struct' -- struct user_pac_mask{' /usr/aarch64-linux-gnu/include/asm/ptrace.h:254: Error: unknown mnemonic __u64' -- __u64 data_mask' /usr/aarch64-linux-gnu/include/asm/ptrace.h:255: Error: unknown mnemonic __u64' -- __u64 insn_mask' /usr/aarch64-linux-gnu/include/asm/ptrace.h:256: Error: junk at end of line, first unrecognized character is }' /usr/aarch64-linux-gnu/include/asm/ptrace.h:260: Error: unknown mnemonic struct' -- struct user_pac_address_keys{' /usr/aarch64-linux-gnu/include/asm/ptrace.h:261: Error: unknown mnemonic __uint128_t' -- __uint128_t apiakey' /usr/aarch64-linux-gnu/include/asm/ptrace.h:262: Error: unknown mnemonic __uint128_t' -- __uint128_t apibkey' /usr/aarch64-linux-gnu/include/asm/ptrace.h:263: Error: unknown mnemonic __uint128_t' -- __uint128_t apdakey' /usr/aarch64-linux-gnu/include/asm/ptrace.h:264: Error: unknown mnemonic __uint128_t' -- __uint128_t apdbkey' /usr/aarch64-linux-gnu/include/asm/ptrace.h:265: Error: junk at end of line, first unrecognized character is }' /usr/aarch64-linux-gnu/include/asm/ptrace.h:267: Error: unknown mnemonic struct' -- struct user_pac_generic_keys{' /usr/aarch64-linux-gnu/include/asm/ptrace.h:268: Error: unknown mnemonic __uint128_t' -- __uint128_t apgakey' /usr/aarch64-linux-gnu/include/asm/ptrace.h:269: Error: junk at end of line, first unrecognized character is }' /usr/aarch64-linux-gnu/include/asm/ptrace.h:273: Error: unknown mnemonic struct' -- struct user_za_header{' /usr/aarch64-linux-gnu/include/asm/ptrace.h:274: Error: unknown mnemonic __u32' -- __u32 size' /usr/aarch64-linux-gnu/include/asm/ptrace.h:275: Error: unknown mnemonic __u32' -- __u32 max_size' /usr/aarch64-linux-gnu/include/asm/ptrace.h:276: Error: unknown mnemonic __u16' -- __u16 vl' /usr/aarch64-linux-gnu/include/asm/ptrace.h:277: Error: unknown mnemonic __u16' -- __u16 max_vl' /usr/aarch64-linux-gnu/include/asm/ptrace.h:278: Error: unknown mnemonic __u16' -- __u16 flags' /usr/aarch64-linux-gnu/include/asm/ptrace.h:279: Error: unknown mnemonic __u16' -- __u16 __reserved' /usr/aarch64-linux-gnu/include/asm/ptrace.h:280: Error: junk at end of line, first unrecognized character is }'

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

maintainer
#1 lore raw
Quoted 6 lines · kernel test robot

tree:
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
asm-generic

head:   dd7cc8c26b6a37a54adc5ce38d286521b7201044
commit: dd7cc8c26b6a37a54adc5ce38d286521b7201044 [15/15] treewide: Stop 

defining __ASSEMBLY__ for assembler files

Hi Thomas,

Quoted 13 lines

config: arm64-allnoconfig-bpf
(https://download.01.org/0day-ci/archive/20261029/[email protected]/config)
compiler: aarch64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build):
(https://download.01.org/0day-ci/archive/20261029/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes:
https://lore.kernel.org/oe-kbuild-all/[email protected]/

Quoted 9 lines

Note: the arnd-asm-generic/asm-generic HEAD dd7cc8c26b6a37a54adc5ce38d286521b7201044 builds fine.
It only hurts bisectability.

All errors (new ones prefixed by >>):

/usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h: Assembler messages:

Quoted 2 lines
Quoted 2 lines

/usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:20: Error: unknown mnemonic typedef' -- typedef __signed__ char __s8' /usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:21: Error: unknown mnemonic typedef' -- typedef unsigned char __u8'

From what I can tell, this happens after your last patch when cross-compiling kselftest against system headers that still check for __ASSEMBLY__ instead of __ASSEMBLER__.

The command from the build log is:
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-14.2.0 ~/lkp-tests/kbuild/make.cross W=1 -C tools/testing/selftests

The command that causes this is

gcc -std=gnu99 -O2 -Wall -Wstrict-prototypes -D_GNU_SOURCE= -I/home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../tools/testing/selftests -idirafter /home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../tools/include -idirafter /home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../tools/include/generated -idirafter /home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../arch/arm64/include -idirafter /home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../include -Wa,--noexecstack vdso_test_chacha.c vgetrandom-chacha.S -o /home/arnd/arm-soc/build/tmp/kselftest/vDSO/vdso_test_chacha

and looking at the preprocessed file, I see a wild mix of tools/include, ${srctree}/arch/arm64/include/ and /usr/include. I also see that at least part of the problem is that arch/arm64/kernel/vdso/vgetrandom-chacha.S includes arch/arm64/include/asm/assembler.h, which then goes on to include the world.

Arnd

# 0 "vgetrandom-chacha.S"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3
# 0 "<command-line>" 2
# 1 "vgetrandom-chacha.S"
# 1 "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S" 1 # 1 "${srctree}/tools/include/linux/linkage.h" 1 3
# 1 "${srctree}/tools/include/linux/export.h" 1 3
# 5 "${srctree}/tools/include/linux/linkage.h" 2 3
# 4 "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S" 2 # 1 "${srctree}/arch/arm64/include/asm/cache.h" 1 3
# 5 "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S" 2 # 1 "${srctree}/arch/arm64/include/asm/assembler.h" 1 3 # 17 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 1 "${srctree}/tools/include/asm/alternative.h" 1 3
# 18 "${srctree}/arch/arm64/include/asm/assembler.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/asm-bug.h" 1 3
# 1 "${srctree}/arch/arm64/include/asm/brk-imm.h" 1 3
# 9 "${srctree}/arch/arm64/include/asm/asm-bug.h" 2 3
# 19 "${srctree}/arch/arm64/include/asm/assembler.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/asm-extable.h" 1 3 # 1 "/usr/include/linux/bits.h" 1 3
# 6 "${srctree}/arch/arm64/include/asm/asm-extable.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/gpr-num.h" 1 3
# 7 "${srctree}/arch/arm64/include/asm/asm-extable.h" 2 3 # 62 "${srctree}/arch/arm64/include/asm/asm-extable.h" 3 # 20 "${srctree}/arch/arm64/include/asm/assembler.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/asm-offsets.h" 1 3 # 1 "${srctree}/tools/include/generated/asm-offsets.h" 1 3 # 2 "${srctree}/arch/arm64/include/asm/asm-offsets.h" 2 3 # 21 "${srctree}/arch/arm64/include/asm/assembler.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/cpufeature.h" 1 3 # 9 "${srctree}/arch/arm64/include/asm/cpufeature.h" 3 # 1 "${srctree}/arch/arm64/include/asm/alternative-macros.h" 1 3 # 1 "/usr/include/linux/const.h" 1 3
# 6 "${srctree}/arch/arm64/include/asm/alternative-macros.h" 2 3 # 1 "${srctree}/tools/include/vdso/bits.h" 1 3
# 1 "${srctree}/tools/include/vdso/const.h" 1 3
# 1 "${srctree}/tools/include/uapi/linux/const.h" 1 3
# 6 "${srctree}/tools/include/vdso/const.h" 2 3
# 6 "${srctree}/tools/include/vdso/bits.h" 2 3
# 7 "${srctree}/arch/arm64/include/asm/alternative-macros.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/cpucaps.h" 1 3
# 1 "${srctree}/tools/include/generated/asm/cpucap-defs.h" 1 3 # 7 "${srctree}/arch/arm64/include/asm/cpucaps.h" 2 3
# 9 "${srctree}/arch/arm64/include/asm/alternative-macros.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/insn-def.h" 1 3 # 10 "${srctree}/arch/arm64/include/asm/alternative-macros.h" 2 3 # 88 "${srctree}/arch/arm64/include/asm/alternative-macros.h" 3 # 1 "${srctree}/arch/arm64/include/asm/assembler.h" 1 3 # 89 "${srctree}/arch/arm64/include/asm/alternative-macros.h" 2 3 # 132 "${srctree}/arch/arm64/include/asm/alternative-macros.h" 3 # 10 "${srctree}/arch/arm64/include/asm/cpufeature.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/cputype.h" 1 3
# 12 "${srctree}/arch/arm64/include/asm/cpufeature.h" 2 3 # 1 "/usr/lib/linux/uapi/arm64/asm/hwcap.h" 1 3
# 13 "${srctree}/arch/arm64/include/asm/cpufeature.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/sysreg.h" 1 3
# 13 "${srctree}/arch/arm64/include/asm/sysreg.h" 3
# 1 "${srctree}/tools/include/linux/stringify.h" 1 3
# 14 "${srctree}/arch/arm64/include/asm/sysreg.h" 2 3
# 1 "${srctree}/tools/include/linux/kasan-tags.h" 1 3
# 15 "${srctree}/arch/arm64/include/asm/sysreg.h" 2 3
# 1 "${srctree}/tools/include/linux/kconfig.h" 1 3
# 16 "${srctree}/arch/arm64/include/asm/sysreg.h" 2 3
# 1110 "${srctree}/arch/arm64/include/asm/sysreg.h" 3
# 14 "${srctree}/arch/arm64/include/asm/cpufeature.h" 2 3 # 22 "${srctree}/arch/arm64/include/asm/assembler.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/debug-monitors.h" 1 3 # 1 "/usr/include/linux/errno.h" 1 3
# 1 "/usr/lib/linux/uapi/arm64/asm/errno.h" 1 3
# 1 "/usr/include/asm-generic/errno.h" 1 3
# 1 "/usr/include/asm-generic/errno-base.h" 1 3
# 6 "/usr/include/asm-generic/errno.h" 2 3
# 2 "/usr/lib/linux/uapi/arm64/asm/errno.h" 2 3
# 2 "/usr/include/linux/errno.h" 2 3
# 9 "${srctree}/arch/arm64/include/asm/debug-monitors.h" 2 3 # 1 "/usr/include/linux/types.h" 1 3
# 1 "/usr/lib/linux/uapi/arm64/asm/types.h" 1 3
# 1 "/usr/include/asm-generic/types.h" 1 3
# 1 "/usr/include/asm-generic/int-ll64.h" 1 3
# 12 "/usr/include/asm-generic/int-ll64.h" 3
# 1 "/usr/lib/linux/uapi/arm64/asm/bitsperlong.h" 1 3
# 22 "/usr/lib/linux/uapi/arm64/asm/bitsperlong.h" 3
# 1 "/usr/include/asm-generic/bitsperlong.h" 1 3
# 23 "/usr/lib/linux/uapi/arm64/asm/bitsperlong.h" 2 3 # 13 "/usr/include/asm-generic/int-ll64.h" 2 3
# 8 "/usr/include/asm-generic/types.h" 2 3
# 2 "/usr/lib/linux/uapi/arm64/asm/types.h" 2 3
# 6 "/usr/include/linux/types.h" 2 3
# 1 "/usr/include/linux/posix_types.h" 1 3
# 1 "/usr/include/linux/stddef.h" 1 3
# 6 "/usr/include/linux/posix_types.h" 2 3
# 25 "/usr/include/linux/posix_types.h" 3
# 1 "/usr/lib/linux/uapi/arm64/asm/posix_types.h" 1 3
# 1 "/usr/include/asm-generic/posix_types.h" 1 3
# 15 "/usr/include/asm-generic/posix_types.h" 3
# 59 "/usr/include/asm-generic/posix_types.h" 3
# 72 "/usr/include/asm-generic/posix_types.h" 3
# 10 "/usr/lib/linux/uapi/arm64/asm/posix_types.h" 2 3 # 37 "/usr/include/linux/posix_types.h" 2 3
# 10 "/usr/include/linux/types.h" 2 3
# 31 "/usr/include/linux/types.h" 3
# 55 "/usr/include/linux/types.h" 3
# 10 "${srctree}/arch/arm64/include/asm/debug-monitors.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/esr.h" 1 3
# 12 "${srctree}/arch/arm64/include/asm/debug-monitors.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/insn.h" 1 3
# 10 "${srctree}/arch/arm64/include/asm/insn.h" 3
# 1 "${srctree}/tools/include/linux/build_bug.h" 1 3
# 1 "${srctree}/tools/include/linux/compiler.h" 1 3
# 6 "${srctree}/tools/include/linux/build_bug.h" 2 3
# 11 "${srctree}/arch/arm64/include/asm/insn.h" 2 3
# 13 "${srctree}/arch/arm64/include/asm/debug-monitors.h" 2 3 # 1 "/usr/lib/linux/uapi/arm64/asm/ptrace.h" 1 3
# 26 "/usr/lib/linux/uapi/arm64/asm/ptrace.h" 3
# 1 "/usr/lib/linux/uapi/arm64/asm/sve_context.h" 1 3
# 27 "/usr/lib/linux/uapi/arm64/asm/ptrace.h" 2 3
# 14 "${srctree}/arch/arm64/include/asm/debug-monitors.h" 2 3 # 24 "${srctree}/arch/arm64/include/asm/assembler.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/page.h" 1 3
# 11 "${srctree}/arch/arm64/include/asm/page.h" 3
# 1 "${srctree}/arch/arm64/include/asm/page-def.h" 1 3 # 13 "${srctree}/arch/arm64/include/asm/page-def.h" 3
# 1 "${srctree}/include/vdso/page.h" 1 3
# 14 "${srctree}/arch/arm64/include/asm/page-def.h" 2 3 # 12 "${srctree}/arch/arm64/include/asm/page.h" 2 3
# 67 "${srctree}/arch/arm64/include/asm/page.h" 3
# 1 "${srctree}/include/asm-generic/getorder.h" 1 3
# 68 "${srctree}/arch/arm64/include/asm/page.h" 2 3
# 25 "${srctree}/arch/arm64/include/asm/assembler.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/pgtable-hwdef.h" 1 3 # 1 "${srctree}/arch/arm64/include/asm/memory.h" 1 3
# 14 "${srctree}/arch/arm64/include/asm/memory.h" 3
# 1 "${srctree}/tools/include/linux/sizes.h" 1 3
# 15 "${srctree}/arch/arm64/include/asm/memory.h" 2 3
# 9 "${srctree}/arch/arm64/include/asm/pgtable-hwdef.h" 2 3 # 26 "${srctree}/arch/arm64/include/asm/assembler.h" 2 3 # 1 "${srctree}/arch/arm64/include/asm/thread_info.h" 1 3 # 28 "${srctree}/arch/arm64/include/asm/assembler.h" 2 3 # 140 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 152 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 181 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 244 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 311 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 345 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 393 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 409 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 422 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 461 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 535 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 582 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 599 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 634 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 789 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 805 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 829 "${srctree}/arch/arm64/include/asm/assembler.h" 3 # 6 "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S" 2 # 43 "../../../../arch/arm64/kernel/vdso/vgetrandom-chacha.S" # 8 "vgetrandom-chacha.S" 2

#2 lore raw
Quoted 29 lines · Arnd Bergmann
Quoted 6 lines · kernel test robot

tree:
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
asm-generic

head:   dd7cc8c26b6a37a54adc5ce38d286521b7201044
commit: dd7cc8c26b6a37a54adc5ce38d286521b7201044 [15/15] treewide: Stop

defining __ASSEMBLY__ for assembler files

Hi Thomas,

Quoted 19 lines

config: arm64-allnoconfig-bpf
(https://download.01.org/0day-ci/archive/20261029/[email protected]/config)
compiler: aarch64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build):
(https://download.01.org/0day-ci/archive/20261029/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes:
https://lore.kernel.org/oe-kbuild-all/[email protected]/

Note: the arnd-asm-generic/asm-generic HEAD dd7cc8c26b6a37a54adc5ce38d286521b7201044 builds fine.
It only hurts bisectability.

All errors (new ones prefixed by >>):

Quoted 8 lines
Quoted 3 lines

/usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h: Assembler messages:

Quoted 2 lines
Quoted 2 lines

/usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:20: Error: unknown mnemonic typedef' -- typedef __signed__ char __s8' /usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:21: Error: unknown mnemonic typedef' -- typedef unsigned char __u8'

From what I can tell, this happens after your last patch when cross-compiling
kselftest against system headers that still check for __ASSEMBLY__ instead of __ASSEMBLER__.

D'oh! Could you please drop that last patch for now 'til I figured out a solution for that mess...?

Thanks,
Thomas

#3 lore raw
In reply to Arnd Bergmann
Quoted 43 lines · Arnd Bergmann
Quoted 6 lines · kernel test robot

tree:
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
asm-generic

head:   dd7cc8c26b6a37a54adc5ce38d286521b7201044
commit: dd7cc8c26b6a37a54adc5ce38d286521b7201044 [15/15] treewide: Stop

defining __ASSEMBLY__ for assembler files

Hi Thomas,

Quoted 13 lines

config: arm64-allnoconfig-bpf
(https://download.01.org/0day-ci/archive/20261029/[email protected]/config)
compiler: aarch64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build):
(https://download.01.org/0day-ci/archive/20261029/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes:
https://lore.kernel.org/oe-kbuild-all/[email protected]/

Quoted 9 lines

Note: the arnd-asm-generic/asm-generic HEAD dd7cc8c26b6a37a54adc5ce38d286521b7201044 builds fine.
It only hurts bisectability.

All errors (new ones prefixed by >>):

/usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h: Assembler messages:

Quoted 2 lines
Quoted 2 lines

/usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:20: Error: unknown mnemonic typedef' -- typedef __signed__ char __s8' /usr/aarch64-linux-gnu/include/asm-generic/int-ll64.h:21: Error: unknown mnemonic typedef' -- typedef unsigned char __u8'

From what I can tell, this happens after your last patch when cross-compiling
kselftest against system headers that still check for __ASSEMBLY__ instead of __ASSEMBLER__.

The command from the build log is:
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-14.2.0 ~/lkp-tests/kbuild/make.cross W=1 -C tools/testing/selftests

The command that causes this is

Quoted 7 lines

gcc -std=gnu99 -O2 -Wall -Wstrict-prototypes -D_GNU_SOURCE= -I/home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../tools/testing/selftests -idirafter /home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../tools/include -idirafter /home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../tools/include/generated -idirafter /home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../arch/arm64/include -idirafter /home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../include -Wa,--noexecstack vdso_test_chacha.c vgetrandom-chacha.S -o /home/arnd/arm-soc/build/tmp/kselftest/vDSO/vdso_test_chacha

and looking at the preprocessed file, I see a wild mix of tools/include, ${srctree}/arch/arm64/include/ and /usr/include. I also see that at least part of the problem is that arch/arm64/kernel/vdso/vgetrandom-chacha.S includes arch/arm64/include/asm/assembler.h, which then goes on to include the world.

After getting access to an aarch64 host, I was finally able to reproduce the problem. I think it's likely best if we force the selftest to use the headers from the current kernel sources instead of using the headers from /usr/include ... i.e. this patch fixes the issue for me:

https://lore.kernel.org/lkml/[email protected]/

WDYT?

Thomas

maintainer
#4 lore raw
Quoted 8 lines · Thomas Huth
Quoted 7 lines · Arnd Bergmann

On Thu, Oct 29, 2026, at 19:09, kernel test robot wrote:

and looking at the preprocessed file, I see a wild mix of tools/include, ${srctree}/arch/arm64/include/ and /usr/include. I also see that at least part of the problem is that arch/arm64/kernel/vdso/vgetrandom-chacha.S includes arch/arm64/include/asm/assembler.h, which then goes on to include the world.

Quoted 8 lines

After getting access to an aarch64 host, I was finally able to reproduce the problem. I think it's likely best if we force the selftest to use the headers from the current kernel sources instead of using the headers from /usr/include ... i.e. this patch fixes the issue for me:

https://lore.kernel.org/lkml/[email protected]/

WDYT?

The idea sounds right, but it doesn't appear to do anything for me, I still get the same output:

arnd@studio:~/arm-soc/asm-generic$ make O=../build/tmp/ ARCH=arm64 -C tools/testing/selftests/vDSO/ V=1
make: Entering directory '/home/arnd/arm-soc/asm-generic/tools/testing/selftests/vDSO'
gcc -std=gnu99 -O2 -Wall -Wstrict-prototypes -D_GNU_SOURCE= -I/home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../tools/testing/selftests -isystem /home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../usr/include -idirafter /home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../tools/include -idirafter /home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../tools/include/generated -idirafter /home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../arch/arm64/include -idirafter /home/arnd/arm-soc/asm-generic/tools/testing/selftests/../../../include -Wa,--noexecstack    vdso_test_chacha.c vgetrandom-chacha.S  -o /home/arnd/arm-soc/asm-generic/tools/testing/selftests/vDSO/vdso_test_chacha
/tmp/ccKJRkeX.s: Assembler messages:
/usr/include/asm-generic/int-ll64.h:20: Error: unknown mnemonic `typedef' -- `typedef __signed__ char __s8'
/usr/include/asm-generic/int-ll64.h:21: Error: unknown mnemonic `typedef' -- `typedef unsigned char __u8'
/usr/include/asm-generic/int-ll64.h:23: Error: unknown mnemonic `typedef' -- `typedef __signed__ short __s16'

It looks like tools/testing/selftests/ is built in the source directory, while the 'make headers_install' installed the headers to the object directory in '../build/tmp/usr/include/'.

I have never been able to figure out how kselftest actually wants to handle this.

Arnd

maintainer
#5 lore raw
Quoted 5 lines · Arnd Bergmann

The idea sounds right, but it doesn't appear to do anything for me, I still get the same output:

arnd@studio:~/arm-soc/asm-generic$ make O=../build/tmp/ ARCH=arm64 -C 
tools/testing/selftests/vDSO/ V=1

...

Quoted 7 lines

It looks like tools/testing/selftests/ is built in the source directory, while the 'make headers_install' installed the headers to the object directory in '../build/tmp/usr/include/'.

I have never been able to figure out how kselftest actually wants to handle this.

Nevermind, I figured out that your fix works when doing
'make -C tools/testing/selftests', since tools/testing/selftests/Makefile is what sets KHDR_INCLUDES. When I tried to use 'make -C tools/testing/selftests/vDSO' the assignment gets skipped, so I got the same error as before.

Arnd

#6 lore raw
Quoted 13 lines · Arnd Bergmann
Quoted 5 lines · Arnd Bergmann

The idea sounds right, but it doesn't appear to do anything for me, I still get the same output:

arnd@studio:~/arm-soc/asm-generic$ make O=../build/tmp/ ARCH=arm64 -C
tools/testing/selftests/vDSO/ V=1

...

Quoted 5 lines

It looks like tools/testing/selftests/ is built in the source directory, while the 'make headers_install' installed the headers to the object directory in '../build/tmp/usr/include/'.

Quoted 8 lines
Quoted 2 lines

I have never been able to figure out how kselftest actually wants to handle this.

Nevermind, I figured out that your fix works when doing
'make -C tools/testing/selftests', since tools/testing/selftests/Makefile is what sets KHDR_INCLUDES. When I tried to use 'make -C tools/testing/selftests/vDSO' the assignment gets skipped, so I got the same error as before.

FWIW, I build single selftests from the top of my build directory like this:

make kselftest-all TARGETS=vDSO

and to run them:

make kselftest TARGETS=vDSO

Thomas