aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/mm/pgtable.c
diff options
context:
space:
mode:
authorJuergen Gross <[email protected]>2023-05-02 14:09:29 +0200
committerBorislav Petkov (AMD) <[email protected]>2023-06-01 15:04:33 +0200
commit973df1942068c0cc72244ce7dce5e5aeca03ad5f (patch)
tree3fc6230c4acde5b2c7ede986d865766d2a765b1f /arch/x86/mm/pgtable.c
parent8227f40ade2362982505f66f1614b78a3a083ec9 (diff)
x86/mtrr: Don't let mtrr_type_lookup() return MTRR_TYPE_INVALID
mtrr_type_lookup() should always return a valid memory type. In case there is no information available, it should return the default UC. This will remove the last case where mtrr_type_lookup() can return MTRR_TYPE_INVALID, so adjust the comment in include/uapi/asm/mtrr.h. Note that removing the MTRR_TYPE_INVALID #define from that header could break user code, so it has to stay. At the same time the mtrr_type_lookup() stub for the !CONFIG_MTRR case should set uniform to 1, as if the memory range would be covered by no MTRR at all. Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Juergen Gross <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Tested-by: Michael Kelley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Diffstat (limited to 'arch/x86/mm/pgtable.c')
0 files changed, 0 insertions, 0 deletions