Commit graph

42617 commits

Author SHA1 Message Date
Treehugger Robot
a2c712c940 Merge "Revert^3 "[MTE] remap stacks with PROT_MTE when requested by dlopened library"" into main am: 469568b94a am: 37bea4ec73
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2957057

Change-Id: Ieaca004a0afe921839ade69c4eab9291773982e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-15 01:03:24 +00:00
Treehugger Robot
37bea4ec73 Merge "Revert^3 "[MTE] remap stacks with PROT_MTE when requested by dlopened library"" into main am: 469568b94a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2957057

Change-Id: Iaa45c5c3038467fbbeaab93d51e96dd11707c6bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-15 00:22:54 +00:00
Treehugger Robot
469568b94a Merge "Revert^3 "[MTE] remap stacks with PROT_MTE when requested by dlopened library"" into main 2024-02-14 23:48:49 +00:00
Elliott Hughes
c057791a54 Merge "Fix sysconf(_SC_NGROUPS_MAX)." into main am: b28adb35bd am: 976f598cf3
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2962906

Change-Id: Id7e2b5bea5186a988aa535434ecd3291fe6800db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 22:19:21 +00:00
Elliott Hughes
56a4668104 Merge "Move three legacy .c files to .cpp." into main am: 5a1f29e6cf am: 6995b4ae5c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2962068

Change-Id: Ibf6fe758089df0d5f0ef1c5be58e114228627ab3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 22:16:18 +00:00
Elliott Hughes
976f598cf3 Merge "Fix sysconf(_SC_NGROUPS_MAX)." into main am: b28adb35bd
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2962906

Change-Id: Id7759b3ebaee591c886c680bd4b14db08654bbb1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 21:38:18 +00:00
Elliott Hughes
6995b4ae5c Merge "Move three legacy .c files to .cpp." into main am: 5a1f29e6cf
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2962068

Change-Id: Iba01335f37b4f7abbbdd248143fe9b5c315b35f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 21:37:55 +00:00
Elliott Hughes
b28adb35bd Merge "Fix sysconf(_SC_NGROUPS_MAX)." into main 2024-02-14 21:17:29 +00:00
Elliott Hughes
5a1f29e6cf Merge "Move three legacy .c files to .cpp." into main 2024-02-14 20:55:50 +00:00
Florian Mayer
f53e91cc81 Revert^3 "[MTE] remap stacks with PROT_MTE when requested by dlopened library"
This reverts commit a453c2df74.

Reason for revert: b/324568991

Bug: 324568991
Change-Id: Ia6250ebe51c505bd4b77af2b4ff4e95c8b370acd
2024-02-14 18:50:42 +00:00
Lev Rumyantsev
eeb29b51be Merge "Remove unused define" into main am: eca232d514 am: 114830dc83
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2963522

Change-Id: I08f796ce6165d0588e24519c150d28800c36d8ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 18:27:03 +00:00
Florian Mayer
aa1bc0bfda Merge "Add API to allow apps to attach extra information to tombstones." into main am: 50f4d83960 am: ff5de237b4
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2955867

Change-Id: I874dd57aec72347be3c920f3c4e859a0e4191601
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 18:26:11 +00:00
Lev Rumyantsev
114830dc83 Merge "Remove unused define" into main am: eca232d514
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2963522

Change-Id: If40a6f3f5bf5c278654e0d8faa243a83303bb068
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 17:41:36 +00:00
Florian Mayer
ff5de237b4 Merge "Add API to allow apps to attach extra information to tombstones." into main am: 50f4d83960
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2955867

Change-Id: I7c8fa3892054dc4c069583c5bce8bbc674c61ab5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 17:40:42 +00:00
Lev Rumyantsev
eca232d514 Merge "Remove unused define" into main 2024-02-14 17:35:29 +00:00
Florian Mayer
50f4d83960 Merge "Add API to allow apps to attach extra information to tombstones." into main 2024-02-14 17:06:07 +00:00
Treehugger Robot
496b0d635f Merge "bionic: ReadPadSegmentNote: Fix print format warnings" into main am: ec49465334 am: f32740277e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2963403

Change-Id: I51a477f66e8ceee70cfed3b428a57b900666eb69
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 16:56:51 +00:00
Treehugger Robot
f32740277e Merge "bionic: ReadPadSegmentNote: Fix print format warnings" into main am: ec49465334
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2963403

Change-Id: I26e1d9cbf4a5ef9c413cb8041c1e75f2b40c96be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 16:16:12 +00:00
Treehugger Robot
ec49465334 Merge "bionic: ReadPadSegmentNote: Fix print format warnings" into main 2024-02-14 15:44:43 +00:00
Zheng Pan
72436e3d53 Merge changes from topic "revert-2803156-loader_crt_pad_segment-HJBTSCOMQA" into main am: 7e0598bd61 am: 09e06f0349
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2962067

Change-Id: I89d9bd69cdb71402715f42c26bea93f0c76f41f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 06:03:05 +00:00
Zheng Pan
09e06f0349 Merge changes from topic "revert-2803156-loader_crt_pad_segment-HJBTSCOMQA" into main am: 7e0598bd61
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2962067

Change-Id: I98196721bbd8c793fb368c00d70a607ec0ceda04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-14 04:40:33 +00:00
Zheng Pan
7e0598bd61 Merge changes from topic "revert-2803156-loader_crt_pad_segment-HJBTSCOMQA" into main
* changes:
  Revert "bionic: loader: Extend LOAD segment VMAs"
  Revert "bionic: loader: Extend GNU_RELRO protection"
2024-02-14 03:52:43 +00:00
Lev Rumyantsev
69e72105bb Remove unused define
Change-Id: I1442c127d7f92059a02eecac24951297155853d7
2024-02-14 03:35:17 +00:00
Kalesh Singh
32b6d8c90f bionic: ReadPadSegmentNote: Fix print format warnings
Test: m; // No warnings
Bug: N/A
Change-Id: I88c56fe6069ddb07c83a2e799b42af4f20e83165
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2024-02-13 18:37:23 -08:00
Elliott Hughes
b3877437cd Fix sysconf(_SC_NGROUPS_MAX).
The previous implementation wasn't wrong (it returned the "maximum
maximum"), but we can return the actual runtime value from the kernel.

Noticed while looking at initgroups().

Test: treehugger
Change-Id: I891fe4ff29bd82ee05d9e05ed8299d32c21abd7f
2024-02-13 16:48:30 -08:00
Elliott Hughes
17e4068bda Move three legacy .c files to .cpp.
Test: treehugger
Change-Id: Ic22896d25881fe35f28bad53c5412e3e1d4b2661
2024-02-13 16:36:11 -08:00
Zheng Pan
92a7e1c55c Revert "bionic: loader: Extend LOAD segment VMAs"
Revert submission 2803156-loader_crt_pad_segment

Reason for revert: b/324952273

Reverted changes: /q/submissionid:2803156-loader_crt_pad_segment

Change-Id: I8af115c426c0113914abbf8fbd3e74c0d89408d1
2024-02-14 00:04:10 +00:00
Zheng Pan
9535c32e1c Revert "bionic: loader: Extend GNU_RELRO protection"
Revert submission 2803156-loader_crt_pad_segment

Reason for revert: b/324952273

Reverted changes: /q/submissionid:2803156-loader_crt_pad_segment

Change-Id: I22d4ae1972c5de7da908eb090a2fea5565ead88b
2024-02-14 00:04:10 +00:00
Treehugger Robot
f87fc992e8 Merge "llvm-readelf only accepts --headers." into main am: 704cd26c33 am: 92f515bb72
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2961462

Change-Id: I93acf4906d9058281853445588d7efba11ba5e5c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-13 23:45:53 +00:00
Elliott Hughes
456928cce4 Merge "Admit to another LP32 bug." into main am: 4674a3fe36 am: e4066859e4
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2959270

Change-Id: Ib5ed566a6d4b0d7dd9e17a40d6b93c5a24aa9d5f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-13 23:45:13 +00:00
Treehugger Robot
92f515bb72 Merge "llvm-readelf only accepts --headers." into main am: 704cd26c33
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2961462

Change-Id: I15a6f69b9b932b8b28856f0a4342b3d114282528
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-13 23:04:08 +00:00
Elliott Hughes
e4066859e4 Merge "Admit to another LP32 bug." into main am: 4674a3fe36
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2959270

Change-Id: I3928e3107bce86b10fd99d78678ec8f7bb8d406f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-13 23:03:32 +00:00
Treehugger Robot
704cd26c33 Merge "llvm-readelf only accepts --headers." into main 2024-02-13 22:26:51 +00:00
Elliott Hughes
4674a3fe36 Merge "Admit to another LP32 bug." into main 2024-02-13 22:24:48 +00:00
Florian Mayer
7c83d09679 Add API to allow apps to attach extra information to tombstones.
Test: atest debuggerd_test
Bug: 155462331
Bug: 309446525
Change-Id: Idc8387307738957dbba3daaae59f605566329f0f
2024-02-13 13:41:12 -08:00
Elliott Hughes
8e4e6f9805 llvm-readelf only accepts --headers.
GNU readelf accepts both `--header` and `--headers`, but we don't ship
that in the NDK any more, so anyone on macOS or Windows will hit this
incompatibility (even though Linux users are probably still using GNU
readelf).

