> BIG FAT WARNING:
> + pgd_val(*dir) = _PAGE_TABLE + _PAGE_4M + __pa(address);
this should be:
+ pgd_val(*dir) = _PAGE_TABLE + _PAGE_4M + _PAGE_USER +
+ _PAGE_RW + _PAGE_PCD + __pa(address);
-- mingo