[Top][All Lists]

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

Re: [PATCH] mbi: use per segment a separate relocator chunk

From: Daniel Kiper
Subject: Re: [PATCH] mbi: use per segment a separate relocator chunk
Date: Wed, 16 May 2018 12:22:38 +0200
User-agent: Mutt/1.3.28i

On Tue, May 15, 2018 at 09:18:18PM +0200, Alexander Boettcher wrote:
> On 15.05.2018 21:10, Alexander Boettcher wrote:
> >>I assume that a given ELF PHDR address/size does not cover VGA memory or
> >>anything like that,
> >
> >No.
> >
> >>so, I am not sure what exactly overwrites this region.
> >>grub_memset() in current line 161 at some point?
> >
> >No. During grub_relocator_prepare_reloc the overwrite happens, if i'm
> >not wrong.
> >
> >An (artificial) example, imagine two ELF PHDRs, e.g.
> >
> > ??[0x8000-0x9000) and
> > ??[0x2000000-0x2100000).
> >
> >Without this patch grub calculates one relocator chunk of size 0x20f8000
> >(0x2100000 - 0x8000) and places it at some higher memory, e.g.
> >[0x3000000 - 0x30f8000). During the invocation of
> Must be [0x3000000-0x50f8000)
> >grub_relocator_prepare_reloc the memory gets copied from
> >
> >[0x3000000-0x30f8000) to [0x8000-0x2100000)
> Must be [0x3000000-0x50f8000) to [0x8000-0x2100000)

It seems to me that it happens a bit later. AIUI grub_relocator_prepare_reloc()
prepare movers which are executed when main GRUB code is left,
e.g relst() call from grub_relocator32_boot(). And the movers
do bad job. Well, they were told to do so... Anyway, I think
that the comment should be a bit more clear about it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]