* + mm-highmem-align-down-to-page-the-address-for-kunmap_flush_on_unmap.patch added to mm-unstable branch
@ 2023-01-26 20:40 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-01-26 20:40 UTC (permalink / raw)
To: mm-commits, willy, viro, tony.luck, tglx, keescook, ira.weiny,
glider, dsterba, deller, bigeasy, bagasdotme, andreyknvl,
fmdefrancesco, akpm
The patch titled
Subject: mm/highmem: align-down to page the address for kunmap_flush_on_unmap()
has been added to the -mm mm-unstable branch. Its filename is
mm-highmem-align-down-to-page-the-address-for-kunmap_flush_on_unmap.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-highmem-align-down-to-page-the-address-for-kunmap_flush_on_unmap.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Subject: mm/highmem: align-down to page the address for kunmap_flush_on_unmap()
Date: Thu, 26 Jan 2023 15:33:46 +0100
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.
Link: https://lkml.kernel.org/r/20230126143346.12086-1-fmdefrancesco@gmail.com
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Fixes: f3ba3c710ac5 ("mm/highmem: Provide kmap_local*")
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Helge Deller <deller@gmx.de>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: David Sterba <dsterba@suse.com>
Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/highmem-internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/highmem-internal.h~mm-highmem-align-down-to-page-the-address-for-kunmap_flush_on_unmap
+++ a/include/linux/highmem-internal.h
@@ -200,7 +200,7 @@ static inline void *kmap_local_pfn(unsig
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
}
_
Patches currently in -mm which might be from fmdefrancesco@gmail.com are
mm-highmem-add-notes-about-conversions-from-kmap_atomic.patch
mm-highmem-add-notes-about-conversions-from-kmap_atomic-v3.patch
mm-highmem-align-down-to-page-the-address-for-kunmap_flush_on_unmap.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-26 20:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-26 20:40 + mm-highmem-align-down-to-page-the-address-for-kunmap_flush_on_unmap.patch added to mm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.