| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Signal support for Hexagon processor |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2010-2012, The Linux Foundation. All rights reserved. |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License version 2 and |
|---|
| 8 | | - * only version 2 as published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | | - * GNU General Public License for more details. |
|---|
| 14 | | - * |
|---|
| 15 | | - * You should have received a copy of the GNU General Public License |
|---|
| 16 | | - * along with this program; if not, write to the Free Software |
|---|
| 17 | | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|---|
| 18 | | - * 02110-1301, USA. |
|---|
| 19 | 6 | */ |
|---|
| 20 | 7 | |
|---|
| 21 | 8 | #include <linux/linkage.h> |
|---|
| .. | .. |
|---|
| 115 | 102 | |
|---|
| 116 | 103 | frame = get_sigframe(ksig, regs, sizeof(struct rt_sigframe)); |
|---|
| 117 | 104 | |
|---|
| 118 | | - if (!access_ok(VERIFY_WRITE, frame, sizeof(struct rt_sigframe))) |
|---|
| 105 | + if (!access_ok(frame, sizeof(struct rt_sigframe))) |
|---|
| 119 | 106 | return -EFAULT; |
|---|
| 120 | 107 | |
|---|
| 121 | 108 | if (copy_siginfo_to_user(&frame->info, &ksig->info)) |
|---|
| .. | .. |
|---|
| 168 | 155 | regs->r00 = -EINTR; |
|---|
| 169 | 156 | break; |
|---|
| 170 | 157 | } |
|---|
| 171 | | - /* Fall through */ |
|---|
| 158 | + fallthrough; |
|---|
| 172 | 159 | case -ERESTARTNOINTR: |
|---|
| 173 | 160 | regs->r06 = regs->syscall_nr; |
|---|
| 174 | 161 | pt_set_elr(regs, pt_elr(regs) - 4); |
|---|
| .. | .. |
|---|
| 244 | 231 | current->restart_block.fn = do_no_restart_syscall; |
|---|
| 245 | 232 | |
|---|
| 246 | 233 | frame = (struct rt_sigframe __user *)pt_psp(regs); |
|---|
| 247 | | - if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
|---|
| 234 | + if (!access_ok(frame, sizeof(*frame))) |
|---|
| 248 | 235 | goto badframe; |
|---|
| 249 | 236 | if (__copy_from_user(&blocked, &frame->uc.uc_sigmask, sizeof(blocked))) |
|---|
| 250 | 237 | goto badframe; |
|---|
| .. | .. |
|---|
| 265 | 252 | return regs->r00; |
|---|
| 266 | 253 | |
|---|
| 267 | 254 | badframe: |
|---|
| 268 | | - force_sig(SIGSEGV, current); |
|---|
| 255 | + force_sig(SIGSEGV); |
|---|
| 269 | 256 | return 0; |
|---|
| 270 | 257 | } |
|---|