On Saturday 09 July 2005 13:07, Russell King wrote: > On Sat, Jul 09, 2005 at 01:01:33PM +0200, [EMAIL PROTECTED] wrote: > > diff -puN arch/um/sys-x86_64/signal.c~uml-fix-for-gcc4-lvalue > > arch/um/sys-x86_64/signal.c --- > > linux-2.6.git/arch/um/sys-x86_64/signal.c~uml-fix-for-gcc4-lvalue 2005-07 > >-09 13:01:03.000000000 +0200 +++ > > linux-2.6.git-paolo/arch/um/sys-x86_64/signal.c 2005-07-09 > > 13:01:03.000000000 +0200 @@ -168,7 +168,7 @@ int > > setup_signal_stack_si(unsigned long > > > > frame = (struct rt_sigframe __user *) > > round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; > > - ((unsigned char *) frame) -= 128; > > + frame -= 128 / sizeof(frame); > > Are you sure these two are identical? SOOOOOOOOORRY, I've become crazy, I meant sizeof(*frame)... thanks for noticing.
> The above code fragment looks suspicious anyway, particularly: > > frame = (struct rt_sigframe __user *) > round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; > > which will put the frame at 8 * sizeof(struct rt_sigframe) below > the point which round_down() would return (which would be 1 struct > rt_sigframe below stack_top, rounded down). You're completely right. The code is copied from arch/x86_64/kernel/signal.c:setup_rt_frame(), so it should make some sense; but in the source, the cast is to (void*). Surely Jeff, seeing that the result is assigned to a struct rt_sigframe __user, "fixed" it. The line I'm patching is new from Jeff, and I don't know what's about (I just remember that Also, the below access_ok() called on fp (which is still NULL) is surely completely wrong, though it won't fail (after all, NULL is under TASK_SIZE. right?). On x86_64 the code is always used from arch/um/kernel/signal_kern.c, since CONFIG_whatever is not enabled. -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel