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]
Message-ID: <53761FDB.10806@oracle.com>
Date:	Fri, 16 May 2014 10:25:31 -0400
From:	Sasha Levin <sasha.levin@...cle.com>
To:	Oleg Nesterov <oleg@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>
CC:	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...nel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kthreads: kill CLONE_KERNEL, change kernel_thread(kernel_init)
 to avoid CLONE_SIGHAND

On 04/13/2014 03:56 PM, Oleg Nesterov wrote:
> 1. Remove CLONE_KERNEL, it has no users and it is dangerous.
> 
>    The (old) comment says "List of flags we want to share for kernel
>    threads" but this is not true, we do not want to share ->sighand by
>    default. This flag can only be used if the caller is sure that both
>    parent/child will never play with signals (say, allow_signal/etc).
> 
> 2. Change rest_init() to clone kernel_init() without CLONE_SIGHAND.
> 
>    In this case CLONE_SIGHAND does not really hurt, and it looks like
>    optimization because copy_sighand() can avoid kmem_cache_alloc().
> 
>    But in fact this only adds the minor pessimization. kernel_init()
>    is going to exec the init process, and de_thread() will need to
>    unshare ->sighand and do kmem_cache_alloc(sighand_cachep) anyway,
>    but it needs to do more work and take tasklist_lock and siglock.
> 
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>

Hi Oleg,

This patch triggers a hang during boot in my KVM guest. There are no
messages or anything, it just hangs right before init is supposed to
start up.

I've narrowed it down a bit, and it's the removal of CLONE_SIGHAND
that's bothering it. Removing CLONE_FS and CLONE_FILES doesn't
cause the hang on boot.


Thanks,
Sasha
--
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