Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1011456pxj; Sat, 15 May 2021 00:45:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxO06B5/E8bu/AWg8Udk3dWfcWjECOFoXsm62Lc2ClBUi6yHCUZ/x75SsWPpPhDnTGJYJYm X-Received: by 2002:a05:6e02:882:: with SMTP id z2mr34958626ils.91.1621064740670; Sat, 15 May 2021 00:45:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621064740; cv=none; d=google.com; s=arc-20160816; b=woL4HHOg+epCPWyBpuFLnm3DOOFXpwNZiwsi2B79OCj5PZiRZmyRdxZI1/aKv3S4Wh Fp2XUOFTd5UaVvcJWCu5+W/3w6aisGEZJ0HrE2b3MHPft4XDqe+KQFcpGT0gKZeP5Vy8 ZAj3IGpzJ+sfW+sdCD4p0skmDA1k1zXrGlUyw1E2MNmRPfn9ho8juky7WqfBahwZDs9V vC2T6RnF4rz2fiibvPTJwDPEVQUAGte7HEtaAha6+SqIv2+ykIjUK7lF2Vw2xL5gJGP0 4OgONLP16D+gfwi/oSqULKqd6QIcmhc7XN80NTkLFDjWSpi+7PkZmurKN2niElItICUo EmGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=R27Jf03ZxREnKxwqc3tfY/ljdTBme23N34D66vuvIQg=; b=B6lNMSzyWOxbkSoQl171VjQmYLTlszUBVThSm+BONHI+alRtT5eeNCgEB9tE6/dGlY PlhDBTHqwwumRfNzq0AJgyNnFT9MLxXeE6ldf61sPzr7B4rWW2avQ50l5UsWWRrXx4mp ZVZaxieI7uV8BKqfZzxJjE+PX0Dd543NANSoa3yhaBbdd+fX07Obr9fpX30fgSj8jyQO xkiFZpVXCoxovbsORt0mBTkPpOZTChD8scdbScf+cpdJFoBzIHXJhD1MfYuXZ/cLD4/T IU1jsIwCjvCQm3z/UvNoPuhd/zd7+YN2ubp21OoPP+FqAUV6X4kaHYVM90b/L2GfMTCj 18uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ow3SrpMT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j24si10704357jad.22.2021.05.15.00.45.26; Sat, 15 May 2021 00:45:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ow3SrpMT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232079AbhENTRy (ORCPT + 99 others); Fri, 14 May 2021 15:17:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41498 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbhENTRx (ORCPT ); Fri, 14 May 2021 15:17:53 -0400 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-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-477-El8uDjjVPU6KTbnK_GampA-1; Fri, 14 May 2021 15:16:39 -0400 X-MC-Unique: El8uDjjVPU6KTbnK_GampA-1 Received: by mail-qt1-f197.google.com with SMTP id v13-20020ac8578d0000b02901e4f5d48831so311181qta.14 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=UtL0OZUD7vk/oPVuemriv7w+odXt61WtKaMKBMxcgI4D9fjMVRSj7uBo9lQWbldiZp MmXCxKqOg0PKAQsenF7NhhJhslqe4JxVqVtXbsK/DOZpLN+s2PXIllelGgHmHpPbdf0v 3HBLn6KHdExsQNjpzWl1Mk7KKBZUwFs7zJo9YuEtZ9v8DQaBWJripvOwAKucc3DLlhex 0eqFBZyJJYmxiHkyp5iWwl85H84ErnwdrKdd5kAjZlisY3R/nR8eGee+gaJa7W6u4IeE 1VKosCdGhg36JGRywHo2t0Ey54vu9/Irh8Doln3kwckPYVgn4bMOeGqtV4iFPpegZKEA Xvfg== X-Gm-Message-State: AOAM533sLfLG1JpkuiH1IssimePRqwhzO0eKL5g9tSdc88L+LstXcWxw M0iZBARXFfnLiYiTJ+AyT5aOGsdPIyMQgmR1/iJZFFwMKsW6TNqCehemRRUIYTAu/Evf8+5dGz7 0nZMkX4ftXMl94I36il9uq4yf X-Received: by 2002:ae9:e80c:: with SMTP id a12mr32290581qkg.85.1621019799290; Fri, 14 May 2021 12:16:39 -0700 (PDT) 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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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