Files
xen/tools
Andrew Cooper cda26aed40 x86/stubs: Introduce place_ret() to abstract away raw 0xc3's
The Indirect Target Selection speculative vulnerability means that indirect
branches (including RETs) are unsafe when in the first half of a cacheline.
This means it's not safe for logic using the stubs to write raw 0xc3's.

Introduce place_ret() which, for now, writes a raw 0xc3 but will contain
additional logic when return thunks are in use.

stub_selftest() doesn't strictly need to be converted as they only run on
boot, but doing so gets us a partial test of place_ret() too.

No functional change.

This is part of XSA-469 / CVE-2024-28956

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
(cherry picked from commit 2eb1132f79)
2025-05-12 17:27:09 +01:00
..
2024-09-04 16:06:21 +02:00
2024-05-15 19:59:52 +01:00
2024-07-18 16:00:52 +01:00
2024-09-04 16:07:41 +02:00
2025-02-21 14:58:54 +00:00