From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232]) (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 4997B375F7C for ; Mon, 6 Jul 2026 12:30:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=166.70.13.232 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783341050; cv=none; b=LDOGXCre7dwHUQqUylb3skW8+IRl6eeeMj5CXYLOLEOel8j5iwph6i4xTQvvXNwdTug7zRRHRxqqU5ZgfGNALXvlPYopXSDj+Qa9f/CEXANWkQMt3VNrClBxAjKmJq+2cOMpapRB4TYIDgT9MevGzYZ1vzlHpK9jxAThB0alywQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783341050; c=relaxed/simple; bh=9Sb8VNXltc3GoT1gXz1MwHt0HwARbOBoChxhNAg1/Fo=; h=From:To:Cc:In-Reply-To:References:Date:Message-ID:MIME-Version: Content-Type:Subject; b=V5rwtFgvQqzDEy7L7d5+rYaF+VHTm0EzpsxoMVqpjjQia/o7evzX3fkIvWRuIUT/6ptP7EzOqLvdd2aL8f+AVtHRk1S4EyuQBIcUWvk5/PWhnr8kbK4THl2MeSN/5t3j9IA/6ary/DW+8zTKY4NDMB3hTpnDS+oMBqLNkWsjBO8= 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=Vm/E606w; arc=none smtp.client-ip=166.70.13.232 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="Vm/E606w" 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=9Sb8VNXltc3GoT1gXz1MwHt0HwARbOBoChxhNAg1/Fo=; b=Vm/E606w7hap12WnWQxazsEqrz Lz2SeQ+mbvC6Y30l7rQVLzJ5jfa4L6lV8c9TgM6Gv3yzHS6JJubM3E7aZ0mOoXNOCLI5pgxNpzSl7 a0FxfjfT63iXXc8yUq3Kv1vqW50fGXhHgUNVSEn5bRdo8BvxN9xPNH1KsZejiEcqIHqA=; Received: from in02.mta.xmission.com ([166.70.13.52]:52582) by out02.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1wgiTA-006vLm-2a; Mon, 06 Jul 2026 06:30:40 -0600 Received: from ip72-198-198-28.om.om.cox.net ([72.198.198.28]:55206 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 1wgiT9-004b42-0e; Mon, 06 Jul 2026 06:30:39 -0600 From: "Eric W. Biederman" To: Christian Brauner Cc: Oleg Nesterov , Andrew Morton , Andy Lutomirski , Kees Cook , Kusaram Devineni , Peter Zijlstra , Thomas Gleixner , Will Drewry , linux-kernel@vger.kernel.org, Linus Torvalds In-Reply-To: <20260706-empathie-titan-verordnen-a4b2eb651f8e@brauner> (Christian Brauner's message of "Mon, 06 Jul 2026 11:21:44 +0200") References: <87o6gx9rc4.fsf@email.froward.int.ebiederm.org> <877bnh7tnf.fsf@email.froward.int.ebiederm.org> <875x315jh0.fsf@email.froward.int.ebiederm.org> <87ldbr4yn3.fsf@email.froward.int.ebiederm.org> <20260706-empathie-titan-verordnen-a4b2eb651f8e@brauner> Date: Mon, 06 Jul 2026 07:30:34 -0500 Message-ID: <87ik6sxpud.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=1wgiT9-004b42-0e;;;mid=<87ik6sxpud.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: U2FsdGVkX18xXFMbSNeMePGeuDTRnJzkcN4Ro2WmDSE= X-Spam-Level: * 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 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: *;Christian Brauner X-Spam-Relay-Country: X-Spam-Timing: total 624 ms - load_scoreonly_sql: 0.08 (0.0%), signal_user_changed: 12 (1.8%), b_tie_ro: 10 (1.6%), parse: 1.92 (0.3%), extract_message_metadata: 5 (0.8%), get_uri_detail_list: 1.99 (0.3%), tests_pri_-2000: 4.3 (0.7%), tests_pri_-1000: 4.5 (0.7%), tests_pri_-950: 2.00 (0.3%), tests_pri_-900: 1.51 (0.2%), tests_pri_-90: 89 (14.2%), check_bayes: 87 (13.9%), b_tokenize: 10 (1.5%), b_tok_get_all: 8 (1.3%), b_comp_prob: 3.1 (0.5%), b_tok_touch_all: 62 (9.9%), b_finish: 0.96 (0.2%), tests_pri_0: 480 (76.8%), check_dkim_signature: 0.91 (0.1%), check_dkim_adsp: 3.0 (0.5%), poll_dns_idle: 0.47 (0.1%), tests_pri_10: 2.2 (0.4%), tests_pri_500: 13 (2.1%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH 0/11] Short circuit delivery for coredump signals X-SA-Exim-Connect-IP: 166.70.13.52 X-SA-Exim-Rcpt-To: torvalds@linux-foundation.org, 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, oleg@redhat.com, brauner@kernel.org X-SA-Exim-Mail-From: ebiederm@xmission.com X-SA-Exim-Scanned: No (on out02.mta.xmission.com); SAEximRunCond expanded to false Christian Brauner writes: > On 2026-07-05 17:54 +0200, Oleg Nesterov wrote: >> On 07/03, Eric W. Biederman wrote: >> > >> > Oleg Nesterov writes: >> > >> > > Yes, the coredumping process is not dead. Yet. It can do a lot of activity >> > > and use a lot of resources. >> > >> > It is semantically dead. Pragmatically I completely agree. >> > >> > >> Do you know of something where userspace actually depends upon >> > >> killing a coredump before it even starts? >> > > >> > > Well. I think a user has all rights to assume that SIGKILL must always >> > > terminate the process asap, the process killed by SIGKILL must not start >> > > the coredumping. > > I agree and that's not an acceptable regression especially given how > sensitive this codepath is. Regression???? The process is already dead. It has already been sent a fatal signal. The fatal signal has already been accepted for delivery. The process is already in a state where fatal_signal_pending returns true. Accepting a signal at this point is arguably in violation of POSIX and the reasonable expectation of many programmers. When we allowed such signals to abort PTRACE_EVENT_EXIT it was practically impossible for userspace programmers to deal with. So this does not even generalize beyond the point of a coredump. The window Oleg is talking about is so small I don't know if you can actually write a test program to hit it. Even a process that executes. pid_t target = xxxx; kill(target, SIGSEGV); kill(target, SIGKILL); Has a reasonable chance of the coredump starting before the SIGKILL is sent. The only use for accepting SIGKILL at that point is the very special case that a coredump is taking too long and we have no other means of aborting the coredump. The code today does not work by design. It works by happenstance. The code runs a very strong risk of violating invariants in the code. With the attendant risk of worse problems elsewhere. There is a use for dealing with SIGKILL in this situation. I am happy for a nuanced discussion here. Labeling something a regression when there is no code shown to care is inconsistent when the kernel's no-regression rule. There are huge deficits in the signal handling code and the kernel because coredumps shutdown the process in a separate code path from ordinary shutdown. Most immediate is that sending SIGSEGV or any other coredump causing signal to a process today, when that signal's handler is SIG_DLF does not immediately cause the process start shutting down. Which can be something of a DOS on the current system. There are a lot of code paths that go through a lot of hoops because that shutdown does not get started immediately. With the result that we have some hoops. So please let's review and discuss the code I posted, and not get side-tracked. Eric