Re: [RESEND PATCH V4] staging: vchiq_arm: Add compatibility wrappers for ioctls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2017-03-02 at 21:07 +0100, Stefan Wahren wrote:
> > Michael Zoran <mzoran@xxxxxxxxxxxx> hat am 2. März 2017 um 04:41
> > geschrieben:
> 
> > +static long
> > +vchiq_compat_ioctl_dump_phys_mem(struct file *file,
> > +				 unsigned int cmd,
> > +				 unsigned long arg)
> > +{
> > +	VCHIQ_DUMP_MEM_T *args;
> > +	struct vchiq_dump_mem32 args32;
> > +
> > +	args = compat_alloc_user_space(sizeof(*args));
> > +	if (!args)
> > +		return -EFAULT;
> > +
> > +	if (copy_from_user(&args32,
> > +			   (struct vchiq_dump_mem32 *)arg,
> > +			   sizeof(args32)))
> > +		return -EFAULT;
> > +
> > +	if (put_user(compat_ptr(args32.virt_addr), &args-
> > >virt_addr) ||
> > +	    put_user(args32.num_bytes, &args->num_bytes))
> > +		return -EFAULT;
> > +
> > +	return vchiq_ioctl(file, VCHIQ_IOC_DUMP_PHYS_MEM,
> > (unsigned long)args);
> > +}
> 
> Do we have any user of this ioctl? I had a better feeling if we could
> make this a no-op.

The only use I could find is the vcdbg application from Raspbian which
is a utility for dumping symbols in the released version of the
firmware.(Which I didn't find very helpful to me)

Unfortunatly, the vcdbg application has a weird dependency on the
downstream only video driver for DMA copying data between arbitrary
memory locations.   vcdbg also uses a few of the others vc04_services
based drivers for which it was decided not to have in this tree.

So it's complex... This ioctl doesn't make sure here, just yet they
probably would want it for Raspbian.


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux