Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp29604lfe; Fri, 15 Apr 2022 17:56:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuroA54oRm7dyHVwy4IS3e3yA6np+K1gKrRuoPIoaD5c+qwCyE0AFEfz+Cabo41LRFEs0J X-Received: by 2002:a17:902:db0d:b0:158:c6b0:ab9 with SMTP id m13-20020a170902db0d00b00158c6b00ab9mr1551100plx.19.1650070605556; Fri, 15 Apr 2022 17:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650070605; cv=none; d=google.com; s=arc-20160816; b=rpCTX1SLXKIV2rtxczJPExhsE437c5J/gXpwN5Z6IYJ/YK/OxPhP1SR9wQ9ex/0Pyk UafaSoIalXLAnOlnHefbOd/3a1J2hkQHLXP5kfogDt4NrOHTQ8+aUPdn7Zv6yoc5LqZx tcTGF6Zojb1SQUUiLz1TbjENOfzlJmXz4kjwAk5SXfLDWwY5SLENjLIaY+ex3TSKyStc THLoW9cG/jTm16+XYLy1ZiKVSDvWzhzX7OAhdwJBa2EkNvhGZ+3RBHjndrYCrNZyDMQ5 BvnCs1Ogmo/e7DAhXlOUsWVnPqqeHLAH80ij5S+UOEq0ovJIijvCSwxtvNz9esp5oXvv BxmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=I9T22GM+Ng/opSmsZDxjJjw+hUXdR4RJPukdevZlM64=; b=dLhLEptO8yHL1NTV8WS/wXMoIKLPBmrHll2XNdm3g0/+svMfCyIKsmtYqmgSsi7mc6 Lp82+Dform+j0kt9pXA5J2jzEW7xUy/RhALG8cmFdd3YDFckSkNQi/gWhcLRldUgtXtU lSc29ayj8gDofq3arMuUyn8krpG5cMTZEl+LQ0qeJ7jr1zgwuJykrYNpXgFte2Hrv2PH kPsku5nLYUYA4ru6fqwhOsOGen9+gWEJqfjbSBBD19m6hOpbYvw9MOOycTgtuvlZ4DpM XrugZa205zMc90ILeH0MwZX8Gg/ViKCIzBQ565nJjNH6k2cMRWlqrSbQB90aRs2ebAkT fnHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=arsokogJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id bg8-20020a17090b0d8800b001d1c84b8ea2si983855pjb.156.2022.04.15.17.56.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:56:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=arsokogJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 490AE119865; Fri, 15 Apr 2022 17:42:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352929AbiDOMEe (ORCPT + 99 others); Fri, 15 Apr 2022 08:04:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353008AbiDOMEb (ORCPT ); Fri, 15 Apr 2022 08:04:31 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53D22BD2DF; Fri, 15 Apr 2022 05:02:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=I9T22GM+Ng/opSmsZDxjJjw+hUXdR4RJPukdevZlM64=; b=arsokogJj0I6yMEqWi+ERQFB7B K8jmEM7/ICFx4t6wAb0dir/YjFeepTmdRtIfC8BDDcw/L+ySzaoxB3hJcYmHGdIz9Dl1TS8VY3904 hv2MfvWOMbz0zSuQ108wVGRALTSxL5sLbfGw8ps08zW+ePaIyx4aJAuTmL7/AJ8jE9xx7KeHirV5g k0FhtOmWoJK7/Jr+GXAPSMjLJ6DqqLNZXHfI6MCFjh+1NrBNldZBrwYotaXU4hLhQnjxDb70zA9uU 9UQTz7Fuv2KzzBiB1sZ21vVhjdb8UryhQugu6OCr6ahBE5GmFFmJySdTHGDSYVWX770X6VbVV8Zxg bJmDaa9A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfKe1-00G62u-KA; Fri, 15 Apr 2022 12:01:45 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 17C0C3001AD; Fri, 15 Apr 2022 14:01:44 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0750730A3B961; Fri, 15 Apr 2022 14:01:44 +0200 (CEST) Date: Fri, 15 Apr 2022 14:01:43 +0200 From: Peter Zijlstra To: Oleg Nesterov Cc: rjw@rjwysocki.net, mingo@kernel.org, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, mgorman@suse.de, ebiederm@xmission.com, bigeasy@linutronix.de, Will Deacon , linux-kernel@vger.kernel.org, tj@kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH 2/5] sched,ptrace: Fix ptrace_check_attach() vs PREEMPT_RT Message-ID: References: <20220413132451.GA27281@redhat.com> <20220413185704.GA30360@redhat.com> <20220413185909.GB30360@redhat.com> <20220413192053.GY2731@worktop.programming.kicks-ass.net> <20220413195612.GC2762@worktop.programming.kicks-ass.net> <20220414115410.GA32752@redhat.com> <20220414183433.GC32752@redhat.com> <20220415101644.GA10421@redhat.com> <20220415105755.GA15217@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220415105755.GA15217@redhat.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 15, 2022 at 12:57:56PM +0200, Oleg Nesterov wrote: > On 04/15, Oleg Nesterov wrote: > > > > OK, so far it seems that this patch needs a couple of simple fixes you > > pointed out, but before I send V2: > > > > - do you agree we can avoid JOBCTL_TRACED_FROZEN in 1-2 ? > > > > - will you agree if I change ptrace_freeze_traced() to rely > > on __state == TASK_TRACED rather than task_is_traced() ? > > > > Forgot to say, I think 1/5 needs some changes in any case... > > ptrace_resume() does wake_up_state(child, __TASK_TRACED) but doesn't > clear JOBCTL_TRACED. The "else" branch in ptrace_stop() leaks this flag > too. Urgh, yes, I seemed to have missed that one :-(