On Fri, Jul 6, 2018 at 2:38 PM James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> wrote: > > This is two minor bug fixes (aacraid, target) and a fix for a potential > exploit in the way sg handles teardown. Gahh. Is this where the IB people got their insane model from, using read/write as ioclt replacements? We have that ib_safe_file_access() hack for IB for this exact reason. Who actually does direct read/write to /dev/sg? Could we perhaps just add a config option to disable it entirely? If you want to send a SCSI command, why don't you just use SG_IO? That's the only thing that actually works on most devices (ie anything that isn't /dev/sg, and nobody sane uses /dev/sg any more). Linus