CHROMIUM: ARM: r1->r0 for get/set arguments
ARM reuses r0 as the first argument. This fixes the mistaken assumption in the original patchset. These will be merged into one change when sent upstream. Signed-off-by: Will Drewry <wad@chromium.org> TEST=emerge tegra2_kaen; run seccomp testsuite BUG=chromium-os:27878 Change-Id: Iaaa09995d35f78ee8cef7b600d526e71f3b2fcec Reviewed-on: https://gerrit.chromium.org/gerrit/21342 Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Will Drewry <wad@chromium.org> Tested-by: Will Drewry <wad@chromium.org> Signed-off-by: Sasha Levitskiy <sanek@google.com>
This commit is contained in:
parent
447e37ff28
commit
03c6ba15e0
|
@ -55,7 +55,7 @@ static inline void syscall_get_arguments(struct task_struct *task,
|
|||
unsigned long *args)
|
||||
{
|
||||
BUG_ON(i + n > 6);
|
||||
memcpy(args, ®s->ARM_r1 + i, n * sizeof(args[0]));
|
||||
memcpy(args, ®s->ARM_r0 + i, n * sizeof(args[0]));
|
||||
}
|
||||
|
||||
static inline void syscall_set_arguments(struct task_struct *task,
|
||||
|
@ -64,7 +64,7 @@ static inline void syscall_set_arguments(struct task_struct *task,
|
|||
const unsigned long *args)
|
||||
{
|
||||
BUG_ON(i + n > 6);
|
||||
memcpy(®s->ARM_r1 + i, args, n * sizeof(args[0]));
|
||||
memcpy(®s->ARM_r0 + i, args, n * sizeof(args[0]));
|
||||
}
|
||||
|
||||
static inline int syscall_get_arch(struct task_struct *task,
|
||||
|
|
Loading…
Reference in New Issue