linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V
@ 2021-04-07 15:49 Damien Le Moal
  2021-04-07 15:49 ` [PATCH v2 1/2] binfmt_flat: allow not offsetting data start Damien Le Moal
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Damien Le Moal @ 2021-04-07 15:49 UTC (permalink / raw)
  To: Palmer Dabbelt, linux-riscv, Alexander Viro, linux-kernel
  Cc: Max Filippov, Greg Ungerer, Anup Patel, Christoph Hellwig

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(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/2] binfmt_flat: allow not offsetting data start
  2021-04-07 15:49 [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V Damien Le Moal
@ 2021-04-07 15:49 ` Damien Le Moal
  2021-04-07 15:49 ` [PATCH v2 2/2] riscv: Disable text-data gap in flat binaries Damien Le Moal
  2021-04-15  0:32 ` [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V Damien Le Moal
  2 siblings, 0 replies; 10+ messages in thread
From: Damien Le Moal @ 2021-04-07 15:49 UTC (permalink / raw)
  To: Palmer Dabbelt, linux-riscv, Alexander Viro, linux-kernel
  Cc: Max Filippov, Greg Ungerer, Anup Patel, Christoph Hellwig

Commit 2217b9826246 ("binfmt_flat: revert "binfmt_flat: don't offset
the data start"") restored offsetting the start of the data section by
a number of words defined by MAX_SHARED_LIBS. As a result, since
MAX_SHARED_LIBS is never 0, a gap between the text and data sections
always exists. For architectures which cannot support a such gap
between the text and data sections (e.g. riscv nommu), flat binary
programs cannot be executed.

To allow an architecture to request contiguous text and data sections,
introduce the config option CONFIG_BINFMT_FLAT_NO_TEXT_DATA_GAP.
Using this new option, the macro DATA_GAP_WORDS is conditionally
defined in binfmt_flat.c to MAX_SHARED_LIBS for architectures
tolerating the text-to-data gap (CONFIG_BINFMT_FLAT_NO_TEXT_DATA_GAP
disabled case) and to 0 when CONFIG_BINFMT_FLAT_NO_TEXT_DATA_GAP is
enabled. DATA_GAP_WORDS is used in load_flat_file() to calculate the
data section length and start position.

An architecture enabling CONFIG_BINFMT_FLAT_NO_TEXT_DATA_GAP also
prevents the use of the separate text/data load case (when the flat file
header flags FLAT_FLAG_RAM and FLAT_FLAG_GZIP are not set with NOMMU
kernels) and forces the use of a single RAM region for loading
(equivalent to FLAT_FLAG_RAM being set).

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
---
 fs/Kconfig.binfmt |  3 +++
 fs/binfmt_flat.c  | 21 +++++++++++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
index c6f1c8c1934e..c6df931d5d45 100644
--- a/fs/Kconfig.binfmt
+++ b/fs/Kconfig.binfmt
@@ -112,6 +112,9 @@ config BINFMT_FLAT_ARGVP_ENVP_ON_STACK
 config BINFMT_FLAT_OLD_ALWAYS_RAM
 	bool
 
+config BINFMT_FLAT_NO_TEXT_DATA_GAP
+	bool
+
 config BINFMT_FLAT_OLD
 	bool "Enable support for very old legacy flat binaries"
 	depends on BINFMT_FLAT
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index b9c658e0548e..2be29bb964b8 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -74,6 +74,12 @@
 #define	MAX_SHARED_LIBS			(1)
 #endif
 
+#ifdef CONFIG_BINFMT_FLAT_NO_TEXT_DATA_GAP
+#define DATA_GAP_WORDS			(0)
+#else
+#define DATA_GAP_WORDS			(MAX_SHARED_LIBS)
+#endif
+
 struct lib_info {
 	struct {
 		unsigned long start_code;		/* Start of text segment */
@@ -559,7 +565,10 @@ static int load_flat_file(struct linux_binprm *bprm,
 	 * case,  and then the fully copied to RAM case which lumps
 	 * it all together.
 	 */
-	if (!IS_ENABLED(CONFIG_MMU) && !(flags & (FLAT_FLAG_RAM|FLAT_FLAG_GZIP))) {
+	if (!IS_ENABLED(CONFIG_MMU) &&
+	    !IS_ENABLED(CONFIG_BINFMT_FLAT_NO_TEXT_DATA_GAP) &&
+	    !(flags & (FLAT_FLAG_RAM|FLAT_FLAG_GZIP))) {
+
 		/*
 		 * this should give us a ROM ptr,  but if it doesn't we don't
 		 * really care
@@ -576,7 +585,7 @@ static int load_flat_file(struct linux_binprm *bprm,
 			goto err;
 		}
 
-		len = data_len + extra + MAX_SHARED_LIBS * sizeof(unsigned long);
+		len = data_len + extra + DATA_GAP_WORDS * sizeof(unsigned long);
 		len = PAGE_ALIGN(len);
 		realdatastart = vm_mmap(NULL, 0, len,
 			PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 0);
@@ -591,7 +600,7 @@ static int load_flat_file(struct linux_binprm *bprm,
 			goto err;
 		}
 		datapos = ALIGN(realdatastart +
-				MAX_SHARED_LIBS * sizeof(unsigned long),
+				DATA_GAP_WORDS * sizeof(unsigned long),
 				FLAT_DATA_ALIGN);
 
 		pr_debug("Allocated data+bss+stack (%u bytes): %lx\n",
@@ -622,7 +631,7 @@ static int load_flat_file(struct linux_binprm *bprm,
 		memp_size = len;
 	} else {
 
-		len = text_len + data_len + extra + MAX_SHARED_LIBS * sizeof(u32);
+		len = text_len + data_len + extra + DATA_GAP_WORDS * sizeof(u32);
 		len = PAGE_ALIGN(len);
 		textpos = vm_mmap(NULL, 0, len,
 			PROT_READ | PROT_EXEC | PROT_WRITE, MAP_PRIVATE, 0);
@@ -638,7 +647,7 @@ static int load_flat_file(struct linux_binprm *bprm,
 
 		realdatastart = textpos + ntohl(hdr->data_start);
 		datapos = ALIGN(realdatastart +
-				MAX_SHARED_LIBS * sizeof(u32),
+				DATA_GAP_WORDS * sizeof(u32),
 				FLAT_DATA_ALIGN);
 
 		reloc = (__be32 __user *)
@@ -714,7 +723,7 @@ static int load_flat_file(struct linux_binprm *bprm,
 			ret = result;
 			pr_err("Unable to read code+data+bss, errno %d\n", ret);
 			vm_munmap(textpos, text_len + data_len + extra +
-				MAX_SHARED_LIBS * sizeof(u32));
+				  DATA_GAP_WORDS * sizeof(u32));
 			goto err;
 		}
 	}
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/2] riscv: Disable text-data gap in flat binaries
  2021-04-07 15:49 [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V Damien Le Moal
  2021-04-07 15:49 ` [PATCH v2 1/2] binfmt_flat: allow not offsetting data start Damien Le Moal
@ 2021-04-07 15:49 ` Damien Le Moal
  2021-04-15  0:32 ` [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V Damien Le Moal
  2 siblings, 0 replies; 10+ messages in thread
From: Damien Le Moal @ 2021-04-07 15:49 UTC (permalink / raw)
  To: Palmer Dabbelt, linux-riscv, Alexander Viro, linux-kernel
  Cc: Max Filippov, Greg Ungerer, Anup Patel, Christoph Hellwig

uclibc/gcc combined with elf2flt riscv linker file fully resolve the
PC relative __global_pointer$ value at compile time and do not generate
a relocation entry to set a runtime gp value. As a result, if the
flatbin loader introduces a gap between the text and data sections, the
gp value becomes incorrect and prevent correct execution of a flatbin
executable.

Avoid this problem by enabling CONFIG_BINFMT_FLAT_NO_TEXT_DATA_GAP
automatically when CONFIG_RISCV is enabled and CONFIG_MMU disabled.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
---
 arch/riscv/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 0d0cf67359cb..6a85fbbd056e 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -33,6 +33,7 @@ config RISCV
 	select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
 	select ARCH_WANT_FRAME_POINTERS
 	select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
+	select BINFMT_FLAT_NO_TEXT_DATA_GAP if !MMU
 	select CLONE_BACKWARDS
 	select CLINT_TIMER if !MMU
 	select COMMON_CLK
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V
  2021-04-07 15:49 [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V Damien Le Moal
  2021-04-07 15:49 ` [PATCH v2 1/2] binfmt_flat: allow not offsetting data start Damien Le Moal
  2021-04-07 15:49 ` [PATCH v2 2/2] riscv: Disable text-data gap in flat binaries Damien Le Moal
@ 2021-04-15  0:32 ` Damien Le Moal
  2021-04-15  5:46   ` Palmer Dabbelt
  2 siblings, 1 reply; 10+ messages in thread
From: Damien Le Moal @ 2021-04-15  0:32 UTC (permalink / raw)
  To: Palmer Dabbelt, linux-riscv, Alexander Viro, linux-kernel
  Cc: Max Filippov, Greg Ungerer, Anup Patel, Christoph Hellwig

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.


-- 
Damien Le Moal
Western Digital Research

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V
  2021-04-15  0:32 ` [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V Damien Le Moal
@ 2021-04-15  5:46   ` Palmer Dabbelt
  2021-04-15  5:56     ` Christoph Hellwig
  0 siblings, 1 reply; 10+ messages in thread
From: Palmer Dabbelt @ 2021-04-15  5:46 UTC (permalink / raw)
  To: Damien Le Moal, viro
  Cc: linux-riscv, linux-kernel, jcmvbkbc, gerg, Anup Patel, Christoph Hellwig

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@google.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V
  2021-04-15  5:46   ` Palmer Dabbelt
@ 2021-04-15  5:56     ` Christoph Hellwig
  2021-04-15  6:16       ` Damien Le Moal
  2021-04-16  0:21       ` Al Viro
  0 siblings, 2 replies; 10+ messages in thread
From: Christoph Hellwig @ 2021-04-15  5:56 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: Damien Le Moal, viro, linux-riscv, linux-kernel, jcmvbkbc, gerg,
	Anup Patel, Christoph Hellwig, uclinux-dev

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 <palmerdabbelt@google.com>
---end quoted text---

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V
  2021-04-15  5:56     ` Christoph Hellwig
@ 2021-04-15  6:16       ` Damien Le Moal
  2021-04-16  0:21       ` Al Viro
  1 sibling, 0 replies; 10+ messages in thread
From: Damien Le Moal @ 2021-04-15  6:16 UTC (permalink / raw)
  To: Christoph Hellwig, Palmer Dabbelt
  Cc: viro, linux-riscv, linux-kernel, jcmvbkbc, gerg, Anup Patel, uclinux-dev

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@google.com>
> ---end quoted text---
> 


-- 
Damien Le Moal
Western Digital Research

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V
  2021-04-15  5:56     ` Christoph Hellwig
  2021-04-15  6:16       ` Damien Le Moal
@ 2021-04-16  0:21       ` Al Viro
  2021-04-16  0:26         ` Damien Le Moal
  1 sibling, 1 reply; 10+ messages in thread
From: Al Viro @ 2021-04-16  0:21 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Palmer Dabbelt, Damien Le Moal, linux-riscv, linux-kernel,
	jcmvbkbc, gerg, Anup Patel, uclinux-dev

On Thu, Apr 15, 2021 at 07:56:05AM +0200, Christoph Hellwig wrote:
> binfmt_flat tends to go through Greg's uclinux tree, adding him and
> the list.

	FWIW, my involvement with binfmt_flat had been pretty much nil -
the least trivial had been "binfmt_flat: flat_{get,put}_addr_from_rp()
should be able to fail" about 4 years ago and that fell out of hunting
for places where __get_user() had been used without checking error values.

	It's in fs/*, but I've no way to test it and I have pretty much
zero familiarity with the guts of that one, so I can't give any useful
feedback on that series.  So consider the Christoph's comment seconded -
you want it reviewed by gerg et.al., and it probably ought to go via
gerg/uclinux.git tree.

	I'm reasonably familiar with binfmt_{elf,misc,script}; anything
else gets touched as part of larger series and only with sanity checks
from other folks, if the changes are not entirely trivial.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V
  2021-04-16  0:21       ` Al Viro
@ 2021-04-16  0:26         ` Damien Le Moal
  2021-04-16  7:26           ` Greg Ungerer
  0 siblings, 1 reply; 10+ messages in thread
From: Damien Le Moal @ 2021-04-16  0:26 UTC (permalink / raw)
  To: Al Viro, Christoph Hellwig
  Cc: Palmer Dabbelt, linux-riscv, linux-kernel, jcmvbkbc, gerg,
	Anup Patel, uclinux-dev

On 2021/04/16 9:22, Al Viro wrote:
> On Thu, Apr 15, 2021 at 07:56:05AM +0200, Christoph Hellwig wrote:
>> binfmt_flat tends to go through Greg's uclinux tree, adding him and
>> the list.
> 
> 	FWIW, my involvement with binfmt_flat had been pretty much nil -
> the least trivial had been "binfmt_flat: flat_{get,put}_addr_from_rp()
> should be able to fail" about 4 years ago and that fell out of hunting
> for places where __get_user() had been used without checking error values.
> 
> 	It's in fs/*, but I've no way to test it and I have pretty much
> zero familiarity with the guts of that one, so I can't give any useful
> feedback on that series.  So consider the Christoph's comment seconded -
> you want it reviewed by gerg et.al., and it probably ought to go via
> gerg/uclinux.git tree.
> 
> 	I'm reasonably familiar with binfmt_{elf,misc,script}; anything
> else gets touched as part of larger series and only with sanity checks
> from other folks, if the changes are not entirely trivial.

Al,

Thanks for the clarification. Would it make sense to have an entry in
MAINTAINERS file pointing to Greg and the uclinux tree for binfmt_flat.c ?
Greg ?


-- 
Damien Le Moal
Western Digital Research

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V
  2021-04-16  0:26         ` Damien Le Moal
@ 2021-04-16  7:26           ` Greg Ungerer
  0 siblings, 0 replies; 10+ messages in thread
From: Greg Ungerer @ 2021-04-16  7:26 UTC (permalink / raw)
  To: Damien Le Moal, Al Viro, Christoph Hellwig
  Cc: Palmer Dabbelt, linux-riscv, linux-kernel, jcmvbkbc, Anup Patel,
	uclinux-dev


On 16/4/21 10:26 am, Damien Le Moal wrote:
> On 2021/04/16 9:22, Al Viro wrote:
>> On Thu, Apr 15, 2021 at 07:56:05AM +0200, Christoph Hellwig wrote:
>>> binfmt_flat tends to go through Greg's uclinux tree, adding him and
>>> the list.
>>
>> 	FWIW, my involvement with binfmt_flat had been pretty much nil -
>> the least trivial had been "binfmt_flat: flat_{get,put}_addr_from_rp()
>> should be able to fail" about 4 years ago and that fell out of hunting
>> for places where __get_user() had been used without checking error values.
>>
>> 	It's in fs/*, but I've no way to test it and I have pretty much
>> zero familiarity with the guts of that one, so I can't give any useful
>> feedback on that series.  So consider the Christoph's comment seconded -
>> you want it reviewed by gerg et.al., and it probably ought to go via
>> gerg/uclinux.git tree.
>>
>> 	I'm reasonably familiar with binfmt_{elf,misc,script}; anything
>> else gets touched as part of larger series and only with sanity checks
>> from other folks, if the changes are not entirely trivial.
> 
> Al,
> 
> Thanks for the clarification. Would it make sense to have an entry in
> MAINTAINERS file pointing to Greg and the uclinux tree for binfmt_flat.c ?
> Greg ?

Yep, looks like it does need that.

Regards
Greg


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-04-16  7:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 15:49 [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V Damien Le Moal
2021-04-07 15:49 ` [PATCH v2 1/2] binfmt_flat: allow not offsetting data start Damien Le Moal
2021-04-07 15:49 ` [PATCH v2 2/2] riscv: Disable text-data gap in flat binaries Damien Le Moal
2021-04-15  0:32 ` [PATCH v2 0/2] Fix binfmt_flat loader for RISC-V Damien Le Moal
2021-04-15  5:46   ` Palmer Dabbelt
2021-04-15  5:56     ` Christoph Hellwig
2021-04-15  6:16       ` Damien Le Moal
2021-04-16  0:21       ` Al Viro
2021-04-16  0:26         ` Damien Le Moal
2021-04-16  7:26           ` Greg Ungerer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).