hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/include/asm-generic/syscall.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Access to user system call parameters and results
34 *
45 * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved.
5
- *
6
- * This copyrighted material is made available to anyone wishing to use,
7
- * modify, copy, or redistribute it subject to the terms and conditions
8
- * of the GNU General Public License v.2.
96 *
107 * This file is a stub providing documentation for what functions
118 * asm-ARCH/syscall.h files need to define. Most arch definitions
....@@ -105,53 +102,43 @@
105102 * syscall_get_arguments - extract system call parameter values
106103 * @task: task of interest, must be blocked
107104 * @regs: task_pt_regs() of @task
108
- * @i: argument index [0,5]
109
- * @n: number of arguments; n+i must be [1,6].
110105 * @args: array filled with argument values
111106 *
112
- * Fetches @n arguments to the system call starting with the @i'th argument
113
- * (from 0 through 5). Argument @i is stored in @args[0], and so on.
114
- * An arch inline version is probably optimal when @i and @n are constants.
107
+ * Fetches 6 arguments to the system call. First argument is stored in
108
+* @args[0], and so on.
115109 *
116110 * It's only valid to call this when @task is stopped for tracing on
117111 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
118
- * It's invalid to call this with @i + @n > 6; we only support system calls
119
- * taking up to 6 arguments.
120112 */
121113 void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
122
- unsigned int i, unsigned int n, unsigned long *args);
114
+ unsigned long *args);
123115
124116 /**
125117 * syscall_set_arguments - change system call parameter value
126118 * @task: task of interest, must be in system call entry tracing
127119 * @regs: task_pt_regs() of @task
128
- * @i: argument index [0,5]
129
- * @n: number of arguments; n+i must be [1,6].
130120 * @args: array of argument values to store
131121 *
132
- * Changes @n arguments to the system call starting with the @i'th argument.
133
- * Argument @i gets value @args[0], and so on.
134
- * An arch inline version is probably optimal when @i and @n are constants.
122
+ * Changes 6 arguments to the system call.
123
+ * The first argument gets value @args[0], and so on.
135124 *
136125 * It's only valid to call this when @task is stopped for tracing on
137126 * entry to a system call, due to %TIF_SYSCALL_TRACE or %TIF_SYSCALL_AUDIT.
138
- * It's invalid to call this with @i + @n > 6; we only support system calls
139
- * taking up to 6 arguments.
140127 */
141128 void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs,
142
- unsigned int i, unsigned int n,
143129 const unsigned long *args);
144130
145131 /**
146132 * syscall_get_arch - return the AUDIT_ARCH for the current system call
133
+ * @task: task of interest, must be blocked
147134 *
148135 * Returns the AUDIT_ARCH_* based on the system call convention in use.
149136 *
150
- * It's only valid to call this when current is stopped on entry to a system
137
+ * It's only valid to call this when @task is stopped on entry to a system
151138 * call, due to %TIF_SYSCALL_TRACE, %TIF_SYSCALL_AUDIT, or %TIF_SECCOMP.
152139 *
153140 * Architectures which permit CONFIG_HAVE_ARCH_SECCOMP_FILTER must
154141 * provide an implementation of this.
155142 */
156
-int syscall_get_arch(void);
143
+int syscall_get_arch(struct task_struct *task);
157144 #endif /* _ASM_SYSCALL_H */