User: Password:
Subscribe / Log in / New account

cgroup: add xattr support

Subject:  [PATCH v7 0/4] cgroup: add xattr support
Date:  Thu, 23 Aug 2012 16:53:27 -0400
Message-ID:  <>
Cc:  Li Zefan <>, Tejun Heo <>, Hugh Dickins <>, Hillf Danton <>, Lennart Poettering <>
Archive-link:  Article

This series are a refreshed version of a patchset submitted by Li Zefan back
in march:

With Li's permission, I refreshed the patches to apply over the latest upstream
and added the modifications suggested by others in the thread:
- using a mount option instead of config option to enable the xattr support
- reinitialize the list in kmem_xattrs_free()
- renamed functions to simple_xattr_*()

There're two users for this patchset:
- SELinux: to be able to control access to cgroupfs inside containers
- systemd: to store meta information such as main PID in a service cgroup,
  set specific services special options in the cgroup.

While the xattrs will use kernel memory like tmpfs, they're restricted to
'security' (which controls the format of the value) and 'trusted' (which
requires CAP_SYS_ADMIN). If kernel memory usage is still a concern, we're
not far from having memcg account for kernel memory.

- fix warnings
- Implement the changes requested by Hugh Dickins:
        - make simple_xattrs_init and simple_xattrs_free inline
        - get rid of locking and list reinitialization in simple_xattrs_free,
          they're not needed
- only allow trusted and security
- replace subsys_bits by something more meaningful
- check for permissions for user xattr namespace
- implemented requested changes by Tejun Heo in patch #2

Cc: Li Zefan <>
Cc: Tejun Heo <>
Cc: Hugh Dickins <>
Cc: Hillf Danton <>
Cc: Lennart Poettering <>
Signed-off-by: Li Zefan <>
Signed-off-by: Aristeu Rozanski <>

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds