Posting this to an internal list because v8.5 is still NDA.
There are a lot of holes to be filled wrt the user-level ABI.
In the meantime, I have a cpu property to turn on GP for all
pages. Which means that to test it, I provide a complete
statically linked program, so that nothing uses indirect
branches except that the ones I use myself.
r~
Richard Henderson (11):
target/arm: Introduce isar_feature_aa64_bti
target/arm: Add PSTATE.BTYPE
target/arm: Add BT and BTYPE to tb->flags
target/arm: Record the GP bit for a page in MemTxAttrs
target/arm: Default handling of BTYPE during translation
target/arm: Reset btype for direct branches and syscalls
target/arm: Set btype for indirect branches
target/arm: Add guarded_pages cpu property for user-only
target/arm: Enable BTI for -cpu max
linux-user/aarch64: Reset btype for signal handlers
tests/tcg/aarch64: Add bti smoke test
include/exec/memattrs.h | 2 +
target/arm/cpu.h | 22 +++-
target/arm/internals.h | 6 +
target/arm/translate.h | 9 ++
linux-user/aarch64/signal.c | 4 +
target/arm/cpu64.c | 24 ++++
target/arm/helper.c | 28 +++--
target/arm/translate-a64.c | 196 +++++++++++++++++++++++++++++-
tests/tcg/aarch64/bti-1.c | 61 ++++++++++
tests/tcg/aarch64/bti-crt.inc.c | 51 ++++++++
tests/tcg/aarch64/Makefile.target | 7 +-
11 files changed, 399 insertions(+), 11 deletions(-)
create mode 100644 tests/tcg/aarch64/bti-1.c
create mode 100644 tests/tcg/aarch64/bti-crt.inc.c
--
2.17.2
=== Work done during the last week ===
* LLVM-432 (Support arithmetic on FileCheck regex variable): in progress
+ finished cleaning up code
+ rebase on top of trunk
+ fix all issues discovered with check-all
+ add detection of conflict between numeric variable and pattern variable
+ add memory management (yay for shared_ptr)
* GNU-593 (Tied softfloat mul and div): upstream review
+ search for a non-elf arm target
-> none seems supported
* Fix issues with -mslow-flash-data: committed
+ finish testing patch for big endian and respond to upstream comments
* GNU-598 (Do not select hardfloat when targeting Thumb-1 with mfpu
set): upstream review
+ write and test patch, submit upstream
* GNU-597 (pr77904.c test failure): upstream review
+ Investigate whether code added for PR77904 should be kept
+ test and submit patch for external review
=== Plan for week 51 ===
* DSGHACK-25 (Support arithmetic on FileCheck regex variable):
+ extend testcase coverage (add tests for latest syntax change and
add more negative testing)
+ clean up the code written last week
+ improve documentation
* Tied softfloat mul and div:
+ get it committed
* GNU-598 (Do not select hardfloat when targeting Thumb-1 with mfpu set):
+ get it committed
* GNU-597 (pr77904.c test failure):
+ get it committed
* Try to reproduce perf issue mentioned in week #30's weekly report on
latest perf
o 4 days week.
o GNU releases:
* Gave support for 6.5-2018.12-rc1
o LLVM
* Tested and uploaded 7.0.1-rc3 ARM and AArch64 binaries
* Machine Outliner on ARM prototype:
- Fixed a bug in tailcall handling on ARM
- Working on an issue with outlined calls through function pointers
o Misc
* Various meetings and discussions.
Progress:
[VIRT-246 # ARMv8.1-LOR Limited Ordering Regions ]
Merged to target-arm.next.
[VIRT-294 # ARMv8.3-PAuth, Pointer Authentication ]
Posted v2.
Now booting Will's kernel, which properly detects and enables support.
Once that gets to mainline I'll add the prctl to linux-user/.
[VIRT-339 # ARMv8.5-BTI, Branch Target Identification ]
Started.
[VIRT-327 # Richard's upstream QEMU work ]
Put the ool softmmu patch set on hold for now, as that is not
clearly ready when development opens again. Rebased all of the
other queued tcg patch sets around that. Generated pull request.
r~
Progress:
* VIRT-65 [QEMU upstream maintainership]
- QEMU 3.1.0 finally released
- sent out a couple of pull requests
- some easy patches fixing more clang warnings about taking the
address of a member in a packed struct
- read through the Memory Tagging extension specification
(and a bunch of arm-internal meetings etc this week)
thanks
-- PMM
[TCWG-1492] Add timeout and retry to git fetches in Linaro ci infrastructure.
[LLVM-505] LLD implement --pic-veneer for AArch32 linux kernel (pr39886)
In upstream review
[LLVM-509] Add support for v6m range extension thunks to LLD
In upstream review
pr34928 fixed undefined weak reference handling for AArch64
Spent quite a bit of time revisiting cross-compilation of compiler-rt
after helping out on llvm-dev. Posted a review D55709 to improve the
documentation.
Planned Absences
Next 3 weeks on Christmas holiday back Monday 7th January
== Progress ==
GlobalISel support for Thumb2:
# [LLVM-506] G_LOAD, G_STORE
# [LLVM-500] G_ADD, G_SUB, G_MUL, G_AND, G_OR, G_XOR
# [LLVM-516] G_SEXT, G_ZEXT, G_ANYEXT, G_TRUNC
# G_INTTOPTR, G_PTRTOINT
- Committed upstream
# [LLVM-518] Support G_CONSTANT for Thumb
- Started adding tests
== Plan ==
# [LLVM-518] Support G_CONSTANT for Thumb
== Progress ==
* FDPIC
- (GNU-499) GCC: wait for feedback on v4 patches
- (GNU-411) GDB: will try to keep as much as possible in common with frv
* GCC upstream validation:
- reported a few regressions, helped testing some patches
- dealing with some random results, still
- qemu-3.1.0-rc3, memory consumption: no time to really look at the
problem. Unable to match time's figures with LSF's
* GCC:
- (GNU-99) rebased ubsan / bare-metal patches. Trying to build an LLVM
toolchain to see how to properly apply my patches: still trying,
thanks to Peter Smith for the support!
* misc (conf-calls, meetings, emails, ....)
- reviewing/submitted infra script patches
- ran Spec2006 on aarch32 using gcc-8.2 sysroot, on cortex-a57,
results match the
previous ones, so the improvements are only imputable to the compiler.
1 regression on gobmk (created GNU-596 to look at this)
- dealing with nasty ST-internal infrastructure problems
- (GNU-141) noinit/persistent attributes: they are already supported
by GCC for TI msp430. The patches are small, plus one libgloss patch.
- (GNU-592): started improving benchmarking scripts
== Next ==
FDPIC:
- GCC: handle feedback on v4 patches
- GDB: update patches
- uclibc-ng: look at how to test fdpic mode with openadk
Validation:
- isolate if/why qemu-3.1.0-rc3 consumes more memory than 2.11 for
aarch64-linux target
Misc:
GNU-592