by j_coder · 8y ago · 0 comments
Massive performance hit but only on misbehaved software. Well behaved software will not have the performance hit of KPTI.
Kernel could even switch dynamically to KPTI if too many read/write attempts from user space.
mov rax, [Somekerneladdress]
would trigger an interrupt even on speculative execution as described on https://cyber.wtf/2017/07/28/negative-result-reading-kernel-...
ADDED: So in the interrupt handler the kernel could evict all user space pages from cache before returning control to user space so it could not use the timing attack on the cache of the speculative execution of Mov rbx,[rax+Someusermodeaddress] on the address rax+Someusermodeaddress.
cmp $0, [some_readable_but_uncached_addr_containing_zero]
je some_safe_location
//now the exploit
mov rax, [somekerneladdr]
...the rest of it...
cpu may speculatively execute past "jz" and speculatively do the load. no fault generated