Commit graph

40368 commits

Author SHA1 Message Date
Treehugger Robot
0194ba475f Merge "Remove unused declarations." into main am: 488887c8ea
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2775906

Change-Id: I73cd5fe4c3da5b88e5afcfdbf237f948d6191a76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 23:57:43 +00:00
Treehugger Robot
488887c8ea Merge "Remove unused declarations." into main 2023-10-05 23:28:52 +00:00
Elliott Hughes
2cceba1669 Remove unused declarations.
Bug: http://b/298741930
Test: treehugger
Change-Id: I5a26cf7c9a14748976b16434a127949f1478bdff
2023-10-05 15:17:12 -07:00
Treehugger Robot
f461a3878c Merge "s/master/main/" into main am: a01b292ab9
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2773870

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

Change-Id: Ie4bfc5d3f17613577c49f6449921c6b30148e247
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 00:42:15 +00:00
Treehugger Robot
8251b0de04 Merge "Update the benchmarks/NOTICE file." into main am: 041ddf78bf
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2773705

Change-Id: Ia20120705642bcb65c8117a8bedebe657951ec7a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 00:41:35 +00:00
Elliott Hughes
22743e3a7e Merge "Reduce duplication in the NOTICE file." into main 2023-10-05 00:38:52 +00:00
Treehugger Robot
041ddf78bf Merge "Update the benchmarks/NOTICE file." into main 2023-10-05 00:08:08 +00:00
Elliott Hughes
9c06d16ca3 s/master/main/
Test: treehugger
Change-Id: I2c975b2f5f92f23c7357b6f7e785578504298cc6
2023-10-04 23:36:48 +00:00
Elliott Hughes
7ee0b316a5 Update the benchmarks/NOTICE file.
Test: treehugger
Change-Id: I8cbf378dd746da9e97b56a0110f86a7cc4043671
2023-10-04 22:28:49 +00:00
Elliott Hughes
73e37b535a Reduce duplication in the NOTICE file.
Test: treehugger
Change-Id: I8a9c4f22534330dd498636a155b872bd2d2af5b6
2023-10-04 22:28:27 +00:00
Treehugger Robot
d19a29b6c8 Merge "Create a filegroup for versioner dependencies" into main am: ae31683086
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2768530

Change-Id: I3a982872be784056e2ae35b50fc4ef59ebfa21fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-04 01:42:35 +00:00
Treehugger Robot
ae31683086 Merge "Create a filegroup for versioner dependencies" into main 2023-10-04 01:08:11 +00:00
Elliott Hughes
a16d951f61 Merge "riscv64: add vector stpcpy()." into main am: 45c7ae46d5
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2768377

Change-Id: Idaf8772f4e3d92f22ed7362b2a956bd541a8e207
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-03 18:17:00 +00:00
Elliott Hughes
45c7ae46d5 Merge "riscv64: add vector stpcpy()." into main 2023-10-03 17:49:06 +00:00
Elliott Hughes
3d84338eb7 riscv64: add vector stpcpy().
Bug: https://github.com/google/android-riscv64/issues/107
Test: treehugger
Change-Id: Ic1fb9da974769d2767ea2c092a2e97e095612e6e
2023-10-03 00:39:42 +00:00
Suren Baghdasaryan
912ec5801f Merge "Add mmap syscall benchmarks" into main am: 706e228154
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2715842

Change-Id: I48462a1c049b8c1d7d9feeec97f7107f0f2161ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-30 22:04:25 +00:00
Suren Baghdasaryan
706e228154 Merge "Add mmap syscall benchmarks" into main 2023-09-30 20:51:48 +00:00
Spandan Das
8fce52a3b3 Create a filegroup for versioner dependencies
As part of the build, soong runs the following cmd
```
$ versioner -o <out_dir> bionic/libc/include
bionic/libc/versioner-dependencies
```

To migrate this action to Bazel, create a filegroup module for
`bionic/libc/versioner-dependencies`. In Bazel builds, this target will
be copied to the Bazel's sandbox and placed on the include path when
running versioner. This should be a no-op in Soong.

`bionic/libc/versioner-dependencies` is a collection of symlinks, some of
which point to `prebuilts/clang-tools`. Bazel supports incremental
builds with symlinks out-of-the-box, so we do not need to add special
handling for this directory.

Bug: 301169067
Test: m nothing
Change-Id: I7cbb92e2248c194038a5690c81fed945dee61ccc
2023-09-29 23:49:53 +00:00
Elliott Hughes
8828262237 Merge "Don't memset() in the soinfo constructor." into main am: e7944a5b8b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2769679

Change-Id: Ib28843c38244ffab122099c0d9d137364de3d4e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 21:49:07 +00:00
Elliott Hughes
e7944a5b8b Merge "Don't memset() in the soinfo constructor." into main 2023-09-29 20:52:31 +00:00
Suren Baghdasaryan
9a0a360ed6 Add mmap syscall benchmarks
Add benchmarks to monitor performance of the syscalls which are frequently
used in Android. These benchmarks will help Android kernel team to catch
syscall performance regressions and flagging them early. They can also
be used to compare different kernel versions.
Add mmap/munmap syscall benchmarks as a starting point. mmap and munmap
are among most frequently used syscall in Andoird. Specific parameters
were also chosen based on the frequency of their use in Android.

Bug: 283058897
Test: local build and run
Change-Id: If8e53305174532dd698706ccd20e4b800d8720d7
2023-09-29 20:24:47 +00:00
Elliott Hughes
b003e10f97 Don't memset() in the soinfo constructor.
LinkerBlockAllocator::alloc() always does a memset() anyway, and soinfo
contains non-POD types, so this seems both unnecessary and questionable.

Bug: http://b/298741930
Test: treehugger
Change-Id: I2b5a3858c8506c6086dfd59cbe729afb5b9ffa1c
2023-09-29 17:09:02 +00:00
Christopher Ferris
5f179606dc Merge "Match new google benchmark help output." into main am: 61cd1428b4
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2768525

Change-Id: I2446d3b97282ca196447cfe07cc554e02e28d2a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 01:52:43 +00:00
Christopher Ferris
61cd1428b4 Merge "Match new google benchmark help output." into main 2023-09-29 01:08:43 +00:00
Treehugger Robot
0a56033547 Merge "Consistently use #if defined(__BIONIC__)." into main am: 51be22c28d
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2766306

Change-Id: I956d042381b507d34a0d7279f7da65bbf84e2a74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 20:42:19 +00:00
Elliott Hughes
ff48afaf2f Merge "Use strerrorname_np() in ASSERT_ERRNO()." into main am: fc1b3b8b7e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2765648

Change-Id: I39ad34cf4f0fb1f5d005787494fb64e0097080c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 20:42:02 +00:00
Christopher Ferris
3df5b76a4e Match new google benchmark help output.
Bug: 302324720

Test: Tests pass on a raven device.
Change-Id: I0766c4799c47f58e6cafa340bc8e76f68f4898ee
2023-09-28 13:30:49 -07:00
Treehugger Robot
51be22c28d Merge "Consistently use #if defined(__BIONIC__)." into main 2023-09-28 20:17:02 +00:00
Elliott Hughes
fc1b3b8b7e Merge "Use strerrorname_np() in ASSERT_ERRNO()." into main 2023-09-28 20:03:47 +00:00
Treehugger Robot
75554bfd2d Merge "Remove an obsolete TODO now we have a new clang." into main am: 760eeffc54
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2766307

Change-Id: I88c6b01dea1ee869e74026982209979f0dd303f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 19:39:41 +00:00
Treehugger Robot
760eeffc54 Merge "Remove an obsolete TODO now we have a new clang." into main 2023-09-28 18:27:12 +00:00
Elliott Hughes
e7943f8b95 Consistently use #if defined(__BIONIC__).
Test: treehugger
Change-Id: I844b909404532eb9165cba1ed6f237bdd4a46990
2023-09-28 10:47:51 -07:00
Elliott Hughes
11069030d6 Remove an obsolete TODO now we have a new clang.
Test: treehugger
Change-Id: I19751fe73f4cd3400005d0ccad0bccb0a74f6fc8
2023-09-28 08:22:26 -07:00
Elliott Hughes
d2250edc10 Use strerrorname_np() in ASSERT_ERRNO().
Hopefully this is totally unambiguous and non-confusing output:
```
Expected equality of these values:
  Errno(22)
    Which is: EINVAL
  Errno((*__errno()))
    Which is: ENOSYS
```

Test: treehugger
Change-Id: Iefe6a8a6447e76681c18256d2713e2c527081c75
2023-09-28 08:15:36 -07:00
Elliott Hughes
d37c19670a Merge "Add strerrordesc_np() and strerrorname_np()." into main am: a67fe1b171
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2760166

Change-Id: Iff3e8d7950ea3e9bfdd10489b5ceec82f948f7a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 23:49:51 +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
Elliott Hughes
22da7f8a10 Merge "Clean up how we skip tests when a syscall isn't in the kernel." into main am: 8ee1793e50
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2759650

Change-Id: I0206e1d8d5cfb1f596fec9a498eafe0c5c9ed3cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-25 23:41:20 +00:00
Elliott Hughes
8ee1793e50 Merge "Clean up how we skip tests when a syscall isn't in the kernel." into main 2023-09-25 22:37:15 +00:00
Treehugger Robot
a325f94c85 Merge "<sys/statvfs.h>: add a new mount option." into main am: 732b98203b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2760790

Change-Id: I16763c1a7f868c2f88a87a0b06d785da966c24c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-23 01:20:42 +00:00
Treehugger Robot
732b98203b Merge "<sys/statvfs.h>: add a new mount option." into main 2023-09-23 00:36:55 +00:00
Elliott Hughes
4ae4be9263 Clean up how we skip tests when a syscall isn't in the kernel.
The close_range() test in particular has been confusing a lot of
partners. I think the sys_epoll_test.cpp idiom is the clearest of the
ones in use, so let's use that everywhere. (I haven't actually touched
the SysV IPC tests, because if we do touch them, _deleting_ them --
since all those syscalls are not allowed on Android -- is probably the
change to be made!)

I'm on the fence about factoring this idiom out into a macro. There
should never be too many of these, and we should probably be removing
them? Is anyone still running the current bionic tests on 4.3 kernels
without membarrier(2), and if they are --- why?!

For now though, I haven't removed any of our existing tests; I've just
moved them over to the sys_epoll_test.cpp style.

Test: treehugger
Change-Id: Ie69a0bb8f416c79957188e187610ff8a3c4d1e8f
2023-09-22 17:15:25 -07: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
Elliott Hughes
d5835f3a5a Merge "Add ASSERT_ERRNO and EXPECT_ERRNO (and use them)." into main am: 68011a4ac7
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2759533

Change-Id: Ie200a94f536c90f9ef92b550c61975548a73f842
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-22 15:25:41 +00:00
Elliott Hughes
68011a4ac7 Merge "Add ASSERT_ERRNO and EXPECT_ERRNO (and use them)." into main 2023-09-22 14:53:52 +00:00
Elliott Hughes
95646e6666 Add ASSERT_ERRNO and EXPECT_ERRNO (and use them).
We've talked about this many times in the past, but partners struggle to
understand "expected 38, got 22" in these contexts, and I always have to
go and check the header files just to be sure I'm sure.

I actually think the glibc geterrorname_np() function (which would
return "ENOSYS" rather than "Function not implemented") would be more
helpful, but I'll have to go and implement that first, and then come
back.

Being forced to go through all our errno assertions did also make me
want to use a more consistent style for our ENOSYS assertions in
particular --- there's a particularly readable idiom, and I'll also come
back and move more of those checks to the most readable idiom.

I've added a few missing `errno = 0`s before tests, and removed a few
stray `errno = 0`s from tests that don't actually make assertions about
errno, since I had to look at every single reference to errno anyway.

Test: treehugger
Change-Id: Iba7c56f2adc30288c3e00ade106635e515e88179
2023-09-21 14:15:59 -07:00
Treehugger Robot
ed30c58ae0 Merge "Add the risc-v TLSDESC relocations." into main am: 631dfbb8ad
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2752785

Change-Id: I3295647952fba328acd5b11609f6f2adec62e4bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-15 20:55:23 +00:00
Treehugger Robot
631dfbb8ad Merge "Add the risc-v TLSDESC relocations." into main 2023-09-15 19:53:19 +00:00