Commit graph

43334 commits

Author SHA1 Message Date
Nick Desaulniers
0a0cde28a9 Merge "Use inline keyword without underscores consistently" into main am: 0be8f184c2 am: 691cbf4413
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3047053

Change-Id: I6beee57c5b2241dae51b97095ddde2a42a6b4ec0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 22:11:21 +00:00
Nick Desaulniers
ceed466d60 libc: remove __size_mul_overflow
We should just be able to use __builtin_umull_overflow now, which expects
unsigned long parameters. We don't need __builtin_umul_overflow (which expects
unsigned ints) because Bionic is LP64 or ILP32, so for ILP32
sizeof(size_t) == sizeof(unsigned long),
so __builtin_umull_overflow will work for either ILP32 or LP64.

Test: mm
Change-Id: I872491731bca05e561767f8bfeda4c6704e10ccb
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2024-04-17 14:54:57 -07:00
Nick Desaulniers
691cbf4413 Merge "Use inline keyword without underscores consistently" into main am: 0be8f184c2
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3047053

Change-Id: I666a226ef7552200df88219108f9a9ad032f9f23
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 21:37:22 +00:00
Nick Desaulniers
0be8f184c2 Merge "Use inline keyword without underscores consistently" into main 2024-04-17 21:19:27 +00:00
Treehugger Robot
0d9c79b5fa Merge "Clean up __always_inline" into main am: 0b1161d9b5 am: 965f3b9858
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3047052

Change-Id: Iddaac0f232839dd87e3593120564e8cf260ddabb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 21:05:09 +00:00
Treehugger Robot
965f3b9858 Merge "Clean up __always_inline" into main am: 0b1161d9b5
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3047052

Change-Id: I0d34c45bcef8ef91b20bec04670faea3445fec30
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 20:46:29 +00:00
Treehugger Robot
0b1161d9b5 Merge "Clean up __always_inline" into main 2024-04-17 20:19:14 +00:00
Nick Desaulniers
58f06e1112 Use inline keyword without underscores consistently
s/__inline__/inline
s/__inline/inline

Change-Id: I5d8d930a7a41d678a0795e7a608dacbb9eb8cb37
2024-04-17 10:51:09 -07:00
Nick Desaulniers
c574f79afa Clean up __always_inline
While studying the implementation of POSIX pthread_rwlock* functions, I noticed
that two functions were marked __always_inline twice. "They must really mean it
this time."

Also add back `inline` keyword to one other usage of __always_inline to be
consistent with other uses of __always_inline throughout the codebase.

Change-Id: Ibf9eaed5fc9fd03afcdd969cff82dec71a8ce30f
2024-04-17 10:50:41 -07:00
Kalesh Singh
fd35cebe0c [automerger skipped] ReadPadSegmentNote: Skip PT_NOTEs that are beyond the end of the file am: 23a3482169 -s ours
am skip reason: Merged-In I39365064e6c1538b0be1114479557d94a72ee369 with SHA-1 751bb8ae9d is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bionic/+/26933638

Change-Id: I60859ffcf3c29159846eb1eaea50f1c70db2adb5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 08:34:35 +00:00
Florian Mayer
4ccd3b2501 Merge "Fix incorrect links" into main am: 08b1404cc2 am: fc8c3ef3bd
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3045612

Change-Id: If6b6709adad5e4ad358c68de5d794b73eb3e6588
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-16 23:43:08 +00:00
Florian Mayer
fc8c3ef3bd Merge "Fix incorrect links" into main am: 08b1404cc2
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3045612

Change-Id: I7f0aeedb8bc1367e7580a368ccb930b8d1d3d2c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-16 23:24:42 +00:00
Florian Mayer
08b1404cc2 Merge "Fix incorrect links" into main 2024-04-16 23:03:22 +00:00
Florian Mayer
7d098bbee7 Fix incorrect links
Change-Id: Iee24c6b2e1a63d01359dadd5af7499fa3b4abaa5
2024-04-16 21:12:40 +00:00
Treehugger Robot
46536fed87 Merge "tlsdesc_resolver.S: use L() macro for local labels." into main am: 6b776d9db2 am: 1e1f0a04e9
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3031804

Change-Id: I2c4ff47242c7729e7d36f2d58604aa076450c0cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-16 17:55:50 +00:00
Treehugger Robot
1e1f0a04e9 Merge "tlsdesc_resolver.S: use L() macro for local labels." into main am: 6b776d9db2
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3031804

Change-Id: I243b8011acc930c4430f9c845bfa4a89cb9965f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-16 17:34:37 +00:00
Treehugger Robot
6b776d9db2 Merge "tlsdesc_resolver.S: use L() macro for local labels." into main 2024-04-16 17:01:35 +00:00
Christopher Ferris
b830ddf90e Update to v6.8 kernel headers.
Kernel headers coming from:

Git: https://android.googlesource.com/kernel/common/
Branch: android-mainline
Tag: android-mainline-6.8

