Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3018233iob; Fri, 6 May 2022 16:06:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxFgbd0VsV3ynZaP0uuQOp6scK4nnZmbPAcrwZLDfYCGbyMpkcyTG94XcCounhHWa1hjZL X-Received: by 2002:a17:903:22ce:b0:15e:bd57:5bec with SMTP id y14-20020a17090322ce00b0015ebd575becmr6117069plg.114.1651878380383; Fri, 06 May 2022 16:06:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651878380; cv=none; d=google.com; s=arc-20160816; b=IytFU7jGU4XLzs68wynNfYAMkyohTL3yMISJLTUyWkJQoJl4kS42CA7ms7+FRvVlVN VP616Ej7lg7hS0mjTFl4HH1mrsmyL1PcRO/z4JYZwCs0znsgDHuzKmTpkup1Im/2y7bW TWU0i96nnbtSqNdbQnJruhb/XTqTylG2pQZ/2Meer0h5BTq0Uh1vn6Zt/pFt/uY4ds1J gtFpqaRt1wCtPRf7enxpNXxlUqGIo6ixXuUs112IcVSjZBxqdk1VpmotBDNbUdwGRXmg HUYVaXo70oLIcppuli4M0CvZhkq2d9wlB/XB65DZS+zUEEzHwAkQjonjFr0XcZmHUYu8 f/XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:mime-version:user-agent:message-id :in-reply-to:date:references:cc:to:from; bh=yFpup2QdA4CjwHVFYtTS6kbOF8MBs0ctqs4WWFPf6xY=; b=ENUNe3NUO1zCC1FWYh/Bglkd9lKIpZ1KgTN8O3X/oyTmKPefWksUCJ/uqf0sjCO3NK YOK5MBGKsB+LwKKRVVlTysXjC0Kc8AIsLgMBtHY+aSAkSHJ13aHx5YXZkK/ud+tpI8/g RSiylOJ6qovM7VVgmMTnUYf2w/Gj6opOjGI+gDiCK3nGRX7Xq4+8Vf073Gr2dkLNN1qk ZkUnjTCb/KBKtBW898wZQMCyIAA5BkWxYRe+sCxJ6qyS6F6vmW9zK1BSb3TrqdjmWWzQ lOahj7ywvYuvgbTGv3BUJb926kcjINFc/Z5gidf3J/YAjn77TyOUSLrkI1haBwHD5dL2 jHQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k124-20020a632482000000b0038653b8ab83si6264851pgk.204.2022.05.06.16.06.02; Fri, 06 May 2022 16:06:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xmission.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382618AbiEER5i (ORCPT + 99 others); Thu, 5 May 2022 13:57:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237406AbiEER5h (ORCPT ); Thu, 5 May 2022 13:57:37 -0400 Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54D5328E33; Thu, 5 May 2022 10:53:57 -0700 (PDT) Received: from in01.mta.xmission.com ([166.70.13.51]:54714) by out01.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1nmffl-004Sf2-UZ; Thu, 05 May 2022 11:53:54 -0600 Received: from ip68-227-174-4.om.om.cox.net ([68.227.174.4]:37098 helo=email.froward.int.ebiederm.org.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1nmffl-0021uq-3P; Thu, 05 May 2022 11:53:53 -0600 From: "Eric W. Biederman" To: Oleg Nesterov Cc: linux-kernel@vger.kernel.org, rjw@rjwysocki.net, mingo@kernel.org, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, mgorman@suse.de, bigeasy@linutronix.de, Will Deacon , tj@kernel.org, linux-pm@vger.kernel.org, Peter Zijlstra , Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org, Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Kees Cook , Jann Horn , linux-ia64@vger.kernel.org References: <87k0b0apne.fsf_-_@email.froward.int.ebiederm.org> <20220504224058.476193-8-ebiederm@xmission.com> <20220505152801.GC13929@redhat.com> Date: Thu, 05 May 2022 12:53:45 -0500 In-Reply-To: <20220505152801.GC13929@redhat.com> (Oleg Nesterov's message of "Thu, 5 May 2022 17:28:03 +0200") Message-ID: <87zgjv6f2u.fsf@email.froward.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1nmffl-0021uq-3P;;;mid=<87zgjv6f2u.fsf@email.froward.int.ebiederm.org>;;;hst=in01.mta.xmission.com;;;ip=68.227.174.4;;;frm=ebiederm@xmission.com;;;spf=softfail X-XM-AID: U2FsdGVkX19B+JiTwRJgtZEdFQmx7oMLSPSifAAdFb0= X-SA-Exim-Connect-IP: 68.227.174.4 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Virus: No X-Spam-DCC: XMission; sa01 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ***;Oleg Nesterov X-Spam-Relay-Country: X-Spam-Timing: total 291 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 3.9 (1.4%), b_tie_ro: 2.7 (0.9%), parse: 0.63 (0.2%), extract_message_metadata: 2.0 (0.7%), get_uri_detail_list: 0.58 (0.2%), tests_pri_-1000: 2.9 (1.0%), tests_pri_-950: 0.97 (0.3%), tests_pri_-900: 0.82 (0.3%), tests_pri_-90: 101 (34.8%), check_bayes: 99 (34.2%), b_tokenize: 4.6 (1.6%), b_tok_get_all: 5 (1.8%), b_comp_prob: 1.44 (0.5%), b_tok_touch_all: 85 (29.3%), b_finish: 0.78 (0.3%), tests_pri_0: 165 (56.8%), check_dkim_signature: 0.40 (0.1%), check_dkim_adsp: 2.7 (0.9%), poll_dns_idle: 1.24 (0.4%), tests_pri_10: 1.71 (0.6%), tests_pri_500: 6 (2.1%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH v3 08/11] ptrace: Admit ptrace_stop can generate spuriuos SIGTRAPs X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Oleg Nesterov writes: > On 05/04, Eric W. Biederman wrote: >> >> -static int ptrace_stop(int exit_code, int why, int clear_code, >> - unsigned long message, kernel_siginfo_t *info) >> +static int ptrace_stop(int exit_code, int why, unsigned long message, >> + kernel_siginfo_t *info) > > Forgot to mention... but in general I like this change. > > In particular, I like the fact it kills the ugly "int clear_code" arg > which looks as if it solves the problems with the exiting tracer, but > actually it doesn't. And we do not really care, imo. Further either this change is necessary or we need to take siglock in the !current->ptrace path in "ptrace: Don't change __state" so that JOBCTL_TRACED can be cleared. So I vote for deleting code, and making ptrace_stop easier to reason about. Eric