mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-04-19 22:10:19 +02:00
temporary workaround for citadel
This commit is contained in:
parent
94c9baeb22
commit
99bd5083fd
1 changed files with 4 additions and 3 deletions
|
@ -1049,12 +1049,13 @@ static inline void enforce_init(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
COLD static void handle_camera_bug(void) {
|
COLD static void handle_camera_bug(void) {
|
||||||
const char expected[] = "/vendor/bin/hw/android.hardware.camera.provider@2.4-service_64";
|
char path[256];
|
||||||
char path[sizeof(expected)];
|
|
||||||
if (readlink("/proc/self/exe", path, sizeof(path)) == -1) {
|
if (readlink("/proc/self/exe", path, sizeof(path)) == -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (strcmp(expected, path) == 0) {
|
const char camera_provider[] = "/vendor/bin/hw/android.hardware.camera.provider@2.4-service_64";
|
||||||
|
const char citadel[] = "/vendor/bin/hw/android.hardware.keymaster@4.0-service.citadel";
|
||||||
|
if (strcmp(camera_provider, path) == 0 || strcmp(citadel, path) == 0) {
|
||||||
ro.zero_on_free = false;
|
ro.zero_on_free = false;
|
||||||
ro.purge_slabs = false;
|
ro.purge_slabs = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue