From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC5F8C43334 for ; Wed, 6 Jul 2022 11:14:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232036AbiGFLOI (ORCPT ); Wed, 6 Jul 2022 07:14:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231270AbiGFLOH (ORCPT ); Wed, 6 Jul 2022 07:14:07 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DB4027CFA for ; Wed, 6 Jul 2022 04:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fztPrfHXm7UR9PifETIZb3gX7gg3+lc6nr3BVtjGe6w=; b=Wv6eN4GBkESm3pqWaxQbSSV5OP Bd6MKMO338Jv6zkquc+4paSRj+DhTsT4Q6NZeciH0jKnQAZjHe3c0eQTrj0BJyJprWGg3kv40jroc lIMddxsQb4YSe3ILrLs0ftgvLEtLTlzyK//RWH+UCsVdsu3S+7Kubhiww3GEWZnlt4v926vocTQLN 3k/qiX4dtqH8c02lUT4/X8D+mBdD0rHShLcqqxam0el4Dub2rbTyTlwv5LZuayAz2Vf2uFPxahk5g Kyt+C1db4+gmeT7V4cDzPq79jvWG3mkWap3BfOplEJEy31rHcrSMw0YfS+H2XWsjPiNhwY+e0t5J5 5eSfwNLQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o92yb-000X59-CB; Wed, 06 Jul 2022 11:13:50 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 24BAF980050; Wed, 6 Jul 2022 13:13:47 +0200 (CEST) Date: Wed, 6 Jul 2022 13:13:46 +0200 From: Peter Zijlstra To: Oleg Nesterov Cc: Sven Schnelle , Steven Rostedt , Alexander Gordeev , "Eric W. Biederman" , Kees Cook , linux-kernel@vger.kernel.org Subject: Re: [PATCH] ptrace: fix clearing of JOBCTL_TRACED in ptrace_unfreeze_traced() Message-ID: References: <20220706101625.2100298-1-svens@linux.ibm.com> <20220706110438.GB9868@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220706110438.GB9868@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 06, 2022 at 01:04:38PM +0200, Oleg Nesterov wrote: > On 07/06, Sven Schnelle wrote: > > > > --- a/kernel/ptrace.c > > +++ b/kernel/ptrace.c > > @@ -222,7 +222,7 @@ static void ptrace_unfreeze_traced(struct task_struct *task) > > if (lock_task_sighand(task, &flags)) { > > task->jobctl &= ~JOBCTL_PTRACE_FROZEN; > > if (__fatal_signal_pending(task)) { > > - task->jobctl &= ~TASK_TRACED; > > + task->jobctl &= ~JOBCTL_TRACED; > > Heh. I have read this code many times, but I'm afraid I could read it > 1000 times more and didn't notice the problem ;) Heh, same here, I've read it today and didn't spot the problem. Brains are weird.