Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp471740pxv; Thu, 24 Jun 2021 12:03:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMT7pJTikS31MU9ZMcrSwQ5v89HSZPpASRncv2PcGI7tnmOM3UHTFvBDdj5NNfbbKcmtwe X-Received: by 2002:aa7:d955:: with SMTP id l21mr9432330eds.35.1624561412696; Thu, 24 Jun 2021 12:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624561412; cv=none; d=google.com; s=arc-20160816; b=0SJKFxTIzACIpEXAlus8/V0xw2wQUGX10LVJYxAXBNRmskenDFBHD6OBLaOZFRD9re bm+RqveEZgOD6/TH6CuvxJ6ix3crNARYKB1JBgIRFrCBox3Yhbm/gtQd2tkD/t0W7Xgf KuyI/C9qFcHkZVNyS08vp2DcIg09pjlSokosxlpuQs1lvVPtZbQSoErXhcN/cAaq4bOZ EnYVsGosYhFwGfTY4raXNSX/kM4IaUVlOZ2vsAvs8MFkXXvz76Nbq/kDaQU1OTaupquR wnjEN6pIXW6MfmZjq/9XtiqeXMadXowxHetaee74Hg2EsHIT7ELPd0kFEQgYAQBIIeI0 2XPQ== 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=RpLWhUJKPciKJ9BEWPixhx85SGPp5BCHrG8SBzm9E3s=; b=fh8nu2ZvrruxpVyg1lOOr2LsC9wlzOEG05ZIAZxxWIRWPzVYCmab6ZQPj0fXuXga0C M3lg7rDN4vlw2OzRGdpD/DxXEvxEKxHmw9fvAqdHjz08Ou+sYjVOg3OKT/+5su1YGMtM vR9NuMGI+K0+uq43wfTmv9PhVD4C1sfM9b5avVheMvGNeXvSAxHeL1Z8o6z83WtJDRGn lIcTVKyWHahAv1hVdgICWf4fmN0ZlMRjJkcxaBSJruxoOyZ7f4C7wlje2sIfFylO63wH 5ujtOMJPA9uDctuQfa2rdVo1+E4YhUv04IvloAUW7b9dGZpTbUYtEl/01xsX37qfTz9L MSxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si3963043edr.513.2021.06.24.12.03.09; Thu, 24 Jun 2021 12:03:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232778AbhFXTEK (ORCPT + 99 others); Thu, 24 Jun 2021 15:04:10 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:36464 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232758AbhFXTEJ (ORCPT ); Thu, 24 Jun 2021 15:04:09 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out01.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lwUbl-0009To-5H; Thu, 24 Jun 2021 13:01:49 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95]:47182 helo=email.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 1lwUbk-003RqE-4d; Thu, 24 Jun 2021 13:01:48 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Linus Torvalds Cc: Al Viro , Michael Schmitz , linux-arch , Jens Axboe , Oleg Nesterov , Linux Kernel Mailing List , Richard Henderson , Ivan Kokshaysky , Matt Turner , alpha , Geert Uytterhoeven , linux-m68k , Arnd Bergmann , Ley Foon Tan , Tejun Heo , Kees Cook References: <87sg1lwhvm.fsf@disp2133> <6e47eff8-d0a4-8390-1222-e975bfbf3a65@gmail.com> <924ec53c-2fd9-2e1c-bbb1-3fda49809be4@gmail.com> <87eed4v2dc.fsf@disp2133> <5929e116-fa61-b211-342a-c706dcb834ca@gmail.com> <87fsxjorgs.fsf@disp2133> <87a6njf0ia.fsf@disp2133> <87tulpbp19.fsf@disp2133> <87zgvgabw1.fsf@disp2133> <875yy3850g.fsf_-_@disp2133> Date: Thu, 24 Jun 2021 14:01:40 -0500 In-Reply-To: <875yy3850g.fsf_-_@disp2133> (Eric W. Biederman's message of "Thu, 24 Jun 2021 13:57:35 -0500") Message-ID: <87a6nf6q97.fsf_-_@disp2133> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1lwUbk-003RqE-4d;;;mid=<87a6nf6q97.fsf_-_@disp2133>;;;hst=in01.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/gBwk+RmoD5QJZcwa1NSYKgkgA35zQ/ig= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa05.xmission.com X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TooManySym_01,XMNoVowels,XMSubLong, XM_B_SpammyWords autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.7 XMSubLong Long Subject * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa05 1397; Body=1 Fuz1=1 Fuz2=1] * 0.2 XM_B_SpammyWords One or more commonly used spammy words * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa05 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Linus Torvalds X-Spam-Relay-Country: X-Spam-Timing: total 479 ms - load_scoreonly_sql: 0.20 (0.0%), signal_user_changed: 10 (2.1%), b_tie_ro: 8 (1.7%), parse: 1.01 (0.2%), extract_message_metadata: 11 (2.2%), get_uri_detail_list: 0.95 (0.2%), tests_pri_-1000: 14 (2.9%), tests_pri_-950: 1.23 (0.3%), tests_pri_-900: 0.99 (0.2%), tests_pri_-90: 235 (49.1%), check_bayes: 234 (48.9%), b_tokenize: 7 (1.6%), b_tok_get_all: 125 (26.2%), b_comp_prob: 1.82 (0.4%), b_tok_touch_all: 97 (20.2%), b_finish: 0.78 (0.2%), tests_pri_0: 195 (40.7%), check_dkim_signature: 0.58 (0.1%), check_dkim_adsp: 2.6 (0.5%), poll_dns_idle: 0.63 (0.1%), tests_pri_10: 1.80 (0.4%), tests_pri_500: 6 (1.3%), rewrite_mail: 0.00 (0.0%) Subject: [PATCH 5/9] signal/group_exit: Use start_group_exit in place of do_group_exit 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 Make thread exiting uniform by causing all threads to pass through get_signal when they are exiting. This simplifies the analysis of sychronization during exit and guarantees that all full set of registers will be available for ptrace to examine for threads that stop at PTRACE_EVENT_EXIT. Signed-off-by: "Eric W. Biederman" --- kernel/exit.c | 4 ++-- kernel/seccomp.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/exit.c b/kernel/exit.c index fd1c04193e18..921519d80b56 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -931,8 +931,8 @@ do_group_exit(int exit_code) */ SYSCALL_DEFINE1(exit_group, int, error_code) { - do_group_exit((error_code & 0xff) << 8); - /* NOTREACHED */ + start_group_exit((error_code & 0xff) << 8); + /* get_signal will call do_exit */ return 0; } diff --git a/kernel/seccomp.c b/kernel/seccomp.c index 5301eca670a0..b1c06fd1b205 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -1250,7 +1250,7 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd, if (action == SECCOMP_RET_KILL_THREAD) do_exit(SIGSYS); else - do_group_exit(SIGSYS); + start_group_exit(SIGSYS); } return -1; } -- 2.20.1