From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 50C142C3251 for ; Thu, 2 Jul 2026 10:36:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782988607; cv=none; b=eaolH/UMliQ6K9otVTNpkdJvGEASL8fZrk7koLBPhC228bBryjgYEnMFVRx4tVvXlna2NmPr7uR/lmj2wzBypzU8AQSOVqWCfi2fGtV+hnpGBR+HHx3g6sVVOS2/B4q5qQ8MqeH8Qya//JQNTQ2v14nwaAxtGHiu4+PqEdhca+g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782988607; c=relaxed/simple; bh=76wYv9f1rQYd99C0N+/WragjSF6k+liFcOIPzDhNLzw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AuBEvZyfdSt2pZUU0d0jWXHrIlDnegdh3i7dFsUeCogDWIAhA3ACgXYZqD/hVGPCkj1y4HZkJgq5xaZtE+RPFWvxU8q5De+zszn8nRQKmxhmHW3vhRscebjj1/GLwpO1Okwd355vlgz5mK3Yuu3BxPZD7zR6A9PZMbXeKPhtuz4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=LRorBEfM; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LRorBEfM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782988602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8gZ+zG2I7UWDJ54SpoPOu9Q3CMMtdSWEnFjaE3PekrQ=; b=LRorBEfMdTmL9AriBVifTdpw/7yRUUkTZptajDZSHFDKtTUhMYVmcEbK5FkKiqOvvFNMp8 /xWwMytp4s+qm19zW3W8igHdjSvbP15x68sYC451I4Q+/G0ykw8cxV2sieaQVEXszOcSAG Zhq+0Eva4DIDKhisJosD3J91WQyvZzI= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-501-90GUW9LNNpqhFQr2KSjzVQ-1; Thu, 02 Jul 2026 06:36:39 -0400 X-MC-Unique: 90GUW9LNNpqhFQr2KSjzVQ-1 X-Mimecast-MFC-AGG-ID: 90GUW9LNNpqhFQr2KSjzVQ_1782988597 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 626F31944D39; Thu, 2 Jul 2026 10:36:37 +0000 (UTC) Received: from fedora (unknown [10.44.32.200]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id C71051800592; Thu, 2 Jul 2026 10:36:32 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 2 Jul 2026 12:36:36 +0200 (CEST) Date: Thu, 2 Jul 2026 12:36:31 +0200 From: Oleg Nesterov To: "Eric W. Biederman" Cc: Andrew Morton , Andy Lutomirski , Kees Cook , Kusaram Devineni , Peter Zijlstra , Thomas Gleixner , Will Drewry , linux-kernel@vger.kernel.org, Linus Torvalds Subject: Re: [PATCH 0/11] Short circuit delivery for coredump signals Message-ID: References: <87o6gx9rc4.fsf@email.froward.int.ebiederm.org> <877bnh7tnf.fsf@email.froward.int.ebiederm.org> <875x315jh0.fsf@email.froward.int.ebiederm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <875x315jh0.fsf@email.froward.int.ebiederm.org> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 On 06/29, Eric W. Biederman wrote: > > "Eric W. Biederman" writes: > > > Oleg Nesterov writes: > > > >> if (signal->flags & SIGNAL_GROUP_EXIT) { > >> if (signal->core_state) > >> return sig == SIGKILL; > >> /* > >> * The process is in the middle of dying, drop the signal. > >> */ > >> return false; > >> > >> This means that if SIGKILL comes before coredump_begin() sets signal->core_state, > >> it will be lost. > > > > I will reexamine that. I used to have something to deal with this case > > but somehow convinced myself it didn't matter. > > I was thinking of another related problem. > > In this case loosing SIGKILL before coredump_begin seems fine. The process > is already dying of a signal. Hmm. I disagree... > The only point of supporting SIGKILL at all during a coredump is because > writing the coredump out can be slow. So SIGKILL in that case just > aborts the coredump. Yes, the coredumping process is not dead. Yet. It can do a lot of activity and use a lot of resources. > 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. > There is another corner case I just noticed. > > When force_sig_info_to_task is passed HANDLER_EXIT today get_signal > skips ptrace stops when SA_IMMUTABLE is set. My change did not short > circuit deliver those signals when the process was ptraced so my last > change removing SA_IMMUTABLE was premature. Yes... and do_sigacttion() between send and delivery... Oleg.