Go to the documentation of this file.
13 #ifndef _ASM_X86_SMAP_H
14 #define _ASM_X86_SMAP_H
18 #include <asm/cpufeature.h>
21 #define __ASM_CLAC .byte 0x0f,0x01,0xca
22 #define __ASM_STAC .byte 0x0f,0x01,0xcb
26 #include <asm/alternative-asm.h>
28 #ifdef CONFIG_X86_SMAP
32 .pushsection .altinstr_replacement, "ax" ; \
35 .pushsection .altinstructions, "a" ; \
36 altinstruction_entry 661b, 662b, X86_FEATURE_SMAP, 3, 3 ; \
41 .pushsection .altinstr_replacement, "ax" ; \
44 .pushsection .altinstructions, "a" ; \
45 altinstruction_entry 661b, 662b, X86_FEATURE_SMAP, 3, 3 ; \
59 #ifdef CONFIG_X86_SMAP
75 ALTERNATIVE(ASM_NOP3, __stringify(__ASM_CLAC), X86_FEATURE_SMAP)
77 ALTERNATIVE(ASM_NOP3, __stringify(__ASM_STAC), X86_FEATURE_SMAP)
81 static inline void clac(
void) { }
82 static inline void stac(
void) { }