FUJITA Tomonori wrote:
Well, this changes sg behaviour since sg's allow_ops filter has a
access permission different from blk_verify_command filter's.
>
I guess that the first thing you need to do is that figuring out a
proper access permission for each command, which sg maintainer, etc
can agree. It's pretty hard and that's the reason why this patch has
not been merged for years, I think.
I don't think this logic is sound.
The patch makes it so distros (and individuals, if they're so inclined)
can configure the filter correctly for whatever hardware is present,
regardless of the kernel's ideas of which commands are correct. It
leaves intact the defaults from the current list used by SG_IO and bsg
(and maybe some other interfaces?), which most programs have been using
for quite some time.
If anything, sg is overdue with converting to using the same command
filter as other direct-scsi-command mechanisms. sg_allow_access() is
really not something we should be keeping.
I don't think this is a reason not to merge the patch; in fact, quite
the opposite. This is another case where we've got a specific filter in
one code path that doesn't match any of the others. Fixing it is
something that needs to be done. Making it configurable from the
userland at the same time effectively aleviates the pain that could
result from doing so.
--
Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html