]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blob - arch/x86/mm/kmemcheck/pte.c
Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ac97-mfd', 'asoc/topic...
[mirror_ubuntu-focal-kernel.git] / arch / x86 / mm / kmemcheck / pte.c
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/mm.h>
3
4 #include <asm/pgtable.h>
5
6 #include "pte.h"
7
8 pte_t *kmemcheck_pte_lookup(unsigned long address)
9 {
10 pte_t *pte;
11 unsigned int level;
12
13 pte = lookup_address(address, &level);
14 if (!pte)
15 return NULL;
16 if (level != PG_LEVEL_4K)
17 return NULL;
18 if (!pte_hidden(*pte))
19 return NULL;
20
21 return pte;
22 }
23