]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
fs/binfmt_elf.c: extract PROT_* calculations
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 14 May 2019 22:43:51 +0000 (15:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 15 May 2019 02:52:50 +0000 (19:52 -0700)
commitd8e7cb39acc66316106ef8bda9b76f9f3cbbcad0
tree53183c2ac3231f2ea807a98893ba587768d61ef8
parent852643165aea0999bb862b36511c5b9f6b11449f
fs/binfmt_elf.c: extract PROT_* calculations

There are two places where mapping protections are calculated: one for
executable, another one for interpreter -- take them out.

ELF read and execute permissions are interchanged with Linux PROT_READ
and PROT_EXEC, microoptimizations are welcome!

Link: http://lkml.kernel.org/r/20190417213413.GB26474@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