From: Yang Shi <yang.shi@linux.alibaba.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Cyrill Gorcunov <gorcunov@gmail.com>,
Matthew Wilcox <willy@infradead.org>
Cc: adobriyan@gmail.com, mhocko@kernel.org, mguzik@redhat.com,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [v2 PATCH] mm: introduce arg_lock to protect arg_start|end and env_start|end in mm_struct
Date: Mon, 26 Mar 2018 17:20:33 -0400 [thread overview]
Message-ID: <def25632-b983-950b-d2e6-b7c6478024ed@linux.alibaba.com> (raw)
In-Reply-To: <0bfa8943-a2fe-b0ab-99a2-347094a2bcec@i-love.sakura.ne.jp>
On 3/26/18 5:10 PM, Tetsuo Handa wrote:
> On 2018/03/27 4:21, Cyrill Gorcunov wrote:
>> That said I think using read-lock here would be a bug.
> If I understand correctly, the caller can't set both fields atomically, for
> prctl() does not receive both fields at one call.
>
> prctl(PR_SET_MM, PR_SET_MM_ARG_START xor PR_SET_MM_ARG_END xor PR_SET_MM_ENV_START xor PR_SET_MM_ENV_END, new value, 0, 0);
>
> Then, I wonder whether reading arg_start|end and env_start|end atomically makes
> sense. Just retry reading if arg_start > env_end or env_start > env_end is fine?
It might trap into dead loop if those are set to wrong values, right?
next prev parent reply other threads:[~2018-03-26 21:20 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 18:20 Yang Shi
2018-03-26 18:37 ` Matthew Wilcox
2018-03-26 19:21 ` Cyrill Gorcunov
2018-03-26 21:10 ` Tetsuo Handa
2018-03-26 21:20 ` Yang Shi [this message]
2018-03-26 21:29 ` Cyrill Gorcunov
2018-03-26 22:00 ` Tetsuo Handa
2018-03-26 22:12 ` Yang Shi
2018-03-27 7:38 ` Cyrill Gorcunov
2018-03-27 7:37 ` Cyrill Gorcunov
2018-03-26 21:59 ` Yang Shi
2018-03-27 7:32 ` Cyrill Gorcunov
2018-03-27 18:44 ` Yang Shi
2018-03-26 19:42 ` Mateusz Guzik
2018-03-26 21:10 ` Yang Shi
2018-03-27 6:29 ` Michal Hocko
2018-03-27 14:31 ` Mateusz Guzik
2018-03-27 14:43 ` Michal Hocko
2018-03-27 18:38 ` Yang Shi
2018-03-27 18:52 ` Cyrill Gorcunov
2018-03-28 13:10 ` Michal Hocko
2018-04-02 1:58 ` Yang Shi
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=def25632-b983-950b-d2e6-b7c6478024ed@linux.alibaba.com \
--to=yang.shi@linux.alibaba.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=gorcunov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mguzik@redhat.com \
--cc=mhocko@kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=willy@infradead.org \
/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