Matthew Wilcox (Oracle) ce60f27bb6 mm: abstract moving to the next PFN
In order to fix the L1TF vulnerability, x86 can invert the PTE bits for
PROT_NONE VMAs, which means we cannot move from one PTE to the next by
adding 1 to the PFN field of the PTE.  This results in the BUG reported at
[1].

Abstract advancing the PTE to the next PFN through a pte_next_pfn()
function/macro.

Link: https://lkml.kernel.org/r/20230920040958.866520-1-willy@infradead.org
Fixes: bcc6cc832573 ("mm: add default definition of set_ptes()")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reported-by: syzbot+55cc72f8cc3a549119df@syzkaller.appspotmail.com
Closes: https://lkml.kernel.org/r/000000000000d099fa0604f03351@google.com [1]
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-09-29 17:20:46 -07:00
..
2023-08-31 12:20:12 -07:00
2023-09-04 11:26:29 -07:00
2023-09-17 11:13:37 -07:00
2023-09-07 13:52:20 -07:00
2023-08-31 12:20:12 -07:00
2023-08-30 20:23:07 -07:00
2023-09-17 09:49:03 +02:00
2023-04-08 13:45:37 -07:00
2023-08-26 22:40:37 +02:00
2023-08-31 12:20:12 -07:00
2022-07-25 10:32:32 +02:00
2023-05-15 20:03:08 +02:00
2023-09-05 11:01:47 -07:00