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:   Fri, 5 Nov 2021 17:35:22 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     Ira Weiny <ira.weiny@...el.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Prathu Baronia <prathubaronia2011@...il.com>,
        linux-kernel@...r.kernel.org, chintan.pandya@...plus.com,
        Prathu Baronia <prathu.baronia@...plus.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [PATCH v4 1/1] mm/highmem: Remove deprecated kmap_atomic

On Fri, Nov 05, 2021 at 09:56:16AM -0700, Ira Weiny wrote:
> Also I wonder if memset_page could be used?  It would end up mapping the page
> 2x sometimes.

That was the point of this function existing, to avoid the
double-mapping.

> As an aside I think flush_dcache_page() needs to be in memset_page() for
> completeness but I'm a bit afraid of adding it with the current controversy...
> :-/

Looks like we now have agreement that it does need to be added, and I
agree with you; send a patch.

At some point, I'm probably going to need to foliate the mem*_page
helpers.  I've just added:

static inline void folio_zero_segments(struct folio *folio,
                size_t start1, size_t end1, size_t start2, size_t end2)
{
        zero_user_segments(&folio->page, start1, end1, start2, end2);
}

static inline void folio_zero_segment(struct folio *folio,
                size_t start, size_t end)
{
        zero_user_segments(&folio->page, start, end, 0, 0);
}

static inline void folio_zero_range(struct folio *folio,
                size_t start, size_t length)
{
        zero_user_segments(&folio->page, start, start + length, 0, 0);
}

but I imagine when we foliate btrfs, we'll need to expand the helpers.
I'll probably do something similar to zero_user_segments; have
out-of-line versions for HIGHMEM and inline versions for !HIGHMEM
(we can do the entire folio with HIGHMEM, but need to go page-by-page
on !HIGHMEM).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