diff options
author | Richard Braun <rbraun@sceen.net> | 2013-07-23 21:33:32 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2013-07-23 21:33:32 +0200 |
commit | 64a32afa728931bec0dc5189bab945b94369b474 (patch) | |
tree | 4dd3577051234792c1df309d2cdac6af7962da11 /arch | |
parent | 4256e66d81909f95094c7069fb6a6a5972881295 (diff) |
x86/pmap: fix address range checking
There may be valid mappings below the common kernel space boundaries in
the kernel physical map. The identity mapping is one example.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/machine/pmap.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/x86/machine/pmap.c b/arch/x86/machine/pmap.c index 994f57b..396edb4 100644 --- a/arch/x86/machine/pmap.c +++ b/arch/x86/machine/pmap.c @@ -455,12 +455,16 @@ pmap_bootalloc(unsigned int nr_pages) return page; } -#define pmap_assert_range(pmap, start, end) \ -MACRO_BEGIN \ - assert(vm_page_aligned(start) && vm_page_aligned(end)); \ - assert((start) < (end)); \ - assert((((pmap) == kernel_pmap) && ((start) >= VM_PMAP_PTEMAP_ADDRESS)) \ - || (((pmap) != kernel_pmap) && ((end) <= VM_MAX_ADDRESS))); \ +/* + * Check address range with regard to physical map. + * + * Note that there is no addressing restriction on the kernel pmap. + */ +#define pmap_assert_range(pmap, start, end) \ +MACRO_BEGIN \ + assert(vm_page_aligned(start) && vm_page_aligned(end)); \ + assert((start) < (end)); \ + assert(((pmap) == kernel_pmap) || ((end) <= VM_MAX_ADDRESS)); \ MACRO_END static inline void |