Skip to content

Commit 7fe33e9

Browse files
committed
arm64: convert unistd_32.h to syscall.tbl format
This is a straight conversion from the old asm/unistd32.h into the format used by 32-bit arm and most other architectures, calling scripts to generate the asm/unistd32.h header and a new asm/syscalls32.h headers. I used a semi-automated text replacement method to do the conversion, and then used 'vimdiff' to synchronize the whitespace and the (unused) names of the non-compat syscalls with the arm version. There are two differences between the generated syscalls names and the old version: - the old asm/unistd32.h contained only a __NR_sync_file_range2 entry, while the arm32 version also defines __NR_arm_sync_file_range with the same number. I added this duplicate back in asm/unistd32.h. - __NR__sysctl was removed from the arm64 file a while ago, but all the tables still contain it. This should probably get removed everywhere but I added it here for consistency. On top of that, the arm64 version does not contain any references to the 32-bit OABI syscalls that are not supported by arm64. If we ever want to share the file between arm32 and arm64, it would not be hard to add support for both in one file. Acked-by: Catalin Marinas <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 4414ad8 commit 7fe33e9

File tree

8 files changed

+503
-948
lines changed

8 files changed

+503
-948
lines changed

arch/arm64/include/asm/Kbuild

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
# SPDX-License-Identifier: GPL-2.0
2+
syscall-y += syscall_table_32.h
3+
4+
# arm32 syscall table used by lib/compat_audit.c:
5+
syscall-y += unistd_32.h
6+
# same constants with prefixes, used by vdso, seccomp and sigreturn:
7+
syscall-y += unistd_compat_32.h
8+
29
generic-y += early_ioremap.h
310
generic-y += mcs_spinlock.h
411
generic-y += qrwlock.h

arch/arm64/include/asm/seccomp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#define SECCOMP_ARCH_NATIVE_NAME "aarch64"
2525
#ifdef CONFIG_COMPAT
2626
# define SECCOMP_ARCH_COMPAT AUDIT_ARCH_ARM
27-
# define SECCOMP_ARCH_COMPAT_NR __NR_compat_syscalls
27+
# define SECCOMP_ARCH_COMPAT_NR __NR_compat32_syscalls
2828
# define SECCOMP_ARCH_COMPAT_NAME "arm"
2929
#endif
3030

arch/arm64/include/asm/unistd.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
#define __ARM_NR_compat_cacheflush (__ARM_NR_COMPAT_BASE + 2)
3939
#define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5)
4040
#define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800)
41-
42-
#define __NR_compat_syscalls 463
4341
#endif
4442

4543
#define __ARCH_WANT_SYS_CLONE

0 commit comments

Comments
 (0)