Skip to content

Devices accessibility control group (v3, release candidate)

Pavel Emelyanov containers 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 15 repliesIn review

Changes from v2 from the cover letter

* Fixed problems pointed out by Sukadev with permissions revoke. Now we have to perform kobject re-lookup on each char device open, just like for block ones, so I think this is OK.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Some changes in the kobject mapperdrivers/base/map.c include/linux/kobj_map.h+115 -80 replies
2/4The character devices layer changesfs/char_dev.c include/linux/cdev.h+83 -30 replies
3/4The block devices layer changesblock/genhd.c fs/block_dev.c include/linux/genhd.h+93 -60 replies
4/4The control group itselfDocumentation/controllers/devices.txt fs/Makefile fs/devscontrol.c +3 more+422 -014 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Devices accessibility control group (v3, release candidate)

Changes from v2:
* Fixed problems pointed out by Sukadev with permissions revoke. Now we have to perform kobject re-lookup on each char device open, just like for block ones, so I think this is OK.

The /proc/devices tune is still in TODO list, as I have problems with getting majors _in_a_simple_manner_ from a map, that contains a mix of major/minor pairs in arbitrary order.

The second version is here:
http://openvz.org/pipermail/devel/2008-January/010160.html
Changes from v1:

* Added the block devices support :) It turned out to be a bit simpler than the char one (or I missed something significant);
* Now we can enable/disable not just individual devices, but the whole major with all its minors (see the TODO list beyond as well);
* Added the ability to restrict the read/write permissions to devices, not just visible/invisible state.

The first version was here:
http://openvz.org/pipermail/devel/2007-September/007647.html

I still don't pay much attention to split this set well, so this will most likely won't work with git-bisect, but I think this is OK for now. I will sure split it better when I send it to Andrew.

The set is prepared against the 2.6.24-rc8-mm1.

To play with it - run a standard procedure:

 # mount -t container none /cont/devs -o devices
 # mkdir /cont/devs/0
 # echo -n $$ > /cont/devs/0/tasks

and tune device permissions.

Thanks,
Pavel