<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security/keys, branch v2.6.20.14</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/security/keys?h=v2.6.20.14</id>
<link rel='self' href='https://git.amat.us/linux/atom/security/keys?h=v2.6.20.14'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2007-03-09T18:50:18Z</updated>
<entry>
<title>Keys: Fix key serial number collision handling</title>
<updated>2007-03-09T18:50:18Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2007-02-09T14:30:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dbd60d51abaf4c31f4c4b5e521745af301535447'/>
<id>urn:sha1:dbd60d51abaf4c31f4c4b5e521745af301535447</id>
<content type='text'>
Fix the key serial number collision avoidance code in key_alloc_serial().

This didn't use to be so much of a problem as the key serial numbers were
allocated from a simple incremental counter, and it would have to go through
two billion keys before it could possibly encounter a collision.  However, now
that random numbers are used instead, collisions are much more likely.

This is fixed by finding a hole in the rbtree where the next unused serial
number ought to be and using that by going almost back to the top of the
insertion routine and redoing the insertion with the new serial number rather
than trying to be clever and attempting to work out the insertion point
pointer directly.

This fixes kernel BZ #7727.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: Chuck Ebbert &lt;cebbert@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[PATCH] lockdep: name some old style locks</title>
<updated>2006-12-07T16:39:36Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2006-12-07T04:37:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6cfd76a26d9fe2ba54b9d496a48c1d9285e5c5ed'/>
<id>urn:sha1:6cfd76a26d9fe2ba54b9d496a48c1d9285e5c5ed</id>
<content type='text'>
Name some of the remaning 'old_style_spin_init' locks

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] security/keys/*: user kmemdup()</title>
<updated>2006-12-07T16:39:25Z</updated>
<author>
<name>Eric Sesterhenn</name>
<email>snakebyte@gmx.de</email>
</author>
<published>2006-12-07T04:33:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=48ad504ee7d598431cb2d0b2f01c6d1aff1d2a07'/>
<id>urn:sha1:48ad504ee7d598431cb2d0b2f01c6d1aff1d2a07</id>
<content type='text'>
Signed-off-by: Eric Sesterhenn &lt;snakebyte@gmx.de&gt;
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Acked-By: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] slab: remove kmem_cache_t</title>
<updated>2006-12-07T16:39:25Z</updated>
<author>
<name>Christoph Lameter</name>
<email>clameter@sgi.com</email>
</author>
<published>2006-12-07T04:33:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e18b890bb0881bbab6f4f1a6cd20d9c60d66b003'/>
<id>urn:sha1:e18b890bb0881bbab6f4f1a6cd20d9c60d66b003</id>
<content type='text'>
Replace all uses of kmem_cache_t with struct kmem_cache.

The patch was generated using the following script:

	#!/bin/sh
	#
	# Replace one string by another in all the kernel sources.
	#

	set -e

	for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
		quilt add $file
		sed -e "1,\$s/$1/$2/g" $file &gt;/tmp/$$
		mv /tmp/$$ $file
		quilt refresh
	done

The script was run like this

	sh replace kmem_cache_t "struct kmem_cache"

Signed-off-by: Christoph Lameter &lt;clameter@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] slab: remove SLAB_KERNEL</title>
<updated>2006-12-07T16:39:24Z</updated>
<author>
<name>Christoph Lameter</name>
<email>clameter@sgi.com</email>
</author>
<published>2006-12-07T04:33:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e94b1766097d53e6f3ccfb36c8baa562ffeda3fc'/>
<id>urn:sha1:e94b1766097d53e6f3ccfb36c8baa562ffeda3fc</id>
<content type='text'>
SLAB_KERNEL is an alias of GFP_KERNEL.

Signed-off-by: Christoph Lameter &lt;clameter@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>WorkStruct: Pass the work_struct pointer instead of context data</title>
<updated>2006-11-22T14:55:48Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-11-22T14:55:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=65f27f38446e1976cc98fd3004b110fedcddd189'/>
<id>urn:sha1:65f27f38446e1976cc98fd3004b110fedcddd189</id>
<content type='text'>
Pass the work_struct pointer to the work function rather than context data.
The work function can use container_of() to work out the data.

For the cases where the container of the work_struct may go away the moment the
pending bit is cleared, it is made possible to defer the release of the
structure by deferring the clearing of the pending bit.

To make this work, an extra flag is introduced into the management side of the
work_struct.  This governs auto-release of the structure upon execution.

Ordinarily, the work queue executor would release the work_struct for further
scheduling or deallocation by clearing the pending bit prior to jumping to the
work function.  This means that, unless the driver makes some guarantee itself
that the work_struct won't go away, the work function may not access anything
else in the work_struct or its container lest they be deallocated..  This is a
problem if the auxiliary data is taken away (as done by the last patch).

However, if the pending bit is *not* cleared before jumping to the work
function, then the work function *may* access the work_struct and its container
with no problems.  But then the work function must itself release the
work_struct by calling work_release().

In most cases, automatic release is fine, so this is the default.  Special
initiators exist for the non-auto-release case (ending in _NAR).


Signed-Off-By: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>[PATCH] Keys: Allow in-kernel key requestor to pass auxiliary data to upcaller</title>
<updated>2006-06-29T17:26:20Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-06-29T09:24:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4e54f08543d05e519e601368571cc3787fefae96'/>
<id>urn:sha1:4e54f08543d05e519e601368571cc3787fefae96</id>
<content type='text'>
The proposed NFS key type uses its own method of passing key requests to
userspace (upcalling) rather than invoking /sbin/request-key.  This is
because the responsible userspace daemon should already be running and will
be contacted through rpc_pipefs.

This patch permits the NFS filesystem to pass auxiliary data to the upcall
operation (struct key_type::request_key) so that the upcaller can use a
pre-existing communications channel more easily.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-By: Kevin Coffman &lt;kwc@citi.umich.edu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] poison: add &amp; use more constants</title>
<updated>2006-06-28T00:32:38Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2006-06-27T09:53:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a7807a32bbb027ab9955b96734fdc7f1e6497a9f'/>
<id>urn:sha1:a7807a32bbb027ab9955b96734fdc7f1e6497a9f</id>
<content type='text'>
Add more poison values to include/linux/poison.h.  It's not clear to me
whether some others should be added or not, so I haven't added any of
these:

./include/linux/libata.h:#define ATA_TAG_POISON		0xfafbfcfdU
./arch/ppc/8260_io/fcc_enet.c:1918:	memset((char *)(&amp;(immap-&gt;im_dprambase[(mem_addr+64)])), 0x88, 32);
./drivers/usb/mon/mon_text.c:429:	memset(mem, 0xe5, sizeof(struct mon_event_text));
./drivers/char/ftape/lowlevel/ftape-ctl.c:738:		memset(ft_buffer[i]-&gt;address, 0xAA, FT_BUFF_SIZE);
./drivers/block/sx8.c:/* 0xf is just arbitrary, non-zero noise; this is sorta like poisoning */

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] keys: restrict contents of /proc/keys to Viewable keys</title>
<updated>2006-06-26T16:58:18Z</updated>
<author>
<name>Michael LeMay</name>
<email>mdlemay@epoch.ncsc.mil</email>
</author>
<published>2006-06-26T07:24:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=06ec7be557a1259611d6093a00463c42650dc71a'/>
<id>urn:sha1:06ec7be557a1259611d6093a00463c42650dc71a</id>
<content type='text'>
Restrict /proc/keys such that only those keys to which the current task is
granted View permission are presented.

The documentation is also updated to reflect these changes.

Signed-off-by: Michael LeMay &lt;mdlemay@epoch.ncsc.mil&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] keys: allocate key serial numbers randomly</title>
<updated>2006-06-26T16:58:18Z</updated>
<author>
<name>Michael LeMay</name>
<email>mdlemay@epoch.ncsc.mil</email>
</author>
<published>2006-06-26T07:24:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e51f6d343789a4f0a2a7587ad7ec7746969d5c1c'/>
<id>urn:sha1:e51f6d343789a4f0a2a7587ad7ec7746969d5c1c</id>
<content type='text'>
Cause key_alloc_serial() to generate key serial numbers randomly rather than
in linear sequence.

Using an linear sequence permits a covert communication channel to be
established, in which one process can communicate with another by creating or
not creating new keys within a certain timeframe.  The second process can
probe for the expected next key serial number and judge its existence by the
error returned.

This is a problem as the serial number namespace is globally shared between
all tasks, regardless of their context.

For more information on this topic, this old TCSEC guide is recommended:

	http://www.radium.ncsc.mil/tpep/library/rainbow/NCSC-TG-030.html

Signed-off-by: Michael LeMay &lt;mdlemay@epoch.ncsc.mil&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
