[roll] Roll fuchsia [kernel][riscv64] Rewrite exception handling assembly

This replaces the machine exception handler (stvec) entry point
with a new implementation from scratch.  It calls into the higher
layers with some slightly different signatures, all converge back
to the existing C++ code paths for now.

The new implementation handles kernel stack overflow and kernel
shadow call stack overflow.  When that's detected, the faulting
CPU switches to an emergency stack that sits in bss until used by
the first CPU that needs it, to perform the full panic path with
no cascading stack overflows.

Thread startup is adjusted slightly to facilitate the new way
arch_uspace_entry works, which is to warp into the normal path
for returning from a user exception.  To make sure this is safe,
the iframe representing the user state is preallocated at the top
of the stack in thread startup so arch_uspace_entry can safely
touch it from compiled code before resetting the stack pointers.

Run-All-Tests: true
Test: k crash stackstomp; k crash recurse; k crash shadow_call_stack_stomp
Original-Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1626014
Original-Original-Revision: 1fcc4d1051fa5b630b0a74c529eab72b265a8613
GitOrigin-RevId: ab6d8c57e41edb4637724ee319986d15c5b7e6be
Change-Id: I4458dc38699d02ad950695c27716cffba6984ceb
Reviewed-on: https://fuchsia-review.googlesource.com/c/integration/+/1648977
Cr-Commit-Position: refs/heads/main@{#194547}
1 file changed
tree: 4b4f53905c44ec63d5158d2e0419e31c2dd92175
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cobalt
  6. flower
  7. jiri.lock
  8. MILESTONE
  9. minimal
  10. prebuilts
  11. README.md
  12. stem
  13. test_durations
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.