kexec/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types
In order to allow the COMPAT_SYSCALL_DEFINE macro generate code that performs proper zero and sign extension convert all 64 bit parameters to their corresponding 32 bit compat counterparts. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This commit is contained in:
parent
3a49a0f718
commit
ca2c405ab9
|
@ -641,10 +641,10 @@ asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val,
|
||||||
u32 val3);
|
u32 val3);
|
||||||
asmlinkage long compat_sys_getsockopt(int fd, int level, int optname,
|
asmlinkage long compat_sys_getsockopt(int fd, int level, int optname,
|
||||||
char __user *optval, int __user *optlen);
|
char __user *optval, int __user *optlen);
|
||||||
asmlinkage long compat_sys_kexec_load(unsigned long entry,
|
asmlinkage long compat_sys_kexec_load(compat_ulong_t entry,
|
||||||
unsigned long nr_segments,
|
compat_ulong_t nr_segments,
|
||||||
struct compat_kexec_segment __user *,
|
struct compat_kexec_segment __user *,
|
||||||
unsigned long flags);
|
compat_ulong_t flags);
|
||||||
asmlinkage long compat_sys_mq_getsetattr(mqd_t mqdes,
|
asmlinkage long compat_sys_mq_getsetattr(mqd_t mqdes,
|
||||||
const struct compat_mq_attr __user *u_mqstat,
|
const struct compat_mq_attr __user *u_mqstat,
|
||||||
struct compat_mq_attr __user *u_omqstat);
|
struct compat_mq_attr __user *u_omqstat);
|
||||||
|
|
|
@ -127,12 +127,6 @@ extern asmlinkage long sys_kexec_load(unsigned long entry,
|
||||||
struct kexec_segment __user *segments,
|
struct kexec_segment __user *segments,
|
||||||
unsigned long flags);
|
unsigned long flags);
|
||||||
extern int kernel_kexec(void);
|
extern int kernel_kexec(void);
|
||||||
#ifdef CONFIG_COMPAT
|
|
||||||
extern asmlinkage long compat_sys_kexec_load(unsigned long entry,
|
|
||||||
unsigned long nr_segments,
|
|
||||||
struct compat_kexec_segment __user *segments,
|
|
||||||
unsigned long flags);
|
|
||||||
#endif
|
|
||||||
extern struct page *kimage_alloc_control_pages(struct kimage *image,
|
extern struct page *kimage_alloc_control_pages(struct kimage *image,
|
||||||
unsigned int order);
|
unsigned int order);
|
||||||
extern void crash_kexec(struct pt_regs *);
|
extern void crash_kexec(struct pt_regs *);
|
||||||
|
|
|
@ -1039,10 +1039,10 @@ void __weak crash_unmap_reserved_pages(void)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
#ifdef CONFIG_COMPAT
|
#ifdef CONFIG_COMPAT
|
||||||
asmlinkage long compat_sys_kexec_load(unsigned long entry,
|
COMPAT_SYSCALL_DEFINE4(kexec_load, compat_ulong_t, entry,
|
||||||
unsigned long nr_segments,
|
compat_ulong_t, nr_segments,
|
||||||
struct compat_kexec_segment __user *segments,
|
struct compat_kexec_segment __user *, segments,
|
||||||
unsigned long flags)
|
compat_ulong_t, flags)
|
||||||
{
|
{
|
||||||
struct compat_kexec_segment in;
|
struct compat_kexec_segment in;
|
||||||
struct kexec_segment out, __user *ksegments;
|
struct kexec_segment out, __user *ksegments;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user