AImageReader-CFI-crash-mitigations.patch
This commit is contained in:
parent
69042f6c77
commit
a76f1c0d0f
1 changed files with 21 additions and 25 deletions
|
@ -18,22 +18,10 @@ crashes on Android 9 and 10 (at different code locations).
|
|||
See discussions at:
|
||||
* https://github.com/bromite/bromite/issues/445
|
||||
* https://github.com/bromite/bromite/issues/814
|
||||
FILE:AImageReader-CFI-crash-mitigations.patch
|
||||
---
|
||||
base/android/android_image_reader_compat.cc | 8 +++++++-
|
||||
base/android/android_image_reader_compat.h | 4 ++++
|
||||
chrome/browser/flag-metadata.json | 2 +-
|
||||
gpu/config/gpu_driver_bug_list.json | 16 ++++++++++++++++
|
||||
gpu/config/gpu_finch_features.cc | 11 ++++++++++-
|
||||
gpu/config/gpu_finch_features.h | 1 +
|
||||
gpu/config/gpu_util.cc | 8 ++++++++
|
||||
gpu/config/gpu_workaround_list.txt | 1 +
|
||||
gpu/ipc/service/gpu_init.cc | 5 +++++
|
||||
gpu/ipc/service/stream_texture_android.cc | 11 ++++++++++-
|
||||
media/base/media_switches.cc | 4 ++++
|
||||
media/base/media_switches.h | 1 +
|
||||
12 files changed, 68 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/base/android/android_image_reader_compat.cc b/base/android/android_image_reader_compat.cc
|
||||
index 489344676c..c2cf1ccb66 100644
|
||||
--- a/base/android/android_image_reader_compat.cc
|
||||
+++ b/base/android/android_image_reader_compat.cc
|
||||
@@ -23,6 +23,8 @@
|
||||
|
@ -60,6 +48,7 @@ diff --git a/base/android/android_image_reader_compat.cc b/base/android/android_
|
|||
|
||||
AndroidImageReader::AndroidImageReader() : is_supported_(LoadFunctions()) {}
|
||||
diff --git a/base/android/android_image_reader_compat.h b/base/android/android_image_reader_compat.h
|
||||
index 44f73a3c99..7f0414839d 100644
|
||||
--- a/base/android/android_image_reader_compat.h
|
||||
+++ b/base/android/android_image_reader_compat.h
|
||||
@@ -22,6 +22,9 @@ class BASE_EXPORT AndroidImageReader {
|
||||
|
@ -81,18 +70,20 @@ diff --git a/base/android/android_image_reader_compat.h b/base/android/android_i
|
|||
|
||||
AndroidImageReader();
|
||||
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
|
||||
index e2d0b182a8..83c117592a 100644
|
||||
--- a/chrome/browser/flag-metadata.json
|
||||
+++ b/chrome/browser/flag-metadata.json
|
||||
@@ -1712,7 +1712,7 @@
|
||||
@@ -1772,7 +1772,7 @@
|
||||
{
|
||||
"name": "enable-image-reader",
|
||||
"owners": [ "vikassoni", "khushalsagar" ],
|
||||
"owners": [ "vikassoni", "liberato" ],
|
||||
- "expiry_milestone": 90
|
||||
+ "expiry_milestone": -1
|
||||
},
|
||||
{
|
||||
"name": "enable-immersive-fullscreen-toolbar",
|
||||
diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_list.json
|
||||
index e0131b61b3..f7cc1dfdb5 100644
|
||||
--- a/gpu/config/gpu_driver_bug_list.json
|
||||
+++ b/gpu/config/gpu_driver_bug_list.json
|
||||
@@ -3254,6 +3254,22 @@
|
||||
|
@ -119,6 +110,7 @@ diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_lis
|
|||
"id": 336,
|
||||
"cr_bugs": [625785],
|
||||
diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc
|
||||
index a93d6d6739..787129ad72 100644
|
||||
--- a/gpu/config/gpu_finch_features.cc
|
||||
+++ b/gpu/config/gpu_finch_features.cc
|
||||
@@ -38,6 +38,11 @@ bool FieldIsInBlocklist(const char* current_value, std::string blocklist_str) {
|
||||
|
@ -132,7 +124,7 @@ diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc
|
|||
+
|
||||
// Used to limit GL version to 2.0 for skia raster on Android.
|
||||
const base::Feature kUseGles2ForOopR{"UseGles2ForOopR",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
@@ -55,7 +60,11 @@ const base::FeatureParam<std::string> kAndroidSurfaceControlBlocklist{
|
||||
|
||||
// Use AImageReader for MediaCodec and MediaPlyer on android.
|
||||
|
@ -147,6 +139,7 @@ diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc
|
|||
// If webview-draw-functor-uses-vulkan is set, use vulkan for composite and
|
||||
// raster.
|
||||
diff --git a/gpu/config/gpu_finch_features.h b/gpu/config/gpu_finch_features.h
|
||||
index 350a3f4cb0..1a6d111e8e 100644
|
||||
--- a/gpu/config/gpu_finch_features.h
|
||||
+++ b/gpu/config/gpu_finch_features.h
|
||||
@@ -17,6 +17,7 @@ namespace features {
|
||||
|
@ -158,6 +151,7 @@ diff --git a/gpu/config/gpu_finch_features.h b/gpu/config/gpu_finch_features.h
|
|||
GPU_EXPORT extern const base::Feature kAndroidSurfaceControl;
|
||||
GPU_EXPORT extern const base::Feature kAImageReader;
|
||||
diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
|
||||
index 545f30c233..16d5d770d1 100644
|
||||
--- a/gpu/config/gpu_util.cc
|
||||
+++ b/gpu/config/gpu_util.cc
|
||||
@@ -111,6 +111,9 @@ GpuFeatureStatus GetAndroidSurfaceControlFeatureStatus(
|
||||
|
@ -170,7 +164,7 @@ diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
|
|||
if (!gpu_preferences.enable_android_surface_control)
|
||||
return kGpuFeatureStatusDisabled;
|
||||
|
||||
@@ -327,6 +330,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info) {
|
||||
@@ -316,6 +319,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info) {
|
||||
gpu_feature_info->status_values[GPU_FEATURE_TYPE_ACCELERATED_WEBGL2] =
|
||||
kGpuFeatureStatusBlocklisted;
|
||||
}
|
||||
|
@ -183,6 +177,7 @@ diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
|
|||
|
||||
// Estimates roughly user total disk space by counting in the drives where
|
||||
diff --git a/gpu/config/gpu_workaround_list.txt b/gpu/config/gpu_workaround_list.txt
|
||||
index 551650c275..0526767800 100644
|
||||
--- a/gpu/config/gpu_workaround_list.txt
|
||||
+++ b/gpu/config/gpu_workaround_list.txt
|
||||
@@ -13,6 +13,7 @@ decode_encode_srgb_for_generatemipmap
|
||||
|
@ -194,9 +189,10 @@ diff --git a/gpu/config/gpu_workaround_list.txt b/gpu/config/gpu_workaround_list
|
|||
disable_accelerated_vp8_encode
|
||||
disable_accelerated_vp9_decode
|
||||
diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
|
||||
index fcb2350204..775b973e67 100644
|
||||
--- a/gpu/ipc/service/gpu_init.cc
|
||||
+++ b/gpu/ipc/service/gpu_init.cc
|
||||
@@ -464,6 +464,11 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
|
||||
@@ -477,6 +477,11 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,6 +205,7 @@ diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
|
|||
kGpuFeatureStatusEnabled ||
|
||||
!InitializeVulkan()) {
|
||||
diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_texture_android.cc
|
||||
index beef1941f2..d002ef2a95 100644
|
||||
--- a/gpu/ipc/service/stream_texture_android.cc
|
||||
+++ b/gpu/ipc/service/stream_texture_android.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
|
@ -219,7 +216,7 @@ diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_
|
|||
#include "base/android/scoped_hardware_buffer_fence_sync.h"
|
||||
#include "base/bind.h"
|
||||
#include "base/feature_list.h"
|
||||
@@ -47,7 +48,15 @@ std::unique_ptr<ui::ScopedMakeCurrent> MakeCurrent(
|
||||
@@ -48,7 +49,15 @@ std::unique_ptr<ui::ScopedMakeCurrent> MakeCurrent(
|
||||
}
|
||||
|
||||
TextureOwner::Mode GetTextureOwnerMode() {
|
||||
|
@ -237,9 +234,10 @@ diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_
|
|||
: TextureOwner::Mode::kSurfaceTextureInsecure;
|
||||
}
|
||||
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
|
||||
index be386a63b9..0882270539 100644
|
||||
--- a/media/base/media_switches.cc
|
||||
+++ b/media/base/media_switches.cc
|
||||
@@ -571,6 +571,10 @@ const base::Feature kMediaDrmPreprovisioning{"MediaDrmPreprovisioning",
|
||||
@@ -600,6 +600,10 @@ const base::Feature kMediaDrmPreprovisioning{"MediaDrmPreprovisioning",
|
||||
const base::Feature kMediaDrmPreprovisioningAtStartup{
|
||||
"MediaDrmPreprovisioningAtStartup", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
|
@ -251,9 +249,10 @@ diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
|
|||
// that cannot support SurfaceLayer at the moment.
|
||||
const base::Feature kDisableSurfaceLayerForVideo{
|
||||
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
|
||||
index 9f17fdc134..5cb69eebbe 100644
|
||||
--- a/media/base/media_switches.h
|
||||
+++ b/media/base/media_switches.h
|
||||
@@ -194,6 +194,7 @@ MEDIA_EXPORT extern const base::Feature kMediaControlsExpandGesture;
|
||||
@@ -205,6 +205,7 @@ MEDIA_EXPORT extern const base::Feature kMediaControlsExpandGesture;
|
||||
MEDIA_EXPORT extern const base::Feature kMediaDrmPersistentLicense;
|
||||
MEDIA_EXPORT extern const base::Feature kMediaDrmPreprovisioning;
|
||||
MEDIA_EXPORT extern const base::Feature kMediaDrmPreprovisioningAtStartup;
|
||||
|
@ -261,6 +260,3 @@ diff --git a/media/base/media_switches.h b/media/base/media_switches.h
|
|||
MEDIA_EXPORT extern const base::Feature kDisableSurfaceLayerForVideo;
|
||||
MEDIA_EXPORT extern const base::Feature kCanPlayHls;
|
||||
MEDIA_EXPORT extern const base::Feature kPictureInPictureAPI;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue