Treehugger Robot
2f8ccc57a1
Merge changes from topics "crashapi2", "crashapi3" into main am: 30c7aad06d
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2961904
Change-Id: I36d33a95fbd92f2fee23c4f50061e1b7e0aadabc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-21 08:30:41 +00:00
Florian Mayer
4bd5112e33
Allow to re-use the same crash_detail. am: e2aefc46e7
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2962622
Change-Id: I5f886e0a3f609f06f0679a6d71103a83841a64e9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-21 08:30:35 +00:00
Treehugger Robot
30c7aad06d
Merge changes from topics "crashapi2", "crashapi3" into main
...
* changes:
header and android_crash_detail prefix for crash_detail API
Allow to re-use the same crash_detail.
2024-02-21 07:42:42 +00:00
Jooyung Han
35bdfa040f
use /system/bin/sh for all
...
Since Treble, /vendor components has been using /vendor/bin/sh. But this
gets complicated with APEXes, /odm, apps, etc. We now switch back to
/system/bin/sh for all domains. In practice, this should be okay because
/system/bin/sh is almost stable.
Bug: 324142245
Test: system("readlink /proc/$$/exe") in vendor components
Change-Id: Id830aa8281e7cbda1f15474174c38d8e28dc358b
2024-02-21 16:02:22 +09:00
Florian Mayer
ca4749af30
header and android_crash_detail prefix for crash_detail API
...
Bug: 155462331
Change-Id: Ib1c0ac76d2bd036a6b802b0997d9de8be61dfd2b
2024-02-20 23:41:38 +00:00
Florian Mayer
ce81e05947
Merge "Reland^2 "[MTE] remap stacks with PROT_MTE when requested by dlopened library"" into main am: ca6861e8ad
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2966402
Change-Id: If7b9af86bdb351223ccef47376aa8326e9dca7e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-17 00:24:50 +00:00
Elliott Hughes
140e4d35c0
grp_pwd_test: Hack around "trunk stable".
...
The 2024Q builds don't have their own branches like QPR builds used to,
and there's no API bump until V proper, so the same CTS build needs to
cope with both last year's Android release _and_ the one that doesn't
have an API level yet. So poke holes in the uid test to support these
mismatches.
This runs the risk of allowing accidental misuse in U of the very uids
that will definitely be used in V, so check that _if_ the uids do exist,
they have the names we're expecting them to have. That should make
accidents easier to spot?
Bug: http://b/322256445
Test: treehugger
Change-Id: I3b24b8fafe20012df70c73589b40dba5a10e50e9
2024-02-17 00:14:55 +00:00
Florian Mayer
ca6861e8ad
Merge "Reland^2 "[MTE] remap stacks with PROT_MTE when requested by dlopened library"" into main
2024-02-16 23:43:18 +00:00
Elliott Hughes
bb009466b6
Merge "Clean up and explain libs_utils.h^WCHECK.h." into main am: 1529990938
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2966822
Change-Id: I33b321578760c3dcf0c10ddf704386508fa2938d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-16 16:27:01 +00:00
Elliott Hughes
1529990938
Merge "Clean up and explain libs_utils.h^WCHECK.h." into main
2024-02-16 15:55:42 +00:00
Jernej Virag
2b11b65adc
Merge "Revert "use /system/bin/sh for new vendor partition"" into main am: 44890f9e52
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2967125
Change-Id: I9c32037ef8076875c4c72dbd6cf47fab41e9ffa2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-16 10:49:56 +00:00
Jernej Virag
44890f9e52
Merge "Revert "use /system/bin/sh for new vendor partition"" into main
2024-02-16 10:13:22 +00:00
Joonhun Shin
780e8eac5a
Revert "use /system/bin/sh for new vendor partition"
...
Revert submission 2964802-sh_path
Reason for revert: <b/325569171>
Reverted changes: /q/submissionid:2964802-sh_path
Change-Id: Ie050cf1f402bbf599a00633a8c2a911334ae848b
2024-02-16 09:22:47 +00:00
Jooyung Han
a97819cf51
Merge "use /system/bin/sh for new vendor partition" into main am: 1a1d7a189e
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2963307
Change-Id: I4baedf7bf55cf727b4e192885e64d2f8d3e24ad1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-16 07:58:34 +00:00
Jooyung Han
1a1d7a189e
Merge "use /system/bin/sh for new vendor partition" into main
2024-02-16 06:56:45 +00:00
Florian Mayer
e65e1939a1
Reland^2 "[MTE] remap stacks with PROT_MTE when requested by dlopened library"
...
Also enable stack MTE if main binary links in a library that needs it.
Otherwise the following is possible:
1. a binary doesn't require stack MTE, but links in libraries that use
stg on the stack
2. that binary later dlopens a library that requires stack MTE, and our
logic in dlopen remaps the stacks with MTE
3. the libraries from step 1 now have tagged pointers with missing tags
in memory, so things go wrong
This reverts commit f53e91cc81
.
Reason for revert: Fixed problem detected in b/324568991
Test: atest memtag_stack_dlopen_test with MTE enabled
Test: check crash is gone on fullmte build
Change-Id: I4a93f6814a19683c3ea5fe1e6d455df5459d31e1
2024-02-15 17:47:19 -08:00
Elliott Hughes
3ed6e722e3
Clean up the <netinet/ether.h> implementation.
...
Test: treehugger
Change-Id: Ifd8bf344583b74737a05b80e30373ab7bef94f8d
2024-02-16 01:23:46 +00:00
Elliott Hughes
611019b5a4
Clean up and explain libs_utils.h^WCHECK.h.
...
Test: treehugger
Change-Id: I73d6ed21520a0c2659826d1c01479917ed9b388d
2024-02-15 17:08:28 -08:00
Jooyung Han
c03b656a94
use /system/bin/sh for new vendor partition
...
For devices with ro.board.api_level >= 202404, use /system/bin/sh for
all domains include /vendor and other partitions.
Bug: 324142245
Test: system("readlink /proc/$$/exe") in vendor components
Change-Id: Ifa4f38e542377ce1482516fba4f0001c09c5a869
2024-02-16 00:25:33 +00:00
Elliott Hughes
886193648e
Merge "Simplify our trivial initgroups(), and add a test." into main am: 76cab44ab1
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2961910
Change-Id: I9482bd663857e9a522d871123cfdc5fecc44e911
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-15 23:34:11 +00:00
Elliott Hughes
76cab44ab1
Merge "Simplify our trivial initgroups(), and add a test." into main
2024-02-15 23:04:02 +00:00
Treehugger Robot
7530f81bbf
Merge "dlopen tests: silence warnings." into main am: 87843127b5
...
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2962679
Change-Id: I214d7470ed785a8f924d562a0858a78908ce04dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-15 07:52:57 +00:00
Treehugger Robot
87843127b5
Merge "dlopen tests: silence warnings." into main
2024-02-15 04:50:36 +00:00
Elliott Hughes
6a45884851
Simplify our trivial initgroups(), and add a test.
...
initgroups() is just a call to getgrouplist() followed by a call to
setgroups(). The tricky part is memory allocation. OpenBSD allocates an
NGROUPS_MAX-sized array of gid_t on the stack. FreeBSD allocates a
sysconf(_SC_NGROUPS_MAX)-sized array of gid_t on the heap. bionic had a
mix where it would try a 2-element stack array but fall back to a heap
allocation, which sounds reasonable if you want to avoid a 256KiB
(64Ki*4 bytes) allocation on either stack or heap. But that constant 2?
That's weird in two ways... It's really small (musl has an NGROUPS_MAX
of 32 unlike the Linux kernel's 64Ki, but 32 is still a lot larger than
2), but at the same time it's too big --- bionic's getgrouplist() always
returns a single element.
So although the FreeBSD "what the hell, let's just allocate 256KiB on
the heap" implementation would have been fine, there's really no point,
and anyone who's trying to understand initgroups() on Android really
needs to read getgroupslist() anyway, so let's just have the most
trivial implementation -- a single-element array -- and let's have it
right next to getgroupslist() in the same file as all the other <grp.h>
functions.
Also add a trivial smoke test. You mostly won't have permission to do
anything interesting with initgroups(), and it's basically unused save
for privilege dropping tcpdump and strace, but we may as well make an
effort. (I tested tcpdump before and after too.)
Test: treehugger
Change-Id: I67fe02e309ed1dbefc490c01733738363ca606be
2024-02-14 17:19:14 -08: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
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
3f7be222ed
dlopen tests: silence warnings.
...
A workaround for an earlier bug was causing set-but-not-used warnings.
Test: treehugger
Change-Id: I00ad83377560c0ea7aaa7c17c62a1cfb02023c16
2024-02-14 21:34:02 +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
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
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
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
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