<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/security/selinux/include/security.h, branch v3.0.51</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.0.51</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.0.51'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2011-04-25T14:19:02+00:00</updated>
<entry>
<title>SELinux: security_read_policy should take a size_t not ssize_t</title>
<updated>2011-04-25T14:19:02+00:00</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2011-04-20T14:21:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=6b697323a78bed254ee372f71b1a6a2901bb4b7a'/>
<id>urn:sha1:6b697323a78bed254ee372f71b1a6a2901bb4b7a</id>
<content type='text'>
The len should be an size_t but is a ssize_t.  Easy enough fix to silence
build warnings.  We have no need for signed-ness.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Reviewed-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>selinux: add type_transition with name extension support for selinuxfs</title>
<updated>2011-04-01T21:13:23+00:00</updated>
<author>
<name>Kohei Kaigai</name>
<email>Kohei.Kaigai@eu.nec.com</email>
</author>
<published>2011-04-01T14:39:26+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f50a3ec961f90e38c0311411179d5dfee1412192'/>
<id>urn:sha1:f50a3ec961f90e38c0311411179d5dfee1412192</id>
<content type='text'>
The attached patch allows /selinux/create takes optional 4th argument
to support TYPE_TRANSITION with name extension for userspace object
managers.
If 4th argument is not supplied, it shall perform as existing kernel.
In fact, the regression test of SE-PostgreSQL works well on the patched
kernel.

Thanks,

