Commit graph

43186 commits

Author SHA1 Message Date
AdityaK
4250342124 [RISC-V] Add misaligned load store tests
hwprobe test may be insufficient to guarantee fast (or even supported) unaligned access.

Bug: https://github.com/google/android-riscv64/issues/142
Bug: https://github.com/llvm/llvm-project/issues/88029

Change-Id: Ib673c5b752da8630296926e5ec7f59f41b686016
2024-04-23 13:17:04 -07:00
Elliott Hughes
c5d41a55f0 Merge "Always use __foo__ for attribute names." into main am: 5063d26249
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3053202

Change-Id: Ib9254a28ce7853369d48567cd7ccf335ff143681
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-23 00:29:10 +00:00
Elliott Hughes
5063d26249 Merge "Always use __foo__ for attribute names." into main 2024-04-23 00:12:32 +00:00
Treehugger Robot
f21e5164b2 Merge "Replace commented-out deprecated attribute with doc comment." into main am: ae038dcdea
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3053223

Change-Id: I140f88208cb45e2ad216aca831af8dbd53d99d74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-22 22:39:11 +00:00
Treehugger Robot
ae038dcdea Merge "Replace commented-out deprecated attribute with doc comment." into main 2024-04-22 22:34:41 +00:00
Elliott Hughes
52475d9249 Merge "__system_property_set: add string names for init's error codes." into main am: 899d809bca
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3053422

Change-Id: I6e99edb16376c117a5b3ab49fabf2fb5a7aaa545
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-22 22:34:17 +00:00
Elliott Hughes
899d809bca Merge "__system_property_set: add string names for init's error codes." into main 2024-04-22 22:18:15 +00:00
Elliott Hughes
a933582f3e __system_property_set: add string names for init's error codes.
https://issuetracker.google.com/336223505 is not the first
hard-to-read bug here.

Change-Id: I520aeb2cb87423f8db394bf4709d659e3eb3a309
2024-04-22 22:18:06 +00:00
Elliott Hughes
9b9371bd0e Replace commented-out deprecated attribute with doc comment.
This attribute had been commented out since it was first
committed a decade ago. No-one's going to chase down arm32-only
trivia like that before arm32 and x86 are removed as obsolete...

Change-Id: I8e29d16657b3f4ce379e65732d747f969ea31dae
2024-04-22 20:17:22 +00:00
Elliott Hughes
a1b5ca2fe0 Always use __foo__ for attribute names.
To avoid collisions with other macros.

Change-Id: I015639043deaceccaf5f11365f8bdc45ca703da5
2024-04-22 20:10:53 +00:00
chenxinyuanchen
8d7c0f4f09 linker: use realpath instead of readlink when getting the symlink path
Fix the issue if link for an symlink that point to an relative path
cause the linker can not find the right absolute path.

For example:
lrwxr-xr-x 1 root shell 13 2009-01-01 08:00 /system/bin/app_process -> app_process64

the '/system/bin/app_process' is symlinked to 'app_process64' and will be failed.

if the 'exe_to_load' is null and also failed when stat '/proc/self/exe'
will entered this path.

Without Patch:
  [ Linking executable "app_process64" ]
  linker: CANNOT LINK EXECUTABLE "/system/bin/app_process": library "libnativeloader.so" not found: needed by main executable

With Patch:
  [ Linking executable "/system/bin/app_process64" ]
  [ Using config section "system" ]
  [ Jumping to _start (0x75593c3000)... ]

Test: Manual - Run app_process (symlinked to app_process64)

Change-Id: Iacd0a810a679e8d55d68d7e4c84f0e5e4f276b14
Signed-off-by: chenxinyuanchen <chenxinyuanchen@xiaomi.com>
Signed-off-by: chenxinyuanchen <chenxinyuanchen@xiaomi.corp-partner.google.com>
2024-04-22 06:44:29 +00:00
Elliott Hughes
7f1b24cbbf Merge "Document pthread_key_create(3), pthread_key_delete(3), and PTHREAD_KEYS_MAX." into main am: ed21ffc70a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3046887

Change-Id: I04e2c0670f3c523949c8d7de39e147ea6caf2d16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-20 15:32:56 +00:00
Elliott Hughes
ed21ffc70a Merge "Document pthread_key_create(3), pthread_key_delete(3), and PTHREAD_KEYS_MAX." into main 2024-04-20 15:18:56 +00:00
Nate Myren
9437444cf5 Only try to initialize appcompat properties if the folder is present
If the Init process doesn't write the appcompat system properties
folder, do not attempt to initialize it

Bug: 331307495
Test: manual
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d071e949a6153e76eb7c67e5947d4d387a8afe2d)
Merged-In: I21716ea87e55a63a1b79127887c451d0fcf006f3
Change-Id: I21716ea87e55a63a1b79127887c451d0fcf006f3
2024-04-19 19:07:34 +00:00
Elliott Hughes
7d3c6cd25c Document pthread_key_create(3), pthread_key_delete(3), and PTHREAD_KEYS_MAX.
In particular "how to work around the PTHREAD_KEYS_MAX limit".

Change-Id: I330936d598ddddfa0903f0505fd00f8fcbf02543
2024-04-18 22:02:38 +00:00
Christopher Ferris
fae7cad5e9 Merge "Update to v6.8 kernel headers." into main am: 785e161dd8
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3020411

Change-Id: I77f37f8ea8ff039162087fe27e9ace5b131c3224
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-18 16:53:30 +00:00
Christopher Ferris
785e161dd8 Merge "Update to v6.8 kernel headers." into main 2024-04-18 16:35:43 +00:00
Nick Desaulniers
af5a514bab Merge "libc: remove __size_mul_overflow" into main am: 5716586cf5
Original change: https://android-review.googlesource.com/c/platform/bionic/+/3047712

Change-Id: I38ef2e0952e5a7ebe97ca0e6d90a11531812fd77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-18 16:26:10 +00:00
Nick Desaulniers
5716586cf5 Merge "libc: remove __size_mul_overflow" into main 2024-04-18 16:09:05 +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
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
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
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
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
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
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
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
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
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
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