Commit graph

2602 commits

Author SHA1 Message Date
Elliott Hughes
6cd03eff43 Update FreeBSD elf_common.h.
Looks like I'd been bad here, and added new stuff to this file rather
than <elf.h> directly. I've also done nothing to upstream any of this.
This patch at least addresses the former problem, moving our stuff out
into <elf.h>.

Rather than *delete* anything that conflicts with Linux in elf_common.h,
I've disable it with // or #if, and marked those as Android changes to
make it less likely that the next update accidentally drops them (which
isn't super likely, since most of them should actually cause build
failures when they conflict with uapi).

Test: treehugger
Change-Id: Id0deccc7305c60b0f708b55e2eed0dedc0bca41d
2024-03-21 20:13:36 +00:00
Treehugger Robot
f3a8ae87fd Merge "Ignore bionic versioning in vendor modules" into main 2024-03-14 03:35:13 +00:00
Justin Yun
ced630225a Ignore bionic versioning in vendor modules
Vendor modules do not follow bionic versioning but define their own
versioning for LLNDK. Ignore the __INTRODUCED_IN annotation for
vendor modules.

Bug: 302113279
Test: build trunk-staging and next configurations
Change-Id: I04646b524d17f7ae47f0f96cb98f221f3e821629
2024-03-13 21:02:58 +09:00
Elliott Hughes
eb4cf41766 Add missing documentation to <dlfcn.h>.
All the dude wanted was to mention that dlclose() can cause problems with thread locals...

Change-Id: Iea23c49b6b2d6d93b85b2aa0ab1183e68cf39695
2024-03-12 23:45:00 +00:00
Elliott Hughes
7c37e12827 Merge "Clarify the timespec argument to clock_nanosleep()." into main am: 70ecb746f3
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2987070

Change-Id: Ie84b92a2839ad09f5f73f1cce173df5a14e3e237
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 15:44:19 +00:00
Elliott Hughes
c2ce647e2a Merge "Consistently use 'op' in argument names." into main am: 47f8ab80cc
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2987969

Change-Id: Id162bd1a19777501ea982996f3689a22142e18e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 15:44:07 +00:00
Elliott Hughes
786484d808 Merge "_Fork(): clarify what not running pthread_atfork() handlers means in practice." into main am: 69bc81615b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2987030

Change-Id: Ic3bcc3ec2addc60edf75d612eb4c5bd35f902040
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-05 15:43:53 +00:00
Elliott Hughes
70ecb746f3 Merge "Clarify the timespec argument to clock_nanosleep()." into main 2024-03-05 15:25:46 +00:00
Elliott Hughes
47f8ab80cc Merge "Consistently use 'op' in argument names." into main 2024-03-05 15:25:18 +00:00
Elliott Hughes
8dc9c1cad3 Clarify the timespec argument to clock_nanosleep().
Pointed out during review of a similar change to the man page.

Change-Id: I78f87bc4ff9fed773ca6f477e79f4a3fd507e056
2024-03-05 00:17:22 +00:00
Elliott Hughes
364fc76047 Consistently use 'op' in argument names.
This matches changes being made to regularize the man page terminology.

Change-Id: If949cf81a0a0a06f24a4a742e8bf45c53dbd0da1
2024-03-04 23:48:00 +00:00
Elliott Hughes
8257268d04 _Fork(): clarify what not running pthread_atfork() handlers means in practice.
Change-Id: I0546069bbef730ffc23b3cea90fe7280d905d885
2024-03-04 22:24:01 +00:00
Treehugger Robot
b4d8542a84 Merge "Correct the nullability annotation in posix_spawnattr_init()" into main am: 2c0e9a58ea
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2983453

Change-Id: Ib3fd19948abcb9f10e6ed4e4e2a9a16835c91c9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-01 03:26:47 +00:00
Treehugger Robot
2c0e9a58ea Merge "Correct the nullability annotation in posix_spawnattr_init()" into main 2024-03-01 02:40:32 +00:00
Elliott Hughes
335380e79a Merge "Add _Fork()." into main am: a216b269ef
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2976351

