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 <ava...@openvz.org>
> > CC: Andrew Morton <a...@linuxfoundation.org>
> > CC: Pavel Emelyanov <xe...@virtuozzo.com>
> > CC: Michael Kerrisk <mtk.manpa...@gmail.com>
> > CC: Yang Shi <yang....@linux.alibaba.com>
> > CC: Michal Hocko <mho...@kernel.org>
> > Signed-off-by: Cyrill Gorcunov <gorcu...@gmail.com>
> 
> Acked-by: Michal Hocko <mho...@suse.com>
> 
> and fingers crossed that we haven't grown other users outside of CRIU
> which is quite bound to specific kernels AFAIK.

Surely.

Reply via email to