Discussion:
SG_IO IOCTL will break zfs-fuse
(too old to reply)
sgheeren
2012-03-10 23:33:26 UTC
Permalink
I just found out on one system, that kernel.log is spammed with
thousands of these:

Mar 11 00:26:49 mubi kernel: [19855.692004] zfs-fuse: sending ioctl 2285
to a partition!
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
I think we should do a little triage/impact analysis?

Cheers,
Seth
--
To post to this group, send email to zfs-fuse-/***@public.gmane.org
To visit our Web site, click on http://zfs-fuse.net/
sgheeren
2012-03-10 23:40:57 UTC
Permalink
Post by sgheeren
I just found out on one system, that kernel.log is spammed with
Mar 11 00:26:49 mubi kernel: [19855.692004] zfs-fuse: sending ioctl 2285
to a partition!
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
I think we should do a little triage/impact analysis?
Cheers,
Seth
Damn, just found out the issue was already reported but I didn't get
notification emails anymore. Anyways more background:

http://zfs-fuse.net/issues/143

http://comments.gmane.org/gmane.linux.scsi/72667

Cheers
--
To post to this group, send email to zfs-fuse-/***@public.gmane.org
To visit our Web site, click on http://zfs-fuse.net/
Emmanuel Anne
2012-03-11 01:18:50 UTC
Permalink
I had seen that in the logs for a long time, but never took the time to
investigate, I actually thought it was a forgotten warning in our code, not
in the kernel.

So it seems related to the flush cache ioctl, and maybe zfs-fuse sends that
too often, because you can reproduce that just by running "zpool list" with
nothing mounted.
The question is : does somebody know how to flush this cache without
getting this warning ?
If you want to investigate, it's in lib/libzpool/flushwc.c
From the lkml : https://lkml.org/lkml/2012/2/10/253
they seem to say that the warning will be removed and the function will
continue to work, so maybe we should just continue to ignore it !
Post by sgheeren
Post by sgheeren
I just found out on one system, that kernel.log is spammed with
Mar 11 00:26:49 mubi kernel: [19855.692004] zfs-fuse: sending ioctl 2285
to a partition!
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
I think we should do a little triage/impact analysis?
Cheers,
Seth
Damn, just found out the issue was already reported but I didn't get
http://zfs-fuse.net/issues/143
http://comments.gmane.org/gmane.linux.scsi/72667
Cheers
--
To visit our Web site, click on http://zfs-fuse.net/
--
my zfs-fuse git repository :
http://rainemu.swishparty.co.uk/cgi-bin/gitweb.cgi?p=zfs;a=summary
--
To post to this group, send email to zfs-fuse-/***@public.gmane.org
To visit our Web site, click on http://zfs-fuse.net/
Loading...