From mboxrd@z Thu Jan 1 00:00:00 1970 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 DECF4C433F5 for ; Wed, 20 Apr 2022 20:23:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 39F256B0071; Wed, 20 Apr 2022 16:23:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 34DC16B0073; Wed, 20 Apr 2022 16:23:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 215236B0074; Wed, 20 Apr 2022 16:23:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 12E4F6B0071 for ; Wed, 20 Apr 2022 16:23:24 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id D1EDA122B06 for ; Wed, 20 Apr 2022 20:23:23 +0000 (UTC) X-FDA: 79378382286.22.302E605 Received: from brightrain.aerifal.cx (brightrain.aerifal.cx [216.12.86.13]) by imf23.hostedemail.com (Postfix) with ESMTP id 8427E14001B for ; Wed, 20 Apr 2022 20:23:21 +0000 (UTC) Date: Wed, 20 Apr 2022 16:23:22 -0400 From: Rich Felker To: Arnd Bergmann Cc: Kees Cook , Palmer Dabbelt , "Eric W . Biederman" , Damien Le Moal , Niklas.Cassel@wdc.com, Al Viro , Paul Walmsley , Albert Ou , Mike Frysinger , "# 3.4.x" , Linux FS-devel Mailing List , Linux-MM , linux-riscv , linux-arch , Geert Uytterhoeven , linux-m68k , Greg Ungerer , Linux ARM , Linux-sh list , Yoshinori Sato Subject: Re: [PATCH] binfmt_flat: Remove shared library support Message-ID: <20220420202321.GD7074@brightrain.aerifal.cx> References: <87levzzts4.fsf_-_@email.froward.int.ebiederm.org> <20220420165935.GA12207@brightrain.aerifal.cx> <202204201044.ACFEB0C@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=none; spf=none (imf23.hostedemail.com: domain of dalias@libc.org has no SPF policy when checking 216.12.86.13) smtp.mailfrom=dalias@libc.org X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 8427E14001B X-Stat-Signature: cu4tbgdkwtrwd17uqd81k9bx3pg4oway X-HE-Tag: 1650486201-623615 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: On Wed, Apr 20, 2022 at 10:04:32PM +0200, Arnd Bergmann wrote: > On Wed, Apr 20, 2022 at 7:47 PM Kees Cook wrote: > > > > Yeah, I was trying to understand why systems were using binfmt_flat and > > not binfmt_elf, given the mention of elf2flat -- is there really such a > > large kernel memory footprint savings to be had from removing > > binfmt_elf? > > I think the main reason for using flat binaries is nommu support on > m68k, xtensa and risc-v. The regular binfmt_elf support requires > an MMU, and the elf-fdpic variant is only available for arm and sh > at this point (the other nommu architectures got removed over time). I believe I made the elf-fdpic loader so that it's capable of loading normal non-fdpic elf files on nommu (1bde925d23), unless somebody broke that. I also seem to recall that capability being added to the main elf loader later. Rich