Message ID | 20240712215223.605363-1-romank@linux.microsoft.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B971CC2BD09 for <linux-mm@archiver.kernel.org>; Fri, 12 Jul 2024 21:52:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C36406B0083; Fri, 12 Jul 2024 17:52:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BBDB26B0085; Fri, 12 Jul 2024 17:52:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A857F6B0089; Fri, 12 Jul 2024 17:52:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 892976B0083 for <linux-mm@kvack.org>; Fri, 12 Jul 2024 17:52:38 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3432A160CFF for <linux-mm@kvack.org>; Fri, 12 Jul 2024 21:52:38 +0000 (UTC) X-FDA: 82332450396.02.58248CB Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf11.hostedemail.com (Postfix) with ESMTP id 960154001D for <linux-mm@kvack.org>; Fri, 12 Jul 2024 21:52:36 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=VmAgXu1r; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf11.hostedemail.com: domain of romank@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=romank@linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720821131; a=rsa-sha256; cv=none; b=SzpKQhtnpPj5u7B2OjGoKdVqb6vrkkN0RC8TCQHddHVXxZyxr9AV/KRqgrUTRW5wPWdw44 hVTT6khIKE+frvSGoGIC4ySIE5mr4OViXSo4aqgwY4Otyjd0eP4MaeFJZY/W16Xz3fo3Kl ujsk8woLrPon/ol81Gu+KoSm/xlAcFk= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=VmAgXu1r; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf11.hostedemail.com: domain of romank@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=romank@linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720821131; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=eHr8WwKDOcEjp7b6WIE3GryqDegtAKq8kVAnn5nr2xo=; b=AHp9NyvvEq65z/sVcFJum+H49kb8z/dfM9i8Ev5E3vum84D7H3C9YsuoyntWTgzZq7ClcN p6tfyb855WWxiKAcBJJkzgfLF0J5T85SCR1kSVhIa4wUQDkvw1ssiS3aGV1SUGD9LHZDAb LjU4gDTtvkrfLfM921+PfAzwfdCiXgQ= Received: from xps-8930.corp.microsoft.com (unknown [131.107.160.48]) by linux.microsoft.com (Postfix) with ESMTPSA id 2591020B7165; Fri, 12 Jul 2024 14:52:35 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2591020B7165 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1720821155; bh=eHr8WwKDOcEjp7b6WIE3GryqDegtAKq8kVAnn5nr2xo=; h=From:To:Cc:Subject:Date:From; b=VmAgXu1r2HrEzEnyN+4oOnb/poIF7I78+1DqtfH3by3DmZZ9JgTQJcuEBRtOS7uFv Fm37C5q0pzge5bu2mhtDrExv3TROQ6c58RFMNKezAfZy3LRXHCA8tpuBQPXrVBSlry WjU01Qt0PRjkZf2N6vMUBnEhgK7UZi3ORmRXHqSc= From: Roman Kisel <romank@linux.microsoft.com> To: akpm@linux-foundation.org, apais@linux.microsoft.com, ardb@kernel.org, bigeasy@linutronix.de, brauner@kernel.org, ebiederm@xmission.com, jack@suse.cz, keescook@chromium.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, nagvijay@microsoft.com, oleg@redhat.com, tandersen@netflix.com, vincent.whitchurch@axis.com, viro@zeniv.linux.org.uk Cc: apais@microsoft.com, benhill@microsoft.com, ssengar@microsoft.com, sunilmut@microsoft.com, vdso@hexbites.dev Subject: [PATCH v2 0/1] binfmt_elf, coredump: Log the reason of the failed core dumps Date: Fri, 12 Jul 2024 14:50:55 -0700 Message-ID: <20240712215223.605363-1-romank@linux.microsoft.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 960154001D X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: erp1b4tnr48sqnw4ncf7nsnk6rzdkorr X-HE-Tag: 1720821156-436646 X-HE-Meta: U2FsdGVkX1/zYpDOXeNnR2WYeesVZoZ+u9/Yki72Gd/eiqxoGXxowJ4K1yy7oWGTa1EJsIn5IEm3mZXghwrW5MYt5zPAsvhr9sciWTi7ZbVl3AeoxVIg1Zqaw7HodNR9RVqZU/Tay2G6+yr/blFQUFhMXBhE8yvhgwHsBKLM9XxooOj2+mXUCKJX0hTgFc6xyQ6bFks2ERqEWfFsaoKEp56QhxTlJIVHP3c2jVH5UBWUl7QSuIT0JXQPplpto0kgWxjseAS6ywBVzdoYHaDi1o+b+L1TeRjaF6mr68LDzJDtCJGeenCGBclwBJG5J8nIBPfuLGGKq/G4vcvc1v3gJcwhS75quyVYsBobn7Xr7SII1N7nf8ystypSBUv3SXikeIsRAort9wIv2SJuto6XJkqopM87RBo247QuMK+hqZrjvm4i0F8qOPA3c+Qymrw4JUtiGFUZOOQePgsMf8miE/YPgU3ssYT5F/eSTZ9Ifx9vRij/2JFO9rl4ujw5lSbFZq3MD6TJGr9qTfNlVOSlOPq42OSk2b/5pk3RVoSpl7LsaEiQkCn7Xn8Kzt9fOTop6FQddnfF0/GzrmTXFBoBOYArkwVEj3j1ghGvzskmQ8RAVsOOt+zASv00h31joNTqKv0HaeNXf0gcuIqaQJtKu19cKAaHEkF/9MvNqfjfIj30NRDOx0lMARrYaQHLDehyLAZNtSb2awzVouo5BDpPEiibpvW9M0OpuCpbvv+9HunkcJHKe9oikS5xPHNkdyj9r3yOmRD/pxv5aGOba7iD0+AaT79jQ5L24J2+bLqRxzHnlHoIF6M/CCVWS/HLTETEFs14XxKSEn6QlEc/2l7pwYd5RcrR58H0/zzUL8lRsfVdc9u+TGOega/4mNFK+sj+1OH2/Z2bJJpEvQcVitxkb3FCdvuXeQ0Ne9U2evqmz8v76TtgBqxGpr7lHYxhwP0iEImJSBIWjAxs9uoIg82 wnnYm7+x bnRXJnZU3FMAh7hV2eC0kIqsGzL53UQaGlKuPYuHHxSBHYMkToEo5JrOlSumKqo2FXJnJMyZvayg6GwWSphbqnuYyUZRZcQJcPj9buDeI7SQgsQZGkWlYYw5p0qAFXv6x2tOsn1Z2lUtgyGiFW1ubMXX/odUlNdt8Hn7LYCBL5cvbp5E0XCcqcANdOHxf00rwtQLYz2WeQUtYiof+S31NlrMGyaZ/7NCM2dMxAsM3iKRdE9AqF5f70dYje4fLzJFYaE/FsaQEPAGKP7GXOTnnz2QygdWgW9eqSm1N3AxgIHb/gSg4o5SeXKxFIBKGIrUKM+Lb6OBiiukUimaWTa+IPg0gLNtIppoN7gXG0Bc97PeCfZ8xsBqNpgO9Lg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
binfmt_elf, coredump: Log the reason of the failed core dumps
|
expand
|
A powerful way to diagnose crashes is to analyze the core dump produced upon the failure. Missing or malformed core dump files hinder these investigations. I'd like to propose changes that add logging as to why the kernel would not finish writing out the core dump file. To help in diagnosing the user mode helper not writing out the entire coredump contents, the changes also log short statistics on the dump collection. I'd advocate for keeping this at the info level on these grounds. For validation, I built the kernel and a simple user space to exercize the new code. [V2] - Used _ratelimited to avoid spamming the system log - Added comm and PID to the log messages - Added logging to the failure paths in dump_interrupted, dump_skip, and dump_emit - Fixed compiler warnings produced when CONFIG_COREDUMP is disabled [V1] https://lore.kernel.org/all/20240617234133.1167523-1-romank@linux.microsoft.com/ Signed-off-by: Roman Kisel <romank@linux.microsoft.com> Roman Kisel (1): binfmt_elf, coredump: Log the reason of the failed core dumps fs/binfmt_elf.c | 60 ++++++++++++++++----- fs/coredump.c | 109 ++++++++++++++++++++++++++++++++------- include/linux/coredump.h | 8 ++- kernel/signal.c | 22 +++++++- 4 files changed, 165 insertions(+), 34 deletions(-) base-commit: 831bcbcead6668ebf20b64fdb27518f1362ace3a