Skip to content

(Was: user namespace: make signal.c respect user namespaces)

Oleg Nesterov lkml 1 version NAK

Status from this message: NAK!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 16 repliesNAK

Patches in v1

#Subject and filesSizeRepliesApplied
1/2creds: kill __task_cred()->task_is_dead() checkinclude/linux/cred.h kernel/exit.c+2 -313 replies
2/2creds: __task_cred(current) doesn't need rcu_read_lock_held()include/linux/cred.h+2 -36 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchDavid Howells
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] (Was: user namespace: make signal.c respect user namespaces)
Quoted 17 lines · Oleg Nesterov
Quoted 11 lines · Serge E. Hallyn
Quoted 8 lines · Oleg Nesterov
	static inline uid_t good_name(struct task_struct *from, struct task_struct *to)
	{
		// the caller does rcu_read_lock() if needed
		const struct cred *from_cred = __task_cred(from);
		return user_ns_map_uid(task_cred_xxx(to, user_ns),
					from_cred, from_cred->uid);
	}
Quoted 3 lines

That looks great, thanks. I couldn't think it up myself, but now that I see it in your email, I see this would be very valuable in helping make this code more readable :)

Quoted 8 lines

Damn ;) The problem is, "the caller does rcu_read_lock() if needed" can't shut up __rcu_dereference_check(). current_cred() passes c == true to do this.

This reminds me, __task_cred()->task_is_dead() should go away. Probably we can replace it with (__t == current). Otherwise send_signal() needs rcu_read_lock() to avoid the warning from lockdep, or the helper needs the unconditional rcu_read_lock().

IOW, I think we need 2 simple patches first.

The problem is, I have no idea how can I really test these changes ;) David, Paul, may be you can review...

Oleg.