OSDN Git Service

fs/binfmt_elf.c: don't copy ELF header around
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 31 Jan 2020 06:16:55 +0000 (22:16 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 31 Jan 2020 18:30:41 +0000 (10:30 -0800)
commita62c5b1b6647ea069b8a23cb8edb7925dea89dd8
treec4ea5c42ed4e6e1ff8bd4621b1a4a87805e9df29
parentf67ef446291a09114f979a129fa42a859c5eb595
fs/binfmt_elf.c: don't copy ELF header around

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

Link: http://lkml.kernel.org/r/20191208171242.GA19716@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/binfmt_elf.c