[PATCH 10/10] mm: replace access_process_vm() write parameter with gup_flags
Michael Ellerman
mpe at ellerman.id.au
Wed Oct 19 22:10:46 AEDT 2016
Lorenzo Stoakes <lstoakes at gmail.com> writes:
> diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c
> index f52b7db3..010b7b3 100644
> --- a/arch/powerpc/kernel/ptrace32.c
> +++ b/arch/powerpc/kernel/ptrace32.c
> @@ -74,7 +74,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
> break;
>
> copied = access_process_vm(child, (u64)addrOthers, &tmp,
> - sizeof(tmp), 0);
> + sizeof(tmp), FOLL_FORCE);
> if (copied != sizeof(tmp))
> break;
> ret = put_user(tmp, (u32 __user *)data);
LGTM.
> @@ -179,7 +179,8 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
> break;
> ret = 0;
> if (access_process_vm(child, (u64)addrOthers, &tmp,
> - sizeof(tmp), 1) == sizeof(tmp))
> + sizeof(tmp),
> + FOLL_FORCE | FOLL_WRITE) == sizeof(tmp))
> break;
> ret = -EIO;
> break;
If you're respinning this anyway, can you format that as:
if (access_process_vm(child, (u64)addrOthers, &tmp, sizeof(tmp),
FOLL_FORCE | FOLL_WRITE) == sizeof(tmp))
break;
I realise you probably deliberately didn't do that to make the diff clearer.
Either way:
Acked-by: Michael Ellerman <mpe at ellerman.id.au> (powerpc)
cheers
More information about the Linuxppc-dev
mailing list