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 60866C433FE for ; Wed, 20 Apr 2022 23:00:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8E4046B0071; Wed, 20 Apr 2022 19:00:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 894366B0073; Wed, 20 Apr 2022 19:00:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E4CB6B0074; Wed, 20 Apr 2022 19:00:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 589BD6B0071 for ; Wed, 20 Apr 2022 19:00:47 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 189D081459 for ; Wed, 20 Apr 2022 23:00:47 +0000 (UTC) X-FDA: 79378778934.06.68FF2A0 Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by imf19.hostedemail.com (Postfix) with ESMTP id 7764B1A0021 for ; Wed, 20 Apr 2022 23:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1650495646; x=1682031646; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=S3wrcHUGdl9LcKznCHJjFCjAB1oU2LwvM5QjcZA34fY=; b=gozbVnpPJwgBvGDoblGcclkYC8NNx5wojtRhKxnOqsDx3+esORbLrw5P 40borVwJRUEEvGEvpF9UKeqYwsuQ5PtnDVQ+vi5wR7u+C4DNaSOTpdagU TNNdzYFpnnI0+CdmkjU+1M6+wAbdQK3CnC9cGQDc0E45UthAXMTZAMr/A aqMrqt5BXInZOFBJsOliUdZZfcAWZSU2VGtvawPWbK+ww4JiYXxGdeYbY zEyrs3bVkAjmAr2zDiRY1Umz8eWbrF+76IXIOsqj0OG21cUbnkJVK9FwF EKQ+ryCKR3Gr9abyoQvUEOj79xP7QIybbv6WfJv2qPtuqSo/rZbedGdha A==; X-IronPort-AV: E=Sophos;i="5.90,276,1643644800"; d="scan'208";a="302606676" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 21 Apr 2022 07:00:45 +0800 IronPort-SDR: tD/912pmKrU/nwfbqsgRgchmDsEZDBdXJ6boKnwH0XPl733RMVFfZXlur1t7hKpHuBLqO5y0AH ROuoup+J9fUDHQJHHqIlwJv68fa7UlA6TwBwes16f/u7k5+S746/FiRtYbUDgAF6QDm5xK5Taw d+HZDn0jdfwrIOe8xcNumJ4xgmMY5+vZ4v/TtgoxpV5dSLOq9cAVmEl97XMwbDY9D9sBUTYxec J8o4yh/bl9SHSTPU9U1/lFZcuBPEGOc/FNPMFoQUe8DTVocnh1oKIRmREcLRMRDHEln+A4CqFO QsgHfp5q24rgXGqahPLihgtE Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 20 Apr 2022 15:31:02 -0700 IronPort-SDR: rQYnlJWXyrPCsTsrzSF/Ew8uNQnVS1wZnNKRolZaAhkGveNsR+7VyrQZSWH0ZAlIS3O67nYDTd OFJ339Ql8fxb/7BvPJsalsAW3AcGMGQPdnK0os9/KhRvRyKtM+PL2LhUCOb2W7b1ebumJtAz3T lop3e7oDeKGEDRwIwpAt5TB5BcZAJVTm9fRi1N+t0GnBDsMJR+R0bkte6PpyuMJ5zEpqjdybYa xzh0q713D9BetdN5HSn6oERJ2UkPddBfFaRRXrqSvSTRjceHjkX4WDeXKcTgWL8BBYEZxOH2bp dgY= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 20 Apr 2022 16:00:45 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4KkGNr4tzGz1SVp2 for ; Wed, 20 Apr 2022 16:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1650495643; x=1653087644; bh=S3wrcHUGdl9LcKznCHJjFCjAB1oU2LwvM5Q jcZA34fY=; b=D2NS7tuk1+iRdP2LXEmtP9/6hn5ZwQNV8bhVAXHTm6qx3RZWyL5 c6jousROa5m5iDPz8KDFGCCqKUQ14/8fXxb+x5u4wqoE3FKSjF+IWh2fzArJDGlV kMXNdZ+1bffcohH0WCo3xmyWq10jH8WKZiiMcbDew14H68pdOjH/l9dBXXQK7cp7 2qRoMSDlhBuTMnFp12RR8hWOc8ro6TqIrFTwNh/5ewrdZ40NPlO35+HNySdfJD5t X2iefhTMwwiq2uiGXQOqpmYE8heVo/dam/Wd9BPmhLhdH3v2+kulsKEIZ/XInTdm pGPF6aGbXgmmA+zSgg/E4dJvjGh1pWJXsLw== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id H6oWz9jSZz5A for ; Wed, 20 Apr 2022 16:00:43 -0700 (PDT) Received: from [10.225.163.14] (unknown [10.225.163.14]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4KkGNl5hPQz1Rvlx; Wed, 20 Apr 2022 16:00:39 -0700 (PDT) Message-ID: Date: Thu, 21 Apr 2022 08:00:38 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] binfmt_flat: Remove shared library support Content-Language: en-US To: Rich Felker , Arnd Bergmann Cc: Kees Cook , Palmer Dabbelt , "Eric W . Biederman" , 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 References: <87levzzts4.fsf_-_@email.froward.int.ebiederm.org> <20220420165935.GA12207@brightrain.aerifal.cx> <202204201044.ACFEB0C@keescook> <20220420202321.GD7074@brightrain.aerifal.cx> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20220420202321.GD7074@brightrain.aerifal.cx> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 7764B1A0021 X-Stat-Signature: is95mwxpaekcctqwgi8jar4pdehy6qkc Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=gozbVnpP; dkim=pass header.d=opensource.wdc.com header.s=dkim header.b=D2NS7tuk; spf=pass (imf19.hostedemail.com: domain of "prvs=10238260a=damien.lemoal@opensource.wdc.com" designates 68.232.143.124 as permitted sender) smtp.mailfrom="prvs=10238260a=damien.lemoal@opensource.wdc.com"; dmarc=pass (policy=quarantine) header.from=opensource.wdc.com X-HE-Tag: 1650495644-10353 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 4/21/22 05:23, Rich Felker wrote: > 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. Last time I checked, building shared libraries usable with nommu riscv required gcc/ld options that were not supported for riscv (PIE related stuff). So removing the kernel support for shared flat libs is fine with me. -- Damien Le Moal Western Digital Research