linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: "Pankaj Raghav (Samsung)" <kernel@pankajraghav.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Christian Brauner <brauner@kernel.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Pankaj Raghav <p.raghav@samsung.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	djwong@kernel.org, ritesh.list@gmail.com,
	linuxppc-dev@lists.ozlabs.org, christophe.leroy@csgroup.eu
Subject: Re: linux-next: boot warning after merge of the vfs-brauner tree
Date: Tue, 27 Aug 2024 16:28:53 +1000	[thread overview]
Message-ID: <877cc2fpi2.fsf@mail.lhotse> (raw)
In-Reply-To: <20240826154818.hzqnvofdmaxvuwrh@quentin>

"Pankaj Raghav (Samsung)" <kernel@pankajraghav.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


      parent reply	other threads:[~2024-08-27  6:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240826175931.1989f99e@canb.auug.org.au>
2024-08-26 15:48 ` linux-next: boot warning after merge of the vfs-brauner tree Pankaj Raghav (Samsung)
2024-08-26 17:43   ` Christophe Leroy
2024-08-26 20:52     ` Luis Chamberlain
2024-08-26 21:10       ` Darrick J. Wong
2024-08-26 21:41         ` Luis Chamberlain
2024-08-27  5:26           ` Ritesh Harjani
2024-08-27 15:38       ` Mike Rapoport
2024-08-27  6:28   ` Michael Ellerman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cc2fpi2.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=brauner@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=djwong@kernel.org \
    --cc=kernel@pankajraghav.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mcgrof@kernel.org \
    --cc=p.raghav@samsung.com \
    --cc=ritesh.list@gmail.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).