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

Glauber de Oliveira Costa glommer at gmail.com
Fri Aug 31 03:00:59 EST 2007


On 8/30/07, Rusty Russell <rusty at rustcorp.com.au> wrote:
> 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.
>
We'd have to test it to be 100 % sure, but Jes talked to us even
before posting the patch, and as we also do use long instead of uxx
for most of our stuff, it seems fine from our POV.

-- 
Glauber de Oliveira Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."



More information about the Lguest mailing list