Il 25/05/2013 09:11, Christoph Hellwig ha scritto: > > Linus wanted to keep that for CAP_SYS_RAWIO. We found two uses of SG_IO > > on partitions: zfs-fuse used SYNCHRONIZE CACHE; some proprietary driver > > used TEST UNIT READY. > > > > Really, the solution is to make the bitmaps configurable in userspace. > > It is no less secure than unpriv_sgio. Then the kernel can be > > configured at build-time to have either an MMC bitmap and a basic > > whitelist of a dozen commands. We can even avoid working around those > > few conflicting opcodes; if you're paranoid you can just configure your > > kernel right. > > Keep it simple. Allowing SG_IO for CAP_SYS_RAWIO probably is fine, > allowing it for permissions only clearly isn't. All the per-command > filetering is just complete bullshit and the kind of bloat that > eventually will make Linux unmaintainable. What I'm proposing is: - by default, only allow INQUIRY / REPORT LUNS / TEST UNIT READY. Keep the old whitelist available for backwards-compatibility, configurable at build-time. - let CAP_SYS_ADMIN users set a different per-device whitelist. Paolo -- 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