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]
Message-ID: <20210209174023.GI4718@ziepe.ca>
Date:   Tue, 9 Feb 2021 13:40:23 -0400
From:   Jason Gunthorpe <jgg@...pe.ca>
To:     Peter Xu <peterx@...hat.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Matthew Wilcox <willy@...radead.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Kirill Tkhai <ktkhai@...tuozzo.com>,
        Mike Rapoport <rppt@...ux.vnet.ibm.com>,
        David Gibson <david@...son.dropbear.id.au>,
        Kirill Shutemov <kirill@...temov.name>,
        Christoph Hellwig <hch@....de>,
        Miaohe Lin <linmiaohe@...wei.com>,
        Gal Pressman <galpress@...zon.com>,
        Jann Horn <jannh@...gle.com>, Jan Kara <jack@...e.cz>,
        Wei Zhang <wzam@...zon.com>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v4 3/5] mm: Introduce page_needs_cow_for_dma() for
 deciding whether cow

On Mon, Feb 08, 2021 at 10:02:27PM -0500, Peter Xu wrote:
> We've got quite a few places (pte, pmd, pud) that explicitly checked against
> whether we should break the cow right now during fork().  It's easier to
> provide a helper, especially before we work the same thing on hugetlbfs.
> 
> Since we'll reference is_cow_mapping() in mm.h, move it there too.  Actually it
> suites mm.h more since internal.h is mm/ only, but mm.h is exported to the
> whole kernel.  With that we should expect another patch to use is_cow_mapping()
> whenever we can across the kernel since we do use it quite a lot but it's
> always done with raw code against VM_* flags.
> 
> Signed-off-by: Peter Xu <peterx@...hat.com>
> ---
>  include/linux/mm.h | 21 +++++++++++++++++++++
>  mm/huge_memory.c   |  8 ++------
>  mm/internal.h      |  5 -----
>  mm/memory.c        |  8 +-------
>  4 files changed, 24 insertions(+), 18 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@...dia.com>

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