linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] exporting capability name/code pairs (final#2)
@ 2008-02-25  6:06 Kohei KaiGai
  2008-02-25  6:10 ` [PATCH 1/3] add a private data field within kobj_attribute structure (final#2) Kohei KaiGai
                   ` (3 more replies)
  0 siblings, 4 replies; 32+ messages in thread
From: Kohei KaiGai @ 2008-02-25  6:06 UTC (permalink / raw)
  To: greg, morgan, serue; +Cc: linux-security-module, linux-kernel

The following three patches enables to export code/name pairs of
capabilities the running kernel supports, and add a documentation
and samples to use this feature.

[PATCH 1/3] add a private data field within kobj_attribute structure.

This patch add a private data field, declared as void *, within kobj_attribute
structure. The _show() and _store() method in the sysfs attribute entries can
refer this information to identify what entry is accessed.
It makes easier to share a single method implementation with several similar
entries, like ones to export the list of capabilities the running kernel
supports.

[PATCH 2/3] exporting capability name/code pairs

This patch enables to export code/name pairs of capabilities the running
kernel supported.

A newer kernel sometimes adds new capabilities, like CAP_MAC_ADMIN
at 2.6.25. However, we have no interface to disclose what capabilities
are supported on the running kernel. Thus, we have to maintain libcap
version in appropriate one synchronously.

This patch enables libcap to collect the list of capabilities at run time,
and provide them for users. It helps to improve portability of library.

It exports these information as regular files under /sys/kernel/capability.
The numeric node exports its name, the symbolic node exports its code.

[PATCH 3/3] a new example to use kobject/kobj_attribute

This patch can provide a new exmple to use kobject and attribute.
The _show() and _store() method can refer/store the private data field of
kobj_attribute structure to know what entries are accessed by users.
It will make easier to share a single _show()/_store() method with several
entries.

o changes from the previous version
 - add a short description at Documentation/kobject.txt, to use private
   member within kobj_attribute.
 - "supported" is replaced with "supports" at sysfs-kernel-capability.
 - "$(src)/../" is replaced with "$(srctree)/" at security/Makefile
 - The private member is casted to long, when it stores integer value.

Thanks,
-- 
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>

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

end of thread, other threads:[~2008-05-15  7:48 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-25  6:06 [PATCH 0/3] exporting capability name/code pairs (final#2) Kohei KaiGai
2008-02-25  6:10 ` [PATCH 1/3] add a private data field within kobj_attribute structure (final#2) Kohei KaiGai
2008-02-25  6:51   ` Greg KH
2008-02-25  6:57     ` Kohei KaiGai
2008-02-25  7:47       ` Greg KH
2008-02-25 10:04         ` Kohei KaiGai
2008-02-26 20:09           ` Greg KH
2008-02-28  5:49   ` Valdis.Kletnieks
2008-03-03  4:42     ` Kohei KaiGai
2008-02-25  6:10 ` [PATCH 2/3] exporting capability name/code pairs (final#2) Kohei KaiGai
2008-02-26 14:55   ` Andrew G. Morgan
2008-02-26 20:58     ` Serge E. Hallyn
2008-03-07  4:30       ` Kohei KaiGai
2008-03-07  4:53         ` Greg KH
2008-02-25  6:10 ` [PATCH 3/3] a new example to use kobject/kobj_attribute (final#2) Kohei KaiGai
2008-04-22 11:12 ` [PATCH 0/3] exporting capability name/code pairs (for 2.6.26) KaiGai Kohei
2008-04-22 11:17   ` [PATCH 1/3] add a private data field within kobj_attribute structure KaiGai Kohei
2008-04-22 11:18   ` [PATCH 2/3] exporting capability name/code pairs KaiGai Kohei
2008-04-22 11:18   ` [PATCH 3/3] a new example to use kobject/kobj_attribute KaiGai Kohei
2008-04-22 19:29   ` [PATCH 0/3] exporting capability name/code pairs (for 2.6.26) Alexey Dobriyan
2008-04-23  0:38     ` KaiGai Kohei
2008-04-23  7:03       ` Alexey Dobriyan
2008-04-23  7:37         ` KaiGai Kohei
2008-05-13 22:12           ` Alexey Dobriyan
2008-05-14  0:34             ` KaiGai Kohei
2008-04-23  5:37   ` Chris Wright
2008-04-23  7:15     ` KaiGai Kohei
2008-05-14  0:36       ` KaiGai Kohei
2008-05-14  0:52         ` Chris Wright
2008-05-14  5:57           ` KaiGai Kohei
2008-05-15  5:48             ` Andrew Morgan
2008-05-15  7:47               ` KaiGai Kohei

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