All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: Tullio Dovera <tdovera@gmail.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: sending ioctl warnings for a partition
Date: Sat, 04 Feb 2012 13:28:37 -0500	[thread overview]
Message-ID: <4F2D78D5.6050703@interlog.com> (raw)
In-Reply-To: <CANDSw5hvEwgCaXsk+OxBQ_xL+WiTLbTrVhB9H_W4NuU86bCNLQ@mail.gmail.com>

On 12-02-04 11:05 AM, Tullio Dovera wrote:
> My platform is based on linux v3.2.2 + Debian stable zfs-fuse-0.6.9-1
> application
>
> When I use a dedicated scsi partition for zfs-fuse I see the following
> warnings at kernel level:
>
> kernel: [   12.881949] zfs-fuse: sending ioctl 2285 to a partition!
>
> The SG_IO is blocked inside scsi_verify_blk_ioctl() function. In order to permit
> SG_IO for a partition I suggest to add it in the white list:
>
> --- a/block/scsi_ioctl.c	2012-02-01 11:10:41.000000000 +0100
> +++ b/block/scsi_ioctl.c	2012-02-01 11:31:09.000000000 +0100
> @@ -710,6 +710,7 @@
>   	case SG_GET_RESERVED_SIZE:
>   	case SG_SET_RESERVED_SIZE:
>   	case SG_EMULATED_HOST:
> +	case SG_IO:
>   		return 0;
>   	case CDROM_GET_CAPABILITY:
>   		/* Keep this until we remove the printk below.  udev sends it

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.

Doug Gilbert



  reply	other threads:[~2012-02-04 18:28 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 [this message]
2012-02-04 23:30   ` Paolo Bonzini
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=4F2D78D5.6050703@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tdovera@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.