summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/compat.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-05-05 13:12:53 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2020-05-05 23:46:09 +0300
commitc3b3f52476412a3899f2c65b220075aceb18dd2c (patch)
tree00314d287eac059d9a74b4dd57b761d9943a1742 /arch/x86/include/asm/compat.h
parent5456ffdee666c66e27ccc1006f9afe83ad55559f (diff)
downloadlinux-c3b3f52476412a3899f2c65b220075aceb18dd2c.tar.xz
signal: refactor copy_siginfo_to_user32
Factor out a copy_siginfo_to_external32 helper from copy_siginfo_to_user32 that fills out the compat_siginfo, but does so on a kernel space data structure. With that we can let architectures override copy_siginfo_to_user32 with their own implementations using copy_siginfo_to_external32. That allows moving the x32 SIGCHLD purely to x86 architecture code. As a nice side effect copy_siginfo_to_external32 also comes in handy for avoiding a set_fs() call in the coredump code later on. Contains improvements from Eric W. Biederman <ebiederm@xmission.com> and Arnd Bergmann <arnd@arndb.de>. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/include/asm/compat.h')
-rw-r--r--arch/x86/include/asm/compat.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h
index 52e9f3480f69..d4edf281fff4 100644
--- a/arch/x86/include/asm/compat.h
+++ b/arch/x86/include/asm/compat.h
@@ -214,7 +214,11 @@ static inline bool in_compat_syscall(void)
#endif
struct compat_siginfo;
-int __copy_siginfo_to_user32(struct compat_siginfo __user *to,
- const kernel_siginfo_t *from, bool x32_ABI);
+
+#ifdef CONFIG_X86_X32_ABI
+int copy_siginfo_to_user32(struct compat_siginfo __user *to,
+ const kernel_siginfo_t *from);
+#define copy_siginfo_to_user32 copy_siginfo_to_user32
+#endif /* CONFIG_X86_X32_ABI */
#endif /* _ASM_X86_COMPAT_H */