Change-Id: I3292deb2184c7f88b39e2ee9d817775031bfbfb7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 23:29:07 +00:00
zijunzhao
148476d91c Correct the nullability annotation in posix_spawnattr_init()
The input __attr should be allowed to point to null.

Bugs: b/245972273
Test: adb shell
Change-Id: Id433d220e7c074ca68e2541371491975b33928ed
2024-02-29 22:55:00 +00:00
Elliott Hughes
a216b269ef Merge "Add _Fork()." into main 2024-02-29 22:25:45 +00:00
Elliott Hughes
2411fff9f2 Add _Fork().
POSIX issue 8 function, already in musl/glibc (but not iOS/macOS).

Bug: https://austingroupbugs.net/view.php?id=62
Test: treehugger
Change-Id: Id51611afdab92dff36a540b7d8737fc0e31f3d36
2024-02-29 20:50:58 +00:00
Treehugger Robot
91a073d442 Merge "Remove unnecessary includes" into main am: 9218876df0
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2983496

Change-Id: I5d0ed4bbda78c7989cf44c2fd0d5feb58b3319d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-29 16:38:03 +00:00
Treehugger Robot
9218876df0 Merge "Remove unnecessary includes" into main 2024-02-29 15:57:14 +00:00
Florian Mayer
5f177e3746 Remove unnecessary includes
Test: debuggerd_test, CtsCrashDetailHostTestCases
Change-Id: Iceb0458d953f23aff13576a45c2f6a616c40c1a5
2024-02-28 17:28:54 -08:00
Steven Moreland
d29e333562 Merge "Add ..DEPRECATED_PAGE_SIZE macro" into main am: 2215ad406b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2978135

Change-Id: I436e26aa5e3587f5977854c4fdb720e0199a4b8d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-28 22:04:18 +00:00
Steven Moreland
2215ad406b Merge "Add ..DEPRECATED_PAGE_SIZE macro" into main 2024-02-28 21:34:56 +00:00
Steven Moreland
f6e9904fa9 Add ..DEPRECATED_PAGE_SIZE macro
When 'no page size' is turned on (especially if it is turned
on by default in some environments), we need a way to turn
it off, thus restoring the old behavior.

Bug: 312546062
Change-Id: I411cff621246b6ba40e70bb51234f3886ba9527a
Test: N/A
2024-02-28 21:34:42 +00:00
Elliott Hughes
7617af2274 Merge "Improve android_set_abort_message() documentation." into main am: dcfc4a1ccc
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2975871

Change-Id: I11be30ab4fa04875304fbfb74b88edf819613c85
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-26 21:40:04 +00:00
Elliott Hughes
94c93d659b Improve android_set_abort_message() documentation.
Change-Id: Iee01fcfc39356f3daeb0676acc0dc0dd17675e68
2024-02-23 17:41:55 +00:00
Treehugger Robot
de24241803 Merge "Mention ApplicationExitInfo in docs" into main am: 6835b71819
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2974831

Change-Id: Ib3abeeaa14f06650721fac0504ca23431fad2c42
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-23 05:29:51 +00:00
Florian Mayer
63df50e101 Mention ApplicationExitInfo in docs
Bug: 155462331
Change-Id: I2a60dc1ca5a117bd47631dc7faba8446b4518761
2024-02-23 01:34:22 +00:00
Elliott Hughes
00fa3f3083 Merge "Clean up the <netinet/ether.h> implementation." into main am: 9a7da857a7
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2966403

Change-Id: I21579d147afd2f4cac41654ae627c9a190da2917
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-22 16:08:38 +00:00
Elliott Hughes
9a7da857a7 Merge "Clean up the <netinet/ether.h> implementation." into main 2024-02-22 15:35:36 +00:00
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
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
Elliott Hughes
3ed6e722e3 Clean up the <netinet/ether.h> implementation.
Test: treehugger
Change-Id: Ifd8bf344583b74737a05b80e30373ab7bef94f8d
2024-02-16 01:23:46 +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
Florian Mayer
e2aefc46e7 Allow to re-use the same crash_detail.
This is for advanced use-cases that have high performance demands and
know they will repeatedly re-use the crash_detail.

Bug: 155462331
Change-Id: Ib15dac70d1d598f78b74b539aeadf88b0ca32bc7
2024-02-13 13:44:32 -08: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
Xin Li
d70a5f022c Merge Android 24Q1 Release (ab/11220357)
Bug: 319669529
Merged-In: I884a78b67679c1f0b90a6c0159b17ab007f8cc60
Change-Id: Ie7928dbaee63c4e4d4b4f3854017933cbc3072a3
2024-01-29 10:10:43 -08:00
Christopher Ferris
0f79521706 Update to v6.7 kernel headers.
Kernel headers coming from:

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

NOTE: The file bionic/libc/kernel/uapi/linux/usb/f_accessory.h was
deleted in the 6.7 kernel along with the functionality. However,
there is no current replacement. For now keep the file here, but at
some point when the new implementation is ready, this file will need to
be moved to the places that still need to be backwards compatible.

Test: Builds and bionic unit tests pass on raven.
Test: Able to log in to an Android GO 32 bit device.
Change-Id: Ibf5684ed140616c02bb9464bbd6422a9281a29cf
2024-01-18 12:45:00 -08:00
Elliott Hughes
c608e57893 Merge "Use the canonical idiom for sockaddr_storage." into main am: bb261225e0 am: 3f5aaa8812 am: 4b694b6969
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2852650

Change-Id: I70804a869978bd6f27482530af7446a2cc57b33b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 16:28:27 +00:00
Elliott Hughes
bb261225e0 Merge "Use the canonical idiom for sockaddr_storage." into main 2023-12-08 14:43:32 +00:00
Juan Yescas
f7f17a8dac Merge "16k: Set PTHREAD_STACK_MIN to 16384/8192 for 64-bit/32-bit archs" into main am: 93e0616836 am: 2fe3c7f701 am: 50fbc4d8a9
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2864176

Change-Id: I1be6a6ab7cf232eb02261af8666dbeba2cde1390
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 05:45:19 +00:00
Juan Yescas
c065a2731a 16k: Set PTHREAD_STACK_MIN to 16384/8192 for 64-bit/32-bit archs
Set PTHREAD_STACK_MIN will be set to:

- 16384 for 64-bit arch
- 8192 for 32-bit arch

Bug: 315174209
Test: Built and start the targets
      - aosp_cf_arm64_phone_pgagnostic
      - aosp_cf_x86_64_phone
Change-Id: I8bb20a3433e615f9f80a0d52051f2e1635d4301a
2023-12-07 16:07:08 -08:00
Juan Yescas
8de167971d Merge "bionic: Do not use PAGE_SIZE to define PTHREAD_STACK_MIN" into main am: b49314108d am: b3f5421462 am: d9bb13ac1e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2860686

Change-Id: Ib96af1b18f8fe3deed9c08800a3454e2bdb584e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 21:32:10 +00:00
Elliott Hughes
2cbd262cf1 Merge "riscv64: pass a pointer to __riscv_hwprobe() to ifunc resolvers." into main am: 75539ab928 am: 978c235f51 am: 53adad316c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2860689

Change-Id: I86a97139f856341ab257b5092b72e00abf2b0bed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 20:27:53 +00:00
Juan Yescas
b49314108d Merge "bionic: Do not use PAGE_SIZE to define PTHREAD_STACK_MIN" into main 2023-12-06 19:58:01 +00:00
Elliott Hughes
75539ab928 Merge "riscv64: pass a pointer to __riscv_hwprobe() to ifunc resolvers." into main 2023-12-06 17:57:53 +00:00
Elliott Hughes
10cd6a9d4f Merge "Avoid multiple definitions of struct tcphdr." into main am: 001fabaa90 am: 28ea9363b6 am: 6bed16b594
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2850373

Change-Id: I0e0b0d398d3473bd1f9b85f11a0daac4bab693b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 00:54:41 +00:00
Elliott Hughes
561e804ffb riscv64: pass a pointer to __riscv_hwprobe() to ifunc resolvers.
This way, callees don't need to worry about whether or not their
reference to __riscv_hwprobe() has been resolved before their ifunc
resolver is called.

This matches the current glibc proposal from rivos.

Test: treehugger
Change-Id: I0d5244aa837d0d1f0e6bd7d22091dfedb8a55bdb
2023-12-05 16:31:59 -08:00
Juan Yescas
b40f7b911d bionic: Do not use PAGE_SIZE to define PTHREAD_STACK_MIN
There is no need to use PAGE_SIZE to define the value of
PTHREAD_STACK_MIN.

Bug: 312546062
Bug: 313941999
Test: source build/envsetup.sh
      lunch aosp_cf_arm64_phone_pgagnostic-trunk-userdebug
      m
Change-Id: If3c3fe39f50592df58634d1c164e87dcd0aebad0
2023-12-05 16:03:33 -08:00
Elliott Hughes
5850f6f3be Use the canonical idiom for sockaddr_storage.
This works out a bit silly/ugly because the bits/ header file has the
wrong name, so I've also changed the map from kernel struct to boolean
to be a map from kernel struct to filename. That not only fixes this,
it's a bit more readable too. (Just yesterday, when I had no real reason
to change it, I was asking myself "why is this a boolean?"!)

Bug: http://b/236042740
Test: treehugger
Change-Id: I3eee25b493ea97d46cc5dc5fde07f7c5e77d2a46
2023-12-05 23:13:01 +00:00
Elliott Hughes
001fabaa90 Merge "Avoid multiple definitions of struct tcphdr." into main 2023-12-05 23:09:32 +00:00
Elliott Hughes
e5f0b8a529 Merge "Avoid multiple definitions of sigaction." into main am: 3906f3bc83 am: 222f4ca434 am: efb0a10807
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2849972

Change-Id: I7ff80d1bdff69962e7f1a46dc6e5fa8ca6ce0026
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 20:54:49 +00:00
Elliott Hughes
b4a9b17a55 Avoid multiple definitions of struct tcphdr.
No-one's hit this in practice, that I know of, but there are very few
instances of this old workaround for kernel/userspace mismatches still
present, and (as part of the much harder and less effective `struct
sigaction` cleanup), we should just remove them.

Bug: http://b/236042740
Test: treehugger
Change-Id: I6c71d4353044cf57cfa8a9796a4c3d6a4d51cd86
2023-11-28 15:41:54 -08:00
Elliott Hughes
df53b16fca Avoid multiple definitions of sigaction.
Before this change, we have the kernel's sigaction in the uapi headers,
and our own sigaction in <bits/signal_types.h> and we rely on callers
making sure to use `#define` to move the kernel type out of the way if
they include a uapi header directly. This is obviously error-prone and
undesireable, and not what we usually do now.

What we _usually_ do now is use the header scrubber's ability to replace
a struct definition with a `#include <bits/STRUCT.h>`, but that doesn't
work here because struct sigaction relies on a lot of other types,
some of which also come from uapi headers.

So instead use our second best trick, which is to "move the kernel struct
out of the way" at header scrubbing time instead. This means that someone
who does `#include <linux/signal.h>` or `#include <asm/signal.h>` won't
get `struct sigaction` (they'll only have `struct __kernel_sigaction`
instead), but it does mean that they can't get two incompatible
definitions if they include a uapi header both directly and indirectly.

So although this doesn't do what I'd set out to do, it's still an
improvement in some cases, and it's our preferred idiom in most cases
anyway. (I'll come back once this is in to tidy up the two other kernel
structs where we're still using the deprecated "rename out of the way
using #define" trick, but this change is already hairy enough, and
there's a possibility it will break code that didn't care that it was
getting the kernel `struct sigaction` rather than the userspace one.)

Bug: http://b/236042740
Test: treehugger
Change-Id: Icff50e330c09c587e8f77ba0fb7cffffd9c3b708
2023-11-28 14:20:43 -08:00
Treehugger Robot
21ec4adb23 Merge "Move ; in NDK declaration" into main am: c6034e4228 am: ec6677350c am: 15c9f8f608
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2830814

Change-Id: I5bcfbb42ea39d291bbc47b52f4b1852d8547dffb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 02:11:04 +00:00
Treehugger Robot
c6034e4228 Merge "Move ; in NDK declaration" into main 2023-11-15 00:26:40 +00:00
Nate Myren
4b94522c14 Move ; in NDK declaration
per comment on aosp/2796861, it should be at the end of the line

Bug: 291814949
Test: presubmit
Change-Id: Ib104d6764791b7a2507e371d955cbd8e69e3ccdc
2023-11-14 15:28:57 -08:00
Treehugger Robot
034c05be11 Merge "string.h: drag in <strings.h> for GNU source as well as BSD." into main am: fb85d77da6 am: e57e7f3102 am: 5614a5815c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2828517