Test: Builds and bionic unit tests pass on raven.
Test: Able to log in to an Android GO 32 bit device.
Change-Id: I0022cdb20c19726f526acaab2866f1e25794b77e
2024-04-16 09:49:56 -07:00
Elliott Hughes
660bc0976f Merge "Simplify Oryon ifunc resolvers." into main am: 12773b6eca am: fa167e063d
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3020174

Change-Id: I4aabfd155748bf01d5f0af6b75b908b6c5cda293
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-16 15:48:33 +00:00
Elliott Hughes
fa167e063d Merge "Simplify Oryon ifunc resolvers." into main am: 12773b6eca
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3020174

Change-Id: I5735b6860c124e4792019c30143bd268e77f3b53
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-16 15:19:40 +00:00
Elliott Hughes
12773b6eca Merge "Simplify Oryon ifunc resolvers." into main 2024-04-16 15:06:14 +00:00
Elliott Hughes
f978a85cc3 Simplify Oryon ifunc resolvers.
Mainly just factoring out the code, but there are two functional
changes here too:

1. The inline assembler was missing `volatile`, making the hwcap
check ineffective (because the compiler would sometimes move the
MIDR_EL1 read above the hwcap check).

2. The previous code accepted variants 0x0 to 0x5 while the comment
said 0x1 to 0x5. The comment was correct.

I resisted the temptation to actually have a table to search on the assumption that it'll be a while before we need such a thing.

Bug: https://issuetracker.google.com/330105715
Change-Id: I9fdc1e70e49b26ef32794b55ca5e5fd37f1163f9
2024-04-16 15:05:55 +00:00
Treehugger Robot
78689b2c41 Merge "Add LINE_MAX." into main am: e7f4506bcb am: 6abeb5852e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3034152

Change-Id: I1976c83254afc368f1b5634d3761287f22b2f024
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-15 23:43:12 +00:00
Treehugger Robot
6abeb5852e Merge "Add LINE_MAX." into main am: e7f4506bcb
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3034152

Change-Id: Icc41082fa634ce27338e4e3adfb8023636223e50
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-15 23:32:21 +00:00
Treehugger Robot
e7f4506bcb Merge "Add LINE_MAX." into main 2024-04-15 23:20:22 +00:00
Kalesh Singh
23a3482169 ReadPadSegmentNote: Skip PT_NOTEs that are beyond the end of the file
Some obfuscated ELFs have PT_NOTE headers that are past the end of the
file. Skip parsing these for crt_pad_segment note, as accesses beyond
the file will cause a SIGBUS.

Bug: 331717625
Test: Manual - Launch Guns up app
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:751bb8ae9dfbbd6aabd8ee533536ba8e8ef52431)
Merged-In: I39365064e6c1538b0be1114479557d94a72ee369
Change-Id: I39365064e6c1538b0be1114479557d94a72ee369
24D1-dev is based on 24Q2-release. Therefore, we merged this CL to 24D1-dev.
2024-04-12 02:40:28 +00:00
Treehugger Robot
4dc128d74a Merge "[[nodiscard]] the various ElfReader functions." into main am: d73b7b3e24 am: 10eef8e71d
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3038712

Change-Id: Icf3c91dd533ae6df7a008c081415f23f8858c30c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-11 00:09:42 +00:00
Treehugger Robot
10eef8e71d Merge "[[nodiscard]] the various ElfReader functions." into main am: d73b7b3e24
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3038712

Change-Id: Ie503f60cadd96a13260b03ac9310a97fa704e50f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-11 00:04:29 +00:00
Treehugger Robot
d73b7b3e24 Merge "[[nodiscard]] the various ElfReader functions." into main 2024-04-10 23:59:15 +00:00
Elliott Hughes
396868c747 [[nodiscard]] the various ElfReader functions.
These are either only useful for their side-effects, or things you
really need to check.

Change-Id: I8e231185eb7fc8656fd3cb916169661833b525bf
2024-04-10 21:52:10 +00:00
Steven Moreland
b9cf8a103d Merge "Prefer __BIONIC_DEPRECATED_PAGE_SIZE_MACRO" into main am: 117478dd4e am: 966616ee8f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3031891

Change-Id: Id87c35a07942089f752d80a3b71bfa937c411171
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-10 21:12:35 +00:00
Steven Moreland
966616ee8f Merge "Prefer __BIONIC_DEPRECATED_PAGE_SIZE_MACRO" into main am: 117478dd4e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3031891

Change-Id: Iae5942153997783191260723890ba27203ef992e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-10 21:05:38 +00:00
Steven Moreland
117478dd4e Merge "Prefer __BIONIC_DEPRECATED_PAGE_SIZE_MACRO" into main 2024-04-10 20:57:45 +00:00
Mitch Phillips
9ff08a7fb4 Merge "[GWP-ASan] Use recoverable everywhere" into main am: 4435aff516 am: 860912ccf6
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3032165

