Re: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-18 Thread David S. Miller
From: Arnd Bergmann <[EMAIL PROTECTED]> Date: Thu, 19 Jan 2006 01:57:37 +0100 > I'm not that familiar with the process for non-driver patches for > netdev (nor for device drivers as it seems ;-)), but my > understanding is that you should address those to Jeff Garzik as > well, asking for inclusio

Re: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-18 Thread Arnd Bergmann
Am Wednesday 18 January 2006 07:56 schrieb Shaun Pereira: >  Assuming you are happy with the state of the patches, is there anyway > for me to know if they will become a part of the next release? I don't see any more technical problems with your patches. You still need to proper patch description

[PATCH 3/4 -2.6.15- RESEND]:x25: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-16 Thread Shaun Pereira
Hi Arnd Here is the corrected version. Using the x25_subscrip_struct structure (extend value = 1) set the following values in the kernel after copy_from_user global facility mask is F Extended value is 1 Using the 32 bit compat_x25_subscrip_struct set the following values in the stru

Re: [PATCH 3/4 -2.6.15]:x25: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-16 Thread Arnd Bergmann
Am Dienstag, 17. Januar 2006 00:12 schrieb Shaun Pereira: > +static int compat_x25_subscr_ioctl(unsigned int cmd, > + struct compat_x25_subscrip_struct __user *x25_subscr32) > +{ > + struct x25_subscrip_struct x25_subscr; > + struct x25_neigh *nb; > + struct net_devi

[PATCH 1/4 - 2.6.15 ]net : 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-16 Thread Shaun Pereira
Hi Here are the corrected patches /Shaun diff -uprN -X dontdiff linux-2.6.15-vanilla/include/linux/net.h linux-2.6.15/include/linux/net.h --- linux-2.6.15-vanilla/include/linux/net.h2006-01-03 14:21:10.0 +1100 +++ linux-2.6.15/include/linux/net.h2006-01-17 09:43:56.0 +1100

[PATCH 3/4 -2.6.15]:x25: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-16 Thread Shaun Pereira
Allows x25 to work in 32 bit mode on 64 bit kernel diff -uprN -X dontdiff linux-2.6.15-vanilla/net/x25/af_x25.c linux-2.6.15/net/x25/af_x25.c --- linux-2.6.15-vanilla/net/x25/af_x25.c 2006-01-03 14:21:10.0 +1100 +++ linux-2.6.15/net/x25/af_x25.c 2006-01-17 09:56:02.0 +

[PATCH 2/4 - 2.6.15]net: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-16 Thread Shaun Pereira
Provides a 32 bit conversion function for SIOCGSTAMP diff -uprN -X dontdiff linux-2.6.15-vanilla/include/net/compat.h linux-2.6.15/include/net/compat.h --- linux-2.6.15-vanilla/include/net/compat.h 2006-01-03 14:21:10.0 +1100 +++ linux-2.6.15/include/net/compat.h 2006-01-17 09:52:50.000

[PATCH 4/4]x25: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-16 Thread Shaun Pereira
A small fix for the following error, when trying to run a 64 bit x25 server application. T2 kernel: schedule_timeout: wrong timeout value from 88164796 diff -uprN -X dontdiff linux-2.6.15-vanilla/net/x25/af_x25.c linux-2.6.15/net/x25/af_x25.c --- linux-2.6.15-vanilla/ne

Re: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-16 Thread Arnd Bergmann
On Monday 16 January 2006 06:59, Shaun Pereira wrote: > > I was wondering if this the compat_sock_get_timestamp function is > needed? If I were to remove the SIOCGSTAMP case from the > compat_x25_ioctl function, then a SIOCGSTAMP ioctl system call would > return -ENOIOCTLCMD which could  then be h

Re: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-15 Thread YOSHIFUJI Hideaki / 吉藤英明
In article <[EMAIL PROTECTED]> (at Mon, 16 Jan 2006 16:59:20 +1100), Shaun Pereira <[EMAIL PROTECTED]> says: > If I understand correctly from your comments (thanks for that, they are > helpful) > copy_to_user acts like a memcopy for an 'array' of bytes and should not > be used to copy the timeval

Re: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-15 Thread Shaun Pereira
Hi Arnd I have made the changes suggested, and attached it below. I think it should be good now. Just a couple of questions if I may. If I understand correctly from your comments (thanks for that, they are helpful) copy_to_user acts like a memcopy for an 'array' of bytes and should not be used

Re: [PATCH 2/4 - 2.6.15]net: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-13 Thread Arnd Bergmann
On Friday 13 January 2006 03:14, Shaun Pereira wrote: > Thank you for reviewing that bit of code.   > I had a look at compat_sys_gettimeofday and sys32_gettimeofday codes. > They seem to work in a similar way, casting a pointer to the structure > from user space to a compat_timeval type. The part

Re: [PATCH 2/4 - 2.6.15]net: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-12 Thread Shaun Pereira
Hi Arnd Thank you for reviewing that bit of code. I had a look at compat_sys_gettimeofday and sys32_gettimeofday codes. They seem to work in a similar way, casting a pointer to the structure from user space to a compat_timeval type. But to make sure I have tested the routine by forcing the sk- >

Re: [PATCH 2/4 - 2.6.15]net: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-12 Thread Arnd Bergmann
On Thursday 12 January 2006 06:02, Shaun Pereira wrote: > +int compat_sock_get_timestamp(struct sock *sk, struct timeval __user > *userstamp) > +{ > +   struct compat_timeval __user *ctv; > +   ctv = (struct compat_timeval __user*) userstamp; > +   if(!sock_flag(sk, SOCK_TIMESTAMP)) > +

[PATCH 3/4 - 2.6.15] x25: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-11 Thread Shaun Pereira
The x25 bit, many thanks Arnd for this. diff -uprN -X dontdiff linux-2.6.15-vanilla/net/x25/af_x25.c linux-2.6.15/net/x25/af_x25.c --- linux-2.6.15-vanilla/net/x25/af_x25.c 2006-01-03 14:21:10.0 +1100 +++ linux-2.6.15/net/x25/af_x25.c 2006-01-12 16:06:54.0 +1100 @@ -54,

[PATCH 4/4 -2.6.15]: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-11 Thread Shaun Pereira
A small fix for the following error, when trying to run a 64 bit x25 server application. T2 kernel: schedule_timeout: wrong timeout value from 88164796 diff -uprN -X dontdiff linux-2.6.15-vanilla/net/x25/af_x25.c linux-2.6.15/net/x25/af_x25.c --- linux-2.6.15-vanilla/ne

[PATCH 2/4 - 2.6.15]net: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-11 Thread Shaun Pereira
The second part of this series. This routine is needed by the x25 module (32-64 bit patch), as recommended it has been added to compat.c diff -uprN -X dontdiff linux-2.6.15-vanilla/include/net/compat.h linux-2.6.15/include/net/compat.h --- linux-2.6.15-vanilla/include/net/compat.h 2006-01-03 1

[PATCH 1/4 - 2.6.15] net: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-11 Thread Shaun Pereira
Hi all, Attached is the corrected patch. Thanks heaps Arnd for your help (and patience :-) The following text is just a repeat of what was sent earlier. The attached patch is a follow up to a post made earlier to this site with regard to 32 bit (socket layer) ioctl emulation for 64 bit kernels

Re: [PATCH] net: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-11 Thread Arnd Bergmann
On Wednesday 11 January 2006 06:28, Shaun Pereira wrote: > And the correct x.25 patch, (will build a [PATCH] if this is ok). > Tested with with xot to a Cisco box. Much better now, but > + switch(cmd) { > + case TIOCOUTQ: > + case TIOCINQ: Looking at how these

Re: 32 bit (socket layer) ioctl emulation for 64 bit kernels - patch1

2006-01-11 Thread Arnd Bergmann
On Wednesday 11 January 2006 06:24, Shaun Pereira wrote: >  Thanks for reviewing those patches, and your feedback. I have made the > changes recommended. If these are acceptable, I will build a proper > [PATCH] for submission. This patch looks good to me now. > Is there anyone in particular that

Re: [PATCH] net: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-10 Thread Shaun Pereira
And the correct x.25 patch, (will build a [PATCH] if this is ok). Tested with with xot to a Cisco box. Thanks once again for your help /Shaun Index: linux-2.6.15/net/x25/af_x25.c === --- linux-2.6.15.orig/net/x25/af_x25.c +++ linux-

Re: 32 bit (socket layer) ioctl emulation for 64 bit kernels - patch1

2006-01-10 Thread Shaun Pereira
Hi Arnd Thanks for reviewing those patches, and your feedback. I have made the changes recommended. If these are acceptable, I will build a proper [PATCH] for submission.Is there anyone in particular that I need to mail in order that these patches go into the next release? Here is the updated pat

Re: [PATCH 2/2 - 2.6.15]net:32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-10 Thread Arnd Bergmann
On Tuesday 10 January 2006 05:31, Shaun Pereira wrote: > --- linux-2.6.15-vanilla/include/net/x25.h2006-01-03 14:21:10.0 > +1100 > +++ linux-2.6.15/include/net/x25.h2006-01-10 16:15:16.0 +1100 > @@ -223,6 +223,18 @@ extern struct x25_route *x25_get_route(s > extern struct n

Re: [PATCH 1/2 RESEND- 2.6.15] net: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-10 Thread Arnd Bergmann
On Tuesday 10 January 2006 05:31, Shaun Pereira wrote: > Hi Arnd, Arnaldo > Thanks for your comments. I initially did not wish to change any of the > other modules, but based on Arnd's comments I have removed the > extra macro, SOCKOPS_COMPAT_WRAP and use the original SOCKOPS_WRAP. Ok, looks bett

[PATCH 1/2 RESEND- 2.6.15] net: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-09 Thread Shaun Pereira
Hi Arnd, Arnaldo Thanks for your comments. I initially did not wish to change any of the other modules, but based on Arnd's comments I have removed the extra macro, SOCKOPS_COMPAT_WRAP and use the original SOCKOPS_WRAP. I'm a bit pressed for time to use the lock_sock() in each of the functions p

[PATCH 2/2 - 2.6.15]net:32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-09 Thread Shaun Pereira
x25 module patch diff -uprN -X dontdiff linux-2.6.15-vanilla/include/net/x25.h linux-2.6.15/include/net/x25.h --- linux-2.6.15-vanilla/include/net/x25.h 2006-01-03 14:21:10.0 +1100 +++ linux-2.6.15/include/net/x25.h 2006-01-10 16:15:16.0 +1100 @@ -223,6 +223,18 @@ extern

Re: [PATCH] net: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-09 Thread Arnaldo Carvalho de Melo
On 1/9/06, Arnd Bergmann <[EMAIL PROTECTED]> wrote: > On Monday 09 January 2006 06:46, Shaun Pereira wrote: > > Since we are interested in ioctl's from userspace I have not added the > > .compat_ioctl function pointer to struct net_device. The assumption > > being once the userspace data has reach

Re: [PATCH] net: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-09 Thread Arnd Bergmann
On Monday 09 January 2006 06:46, Shaun Pereira wrote: > Hi all, > The attached patch is a follow up to a post made earlier to this site > with regard to 32 bit (socket layer) ioctl emulation for 64 bit kernels. Ok, cool. Note that I also posted a longer series of patches that does this

[PATCH] net: 32 bit (socket layer) ioctl emulation for 64 bit kernels

2006-01-08 Thread Shaun Pereira
Hi all, The attached patch is a follow up to a post made earlier to this site with regard to 32 bit (socket layer) ioctl emulation for 64 bit kernels. I needed to implement 32 bit userland ioctl support for modular (x.25) socket ioctls in a 64 bit kernel. With the removal of the