Change-Id: I09326b1a10226ac2f3bffe4a049041c8deae1c43
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-14 19:57:51 +00:00
Treehugger Robot
fb85d77da6 Merge "string.h: drag in <strings.h> for GNU source as well as BSD." into main 2023-11-14 17:59:13 +00:00
Elliott Hughes
c5d9795cf4 string.h: drag in <strings.h> for GNU source as well as BSD.
Both glibc/musl's and Apple's <string.h> drags in <strings.h> in most
cases. So do the BSDs. Given so much historic precedent (often accompanied
by comments saying "POSIX made us move this stuff out into another
file, but we don't want to break existing code [from the 1980s]"!), plus
the fact that someone hit this in practice, trying to build one of the
linux selftests against bionic, let's change bionic over too...

Bug: http://b/310035365
Test: treehugger
Change-Id: I8f13d82fe3d3df71a656641a725410acdfd97465
2023-11-14 00:40:30 +00:00
Treehugger Robot
93bf1d0a99 Merge "elf.h: add SHT_RISCV_ATTRIBUTES." into main am: 5512532418 am: 64bc0859a3 am: ce9887d94c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2818165

Change-Id: I13a3ee00299f2afc756703d31047e1728069ff2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-04 03:45:04 +00:00
Treehugger Robot
5512532418 Merge "elf.h: add SHT_RISCV_ATTRIBUTES." into main 2023-11-04 02:19:11 +00:00
Elliott Hughes
a3f24eb6b2 elf.h: add SHT_RISCV_ATTRIBUTES.
Test: treehugger
Change-Id: I1919ae440f56c46aad0948e4535eb6fc90b10895
2023-11-03 17:25:09 -07:00
Christopher Ferris
f9a2674094 Merge "Update to v6.6 kernel headers." into main am: 85dd55530a am: 511a846c42 am: 8094b84e28
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2812362

Change-Id: I15e1aa6bec3fa89568ff4ba1242c25978884999f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-01 03:20:21 +00:00
Treehugger Robot
8611847e5a Merge "time.h: use "duration" rather than "request"." into main am: 318a1276b4 am: 0dc540d286 am: 84d495f57e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2813844

Change-Id: I564ef94ed6e9e14a419b97a53090bac48d079de0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-01 03:19:55 +00:00
Treehugger Robot
8d05992702 Merge "dlfcn.h: dlclose doc ~'do not use'" into main am: 2e9bc49ac5 am: 227e78148d am: a900808621
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2813726

Change-Id: Ice29c3d56b92b78d2298d8bcbc2475326dd5b6f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-01 03:19:09 +00:00
Christopher Ferris
85dd55530a Merge "Update to v6.6 kernel headers." into main 2023-11-01 02:14:31 +00:00
Treehugger Robot
318a1276b4 Merge "time.h: use "duration" rather than "request"." into main 2023-11-01 02:02:23 +00:00
Treehugger Robot
2e9bc49ac5 Merge "dlfcn.h: dlclose doc ~'do not use'" into main 2023-11-01 01:54:25 +00:00
Steven Moreland
f61b2b16b8 dlfcn.h: dlclose doc ~'do not use'
There are a lot of bugs about this over the years, too many to
reference here. Though, I referenced b/176065420 to understand
exactly why it's problematic and what the future direction may
be.

Fixes: 307859642
Test: N/A
Change-Id: Ida31fe622309a7f9b2cd55e5bbb3569fc5aded0e
2023-11-01 00:48:24 +00:00
Elliott Hughes
77add1bbfd time.h: use "duration" rather than "request".
This came up in a man-pages discussion. I've left the ones that take an
integer to say what _units_ they sleep in, but the ones that take a
struct seem clearest if they just say "duration".

Test: treehugger
Change-Id: I13e39855a9d2c49e1653ec2263cb09c9f239254d
2023-11-01 00:34:47 +00:00
Christopher Ferris
67d1e5eb74 Update to v6.6 kernel headers.
Kernel headers coming from:

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

Test: Builds and bionic unit tests pass on raven.
Test: Able to log in to an Android GO 32 bit device.
Change-Id: Ib5ff5a23f382721d98d1e428a295c6794b190d8d
2023-10-31 13:36:37 -07:00
Treehugger Robot
d78dfdb75a Merge changes from topic "appcompat_override" into main am: 0207a6a186 am: 9460fe5a83 am: 3fd59cb6af
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2796861

Change-Id: I1c6d5b67876e69650e721e465533ee897983efc4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-31 03:56:37 +00:00
Treehugger Robot
0207a6a186 Merge changes from topic "appcompat_override" into main
* changes:
  Move __system_properties_reload to LIBC from LIBC_PLATFORM
  Write appcompat_override system properties
2023-10-31 02:29:57 +00:00
Treehugger Robot
2d7fdf4307 Merge "Explain why system(3)'s argument is marked _Nonnull." into main am: 19346eaaec am: 33e9fe330c am: 73a05a9dce
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2807093

Change-Id: I906bc95974bcf14afe8c2179716dd7fcc273d846
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-27 01:20:02 +00:00
Elliott Hughes
cc87eec645 Explain why system(3)'s argument is marked _Nonnull.
Change-Id: I566f982148c58e74db55ccbd762e0e4ca9fad240
2023-10-26 21:28:58 +00:00
Nate Myren
0ab0615f8c Move __system_properties_reload to LIBC from LIBC_PLATFORM
The zygote cannot have visiblity to LIBC_PLATFORM methods. Therefore,
move __system_properties_reload to LIBC, and rename it
__system_properties_zygote_reload, and indicate in comments that it
should not be used by non-zygote apps

Bug: 291814949
Test: atest CtsBionicRootTestCases
Change-Id: Iee8fa0c76b740543c05a433393f2f4bef36d6d3d
2023-10-25 17:41:33 -07:00
Treehugger Robot
ff55925cd4 Merge "<syslog.h>: add facilitynames[] and prioritynames[]." into main am: 7bdcf765fa am: 7b6325cd05 am: c269f679d9
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2799343

Change-Id: If08ccd4e62a6af692db1beb7cc52abb707bc8372
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-24 02:43:22 +00:00
Elliott Hughes
afb8e05eb3 <syslog.h>: add facilitynames[] and prioritynames[].
Test: treehugger
Change-Id: I2a65b3088fe5a28b66e7d1c2a8caa10cb4467202
2023-10-23 17:47:15 -07:00
Nate Myren
b8c87b14b0 Write appcompat_override system properties
Create a second set of system properties, that can be overlaid over the
real ones if necessary, for appcompat purposes.

Bug: 291814949
Ignore-AOSP-First: Aosp -> internal merge conflict
Test: manual, treehugger, system_properties_test

Change-Id: I541d3658cab7753c16970957c6ab4fc8bd68d8f3
Merged-In: I884a78b67679c1f0b90a6c0159b17ab007f8cc60
2023-10-19 13:35:57 -07:00
Nate Myren
19d8167626 Merge "Write appcompat_override system properties" into main 2023-10-19 19:29:59 +00:00
Treehugger Robot
8f7b679767 Merge "Clarify one of the "missing" FreeBSD ELF constants." into main am: b8021fbe21 am: bbedb0295b am: bdc8f354b9
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2796853

Change-Id: I87aaec664797e4654aff470df444dd950e51eca6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-19 01:23:09 +00:00
Nate Myren
ae7f33dd57 Write appcompat_override system properties
Create a second set of system properties, that can be overlaid over the
real ones if necessary, for appcompat purposes.

Bug: 291814949
Ignore-AOSP-First: Aosp -> internal merge conflict
Test: manual, treehugger, system_properties_test

Change-Id: I884a78b67679c1f0b90a6c0159b17ab007f8cc60
2023-10-18 17:28:42 -07:00
Elliott Hughes
dcfd870fac Clarify one of the "missing" FreeBSD ELF constants.
Test: treehugger
Change-Id: I7173ac704e6537a4e99a976baec46aa22df751bd
2023-10-18 14:47:12 -07:00
Treehugger Robot
50d4e9d550 Merge "<ctype.h>: stop using _ctype_." into main am: e253761e14 am: 01de1a47fa am: aba9b2107d am: e00cd3f4cb am: 24c836e906
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2779335

Change-Id: I962271d3bffddb528601b2e54cf426d569337fd4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-10 03:24:23 +00:00
Elliott Hughes
69270ed6b9 <ctype.h>: stop using _ctype_.
The code comment that's being removed here defends the old
implementation by claiming that it's faster. Annoyingly, we don't know
what hardware that was run on. Running on current-ish hardware
(cheetah), I can't really tell the difference except: (a) for hwasan,
avoiding the unsafe memory access by _not_ using the array is a huge
win, and (b) even for arm32 the logic is (very slightly) faster than the
array lookup.

So let's get rid of the unsafety (as musl and FreeBSD have already done)
and the large hwasan slowdown (10ns vs 2ns). It's possible in-order
cores might still care, but it's 2023 and it's time to move on.

This change _does not_ remove `_ctype_` and associated macros from the
headers, though we might want to come back and do that. Historically
libc++ used these implementation details directly, but that's no longer
the case, and it seems unlikely that anyone else is, and today's results
suggest they probably shouldn't anyway, and doing so only ever really
made sense for something like ISO-Latin-1 anyway. Most ASCII tests are
_always_ better off inlined, and Android's never supported non-ASCII for
<ctype.h> anyway (use the isw*() functions if you want that, but bear in
mind that if you're actually dealing with human languages, you probably
want icu4c rather than libc anyway).

Test: treehugger & benchmarks
Change-Id: Ifac25c23ac33e996a3c726317b5c6e602dc72e30
2023-10-09 13:53:03 -07:00
Elliott Hughes
f1ce4648a9 Merge "Remove <ctype.h> cruft." into main am: 389a40a0a8 am: a468e56569 am: bc717f9b8d am: 4ca2aabbff am: ac7ef66045
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2455758

Change-Id: If05fcc6343f23138f026fe0759948ca3f6fae967
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-07 00:59:27 +00:00
Elliott Hughes
389a40a0a8 Merge "Remove <ctype.h> cruft." into main 2023-10-06 19:49:26 +00:00
Elliott Hughes
e37068889d Remove <ctype.h> cruft.
The NDK only supports API 21 and later, so we don't need to worry
about older API levels any more.

All the functions in this file are trivial, being but a single
instruction on most architectures. For that reason, we inline them by
default. (We continue to also provide actual symbols for any caller
that needs them --- in particular existing binaries!)

Also inline all the _l() variants too. No-one should be using them,
but since we're already using trickery to only implement the non-_l()
variants once, we may as well use the same trick for both.

Test: treehugger
Change-Id: I17637c49dd14be9e5ecb8246e72e8acc662739f1
2023-10-06 15:06:17 +00:00
Treehugger Robot
0962881106 Merge "s/master/main/" into main am: a01b292ab9 am: f461a3878c am: 3852cfe4cb am: 3b3e2e9d46 am: 381d04c046
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2773870

Change-Id: If6c55eb8331d792fdb9836bc5cb32f220ed860a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 21:12:57 +00:00
Treehugger Robot
a01b292ab9 Merge "s/master/main/" into main 2023-10-05 17:36:09 +00:00
Elliott Hughes
6b302c6354 Merge "Reduce duplication in the NOTICE file." into main am: 22743e3a7e am: f8d775b943 am: ce7fe40659 am: 9fc4c42656 am: 4023666514
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2773704

Change-Id: I51ff69aa78e23d3231778be1ddf1e9076b166cb5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 02:51:24 +00:00
Elliott Hughes
9c06d16ca3 s/master/main/
Test: treehugger
Change-Id: I2c975b2f5f92f23c7357b6f7e785578504298cc6
2023-10-04 23:36:48 +00:00
Elliott Hughes
73e37b535a Reduce duplication in the NOTICE file.
Test: treehugger
Change-Id: I8a9c4f22534330dd498636a155b872bd2d2af5b6
2023-10-04 22:28:27 +00:00
Elliott Hughes
7add1bbca8 Merge "Add strerrordesc_np() and strerrorname_np()." into main am: a67fe1b171 am: d37c19670a am: 5f921a71e1 am: 546379ea3d am: a2224bbe45
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2760166

Change-Id: Iae04cc2f17e272e0212b92dbeb5d776aeeb8cc62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 04:05:28 +00:00
Elliott Hughes
a67fe1b171 Merge "Add strerrordesc_np() and strerrorname_np()." into main 2023-09-27 22:26:37 +00:00
Elliott Hughes
2109f12c3b Add strerrordesc_np() and strerrorname_np().
strerrordesc_np() isn't very useful (being just another name for
strerror()), but strerrorname_np() lets you get "ENOSYS" for ENOSYS,
which will make some of our test assertion messages clearer when we
switch over from strerror().

This also adds `%#m` formatting to all the relevant functions.

Test: treehugger
Change-Id: Icfe07a39a307d591c3f4f2a09d008dc021643062
2023-09-27 11:21:12 -07:00
Treehugger Robot
88dd367bef Merge "<sys/statvfs.h>: add a new mount option." into main am: 732b98203b am: a325f94c85 am: e7430e692f am: 4789e289f3 am: c9ca34ce85
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2760790

Change-Id: I32714539af9486e7e6db71d2c3ac452ac2134fc4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-23 05:00:48 +00:00
Elliott Hughes
6711d21230 <sys/statvfs.h>: add a new mount option.
This flag was added as part of
https://sites.google.com/a/chromium.org/dev/chromium-os/chromiumos-design-docs/hardening-against-malicious-stateful-data#TOC-Restricting-symlink-traversal
in 2020.

Annoyingly, these flags are in include/linux/statvfs.h rather than in
the uapi headers, so we don't get them for free.

Test: treehugger
Change-Id: I55c0dcc8a5da17c3efc8938ec04f23f157764d4d
2023-09-22 19:48:05 +00:00