diff options
-rw-r--r-- | Documentation/feature-removal-schedule.txt | 12 | ||||
-rw-r--r-- | arch/x86/kernel/init_task.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/process_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/process_64.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/ptrace.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/tls.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/vsyscall_64.c | 11 | ||||
-rw-r--r-- | arch/x86/mm/ioremap.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/pageattr.c | 21 | ||||
-rw-r--r-- | arch/x86/vdso/Makefile | 6 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 1 | ||||
-rw-r--r-- | include/asm-x86/pgtable_32.h | 4 | ||||
-rw-r--r-- | include/asm-x86/pgtable_64.h | 6 | ||||
-rw-r--r-- | include/asm-x86/ptrace-abi.h | 8 |
14 files changed, 73 insertions, 23 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index ba899ff2a8f9..c1d1fd0c299b 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -316,3 +316,15 @@ Why: Largely unmaintained and almost entirely unused. File system | |||
316 | is largely pointless as without a lot of work only the most | 316 | is largely pointless as without a lot of work only the most |
317 | trivial of Solaris binaries can work with the emulation code. | 317 | trivial of Solaris binaries can work with the emulation code. |
318 | Who: David S. Miller <davem@davemloft.net> | 318 | Who: David S. Miller <davem@davemloft.net> |
319 | |||
320 | --------------------------- | ||
321 | |||
322 | What: init_mm export | ||
323 | When: 2.6.26 | ||
324 | Why: Not used in-tree. The current out-of-tree users used it to | ||
325 | work around problems in the CPA code which should be resolved | ||
326 | by now. One usecase was described to provide verification code | ||
327 | of the CPA operation. That's a good idea in general, but such | ||
328 | code / infrastructure should be in the kernel and not in some | ||
329 | out-of-tree driver. | ||
330 | Who: Thomas Gleixner <tglx@linutronix.de> | ||
diff --git a/arch/x86/kernel/init_task.c b/arch/x86/kernel/init_task.c index 5b3ce7934363..3d01e47777db 100644 --- a/arch/x86/kernel/init_task.c +++ b/arch/x86/kernel/init_task.c | |||
@@ -15,6 +15,7 @@ static struct files_struct init_files = INIT_FILES; | |||
15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
17 | struct mm_struct init_mm = INIT_MM(init_mm); | 17 | struct mm_struct init_mm = INIT_MM(init_mm); |
18 | EXPORT_UNUSED_SYMBOL(init_mm); /* will be removed in 2.6.26 */ | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * Initial thread structure. | 21 | * Initial thread structure. |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index a7d50a547dc2..be3c7a299f02 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -603,11 +603,13 @@ __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p, | |||
603 | } | 603 | } |
604 | #endif | 604 | #endif |
605 | 605 | ||
606 | #ifdef X86_BTS | ||
606 | if (test_tsk_thread_flag(prev_p, TIF_BTS_TRACE_TS)) | 607 | if (test_tsk_thread_flag(prev_p, TIF_BTS_TRACE_TS)) |
607 | ptrace_bts_take_timestamp(prev_p, BTS_TASK_DEPARTS); | 608 | ptrace_bts_take_timestamp(prev_p, BTS_TASK_DEPARTS); |
608 | 609 | ||
609 | if (test_tsk_thread_flag(next_p, TIF_BTS_TRACE_TS)) | 610 | if (test_tsk_thread_flag(next_p, TIF_BTS_TRACE_TS)) |
610 | ptrace_bts_take_timestamp(next_p, BTS_TASK_ARRIVES); | 611 | ptrace_bts_take_timestamp(next_p, BTS_TASK_ARRIVES); |
612 | #endif | ||
611 | 613 | ||
612 | 614 | ||
613 | if (!test_tsk_thread_flag(next_p, TIF_IO_BITMAP)) { | 615 | if (!test_tsk_thread_flag(next_p, TIF_IO_BITMAP)) { |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 43f287744f9f..3baf9b9f4c87 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -604,11 +604,13 @@ static inline void __switch_to_xtra(struct task_struct *prev_p, | |||
604 | memset(tss->io_bitmap, 0xff, prev->io_bitmap_max); | 604 | memset(tss->io_bitmap, 0xff, prev->io_bitmap_max); |
605 | } | 605 | } |
606 | 606 | ||
607 | #ifdef X86_BTS | ||
607 | if (test_tsk_thread_flag(prev_p, TIF_BTS_TRACE_TS)) | 608 | if (test_tsk_thread_flag(prev_p, TIF_BTS_TRACE_TS)) |
608 | ptrace_bts_take_timestamp(prev_p, BTS_TASK_DEPARTS); | 609 | ptrace_bts_take_timestamp(prev_p, BTS_TASK_DEPARTS); |
609 | 610 | ||
610 | if (test_tsk_thread_flag(next_p, TIF_BTS_TRACE_TS)) | 611 | if (test_tsk_thread_flag(next_p, TIF_BTS_TRACE_TS)) |
611 | ptrace_bts_take_timestamp(next_p, BTS_TASK_ARRIVES); | 612 | ptrace_bts_take_timestamp(next_p, BTS_TASK_ARRIVES); |
613 | #endif | ||
612 | } | 614 | } |
613 | 615 | ||
614 | /* | 616 | /* |
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index d862e396b099..f41fdc98efb1 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -544,6 +544,8 @@ static int ptrace_set_debugreg(struct task_struct *child, | |||
544 | return 0; | 544 | return 0; |
545 | } | 545 | } |
546 | 546 | ||
547 | #ifdef X86_BTS | ||
548 | |||
547 | static int ptrace_bts_get_size(struct task_struct *child) | 549 | static int ptrace_bts_get_size(struct task_struct *child) |
548 | { | 550 | { |
549 | if (!child->thread.ds_area_msr) | 551 | if (!child->thread.ds_area_msr) |
@@ -826,6 +828,7 @@ void ptrace_bts_take_timestamp(struct task_struct *tsk, | |||
826 | 828 | ||
827 | ptrace_bts_write_record(tsk, &rec); | 829 | ptrace_bts_write_record(tsk, &rec); |
828 | } | 830 | } |
831 | #endif /* X86_BTS */ | ||
829 | 832 | ||
830 | /* | 833 | /* |
831 | * Called by kernel/ptrace.c when detaching.. | 834 | * Called by kernel/ptrace.c when detaching.. |
@@ -839,7 +842,9 @@ void ptrace_disable(struct task_struct *child) | |||
839 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); | 842 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); |
840 | #endif | 843 | #endif |
841 | if (child->thread.ds_area_msr) { | 844 | if (child->thread.ds_area_msr) { |
845 | #ifdef X86_BTS | ||
842 | ptrace_bts_realloc(child, 0, 0); | 846 | ptrace_bts_realloc(child, 0, 0); |
847 | #endif | ||
843 | child->thread.debugctlmsr &= ~ds_debugctl_mask(); | 848 | child->thread.debugctlmsr &= ~ds_debugctl_mask(); |
844 | if (!child->thread.debugctlmsr) | 849 | if (!child->thread.debugctlmsr) |
845 | clear_tsk_thread_flag(child, TIF_DEBUGCTLMSR); | 850 | clear_tsk_thread_flag(child, TIF_DEBUGCTLMSR); |
@@ -961,6 +966,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
961 | break; | 966 | break; |
962 | #endif | 967 | #endif |
963 | 968 | ||
969 | /* | ||
970 | * These bits need more cooking - not enabled yet: | ||
971 | */ | ||
972 | #ifdef X86_BTS | ||
964 | case PTRACE_BTS_CONFIG: | 973 | case PTRACE_BTS_CONFIG: |
965 | ret = ptrace_bts_config | 974 | ret = ptrace_bts_config |
966 | (child, data, (struct ptrace_bts_config __user *)addr); | 975 | (child, data, (struct ptrace_bts_config __user *)addr); |
@@ -988,6 +997,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
988 | ret = ptrace_bts_drain | 997 | ret = ptrace_bts_drain |
989 | (child, data, (struct bts_struct __user *) addr); | 998 | (child, data, (struct bts_struct __user *) addr); |
990 | break; | 999 | break; |
1000 | #endif | ||
991 | 1001 | ||
992 | default: | 1002 | default: |
993 | ret = ptrace_request(child, request, addr, data); | 1003 | ret = ptrace_request(child, request, addr, data); |
@@ -1226,12 +1236,14 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data) | |||
1226 | case PTRACE_SETOPTIONS: | 1236 | case PTRACE_SETOPTIONS: |
1227 | case PTRACE_SET_THREAD_AREA: | 1237 | case PTRACE_SET_THREAD_AREA: |
1228 | case PTRACE_GET_THREAD_AREA: | 1238 | case PTRACE_GET_THREAD_AREA: |
1239 | #ifdef X86_BTS | ||
1229 | case PTRACE_BTS_CONFIG: | 1240 | case PTRACE_BTS_CONFIG: |
1230 | case PTRACE_BTS_STATUS: | 1241 | case PTRACE_BTS_STATUS: |
1231 | case PTRACE_BTS_SIZE: | 1242 | case PTRACE_BTS_SIZE: |
1232 | case PTRACE_BTS_GET: | 1243 | case PTRACE_BTS_GET: |
1233 | case PTRACE_BTS_CLEAR: | 1244 | case PTRACE_BTS_CLEAR: |
1234 | case PTRACE_BTS_DRAIN: | 1245 | case PTRACE_BTS_DRAIN: |
1246 | #endif | ||
1235 | return sys_ptrace(request, pid, addr, data); | 1247 | return sys_ptrace(request, pid, addr, data); |
1236 | 1248 | ||
1237 | default: | 1249 | default: |
diff --git a/arch/x86/kernel/tls.c b/arch/x86/kernel/tls.c index 6dfd4e76661a..022bcaa3b42e 100644 --- a/arch/x86/kernel/tls.c +++ b/arch/x86/kernel/tls.c | |||
@@ -91,7 +91,9 @@ int do_set_thread_area(struct task_struct *p, int idx, | |||
91 | 91 | ||
92 | asmlinkage int sys_set_thread_area(struct user_desc __user *u_info) | 92 | asmlinkage int sys_set_thread_area(struct user_desc __user *u_info) |
93 | { | 93 | { |
94 | return do_set_thread_area(current, -1, u_info, 1); | 94 | int ret = do_set_thread_area(current, -1, u_info, 1); |
95 | prevent_tail_call(ret); | ||
96 | return ret; | ||
95 | } | 97 | } |
96 | 98 | ||
97 | 99 | ||
@@ -139,7 +141,9 @@ int do_get_thread_area(struct task_struct *p, int idx, | |||
139 | 141 | ||
140 | asmlinkage int sys_get_thread_area(struct user_desc __user *u_info) | 142 | asmlinkage int sys_get_thread_area(struct user_desc __user *u_info) |
141 | { | 143 | { |
142 | return do_get_thread_area(current, -1, u_info); | 144 | int ret = do_get_thread_area(current, -1, u_info); |
145 | prevent_tail_call(ret); | ||
146 | return ret; | ||
143 | } | 147 | } |
144 | 148 | ||
145 | int regset_tls_active(struct task_struct *target, | 149 | int regset_tls_active(struct task_struct *target, |
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c index b6be812fac05..edff4c985485 100644 --- a/arch/x86/kernel/vsyscall_64.c +++ b/arch/x86/kernel/vsyscall_64.c | |||
@@ -222,10 +222,19 @@ long __vsyscall(3) venosys_1(void) | |||
222 | } | 222 | } |
223 | 223 | ||
224 | #ifdef CONFIG_SYSCTL | 224 | #ifdef CONFIG_SYSCTL |
225 | |||
226 | static int | ||
227 | vsyscall_sysctl_change(ctl_table *ctl, int write, struct file * filp, | ||
228 | void __user *buffer, size_t *lenp, loff_t *ppos) | ||
229 | { | ||
230 | return proc_dointvec(ctl, write, filp, buffer, lenp, ppos); | ||
231 | } | ||
232 | |||
225 | static ctl_table kernel_table2[] = { | 233 | static ctl_table kernel_table2[] = { |
226 | { .procname = "vsyscall64", | 234 | { .procname = "vsyscall64", |
227 | .data = &vsyscall_gtod_data.sysctl_enabled, .maxlen = sizeof(int), | 235 | .data = &vsyscall_gtod_data.sysctl_enabled, .maxlen = sizeof(int), |
228 | .mode = 0644 }, | 236 | .mode = 0644, |
237 | .proc_handler = vsyscall_sysctl_change }, | ||
229 | {} | 238 | {} |
230 | }; | 239 | }; |
231 | 240 | ||
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 882328efc3db..ac3c959e271d 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -162,7 +162,7 @@ static void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, | |||
162 | area->phys_addr = phys_addr; | 162 | area->phys_addr = phys_addr; |
163 | vaddr = (unsigned long) area->addr; | 163 | vaddr = (unsigned long) area->addr; |
164 | if (ioremap_page_range(vaddr, vaddr + size, phys_addr, prot)) { | 164 | if (ioremap_page_range(vaddr, vaddr + size, phys_addr, prot)) { |
165 | remove_vm_area((void *)(vaddr & PAGE_MASK)); | 165 | free_vm_area(area); |
166 | return NULL; | 166 | return NULL; |
167 | } | 167 | } |
168 | 168 | ||
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 14e48b5a94ba..7049294fb469 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -26,6 +26,7 @@ struct cpa_data { | |||
26 | pgprot_t mask_set; | 26 | pgprot_t mask_set; |
27 | pgprot_t mask_clr; | 27 | pgprot_t mask_clr; |
28 | int numpages; | 28 | int numpages; |
29 | int processed; | ||
29 | int flushtlb; | 30 | int flushtlb; |
30 | unsigned long pfn; | 31 | unsigned long pfn; |
31 | }; | 32 | }; |
@@ -290,8 +291,8 @@ try_preserve_large_page(pte_t *kpte, unsigned long address, | |||
290 | */ | 291 | */ |
291 | nextpage_addr = (address + psize) & pmask; | 292 | nextpage_addr = (address + psize) & pmask; |
292 | numpages = (nextpage_addr - address) >> PAGE_SHIFT; | 293 | numpages = (nextpage_addr - address) >> PAGE_SHIFT; |
293 | if (numpages < cpa->numpages) | 294 | if (numpages < cpa->processed) |
294 | cpa->numpages = numpages; | 295 | cpa->processed = numpages; |
295 | 296 | ||
296 | /* | 297 | /* |
297 | * We are safe now. Check whether the new pgprot is the same: | 298 | * We are safe now. Check whether the new pgprot is the same: |
@@ -318,7 +319,7 @@ try_preserve_large_page(pte_t *kpte, unsigned long address, | |||
318 | */ | 319 | */ |
319 | addr = address + PAGE_SIZE; | 320 | addr = address + PAGE_SIZE; |
320 | pfn++; | 321 | pfn++; |
321 | for (i = 1; i < cpa->numpages; i++, addr += PAGE_SIZE, pfn++) { | 322 | for (i = 1; i < cpa->processed; i++, addr += PAGE_SIZE, pfn++) { |
322 | pgprot_t chk_prot = static_protections(new_prot, addr, pfn); | 323 | pgprot_t chk_prot = static_protections(new_prot, addr, pfn); |
323 | 324 | ||
324 | if (pgprot_val(chk_prot) != pgprot_val(new_prot)) | 325 | if (pgprot_val(chk_prot) != pgprot_val(new_prot)) |
@@ -342,7 +343,7 @@ try_preserve_large_page(pte_t *kpte, unsigned long address, | |||
342 | * that we limited the number of possible pages already to | 343 | * that we limited the number of possible pages already to |
343 | * the number of pages in the large page. | 344 | * the number of pages in the large page. |
344 | */ | 345 | */ |
345 | if (address == (nextpage_addr - psize) && cpa->numpages == numpages) { | 346 | if (address == (nextpage_addr - psize) && cpa->processed == numpages) { |
346 | /* | 347 | /* |
347 | * The address is aligned and the number of pages | 348 | * The address is aligned and the number of pages |
348 | * covers the full page. | 349 | * covers the full page. |
@@ -572,7 +573,7 @@ repeat: | |||
572 | set_pte_atomic(kpte, new_pte); | 573 | set_pte_atomic(kpte, new_pte); |
573 | cpa->flushtlb = 1; | 574 | cpa->flushtlb = 1; |
574 | } | 575 | } |
575 | cpa->numpages = 1; | 576 | cpa->processed = 1; |
576 | return 0; | 577 | return 0; |
577 | } | 578 | } |
578 | 579 | ||
@@ -583,7 +584,7 @@ repeat: | |||
583 | do_split = try_preserve_large_page(kpte, address, cpa); | 584 | do_split = try_preserve_large_page(kpte, address, cpa); |
584 | /* | 585 | /* |
585 | * When the range fits into the existing large page, | 586 | * When the range fits into the existing large page, |
586 | * return. cp->numpages and cpa->tlbflush have been updated in | 587 | * return. cp->processed and cpa->tlbflush have been updated in |
587 | * try_large_page: | 588 | * try_large_page: |
588 | */ | 589 | */ |
589 | if (do_split <= 0) | 590 | if (do_split <= 0) |
@@ -662,7 +663,7 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias) | |||
662 | * Store the remaining nr of pages for the large page | 663 | * Store the remaining nr of pages for the large page |
663 | * preservation check. | 664 | * preservation check. |
664 | */ | 665 | */ |
665 | cpa->numpages = numpages; | 666 | cpa->numpages = cpa->processed = numpages; |
666 | 667 | ||
667 | ret = __change_page_attr(cpa, checkalias); | 668 | ret = __change_page_attr(cpa, checkalias); |
668 | if (ret) | 669 | if (ret) |
@@ -679,9 +680,9 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias) | |||
679 | * CPA operation. Either a large page has been | 680 | * CPA operation. Either a large page has been |
680 | * preserved or a single page update happened. | 681 | * preserved or a single page update happened. |
681 | */ | 682 | */ |
682 | BUG_ON(cpa->numpages > numpages); | 683 | BUG_ON(cpa->processed > numpages); |
683 | numpages -= cpa->numpages; | 684 | numpages -= cpa->processed; |
684 | cpa->vaddr += cpa->numpages * PAGE_SIZE; | 685 | cpa->vaddr += cpa->processed * PAGE_SIZE; |
685 | } | 686 | } |
686 | return 0; | 687 | return 0; |
687 | } | 688 | } |
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile index b8bd0c4aa02e..0a8f4742ef51 100644 --- a/arch/x86/vdso/Makefile +++ b/arch/x86/vdso/Makefile | |||
@@ -48,9 +48,11 @@ obj-$(VDSO64-y) += vdso-syms.lds | |||
48 | # Match symbols in the DSO that look like VDSO*; produce a file of constants. | 48 | # Match symbols in the DSO that look like VDSO*; produce a file of constants. |
49 | # | 49 | # |
50 | sed-vdsosym := -e 's/^00*/0/' \ | 50 | sed-vdsosym := -e 's/^00*/0/' \ |
51 | -e 's/^\([[:xdigit:]]*\) . \(VDSO[[:alnum:]_]*\)$$/\2 = 0x\1;/p' | 51 | -e 's/^\([0-9a-fA-F]*\) . \(VDSO[a-zA-Z0-9_]*\)$$/\2 = 0x\1;/p' |
52 | quiet_cmd_vdsosym = VDSOSYM $@ | 52 | quiet_cmd_vdsosym = VDSOSYM $@ |
53 | cmd_vdsosym = $(NM) $< | sed -n $(sed-vdsosym) | LC_ALL=C sort > $@ | 53 | define cmd_vdsosym |
54 | $(NM) $< | LC_ALL=C sed -n $(sed-vdsosym) | LC_ALL=C sort > $@ | ||
55 | endef | ||
54 | 56 | ||
55 | $(obj)/%-syms.lds: $(obj)/%.so.dbg FORCE | 57 | $(obj)/%-syms.lds: $(obj)/%.so.dbg FORCE |
56 | $(call if_changed,vdsosym) | 58 | $(call if_changed,vdsosym) |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 49e5358f481a..8b9ee27805fd 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -153,6 +153,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx, | |||
153 | if (*ax == 1) | 153 | if (*ax == 1) |
154 | maskedx = ~((1 << X86_FEATURE_APIC) | /* disable APIC */ | 154 | maskedx = ~((1 << X86_FEATURE_APIC) | /* disable APIC */ |
155 | (1 << X86_FEATURE_ACPI) | /* disable ACPI */ | 155 | (1 << X86_FEATURE_ACPI) | /* disable ACPI */ |
156 | (1 << X86_FEATURE_SEP) | /* disable SEP */ | ||
156 | (1 << X86_FEATURE_ACC)); /* thermal monitoring */ | 157 | (1 << X86_FEATURE_ACC)); /* thermal monitoring */ |
157 | 158 | ||
158 | asm(XEN_EMULATE_PREFIX "cpuid" | 159 | asm(XEN_EMULATE_PREFIX "cpuid" |
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index a842c7222b1e..b478efa971e0 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -91,7 +91,9 @@ extern unsigned long pg0[]; | |||
91 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ | 91 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ |
92 | #define pmd_none(x) (!(unsigned long)pmd_val(x)) | 92 | #define pmd_none(x) (!(unsigned long)pmd_val(x)) |
93 | #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) | 93 | #define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT) |
94 | #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) | 94 | #define pmd_bad(x) ((pmd_val(x) \ |
95 | & ~(PAGE_MASK | _PAGE_USER | _PAGE_PSE | _PAGE_NX)) \ | ||
96 | != _KERNPG_TABLE) | ||
95 | 97 | ||
96 | 98 | ||
97 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) | 99 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) |
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index 0a0b77bc736a..0a9258333cbd 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -153,12 +153,14 @@ static inline unsigned long pgd_bad(pgd_t pgd) | |||
153 | 153 | ||
154 | static inline unsigned long pud_bad(pud_t pud) | 154 | static inline unsigned long pud_bad(pud_t pud) |
155 | { | 155 | { |
156 | return pud_val(pud) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); | 156 | return pud_val(pud) & |
157 | ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER | _PAGE_PSE | _PAGE_NX); | ||
157 | } | 158 | } |
158 | 159 | ||
159 | static inline unsigned long pmd_bad(pmd_t pmd) | 160 | static inline unsigned long pmd_bad(pmd_t pmd) |
160 | { | 161 | { |
161 | return pmd_val(pmd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); | 162 | return pmd_val(pmd) & |
163 | ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER | _PAGE_PSE | _PAGE_NX); | ||
162 | } | 164 | } |
163 | 165 | ||
164 | #define pte_none(x) (!pte_val(x)) | 166 | #define pte_none(x) (!pte_val(x)) |
diff --git a/include/asm-x86/ptrace-abi.h b/include/asm-x86/ptrace-abi.h index 81a8ee4c55fc..f224eb3c3157 100644 --- a/include/asm-x86/ptrace-abi.h +++ b/include/asm-x86/ptrace-abi.h | |||
@@ -89,13 +89,13 @@ | |||
89 | */ | 89 | */ |
90 | struct ptrace_bts_config { | 90 | struct ptrace_bts_config { |
91 | /* requested or actual size of BTS buffer in bytes */ | 91 | /* requested or actual size of BTS buffer in bytes */ |
92 | u32 size; | 92 | __u32 size; |
93 | /* bitmask of below flags */ | 93 | /* bitmask of below flags */ |
94 | u32 flags; | 94 | __u32 flags; |
95 | /* buffer overflow signal */ | 95 | /* buffer overflow signal */ |
96 | u32 signal; | 96 | __u32 signal; |
97 | /* actual size of bts_struct in bytes */ | 97 | /* actual size of bts_struct in bytes */ |
98 | u32 bts_size; | 98 | __u32 bts_size; |
99 | }; | 99 | }; |
100 | #endif | 100 | #endif |
101 | 101 | ||