* questions about cgroup devices
@ 2017-01-23 7:16 Ma Shimiao
[not found] ` <d28bc963-4936-6574-c606-d2b0c475f0c9-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Ma Shimiao @ 2017-01-23 7:16 UTC (permalink / raw)
To: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi all,
I think I met a problem about cgroup devices.
The following is my detailed operations:
# cd /sys/fs/cgroup/devices/
# mkdir test
# echo "c 1:3 rw" > test/devices.deny
# cat test/devices.list
a *:* rwm
It seems my setting does not react in devices.list.
But in another terminal, /dev/null is really limited to access.
$ sudo cgexec -g devices:test dd if=/dev/zero of=/dev/null bs=1M count=128
dd: failed to open '/dev/null': Operation not permitted
So, is this a bug of cgroup devices?
Environment:
OS version: Fefora 25
Kernel version: 4.8.15-300.fc25.x86_64
Thanks
--
Ma Shimiao
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <d28bc963-4936-6574-c606-d2b0c475f0c9-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>]
* Re: questions about cgroup devices [not found] ` <d28bc963-4936-6574-c606-d2b0c475f0c9-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> @ 2017-01-23 7:35 ` Zefan Li [not found] ` <5885B245.2030901-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Zefan Li @ 2017-01-23 7:35 UTC (permalink / raw) To: Ma Shimiao, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On 2017/1/23 15:16, Ma Shimiao wrote: > Hi all, > > I think I met a problem about cgroup devices. > > The following is my detailed operations: > > # cd /sys/fs/cgroup/devices/ > # mkdir test > # echo "c 1:3 rw" > test/devices.deny > # cat test/devices.list > a *:* rwm > > It seems my setting does not react in devices.list. > > But in another terminal, /dev/null is really limited to access. > $ sudo cgexec -g devices:test dd if=/dev/zero of=/dev/null bs=1M count=128 > dd: failed to open '/dev/null': Operation not permitted > > So, is this a bug of cgroup devices? > It's not a bug. It's a feature introduced by commit ad676077a2ae4af4bb. That said, I don't like this feature at all, because it's very confusing, and obviously you are confused. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <5885B245.2030901-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>]
* Re: questions about cgroup devices [not found] ` <5885B245.2030901-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> @ 2017-01-23 7:51 ` Ma Shimiao 2017-01-23 7:58 ` Ma Shimiao 1 sibling, 0 replies; 4+ messages in thread From: Ma Shimiao @ 2017-01-23 7:51 UTC (permalink / raw) To: Zefan Li, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On 01/23/2017 03:35 PM, Zefan Li wrote: > It's not a bug. It's a feature introduced by commit ad676077a2ae4af4bb. Oh, got it. > That said, I don't like this feature at all, because it's very confusing, > and obviously you are confused. Yes, I am really confused about this. And, another problem is I can't allow/deny all devices. # echo a > /sys/fs/cgroup/devices/test/devices.deny -bash: echo: write error: Invalid argument # echo a > /sys/fs/cgroup/devices/test/devices.allow -bash: echo: write error: Invalid argument Is this also a new feature? -- Ma Shimiao Development Dept.I Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: questions about cgroup devices [not found] ` <5885B245.2030901-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> 2017-01-23 7:51 ` Ma Shimiao @ 2017-01-23 7:58 ` Ma Shimiao 1 sibling, 0 replies; 4+ messages in thread From: Ma Shimiao @ 2017-01-23 7:58 UTC (permalink / raw) To: Zefan Li, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Hi Li, On 01/23/2017 03:35 PM, Zefan Li wrote: > It's not a bug. It's a feature introduced by commit ad676077a2ae4af4bb. > That said, I don't like this feature at all, because it's very confusing, > and obviously you are confused. I have another question. If devices.list does not react my settings, how to easily find out I have made the right setting for cgroup devices? For example, what has been allowed and what has been denied in cgroup devices. Thanks, -- Ma Shimiao Development Dept.I Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-23 7:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-23 7:16 questions about cgroup devices Ma Shimiao
[not found] ` <d28bc963-4936-6574-c606-d2b0c475f0c9-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2017-01-23 7:35 ` Zefan Li
[not found] ` <5885B245.2030901-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-01-23 7:51 ` Ma Shimiao
2017-01-23 7:58 ` Ma Shimiao
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.