Re: linux-next: boot warning after merge of the vfs-brauner tree
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2024-08-27 06:28:55
Also in:
linux-next, lkml
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2024-08-27 06:28:55
Also in:
linux-next, lkml
"Pankaj Raghav (Samsung)" [off-list ref] writes:
On Mon, Aug 26, 2024 at 05:59:31PM +1000, Stephen Rothwell wrote:quoted
Hi all, After merging the vfs-brauner tree, today's linux-next boot test (powerpc pseries_le_defconfig) produced this warning:iomap dio calls set_memory_ro() on the page that is used for sub block zeroing. But looking at powerpc code, they don't support set_memory_ro() for memory region that belongs to the kernel(LINEAR_MAP_REGION_ID). /* * On hash, the linear mapping is not in the Linux page table so * apply_to_existing_page_range() will have no effect. If in the future * the set_memory_* functions are used on the linear map this will need * to be updated. */ if (!radix_enabled()) { int region = get_region_id(addr); if (WARN_ON_ONCE(region != VMALLOC_REGION_ID && region != IO_REGION_ID)) return -EINVAL; }
We should probably just turn that into a printk(), WARN is kind of heavy handed.
We call set_memory_ro() on the zero page as a extra security measure.
Or a data integrity measure. But either way it makes sense. On architectures that do implement set_memory_ro() it potentially breaks the linear mapping into small pages, which could have a performance impact. cheers