aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/syscalls.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-11-20 06:12:21 -0500
committerCatalin Marinas <catalin.marinas@arm.com>2015-11-25 10:49:13 -0500
commitfbc416ff86183e2203cdf975e2881d7c164b0271 (patch)
tree7ca98276aa14f75c634a121bcad4e049b7752bd0 /include/linux/syscalls.h
parent7142392dcac240b37cce8a246225bb11213246cc (diff)
arm64: fix building without CONFIG_UID16
As reported by Michal Simek, building an ARM64 kernel with CONFIG_UID16 disabled currently fails because the system call table still needs to reference the individual function entry points that are provided by kernel/sys_ni.c in this case, and the declarations are hidden inside of #ifdef CONFIG_UID16: arch/arm64/include/asm/unistd32.h:57:8: error: 'sys_lchown16' undeclared here (not in a function) __SYSCALL(__NR_lchown, sys_lchown16) I believe this problem only exists on ARM64, because older architectures tend to not need declarations when their system call table is built in assembly code, while newer architectures tend to not need UID16 support. ARM64 only uses these system calls for compatibility with 32-bit ARM binaries. This changes the CONFIG_UID16 check into CONFIG_HAVE_UID16, which is set unconditionally on ARM64 with CONFIG_COMPAT, so we see the declarations whenever we need them, but otherwise the behavior is unchanged. Fixes: af1839eb4bd4 ("Kconfig: clean up the long arch list for the UID16 config option") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Will Deacon <will.deacon@arm.com> Cc: stable@vger.kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r--include/linux/syscalls.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index a156b82dd14c..c2b66a277e98 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -524,7 +524,7 @@ asmlinkage long sys_chown(const char __user *filename,
524asmlinkage long sys_lchown(const char __user *filename, 524asmlinkage long sys_lchown(const char __user *filename,
525 uid_t user, gid_t group); 525 uid_t user, gid_t group);
526asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group); 526asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group);
527#ifdef CONFIG_UID16 527#ifdef CONFIG_HAVE_UID16
528asmlinkage long sys_chown16(const char __user *filename, 528asmlinkage long sys_chown16(const char __user *filename,
529 old_uid_t user, old_gid_t group); 529 old_uid_t user, old_gid_t group);
530asmlinkage long sys_lchown16(const char __user *filename, 530asmlinkage long sys_lchown16(const char __user *filename,