]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9f364e018f60f1f9e4882b4fdbce597dfd5f26f8
treec4ea5c42ed4e6e1ff8bd4621b1a4a87805e9df29
parent1f9645c8d6b66851f6f94e491215c2dae2c7f0be
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