diff options
| author | OreoFR <noreply@users.noreply.github.com> | 2026-11-28 05:28:00 +0100 |
|---|---|---|
| committer | OreoFR <noreply@users.noreply.github.com> | 2026-11-28 05:28:00 +0100 |
| commit | 5d677b7ba2b2dd5b128455edf2b92bea6da4dcc2 (patch) | |
| tree | cca8090de22564ac93e738a50eedd77885732956 /scripts/launcher_python.sh | |
| parent | 63a73515d1fc26c309ac0d9cd13ec9afd2fa5016 (diff) | |
cpu_emulation: a CLWB #UD on a site another thread rewrote continues at it (RT-CLWB-PATCH)
Threads that fault on the same CLWB site together lost the race: a #UD handled
after another thread rewrote the site decoded CLFLUSHOPT (or the NOP), did not
know it and returned EXCEPTION_CONTINUE_SEARCH, which ends the title.
- The handler continues at a site that already holds the form written on this
host (or the NOP's halfway state): the CPU runs it.
- One lock around unprotect, re-check, write and protect again, so two threads
never interleave on a page; a site found rewritten under it is not written.
- The NOP is written opcode first (66 0F 1F /6 in between is a NOP too).
- The sites counter counts each site once, by the thread that wrote it.
cpu_emulation_test calls the handler with a made-up #UD, so it runs on hosts
with CLWB: first #UD, a second one on the rewritten site, and 16 threads on
2048 fresh execute-read sites. Before the fix 27958 of 32768 concurrent #UDs
were passed on, 4810 rewrites were counted for 2048 sites and pages were left
writable; with it all checks pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts/launcher_python.sh')
0 files changed, 0 insertions, 0 deletions