Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-06-02 Thread Sergei Poselenov
Hello Arnd, all, On Wed, 2019-05-29 at 14:05 +0200, Arnd Bergmann wrote: > On Tue, May 28, 2019 at 12:56 PM Greg Ungerer > wrote: > > On 27/5/19 11:38 pm, Jann Horn wrote: > > > On Sat, May 25, 2019 at 11:43 PM Andrew Morton > > > wrote: > > > > On Fri, 24 May 2019 22:18:17 +0200 Jann Horn > >

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-29 Thread Arnd Bergmann
On Wed, May 29, 2019 at 2:29 PM Greg Ungerer wrote: > On 29/5/19 10:05 pm, Arnd Bergmann wrote: > > On Tue, May 28, 2019 at 12:56 PM Greg Ungerer wrote: > >> On 27/5/19 11:38 pm, Jann Horn wrote: > >>> On Sat, May 25, 2019 at 11:43 PM Andrew Morton > >>> wrote: > >>> Maybe... but I didn't want

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-29 Thread John Paul Adrian Glaubitz
On 5/29/19 3:16 PM, Andreas Schwab wrote: >>> I have not used shared libraries on m68k non-mmu setups for >>> a very long time. At least 10 years I would think. >> We use shared libraries in Debian on m68k and Andreas Schwab uses them >> on openSUSE/m68k. > > Nope, I don't use non-mmu. Sorry, I

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-29 Thread Andreas Schwab
On Mai 29 2019, John Paul Adrian Glaubitz wrote: > On 5/28/19 12:56 PM, Greg Ungerer wrote: >>> Maybe... but I didn't want to rip it out without having one of the >>> maintainers confirm that this really isn't likely to be used anymore. >> >> I have not used shared libraries on m68k non-mmu

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-29 Thread John Paul Adrian Glaubitz
On 5/29/19 2:38 PM, Jann Horn wrote: >>> I have not used shared libraries on m68k non-mmu setups for >>> a very long time. At least 10 years I would think. >> We use shared libraries in Debian on m68k and Andreas Schwab uses them >> on openSUSE/m68k. > > And you're using FLAT shared libraries,

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-29 Thread Greg Ungerer
On 29/5/19 10:32 pm, John Paul Adrian Glaubitz wrote: On 5/28/19 12:56 PM, Greg Ungerer wrote: Maybe... but I didn't want to rip it out without having one of the maintainers confirm that this really isn't likely to be used anymore. I have not used shared libraries on m68k non-mmu setups

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-29 Thread Jann Horn
On Wed, May 29, 2019 at 2:32 PM John Paul Adrian Glaubitz wrote: > On 5/28/19 12:56 PM, Greg Ungerer wrote: > >> Maybe... but I didn't want to rip it out without having one of the > >> maintainers confirm that this really isn't likely to be used anymore. > > > > I have not used shared libraries

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-29 Thread John Paul Adrian Glaubitz
On 5/28/19 12:56 PM, Greg Ungerer wrote: >> Maybe... but I didn't want to rip it out without having one of the >> maintainers confirm that this really isn't likely to be used anymore. > > I have not used shared libraries on m68k non-mmu setups for > a very long time. At least 10 years I would

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-29 Thread Greg Ungerer
On 29/5/19 10:05 pm, Arnd Bergmann wrote: On Tue, May 28, 2019 at 12:56 PM Greg Ungerer wrote: On 27/5/19 11:38 pm, Jann Horn wrote: On Sat, May 25, 2019 at 11:43 PM Andrew Morton wrote: On Fri, 24 May 2019 22:18:17 +0200 Jann Horn wrote: load_flat_shared_library() is broken: It only

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-29 Thread Arnd Bergmann
On Tue, May 28, 2019 at 12:56 PM Greg Ungerer wrote: > On 27/5/19 11:38 pm, Jann Horn wrote: > > On Sat, May 25, 2019 at 11:43 PM Andrew Morton > > wrote: > >> On Fri, 24 May 2019 22:18:17 +0200 Jann Horn wrote: > >>> load_flat_shared_library() is broken: It only calls load_flat_file() if > >>>

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-29 Thread Arnd Bergmann
On Tue, May 28, 2019 at 12:56 PM Greg Ungerer wrote: > On 27/5/19 11:38 pm, Jann Horn wrote: > > On Sat, May 25, 2019 at 11:43 PM Andrew Morton > > wrote: > >> On Fri, 24 May 2019 22:18:17 +0200 Jann Horn wrote: > >>> load_flat_shared_library() is broken: It only calls load_flat_file() if > >>>

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-28 Thread Greg Ungerer
On 27/5/19 11:38 pm, Jann Horn wrote: On Sat, May 25, 2019 at 11:43 PM Andrew Morton wrote: On Fri, 24 May 2019 22:18:17 +0200 Jann Horn wrote: load_flat_shared_library() is broken: It only calls load_flat_file() if prepare_binprm() returns zero, but prepare_binprm() returns the number of

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-28 Thread Greg Ungerer
On 27/5/19 11:38 pm, Jann Horn wrote: On Sat, May 25, 2019 at 11:43 PM Andrew Morton wrote: On Fri, 24 May 2019 22:18:17 +0200 Jann Horn wrote: load_flat_shared_library() is broken: It only calls load_flat_file() if prepare_binprm() returns zero, but prepare_binprm() returns the number of

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-27 Thread Nicolas Pitre
On Mon, 27 May 2019, Jann Horn wrote: > On Sat, May 25, 2019 at 11:43 PM Andrew Morton > wrote: > > On Fri, 24 May 2019 22:18:17 +0200 Jann Horn wrote: > > > load_flat_shared_library() is broken: It only calls load_flat_file() if > > > prepare_binprm() returns zero, but prepare_binprm() returns

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-27 Thread Jann Horn
On Sat, May 25, 2019 at 11:43 PM Andrew Morton wrote: > On Fri, 24 May 2019 22:18:17 +0200 Jann Horn wrote: > > load_flat_shared_library() is broken: It only calls load_flat_file() if > > prepare_binprm() returns zero, but prepare_binprm() returns the number of > > bytes read - so this only

Re: [PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-25 Thread Andrew Morton
On Fri, 24 May 2019 22:18:17 +0200 Jann Horn wrote: > load_flat_shared_library() is broken: It only calls load_flat_file() if > prepare_binprm() returns zero, but prepare_binprm() returns the number of > bytes read - so this only happens if the file is empty. ouch. > Instead, call into

[PATCH] binfmt_flat: make load_flat_shared_library() work

2019-05-24 Thread Jann Horn
load_flat_shared_library() is broken: It only calls load_flat_file() if prepare_binprm() returns zero, but prepare_binprm() returns the number of bytes read - so this only happens if the file is empty. Instead, call into load_flat_file() if the number of bytes read is non-negative. (Even if the