Re: [PATCH 2/2] asm-generic: add an optional pfn_valid check to page_to_phys

2024-11-05 Thread Christophe Leroy
Le 23/10/2024 à 07:36, Christoph Hellwig a écrit : page_to_pfn is usually implemented by pointer arithmetics on the memory map, which means that bogus input can lead to even more bogus output. Powerpc had a pfn_valid check on the intermediate pfn in the page_to_phys implementation when CONFIG

[PATCH 2/2] asm-generic: add an optional pfn_valid check to page_to_phys

2024-10-22 Thread Christoph Hellwig
page_to_pfn is usually implemented by pointer arithmetics on the memory map, which means that bogus input can lead to even more bogus output. Powerpc had a pfn_valid check on the intermediate pfn in the page_to_phys implementation when CONFIG_DEBUG_VIRTUAL is defined, which seems generally useful,