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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35884C433FE for ; Wed, 20 Apr 2022 20:23:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382105AbiDTU0Q (ORCPT ); Wed, 20 Apr 2022 16:26:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382095AbiDTU0L (ORCPT ); Wed, 20 Apr 2022 16:26:11 -0400 Received: from brightrain.aerifal.cx (brightrain.aerifal.cx [216.12.86.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD6194349A for ; Wed, 20 Apr 2022 13:23:23 -0700 (PDT) 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) Precedence: bulk List-ID: X-Mailing-List: linux-m68k@vger.kernel.org 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