From: KaiGai Kohei <kaigai@kaigai.gr.jp>
To: James Morris <jmorris@namei.org>
Cc: KaiGai Kohei <kaigai@ak.jp.nec.com>,
"Serge E. Hallyn" <serue@us.ibm.com>,
akpm@osdl.org, morgan@kernel.org,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Exporting capability code/name pairs
Date: Wed, 02 Jan 2008 17:04:14 +0900 [thread overview]
Message-ID: <477B457E.6000802@kaigai.gr.jp> (raw)
In-Reply-To: <Xine.LNX.4.64.0712281957520.23510@us.intercode.com.au>
James Morris wrote:
> On Fri, 28 Dec 2007, KaiGai Kohei wrote:
>
>> Remaining issues:
>> - We have to mount securityfs explicitly, or use /etc/fstab.
>> It can cause a matter when we want to use this feature on
>> very early phase on boot. (like /sbin/init)
>
> Why can't early userspace itself mount securityfs?
Hmm,,,
It might be possible as load_policy() doing, if necessary.
Please forget the previous my opinion.
> I'm not even sure this is a good idea at all. Existing capabilities will
> never disappear, and, as with syscalls, it's probably up to userland to
> handle new ones not existing.
When we use libcap built on older kernel for newer kernel, libcap cannot
handle newly added capabilities, because it is not exist on the build environment.
Therefore, any available capabilities should be exported dynamically by the kernel.
> In any case, some more technical issues:
>
>> kernel/cap_names.sh generates the body of cap_entries[] array,
>
> This needs to be in the scripts directory.
OK, it will be moved.
> The generated header should be made idempotent (#ifdef wrapping), and also
> include a warning that it is automatically generated (identifying the
> script which does so), and that is should not be edited.
>
>> + d_caps = securityfs_create_dir("capability", NULL);
>> + if (!d_caps)
>
> Wrong way to check for error -- the function returns an ERR_PTR().
>
>> + f_caps[i] = securityfs_create_file(cap_entries[i].name, 0444,
>> + d_caps, &cap_entries[i],
>> + &cap_entry_fops);
>> + if (!f_caps[i])
>
> Ditto.
OK,
> Another issue is that securityfs depends on CONFIG_SECURITY, which might
> be undesirable, given that capabilities are a standard feature.
We can implement this feature on another pseudo filesystems.
Do you think what filesystem is the best candidate?
I prefer procfs or sysfs instead.
Thanks,
--
KaiGai Kohei <kaigai@kaigai.gr.jp>
next prev parent reply other threads:[~2008-01-02 8:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-27 3:53 [PATCH] Exporting capability code/name pairs KaiGai Kohei
2007-12-27 7:54 ` James Morris
2007-12-27 16:14 ` Serge E. Hallyn
2007-12-28 1:47 ` KaiGai Kohei
2007-12-28 6:16 ` KaiGai Kohei
2007-12-28 6:54 ` James Morris
2007-12-28 7:33 ` KaiGai Kohei
2007-12-28 9:12 ` James Morris
2008-01-02 8:04 ` KaiGai Kohei [this message]
2008-01-02 10:02 ` James Morris
2008-01-04 2:28 ` KaiGai Kohei
2007-12-28 23:07 ` Randy Dunlap
2007-12-30 16:28 ` Andrew Morgan
2008-01-02 8:08 ` KaiGai Kohei
2008-01-03 1:48 ` Andrew Morgan
2008-01-04 1:57 ` KaiGai Kohei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=477B457E.6000802@kaigai.gr.jp \
--to=kaigai@kaigai.gr.jp \
--cc=akpm@osdl.org \
--cc=jmorris@namei.org \
--cc=kaigai@ak.jp.nec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=morgan@kernel.org \
--cc=serue@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox