aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2013-02-21 10:57:42 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-02-28 03:37:09 -0500
commitd12a2970385cfe0c1b0439f53c3ed1055d4dee3e (patch)
tree2e63d3933409588c922af66d76c89eb1b104415d /arch/s390/kernel
parentf45655f6a65538237359abce55edab9cfcc6d82f (diff)
s390/uaccess: remove pointless access_ok() checks
access_ok() always returns 'true' on s390. Therefore all calls are quite pointless and can be removed. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/compat_signal.c14
-rw-r--r--arch/s390/kernel/signal.c8
2 files changed, 0 insertions, 22 deletions
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c
index 3e71194c1902..6de049fbe62d 100644
--- a/arch/s390/kernel/compat_signal.c
+++ b/arch/s390/kernel/compat_signal.c
@@ -53,9 +53,6 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
53{ 53{
54 int err; 54 int err;
55 55
56 if (!access_ok (VERIFY_WRITE, to, sizeof(compat_siginfo_t)))
57 return -EFAULT;
58
59 /* If you change siginfo_t structure, please be sure 56 /* If you change siginfo_t structure, please be sure
60 this code is fixed accordingly. 57 this code is fixed accordingly.
61 It should never copy any pad contained in the structure 58 It should never copy any pad contained in the structure
@@ -110,9 +107,6 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
110 int err; 107 int err;
111 u32 tmp; 108 u32 tmp;
112 109
113 if (!access_ok (VERIFY_READ, from, sizeof(compat_siginfo_t)))
114 return -EFAULT;
115
116 err = __get_user(to->si_signo, &from->si_signo); 110 err = __get_user(to->si_signo, &from->si_signo);
117 err |= __get_user(to->si_errno, &from->si_errno); 111 err |= __get_user(to->si_errno, &from->si_errno);
118 err |= __get_user(to->si_code, &from->si_code); 112 err |= __get_user(to->si_code, &from->si_code);
@@ -244,8 +238,6 @@ asmlinkage long sys32_sigreturn(void)
244 sigframe32 __user *frame = (sigframe32 __user *)regs->gprs[15]; 238 sigframe32 __user *frame = (sigframe32 __user *)regs->gprs[15];
245 sigset_t set; 239 sigset_t set;
246 240
247 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
248 goto badframe;
249 if (__copy_from_user(&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE32)) 241 if (__copy_from_user(&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE32))
250 goto badframe; 242 goto badframe;
251 set_current_blocked(&set); 243 set_current_blocked(&set);
@@ -265,8 +257,6 @@ asmlinkage long sys32_rt_sigreturn(void)
265 rt_sigframe32 __user *frame = (rt_sigframe32 __user *)regs->gprs[15]; 257 rt_sigframe32 __user *frame = (rt_sigframe32 __user *)regs->gprs[15];
266 sigset_t set; 258 sigset_t set;
267 259
268 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
269 goto badframe;
270 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) 260 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
271 goto badframe; 261 goto badframe;
272 set_current_blocked(&set); 262 set_current_blocked(&set);
@@ -325,8 +315,6 @@ static int setup_frame32(int sig, struct k_sigaction *ka,
325 sigset_t *set, struct pt_regs * regs) 315 sigset_t *set, struct pt_regs * regs)
326{ 316{
327 sigframe32 __user *frame = get_sigframe(ka, regs, sizeof(sigframe32)); 317 sigframe32 __user *frame = get_sigframe(ka, regs, sizeof(sigframe32));
328 if (!access_ok(VERIFY_WRITE, frame, sizeof(sigframe32)))
329 goto give_sigsegv;
330 318
331 if (frame == (void __user *) -1UL) 319 if (frame == (void __user *) -1UL)
332 goto give_sigsegv; 320 goto give_sigsegv;
@@ -391,8 +379,6 @@ static int setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info,
391{ 379{
392 int err = 0; 380 int err = 0;
393 rt_sigframe32 __user *frame = get_sigframe(ka, regs, sizeof(rt_sigframe32)); 381 rt_sigframe32 __user *frame = get_sigframe(ka, regs, sizeof(rt_sigframe32));
394 if (!access_ok(VERIFY_WRITE, frame, sizeof(rt_sigframe32)))
395 goto give_sigsegv;
396 382
397 if (frame == (void __user *) -1UL) 383 if (frame == (void __user *) -1UL)
398 goto give_sigsegv; 384 goto give_sigsegv;
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c
index 9c6e747a5e1e..c45becf82e01 100644
--- a/arch/s390/kernel/signal.c
+++ b/arch/s390/kernel/signal.c
@@ -116,8 +116,6 @@ SYSCALL_DEFINE0(sigreturn)
116 sigframe __user *frame = (sigframe __user *)regs->gprs[15]; 116 sigframe __user *frame = (sigframe __user *)regs->gprs[15];
117 sigset_t set; 117 sigset_t set;
118 118
119 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
120 goto badframe;
121 if (__copy_from_user(&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE)) 119 if (__copy_from_user(&set.sig, &frame->sc.oldmask, _SIGMASK_COPY_SIZE))
122 goto badframe; 120 goto badframe;
123 set_current_blocked(&set); 121 set_current_blocked(&set);
@@ -135,8 +133,6 @@ SYSCALL_DEFINE0(rt_sigreturn)
135 rt_sigframe __user *frame = (rt_sigframe __user *)regs->gprs[15]; 133 rt_sigframe __user *frame = (rt_sigframe __user *)regs->gprs[15];
136 sigset_t set; 134 sigset_t set;
137 135
138 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
139 goto badframe;
140 if (__copy_from_user(&set.sig, &frame->uc.uc_sigmask, sizeof(set))) 136 if (__copy_from_user(&set.sig, &frame->uc.uc_sigmask, sizeof(set)))
141 goto badframe; 137 goto badframe;
142 set_current_blocked(&set); 138 set_current_blocked(&set);
@@ -195,8 +191,6 @@ static int setup_frame(int sig, struct k_sigaction *ka,
195 sigframe __user *frame; 191 sigframe __user *frame;
196 192
197 frame = get_sigframe(ka, regs, sizeof(sigframe)); 193 frame = get_sigframe(ka, regs, sizeof(sigframe));
198 if (!access_ok(VERIFY_WRITE, frame, sizeof(sigframe)))
199 goto give_sigsegv;
200 194
201 if (frame == (void __user *) -1UL) 195 if (frame == (void __user *) -1UL)
202 goto give_sigsegv; 196 goto give_sigsegv;
@@ -264,8 +258,6 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
264 rt_sigframe __user *frame; 258 rt_sigframe __user *frame;
265 259
266 frame = get_sigframe(ka, regs, sizeof(rt_sigframe)); 260 frame = get_sigframe(ka, regs, sizeof(rt_sigframe));
267 if (!access_ok(VERIFY_WRITE, frame, sizeof(rt_sigframe)))
268 goto give_sigsegv;
269 261
270 if (frame == (void __user *) -1UL) 262 if (frame == (void __user *) -1UL)
271 goto give_sigsegv; 263 goto give_sigsegv;