lkml.org 
[lkml]   [2019]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/5] pidfd: add pidfd_wait()
On Wed, Jul 24, 2019 at 4:47 PM Christian Brauner <christian@brauner.io> wrote:

> +
> +static int copy_rusage_to_user_any(struct rusage *kru, struct rusage __user *ru)
> +{
> +#ifdef CONFIG_COMPAT
> + if (in_compat_syscall())
> + return put_compat_rusage(kru, (struct compat_rusage __user *)ru);
> +#endif
> + return copy_to_user(ru, kru, sizeof(*kru));
> +}

I think this code needs a check for COMPAT_USE_64BIT_TIME in order
to handle x32 correctly.

It would be nice to introduce it in a separate patch, and then use it
to kill off
compat_sys_getrusage() and compat_sys_wait4(), and possibly even
compat_sys_waitid() in combination with your copy_siginfo_to_user_any().
That could be done as a cleanup patch afterwards, or as part of your series.

Arnd

\
 
 \ /
  Last update: 2019-07-26 10:21    [W:0.166 / U:6.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site