diff options
author | Kirill A. Shutemov <[email protected]> | 2024-06-14 12:58:53 +0300 |
---|---|---|
committer | Borislav Petkov (AMD) <[email protected]> | 2024-06-17 17:45:57 +0200 |
commit | 9d1dcdfa909178b6f465625bbfd8311e6107b48e (patch) | |
tree | 90c22865af8139fd64c916758d734edef2b5e84f /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 99c5c4c60e0db1d2ff58b8a61c93b6851146469f (diff) |
x86/mm: Return correct level from lookup_address() if pte is none
Currently, lookup_address() returns two things:
1. A "pte_t" (which might be a p[g4um]d_t)
2. The 'level' of the page tables where the "pte_t" was found
(returned via a pointer)
If no pte_t is found, 'level' is essentially garbage.
Always fill out the level. For NULL "pte_t"s, fill in the level where
the p*d_none() entry was found mirroring the "found" behavior.
Always filling out the level allows using lookup_address() to precisely skip
over holes when walking kernel page tables.
Add one more entry into enum pg_level to indicate the size of the VA
covered by one PGD entry in 5-level paging mode.
Update comments for lookup_address() and lookup_address_in_pgd() to
reflect changes in the interface.
Signed-off-by: Kirill A. Shutemov <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Reviewed-by: Rick Edgecombe <[email protected]>
Reviewed-by: Baoquan He <[email protected]>
Reviewed-by: Dave Hansen <[email protected]>
Tested-by: Tao Liu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions