pte.c 319 B

1234567891011121314151617181920212223
  1. #include <linux/mm.h>
  2. #include <asm/pgtable.h>
  3. #include "pte.h"
  4. pte_t *kmemcheck_pte_lookup(unsigned long address)
  5. {
  6. pte_t *pte;
  7. unsigned int level;
  8. pte = lookup_address(address, &level);
  9. if (!pte)
  10. return NULL;
  11. if (level != PG_LEVEL_4K)
  12. return NULL;
  13. if (!pte_hidden(*pte))
  14. return NULL;
  15. return pte;
  16. }