hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/c6x/kernel/signal.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Port on Texas Instruments TMS320C6x architecture
34 *
....@@ -5,10 +6,6 @@
56 * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
67 *
78 * 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.
129 */
1310
1411 #include <linux/kernel.h>
....@@ -16,6 +13,7 @@
1613 #include <linux/syscalls.h>
1714 #include <linux/tracehook.h>
1815
16
+#include <asm/asm-offsets.h>
1917 #include <asm/ucontext.h>
2018 #include <asm/cacheflush.h>
2119
....@@ -80,7 +78,7 @@
8078
8179 frame = (struct rt_sigframe __user *) ((unsigned long) regs->sp + 8);
8280
83
- if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
81
+ if (!access_ok(frame, sizeof(*frame)))
8482 goto badframe;
8583 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
8684 goto badframe;
....@@ -93,7 +91,7 @@
9391 return regs->a4;
9492
9593 badframe:
96
- force_sig(SIGSEGV, current);
94
+ force_sig(SIGSEGV);
9795 return 0;
9896 }
9997
....@@ -149,7 +147,7 @@
149147
150148 frame = get_sigframe(ksig, regs, sizeof(*frame));
151149
152
- if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
150
+ if (!access_ok(frame, sizeof(*frame)))
153151 return -EFAULT;
154152
155153 err |= __put_user(&frame->info, &frame->pinfo);
....@@ -223,7 +221,7 @@
223221 regs->a4 = -EINTR;
224222 break;
225223 }
226
- /* fallthrough */
224
+ fallthrough;
227225 case -ERESTARTNOINTR:
228226 do_restart:
229227 regs->a4 = regs->orig_a4;
....@@ -255,7 +253,7 @@
255253 break;
256254 }
257255
258
- /* fallthrough */
256
+ fallthrough;
259257 case -ERESTARTNOINTR:
260258 regs->a4 = regs->orig_a4;
261259 regs->pc -= 4;
....@@ -316,11 +314,9 @@
316314 int syscall)
317315 {
318316 /* deal with pending signal delivery */
319
- if (thread_info_flags & (1 << TIF_SIGPENDING))
317
+ if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
320318 do_signal(regs, syscall);
321319
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))
324321 tracehook_notify_resume(regs);
325
- }
326322 }