.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Port on Texas Instruments TMS320C6x architecture |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com) |
---|
6 | 7 | * |
---|
7 | 8 | * Updated for 2.6.34: Mark Salter <msalter@redhat.com> |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or modify |
---|
10 | | - * it under the terms of the GNU General Public License version 2 as |
---|
11 | | - * published by the Free Software Foundation. |
---|
12 | 9 | */ |
---|
13 | 10 | |
---|
14 | 11 | #include <linux/kernel.h> |
---|
.. | .. |
---|
16 | 13 | #include <linux/syscalls.h> |
---|
17 | 14 | #include <linux/tracehook.h> |
---|
18 | 15 | |
---|
| 16 | +#include <asm/asm-offsets.h> |
---|
19 | 17 | #include <asm/ucontext.h> |
---|
20 | 18 | #include <asm/cacheflush.h> |
---|
21 | 19 | |
---|
.. | .. |
---|
80 | 78 | |
---|
81 | 79 | frame = (struct rt_sigframe __user *) ((unsigned long) regs->sp + 8); |
---|
82 | 80 | |
---|
83 | | - if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
---|
| 81 | + if (!access_ok(frame, sizeof(*frame))) |
---|
84 | 82 | goto badframe; |
---|
85 | 83 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) |
---|
86 | 84 | goto badframe; |
---|
.. | .. |
---|
93 | 91 | return regs->a4; |
---|
94 | 92 | |
---|
95 | 93 | badframe: |
---|
96 | | - force_sig(SIGSEGV, current); |
---|
| 94 | + force_sig(SIGSEGV); |
---|
97 | 95 | return 0; |
---|
98 | 96 | } |
---|
99 | 97 | |
---|
.. | .. |
---|
149 | 147 | |
---|
150 | 148 | frame = get_sigframe(ksig, regs, sizeof(*frame)); |
---|
151 | 149 | |
---|
152 | | - if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) |
---|
| 150 | + if (!access_ok(frame, sizeof(*frame))) |
---|
153 | 151 | return -EFAULT; |
---|
154 | 152 | |
---|
155 | 153 | err |= __put_user(&frame->info, &frame->pinfo); |
---|
.. | .. |
---|
223 | 221 | regs->a4 = -EINTR; |
---|
224 | 222 | break; |
---|
225 | 223 | } |
---|
226 | | - /* fallthrough */ |
---|
| 224 | + fallthrough; |
---|
227 | 225 | case -ERESTARTNOINTR: |
---|
228 | 226 | do_restart: |
---|
229 | 227 | regs->a4 = regs->orig_a4; |
---|
.. | .. |
---|
255 | 253 | break; |
---|
256 | 254 | } |
---|
257 | 255 | |
---|
258 | | - /* fallthrough */ |
---|
| 256 | + fallthrough; |
---|
259 | 257 | case -ERESTARTNOINTR: |
---|
260 | 258 | regs->a4 = regs->orig_a4; |
---|
261 | 259 | regs->pc -= 4; |
---|
.. | .. |
---|
316 | 314 | int syscall) |
---|
317 | 315 | { |
---|
318 | 316 | /* deal with pending signal delivery */ |
---|
319 | | - if (thread_info_flags & (1 << TIF_SIGPENDING)) |
---|
| 317 | + if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL)) |
---|
320 | 318 | do_signal(regs, syscall); |
---|
321 | 319 | |
---|
322 | | - if (thread_info_flags & (1 << TIF_NOTIFY_RESUME)) { |
---|
323 | | - clear_thread_flag(TIF_NOTIFY_RESUME); |
---|
| 320 | + if (thread_info_flags & (1 << TIF_NOTIFY_RESUME)) |
---|
324 | 321 | tracehook_notify_resume(regs); |
---|
325 | | - } |
---|
326 | 322 | } |
---|