linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] ublk_drv: add mechanism for supporting unprivileged ublk device
@ 2022-11-16  6:08 Ming Lei
  2022-11-16  6:08 ` [PATCH 1/6] ublk_drv: remove nr_aborted_queues from ublk_device Ming Lei
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Ming Lei @ 2022-11-16  6:08 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, ZiyangZhang, Stefan Hajnoczi, Ming Lei

Hello,

Stefan Hajnoczi suggested un-privileged ublk device[1] for container
use case.

So far only administrator can create/control ublk device which is too
strict and increase system administrator burden, and this patchset
implements un-privileged ublk device:

- any user can create ublk device, which can only be controlled &
  accessed by the owner of the device or administrator

For using such mechanism, system administrator needs to deploy two
simple udev rules[2] after running 'make install' in ublksrv.

Userspace(ublksrv):

	https://github.com/ming1/ubdsrv/tree/unprivileged-ublk
    
'ublk add -t $TYPE --un_privileged=1' is for creating one un-privileged
ublk device if the user is un-privileged.


[1] https://lore.kernel.org/linux-block/YoOr6jBfgVm8GvWg@stefanha-x1.localdomain/
[2] https://github.com/ming1/ubdsrv/blob/unprivileged-ublk/README.rst#un-privileged-mode

Ming Lei (6):
  ublk_drv: remove nr_aborted_queues from ublk_device
  ublk_drv: don't probe partitions if the ubq daemon isn't trusted
  ublk_drv: move ublk_get_device_from_id into ublk_ctrl_uring_cmd
  ublk_drv: add device parameter UBLK_PARAM_TYPE_DEVT
  ublk_drv: add module parameter of ublks_max for limiting max allowed
    ublk dev
  ublk_drv: add mechanism for supporting unprivileged ublk device

 Documentation/block/ublk.rst  |  18 +-
 drivers/block/ublk_drv.c      | 340 ++++++++++++++++++++++++----------
 include/uapi/linux/ublk_cmd.h |  49 ++++-
 3 files changed, 299 insertions(+), 108 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-11-22  7:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-16  6:08 [PATCH 0/6] ublk_drv: add mechanism for supporting unprivileged ublk device Ming Lei
2022-11-16  6:08 ` [PATCH 1/6] ublk_drv: remove nr_aborted_queues from ublk_device Ming Lei
2022-11-18  9:02   ` Ziyang Zhang
2022-11-16  6:08 ` [PATCH 2/6] ublk_drv: don't probe partitions if the ubq daemon isn't trusted Ming Lei
2022-11-18 10:03   ` Ziyang Zhang
2022-11-18 11:51     ` Ming Lei
2022-11-16  6:08 ` [PATCH 3/6] ublk_drv: move ublk_get_device_from_id into ublk_ctrl_uring_cmd Ming Lei
2022-11-16  6:08 ` [PATCH 4/6] ublk_drv: add device parameter UBLK_PARAM_TYPE_DEVT Ming Lei
2022-11-16  6:08 ` [PATCH 5/6] ublk_drv: add module parameter of ublks_max for limiting max allowed ublk dev Ming Lei
2022-11-16  6:08 ` [PATCH 6/6] ublk_drv: add mechanism for supporting unprivileged ublk device Ming Lei
2022-11-17 13:17   ` Ming Lei
2022-11-22  7:17   ` Dan Carpenter
2022-11-22  7:47     ` Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).