From: Thomas Gleixner <tglx@linutronix.de>
To: Martin Kelly <martin@martingkelly.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org, mingo@redhat.com,
hpa@zytor.com, akpm@linux-foundation.org, rientjes@google.com,
david.vrabel@citrix.com, Martin Kelly <martkell@amazon.com>
Subject: Re: [PATCH v2] x86, e820: panic on sanitizing invalid memory map
Date: Tue, 21 Oct 2014 21:44:04 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.11.1410212141350.5308@nanos> (raw)
In-Reply-To: <54465FC2.1030106@martingkelly.com>
On Tue, 21 Oct 2014, Martin Kelly wrote:
> On 10/21/2014 01:56 AM, Thomas Gleixner wrote:
> >> This patch changes the behavior so that sanitize_e820_map is a void
> >> function. When the provided memory map has length 1 or it is sanitized
> >> (both ok cases), it returns nothing. If the provided memory map is
> >> invalid, then it panics.
> >
> > So you break wilfully default_machine_specific_memory_setup() and
> > probably some other places. Are you sure about that?
> >
> I was concerned about exactly that kind of breakage, so my first patch
> merely separated out the return values and added some appropriate error
> checking:
> https://lkml.org/lkml/2014/10/13/514
>
> I then asked whether there are valid cases for ignoring an invalid map
> and continuing on, but I didn't receive a reply, so I took my best
> guess. It appears I missed some fallback code
> (default_machine_specific_memory_setup). That said, most cases don't
We probably could and should also spend some time on investigating the
validity of that fallback stuff. AFAICT, this has some rather obscure
history from voyager, but I had no time to do more archeology on that.
> appear to have fallback code and will hit issues later on if the BIOS
> map is invalid (e.g. Xen).
Right.
> Thomas, do you see any issues with a revision that separates out the
> return values (0 for a map with 1 entry, -1 for a map with invalid
> entries) and adds checks in the callers, where appropriate?
I think that's a sane approach.
Thanks,
tglx
next prev parent reply other threads:[~2014-10-21 19:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-21 2:37 Martin Kelly
2014-10-21 8:56 ` Thomas Gleixner
2014-10-21 13:29 ` Martin Kelly
2014-10-21 19:44 ` Thomas Gleixner [this message]
2014-10-22 3:15 ` Martin Kelly
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.DEB.2.11.1410212141350.5308@nanos \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=david.vrabel@citrix.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin@martingkelly.com \
--cc=martkell@amazon.com \
--cc=mingo@redhat.com \
--cc=rientjes@google.com \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®