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 32E7DC433F5 for ; Thu, 21 Apr 2022 12:43:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 71EAC6B0072; Thu, 21 Apr 2022 08:43:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6CD976B0073; Thu, 21 Apr 2022 08:43:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 595A06B0074; Thu, 21 Apr 2022 08:43:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 4A1A46B0072 for ; Thu, 21 Apr 2022 08:43:28 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 1EF2C12166F for ; Thu, 21 Apr 2022 12:43:28 +0000 (UTC) X-FDA: 79380852096.02.BEC41B2 Received: from brightrain.aerifal.cx (brightrain.aerifal.cx [216.12.86.13]) by imf06.hostedemail.com (Postfix) with ESMTP id A0C6B180025 for ; Thu, 21 Apr 2022 12:43:26 +0000 (UTC) Date: Thu, 21 Apr 2022 08:43:26 -0400 From: Rich Felker To: Geert Uytterhoeven Cc: Greg Ungerer , "Eric W. Biederman" , Kees Cook , Niklas Cassel , Damien Le Moal , Alexander Viro , Paul Walmsley , Palmer Dabbelt , Albert Ou , Mike Frysinger , "stable@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , "linux-riscv@lists.infradead.org" , Linux-Arch , linux-m68k , Linux ARM , Linux-sh list , Yoshinori Sato Subject: Re: [PATCH] binfmt_flat: Remove shared library support Message-ID: <20220421124326.GG7074@brightrain.aerifal.cx> References: <20220414091018.896737-1-niklas.cassel@wdc.com> <81788b56-5b15-7308-38c7-c7f2502c4e15@linux-m68k.org> <87levzzts4.fsf_-_@email.froward.int.ebiederm.org> <01b063d7-d5c2-8af0-ad90-ed6c069252c5@linux-m68k.org> 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) X-Stat-Signature: cr9iugi5hrnjzqdwgn5y67stnd8seany X-Rspam-User: Authentication-Results: imf06.hostedemail.com; dkim=none; dmarc=none; spf=none (imf06.hostedemail.com: domain of dalias@libc.org has no SPF policy when checking 216.12.86.13) smtp.mailfrom=dalias@libc.org X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: A0C6B180025 X-HE-Tag: 1650545006-950197 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 Thu, Apr 21, 2022 at 08:52:59AM +0200, Geert Uytterhoeven wrote: > On Thu, Apr 21, 2022 at 1:53 AM Greg Ungerer wrote: > > On 21/4/22 00:58, Eric W. Biederman wrote: > > > In a recent discussion[1] it was reported that the binfmt_flat library > > > support was only ever used on m68k and even on m68k has not been used > > > in a very long time. > > > > > > The structure of binfmt_flat is different from all of the other binfmt > > > implementations becasue of this shared library support and it made > > > life and code review more effort when I refactored the code in fs/exec.c. > > > > > > Since in practice the code is dead remove the binfmt_flat shared libarary > > > support and make maintenance of the code easier. > > > > > > [1] https://lkml.kernel.org/r/81788b56-5b15-7308-38c7-c7f2502c4e15@linux-m68k.org > > > Signed-off-by: "Eric W. Biederman" > > > --- > > > > > > Can the binfmt_flat folks please verify that the shared library support > > > really isn't used? > > > > I can definitely confirm I don't use it on m68k. And I don't know of > > anyone that has used it in many years. > > > > > > > Was binfmt_flat being enabled on arm and sh the mistake it looks like? > > I think the question was intended to be > > Was *binfmt_flat_shared_flat* being enabled on arm and sh the > mistake it looks like? Early in my work on j2, I tried to research the history of shared flat support on sh, and it turned out the mainline tooling never even supported it, and the out-of-line tooling I eventually found was using all sorts of wrong conditionals for how it did the linking and elf2flt conversion, e.g. mere presence of any PIC-like relocation in any file made it assume the whole program was PIC-compatible. There's no way that stuf was ever used in any meaningful way. It just didn't work. Quickly dropped that and got plain ELF (no shared text/xip, but no worse than the existing flat support) working, and soon after, FDPIC. The whole binfmt_flat ecosystem is a mess with no good reason to exist. Rich