[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <63d03cbb5c6a8_9ed629449@iweiny-mobl.notmuch>
Date: Tue, 24 Jan 2023 12:16:59 -0800
From: Ira Weiny <ira.weiny@...el.com>
To: "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
Matthew Wilcox <willy@...radead.org>,
Al Viro <viro@...iv.linux.org.uk>
CC: Christoph Hellwig <hch@...radead.org>,
<linux-kernel@...r.kernel.org>, <linux-fsdevel@...r.kernel.org>,
Ira Weiny <ira.weiny@...el.com>, <linux-parisc@...r.kernel.org>
Subject: Re: [PATCH v3 4/4] fs/sysv: Replace kmap() with kmap_local_page()
Fabio M. De Francesco wrote:
> On venerdì 20 gennaio 2023 06:56:01 CET Al Viro wrote:
> > On Fri, Jan 20, 2023 at 05:07:48AM +0000, Al Viro wrote:
> > > On Fri, Jan 20, 2023 at 04:54:51AM +0000, Matthew Wilcox wrote:
> > > > > Sure, but... there's also this:
> > > > >
> > > > > static inline void __kunmap_local(const void *addr)
> > > > > {
> > > > > #ifdef ARCH_HAS_FLUSH_ON_KUNMAP
> > > > >
> > > > > kunmap_flush_on_unmap(addr);
> > > > >
> > > > > #endif
> > > > > }
> > > > >
> > > > > Are you sure that the guts of that thing will be happy with address
> that
> > > > > is not page-aligned? I've looked there at some point, got scared of
> > > > > parisc (IIRC) MMU details and decided not to rely upon that...
> > > >
> > > > Ugh, PA-RISC (the only implementer) definitely will flush the wrong
> > > > addresses. I think we should do this, as having bugs that only manifest
> > > > on one not-well-tested architecture seems Bad.
> > > >
> > > > static inline void __kunmap_local(const void *addr)
> > > > {
> > > > #ifdef ARCH_HAS_FLUSH_ON_KUNMAP
> > > >
> > > > - kunmap_flush_on_unmap(addr);
> > > > + kunmap_flush_on_unmap(PAGE_ALIGN_DOWN(addr));
> > > >
> > > > #endif
> > > > }
> > >
> > > PTR_ALIGN_DOWN(addr, PAGE_SIZE), perhaps?
> >
> > Anyway, that's a question to parisc folks; I _think_ pdtlb
> > quietly ignores the lower bits of address, so that part seems
> > to be safe, but I wouldn't bet upon that. And when I got to
> > flush_kernel_dcache_page_asm I gave up - it's been a long time
> > since I've dealt with parisc assembler.
>
> There seems to be consensus that __kunmap_local() needs to be fixed for the
> parisc case (ARCH_HAS_FLUSH_ON_KUNMAP).
>
> Is anyone doing this task?
I'm not looking at it.
>
> If you agree, I could make this change and give proper credits for the tip.
I think that would be great.
Thanks!
Ira
>
> Thank you,
>
> Fabio
>
>
>
Powered by blists - more mailing lists