Re: [PATCH] ELF: don't copy ELF header around

From: Andrew Morton
Date: Tue Dec 10 2019 - 20:56:15 EST


On Sun, 8 Dec 2019 20:12:42 +0300 Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:

> ELF header is read into bprm->buf[] by generic execve code.
>
> Save a memcpy and allocate just one header for the interpreter instead
> of two headers (64 bytes instead of 128 on 64-bit).

Hard to review. Why were there two copies in the first place? Because
of the need to modify the caller's version when we do
`loc->elf_ex.e_entry += load_bias', yes? Any other place?

Local variable `loc' can go away now, yes?