Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Cc: kexec@lists.infradead.org, Petr Tesarik <ptesarik@suse.cz>
Subject: Re: [PATCH v2] kexec: fix mmap return code handling
Date: Fri, 27 Nov 2015 09:36:49 +0900	[thread overview]
Message-ID: <20151127003649.GF2394@verge.net.au> (raw)
In-Reply-To: <20151126200235.5450c397@holzheu>

On Thu, Nov 26, 2015 at 08:02:35PM +0100, Michael Holzheu wrote:
> On Thu, 26 Nov 2015 19:02:28 +0100
> Petr Tesarik <ptesarik@suse.cz> wrote:
> 
> > On Thu, 26 Nov 2015 18:32:31 +0100
> > Michael Holzheu <holzheu@linux.vnet.ibm.com> wrote:
> > 
> > > Hi Simon again,
> > > 
> > > After a bit more thinking: In theory mmap() could also return NULL.
> > > Therefore the following fix is probably the better one ...
> > 
> > No, if you let the kernel choose the address (i.e. call mmap with NULL
> > addr), it will return at least PAGE_SIZE (and a higher limit is usually
> > enforced by sys.vm.mmap_min_addr sysctl). Admittedly the limit is set
> > in arch-specific code, so theoretically there can be an architecture
> > which sets the limit to 0, but I doubt it, because it would break too
> > many assumptions in user space (for example gcc assumes that
> > dereferencing a NULL pointer terminates a process).
> >
> > In short, this other fix is just as good as the previous one.
> 
> Hi Petr,
> 
> Thanks for clarification! I still would vote for the second one ;-)

Thanks, I have applied that version.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

      reply	other threads:[~2015-11-27  0:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25 12:47 [PATCH] kexec: fix mmap return code handling Michael Holzheu
2015-11-26 17:32 ` [PATCH v2] " Michael Holzheu
2015-11-26 18:02   ` Petr Tesarik
2015-11-26 19:02     ` Michael Holzheu
2015-11-27  0:36       ` Simon Horman [this message]

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=20151127003649.GF2394@verge.net.au \
    --to=horms@verge.net.au \
    --cc=holzheu@linux.vnet.ibm.com \
    --cc=kexec@lists.infradead.org \
    --cc=ptesarik@suse.cz \
    /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