Re: SG_IO and security

Jens Axboe
2004-08-13T06:59:44Z

On Thu, Aug 12 2004, Linus Torvalds wrote:
>
>
> On Thu, 12 Aug 2004, Alan Cox wrote:
> > > >
> > > > Hmm.. This still allows the old "junk" commands (SCSI_IOCTL_SEND_COMMAND).
> >
> > That uses sg_io() so gets caught as well unless I screwed up following
> > the code paths.
>
> No, while the cdrom_ioctl thing does use sg_io, the really old and
> horrible sg_scsi_ioctl thing does it's own commands by hand.
>
> I don't know why. I get the feeling that it _should_ use sg_io().

While that does make sense, it would be more code to fold them together
than what is currently there. SCSI_IOCTL_SEND_COMMAND is really
horrible, the person inventing that API should be subject to daily
public ridicule.

--
Jens Axboe