sys32_ioctl -> compat_ioctl -- generic
Hi!
This is generic part of sys32_ioctl -> compat_ioctl. Please apply,
Pavel
include/linux/ioctl32.h +5 -0
@@ -19,5 +19,10 @@extern int unregister_ioctl32_conversion (unsigned int cmd); +struct ioctl_trans { +unsigned long cmd; +int (*handler)(unsigned int ,unsigned int ,unsigned long ,struct file * filp); +struct ioctl_trans *next; +};#endif
kernel/compat.c +222 -0
231 lines not on this page · raw message
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]
Hi Pavel,
Quoted 2 lines · On Tue, 4 Mar 2003 00:21:22 +0100 Pavel Machek <[email protected]> wrote:
This is generic part of
sys32_ioctl->compat_ioctl. Please apply,
Thanks for this - you saved me a headache :-)
Some comments:
kernel/compat.c
Quoted 2 lines
kernel/compat.c +0
-0
All this really belongs in fs/compat.c ...
One thing that Linus (and I) wanted from the compatability layer is to try to keep all 32 bit assumptions out of the generic code - I understand that this my not be possible, but we would like to try.
So maybe you could start by changing ioctl32 to compat_ioctl everywhere - I know that this is just cosmetic, but it gives the better impression of what the code is about ...
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
Hi!
Quoted 3 lines
Quoted 1 line
This is generic part of
sys32_ioctl->compat_ioctl. Please apply,Thanks for this - you saved me a headache :-)
Well, I fear total sum of headache stayed constant ;-).
Anyway, producing these patches seems "easy" compared to actually merging them. You seem to have some experience with this, would you be willing to help?
Quoted 7 lines
Some comments:
kernel/compat.c
Quoted 2 lines
kernel/compat.c +0
-0All this really belongs in
fs/compat.c...
Quoted 7 lines
One thing that Linus (and I) wanted from the compatability layer is to try to keep all 32 bit assumptions out of the generic code - I understand that this my not be possible, but we would like to try.
So maybe you could start by changing ioctl32 to
compat_ioctleverywhere - I know that this is just cosmetic, but it gives the better impression of what the code is about ...
I thought about that, but I fear resulting diff would be too big (and would bitrot extremely quickly). I thought I'd try to merge simple (& small) stuff first, to see how bit it will be.....
Pavel
Signature · 2 lines
Horseback riding is like software... ...vgf orggre jura vgf serr.
Quoted 2 lines · On Tue, 4 Mar 2003 00:21:22 +0100 Pavel Machek <[email protected]> wrote:
+asmlinkage long
compat_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
For consistancy, this should be called compat_sys_ioctl.
kernel/compat.c line 423
Quoted 8 lines
kernel/compat.c +6
-0+{ +struct file * filp; + filp =fget (fd); +/* find the name of the device. */ +if (path) { +struct file *f =fget (fd);
Is it really necessary to do another fget(fd) ?
Also, if you are adding this much code, you should add a copyright notice to the top of the file ...
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
Hi!
Quoted 3 lines
Quoted 1 line
+asmlinkage long
compat_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)For consistancy, this should be called
compat_sys_ioctl.
Done. (And moved whole stuff to fs/compat.c).
Quoted 10 lines
kernel/compat.c line 423
Quoted 8 lines
kernel/compat.c +6
-0+{ +struct file * filp; + filp =fget (fd); +/* find the name of the device. */ +if (path) { +struct file *f =fget (fd);Is it really necessary to do another fget(fd) ?
This is andi's code, but it seems unneeded, fixed.
Quoted 2 lines
Also, if you are adding this much code, you should add a copyright notice to the top of the file ...
I actually need to copy copyrights from ia32_ioctl, where I took this. Done.
Pavel
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]
Hi Pavel,
Sorry I haven't responded earlier. I am willing to help in any way I can, so let me know.
Quoted 6 lines · On Fri, 7 Mar 2003 00:37:21 +0100 Pavel Machek <[email protected]> wrote:
Hi!
Quoted 1 line
For consistancy, this should be called
compat_sys_ioctl.Done. (And moved whole stuff to
fs/compat.c).
Great.
Quoted 1 line
This is andi's code, but it seems unneeded, fixed.
I assume Andi will scream if there is something subtle there :-)
Quoted 5 lines
Quoted 2 lines
Also, if you are adding this much code, you should add a copyright notice to the top of the file ...
I actually need to copy copyrights from
ia32_ioctl, where I took this. Done.
OK, I will have a deeper look soon.
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
kernel/compat.c +3
-0+{ +struct file * filp; + filp =fget (fd);
Quoted 7 lines
Quoted 5 lines
kernel/compat.c line 423
Quoted 3 lines
kernel/compat.c +3
-0+/* find the name of the device. */ +if (path) { +struct file *f =fget (fd);Is it really necessary to do another fget(fd) ?
This is andi's code, but it seems unneeded, fixed.
Yes, it's redundant.
-Andi