zephyr/arch/x86/include
Ederson de Souza 2d94c5d7aa arch/x86: Support for automatic shadow stacks
- No more need for special IRQ shadow stacks - just reuse the one
   created for z_interrupt_stacks;
   - Add the linker sections for the pairs of stack/shadow stack;
   - Support shadow stack arrays.

Last item was a bit challenging: shadow stacks need to be initialised
before use, and this is done statically for normal shadow stacks. To
initialise the shadow stacks in the array, one needs how many entries it
has. While a simple approach would use `LISTIFY` to them do the
initialization on all entries, that is not possible as many stack arrays
are created using expressions instead of literals, such as
`CONFIG_MP_MAX_NUM_CPUS - 1`, which won't work with `LISTIFY`.

Instead, this patch uses a script, `gen_static_shstk_array.py` that
gathers all needed information and patches the ELF to initialize the
stack arrays. Note that this needs to be done before any other operation
on the ELF file that creates new representations, such as the .bin
output.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-09-02 07:56:48 +02:00
..
ia32 arch/x86: Use Zephyr HW shadow stack arch interface 2025-09-02 07:56:48 +02:00
intel64 arch/x86: Support for automatic shadow stacks 2025-09-02 07:56:48 +02:00
cet.h arch/x86: Use Zephyr HW shadow stack arch interface 2025-09-02 07:56:48 +02:00
cet_asm.inc arch/x86: Support shadow stack on ia32 2025-09-02 07:56:48 +02:00
kernel_arch_data.h x86: add exception handling for control protection exception 2025-09-02 07:56:48 +02:00
kernel_arch_func.h arch: define struct arch_esf and deprecate z_arch_esf_t 2024-06-04 14:02:51 -05:00
offsets_short_arch.h x86: optimize locations of psp and thread ptables 2020-01-13 16:35:10 -05:00
x86_mmu.h arch: x86: add missing semicolon for z_x86_kpti_is_access_ok() 2025-01-22 08:08:40 +01:00