Commit d8e7cb3
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>1 parent 8526431 commit d8e7cb3
1 file changed
+16
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
527 | 540 | | |
528 | 541 | | |
529 | 542 | | |
| |||
563 | 576 | | |
564 | 577 | | |
565 | 578 | | |
566 | | - | |
| 579 | + | |
567 | 580 | | |
568 | 581 | | |
569 | 582 | | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | 583 | | |
577 | 584 | | |
578 | 585 | | |
| |||
891 | 898 | | |
892 | 899 | | |
893 | 900 | | |
894 | | - | |
| 901 | + | |
895 | 902 | | |
896 | 903 | | |
897 | 904 | | |
| |||
932 | 939 | | |
933 | 940 | | |
934 | 941 | | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
| 942 | + | |
941 | 943 | | |
942 | 944 | | |
943 | 945 | | |
| |||
0 commit comments