Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162139AbbKERGx (ORCPT ); Thu, 5 Nov 2015 12:06:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51127 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162069AbbKERGv (ORCPT ); Thu, 5 Nov 2015 12:06:51 -0500 Date: Thu, 5 Nov 2015 19:02:58 +0100 From: Oleg Nesterov To: Andrew Morton Cc: Dmitry Vyukov , Roland McGrath , amanieu@gmail.com, pmoore@redhat.com, Ingo Molnar , vdavydov@parallels.com, qiaowei.ren@intel.com, dave@stgolabs.net, palmer@dabbelt.com, LKML , syzkaller , Kostya Serebryany , Alexander Potapenko , Sasha Levin Subject: Re: [PATCH 1/1] signal: kill the obsolete SIGNAL_UNKILLABLE check in complete_signal() Message-ID: <20151105180258.GA3803@redhat.com> References: <20151102151333.GA17152@redhat.com> <20151102163654.GA18804@redhat.com> <20151102180624.GA24361@redhat.com> <20151104191804.GA20578@redhat.com> <20151104191912.GB20578@redhat.com> <20151104172123.590fcbf0e8904911eeab3e3d@linux-foundation.org> <20151105160822.GA26017@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151105160822.GA26017@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1961 Lines: 47 On 11/05, Oleg Nesterov wrote: > > On 11/04, Andrew Morton wrote: > > > > I'm thinking this should be backported into -stable due to WARN_ONs and > > kernel crashes. > > Ah, sorry for confusion. The kernel crash is fine/correct. Debugger kills > init process, the exiting init calls panic(). With or without this patch. > BTW, I always thought we should remove this panic(), but this is off-topic. > > After this patch the test-case above still crashes the kernel, but without > warning ;) > > > And as f008faff0e27 is from 2009, that means all > > kernels. > > Yes, I think this change is safe for -stable. But the only visible problem > is WARN_ON_ONCE() in task_participate_group_stop(), so I am not sure... > > Well. Actually there are more problems. zap_threads(), de_thread() can be > fooled by signal_group_exit() == F too. So a multi-threaded /sbin/init can > miss SIGKILL if it does execve(), or if it starts the coredump. But only if > SIGKILL was private (sent by tkill). > > I do not see any serious problem this patch could fix. Cough... and on the second thought this patch needs v2. Sorry Andrew, please drop signal-kill-the-obsolete-signal_unkillable-check-in-complete_signal.patch I'll send the updated version. With this patch the parent namespace can use any fatal signal (not only SIGKILL) to kill the init process in container. I do not think this is actually bad, but in any case this should not silently come as a side effect. And this is not consistent with SIGNAL_UNKILLABLE/sig_kernel_only() check in get_signal(). Most probably I will just resend this patch as 2/2, while 1/2 will change sig_task_ignored() because afaics it is not actually right too (albeit not really buggy). Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/