Re: [PATCH] binfmt_elf: fix return value in case of interpreter load failure

2013-04-16 Thread Oleg Nesterov
On 04/15, Andrew Morton wrote: > > On Fri, 12 Apr 2013 16:49:50 +0200 Matthieu CASTET > wrote: > > > The only valid remaining part of my patch is to return SIGKILL when > > load_elf_interp fail (IS_ERR((void *)elf_entry) is true) (for example load > > address of linker is bad) instead of SIGSEGV.

Re: [PATCH] binfmt_elf: fix return value in case of interpreter load failure

2013-04-15 Thread Andrew Morton
On Fri, 12 Apr 2013 16:49:50 +0200 Matthieu CASTET wrote: > Hi Andrew, > > thanks for your quick review. > > Andrew Morton a __crit : > > On Thu, 11 Apr 2013 15:53:09 +0200 Matthieu CASTET > > wrote: > > > >> The current code return the address instead of using PTR_ERR. > > > > I don't und

Re: [PATCH] binfmt_elf: fix return value in case of interpreter load failure

2013-04-12 Thread Matthieu CASTET
Hi Andrew, thanks for your quick review. Andrew Morton a écrit : > On Thu, 11 Apr 2013 15:53:09 +0200 Matthieu CASTET > wrote: > >> The current code return the address instead of using PTR_ERR. > > I don't understand what you mean here - please describe this error in > much more detail. Help

Re: [PATCH] binfmt_elf: fix return value in case of interpreter load failure

2013-04-11 Thread Andrew Morton
On Thu, 11 Apr 2013 15:53:09 +0200 Matthieu CASTET wrote: > The current code return the address instead of using PTR_ERR. I don't understand what you mean here - please describe this error in much more detail. Help people to identify the section of code which is being discussed. > Also the ch

[PATCH] binfmt_elf: fix return value in case of interpreter load failure

2013-04-11 Thread Matthieu CASTET
The current code return the address instead of using PTR_ERR. Also the check is done after adding e_entry. This can cause weird behaviour because -errno + loc->interp_elf_ex.e_entry can produce a valid address. Add a check to test load error before adding entry address. Also in this case send SIG