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

2024-10-14 Thread Thomas Huth
On 14/10/2024 16.44, Christoph Hellwig wrote: 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 regult to it's page_to_phys s/regult/result/ implementation when CO

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

2024-10-14 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 regult to it's page_to_phys implementation when CONFIG_DEBUG_VIRTUAL is defined, which seems generally useful, so add t