[Lguest] [patch] u32 pointer nightmare .....

Rusty Russell rusty at rustcorp.com.au
Fri Aug 31 02:57:31 EST 2007


On Thu, 2007-08-30 at 15:28 +0200, Jes Sorensen wrote:
> Oh horror!
> 
> Why, oh why, did I start looking at this right after my lunch?
> 
> This is a starting attempt at apply a clue 2x4 to the horror of lguest's
> user<->kernel API abusing u32s for pointer storage. We should be using
> unsigned long for all data words passed back and forth for two reasons:
> a) pointers are not safe in 32 bit words, b) mis-aligned data words.
> 
> I think I didn't break anything in the process, but your mileage may
> vary!

It was explicit, actually.  I wasn't sure we want to insist that
userspace long == kernel long.  But given the nature of lguest, that
might be fine.

Just want to check that the x86-64 people are happy with this fix.

Rusty.




More information about the Lguest mailing list