From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) (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 62AF83FFFA7 for ; Fri, 26 Jun 2026 17:00:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=166.70.13.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782493202; cv=none; b=qf7NRwf5lXmFrhf76K6hKFZniwOHkuYDsJBWUHrGIDtc8nuqPSWxsBAyCb3YQOQ6Q0O0c4DvelVpQrasUQBGffNifxAhAV9gbBaX6RDsHsHQVqPeE9+OPRYqW8GKkQwS6OwBUwnmJIQ0zaEZJGUqkJOpAjDBfc+BDTYPCs4omMs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782493202; c=relaxed/simple; bh=n5SIjQuu6+avKquIqcBRrROkxiZ/tV+pIhHACEJTAyI=; h=From:To:Cc:In-Reply-To:References:Date:Message-ID:MIME-Version: Content-Type:Subject; b=r47xid1v/13nsyE7DxbxYkYKCvUdWlkcv485fZxyMXgnrUVKtk2QfsZBiLUYCZsirYwskkjFYMv+zyPGCkaN0YZ89AKcJWKnNbRuzy7O96W5+Bmd9X1C8iNZOUu2l32Vltpo0vovCUYspijp9sWVpeU1SKV7kMj1i4tnj9wJQD0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xmission.com; spf=pass smtp.mailfrom=xmission.com; dkim=pass (1024-bit key) header.d=xmission.com header.i=@xmission.com header.b=qVZi1nd1; arc=none smtp.client-ip=166.70.13.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xmission.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xmission.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xmission.com header.i=@xmission.com header.b="qVZi1nd1" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=xmission.com; s=xmission; h=Subject:Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=n5SIjQuu6+avKquIqcBRrROkxiZ/tV+pIhHACEJTAyI=; b=qVZi1nd1JXrB9zg1fhRyVNGcyN 8V1rV4EF33z+sWP+p08HHb1FUoK6Cmn/R/LDnxjZizQfcD6pGUafVsK2BbJtb2V6bycAxMGdbeZ+J u3wQB+ZXXhit0E14dtHSsOd+7yRUzwCmvKe3HYUTNDEgWGnJndhwIDaXIfxMlnCnqfBc=; Received: from in02.mta.xmission.com ([166.70.13.52]:48202) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1wd9uK-00585t-Gw; Fri, 26 Jun 2026 11:00:00 -0600 Received: from ip72-198-198-28.om.om.cox.net ([72.198.198.28]:53630 helo=email.froward.int.ebiederm.org.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1wd9uJ-0041fk-Lw; Fri, 26 Jun 2026 11:00:00 -0600 From: "Eric W. Biederman" To: Andrew Morton Cc: Andy Lutomirski , Kees Cook , Kusaram Devineni , Peter Zijlstra , Thomas Gleixner , Will Drewry , linux-kernel@vger.kernel.org, Oleg Nesterov In-Reply-To: <87o6gx9rc4.fsf@email.froward.int.ebiederm.org> (Eric W. Biederman's message of "Fri, 26 Jun 2026 11:52:43 -0500") References: <87o6gx9rc4.fsf@email.froward.int.ebiederm.org> Date: Fri, 26 Jun 2026 11:59:54 -0500 Message-ID: <8733y98cfp.fsf_-_@email.froward.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1wd9uJ-0041fk-Lw;;;mid=<8733y98cfp.fsf_-_@email.froward.int.ebiederm.org>;;;hst=in02.mta.xmission.com;;;ip=72.198.198.28;;;frm=ebiederm@xmission.com;;;sPfnum=0;;;sPf=pass X-XM-AID: U2FsdGVkX1/8+eImRG99l/zdmcgUYBOAP19BMJSNMfY= X-Spam-Level: * X-Spam-Virus: No X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.1 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 0.7 XMSubLong Long Subject * 1.5 XMNoVowels Alpha-numberic number with no vowels * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa01 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa01 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: *;Andrew Morton X-Spam-Relay-Country: X-Spam-Timing: total 414 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 3.6 (0.9%), b_tie_ro: 2.4 (0.6%), parse: 0.63 (0.2%), extract_message_metadata: 8 (1.9%), get_uri_detail_list: 0.90 (0.2%), tests_pri_-2000: 10 (2.4%), tests_pri_-1000: 1.86 (0.5%), tests_pri_-950: 0.92 (0.2%), tests_pri_-900: 0.75 (0.2%), tests_pri_-90: 145 (35.1%), check_bayes: 144 (34.8%), b_tokenize: 4.7 (1.1%), b_tok_get_all: 6 (1.3%), b_comp_prob: 1.18 (0.3%), b_tok_touch_all: 129 (31.3%), b_finish: 0.79 (0.2%), tests_pri_0: 233 (56.4%), check_dkim_signature: 0.42 (0.1%), check_dkim_adsp: 2.5 (0.6%), poll_dns_idle: 1.17 (0.3%), tests_pri_10: 1.71 (0.4%), tests_pri_500: 6 (1.5%), rewrite_mail: 0.00 (0.0%) Subject: [PATCH 10/11] signal: Short circuit deliver coredump signals X-SA-Exim-Connect-IP: 166.70.13.52 X-SA-Exim-Rcpt-To: oleg@redhat.com, linux-kernel@vger.kernel.org, wad@chromium.org, tglx@kernel.org, peterz@infradead.org, kusaram@devineni.in, kees@kernel.org, luto@kernel.org, akpm@linux-foundation.org X-SA-Exim-Mail-From: ebiederm@xmission.com X-SA-Exim-Scanned: No (on out03.mta.xmission.com); SAEximRunCond expanded to false The coredump rendevous start is the same as the process killing that complete_signal performs. get_signal now gets the siginfo and the signal number when a signal is short circuit delivered. Start short circuit deliverying coredump signals as there is nothing remaining that prevents their short circuit delivery. This means that processes that coredump will now exit faster and fatal_signal_pending will return true until the coredump starts. Signed-off-by: "Eric W. Biederman" --- kernel/signal.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c index ce3a99573aa9..0b602dfb0b78 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1032,24 +1032,21 @@ static void complete_signal(int sig, struct task_struct *p, enum pid_type type) (sig == SIGKILL || !p->ptrace)) { /* * This signal will be fatal to the whole group. + * + * Start a group exit and wake everybody up. + * This way we don't have other threads + * running and doing things after a slower + * thread has the fatal signal pending. */ - if (!sig_kernel_coredump(sig)) { - /* - * Start a group exit and wake everybody up. - * This way we don't have other threads - * running and doing things after a slower - * thread has the fatal signal pending. - */ - signal->flags = SIGNAL_GROUP_EXIT | SIGNAL_EXIT_DEQUEUE; - signal->group_exit_code = sig; - signal->group_stop_count = 0; - __for_each_thread(signal, t) { - task_clear_jobctl_pending(t, JOBCTL_PENDING_MASK); - sigaddset(&t->pending.signal, SIGKILL); - signal_wake_up(t, 1); - } - return; + signal->flags = SIGNAL_GROUP_EXIT | SIGNAL_EXIT_DEQUEUE; + signal->group_exit_code = sig; + signal->group_stop_count = 0; + __for_each_thread(signal, t) { + task_clear_jobctl_pending(t, JOBCTL_PENDING_MASK); + sigaddset(&t->pending.signal, SIGKILL); + signal_wake_up(t, 1); } + return; } /* -- 2.41.0