Skip to contentSkip to conversation

ARM64: Update __NR_compat_syscalls for statmount/listmount

PATCH In review Florian Fainelli 2 participants 3 messages Jan 9, 2024 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM64: Update __NR_compat_syscalls for statmount/listmount

Commit d8b0f5465012 ("wire up syscalls for statmount/listmount") added two new system calls to arch/arm64/include/asm/unistd32.h but forgot to update the __NR_compat_syscalls number, thus causing the following build failures:

./arch/arm64/include/asm/unistd32.h:922:24: error: array index in initializer exceeds array bounds
922 | #define __NR_statmount 457
| ^~~
arch/arm64/kernel/sys32.c:130:34: note: in definition of macro '__SYSCALL'
130 | #define __SYSCALL(nr, sym) [nr] = __arm64_##sym,
| ^~

Bump up the number by two to accomodate for the new system calls added.

Fixes d8b0f5465012 ("wire up syscalls for statmount/listmount")
---
 arch/arm64/include/asm/unistd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/include/asm/unistd.h +1 -1
index 531effca5f1f..b63f870debaf 100644
@@ -39,7 +39,7 @@
 #define __ARM_NR_compat_set_tls		(__ARM_NR_COMPAT_BASE + 5)
 #define __ARM_NR_COMPAT_END		(__ARM_NR_COMPAT_BASE + 0x800)
 
-#define __NR_compat_syscalls		457
+#define __NR_compat_syscalls		459
 #endif
 
 #define __ARCH_WANT_SYS_CLONE
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 35 lines · Florian Fainelli

Commit d8b0f5465012 ("wire up syscalls for statmount/listmount") added two new system calls to arch/arm64/include/asm/unistd32.h but forgot to update the __NR_compat_syscalls number, thus causing the following build failures:

./arch/arm64/include/asm/unistd32.h:922:24: error: array index in initializer exceeds array bounds
922 | #define __NR_statmount 457
| ^~~
arch/arm64/kernel/sys32.c:130:34: note: in definition of macro '__SYSCALL'
130 | #define __SYSCALL(nr, sym) [nr] = __arm64_##sym,
| ^~

Bump up the number by two to accomodate for the new system calls added.

Fixes d8b0f5465012 ("wire up syscalls for statmount/listmount")
---
 arch/arm64/include/asm/unistd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/include/asm/unistd.h +1 -1
index 531effca5f1f..b63f870debaf 100644
@@ -39,7 +39,7 @@
 #define __ARM_NR_compat_set_tls		(__ARM_NR_COMPAT_BASE + 5)
 #define __ARM_NR_COMPAT_END		(__ARM_NR_COMPAT_BASE + 0x800)
 
-#define __NR_compat_syscalls		457
+#define __NR_compat_syscalls		459
 #endif
 
 #define __ARCH_WANT_SYS_CLONE
Signature · 1 line
2.34.1

Will

#2 lore raw
Quoted 33 lines · Will Deacon
Quoted 32 lines · Florian Fainelli

Commit d8b0f5465012 ("wire up syscalls for statmount/listmount") added two new system calls to arch/arm64/include/asm/unistd32.h but forgot to update the __NR_compat_syscalls number, thus causing the following build failures:

./arch/arm64/include/asm/unistd32.h:922:24: error: array index in initializer exceeds array bounds
922 | #define __NR_statmount 457
| ^~~
arch/arm64/kernel/sys32.c:130:34: note: in definition of macro '__SYSCALL'
130 | #define __SYSCALL(nr, sym) [nr] = __arm64_##sym,
| ^~

Bump up the number by two to accomodate for the new system calls added.

Fixes d8b0f5465012 ("wire up syscalls for statmount/listmount")
---
  arch/arm64/include/asm/unistd.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/include/asm/unistd.h +1 -1
index 531effca5f1f..b63f870debaf 100644
@@ -39,7 +39,7 @@
  #define __ARM_NR_compat_set_tls		(__ARM_NR_COMPAT_BASE + 5)
  #define __ARM_NR_COMPAT_END		(__ARM_NR_COMPAT_BASE + 0x800)
 
-#define __NR_compat_syscalls		457
+#define __NR_compat_syscalls		459
  #endif
 
Quoted 5 lines
Quoted 3 lines
arch/arm64/include/asm/unistd.h +0 -0
  #define __ARCH_WANT_SYS_CLONE
Signature · 1 line
2.34.1

Thanks Will, looks like Linus already fast tracked the change:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f0a78b3e2a0c842cc7b4c2686f4a35681f02ca72

Signature · 1 line
Florian