linux-IllusionX/arch
David Hildenbrand 42be8b4253 binfmt: don't use MAP_DENYWRITE when loading shared libraries via uselib()
uselib() is the legacy systemcall for loading shared libraries.
Nowadays, applications use dlopen() to load shared libraries, completely
implemented in user space via mmap().

For example, glibc uses MAP_COPY to mmap shared libraries. While this
maps to MAP_PRIVATE | MAP_DENYWRITE on Linux, Linux ignores any
MAP_DENYWRITE specification from user space in mmap.

With this change, all remaining in-tree users of MAP_DENYWRITE use it
to map an executable. We will be able to open shared libraries loaded
via uselib() writable, just as we already can via dlopen() from user
space.

This is one step into the direction of removing MAP_DENYWRITE from the
kernel. This can be considered a minor user space visible change.

Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
2021-09-03 18:42:01 +02:00
..
alpha libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
arc ARC: fp: set FPU_STATUS.FWE to enable FPU_STATUS update on context switch 2021-08-03 18:58:33 -07:00
arm ARM fixes for 5.14: 2021-08-27 09:00:43 -07:00
arm64 arm64 fix for 5.14 2021-08-26 11:26:00 -07:00
csky Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
h8300 libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
hexagon Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
ia64 libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
m68k libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
microblaze Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
mips TTY/Serial fixes for 5.14-rc5 2021-08-08 10:23:13 -07:00
nds32 nds32: fix up stack guard gap 2021-07-21 15:51:37 +02:00
nios2 Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
openrisc Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
parisc Revert "parisc: Add assembly implementations for memset, strlen, strcpy, strncpy and strcat" 2021-08-29 10:13:32 -07:00
powerpc powerpc fixes for 5.14 #7 2021-08-28 10:40:41 -07:00
riscv RISC-V Fixes for 5.14-rc8 (or 5.14) 2021-08-27 11:04:57 -07:00
s390 s390/pci: fix use after free of zpci_dev 2021-08-18 10:12:42 +02:00
sh libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
sparc Networking fixes for 5.14-rc4, including fixes from bpf, can, WiFi (mac80211) 2021-07-30 16:01:36 -07:00
um Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
x86 binfmt: don't use MAP_DENYWRITE when loading shared libraries via uselib() 2021-09-03 18:42:01 +02:00
xtensa libata-5.14-2021-07-30 2021-07-30 10:56:47 -07:00
.gitignore
Kconfig Kconfig: Introduce ARCH_WANTS_NO_INSTR and CC_HAS_NO_PROFILE_FN_ATTR 2021-06-22 11:07:18 -07:00