* [uml-devel] [patch 1/9] uml: fix lvalue for gcc4
@ 2005-07-13 18:02 blaisorblade
2005-07-13 21:29 ` [uml-devel] " Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: blaisorblade @ 2005-07-13 18:02 UTC (permalink / raw)
To: akpm; +Cc: jdike, linux-kernel, user-mode-linux-devel, blaisorblade,
rmk+lkml
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>, Russell King <rmk+lkml@arm.linux.org.uk>
This construct is refused by GCC 4, so here's the (corrected) fix. Thanks to
Russell for noticing a stupid mistake I did when first sending this.
As he noted, the code is largely suboptimal however it currently works, and
will be fixed shortly. Just read the access_ok check on
fp which is NULL, or the pointer arithmetic below which should be done with a
cast to void*:
frame = (struct rt_sigframe __user *)
round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8;
The code shows clearly that has been taken from
arch/x86_64/kernel/signal.c:setup_rt_frame(), maybe in a bit of a hurry.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---
linux-2.6.git-broken-paolo/arch/um/sys-x86_64/signal.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
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-broken/arch/um/sys-x86_64/signal.c~uml-fix-for-gcc4-lvalue 2005-07-13 19:30:43.000000000 +0200
+++ linux-2.6.git-broken-paolo/arch/um/sys-x86_64/signal.c 2005-07-13 19:30:44.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);
if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate)))
goto out;
_
-------------------------------------------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [uml-devel] Re: [patch 1/9] uml: fix lvalue for gcc4
2005-07-13 18:02 [uml-devel] [patch 1/9] uml: fix lvalue for gcc4 blaisorblade
@ 2005-07-13 21:29 ` Andrew Morton
2005-07-13 22:17 ` Blaisorblade
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2005-07-13 21:29 UTC (permalink / raw)
To: blaisorblade; +Cc: jdike, linux-kernel, user-mode-linux-devel, rmk+lkml
Please identify which of these patches you consider to be 2.6.13 material.
-------------------------------------------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [uml-devel] Re: [patch 1/9] uml: fix lvalue for gcc4
2005-07-13 21:29 ` [uml-devel] " Andrew Morton
@ 2005-07-13 22:17 ` Blaisorblade
0 siblings, 0 replies; 3+ messages in thread
From: Blaisorblade @ 2005-07-13 22:17 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Andrew Morton, jdike, linux-kernel, rmk+lkml
On Wednesday 13 July 2005 23:29, Andrew Morton wrote:
> Please identify which of these patches you consider to be 2.6.13 material.
All ones are for 2.6.13... except this one, it's still wrong, I overlooked it
a bit too much, it must be replaced by this (I'll post it in a mail it if
needed):
http://user-mode-linux.sourceforge.net/work/current/2.6/2.6.12-mm2/patches/x86_64_compile
Bye
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-13 22:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-13 18:02 [uml-devel] [patch 1/9] uml: fix lvalue for gcc4 blaisorblade
2005-07-13 21:29 ` [uml-devel] " Andrew Morton
2005-07-13 22:17 ` Blaisorblade
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox