On 07/23/2018 02:59 PM, Josh Poimboeuf wrote: > On Mon, Jul 23, 2018 at 11:38:30PM +0200, Pavel Machek wrote: >> But for now I'd like at least "global" option of turning pti on/off >> during runtime for benchmarking. Let me see... >> >> Something like this, or is it going to be way more complex? Does >> anyone have patch by chance? > RHEL/CentOS has a global PTI enable/disable, which uses stop_machine(). Let's not forget PTI's NX-for-userspace in the kernel page tables. That provides Spectre V2 mitigation as well as Meltdown.