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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070408165750.GA149@tv-sign.ru>
Date:	Sun, 8 Apr 2007 20:57:50 +0400
From:	Oleg Nesterov <oleg@...sign.ru>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Davide Libenzi <davidel@...ilserver.org>,
	Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Robin Holt <holt@....com>, Roland McGrath <roland@...hat.com>,
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [RFC, PATCH 1/3] introduce SYS_CLONE_MASK

On 04/08, Eric W. Biederman wrote:
> Oleg Nesterov <oleg@...sign.ru> writes:
> 
> > For review only.
> >
> > To implement for-in-kerenl-use-only CLONE_ flags, we need to filter out them
> > in sys_clone().
> 
> Nack
> 
> The current clone_flags field is for user space consumption and we
> have proposed users for all or almost all of the remaining bits.

OK.

> If we are going to have kernel only flags please use an additional
> argument to do_fork and copy_process.

Yes, we can do this. But we have a number of architectures which use
sys_clone() to implement kernel_thread(). It would be nice to have an
architecture neutral kernel_thread() implementation as you proposed.
We should change all of them if we want to add a new parameter to
do_fork().

Perhaps it is better to add reparent_kthread() (next patch) to kthread()
and forget about CLONE_KERNEL_THREAD.

Anyway, re-parenting to swapper breaks pstree, it doesn't show kernel
threads. And if ->parent == /sbin/init, we can't remove us from ->children
(unless we forbid sub-thread-of-init exec). So the only safe change is
set ->exit_state = -1.

> Your current scheme also has the bad side that if user space supplied
> a kernel flag it is hard to detect it and return -EINVAL.  Which
> limits future expansion.  Silently dropping clone flags is a real
> pain, if you are trying to detect if a new flag has been implemented.

Yes. But that is what we are doing now. copy_process() just ignores
unknown flags.

Oleg.

-
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