Change-Id: I85f63e2029bd32a9924c32ad3822af5b64d8a3f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-10 10:07:33 +00:00
Mitch Phillips
860912ccf6 Merge "[GWP-ASan] Use recoverable everywhere" into main am: 4435aff516
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3032165

Change-Id: I409b43a27ce65193cc3581ec73ea6955db363944
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-10 09:47:56 +00:00
Mitch Phillips
4435aff516 Merge "[GWP-ASan] Use recoverable everywhere" into main 2024-04-10 09:30:58 +00:00
Treehugger Robot
e7f640ebbe Merge "Add NGROUPS." into main am: 3db97c73a2 am: a82398e133
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3034234

Change-Id: Ic9ce21c92a2ca9b793cd92914b18d8daeba850e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-09 20:12:20 +00:00
Treehugger Robot
a82398e133 Merge "Add NGROUPS." into main am: 3db97c73a2
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3034234

Change-Id: I35c7f58477ed65d3d0913a0c9a2baa0df66d339e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-09 19:48:33 +00:00
Treehugger Robot
3db97c73a2 Merge "Add NGROUPS." into main 2024-04-09 19:33:36 +00:00
Treehugger Robot
407c012b30 Merge "<sys/shm.h>: fix a hard-coded 4096 page size." into main am: 2f526fb4d1 am: 50188425b0
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3034233

Change-Id: Ie550fddfaa129510d2fa049b24b70e5cb17eae51
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-09 18:25:36 +00:00
Treehugger Robot
50188425b0 Merge "<sys/shm.h>: fix a hard-coded 4096 page size." into main am: 2f526fb4d1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3034233

Change-Id: Ia83a28d045b12645c944cba26321a29fa8311242
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-09 18:07:20 +00:00
Treehugger Robot
2f526fb4d1 Merge "<sys/shm.h>: fix a hard-coded 4096 page size." into main 2024-04-09 17:52:17 +00:00
Elliott Hughes
e5bd239ba1 Add NGROUPS.
Historical code still uses this, and people work around its absence
locally. All of iOS/macOS and musl/glibc have this.

Change-Id: I119834f535b346275be5fa1df3c323eee9e242cc
2024-04-09 16:48:18 +00:00
Elliott Hughes
f666d822bd <sys/shm.h>: fix a hard-coded 4096 page size.
Change-Id: I932b1ea44ab6a54a2e4d2bcd1577c6f5859f583a
2024-04-09 16:40:27 +00:00
Steven Moreland
a69e5af7ee Prefer __BIONIC_DEPRECATED_PAGE_SIZE_MACRO
Platform and future NDK releases will have no PAGE_SIZE by default,
unless __BIONIC_DEPRECATED_PAGE_SIZE_MACRO is specified.

This ensures that when people use these headers with non-standard build
systems, they will still become aware of the changes.

Bug: 312546062
Test: build/boot
Change-Id: I29f5de2cd5d59d3cefdd45a6da1ccdd7c12f1f19
2024-04-09 16:35:15 +00:00
Elliott Hughes
b266f6522f Add LINE_MAX.
LINE_MAX is a bad idea from the 1970s that we've ignored until now,
but there's already one hack in the AOSP tree (external/ltp) to work
around its absence, and kselftests would need another. Both uses are
bad code, but bad code exists, and iOS/macOS and musl/glibc all have
the same 2048 value, and it is in POSIX, so at least it's consistent
idiocy. Hopefully we're not encouraging more of it!

Bug: https://github.com/llvm/llvm-project/issues/88119
Change-Id: Ief219c3fe20b3d95da7040c4b9411f997b1c0470
2024-04-09 15:41:10 +00:00
Mitch Phillips
aa8c229e7d [GWP-ASan] Use recoverable everywhere
Use recoverable mode for system processes and system apps as well.
Given we're a sampled bug detector anyway, why not let these processes
continue. This might save some user experience if something ends up
crashing that requires a SysUI reboot (like system_server). And, hey,
starting up processes is expensive.

Bug: N/A
Test: atest CtsGwpAsanTestCases
Change-Id: Ia6be4fcf3b3ed55a3089587d060aba7ab318cf97
2024-04-09 12:35:31 +02:00
Elliott Hughes
07c0dbb9fd Merge "riscv64: use L() in the handful of places we didn't already." into main am: 252ed5704a am: 0c95ef70fa
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3031963

Change-Id: I4fb8833b2273c1b7f3b8c72c12e4576c3865b763
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 22:08:43 +00:00
Elliott Hughes
091fc36c10 Merge "arm64: use L() in the handful of places we didn't already." into main am: b064be8bcf am: 524b0fd2db
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3031965

Change-Id: Ieba7f3e1536736499fada9d9d5d09e3c579a1232
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 22:08:29 +00:00
Elliott Hughes
0c95ef70fa Merge "riscv64: use L() in the handful of places we didn't already." into main am: 252ed5704a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3031963

Change-Id: Ibfc448cdf4609ecbb8e130db166efb13d9d3ee9e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 21:51:12 +00:00