From: "Jan Beulich" <jbeulich@novell.com>
To: "Ingo Molnar" <mingo@elte.hu>, "Yinghai Lu" <yinghai@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: fix e820_update_range()
Date: Fri, 13 Mar 2009 07:57:32 +0000 [thread overview]
Message-ID: <49BA1FFC.76E4.0078.0@novell.com> (raw)
In-Reply-To: <49B9E286.502@kernel.org>
>>> Yinghai Lu <yinghai@kernel.org> 13.03.09 05:35 >>>
>
>Impact: fix left range size on head.
>
>| commit 5c0e6f035df983210e4d22213aed624ced502d3d
>| x86: fix code paths used by update_mptable
>| Impact: fix crashes under Xen due to unrobust e820 code
>fix one bug about e820 referring, but introduce other bug
>
>need update size for left range at first in case it is header.
>
>also add __e820_add_region take more parameter.
>
>Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>...
>+ /*
>+ * left range could be head or tail, so need to update
>+ * size at first.
>+ */
>+ ei->size -= final_end - final_start;
> if (ei->addr < final_start)
> continue;
> ei->addr = final_end;
>- ei->size -= final_end - final_start;
The change of mine here was done on purpose, since I had observed that
in this particular case (when the changed region starts later and ends earlier
than the original region) e820_add_region() would in any case create an
overlapping entry (which later gets cleaned up by sanitize_e820_map()).
That cleanup in sanitize_e820_map(), however, already implies reducing
the size of the enclosing region, and hence the original code (and the code
you try to restore now) effectively shrinks the original region twice.
Consequently, the only alternative to the code as resulting from my
patch appears to be to avoid the generation of overlapping entries in
the first place, but that would clearly make e820_update_range_map()
more complex.
Jan
next prev parent reply other threads:[~2009-03-13 7:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 12:57 [PATCH] x86: clean up output resulting from update_mptable option Jan Beulich
2009-03-13 2:34 ` [tip:x86/mm] " Jan Beulich
2009-03-13 4:35 ` [PATCH] x86: fix e820_update_range() Yinghai Lu
2009-03-13 4:39 ` [tip:x86/mm] " Yinghai Lu
2009-03-13 5:36 ` [PATCH] x86: make e820_update_range to handle small range update Yinghai Lu
2009-03-14 11:39 ` [tip:x86/mm] x86: make e820_update_range() " Yinghai Lu
2009-03-14 12:17 ` Ingo Molnar
2009-03-14 18:21 ` Yinghai Lu
2009-03-14 18:40 ` Ingo Molnar
2009-03-14 21:32 ` Yinghai Lu
2009-03-15 6:04 ` Ingo Molnar
2009-03-15 6:20 ` Yinghai Lu
2009-03-15 6:25 ` Ingo Molnar
2009-03-15 6:12 ` [tip:x86/mm] x86: fix 64k corruption-check Yinghai Lu
2009-03-13 7:57 ` Jan Beulich [this message]
2009-03-13 11:13 ` [PATCH] x86: fix e820_update_range() Ingo Molnar
2009-03-13 18:22 ` Yinghai Lu
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=49BA1FFC.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=yinghai@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