[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4] x86/setup: disallow any src/dst overlaps when relocating Xen image



On Wed, Apr 11, 2018 at 02:58:01AM -0600, Jan Beulich wrote:
> >>> On 11.04.18 at 10:54, <daniel.kiper@xxxxxxxxxx> wrote:
> > On Tue, Apr 03, 2018 at 05:54:14PM +0200, Daniel Kiper wrote:
> >> Commit 0d31d16 (x86/setup: do not relocate Xen over current Xen image
> >> placement) disallowed src/dst images overlaps when relocating Xen image.
> >> Though it deliberately allowed destination region between __image_base__
> >> and (__image_base__ + XEN_IMG_OFFSET) overlaps with the end of source
> >> image. And here is the problem. If anything between __page_tables_start
> >> and __page_tables_end in source image lands in the overlap then some or
> >> even all page table entries may not be updated. This usually means boom
> >> in early boot which will be difficult to the investigate. So, I think
> >> that we have three choices to fix the issue:
> >>   - drop XEN_IMG_OFFSET from
> >>     if ( (end > s) && (end - reloc_size + XEN_IMG_OFFSET >= __pa(_end)) )
> >>   - add XEN_IMG_OFFSET to xen_phys_start in PFN_DOWN(xen_phys_start)
> >>     used in loops as one of conditions,
> >>   - change PFN_DOWN(xen_phys_start) to PFN_DOWN(xen_remap_end_pfn)
> >>     proposed in earlier version of this patch.
> >>
> >> This patch implements the first option. This way we will avoid all kinds
> >> of overlaps which are always full can of worms.
> >>
> >> Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>
> >
> > Ping?
>
> I'll get to it, but it has missed 4.11 anyway, so I don't think there's
> an urgency here.

Understood. Thanks a lot!

Daniel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.