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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 26 Jan 2023 20:49:43 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     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()

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.

> > 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.

> 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