diff options
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/bug.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/io.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/kprobes.h | 8 | ||||
-rw-r--r-- | arch/x86/include/asm/mmu_context.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/paravirt_types.h | 16 | ||||
-rw-r--r-- | arch/x86/include/asm/processor.h | 2 |
6 files changed, 18 insertions, 18 deletions
diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h index 39e702d90cdb..aa6b2023d8f8 100644 --- a/arch/x86/include/asm/bug.h +++ b/arch/x86/include/asm/bug.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #define _BUG_FLAGS(ins, flags) \ | 35 | #define _BUG_FLAGS(ins, flags) \ |
36 | do { \ | 36 | do { \ |
37 | asm volatile("1:\t" ins "\n" \ | 37 | asm volatile("1:\t" ins "\n" \ |
38 | ".pushsection __bug_table,\"a\"\n" \ | 38 | ".pushsection __bug_table,\"aw\"\n" \ |
39 | "2:\t" __BUG_REL(1b) "\t# bug_entry::bug_addr\n" \ | 39 | "2:\t" __BUG_REL(1b) "\t# bug_entry::bug_addr\n" \ |
40 | "\t" __BUG_REL(%c0) "\t# bug_entry::file\n" \ | 40 | "\t" __BUG_REL(%c0) "\t# bug_entry::file\n" \ |
41 | "\t.word %c1" "\t# bug_entry::line\n" \ | 41 | "\t.word %c1" "\t# bug_entry::line\n" \ |
@@ -52,7 +52,7 @@ do { \ | |||
52 | #define _BUG_FLAGS(ins, flags) \ | 52 | #define _BUG_FLAGS(ins, flags) \ |
53 | do { \ | 53 | do { \ |
54 | asm volatile("1:\t" ins "\n" \ | 54 | asm volatile("1:\t" ins "\n" \ |
55 | ".pushsection __bug_table,\"a\"\n" \ | 55 | ".pushsection __bug_table,\"aw\"\n" \ |
56 | "2:\t" __BUG_REL(1b) "\t# bug_entry::bug_addr\n" \ | 56 | "2:\t" __BUG_REL(1b) "\t# bug_entry::bug_addr\n" \ |
57 | "\t.word %c0" "\t# bug_entry::flags\n" \ | 57 | "\t.word %c0" "\t# bug_entry::flags\n" \ |
58 | "\t.org 2b+%c1\n" \ | 58 | "\t.org 2b+%c1\n" \ |
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 7afb0e2f07f4..48febf07e828 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h | |||
@@ -328,13 +328,13 @@ static inline unsigned type in##bwl##_p(int port) \ | |||
328 | static inline void outs##bwl(int port, const void *addr, unsigned long count) \ | 328 | static inline void outs##bwl(int port, const void *addr, unsigned long count) \ |
329 | { \ | 329 | { \ |
330 | asm volatile("rep; outs" #bwl \ | 330 | asm volatile("rep; outs" #bwl \ |
331 | : "+S"(addr), "+c"(count) : "d"(port)); \ | 331 | : "+S"(addr), "+c"(count) : "d"(port) : "memory"); \ |
332 | } \ | 332 | } \ |
333 | \ | 333 | \ |
334 | static inline void ins##bwl(int port, void *addr, unsigned long count) \ | 334 | static inline void ins##bwl(int port, void *addr, unsigned long count) \ |
335 | { \ | 335 | { \ |
336 | asm volatile("rep; ins" #bwl \ | 336 | asm volatile("rep; ins" #bwl \ |
337 | : "+D"(addr), "+c"(count) : "d"(port)); \ | 337 | : "+D"(addr), "+c"(count) : "d"(port) : "memory"); \ |
338 | } | 338 | } |
339 | 339 | ||
340 | BUILDIO(b, b, char) | 340 | BUILDIO(b, b, char) |
diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h index 34b984c60790..6cf65437b5e5 100644 --- a/arch/x86/include/asm/kprobes.h +++ b/arch/x86/include/asm/kprobes.h | |||
@@ -52,10 +52,10 @@ typedef u8 kprobe_opcode_t; | |||
52 | #define flush_insn_slot(p) do { } while (0) | 52 | #define flush_insn_slot(p) do { } while (0) |
53 | 53 | ||
54 | /* optinsn template addresses */ | 54 | /* optinsn template addresses */ |
55 | extern __visible kprobe_opcode_t optprobe_template_entry; | 55 | extern __visible kprobe_opcode_t optprobe_template_entry[]; |
56 | extern __visible kprobe_opcode_t optprobe_template_val; | 56 | extern __visible kprobe_opcode_t optprobe_template_val[]; |
57 | extern __visible kprobe_opcode_t optprobe_template_call; | 57 | extern __visible kprobe_opcode_t optprobe_template_call[]; |
58 | extern __visible kprobe_opcode_t optprobe_template_end; | 58 | extern __visible kprobe_opcode_t optprobe_template_end[]; |
59 | #define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + RELATIVE_ADDR_SIZE) | 59 | #define MAX_OPTIMIZED_LENGTH (MAX_INSN_SIZE + RELATIVE_ADDR_SIZE) |
60 | #define MAX_OPTINSN_SIZE \ | 60 | #define MAX_OPTINSN_SIZE \ |
61 | (((unsigned long)&optprobe_template_end - \ | 61 | (((unsigned long)&optprobe_template_end - \ |
diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h index ecfcb6643c9b..265c907d7d4c 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h | |||
@@ -293,7 +293,7 @@ static inline unsigned long __get_current_cr3_fast(void) | |||
293 | unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd); | 293 | unsigned long cr3 = __pa(this_cpu_read(cpu_tlbstate.loaded_mm)->pgd); |
294 | 294 | ||
295 | /* For now, be very restrictive about when this can be called. */ | 295 | /* For now, be very restrictive about when this can be called. */ |
296 | VM_WARN_ON(in_nmi() || !in_atomic()); | 296 | VM_WARN_ON(in_nmi() || preemptible()); |
297 | 297 | ||
298 | VM_BUG_ON(cr3 != __read_cr3()); | 298 | VM_BUG_ON(cr3 != __read_cr3()); |
299 | return cr3; | 299 | return cr3; |
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index cb976bab6299..9ffc36bfe4cd 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h | |||
@@ -84,7 +84,7 @@ struct pv_init_ops { | |||
84 | */ | 84 | */ |
85 | unsigned (*patch)(u8 type, u16 clobber, void *insnbuf, | 85 | unsigned (*patch)(u8 type, u16 clobber, void *insnbuf, |
86 | unsigned long addr, unsigned len); | 86 | unsigned long addr, unsigned len); |
87 | }; | 87 | } __no_randomize_layout; |
88 | 88 | ||
89 | 89 | ||
90 | struct pv_lazy_ops { | 90 | struct pv_lazy_ops { |
@@ -92,12 +92,12 @@ struct pv_lazy_ops { | |||
92 | void (*enter)(void); | 92 | void (*enter)(void); |
93 | void (*leave)(void); | 93 | void (*leave)(void); |
94 | void (*flush)(void); | 94 | void (*flush)(void); |
95 | }; | 95 | } __no_randomize_layout; |
96 | 96 | ||
97 | struct pv_time_ops { | 97 | struct pv_time_ops { |
98 | unsigned long long (*sched_clock)(void); | 98 | unsigned long long (*sched_clock)(void); |
99 | unsigned long long (*steal_clock)(int cpu); | 99 | unsigned long long (*steal_clock)(int cpu); |
100 | }; | 100 | } __no_randomize_layout; |
101 | 101 | ||
102 | struct pv_cpu_ops { | 102 | struct pv_cpu_ops { |
103 | /* hooks for various privileged instructions */ | 103 | /* hooks for various privileged instructions */ |
@@ -176,7 +176,7 @@ struct pv_cpu_ops { | |||
176 | 176 | ||
177 | void (*start_context_switch)(struct task_struct *prev); | 177 | void (*start_context_switch)(struct task_struct *prev); |
178 | void (*end_context_switch)(struct task_struct *next); | 178 | void (*end_context_switch)(struct task_struct *next); |
179 | }; | 179 | } __no_randomize_layout; |
180 | 180 | ||
181 | struct pv_irq_ops { | 181 | struct pv_irq_ops { |
182 | /* | 182 | /* |
@@ -199,7 +199,7 @@ struct pv_irq_ops { | |||
199 | #ifdef CONFIG_X86_64 | 199 | #ifdef CONFIG_X86_64 |
200 | void (*adjust_exception_frame)(void); | 200 | void (*adjust_exception_frame)(void); |
201 | #endif | 201 | #endif |
202 | }; | 202 | } __no_randomize_layout; |
203 | 203 | ||
204 | struct pv_mmu_ops { | 204 | struct pv_mmu_ops { |
205 | unsigned long (*read_cr2)(void); | 205 | unsigned long (*read_cr2)(void); |
@@ -305,7 +305,7 @@ struct pv_mmu_ops { | |||
305 | an mfn. We can tell which is which from the index. */ | 305 | an mfn. We can tell which is which from the index. */ |
306 | void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx, | 306 | void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx, |
307 | phys_addr_t phys, pgprot_t flags); | 307 | phys_addr_t phys, pgprot_t flags); |
308 | }; | 308 | } __no_randomize_layout; |
309 | 309 | ||
310 | struct arch_spinlock; | 310 | struct arch_spinlock; |
311 | #ifdef CONFIG_SMP | 311 | #ifdef CONFIG_SMP |
@@ -322,7 +322,7 @@ struct pv_lock_ops { | |||
322 | void (*kick)(int cpu); | 322 | void (*kick)(int cpu); |
323 | 323 | ||
324 | struct paravirt_callee_save vcpu_is_preempted; | 324 | struct paravirt_callee_save vcpu_is_preempted; |
325 | }; | 325 | } __no_randomize_layout; |
326 | 326 | ||
327 | /* This contains all the paravirt structures: we get a convenient | 327 | /* This contains all the paravirt structures: we get a convenient |
328 | * number for each function using the offset which we use to indicate | 328 | * number for each function using the offset which we use to indicate |
@@ -334,7 +334,7 @@ struct paravirt_patch_template { | |||
334 | struct pv_irq_ops pv_irq_ops; | 334 | struct pv_irq_ops pv_irq_ops; |
335 | struct pv_mmu_ops pv_mmu_ops; | 335 | struct pv_mmu_ops pv_mmu_ops; |
336 | struct pv_lock_ops pv_lock_ops; | 336 | struct pv_lock_ops pv_lock_ops; |
337 | }; | 337 | } __no_randomize_layout; |
338 | 338 | ||
339 | extern struct pv_info pv_info; | 339 | extern struct pv_info pv_info; |
340 | extern struct pv_init_ops pv_init_ops; | 340 | extern struct pv_init_ops pv_init_ops; |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 6a79547e8ee0..028245e1c42b 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -129,7 +129,7 @@ struct cpuinfo_x86 { | |||
129 | /* Index into per_cpu list: */ | 129 | /* Index into per_cpu list: */ |
130 | u16 cpu_index; | 130 | u16 cpu_index; |
131 | u32 microcode; | 131 | u32 microcode; |
132 | }; | 132 | } __randomize_layout; |
133 | 133 | ||
134 | struct cpuid_regs { | 134 | struct cpuid_regs { |
135 | u32 eax, ebx, ecx, edx; | 135 | u32 eax, ebx, ecx, edx; |