diff options
author | Jan Beulich <jbeulich@novell.com> | 2006-03-25 16:29:40 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 09:10:53 -0800 |
commit | 8c914cb704a11460eec7ed2a572bb5e9bd513d24 (patch) | |
tree | 3d735f0e33f474b296f106dee70935d77e267a74 /include/asm-x86_64/pgtable.h | |
parent | 85f9eebccde51e24896f31383f5b70776362e1a6 (diff) | |
download | linux-8c914cb704a11460eec7ed2a572bb5e9bd513d24.tar.gz linux-8c914cb704a11460eec7ed2a572bb5e9bd513d24.tar.bz2 linux-8c914cb704a11460eec7ed2a572bb5e9bd513d24.zip |
[PATCH] x86_64: actively synchronize vmalloc area when registering certain callbacks
While the modular aspect of the respective i386 patch doesn't apply to
x86-64 (as the top level page directory entry is shared between modules
and the base kernel), handlers registered with register_die_notifier()
are still under similar constraints for touching ioremap()ed or
vmalloc()ed memory. The likelihood of this problem becoming visible is
of course significantly lower, as the assigned virtual addresses would
have to cross a 2**39 byte boundary. This is because the callback gets
invoked
(a) in the page fault path before the top level page table propagation
gets carried out (hence a fault to propagate the top level page table
entry/entries mapping to module's code/data would nest infinitly) and
(b) in the NMI path, where nested faults must absolutely not happen,
since otherwise the IRET from the nested fault re-enables NMIs,
potentially resulting in nested NMI occurences.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-x86_64/pgtable.h')
-rw-r--r-- | include/asm-x86_64/pgtable.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index def903287193..31e83c3bd022 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h @@ -420,6 +420,10 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) +extern spinlock_t pgd_lock; +extern struct page *pgd_list; +void vmalloc_sync_all(void); + #endif /* !__ASSEMBLY__ */ extern int kern_addr_valid(unsigned long addr); |