diff options
Diffstat (limited to 'arch/x86/kernel/entry_64.S')
-rw-r--r-- | arch/x86/kernel/entry_64.S | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 066334be7b74..44531acd9a81 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <asm/percpu.h> | 57 | #include <asm/percpu.h> |
58 | #include <asm/asm.h> | 58 | #include <asm/asm.h> |
59 | #include <asm/rcu.h> | 59 | #include <asm/rcu.h> |
60 | #include <asm/smap.h> | ||
60 | #include <linux/err.h> | 61 | #include <linux/err.h> |
61 | 62 | ||
62 | /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */ | 63 | /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */ |
@@ -568,7 +569,8 @@ END(ret_from_fork) | |||
568 | * System call entry. Up to 6 arguments in registers are supported. | 569 | * System call entry. Up to 6 arguments in registers are supported. |
569 | * | 570 | * |
570 | * SYSCALL does not save anything on the stack and does not change the | 571 | * SYSCALL does not save anything on the stack and does not change the |
571 | * stack pointer. | 572 | * stack pointer. However, it does mask the flags register for us, so |
573 | * CLD and CLAC are not needed. | ||
572 | */ | 574 | */ |
573 | 575 | ||
574 | /* | 576 | /* |
@@ -987,6 +989,7 @@ END(interrupt) | |||
987 | */ | 989 | */ |
988 | .p2align CONFIG_X86_L1_CACHE_SHIFT | 990 | .p2align CONFIG_X86_L1_CACHE_SHIFT |
989 | common_interrupt: | 991 | common_interrupt: |
992 | ASM_CLAC | ||
990 | XCPT_FRAME | 993 | XCPT_FRAME |
991 | addq $-0x80,(%rsp) /* Adjust vector to [-256,-1] range */ | 994 | addq $-0x80,(%rsp) /* Adjust vector to [-256,-1] range */ |
992 | interrupt do_IRQ | 995 | interrupt do_IRQ |
@@ -1126,6 +1129,7 @@ END(common_interrupt) | |||
1126 | */ | 1129 | */ |
1127 | .macro apicinterrupt num sym do_sym | 1130 | .macro apicinterrupt num sym do_sym |
1128 | ENTRY(\sym) | 1131 | ENTRY(\sym) |
1132 | ASM_CLAC | ||
1129 | INTR_FRAME | 1133 | INTR_FRAME |
1130 | pushq_cfi $~(\num) | 1134 | pushq_cfi $~(\num) |
1131 | .Lcommon_\sym: | 1135 | .Lcommon_\sym: |
@@ -1180,6 +1184,7 @@ apicinterrupt IRQ_WORK_VECTOR \ | |||
1180 | */ | 1184 | */ |
1181 | .macro zeroentry sym do_sym | 1185 | .macro zeroentry sym do_sym |
1182 | ENTRY(\sym) | 1186 | ENTRY(\sym) |
1187 | ASM_CLAC | ||
1183 | INTR_FRAME | 1188 | INTR_FRAME |
1184 | PARAVIRT_ADJUST_EXCEPTION_FRAME | 1189 | PARAVIRT_ADJUST_EXCEPTION_FRAME |
1185 | pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ | 1190 | pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ |
@@ -1197,6 +1202,7 @@ END(\sym) | |||
1197 | 1202 | ||
1198 | .macro paranoidzeroentry sym do_sym | 1203 | .macro paranoidzeroentry sym do_sym |
1199 | ENTRY(\sym) | 1204 | ENTRY(\sym) |
1205 | ASM_CLAC | ||
1200 | INTR_FRAME | 1206 | INTR_FRAME |
1201 | PARAVIRT_ADJUST_EXCEPTION_FRAME | 1207 | PARAVIRT_ADJUST_EXCEPTION_FRAME |
1202 | pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ | 1208 | pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ |
@@ -1215,6 +1221,7 @@ END(\sym) | |||
1215 | #define INIT_TSS_IST(x) PER_CPU_VAR(init_tss) + (TSS_ist + ((x) - 1) * 8) | 1221 | #define INIT_TSS_IST(x) PER_CPU_VAR(init_tss) + (TSS_ist + ((x) - 1) * 8) |
1216 | .macro paranoidzeroentry_ist sym do_sym ist | 1222 | .macro paranoidzeroentry_ist sym do_sym ist |
1217 | ENTRY(\sym) | 1223 | ENTRY(\sym) |
1224 | ASM_CLAC | ||
1218 | INTR_FRAME | 1225 | INTR_FRAME |
1219 | PARAVIRT_ADJUST_EXCEPTION_FRAME | 1226 | PARAVIRT_ADJUST_EXCEPTION_FRAME |
1220 | pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ | 1227 | pushq_cfi $-1 /* ORIG_RAX: no syscall to restart */ |
@@ -1234,6 +1241,7 @@ END(\sym) | |||
1234 | 1241 | ||
1235 | .macro errorentry sym do_sym | 1242 | .macro errorentry sym do_sym |
1236 | ENTRY(\sym) | 1243 | ENTRY(\sym) |
1244 | ASM_CLAC | ||
1237 | XCPT_FRAME | 1245 | XCPT_FRAME |
1238 | PARAVIRT_ADJUST_EXCEPTION_FRAME | 1246 | PARAVIRT_ADJUST_EXCEPTION_FRAME |
1239 | subq $ORIG_RAX-R15, %rsp | 1247 | subq $ORIG_RAX-R15, %rsp |
@@ -1252,6 +1260,7 @@ END(\sym) | |||
1252 | /* error code is on the stack already */ | 1260 | /* error code is on the stack already */ |
1253 | .macro paranoiderrorentry sym do_sym | 1261 | .macro paranoiderrorentry sym do_sym |
1254 | ENTRY(\sym) | 1262 | ENTRY(\sym) |
1263 | ASM_CLAC | ||
1255 | XCPT_FRAME | 1264 | XCPT_FRAME |
1256 | PARAVIRT_ADJUST_EXCEPTION_FRAME | 1265 | PARAVIRT_ADJUST_EXCEPTION_FRAME |
1257 | subq $ORIG_RAX-R15, %rsp | 1266 | subq $ORIG_RAX-R15, %rsp |