lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YZKCx1cwBXOZcTA4@casper.infradead.org>
Date:   Mon, 15 Nov 2021 15:54:47 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     "Darrick J . Wong " <djwong@...nel.org>, linux-xfs@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-block@...r.kernel.org, Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCH v2 01/28] csky,sparc: Declare flush_dcache_folio()

On Tue, Nov 09, 2021 at 12:36:57AM -0800, Christoph Hellwig wrote:
> On Mon, Nov 08, 2021 at 04:05:24AM +0000, Matthew Wilcox (Oracle) wrote:
> > These architectures do not include asm-generic/cacheflush.h so need
> > to declare it themselves.
> 
> In mainline mm/util.c implements flush_dcache_folio unless
> ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO is set.  So I think you need to
> define that for csky and sparc.

There are three ways to implement flush_dcache_folio().  The first is
as a noop (this is what xtensa does, which is the only architecture
to define ARCH_IMPLEMENTS_FLUSH_DCACHE_FOLIO; it's also done
automatically by asm-generic if the architecture doesn't define
ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE).  The second is as a loop which calls
flush_dcache_page() for each page in the folio.  That's the default
implementation which you found in mm/util.c.  The third way, which I
hope architecture maintainers actually implement, is to just set the
needs-flush bit on the head page.  But that requires knowledge of each
architecture; they need to check the needs-flush bit on the head page
instead of the precise page.  So I've done the safe, slow thing for
all architectures.  The only reason that csky and sparc are "special"
is that they don't include asm-generic/cacheflush.h and the buildbots
didn't catch that before the merge window.

I'm doing the exact same thing for csky and sparc that I did for
arc/arm/m68k/mips/nds32/nios2/parisc/sh.  Nothing more, nothing less.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