Commit graph

40368 commits

Author SHA1 Message Date
Treehugger Robot
cecef1f2e6 Merge "Consistent qualifier ordering." into main am: d72f4f8770
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2751987

Change-Id: Id756aecc9edded993a518cdee4d42f25b119f2d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-15 18:14:35 +00:00
Treehugger Robot
d72f4f8770 Merge "Consistent qualifier ordering." into main 2023-09-15 17:19:08 +00:00
Florian Mayer
5b2b24ead9 Merge "Remove ASan test" into main am: 6b4e6e470e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2751402

Change-Id: I29126b2233d9af55eefdf5de00af74e34fb9725d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-14 19:49:49 +00:00
Florian Mayer
6b4e6e470e Merge "Remove ASan test" into main 2023-09-14 19:19:01 +00:00
Elliott Hughes
30088848fc Consistent qualifier ordering.
Change our handful of `constexpr static`s to the much more common
`static constexpr`. It's easier to "follow existing style" when there
aren't two existing styles to copy from, and all else being equal,
"majority wins" :-)

Test: treehugger
Change-Id: Ifbf0f62ab84c9450bf9c2e49e96915c126fd20c4
2023-09-14 18:36:55 +00:00
Elliott Hughes
ba7654ad92 Add the risc-v TLSDESC relocations.
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/94 was
merged.

Bug: https://github.com/google/android-riscv64/issues/3
Test: treehugger
Change-Id: Ifc0c4d7408367f0372cec969d4ee6f84699bee30
2023-09-14 18:02:17 +00:00
Florian Mayer
12e38c23f1 Remove ASan test
ASan for device side is deprecated.
Bug: 300289881

Change-Id: I492ccbbeae43c84b53e92b062048c56ea974308e
2023-09-13 12:29:32 -07:00
Christopher Ferris
b8f3980cc4 Merge "Disable warning which is not detecting problems." into main am: a4bcacf79b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2748796

Change-Id: Ibeab3cbea7ecf3fd4c1455c74f3d46de321cd28b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-13 00:29:43 +00:00
Christopher Ferris
a4bcacf79b Merge "Disable warning which is not detecting problems." into main 2023-09-12 23:29:01 +00:00
Christopher Ferris
1de7a480bc Disable warning which is not detecting problems.
A clang update enabled -Wreorder-init-list by default. Since it doesn't
provide any benefit to the bionic code, disable the warning.

Test: Builds without warnings.
Change-Id: I5891527ef532b59dc2a02b39a5896112411d21f5
2023-09-12 13:03:02 -07:00
Christopher Ferris
74415a49e9 Merge "Update to v6.5 kernel headers." into main am: 6d2b71eb45
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2743819

Change-Id: I6e20ba79ca6757557fa8474ba0f083392cac12d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-12 18:41:20 +00:00
Christopher Ferris
6d2b71eb45 Merge "Update to v6.5 kernel headers." into main 2023-09-12 18:00:15 +00:00
Elliott Hughes
4cb7adc0c5 Merge "Remove a stray newline." into main am: 1bc2339a77
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2746054

Change-Id: I84472b08cc0e0cd0163841ad81b399a44a822c9d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 22:06:20 +00:00
Elliott Hughes
1bc2339a77 Merge "Remove a stray newline." into main 2023-09-07 21:39:05 +00:00
Elliott Hughes
5dd1582706 Remove a stray newline.
err() not only adds its own newline, it'll add the strerror() output
first, so this stray newline messes up the error message. (Seen running
bionic benchmarks not as root, which causes the std_map benchmarks to
fail, which is especially annoying because it ends the whole benchmark
run, not just the specific benchmark, but that's a less obvious fix, so
I'm just fixing the trivial part here!)

Test: treehugger
Change-Id: I7e87ea4385c410942fbdd14e6fdfddbf7320082a
2023-09-07 18:48:13 +00:00
Christopher Ferris
8666d0462f Update to v6.5 kernel headers.
Kernel headers coming from:

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

Test: Builds and bionic unit tests pass on raven.
Test: Able to log in to an Android GO 32 bit device.
Change-Id: Ia0397ce27e088bc20338bbd2d125be6f169c4ba0
2023-09-06 19:33:21 -07:00
Treehugger Robot
176f3d109d Merge "Add doc for sentinel change in preinit_array/init_array/fini_array" into main am: f3bf97003c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2741814

Change-Id: Ia57416c3b0555058d10bf43fff8d156da8c38de3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 23:39:52 +00:00
Treehugger Robot
f3bf97003c Merge "Add doc for sentinel change in preinit_array/init_array/fini_array" into main 2023-09-06 22:49:33 +00:00
Yabin Cui
bd73dcc21a Add doc for sentinel change in preinit_array/init_array/fini_array
Bug: 295944813
Bug: https://github.com/android/ndk/issues/1461
Test: none
Change-Id: I0bc90a312438b14bd3dc8b675e3083ac909f89df
2023-09-06 15:15:37 -07:00
Elliott Hughes
d95f8c7432 Merge "Greatly reduce the space used by properties filenames." into main am: 8da1746458
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2741008

Change-Id: I0a76ef5cb198e2ec0cc4d4a4c20b6bb6af408544
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 21:16:25 +00:00
Elliott Hughes
8da1746458 Merge "Greatly reduce the space used by properties filenames." into main 2023-09-06 20:52:37 +00:00
Elliott Hughes
a55b49b527 Merge "Punch a hole for clone3(2) use." into main am: fe9bd312a8
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2741006

Change-Id: I46e2255aa18d3e927e3ee1a756ea66e53fadb7df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 18:57:24 +00:00
Elliott Hughes
fe9bd312a8 Merge "Punch a hole for clone3(2) use." into main 2023-09-06 18:24:49 +00:00
Elliott Hughes
740956c856 Greatly reduce the space used by properties filenames.
These should never be particularly long, but because this code runs
before we can allocate, they have to be fixed size. Bring that size down
to 128 bytes which should be enough for anyone, and which should let us
add some new filenames in less space than we're currently using for one
filename.

Test: treehugger
Change-Id: I524d7e5ffd415ba0c3d600eb94801a304b1b4bb4
2023-09-06 18:11:50 +00:00
Colin Cross
7c48344ace Merge "Skip sysconf_cache for musl" into main am: 90eef4250e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2741813

Change-Id: Ieb656c9e8c07e3e4fb4e96d695c41cf41a8a9968
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 18:10:11 +00:00
Colin Cross
90eef4250e Merge "Skip sysconf_cache for musl" into main 2023-09-06 17:14:57 +00:00
Elliott Hughes
bcfaa004a4 Merge "Use a class for system properties filenames." into main am: 6f6df7376e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2734834

Change-Id: I7dbafaa711937b741a00e14c7e576139c57efffa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-05 23:27:10 +00:00
Elliott Hughes
6f6df7376e Merge "Use a class for system properties filenames." into main 2023-09-05 23:04:42 +00:00
Elliott Hughes
b65dec5629 Punch a hole for clone3(2) use.
With the cgroups support, this is starting to look like something we
might actually want to use one day. Start preparing now.

Test: treehugger
Change-Id: I7c015bbf6b145b66124ee9ce74816c03e51df7c8
2023-09-05 22:58:43 +00:00
Elliott Hughes
484056aaf2 Merge "Add epoll_pwait2()." into main am: 906d7d41e4
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2656904

Change-Id: I62a2f1f487678f18a602d07771a10d0fa538dfed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-05 22:42:07 +00:00
Elliott Hughes
906d7d41e4 Merge "Add epoll_pwait2()." into main 2023-09-05 21:48:08 +00:00
Colin Cross
cb5d3c1c33 Skip sysconf_cache for musl
Musl doesn't have the _SC_LEVEL?_?CACHE_SIZE sysconf macros.

Bug: 257334542
Test: m USE_HOST_MUSL=true host-native
Change-Id: I42e65daa9169e129059ddde5eee487ea51e6f143
2023-09-05 13:53:11 -07:00
Xin Li
c9eddbb41b Merge "Merge UP1A.230905.019" into aosp-main-future 2023-09-05 18:36:14 +00:00
Elliott Hughes
d19f7b1cba Use a class for system properties filenames.
This avoids copy & pasting the "did we overflow the string?" logic
everywhere.

Test: treehugger
Change-Id: Icbeb2fdb050a33efc08e1bbb7e9c1e46e48319fa
2023-09-05 18:28:55 +00:00
Yabin Cui
7ea5e44c24 Merge "Let executables not rely on sentinels in preinit_array/init_array/fini_array" into main am: 4d3903eab9
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2725997

Change-Id: Ia86ca98c161ebdc6d631ccbdd1ea416298879858
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 18:08:55 +00:00
Yabin Cui
4d3903eab9 Merge "Let executables not rely on sentinels in preinit_array/init_array/fini_array" into main 2023-09-01 17:19:26 +00:00
Yabin Cui
744cfd3720 Let executables not rely on sentinels in preinit_array/init_array/fini_array
Currently, we use sentinels (starting with -1 and ending with 0) in
preinit_array/init_array/fini_array in executables. But after using LTO,
the sentinels can be reordered by LLD and no longer work. So make below
changes to not rely on them:
  1. In crtbegin.c, use symbols (like __init_array_start) inserted by the
     linker.
  2. Add array_count fields in structors_array_t.
  3. In static libc, use array_count fields to decide array lengths.
  4. To make new dynamic executables work with old libc.so, create a fake
     fini_array with sentinels, and pass it to __libc_init. The fake
     fini_array contains a function to call functions in real fini_array.
  5. To make old dynamic executables work with new libc.so, libc.so
     still uses sentinels to decide the length of fini_array.

Bug: 295944813
Bug: https://github.com/android/ndk/issues/1461
Test: run bionic-unit-tests-static
Test: test static executables manually
Test: boot cf_gwear_x86-trunk_staging-userdebug
Change-Id: I1ce31f07bcfe0e99b4237984898a8fc9e98ff426
2023-09-01 10:17:05 -07:00
Xin Li
b7f9ac421e Merge UP1A.230905.019
Merged-In: If7e9e5f99728c2f3a18b08346b4cf3449132f920
Change-Id: I0eb839e528b7349828d9d5f9aadb22ebf6b172a7
2023-08-31 12:07:28 -07:00
Elliott Hughes
e62a9e0329 Merge "__riscv_hwprobe: don't try to set errno." into main am: 4de14c7499
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2731044

Change-Id: I9a73661a7e500e689285e62f57773b727d94ce5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-30 16:02:53 +00:00
Elliott Hughes
4de14c7499 Merge "__riscv_hwprobe: don't try to set errno." into main 2023-08-30 14:53:29 +00:00
Elliott Hughes
fce8a155df __riscv_hwprobe: don't try to set errno.
When used in an ifunc resolver, errno@plt won't be available. This is
the API the rivos folks contributing to glibc are leaning towards, for
the same reason. Hit by the berberis folks because they don't implement
the syscall so they were trying to set errno to ENOSYS.

Tested by looking at the generated assembler, and also disabling the
vdso (since on actual systems, this will go via the vdso).

Test: treehugger
Change-Id: Ie2779110f141f20efe97cb892fbdefd808b5339b
2023-08-29 15:41:36 -07:00
Elliott Hughes
f9189bb67d Merge "<termios.h>: add two new POSIX functions." into main am: b130e6dae0
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2729340

Change-Id: I8640dfffbc43c7a5c0a5b1dcd42d8b031b25eb4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-29 22:25:52 +00:00
Elliott Hughes
b130e6dae0 Merge "<termios.h>: add two new POSIX functions." into main 2023-08-29 21:48:37 +00:00
Elliott Hughes
647472db9b <termios.h>: add two new POSIX functions.
musl already added tcgetwinsize() and tcsetwinsize(), but I didn't
notice.

Trivial single-line inlines added to a header that's already written
that way.

Test: treehugger
Change-Id: Iac95ea6a89f3872025c512f7e61987b81d0aafa7
2023-08-29 09:33:04 -07:00
Xin Li
5439bde949 Merge "Merge Android U (ab/10368041)" into aosp-main-future 2023-08-28 22:13:38 +00:00
Kalesh Singh
fcf5ee6e76 Merge "bionic: CFIShadow: Remove use of PAGE_SIZE macro." into main am: 97a0587f20
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2717359

Change-Id: I3d25584b705b3b37cbce844af4a17f5bfaf1b8a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 20:47:13 +00:00
Kalesh Singh
97a0587f20 Merge "bionic: CFIShadow: Remove use of PAGE_SIZE macro." into main 2023-08-28 20:04:57 +00:00
Kalesh Singh
256e2a786a Merge "bionic: libdl_cfi: Remove PAGE_SIZE usage" into main am: de83440636
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2727078

Change-Id: I1f5bcab12da4efbb7fd3cab2b53a457cc683cbb8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 17:54:03 +00:00
Kalesh Singh
de83440636 Merge "bionic: libdl_cfi: Remove PAGE_SIZE usage" into main 2023-08-28 17:13:01 +00:00
Elliott Hughes
3996bbe901 Merge "sysconf(): implement cache queries." into main am: a71a15fe34
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2721536

Change-Id: Ied0b13efd8a25f1b185226d3ff430d93b4fac31a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 15:05:59 +00:00