.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Access to user system call parameters and results |
---|
3 | 4 | * |
---|
4 | 5 | * 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. |
---|
9 | 6 | * |
---|
10 | 7 | * This file is a stub providing documentation for what functions |
---|
11 | 8 | * asm-ARCH/syscall.h files need to define. Most arch definitions |
---|
.. | .. |
---|
105 | 102 | * syscall_get_arguments - extract system call parameter values |
---|
106 | 103 | * @task: task of interest, must be blocked |
---|
107 | 104 | * @regs: task_pt_regs() of @task |
---|
108 | | - * @i: argument index [0,5] |
---|
109 | | - * @n: number of arguments; n+i must be [1,6]. |
---|
110 | 105 | * @args: array filled with argument values |
---|
111 | 106 | * |
---|
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. |
---|
115 | 109 | * |
---|
116 | 110 | * It's only valid to call this when @task is stopped for tracing on |
---|
117 | 111 | * 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. |
---|
120 | 112 | */ |
---|
121 | 113 | 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); |
---|
123 | 115 | |
---|
124 | 116 | /** |
---|
125 | 117 | * syscall_set_arguments - change system call parameter value |
---|
126 | 118 | * @task: task of interest, must be in system call entry tracing |
---|
127 | 119 | * @regs: task_pt_regs() of @task |
---|
128 | | - * @i: argument index [0,5] |
---|
129 | | - * @n: number of arguments; n+i must be [1,6]. |
---|
130 | 120 | * @args: array of argument values to store |
---|
131 | 121 | * |
---|
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. |
---|
135 | 124 | * |
---|
136 | 125 | * It's only valid to call this when @task is stopped for tracing on |
---|
137 | 126 | * 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. |
---|
140 | 127 | */ |
---|
141 | 128 | void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, |
---|
142 | | - unsigned int i, unsigned int n, |
---|
143 | 129 | const unsigned long *args); |
---|
144 | 130 | |
---|
145 | 131 | /** |
---|
146 | 132 | * syscall_get_arch - return the AUDIT_ARCH for the current system call |
---|
| 133 | + * @task: task of interest, must be blocked |
---|
147 | 134 | * |
---|
148 | 135 | * Returns the AUDIT_ARCH_* based on the system call convention in use. |
---|
149 | 136 | * |
---|
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 |
---|
151 | 138 | * call, due to %TIF_SYSCALL_TRACE, %TIF_SYSCALL_AUDIT, or %TIF_SECCOMP. |
---|
152 | 139 | * |
---|
153 | 140 | * Architectures which permit CONFIG_HAVE_ARCH_SECCOMP_FILTER must |
---|
154 | 141 | * provide an implementation of this. |
---|
155 | 142 | */ |
---|
156 | | -int syscall_get_arch(void); |
---|
| 143 | +int syscall_get_arch(struct task_struct *task); |
---|
157 | 144 | #endif /* _ASM_SYSCALL_H */ |
---|