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)


Sorry.

--
Alexander Boettcher
Genode Labs

http://www.genode-labs.com - http://www.genode.org

Genode Labs GmbH - Amtsgericht Dresden - HRB 28424 - Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to