search for: compat_ptr

Displaying 20 results from an estimated 63 matches for "compat_ptr".

2019 Apr 16
4
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...drivers/char/ppdev.c @@ -674,14 +674,6 @@ static long pp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) return ret; } -#ifdef CONFIG_COMPAT -static long pp_compat_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); -} -#endif - static int pp_open(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); @@ -790,9 +782,7 @@ static const struct file_operations pp_fops = { .write = pp_write, .poll = pp_poll, .unlocked_ioctl = pp_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl...
2019 Apr 16
4
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...drivers/char/ppdev.c @@ -674,14 +674,6 @@ static long pp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) return ret; } -#ifdef CONFIG_COMPAT -static long pp_compat_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); -} -#endif - static int pp_open(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); @@ -790,9 +782,7 @@ static const struct file_operations pp_fops = { .write = pp_write, .poll = pp_poll, .unlocked_ioctl = pp_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl...
2019 Apr 19
0
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...@ static long pp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) > return ret; > } > > -#ifdef CONFIG_COMPAT > -static long pp_compat_ioctl(struct file *file, unsigned int cmd, > - unsigned long arg) > -{ > - return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); > -} > -#endif > - > static int pp_open(struct inode *inode, struct file *file) > { > unsigned int minor = iminor(inode); > @@ -790,9 +782,7 @@ static const struct file_operations pp_fops = { > .write = pp_write, > .poll = pp_poll, > .unlocked_ioctl...
2018 Sep 12
1
[PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg
...drivers/char/ppdev.c @@ -674,14 +674,6 @@ static long pp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) return ret; } -#ifdef CONFIG_COMPAT -static long pp_compat_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); -} -#endif - static int pp_open(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); @@ -790,9 +782,7 @@ static const struct file_operations pp_fops = { .write = pp_write, .poll = pp_poll, .unlocked_ioctl = pp_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl...
2019 Jul 30
2
[PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl
...drivers/char/ppdev.c @@ -670,14 +670,6 @@ static long pp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) return ret; } -#ifdef CONFIG_COMPAT -static long pp_compat_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); -} -#endif - static int pp_open(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); @@ -786,9 +778,7 @@ static const struct file_operations pp_fops = { .write = pp_write, .poll = pp_poll, .unlocked_ioctl = pp_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl...
2020 Jan 02
1
[PATCH v3 13/22] compat_ioctl: scsi: move ioctl handling into drivers
...ts an equivalent compat_ioctl() handler that implements the same commands by calling scsi_compat_ioctl(). The scsi_cmd_ioctl() and scsi_cmd_blk_ioctl() functions are compatible at this point, so any driver that calls those can do so for both native and compat mode, with the argument passed through compat_ptr(). With this, we can remove the entries from fs/compat_ioctl.c. The new code is larger, but should be easier to maintain and keep updated with newly added commands. Signed-off-by: Arnd Bergmann <arnd at arndb.de> --- drivers/block/virtio_blk.c | 3 + drivers/scsi/ch.c | 9 ++-...
2019 Dec 11
3
[PATCH 00/24] block, scsi: final compat_ioctl cleanup
...ompat read/write interface compat_ioctl: block: handle BLKREPORTZONE/BLKRESETZONE compat_ioctl: block: handle BLKGETZONESZ/BLKGETNRZONES compat_ioctl: block: handle add zone open, close and finish ioctl compat_ioctl: block: handle Persistent Reservations compaT_ioctl: ubd, aoe: use blkdev_compat_ptr_ioctl compat_ioctl: move CDROM_SEND_PACKET handling into scsi compat_ioctl: move CDROMREADADIO to cdrom.c compat_ioctl: cdrom: handle CDROM_LAST_WRITTEN compat_ioctl: block: handle cdrom compat ioctl in non-cdrom drivers compat_ioctl: add scsi_compat_ioctl compat_ioctl: bsg: add handler...
2019 Dec 11
0
[PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers
...ts an equivalent compat_ioctl() handler that implements the same commands by calling scsi_compat_ioctl(). The scsi_cmd_ioctl() and scsi_cmd_blk_ioctl() functions are compatible at this point, so any driver that calls those can do so for both native and compat mode, with the argument passed through compat_ptr(). With this, we can remove the entries from fs/compat_ioctl.c. The new code is larger, but should be easier to maintain and keep updated with newly added commands. Signed-off-by: Arnd Bergmann <arnd at arndb.de> --- drivers/block/virtio_blk.c | 3 + drivers/scsi/ch.c | 9 ++-...
2007 Apr 18
1
[rfc][patch][linux] ioctl32() compat plumbing for xen calls
...ude <asm/uaccess.h> +#include <xen/public/privcmd.h> + +int privcmd_ioctl_32(int fd, unsigned int cmd, unsigned long arg) +{ + int ret; + + switch (cmd) { + case IOCTL_PRIVCMD_MMAP_32: { + struct privcmd_mmap *p; + struct privcmd_mmap_32 *p32; + struct privcmd_mmap_32 n32; + + p32 = compat_ptr(arg); + p = compat_alloc_user_space(sizeof(*p)); + if (copy_from_user(&n32, p32, sizeof(n32)) || + put_user(n32.num, &p->num) || + put_user(n32.dom, &p->dom) || + put_user(compat_ptr(n32.entry), &p->entry)) + return -EFAULT; + + ret = sys_ioctl(fd, IOC...
2018 Mar 14
0
[PATCH] vhost: add vsock compat ioctl
...rao at chromium.org> I think you need to convert the pointer argument though. Something along the lines of: #ifdef CONFIG_COMPAT static long vhost_vsock_dev_compat_ioctl(struct file *f, unsigned int ioctl, unsigned long arg) { return vhost_vsock_dev_ioctl(f, ioctl, (unsigned long)compat_ptr(arg)); } #endif > --- > drivers/vhost/vsock.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c > index 0d14e2ff19f16..d0e65e92110e5 100644 > --- a/drivers/vhost/vsock.c > +++ b/drivers/vhost/vsock.c > @@ -705,6...
2005 Nov 05
2
[PATCH 00/25] reduce code in fs/compat_ioctl.c
On S?nnavend 05 November 2005 00:51, Christoph Hellwig wrote: > On Sat, Nov 05, 2005 at 12:10:46AM +0100, Arnd Bergmann wrote: > > > > BTW, I now have a set of 25 patches that moves all handlers from > > fs/compat_ioctl.c over to the respective drivers and subsystems, > > but I'm not sure how to best test that. > > I intend to at least give it a test run on my
2005 Nov 05
2
[PATCH 00/25] reduce code in fs/compat_ioctl.c
On S?nnavend 05 November 2005 00:51, Christoph Hellwig wrote: > On Sat, Nov 05, 2005 at 12:10:46AM +0100, Arnd Bergmann wrote: > > > > BTW, I now have a set of 25 patches that moves all handlers from > > fs/compat_ioctl.c over to the respective drivers and subsystems, > > but I'm not sure how to best test that. > > I intend to at least give it a test run on my
2005 Apr 21
1
[PATCH]: ioctl wrappers for EXT3_IOC_GROUP_{EXTEND,ADD}
...ERSION: cmd = EXT3_IOC_SETVERSION; break; + case EXT3_IOC32_GROUP_EXTEND: cmd= EXT3_IOC_GROUP_EXTEND; break; + case EXT3_IOC32_GETVERSION_OLD: cmd = EXT3_IOC_GETVERSION_OLD; break; + case EXT3_IOC32_SETVERSION_OLD: cmd = EXT3_IOC_SETVERSION_OLD; break; } return sys_ioctl(fd, cmd, (unsigned long)compat_ptr(arg)); } @@ -3274,10 +3280,12 @@ HANDLE_IOCTL(GIO_UNIMAP, do_unimap_ioctl) HANDLE_IOCTL(KDFONTOP, do_kdfontop_ioctl) #endif -HANDLE_IOCTL(EXT2_IOC32_GETFLAGS, do_ext2_ioctl) -HANDLE_IOCTL(EXT2_IOC32_SETFLAGS, do_ext2_ioctl) -HANDLE_IOCTL(EXT2_IOC32_GETVERSION, do_ext2_ioctl) -HANDLE_IOCTL(EXT2_...
2019 Dec 11
4
[PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers
...octl() > handler that implements the same commands by calling scsi_compat_ioctl(). > > The scsi_cmd_ioctl() and scsi_cmd_blk_ioctl() functions are compatible > at this point, so any driver that calls those can do so for both native > and compat mode, with the argument passed through compat_ptr(). > > With this, we can remove the entries from fs/compat_ioctl.c. The new > code is larger, but should be easier to maintain and keep updated with > newly added commands. > > Signed-off-by: Arnd Bergmann <arnd at arndb.de> > --- > drivers/block/virtio_blk.c | 3...
2019 Dec 11
4
[PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers
...octl() > handler that implements the same commands by calling scsi_compat_ioctl(). > > The scsi_cmd_ioctl() and scsi_cmd_blk_ioctl() functions are compatible > at this point, so any driver that calls those can do so for both native > and compat mode, with the argument passed through compat_ptr(). > > With this, we can remove the entries from fs/compat_ioctl.c. The new > code is larger, but should be easier to maintain and keep updated with > newly added commands. > > Signed-off-by: Arnd Bergmann <arnd at arndb.de> > --- > drivers/block/virtio_blk.c | 3...
2010 Nov 29
5
[PATCH 0/2] tools/virtio: virtio_ring testing tool
This implements a virtio simulator: - adds stubs for enough support functions to compile virtio ring in userspace. - Adds a stub vhost based module this can talk to. This should help us decide things like which ring layout works best. Communication is currently done using an eventfd descriptor. This means there's a shared spinlock there: what I would like to do in the future, is run
2010 Nov 29
5
[PATCH 0/2] tools/virtio: virtio_ring testing tool
This implements a virtio simulator: - adds stubs for enough support functions to compile virtio ring in userspace. - Adds a stub vhost based module this can talk to. This should help us decide things like which ring layout works best. Communication is currently done using an eventfd descriptor. This means there's a shared spinlock there: what I would like to do in the future, is run
2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...TLCMD) + r = vhost_vring_ioctl(&m->dev, cmd, argp); + } + +done: + mutex_lock(&m->mutex); + return r; +} + +#ifdef CONFIG_COMPAT +static long vhost_mdev_compat_ioctl(struct file *f, unsigned int ioctl, + unsigned long arg) +{ + return vhost_mdev_ioctl(f, ioctl, (unsigned long)compat_ptr(arg)); +} +#endif + +static const struct file_operations vhost_mdev_fops = { + .owner = THIS_MODULE, + .release = vhost_mdev_release, + .unlocked_ioctl = vhost_mdev_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = vhost_mdev_compat_ioctl, +#endif + .open = vhost_mdev_open, + .llseek = noop_llseek,...
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...; case VHOST_GET_FEATURES: @@ -1013,11 +1023,21 @@ static long vhost_scsi_ioctl(struct file *f, unsigned int ioctl, } } +#ifdef CONFIG_COMPAT +static long vhost_scsi_compat_ioctl(struct file *f, unsigned int ioctl, + unsigned long arg) +{ + return vhost_scsi_ioctl(f, ioctl, (unsigned long)compat_ptr(arg)); +} +#endif + static const struct file_operations vhost_scsi_fops = { .owner = THIS_MODULE, .release = vhost_scsi_release, .unlocked_ioctl = vhost_scsi_ioctl, - /* TODO compat ioctl? */ +#ifdef CONFIG_COMPAT + .compat_ioctl = vhost_scsi_compat_ioctl, +#endif .open...
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...; case VHOST_GET_FEATURES: @@ -1013,11 +1023,21 @@ static long vhost_scsi_ioctl(struct file *f, unsigned int ioctl, } } +#ifdef CONFIG_COMPAT +static long vhost_scsi_compat_ioctl(struct file *f, unsigned int ioctl, + unsigned long arg) +{ + return vhost_scsi_ioctl(f, ioctl, (unsigned long)compat_ptr(arg)); +} +#endif + static const struct file_operations vhost_scsi_fops = { .owner = THIS_MODULE, .release = vhost_scsi_release, .unlocked_ioctl = vhost_scsi_ioctl, - /* TODO compat ioctl? */ +#ifdef CONFIG_COMPAT + .compat_ioctl = vhost_scsi_compat_ioctl, +#endif .open...