* [parisc-linux] k-2.6.0-test2-pa0: __canonicalize_f_f_c patch
@ 2003-07-28 14:30 Joel Soete
2003-07-28 16:10 ` Matthew Wilcox
2003-08-02 8:11 ` Jan-Benedict Glaw
0 siblings, 2 replies; 5+ messages in thread
From: Joel Soete @ 2003-07-28 14:30 UTC (permalink / raw)
To: Grant Grundler; +Cc: parisc-linux
Hi Grant,
Here is your patch forward-port to 2.6.0-test2-pa0:
diff -NaurX dontdiff linux-2.6.0-test2-pa0/arch/parisc/kernel/parisc_ksyms.c
linux-2.6.0-test2-pax/arch/parisc/kernel/parisc_ksyms.c
--- linux-2.6.0-test2-pa0/arch/parisc/kernel/parisc_ksyms.c 2003-06-10 07:34:05.000000000
+0200
+++ linux-2.6.0-test2-pax/arch/parisc/kernel/parisc_ksyms.c 2003-07-28 13:22:48.000000000
+0200
@@ -122,10 +122,12 @@
extern off_t sys_lseek(int, off_t, int);
extern int sys_read(int, char *, int);
extern int sys_write(int, const char *, int);
+asmlinkage long sys_wait4(pid_t ,unsigned int *, int, struct rusage *);
EXPORT_SYMBOL(sys_open);
EXPORT_SYMBOL(sys_lseek);
EXPORT_SYMBOL(sys_read);
EXPORT_SYMBOL(sys_write);
+EXPORT_SYMBOL(sys_wait4);
#include <asm/semaphore.h>
EXPORT_SYMBOL(__up);
@@ -201,6 +203,9 @@
EXPORT_SYMBOL(__lshrdi3);
EXPORT_SYMBOL(__muldi3);
+asmlinkage void * __canonicalize_funcptr_for_compare(void *);
+EXPORT_SYMBOL_NOVERS(__canonicalize_funcptr_for_compare);
+
#ifdef __LP64__
extern void __divdi3(void);
extern void __udivdi3(void);
diff -NaurX dontdiff linux-2.6.0-test2-pa0/arch/parisc/kernel/real2.S linux-2.6.0-test2-pax/arch/parisc/kernel/real2.S
--- linux-2.6.0-test2-pa0/arch/parisc/kernel/real2.S 2003-07-14 19:36:03.000000000
+0200
+++ linux-2.6.0-test2-pax/arch/parisc/kernel/real2.S 2003-07-28 13:18:41.000000000
+0200
@@ -275,6 +275,7 @@
nop
#endif
+
.export pc_in_user_space
.text
/* Doesn't belong here but I couldn't find a nicer spot. */
@@ -283,3 +284,17 @@
bv,n 0(%rp)
nop
+
+ .export __canonicalize_funcptr_for_compare
+ .text
+ /* http://lists.parisc-linux.org/hypermail/parisc-linux/10916.html
+ ** GCC 3.3 and later has a new function in libgcc.a for
+ ** comparing function pointers.
+ */
+__canonicalize_funcptr_for_compare:
+#ifdef __LP64__
+ bve (%r2)
+#else
+ bv %r0(%r2)
+#endif
+ copy %r26,%r28
And also uaccess patch to avoid to obtain a wronb executable k (as for other
platform):
diff -NaurX dontdiff linux-2.6.0-test2-pa0/include/asm-parisc/uaccess.h linux-2.6.0-test2-pax/include/asm-parisc/uaccess.h
--- linux-2.6.0-test2-pa0/include/asm-parisc/uaccess.h 2003-01-13 08:42:40.000000000
+0100
+++ linux-2.6.0-test2-pax/include/asm-parisc/uaccess.h 2003-07-28 15:18:12.000000000
+0200
@@ -28,6 +28,11 @@
* that put_user is the same as __put_user, etc.
*/
+extern int __get_kernel_bad(void);
+extern int __get_user_bad(void);
+extern int __put_kernel_bad(void);
+extern int __put_user_bad(void);
+
#define access_ok(type,addr,size) (1)
#define verify_area(type,addr,size) (0)
@@ -35,8 +40,8 @@
#define get_user __get_user
#if BITS_PER_LONG == 32
-#define LDD_KERNEL(ptr) BUG()
-#define LDD_USER(ptr) BUG()
+#define LDD_KERNEL(ptr) __get_kernel_bad();
+#define LDD_USER(ptr) __get_user_bad();
#define STD_KERNEL(x, ptr) __put_kernel_asm64((u32)x,ptr)
#define STD_USER(x, ptr) __put_user_asm64((u32)x,ptr)
#else
@@ -72,7 +77,7 @@
case 2: __get_kernel_asm("ldh",ptr); break; \
case 4: __get_kernel_asm("ldw",ptr); break; \
case 8: LDD_KERNEL(ptr); break; \
- default: BUG(); break; \
+ default: __get_kernel_bad(); break; \
} \
} \
else { \
@@ -81,7 +86,7 @@
case 2: __get_user_asm("ldh",ptr); break; \
case 4: __get_user_asm("ldw",ptr); break; \
case 8: LDD_USER(ptr); break; \
- default: BUG(); break; \
+ default: __get_user_bad(); break; \
} \
} \
\
@@ -141,7 +146,7 @@
case 2: __put_kernel_asm("sth",x,ptr); break; \
case 4: __put_kernel_asm("stw",x,ptr); break; \
case 8: STD_KERNEL(x,ptr); break; \
- default: BUG(); break; \
+ default: __put_kernel_bad(); break; \
} \
} \
else { \
@@ -150,7 +155,7 @@
case 2: __put_user_asm("sth",x,ptr); break; \
case 4: __put_user_asm("stw",x,ptr); break; \
case 8: STD_USER(x,ptr); break; \
- default: BUG(); break; \
+ default: __put_user_bad(); break; \
} \
} \
\
Thanks in advance to ci,
Joel
------------------------------------------------------
Soldes Tiscali ADSL : 27,50 euros/mois jusque fin 2003.
On s'habitue vite à payer son ADSL moins cher!
Plus d'info? Cliquez ici... http://reg.tiscali.be/default.asp?lg=fr
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] k-2.6.0-test2-pa0: __canonicalize_f_f_c patch
2003-07-28 14:30 [parisc-linux] k-2.6.0-test2-pa0: __canonicalize_f_f_c patch Joel Soete
@ 2003-07-28 16:10 ` Matthew Wilcox
2003-07-28 21:22 ` Grant Grundler
2003-07-29 13:12 ` Joel Soete
2003-08-02 8:11 ` Jan-Benedict Glaw
1 sibling, 2 replies; 5+ messages in thread
From: Matthew Wilcox @ 2003-07-28 16:10 UTC (permalink / raw)
To: Joel Soete; +Cc: Grant Grundler, parisc-linux
On Mon, Jul 28, 2003 at 04:30:14PM +0200, Joel Soete wrote:
> diff -NaurX dontdiff linux-2.6.0-test2-pa0/arch/parisc/kernel/parisc_ksyms.c
> linux-2.6.0-test2-pax/arch/parisc/kernel/parisc_ksyms.c
> --- linux-2.6.0-test2-pa0/arch/parisc/kernel/parisc_ksyms.c 2003-06-10 07:34:05.000000000
> +0200
> +++ linux-2.6.0-test2-pax/arch/parisc/kernel/parisc_ksyms.c 2003-07-28 13:22:48.000000000
> +0200
> @@ -122,10 +122,12 @@
> extern off_t sys_lseek(int, off_t, int);
> extern int sys_read(int, char *, int);
> extern int sys_write(int, const char *, int);
> +asmlinkage long sys_wait4(pid_t ,unsigned int *, int, struct rusage *);
> EXPORT_SYMBOL(sys_open);
> EXPORT_SYMBOL(sys_lseek);
> EXPORT_SYMBOL(sys_read);
> EXPORT_SYMBOL(sys_write);
> +EXPORT_SYMBOL(sys_wait4);
>
> #include <asm/semaphore.h>
> EXPORT_SYMBOL(__up);
this bit seems unrelated; why do we need it?
> And also uaccess patch to avoid to obtain a wronb executable k (as for other
> platform):
> diff -NaurX dontdiff linux-2.6.0-test2-pa0/include/asm-parisc/uaccess.h linux-2.6.0-test2-pax/include/asm-parisc/uaccess.h
> --- linux-2.6.0-test2-pa0/include/asm-parisc/uaccess.h 2003-01-13 08:42:40.000000000
> +0100
> +++ linux-2.6.0-test2-pax/include/asm-parisc/uaccess.h 2003-07-28 15:18:12.000000000
> +0200
> @@ -28,6 +28,11 @@
> * that put_user is the same as __put_user, etc.
> */
>
> +extern int __get_kernel_bad(void);
> +extern int __get_user_bad(void);
> +extern int __put_kernel_bad(void);
> +extern int __put_user_bad(void);
> +
> #define access_ok(type,addr,size) (1)
> #define verify_area(type,addr,size) (0)
>
> @@ -35,8 +40,8 @@
> #define get_user __get_user
>
> #if BITS_PER_LONG == 32
> -#define LDD_KERNEL(ptr) BUG()
> -#define LDD_USER(ptr) BUG()
> +#define LDD_KERNEL(ptr) __get_kernel_bad();
> +#define LDD_USER(ptr) __get_user_bad();
> #define STD_KERNEL(x, ptr) __put_kernel_asm64((u32)x,ptr)
> #define STD_USER(x, ptr) __put_user_asm64((u32)x,ptr)
> #else
> @@ -72,7 +77,7 @@
> case 2: __get_kernel_asm("ldh",ptr); break; \
> case 4: __get_kernel_asm("ldw",ptr); break; \
> case 8: LDD_KERNEL(ptr); break; \
> - default: BUG(); break; \
> + default: __get_kernel_bad(); break; \
> } \
> } \
> else { \
> @@ -81,7 +86,7 @@
> case 2: __get_user_asm("ldh",ptr); break; \
> case 4: __get_user_asm("ldw",ptr); break; \
> case 8: LDD_USER(ptr); break; \
> - default: BUG(); break; \
> + default: __get_user_bad(); break; \
> } \
> } \
> \
> @@ -141,7 +146,7 @@
> case 2: __put_kernel_asm("sth",x,ptr); break; \
> case 4: __put_kernel_asm("stw",x,ptr); break; \
> case 8: STD_KERNEL(x,ptr); break; \
> - default: BUG(); break; \
> + default: __put_kernel_bad(); break; \
> } \
> } \
> else { \
> @@ -150,7 +155,7 @@
> case 2: __put_user_asm("sth",x,ptr); break; \
> case 4: __put_user_asm("stw",x,ptr); break; \
> case 8: STD_USER(x,ptr); break; \
> - default: BUG(); break; \
> + default: __put_user_bad(); break; \
> } \
> } \
> \
i like this one.
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] k-2.6.0-test2-pa0: __canonicalize_f_f_c patch
2003-07-28 16:10 ` Matthew Wilcox
@ 2003-07-28 21:22 ` Grant Grundler
2003-07-29 13:12 ` Joel Soete
1 sibling, 0 replies; 5+ messages in thread
From: Grant Grundler @ 2003-07-28 21:22 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: Joel Soete, Grant Grundler, parisc-linux
On Mon, Jul 28, 2003 at 05:10:43PM +0100, Matthew Wilcox wrote:
> > +EXPORT_SYMBOL(sys_wait4);
>
> this bit seems unrelated; why do we need it?
It was missing in 2.4 module builds...but silly me can't find
which 2.4.21 module (*.o)...*sigh*.
Maybe my favorite other arches just confused me:
grundler@gsyprf11:/usr/src/2.4.21$ find -name '*.[chS]' | xargs fgrep
sys_wait4 | fgrep EXPORT
./arch/alpha/kernel/alpha_ksyms.c:EXPORT_SYMBOL(sys_wait4);
./arch/arm/kernel/armksyms.c:EXPORT_SYMBOL(sys_wait4);
./arch/parisc/kernel/parisc_ksyms.c:EXPORT_SYMBOL(sys_wait4);
./arch/x86_64/kernel/x8664_ksyms.c:EXPORT_SYMBOL(sys_wait4);
It's possible this is deprecated.
thanks,
grant
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] k-2.6.0-test2-pa0: __canonicalize_f_f_c patch
2003-07-28 16:10 ` Matthew Wilcox
2003-07-28 21:22 ` Grant Grundler
@ 2003-07-29 13:12 ` Joel Soete
1 sibling, 0 replies; 5+ messages in thread
From: Joel Soete @ 2003-07-29 13:12 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: Grant Grundler, parisc-linux
Hi Willy,
> diff -NaurX dontdiff linux-2.6.0-test2-pa0/include/asm-parisc/uaccess.h
linux-2.6.0-test2-pax/include/asm-parisc/uaccess.h
[...]
>i like this one.
Thanks (that one I suggest a time ago <http://lists.parisc-linux.org/pipermail/parisc-linux/2002-October/018116.html>
just not ci (forget :))
By the you answer's this
<http://lists.parisc-linux.org/pipermail/parisc-linux/2002-October/018118.html>
any news about this?
Thanks a lot,
Joel
------------------------------------------------------
Soldes Tiscali ADSL : 27,50 euros/mois jusque fin 2003.
On s'habitue vite à payer son ADSL moins cher!
Plus d'info? Cliquez ici... http://reg.tiscali.be/default.asp?lg=fr
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [parisc-linux] k-2.6.0-test2-pa0: __canonicalize_f_f_c patch
2003-07-28 14:30 [parisc-linux] k-2.6.0-test2-pa0: __canonicalize_f_f_c patch Joel Soete
2003-07-28 16:10 ` Matthew Wilcox
@ 2003-08-02 8:11 ` Jan-Benedict Glaw
1 sibling, 0 replies; 5+ messages in thread
From: Jan-Benedict Glaw @ 2003-08-02 8:11 UTC (permalink / raw)
To: parisc-linux
[-- Attachment #1: Type: text/plain, Size: 1111 bytes --]
On Mon, 2003-07-28 16:30:14 +0200, Joel Soete <jsoe0708@tiscali.be>
wrote in message <3F056E95000057BB@ocpmta4.freegates.net>:
Hi!
> +
> + .export __canonicalize_funcptr_for_compare
> + .text
> + /* http://lists.parisc-linux.org/hypermail/parisc-linux/10916.html
> + ** GCC 3.3 and later has a new function in libgcc.a for
> + ** comparing function pointers.
> + */
> +__canonicalize_funcptr_for_compare:
> +#ifdef __LP64__
> + bve (%r2)
> +#else
> + bv %r0(%r2)
> +#endif
> + copy %r26,%r28
Is this now checked in? At my last cvs update
(:pserver:anonymous@cvs.parisc-linux.org/var/cvs, linux-2.5), this
hasn't shown up...
By the way, is anybody here going to go to Oldenburg(.de) to join the
developer's meeting[1]?
MfG, JBG
[1] http://oldenburger.linuxtage.de/devel.html
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak!
ret = do_actions((curr | FREE_SPEECH) & ~(IRAQ_WAR_2 | DRM | TCPA));
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-08-02 8:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-28 14:30 [parisc-linux] k-2.6.0-test2-pa0: __canonicalize_f_f_c patch Joel Soete
2003-07-28 16:10 ` Matthew Wilcox
2003-07-28 21:22 ` Grant Grundler
2003-07-29 13:12 ` Joel Soete
2003-08-02 8:11 ` Jan-Benedict Glaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox