grub-devel
[Top][All Lists]
Advanced

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

[PATCH] fix for loading modules from read-only memory area (Re: clean pa


From: Robert Millan
Subject: [PATCH] fix for loading modules from read-only memory area (Re: clean patch for i386-qemu port (Re: [PATCH] i386-qemu port))
Date: Thu, 25 Jun 2009 01:10:05 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Jun 24, 2009 at 03:00:32AM +0200, Robert Millan wrote:
> A possible solution to this could be to make grub_dl_load_core() create a
> copy of the module and work on the copy.  This could even be ifdef'ed,
> but I doubt the performance hit would be significant.

I found a better approach;  instead of copiing the whole module, we just
need to copy the symbol tab.  A small adjustment to each of the functions
that will access it (grub_dl_resolve_symbols and
grub_arch_dl_relocate_symbols) will make them use the copy instead of
the original.

Patch attached.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."

Attachment: dl.diff
Description: Text Data


reply via email to

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