From patchwork Tue Apr 19 14:16:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Eric W. Biederman" X-Patchwork-Id: 12818573 Return-Path: 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 30818C433EF for ; Tue, 19 Apr 2022 14:17:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8ACD68D0076; Tue, 19 Apr 2022 10:17:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 85A5E8D0047; Tue, 19 Apr 2022 10:17:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6D4A88D0076; Tue, 19 Apr 2022 10:17:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 5E5518D0047 for ; Tue, 19 Apr 2022 10:17:15 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 9F396183459D0 for ; Tue, 19 Apr 2022 14:17:14 +0000 (UTC) X-FDA: 79373830788.30.B042299 Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) by imf27.hostedemail.com (Postfix) with ESMTP id 1315240017 for ; Tue, 19 Apr 2022 14:17:12 +0000 (UTC) Received: from in01.mta.xmission.com ([166.70.13.51]:33804) by out01.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1ngofH-009EtF-CA; Tue, 19 Apr 2022 08:17:11 -0600 Received: from ip68-227-174-4.om.om.cox.net ([68.227.174.4]:34928 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 1ngofG-00EtRb-Eq; Tue, 19 Apr 2022 08:17:10 -0600 From: "Eric W. Biederman" To: Kees Cook Cc: Niklas Cassel , Alexander Viro , Greg Ungerer , Mike Frysinger , Damien Le Moal , kernel test robot , "stable@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" References: <20220418200834.1501454-1-Niklas.Cassel@wdc.com> <202204181501.D55C8D2A@keescook> Date: Tue, 19 Apr 2022 09:16:41 -0500 In-Reply-To: <202204181501.D55C8D2A@keescook> (Kees Cook's message of "Mon, 18 Apr 2022 15:01:35 -0700") Message-ID: <87mtgh17li.fsf_-_@email.froward.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-XM-SPF: eid=1ngofG-00EtRb-Eq;;;mid=<87mtgh17li.fsf_-_@email.froward.int.ebiederm.org>;;;hst=in01.mta.xmission.com;;;ip=68.227.174.4;;;frm=ebiederm@xmission.com;;;spf=softfail X-XM-AID: U2FsdGVkX19ajDTwOr+BtcmAx3CpiqLDVMt1FS+BCvY= X-SA-Exim-Connect-IP: 68.227.174.4 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: [PATCH] binfmt_flat; Drop vestigates of coredump support X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 1315240017 X-Stat-Signature: ztig4qqk6uosmqesh3c9pp93dtfh7u8w Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=xmission.com; spf=pass (imf27.hostedemail.com: domain of ebiederm@xmission.com designates 166.70.13.231 as permitted sender) smtp.mailfrom=ebiederm@xmission.com X-HE-Tag: 1650377832-433763 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: There is the briefest start of coredump support in binfmt_flat. It is actually a pain to maintain as binfmt_flat is not built on most architectures so it is easy to overlook. Since the support does not do anything remove it. Signed-off-by: "Eric W. Biederman" Reviewed-by: Niklas Cassel Acked-by: Greg Ungerer --- Apologies for hijacking this thread but it looks like we have people who are actively using binfmt_flat on it. Does anyone have any objections to simply removing what little there is of coredump support from binfmt_flat? Eric fs/binfmt_flat.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 626898150011..0ad2c7bbaddd 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include @@ -98,33 +97,12 @@ static int load_flat_shared_library(int id, struct lib_info *p); #endif static int load_flat_binary(struct linux_binprm *); -#ifdef CONFIG_COREDUMP -static int flat_core_dump(struct coredump_params *cprm); -#endif static struct linux_binfmt flat_format = { .module = THIS_MODULE, .load_binary = load_flat_binary, -#ifdef CONFIG_COREDUMP - .core_dump = flat_core_dump, - .min_coredump = PAGE_SIZE -#endif }; -/****************************************************************************/ -/* - * Routine writes a core dump image in the current directory. - * Currently only a stub-function. - */ - -#ifdef CONFIG_COREDUMP -static int flat_core_dump(struct coredump_params *cprm) -{ - pr_warn("Process %s:%d received signr %d and should have core dumped\n", - current->comm, current->pid, cprm->siginfo->si_signo); - return 1; -} -#endif /****************************************************************************/ /*