<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/user.c, branch v2.6.12.2</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.12.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.12.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2005-03-08T02:03:54Z</updated>
<entry>
<title>[PATCH] base-small: shrink UID hash</title>
<updated>2005-03-08T02:03:54Z</updated>
<author>
<name>Matt Mackall</name>
<email>mpm@selenic.com</email>
</author>
<published>2005-03-08T02:03:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c4c62e9417148d205a0de3e18d26cffd4b9678a3'/>
<id>urn:sha1:c4c62e9417148d205a0de3e18d26cffd4b9678a3</id>
<content type='text'>
CONFIG_BASE_SMALL reduce UID lookup hash

Signed-off-by: Matt Mackall &lt;mpm@selenic.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] Lock initializer cleanup (Core)</title>
<updated>2005-01-08T06:09:06Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2005-01-08T06:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=44b7f61e2868c2d4895c93b0d3382389a7a66f6b'/>
<id>urn:sha1:44b7f61e2868c2d4895c93b0d3382389a7a66f6b</id>
<content type='text'>
Kernel core files converted to use the new lock initializers.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&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] implement in-kernel keys &amp; keyring management</title>
<updated>2004-10-19T00:58:51Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2004-10-19T00:58:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e4262f594a9e36cf93a8789fc7e02e9ff0d1f564'/>
<id>urn:sha1:e4262f594a9e36cf93a8789fc7e02e9ff0d1f564</id>
<content type='text'>
The feature set the patch includes:

 - Key attributes:
   - Key type
   - Description (by which a key of a particular type can be selected)
   - Payload
   - UID, GID and permissions mask
   - Expiry time
 - Keyrings (just a type of key that holds links to other keys)
 - User-defined keys
 - Key revokation
 - Access controls
 - Per user key-count and key-memory consumption quota
 - Three std keyrings per task: per-thread, per-process, session
 - Two std keyrings per user: per-user and default-user-session
 - prctl() functions for key and keyring creation and management
 - Kernel interfaces for filesystem, blockdev, net stack access
 - JIT key creation by usermode helper

There are also two utility programs available:

 (*) http://people.redhat.com/~dhowells/keys/keyctl.c

     A comprehensive key management tool, permitting all the interfaces
     available to userspace to be exercised.

 (*) http://people.redhat.com/~dhowells/keys/request-key

     An example shell script (to be installed in /sbin) for instantiating a
     key.

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] rlimit-based mlocks for unprivileged users</title>
<updated>2004-08-23T06:06:46Z</updated>
<author>
<name>Rik van Riel</name>
<email>riel@redhat.com</email>
</author>
<published>2004-08-23T06:06:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=16698c49bbb42567c0bbc528d3820d18885e4642'/>
<id>urn:sha1:16698c49bbb42567c0bbc528d3820d18885e4642</id>
<content type='text'>
Here is the last agreed-on patch that lets normal users mlock pages up to
their rlimit.  This patch addresses all the issues brought up by Chris and
Andrea.

From: Chris Wright &lt;chrisw@osdl.org&gt;

Couple more nits.

The default lockable amount is one page now (first patch is was 0).  Why
don't we keep it as 0, with the CAP_IPC_LOCK overrides in place?  That way
nothing is changed from user perspective, and the rest of the policy can be
done by userspace as it should.

This patch breaks in one scenario.  When ulimit == 0, process has
CAP_IPC_LOCK, and does SHM_LOCK.  The subsequent unlock or destroy will
corrupt the locked_shm count.

It's also inconsistent in handling user_can_mlock/CAP_IPC_LOCK interaction
betwen shm_lock and shm_hugetlb.

SHM_HUGETLB can now only be done by the shm_group or CAP_IPC_LOCK.
Not any can_do_mlock() user.

Double check of can_do_mlock isn't needed in SHM_LOCK path.

Interface names user_can_mlock and user_substract_mlock could be better.

Incremental update below.  Ran some simple sanity tests on this plus my
patch below and didn't find any problems.

* Make default RLIM_MEMLOCK limit 0.
* Move CAP_IPC_LOCK check into user_can_mlock to be consistent
  and fix but with ulimit == 0 &amp;&amp; CAP_IPC_LOCK with SHM_LOCK.
