| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Based on arch/arm/kernel/sys_arm.c |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) People who wrote linux/arch/i386/kernel/sys_i386.c |
|---|
| 5 | 6 | * Copyright (C) 1995, 1996 Russell King. |
|---|
| 6 | 7 | * Copyright (C) 2012 ARM Ltd. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 10 | | - * published by the Free Software Foundation. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 13 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | | - * GNU General Public License for more details. |
|---|
| 16 | | - * |
|---|
| 17 | | - * You should have received a copy of the GNU General Public License |
|---|
| 18 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 19 | 8 | */ |
|---|
| 20 | 9 | |
|---|
| 21 | 10 | #include <linux/compat.h> |
|---|
| .. | .. |
|---|
| 69 | 58 | if (end < start || flags) |
|---|
| 70 | 59 | return -EINVAL; |
|---|
| 71 | 60 | |
|---|
| 72 | | - if (!access_ok(VERIFY_READ, (const void __user *)start, end - start)) |
|---|
| 61 | + if (!access_ok((const void __user *)start, end - start)) |
|---|
| 73 | 62 | return -EFAULT; |
|---|
| 74 | 63 | |
|---|
| 75 | 64 | return __do_compat_cache_op(start, end); |
|---|
| .. | .. |
|---|
| 79 | 68 | */ |
|---|
| 80 | 69 | long compat_arm_syscall(struct pt_regs *regs, int scno) |
|---|
| 81 | 70 | { |
|---|
| 82 | | - siginfo_t info; |
|---|
| 71 | + unsigned long addr; |
|---|
| 83 | 72 | |
|---|
| 84 | 73 | switch (scno) { |
|---|
| 85 | 74 | /* |
|---|
| .. | .. |
|---|
| 122 | 111 | break; |
|---|
| 123 | 112 | } |
|---|
| 124 | 113 | |
|---|
| 125 | | - clear_siginfo(&info); |
|---|
| 126 | | - info.si_signo = SIGILL; |
|---|
| 127 | | - info.si_errno = 0; |
|---|
| 128 | | - info.si_code = ILL_ILLTRP; |
|---|
| 129 | | - info.si_addr = (void __user *)instruction_pointer(regs) - |
|---|
| 130 | | - (compat_thumb_mode(regs) ? 2 : 4); |
|---|
| 114 | + addr = instruction_pointer(regs) - (compat_thumb_mode(regs) ? 2 : 4); |
|---|
| 131 | 115 | |
|---|
| 132 | | - arm64_notify_die("Oops - bad compat syscall(2)", regs, &info, scno); |
|---|
| 116 | + arm64_notify_die("Oops - bad compat syscall(2)", regs, |
|---|
| 117 | + SIGILL, ILL_ILLTRP, addr, 0); |
|---|
| 133 | 118 | return 0; |
|---|
| 134 | 119 | } |
|---|