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 7704E3FFFA7 for ; Fri, 26 Jun 2026 16:56:45 +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=1782493008; cv=none; b=dHdir0ys6QVOAIipp+69zB+cJkONrhfo+in2hItt7ZL8Tz4eC8C+qLCgLWpS3yLAqK4ImxnS+8lXI5p9Ve4IB9aDB5m9KTqMz1ypvKLNygcXjWDFh0LbIbHSN5O/CrUaOPNacK4aZrF66ohm62n/X8gJdjaasfYGShAv98ohtDk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782493008; c=relaxed/simple; bh=SIr0E1VZLjyJdom3OZR5KVyUYoeYQIvP7204YFmpfFc=; h=From:To:Cc:In-Reply-To:References:Date:Message-ID:MIME-Version: Content-Type:Subject; b=eh9P5loJQbBLfXvgznzqE6r7Pm+lZTKBa/1UzjrTfg9kDOVBBtdZV2OnzG2HkFaDLkHjq38Ld54tUndP9anbt0sI5erTtE5EgkRrb+Q3SJxXFjE6JC0avlH1dTEslGzCQQr16CHVyoAaq3K/mqKVW/FN25dyxDQr6cZGs0TxLJw= 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=AfeKJ4ka; 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="AfeKJ4ka" 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=SIr0E1VZLjyJdom3OZR5KVyUYoeYQIvP7204YFmpfFc=; b=AfeKJ4kaebWZXYvhxc7VG9Gj6/ PGv5vTRNIAHOTMaMx4bKrSkux64IRUuACQr+q0s6nNMmu6mPbkNb6ygN28CyWo3OWYOoQBKYJT99i 4RKupRIpNQJzBAWexLqWHjcMTgzEFbX7RETTRK46Nsv9mcNpKE27VSvm6lzEvULILA2c=; Received: from in01.mta.xmission.com ([166.70.13.51]:43572) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1wd9rA-0057wF-Gy; Fri, 26 Jun 2026 10:56:44 -0600 Received: from ip72-198-198-28.om.om.cox.net ([72.198.198.28]:51500 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 1wd9r9-00GkBy-OV; Fri, 26 Jun 2026 10:56:44 -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:56:38 -0500 Message-ID: <87v7b58cl5.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=1wd9r9-00GkBy-OV;;;mid=<87v7b58cl5.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: U2FsdGVkX1/7ngC/P2/4chJXWefr1+meR/9bFt0/zDA= 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 DCC_CHECK_NEGATIVE Not listed in DCC * [sa08 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa08 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: *;Andrew Morton X-Spam-Relay-Country: X-Spam-Timing: total 304 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 11 (3.6%), b_tie_ro: 10 (3.1%), parse: 0.79 (0.3%), extract_message_metadata: 9 (2.9%), get_uri_detail_list: 0.85 (0.3%), tests_pri_-2000: 11 (3.5%), tests_pri_-1000: 2.0 (0.7%), tests_pri_-950: 0.95 (0.3%), tests_pri_-900: 0.68 (0.2%), tests_pri_-90: 84 (27.5%), check_bayes: 82 (27.1%), b_tokenize: 5 (1.7%), b_tok_get_all: 6 (1.9%), b_comp_prob: 1.79 (0.6%), b_tok_touch_all: 64 (21.2%), b_finish: 1.17 (0.4%), tests_pri_0: 172 (56.6%), check_dkim_signature: 0.41 (0.1%), check_dkim_adsp: 2.5 (0.8%), poll_dns_idle: 1.05 (0.3%), tests_pri_10: 1.82 (0.6%), tests_pri_500: 9 (3.0%), rewrite_mail: 0.00 (0.0%) Subject: [PATCH 05/11] 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: 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 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 do_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 96801792a80e..14ec61c8d982 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -1205,8 +1205,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 c211b520982f..986221bb0e0a 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -3034,6 +3034,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