Commit c93e0f6c authored by Heiko Carstens's avatar Heiko Carstens

mm/compat: convert to COMPAT_SYSCALL_DEFINE

Convert all compat system call functions where all parameter types
have a size of four or less than four bytes, or are pointer types
to COMPAT_SYSCALL_DEFINE.
The implicit casts within COMPAT_SYSCALL_DEFINE will perform proper
zero and sign extension to 64 bit of all parameters if needed.
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 361d93c4
...@@ -1556,10 +1556,10 @@ SYSCALL_DEFINE5(get_mempolicy, int __user *, policy, ...@@ -1556,10 +1556,10 @@ SYSCALL_DEFINE5(get_mempolicy, int __user *, policy,
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
asmlinkage long compat_sys_get_mempolicy(int __user *policy, COMPAT_SYSCALL_DEFINE5(get_mempolicy, int __user *, policy,
compat_ulong_t __user *nmask, compat_ulong_t __user *, nmask,
compat_ulong_t maxnode, compat_ulong_t, maxnode,
compat_ulong_t addr, compat_ulong_t flags) compat_ulong_t, addr, compat_ulong_t, flags)
{ {
long err; long err;
unsigned long __user *nm = NULL; unsigned long __user *nm = NULL;
...@@ -1586,8 +1586,8 @@ asmlinkage long compat_sys_get_mempolicy(int __user *policy, ...@@ -1586,8 +1586,8 @@ asmlinkage long compat_sys_get_mempolicy(int __user *policy,
return err; return err;
} }
asmlinkage long compat_sys_set_mempolicy(int mode, compat_ulong_t __user *nmask, COMPAT_SYSCALL_DEFINE3(set_mempolicy, int, mode, compat_ulong_t __user *, nmask,
compat_ulong_t maxnode) compat_ulong_t, maxnode)
{ {
long err = 0; long err = 0;
unsigned long __user *nm = NULL; unsigned long __user *nm = NULL;
...@@ -1609,9 +1609,9 @@ asmlinkage long compat_sys_set_mempolicy(int mode, compat_ulong_t __user *nmask, ...@@ -1609,9 +1609,9 @@ asmlinkage long compat_sys_set_mempolicy(int mode, compat_ulong_t __user *nmask,
return sys_set_mempolicy(mode, nm, nr_bits+1); return sys_set_mempolicy(mode, nm, nr_bits+1);
} }
asmlinkage long compat_sys_mbind(compat_ulong_t start, compat_ulong_t len, COMPAT_SYSCALL_DEFINE6(mbind, compat_ulong_t, start, compat_ulong_t, len,
compat_ulong_t mode, compat_ulong_t __user *nmask, compat_ulong_t, mode, compat_ulong_t __user *, nmask,
compat_ulong_t maxnode, compat_ulong_t flags) compat_ulong_t, maxnode, compat_ulong_t, flags)
{ {
long err = 0; long err = 0;
unsigned long __user *nm = NULL; unsigned long __user *nm = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment