public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-scsi <linux-scsi@vger.kernel.org>,
	tdovera@gmail.com, zfs-fuse@sehe.nl
Subject: Re: sending ioctl warnings for a partition
Date: Sun, 05 Feb 2012 00:30:50 +0100	[thread overview]
Message-ID: <4F2DBFAA.1040702@redhat.com> (raw)
In-Reply-To: <4F2D78D5.6050703@interlog.com>

On 02/04/2012 07:28 PM, Douglas Gilbert wrote:
>
> If I'm not mistaken, the whole point of a series of patches
> titled: "fail SCSI passthrough ioctls on partition devices"
> was to flag and ultimately break any user space code that
> attempted to use the SG_IO ioctl on a partition block
> device (e.g. send a SCSI INQUIRY via SG_IO to /dev/sda2).
>
> This is for security reasons. So when the kernel enforces
> that, zfs-fuse will break. Please alert the zfs-fuse
> maintainers.

That's correct.  zfs-fuse is trying to send a SYNCHRONIZE CACHE command, 
they should just use BLKFLSBUF (which will also give a warning due to a 
quirk in block/ioctl.c, but it's a false positive and the warning will 
go away soonish).

In principle, SYNCHRONIZE CACHE is "safe" even if sent to a partition 
and doesn't really leak anything, but I'm not sure we want to look into 
the CDB in scsi_ioctl.c.

Paolo

  reply	other threads:[~2012-02-04 23:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-04 16:05 sending ioctl warnings for a partition Tullio Dovera
2012-02-04 18:28 ` Douglas Gilbert
2012-02-04 23:30   ` Paolo Bonzini [this message]
2012-02-05 14:14     ` Paolo Bonzini
2012-02-07 16:34       ` Tullio Dovera
  -- strict thread matches above, loose matches on Subject: below --
2012-02-27 10:48 Milan Knížek
2012-02-28 20:48 ` Tullio Dovera

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=4F2DBFAA.1040702@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tdovera@gmail.com \
    --cc=zfs-fuse@sehe.nl \
    /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