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

Steven Rostedt srostedt at redhat.com
Fri Aug 31 03:41:32 EST 2007


Glauber de Oliveira Costa wrote:
> 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.
> 
We also need to take into account running this from a 32 bit userspace.
So I'll take a better look at it.

I have a box that I run all the apps in 32 with a 64 bit kernel.  But we 
are a ways from getting that to work.

-- Steve




More information about the Lguest mailing list