[RFC v2][PATCH 04/11] x86: Implement __arch_rare_write_begin/unmap()
Peter Zijlstra
peterz at infradead.org
Fri Apr 7 02:37:08 PDT 2017
On Wed, Mar 29, 2017 at 11:15:56AM -0700, Kees Cook wrote:
> +static __always_inline unsigned long __arch_rare_write_end(void)
> +{
> + unsigned long cr0;
> +
> + barrier();
> + cr0 = read_cr0() ^ X86_CR0_WP;
> + BUG_ON(!(cr0 & X86_CR0_WP));
> + write_cr0(cr0);
> + barrier();
> + preempt_enable_no_resched();
NAK
> + return cr0 ^ X86_CR0_WP;
> +}
More information about the linux-arm-kernel
mailing list