Merge branch 'work.set_fs-exec' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull uaccess/coredump updates from Al Viro: "set_fs() removal in coredump-related area - mostly Christoph's stuff..." * 'work.set_fs-exec' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: binfmt_elf_fdpic: remove the set_fs(KERNEL_DS) in elf_fdpic_core_dump binfmt_elf: remove the set_fs(KERNEL_DS) in elf_core_dump binfmt_elf: remove the set_fs in fill_siginfo_note signal: refactor copy_siginfo_to_user32 powerpc/spufs: simplify spufs core dumping powerpc/spufs: stop using access_ok powerpc/spufs: fix copy_to_user while atomic
This commit is contained in:
@@ -402,8 +402,15 @@ long compat_get_bitmap(unsigned long *mask, const compat_ulong_t __user *umask,
|
||||
unsigned long bitmap_size);
|
||||
long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask,
|
||||
unsigned long bitmap_size);
|
||||
int copy_siginfo_from_user32(kernel_siginfo_t *to, const struct compat_siginfo __user *from);
|
||||
int copy_siginfo_to_user32(struct compat_siginfo __user *to, const kernel_siginfo_t *from);
|
||||
void copy_siginfo_to_external32(struct compat_siginfo *to,
|
||||
const struct kernel_siginfo *from);
|
||||
int copy_siginfo_from_user32(kernel_siginfo_t *to,
|
||||
const struct compat_siginfo __user *from);
|
||||
int __copy_siginfo_to_user32(struct compat_siginfo __user *to,
|
||||
const kernel_siginfo_t *from);
|
||||
#ifndef copy_siginfo_to_user32
|
||||
#define copy_siginfo_to_user32 __copy_siginfo_to_user32
|
||||
#endif
|
||||
int get_compat_sigevent(struct sigevent *event,
|
||||
const struct compat_sigevent __user *u_event);
|
||||
|
||||
|
@@ -24,6 +24,14 @@ static inline void clear_siginfo(kernel_siginfo_t *info)
|
||||
|
||||
#define SI_EXPANSION_SIZE (sizeof(struct siginfo) - sizeof(struct kernel_siginfo))
|
||||
|
||||
static inline void copy_siginfo_to_external(siginfo_t *to,
|
||||
const kernel_siginfo_t *from)
|
||||
{
|
||||
memcpy(to, from, sizeof(*from));
|
||||
memset(((char *)to) + sizeof(struct kernel_siginfo), 0,
|
||||
SI_EXPANSION_SIZE);
|
||||
}
|
||||
|
||||
int copy_siginfo_to_user(siginfo_t __user *to, const kernel_siginfo_t *from);
|
||||
int copy_siginfo_from_user(kernel_siginfo_t *to, const siginfo_t __user *from);
|
||||
|
||||
|
Reference in New Issue
Block a user