<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/include/linux/cred.h, branch v3.7-rc8</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v3.7-rc8</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v3.7-rc8'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2012-06-01T00:49:28Z</updated>
<entry>
<title>cred: remove task_is_dead() from __task_cred() validation</title>
<updated>2012-06-01T00:49:28Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2012-05-31T23:26:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=43e13cc107cf6cd3c15fbe1cef849435c2223d50'/>
<id>urn:sha1:43e13cc107cf6cd3c15fbe1cef849435c2223d50</id>
<content type='text'>
Commit 8f92054e7ca1 ("CRED: Fix __task_cred()'s lockdep check and banner
comment"):

    add the following validation condition:

        task-&gt;exit_state &gt;= 0

    to permit the access if the target task is dead and therefore
    unable to change its own credentials.

OK, but afaics currently this can only help wait_task_zombie() which calls
__task_cred() without rcu lock.

Remove this validation and change wait_task_zombie() to use task_uid()
instead.  This means we do rcu_read_lock() only to shut up the lockdep,
but we already do the same in, say, wait_task_stopped().

task_is_dead() should die, task-&gt;exit_state != 0 means that this task has
passed exit_notify(), only do_wait-like code paths should use this.

Unfortunately, we can't kill task_is_dead() right now, it has already
acquired buggy users in drivers/staging.  The fix already exists.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Reviewed-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>userns: Convert in_group_p and in_egroup_p to use kgid_t</title>
<updated>2012-05-03T10:29:33Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-02-09T17:09:39Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=72cda3d1ef24ab0a9a89c15e9776ca737b75f45a'/>
<id>urn:sha1:72cda3d1ef24ab0a9a89c15e9776ca737b75f45a</id>
<content type='text'>
Acked-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>userns: Store uid and gid values in struct cred with kuid_t and kgid_t types</title>
<updated>2012-05-03T10:28:38Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-02-08T15:00:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=078de5f706ece36afd73bb4b8283314132d2dfdf'/>
<id>urn:sha1:078de5f706ece36afd73bb4b8283314132d2dfdf</id>
<content type='text'>
cred.h and a few trivial users of struct cred are changed.  The rest of the users
of struct cred are left for other patches as there are too many changes to make
in one go and leave the change reviewable.  If the user namespace is disabled and
CONFIG_UIDGID_STRICT_TYPE_CHECKS are disabled the code will contiue to compile
and behave correctly.

Acked-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>userns: Convert group_info values from gid_t to kgid_t.</title>
<updated>2012-05-03T10:27:21Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2011-11-14T23:56:38Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=ae2975bc3476243b45a1e2344236d7920c268f38'/>
<id>urn:sha1:ae2975bc3476243b45a1e2344236d7920c268f38</id>
<content type='text'>
As a first step to converting struct cred to be all kuid_t and kgid_t
values convert the group values stored in group_info to always be
kgid_t values.   Unless user namespaces are used this change should
have no effect.

Acked-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>cred: Refcount the user_ns pointed to by the cred.</title>
<updated>2012-04-07T23:55:52Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2011-11-17T05:52:53Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=0093ccb68f3753c0ba4d74c89d7e0f444b8d6123'/>
<id>urn:sha1:0093ccb68f3753c0ba4d74c89d7e0f444b8d6123</id>
<content type='text'>
struct user_struct will shortly loose it's user_ns reference
so make the cred user_ns reference a proper reference complete
with reference counting.

Acked-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>cred: Add forward declaration of init_user_ns in all cases.</title>
<updated>2012-04-07T23:55:50Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2011-11-15T03:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=7e6bd8fadd1216f50468f965d0308f45e5109ced'/>
<id>urn:sha1:7e6bd8fadd1216f50468f965d0308f45e5109ced</id>
<content type='text'>
Acked-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>capabilities: remove task_ns_* functions</title>
<updated>2012-01-05T23:52:59Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2012-01-03T17:25:15Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=f1c84dae0ecc51aa35c81f19a0ebcd6c0921ddcb'/>
<id>urn:sha1:f1c84dae0ecc51aa35c81f19a0ebcd6c0921ddcb</id>
<content type='text'>
task_ in the front of a function, in the security subsystem anyway, means
to me at least, that we are operating with that task as the subject of the
security decision.  In this case what it means is that we are using current as
the subject but we use the task to get the right namespace.  Who in the world
would ever realize that's what task_ns_capability means just by the name?  This
patch eliminates the task_ns functions entirely and uses the has_ns_capability
function instead.  This means we explicitly open code the ns in question in
the caller.  I think it makes the caller a LOT more clear what is going on.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Acked-by: Serge E. Hallyn &lt;serge.hallyn@canonical.com&gt;
</content>
</entry>
<entry>
<title>cred: use 'const' in get_current_{user,groups}</title>
<updated>2011-08-08T18:33:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-08-08T18:33:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=638a8439096c582bdb523fcea9d875d3e1fed38a'/>
<id>urn:sha1:638a8439096c582bdb523fcea9d875d3e1fed38a</id>
<content type='text'>
Avoid annoying warnings from these functions ("discards qualifiers")
because they assign 'current_cred()' to a non-const pointer.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>CRED: Restore const to current_cred()</title>
<updated>2011-08-08T16:03:16Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2011-08-08T14:54:53Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=27e4e4362756a78b15e83ef104c8bbe257f40f90'/>
<id>urn:sha1:27e4e4362756a78b15e83ef104c8bbe257f40f90</id>
<content type='text'>
Commit 3295514841c2 ("fix rcu annotations noise in cred.h") accidentally
dropped the const of current-&gt;cred inside current_cred() by the
insertion of a cast to deal with an RCU annotation loss warning from
sparce.

Use an appropriate RCU wrapper instead so as not to lose the const.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fix rcu annotations noise in cred.h</title>
<updated>2011-08-07T20:42:35Z</updated>
<author>
<name>Al Viro</name>
<email>viro@ZenIV.linux.org.uk</email>
</author>
<published>2011-08-07T17:55:11Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=3295514841c2112d94451ba5deaf54f5afb78ea9'/>
<id>urn:sha1:3295514841c2112d94451ba5deaf54f5afb78ea9</id>
<content type='text'>
task-&gt;cred is declared as __rcu, and access to other tasks' -&gt;cred is,
indeed, protected.  Access to current-&gt;cred does not need rcu_dereference()
at all, since only the task itself can change its -&gt;cred.  sparse, of
course, has no way of knowing that...

Add force-cast in current_cred(), make current_fsuid() et.al. use it.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
