lkml.org 
[lkml]   [2008]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/19] UML - Tidy stub management code
From
On Mon, 28 Apr 2008, Jeff Dike wrote:

> On Sat, Apr 26, 2008 at 06:01:12PM +0800, WANG Cong wrote:
>> > + /*
>> > + * When the stub stops, we find the following values on the
>> > + * beginning of the stack:
>> > + * (long) return_value
>> > + * (long) offset to failed sycall data (0 if no error)
>> > + */
>> > + ret = *((unsigned long *) stack);
>>
>>
>> I am afraid the value will be truncated on 64bit machine, since
>> 'ret' is 'int' while 'stack' points to an 'unsigned long'.
>>
>> Is this expected?
>
> That's dubious, but I don't think it breaks anything. On LE, *(int *)
> and *(long *) will give you the same answer, and the value here is an
> error code, which fits into 32 bits.

So it's safe here.

OK. Thanks!

--
Hi, I'm a .signature virus, please copy/paste me to help me spread
all over the world.


\
 
 \ /
  Last update: 2008-04-29 10:01    [W:0.037 / U:1.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site