LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Etienne Lorrain <etienne_lorrain@yahoo.fr>
To: vgoyal@in.ibm.com
Cc: "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re : [PATCH] Compressed ia32 ELF file generation for loading by Gujin 1/3
Date: Thu, 8 Feb 2007 09:48:31 +0000 (GMT) [thread overview]
Message-ID: <20070208094831.56920.qmail@web26908.mail.ukl.yahoo.com> (raw)
Vivek Goyal wrote:
> > Etienne Lorrain wrote:
> > Yes, any PT_LOAD below 64 Kbytes can only be real mode, and real-mode
> > cannot be loaded higher, and cannot be bigger than 640 Kbytes, anything
> > different (like with virtual address at 0xC0000000) is Linux protected mode.
> > Considering the linker used it is always the 4th program header, before there
> > were only 3 program header,third one stay the NOTE one.
>
> Well this is all a lot of speculation. This is not standard way of retrieving
> information from ELF. Number of program headers finally created keep on
> changing. Previously it was left to the linker and now people have changed
> it to 3 by specifically using PHDR directive.
Well, the standard way is:
1 - the code program header, to be write protected if possible
2 - the (initialised) data program header, to be able to restart the program by just reload/re-entry,
and after that (memsiz - filesz) of BSS
Anything after is non standard. The number of program header is written in the ELF header,
but anything over 2 probably need a special loader for the extra treatment.
That isn't usual to have something near zero, because it is better not to map
any memory there to catch null pointer dereference (in virtual memory system).
I assume you care about this ELF header because you are also a user of
the ELF file vmlinux, aren't you?
> > Just I did not completely understand why you need relocation (and the announce
> > was when I was in holidays far away). I know a simple kernel is needed to do
> > some debugging when the main kernel has crashed, this kernel is better loaded
> > at for instance 16 Mbytes. You probably do not want the same kernel as the main
> > one because it may crash the same way, and you start a loop - and even then
> > if you have exactly the same kernel it is easier to use the same write-protected
> > block of memory with different data sections.
> > But I probably do not understand the problem so do not know what to write.
>
> As long as one can make sure that test kernel boots (commonly the case with
> distros), same kernel can be used as capture kernel too. So the idea here
> is to be able to use same kernel binary as production kernel and capture
> kernel hence distros don't have to ship an additional kernel binary compiled
> for a different physical addr just for dump capturing purposes.
And you do not want to write protect the kernel code (if the CPU write protection
is not working, the hardware is not working so debug will be difficult, and a simple
CRC32 can tell kernel memory failure) and use twice the same code memory
(with different data area or saving kernel data elsewhere before reload).
Is that related to module loading or instruction set detection/patch or multiprocessor?
> Currently relocation information is extracted from vmlinux and packed in
> final bzImage after some processing. After execution of real mode code
> and once the image is decompressed, all the relocations are performed and
> then control is transferred to kernel.
So here you are not really using the initial ELF program header of vmlinux,
but more the section header and my PT_LOAD section bother you, I better
understand. You cannot really claim you are only doing standard/usual
ELF treatment.
Thanks,
Etienne.
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
next reply other threads:[~2007-02-08 9:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-08 9:48 Etienne Lorrain [this message]
2007-02-08 11:20 ` Eric W. Biederman
2007-02-08 11:37 ` Vivek Goyal
2007-02-08 12:10 ` Eric W. Biederman
-- strict thread matches above, loose matches on Subject: below --
2007-02-11 20:49 RE : " Eric W. Biederman
2007-02-12 10:42 ` Etienne Lorrain
2007-02-12 12:29 ` Eric W. Biederman
2007-02-12 13:58 ` Etienne Lorrain
2007-02-12 14:06 ` H. Peter Anvin
2007-02-12 19:47 ` Eric W. Biederman
2007-02-08 13:10 Etienne Lorrain
2007-02-09 5:59 ` Vivek Goyal
2007-02-09 13:04 ` Etienne Lorrain
2007-02-09 19:42 ` Eric W. Biederman
2007-02-07 14:29 Etienne Lorrain
2007-02-07 17:12 ` H. Peter Anvin
2007-02-06 17:23 Etienne Lorrain
2007-02-06 17:34 ` H. Peter Anvin
2007-02-06 18:12 ` Eric W. Biederman
2007-02-06 13:23 Etienne Lorrain
2007-02-06 13:12 Etienne Lorrain
2007-02-07 6:44 ` Vivek Goyal
2007-02-06 12:49 Etienne Lorrain
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=20070208094831.56920.qmail@web26908.mail.ukl.yahoo.com \
--to=etienne_lorrain@yahoo.fr \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@in.ibm.com \
--subject='Re: Re : [PATCH] Compressed ia32 ELF file generation for loading by Gujin 1/3' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).