[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <877cc2fpi2.fsf@mail.lhotse>
Date: Tue, 27 Aug 2024 16:28:53 +1000
From: Michael Ellerman <mpe@...erman.id.au>
To: "Pankaj Raghav (Samsung)" <kernel@...kajraghav.com>, Stephen Rothwell
<sfr@...b.auug.org.au>
Cc: Christian Brauner <brauner@...nel.org>, Luis Chamberlain
<mcgrof@...nel.org>, Pankaj Raghav <p.raghav@...sung.com>, Linux Kernel
Mailing List <linux-kernel@...r.kernel.org>, Linux Next Mailing List
<linux-next@...r.kernel.org>, djwong@...nel.org, ritesh.list@...il.com,
linuxppc-dev@...ts.ozlabs.org, christophe.leroy@...roup.eu
Subject: Re: linux-next: boot warning after merge of the vfs-brauner tree
"Pankaj Raghav (Samsung)" <kernel@...kajraghav.com> writes:
> On Mon, Aug 26, 2024 at 05:59:31PM +1000, Stephen Rothwell wrote:
>> 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
Powered by blists - more mailing lists