Documentation/arch/riscv/zicfiss.rst

Source file repositories/reference/linux-study-clean/Documentation/arch/riscv/zicfiss.rst

File Facts

System
Linux kernel
Corpus path
Documentation/arch/riscv/zicfiss.rst
Extension
.rst
Size
8589 bytes
Lines
195
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

struct __sc_riscv_cfi_state {
        unsigned long ss_ptr;
    };

As part of signal delivery, the shadow stack token is saved on the
current shadow stack itself.  The updated pointer is saved away in the
:c:macro:`ss_ptr` field in :c:macro:`__sc_riscv_cfi_state` under
:c:macro:`sigcontext`. The existing shadow stack allocation is used
for signal delivery.  During :c:macro:`sigreturn`, kernel will obtain
:c:macro:`ss_ptr` from :c:macro:`sigcontext`, verify the saved
token on the shadow stack, and switch the shadow stack.

Annotation

Implementation Notes