Signed-off-by: KaiGai Kohei &lt;kohei.kaigai@eu.nec.com&gt;
[manually verify fuzz was not an issue, and it wasn't: eparis]
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>SELinux: Add class support to the role_trans structure</title>
<updated>2011-03-28T18:20:58+00:00</updated>
<author>
<name>Harry Ciao</name>
<email>qingtao.cao@windriver.com</email>
</author>
<published>2011-03-25T05:51:56+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8023976cf4627d9f1d82ad468ec40e32eb87d211'/>
<id>urn:sha1:8023976cf4627d9f1d82ad468ec40e32eb87d211</id>
<content type='text'>
If kernel policy version is &gt;= 26, then the binary representation of
the role_trans structure supports specifying the class for the current
subject or the newly created object.

If kernel policy version is &lt; 26, then the class field would be default
to the process class.

Signed-off-by: Harry Ciao &lt;qingtao.cao@windriver.com&gt;
Acked-by:  Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>SELinux: Use dentry name in new object labeling</title>
<updated>2011-02-01T16:12:30+00:00</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2011-02-01T16:05:40+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=652bb9b0d6ce007f37c098947b2cc0c45efa3f66'/>
<id>urn:sha1:652bb9b0d6ce007f37c098947b2cc0c45efa3f66</id>
<content type='text'>
Currently SELinux has rules which label new objects according to 3 criteria.
The label of the process creating the object, the label of the parent
directory, and the type of object (reg, dir, char, block, etc.)  This patch
adds a 4th criteria, the dentry name, thus we can distinguish between
creating a file in an etc_t directory called shadow and one called motd.

There is no file globbing, regex parsing, or anything mystical.  Either the
policy exactly (strcmp) matches the dentry name of the object or it doesn't.
This patch has no changes from today if policy does not implement the new
rules.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>SELinux: allow userspace to read policy back out of the kernel</title>
<updated>2010-10-20T23:12:58+00:00</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2010-10-13T21:50:25+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=cee74f47a6baba0ac457e87687fdcf0abd599f0a'/>
<id>urn:sha1:cee74f47a6baba0ac457e87687fdcf0abd599f0a</id>
<content type='text'>
There is interest in being able to see what the actual policy is that was
loaded into the kernel.  The patch creates a new selinuxfs file
/selinux/policy which can be read by userspace.  The actual policy that is
loaded into the kernel will be written back out to userspace.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>secmark: make secmark object handling generic</title>
<updated>2010-10-20T23:12:48+00:00</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2010-10-13T20:24:41+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2606fd1fa5710205b23ee859563502aa18362447'/>
<id>urn:sha1:2606fd1fa5710205b23ee859563502aa18362447</id>
<content type='text'>
Right now secmark has lots of direct selinux calls.  Use all LSM calls and
remove all SELinux specific knowledge.  The only SELinux specific knowledge
we leave is the mode.  The only point is to make sure that other LSMs at
least test this generic code before they assume it works.  (They may also
have to make changes if they do not represent labels as strings)

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Acked-by: Paul Moore &lt;paul.moore@hp.com&gt;
Acked-by: Patrick McHardy &lt;kaber@trash.net&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>selinux: fix up style problem on /selinux/status</title>
<updated>2010-10-20T23:12:41+00:00</updated>
<author>
<name>KaiGai Kohei</name>
<email>kaigai@ak.jp.nec.com</email>
</author>
<published>2010-09-30T02:49:55+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=36f7f28416c97dbb725154930066d115b4447e17'/>
<id>urn:sha1:36f7f28416c97dbb725154930066d115b4447e17</id>
<content type='text'>
This patch fixes up coding-style problem at this commit:

 4f27a7d49789b04404eca26ccde5f527231d01d5
 selinux: fast status update interface (/selinux/status)

Signed-off-by: KaiGai Kohei &lt;kaigai@ak.jp.nec.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>selinux: fast status update interface (/selinux/status)</title>
<updated>2010-10-20T23:12:36+00:00</updated>
<author>
<name>KaiGai Kohei</name>
<email>kaigai@ak.jp.nec.com</email>
</author>
<published>2010-09-14T09:28:39+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=119041672592d1890d89dd8f194bd0919d801dc8'/>
<id>urn:sha1:119041672592d1890d89dd8f194bd0919d801dc8</id>
<content type='text'>
This patch provides a new /selinux/status entry which allows applications
read-only mmap(2).
This region reflects selinux_kernel_status structure in kernel space.
  struct selinux_kernel_status
  {
          u32     length;         /* length of this structure */
          u32     sequence;       /* sequence number of seqlock logic */
          u32     enforcing;      /* current setting of enforcing mode */
          u32     policyload;     /* times of policy reloaded */
          u32     deny_unknown;   /* current setting of deny_unknown */
  };

When userspace object manager caches access control decisions provided
by SELinux, it needs to invalidate the cache on policy reload and setenforce
to keep consistency.
However, the applications need to check the kernel state for each accesses
on userspace avc, or launch a background worker process.
In heuristic, frequency of invalidation is much less than frequency of
making access control decision, so it is annoying to invoke a system call
to check we don't need to invalidate the userspace cache.
If we can use a background worker thread, it allows to receive invalidation
messages from the kernel. But it requires us an invasive coding toward the
base application in some cases; E.g, when we provide a feature performing
with SELinux as a plugin module, it is unwelcome manner to launch its own
worker thread from the module.

If we could map /selinux/status to process memory space, application can
know updates of selinux status; policy reload or setenforce.

A typical application checks selinux_kernel_status::sequence when it tries
to reference userspace avc. If it was changed from the last time when it
checked userspace avc, it means something was updated in the kernel space.
Then, the application can reset userspace avc or update current enforcing
mode, without any system call invocations.
This sequence number is updated according to the seqlock logic, so we need
to wait for a while if it is odd number.

Signed-off-by: KaiGai Kohei &lt;kaigai@ak.jp.nec.com&gt;
Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
--
 security/selinux/include/security.h |   21 ++++++
 security/selinux/selinuxfs.c        |   56 +++++++++++++++
 security/selinux/ss/Makefile        |    2 +-
 security/selinux/ss/services.c      |    3 +
 security/selinux/ss/status.c        |  129 +++++++++++++++++++++++++++++++++++
 5 files changed, 210 insertions(+), 1 deletions(-)
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>selinux: allow MLS-&gt;non-MLS and vice versa upon policy reload</title>
<updated>2010-02-03T22:06:36+00:00</updated>
<author>
<name>Guido Trentalancia</name>
<email>guido@trentalancia.com</email>
</author>
<published>2010-02-03T15:40:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0719aaf5ead7555b7b7a4a080ebf2826a871384e'/>
<id>urn:sha1:0719aaf5ead7555b7b7a4a080ebf2826a871384e</id>
<content type='text'>
Allow runtime switching between different policy types (e.g. from a MLS/MCS
policy to a non-MLS/non-MCS policy or viceversa).

Signed-off-by: Guido Trentalancia &lt;guido@trentalancia.com&gt;
Acked-by: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>selinux: change the handling of unknown classes</title>
<updated>2010-01-17T22:54:26+00:00</updated>
<author>
<name>Stephen Smalley</name>
<email>sds@tycho.nsa.gov</email>
</author>
<published>2010-01-14T22:28:10+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=19439d05b88dafc4e55d9ffce84ccc27cf8b2bcc'/>
<id>urn:sha1:19439d05b88dafc4e55d9ffce84ccc27cf8b2bcc</id>
<content type='text'>
If allow_unknown==deny, SELinux treats an undefined kernel security
class as an error condition rather than as a typical permission denial
and thus does not allow permissions on undefined classes even when in
permissive mode.  Change the SELinux logic so that this case is handled
as a typical permission denial, subject to the usual permissive mode and
permissive domain handling.

Also drop the 'requested' argument from security_compute_av() and
helpers as it is a legacy of the original security server interface and
is unused.

Changes:
- Handle permissive domains consistently by moving up the test for a
permissive domain.
- Make security_compute_av_user() consistent with security_compute_av();
the only difference now is that security_compute_av() performs mapping
between the kernel-private class and permission indices and the policy
values.  In the userspace case, this mapping is handled by libselinux.
- Moved avd_init inside the policy lock.

Based in part on a patch by Paul Moore &lt;paul.moore@hp.com&gt;.

Reported-by: Andrew Worsley &lt;amworsley@gmail.com&gt;
Signed-off-by:  Stephen D. Smalley &lt;sds@tycho.nsa.gov&gt;
Reviewed-by: Paul Moore &lt;paul.moore@hp.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
</feed>
