Commit graph

37175 commits

Author SHA1 Message Date
Elliott Hughes
28a644594b s/riscv/riscv64/
Unlike the kernel script (where plain "riscv" was correct because that's
what the kernel uses, making no distinction between riscv32 and riscv64
in the uapi header directories), this should say "riscv64" because
that's what our build system uses.

(This wasn't caught because we haven't wired up the .bp file yet.)

Test: treehugger
Change-Id: I086aaa89e69bf4ddc484a7e93a6c413fd8c719ff
2022-10-05 20:17:41 +00:00
Treehugger Robot
5f16769da6 Merge "Add riscv64 to the map files." 2022-10-05 19:39:34 +00:00
Treehugger Robot
60bf36be00 Merge "Tell the version script generation script about risc-v." 2022-10-05 19:30:05 +00:00
Elliott Hughes
02cbe531e3 Merge "Remove a mips-specific hack." 2022-10-05 14:45:14 +00:00
Elliott Hughes
de1df210bb Remove a mips-specific hack.
Rather than add risc-v to this map, let's just remove the map!

Test: treehugger
Change-Id: I118c74c61af95a96f8e31ae6e422619ed86c6a3b
2022-10-05 00:05:05 +00:00
Elliott Hughes
df48d0f902 Add riscv64 to the map files.
The alternative would be to define an "lp64" shorthand like we have for
SYSCALLS.TXT, but since this functionality is only used by bionic and
old frameworks code to document historical oddities, it's unclear that
it's worth implementing. We shouldn't ever need architecture-specific
annotations again in future.

Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Signed-off-by: Xia Lifang <lifang_xia@linux.alibaba.com>
Signed-off-by: Chen Guoyin <chenguoyin.cgy@linux.alibaba.com>
Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn>
Signed-off-by: Lu Xufan <luxufan@iscas.ac.cn>
Test: treehugger
Change-Id: Id64b1746e7490b2d7ad3e4627e9908c28f8f23ba
2022-10-04 23:52:57 +00:00
Elliott Hughes
0a3442526b Tell the version script generation script about risc-v.
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Signed-off-by: Xia Lifang <lifang_xia@linux.alibaba.com>
Signed-off-by: Chen Guoyin <chenguoyin.cgy@linux.alibaba.com>
Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn>
Signed-off-by: Lu Xufan <luxufan@iscas.ac.cn>
Test: treehugger
Change-Id: If2c35381159433a6337f4d892ef5689236d0a739
2022-10-04 22:48:38 +00:00
Treehugger Robot
9ba92331dd Merge "Remove unused variable." 2022-10-04 22:08:36 +00:00
Treehugger Robot
b853510ba7 Merge "Rewrite renameat()." 2022-10-04 21:56:37 +00:00
Elliott Hughes
dc810a3c13 Remove unused variable.
Looks like we're not using this any more, so rather than add risc-v,
let's just remove this list.

Test: treehugger
Change-Id: I24bb22235c55d48c7dcbae94514ce8dcd03521c3
2022-10-04 20:21:20 +00:00
Elliott Hughes
6660d6c00b Rewrite renameat().
risc-v doesn't have renameat(2), only renameat2(2). Similar to other
architectures, let's make sure everyone's on the same code path by
having all implementations of renameat() go via renameat2().

I've also moved the existing rename()-in-terms-of-renameat() to be in
terms of renameat2() to cut out the middleman!

Test: treehugger
Change-Id: Ibe5e69aca5b39ea014001540bcd4fd3003e665cb
2022-10-04 20:13:49 +00:00
Florian Mayer
e2a10da5be Merge "Do not strip bionic test helpers" 2022-10-04 16:13:59 +00:00
Treehugger Robot
8d585e2334 Merge "Add risc-v support to versioner." 2022-10-04 16:05:42 +00:00
Elliott Hughes
d7f0844f5a Add risc-v support to versioner.
Also fill out some of the data we've fallen behind on, like "which API
levels actually exist".

Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Signed-off-by: Xia Lifang <lifang_xia@linux.alibaba.com>
Signed-off-by: Chen Guoyin <chenguoyin.cgy@linux.alibaba.com>
Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn>
Signed-off-by: Lu Xufan <luxufan@iscas.ac.cn>
Test: treehugger
Change-Id: I1939426c4a22fea14232a7a93c768691ebb242ec
2022-10-04 00:37:37 +00:00
Florian Mayer
37b4a152a4 Do not strip bionic test helpers
Change-Id: I651511cf11d38f8012ddf968dacae530e7a66d69
2022-10-03 23:35:22 +00:00
Treehugger Robot
4d974e29d5 Merge "Clarify the docs for updating kernel headers." 2022-10-03 18:00:52 +00:00
Treehugger Robot
b8be231803 Merge "Initial import of the risc-v uapi headers." 2022-10-03 18:00:13 +00:00
Treehugger Robot
5afcbe1626 Merge "[MTE] use GTEST_SKIP on non-MTE hw for memtag_stack_test" 2022-10-03 15:36:12 +00:00
Elliott Hughes
93fb6b9459 Clarify the docs for updating kernel headers.
When I followed these instructions for risc-v, I mistakenly thought
that the auto-download option was a convenience that would get the
currently-approved headers, not the absolute latest. Make it clearer in
the documentation that this is for experts only, not for production.

Test: N/A
Change-Id: Iedce8ca0403b83e13bbe339cf343f85a37e99334
2022-10-01 15:29:37 +00:00
Elliott Hughes
5e7f8f116d Initial import of the risc-v uapi headers.
From external/kernel-headers.

Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Signed-off-by: Xia Lifang <lifang_xia@linux.alibaba.com>
Signed-off-by: Chen Guoyin <chenguoyin.cgy@linux.alibaba.com>
Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn>
Signed-off-by: Lu Xufan <luxufan@iscas.ac.cn>
Test: treehugger
Change-Id: Id73a86c9df77825853004137f8b801b24bba93f9
2022-10-01 15:10:58 +00:00
Treehugger Robot
a4ec112618 Merge "Improve a debug message to log a more useful namespace." 2022-09-30 23:48:01 +00:00
Treehugger Robot
ceed4b156f Merge "Add riscv64 to the list of uapi architectures." 2022-09-30 23:21:16 +00:00
Florian Mayer
7819140c5a [MTE] use GTEST_SKIP on non-MTE hw for memtag_stack_test
Bug: 174878242
Change-Id: If980ac4d9bf4bada6e150a5f30c486bdd6de3508
2022-09-30 23:02:52 +00:00
Elliott Hughes
05ef5d46c9 Add riscv64 to the list of uapi architectures.
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Signed-off-by: Xia Lifang <lifang_xia@linux.alibaba.com>
Signed-off-by: Chen Guoyin <chenguoyin.cgy@linux.alibaba.com>
Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn>
Signed-off-by: Lu Xufan <luxufan@iscas.ac.cn>
Test: bionic/libc/kernel/tools/generate_uapi_headers.sh
Change-Id: I926e1ceaab78b1bb9ae00cf39eb14005aae38e48
2022-09-30 21:37:57 +00:00
Martin Stjernholm
964b14c299 Improve a debug message to log a more useful namespace.
The two namespaces are often the same, but if they aren't the old
message could be confusing and not very helpful.

#codehealth

Test: Build and boot with `LinkerLogger::flags_ = kLogDlopen` and check
      logcat
Change-Id: I61a78d40f1eb5c074772e3c113a1055d3e915cb1
2022-09-30 20:52:58 +01:00
Treehugger Robot
ef49903b87 Merge "Cast sysinfo.uptime for musl" 2022-09-30 00:52:23 +00:00
Colin Cross
26532523c6 Cast sysinfo.uptime for musl
Upstream musl libc defines sysinfo.uptime as unsigned long, while the
kernel and glibc define it as long.  Cast it to long for the
comparision.

Bug: 190084016
Test: bionic-unit-tests-glibc
Change-Id: Ib322472d512a9a7474a936e33f35523e1dc995d9
2022-09-29 11:15:06 -07:00
Elliott Hughes
ffa1106a40 Merge "stack_protector_DeathTest#modify_stack_protector: avoid flake." 2022-09-28 14:47:49 +00:00
Elliott Hughes
2433fd28af Merge "Extend the process_madvise() docs." 2022-09-28 14:46:27 +00:00
Elliott Hughes
23ce50c172 stack_protector_DeathTest#modify_stack_protector: avoid flake.
I've never been able to repro the flake myself (in hundreds of thousands
of runs), but it's certainly possible that a byte of the cookie is
already zero. So let's invert the byte we plan to corrupt rather than
set it to zero.

Bug: http://b/202948861
Test: treehugger
Change-Id: Iccd552fe302d6c01e376819d23c11a308e03acdb
2022-09-27 22:37:03 +00:00
Elliott Hughes
ee41a35cc1 Extend the process_madvise() docs.
In particular, explain why we don't have process_mremove(), and why
adding this was probably a mistake (lest it be used as precedent for
similar bad decisions in future).

Also add the missing __INTRODUCED_IN().

Test: treehugger
Change-Id: Ic2d7ef32f6e288353b5be2bffd000ad2f501bf39
2022-09-27 19:27:10 +00:00
Elliott Hughes
305399264b Merge "Add __freadahead." 2022-09-27 18:47:34 +00:00
Benjamin Lerman
25e712ce82 Merge "fdsan: fix overflow in FdTableImpl::at" 2022-09-27 16:20:24 +00:00
Benjamin Lerman
27a37e70a7 fdsan: fix overflow in FdTableImpl::at
Change-Id: Ia687eb52a9c5469225550316f884c229a2218724
2022-09-27 11:39:04 +02:00
Elliott Hughes
82be76b5a2 Add __freadahead.
At the time I added <stdio_ext.h>, I just added what was on the man
page (which matched glibc), not realizing that musl and glibc had
slightly different functionality in their headers.

The toybox maintainer came up with a legitimate use case for this, for
which there is no portable workaround, so I'm adding it here. I'm not
adding the other functions that are in musl but not glibc for lack of a
motivating use case.

Bug: http://lists.landley.net/htdig.cgi/toybox-landley.net/2022-April/020864.html
Test: treehugger
Change-Id: I073baa86ff0271064d4e2f20a584d38787ead6b0
2022-09-22 23:47:42 +00:00
Elliott Hughes
72f572185f Merge "Update module configs for native tests" 2022-09-16 22:05:55 +00:00
Guang Zhu
82fc2d573c Update module configs for native tests
Use /data/local/tests/unrestricted as on-device test path so that
debuggerd can generate proper back traces.

Bug: 199904562
Bug: 184739644
Test: treehugger
Change-Id: I4ae1fb3182dde081121179f1b099374119205dd3
2022-09-16 20:05:38 +00:00
Florian Mayer
f8d7761525 Merge "Give init visibility into bionic headers." 2022-09-14 01:22:45 +00:00
Florian Mayer
f5d70cef37 Give init visibility into bionic headers.
Change-Id: Ia17a7382c6e3c51dab3694030e55796852d8b411
2022-09-13 13:59:26 -07:00
Christopher Ferris
cac5789bbc Merge "Write record allocs from interrupt handler." 2022-09-13 19:13:45 +00:00
Automerger Merge Worker
f724f00ee3 Merge "Merge "Merge android12L-tests-dev@8941410." into android13-tests-dev am: 2f297f9c39" 2022-09-12 18:29:02 +00:00
Treehugger Robot
10cd54e7f8 Merge "Merge android12L-tests-dev@8941410." into android13-tests-dev am: 2f297f9c39
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2185880

Change-Id: I02c480e0445435a7783af8ee39f8d14c2c801628
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-12 18:28:36 +00:00
Christopher Ferris
06993a6430 Write record allocs from interrupt handler.
There are many cases where there are no more allocations
when a dump of the record allocs might occur. Move the entries
being written to file in the interrupt handler.

Update the unit tests for this new functionality and add a new
unit test that verifies no allocations occur while the entries
are being written.

Fix the unit tests so that the record allocs files get deleted
properly.

Test: All unit tests pass.
Test: Ran 1000 iterations of unit tests to verify no flakes.
Change-Id: I20941596c1dda5a761522050dc155b06f3f3e735
2022-09-09 12:07:33 -07:00
Treehugger Robot
73306db45e Merge "Declare the headers of the ndk_library" 2022-09-09 01:28:04 +00:00
Florian Mayer
298bcecead Merge "Add android_mallopt to query MTE stack state" 2022-09-09 00:49:08 +00:00
Spandan Das
6feb2ccfe9 Declare the headers of the ndk_library
This creates a dependency edge between the ndk_library and its headers,
which should be a no-op in regular Soong builds. This dependency edge
will be used in the Multi-tree project to export the relevant .h files into a well
known location

Test: m nothing
Bug: 239044713
Change-Id: I3f38edfbb8ce6b47dd4e73de4e1e0ad7a371799c
2022-09-08 23:44:35 +00:00
Christopher Ferris
41d1f94be6 Merge "Fix tests/NOTICE file." 2022-09-08 23:29:35 +00:00
Christopher Ferris
76da7bad0e Fix tests/NOTICE file.
Some previous change did not update the NOTICE file properly.

Test: Uploads.
Change-Id: I9d1797cbb7d0d0485e697e8038497f182e33446c
2022-09-08 21:54:29 +00:00
Florian Mayer
cc61ad895e Add android_mallopt to query MTE stack state
Bug: 244364391
Change-Id: Ie6267201f0c2e293b27c71cd160a2311c9de8091
2022-09-07 23:38:42 +00:00
Treehugger Robot
2526b660fd Merge changes from topics "gwp-asan-headers", "native_handle_fdsan"
* changes:
  Open libasync_safe to any APEX
  Remove gwp_asan_headers from libc_defaults
2022-09-06 22:48:31 +00:00