On Thu, 23 May 2019 20:57:36 +0300 Alexey Dobriyan <adobri...@gmail.com> wrote:

> Only executable ELF program headers should change ->start_code.
> 
> ...
>
> --- a/fs/binfmt_elf.c
> +++ b/fs/binfmt_elf.c
> @@ -1026,7 +1026,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
>                       }
>               }
>               k = elf_ppnt->p_vaddr;
> -             if (k < start_code)
> +             if ((elf_ppnt->p_flags & PF_X) && k < start_code)
>                       start_code = k;
>               if (start_data < k)
>                       start_data = k;

What problem does this solve?  How does it alter runtime behaviour? 
How do we know it won't break anything?

Reply via email to