linux-IllusionX/arch/x86
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
..
boot x86/efi: Restore Firmware IDT before calling ExitBootServices() 2021-08-21 17:57:04 +02:00
configs
crypto crypto: x86/curve25519 - fix cpu feature checking logic in mod_exit 2021-06-11 15:03:29 +08:00
entry arch, mm: wire up memfd_secret system call where relevant 2021-07-08 11:48:21 -07:00
events perf/x86/amd/power: Assign pmu.module 2021-08-26 09:12:57 +02:00
hyperv Drivers: hv: Move Hyper-V extended capability check to arch neutral code 2021-06-05 10:22:34 +00:00
ia32 binfmt: don't use MAP_DENYWRITE when loading shared libraries via uselib() 2021-09-03 18:42:01 +02:00
include KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) 2021-08-16 09:48:27 -04:00
kernel x86/resctrl: Fix a maybe-uninitialized build warning treated as error 2021-08-22 09:11:29 +02:00
kvm KVM: nSVM: always intercept VMLOAD/VMSAVE when nested (CVE-2021-3656) 2021-08-16 09:48:37 -04:00
lib - Differentiate the type of exception the #VC handler raises depending 2021-06-28 11:29:12 -07:00
math-emu x86/math-emu: Rename frstor() 2021-06-23 18:16:33 +02:00
mm Revert "mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge" 2021-07-21 11:28:09 +01:00
net bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-07-29 00:20:56 +02:00
pci pci-v5.14-changes 2021-07-08 12:06:20 -07:00
platform EFI changes: two driver API cleanups, and a log message tweak. 2021-06-28 11:34:16 -07:00
power - turn the stack canary into a normal __percpu variable on 32-bit which 2021-04-27 17:45:09 -07:00
purgatory kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
ras
realmode A single ELF format fix for a section flags mismatch bug that breaks 2021-06-28 11:35:55 -07:00
tools x86/tools: Fix objdump version check again 2021-08-12 17:17:25 +02:00
um x86/uml/syscalls: Remove array index from syscall initializers 2021-05-25 16:59:23 +02:00
video
xen kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
.gitignore
Kbuild
Kconfig arch: Kconfig: clean up obsolete use of HAVE_IDE 2021-07-30 08:19:09 -06:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug
Makefile Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00
Makefile.um um: allow not setting extra rpaths in the linux binary 2021-06-17 21:54:15 +02:00
Makefile_32.cpu