Commit graph

11130 commits

Author SHA1 Message Date
Treehugger Robot
c35f7d6a84 Merge "Set __BIONIC_COMPLICATED_NULLNESS for the vsnprintf family" 2023-04-27 01:50:38 +00:00
zijunzhao
e1833e54a7 Set __BIONIC_COMPLICATED_NULLNESS for the vsnprintf family
When annotating the netinet directory aosp/2552567, we realize the
argment s for vsnprintf family can be null only if the buffer size is 0.
So we correct them and add some tests to verify our assumption.

Bugs: b/245972273
Test: adb shell
Change-Id: I51063286272be0daee0d7c1453a374b1f5674481
2023-04-26 23:14:36 +00:00
Treehugger Robot
4d1405e509 Merge "Nullability check for modules in the netinet directory." 2023-04-25 22:35:44 +00:00
zijunzhao
577177a326 Nullability check for modules in the netinet directory.
Bugs: b/245972273
Test: adb shell
Change-Id: Ia133f55c3e93ae00b605298365f1c00396bcfba7
2023-04-25 20:10:14 +00:00
Elliott Hughes
873c1ca3cb Add SYS_riscv_flush_icache.
Fix the uapi import script to look at the riscv/asm/ directory too, and
re-run it to add the missing SYS_riscv_* entry (there's only this one)
to glibc-syscalls.h.

Test: treehugger
Change-Id: Ie52c6ca1943c05bb615932174e49e7fb79725a7b
2023-04-25 12:13:56 -07:00
Treehugger Robot
d3733e1edd Merge "riscv64: fix the name of Zisslpcfi." 2023-04-22 01:19:29 +00:00
Elliott Hughes
7663578d73 riscv64: fix the name of Zisslpcfi.
Love these risc-v extension names!

Test: N/A
Change-Id: Ieb13f82a507aa11d79650b2cf627e68f213d6a79
2023-04-21 15:32:46 -07:00
zijunzhao
271d4d2515 Nullability check for sem module.
Bugs: b/245972273
Test: adb shell
Change-Id: Ie29aa34c449300c53591557c99b6ec08ebe3efcf
2023-04-21 21:34:11 +00:00
zijunzhao
21e1f2d324 Nullability check for statvfs module.
Bugs: b/245972273
Test: adb shell
Change-Id: I7e28a869e4dd66a05182abe71ff121da7cfc7283
2023-04-21 00:06:14 +00:00
zijunzhao
3b846ea6e7 Implement C23 printf 'w' length modifiers
wN: Specifies that a following b, d, i, o, u, x, or X
conversion specifier applies to an integer argument with
a specific width where N is a positive decimal integer with
no leading zeros

Bug: b/271903607
Test: adb shell
Change-Id: I688f6cefeb2e5c8325b007a59935a46f4116ac29
2023-04-20 20:34:33 +00:00
Zijun Zhao
e2abfb3ddf Merge "Nullability check for select module." 2023-04-20 17:33:46 +00:00
zijunzhao
7ce2f95e28 Nullability check for wchar module.
Bugs: b/245972273
Test: adb shell
Change-Id: I9898a1120c2364e5269633a67bf789a8bb943ba5
2023-04-20 01:41:49 +00:00
zijunzhao
271abebf58 Nullability check for select module.
Bugs: b/245972273
Test: adb shell
Change-Id: If847c46df7f1666e4d0d530b196ee3e2be6f0cb8
2023-04-20 01:19:03 +00:00
Elliott Hughes
17b2bae190 Merge "Make tmpfile() respect $TMPDIR." 2023-04-19 20:01:51 +00:00
Spandan Das
a43de5cbfe Revert "Add versions property to libc_hwasan stubs"
This reverts commit fe2907c133.

Reason for revert: Breaks bionic-unit-tests b/278795547. Since the original mixed build change is being reverted for now (aosp/2547450), fe2907c133 is not needed immediately

Change-Id: I2deb06a38322bf8296d4721c840f06f35b757177
2023-04-19 17:06:24 +00:00
Elliott Hughes
8b86c0bdeb Make tmpfile() respect $TMPDIR.
Contrary to the old comment, POSIX says nothing about whether or not
tmpfile() respects $TMPDIR, and it's significantly more useful on
Android if it does (because there's no shared /tmp that everyone can
write to).

Bug: https://issuetracker.google.com/36991167
Test: treehugger
Change-Id: I3cc45adff167420f100c8ed1c63cba1ea67e9f70
2023-04-18 17:11:06 -07:00
Spandan Das
fe2907c133 Add versions property to libc_hwasan stubs
bp2build will generate the stub targets only if versions is not empty.

Test: b query //bionic/libc:* | grep libc_hwasan_stub_libs-current

Change-Id: Iac905497ae4955a44b7b29e2d29a2c702c86da8e
2023-04-18 16:38:46 +00:00
Zijun Zhao
7b90c81b7c Merge "Nullability check for mount module." 2023-04-17 18:41:24 +00:00
Zijun Zhao
8d3ae82c52 Merge "Nullability check for inotify module." 2023-04-17 18:25:05 +00:00
Treehugger Robot
e1df179f00 Merge "Nullability check for wait module." 2023-04-17 18:13:09 +00:00
Treehugger Robot
a1ff2e6159 Merge "Nullability check for msg module." 2023-04-17 18:09:10 +00:00
zijunzhao
fa1936bd0b Nullability check for wait module.
Bugs: b/245972273
Test: adb shell
Change-Id: I407cc592522fc8feda1916d72525d147c9c58711
2023-04-15 01:17:54 +00:00
zijunzhao
ccc9d8dbf4 Nullability check for mount module.
Bugs: b/245972273
Test: adb shell
Change-Id: I86ccf6c68f8376e47cb59f05c737d4bbef58ef86
2023-04-15 01:16:51 +00:00
zijunzhao
f4141fbcfa Nullability check for inotify module.
Bugs: b/245972273
Test: adb shell
Change-Id: I213035a8a3cf1fada0092f97c42723739d49db61
2023-04-15 01:15:31 +00:00
zijunzhao
c76899fe5e Nullability check for msg module.
Bugs: b/245972273
Test: adb shell
Change-Id: Iefb2ae298240b91fcf5657aca0e6f8370095f50b
2023-04-15 01:13:26 +00:00
Florian Mayer
ff116eda61 Fix build error on darwin_arm64
Change-Id: Ie5bc9252de8349c3bfb8269919c0a173a9d9cc2d
2023-04-14 17:50:59 -07:00
Florian Mayer
4967017c86 Merge "Introduce hwasan mode for linker" 2023-04-14 23:27:56 +00:00
Treehugger Robot
fb63e485f1 Merge "Nullability check for capability module." 2023-04-14 21:35:58 +00:00
Treehugger Robot
3d59f2838a Merge "Nullability check for ipc module." 2023-04-14 18:29:59 +00:00
Treehugger Robot
ec50cc6f34 Merge "Nullability check for sendfile module." 2023-04-14 15:19:41 +00:00
Treehugger Robot
177b724cb4 Merge "Nullability check for random module." 2023-04-14 14:41:12 +00:00
Florian Mayer
c10d064b5c Introduce hwasan mode for linker
This mode instructs the linker to search for libraries in hwasan
subdirectories of all library search paths. This is set up to contain a
hwasan-enabled copy of libc, which is needed for HWASan programs to
operate. There are two ways this mode can be enabled:

* for native binaries, by using the linker_hwasan64 symlink as its
  interpreter
* for apps: by setting the LD_HWASAN environment variable in wrap.sh

Bug: 276930343
Change-Id: I0f4117a50091616f26947fbe37a28ee573b97ad0
2023-04-14 01:33:30 -07:00
zijunzhao
e14f2f9f20 Nullability check for sendfile module.
Bugs: b/245972273
Test: adb shell
Change-Id: I47d116b1faf7d53ac51589e393a3df96874a4f37
2023-04-14 01:07:12 +00:00
zijunzhao
7f5c789f35 Nullability check for ipc module.
Bugs: b/245972273
Test: adb shell
Change-Id: Idb89b878e415a62399890dcd3b40e54c3e9c9ef6
2023-04-14 01:05:54 +00:00
zijunzhao
181c31653e Nullability check for capability module.
Bugs: b/245972273
Test: adb shell
Change-Id: I9df50d82e7b86576912ed42e93b1e98c6ded6551
2023-04-14 01:04:29 +00:00
zijunzhao
e43d55348f Nullability check for random module.
Bugs: b/245972273
Test: adb shell
Change-Id: Ie7e06bcf4fda1b177c8d8fcb6a813c1b4a50ea26
2023-04-14 01:01:37 +00:00
Treehugger Robot
be39cd5ebb Merge "Nullability check for modules in include/android directory" 2023-04-13 18:37:42 +00:00
Elliott Hughes
4aa40a5f77 Merge "riscv64: switch from x18 to gp for shadow call stack." 2023-04-13 14:33:06 +00:00
Elliott Hughes
989c15197a Merge "setjmp.h: add some historical detail about the _JBLEN values." 2023-04-13 14:05:02 +00:00
zijunzhao
ac6d59cc75 Nullability check for modules in include/android directory
Bugs: b/245972273
Test: adb shell
Change-Id: Ic00d207331d9837a01cf96ec7fe623961e653051
2023-04-12 23:26:46 +00:00
Elliott Hughes
7dd3896fe1 riscv64: switch from x18 to gp for shadow call stack.
We want to give back a useful callee-saved general purpose
register (x18) that was only "chosen" because it was what llvm
allowed for historical reasons. gp is a better choice because it's
effectively unused otherwise anyway.

Unfortunately, that means we need extra space in jmp_buf (which I've
reserved in an earlier change, e7b3b8b467),
so let's rearrange the entries in jmp_buf to match their order in the
register file.

Bug: https://github.com/google/android-riscv64/issues/72
Bug: http://b/277909695
Test: treehugger
Change-Id: Ia629409a894c1a83d2052885702bbdd895c758e1
2023-04-12 14:19:38 -07:00
Elliott Hughes
634186b505 setjmp.h: add some historical detail about the _JBLEN values.
Test: treehugger
Change-Id: Iadc16347be9bb186d9e7ada1e6f44bd2c36b04f2
2023-04-12 12:43:10 -07:00
zijunzhao
d3e0652877 Nullability check for semaphore module
Bugs: b/245972273
Test: adb shell
Change-Id: I52598efabf40a49dc75057dc8acb8228ed039fca
2023-04-12 18:07:11 +00:00
Treehugger Robot
97950cb186 Merge "Rename files/modules that have the same name" 2023-04-12 01:12:14 +00:00
Cole Faust
f5968d82f5 Rename files/modules that have the same name
Bazel doesn't like it when modules produce files with the same name
as the module itself, and gives warnings.

Rename either the module or file in this case so that the file has
an extension and the module doesn't.

Bug: 198619163
Test: m nothing
Change-Id: Ic4592b06f575496ffd54ac75cb4d682118b29d93
2023-04-11 15:20:19 -07:00
Treehugger Robot
4473a937df Merge "Revert "Workaround boot loop by turning off stack protector check for noreturn calls"" 2023-04-11 15:04:46 +00:00
Yi Kong
66c09671fa Revert "Workaround boot loop by turning off stack protector check for noreturn calls"
This reverts commit 9b4cf9733f.

Fixed by https://reviews.llvm.org/D147975.

Change-Id: I2de39359783d739fd7f9da410fd78421638dbd70
2023-04-11 06:56:31 +00:00
Treehugger Robot
ac599ac89e Merge "Exclude crtbrand.o from the NDK sysroot." 2023-04-11 01:00:04 +00:00
Elliott Hughes
66542d6b97 Merge "setjmp.h: increase riscv64 jmp_buf size." 2023-04-07 15:39:34 +00:00
Treehugger Robot
b6ad73993d Merge "Nullability check for pthread module" 2023-04-07 09:26:55 +00:00