On Wed, Jul 19, 2017 at 11:17:23PM -0500, Josh Poimboeuf wrote: > +static void swapgs_unload_hook(void) > +{ > + if (paravirt_enabled() && strcmp(pv_info.name, "KVM")) > + return; > + > + write_cr0(read_cr0() & ~X86_CR0_WP); > + barrier(); > + > + set_intr_gate_ist(X86_TRAP_SS, stack_segment_v2, STACKFAULT_STACK); s/stack_segment_v2/stack_segment/ for the unload hook > + > + barrier(); > + write_cr0(read_cr0() | X86_CR0_WP); > +} > +KLP_UNLOAD_HOOK(swapgs_unload_hook); -- Josh -- To unsubscribe from this list: send the line "unsubscribe live-patching" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html