Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMD

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

 



On Sunday 20 March 2011, MichaÅ MirosÅaw wrote:
> 2011/3/20 John Calixto <john.calixto@xxxxxxxxxxxxxx>:
> > On Sat, 19 Mar 2011, Arnd Bergmann wrote:
> [...]
> >> > I expect for more general purposes, like your qemu passthrough case, you
> >> > would want to add a handler for cmd=SD_IOC_CMD?
> >> Yes, but I suspect that would mean blocking all other activity on the
> >> same device, possibly with an ioctl for claiming the host for an
> >> extended period of time.
> > Sure.  And if the testing I described above shows that regular block
> > operations are indeed negatively affected, then I'll have to implement
> > that ioctl for claiming the host myself and you'll have a head start! :)
> 
> This idea is scary. ;-) Just think what would happen if userspace made
> this sequence:
> 1. fd = open(dev)
> 2. ioctl(fd, claim host)
> 3. read(fd, ...)
> 
> (if 3. is not convincing, replace it with any access to mounted
> filesystem from the same card.)

I agree. If we allow such a command on a block device, that
should probably be mutually exclusive with normal read/write
access or mounting the block device, and it needs to be a
priviledged operation.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux