From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E65A62046A3 for ; Fri, 20 Dec 2024 13:23:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734700999; cv=none; b=LU9ZDiUsFRG+BiNAzbB7gAPrGIYdKaEIcphyfWxkpjdbdLXW96Hw+rpJmGesrq6NcjJ/Wes2qVXd058rnGjY8K7mFTVM8nGIAq4SmR5wLYiicFByjHMBP+R47tpXu2ZufoqHzihnG5SQypWcymBdK89z0y8npMWUrib32zt8n4k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734700999; c=relaxed/simple; bh=WScnPJK87n8O/pKMb9QgQ1+0csS5kkxL2a2ENhgCAso=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VKa1f2VVh3bnv1S7RW/WuasVpIeqkQGKwzvy0hIp5Uckkv2Sd/p88t7fEQ2k9dyYyngEWElnAF42JlhJ1fhMrFVRx5ftMxnG8vs29xw97Jr16o58EWIWHO9TA6aRZtHVo8dMl0csZ2J/aaIFO91YfpJiYyzEl9XI0dmPbStWEcc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YcjtQIRF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YcjtQIRF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20192C4CECD; Fri, 20 Dec 2024 13:23:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734700998; bh=WScnPJK87n8O/pKMb9QgQ1+0csS5kkxL2a2ENhgCAso=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YcjtQIRFdYRfLdJjTdWVRju50Z1KcgP8iX0C4N0AFkTpf14/TuJRXhZTXwgVtCeeH yVjQbXvnn2MK23hqUur4oSgds9w/CAC+0u5YZc18nFTIc+IxuVjDwhUMDDVZ9icLfl AugymWkafKk2rHjO/v3S9x2wNNyze0u7zTtNPEN7OEqVbvYTMsoCkQD4e4SygB51kt ZORpqp+h5c1tzPf6uVt4jF1wiOYEvMMSlAyqYxRJ6o7EMEkacbGAN7XWmrmAiw5+kP B7ekyoJUihhAQjrKSVtazjdEW9k3U2pyAdi+OUUbWVpKKYMzW5CooJUe3WmQm2X6+C o8EKKKSohXWEg== Date: Fri, 20 Dec 2024 14:23:15 +0100 From: Frederic Weisbecker To: Thomas Gleixner Cc: syzbot , anna-maria@linutronix.de, linux-kernel@vger.kernel.org, peterz@infradead.org, syzkaller-bugs@googlegroups.com, Eric Biederman , Oleg Nesterov Subject: Re: [PATCH] signal/posixtimers: Handle ignore/blocked sequences correctly Message-ID: References: <6761b16e.050a0220.29fcd0.006d.GAE@google.com> <87ikrf78xa.ffs@tglx> <87cyhm7azk.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87cyhm7azk.ffs@tglx> Le Fri, Dec 20, 2024 at 02:14:07PM +0100, Thomas Gleixner a écrit : > On Fri, Dec 20 2024 at 14:06, Frederic Weisbecker wrote: > > Le Thu, Dec 19, 2024 at 08:46:25PM +0100, Thomas Gleixner a écrit : > >> if (!list_empty(&q->list)) { > >> /* > >> - * If task group is exiting with the signal already pending, > >> - * wait for __exit_signal() to do its job. Otherwise if > >> - * ignored, it's not supposed to be queued. Try to survive. > >> + * The signal was ignored and blocked. The timer > >> + * expiry queued it because blocked signals are > >> + * queued independent of the ignored state. > >> + * > >> + * The unblocking set SIGPENDING, but the signal > >> + * was not yet dequeued from the pending list, > >> + * which would have put it back on the ignore list. > > > > I must be missing something. I don't see dequeue_signal() checking if a signal > > is ignored upon delivery. > > > Sorry, I meant get_signal() which is what the actual signal delivery > path on exit to user space invokes. dequeue itself does not care. > Hmm, ok it eventually ignores the signal delivery to the user but: _ Dequeue signal has delivered it to posix timers _ The signal isn't moved back to the ignored list (or I'm missing something else?) Thanks.