]> git.baikalelectronics.ru Git - 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)
commitc134374fe6dc9cbbdf0f297a91f45edeece226bf
tree53183c2ac3231f2ea807a98893ba587768d61ef8
parentc65d8f627451697decbde1d943a82608593263ba
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