diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2020-10-24 18:17:48 +0200 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2020-10-25 07:17:08 +0000 |
commit | 24fcf2cf771de488a261f8c4ad06e31b61402ed1 (patch) | |
tree | eadf512f6a530838b21409695abcc284d3a11040 | |
parent | 0dc3dc30cef6638eb0c81624227eff52bc66d387 (diff) |
community/chromium: upgrade to 86.0.4240.111
13 files changed, 367 insertions, 136 deletions
diff --git a/community/chromium/APKBUILD b/community/chromium/APKBUILD index a2503dbbfad..c6342f5d999 100644 --- a/community/chromium/APKBUILD +++ b/community/chromium/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=chromium -pkgver=85.0.4183.121 -pkgrel=1 +pkgver=86.0.4240.111 +pkgrel=0 pkgdesc="Chromium web browser" url="https://www.chromium.org/Home" arch="x86_64 aarch64" # x86: ./v8_context_snapshot_generator segfaults @@ -108,12 +108,12 @@ source="https://commondatastorage.googleapis.com/chromium-browser-official/chrom aarch64-fixes.patch elf-arm.patch - remove-unsupported-compiler-warnining.patch - - chromium-84-mediaalloc.patch chromium-size_t-defined.patch - chromium-85-NearbyShareEncryptedMetadataKey-include.patch - chromium-85-sim_hash-include.patch + check-for-enable-accelerated-video-decode-on-Linux.patch + fix-invalid-end-iterator-usage-in-CookieMonster.patch + only-fall-back-to-the-i965-driver-if-we-re-on-iHD.patch + remove-dead-reloc-in-nonalloc-LD-flags.patch + xproto-fix-underflow-in-Fp1616ToDouble.patch " # secfixes: @@ -335,21 +335,21 @@ chromedriver() { mv "$pkgdir"/usr/bin/chromedriver "$subpkgdir"/usr/bin } -sha512sums="9d61a0782c012fe36467a10f008962d45f4eaa065f6812276d847f7563056124c9fd21d8376dda8ab64e4c3b793da0593bac9d39988bbd60221828084b534945 chromium-85.0.4183.121.tar.xz +sha512sums="809bcab82c44976f109f0db0ce0470f88893a0999596b057e82675093f8fa0fc0badae4431a9160b4e94ae09219fa01914cad4b3143cebc530c71d420e7add54 chromium-86.0.4240.111.tar.xz a3bb959c65944ae2fb765725cedcffd743a58bc0c2cd1f1999d15fe79801d00f3474b08b4ed7b48859ed921eb57093d0ad09d90f201d729ed9b8a419a591ed29 pstables-2.8.h b9a810416dd7a8ffc3a5ced85ad9acebda1665bd08a57eec7b189698cc5f74d2c3fd69044e20fcb83297a43214b2772a1312b2c6122ea0eb716abacf39524d60 chromium-launcher.sh f6d962b9e4c22dd42183df3db5d3202dab33eccecafb1bf63ca678147289581262db1e5e64cbe8f9c212beefb0a6717bb8d311e497f56b55fe95b8bab2db493f chromium.conf e182c998a43d22d1c76a86c561619afd1fca8c2be668265ad5e2f81a3806f7a154272cc027a2f8b370fb69446892c69e5967a4be76082325c14245ee7915234c chromium.desktop 2d8237a940ea691bd10b08315429677a587f7ef9692a0cca53bfd066eae82998a6c71f402a8669e9de39f94d7f3280745d1628ea6eac5d76ca7116844d4e0dac google-api.keys b726ef2ecfe7d471e60d67de1e05847d214df6093b41bb2055652a9028327af19a8b10e7175467240f4dfec9e3ae97a6c4666bfd2cd6cb436c54656a085653ae default-pthread-stacksize.patch -5dc855cf321adbf8e7768e7a4b0684760952c607bffb0e3b6d7b8e632155ed85cb67a6734b736759f0f06c2c017de0a1be18a6e52f0796570ca39520dddffece musl-fixes.patch +4620f7515717eb185339af1f52f40e5c6ccd15b9162986517eb5cf3cbaf29740134f520997e2a1337ea51fd69dc0354b297f6cc4d1555ed546ffdc1dbcb51f5c musl-fixes.patch e8675aff9fccd8b58cc839ef1d9e0e022d66aa94f72baa72e7acf92ceb2691f6a7907cc60ec3a87f894efdd639a3dec7fe702c97d446fcdea99452caec57e002 musl-fixes-breakpad.patch ddacc7ab0374eaa110a392c9d0912c250eb102f060cac284b170902fa9358f8670cbe26676582208d1291662058761e31795ebac75115b38a1e3ad8681895b38 musl-hacks.patch 919f13a2cd65673f267321cf95c5410e65bc5264d6704d0791b25d39111282bedb425bd9824dde3b67422cfb874c86a9383ded686e39cfd4aac239edaf41cfc8 musl-libc++.patch -eda730d7ee307f2406e96c3313e9f3a17c2577af9bcc8cbfd4099d2b590d81a1c8adf7bf9ba58dd0ec4ebd77001701a73e0aa718cac583a01a8876ddece82d58 musl-sandbox.patch +ef43fa90b05e2407b6daa822193121cdeef6ee9068175572f0928f156f186be9c77539dfa06863adfaa25afd498ec1b5081f9e476543616f9472b9033fd921dc musl-sandbox.patch 129ec746fd951ee6d0bf0b4389b7c988523870507de1f92f5706f4eb49039d4a49ed30e92b0634e3ae521fc3e129adc1c6edc7435922fc91658d8c087520c707 no-execinfo.patch 06d6b4c466fa48f2d22c338e20458d8fa50bbbf744468f41bc3c1892e739002b1fbc5c133a37252cec4ff4f804847add6b9c0cc1f84fb276939471c09e467fb6 no-mallinfo.patch -b1edab2a782a0fd554d0fcee893374282ceca797e9595f1b4dd1c4dbeb65a5d6c368f2000f8d44baea3a53880621fa33c456b663d72960e94f2e05f9ec4f7965 resolver.patch +f60c89076bbc458e2e38d9dad26027f9604179fd59e0c2b988a86340b9ef78a4c346c84ac3e7e4e70badaff69d71edf49d7b9030e5fadb96afde4f977a98c412 resolver.patch f4265df7532625070c51ac43466e3e0f21e696f90c3b6040ef62a21defa7666203ff8219d9c9a5bebc011024aff300fbcbd941cebd0df59c4bc068d8f290221e swiftshader.patch 5b88c065819a44684ceea87239320f8120cfde0dc2f6dd739a007488dea6608c11584c56f3876a062641c9ca6fa82f43877c547ad470766aec31f5151bb2bdc1 create-extra-view-redefinition.patch cf9970ef403ff7a68bf08c0ba5e681eec459fcb1afb6859e5a80f4874f1b9a656377b4540eeb5208ddec570efa206f147e32718c687fa29ca3acc4fde6e8cbe8 chromium-use-alpine-target.patch @@ -361,8 +361,9 @@ cf9970ef403ff7a68bf08c0ba5e681eec459fcb1afb6859e5a80f4874f1b9a656377b4540eeb5208 ad4ddc25df7aa1de2038b7adb86d27679ecdb7e3e16c0eec994e947a08c41504b6fb41166f7868ff5f58ce8191c78800cbb91d259c864840fa5af1d7ba5d43a1 gcc-arm.patch cc67d2a77910663e5a1ad5f66606ee2544867aa1fef25e1a1bc355a8db765d5928edb72f158e6a2ece4195c9b62b875dcdcab4e4055e7611edab405e8cfd658e aarch64-fixes.patch 9b1441fe42421ef9ead86a5143bf997d989bd53a8969cdfdf4e0c45f847efc8c1d127e15fb05e2ef5dbefbb228cbdc2849404d74997ca56265599e12e5efd6e4 elf-arm.patch -e02d4cd916ee5ff0b03fcbd22cbcad35d67338599ed099026fc13053a7e15fbd24335b9cb3961541f8da09bddb114b527230e1cbd274f6cdde012a25421076c7 remove-unsupported-compiler-warnining.patch -fa393a02e799e857a232414b2615d72b8809ea35e95bdbcc7725e496aa21bd231f5c522fa5dcdad6d4694886376784f9a9a1b3698ad730efb4cd96edbd287cd9 chromium-84-mediaalloc.patch 17ed804782df7161e58cb1c125b2cdee22a63008a240da6d3409a7b7a356dc4bd5971aa61217b7aefcfa130e3e12a753bc0fe96882cde842917cf5d6df46083f chromium-size_t-defined.patch -34a6d4b62d825aad028ef2e21184b2de4f98d5c56443adc1402f6f9433bcd2d0c7792bf925e9c28319694338dce46047f9c0bf5862398922d9052ddc47842fcd chromium-85-NearbyShareEncryptedMetadataKey-include.patch -3bdc9bba2e40201dfe579c8c143f23cc3369773d6e2c535727f896bbb4bdd5072e153bc527276ea44cc019ebda456bb5aafd7ce2b8abf4ff1e28ca5edf2a0e6c chromium-85-sim_hash-include.patch" +6bda2c9d622a77d50832b56c36239a2d79eb8dce7825e9cf99b82132d0a6e58ba23e253ec1a71cf6600111afe4c0917d26ba54ab1b6d7ceea5d57bb8e5f8e4c1 check-for-enable-accelerated-video-decode-on-Linux.patch +a239bb09ea79875d821a53f8769ef19997c60012dc474139a21f6818a031e77fe16aed6dee9fb8b9fd9411bbaf9901f674de480012badae51ff17e9bea35fd70 fix-invalid-end-iterator-usage-in-CookieMonster.patch +a8088aea5e27723b34bec232406a743f93cf4ebcaa7b48bda1669d8a8fbc3083eec4d3921c2ab1e002eb443f74205c7f1e73cd0bb303fa20f0f1a1f255dcbdcb only-fall-back-to-the-i965-driver-if-we-re-on-iHD.patch +862fbd405a06e570891d84634a3aff943f0eb1458308211d7ac98d84a9f57c779deba7e91e4b1efbbce15a8b14734dc86ed625165bf3ce8d31ef67d26ba7cecf remove-dead-reloc-in-nonalloc-LD-flags.patch +b425d6ab3da04b6a8d32303d1c39feb9c1be813fac9b38eb53fd5d020ff08b4b3e247897d5b5c5dac3a7a213c5d3eaf3ea2342c97d22089f2c623e28a124f00d xproto-fix-underflow-in-Fp1616ToDouble.patch" diff --git a/community/chromium/check-for-enable-accelerated-video-decode-on-Linux.patch b/community/chromium/check-for-enable-accelerated-video-decode-on-Linux.patch new file mode 100644 index 00000000000..e7d05e84b04 --- /dev/null +++ b/community/chromium/check-for-enable-accelerated-video-decode-on-Linux.patch @@ -0,0 +1,43 @@ +From 54deb9811ca9bd2327def5c05ba6987b8c7a0897 Mon Sep 17 00:00:00 2001 +From: Evangelos Foutras <evangelos@foutrelis.com> +Date: Tue, 29 Sep 2020 01:02:22 +0000 +Subject: [PATCH] Check for enable-accelerated-video-decode on Linux + +Video decoding was being accelerated on Linux even though the newly +added "enable-accelerated-video-decode" flag was not specified. The +chrome://gpu page was misleadingly showing this feature as disabled: + + > Video Decode: Software only. Hardware acceleration disabled + +This change adds a check for --enable-accelerated-video-decode when +considering if video decoding should be activated. (Only on Linux.) + +Extra context: https://crbug.com/1097029#c18 (and also comment 20). + +Bug: 1066176, 1097029 +Change-Id: I534115f5f6ceed0ee3511fcf5c2d0f1dd04b9b7e +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2431434 +Reviewed-by: John Abd-El-Malek <jam@chromium.org> +Reviewed-by: Dale Curtis <dalecurtis@chromium.org> +Commit-Queue: Ted Meyer <tmathmeyer@chromium.org> +Cr-Commit-Position: refs/heads/master@{#811480} +--- + content/renderer/render_thread_impl.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc +index f13c94ddab7..0352f127171 100644 +--- content/renderer/render_thread_impl.cc ++++ content/renderer/render_thread_impl.cc +@@ -1121,7 +1121,11 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl::GetGpuFactories() { + kGpuStreamPriorityMedia); + + const bool enable_video_accelerator = ++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) ++ cmd_line->HasSwitch(switches::kEnableAcceleratedVideoDecode) && ++#else + !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode) && ++#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) + (gpu_channel_host->gpu_feature_info() + .status_values[gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE] == + gpu::kGpuFeatureStatusEnabled); diff --git a/community/chromium/chromium-84-mediaalloc.patch b/community/chromium/chromium-84-mediaalloc.patch deleted file mode 100644 index dba5e697a66..00000000000 --- a/community/chromium/chromium-84-mediaalloc.patch +++ /dev/null @@ -1,44 +0,0 @@ -https://crbug.com/1095962 -From 7f4c7ff6b0f0e74338c885b0d5e5ef80fed597c3 Mon Sep 17 00:00:00 2001 -From: Dan Sanders <sandersd@chromium.org> -Date: Tue, 11 Aug 2020 20:38:03 +0000 -Subject: [PATCH] [media] Set allocation limit compatible with FFmpeg 4.3 - -Previously we set the limit to zero, meaning no limit, but FFmpeg 4.3 -will not allocate at all with that setting. - -Changed to std::numeric_limits<size_t>::max(). - -Bug: 1095962 -Change-Id: I96820c21f794f2814e955ee75ff22dfd31804c29 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2349405 -Reviewed-by: Dale Curtis <dalecurtis@chromium.org> -Commit-Queue: Dan Sanders <sandersd@chromium.org> -Cr-Commit-Position: refs/heads/master@{#796966} ---- - media/base/media.cc | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/media/base/media.cc b/media/base/media.cc -index c282ee49a03..11e99c238ba 100644 ---- media/base/media.cc -+++ media/base/media.cc -@@ -4,6 +4,9 @@ - - #include "media/base/media.h" - -+#include <stdint.h> -+#include <limits> -+ - #include "base/allocator/buildflags.h" - #include "base/command_line.h" - #include "base/macros.h" -@@ -41,7 +44,7 @@ class MediaInitializer { - - #if BUILDFLAG(USE_ALLOCATOR_SHIM) - // Remove allocation limit from ffmpeg, so calls go down to shim layer. -- av_max_alloc(0); -+ av_max_alloc(std::numeric_limits<size_t>::max()); - #endif // BUILDFLAG(USE_ALLOCATOR_SHIM) - - #endif // BUILDFLAG(ENABLE_FFMPEG) diff --git a/community/chromium/chromium-85-NearbyShareEncryptedMetadataKey-include.patch b/community/chromium/chromium-85-NearbyShareEncryptedMetadataKey-include.patch deleted file mode 100644 index f706f3c6b1e..00000000000 --- a/community/chromium/chromium-85-NearbyShareEncryptedMetadataKey-include.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ad1493ec8f5287c5cd10dcb50b741359f7858349 Mon Sep 17 00:00:00 2001 -From: Jose Dapena Paz <jdapena@igalia.com> -Date: Tue, 07 Jul 2020 14:43:40 +0000 -Subject: [PATCH] IWYU: int8_t used in nearby share encrypted metadata key requires cstdint - -Bug: 819294 -Change-Id: I90f88cf35e85a8a0ab1811e5533347d329365b21 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2283508 -Reviewed-by: Alex Chau <alexchau@chromium.org> -Commit-Queue: José Dapena Paz <jdapena@igalia.com> -Cr-Commit-Position: refs/heads/master@{#785727} ---- - -diff --git a/chrome/browser/nearby_sharing/certificates/nearby_share_encrypted_metadata_key.h b/chrome/browser/nearby_sharing/certificates/nearby_share_encrypted_metadata_key.h -index 2893bde..8e1758f 100644 ---- chrome/browser/nearby_sharing/certificates/nearby_share_encrypted_metadata_key.h -+++ chrome/browser/nearby_sharing/certificates/nearby_share_encrypted_metadata_key.h -@@ -5,6 +5,7 @@ - #ifndef CHROME_BROWSER_NEARBY_SHARING_CERTIFICATES_NEARBY_SHARE_ENCRYPTED_METADATA_KEY_H_ - #define CHROME_BROWSER_NEARBY_SHARING_CERTIFICATES_NEARBY_SHARE_ENCRYPTED_METADATA_KEY_H_ - -+#include <cstdint> - #include <vector> - - // Holds the encrypted symmetric key--the key used to encrypt user/device diff --git a/community/chromium/chromium-85-sim_hash-include.patch b/community/chromium/chromium-85-sim_hash-include.patch deleted file mode 100644 index 277a2020a38..00000000000 --- a/community/chromium/chromium-85-sim_hash-include.patch +++ /dev/null @@ -1,25 +0,0 @@ -From c0934033a97b61f3177238ff9f842c5a0f5d8faa Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann <stha09@googlemail.com> -Date: Sun, 28 Jun 2020 18:48:11 +0000 -Subject: [PATCH] IWYU: add includes for uint64_t and std::string - ---- - components/federated_learning/sim_hash.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/components/federated_learning/sim_hash.h b/components/federated_learning/sim_hash.h -index 55030d9..a51dd64 100644 ---- components/federated_learning/sim_hash.h -+++ components/federated_learning/sim_hash.h -@@ -5,6 +5,8 @@ - #ifndef COMPONENTS_FEDERATED_LEARNING_SIM_HASH_H_ - #define COMPONENTS_FEDERATED_LEARNING_SIM_HASH_H_ - -+#include <stdint.h> -+#include <string> - #include <set> - #include <unordered_set> - --- -2.26.2 - diff --git a/community/chromium/fix-invalid-end-iterator-usage-in-CookieMonster.patch b/community/chromium/fix-invalid-end-iterator-usage-in-CookieMonster.patch new file mode 100644 index 00000000000..7494dc9b7c3 --- /dev/null +++ b/community/chromium/fix-invalid-end-iterator-usage-in-CookieMonster.patch @@ -0,0 +1,78 @@ +From 53478caee862624fc6d73516f8d64253854b146f Mon Sep 17 00:00:00 2001 +From: Piotr Tworek <ptworek@vewd.com> +Date: Mon, 31 Aug 2020 21:03:58 +0000 +Subject: [PATCH] Fix invalid "end" iterator usage in CookieMonster. + +Commit 229623d76e8baf714c8569c9f4efc5de266cef8b has introduced the following +code in cookie_monster.cc. + +// If this is the first cookie in |cookies_| with this key, increment the +// |num_keys_| counter. +bool different_prev = + inserted == cookies_.begin() || std::prev(inserted)->first != key; +bool different_next = + inserted == cookies_.end() || std::next(inserted)->first != key; +if (different_prev && different_next) + ++num_keys_; + +The "inserted" iterator is something that has been returned from +std::multimap::insert. At first glance it looks reasonable. The code +tries to determine if there are already similar elements with the same +key in the map. Unfortunately the expression calculating the value of +different_next can potentially use the end iterator to the map. The +"inserted == cookies_.end()" part of the expression will always evaluate +to false since the newly inserted element has to be in the map and +cookies_.end() points to the first element outside the map. If the +inserted happens to be the last element in the map the second part of +the expression will grab the end iterator by calling std::next(inserted) +and then will try to use it leading to invalid memory access. + +Given the fact that cookies_ is a std::multimap we should not even need +to calculate the value of different_next. It should always be true. + + "If the container has elements with equivalent key, inserts at the + upper bound of that range.(since C++11)" + +See: https://en.cppreference.com/w/cpp/container/multimap/insert + +Bug: 1120240 +Change-Id: I8928c294ac4daf72349a2331b31b017c1d015da0 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368872 +Reviewed-by: Maksim Orlovich <morlovich@chromium.org> +Commit-Queue: Piotr Tworek <ptworek@vewd.com> +Cr-Commit-Position: refs/heads/master@{#803260} +--- + net/cookies/cookie_monster.cc | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc +index 265deed0e52..140b61a81dc 100644 +--- net/cookies/cookie_monster.cc ++++ net/cookies/cookie_monster.cc +@@ -1151,9 +1151,14 @@ CookieMonster::CookieMap::iterator CookieMonster::InternalInsertCookie( + // |num_keys_| counter. + bool different_prev = + inserted == cookies_.begin() || std::prev(inserted)->first != key; +- bool different_next = +- inserted == cookies_.end() || std::next(inserted)->first != key; +- if (different_prev && different_next) ++ // According to std::multiqueue documentation: ++ // "If the container has elements with equivalent key, inserts at the upper ++ // bound of that range. (since C++11)" ++ // This means that "inserted" iterator either points to the last element in ++ // the map, or the element succeeding it has to have different key. ++ DCHECK(std::next(inserted) == cookies_.end() || ++ std::next(inserted)->first != key); ++ if (different_prev) + ++num_keys_; + + return inserted; +@@ -1381,7 +1386,7 @@ void CookieMonster::InternalDeleteCookie(CookieMap::iterator it, + bool different_prev = + it == cookies_.begin() || std::prev(it)->first != it->first; + bool different_next = +- it == cookies_.end() || std::next(it)->first != it->first; ++ std::next(it) == cookies_.end() || std::next(it)->first != it->first; + if (different_prev && different_next) + --num_keys_; + diff --git a/community/chromium/musl-fixes.patch b/community/chromium/musl-fixes.patch index cad14f3b7eb..8699ba981ad 100644 --- a/community/chromium/musl-fixes.patch +++ b/community/chromium/musl-fixes.patch @@ -1,6 +1,6 @@ --- ./third_party/lss/linux_syscall_support.h.orig +++ ./third_party/lss/linux_syscall_support.h -@@ -139,11 +139,13 @@ +@@ -139,12 +139,14 @@ */ #pragma push_macro("stat64") #pragma push_macro("fstat64") @@ -8,15 +8,16 @@ #pragma push_macro("lstat64") #pragma push_macro("pread64") #pragma push_macro("pwrite64") + #pragma push_macro("getdents64") #undef stat64 #undef fstat64 +#undef fstatat64 #undef lstat64 #undef pread64 #undef pwrite64 -@@ -1244,6 +1246,12 @@ - #ifndef __NR_fallocate - #define __NR_fallocate 285 +@@ -1258,6 +1260,12 @@ + #ifndef __NR_getrandom + #define __NR_getrandom 318 #endif + +#undef __NR_pread @@ -27,7 +28,7 @@ /* End of x86-64 definitions */ #elif defined(__mips__) #if _MIPS_SIM == _MIPS_SIM_ABI32 -@@ -4520,6 +4528,7 @@ +@@ -4545,6 +4553,7 @@ * corresponding #pragma push_macro near the top of this file. */ #pragma pop_macro("stat64") #pragma pop_macro("fstat64") @@ -35,6 +36,7 @@ #pragma pop_macro("lstat64") #pragma pop_macro("pread64") #pragma pop_macro("pwrite64") + --- ./sandbox/linux/suid/process_util.h.orig +++ ./sandbox/linux/suid/process_util.h @@ -11,6 +11,14 @@ diff --git a/community/chromium/musl-sandbox.patch b/community/chromium/musl-sandbox.patch index e9f848aafde..4fe0098cd2b 100644 --- a/community/chromium/musl-sandbox.patch +++ b/community/chromium/musl-sandbox.patch @@ -157,9 +157,9 @@ index b0ae0a2..8b12029 100644 diff --git a/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc ./services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc index a85c0ea..715aa1e 100644 ---- a/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc -+++ ./services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc -@@ -93,11 +93,11 @@ ResultExpr RendererProcessPolicy::EvaluateSyscall(int sysno) const { +--- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc ++++ ./sandbox/policy/linux/bpf_renderer_policy_linux.cc +@@ -93,11 +93,11 @@ case __NR_sysinfo: case __NR_times: case __NR_uname: @@ -170,6 +170,7 @@ index a85c0ea..715aa1e 100644 case __NR_sched_setscheduler: + return Allow(); + case __NR_sched_getaffinity: - return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno); + return RestrictSchedTarget(GetPolicyPid(), sysno); case __NR_prlimit64: // See crbug.com/662450 and setrlimit comment above. + diff --git a/community/chromium/only-fall-back-to-the-i965-driver-if-we-re-on-iHD.patch b/community/chromium/only-fall-back-to-the-i965-driver-if-we-re-on-iHD.patch new file mode 100644 index 00000000000..5c517e4a8eb --- /dev/null +++ b/community/chromium/only-fall-back-to-the-i965-driver-if-we-re-on-iHD.patch @@ -0,0 +1,139 @@ +From fbd756ab55f9351165f923b0411c31dd71319c78 Mon Sep 17 00:00:00 2001 +From: Ted Meyer <tmathmeyer@chromium.org> +Date: Wed, 16 Sep 2020 17:42:03 +0000 +Subject: [PATCH] Only fall back to the i965 driver if we're on iHD + +I got my hands on an old AMD laptop, and the gallium driver worked very +well and was saving power even at 720p, so there's no reason to block +that for now. + +Bug: 1116703 +Change-Id: Ib15bc2b93f33e99adad7569dd825e167b503a0ea +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2409967 +Commit-Queue: Ted Meyer <tmathmeyer@chromium.org> +Reviewed-by: Andres Calderon Jaramillo <andrescj@chromium.org> +Cr-Commit-Position: refs/heads/master@{#807550} +--- + media/gpu/vaapi/vaapi_wrapper.cc | 73 ++++++++++++++++++++------------ + 1 file changed, 47 insertions(+), 26 deletions(-) + +diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc +index 2ad0b997e56..e30d1dfb73b 100644 +--- media/gpu/vaapi/vaapi_wrapper.cc ++++ media/gpu/vaapi/vaapi_wrapper.cc +@@ -409,6 +409,8 @@ class VADisplayState { + + // Implementation of Initialize() called only once. + bool InitializeOnce() EXCLUSIVE_LOCKS_REQUIRED(va_lock_); ++ bool InitializeVaDisplay_Locked() EXCLUSIVE_LOCKS_REQUIRED(va_lock_); ++ bool InitializeVaDriver_Locked() EXCLUSIVE_LOCKS_REQUIRED(va_lock_); + + int refcount_ GUARDED_BY(va_lock_); + +@@ -472,11 +474,7 @@ bool VADisplayState::Initialize() { + return success; + } + +-bool VADisplayState::InitializeOnce() { +- static_assert( +- VA_MAJOR_VERSION >= 2 || (VA_MAJOR_VERSION == 1 && VA_MINOR_VERSION >= 1), +- "Requires VA-API >= 1.1.0"); +- ++bool VADisplayState::InitializeVaDisplay_Locked() { + switch (gl::GetGLImplementation()) { + case gl::kGLImplementationEGLGLES2: + va_display_ = vaGetDisplayDRM(drm_fd_.get()); +@@ -519,25 +517,10 @@ bool VADisplayState::InitializeOnce() { + return false; + } + +- // Set VA logging level and driver name, unless already set. +- constexpr char libva_log_level_env[] = "LIBVA_MESSAGING_LEVEL"; +- std::unique_ptr<base::Environment> env(base::Environment::Create()); +- if (!env->HasVar(libva_log_level_env)) +- env->SetVar(libva_log_level_env, "1"); +- +-#if defined(USE_X11) +- if (gl::GetGLImplementation() == gl::kGLImplementationEGLANGLE) { +- DCHECK(!features::IsUsingOzonePlatform()); +- constexpr char libva_driver_impl_env[] = "LIBVA_DRIVER_NAME"; +- // TODO(crbug/1116703) The libva intel-media driver has a known segfault in +- // vaPutSurface, so until this is fixed, fall back to the i965 driver. There +- // is discussion of the issue here: +- // https://github.com/intel/media-driver/issues/818 +- if (!env->HasVar(libva_driver_impl_env)) +- env->SetVar(libva_driver_impl_env, "i965"); +- } +-#endif // USE_X11 ++ return true; ++} + ++bool VADisplayState::InitializeVaDriver_Locked() { + // The VAAPI version. + int major_version, minor_version; + VAStatus va_res = vaInitialize(va_display_, &major_version, &minor_version); +@@ -545,9 +528,6 @@ bool VADisplayState::InitializeOnce() { + LOG(ERROR) << "vaInitialize failed: " << vaErrorStr(va_res); + return false; + } +- +- va_initialized_ = true; +- + const std::string va_vendor_string = vaQueryVendorString(va_display_); + DLOG_IF(WARNING, va_vendor_string.empty()) + << "Vendor string empty or error reading."; +@@ -555,6 +535,8 @@ bool VADisplayState::InitializeOnce() { + << va_vendor_string; + implementation_type_ = VendorStringToImplementationType(va_vendor_string); + ++ va_initialized_ = true; ++ + // The VAAPI version is determined from what is loaded on the system by + // calling vaInitialize(). Since the libva is now ABI-compatible, relax the + // version check which helps in upgrading the libva, without breaking any +@@ -571,6 +553,45 @@ bool VADisplayState::InitializeOnce() { + return true; + } + ++bool VADisplayState::InitializeOnce() { ++ static_assert( ++ VA_MAJOR_VERSION >= 2 || (VA_MAJOR_VERSION == 1 && VA_MINOR_VERSION >= 1), ++ "Requires VA-API >= 1.1.0"); ++ ++ // Set VA logging level, unless already set. ++ constexpr char libva_log_level_env[] = "LIBVA_MESSAGING_LEVEL"; ++ std::unique_ptr<base::Environment> env(base::Environment::Create()); ++ if (!env->HasVar(libva_log_level_env)) ++ env->SetVar(libva_log_level_env, "1"); ++ ++ if (!InitializeVaDisplay_Locked() || !InitializeVaDriver_Locked()) ++ return false; ++ ++#if defined(USE_X11) ++ if (gl::GetGLImplementation() == gl::kGLImplementationEGLANGLE && ++ implementation_type_ == VAImplementation::kIntelIHD) { ++ DCHECK(!features::IsUsingOzonePlatform()); ++ constexpr char libva_driver_impl_env[] = "LIBVA_DRIVER_NAME"; ++ // TODO(crbug/1116703) The libva intel-media driver has a known segfault in ++ // vaPutSurface, so until this is fixed, fall back to the i965 driver. There ++ // is discussion of the issue here: ++ // https://github.com/intel/media-driver/issues/818 ++ if (!env->HasVar(libva_driver_impl_env)) ++ env->SetVar(libva_driver_impl_env, "i965"); ++ ++ // Re-initialize with the new driver. ++ va_display_ = nullptr; ++ va_initialized_ = false; ++ implementation_type_ = VAImplementation::kInvalid; ++ ++ if (!InitializeVaDisplay_Locked() || !InitializeVaDriver_Locked()) ++ return false; ++ } ++#endif // USE_X11 ++ ++ return true; ++} ++ + VAStatus VADisplayState::Deinitialize() { + base::AutoLock auto_lock(va_lock_); + VAStatus va_res = VA_STATUS_SUCCESS; diff --git a/community/chromium/remove-dead-reloc-in-nonalloc-LD-flags.patch b/community/chromium/remove-dead-reloc-in-nonalloc-LD-flags.patch new file mode 100644 index 00000000000..4ad4f6e23bb --- /dev/null +++ b/community/chromium/remove-dead-reloc-in-nonalloc-LD-flags.patch @@ -0,0 +1,37 @@ +From 74b0cb5b86f7d7f8f7c1172d85b09096bef147b7 Mon Sep 17 00:00:00 2001 +From: Daniel Nicoara <dnicoara@chromium.org> +Date: Thu, 24 Sep 2020 02:34:24 +0000 +Subject: [PATCH] Remove dead-reloc-in-nonalloc LD flags + +Breakpad change landed. Revert workaround. + +Bug: 1105559 +Test: components/crash/content/tools/generate_breakpad_symbols.py --build-dir=out/andrd --binary=out/andrd/lib.unstripped/libcontent_shell_content_view.so --symbols-dir=/tmp/foo --platform=android +Change-Id: I519534002898a97b15a57b9b87ac78ef3f216dee +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2427349 +Commit-Queue: Nico Weber <thakis@chromium.org> +Reviewed-by: Nico Weber <thakis@chromium.org> +Cr-Commit-Position: refs/heads/master@{#810066} +--- + build/config/compiler/BUILD.gn | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn +index aa9eca20bd2..42839cfba3f 100644 +--- build/config/compiler/BUILD.gn ++++ build/config/compiler/BUILD.gn +@@ -396,14 +396,6 @@ config("compiler") { + "-Wl,--as-needed", + ] + } +- if (use_lld && !is_chromeos_device) { +- # TODO(thakis): Fix dump_syms to not need this and then remove it, +- # https://crbug.com/1105559 +- ldflags += [ +- "-Wl,-z,dead-reloc-in-nonalloc=*=0", +- "-Wl,-z,dead-reloc-in-nonalloc=.debug_ranges=1", +- ] +- } + } + + # Linux-specific compiler flags setup. diff --git a/community/chromium/remove-unsupported-compiler-warnining.patch b/community/chromium/remove-unsupported-compiler-warnining.patch deleted file mode 100644 index 4b6af9e6ca3..00000000000 --- a/community/chromium/remove-unsupported-compiler-warnining.patch +++ /dev/null @@ -1,13 +0,0 @@ -GCC doesn't know this option ---- build/config/compiler/BUILD.gn.orig -+++ build/config/compiler/BUILD.gn -@@ -1495,9 +1495,6 @@ - - # TODO(https://crbug.com/1028110): Evaluate and possible enable. - "-Wno-deprecated-copy", -- -- # TODO(https://crbug.com/1050281): Clean up, enable. -- "-Wno-non-c-typedef-for-linkage", - ] - - cflags_c += [ diff --git a/community/chromium/resolver.patch b/community/chromium/resolver.patch index 18974790fae..e9f9f7b6a9a 100644 --- a/community/chromium/resolver.patch +++ b/community/chromium/resolver.patch @@ -4,7 +4,7 @@ #include "net/dns/dns_reloader.h" --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ +-#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \ - !defined(OS_ANDROID) && !defined(OS_FUCHSIA) +#if defined(__GLIBC__) @@ -12,13 +12,13 @@ --- ./net/dns/host_resolver_manager.cc +++ ./net/dns/host_resolver_manager.cc -@@ -2747,8 +2747,7 @@ +@@ -2779,8 +2779,7 @@ NetworkChangeNotifier::AddConnectionTypeObserver(this); if (system_dns_config_notifier_) system_dns_config_notifier_->AddObserver(this); --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ +-#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \ - !defined(OS_ANDROID) -+#if defined(OS_POSIX) && defined(__GLIBC__) ++#if defined(__GLIBC__) EnsureDnsReloaderInit(); #endif @@ -28,7 +28,7 @@ base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, base::BlockingType::WILL_BLOCK); --#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ +-#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \ - !defined(OS_ANDROID) && !defined(OS_FUCHSIA) +#if defined(__GLIBC__) DnsReloaderMaybeReload(); diff --git a/community/chromium/xproto-fix-underflow-in-Fp1616ToDouble.patch b/community/chromium/xproto-fix-underflow-in-Fp1616ToDouble.patch new file mode 100644 index 00000000000..00300a4a919 --- /dev/null +++ b/community/chromium/xproto-fix-underflow-in-Fp1616ToDouble.patch @@ -0,0 +1,37 @@ +From 5ade494a9966c7a9675af86dc42aca62fb4d806d Mon Sep 17 00:00:00 2001 +From: Tom Anderson <thomasanderson@chromium.org> +Date: Wed, 21 Oct 2020 22:02:35 +0000 +Subject: [PATCH] [XProto] Fix underflow in Fp1616ToDouble + +x11::Input::Fp1616 should be treated as a signed integer, otherwise +-1 will underflow to 65535. When dragging a scrollbar, this would +cause the scrollbar to snap to the bottom when the cursor is dragged +above the window's y=0 coordinate. Verified that the issue is fixed +after this CL. + +BUG=1139623,1136352 +R=sky + +Change-Id: Ie318006ceadde9b9ce3e267fb453ddeba0e81da0 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485620 +Auto-Submit: Thomas Anderson <thomasanderson@chromium.org> +Commit-Queue: Scott Violet <sky@chromium.org> +Reviewed-by: Scott Violet <sky@chromium.org> +Cr-Commit-Position: refs/heads/master@{#819538} +--- + ui/events/x/events_x_utils.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ui/events/x/events_x_utils.cc b/ui/events/x/events_x_utils.cc +index 3010db5f40c..856dfb221e7 100644 +--- ui/events/x/events_x_utils.cc ++++ ui/events/x/events_x_utils.cc +@@ -376,7 +376,7 @@ base::TimeTicks TimeTicksFromXEvent(const x11::Event& xev) { + + // This is ported from libxi's FP1616toDBL in XExtInt.c + double Fp1616ToDouble(x11::Input::Fp1616 x) { +- auto x32 = static_cast<uint32_t>(x); ++ auto x32 = static_cast<int32_t>(x); + return x32 * 1.0 / (1 << 16); + } + |