[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 12 Dec 2007 11:05:45 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Greg KH <greg@...ah.com>
CC: "Huang, Ying" <ying.huang@...el.com>, akpm@...ux-foundation.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Andi Kleen <ak@...e.de>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH -mm -v2] x86 boot : export boot_params via sysfs
Greg KH wrote:
>> This is a binary structure defined by protocol;
>
> What protocol? Is this a "standard" documented somewhere?
Yes, see Documentation/i386/* (although some of it is documented by
reference to include/asm-x86/boot_params.h).
>> in that way it's not significantly different from something passed
>> from the firmware (in fact, it might very well *be* passed from the
>> firmware.) We have in the past found platform bugs by looking at the
>> contents of the whole structure, e.g. to find that part of it has
>> been inappropriately clobbered.
>
> For debugging things, then just export it through debugfs.
Fair enough, however...
>> It is also in the form needed by e.g. kexec to operate.
>
> Does kexec need this today to work properly? Or is this something new?
I believe kexec currently tries to reconstitute it from what data is
available to it. This is incomplete, though, and has been flagged as a
problem for kexec.
> What userspace program is going to know the exact data format of this
> blob, and where is it going to know that format from? The kernel header
> files in sanitized form? Or something else?
It can pick it up from <asm/boot_params.h> (which is now
userspace-safe); or it can decode it itself. Programs like kexec can
pass through most of the data without examining it, this is the main
reason for having it as a blob.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists