diff options
Diffstat (limited to 'www-client/chromium/files')
-rw-r--r-- | www-client/chromium/files/chromium-135-map_droppable-glibc.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-135-map_droppable-glibc.patch b/www-client/chromium/files/chromium-135-map_droppable-glibc.patch new file mode 100644 index 000000000000..74e84e02a8aa --- /dev/null +++ b/www-client/chromium/files/chromium-135-map_droppable-glibc.patch @@ -0,0 +1,27 @@ +https://github.com/FireBurn/chromium/commit/28dc20e11a6f6e6d176fc3ed0b74b405112ecb2d +From: Mike Lothian <mike@fireburn.co.uk> +Date: Wed, 12 Feb 2025 14:33:50 +0000 +Subject: [PATCH] Add MAP_DROPPABLE to syscall_parameters_restrictions.cc + +--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ++++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +@@ -34,6 +34,10 @@ + #include "sandbox/linux/system_headers/linux_syscalls.h" + #include "sandbox/linux/system_headers/linux_time.h" + ++#if !defined(MAP_DROPPABLE) ++#define MAP_DROPPABLE 0x08 // Zero memory under memory pressure. ++#endif ++ + #if BUILDFLAG(IS_LINUX) && !defined(__arm__) && !defined(__aarch64__) && \ + !defined(PTRACE_GET_THREAD_AREA) + // Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance +@@ -236,7 +240,7 @@ ResultExpr RestrictMmapFlags() { + // TODO(davidung), remove MAP_DENYWRITE with updated Tegra libraries. + const uint64_t kAllowedMask = MAP_SHARED | MAP_PRIVATE | MAP_ANONYMOUS | + MAP_STACK | MAP_NORESERVE | MAP_FIXED | +- MAP_DENYWRITE | MAP_LOCKED | ++ MAP_DENYWRITE | MAP_LOCKED | MAP_DROPPABLE | + kArchSpecificAllowedMask; + const Arg<int> flags(3); + return If((flags & ~kAllowedMask) == 0, Allow()).Else(CrashSIGSYS()); |