<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/security/selinux/ss/conditional.c, branch v3.15-rc7</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.15-rc7</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.15-rc7'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2011-12-19T00:23:56+00:00</updated>
<entry>
<title>selinux: Casting (void *) value returned by kmalloc is useless</title>
<updated>2011-12-19T00:23:56+00:00</updated>
<author>
<name>Thomas Meyer</name>
<email>thomas@m3y3r.de</email>
</author>
<published>2011-11-17T22:43:40+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2ff6fa8fafd6fa94029fa0558a6b85956930f1f5'/>
<id>urn:sha1:2ff6fa8fafd6fa94029fa0558a6b85956930f1f5</id>
<content type='text'>
The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

Signed-off-by: Thomas Meyer &lt;thomas@m3y3r.de&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>selinux: sparse fix: fix several warnings in the security server code</title>
<updated>2011-09-09T23:56:32+00:00</updated>
<author>
<name>James Morris</name>
<email>jmorris@namei.org</email>
</author>
<published>2011-08-30T02:52:32+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7b98a5857c3fa86cb0a7e5f893643491a8b5b425'/>
<id>urn:sha1:7b98a5857c3fa86cb0a7e5f893643491a8b5b425</id>
<content type='text'>
Fix several sparse warnings in the SELinux security server code.

Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>selinux: return -ENOMEM when memory allocation fails</title>
<updated>2011-01-24T00:35:47+00:00</updated>
<author>
<name>Davidlohr Bueso</name>
<email>dave@gnu.org</email>
</author>
<published>2011-01-21T15:28:04+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=3ac285ff23cd6e1bc402b6db836521bce006eb89'/>
<id>urn:sha1:3ac285ff23cd6e1bc402b6db836521bce006eb89</id>
<content type='text'>
Return -ENOMEM when memory allocation fails in cond_init_bool_indexes,
correctly propagating error code to caller.

Signed-off-by: Davidlohr Bueso &lt;dave@gnu.org&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>selinux: convert part of the sym_val_to_name array to use flex_array</title>
<updated>2010-11-30T22:28:58+00:00</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2010-11-29T20:47:09+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ac76c05becb6beedbb458d0827d3deaa6f479a72'/>
<id>urn:sha1:ac76c05becb6beedbb458d0827d3deaa6f479a72</id>
<content type='text'>
The sym_val_to_name type array can be quite large as it grows linearly with
the number of types.  With known policies having over 5k types these
allocations are growing large enough that they are likely to fail.  Convert
those to flex_array so no allocation is larger than PAGE_SIZE

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>selinux: fix error codes in cond_read_bool()</title>
<updated>2010-08-02T05:35:04+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2010-06-12T18:56:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=338437f6a09861cdf76e1396ed5fa6dee9c7cabe'/>
<id>urn:sha1:338437f6a09861cdf76e1396ed5fa6dee9c7cabe</id>
<content type='text'>
The original code always returned -1 (-EPERM) on error.  The new code
returns either -ENOMEM, or -EINVAL or it propagates the error codes from
lower level functions next_entry() or hashtab_insert().

next_entry() returns -EINVAL.
hashtab_insert() returns -EINVAL, -EEXIST, or -ENOMEM.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Acked-by:  Stephen D. Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>selinux: fix error codes in cond_policydb_init()</title>
<updated>2010-08-02T05:35:03+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2010-06-12T18:55:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=38184c522249dc377366d4edc41dc500c2c3bb9e'/>
<id>urn:sha1:38184c522249dc377366d4edc41dc500c2c3bb9e</id>
<content type='text'>
It's better to propagate the error code from avtab_init() instead of
returning -1 (-EPERM).  It turns out that avtab_init() never fails so
this patch doesn't change how the code runs but it's still a clean up.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Acked-by:  Stephen D. Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>selinux: fix error codes in cond_read_node()</title>
<updated>2010-08-02T05:35:02+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2010-06-12T18:53:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=fc5c126e4733e6fb3080d3d822ca63226e74fc84'/>
<id>urn:sha1:fc5c126e4733e6fb3080d3d822ca63226e74fc84</id>
<content type='text'>
Originally cond_read_node() returned -1 (-EPERM) on errors which was
incorrect.  Now it either propagates the error codes from lower level
functions next_entry() or cond_read_av_list() or it returns -ENOMEM or
-EINVAL.

next_entry() returns -EINVAL.
cond_read_av_list() returns -EINVAL or -ENOMEM.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Acked-by:  Stephen D. Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>selinux: fix error codes in cond_read_av_list()</title>
<updated>2010-08-02T05:35:02+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2010-06-12T18:52:19+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=9d623b17a740d5a85c12108cdc71c64fb15484fc'/>
<id>urn:sha1:9d623b17a740d5a85c12108cdc71c64fb15484fc</id>
<content type='text'>
After this patch cond_read_av_list() no longer returns -1 for any
errors.  It just propagates error code back from lower levels.  Those can
either be -EINVAL or -ENOMEM.

I also modified cond_insertf() since cond_read_av_list() passes that as a
function pointer to avtab_read_item().  It isn't used anywhere else.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Acked-by:  Stephen D. Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>selinux: propagate error codes in cond_read_list()</title>
<updated>2010-08-02T05:35:01+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2010-06-12T18:51:40+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5241c1074f6e2f2276d45d857eb5d19fbdc2e4b2'/>
<id>urn:sha1:5241c1074f6e2f2276d45d857eb5d19fbdc2e4b2</id>
<content type='text'>
These are passed back when the security module gets loaded.

The original code always returned -1 (-EPERM) on error but after this
patch it can return -EINVAL, or -ENOMEM or propagate the error code from
cond_read_node().  cond_read_node() still returns -1 all the time, but I
fix that in a later patch.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Acked-by:  Stephen D. Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
</feed>
