cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Staring with 3.14 devices.allow can't be opened in read-write mode
@ 2014-05-12 11:10 Andrey Wagin
       [not found] ` <CANaxB-xUm3rJ-Cbp72q-rQJO5mZe1qK6qXsQM=vh0U8upJ44+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey Wagin @ 2014-05-12 11:10 UTC (permalink / raw)
  To: Tejun Heo, Li Zefan, Linux Containers,
	cgroups-u79uwXL29TY76Z2rM5mHXA
  Cc: libcg-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hello All,

I found the "devices.allow" file can't be opened in read-write mode on
the 3.14 kernel. I uses libcgroup, which opens devices.allow with
O_RDWR. This works fine before 3.14 and fails one 3.14. This files has
write-only permissions. I have tried to create a regular file with the
same permission and kernel allows to open it with O_RDWR.
So what do you think is it a problem, which must be fixed?

5136  stat("/sys/fs/cgroup/devices//vz-101/devices.allow",
{st_mode=S_IFREG|0200, st_size=0, ...}) = 0
5136  open("/sys/fs/cgroup/devices//vz-101/devices.allow",
O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)

Linux avagin-fc19-cr 3.14.0+ #294 SMP Fri Apr 11 20:02:26 MSK 2014
x86_64 x86_64 x86_64 GNU/Linux

----> 1 os.open("/sys/fs/cgroup/devices/devices.deny", os.O_RDWR)

OSError: [Errno 13] Permission denied: '/sys/fs/cgroup/devices/devices.deny'

[root@avagin-fc19-cr ~]# ls -l /sys/fs/cgroup/devices/devices.deny
--w------- 1 root root 0 May  7 15:16 /sys/fs/cgroup/devices/devices.deny


Linux localhost.localdomain 3.13.8-200.fc20.x86_64 #1 SMP Tue Apr 1
03:35:46 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

In [2]: os.open("/sys/fs/cgroup/devices/devices.deny", os.O_RDWR)
Out[2]: 5

[root@localhost avagin]# ls -l /sys/fs/cgroup/devices/devices.deny
--w------- 1 root root 0 May  3 16:12 /sys/fs/cgroup/devices/devices.deny

Thanks,
Andrey

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

end of thread, other threads:[~2014-05-12 20:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 11:10 Staring with 3.14 devices.allow can't be opened in read-write mode Andrey Wagin
     [not found] ` <CANaxB-xUm3rJ-Cbp72q-rQJO5mZe1qK6qXsQM=vh0U8upJ44+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-12 15:19   ` Tejun Heo
     [not found]     ` <20140512151908.GC1421-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2014-05-12 17:56       ` [PATCH driver-core-linus] kernfs, sysfs, cgroup: restrict extra perm check on open to sysfs Tejun Heo
     [not found]         ` <20140512175627.GE1421-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2014-05-12 20:22           ` Andrey Wagin

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).