From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763229AbdAESVA (ORCPT ); Thu, 5 Jan 2017 13:21:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38198 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752322AbdAESTz (ORCPT ); Thu, 5 Jan 2017 13:19:55 -0500 Date: Thu, 5 Jan 2017 19:18:59 +0100 From: Oleg Nesterov To: Jamie Iles Cc: linux-kernel@vger.kernel.org, Alexander Viro , Ingo Molnar , Peter Zijlstra , Andrew Morton Subject: Re: [PATCHv2] signal: protect SIGNAL_UNKILLABLE from unintentional clearing. Message-ID: <20170105181858.GB31925@redhat.com> References: <20170104122017.25047-1-jamie.iles@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170104122017.25047-1-jamie.iles@oracle.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 05 Jan 2017 18:19:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/04, Jamie Iles wrote: > > This can result in init becoming stoppable/killable after tracing. For > example, running: > > while true; do kill -STOP 1; done & > strace -p 1 > > and then stopping strace and the kill loop will result in init being > left in state TASK_STOPPED. Sending SIGCONT to init will resume it, but > init will now respond to future SIGSTOP signals rather than ignoring > them. and to SIGKILL. Another problem is that /sbin/init should ignore SIGKILL even when ptraced, but this needs another patch, will try to do tomorrow. And yet another problem with force_sig(), it should probably take ptrace and/or SIGTRAP into account. Thanks Jamie, Acked-by: Oleg Nesterov