Re: [PATCH] fix for futex_wait signal stack corruption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, 4 Dec 2007, Steven Rostedt wrote:
> 
> Seems that arg3 is not used here and since the timer is 64 bits, we can
> store the bottom 32 bits in arg2 and the top in arg3 (this will work for
> both 32 and 64 bit archs).

Yes. That should work fine.

The restart logic sometimes results in odd calling conventions, and quite 
frankly, we could just change how "restart_block" looks too. There is 
nothing that says that it has to be

	unsigned long arg0, arg1, arg2, arg3

and that particular layout was just picked on a whim. The only issue is:

 - we don't want the restart block to be *too* large, since it's part of 
   the thread info.
 - but we need to have enough room for all the system calls that want to 
   use the restart block, and preferably in a reasonable format.

So far, using "unsigned long" has been good enough, in that it's big 
enough for a pointer and all normal arguments, but if something really 
deeply wants another format or a guaranteed 64-bit word regardless of 
architecture, we could make one or more of the arguments be "u64" instead.

But in this case, since there is already unused argument space, I think 
that doing the "32 high bits + 32 low bits" is probably the best option.

			Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux