Commit graph

38554 commits

Author SHA1 Message Date
Treehugger Robot
655639bbbc Merge "Nullability correction for stdlib module." am: 9a3164145c am: 67dcba5c85
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2510535

Change-Id: I1e2e0ff05207ab7c7230f1df45e88a6c18e435cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-30 17:33:54 +00:00
Treehugger Robot
67dcba5c85 Merge "Nullability correction for stdlib module." am: 9a3164145c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2510535

Change-Id: I1f5c1fd3c474408a20115550442a15e57be1a797
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-30 17:00:05 +00:00
Treehugger Robot
9a3164145c Merge "Nullability correction for stdlib module." 2023-03-29 18:54:34 +00:00
zijunzhao
99dd5b1e27 Nullability correction for stdlib module.
Bugs: b/245972273
Test: adb shell
Change-Id: I0a800ccfe3bae88d3e924dd621bad182cb186b27
2023-03-29 00:26:29 +00:00
Christopher Ferris
1ab5a4ceb3 Merge "Move M_PURGE to M_PURGE_ALL." am: 345f54666a am: 6206aca550
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2504135

Change-Id: Ia2c9ab188eea34aaff60a37f55bf54d8282d4cc3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 20:27:13 +00:00
Christopher Ferris
6206aca550 Merge "Move M_PURGE to M_PURGE_ALL." am: 345f54666a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2504135

Change-Id: I62115c19f3b09dc8ecec66411881384aaffc10b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 19:56:31 +00:00
Christopher Ferris
345f54666a Merge "Move M_PURGE to M_PURGE_ALL." 2023-03-24 19:29:51 +00:00
Treehugger Robot
54c7fcd259 Merge "Time for SEO in <android/api-level.h>." am: 76210fba9e am: 98665f2190
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2506958

Change-Id: I9fff7e5648bc6613de97042371951731946392eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 17:09:38 +00:00
Treehugger Robot
98665f2190 Merge "Time for SEO in <android/api-level.h>." am: 76210fba9e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2506958

Change-Id: Ibd50a1f1237aeebb383c056a7e00d062b2028b22
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 16:39:58 +00:00
Treehugger Robot
76210fba9e Merge "Time for SEO in <android/api-level.h>." 2023-03-24 16:10:48 +00:00
Yi Kong
801b77c7b2 Merge "Workaround boot loop by turning off stack protector check for noreturn calls" am: ab3a319746 am: 725df4c5de
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2483436

Change-Id: Ieaaff7e9a063abd1bb5db32ef30d080776de9cce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 14:11:51 +00:00
Yi Kong
725df4c5de Merge "Workaround boot loop by turning off stack protector check for noreturn calls" am: ab3a319746
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2483436

Change-Id: I045db07d4c154a49c8cd0288e93da5fc995e04ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 13:44:53 +00:00
Yi Kong
ab3a319746 Merge "Workaround boot loop by turning off stack protector check for noreturn calls" 2023-03-24 13:19:52 +00:00
Treehugger Robot
d53355b76b Merge "Skip the MemtagNoteTests when the overriding sysprop is set." am: bc28931eb9 am: 9f1530b9e0
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2505035

Change-Id: I6020febbc75c2a3fae50c05bfdbafbb2bd381e00
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 23:39:06 +00:00
Treehugger Robot
9f1530b9e0 Merge "Skip the MemtagNoteTests when the overriding sysprop is set." am: bc28931eb9
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2505035

Change-Id: I9545bff27595cfef23ba6628455cb277699bce80
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 23:08:40 +00:00
Treehugger Robot
bc28931eb9 Merge "Skip the MemtagNoteTests when the overriding sysprop is set." 2023-03-23 22:36:51 +00:00
Treehugger Robot
7c6baa77ab Merge "Add macro for API level V." am: 40af03dcaf am: feb8263213
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2506955

Change-Id: I8f974ad765431844da3f00b02763b8e8415f9d98
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 22:36:15 +00:00
Treehugger Robot
feb8263213 Merge "Add macro for API level V." am: 40af03dcaf
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2506955

Change-Id: I136da1f2694f23fd7cfc3d77ba3bdb47500c4350
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 22:04:20 +00:00
Elliott Hughes
572053a02e Time for SEO in <android/api-level.h>.
So many names/numbers for one release...

Test: treehugger
Change-Id: I00ddb13485c185fc003ea087f1df404bc39fa435
2023-03-23 21:30:15 +00:00
Treehugger Robot
40af03dcaf Merge "Add macro for API level V." 2023-03-23 21:28:49 +00:00
Elliott Hughes
117424496a Merge "risc-v: use clang's builtins for more of libm." am: 98886bb28d am: b2aef2641b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2503695

Change-Id: I58dce1ee355e86d8e9c68f5b3b575c96c810d3fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 19:48:06 +00:00
Elliott Hughes
b2aef2641b Merge "risc-v: use clang's builtins for more of libm." am: 98886bb28d
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2503695

Change-Id: Ic997e9ab1baed6b2f0c9b6d4846de92ed3c5ac7d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 18:40:38 +00:00
Dan Albert
b3e895c86a Add macro for API level V.
No idea if this will be the actual API level or not, but that's all
the more reason to abstract it away early...

Bug: None
Test: None
Change-Id: I8a17bb42dbb08a6e760427514af8331e7dc9b549
2023-03-23 18:35:16 +00:00
Elliott Hughes
98886bb28d Merge "risc-v: use clang's builtins for more of libm." 2023-03-23 18:09:55 +00:00
Peter Collingbourne
d642c30ee0 Skip the MemtagNoteTests when the overriding sysprop is set.
Bug: 273807460
Change-Id: Ieb33354fd8a705c1b2a661055f69d2ec4b32b5e8
2023-03-22 20:08:42 -07:00
Treehugger Robot
112cb737e9 Merge "Fix setjmp.bug_152210274 with HWASan/stack MTE enabled." am: 688bddc1e5 am: 2a65b66c99
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2501655

Change-Id: I6e0bf3a0c6cec3ffc376bfd5ac7b6e17bd3623d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 01:18:19 +00:00
Treehugger Robot
2a65b66c99 Merge "Fix setjmp.bug_152210274 with HWASan/stack MTE enabled." am: 688bddc1e5
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2501655

Change-Id: I1a2d2ee4620f51fea7ad08aaf44b8eb2b7d8c1af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 00:39:01 +00:00
Treehugger Robot
688bddc1e5 Merge "Fix setjmp.bug_152210274 with HWASan/stack MTE enabled." 2023-03-22 23:29:31 +00:00
Peter Collingbourne
523b53fba9 Merge "Disable stack tagging in CloneStartRoutine." am: 85a7f6b391 am: a34a37defa
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2501675

Change-Id: Ia2bc942feef63f356b017474d976ef80fc8cf809
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-22 22:58:59 +00:00
Peter Collingbourne
a34a37defa Merge "Disable stack tagging in CloneStartRoutine." am: 85a7f6b391
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2501675

Change-Id: I14dec7fbf97666a86ee721b1566ece1ae6e00fcc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-22 22:19:46 +00:00
Peter Collingbourne
85a7f6b391 Merge "Disable stack tagging in CloneStartRoutine." 2023-03-22 21:14:54 +00:00
Elliott Hughes
2289ca2bd3 risc-v: use clang's builtins for more of libm.
This completes the set, and gets riscv64 to parity with arm64.

Test: llvm-objdump -d
Test: bionic-unit-tests-static --gtest_filter='math*'
Bug: https://github.com/google/android-riscv64/issues/11
Change-Id: I4230005abcd8d6025d82f1e8afe5831fad2db04d
2023-03-22 14:11:35 -07:00
Peter Collingbourne
25a7c3fd57 Fix setjmp.bug_152210274 with HWASan/stack MTE enabled.
This test was flaky because there was no synchronization between the end
of the test function scope and the jumper threads, resulting in a racy
use-after-scope when accessing the thread array. Fix it by joining the
threads before leaving the test function scope.

Replace the thread array access, which can race with the store to the
thread array in the main thread, with an access to a pre-initialized
variable, which acts as a kind of enforcement that the threads are done
before leaving the test.

Bug: 227390656
Change-Id: Icfbb0d7cae66c12e5ce31072c34529e3c5fdf563
2023-03-22 13:49:53 -07:00
Christopher Ferris
f1ab9c4de7 Move M_PURGE to M_PURGE_ALL.
Since it doesn't matter if these calls take a little longer than
before, use the more thorough but slightly longer purge mechanism.

