Re: [PATCH mm-unstable v1 04/20] mm: add early FAULT_FLAG_UNSHARE consistency checks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: David Hildenbrand <david@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
- Subject: Re: [PATCH mm-unstable v1 04/20] mm: add early FAULT_FLAG_UNSHARE consistency checks
- From: Vlastimil Babka <vbabka@xxxxxxx>
- Date: Fri, 18 Nov 2022 17:45:31 +0100
- Cc: x86@xxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx, etnaviv@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx, linux-media@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx, linux-security-module@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, John Hubbard <jhubbard@xxxxxxxxxx>, Peter Xu <peterx@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Andrea Arcangeli <aarcange@xxxxxxxxxx>, Hugh Dickins <hughd@xxxxxxxxxx>, Nadav Amit <namit@xxxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>, Mike Kravetz <mike.kravetz@xxxxxxxxxx>, Muchun Song <songmuchun@xxxxxxxxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>, Lucas Stach <l.stach@xxxxxxxxxxxxxx>, David Airlie <airlied@xxxxxxxxx>, Oded Gabbay <ogabbay@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>
- In-reply-to: <20221116102659.70287-5-david@redhat.com>
- References: <20221116102659.70287-1-david@redhat.com> <20221116102659.70287-5-david@redhat.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2
On 11/16/22 11:26, David Hildenbrand wrote:
> For now, FAULT_FLAG_UNSHARE only applies to anonymous pages, which
> implies a COW mapping. Let's hide FAULT_FLAG_UNSHARE early if we're not
> dealing with a COW mapping, such that we treat it like a read fault as
> documented and don't have to worry about the flag throughout all fault
> handlers.
>
> While at it, centralize the check for mutual exclusion of
> FAULT_FLAG_UNSHARE and FAULT_FLAG_WRITE and just drop the check that
> either flag is set in the WP handler.
>
> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
> ---
> mm/huge_memory.c | 3 ---
> mm/hugetlb.c | 5 -----
> mm/memory.c | 23 ++++++++++++++++++++---
> 3 files changed, 20 insertions(+), 11 deletions(-)
Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]