From 2b7d4da03401cbe40fab3b78ca0399f4f5f9325e Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 29 Oct 2021 15:07:29 +0000 Subject: [PATCH] extra/qt5-webengine: fix --- .../0001-ARM-toolchain-fixes.patch | 4 +- .../qt5-webengine/0002-Fix-ARM-skia-ICE.patch | 4 +- ...-single_process-flag-in-generate_bin.patch | 4 +- ...-bindings-generation-single-threaded.patch | 4 +- ...dbox-Aw-snap-for-sycalls-403-and-407.patch | 106 ------------------ extra/qt5-webengine/PKGBUILD | 13 +-- 6 files changed, 13 insertions(+), 122 deletions(-) delete mode 100644 extra/qt5-webengine/0005-Fix-sandbox-Aw-snap-for-sycalls-403-and-407.patch diff --git a/extra/qt5-webengine/0001-ARM-toolchain-fixes.patch b/extra/qt5-webengine/0001-ARM-toolchain-fixes.patch index 2e64885fa..87569d05a 100644 --- a/extra/qt5-webengine/0001-ARM-toolchain-fixes.patch +++ b/extra/qt5-webengine/0001-ARM-toolchain-fixes.patch @@ -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 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 ++++++++++-------------- diff --git a/extra/qt5-webengine/0002-Fix-ARM-skia-ICE.patch b/extra/qt5-webengine/0002-Fix-ARM-skia-ICE.patch index cb7becefa..4e05dd94e 100644 --- a/extra/qt5-webengine/0002-Fix-ARM-skia-ICE.patch +++ b/extra/qt5-webengine/0002-Fix-ARM-skia-ICE.patch @@ -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 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 +- diff --git a/extra/qt5-webengine/0003-bind-gen-Support-single_process-flag-in-generate_bin.patch b/extra/qt5-webengine/0003-bind-gen-Support-single_process-flag-in-generate_bin.patch index 25e9d11b9..dc7554491 100644 --- a/extra/qt5-webengine/0003-bind-gen-Support-single_process-flag-in-generate_bin.patch +++ b/extra/qt5-webengine/0003-bind-gen-Support-single_process-flag-in-generate_bin.patch @@ -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 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 diff --git a/extra/qt5-webengine/0004-Run-blink-bindings-generation-single-threaded.patch b/extra/qt5-webengine/0004-Run-blink-bindings-generation-single-threaded.patch index 1a68f8103..a4bfe577d 100644 --- a/extra/qt5-webengine/0004-Run-blink-bindings-generation-single-threaded.patch +++ b/extra/qt5-webengine/0004-Run-blink-bindings-generation-single-threaded.patch @@ -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 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. --- diff --git a/extra/qt5-webengine/0005-Fix-sandbox-Aw-snap-for-sycalls-403-and-407.patch b/extra/qt5-webengine/0005-Fix-sandbox-Aw-snap-for-sycalls-403-and-407.patch deleted file mode 100644 index bf32cc5f9..000000000 --- a/extra/qt5-webengine/0005-Fix-sandbox-Aw-snap-for-sycalls-403-and-407.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 27bfb004e8f3e38fd4220b94852a57d3f7d61e04 Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -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 - diff --git a/extra/qt5-webengine/PKGBUILD b/extra/qt5-webengine/PKGBUILD index b6845ff7f..9ce915cd7 100644 --- a/extra/qt5-webengine/PKGBUILD +++ b/extra/qt5-webengine/PKGBUILD @@ -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() {