Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp504777pxb; Wed, 14 Apr 2021 22:56:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU2AxdS0iFtXooSHRaDy+fk2DsPYyll1cSif8SYwPBbTHyL+eVrzplCbJawayEuDQMR2FY X-Received: by 2002:a63:1025:: with SMTP id f37mr1957949pgl.215.1618466213938; Wed, 14 Apr 2021 22:56:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618466213; cv=none; d=google.com; s=arc-20160816; b=bpde5GcaryWSZjUWk+GoA71/CIsZjSjoTxuLYPuSr8bFD91nsCjl9uGEiydL9Fs17s YDr9gFMuYQXZcgSh6hqM7NNnpEvak2RDUR0ZnKQeurafKucHLGLDoAwzeU1WdyKQfB7x 1NeaMbkhoYNnPc4lUHSyrDyPB0GRZth4FkdYeXDOqYXQPyeIEyjam89y+hIshXPLJ6Td x6gMA6+n9jr9XsYQXOiUcs3xiyjWD1BpNBIJYmRmzc7s0M+C8+K/2kEx6Gs8A8aGgXL0 32Zh5cKGvcgwFWNt+G56GWbJVm0+9jEH7Ihg6MQKPcNu24OLxGB6hCMhORwhK5NmpyaR xOIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=AVqUgG9+EdjBz95TYYbp1M808BDeTFE/GavaYsJfmZo=; b=jT1ER3gfMciV+Aq7sKCuD6ubsCa44APaNO5SSojArldy6J9jIBGvzh691pdS6HBMvY zU+Qcke4gKgyHAa2PoNXKzBQDFcQMWz10vbbAU0nRZ1Hvob2FWrgAWfNWE83VMyx7BlO pqs6vOl0/eUAnJanolRPo6aIBtQEImj47XZXtrdKwr0TpTUdj6LZKGF3HFfca4C5t1/M XtKKUZXAWrmBhvhMOB89g4Q/s8S6NbYNofAA5bBBkv8yxyM69aTc77Zr3Yz2BXbh6TIC ph+WYpnYadWnF1kVR0e4psJuQQFND8z+XliCG++BAcpV9R+xCNaZwRkUmp2V0PtjzXfL OSTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f34si1798235pgb.310.2021.04.14.22.56.42; Wed, 14 Apr 2021 22:56:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230432AbhDOF4c (ORCPT + 99 others); Thu, 15 Apr 2021 01:56:32 -0400 Received: from verein.lst.de ([213.95.11.211]:33313 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230419AbhDOF4a (ORCPT ); Thu, 15 Apr 2021 01:56:30 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id F1E3A68BEB; Thu, 15 Apr 2021 07:56:05 +0200 (CEST) Date: Thu, 15 Apr 2021 07:56:05 +0200 From: Christoph Hellwig To: Palmer Dabbelt Cc: Damien Le Moal , viro@zeniv.linux.org.uk, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, jcmvbkbc@gmail.com, gerg@linux-m68k.org, Anup Patel , Christoph Hellwig , uclinux-dev@uclinux.org Subject: Re: [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V Message-ID: <20210415055605.GB8947@lst.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org binfmt_flat tends to go through Greg's uclinux tree, adding him and the list. On Wed, Apr 14, 2021 at 10:46:36PM -0700, Palmer Dabbelt wrote: > On Wed, 14 Apr 2021 17:32:10 PDT (-0700), Damien Le Moal wrote: >>> On 2021/04/08 0:49, Damien Le Moal wrote: >>> RISC-V NOMMU flat binaries cannot tolerate a gap between the text and >>> data section as the toolchain fully resolves at compile time the PC >>> relative global pointer (__global_pointer$ value loaded in gp register). >>> Without a relocation entry provided, the flat bin loader cannot fix the >>> value if a gap is introduced and executables fail to run. >>> >>> This series fixes this problem by allowing an architecture to request >>> the flat loader to suppress the gap between the text and data sections. >>> The first patch fixes binfmt_flat flat_load_file() using the new >>> configuration option CONFIG_BINFMT_FLAT_NO_TEXT_DATA_GAP. The second >>> patch enables this option for RISCV NOMMU builds. >>> >>> These patches do not change the binfmt_flat loader behavior for other >>> architectures. >>> >>> Changes from v1: >>> * Replace FLAT_TEXT_DATA_NO_GAP macro with >>> CONFIG_BINFMT_FLAT_NO_TEXT_DATA_GAP config option (patch 1). >>> * Remove the addition of riscv/include/asm/flat.h and set >>> CONFIG_BINFMT_FLAT_NO_TEXT_DATA_GAP for RISCV and !MMU >>> >>> Damien Le Moal (2): >>> binfmt_flat: allow not offsetting data start >>> riscv: Disable text-data gap in flat binaries >>> >>> arch/riscv/Kconfig | 1 + >>> fs/Kconfig.binfmt | 3 +++ >>> fs/binfmt_flat.c | 21 +++++++++++++++------ >>> 3 files changed, 19 insertions(+), 6 deletions(-) >>> >> >> Ping ? >> >> Any comment on these patches ? >> >> Without them, RISC-V NOMMU user space does not run... I would really like to get >> these in this cycle if possible. > > This LGTM, but it's pretty far out of my area of expertise. I'm happy to > take them via my tree, but I'd prefer to get an Ack from someone. > > Al, get_maintainer suggests you? > > Acked-by: Palmer Dabbelt ---end quoted text---