[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <63d4593ebc66a_7f63c2942b@iweiny-mobl.notmuch>
Date: Fri, 27 Jan 2023 15:07:42 -0800
From: Ira Weiny <ira.weiny@...el.com>
To: Matthew Wilcox <willy@...radead.org>, Helge Deller <deller@....de>
CC: Ira Weiny <ira.weiny@...el.com>,
"Fabio M. De Francesco" <fmdefrancesco@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Alexander Potapenko <glider@...gle.com>,
Andrey Konovalov <andreyknvl@...il.com>,
Tony Luck <tony.luck@...el.com>,
Bagas Sanjaya <bagasdotme@...il.com>,
David Sterba <dsterba@...e.com>,
Kees Cook <keescook@...omium.org>,
<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
Thomas Gleixner <tglx@...utronix.de>,
Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH] mm/highmem: Align-down to page the address for
kunmap_flush_on_unmap()
Matthew Wilcox wrote:
> On Thu, Jan 26, 2023 at 09:37:08PM +0100, Helge Deller wrote:
> > > This 'fixes' looks correct to me. I don't know how many folks are running
> > > highmem with parisc but if they are I am sure they would appreciate the
> > > extra knowledge.
> >
> > It seems nobody is running highmem on parisc, because it can't be enabled.
> > AFAICS, it's not in any parisc related Kconfig file.
>
> But this isn't being used for highmem on parisc; it's being used for
> cache coherency.
<sigh> right! I missed that. Thanks to you and Al for setting me
straight.
>
> > > I do wonder if this should be cc'ed to stable to ensure it gets
> > > backported? Helge do you think there is a need for that?
> >
> > For correctness I think it's nevertheless good to backport it.
>
> I cc'd stable on my version of this patch, and included a Fixes tag
> to indicate how far back to backport it.
Thanks!
>
> > That would be another possibility:
> >
> > diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h
> > index 0bdee6724132..ce5d1f8a23bd 100644
> > --- a/arch/parisc/include/asm/cacheflush.h
> > +++ b/arch/parisc/include/asm/cacheflush.h
> > @@ -77,6 +77,7 @@ void flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned lon
> > #define ARCH_HAS_FLUSH_ON_KUNMAP
> > static inline void kunmap_flush_on_unmap(const void *addr)
> > {
> > + addr = PTR_ALIGN_DOWN(addr, PAGE_SIZE);
>
> I considered that, but thought it a shame to do it here when all the
> other users are passing in a page-aligned address.
>
I think this also keeps the kunmap_local() API intact better.
Patch reviewed.
Thanks!
Ira
Powered by blists - more mailing lists