Tweak tweak

Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
Tad 2022-03-16 18:38:30 -04:00
parent a28f43c6a7
commit c9765fc883
3 changed files with 22 additions and 23 deletions

View File

@ -4,22 +4,22 @@ Date: Tue, 15 Mar 2022 22:18:26 -0400
Subject: [PATCH] Expand workaround to all camera executables Subject: [PATCH] Expand workaround to all camera executables
Signed-off-by: Tad <tad@spotco.us> Signed-off-by: Tad <tad@spotco.us>
Change-Id: I23513ec0379bbb10829f989690334e9704fd20e2
--- ---
h_malloc.c | 4 ++-- h_malloc.c | 3 ++-
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/h_malloc.c b/h_malloc.c diff --git a/h_malloc.c b/h_malloc.c
index dbedbd4..ebf5d76 100644 index de693c9..f680fa6 100644
--- a/h_malloc.c --- a/h_malloc.c
+++ b/h_malloc.c +++ b/h_malloc.c
@@ -1068,8 +1068,8 @@ COLD static void handle_bugs(void) { @@ -1058,7 +1058,8 @@ COLD static void handle_bugs(void) {
return;
} }
- const char camera_provider[] = "/vendor/bin/hw/android.hardware.camera.provider@2.4-service_64"; const char camera_provider[] = "/vendor/bin/hw/android.hardware.camera.provider@2.4-service_64";
- if (strcmp(camera_provider, path) == 0) { - if (strcmp(camera_provider, path) == 0) {
+ // Any camera executable on system partition + // Any camera executable on system partition
+ if (strstr(path, "camera") != NULL && (strncmp("/system", path, 7) == 0 || strncmp("/vendor", path, 7) == 0)) { + if (strcmp(camera_provider, path) == 0 || (strstr(path, "camera") != NULL && (strncmp("/system", path, 7) == 0 || strncmp("/vendor", path, 7) == 0))) {
ro.zero_on_free = false; ro.zero_on_free = false;
ro.purge_slabs = false; ro.purge_slabs = false;
ro.region_quarantine_protect = false; ro.region_quarantine_protect = false;

View File

@ -4,22 +4,22 @@ Date: Tue, 15 Mar 2022 22:18:26 -0400
Subject: [PATCH] Expand workaround to all camera executables Subject: [PATCH] Expand workaround to all camera executables
Signed-off-by: Tad <tad@spotco.us> Signed-off-by: Tad <tad@spotco.us>
Change-Id: I23513ec0379bbb10829f989690334e9704fd20e2
--- ---
h_malloc.c | 4 ++-- h_malloc.c | 3 ++-
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/h_malloc.c b/h_malloc.c diff --git a/h_malloc.c b/h_malloc.c
index de693c9..95a6ba3 100644 index de693c9..f680fa6 100644
--- a/h_malloc.c --- a/h_malloc.c
+++ b/h_malloc.c +++ b/h_malloc.c
@@ -1057,8 +1057,8 @@ COLD static void handle_bugs(void) { @@ -1058,7 +1058,8 @@ COLD static void handle_bugs(void) {
return;
} }
- const char camera_provider[] = "/vendor/bin/hw/android.hardware.camera.provider@2.4-service_64"; const char camera_provider[] = "/vendor/bin/hw/android.hardware.camera.provider@2.4-service_64";
- if (strcmp(camera_provider, path) == 0) { - if (strcmp(camera_provider, path) == 0) {
+ // Any camera executable on system partition + // Any camera executable on system partition
+ if (strstr(path, "camera") != NULL && (strncmp("/system", path, 7) == 0 || strncmp("/vendor", path, 7) == 0)) { + if (strcmp(camera_provider, path) == 0 || (strstr(path, "camera") != NULL && (strncmp("/system", path, 7) == 0 || strncmp("/vendor", path, 7) == 0))) {
ro.zero_on_free = false; ro.zero_on_free = false;
ro.purge_slabs = false; ro.purge_slabs = false;
ro.region_quarantine_protect = false; ro.region_quarantine_protect = false;

View File

@ -4,23 +4,22 @@ Date: Tue, 15 Mar 2022 22:18:26 -0400
Subject: [PATCH] Expand workaround to all camera executables Subject: [PATCH] Expand workaround to all camera executables
Signed-off-by: Tad <tad@spotco.us> Signed-off-by: Tad <tad@spotco.us>
Change-Id: I23513ec0379bbb10829f989690334e9704fd20e2
--- ---
h_malloc.c | 5 ++--- h_malloc.c | 3 ++-
1 file changed, 2 insertions(+), 3 deletions(-) 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/h_malloc.c b/h_malloc.c diff --git a/h_malloc.c b/h_malloc.c
index a6e1a7c..662af35 100644 index a6e1a7c..1b574e4 100644
--- a/h_malloc.c --- a/h_malloc.c
+++ b/h_malloc.c +++ b/h_malloc.c
@@ -1068,9 +1068,8 @@ COLD static void handle_bugs(void) { @@ -1070,7 +1070,8 @@ COLD static void handle_bugs(void) {
return;
}
- // Pixel 3, Pixel 3 XL, Pixel 3a and Pixel 3a XL camera provider // Pixel 3, Pixel 3 XL, Pixel 3a and Pixel 3a XL camera provider
- const char camera_provider[] = "/vendor/bin/hw/android.hardware.camera.provider@2.4-service_64"; const char camera_provider[] = "/vendor/bin/hw/android.hardware.camera.provider@2.4-service_64";
- if (strcmp(camera_provider, path) == 0) { - if (strcmp(camera_provider, path) == 0) {
+ // Any camera executable on system partition + // Any camera executable on system partition
+ if (strstr(path, "camera") != NULL && (strncmp("/system", path, 7) == 0 || strncmp("/vendor", path, 7) == 0)) { + if (strcmp(camera_provider, path) == 0 || (strstr(path, "camera") != NULL && (strncmp("/system", path, 7) == 0 || strncmp("/vendor", path, 7) == 0))) {
ro.zero_on_free = false; ro.zero_on_free = false;
ro.purge_slabs = false; ro.purge_slabs = false;
ro.region_quarantine_protect = false; ro.region_quarantine_protect = false;