mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
syscalls: Remove start and number from syscall_set_arguments() args
After removing the start and count arguments of syscall_get_arguments() it seems reasonable to remove them from syscall_set_arguments(). Note, as of today, there are no users of syscall_set_arguments(). But we are told that there will be soon. But for now, at least make it consistent with syscall_get_arguments(). Link: http://lkml.kernel.org/r/[email protected] Cc: Oleg Nesterov <[email protected]> Cc: Kees Cook <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Dominik Brodowski <[email protected]> Cc: Dave Martin <[email protected]> Cc: "Dmitry V. Levin" <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Acked-by: Max Filippov <[email protected]> # For xtensa changes Acked-by: Will Deacon <[email protected]> # For the arm64 bits Reviewed-by: Thomas Gleixner <[email protected]> # for x86 Reviewed-by: Dmitry V. Levin <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
This commit is contained in:
parent
b35f549df1
commit
32d9258662
20 changed files with 88 additions and 304 deletions
|
|
@ -70,24 +70,13 @@ static inline void syscall_get_arguments(struct task_struct *task,
|
|||
|
||||
static inline void syscall_set_arguments(struct task_struct *task,
|
||||
struct pt_regs *regs,
|
||||
unsigned int i, unsigned int n,
|
||||
const unsigned long *args)
|
||||
{
|
||||
static const unsigned int reg[] = XTENSA_SYSCALL_ARGUMENT_REGS;
|
||||
unsigned int j;
|
||||
unsigned int i;
|
||||
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
if (WARN_ON_ONCE(i + n > SYSCALL_MAX_ARGS)) {
|
||||
if (i < SYSCALL_MAX_ARGS)
|
||||
n = SYSCALL_MAX_ARGS - i;
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
for (j = 0; j < n; ++j)
|
||||
regs->areg[reg[i + j]] = args[j];
|
||||
for (i = 0; i < 6; ++i)
|
||||
regs->areg[reg[i]] = args[i];
|
||||
}
|
||||
|
||||
asmlinkage long xtensa_rt_sigreturn(struct pt_regs*);
|
||||
|
|
|
|||
Loading…
Reference in a new issue