linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Russell King" <linux@armlinux.org.uk>
Cc: "Giulio Benetti" <giulio.benetti@benettiengineering.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Anshuman Khandual" <anshuman.khandual@arm.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Kefeng Wang" <wangkefeng.wang@huawei.com>,
	"Will Deacon" <will@kernel.org>
Subject: Re: [PATCH] ARM: mm: fix no-MMU ZERO_PAGE() implementation
Date: Wed, 19 Oct 2022 11:32:25 +0200	[thread overview]
Message-ID: <6d454246-578f-4a25-bddf-2f68f32d2213@app.fastmail.com> (raw)
In-Reply-To: <Y0++52o7QSaDvqpM@shell.armlinux.org.uk>

On Wed, Oct 19, 2022, at 11:09, Russell King (Oracle) wrote:

> When the only users in the kernel _were_ ZERO_PAGE() for this, which
> is defined to return a struct page pointer, there was no need to make
> "empty_zero_page" anything but a struct page pointer, rather than a
> runtime translation from an address to a struct page.

Fair enough.

> IMHO, we should _not_ be exposing empty_zero_page to devices - we
> certainly do not want the DMA API performing cache maintenance on
> this page since the primary purpose of this page is to fill in
> userspace BSS pages that have not been written.

It should be easy enough to not expose it by renaming the
symbol to something other than empty_zero_page. That way,
any incorrect users that may come up in the future would
at least result in a build failure instead of runtime
data corruption.

> So, the only one that needs fixing is the SPI usage, which IMHO
> is wrong. ARM being different finds what I consider a driver bug.
> Good for 32-bit ARM. :)

The SPI driver is powerpc specific, so it's also not going to
get hit. 

    Arnd

  reply	other threads:[~2022-10-19 11:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 23:37 [PATCH] ARM: mm: fix no-MMU ZERO_PAGE() implementation Giulio Benetti
2022-10-18  7:03 ` Arnd Bergmann
2022-10-18 17:44   ` Giulio Benetti
2022-10-18 18:35     ` Arnd Bergmann
2022-10-18 22:32       ` Giulio Benetti
2022-10-19  7:00         ` Arnd Bergmann
2022-10-19 16:37           ` Giulio Benetti
2022-10-19  9:09   ` Russell King (Oracle)
2022-10-19  9:32     ` Arnd Bergmann [this message]
2022-10-19 17:07     ` Giulio Benetti

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=6d454246-578f-4a25-bddf-2f68f32d2213@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=wangkefeng.wang@huawei.com \
    --cc=will@kernel.org \
    /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).