zephyr/arch/x86/core
Andy Ross 5b85d6da6a arch/x86_64: Poison instruction pointer of running threads
There was a bug where double-dispatch of a single thread on multiple
SMP CPUs was possible.  This can be mind-bending to diagnose, so when
CONFIG_ASSERT is enabled add an extra instruction to __resume (the
shared code path for both interupt return and context switch) that
poisons the shared RIP of the now-running thread with a recognizable
invalid value.

Now attempts to run the thread again will crash instantly with a
discoverable cookie in their instruction pointer, and this will remain
true until it gets a new RIP at the next interrupt or switch.

This is under CONFIG_ASSERT because it meets the same design goals of
"a cheap test for impossible situations", not because it's part of the
assertion framework.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-02-03 09:31:56 -05:00
..
ia32 kernel: cleanup and formally define CPU start fn 2020-01-13 16:35:10 -05:00
intel64 arch/x86_64: Poison instruction pointer of running threads 2020-02-03 09:31:56 -05:00
offsets x86: implement kernel page table isolation 2020-01-17 16:17:39 -05:00
acpi.c
CMakeLists.txt global: Fix up leading/trailing blank lines in files 2020-01-27 17:41:55 -06:00
common.S
cpuhalt.c
early_serial.c dts: Rename generated_dts_board*.{h,conf} to devicetree*.{h,conf} 2020-01-17 17:57:59 +01:00
fatal.c x86: implement hw-based oops for both variants 2020-01-13 16:35:10 -05:00
ia32.cmake
intel64.cmake x86: implement user mode on 64-bit 2020-01-13 16:35:10 -05:00
Kconfig.ia32 x86: remove retpoline code 2020-01-13 16:35:10 -05:00
Kconfig.intel64 x86: implement hw-based oops for both variants 2020-01-13 16:35:10 -05:00
memmap.c
multiboot.c
pcie.c
prep_c.c kernel: cleanup and formally define CPU start fn 2020-01-13 16:35:10 -05:00
reboot_rst_cnt.c
spec_ctrl.c
userspace.c x86: implement kernel page table isolation 2020-01-17 16:17:39 -05:00
x86_mmu.c x86: implement kernel page table isolation 2020-01-17 16:17:39 -05:00