Test: Unit tests pass.
Change-Id: Ifab7166a9682a13231746b78717d52673d13be1b
2023-03-22 13:47:27 -07:00
Peter Collingbourne
955f04425e Disable stack tagging in CloneStartRoutine.
We don't support running threads on a tagged stack. Untagging SP may
lead to accesses to the stack via a non-SP register, which will be tag
checked, and the check will fail. And indeed that's exactly what the
__bionic_clone function does in its first instruction. Fix the problem by
disabling HWASan and MTE stack tagging on CloneStartRoutine, and remove
the call to untag_address, as it is unnecessary.

Bug: 273807460
Change-Id: I94cc56c816897531c0113c856b54ec41b4aab874
2023-03-21 22:57:50 -07:00
Elliott Hughes
8a9943531f Merge "riscv64 SCS support." am: 060cd2438c am: a53c650122
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2427910

Change-Id: Ied43c598e34a4961b907efccd4d1827c896b125a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 23:18:36 +00:00
Elliott Hughes
a53c650122 Merge "riscv64 SCS support." am: 060cd2438c
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2427910

Change-Id: Ice51f7ba02dad339357f3e036fed203f987d08f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 22:40:43 +00:00
Elliott Hughes
060cd2438c Merge "riscv64 SCS support." 2023-03-21 22:10:56 +00:00
Christopher Ferris
f00827fa22 Merge "Fix mte build breakage." am: 424cf4378a am: f4d7d42cc5
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2498995

Change-Id: I0000f141af0f27f160d393367fac54597f35ebb2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 22:02:15 +00:00
Florian Mayer
b3c31ef5a1 Merge "Add debug logging for memtag level" am: b4f4f4ecea am: 7de572f2fe
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2496156

Change-Id: I05e1985e9b3ee0b4acbc0adeb0f2e9f012e2fefa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 22:02:03 +00:00
Christopher Ferris
f4d7d42cc5 Merge "Fix mte build breakage." am: 424cf4378a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2498995

Change-Id: I579c45f5fd1f3169078f411bb1c8d00515b7679c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 21:23:59 +00:00
Florian Mayer
7de572f2fe Merge "Add debug logging for memtag level" am: b4f4f4ecea
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2496156

Change-Id: Icbed50d863eb07a54bbe540cb4ab3570f2496407
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 21:22:43 +00:00
Christopher Ferris
424cf4378a Merge "Fix mte build breakage." 2023-03-21 21:20:55 +00:00
Florian Mayer
b4f4f4ecea Merge "Add debug logging for memtag level" 2023-03-21 20:37:00 +00:00
Elliott Hughes
09a3965705 Merge "Increase the implementation of __memcpy_chk assembly" am: 690d9a0f52 am: cb0380be32
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2499056

Change-Id: I9781a5f7dc74e397d2e7d5709119ec6d26815d13
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 20:26:34 +00:00
Elliott Hughes
cb0380be32 Merge "Increase the implementation of __memcpy_chk assembly" am: 690d9a0f52
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2499056

Change-Id: I1c67d1ed1a3168c9fb2e3855ce791f68f00f99fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 19:45:05 +00:00
Elliott Hughes
690d9a0f52 Merge "Increase the implementation of __memcpy_chk assembly" 2023-03-21 19:18:54 +00:00
Christopher Ferris
35759fa84c Fix mte build breakage.
The strerror_buf is way too large, so instead of using a separate
buffer for just this string, reuse the already existing buffer.
Increase the buffer size to cover the maximum errno string.

Add a unit test to verify that none of the errno values are cut off
in the async_safe_format_buffer function when passing %m.

Bug: 274474681

Test: New unit test passes.
Test: Changing the buffer to a small value and verify that the test fails.
Change-Id: I4cb4652709582a8a6b958e12de5d923ec950e6b6
2023-03-21 18:11:02 +00:00
Florian Mayer
b3f3e86878 Add debug logging for memtag level
Test: adb logcat 'libc:D' | grep memtag
Bug: 272596642
Change-Id: I764a0ea4fd71b547d1c5b82a1537e50016578e0f
2023-03-21 11:10:43 -07:00
caowencheng
9a39eb3469 Increase the implementation of __memcpy_chk assembly
Use __memcpy_chk assembly to replace the implementation of c functions, which can reduce the use of instructions

Test: llvm-objdump

Change-Id: I5d75601626dc997626f6173d53af301183a64004
Signed-off-by: caowencheng <caowencheng@eswincomputing.com>
2023-03-21 02:05:14 +00:00