Test: treehugger
Change-Id: I61eb389d4d9c0bc4f5d75ceefeb5709345299585
2024-02-13 15:25:13 +00:00
Elliott Hughes
8880cab65c Admit to another LP32 bug.
But explain why we're not going to bother fixing it.

Test: treehugger
Change-Id: Ib7358fceff10f80b9e359ea3f4d088c64d440021
2024-02-13 00:43:24 +00:00
Nick Desaulniers
9c9248b474 Merge "libc/Android.bp: make libc_headers visible to llvm-libc" into main am: d74f255a50 am: 2add976832
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2957803

Change-Id: Idf8c0e3c86be1b5836fcf25f5f55183d3c4d4772
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-12 22:28:29 +00:00
Nick Desaulniers
2add976832 Merge "libc/Android.bp: make libc_headers visible to llvm-libc" into main am: d74f255a50
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2957803

Change-Id: Ic4dcd7b9d032cc775057b5e3cc5306d50452be26
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-12 22:03:07 +00:00
Elliott Hughes
08dc62e447 Merge "libc/Android.bp: more cleanup." into main am: 16da14df14 am: 048c52b92b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2956138

Change-Id: I7f2ee4ebb166dd1d0d1d04e605cf7482f20c3099
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-12 22:00:34 +00:00
Elliott Hughes
048c52b92b Merge "libc/Android.bp: more cleanup." into main am: 16da14df14
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2956138

Change-Id: I287684dfd59d42abcc479886ceac6ace76257060
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-12 21:19:56 +00:00
Nick Desaulniers
d74f255a50 Merge "libc/Android.bp: make libc_headers visible to llvm-libc" into main 2024-02-12 21:13:33 +00:00
Elliott Hughes
16da14df14 Merge "libc/Android.bp: more cleanup." into main 2024-02-12 20:40:48 +00:00
Kalesh Singh
e55ae41d3e Merge "bionic: ReadPadSegmentNote: Skip empty PT_NOTEs" into main am: d90d990468 am: d985b390d6
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2954562

Change-Id: Iad31494eaa82ee29a99a85064c3d9f9b81c114d1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-12 18:50:18 +00:00
Nick Desaulniers
942ae55dc4 libc/Android.bp: make libc_headers visible to llvm-libc
llvm-libc will reuse parts of the existing system headers for types that have
implications on the ABI.

Fixes:
    error: external/llvm-libc/Android.bp:3:1: module "llvmlibc" variant
    "android_recovery_riscv64_static": depends on //bionic/libc:libc_headers
    which is not visible to this module You may need to add
    "//external/llvm-libc" to its visibility

Test: TH
Bug: 321313756
Change-Id: I33b93d8e1617a480249641dc2cdf4bbee9f9e19d
2024-02-12 10:28:40 -08:00
Kalesh Singh
d985b390d6 Merge "bionic: ReadPadSegmentNote: Skip empty PT_NOTEs" into main am: d90d990468
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2954562

Change-Id: I559d9b791801f0fc8be16515cf2343121c389184
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-12 18:00:22 +00:00
Kalesh Singh
d90d990468 Merge "bionic: ReadPadSegmentNote: Skip empty PT_NOTEs" into main 2024-02-12 17:28:57 +00:00
Kalesh Singh
13fb3cfb23 bionic: ReadPadSegmentNote: Skip empty PT_NOTEs
Some obfuscated ELFs may containe "empty" PT_NOTEs (p_memsz == 0).
Attempting to mmap these will cause a EINVAL failure since the requested
mapping size is zero.

Skip these phrogram headers when parsing notes.

Also improve the failure log with arguments to the mmap syscall.

Test: Platinum Tests
Bug: 324468126
Change-Id: I7de4e55c6d221d555faabfcc33bb6997921dd022
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2024-02-09 16:57:49 -08:00
Treehugger Robot
dc76ea7c2a Merge "Update linker/NOTICE." into main am: 3da4f9d7ad am: fde8cd20d7
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2956137

Change-Id: I8c334920559aba323006e86e3b56d4795e2e054a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-10 00:28:14 +00:00
Treehugger Robot
fde8cd20d7 Merge "Update linker/NOTICE." into main am: 3da4f9d7ad
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2956137

Change-Id: I80f5d82d22d4818491663c8c887e12b87d3f0d70
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-09 23:47:32 +00:00