[PATCH] romsignature/checksum cleanup

2007-01-07 Thread Rene Herman
On 01/07/2007 07:07 PM, Jeremy Fitzhardinge wrote: Rene Herman wrote: Doing the set_fs() and pagefault_{disable,enable} calls for every single byte during the checksum seems rather silly. Why? Because it makes for dumb code. But oh well, given that it all compiles to basically nothing I

Re: [PATCH] romsignature/checksum cleanup

2007-01-07 Thread Jeremy Fitzhardinge
Rene Herman wrote: > Doing the set_fs() and pagefault_{disable,enable} calls for every > single byte during the checksum seems rather silly. Why? It's a bit of a performance hit, but that doesn't matter here. probe_kernel_address() is semantically the right thing to be using; open-coding its con

Re: [PATCH] romsignature/checksum cleanup

2007-01-07 Thread Rene Herman
On 01/07/2007 11:20 AM, Jeremy Fitzhardinge wrote: Rene Herman wrote: How is it for efficiency? I thought it was for correctness. romsignature is using probe_kernel_adress() while all other accesses to the ROMs there aren't. If nothing else, anyone reading that code is likely to ask himself

Re: [PATCH] romsignature/checksum cleanup

2007-01-07 Thread Jeremy Fitzhardinge
Rene Herman wrote: > How is it for efficiency? I thought it was for correctness. > romsignature is using probe_kernel_adress() while all other accesses > to the ROMs there aren't. > > If nothing else, anyone reading that code is likely to ask himself the > very same question -- why the one, and not

Re: [PATCH] romsignature/checksum cleanup

2007-01-07 Thread Rene Herman
On 01/07/2007 09:59 AM, Jeremy Fitzhardinge wrote: Rene Herman wrote: In your opinion, is the attached (versus 2.6.20-rc3) better? This uses probe_kernel_address() for all accesses. Or rather, an expanded version thereof. The set_fs() and pagefault_{disable,enable} calls are only done once in

Re: [PATCH] romsignature/checksum cleanup

2007-01-07 Thread Jeremy Fitzhardinge
Rene Herman wrote: > In your opinion, is the attached (versus 2.6.20-rc3) better? This uses > probe_kernel_address() for all accesses. Or rather, an expanded > version thereof. The set_fs() and pagefault_{disable,enable} calls are > only done once in probe_roms(). > > Accessing the length byte at r

Re: [PATCH] romsignature/checksum cleanup

2007-01-05 Thread Rene Herman
Jeremy Fitzhardinge wrote: Well, in the Xen case, where the pages are simply not mapped, then the signature simply won't exist. In other cases, I guess its possible the signature might exist but the rest of the ROM doesn't, but that won't happen on normal hardware. In your opinion, is the att

Re: [PATCH] romsignature/checksum cleanup

2007-01-05 Thread Jeremy Fitzhardinge
Rene Herman wrote: > Jeremy? Is it okay to only check the signature word? The checksum will > generally be done over more than 1 (hw) page... That "presumably" > there seems a bit flaky? Well, in the Xen case, where the pages are simply not mapped, then the signature simply won't exist. In other

Re: [PATCH] romsignature/checksum cleanup

2007-01-02 Thread Rene Herman
Zachary Amsden wrote: Rusty Russell wrote: Rene Herman wrote: Hmm, by the way, if romsignature() needs this probe_kernel_address() thing, why doesn't romchecksum()? I assume it's all in the same page, but CC'ing Zach is easier than reading the code 8) Some hypervisors don't emulate the

Re: [PATCH] romsignature/checksum cleanup

2006-12-27 Thread Zachary Amsden
Rusty Russell wrote: On Mon, 2006-12-25 at 01:53 +0100, Rene Herman wrote: Rene Herman wrote: Use adding __init to romsignature() (it's only called from probe_roms() which is itself __init) as an excuse to submit a pedantic cleanup. Hmm, by the way, if romsignature() needs this

Re: [PATCH] romsignature/checksum cleanup

2006-12-26 Thread Rusty Russell
On Mon, 2006-12-25 at 01:53 +0100, Rene Herman wrote: > Rene Herman wrote: > > > Use adding __init to romsignature() (it's only called from probe_roms() > > which is itself __init) as an excuse to submit a pedantic cleanup. > > Hmm, by the way, if romsignature() needs this probe_kernel_address()

Re: [PATCH] romsignature/checksum cleanup

2006-12-26 Thread Rene Herman
Rusty Russell wrote: On Mon, 2006-12-25 at 01:53 +0100, Rene Herman wrote: Hmm, by the way, if romsignature() needs this probe_kernel_address() thing, why doesn't romchecksum()? I assume it's all in the same page, but CC'ing Zach is easier than reading the code 8) If we're talking hardwar

Re: [PATCH] romsignature/checksum cleanup

2006-12-24 Thread Rene Herman
Rene Herman wrote: Use adding __init to romsignature() (it's only called from probe_roms() which is itself __init) as an excuse to submit a pedantic cleanup. Hmm, by the way, if romsignature() needs this probe_kernel_address() thing, why doesn't romchecksum()? (Rusty in CC as author of bd47

[PATCH] romsignature/checksum cleanup

2006-12-24 Thread Rene Herman
Hi Andrew. Use adding __init to romsignature() (it's only called from probe_roms() which is itself __init) as an excuse to submit a pedantic cleanup. Signed-off-by: Rene Herman <[EMAIL PROTECTED]> diff --git a/arch/i386/kernel/e820.c b/arch/i386/kernel/e820.c index f391abc..2565fac 100644 ---