mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Hugh Dickins <hughd@google.com>,
	Cyrill Gorcunov <gorcunov@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Manfred Spraul <manfred@colorfullife.com>,
	Davidlohr Bueso <davidlohr.bueso@hp.com>,
	Kees Cook <keescook@chromium.org>, Tejun Heo <tj@kernel.org>,
	Andrew Vagin <avagin@openvz.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Serge Hallyn <serge.hallyn@canonical.com>,
	Pavel Emelyanov <xemul@parallels.com>,
	Vasiliy Kulikov <segoon@openwall.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Julien Tinnes <jln@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] ipc/shm: fix the historical/wrong mm->start_stack check
Date: Mon, 25 Aug 2014 09:18:48 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LSU.2.11.1408250856020.24245@eggly.anvils> (raw)
In-Reply-To: <20140825150301.GB3021@redhat.com>

On Mon, 25 Aug 2014, Oleg Nesterov wrote:
> On 08/24, Hugh Dickins wrote:
> >
> > I'd say it comes earlier, from Christoph Rohland's 2.4.17-pre7's
> > "Add missing checks on shmat()", though I didn't find more than that.
> >
> > We can all understand wanting to leave a gap below the growsdown stack,
> > but of course could argue about growsup and 1 or 4 or 5 or whatever:
> 
> And it is not clear to me why the kernel should care at all,

Care about what exactly?  Leaving a gap between shm and stack?

The man page says that (unless SHM_REMAP) shmat() will fail with
EINVAL if a mapping already exists there, and I think it's fair
to regard the vm_start of a VM_GROWSDOWN somewhat elastically.

It may be that Linus's check_stack_guard_page() work in 2.6.36
changed the importance of this shmat() check, but I'd still feel
safer to leave it as is (while turning a blind eye to the
VM_GROWSUP omission).

> 
> > okay that we're all more interested in just removing that start_stack.
> 
> so perhaps v2 should simply remove it? Or do you think it would be safer
> to not do this?

It would be safer to leave it, but replace the start_stack use as you did.
And I think I'll let Linus's guard page justify your 4 (to match comment)
in place of the original's mysterious 5.

Hugh

  reply	other threads:[~2014-08-25 16:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-23 14:42 [PATCH 0/1] " Oleg Nesterov
2014-08-23 14:43 ` [PATCH 1/1] " Oleg Nesterov
2014-08-23 15:22   ` Cyrill Gorcunov
2014-08-23 15:58     ` Oleg Nesterov
2014-08-25  1:38       ` Hugh Dickins
2014-08-25 15:03         ` Oleg Nesterov
2014-08-25 16:18           ` Hugh Dickins [this message]
2014-08-25 17:18             ` Oleg Nesterov
2014-08-25 18:51               ` Hugh Dickins
2014-08-25 19:09                 ` Oleg Nesterov
2014-08-24 17:41   ` Manfred Spraul
2014-08-25 14:53     ` Oleg Nesterov
2014-08-25 19:12 ` [PATCH v2] " Oleg Nesterov
2014-08-25 21:22   ` Cyrill Gorcunov
2014-08-26 19:37     ` Oleg Nesterov
2014-08-25 21:49   ` Hugh Dickins
2014-08-26 14:32     ` Oleg Nesterov
2014-08-26 19:31 ` [PATCH v3] ipc/shm: kill " Oleg Nesterov
2014-08-26 20:28   ` Hugh Dickins

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=alpine.LSU.2.11.1408250856020.24245@eggly.anvils \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=avagin@openvz.org \
    --cc=davidlohr.bueso@hp.com \
    --cc=ebiederm@xmission.com \
    --cc=gorcunov@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jln@google.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=mtk.manpages@gmail.com \
    --cc=oleg@redhat.com \
    --cc=segoon@openwall.com \
    --cc=serge.hallyn@canonical.com \
    --cc=tj@kernel.org \
    --cc=xemul@parallels.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

all inboxes | Powered by JetHome®