From: Jens Axboe <axboe@suse.de>
To: Douglas Gilbert <dougg@torque.net>
Cc: Pat LaVarre <p.lavarre@ieee.org>, linux-scsi@vger.kernel.org
Subject: Re: SG_IO open flags are which
Date: Thu, 18 Dec 2003 10:47:43 +0100 [thread overview]
Message-ID: <20031218094743.GU2495@suse.de> (raw)
In-Reply-To: <3FE121D3.6050300@torque.net>
On Thu, Dec 18 2003, Douglas Gilbert wrote:
> the SG_IO ioctl came along in lk 2.4. The sg driver will only allow
> the following SCSI commands through if the file was opened O_RDONLY:
> TEST_UNIT_READY
> REQUEST_SENSE
> INQUIRY
> READ_CAPACITY
> READ_BUFFER
> READ_6
> READ_10
> READ_12
> MODE_SENSE
> MODE_SENSE_10
> LOG_SENSE
I think that's bogus to attempt to put such vague restrictions on what
you can do with the open device. What purpose does it serve?!
> _not_ on the list. The SG_IO ioctl() found in block/scsi_ioctl.c
> does not have this restriction so you can issue any SCSI
> commands when /dev/sda, for example, is opened O_RDONLY.
Thankfully, and that's quite on purpose.
--
Jens Axboe
next prev parent reply other threads:[~2003-12-18 9:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-15 16:39 SG_IO open flags are which Pat LaVarre
2003-12-18 3:41 ` Douglas Gilbert
2003-12-18 9:47 ` Jens Axboe [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-04-06 0:49 Pat LaVarre
2004-05-20 15:16 Pat LaVarre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031218094743.GU2495@suse.de \
--to=axboe@suse.de \
--cc=dougg@torque.net \
--cc=linux-scsi@vger.kernel.org \
--cc=p.lavarre@ieee.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox