Skip to contentSkip to conversation

cgroups: add documentation on extended attributes and simple_xattr functions

PATCH Superseded Aristeu Rozanski 2 participants 5 messages Sep 5, 2012

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover cgroups: add documentation on extended attributes and simple_xattr functions

cgroups: add documentation on extended attributes and simple_xattr functions

These patches add documentation on the new functions and current specific cgroup usage.

Cc Li Zefan <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Hillf Danton <[email protected]>
Cc Lennart Poettering <[email protected]>
Signature · 1 line
Aristeu
#1 lore raw

PATCH 1/2 cgroups: add documentation on extended attributes usage

Cc Li Zefan <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Hillf Danton <[email protected]>
Cc Lennart Poettering <[email protected]>
---
 Documentation/cgroups/00-INDEX  |    2 ++
 Documentation/cgroups/xattr.txt |   21 +++++++++++++++++++++
 2 files changed, 23 insertions(+)
Documentation/cgroups/00-INDEX +2 -0
@@ -16,3 +16,5 @@ memory.txt
 	- Memory Resource Controller; design, accounting, interface, testing.
 resource_counter.txt
 	- Resource Counter API.
+xattr.txt
+	- Extended attributes support and usage in cgroup filesystem
Documentation/cgroups/xattr.txt new file +21 -0
@@ -0,0 +1,21 @@
+Extended Attributes Usage in cgroup Filesystem
+
+1. Usage
+
+cgroup filesystem supports certain types of extended attributes in its
+directories and files.  The current supported types are:
+	- Trusted (XATTR_TRUSTED)
+	- Security (XATTR_SECURITY)
+
+Both require CAP_SYS_ADMIN capability to set.
+
+Like in tmpfs, the extended attributes in cgroup filesystem are stored
+using kernel memory and it's advised to keep the usage at minimum.  This
+is the reason why user defined extended attributes are not supported, since
+any user can do it and there's no limit in the value size.
+
+2. Users
+
+The current known users for this feature are SELinux to limit cgroup usage
+in containers and systemd for assorted meta data like main PID in a cgroup
+(systemd creates a cgroup per service).
maintainer
#2 lore raw

Re: [PATCH 1/2] cgroups: add documentation on extended attributes usage

Quoted 3 lines · Aristeu Rozanski
 Documentation/cgroups/00-INDEX  |    2 ++
 Documentation/cgroups/xattr.txt |   21 +++++++++++++++++++++
 2 files changed, 23 insertions(+)

Please put it in cgroups.txt.

Thanks.

Signature · 1 line
tejun
#3 lore raw

PATCH 2/2 fs: add documentation to simple_xattr functions

In reply to Aristeu Rozanski
Cc Li Zefan <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Hillf Danton <[email protected]>
Cc Lennart Poettering <[email protected]>
---
 Documentation/filesystems/00-INDEX         |    3 ++
 Documentation/filesystems/simple_xattr.txt |   42 +++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+)
Documentation/filesystems/00-INDEX +3 -0
Index: github/Documentation/filesystems/00-INDEX
===================================================================
@@ -96,6 +96,9 @@
 	- how to use the seq_file API
 sharedsubtree.txt
 	- a description of shared subtrees for namespaces.
+simple_xattr.txt
+	- description of extended attributes for memory backed filesystems
+	  like tmpfs and cgroup filesystem.
 spufs.txt
 	- info and mount options for the SPU filesystem used on Cell.
 sysfs-pci.txt
Documentation/filesystems/simple_xattr.txt new file +42 -0

42 lines not on this page · raw message