lkml.org 
[lkml]   [2022]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ARM: mm: fix no-MMU ZERO_PAGE() implementation
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

\
 
 \ /
  Last update: 2022-10-19 13:31    [W:0.276 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site