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: 12818572 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5320C433FE for ; Tue, 19 Apr 2022 14:17:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348138AbiDSOT5 (ORCPT ); Tue, 19 Apr 2022 10:19:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346632AbiDSOT4 (ORCPT ); Tue, 19 Apr 2022 10:19:56 -0400 Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96FDF6141; Tue, 19 Apr 2022 07:17:13 -0700 (PDT) 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) Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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 /****************************************************************************/ /*