sys.c (53f071e19d566e7d0a4eada1bd8313a4cdb660a4) sys.c (b617cfc858161140d69cc0b5cc211996b557a1c7)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/kernel/sys.c
4 *
5 * Copyright (C) 1991, 1992 Linus Torvalds
6 */
7
8#include <linux/export.h>

--- 47 unchanged lines hidden (view full) ---

56#include <linux/sched/mm.h>
57#include <linux/sched/coredump.h>
58#include <linux/sched/task.h>
59#include <linux/sched/cputime.h>
60#include <linux/rcupdate.h>
61#include <linux/uidgid.h>
62#include <linux/cred.h>
63
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/kernel/sys.c
4 *
5 * Copyright (C) 1991, 1992 Linus Torvalds
6 */
7
8#include <linux/export.h>

--- 47 unchanged lines hidden (view full) ---

56#include <linux/sched/mm.h>
57#include <linux/sched/coredump.h>
58#include <linux/sched/task.h>
59#include <linux/sched/cputime.h>
60#include <linux/rcupdate.h>
61#include <linux/uidgid.h>
62#include <linux/cred.h>
63
64#include <linux/nospec.h>
65
64#include <linux/kmsg_dump.h>
65/* Move somewhere else to avoid recompiling? */
66#include <generated/utsrelease.h>
67
68#include <linux/uaccess.h>
69#include <asm/io.h>
70#include <asm/unistd.h>
71

--- 2165 unchanged lines hidden (view full) ---

2237 if (p->signal->has_child_subreaper ||
2238 is_child_reaper(task_pid(p)))
2239 return 0;
2240
2241 p->signal->has_child_subreaper = 1;
2242 return 1;
2243}
2244
66#include <linux/kmsg_dump.h>
67/* Move somewhere else to avoid recompiling? */
68#include <generated/utsrelease.h>
69
70#include <linux/uaccess.h>
71#include <asm/io.h>
72#include <asm/unistd.h>
73

--- 2165 unchanged lines hidden (view full) ---

2239 if (p->signal->has_child_subreaper ||
2240 is_child_reaper(task_pid(p)))
2241 return 0;
2242
2243 p->signal->has_child_subreaper = 1;
2244 return 1;
2245}
2246
2247int __weak arch_prctl_spec_ctrl_get(unsigned long which)
2248{
2249 return -EINVAL;
2250}
2251
2252int __weak arch_prctl_spec_ctrl_set(unsigned long which, unsigned long ctrl)
2253{
2254 return -EINVAL;
2255}
2256
2245SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
2246 unsigned long, arg4, unsigned long, arg5)
2247{
2248 struct task_struct *me = current;
2249 unsigned char comm[sizeof(me->comm)];
2250 long error;
2251
2252 error = security_task_prctl(option, arg2, arg3, arg4, arg5);

--- 192 unchanged lines hidden (view full) ---

2445 error = GET_FP_MODE(me);
2446 break;
2447 case PR_SVE_SET_VL:
2448 error = SVE_SET_VL(arg2);
2449 break;
2450 case PR_SVE_GET_VL:
2451 error = SVE_GET_VL();
2452 break;
2257SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
2258 unsigned long, arg4, unsigned long, arg5)
2259{
2260 struct task_struct *me = current;
2261 unsigned char comm[sizeof(me->comm)];
2262 long error;
2263
2264 error = security_task_prctl(option, arg2, arg3, arg4, arg5);

--- 192 unchanged lines hidden (view full) ---

2457 error = GET_FP_MODE(me);
2458 break;
2459 case PR_SVE_SET_VL:
2460 error = SVE_SET_VL(arg2);
2461 break;
2462 case PR_SVE_GET_VL:
2463 error = SVE_GET_VL();
2464 break;
2465 case PR_GET_SPECULATION_CTRL:
2466 if (arg3 || arg4 || arg5)
2467 return -EINVAL;
2468 error = arch_prctl_spec_ctrl_get(arg2);
2469 break;
2470 case PR_SET_SPECULATION_CTRL:
2471 if (arg4 || arg5)
2472 return -EINVAL;
2473 error = arch_prctl_spec_ctrl_set(arg2, arg3);
2474 break;
2453 default:
2454 error = -EINVAL;
2455 break;
2456 }
2457 return error;
2458}
2459
2460SYSCALL_DEFINE3(getcpu, unsigned __user *, cpup, unsigned __user *, nodep,

--- 155 unchanged lines hidden ---
2475 default:
2476 error = -EINVAL;
2477 break;
2478 }
2479 return error;
2480}
2481
2482SYSCALL_DEFINE3(getcpu, unsigned __user *, cpup, unsigned __user *, nodep,

--- 155 unchanged lines hidden ---