diff options
author | Eric Dumazet <edumazet@google.com> | 2021-04-13 13:33:51 -0700 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-04-14 18:04:09 +0200 |
commit | 0ed96051531ecc6965f6456d25b19b9b6bdb5c28 (patch) | |
tree | 34541425d1efcf840858be87f2972e3acd1ea8a9 /kernel/rseq.c | |
parent | 60af388d23889636011488c42763876bcdda3eab (diff) | |
download | lwn-0ed96051531ecc6965f6456d25b19b9b6bdb5c28.tar.gz lwn-0ed96051531ecc6965f6456d25b19b9b6bdb5c28.zip |
rseq: Remove redundant access_ok()
After commit 8f2817701492 ("rseq: Use get_user/put_user rather
than __get_user/__put_user") we no longer need
an access_ok() call from __rseq_handle_notify_resume()
Mathieu pointed out the same cleanup can be done
in rseq_syscall().
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lkml.kernel.org/r/20210413203352.71350-3-eric.dumazet@gmail.com
Diffstat (limited to 'kernel/rseq.c')
-rw-r--r-- | kernel/rseq.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/rseq.c b/kernel/rseq.c index f020f18f512a..cfe01ab5253c 100644 --- a/kernel/rseq.c +++ b/kernel/rseq.c @@ -273,8 +273,6 @@ void __rseq_handle_notify_resume(struct ksignal *ksig, struct pt_regs *regs) if (unlikely(t->flags & PF_EXITING)) return; - if (unlikely(!access_ok(t->rseq, sizeof(*t->rseq)))) - goto error; ret = rseq_ip_fixup(regs); if (unlikely(ret < 0)) goto error; @@ -301,8 +299,7 @@ void rseq_syscall(struct pt_regs *regs) if (!t->rseq) return; - if (!access_ok(t->rseq, sizeof(*t->rseq)) || - rseq_get_rseq_cs(t, &rseq_cs) || in_rseq_cs(ip, &rseq_cs)) + if (rseq_get_rseq_cs(t, &rseq_cs) || in_rseq_cs(ip, &rseq_cs)) force_sig(SIGSEGV); } |