Re: [PATCH v7 5/7] mm: support both pid and pidfd for process_madvise

From: Andrew Morton
Date: Fri May 08 2020 - 19:04:18 EST


On Fri, 8 May 2020 11:36:53 -0700 Minchan Kim <minchan@xxxxxxxxxx> wrote:

>
> ...
>
> Per Vlastimil's request, I changed "which and advise" with "idtype and
> advice" in function prototype of description.
> Could you replace the part in the description? Code is never changed.
>

Done, but...

>
> ...
>
> There is a demand[1] to support pid as well pidfd for process_madvise to
> reduce unnecessary syscall to get pidfd if the user has control of the
> target process(ie, they could guarantee the process is not gone or pid is
> not reused).
>
> This patch aims for supporting both options like waitid(2). So, the
> syscall is currently,
>
> int process_madvise(idtype_t idtype, id_t id, void *addr,
> size_t length, int advice, unsigned long flags);
>
> @which is actually idtype_t for userspace libray and currently, it
> supports P_PID and P_PIDFD.

What does "@which is actually idtype_t for userspace libray" mean? Can
you clarify and expand?

Also, does this userspace library exist? If so, where is it?

>
> ...
>