extra/qt5-webengine: fix

This commit is contained in:
Kevin Mihelich 2021-10-29 15:07:29 +00:00
parent 09f69fb585
commit 2b7d4da034
6 changed files with 13 additions and 122 deletions

View file

@ -1,7 +1,7 @@
From 4a0e1bdc52ac9561890e90fdf6d475568352df1f Mon Sep 17 00:00:00 2001
From 831eeefaebc489ecb64f945cfa62f79771be3bf5 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Tue, 4 Jul 2017 11:54:39 -0600
Subject: [PATCH 1/5] ARM toolchain fixes
Subject: [PATCH 1/4] ARM toolchain fixes
---
chromium/build/toolchain/linux/BUILD.gn | 24 ++++++++++--------------

View file

@ -1,7 +1,7 @@
From 92e815b44adc894b2820c74b28e73e47528844ea Mon Sep 17 00:00:00 2001
From 895dec8c2d626f176cb85af81c09c7bf30e2ad43 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Mon, 1 Jul 2019 07:10:36 -0600
Subject: [PATCH 2/5] Fix ARM skia ICE
Subject: [PATCH 2/4] Fix ARM skia ICE
---
chromium/third_party/skia/third_party/skcms/src/Transform_inl.h | 2 +-

View file

@ -1,7 +1,7 @@
From 30959e74702e266b93e7a1322b34e33c6c94a2eb Mon Sep 17 00:00:00 2001
From a3a795afdd386242fa115309c5fd349b0095bfdd Mon Sep 17 00:00:00 2001
From: Yuki Shiino <yukishiino@chromium.org>
Date: Mon, 5 Oct 2020 11:01:57 +0000
Subject: [PATCH 3/5] bind-gen: Support --single_process flag in
Subject: [PATCH 3/4] bind-gen: Support --single_process flag in
generate_bindings.py
Error messages of generate_bindings.py are often hard to read

View file

@ -1,7 +1,7 @@
From 61c2c92e3d37c7c7c8a812424766342dbeace848 Mon Sep 17 00:00:00 2001
From 67b6ede8c7b82dfddc53b945945a5d4c9e2ad9c3 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Tue, 2 Feb 2021 13:58:59 -0700
Subject: [PATCH 4/5] Run blink bindings generation single threaded
Subject: [PATCH 4/4] Run blink bindings generation single threaded
When not single threaded this process will eat all the RAM.
---

View file

@ -1,106 +0,0 @@
From 27bfb004e8f3e38fd4220b94852a57d3f7d61e04 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Tue, 2 Feb 2021 13:58:21 -0700
Subject: [PATCH 5/5] 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/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
index 8e01961e388..cedbd677b49 100644
--- a/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+++ b/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
@@ -158,7 +158,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/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
index 176c3e1ee47..faf8be6bb3d 100644
--- a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
+++ b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
@@ -56,6 +56,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/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
index d9d18822f67..0db8745cb57 100644
--- a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ b/chromium/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/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h b/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
index 85e2110b4c2..c39c22b5114 100644
--- a/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
+++ b/chromium/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/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h b/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h
index ddbf97f3d8b..fa01b3bbc66 100644
--- a/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h
+++ b/chromium/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.33.0

View file

@ -31,18 +31,16 @@ source=(git+https://code.qt.io/qt/qtwebengine.git#tag=v${pkgver}-lts
0001-ARM-toolchain-fixes.patch
0002-Fix-ARM-skia-ICE.patch
0003-bind-gen-Support-single_process-flag-in-generate_bin.patch
0004-Run-blink-bindings-generation-single-threaded.patch
0005-Fix-sandbox-Aw-snap-for-sycalls-403-and-407.patch)
0004-Run-blink-bindings-generation-single-threaded.patch)
sha256sums=('SKIP'
'SKIP'
'SKIP'
'45ccf4ff981a26656e5105259f71a3ce386d4a7112cbf09e41cb61615b355435'
'8d0327615c6b6a340122640a9ddeb56be185621297a4ead8da4211e37feeaa75'
'412c675fd60e78785e7dfedafa4982d999ea5797c65580d6465e53288ad3000e'
'64f50a097a69c37ea07ad5ddf01f8342a97a786174382907922d7d22c1d88fc6'
'56034f14437842e3182252cebbd824f7845affb4af9c2af41de2528ea8cfa02d'
'9ed3b4d24047061f68b6e94cb616304bb857eec1e2bafe1df686526c35da44e4'
'5b2024eaf70a6e0fc6227dd63c76b419f74cf815741d6e063847a442590755ce')
'81b7a62368f40d757b165b88df4813413f30db797e4f93a84dd75e12e1ebd679'
'298037fcbc132f1539616cdf6149ad5da104f8e2345a9c1af1e7bf8b0dd52c70'
'b878770648437c9bc24023b1d5a47bcd51382d7142b695864c3379826511bcd9'
'e447f5d2635f8f32914c912d7f99b38726c1541334f3a2c1a8ca2dbde565a7de')
prepare() {
mkdir -p build
@ -65,7 +63,6 @@ prepare() {
patch -p1 -i ${srcdir}/0002-Fix-ARM-skia-ICE.patch
patch -p1 -i ${srcdir}/0003-bind-gen-Support-single_process-flag-in-generate_bin.patch
patch -p1 -i ${srcdir}/0004-Run-blink-bindings-generation-single-threaded.patch
patch -p1 -i ${srcdir}/0005-Fix-sandbox-Aw-snap-for-sycalls-403-and-407.patch
}
build() {