Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
Tad 2022-03-15 17:07:25 -04:00
parent 181519cf38
commit 1df7c7f1d4
79 changed files with 203 additions and 202 deletions

View File

@ -1,4 +1,4 @@
From 76bf4c46f0090423ead013f02c6b0b4e58b33c95 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 21:05:42 -0400
Subject: [PATCH] constify JNINativeMethod tables

View File

@ -1,4 +1,4 @@
From e4b9b31e6f9ff7eb9d168db6a99a775bf4f669c1 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Thu, 5 Feb 2015 21:53:16 -0500
Subject: [PATCH] add a real explicit_bzero implementation
@ -28,10 +28,10 @@ optimization in the future.
create mode 100644 libc/bionic/explicit_bzero.cpp
diff --git a/libc/Android.bp b/libc/Android.bp
index 26ffc73b66..85a739e4e9 100644
index 5b3495ff2..72a7d9635 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -1329,6 +1329,7 @@ cc_library_static {
@@ -1361,6 +1361,7 @@ cc_library_static {
"bionic/eventfd_read.cpp",
"bionic/eventfd_write.cpp",
"bionic/exec.cpp",
@ -41,7 +41,7 @@ index 26ffc73b66..85a739e4e9 100644
"bionic/fchmodat.cpp",
diff --git a/libc/bionic/explicit_bzero.cpp b/libc/bionic/explicit_bzero.cpp
new file mode 100644
index 0000000000..b06daa1386
index 000000000..b06daa138
--- /dev/null
+++ b/libc/bionic/explicit_bzero.cpp
@@ -0,0 +1,7 @@
@ -53,7 +53,7 @@ index 0000000000..b06daa1386
+ return ptr;
+}
diff --git a/libc/include/string.h b/libc/include/string.h
index 54d5e1c800..5336777773 100644
index 54d5e1c80..533677777 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -56,6 +56,7 @@ void* mempcpy(void* __dst, const void* __src, size_t __n) __INTRODUCED_IN(23);
@ -65,7 +65,7 @@ index 54d5e1c800..5336777773 100644
char* strchr(const char* __s, int __ch) __attribute_pure__;
diff --git a/libc/libc.arm.map b/libc/libc.arm.map
index b0f96a9ffc..28ad4913f6 100644
index b0f96a9ff..28ad4913f 100644
--- a/libc/libc.arm.map
+++ b/libc/libc.arm.map
@@ -330,6 +330,7 @@ LIBC {
@ -77,7 +77,7 @@ index b0f96a9ffc..28ad4913f6 100644
fallocate; # introduced=21
fallocate64; # introduced=21
diff --git a/libc/libc.arm64.map b/libc/libc.arm64.map
index 6b0e415494..ee20108901 100644
index 6b0e41549..ee2010890 100644
--- a/libc/libc.arm64.map
+++ b/libc/libc.arm64.map
@@ -260,6 +260,7 @@ LIBC {
@ -89,7 +89,7 @@ index 6b0e415494..ee20108901 100644
fallocate; # introduced=21
fallocate64; # introduced=21
diff --git a/libc/libc.map.txt b/libc/libc.map.txt
index 85c9a581cb..6c7e3eb368 100644
index 85c9a581c..6c7e3eb36 100644
--- a/libc/libc.map.txt
+++ b/libc/libc.map.txt
@@ -332,6 +332,7 @@ LIBC {
@ -101,7 +101,7 @@ index 85c9a581cb..6c7e3eb368 100644
fallocate; # introduced=21
fallocate64; # introduced=21
diff --git a/libc/libc.mips.map b/libc/libc.mips.map
index 9e760c2422..12faa5d86b 100644
index 9e760c242..12faa5d86 100644
--- a/libc/libc.mips.map
+++ b/libc/libc.mips.map
@@ -328,6 +328,7 @@ LIBC {
@ -113,7 +113,7 @@ index 9e760c2422..12faa5d86b 100644
fallocate; # introduced=21
fallocate64; # introduced=21
diff --git a/libc/libc.mips64.map b/libc/libc.mips64.map
index 6b0e415494..ee20108901 100644
index 6b0e41549..ee2010890 100644
--- a/libc/libc.mips64.map
+++ b/libc/libc.mips64.map
@@ -260,6 +260,7 @@ LIBC {
@ -125,7 +125,7 @@ index 6b0e415494..ee20108901 100644
fallocate; # introduced=21
fallocate64; # introduced=21
diff --git a/libc/libc.x86.map b/libc/libc.x86.map
index 2855f9e22d..8be30d8424 100644
index 2855f9e22..8be30d842 100644
--- a/libc/libc.x86.map
+++ b/libc/libc.x86.map
@@ -326,6 +326,7 @@ LIBC {
@ -137,7 +137,7 @@ index 2855f9e22d..8be30d8424 100644
fallocate; # introduced=21
fallocate64; # introduced=21
diff --git a/libc/libc.x86_64.map b/libc/libc.x86_64.map
index 6b0e415494..ee20108901 100644
index 6b0e41549..ee2010890 100644
--- a/libc/libc.x86_64.map
+++ b/libc/libc.x86_64.map
@@ -260,6 +260,7 @@ LIBC {
@ -149,7 +149,7 @@ index 6b0e415494..ee20108901 100644
fallocate; # introduced=21
fallocate64; # introduced=21
diff --git a/libc/upstream-openbsd/android/include/openbsd-compat.h b/libc/upstream-openbsd/android/include/openbsd-compat.h
index f178149311..929e61eeda 100644
index f17814931..929e61eed 100644
--- a/libc/upstream-openbsd/android/include/openbsd-compat.h
+++ b/libc/upstream-openbsd/android/include/openbsd-compat.h
@@ -65,8 +65,6 @@ extern const char* __progname;

View File

@ -1,4 +1,4 @@
From e9751d3370aa44e6ca77843f7c7a7aac67e5bcc0 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 2 Dec 2015 23:37:28 -0500
Subject: [PATCH] switch pthread_atfork handler allocation to mmap
@ -8,7 +8,7 @@ Subject: [PATCH] switch pthread_atfork handler allocation to mmap
1 file changed, 29 insertions(+), 6 deletions(-)
diff --git a/libc/bionic/pthread_atfork.cpp b/libc/bionic/pthread_atfork.cpp
index 84e511c2e8..651c026df5 100644
index 84e511c2e..651c026df 100644
--- a/libc/bionic/pthread_atfork.cpp
+++ b/libc/bionic/pthread_atfork.cpp
@@ -29,8 +29,11 @@

View File

@ -1,4 +1,4 @@
From 83cd86d0d522c64726dac41614c00f2534044f73 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Thu, 3 Dec 2015 12:58:31 -0500
Subject: [PATCH] add memory protection for pthread_atfork handlers
@ -8,7 +8,7 @@ Subject: [PATCH] add memory protection for pthread_atfork handlers
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/libc/bionic/pthread_atfork.cpp b/libc/bionic/pthread_atfork.cpp
index 651c026df5..91c5233f73 100644
index 651c026df..91c5233f7 100644
--- a/libc/bionic/pthread_atfork.cpp
+++ b/libc/bionic/pthread_atfork.cpp
@@ -47,6 +47,7 @@ struct atfork_t {

View File

@ -1,4 +1,4 @@
From 1ebb1654556ed74d63e43fe7dbbceae5b20f569f Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sat, 7 Feb 2015 20:14:24 -0500
Subject: [PATCH] add memory protection for at_quick_exit
@ -8,7 +8,7 @@ Subject: [PATCH] add memory protection for at_quick_exit
1 file changed, 36 insertions(+), 5 deletions(-)
diff --git a/libc/upstream-freebsd/lib/libc/stdlib/quick_exit.c b/libc/upstream-freebsd/lib/libc/stdlib/quick_exit.c
index ef8cdb1b40..b23d8642ae 100644
index ef8cdb1b4..b23d8642a 100644
--- a/libc/upstream-freebsd/lib/libc/stdlib/quick_exit.c
+++ b/libc/upstream-freebsd/lib/libc/stdlib/quick_exit.c
@@ -28,6 +28,10 @@

View File

@ -1,4 +1,4 @@
From 488ba483cf9ad195fda33b3250115a308bf03f75 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 27 Jan 2016 18:02:15 -0500
Subject: [PATCH] add XOR mangling mitigation for thread-local dtors
@ -10,7 +10,7 @@ Subject: [PATCH] add XOR mangling mitigation for thread-local dtors
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/libc/bionic/__cxa_thread_atexit_impl.cpp b/libc/bionic/__cxa_thread_atexit_impl.cpp
index 99077c101d..74608513ef 100644
index 99077c101..74608513e 100644
--- a/libc/bionic/__cxa_thread_atexit_impl.cpp
+++ b/libc/bionic/__cxa_thread_atexit_impl.cpp
@@ -13,15 +13,17 @@
@ -51,7 +51,7 @@ index 99077c101d..74608513ef 100644
__loader_remove_thread_local_dtor(current->dso_handle);
}
diff --git a/libc/bionic/libc_init_common.cpp b/libc/bionic/libc_init_common.cpp
index 2396c36782..47555c598a 100644
index 2396c3678..47555c598 100644
--- a/libc/bionic/libc_init_common.cpp
+++ b/libc/bionic/libc_init_common.cpp
@@ -45,6 +45,7 @@
@ -71,7 +71,7 @@ index 2396c36782..47555c598a 100644
}
diff --git a/libc/private/bionic_globals.h b/libc/private/bionic_globals.h
index 94dd7e8590..0361f4ed72 100644
index 94dd7e859..0361f4ed7 100644
--- a/libc/private/bionic_globals.h
+++ b/libc/private/bionic_globals.h
@@ -37,6 +37,7 @@

View File

@ -1,4 +1,4 @@
From f9351d884bddaf126a8fc45c8cb14e7ca2cf463b Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Fri, 29 Jan 2016 20:20:09 -0500
Subject: [PATCH] use a better pthread_attr junk filling pattern
@ -9,7 +9,7 @@ Guarantee that junk filled pointers will fault, at least on pure 64-bit.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/bionic/pthread_attr.cpp b/libc/bionic/pthread_attr.cpp
index 93177f15c8..692bcf162b 100644
index 93177f15c..692bcf162 100644
--- a/libc/bionic/pthread_attr.cpp
+++ b/libc/bionic/pthread_attr.cpp
@@ -53,7 +53,7 @@ int pthread_attr_init(pthread_attr_t* attr) {

View File

@ -1,4 +1,4 @@
From 85e5bca0a525a1cb8142aa092286ae3424983dd5 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Fri, 11 Dec 2015 01:52:08 -0500
Subject: [PATCH] move pthread_internal_t out of the stack mapping
@ -11,7 +11,7 @@ Subject: [PATCH] move pthread_internal_t out of the stack mapping
3 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp
index 8825c6f240..e70af04094 100644
index 8825c6f24..e70af0409 100644
--- a/libc/bionic/pthread_create.cpp
+++ b/libc/bionic/pthread_create.cpp
@@ -191,7 +191,6 @@ static int __allocate_thread(pthread_attr_t* attr, pthread_internal_t** threadp,
@ -63,7 +63,7 @@ index 8825c6f240..e70af04094 100644
strerror(clone_errno));
return clone_errno;
diff --git a/libc/bionic/pthread_exit.cpp b/libc/bionic/pthread_exit.cpp
index f1b65fdf7a..fe26696baf 100644
index f1b65fdf7..fe26696ba 100644
--- a/libc/bionic/pthread_exit.cpp
+++ b/libc/bionic/pthread_exit.cpp
@@ -118,7 +118,8 @@ void pthread_exit(void* return_value) {
@ -88,7 +88,7 @@ index f1b65fdf7a..fe26696baf 100644
}
diff --git a/libc/bionic/pthread_internal.cpp b/libc/bionic/pthread_internal.cpp
index 829194cc71..b5de202487 100644
index 829194cc7..b5de20248 100644
--- a/libc/bionic/pthread_internal.cpp
+++ b/libc/bionic/pthread_internal.cpp
@@ -91,6 +91,7 @@ static void __pthread_internal_free(pthread_internal_t* thread) {

View File

@ -1,4 +1,4 @@
From a3a22a63d2cf265d5edc8cf613484e13fd03e19d Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 8 Feb 2015 01:18:54 -0500
Subject: [PATCH] replace brk and sbrk with stubs
@ -12,7 +12,7 @@ malloc.
1 file changed, 8 insertions(+), 40 deletions(-)
diff --git a/libc/bionic/brk.cpp b/libc/bionic/brk.cpp
index e1a4b05345..ef93055139 100644
index e1a4b0534..ef9305513 100644
--- a/libc/bionic/brk.cpp
+++ b/libc/bionic/brk.cpp
@@ -29,48 +29,16 @@

View File

@ -1,4 +1,4 @@
From 7444dbc3cf11285fb94d5d00913016afd7b0dff2 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Mon, 4 Mar 2019 04:26:04 -0500
Subject: [PATCH] use blocking getrandom and avoid urandom fallback
@ -8,7 +8,7 @@ Subject: [PATCH] use blocking getrandom and avoid urandom fallback
1 file changed, 2 insertions(+), 28 deletions(-)
diff --git a/libc/bionic/getentropy.cpp b/libc/bionic/getentropy.cpp
index 2c6e417b87..ad49039af1 100644
index 2c6e417b8..ad49039af 100644
--- a/libc/bionic/getentropy.cpp
+++ b/libc/bionic/getentropy.cpp
@@ -31,26 +31,6 @@

View File

@ -1,4 +1,4 @@
From dcd3b72ac9cac79d4322a17be150c46f65ffb3cd Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Mon, 19 Sep 2016 07:57:43 -0400
Subject: [PATCH] fix undefined out-of-bounds accesses in sched.h
@ -8,7 +8,7 @@ Subject: [PATCH] fix undefined out-of-bounds accesses in sched.h
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libc/include/sched.h b/libc/include/sched.h
index de6969f863..fd333a023a 100644
index de6969f86..fd333a023 100644
--- a/libc/include/sched.h
+++ b/libc/include/sched.h
@@ -71,7 +71,10 @@ int setns(int __fd, int __ns_type) __INTRODUCED_IN(21);

View File

@ -1,4 +1,4 @@
From 543e1df342cdd8720ce967d990ca28a2b9c26af2 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sat, 19 Nov 2016 09:56:14 -0500
Subject: [PATCH] stop implicitly marking mappings as mergeable
@ -8,7 +8,7 @@ Subject: [PATCH] stop implicitly marking mappings as mergeable
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/libc/bionic/mmap.cpp b/libc/bionic/mmap.cpp
index 35033199ae..c081068928 100644
index 35033199a..c08106892 100644
--- a/libc/bionic/mmap.cpp
+++ b/libc/bionic/mmap.cpp
@@ -39,8 +39,6 @@ extern "C" void* __mmap2(void*, size_t, int, int, int, size_t);

View File

@ -1,4 +1,4 @@
From 611e5691f7e48aba8529e49b22885021f322b31e Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sat, 16 Jul 2016 23:55:16 -0400
Subject: [PATCH] replace VLA formatting buffer with dprintf
@ -8,7 +8,7 @@ Subject: [PATCH] replace VLA formatting buffer with dprintf
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/libc/bionic/bionic_systrace.cpp b/libc/bionic/bionic_systrace.cpp
index bac3d88021..076e10dbfb 100644
index bac3d8802..076e10dbf 100644
--- a/libc/bionic/bionic_systrace.cpp
+++ b/libc/bionic/bionic_systrace.cpp
@@ -26,8 +26,6 @@

View File

@ -1,4 +1,4 @@
From 8de97ce864cc781d077160a8efd4902d4338078c Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Fri, 17 Jul 2015 21:32:05 -0400
Subject: [PATCH] increase default pthread stack to 8MiB on 64-bit
@ -8,10 +8,10 @@ Subject: [PATCH] increase default pthread stack to 8MiB on 64-bit
1 file changed, 4 insertions(+)
diff --git a/libc/bionic/pthread_internal.h b/libc/bionic/pthread_internal.h
index 9bdf9cdf0c..d59a545459 100644
index 18f5aee2c..644db9756 100644
--- a/libc/bionic/pthread_internal.h
+++ b/libc/bionic/pthread_internal.h
@@ -164,7 +164,11 @@ __LIBC_HIDDEN__ void pthread_key_clean_all(void);
@@ -163,7 +163,11 @@ __LIBC_HIDDEN__ void pthread_key_clean_all(void);
// stack overflows, we subtracted the same amount we were using there
// from the default thread stack size. This should keep memory usage
// roughly constant.

View File

@ -1,4 +1,4 @@
From a47571704245e5514795f35bbcffdb8a533e738a Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sat, 1 Oct 2016 05:11:44 -0400
Subject: [PATCH] make __stack_chk_guard read-only at runtime
@ -8,7 +8,7 @@ Subject: [PATCH] make __stack_chk_guard read-only at runtime
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/libc/bionic/__libc_init_main_thread.cpp b/libc/bionic/__libc_init_main_thread.cpp
index efa7dee57b..78d25fd977 100644
index efa7dee57..78d25fd97 100644
--- a/libc/bionic/__libc_init_main_thread.cpp
+++ b/libc/bionic/__libc_init_main_thread.cpp
@@ -28,22 +28,30 @@

View File

@ -1,4 +1,4 @@
From 7f0947cc0e4fc52a41ef8ecfba892f5534e1fee5 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 12 Mar 2017 17:49:13 -0400
Subject: [PATCH] on 64-bit, zero the leading stack canary byte
@ -10,7 +10,7 @@ mitigating non-terminated C string overflows.
1 file changed, 10 insertions(+)
diff --git a/libc/bionic/__libc_init_main_thread.cpp b/libc/bionic/__libc_init_main_thread.cpp
index 78d25fd977..ae2245829d 100644
index 78d25fd97..ae2245829 100644
--- a/libc/bionic/__libc_init_main_thread.cpp
+++ b/libc/bionic/__libc_init_main_thread.cpp
@@ -47,8 +47,18 @@ extern "C" int __set_tid_address(int* tid_address);

View File

@ -1,4 +1,4 @@
From 253247fc3955ecf18ff42bf8b73d075134e8f1f2 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 21:11:48 -0400
Subject: [PATCH] constify JNINativeMethod table

View File

@ -1,4 +1,4 @@
From ff688b68a7df485c5628bda976bc5cc84999e81b Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 20:12:52 -0400
Subject: [PATCH] constify JNINativeMethod tables

View File

@ -1,4 +1,4 @@
From fbf620e59c16915a2a277ed934bc9a77fbcce4ac Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 31 Mar 2019 00:10:48 -0400
Subject: [PATCH] constify JNINativeMethod table
@ -8,7 +8,7 @@ Subject: [PATCH] constify JNINativeMethod table
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/service/jni/com_android_server_wifi_WifiNative.cpp b/service/jni/com_android_server_wifi_WifiNative.cpp
index 09a5ebf7cf..18ff875173 100644
index 09a5ebf7c..18ff87517 100644
--- a/service/jni/com_android_server_wifi_WifiNative.cpp
+++ b/service/jni/com_android_server_wifi_WifiNative.cpp
@@ -77,7 +77,7 @@ static jbyteArray android_net_wifi_readKernelLog(JNIEnv *env, jclass cls) {

View File

@ -1,4 +1,4 @@
From 77c9fa981a7b058ff66f5d19929c54ca7d298e4e Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 20:56:50 -0400
Subject: [PATCH] constify JNINativeMethod tables

View File

@ -1,4 +1,4 @@
From 866f0df315bb1172d73648b61999af01a1130971 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 21:19:00 -0400
Subject: [PATCH] constify JNINativeMethod tables
@ -87,7 +87,7 @@ index 8ac04e4f3..e55c13f50 100644
{"initNative", "()V", (void*)initNative},
{"sendMediaUpdateNative", "(ZZZ)V", (void*)sendMediaUpdateNative},
diff --git a/jni/com_android_bluetooth_btservice_AdapterService.cpp b/jni/com_android_bluetooth_btservice_AdapterService.cpp
index 976e388e4..a3babf11a 100644
index f88a675b7..1eec888a0 100644
--- a/jni/com_android_bluetooth_btservice_AdapterService.cpp
+++ b/jni/com_android_bluetooth_btservice_AdapterService.cpp
@@ -1217,7 +1217,7 @@ static void interopDatabaseAddNative(JNIEnv* env, jobject obj, int feature,
@ -98,7 +98,7 @@ index 976e388e4..a3babf11a 100644
+static const JNINativeMethod sMethods[] = {
/* name, signature, funcPtr */
{"classInitNative", "()V", (void*)classInitNative},
{"initNative", "()Z", (void*)initNative},
{"initNative", "(Z)Z", (void*)initNative},
diff --git a/jni/com_android_bluetooth_gatt.cpp b/jni/com_android_bluetooth_gatt.cpp
index 86e667b4a..da573543a 100644
--- a/jni/com_android_bluetooth_gatt.cpp

View File

@ -1,4 +1,4 @@
From ceaf63c790b0ef23cf5f25d1b5c361aafd2925b5 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 20:58:37 -0400
Subject: [PATCH] constify JNINativeMethod tables

View File

@ -1,4 +1,4 @@
From 17d64eda868006dc8c5596d27299143af8e45485 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Thu, 13 Dec 2018 09:26:25 -0500
Subject: [PATCH] increase max_map_count for hardened malloc
@ -8,10 +8,10 @@ Subject: [PATCH] increase max_map_count for hardened malloc
1 file changed, 2 insertions(+)
diff --git a/rootdir/init.rc b/rootdir/init.rc
index b9464e7fd8..2149abe2bd 100644
index 4ed148857..eca5a9f9c 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -597,6 +597,8 @@ on boot
@@ -607,6 +607,8 @@ on boot
chown root system /sys/module/lowmemorykiller/parameters/minfree
chmod 0664 /sys/module/lowmemorykiller/parameters/minfree

View File

@ -1,4 +1,4 @@
From abdf523d26450814fc3f5c211f3baa643c48bae3 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Fri, 6 Feb 2015 11:41:57 -0500
Subject: [PATCH] zero sensitive information with explicit_bzero
@ -8,7 +8,7 @@ Subject: [PATCH] zero sensitive information with explicit_bzero
1 file changed, 1 insertion(+)
diff --git a/init/security.cpp b/init/security.cpp
index a3494a280bd..4b6c918ab30 100644
index a3494a280..4b6c918ab 100644
--- a/init/security.cpp
+++ b/init/security.cpp
@@ -73,6 +73,7 @@ Result<Success> MixHwrngIntoLinuxRngAction(const BuiltinArguments&) {

View File

@ -1,4 +1,4 @@
From e1b6653db794da9beaa0ea1f23ced5306e887fa9 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 21:05:42 -0400
Subject: [PATCH] constify JNINativeMethod tables

View File

@ -1,4 +1,4 @@
From a8cdbb6352e4ff708b791c7f3a976de8a6383105 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Thu, 5 Feb 2015 21:53:16 -0500
Subject: [PATCH] add a real explicit_bzero implementation
@ -22,10 +22,10 @@ optimization in the future.
create mode 100644 libc/bionic/explicit_bzero.cpp
diff --git a/libc/Android.bp b/libc/Android.bp
index a5990288d2..47fccde7e7 100644
index 6c753091b..66824275f 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -1041,6 +1041,7 @@ cc_library_static {
@@ -1049,6 +1049,7 @@ cc_library_static {
"bionic/eventfd_read.cpp",
"bionic/eventfd_write.cpp",
"bionic/exec.cpp",
@ -35,7 +35,7 @@ index a5990288d2..47fccde7e7 100644
"bionic/fchmodat.cpp",
diff --git a/libc/bionic/explicit_bzero.cpp b/libc/bionic/explicit_bzero.cpp
new file mode 100644
index 0000000000..b06daa1386
index 000000000..b06daa138
--- /dev/null
+++ b/libc/bionic/explicit_bzero.cpp
@@ -0,0 +1,7 @@
@ -47,7 +47,7 @@ index 0000000000..b06daa1386
+ return ptr;
+}
diff --git a/libc/include/string.h b/libc/include/string.h
index 25f6673a99..6c7b4eba0f 100644
index 25f6673a9..6c7b4eba0 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -56,6 +56,7 @@ void* mempcpy(void* __dst, const void* __src, size_t __n) __INTRODUCED_IN(23);
@ -59,7 +59,7 @@ index 25f6673a99..6c7b4eba0f 100644
char* strchr(const char* __s, int __ch) __attribute_pure__;
diff --git a/libc/libc.map.txt b/libc/libc.map.txt
index 88192239a1..0ec519b9c8 100644
index 88192239a..0ec519b9c 100644
--- a/libc/libc.map.txt
+++ b/libc/libc.map.txt
@@ -332,6 +332,7 @@ LIBC {
@ -71,7 +71,7 @@ index 88192239a1..0ec519b9c8 100644
fallocate; # introduced=21
fallocate64; # introduced=21
diff --git a/libc/upstream-openbsd/android/include/openbsd-compat.h b/libc/upstream-openbsd/android/include/openbsd-compat.h
index c99e2ce9df..62cb51e9fc 100644
index 2c8c7359f..aa7077fa9 100644
--- a/libc/upstream-openbsd/android/include/openbsd-compat.h
+++ b/libc/upstream-openbsd/android/include/openbsd-compat.h
@@ -65,8 +65,6 @@ extern const char* __progname;

View File

@ -1,4 +1,4 @@
From 4cd257135f72ceb7ddd32538d2ba579736bf7a12 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 2 Dec 2015 23:37:28 -0500
Subject: [PATCH] switch pthread_atfork handler allocation to mmap
@ -8,7 +8,7 @@ Subject: [PATCH] switch pthread_atfork handler allocation to mmap
1 file changed, 29 insertions(+), 6 deletions(-)
diff --git a/libc/bionic/pthread_atfork.cpp b/libc/bionic/pthread_atfork.cpp
index fb12a3ba74..cc3657f126 100644
index fb12a3ba7..cc3657f12 100644
--- a/libc/bionic/pthread_atfork.cpp
+++ b/libc/bionic/pthread_atfork.cpp
@@ -29,6 +29,9 @@

View File

@ -1,4 +1,4 @@
From 9220cf622bab1099cbff937d88aa7ce2809bb9d4 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Thu, 3 Dec 2015 12:58:31 -0500
Subject: [PATCH] add memory protection for pthread_atfork handlers
@ -8,7 +8,7 @@ Subject: [PATCH] add memory protection for pthread_atfork handlers
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/libc/bionic/pthread_atfork.cpp b/libc/bionic/pthread_atfork.cpp
index cc3657f126..d11dab84a7 100644
index cc3657f12..d11dab84a 100644
--- a/libc/bionic/pthread_atfork.cpp
+++ b/libc/bionic/pthread_atfork.cpp
@@ -47,6 +47,7 @@ struct atfork_t {

View File

@ -1,4 +1,4 @@
From 8ef71d1ffd51664bc8d61fd029efa899a87ddc30 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sat, 7 Feb 2015 20:14:24 -0500
Subject: [PATCH] add memory protection for at_quick_exit
@ -8,7 +8,7 @@ Subject: [PATCH] add memory protection for at_quick_exit
1 file changed, 35 insertions(+), 5 deletions(-)
diff --git a/libc/upstream-freebsd/lib/libc/stdlib/quick_exit.c b/libc/upstream-freebsd/lib/libc/stdlib/quick_exit.c
index ef8cdb1b40..63b54e3fb8 100644
index ef8cdb1b4..63b54e3fb 100644
--- a/libc/upstream-freebsd/lib/libc/stdlib/quick_exit.c
+++ b/libc/upstream-freebsd/lib/libc/stdlib/quick_exit.c
@@ -28,6 +28,9 @@

View File

@ -1,4 +1,4 @@
From 0eaef1abbdcbf40c990fcba1bd91401bdd38a9c5 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 27 Jan 2016 18:02:15 -0500
Subject: [PATCH] add XOR mangling mitigation for thread-local dtors
@ -10,7 +10,7 @@ Subject: [PATCH] add XOR mangling mitigation for thread-local dtors
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/libc/bionic/__cxa_thread_atexit_impl.cpp b/libc/bionic/__cxa_thread_atexit_impl.cpp
index 99077c101d..74608513ef 100644
index 99077c101..74608513e 100644
--- a/libc/bionic/__cxa_thread_atexit_impl.cpp
+++ b/libc/bionic/__cxa_thread_atexit_impl.cpp
@@ -13,15 +13,17 @@
@ -51,7 +51,7 @@ index 99077c101d..74608513ef 100644
__loader_remove_thread_local_dtor(current->dso_handle);
}
diff --git a/libc/bionic/libc_init_common.cpp b/libc/bionic/libc_init_common.cpp
index b229cda2fd..e928c02f1b 100644
index b229cda2f..e928c02f1 100644
--- a/libc/bionic/libc_init_common.cpp
+++ b/libc/bionic/libc_init_common.cpp
@@ -44,6 +44,7 @@
@ -71,7 +71,7 @@ index b229cda2fd..e928c02f1b 100644
}
diff --git a/libc/private/bionic_globals.h b/libc/private/bionic_globals.h
index d73079e33d..4c296037b1 100644
index d73079e33..4c296037b 100644
--- a/libc/private/bionic_globals.h
+++ b/libc/private/bionic_globals.h
@@ -43,6 +43,7 @@

View File

@ -1,4 +1,4 @@
From 64f1cc2148c1834212f6704ba08b626696501271 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Fri, 29 Jan 2016 20:20:09 -0500
Subject: [PATCH] use a better pthread_attr junk filling pattern
@ -9,7 +9,7 @@ Guarantee that junk filled pointers will fault, at least on pure 64-bit.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/bionic/pthread_attr.cpp b/libc/bionic/pthread_attr.cpp
index 3c4b169eed..a27201706e 100644
index 3c4b169ee..a27201706 100644
--- a/libc/bionic/pthread_attr.cpp
+++ b/libc/bionic/pthread_attr.cpp
@@ -53,7 +53,7 @@ int pthread_attr_init(pthread_attr_t* attr) {

View File

@ -1,4 +1,4 @@
From 5c42a527cf958ca3c81613178618d452e806994f Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Renlord <me@renlord.com>
Date: Thu, 12 Sep 2019 14:51:51 +1000
Subject: [PATCH] add guard page(s) between static_tls and stack
@ -8,7 +8,7 @@ Subject: [PATCH] add guard page(s) between static_tls and stack
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp
index 4cf14ad72b..6bbf970a0b 100644
index 4cf14ad72..6bbf970a0 100644
--- a/libc/bionic/pthread_create.cpp
+++ b/libc/bionic/pthread_create.cpp
@@ -218,9 +218,10 @@ int __init_thread(pthread_internal_t* thread) {

View File

@ -1,4 +1,4 @@
From 5cc8c34e60dbfeb1fd996bf83bb01a0443d93a8a Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Thu, 10 Oct 2019 22:52:49 -0400
Subject: [PATCH] move pthread_internal_t behind guard page
@ -8,7 +8,7 @@ Subject: [PATCH] move pthread_internal_t behind guard page
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp
index 6bbf970a0b..b4a044db18 100644
index 6bbf970a0..b4a044db1 100644
--- a/libc/bionic/pthread_create.cpp
+++ b/libc/bionic/pthread_create.cpp
@@ -218,10 +218,13 @@ int __init_thread(pthread_internal_t* thread) {

View File

@ -1,4 +1,4 @@
From 7f61cc8a1c9abd04094a96959f242b7906fa3127 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Renlord <me@renlord.com>
Date: Sun, 20 Oct 2019 08:17:11 +1100
Subject: [PATCH] add secondary stack randomization
@ -9,7 +9,7 @@ Subject: [PATCH] add secondary stack randomization
2 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp
index b4a044db18..c2b61a2171 100644
index b4a044db1..c2b61a217 100644
--- a/libc/bionic/pthread_create.cpp
+++ b/libc/bionic/pthread_create.cpp
@@ -29,6 +29,7 @@
@ -84,7 +84,7 @@ index b4a044db18..c2b61a2171 100644
}
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index a919a79224..d223f7f871 100644
index a919a7922..d223f7f87 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -57,6 +57,7 @@

View File

@ -1,4 +1,4 @@
From b28302c668013a5588a6939f0bbced0b7b288cc2 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 8 Feb 2015 01:18:54 -0500
Subject: [PATCH] replace brk and sbrk with stubs
@ -12,7 +12,7 @@ malloc.
1 file changed, 8 insertions(+), 40 deletions(-)
diff --git a/libc/bionic/brk.cpp b/libc/bionic/brk.cpp
index 566c33a7a6..ef93055139 100644
index 566c33a7a..ef9305513 100644
--- a/libc/bionic/brk.cpp
+++ b/libc/bionic/brk.cpp
@@ -29,48 +29,16 @@

View File

@ -1,4 +1,4 @@
From 9f8be7d07cc063933f8def97672c7671dd4fc360 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Mon, 4 Mar 2019 04:26:04 -0500
Subject: [PATCH] use blocking getrandom and avoid urandom fallback
@ -8,7 +8,7 @@ Subject: [PATCH] use blocking getrandom and avoid urandom fallback
1 file changed, 2 insertions(+), 28 deletions(-)
diff --git a/libc/bionic/getentropy.cpp b/libc/bionic/getentropy.cpp
index 2c6e417b87..ad49039af1 100644
index 2c6e417b8..ad49039af 100644
--- a/libc/bionic/getentropy.cpp
+++ b/libc/bionic/getentropy.cpp
@@ -31,26 +31,6 @@

View File

@ -1,4 +1,4 @@
From cb91a7ee3aed607dab2d89f2f6b823bf28ea34a0 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Mon, 19 Sep 2016 07:57:43 -0400
Subject: [PATCH] fix undefined out-of-bounds accesses in sched.h
@ -8,7 +8,7 @@ Subject: [PATCH] fix undefined out-of-bounds accesses in sched.h
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libc/include/sched.h b/libc/include/sched.h
index 1f5036677a..fc622cbd76 100644
index 1f5036677..fc622cbd7 100644
--- a/libc/include/sched.h
+++ b/libc/include/sched.h
@@ -71,7 +71,10 @@ int setns(int __fd, int __ns_type) __INTRODUCED_IN(21);

View File

@ -1,4 +1,4 @@
From 08279e2fdd75d20ede2a56c326604f426557cea4 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sat, 19 Nov 2016 09:56:14 -0500
Subject: [PATCH] stop implicitly marking mappings as mergeable
@ -8,7 +8,7 @@ Subject: [PATCH] stop implicitly marking mappings as mergeable
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/libc/bionic/mmap.cpp b/libc/bionic/mmap.cpp
index 35033199ae..c081068928 100644
index 35033199a..c08106892 100644
--- a/libc/bionic/mmap.cpp
+++ b/libc/bionic/mmap.cpp
@@ -39,8 +39,6 @@ extern "C" void* __mmap2(void*, size_t, int, int, int, size_t);

View File

@ -1,4 +1,4 @@
From 6a18bd565d9344db5f46f2bb423309dcb134be6e Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sat, 16 Jul 2016 23:55:16 -0400
Subject: [PATCH] replace VLA formatting buffer with dprintf
@ -8,7 +8,7 @@ Subject: [PATCH] replace VLA formatting buffer with dprintf
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/libc/bionic/bionic_systrace.cpp b/libc/bionic/bionic_systrace.cpp
index 6182ed801c..ccb15a9959 100644
index 6182ed801..ccb15a995 100644
--- a/libc/bionic/bionic_systrace.cpp
+++ b/libc/bionic/bionic_systrace.cpp
@@ -26,8 +26,6 @@

View File

@ -1,4 +1,4 @@
From 2f392c2d081fad13f61164ab07841818b972f950 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Fri, 17 Jul 2015 21:32:05 -0400
Subject: [PATCH] increase default pthread stack to 8MiB on 64-bit
@ -8,10 +8,10 @@ Subject: [PATCH] increase default pthread stack to 8MiB on 64-bit
1 file changed, 4 insertions(+)
diff --git a/libc/bionic/pthread_internal.h b/libc/bionic/pthread_internal.h
index e720c046d9..4f7c80e1b9 100644
index a1e0c450a..0a95adfee 100644
--- a/libc/bionic/pthread_internal.h
+++ b/libc/bionic/pthread_internal.h
@@ -218,7 +218,11 @@ __LIBC_HIDDEN__ void pthread_key_clean_all(void);
@@ -217,7 +217,11 @@ __LIBC_HIDDEN__ void pthread_key_clean_all(void);
// stack overflows, we subtracted the same amount we were using there
// from the default thread stack size. This should keep memory usage
// roughly constant.

View File

@ -1,4 +1,4 @@
From 8bbce1bc50f7b0fb210de3ef160542bbb08cdcc0 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sat, 1 Oct 2016 05:11:44 -0400
Subject: [PATCH] make __stack_chk_guard read-only at runtime
@ -8,7 +8,7 @@ Subject: [PATCH] make __stack_chk_guard read-only at runtime
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/libc/bionic/__libc_init_main_thread.cpp b/libc/bionic/__libc_init_main_thread.cpp
index 4984e38a13..2e3967daab 100644
index 4984e38a1..2e3967daa 100644
--- a/libc/bionic/__libc_init_main_thread.cpp
+++ b/libc/bionic/__libc_init_main_thread.cpp
@@ -28,6 +28,9 @@

View File

@ -1,4 +1,4 @@
From 725f61db82eb41098291ce06445ccfbf5d5b3581 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 12 Mar 2017 17:49:13 -0400
Subject: [PATCH] on 64-bit, zero the leading stack canary byte
@ -10,7 +10,7 @@ mitigating non-terminated C string overflows.
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/libc/bionic/__libc_init_main_thread.cpp b/libc/bionic/__libc_init_main_thread.cpp
index 2e3967daab..f5128de9ec 100644
index 2e3967daa..f5128de9e 100644
--- a/libc/bionic/__libc_init_main_thread.cpp
+++ b/libc/bionic/__libc_init_main_thread.cpp
@@ -49,8 +49,11 @@ uintptr_t __stack_chk_guard[PAGE_SIZE / sizeof(uintptr_t)] = {0};

View File

@ -1,4 +1,4 @@
From b8afb8af3773d630550354bd3da95da947fbb81e Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 21:11:48 -0400
Subject: [PATCH] constify JNINativeMethod table

View File

@ -1,4 +1,4 @@
From 07071814db0786252ddcb6149c61ea78be22f858 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 20:12:52 -0400
Subject: [PATCH] constify JNINativeMethod tables

View File

@ -1,4 +1,4 @@
From b914409e0582f093957b3f9f1d151fffdecc5136 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 31 Mar 2019 00:10:48 -0400
Subject: [PATCH] constify JNINativeMethod table
@ -8,7 +8,7 @@ Subject: [PATCH] constify JNINativeMethod table
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/service/jni/com_android_server_wifi_WifiNative.cpp b/service/jni/com_android_server_wifi_WifiNative.cpp
index 262357ac65..90fd2d2cf7 100644
index 262357ac6..90fd2d2cf 100644
--- a/service/jni/com_android_server_wifi_WifiNative.cpp
+++ b/service/jni/com_android_server_wifi_WifiNative.cpp
@@ -76,7 +76,7 @@ static jbyteArray android_net_wifi_readKernelLogNative(JNIEnv *env, jclass cls)

View File

@ -1,4 +1,4 @@
From 157fa7811544321cc61b9aae0218aaa5f13d4f6f Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 20:56:50 -0400
Subject: [PATCH] constify JNINativeMethod tables

View File

@ -1,4 +1,4 @@
From a48ba29b986ad67a5388f4a053080263ac4a438b Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 21:19:00 -0400
Subject: [PATCH] constify JNINativeMethod tables
@ -20,17 +20,17 @@ Subject: [PATCH] constify JNINativeMethod tables
13 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/jni/com_android_bluetooth_a2dp.cpp b/jni/com_android_bluetooth_a2dp.cpp
index af125bda7..9d1426378 100644
index 36fa460c4..272dd3cbd 100644
--- a/jni/com_android_bluetooth_a2dp.cpp
+++ b/jni/com_android_bluetooth_a2dp.cpp
@@ -473,7 +473,7 @@ static jboolean setCodecConfigPreferenceNative(JNIEnv* env, jobject object,
@@ -476,7 +476,7 @@ static jboolean setCodecConfigPreferenceNative(JNIEnv* env, jobject object,
return (status == BT_STATUS_SUCCESS) ? JNI_TRUE : JNI_FALSE;
}
-static JNINativeMethod sMethods[] = {
+static const JNINativeMethod sMethods[] = {
{"classInitNative", "()V", (void*)classInitNative},
{"initNative", "(I[Landroid/bluetooth/BluetoothCodecConfig;)V",
{"initNative", "(I[Landroid/bluetooth/BluetoothCodecConfig;[Landroid/bluetooth/BluetoothCodecConfig;)V",
(void*)initNative},
diff --git a/jni/com_android_bluetooth_a2dp_sink.cpp b/jni/com_android_bluetooth_a2dp_sink.cpp
index 91de5af07..3bb20e3ae 100644
@ -72,10 +72,10 @@ index 214feebcb..9bd85aa13 100644
{"initNative", "()V", (void*)initNative},
{"sendMediaUpdateNative", "(ZZZ)V", (void*)sendMediaUpdateNative},
diff --git a/jni/com_android_bluetooth_btservice_AdapterService.cpp b/jni/com_android_bluetooth_btservice_AdapterService.cpp
index 06914e1e7..93d87afcc 100644
index 55b391c56..ea1eeeb73 100644
--- a/jni/com_android_bluetooth_btservice_AdapterService.cpp
+++ b/jni/com_android_bluetooth_btservice_AdapterService.cpp
@@ -1237,7 +1237,7 @@ static jbyteArray obfuscateAddressNative(JNIEnv* env, jobject obj,
@@ -1238,7 +1238,7 @@ static jbyteArray obfuscateAddressNative(JNIEnv* env, jobject obj,
return output_bytes;
}
@ -83,12 +83,12 @@ index 06914e1e7..93d87afcc 100644
+static const JNINativeMethod sMethods[] = {
/* name, signature, funcPtr */
{"classInitNative", "()V", (void*)classInitNative},
{"initNative", "(ZZ)Z", (void*)initNative},
{"initNative", "(ZZZ)Z", (void*)initNative},
diff --git a/jni/com_android_bluetooth_gatt.cpp b/jni/com_android_bluetooth_gatt.cpp
index 452151547..3bf3201fc 100644
index 6e16cc113..57b7a025d 100644
--- a/jni/com_android_bluetooth_gatt.cpp
+++ b/jni/com_android_bluetooth_gatt.cpp
@@ -2065,7 +2065,7 @@ static void gattTestNative(JNIEnv* env, jobject object, jint command,
@@ -2078,7 +2078,7 @@ static void gattTestNative(JNIEnv* env, jobject object, jint command,
*/
// JNI functions defined in AdvertiseManager class.
@ -97,7 +97,7 @@ index 452151547..3bf3201fc 100644
{"classInitNative", "()V", (void*)advertiseClassInitNative},
{"initializeNative", "()V", (void*)advertiseInitializeNative},
{"cleanupNative", "()V", (void*)advertiseCleanupNative},
@@ -2092,7 +2092,7 @@ static JNINativeMethod sAdvertiseMethods[] = {
@@ -2105,7 +2105,7 @@ static JNINativeMethod sAdvertiseMethods[] = {
};
// JNI functions defined in PeriodicScanManager class.
@ -106,7 +106,7 @@ index 452151547..3bf3201fc 100644
{"classInitNative", "()V", (void*)periodicScanClassInitNative},
{"initializeNative", "()V", (void*)periodicScanInitializeNative},
{"cleanupNative", "()V", (void*)periodicScanCleanupNative},
@@ -2101,7 +2101,7 @@ static JNINativeMethod sPeriodicScanMethods[] = {
@@ -2114,7 +2114,7 @@ static JNINativeMethod sPeriodicScanMethods[] = {
};
// JNI functions defined in ScanManager class.
@ -115,7 +115,7 @@ index 452151547..3bf3201fc 100644
{"registerScannerNative", "(JJ)V", (void*)registerScannerNative},
{"unregisterScannerNative", "(I)V", (void*)unregisterScannerNative},
{"gattClientScanNative", "(Z)V", (void*)gattClientScanNative},
@@ -2134,7 +2134,7 @@ static JNINativeMethod sScanMethods[] = {
@@ -2147,7 +2147,7 @@ static JNINativeMethod sScanMethods[] = {
};
// JNI functions defined in GattService class.

View File

@ -1,4 +1,4 @@
From 20a51f508b32b64cc60f2fc300372442a4ce0dc2 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 20:58:37 -0400
Subject: [PATCH] constify JNINativeMethod tables

View File

@ -16,7 +16,7 @@ Change-Id: I79c0ed4ab97494434edc6c308a8a54bd123c02ee
create mode 100644 src/com/android/settings/applications/specialaccess/sensor/SensorAccess.java
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 065a41322c..7f7000be66 100644
index e0b5bebaec..e4df5eb84f 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -4667,6 +4667,9 @@
@ -30,7 +30,7 @@ index 065a41322c..7f7000be66 100644
<string name="rtt_settings_no_visible" msgid="7440356831140948382"></string>
<string name="rtt_settings_visible_during_call" msgid="7866181103286073700"></string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index d6d19a7ceb..68f543974b 100644
index fe92e77035..7834851bd9 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -4666,6 +4666,9 @@
@ -44,7 +44,7 @@ index d6d19a7ceb..68f543974b 100644
<string name="rtt_settings_no_visible" msgid="7440356831140948382"></string>
<string name="rtt_settings_visible_during_call" msgid="7866181103286073700"></string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5b4f19c18b..d8a769645e 100644
index 2180ea45f6..6f48171135 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -11426,6 +11426,11 @@

View File

@ -1,4 +1,4 @@
From aa9cc05d07a5855fcae2d9f21dd9672543eafbb3 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Fri, 6 Feb 2015 11:41:57 -0500
Subject: [PATCH] zero sensitive information with explicit_bzero
@ -8,7 +8,7 @@ Subject: [PATCH] zero sensitive information with explicit_bzero
1 file changed, 1 insertion(+)
diff --git a/init/security.cpp b/init/security.cpp
index a3494a280bd..4b6c918ab30 100644
index a3494a280..4b6c918ab 100644
--- a/init/security.cpp
+++ b/init/security.cpp
@@ -73,6 +73,7 @@ Result<Success> MixHwrngIntoLinuxRngAction(const BuiltinArguments&) {

View File

@ -1,4 +1,4 @@
From c99c35cb2a323896d64708fcae5d01f83f937d1e Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 9 Sep 2020 12:28:42 -0400
Subject: [PATCH] constify JNINativeMethod tables

View File

@ -1,4 +1,4 @@
From 5412c371955014eee8b2246b386ae7f539bac09e Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Thu, 5 Feb 2015 21:53:16 -0500
Subject: [PATCH] add a real explicit_bzero implementation
@ -22,10 +22,10 @@ optimization in the future.
create mode 100644 libc/bionic/explicit_bzero.cpp
diff --git a/libc/Android.bp b/libc/Android.bp
index d3271ae919..043a03245d 100644
index ce714054a..49108bf35 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -1028,6 +1028,7 @@ cc_library_static {
@@ -1047,6 +1047,7 @@ cc_library_static {
"bionic/error.cpp",
"bionic/eventfd.cpp",
"bionic/exec.cpp",
@ -35,7 +35,7 @@ index d3271ae919..043a03245d 100644
"bionic/fchmodat.cpp",
diff --git a/libc/bionic/explicit_bzero.cpp b/libc/bionic/explicit_bzero.cpp
new file mode 100644
index 0000000000..b06daa1386
index 000000000..b06daa138
--- /dev/null
+++ b/libc/bionic/explicit_bzero.cpp
@@ -0,0 +1,7 @@
@ -47,7 +47,7 @@ index 0000000000..b06daa1386
+ return ptr;
+}
diff --git a/libc/include/string.h b/libc/include/string.h
index 0cc5611aa8..befffd0828 100644
index 0cc5611aa..befffd082 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -56,6 +56,7 @@ void* mempcpy(void* __dst, const void* __src, size_t __n) __INTRODUCED_IN(23);
@ -59,7 +59,7 @@ index 0cc5611aa8..befffd0828 100644
char* strchr(const char* __s, int __ch) __attribute_pure__;
diff --git a/libc/libc.map.txt b/libc/libc.map.txt
index 4bfb8a2320..36803984e9 100644
index 4bfb8a232..36803984e 100644
--- a/libc/libc.map.txt
+++ b/libc/libc.map.txt
@@ -332,6 +332,7 @@ LIBC {
@ -71,7 +71,7 @@ index 4bfb8a2320..36803984e9 100644
fallocate; # introduced=21
fallocate64; # introduced=21
diff --git a/libc/upstream-openbsd/android/include/openbsd-compat.h b/libc/upstream-openbsd/android/include/openbsd-compat.h
index 878f71cec6..79a2604259 100644
index 878f71cec..79a260425 100644
--- a/libc/upstream-openbsd/android/include/openbsd-compat.h
+++ b/libc/upstream-openbsd/android/include/openbsd-compat.h
@@ -53,8 +53,6 @@ extern const char* __progname;

View File

@ -1,4 +1,4 @@
From 2e613ccbe7a6b2aa8f1688ed8493267d12c66d23 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 2 Dec 2015 23:37:28 -0500
Subject: [PATCH] switch pthread_atfork handler allocation to mmap
@ -9,7 +9,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
1 file changed, 29 insertions(+), 6 deletions(-)
diff --git a/libc/bionic/pthread_atfork.cpp b/libc/bionic/pthread_atfork.cpp
index 0dcabdfb2d..6306052ee3 100644
index 0dcabdfb2..6306052ee 100644
--- a/libc/bionic/pthread_atfork.cpp
+++ b/libc/bionic/pthread_atfork.cpp
@@ -29,6 +29,9 @@

View File

@ -1,4 +1,4 @@
From e239c7dff88bbc37a3e902a695565fdbf6ed0b08 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Thu, 3 Dec 2015 12:58:31 -0500
Subject: [PATCH] add memory protection for pthread_atfork handlers
@ -9,7 +9,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/libc/bionic/pthread_atfork.cpp b/libc/bionic/pthread_atfork.cpp
index 6306052ee3..d59f3ae54b 100644
index 6306052ee..d59f3ae54 100644
--- a/libc/bionic/pthread_atfork.cpp
+++ b/libc/bionic/pthread_atfork.cpp
@@ -47,6 +47,7 @@ struct atfork_t {

View File

@ -1,4 +1,4 @@
From 0b03d92b7f2dc5f12211037e99821ccead27a687 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 27 Jan 2016 18:02:15 -0500
Subject: [PATCH] add XOR mangling mitigation for thread-local dtors
@ -11,7 +11,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/libc/bionic/__cxa_thread_atexit_impl.cpp b/libc/bionic/__cxa_thread_atexit_impl.cpp
index 99077c101d..74608513ef 100644
index 99077c101..74608513e 100644
--- a/libc/bionic/__cxa_thread_atexit_impl.cpp
+++ b/libc/bionic/__cxa_thread_atexit_impl.cpp
@@ -13,15 +13,17 @@
@ -52,7 +52,7 @@ index 99077c101d..74608513ef 100644
__loader_remove_thread_local_dtor(current->dso_handle);
}
diff --git a/libc/bionic/libc_init_common.cpp b/libc/bionic/libc_init_common.cpp
index a82ca50b69..2ad0b58c5a 100644
index a82ca50b6..2ad0b58c5 100644
--- a/libc/bionic/libc_init_common.cpp
+++ b/libc/bionic/libc_init_common.cpp
@@ -45,6 +45,7 @@
@ -72,7 +72,7 @@ index a82ca50b69..2ad0b58c5a 100644
}
diff --git a/libc/private/bionic_globals.h b/libc/private/bionic_globals.h
index 6e7eb76e40..1b75ca0ee6 100644
index 6e7eb76e4..1b75ca0ee 100644
--- a/libc/private/bionic_globals.h
+++ b/libc/private/bionic_globals.h
@@ -43,6 +43,7 @@

View File

@ -1,4 +1,4 @@
From de08419b8256ab7daf6ef7c7835348f9aaeb7478 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Fri, 29 Jan 2016 20:20:09 -0500
Subject: [PATCH] use a better pthread_attr junk filling pattern
@ -11,7 +11,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/bionic/pthread_attr.cpp b/libc/bionic/pthread_attr.cpp
index 3c4b169eed..a27201706e 100644
index 3c4b169ee..a27201706 100644
--- a/libc/bionic/pthread_attr.cpp
+++ b/libc/bionic/pthread_attr.cpp
@@ -53,7 +53,7 @@ int pthread_attr_init(pthread_attr_t* attr) {

View File

@ -1,4 +1,4 @@
From 897d4903e24c9f6b772539e9f8e0bf3520ed8838 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Renlord <me@renlord.com>
Date: Thu, 12 Sep 2019 14:51:51 +1000
Subject: [PATCH] add guard page(s) between static_tls and stack
@ -9,7 +9,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp
index d4a8bef269..eac53cac85 100644
index d4a8bef26..eac53cac8 100644
--- a/libc/bionic/pthread_create.cpp
+++ b/libc/bionic/pthread_create.cpp
@@ -199,9 +199,10 @@ int __init_thread(pthread_internal_t* thread) {

View File

@ -1,4 +1,4 @@
From 648cd68ca3ffefe685ae6acdae17171c8acfa75b Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Thu, 10 Oct 2019 22:52:49 -0400
Subject: [PATCH] move pthread_internal_t behind guard page
@ -9,7 +9,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp
index eac53cac85..336e69b597 100644
index eac53cac8..336e69b59 100644
--- a/libc/bionic/pthread_create.cpp
+++ b/libc/bionic/pthread_create.cpp
@@ -199,10 +199,13 @@ int __init_thread(pthread_internal_t* thread) {

View File

@ -1,4 +1,4 @@
From 0bc4dbcbd27c7f48713913101fb3c868c215c1a3 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Renlord <me@renlord.com>
Date: Sun, 20 Oct 2019 08:17:11 +1100
Subject: [PATCH] add secondary stack randomization
@ -10,7 +10,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
2 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp
index 336e69b597..3008e3cd27 100644
index 336e69b59..3008e3cd2 100644
--- a/libc/bionic/pthread_create.cpp
+++ b/libc/bionic/pthread_create.cpp
@@ -29,6 +29,7 @@
@ -85,7 +85,7 @@ index 336e69b597..3008e3cd27 100644
}
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index b4556a74e5..5b0b4fb097 100644
index b4556a74e..5b0b4fb09 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -61,6 +61,7 @@

View File

@ -1,4 +1,4 @@
From 31456ac632903235e14500af8b5d7dff2d25d724 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 8 Feb 2015 01:18:54 -0500
Subject: [PATCH] replace brk and sbrk with stubs
@ -14,7 +14,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
1 file changed, 8 insertions(+), 40 deletions(-)
diff --git a/libc/bionic/brk.cpp b/libc/bionic/brk.cpp
index 566c33a7a6..ef93055139 100644
index 566c33a7a..ef9305513 100644
--- a/libc/bionic/brk.cpp
+++ b/libc/bionic/brk.cpp
@@ -29,48 +29,16 @@

View File

@ -1,4 +1,4 @@
From 58ebc243ea3085056e6aba765d879807fa1a46d6 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Mon, 4 Mar 2019 04:26:04 -0500
Subject: [PATCH] use blocking getrandom and avoid urandom fallback
@ -9,7 +9,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
1 file changed, 2 insertions(+), 24 deletions(-)
diff --git a/libc/bionic/getentropy.cpp b/libc/bionic/getentropy.cpp
index 9c93e713b7..9b40852675 100644
index 9c93e713b..9b4085267 100644
--- a/libc/bionic/getentropy.cpp
+++ b/libc/bionic/getentropy.cpp
@@ -33,22 +33,6 @@

View File

@ -1,4 +1,4 @@
From 5323b39f7ec1fce2d788f1c8a2c28cfd32d5ccc4 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Mon, 19 Sep 2016 07:57:43 -0400
Subject: [PATCH] fix undefined out-of-bounds accesses in sched.h
@ -9,7 +9,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libc/include/sched.h b/libc/include/sched.h
index 3260231cf0..00c2a4a452 100644
index 3260231cf..00c2a4a45 100644
--- a/libc/include/sched.h
+++ b/libc/include/sched.h
@@ -70,7 +70,10 @@ int setns(int __fd, int __ns_type) __INTRODUCED_IN(21);

View File

@ -1,4 +1,4 @@
From 6a91d9dddb01964134e50cc73f6f158706da800a Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sat, 19 Nov 2016 09:56:14 -0500
Subject: [PATCH] stop implicitly marking mappings as mergeable
@ -9,7 +9,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/libc/bionic/mmap.cpp b/libc/bionic/mmap.cpp
index 9aad0b3156..6bf0ecfd16 100644
index 9aad0b315..6bf0ecfd1 100644
--- a/libc/bionic/mmap.cpp
+++ b/libc/bionic/mmap.cpp
@@ -39,8 +39,6 @@ extern "C" void* __mmap2(void*, size_t, int, int, int, size_t);

View File

@ -1,4 +1,4 @@
From a042b5a0bada9933b7c488003e8f9d8d0d195525 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sat, 16 Jul 2016 23:55:16 -0400
Subject: [PATCH] replace VLA formatting with dprintf-like function
@ -9,7 +9,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/libc/bionic/bionic_systrace.cpp b/libc/bionic/bionic_systrace.cpp
index fd97712982..acd9b76814 100644
index fd9771298..acd9b7681 100644
--- a/libc/bionic/bionic_systrace.cpp
+++ b/libc/bionic/bionic_systrace.cpp
@@ -27,8 +27,6 @@

View File

@ -1,4 +1,4 @@
From 9ec639de1bec2f655bdfc0750e363a6f8de31c4a Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Fri, 17 Jul 2015 21:32:05 -0400
Subject: [PATCH] increase default pthread stack to 8MiB on 64-bit
@ -9,10 +9,10 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
1 file changed, 4 insertions(+)
diff --git a/libc/bionic/pthread_internal.h b/libc/bionic/pthread_internal.h
index d58725baf1..a108f5cc0d 100644
index 1f055f59e..f84cc4dc8 100644
--- a/libc/bionic/pthread_internal.h
+++ b/libc/bionic/pthread_internal.h
@@ -234,7 +234,11 @@ __LIBC_HIDDEN__ void pthread_key_clean_all(void);
@@ -233,7 +233,11 @@ __LIBC_HIDDEN__ void pthread_key_clean_all(void);
// stack overflows, we subtracted the same amount we were using there
// from the default thread stack size. This should keep memory usage
// roughly constant.

View File

@ -1,4 +1,4 @@
From 49571a0a496539b9af763b8ef30c5b5db57c8be7 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sat, 1 Oct 2016 05:11:44 -0400
Subject: [PATCH] make __stack_chk_guard read-only at runtime
@ -9,7 +9,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/libc/bionic/__libc_init_main_thread.cpp b/libc/bionic/__libc_init_main_thread.cpp
index 56a8488888..7c8256cd67 100644
index 56a848888..7c8256cd6 100644
--- a/libc/bionic/__libc_init_main_thread.cpp
+++ b/libc/bionic/__libc_init_main_thread.cpp
@@ -28,6 +28,9 @@

View File

@ -1,4 +1,4 @@
From 149cc5ccb870640b2536b6bd5dfa1292f9dd6178 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 12 Mar 2017 17:49:13 -0400
Subject: [PATCH] on 64-bit, zero the leading stack canary byte
@ -12,7 +12,7 @@ Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/libc/bionic/__libc_init_main_thread.cpp b/libc/bionic/__libc_init_main_thread.cpp
index 7c8256cd67..554477674a 100644
index 7c8256cd6..554477674 100644
--- a/libc/bionic/__libc_init_main_thread.cpp
+++ b/libc/bionic/__libc_init_main_thread.cpp
@@ -49,8 +49,11 @@ uintptr_t __stack_chk_guard[PAGE_SIZE / sizeof(uintptr_t)] = {0};

View File

@ -1,4 +1,4 @@
From dce2d0f64f68739fed38483948095621506ca244 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 18 Nov 2020 14:28:24 -0500
Subject: [PATCH] constify JNINativeMethod table

View File

@ -1,4 +1,4 @@
From 63b9f96a121648ce0815b4ff21a670af9d643203 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 9 Sep 2020 12:04:55 -0400
Subject: [PATCH] constify JNINativeMethod tables

View File

@ -1,4 +1,4 @@
From c34b037486b38bed7a45b26f736e9fe4a8c931f2 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Mon, 4 Jan 2021 19:56:14 -0500
Subject: [PATCH] constify JNINativeMethod table

View File

@ -1,4 +1,4 @@
From e3a4d64f29c9a0cad11fe06af6ff378c9ea9dbea Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 9 Sep 2020 12:10:23 -0400
Subject: [PATCH] constify JNINativeMethod tables

View File

@ -1,4 +1,4 @@
From d8a62b5156007c507e6de4ced1e0db8c271504ee Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 9 Sep 2020 01:00:19 -0400
Subject: [PATCH] constify JNINativeMethod tables
@ -99,10 +99,10 @@ index bceea1d73..6b8a317bc 100644
{"initNative", "()V", (void*)initNative},
{"cleanupNative", "()V", (void*)cleanupNative},
diff --git a/jni/com_android_bluetooth_gatt.cpp b/jni/com_android_bluetooth_gatt.cpp
index 64db277f0..0aa06af5e 100644
index 69b9fc2f8..ecc46760c 100644
--- a/jni/com_android_bluetooth_gatt.cpp
+++ b/jni/com_android_bluetooth_gatt.cpp
@@ -2064,7 +2064,7 @@ static void gattTestNative(JNIEnv* env, jobject object, jint command,
@@ -2118,7 +2118,7 @@ static void gattTestNative(JNIEnv* env, jobject object, jint command,
*/
// JNI functions defined in AdvertiseManager class.
@ -111,7 +111,7 @@ index 64db277f0..0aa06af5e 100644
{"classInitNative", "()V", (void*)advertiseClassInitNative},
{"initializeNative", "()V", (void*)advertiseInitializeNative},
{"cleanupNative", "()V", (void*)advertiseCleanupNative},
@@ -2091,7 +2091,7 @@ static JNINativeMethod sAdvertiseMethods[] = {
@@ -2145,7 +2145,7 @@ static JNINativeMethod sAdvertiseMethods[] = {
};
// JNI functions defined in PeriodicScanManager class.
@ -120,7 +120,7 @@ index 64db277f0..0aa06af5e 100644
{"classInitNative", "()V", (void*)periodicScanClassInitNative},
{"initializeNative", "()V", (void*)periodicScanInitializeNative},
{"cleanupNative", "()V", (void*)periodicScanCleanupNative},
@@ -2100,7 +2100,7 @@ static JNINativeMethod sPeriodicScanMethods[] = {
@@ -2159,7 +2159,7 @@ static JNINativeMethod sPeriodicScanMethods[] = {
};
// JNI functions defined in ScanManager class.
@ -129,7 +129,7 @@ index 64db277f0..0aa06af5e 100644
{"registerScannerNative", "(JJ)V", (void*)registerScannerNative},
{"unregisterScannerNative", "(I)V", (void*)unregisterScannerNative},
{"gattClientScanNative", "(Z)V", (void*)gattClientScanNative},
@@ -2133,7 +2133,7 @@ static JNINativeMethod sScanMethods[] = {
@@ -2192,7 +2192,7 @@ static JNINativeMethod sScanMethods[] = {
};
// JNI functions defined in GattService class.

View File

@ -1,4 +1,4 @@
From e41f1d7f8eee4f6af7ad1f9c0b6cbf1aef94f3cd Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Sun, 17 Mar 2019 20:58:37 -0400
Subject: [PATCH] constify JNINativeMethod tables

View File

@ -1,4 +1,4 @@
From 62f81c237b7f4a33fbb13752def9cbf3f5c9e0d4 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: flawedworld <flawedworld@flawed.world>
Date: Wed, 1 Sep 2021 20:36:10 +0000
Subject: [PATCH] UserManager app installation restrictions
@ -10,10 +10,10 @@ Subject: [PATCH] UserManager app installation restrictions
3 files changed, 44 insertions(+), 5 deletions(-)
diff --git a/res/values/strings.xml b/res/values/strings.xml
index bd1076547f2..eee095c3053 100644
index 87ef39ed10..66b27f3263 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -7087,6 +7087,8 @@
@@ -7088,6 +7088,8 @@
<string name="user_enable_calling">Turn on phone calls</string>
<!-- Title of preference to enable calling and SMS [CHAR LIMIT=45] -->
<string name="user_enable_calling_sms">Turn on phone calls &amp; SMS</string>
@ -23,7 +23,7 @@ index bd1076547f2..eee095c3053 100644
<string name="user_remove_user">Delete user</string>
<!-- Title for confirmation of turning on calls [CHAR LIMIT=40] -->
diff --git a/res/xml/user_details_settings.xml b/res/xml/user_details_settings.xml
index 9280ff11632..d0a055fae29 100644
index 9280ff1163..d0a055fae2 100644
--- a/res/xml/user_details_settings.xml
+++ b/res/xml/user_details_settings.xml
@@ -29,6 +29,10 @@
@ -38,10 +38,10 @@ index 9280ff11632..d0a055fae29 100644
android:key="remove_user"
android:icon="@drawable/ic_delete"
diff --git a/src/com/android/settings/users/UserDetailsSettings.java b/src/com/android/settings/users/UserDetailsSettings.java
index 897b3c7b83a..dc5dfb1dcca 100644
index 897b3c7b83..dc5dfb1dcc 100644
--- a/src/com/android/settings/users/UserDetailsSettings.java
+++ b/src/com/android/settings/users/UserDetailsSettings.java
@@ -59,6 +59,7 @@
@@ -59,6 +59,7 @@ public class UserDetailsSettings extends SettingsPreferenceFragment
private static final String KEY_ENABLE_TELEPHONY = "enable_calling";
private static final String KEY_REMOVE_USER = "remove_user";
private static final String KEY_APP_AND_CONTENT_ACCESS = "app_and_content_access";
@ -49,7 +49,7 @@ index 897b3c7b83a..dc5dfb1dcca 100644
/** Integer extra containing the userId to manage */
static final String EXTRA_USER_ID = "user_id";
@@ -78,6 +79,7 @@
@@ -78,6 +79,7 @@ public class UserDetailsSettings extends SettingsPreferenceFragment
Preference mAppAndContentAccessPref;
@VisibleForTesting
Preference mRemoveUserPref;
@ -57,7 +57,7 @@ index 897b3c7b83a..dc5dfb1dcca 100644
@VisibleForTesting
UserInfo mUserInfo;
@@ -131,12 +133,37 @@ public boolean onPreferenceClick(Preference preference) {
@@ -131,12 +133,37 @@ public class UserDetailsSettings extends SettingsPreferenceFragment
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
@ -100,7 +100,7 @@ index 897b3c7b83a..dc5dfb1dcca 100644
return true;
}
@@ -203,6 +230,7 @@ void initialize(Context context, Bundle arguments) {
@@ -203,6 +230,7 @@ public class UserDetailsSettings extends SettingsPreferenceFragment
mPhonePref = findPreference(KEY_ENABLE_TELEPHONY);
mRemoveUserPref = findPreference(KEY_REMOVE_USER);
mAppAndContentAccessPref = findPreference(KEY_APP_AND_CONTENT_ACCESS);
@ -108,7 +108,7 @@ index 897b3c7b83a..dc5dfb1dcca 100644
mSwitchUserPref.setTitle(
context.getString(com.android.settingslib.R.string.user_switch_to_user,
@@ -220,6 +248,7 @@ void initialize(Context context, Bundle arguments) {
@@ -220,6 +248,7 @@ public class UserDetailsSettings extends SettingsPreferenceFragment
removePreference(KEY_ENABLE_TELEPHONY);
removePreference(KEY_REMOVE_USER);
removePreference(KEY_APP_AND_CONTENT_ACCESS);
@ -116,7 +116,7 @@ index 897b3c7b83a..dc5dfb1dcca 100644
} else {
if (!Utils.isVoiceCapable(context)) { // no telephony
removePreference(KEY_ENABLE_TELEPHONY);
@@ -244,10 +273,13 @@ void initialize(Context context, Bundle arguments) {
@@ -244,10 +273,13 @@ public class UserDetailsSettings extends SettingsPreferenceFragment
mPhonePref.setChecked(
!mDefaultGuestRestrictions.getBoolean(UserManager.DISALLOW_OUTGOING_CALLS));
mRemoveUserPref.setTitle(R.string.user_exit_guest_title);
@ -130,7 +130,7 @@ index 897b3c7b83a..dc5dfb1dcca 100644
}
if (RestrictedLockUtilsInternal.hasBaseUserRestriction(context,
UserManager.DISALLOW_REMOVE_USER, UserHandle.myUserId())) {
@@ -257,6 +289,7 @@ void initialize(Context context, Bundle arguments) {
@@ -257,6 +289,7 @@ public class UserDetailsSettings extends SettingsPreferenceFragment
mRemoveUserPref.setOnPreferenceClickListener(this);
mPhonePref.setOnPreferenceChangeListener(this);
mAppAndContentAccessPref.setOnPreferenceClickListener(this);

View File

@ -1,4 +1,4 @@
From b3a0c2c5db28852b6d485542c8a4f1649a256892 Mon Sep 17 00:00:00 2001
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Fri, 6 Feb 2015 11:41:57 -0500
Subject: [PATCH] zero sensitive information with explicit_bzero
@ -8,7 +8,7 @@ Subject: [PATCH] zero sensitive information with explicit_bzero
1 file changed, 1 insertion(+)
diff --git a/init/security.cpp b/init/security.cpp
index 6cbe642c081..82fc8ca6413 100644
index 6cbe642c0..82fc8ca64 100644
--- a/init/security.cpp
+++ b/init/security.cpp
@@ -78,6 +78,7 @@ Result<void> MixHwrngIntoLinuxRngAction(const BuiltinArguments&) {

View File

@ -83,8 +83,9 @@ patchWorkspace() {
touch DOS_PATCHED_FLAG;
if [ "$DOS_MALWARE_SCAN_ENABLED" = true ]; then scanForMalware false "$DOS_PREBUILT_APPS $DOS_BUILD_BASE/build $DOS_BUILD_BASE/device $DOS_BUILD_BASE/vendor/lineage"; fi;
#source build/envsetup.sh;
source build/envsetup.sh;
#repopick -it pie-firewall;
repopick -it P_asb_2022-03;
sh "$DOS_SCRIPTS/Patch.sh";
sh "$DOS_SCRIPTS_COMMON/Enable_Verity.sh";

View File

@ -98,7 +98,7 @@ sed -i '74i$(my_res_package): PRIVATE_AAPT_FLAGS += --auto-add-overlay' core/aap
if [ "$DOS_SILENCE_INCLUDED" = true ]; then sed -i 's/messaging/Silence/' target/product/aosp_base_telephony.mk target/product/treble_common.mk; fi; #Replace the Messaging app with Silence
sed -i 's/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 17/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 28/' core/version_defaults.mk; #Set the minimum supported target SDK to Pie (GrapheneOS)
awk -i inplace '!/Email/' target/product/core.mk; #Remove Email
sed -i 's/2022-01-05/2022-02-05/' core/version_defaults.mk; #Bump Security String #P_asb_2022-02 #XXX
sed -i 's/2022-01-05/2022-03-05/' core/version_defaults.mk; #Bump Security String #P_asb_2022-03 #XXX
fi;
if enterAndClear "build/soong"; then
@ -311,7 +311,7 @@ applyPatch "$DOS_PATCHES/android_packages_services_Telephony/0002-More_Preferred
fi;
#if enterAndClear "system/bt"; then
#applyPatch "$DOS_PATCHES_COMMON/android_system_core/0001-alloc_size.patch"; #Add alloc_size attributes to the allocator (GrapheneOS)
#applyPatch "$DOS_PATCHES_COMMON/android_system_bt/0001-alloc_size.patch"; #Add alloc_size attributes to the allocator (GrapheneOS)
#fi;
if enterAndClear "system/core"; then

View File

@ -318,7 +318,7 @@ fi;
#fi;
if enterAndClear "system/bt"; then
applyPatch "$DOS_PATCHES_COMMON/android_system_core/0001-alloc_size.patch"; #Add alloc_size attributes to the allocator (GrapheneOS)
applyPatch "$DOS_PATCHES_COMMON/android_system_bt/0001-alloc_size.patch"; #Add alloc_size attributes to the allocator (GrapheneOS)
fi;
if enterAndClear "system/core"; then

View File

@ -332,7 +332,7 @@ fi;
if enterAndClear "system/bt"; then
git am "$DOS_PATCHES/android_system_bt/a2dp-master-fixes.patch"; #topic
applyPatch "$DOS_PATCHES_COMMON/android_system_core/0001-alloc_size.patch"; #Add alloc_size attributes to the allocator (GrapheneOS)
applyPatch "$DOS_PATCHES_COMMON/android_system_bt/0001-alloc_size.patch"; #Add alloc_size attributes to the allocator (GrapheneOS)
fi;
if enterAndClear "system/core"; then
@ -355,8 +355,8 @@ fi;
if enterAndClear "system/sepolicy"; then
applyPatch "$DOS_PATCHES/android_system_sepolicy/0002-protected_files.patch"; #Label protected_{fifos,regular} as proc_security (GrapheneOS)
if [ "$DOS_GRAPHENE_PTRACE_SCOPE" = true ]; then
applyPatch "$DOS_PATCHES/android_system_sepolicy/003-ptrace_scope-1.patch"; #Allow init to control kernel.yama.ptrace_scope (GrapheneOS)
applyPatch "$DOS_PATCHES/android_system_sepolicy/003-ptrace_scope-2.patch"; #Allow system to use persist.native_debug (GrapheneOS)
applyPatch "$DOS_PATCHES/android_system_sepolicy/0003-ptrace_scope-1.patch"; #Allow init to control kernel.yama.ptrace_scope (GrapheneOS)
applyPatch "$DOS_PATCHES/android_system_sepolicy/0003-ptrace_scope-2.patch"; #Allow system to use persist.native_debug (GrapheneOS)
fi;
git am "$DOS_PATCHES/android_system_sepolicy/0001-LGE_Fixes.patch"; #Fix -user builds for LGE devices
patch -p1 < "$DOS_PATCHES/android_system_sepolicy/0001-LGE_Fixes.patch" --directory="prebuilts/api/30.0";