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 BEE1A31DD97 for ; Fri, 3 Jul 2026 21:42:04 +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=1783114925; cv=none; b=rLIOP+o1M64fcsSATOmCEIjBj5WJZ9LYt8uaupQGwOaG71/IpNfndL7AjFLPsxzDWISzXSbAgIPCu6wXtptKnm06VmO5bfGi/chNHGAhGTn4oC7WA2wfgsKcdTdmDBzm5tBF4ADhSfkf0jYXntErbunGaVuBvqAhYz8ihCCPVRk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783114925; c=relaxed/simple; bh=b0NCxPxcY4qGhSA4l4pOtjYqhHe36JGqPN5F4YUlsjM=; h=From:To:Cc:In-Reply-To:References:Date:Message-ID:MIME-Version: Content-Type:Subject; b=hCIuxTtX0pN+p3eYheDBWKepjRTNR/UZbHfdgxIRW/B0gEcM7agTdEXM+W0KszlEO3JKf9JSPDP3qDsTBhUCeVPhHj3/BEo6LWiS94Wlu732On2aaUs+b6P8fsBity3cw/dH2qvCA1/a/DjQ9rTCg34iZnwjNmrUYU2kf25OxiY= 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=ekmRDGdv; 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="ekmRDGdv" 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=b0NCxPxcY4qGhSA4l4pOtjYqhHe36JGqPN5F4YUlsjM=; b=ekmRDGdv402PGCBRN5oOAovaI+ K63YaGHLPIJGij7WK5v+FamCqvGgaCKYlJWSgMUnHKzyMBVeDa/gBo9TSns5aNMfcqOZHyEP9Nzyc W5u1oTevj2meI8DV+UCRVqJGuDM9XY5VCFBehJOJRf2Gyus1a/2tMK5TZ32Xu8bFFhR4=; Received: from in01.mta.xmission.com ([166.70.13.51]:52202) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1wfle8-00HZVP-0c; Fri, 03 Jul 2026 15:42:04 -0600 Received: from ip72-198-198-28.om.om.cox.net ([72.198.198.28]:59224 helo=email.froward.int.ebiederm.org.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 1wfle7-00DmVS-6r; Fri, 03 Jul 2026 15:42:03 -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: <877bnb4uyw.fsf_-_@email.froward.int.ebiederm.org> (Eric W. Biederman's message of "Fri, 03 Jul 2026 16:35:51 -0500") References: <87o6gx9rc4.fsf@email.froward.int.ebiederm.org> <877bnh7tnf.fsf@email.froward.int.ebiederm.org> <877bnb4uyw.fsf_-_@email.froward.int.ebiederm.org> Date: Fri, 03 Jul 2026 16:41:57 -0500 Message-ID: <87ldbr21ju.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=1wfle7-00DmVS-6r;;;mid=<87ldbr21ju.fsf_-_@email.froward.int.ebiederm.org>;;;hst=in01.mta.xmission.com;;;ip=72.198.198.28;;;frm=ebiederm@xmission.com;;;sPfnum=0;;;sPf=pass X-XM-AID: U2FsdGVkX19PCGxpepypa6ajXZsQCpvE/KiPNZG+KHA= 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.4994] * 0.7 XMSubLong Long Subject * 1.5 XMNoVowels Alpha-numberic number with no vowels * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=44] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=44 X-Spam-Combo: *;Oleg Nesterov X-Spam-Relay-Country: X-Spam-Timing: total 365 ms - load_scoreonly_sql: 0.07 (0.0%), signal_user_changed: 11 (3.1%), b_tie_ro: 10 (2.7%), parse: 1.16 (0.3%), extract_message_metadata: 13 (3.5%), get_uri_detail_list: 1.03 (0.3%), tests_pri_-2000: 13 (3.6%), tests_pri_-1000: 2.8 (0.8%), tests_pri_-950: 1.24 (0.3%), tests_pri_-900: 1.06 (0.3%), tests_pri_-90: 80 (21.8%), check_bayes: 78 (21.4%), b_tokenize: 6 (1.7%), b_tok_get_all: 6 (1.6%), b_comp_prob: 2.3 (0.6%), b_tok_touch_all: 60 (16.5%), b_finish: 1.00 (0.3%), tests_pri_0: 226 (62.1%), check_dkim_signature: 0.68 (0.2%), check_dkim_adsp: 3.0 (0.8%), poll_dns_idle: 0.77 (0.2%), tests_pri_10: 2.3 (0.6%), tests_pri_500: 9 (2.6%), rewrite_mail: 0.00 (0.0%) Subject: [PATCH 09/14] signal: Move audit_core_dumps from do_coredump into get_signal X-SA-Exim-Connect-IP: 166.70.13.51 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 out03.mta.xmission.com); SAEximRunCond expanded to false The function audit_core_dumps is not about the coredumps but about detecting the conditions that would trigger a coredump, and logging something when that happens. The function audit_core_dumps runs even if a coredump never happens. So move audit_core_dumps out of vfs_coredump and into get_signal to make it clear it does not care about the actual core dumps. Signed-off-by: "Eric W. Biederman" --- fs/coredump.c | 2 -- kernel/signal.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/coredump.c b/fs/coredump.c index 2b0b6c3c47ee..700814fc2ff6 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -1199,8 +1199,6 @@ void vfs_coredump(const kernel_siginfo_t *siginfo) .cpu = raw_smp_processor_id(), }; - audit_core_dumps(siginfo->si_signo); - if (coredump_skip(&cprm, binfmt)) return; diff --git a/kernel/signal.c b/kernel/signal.c index dd00e9879dcf..28e047d76043 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -3077,6 +3077,7 @@ bool get_signal(struct ksignal *ksig) if (print_fatal_signals) print_fatal_signal(signr); proc_coredump_connector(current); + audit_core_dumps(ksig->info.si_signo); /* * If it was able to dump core, this kills all * other threads in the group and synchronizes with -- 2.41.0