[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <63d2d97bce4c7_63e3f29442@iweiny-mobl.notmuch>
Date: Thu, 26 Jan 2023 11:50:19 -0800
From: Ira Weiny <ira.weiny@...el.com>
To: "Fabio M. De Francesco" <fmdefrancesco@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Ira Weiny <ira.weiny@...el.com>,
"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>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>
CC: Thomas Gleixner <tglx@...utronix.de>,
Al Viro <viro@...iv.linux.org.uk>, Helge Deller <deller@....de>
Subject: Re: [PATCH] mm/highmem: Align-down to page the address for
kunmap_flush_on_unmap()
Fabio M. De Francesco wrote:
FWIW I think I would simplify the subject
[PATCH] mm/highmem: Fix kunmap_local() on flush on unmap architectures
Or something like that.
> If ARCH_HAS_FLUSH_ON_KUNMAP is defined (PA-RISC case), __kunmap_local()
> calls kunmap_flush_on_unmap(). The latter currently flushes the wrong
> address (as confirmed by Matthew Wilcox and Helge Deller). Al Viro
> proposed to call kunmap_flush_on_unmap() on an aligned-down to page
> address in order to fix this issue. Consensus has been reached on this
> solution.
>
> Therefore, if ARCH_HAS_FLUSH_ON_KUNMAP is defined, call
> kunmap_flush_on_unmap() on an aligned-down to page address computed with
> the PTR_ALIGN_DOWN() macro.
>
> Cc: Ira Weiny <ira.weiny@...el.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Suggested-by: Al Viro <viro@...iv.linux.org.uk>
> Confirmed-by: Helge Deller <deller@....de>
> Confirmed-by: Matthew Wilcox <willy@...radead.org>
> Fixes: f3ba3c710ac5 ("mm/highmem: Provide kmap_local*")
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
> ---
>
> I have (at least) two problems with this patch...
>
> 1) checkpatch.pl complains about the use of the non-standard
> "Confirmed-by" tags. I don't know how else I can give credit to Helge
> and Matthew. However, this is not the first time that I see non-standard
> tags in patches applied upstream (I too had a non-standard
> "Analysed-by" tag in patch which fixes a SAC bug). Any objections?
I think you can add Matthew and Helge as Suggested-by: All 3 had input on
the solution.
>
> 2) I'm not sure whether or not the "Fixes" tag is appropriate in this
> patch. Can someone either confirm or deny it?
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.
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?
Ira
>
> include/linux/highmem-internal.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/highmem-internal.h b/include/linux/highmem-internal.h
> index 034b1106d022..e247c9ac4583 100644
> --- a/include/linux/highmem-internal.h
> +++ b/include/linux/highmem-internal.h
> @@ -200,7 +200,7 @@ static inline void *kmap_local_pfn(unsigned long pfn)
> static inline void __kunmap_local(const void *addr)
> {
> #ifdef ARCH_HAS_FLUSH_ON_KUNMAP
> - kunmap_flush_on_unmap(addr);
> + kunmap_flush_on_unmap(PTR_ALIGN_DOWN(addr, PAGE_SIZE));
> #endif
> }
>
> --
> 2.39.0
>
>
Powered by blists - more mailing lists