* [PATCH][COMPAT] compat_sys_futex 1/7 generic
@ 2003-02-12 4:47 Stephen Rothwell
2003-02-12 4:51 ` [PATCH][COMPAT] compat_sys_futex 2/7 ia64 Stephen Rothwell
` (7 more replies)
0 siblings, 8 replies; 13+ messages in thread
From: Stephen Rothwell @ 2003-02-12 4:47 UTC (permalink / raw)
To: Linus
Cc: LKML, anton, David S. Miller, ak, davidm, schwidefsky, ralf, matthew
Hi Linus,
This patch creates compat_sys_futex and changes the 64 bit architextures
to use it. This also changes sys_futex to take a "u32 *" as its first
argument as discussed with Rusty and yourself.
This is just the generic part of the patch. The architecture specific
parts will follow.
There is no mip64 part as the mips port currently does not support
sys_futex.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.5.60-32bit.1/kernel/compat.c 2.5.60-32bit.2/kernel/compat.c
--- 2.5.60-32bit.1/kernel/compat.c 2003-01-17 14:01:08.000000000 +1100
+++ 2.5.60-32bit.2/kernel/compat.c 2003-02-11 12:21:56.000000000 +1100
@@ -208,3 +208,19 @@
ret = put_user(s, oset);
return ret;
}
+
+extern long do_futex(u32 *, int, int, struct timespec *);
+
+asmlinkage long compat_sys_futex(u32 *uaddr, int op, int val,
+ struct compat_timespec *ct)
+{
+ struct timespec *ts = NULL;
+ struct timespec t;
+
+ if ((op == FUTEX_WAIT) && ct) {
+ if (get_compat_timespec(&t, ct))
+ return -EFAULT;
+ ts = &t;
+ }
+ return do_futex((unsigned long)uaddr, op, val, ts);
+}
diff -ruN 2.5.60-32bit.1/kernel/futex.c 2.5.60-32bit.2/kernel/futex.c
--- 2.5.60-32bit.1/kernel/futex.c 2002-11-28 10:34:59.000000000 +1100
+++ 2.5.60-32bit.2/kernel/futex.c 2003-02-11 12:21:56.000000000 +1100
@@ -318,17 +318,12 @@
static inline int futex_wait_utime(unsigned long uaddr,
int offset,
int val,
- struct timespec* utime)
+ struct timespec* ts)
{
unsigned long time = MAX_SCHEDULE_TIMEOUT;
- if (utime) {
- struct timespec t;
- if (copy_from_user(&t, utime, sizeof(t)) != 0)
- return -EFAULT;
- time = timespec_to_jiffies(&t) + 1;
- }
-
+ if (ts)
+ time = timespec_to_jiffies(ts) + 1;
return futex_wait(uaddr, offset, val, time);
}
@@ -437,7 +432,7 @@
return ret;
}
-asmlinkage int sys_futex(unsigned long uaddr, int op, int val, struct timespec *utime)
+long do_futex(unsigned long uaddr, int op, int val, struct timespec *ts)
{
unsigned long pos_in_page;
int ret;
@@ -445,12 +440,12 @@
pos_in_page = uaddr % PAGE_SIZE;
/* Must be "naturally" aligned */
- if (pos_in_page % sizeof(int))
+ if (pos_in_page % sizeof(u32))
return -EINVAL;
switch (op) {
case FUTEX_WAIT:
- ret = futex_wait_utime(uaddr, pos_in_page, val, utime);
+ ret = futex_wait_utime(uaddr, pos_in_page, val, ts);
break;
case FUTEX_WAKE:
ret = futex_wake(uaddr, pos_in_page, val);
@@ -465,6 +460,19 @@
return ret;
}
+asmlinkage long sys_futex(u32 *uaddr, int op, int val, struct timespec *utime)
+{
+ struct timespec *ts = NULL;
+ struct timespec t;
+
+ if ((op == FUTEX_WAIT) && utime) {
+ if (copy_from_user(&t, utime, sizeof(t)) != 0)
+ return -EFAULT;
+ ts = &t;
+ }
+ return do_futex((unsigned long)uaddr, op, val, ts);
+}
+
static struct super_block *
futexfs_get_sb(struct file_system_type *fs_type,
int flags, char *dev_name, void *data)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH][COMPAT] compat_sys_futex 2/7 ia64
2003-02-12 4:47 [PATCH][COMPAT] compat_sys_futex 1/7 generic Stephen Rothwell
@ 2003-02-12 4:51 ` Stephen Rothwell
2003-02-12 4:55 ` [PATCH][COMPAT] compat_sys_futex 3/7 parisc Stephen Rothwell
` (6 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Stephen Rothwell @ 2003-02-12 4:51 UTC (permalink / raw)
To: David Mosberger; +Cc: LKML, Linus
Hi David,
Here is the ia64 part of the patch. I needed to expand the ia32 syscall
table as the syscall number for sys_futex on ia32 is 240. I hope I guessed
correctly :-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.5.60-32bit.1/arch/ia64/ia32/ia32_entry.S 2.5.60-32bit.2/arch/ia64/ia32/ia32_entry.S
--- 2.5.60-32bit.1/arch/ia64/ia32/ia32_entry.S 2003-02-11 09:39:10.000000000 +1100
+++ 2.5.60-32bit.2/arch/ia64/ia32/ia32_entry.S 2003-02-11 12:21:56.000000000 +1100
@@ -428,6 +428,26 @@
data8 sys_ni_syscall
data8 sys_ni_syscall
data8 sys_ni_syscall
+ data8 sys_ni_syscall /* 230 */
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall /* 235 */
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 compat_sys_futex /* 240 */
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall /* 245 */
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
/*
* CAUTION: If any system calls are added beyond this point
* then the check in `arch/ia64/kernel/ivt.S' will have
diff -ruN 2.5.60-32bit.1/arch/ia64/kernel/ivt.S 2.5.60-32bit.2/arch/ia64/kernel/ivt.S
--- 2.5.60-32bit.1/arch/ia64/kernel/ivt.S 2003-02-11 09:39:11.000000000 +1100
+++ 2.5.60-32bit.2/arch/ia64/kernel/ivt.S 2003-02-11 12:21:56.000000000 +1100
@@ -848,7 +848,7 @@
alloc r15=ar.pfs,0,0,6,0 // must first in an insn group
;;
ld4 r8=[r14],8 // r8 == eax (syscall number)
- mov r15=230 // number of entries in ia32 system call table
+ mov r15=250 // number of entries in ia32 system call table
;;
cmp.ltu.unc p6,p7=r8,r15
ld4 out1=[r14],8 // r9 == ecx
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH][COMPAT] compat_sys_futex 3/7 parisc
2003-02-12 4:47 [PATCH][COMPAT] compat_sys_futex 1/7 generic Stephen Rothwell
2003-02-12 4:51 ` [PATCH][COMPAT] compat_sys_futex 2/7 ia64 Stephen Rothwell
@ 2003-02-12 4:55 ` Stephen Rothwell
2003-02-12 4:57 ` [PATCH][COMPAT] compat_sys_futex 4/7 ppc64 Stephen Rothwell
` (5 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Stephen Rothwell @ 2003-02-12 4:55 UTC (permalink / raw)
To: Linus; +Cc: LKML, matthew
Hi Linus,
Here is the parisc part of the patch since Willy asked me to send them
directly to you.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.5.60-32bit.1/arch/parisc/kernel/syscall.S 2.5.60-32bit.2/arch/parisc/kernel/syscall.S
--- 2.5.60-32bit.1/arch/parisc/kernel/syscall.S 2003-02-11 09:39:14.000000000 +1100
+++ 2.5.60-32bit.2/arch/parisc/kernel/syscall.S 2003-02-11 12:21:56.000000000 +1100
@@ -320,7 +320,8 @@
#ifdef __LP64__
/* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and
* narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific
- * implementation is required on wide palinux.
+ * implementation is required on wide palinux. Use ENTRY_COMP where
+ * the compatability layer has a useful 32-bit implementation.
*/
#define ENTRY_SAME(_name_) .dword sys_##_name_
#define ENTRY_DIFF(_name_) .dword sys32_##_name_
@@ -597,7 +598,7 @@
ENTRY_SAME(ni_syscall) /* tkill */
ENTRY_SAME(sendfile64)
- ENTRY_SAME(futex) /* 210 */
+ ENTRY_COMP(futex) /* 210 */
ENTRY_SAME(sched_setaffinity)
ENTRY_SAME(sched_getaffinity)
ENTRY_SAME(set_thread_area)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH][COMPAT] compat_sys_futex 4/7 ppc64
2003-02-12 4:47 [PATCH][COMPAT] compat_sys_futex 1/7 generic Stephen Rothwell
2003-02-12 4:51 ` [PATCH][COMPAT] compat_sys_futex 2/7 ia64 Stephen Rothwell
2003-02-12 4:55 ` [PATCH][COMPAT] compat_sys_futex 3/7 parisc Stephen Rothwell
@ 2003-02-12 4:57 ` Stephen Rothwell
2003-02-12 5:00 ` [PATCH][COMPAT] compat_sys_futex 5/7 s390x Stephen Rothwell
` (4 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Stephen Rothwell @ 2003-02-12 4:57 UTC (permalink / raw)
To: Linus; +Cc: LKML, anton
Hi Linus,
Anton asked me to send this directly to you since it is so trivial.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.5.60-32bit.1/arch/ppc64/kernel/misc.S 2.5.60-32bit.2/arch/ppc64/kernel/misc.S
--- 2.5.60-32bit.1/arch/ppc64/kernel/misc.S 2003-02-11 09:39:15.000000000 +1100
+++ 2.5.60-32bit.2/arch/ppc64/kernel/misc.S 2003-02-11 12:21:56.000000000 +1100
@@ -724,7 +724,7 @@
.llong .sys_removexattr
.llong .sys_lremovexattr
.llong .sys_fremovexattr /* 220 */
- .llong .sys_futex
+ .llong .compat_sys_futex
.llong .sys32_sched_setaffinity
.llong .sys32_sched_getaffinity
.llong .sys_ni_syscall
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH][COMPAT] compat_sys_futex 5/7 s390x
2003-02-12 4:47 [PATCH][COMPAT] compat_sys_futex 1/7 generic Stephen Rothwell
` (2 preceding siblings ...)
2003-02-12 4:57 ` [PATCH][COMPAT] compat_sys_futex 4/7 ppc64 Stephen Rothwell
@ 2003-02-12 5:00 ` Stephen Rothwell
2003-02-12 5:06 ` [PATCH][COMPAT] compat_sys_futex 6/7 sparc64 Stephen Rothwell
` (3 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Stephen Rothwell @ 2003-02-12 5:00 UTC (permalink / raw)
To: Linus; +Cc: LKML, Martin Schwidefsky
Hi Linus,
Here is the s390x part of the patch. Hopefully Martin still wants me to
send these to you.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.5.60-32bit.1/arch/s390x/kernel/entry.S 2.5.60-32bit.2/arch/s390x/kernel/entry.S
--- 2.5.60-32bit.1/arch/s390x/kernel/entry.S 2003-01-17 14:01:01.000000000 +1100
+++ 2.5.60-32bit.2/arch/s390x/kernel/entry.S 2003-02-11 12:21:56.000000000 +1100
@@ -629,7 +629,7 @@
.long SYSCALL(sys_fremovexattr,sys32_fremovexattr_wrapper) /* 235 */
.long SYSCALL(sys_gettid,sys_gettid)
.long SYSCALL(sys_tkill,sys_tkill)
- .long SYSCALL(sys_futex,sys32_futex_wrapper)
+ .long SYSCALL(sys_futex,compat_sys_futex_wrapper)
.long SYSCALL(sys_sched_setaffinity,sys32_sched_setaffinity_wrapper)
.long SYSCALL(sys_sched_getaffinity,sys32_sched_getaffinity_wrapper) /* 240 */
.long SYSCALL(sys_ni_syscall,sys_ni_syscall)
diff -ruN 2.5.60-32bit.1/arch/s390x/kernel/linux32.c 2.5.60-32bit.2/arch/s390x/kernel/linux32.c
--- 2.5.60-32bit.1/arch/s390x/kernel/linux32.c 2003-02-11 09:39:17.000000000 +1100
+++ 2.5.60-32bit.2/arch/s390x/kernel/linux32.c 2003-02-11 12:21:56.000000000 +1100
@@ -4049,28 +4049,6 @@
return ret;
}
-asmlinkage int
-sys_futex(void *uaddr, int op, int val, struct timespec *utime);
-
-asmlinkage int
-sys32_futex(void *uaddr, int op, int val,
- struct compat_timespec *timeout32)
-{
- struct timespec tmp;
- mm_segment_t old_fs;
- int ret;
-
- if (timeout32 && get_compat_timespec(&tmp, timeout32))
- return -EINVAL;
-
- old_fs = get_fs();
- set_fs(KERNEL_DS);
- ret = sys_futex(uaddr, op, val, timeout32 ? &tmp : NULL);
- set_fs(old_fs);
-
- return ret;
-}
-
asmlinkage ssize_t sys_read(unsigned int fd, char * buf, size_t count);
asmlinkage compat_ssize_t sys32_read(unsigned int fd, char * buf, size_t count)
diff -ruN 2.5.60-32bit.1/arch/s390x/kernel/wrapper32.S 2.5.60-32bit.2/arch/s390x/kernel/wrapper32.S
--- 2.5.60-32bit.1/arch/s390x/kernel/wrapper32.S 2003-01-17 14:01:01.000000000 +1100
+++ 2.5.60-32bit.2/arch/s390x/kernel/wrapper32.S 2003-02-11 12:21:56.000000000 +1100
@@ -1088,13 +1088,13 @@
llgfr %r4,%r4 # long
jg sys32_fstat64 # branch to system call
- .globl sys32_futex_wrapper
-sys32_futex_wrapper:
- llgtr %r2,%r2 # void *
+ .globl compat_sys_futex_wrapper
+compat_sys_futex_wrapper:
+ llgtr %r2,%r2 # u32 *
lgfr %r3,%r3 # int
lgfr %r4,%r4 # int
- llgtr %r5,%r5 # struct timespec *
- jg sys32_futex # branch to system call
+ llgtr %r5,%r5 # struct compat_timespec *
+ jg compat_sys_futex # branch to system call
.globl sys32_setxattr_wrapper
sys32_setxattr_wrapper:
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH][COMPAT] compat_sys_futex 6/7 sparc64
2003-02-12 4:47 [PATCH][COMPAT] compat_sys_futex 1/7 generic Stephen Rothwell
` (3 preceding siblings ...)
2003-02-12 5:00 ` [PATCH][COMPAT] compat_sys_futex 5/7 s390x Stephen Rothwell
@ 2003-02-12 5:06 ` Stephen Rothwell
2003-02-12 5:09 ` [PATCH][COMPAT] compat_sys_futex 7/7 x86_64 Stephen Rothwell
` (2 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Stephen Rothwell @ 2003-02-12 5:06 UTC (permalink / raw)
To: Dave Miller; +Cc: LKML, Linus
Hi Dave,
Here is tha sparc64 part of the patch.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.5.60-32bit.1/arch/sparc64/kernel/systbls.S 2.5.60-32bit.2/arch/sparc64/kernel/systbls.S
--- 2.5.60-32bit.1/arch/sparc64/kernel/systbls.S 2003-02-11 12:21:29.000000000 +1100
+++ 2.5.60-32bit.2/arch/sparc64/kernel/systbls.S 2003-02-11 12:21:56.000000000 +1100
@@ -47,7 +47,7 @@
.word sys_nis_syscall, sys32_setreuid16, sys32_setregid16, sys_rename, sys_truncate
/*130*/ .word sys_ftruncate, sys_flock, sys_lstat64, sys_nis_syscall, sys_nis_syscall
.word sys_nis_syscall, sys_mkdir, sys_rmdir, sys32_utimes, sys_stat64
-/*140*/ .word sys32_sendfile64, sys_nis_syscall, sys_futex, sys_gettid, sys32_getrlimit
+/*140*/ .word sys32_sendfile64, sys_nis_syscall, compat_sys_futex, sys_gettid, sys32_getrlimit
.word sys32_setrlimit, sys_pivot_root, sys32_prctl, sys32_pciconfig_read, sys32_pciconfig_write
/*150*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64
.word sys32_fcntl64, sys_ni_syscall, compat_sys_statfs, compat_sys_fstatfs, sys_oldumount
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH][COMPAT] compat_sys_futex 7/7 x86_64
2003-02-12 4:47 [PATCH][COMPAT] compat_sys_futex 1/7 generic Stephen Rothwell
` (4 preceding siblings ...)
2003-02-12 5:06 ` [PATCH][COMPAT] compat_sys_futex 6/7 sparc64 Stephen Rothwell
@ 2003-02-12 5:09 ` Stephen Rothwell
2003-02-13 3:28 ` Stephen Rothwell
2003-02-12 5:26 ` [PATCH][COMPAT] compat_sys_futex 1/7 generic Linus Torvalds
2003-02-15 13:51 ` [PATCH][COMPAT] compat_sys_futex 1/3 generic, parisc, ppc64, s390x and x86_64 Stephen Rothwell
7 siblings, 1 reply; 13+ messages in thread
From: Stephen Rothwell @ 2003-02-12 5:09 UTC (permalink / raw)
To: Linus; +Cc: LKML, Andi Kleen
Hi Linus,
As per Andi's wishes, here is the x86_64 part of the patch. This one will
only apply after applying my previous patch "[PATCH][COMPAT] outstanding
compatibility changes 4/4 x86_64".
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.5.60-32bit.1/arch/x86_64/ia32/ia32entry.S 2.5.60-32bit.2/arch/x86_64/ia32/ia32entry.S
--- 2.5.60-32bit.1/arch/x86_64/ia32/ia32entry.S 2003-02-11 12:21:29.000000000 +1100
+++ 2.5.60-32bit.2/arch/x86_64/ia32/ia32entry.S 2003-02-11 12:21:56.000000000 +1100
@@ -440,7 +440,7 @@
.quad sys_fremovexattr
.quad sys_tkill /* 238 */
.quad sys_sendfile64
- .quad sys32_futex /* 240 */
+ .quad compay_sys_futex /* 240 */
.quad sys32_sched_setaffinity
.quad sys32_sched_getaffinity
.quad sys_set_thread_area
diff -ruN 2.5.60-32bit.1/arch/x86_64/ia32/sys_ia32.c 2.5.60-32bit.2/arch/x86_64/ia32/sys_ia32.c
--- 2.5.60-32bit.1/arch/x86_64/ia32/sys_ia32.c 2003-02-11 12:21:29.000000000 +1100
+++ 2.5.60-32bit.2/arch/x86_64/ia32/sys_ia32.c 2003-02-11 12:21:56.000000000 +1100
@@ -2199,26 +2199,6 @@
return err;
}
-extern int sys_futex(unsigned long uaddr, int op, int val, struct timespec *t);
-
-asmlinkage long
-sys32_futex(unsigned long uaddr, int op, int val, struct compat_timespec *utime32)
-{
- struct timespec t;
- mm_segment_t oldfs = get_fs();
- int err;
-
- if (utime32 && get_compat_timespec(&t, utime32))
- return -EFAULT;
-
- /* the set_fs is safe because futex doesn't use the seg limit
- for valid page checking of uaddr. */
- set_fs(KERNEL_DS);
- err = sys_futex(uaddr, op, val, utime32 ? &t : NULL);
- set_fs(oldfs);
- return err;
-}
-
extern long sys_io_setup(unsigned nr_reqs, aio_context_t *ctx);
long sys32_io_setup(unsigned nr_reqs, u32 *ctx32p)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH][COMPAT] compat_sys_futex 1/7 generic
2003-02-12 4:47 [PATCH][COMPAT] compat_sys_futex 1/7 generic Stephen Rothwell
` (5 preceding siblings ...)
2003-02-12 5:09 ` [PATCH][COMPAT] compat_sys_futex 7/7 x86_64 Stephen Rothwell
@ 2003-02-12 5:26 ` Linus Torvalds
2003-02-12 6:28 ` Stephen Rothwell
2003-02-15 13:51 ` [PATCH][COMPAT] compat_sys_futex 1/3 generic, parisc, ppc64, s390x and x86_64 Stephen Rothwell
7 siblings, 1 reply; 13+ messages in thread
From: Linus Torvalds @ 2003-02-12 5:26 UTC (permalink / raw)
To: Stephen Rothwell
Cc: LKML, anton, David S. Miller, ak, davidm, schwidefsky, ralf, matthew
On Wed, 12 Feb 2003, Stephen Rothwell wrote:
>
> This patch creates compat_sys_futex and changes the 64 bit architextures
> to use it. This also changes sys_futex to take a "u32 *" as its first
> argument as discussed with Rusty and yourself.
I'd prefer this much more if it just passed the timout around as jiffies
(unconditionally), instead of converting them from one type of timespec to
another, and then converting that other timespec to jiffies, and having
multiple tests for NULL because of all that conversion confusion.
In other words, make the do_futex() prototype be
extern long do_futex(u32 *, int, int, unsigned long);
and let all the callers simply do something like
unsigned long timeout = MAX_SCHEDULE_TIMEOUT;
if (utime) {
struct timespec ts;
if (copy_from_user(&ts, utime, sizeof(ts))
return -EFAULT;
timeout = timespec_to_jiffies(ts)+1;
}
do_futex(.. timeout);
instead. It's kind of silly to convert to kernel mode and carry around a
whole timespec, when the single actual _user_ doesn't even want one
anyway.
Hmm?
Linus
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH][COMPAT] compat_sys_futex 1/7 generic
2003-02-12 5:26 ` [PATCH][COMPAT] compat_sys_futex 1/7 generic Linus Torvalds
@ 2003-02-12 6:28 ` Stephen Rothwell
0 siblings, 0 replies; 13+ messages in thread
From: Stephen Rothwell @ 2003-02-12 6:28 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-kernel, anton, davem, ak, davidm, schwidefsky, ralf,
matthew, Rusty Russell
Hi Linus,
On Tue, 11 Feb 2003 21:26:54 -0800 (PST) Linus Torvalds <torvalds@transmeta.com> wrote:
>
> I'd prefer this much more if it just passed the timout around as jiffies
> (unconditionally), instead of converting them from one type of timespec to
> another, and then converting that other timespec to jiffies, and having
> multiple tests for NULL because of all that conversion confusion.
>
> Hmm?
How about this then. Just the generic part retransmitted.
/me mumbles "I will not ignore Rusty's suggestions ..."
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.5.60-32bit.1/kernel/compat.c 2.5.60-32bit.2/kernel/compat.c
--- 2.5.60-32bit.1/kernel/compat.c 2003-01-17 14:01:08.000000000 +1100
+++ 2.5.60-32bit.2/kernel/compat.c 2003-02-12 17:22:18.000000000 +1100
@@ -16,6 +16,7 @@
#include <linux/errno.h>
#include <linux/time.h>
#include <linux/signal.h>
+#include <linux/sched.h> /* for MAX_SCHEDULE_TIMEOUT */
#include <asm/uaccess.h>
@@ -208,3 +209,19 @@
ret = put_user(s, oset);
return ret;
}
+
+extern long do_futex(u32 *, int, int, unsigned long);
+
+asmlinkage long compat_sys_futex(u32 *uaddr, int op, int val,
+ struct compat_timespec *utime)
+{
+ struct timespec t;
+ unsigned long timeout = MAX_SCHEDULE_TIMEOUT;
+
+ if ((op == FUTEX_WAIT) && utime) {
+ if (get_compat_timespec(&t, utime))
+ return -EFAULT;
+ timeout = timespec_to_jiffies(t) + 1;
+ }
+ return do_futex((unsigned long)uaddr, op, val, timeout);
+}
diff -ruN 2.5.60-32bit.1/kernel/futex.c 2.5.60-32bit.2/kernel/futex.c
--- 2.5.60-32bit.1/kernel/futex.c 2002-11-28 10:34:59.000000000 +1100
+++ 2.5.60-32bit.2/kernel/futex.c 2003-02-12 17:18:36.000000000 +1100
@@ -315,23 +315,6 @@
return ret;
}
-static inline int futex_wait_utime(unsigned long uaddr,
- int offset,
- int val,
- struct timespec* utime)
-{
- unsigned long time = MAX_SCHEDULE_TIMEOUT;
-
- if (utime) {
- struct timespec t;
- if (copy_from_user(&t, utime, sizeof(t)) != 0)
- return -EFAULT;
- time = timespec_to_jiffies(&t) + 1;
- }
-
- return futex_wait(uaddr, offset, val, time);
-}
-
static int futex_close(struct inode *inode, struct file *filp)
{
struct futex_q *q = filp->private_data;
@@ -437,7 +420,7 @@
return ret;
}
-asmlinkage int sys_futex(unsigned long uaddr, int op, int val, struct timespec *utime)
+long do_futex(unsigned long uaddr, int op, int val, unsinged long timeout)
{
unsigned long pos_in_page;
int ret;
@@ -445,12 +428,12 @@
pos_in_page = uaddr % PAGE_SIZE;
/* Must be "naturally" aligned */
- if (pos_in_page % sizeof(int))
+ if (pos_in_page % sizeof(u32))
return -EINVAL;
switch (op) {
case FUTEX_WAIT:
- ret = futex_wait_utime(uaddr, pos_in_page, val, utime);
+ ret = futex_wait(uaddr, pos_in_page, val, timeout);
break;
case FUTEX_WAKE:
ret = futex_wake(uaddr, pos_in_page, val);
@@ -465,6 +448,20 @@
return ret;
}
+asmlinkage long sys_futex(u32 *uaddr, int op, int val, struct timespec *utime)
+{
+ struct timespec t;
+ unsigned long timeout = MAX_SCHEDULE_TIMEOUT;
+
+
+ if ((op == FUTEX_WAIT) && utime) {
+ if (copy_from_user(&t, utime, sizeof(t)) != 0)
+ return -EFAULT;
+ timeout = timespec_to_jiffies(t) + 1;
+ }
+ return do_futex((unsigned long)uaddr, op, val, timeout);
+}
+
static struct super_block *
futexfs_get_sb(struct file_system_type *fs_type,
int flags, char *dev_name, void *data)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH][COMPAT] compat_sys_futex 7/7 x86_64
2003-02-12 5:09 ` [PATCH][COMPAT] compat_sys_futex 7/7 x86_64 Stephen Rothwell
@ 2003-02-13 3:28 ` Stephen Rothwell
0 siblings, 0 replies; 13+ messages in thread
From: Stephen Rothwell @ 2003-02-13 3:28 UTC (permalink / raw)
To: Linus; +Cc: LKML, Andi Kleen, Troels Walsted Hansen
Hi Linus,
On Wed, 12 Feb 2003 16:09:05 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> As per Andi's wishes, here is the x86_64 part of the patch. This one will
> only apply after applying my previous patch "[PATCH][COMPAT] outstanding
> compatibility changes 4/4 x86_64".
Resent due to typo pointd out by Troels Walsted Hansen.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.5.60-2003021217-32bit.1/arch/x86_64/ia32/ia32entry.S 2.5.60-2003021217-32bit.2/arch/x86_64/ia32/ia32entry.S
--- 2.5.60-2003021217-32bit.1/arch/x86_64/ia32/ia32entry.S 2003-02-12 17:31:53.000000000 +1100
+++ 2.5.60-2003021217-32bit.2/arch/x86_64/ia32/ia32entry.S 2003-02-13 14:23:02.000000000 +1100
@@ -440,7 +440,7 @@
.quad sys_fremovexattr
.quad sys_tkill /* 238 */
.quad sys_sendfile64
- .quad sys32_futex /* 240 */
+ .quad compat_sys_futex /* 240 */
.quad sys32_sched_setaffinity
.quad sys32_sched_getaffinity
.quad sys_set_thread_area
diff -ruN 2.5.60-2003021217-32bit.1/arch/x86_64/ia32/sys_ia32.c 2.5.60-2003021217-32bit.2/arch/x86_64/ia32/sys_ia32.c
--- 2.5.60-2003021217-32bit.1/arch/x86_64/ia32/sys_ia32.c 2003-02-12 17:31:53.000000000 +1100
+++ 2.5.60-2003021217-32bit.2/arch/x86_64/ia32/sys_ia32.c 2003-02-12 17:42:31.000000000 +1100
@@ -2199,26 +2199,6 @@
return err;
}
-extern int sys_futex(unsigned long uaddr, int op, int val, struct timespec *t);
-
-asmlinkage long
-sys32_futex(unsigned long uaddr, int op, int val, struct compat_timespec *utime32)
-{
- struct timespec t;
- mm_segment_t oldfs = get_fs();
- int err;
-
- if (utime32 && get_compat_timespec(&t, utime32))
- return -EFAULT;
-
- /* the set_fs is safe because futex doesn't use the seg limit
- for valid page checking of uaddr. */
- set_fs(KERNEL_DS);
- err = sys_futex(uaddr, op, val, utime32 ? &t : NULL);
- set_fs(oldfs);
- return err;
-}
-
extern long sys_io_setup(unsigned nr_reqs, aio_context_t *ctx);
long sys32_io_setup(unsigned nr_reqs, u32 *ctx32p)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH][COMPAT] compat_sys_futex 1/3 generic, parisc, ppc64, s390x and x86_64
2003-02-12 4:47 [PATCH][COMPAT] compat_sys_futex 1/7 generic Stephen Rothwell
` (6 preceding siblings ...)
2003-02-12 5:26 ` [PATCH][COMPAT] compat_sys_futex 1/7 generic Linus Torvalds
@ 2003-02-15 13:51 ` Stephen Rothwell
2003-02-15 13:55 ` [PATCH][COMPAT] compat_sys_futex 2/3 ia64 Stephen Rothwell
2003-02-15 13:58 ` [PATCH][COMPAT] compat_sys_futex 3/3 sparc64 Stephen Rothwell
7 siblings, 2 replies; 13+ messages in thread
From: Stephen Rothwell @ 2003-02-15 13:51 UTC (permalink / raw)
To: Linus; +Cc: linux-kernel, anton, davem, ak, davidm, schwidefsky, ralf, matthew
Hi Linus,
On Wed, 12 Feb 2003 15:47:16 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> This patch creates compat_sys_futex and changes the 64 bit architextures
> to use it. This also changes sys_futex to take a "u32 *" as its first
> argument as discussed with Rusty and yourself.
>
> There is no mip64 part as the mips port currently does not support
> sys_futex.
This is now against 2.5.61.
I should also mention that this patch actually gives ia64 a 32 bit
compatibility implimentation of sys_futex where one did not exist before.
And for parisc, ppc64, sparc64 this is a bug fix as previously they used
the 64 bit version for the 32 bit compatibility version.
This is the generic part of the patch and the architecture specific parts
I have been asked to forward directly to you.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.5.61-32bit.1/include/linux/futex.h 2.5.61-32bit.2/include/linux/futex.h
--- 2.5.61-32bit.1/include/linux/futex.h 2002-10-01 12:30:40.000000000 +1000
+++ 2.5.61-32bit.2/include/linux/futex.h 2003-02-16 00:16:19.000000000 +1100
@@ -6,6 +6,6 @@
#define FUTEX_WAKE (1)
#define FUTEX_FD (2)
-extern asmlinkage int sys_futex(unsigned long uaddr, int op, int val, struct timespec *utime);
+extern asmlinkage long sys_futex(u32 *uaddr, int op, int val, struct timespec *utime);
#endif
diff -ruN 2.5.61-32bit.1/kernel/compat.c 2.5.61-32bit.2/kernel/compat.c
--- 2.5.61-32bit.1/kernel/compat.c 2003-01-17 14:01:08.000000000 +1100
+++ 2.5.61-32bit.2/kernel/compat.c 2003-02-15 23:39:48.000000000 +1100
@@ -16,6 +16,7 @@
#include <linux/errno.h>
#include <linux/time.h>
#include <linux/signal.h>
+#include <linux/sched.h> /* for MAX_SCHEDULE_TIMEOUT */
#include <asm/uaccess.h>
@@ -208,3 +209,19 @@
ret = put_user(s, oset);
return ret;
}
+
+extern long do_futex(u32 *, int, int, unsigned long);
+
+asmlinkage long compat_sys_futex(u32 *uaddr, int op, int val,
+ struct compat_timespec *utime)
+{
+ struct timespec t;
+ unsigned long timeout = MAX_SCHEDULE_TIMEOUT;
+
+ if ((op == FUTEX_WAIT) && utime) {
+ if (get_compat_timespec(&t, utime))
+ return -EFAULT;
+ timeout = timespec_to_jiffies(t) + 1;
+ }
+ return do_futex((unsigned long)uaddr, op, val, timeout);
+}
diff -ruN 2.5.61-32bit.1/kernel/futex.c 2.5.61-32bit.2/kernel/futex.c
--- 2.5.61-32bit.1/kernel/futex.c 2002-11-28 10:34:59.000000000 +1100
+++ 2.5.61-32bit.2/kernel/futex.c 2003-02-15 23:39:48.000000000 +1100
@@ -315,23 +315,6 @@
return ret;
}
-static inline int futex_wait_utime(unsigned long uaddr,
- int offset,
- int val,
- struct timespec* utime)
-{
- unsigned long time = MAX_SCHEDULE_TIMEOUT;
-
- if (utime) {
- struct timespec t;
- if (copy_from_user(&t, utime, sizeof(t)) != 0)
- return -EFAULT;
- time = timespec_to_jiffies(&t) + 1;
- }
-
- return futex_wait(uaddr, offset, val, time);
-}
-
static int futex_close(struct inode *inode, struct file *filp)
{
struct futex_q *q = filp->private_data;
@@ -437,7 +420,7 @@
return ret;
}
-asmlinkage int sys_futex(unsigned long uaddr, int op, int val, struct timespec *utime)
+long do_futex(unsigned long uaddr, int op, int val, unsinged long timeout)
{
unsigned long pos_in_page;
int ret;
@@ -445,12 +428,12 @@
pos_in_page = uaddr % PAGE_SIZE;
/* Must be "naturally" aligned */
- if (pos_in_page % sizeof(int))
+ if (pos_in_page % sizeof(u32))
return -EINVAL;
switch (op) {
case FUTEX_WAIT:
- ret = futex_wait_utime(uaddr, pos_in_page, val, utime);
+ ret = futex_wait(uaddr, pos_in_page, val, timeout);
break;
case FUTEX_WAKE:
ret = futex_wake(uaddr, pos_in_page, val);
@@ -465,6 +448,20 @@
return ret;
}
+asmlinkage long sys_futex(u32 *uaddr, int op, int val, struct timespec *utime)
+{
+ struct timespec t;
+ unsigned long timeout = MAX_SCHEDULE_TIMEOUT;
+
+
+ if ((op == FUTEX_WAIT) && utime) {
+ if (copy_from_user(&t, utime, sizeof(t)) != 0)
+ return -EFAULT;
+ timeout = timespec_to_jiffies(t) + 1;
+ }
+ return do_futex((unsigned long)uaddr, op, val, timeout);
+}
+
static struct super_block *
futexfs_get_sb(struct file_system_type *fs_type,
int flags, char *dev_name, void *data)
diff -ruN 2.5.61-32bit.1/arch/parisc/kernel/syscall.S 2.5.61-32bit.2/arch/parisc/kernel/syscall.S
--- 2.5.61-32bit.1/arch/parisc/kernel/syscall.S 2003-02-11 09:39:14.000000000 +1100
+++ 2.5.61-32bit.2/arch/parisc/kernel/syscall.S 2003-02-15 23:39:48.000000000 +1100
@@ -320,7 +320,8 @@
#ifdef __LP64__
/* Use ENTRY_SAME for 32-bit syscalls which are the same on wide and
* narrow palinux. Use ENTRY_DIFF for those where a 32-bit specific
- * implementation is required on wide palinux.
+ * implementation is required on wide palinux. Use ENTRY_COMP where
+ * the compatability layer has a useful 32-bit implementation.
*/
#define ENTRY_SAME(_name_) .dword sys_##_name_
#define ENTRY_DIFF(_name_) .dword sys32_##_name_
@@ -597,7 +598,7 @@
ENTRY_SAME(ni_syscall) /* tkill */
ENTRY_SAME(sendfile64)
- ENTRY_SAME(futex) /* 210 */
+ ENTRY_COMP(futex) /* 210 */
ENTRY_SAME(sched_setaffinity)
ENTRY_SAME(sched_getaffinity)
ENTRY_SAME(set_thread_area)
diff -ruN 2.5.61-32bit.1/arch/ppc64/kernel/misc.S 2.5.61-32bit.2/arch/ppc64/kernel/misc.S
--- 2.5.61-32bit.1/arch/ppc64/kernel/misc.S 2003-02-11 09:39:15.000000000 +1100
+++ 2.5.61-32bit.2/arch/ppc64/kernel/misc.S 2003-02-15 23:39:48.000000000 +1100
@@ -724,7 +724,7 @@
.llong .sys_removexattr
.llong .sys_lremovexattr
.llong .sys_fremovexattr /* 220 */
- .llong .sys_futex
+ .llong .compat_sys_futex
.llong .sys32_sched_setaffinity
.llong .sys32_sched_getaffinity
.llong .sys_ni_syscall
diff -ruN 2.5.61-32bit.1/arch/s390x/kernel/entry.S 2.5.61-32bit.2/arch/s390x/kernel/entry.S
--- 2.5.61-32bit.1/arch/s390x/kernel/entry.S 2003-01-17 14:01:01.000000000 +1100
+++ 2.5.61-32bit.2/arch/s390x/kernel/entry.S 2003-02-15 23:39:48.000000000 +1100
@@ -629,7 +629,7 @@
.long SYSCALL(sys_fremovexattr,sys32_fremovexattr_wrapper) /* 235 */
.long SYSCALL(sys_gettid,sys_gettid)
.long SYSCALL(sys_tkill,sys_tkill)
- .long SYSCALL(sys_futex,sys32_futex_wrapper)
+ .long SYSCALL(sys_futex,compat_sys_futex_wrapper)
.long SYSCALL(sys_sched_setaffinity,sys32_sched_setaffinity_wrapper)
.long SYSCALL(sys_sched_getaffinity,sys32_sched_getaffinity_wrapper) /* 240 */
.long SYSCALL(sys_ni_syscall,sys_ni_syscall)
diff -ruN 2.5.61-32bit.1/arch/s390x/kernel/linux32.c 2.5.61-32bit.2/arch/s390x/kernel/linux32.c
--- 2.5.61-32bit.1/arch/s390x/kernel/linux32.c 2003-02-15 23:19:37.000000000 +1100
+++ 2.5.61-32bit.2/arch/s390x/kernel/linux32.c 2003-02-15 23:39:48.000000000 +1100
@@ -4049,28 +4049,6 @@
return ret;
}
-asmlinkage int
-sys_futex(void *uaddr, int op, int val, struct timespec *utime);
-
-asmlinkage int
-sys32_futex(void *uaddr, int op, int val,
- struct compat_timespec *timeout32)
-{
- struct timespec tmp;
- mm_segment_t old_fs;
- int ret;
-
- if (timeout32 && get_compat_timespec(&tmp, timeout32))
- return -EINVAL;
-
- old_fs = get_fs();
- set_fs(KERNEL_DS);
- ret = sys_futex(uaddr, op, val, timeout32 ? &tmp : NULL);
- set_fs(old_fs);
-
- return ret;
-}
-
asmlinkage ssize_t sys_read(unsigned int fd, char * buf, size_t count);
asmlinkage compat_ssize_t sys32_read(unsigned int fd, char * buf, size_t count)
diff -ruN 2.5.61-32bit.1/arch/s390x/kernel/wrapper32.S 2.5.61-32bit.2/arch/s390x/kernel/wrapper32.S
--- 2.5.61-32bit.1/arch/s390x/kernel/wrapper32.S 2003-01-17 14:01:01.000000000 +1100
+++ 2.5.61-32bit.2/arch/s390x/kernel/wrapper32.S 2003-02-15 23:39:48.000000000 +1100
@@ -1088,13 +1088,13 @@
llgfr %r4,%r4 # long
jg sys32_fstat64 # branch to system call
- .globl sys32_futex_wrapper
-sys32_futex_wrapper:
- llgtr %r2,%r2 # void *
+ .globl compat_sys_futex_wrapper
+compat_sys_futex_wrapper:
+ llgtr %r2,%r2 # u32 *
lgfr %r3,%r3 # int
lgfr %r4,%r4 # int
- llgtr %r5,%r5 # struct timespec *
- jg sys32_futex # branch to system call
+ llgtr %r5,%r5 # struct compat_timespec *
+ jg compat_sys_futex # branch to system call
.globl sys32_setxattr_wrapper
sys32_setxattr_wrapper:
diff -ruN 2.5.61-32bit.1/arch/x86_64/ia32/ia32entry.S 2.5.61-32bit.2/arch/x86_64/ia32/ia32entry.S
--- 2.5.61-32bit.1/arch/x86_64/ia32/ia32entry.S 2003-02-15 23:19:38.000000000 +1100
+++ 2.5.61-32bit.2/arch/x86_64/ia32/ia32entry.S 2003-02-15 23:39:48.000000000 +1100
@@ -440,7 +440,7 @@
.quad sys_fremovexattr
.quad sys_tkill /* 238 */
.quad sys_sendfile64
- .quad sys32_futex /* 240 */
+ .quad compat_sys_futex /* 240 */
.quad sys32_sched_setaffinity
.quad sys32_sched_getaffinity
.quad sys_set_thread_area
diff -ruN 2.5.61-32bit.1/arch/x86_64/ia32/sys_ia32.c 2.5.61-32bit.2/arch/x86_64/ia32/sys_ia32.c
--- 2.5.61-32bit.1/arch/x86_64/ia32/sys_ia32.c 2003-02-15 23:19:38.000000000 +1100
+++ 2.5.61-32bit.2/arch/x86_64/ia32/sys_ia32.c 2003-02-15 23:39:48.000000000 +1100
@@ -2199,26 +2199,6 @@
return err;
}
-extern int sys_futex(unsigned long uaddr, int op, int val, struct timespec *t);
-
-asmlinkage long
-sys32_futex(unsigned long uaddr, int op, int val, struct compat_timespec *utime32)
-{
- struct timespec t;
- mm_segment_t oldfs = get_fs();
- int err;
-
- if (utime32 && get_compat_timespec(&t, utime32))
- return -EFAULT;
-
- /* the set_fs is safe because futex doesn't use the seg limit
- for valid page checking of uaddr. */
- set_fs(KERNEL_DS);
- err = sys_futex(uaddr, op, val, utime32 ? &t : NULL);
- set_fs(oldfs);
- return err;
-}
-
extern long sys_io_setup(unsigned nr_reqs, aio_context_t *ctx);
long sys32_io_setup(unsigned nr_reqs, u32 *ctx32p)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH][COMPAT] compat_sys_futex 2/3 ia64
2003-02-15 13:51 ` [PATCH][COMPAT] compat_sys_futex 1/3 generic, parisc, ppc64, s390x and x86_64 Stephen Rothwell
@ 2003-02-15 13:55 ` Stephen Rothwell
2003-02-15 13:58 ` [PATCH][COMPAT] compat_sys_futex 3/3 sparc64 Stephen Rothwell
1 sibling, 0 replies; 13+ messages in thread
From: Stephen Rothwell @ 2003-02-15 13:55 UTC (permalink / raw)
To: David Mosberger; +Cc: torvalds, linux-kernel
Hi David,
ia 64 part of the patch. This gives you a 32 bit version of sys_futex
(hopefully).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.5.61-32bit.1/arch/ia64/ia32/ia32_entry.S 2.5.61-32bit.2/arch/ia64/ia32/ia32_entry.S
--- 2.5.61-32bit.1/arch/ia64/ia32/ia32_entry.S 2003-02-11 09:39:10.000000000 +1100
+++ 2.5.61-32bit.2/arch/ia64/ia32/ia32_entry.S 2003-02-15 23:39:48.000000000 +1100
@@ -428,6 +428,26 @@
data8 sys_ni_syscall
data8 sys_ni_syscall
data8 sys_ni_syscall
+ data8 sys_ni_syscall /* 230 */
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall /* 235 */
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 compat_sys_futex /* 240 */
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall /* 245 */
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
+ data8 sys_ni_syscall
/*
* CAUTION: If any system calls are added beyond this point
* then the check in `arch/ia64/kernel/ivt.S' will have
diff -ruN 2.5.61-32bit.1/arch/ia64/kernel/ivt.S 2.5.61-32bit.2/arch/ia64/kernel/ivt.S
--- 2.5.61-32bit.1/arch/ia64/kernel/ivt.S 2003-02-11 09:39:11.000000000 +1100
+++ 2.5.61-32bit.2/arch/ia64/kernel/ivt.S 2003-02-15 23:39:48.000000000 +1100
@@ -848,7 +848,7 @@
alloc r15=ar.pfs,0,0,6,0 // must first in an insn group
;;
ld4 r8=[r14],8 // r8 == eax (syscall number)
- mov r15=230 // number of entries in ia32 system call table
+ mov r15=250 // number of entries in ia32 system call table
;;
cmp.ltu.unc p6,p7=r8,r15
ld4 out1=[r14],8 // r9 == ecx
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH][COMPAT] compat_sys_futex 3/3 sparc64
2003-02-15 13:51 ` [PATCH][COMPAT] compat_sys_futex 1/3 generic, parisc, ppc64, s390x and x86_64 Stephen Rothwell
2003-02-15 13:55 ` [PATCH][COMPAT] compat_sys_futex 2/3 ia64 Stephen Rothwell
@ 2003-02-15 13:58 ` Stephen Rothwell
1 sibling, 0 replies; 13+ messages in thread
From: Stephen Rothwell @ 2003-02-15 13:58 UTC (permalink / raw)
To: Dave Miller; +Cc: LKML, Linus
Hi Dave,
sparc64 part of the patch. This fixes your 32 bit compatibility version of
sys_futex (you were using the 64 bit version before).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.5.61-32bit.1/arch/sparc64/kernel/systbls.S 2.5.61-32bit.2/arch/sparc64/kernel/systbls.S
--- 2.5.61-32bit.1/arch/sparc64/kernel/systbls.S 2003-02-15 23:19:38.000000000 +1100
+++ 2.5.61-32bit.2/arch/sparc64/kernel/systbls.S 2003-02-15 23:39:48.000000000 +1100
@@ -47,7 +47,7 @@
.word sys_nis_syscall, sys32_setreuid16, sys32_setregid16, sys_rename, sys_truncate
/*130*/ .word sys_ftruncate, sys_flock, sys_lstat64, sys_nis_syscall, sys_nis_syscall
.word sys_nis_syscall, sys_mkdir, sys_rmdir, sys32_utimes, sys_stat64
-/*140*/ .word sys32_sendfile64, sys_nis_syscall, sys_futex, sys_gettid, sys32_getrlimit
+/*140*/ .word sys32_sendfile64, sys_nis_syscall, compat_sys_futex, sys_gettid, sys32_getrlimit
.word sys32_setrlimit, sys_pivot_root, sys32_prctl, sys32_pciconfig_read, sys32_pciconfig_write
/*150*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64
.word sys32_fcntl64, sys_ni_syscall, compat_sys_statfs, compat_sys_fstatfs, sys_oldumount
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2003-02-15 13:48 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-12 4:47 [PATCH][COMPAT] compat_sys_futex 1/7 generic Stephen Rothwell
2003-02-12 4:51 ` [PATCH][COMPAT] compat_sys_futex 2/7 ia64 Stephen Rothwell
2003-02-12 4:55 ` [PATCH][COMPAT] compat_sys_futex 3/7 parisc Stephen Rothwell
2003-02-12 4:57 ` [PATCH][COMPAT] compat_sys_futex 4/7 ppc64 Stephen Rothwell
2003-02-12 5:00 ` [PATCH][COMPAT] compat_sys_futex 5/7 s390x Stephen Rothwell
2003-02-12 5:06 ` [PATCH][COMPAT] compat_sys_futex 6/7 sparc64 Stephen Rothwell
2003-02-12 5:09 ` [PATCH][COMPAT] compat_sys_futex 7/7 x86_64 Stephen Rothwell
2003-02-13 3:28 ` Stephen Rothwell
2003-02-12 5:26 ` [PATCH][COMPAT] compat_sys_futex 1/7 generic Linus Torvalds
2003-02-12 6:28 ` Stephen Rothwell
2003-02-15 13:51 ` [PATCH][COMPAT] compat_sys_futex 1/3 generic, parisc, ppc64, s390x and x86_64 Stephen Rothwell
2003-02-15 13:55 ` [PATCH][COMPAT] compat_sys_futex 2/3 ia64 Stephen Rothwell
2003-02-15 13:58 ` [PATCH][COMPAT] compat_sys_futex 3/3 sparc64 Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®