[patch] tux3-2.6.3-A1
Anton Blanchard
anton at samba.org
Sat Feb 21 16:40:31 UTC 2004
Hi Ingo,
> a new Tux drop is available at:
> redhat.com/~mingo/TUX-patches/tux3-2.6.3-A2
Heres a patch to fix ppc64:
- We call syscalls directly, not via their procedure descriptor.
- Remove 32bit translation code now the API is 32/64bit safe.
Anton
diff -urN tux-2.6.3.orig/arch/ppc64/kernel/misc.S tux-2.6.3/arch/ppc64/kernel/misc.S
--- tux-2.6.3.orig/arch/ppc64/kernel/misc.S 2004-02-22 03:33:39.225245698 +1100
+++ tux-2.6.3/arch/ppc64/kernel/misc.S 2004-02-22 03:34:30.585096862 +1100
@@ -788,7 +788,15 @@
.llong .compat_sys_sched_setaffinity
.llong .compat_sys_sched_getaffinity
.llong .sys_ni_syscall
- .llong .sys32_tux
+#ifdef CONFIG_TUX
+ .llong .__sys_tux
+#else
+# ifdef CONFIG_TUX_MODULE
+ .llong .sys_tux
+# else
+ .llong .sys_ni_syscall
+# endif
+#endif
.llong .sys32_sendfile64
.llong .compat_sys_io_setup
.llong .sys_io_destroy
@@ -1048,10 +1056,10 @@
.llong .sys_sched_getaffinity
.llong .sys_ni_syscall
#ifdef CONFIG_TUX
- .quad __sys_tux
+ .llong .__sys_tux
#else
# ifdef CONFIG_TUX_MODULE
- .quad sys_tux
+ .llong .sys_tux
# else
.llong .sys_ni_syscall
# endif
diff -urN tux-2.6.3.orig/arch/ppc64/kernel/sys_ppc32.c tux-2.6.3/arch/ppc64/kernel/sys_ppc32.c
--- tux-2.6.3.orig/arch/ppc64/kernel/sys_ppc32.c 2004-02-22 03:33:39.231245241 +1100
+++ tux-2.6.3/arch/ppc64/kernel/sys_ppc32.c 2004-02-22 03:35:01.036380642 +1100
@@ -2768,65 +2768,6 @@
return sys_mmap(addr, len, prot, flags, fd, pgoff << 12);
}
-#include <net/tux_u.h>
-
-asmlinkage int __sys_tux (unsigned int action, user_req_t *u_info);
-
-asmlinkage int sys32_tux (unsigned int action, user_req32_t *u_info32)
-{
- int ret = -ENOMEM;
- user_req_t *u_info;
- u32 tmp1, tmp2, tmp3;
- mm_segment_t old_fs = get_fs();
- int err;
-
- if (!u_info32)
- return __sys_tux(action, NULL);
-
- u_info = kmalloc(sizeof(*u_info), GFP_KERNEL);
-
- if (!u_info)
- goto out;
-
- ret = -EFAULT;
-
- err = copy_from_user(u_info, u_info32,
- offsetof(user_req32_t, object_addr));
- err |= __get_user(tmp1, &u_info32->object_addr);
- err |= __get_user(tmp2, &u_info32->priv);
- err |= __get_user(tmp3, &u_info32->id);
-
- if (err)
- goto out_kfree;
-
- u_info->object_addr = (char *)A(tmp1);
- u_info->priv = (void *)A(tmp2);
- u_info->id = (void *)A(tmp3);
-
- set_fs(KERNEL_DS);
- ret = __sys_tux(action, u_info);
- set_fs(old_fs);
-
- err = copy_to_user(u_info32, u_info,
- offsetof(user_req32_t, object_addr));
-
- tmp1 = (u32 *)u_info->object_addr;
- tmp2 = (u32 *)u_info->priv;
- tmp3 = (u32 *)u_info->id;
-
- err |= __put_user(tmp1, &u_info32->object_addr);
- err |= __put_user(tmp2, &u_info32->priv);
- err |= __put_user(tmp3, &u_info32->id);
-
- if (err)
- ret = -EFAULT;
-
-out_kfree:
- kfree(u_info);
-out:
- return ret;
-}
-
int get_compat_timeval(struct timeval *tv, struct compat_timeval *ctv)
{
return (verify_area(VERIFY_READ, ctv, sizeof(*ctv)) ||
More information about the tux-list
mailing list