* Allow can_do_mlock() user to try SHM_HUGETLB setup.
* Remove unecessary extra can_do_mlock() test in shmem_lock().
* Rename user_can_mlock to user_shm_lock and user_subtract_mlock
  to user_shm_unlock.
* Use user instead of current-&gt;user to fit in 80 cols on SHM_LOCK.

Signed-off-by: Rik van Riel &lt;riel@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] RLIM: add mq_bytes to user_struct</title>
<updated>2004-06-18T00:57:07Z</updated>
<author>
<name>Chris Wright</name>
<email>chrisw@osdl.org</email>
</author>
<published>2004-06-18T00:57:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9d9f6e8b61400f3292be2a85b6aa84d3e47a60c8'/>
<id>urn:sha1:9d9f6e8b61400f3292be2a85b6aa84d3e47a60c8</id>
<content type='text'>
Add mq_bytes field to user_struct, and make sure it's properly initialized.

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] RLIM: add sigpending field to user_struct</title>
<updated>2004-06-18T00:56:32Z</updated>
<author>
<name>Chris Wright</name>
<email>chrisw@osdl.org</email>
</author>
<published>2004-06-18T00:56:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=84f4d297ef3006d84ff35a0cedab2720e0bb5fd0'/>
<id>urn:sha1:84f4d297ef3006d84ff35a0cedab2720e0bb5fd0</id>
<content type='text'>
Add sigpending field to user_struct, and make sure it's properly initialized.

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: consolidate panic code</title>
<updated>2004-05-22T15:01:17Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-05-22T15:01:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b33a7bad9bcb5c8453d7a13a99b3151ebe69563f'/>
<id>urn:sha1:b33a7bad9bcb5c8453d7a13a99b3151ebe69563f</id>
<content type='text'>
Many places do:

	if (kmem_cache_create(...) == NULL)
		panic(...);

We can consolidate all that by passing another flag to kmem_cache_create()
which says "panic if it doesn't work".
</content>
</entry>
<entry>
<title>[PATCH] find_user locking and leak fix</title>
<updated>2004-05-10T07:00:52Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-05-10T07:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=475c3656c94b2d8709c113bd7bbd1aa963213f0a'/>
<id>urn:sha1:475c3656c94b2d8709c113bd7bbd1aa963213f0a</id>
<content type='text'>
find_user() is being called from set/get_priority(), but it doesn't take the
needed lock, and those callers were forgetting to drop the refcount which
find_user() took.
</content>
</entry>
<entry>
<title>[PATCH] uidhash init-time locking</title>
<updated>2003-08-01T03:10:03Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2003-08-01T03:10:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=47f7edc1d097d54d5b00af3ee949e7147dce9f20'/>
<id>urn:sha1:47f7edc1d097d54d5b00af3ee949e7147dce9f20</id>
<content type='text'>
From: &lt;ffrederick@prov-liege.be&gt;

Add the necessary locking around uid_hash_insert() in uid_cache_init().

(It's an initcall, and the chances of another CPU racing with us here are
basically zero.  But it's good for documentary purposes and the code gets
dropped later anyway...)
</content>
</entry>
<entry>
<title>[PATCH] fix current-&gt;user-&gt;__count leak</title>
<updated>2003-07-05T02:38:06Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2003-07-05T02:38:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7fc4c64b2794116ff84ca732342dd20b6588879a'/>
<id>urn:sha1:7fc4c64b2794116ff84ca732342dd20b6588879a</id>
<content type='text'>
From: Arvind Kandhare &lt;arvind.kan@wipro.com&gt;

When switch_uid is called, the reference count of the new user is
incremented twice.  I think the increment in the switch_uid is done because
of the reparent_to_init() function which does not increase the __count for
root user.

But if switch_uid is called from any other function, the reference count is
already incremented by the caller by calling alloc_uid for the new user.
Hence the count is incremented twice.  The user struct will not be deleted
even when there are no processes holding a reference count for it.  This
does not cause any problem currently because nothing is dependent on timely
deletion of the user struct.
</content>
</entry>
</feed>
