From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8D5EC433B4 for ; Fri, 14 May 2021 19:16:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3C32161263 for ; Fri, 14 May 2021 19:16:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C32161263 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4D6D36B006C; Fri, 14 May 2021 15:16:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 487DC6B006E; Fri, 14 May 2021 15:16:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 328576B0070; Fri, 14 May 2021 15:16:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0053.hostedemail.com [216.40.44.53]) by kanga.kvack.org (Postfix) with ESMTP id F19926B006C for ; Fri, 14 May 2021 15:16:42 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 93484C5D6 for ; Fri, 14 May 2021 19:16:42 +0000 (UTC) X-FDA: 78140793444.19.D734BA0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf09.hostedemail.com (Postfix) with ESMTP id 030B76000107 for ; Fri, 14 May 2021 19:16:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621019801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=R27Jf03ZxREnKxwqc3tfY/ljdTBme23N34D66vuvIQg=; b=Ow3SrpMTq+C+149YXjvsGd3ozjSYy+P7XYbL32TSDl+RSYcX1qCzuU/q9J3EU6kuqiJZtd BsPPd7WzlMUjlfcqurGUvXAQ0eU3RfYZdoDx1hKiwNJEKnEJubWarev8Pcdee2FXT/49eS JEFdkvN36RVfGYJ+0sOxxLCrLb8inww= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-477-XEvpKrIaNIaZZRiyQfXs4g-1; Fri, 14 May 2021 15:16:39 -0400 X-MC-Unique: XEvpKrIaNIaZZRiyQfXs4g-1 Received: by mail-qt1-f199.google.com with SMTP id s11-20020ac85ecb0000b02901ded4f15245so289242qtx.22 for ; Fri, 14 May 2021 12:16:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=R27Jf03ZxREnKxwqc3tfY/ljdTBme23N34D66vuvIQg=; b=QX74Dk2lOxld3Wy71t4/oPfEq6jRD7Z5WxtKVK61kjbDj6hqPOV8fNUruk+TXfLJI3 XYTfvwF62NzdzWlAFzGjZWtybUPy8kouQAAlLeplioqJw7fmmmJePCg8qzR9uLdbgRNR PV7+jiyUYPgP/odKGeV8Cm7otN3J0JMqGJ39M3vUlqIzY4pSnWmn/BsK+YeB7kJff5cc cfv+4yMqLwaGp0Jt/hEKIgeyj5G0PsquTjytEP1KNrH0xuarloKPbkNKJ048YYzqeRSz DzcXAMyWIL+fDICp+MUh7U3lrjsuP3s/yOVF+eEfEnBaiJ46juZHYSDtgHGyaokKFISh HMVQ== X-Gm-Message-State: AOAM533Z2FCMCreFDlUvYk39St9b5KJlBkrBkn1LylJp9AfxzUypHXLu Q/qBWTbkclu0ybk/Mi/UzdJvWRDWeUB04/BPryJzm9ticPKCjt4DFd7tznPe3Dmy3uAKRl1y5Ow 3Taq3ewhjFy0= X-Received: by 2002:ae9:e80c:: with SMTP id a12mr32290580qkg.85.1621019799289; Fri, 14 May 2021 12:16:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJs+ha/rpm7/oDhLt+mOMNO1Kxmt5d5fuW6jdVLELsSygkTzBiRgTBeOiTpRSfxRjcymOgfA== X-Received: by 2002:ae9:e80c:: with SMTP id a12mr32290560qkg.85.1621019799027; Fri, 14 May 2021 12:16:39 -0700 (PDT) Received: from t490s (bras-base-toroon474qw-grc-72-184-145-4-219.dsl.bell.ca. [184.145.4.219]) by smtp.gmail.com with ESMTPSA id i11sm5069427qtv.8.2021.05.14.12.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 12:16:38 -0700 (PDT) Date: Fri, 14 May 2021 15:16:36 -0400 From: Peter Xu To: Mike Kravetz Cc: Mina Almasry , Axel Rasmussen , Linux-MM , Andrew Morton , open list Subject: Re: [PATCH] mm, hugetlb: fix resv_huge_pages underflow on UFFDIO_COPY Message-ID: References: <20210513234309.366727-1-almasrymina@google.com> <09dc0712-48e8-8ba2-f170-4c2febcfff83@oracle.com> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Queue-Id: 030B76000107 Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Ow3SrpMT; spf=none (imf09.hostedemail.com: domain of peterx@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam04 X-Stat-Signature: phhimj3ucnhztybj9htfpiu9duhswqqz X-HE-Tag: 1621019800-265328 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000078, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, May 14, 2021 at 10:56:36AM -0700, Mike Kravetz wrote: > Since this is a shared mapping, can we not have a 'regular' mapping to > the same range that is uffd registered? And, that regular mappings could > fault and race with the uffd copy code? Yeah we can.. Please ignore the paragraph in the parenthesis. Sorry. -- Peter Xu