From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) (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 29A4241DEC9 for ; Thu, 9 Jul 2026 11:59:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=166.70.13.231 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783598398; cv=none; b=T0/1vb12Ujzntg8ez4aeJ0IOhADhP20zy1mE/QMTAXHPMsBmGyi4t7X44lO3tJbHc09B9JHm5crQ5G8M+0WzDgNbevm/+uf9r1d5ccwZxx+u4zAqORDCW3mnybOzpB9aPOvqvQ0x/n+uuHtqccQL/y9uQ8k3vmFucVvDI/URX6Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783598398; c=relaxed/simple; bh=PQcRUQSnu5UIe1E9fxD7MaoA3WFoNegBYdHJrPjnVck=; h=From:To:Cc:In-Reply-To:References:Date:Message-ID:MIME-Version: Content-Type:Subject; b=IUBCLrHUP+Uu51wfySQbFMVZOfi2/nz4V3j7Np/zMChYo3LXQNfkKfF0t1IlimiKy7xmRG3jyA3THQg+ADJk1wuTzmwkKN4CBMbU3q2JcQbJq43WJP3GzDk1n4w65KIqtFoNRPJHCag9zhST9PkZBBNP2VTz5NbysLHZr8/08N0= 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=TqGVdUI3; arc=none smtp.client-ip=166.70.13.231 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="TqGVdUI3" 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=PQcRUQSnu5UIe1E9fxD7MaoA3WFoNegBYdHJrPjnVck=; b=TqGVdUI3bz2wfDQY5JTbeECKVd vEsXU6bCWLzslYioj8SdQJMh8wR+Fj3kM2tCD5RVsxdgJTHu9Px9RWS2f/fnuIFfzHaLUaggYHHpm lrEnhlHiVTQDYL5zGVD+j4UOcNEOFDSy/khTgkw/VhFHd+Gz1aDCqF9CyTgCJYi466Q4=; Received: from in02.mta.xmission.com ([166.70.13.52]:54758) by out01.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1whnPu-009x0f-Rm; Thu, 09 Jul 2026 05:59:47 -0600 Received: from ip72-198-198-28.om.om.cox.net ([72.198.198.28]:56818 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 1whnPu-00BVZi-0V; Thu, 09 Jul 2026 05:59:46 -0600 From: "Eric W. Biederman" To: Oleg Nesterov Cc: Andrew Morton , Andy Lutomirski , Kees Cook , Kusaram Devineni , Peter Zijlstra , Thomas Gleixner , Will Drewry , linux-kernel@vger.kernel.org, Linus Torvalds , Christian Brauner In-Reply-To: (Oleg Nesterov's message of "Tue, 7 Jul 2026 14:15:04 +0200") References: <87o6gx9rc4.fsf@email.froward.int.ebiederm.org> <877bnh7tnf.fsf@email.froward.int.ebiederm.org> <877bnb4uyw.fsf_-_@email.froward.int.ebiederm.org> Date: Thu, 09 Jul 2026 06:59:38 -0500 Message-ID: <87mrw0wez9.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=1whnPu-00BVZi-0V;;;mid=<87mrw0wez9.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+vP5tAk4rTTs/eob91Ewc2v6n0pYOGok8= 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.5016] * 0.7 XMSubLong Long Subject * 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] * 0.2 XM_B_SpammyWords One or more commonly used spammy words * 0.4 XMBrknScrpt_02 Possible Broken Spam Script X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Oleg Nesterov X-Spam-Relay-Country: X-Spam-Timing: total 419 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 11 (2.5%), b_tie_ro: 9 (2.2%), parse: 0.90 (0.2%), extract_message_metadata: 3.5 (0.8%), get_uri_detail_list: 1.50 (0.4%), tests_pri_-2000: 3.5 (0.8%), tests_pri_-1000: 2.7 (0.7%), tests_pri_-950: 1.30 (0.3%), tests_pri_-900: 1.00 (0.2%), tests_pri_-90: 89 (21.3%), check_bayes: 88 (21.0%), b_tokenize: 7 (1.7%), b_tok_get_all: 7 (1.6%), b_comp_prob: 2.3 (0.5%), b_tok_touch_all: 68 (16.2%), b_finish: 0.96 (0.2%), tests_pri_0: 287 (68.6%), check_dkim_signature: 0.53 (0.1%), check_dkim_adsp: 2.6 (0.6%), poll_dns_idle: 0.80 (0.2%), tests_pri_10: 2.1 (0.5%), tests_pri_500: 8 (1.8%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH v2 00/14] Short circuit delivery for coredump signals X-SA-Exim-Connect-IP: 166.70.13.52 X-SA-Exim-Rcpt-To: brauner@kernel.org, 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 X-SA-Exim-Mail-From: ebiederm@xmission.com X-SA-Exim-Scanned: No (on out01.mta.xmission.com); SAEximRunCond expanded to false Oleg Nesterov writes: > On 07/07, Oleg Nesterov wrote: >> >> Eric, so far I applied the whole series, and I don't see how it can >> solve one of the problems I tried to fix in my series. >> >> Again. A task T has a pending and blocked SIGSYS. si_code = SI_USER. >> (although the latter is not strictly necessary) >> >> force_sig_seccomp(force_coredump => true) sent to T unblocks SIGSYS >> and sets SA_IMMUTABLE. >> >> However, __send_signal_locked() will bypass enqueue_signal() (so it >> won't set SIGNAL_GROUP_EXIT) because legacy_queue() is true. >> >> T calls get_signal(). Now. it can dequeue another synchronous signal. >> If that signal has a handler and its sa_mask includes SIGSYS, the task >> can return to userspace and survive. >> >> No? >> >> Oh... And SIGKILL still can be lost, and I still think this is not good. > > Hmm. And it seems that V2 doesn't fix the problem I noticed in V1: the dumper > thread can be wrong. > > The first thread which calls get_signal() -> dequeue_exit_signal() will > initiate the coredumping, not necessary the faulting thread. This looks > very wrong to me. The problem was that dequeue_exit_signal would read the exit signal from the per thread queue. I solved that by always placing the exit signal on the shared_pending queue (even when it would normally not be on the shared_pending queue). With the signal on the shared_pending queue any thread can initiate the core dump without problems. Or am I missing something where it still matters? I can see where it would be nice in the coredump to know which thread triggered things, but I don't remember anything actually caring. I have just skimmed through the code looking. The only thing I can see that would actually be effected are "%i" and "%I" in the coredump pattern. The only other effect I can see is that the order of the threads notes as written into the coredump with fill_note_info will be different. Perhaps a debugger takes that as a signal to report which thread has died? If something actually cares that is worth fixing. Do you know of anything that actually cares? Eric