[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BL0PR04MB651449999EBE967EC5622FB9E74D9@BL0PR04MB6514.namprd04.prod.outlook.com>
Date: Thu, 15 Apr 2021 06:16:12 +0000
From: Damien Le Moal <Damien.LeMoal@....com>
To: Christoph Hellwig <hch@....de>, Palmer Dabbelt <palmer@...belt.com>
CC: "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"jcmvbkbc@...il.com" <jcmvbkbc@...il.com>,
"gerg@...ux-m68k.org" <gerg@...ux-m68k.org>,
Anup Patel <Anup.Patel@....com>,
"uclinux-dev@...inux.org" <uclinux-dev@...inux.org>
Subject: Re: [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V
On 2021/04/15 14:56, Christoph Hellwig wrote:
> binfmt_flat tends to go through Greg's uclinux tree, adding him and
> the list.
Thanks Christoph. I resent the series adding Gerg and uclinux-dev.
MAINTAINERS file needs an update may be ?
>
> 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 <palmerdabbelt@...gle.com>
> ---end quoted text---
>
--
Damien Le Moal
Western Digital Research
Powered by blists - more mailing lists