lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 26 Nov 2007 11:51:17 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Oleg Nesterov <oleg@...sign.ru>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Pavel Emelyanov <xemul@...nvz.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] teach set_special_pids() to use struct pid

Oleg Nesterov <oleg@...sign.ru> writes:

> Change set_special_pids() to work with struct pid, not pid_t from global name
> space. This again speedups and imho cleanups the code.
>
> Signed-off-by: Oleg Nesterov <oleg@...sign.ru>

Overall I like it, and the version I keep meaning to send missed
the fact we only need a single argument.

> -static void set_special_pids(pid_t session, pid_t pgrp)
> +static void set_special_pids(struct pid *pid)
>  {
>  	write_lock_irq(&tasklist_lock);
> -	__set_special_pids(session, pgrp);
> +	__set_special_pids(pid);
>  	write_unlock_irq(&tasklist_lock);
>  }
>  
> @@ -385,7 +386,11 @@ void daemonize(const char *name, ...)
>  	 */
>  	current->flags |= PF_NOFREEZE;
>  
> -	set_special_pids(1, 1);
> +	if (current->nsproxy != &init_nsproxy) {
> +		get_nsproxy(&init_nsproxy);
> +		switch_task_namespaces(current, &init_nsproxy);
> +	}

Is there a reason for moving this hunk of code?

I don't see one as set_special_pids does everything with either
struct pid or global pid values.  And attach_pid and detach_pid
don't care.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