Commit graph

37202 commits

Author SHA1 Message Date
Elliott Hughes
43462707a1 riscv64 TLS support.
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: I14efb4a03a3dc2ec736d7e47a3f8859c886eb9d6
2022-10-10 20:30:24 +00:00
Elliott Hughes
c6bddf4516 Merge "riscv64 <fenv.h>." 2022-10-08 03:03:13 +00:00
Elliott Hughes
e0b9474854 Merge "riscv64 __get_tls()." 2022-10-08 03:02:56 +00:00
Treehugger Robot
002b57c00e Merge "riscv64 BIONIC_STOP_UNWIND." 2022-10-07 23:15:25 +00:00
Treehugger Robot
775112ab88 Merge "Pull in the riscv64 uapi headers for riscv64 builds." 2022-10-07 22:26:49 +00:00
Elliott Hughes
fc009dd8a7 riscv64 __get_tls().
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: Ie7616cef6d394ba457c30c58d15f696c9b6d3853
2022-10-07 21:33:57 +00:00
Elliott Hughes
203b0b7346 riscv64 BIONIC_STOP_UNWIND.
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: I1b6723e9fb60de8f98a716ef388ec81a41df02d3
2022-10-07 21:33:08 +00:00
Elliott Hughes
4c6d66c472 riscv64 <fenv.h>.
Just the interface for now; implementation to come later.

Test: treehugger
Change-Id: Id1f0b158f708ff501b5e13fe92c6736e4507d7b6
2022-10-07 21:15:26 +00:00
Elliott Hughes
48e5333dd0 Pull in the riscv64 uapi headers for riscv64 builds.
Test: treehugger
Change-Id: I0c41a1a5b9805057609c68a49f67e6e24d4a0572
2022-10-07 20:39:25 +00:00
Treehugger Robot
771eacc470 Merge changes from topic "riscv64-elf"
* changes:
  Switch to FreeBSD's elf_common.h.
  Kernel header scrubber: remove unused map entries.
2022-10-07 16:26:44 +00:00
Elliott Hughes
0f19b10b5d Switch to FreeBSD's elf_common.h.
In particular, it contains all the riscv64 definitions we need, and lets
us clear up a lot of our existing ELF headers.

The other two BSDs seem to have errors and/or gaps in their riscv64
constants.

Test: treehugger
Change-Id: I92e48ef56c52c271ff6ed341b82169aa91f11d98
2022-10-07 00:04:44 +00:00
Elliott Hughes
bba6ddff12 Kernel header scrubber: remove unused map entries.
I was going to add riscv64 and define __riscv_xlen to 64 here, but our
"preprocessor" in python can't simpify `MACRO_NAME == 123` expressions
anyway. Rather than add another empty map, remove the other unused maps
and explain why this functionality is still useful as long as the legacy
32-bit ABIs are still with us.

Test: treehugger
Change-Id: I553059942920e7d323a0ca8a6fd5f39bc2d35063
2022-10-06 20:40:44 +00:00
Treehugger Robot
4091afb2cd Merge "Add __tls_get_addr for riscv64." 2022-10-06 20:07:48 +00:00
Elliott Hughes
76be72dde4 Add __tls_get_addr for riscv64.
We added this symbol somewhat inconsistently, with arm and x86-64 in one
release and arm64 in another. It doesn't really matter where we add
riscv64 (since there was no riscv64 at either of these now-historical
API levels), so arbitrarily go with the majority.

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: I1ef1e0ebdbece728aaef52c08ee57cca1197cb95
2022-10-06 15:18:35 +00:00
Elliott Hughes
5394de7b05 Merge "riscv64's struct stat is the same as arm64's." 2022-10-06 14:41:03 +00:00
Automerger Merge Worker
aafcd987ff Merge "Merge "Merge "Merge "stack_protector_DeathTest#modify_stack_protector: avoid flake." into android12-tests-dev am: 793d1fb5ab" into android12L-tests-dev am: 6aa3bdfb16" into android13-tests-dev am: 159a0e884f" 2022-10-06 00:55:42 +00:00
Automerger Merge Worker
cdcaa48f5f Merge "Merge "Merge "stack_protector_DeathTest#modify_stack_protector: avoid flake." into android12-tests-dev am: 793d1fb5ab" into android12L-tests-dev am: 6aa3bdfb16" into android13-tests-dev am: 159a0e884f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2240186

Change-Id: Ic292216ca46c7488ad53104b531e47232e58a7cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-06 00:55:39 +00:00
Elliott Hughes
5cc8a46419 riscv64's struct stat is the same as arm64's.
(And all other new 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: treehugger
Change-Id: Iceb2dd16c738302624980179788c4a2e68b797ed
2022-10-06 00:26:18 +00:00
Automerger Merge Worker
159a0e884f Merge "Merge "Merge "stack_protector_DeathTest#modify_stack_protector: avoid flake." into android12-tests-dev am: 793d1fb5ab" into android12L-tests-dev am: 6aa3bdfb16" into android13-tests-dev 2022-10-06 00:22:49 +00:00
Automerger Merge Worker
4b13827fe4 Merge "Merge "stack_protector_DeathTest#modify_stack_protector: avoid flake." into android12-tests-dev am: 793d1fb5ab" into android12L-tests-dev am: 6aa3bdfb16
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2240186

Change-Id: I479c56a6509cef84a1f614a937a6434ebce5dbcd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-06 00:22:47 +00:00
Automerger Merge Worker
6aa3bdfb16 Merge "Merge "stack_protector_DeathTest#modify_stack_protector: avoid flake." into android12-tests-dev am: 793d1fb5ab" into android12L-tests-dev 2022-10-05 23:57:04 +00:00
Shubhangi Pawar
32e6cca328 Merge "stack_protector_DeathTest#modify_stack_protector: avoid flake." into android12-tests-dev am: 793d1fb5ab
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2240186

Change-Id: I3b367d57efa507d95bba1dfcc630237995c7adda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-05 23:57:01 +00:00
Shubhangi Pawar
793d1fb5ab Merge "stack_protector_DeathTest#modify_stack_protector: avoid flake." into android12-tests-dev 2022-10-05 23:20:17 +00:00
Treehugger Robot
4c524711a1 Merge "s/riscv/riscv64/" 2022-10-05 22:18:47 +00:00
Elliott Hughes
82770d8bfe Merge "Call out the REL architectures and make RELA the default." 2022-10-05 21:42:04 +00:00
Elliott Hughes
6cfd1b59b0 Call out the REL architectures and make RELA the default.
That is: list the two legacy architectures rather than non-legacy ones!

Test: treehugger
Change-Id: I6545a27e740d83e0279b04f161cec179bb0253af
2022-10-05 21:41:48 +00:00
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
Elliott Hughes
b24c89b4df 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
(cherry picked from commit 23ce50c172)
2022-10-04 00:00:50 +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