GCC Middle and Back End API Reference
hwasan_stack_var Struct Reference
Collaboration diagram for hwasan_stack_var:

Data Fields

rtx untagged_base
 
rtx tagged_base
 
poly_int64 nearest_offset
 
poly_int64 farthest_offset
 
uint8_t tag_offset
 

Detailed Description

Structure defining the extent of one object on the stack that HWASAN needs
to tag in the corresponding shadow stack space.

The range this object spans on the stack is between `untagged_base +
nearest_offset` and `untagged_base + farthest_offset`.
`tagged_base` is an rtx containing the same value as `untagged_base` but
with a random tag stored in the top byte.  We record both `untagged_base`
and `tagged_base` so that `hwasan_emit_prologue` can use both without having
to emit RTL into the instruction stream to re-calculate one from the other.
(`hwasan_emit_prologue` needs to use both bases since the
__hwasan_tag_memory call it emits uses an untagged value, and it calculates
the tag to store in shadow memory based on the tag_offset plus the tag in
tagged_base).   

Field Documentation

◆ farthest_offset

poly_int64 hwasan_stack_var::farthest_offset

◆ nearest_offset

poly_int64 hwasan_stack_var::nearest_offset

◆ tag_offset

uint8_t hwasan_stack_var::tag_offset

◆ tagged_base

rtx hwasan_stack_var::tagged_base

◆ untagged_base

rtx hwasan_stack_var::untagged_base

The documentation for this struct was generated from the following file: