Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932474AbcK1MPY (ORCPT ); Mon, 28 Nov 2016 07:15:24 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:47393 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754759AbcK1MPI (ORCPT ); Mon, 28 Nov 2016 07:15:08 -0500 Date: Mon, 28 Nov 2016 12:14:34 +0000 From: Jamie Iles To: Oleg Nesterov Cc: Jamie Iles , linux-kernel@vger.kernel.org, Alexander Viro , Ingo Molnar , Peter Zijlstra , Andrew Morton Subject: Re: [PATCH] signal: protect SIGNAL_UNKILLABLE from unintentional clearing. Message-ID: <20161128121434.4it7yd7wmpkxv6f4@cedar> References: <20161116125759.4727-1-jamie.iles@oracle.com> <20161117190420.GA23492@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161117190420.GA23492@redhat.com> User-Agent: Mutt/1.6.2-neo (2016-08-21) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 928 Lines: 30 Hi Oleg, On Thu, Nov 17, 2016 at 08:04:20PM +0100, Oleg Nesterov wrote: > On 11/16, 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. > > Yes, and a lot more... I forgot about these problems again. > > Jamie, sorry for delay, I'll try to read the patch and reply tomorrow. Did you get chance to look at the patch? I did have another thought - rather than the accessors, we could change signal_struct to have: unsigned int unkillable:1; unsigned int flags:31; to separate signal_unkillable from flags, making it a bit safer in the future. Jamie