All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Handle C symbols with leading underscore (HAVE_ASM_USCORE)
Date: Sun, 18 Nov 2007 07:18:41 +0100	[thread overview]
Message-ID: <20071118061841.GB20719@thorin> (raw)
In-Reply-To: <473748F4.4070206@t-online.de>

On Sun, Nov 11, 2007 at 07:24:52PM +0100, Christian Franke wrote:
> 
> Should the kernel probably check whether a module is build for the same 
> target? This would avoid interesting behaviour if a foreign module is 
> accidentally load for some reason. It could e.g. be done by checking a 
> symbol derived from $target.

It's important to keep the kernel small.  IMHO checks against improper use
themselves don't justify increasing its size (although what you want might
fit well in grub-mkimage, at least for modules that are put in core.img).

OTOH, there's an ongoing discussion on how to embed a filesystem image as
part of core.img, which (maybe, I'm not sure ;-)) could qualify as "foreign
module" and somehow collide with this.  Thread subject is:
"Re: grub-setup: error: Non-sector-aligned data is found in the core file"

> diff -rup grub2.orig/kern/dl.c grub2/kern/dl.c
> --- grub2.orig/kern/dl.c	2007-07-22 01:32:26.000000000 +0200
> +++ grub2/kern/dl.c	2007-11-11 18:01:50.578125000 +0100
> @@ -53,6 +53,12 @@ typedef Elf64_Sym Elf_Sym;
>  
>  #endif
>  
> +#ifdef HAVE_ASM_USCORE
> +# define SYM_USCORE "_"
> +#else
> +# define SYM_USCORE ""
> +#endif

Should this be global?  We already have START_SYMBOL and END_SYMBOL.  Perhaps
this should be next to them?

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)



  reply	other threads:[~2007-11-18  6:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-10 19:03 [PATCH] Handle C symbols with leading underscore (HAVE_ASM_USCORE) Christian Franke
2007-11-10 21:24 ` Robert Millan
2007-11-11 18:24   ` Christian Franke
2007-11-18  6:18     ` Robert Millan [this message]
2007-11-18 20:52       ` Christian Franke

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=20071118061841.GB20719@thorin \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.