Re: [dm-devel] linux-next: Tree for Feb 2 (drivers/md/dm.c)

2017-02-02 Thread Paolo Bonzini


On 02/02/2017 10:44, Christoph Hellwig wrote:
> ec8013bedd ("dm: do not forward ioctls from logical volumes to the
> underlying device"),
> 
> The trivial fix would be to add a select of the SCSI_REQUEST symbol
> to dm, but my gut feeling teels me the call is simply wrong, and
> should be removed and instead all ioctls on DM devices that don't
> map to a full underlying devices should be rejected.

I would certainly be fine with that.  It would not be surprising if
something broke, but a middle ground could be to allow all ioctls if you
have CAP_SYS_RAWIO and none if you don't.

Paolo

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


Re: [dm-devel] linux-next: Tree for Feb 2 (drivers/md/dm.c)

2017-02-02 Thread Christoph Hellwig
On Thu, Feb 02, 2017 at 01:29:16PM -0500, Mike Snitzer wrote:
> Are you trying to say that this happens using a certain .config?
> 
> Also, not sure why you didn't cc Christoph (or Jens) seeing as these
> changes are _not_ staged in linux-next by linux-dm.git.

No changes to dm caused this, it was me making the SCSI ioctl / request
code optional.  The tree apparently has nothing pulling in the SCSI
ioctls (SCSI, IDE, virtio, cciss, target, cdrom, etc).  It turns
out DM calls the SCSI ioctl verification functions, despite never
actually using SCSIO ioctls directly, which looks very odd (and which is
why I missed it).

Git-blame for these lines pointes to ... me.  Heh.  But I just moved the
code around, before that every target had a copy of it.  The original
calls seem to come from:

ec8013bedd ("dm: do not forward ioctls from logical volumes to the
underlying device"),

The trivial fix would be to add a select of the SCSI_REQUEST symbol
to dm, but my gut feeling teels me the call is simply wrong, and
should be removed and instead all ioctls on DM devices that don't
map to a full underlying devices should be rejected.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


Re: [dm-devel] linux-next: Tree for Feb 2 (drivers/md/dm.c)

2017-02-02 Thread Mike Snitzer
On Thu, Feb 02 2017 at 12:58pm -0500,
Randy Dunlap  wrote:

> On 02/01/17 23:21, Stephen Rothwell wrote:
> > Hi all,
> > 
> > Changes since 20170201:
> > 
> 
> on x86_64:
> 
> drivers/built-in.o: In function `dm_blk_ioctl':
> dm.c:(.text+0x1a5121): undefined reference to `scsi_verify_blk_ioctl'

Are you trying to say that this happens using a certain .config?

Also, not sure why you didn't cc Christoph (or Jens) seeing as these
changes are _not_ staged in linux-next by linux-dm.git.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


Re: [dm-devel] linux-next: Tree for Feb 2 (drivers/md/dm.c)

2017-02-02 Thread Randy Dunlap
On 02/01/17 23:21, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20170201:
> 

on x86_64:

drivers/built-in.o: In function `dm_blk_ioctl':
dm.c:(.text+0x1a5121): undefined reference to `scsi_verify_blk_ioctl'

# CONFIG_BLK_DEV_BSG is not set
# CONFIG_BLK_DEV_BSGLIB is not set


-- 
~Randy

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel