extra/chromium to 88.0.4324.146-1

This commit is contained in:
Kevin Mihelich 2021-02-03 01:27:47 +00:00
parent 215369723a
commit 7bb7ec42ea
5 changed files with 146 additions and 97 deletions

View file

@ -1,7 +1,7 @@
From eab62fbc380bbb748571a48f5fe6a47e9a4b8ea5 Mon Sep 17 00:00:00 2001
From 430359d58fc5caabc175539baf6eedc22b861f6c Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Wed, 30 Jan 2019 14:18:00 -0700
Subject: [PATCH] crashpad: include limits
Subject: [PATCH 1/3] crashpad: include limits
Fixes ARM FTBFS
---
@ -9,7 +9,7 @@ Fixes ARM FTBFS
1 file changed, 1 insertion(+)
diff --git a/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc b/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
index 6ba52a8def14..8eeaa44d46fe 100644
index 8464a5a27b2d..c184eccf327b 100644
--- a/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
+++ b/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
@@ -16,6 +16,7 @@
@ -18,8 +18,8 @@ index 6ba52a8def14..8eeaa44d46fe 100644
#include <string.h>
+#include <limits>
#include "base/logging.h"
#include <limits>
--
2.20.1
2.30.0

View file

@ -0,0 +1,106 @@
From e4b34d9e3fe304bac9ad5a77f35d92f61df3566a Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Tue, 2 Feb 2021 13:58:21 -0700
Subject: [PATCH 2/3] Fix sandbox 'Aw snap' for sycalls 403 and 407
---
sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc | 9 ++++++++-
.../syscall_parameters_restrictions_unittests.cc | 6 ++++++
sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc | 6 ++++++
sandbox/linux/system_headers/arm_linux_syscalls.h | 8 ++++++++
sandbox/linux/system_headers/mips_linux_syscalls.h | 8 ++++++++
5 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
index 3c67b1247869..e6e989d7b49e 100644
--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
@@ -157,7 +157,14 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno,
return Allow();
#endif
- if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) {
+ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep
+#if defined(__NR_clock_gettime64)
+ || sysno == __NR_clock_gettime64
+#endif
+#if defined(__NR_clock_nanosleep_time64)
+ || sysno == __NR_clock_nanosleep_time64
+#endif
+ ) {
return RestrictClockID();
}
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
index 4bbfc7e53b6f..540149b67d95 100644
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
@@ -61,6 +61,12 @@ class RestrictClockIdPolicy : public bpf_dsl::Policy {
case __NR_clock_gettime:
case __NR_clock_getres:
case __NR_clock_nanosleep:
+#if defined(__NR_clock_nanosleep_time64)
+ case __NR_clock_nanosleep_time64:
+#endif
+#if defined(__NR_clock_gettime64)
+ case __NR_clock_gettime64:
+#endif
return RestrictClockID();
default:
return Allow();
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
index d9d18822f670..0db8745cb578 100644
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -39,6 +39,12 @@ bool SyscallSets::IsAllowedGettime(int sysno) {
// filtered by RestrictClokID().
case __NR_clock_gettime: // Parameters filtered by RestrictClockID().
case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID().
+#if defined(__NR_clock_gettime64)
+ case __NR_clock_gettime64: // Parameters filtered by RestrictClockID().
+#endif
+#if defined(__NR_clock_nanosleep_time64)
+ case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID().
+#endif
case __NR_clock_settime: // Privileged.
#if defined(__i386__) || \
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
diff --git a/sandbox/linux/system_headers/arm_linux_syscalls.h b/sandbox/linux/system_headers/arm_linux_syscalls.h
index 85e2110b4c29..c39c22b5114d 100644
--- a/sandbox/linux/system_headers/arm_linux_syscalls.h
+++ b/sandbox/linux/system_headers/arm_linux_syscalls.h
@@ -1441,6 +1441,14 @@
#define __NR_io_pgetevents (__NR_SYSCALL_BASE+399)
#endif
+#if !defined(__NR_clock_gettime64)
+#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403)
+#endif
+
+#if !defined(__NR_clock_nanosleep_time64)
+#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407)
+#endif
+
// ARM private syscalls.
#if !defined(__ARM_NR_BASE)
#define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)
diff --git a/sandbox/linux/system_headers/mips_linux_syscalls.h b/sandbox/linux/system_headers/mips_linux_syscalls.h
index ddbf97f3d8b5..fa01b3bbc668 100644
--- a/sandbox/linux/system_headers/mips_linux_syscalls.h
+++ b/sandbox/linux/system_headers/mips_linux_syscalls.h
@@ -1433,4 +1433,12 @@
#define __NR_memfd_create (__NR_Linux + 354)
#endif
+#if !defined(__NR_clock_gettime64)
+#define __NR_clock_gettime64 (__NR_Linux + 403)
+#endif
+
+#if !defined(__NR_clock_nanosleep_time64)
+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407)
+#endif
+
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_
--
2.30.0

View file

@ -0,0 +1,25 @@
From 27dece2e33694494d4d864d5b3458380f1650f0c Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Tue, 2 Feb 2021 13:58:59 -0700
Subject: [PATCH 3/3] Run blink bindings generation single threaded
When not single threaded this process will eat all the RAM.
---
third_party/blink/renderer/bindings/BUILD.gn | 1 +
1 file changed, 1 insertion(+)
diff --git a/third_party/blink/renderer/bindings/BUILD.gn b/third_party/blink/renderer/bindings/BUILD.gn
index dd6c7397b204..518ab2cbedd5 100644
--- a/third_party/blink/renderer/bindings/BUILD.gn
+++ b/third_party/blink/renderer/bindings/BUILD.gn
@@ -188,6 +188,7 @@ template("generate_bindings") {
outputs = invoker.outputs
args = [
+ "--single_process",
"--web_idl_database",
rebase_path(web_idl_database, root_build_dir),
"--root_src_dir",
--
2.30.0

View file

@ -15,8 +15,8 @@ buildarch=12
highmem=1
pkgname=chromium
pkgver=88.0.4324.96
pkgrel=2
pkgver=88.0.4324.146
pkgrel=1
_launcher_ver=7
_gcc_patchset=3
pkgdesc="A web browser built for speed, simplicity, and security"
@ -39,13 +39,15 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgn
https://github.com/stha09/chromium-patches/releases/download/chromium-${pkgver%%.*}-patchset-$_gcc_patchset/chromium-${pkgver%%.*}-patchset-$_gcc_patchset.tar.xz
subpixel-anti-aliasing-in-FreeType-2.8.1.patch
0001-crashpad-include-limits.patch
chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407.patch)
sha256sums=('8995c5bb28559579f3bed51841420253637f912c425908fe5aa389ce40e9c79f'
0002-Fix-sandbox-Aw-snap-for-sycalls-403-and-407.patch
0003-Run-blink-bindings-generation-single-threaded.patch)
sha256sums=('38b118fbe8bbdf89e4f170ced090088f5eb2bb68f2295abbb0006cc94b7f827d'
'86859c11cfc8ba106a3826479c0bc759324a62150b271dd35d1a0f96e890f52f'
'e5a60a4c9d0544d3321cc241b4c7bd4adb0a885f090c6c6c21581eac8e3b4ba9'
'1e2913e21c491d546e05f9b4edf5a6c7a22d89ed0b36ef692ca6272bcd5faec6'
'df99f49ad58b70c9a3e1827d7e80b62e4363419334ed83373cf55b79c17b6f10'
'4837f797a910795bf3161805a3302d5f3701573ca90da8af32b2f4aa62510d20')
'a4a429b21236b93e4b9c4b77d561c9102b38b2e5f1bc7607b4c92fb2b7a15bde'
'f0eed8a0f62b59dd9020038a4c5c3a4160abd0327164c345504d04d5be47e7d7'
'c55eed4d0f8f5f84f1b52eae75f7a2c23cc8fbc983cc1162e0a3a0d85238dbbb')
# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
# Keys are the names in the above script; values are the dependencies in Arch
@ -90,7 +92,8 @@ prepare() {
# Arch Linux ARM fixes
patch -p1 -i ../0001-crashpad-include-limits.patch
patch -p1 -i ../chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407.patch
patch -p1 -i ../0002-Fix-sandbox-Aw-snap-for-sycalls-403-and-407.patch
patch -p1 -i ../0003-Run-blink-bindings-generation-single-threaded.patch
# Build ARMv7 with NEON
[[ $CARCH == "armv7h" ]] && MAKEFLAGS="-j4" && CFLAGS=`echo $CFLAGS | sed -e 's/vfpv3-d16/neon/'` && CXXFLAGS="$CFLAGS"

View file

@ -1,85 +0,0 @@
diff -rauN chromium-81.0.4044.122/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
--- chromium-81.0.4044.122/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2020-04-21 23:50:38.000000000 +0200
+++ chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2020-04-24 08:23:49.283333424 +0200
@@ -148,7 +148,14 @@
return Allow();
#endif
- if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) {
+ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep
+#if defined(__NR_clock_gettime64)
+ || sysno == __NR_clock_gettime64
+#endif
+#if defined(__NR_clock_nanosleep_time64)
+ || sysno == __NR_clock_nanosleep_time64
+#endif
+ ) {
return RestrictClockID();
}
diff -rauN chromium-81.0.4044.122/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
--- chromium-81.0.4044.122/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc 2020-04-21 23:50:02.000000000 +0200
+++ chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc 2020-04-24 08:29:04.760000078 +0200
@@ -60,6 +60,12 @@
case __NR_clock_gettime:
case __NR_clock_getres:
case __NR_clock_nanosleep:
+#if defined(__NR_clock_nanosleep_time64)
+ case __NR_clock_nanosleep_time64:
+#endif
+#if defined(__NR_clock_gettime64)
+ case __NR_clock_gettime64:
+#endif
return RestrictClockID();
default:
return Allow();
diff -rauN chromium-81.0.4044.122/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
--- chromium-81.0.4044.122/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2020-04-21 23:50:02.000000000 +0200
+++ chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2020-04-24 08:32:50.016666736 +0200
@@ -39,6 +39,12 @@
// filtered by RestrictClokID().
case __NR_clock_gettime: // Parameters filtered by RestrictClockID().
case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID().
+#if defined(__NR_clock_gettime64)
+ case __NR_clock_gettime64: // Parameters filtered by RestrictClockID().
+#endif
+#if defined(__NR_clock_nanosleep_time64)
+ case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID().
+#endif
case __NR_clock_settime: // Privileged.
#if defined(__i386__) || \
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
diff -rauN chromium-81.0.4044.122/sandbox/linux/system_headers/arm_linux_syscalls.h chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/system_headers/arm_linux_syscalls.h
--- chromium-81.0.4044.122/sandbox/linux/system_headers/arm_linux_syscalls.h 2020-04-21 23:50:02.000000000 +0200
+++ chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/system_headers/arm_linux_syscalls.h 2020-04-24 08:35:06.950000054 +0200
@@ -1385,6 +1385,14 @@
#define __NR_memfd_create (__NR_SYSCALL_BASE+385)
#endif
+#if !defined(__NR_clock_gettime64)
+#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403)
+#endif
+
+#if !defined(__NR_clock_nanosleep_time64)
+#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407)
+#endif
+
// ARM private syscalls.
#if !defined(__ARM_NR_BASE)
#define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)
diff -rauN chromium-81.0.4044.122/sandbox/linux/system_headers/mips_linux_syscalls.h chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/system_headers/mips_linux_syscalls.h
--- chromium-81.0.4044.122/sandbox/linux/system_headers/mips_linux_syscalls.h 2020-04-21 23:50:02.000000000 +0200
+++ chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/system_headers/mips_linux_syscalls.h 2020-04-24 08:35:52.130000064 +0200
@@ -1433,4 +1433,12 @@
#define __NR_memfd_create (__NR_Linux + 354)
#endif
+#if !defined(__NR_clock_gettime64)
+#define __NR_clock_gettime64 (__NR_Linux + 403)
+#endif
+
+#if !defined(__NR_clock_nanosleep_time64)
+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407)
+#endif
+
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_