mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Shi <yang.shi@linux.alibaba.com>
To: Cyrill Gorcunov <gorcunov@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Cc: Andrey Vagin <avagin@openvz.org>,
	Andrew Morton <akpm@linuxfoundation.org>,
	Pavel Emelyanov <xemul@virtuozzo.com>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Michal Hocko <mhocko@kernel.org>
Subject: Re: [RFC] prctl: Deprecate non PR_SET_MM_MAP operations
Date: Tue, 3 Apr 2018 16:15:20 -0700	[thread overview]
Message-ID: <48bcd917-4eb8-9da6-ec4b-e76a654695c4@linux.alibaba.com> (raw)
In-Reply-To: <20180403223722.GA15783@uranus.lan>



On 4/3/18 3:37 PM, 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.
>
> 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 issue deprecation warning
> first time and get rid of this interface after a couple
> of releases.
>
> 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>
> ---
> Or we can simply drop it off because PR_SET_MM_MAP covers all needs,
> and I would rather prefer to do that asap.

Thanks for making it deprecated. I'd prefer just drop it off if nobody 
objects. The change will get soaked in linux-next for a while , we will 
know if it breaks compatibility (it sounds very unlikely).

Yang

>
>   kernel/sys.c |    2 ++
>   1 file changed, 2 insertions(+)
>
> Index: linux-ml.git/kernel/sys.c
> ===================================================================
> --- linux-ml.git.orig/kernel/sys.c
> +++ linux-ml.git/kernel/sys.c
> @@ -2052,6 +2052,8 @@ static int prctl_set_mm(int opt, unsigne
>   	if (!capable(CAP_SYS_RESOURCE))
>   		return -EPERM;
>   
> +	pr_warn_once("Non PR_SET_MM_MAP operations are deprecated\n");
> +
>   	if (opt == PR_SET_MM_EXE_FILE)
>   		return prctl_set_mm_exe_file(mm, (unsigned int)addr);
>   

  reply	other threads:[~2018-04-03 23:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03 22:37 Cyrill Gorcunov
2018-04-03 23:15 ` Yang Shi [this message]
2018-04-04  5:35   ` Michal Hocko
2018-04-04  6:59     ` Cyrill Gorcunov
2018-04-04 15:54     ` Yang Shi
2018-04-04 15:58       ` Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48bcd917-4eb8-9da6-ec4b-e76a654695c4@linux.alibaba.com \
    --to=yang.shi@linux.alibaba.com \
    --cc=akpm@linuxfoundation.org \
    --cc=avagin@openvz.org \
    --cc=gorcunov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=xemul@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome