hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/riscv/kernel/sys_riscv.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2012 Regents of the University of California
34 * Copyright (C) 2014 Darius Rad <darius@bluespec.com>
45 * Copyright (C) 2017 SiFive
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * as published by the Free Software Foundation, version 2.
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.
146 */
157
168 #include <linux/syscalls.h>
....@@ -25,10 +17,6 @@
2517 {
2618 if (unlikely(offset & (~PAGE_MASK >> page_shift_offset)))
2719 return -EINVAL;
28
-
29
- if ((prot & PROT_WRITE) && (prot & PROT_EXEC))
30
- if (unlikely(!(prot & PROT_READ)))
31
- return -EINVAL;
3220
3321 return ksys_mmap_pgoff(addr, len, prot, flags, fd,
3422 offset >> (PAGE_SHIFT - page_shift_offset));