lkml.org 
[lkml]   [2018]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] prctl: Deprecate non PR_SET_MM_MAP operations
On Thu, Apr 05, 2018 at 08:56:50PM +0200, Michal Hocko wrote:
> On Thu 05-04-18 21:26:51, Cyrill Gorcunov wrote:
> > An ability to manipulate mm_struct fields was introduced in
> > sake of CRIU in first place. Later we provide more suitable
> > and safe operation PR_SET_MM_MAP where all fields to be modifed
> > are passed in one structure which allows us to make more detailed
> > verification.
>
> I hope this will serve as a memento for future single-user APIs
> proposals. The whole thing was a bad idea since the beginning.

It wasn't a bad idea at all, kernel evolves with time and the
first version of the api served as it should (actually a number
of things get involved like user-namespaces, mm reworks and
such things). So no, it wasn't bad. Rather to make it more
suitable we provided a second version of the api.

> > Still old interface remains present for compatibility reason
> > though CRIU itself already switched to PR_SET_MM_MAP on its
> > own long ago.
> >
> > Googling didn't reveal some other users of this operation
> > so I think it should be safe to remove this interface.
> >
> > v2:
> > - Improve warning message
> > - Drop redundant args check
> >
> > CC: Andrey Vagin <avagin@openvz.org>
> > CC: Andrew Morton <akpm@linuxfoundation.org>
> > CC: Pavel Emelyanov <xemul@virtuozzo.com>
> > CC: Michael Kerrisk <mtk.manpages@gmail.com>
> > CC: Yang Shi <yang.shi@linux.alibaba.com>
> > CC: Michal Hocko <mhocko@kernel.org>
> > Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
>
> Acked-by: Michal Hocko <mhocko@suse.com>
>
> and fingers crossed that we haven't grown other users outside of CRIU
> which is quite bound to specific kernels AFAIK.

Surely.

\
 
 \ /
  Last update: 2018-04-05 21:52    [W:0.093 / U:1.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site