Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp66972pxk; Wed, 30 Sep 2020 18:07:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8dfNUvFIktwBvod0rzHnNxbK/fNEmwYR+OpQUeuxYcMf5+F/M/mEih9T/sKu7Vv2IttUE X-Received: by 2002:a17:906:4746:: with SMTP id j6mr5488317ejs.251.1601514456431; Wed, 30 Sep 2020 18:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601514456; cv=none; d=google.com; s=arc-20160816; b=GDlm9bJNw1sO5VAwitrbBUKaSXJhZkRcFFubmw+E4Mw3aYJfLJRg+m2f3yqL1UyWcq 57XycPDEcuhpKaE9VJweK6Z8RgGH2viTusETZJKICw+77H5Ss05rptgSQRKuhepxC6wZ csY4tEz4mIxOrxZiVPThmJpnw1iNf5+RoBIllACwTjVqWVSQb99FhQN6WOBH2nnTI5bF b0ZzCTeGvoYguP2XX0uVh+H1ekit8rkYYA7iei/jL7jO2kHG7KmN3dOUxxofqf2pl9Ym aboOp9CxO8V4SlT4Jvo3E62m5pwTj7C5yCkKCbNJ86fvoLDLkgFDTp1TDksOfcZZPoYD d8cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yrpPLLVt8wKM3iqW9ZiiFDeORkAMwl036WYIC41BrP0=; b=sbruxhKdLAYETn6tM2ZUZsPTiTVJQLWWNipKCXs82wrZrv80p+etW7vdRdj7l7XzGO bDmz3Lvd78iCLDHfZF9Mf8yvBl4Y9pjv9xeUQpxs3tu+W53ZrrtF+rZePVYjvaB24+m4 71Yp1W39nuJ+SFQ1JUQ04aA9u0YMdWccuFxho9GRf/Hi+9LvxGNf3l/99FDzKa5dwmk1 RemHUjFvvx9u5ZEtghWIPrYymorJRqdZtrNs1imqvxKhX9ghiuuVnegnQOVzj0ucvnSN 00UP4H2QDsSytiwj3iGjWh9fDpQCcAEOA1sRFtd0yUZOCq84AQvaDrujw/10Rc+jQG57 Rjww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="v4Ukut/5"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h19si2301781ejb.619.2020.09.30.18.06.53; Wed, 30 Sep 2020 18:07:36 -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=@google.com header.s=20161025 header.b="v4Ukut/5"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731560AbgI3XVv (ORCPT + 99 others); Wed, 30 Sep 2020 19:21:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731255AbgI3XVY (ORCPT ); Wed, 30 Sep 2020 19:21:24 -0400 Received: from mail-yb1-xb44.google.com (mail-yb1-xb44.google.com [IPv6:2607:f8b0:4864:20::b44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A39AC061755 for ; Wed, 30 Sep 2020 16:21:23 -0700 (PDT) Received: by mail-yb1-xb44.google.com with SMTP id f70so2557073ybg.13 for ; Wed, 30 Sep 2020 16:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yrpPLLVt8wKM3iqW9ZiiFDeORkAMwl036WYIC41BrP0=; b=v4Ukut/5haJelh51Q3Yfml8ane6b7t82geBuv+2gaQgEs7KTFY0XlEY69WChsLfVKu MKvforcAyLkkgaa7rglJ2+OT5drFkLjoGnSVKR1ClTCDPWgwyPWkp9f4KtNHjpAEUB5D WBDA0M+/5S4H7l8nRuf30gXeG2CinxtBkGclBiTw2uFIMuQSxpH358o0yKc+B7MQM0wm 8qL7D+zuckxZ0AXMvLoe/vi9XMS/qSbaqEC3kEoXW4LmY+nJ/o98nU7+Jn8nmxMxFmcR hWjQr7zTggVTGLGQ6RFHDxplYrS7pVyiHN0DHo4tXTmMaTwtXCkWrxbuOHWe7aAX9c+w VXJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yrpPLLVt8wKM3iqW9ZiiFDeORkAMwl036WYIC41BrP0=; b=GAb9rrtZaDc9pHCCx8vRuMCWZXGHWYw0MdJBuITejpF7P2WBwvE4WqoyJ7ZdqhVRpO hfwwdipyfixrl0KAh/puij7Qey5mlpesio0mFUy7pDfP2O6c+PyS6rrifShsow3KMux9 QTW74BLfIJbS0GmHbTRyZbKexzsG9OrF8LdsxlZJUKoN9XeW6gaJlbTqeLEeegdjIk7J axq5LE5/Ha67WjrsxGDMW3bsoBSffqScrFRdU6V/iP4FAJ/gsVl83hNTn2hNkmVp/JOq 1WV0BEx2fC3fpS4gGklbWqnZPOM2f1U4QXkyYxpkanrynh3jCxki6TVaelDgXbZbiXeP yG2g== X-Gm-Message-State: AOAM532j/AIYFj1QKxbzTSkNVHcXqp5sPFd80myYd5CAqmqZrIsV8cOC +gqyJBZDPB86oCFXhgoOfnLKSQJPI3oPvOqpamEAvA== X-Received: by 2002:a25:5056:: with SMTP id e83mr6551483ybb.287.1601508082038; Wed, 30 Sep 2020 16:21:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Michel Lespinasse Date: Wed, 30 Sep 2020 16:21:09 -0700 Message-ID: Subject: Re: [PATCH 1/4] mm/gup_benchmark: Take the mmap lock around GUP To: Jann Horn Cc: Andrew Morton , linux-mm , LKML , "Eric W . Biederman" , Mauro Carvalho Chehab , Sakari Ailus Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 29, 2020 at 6:20 PM Jann Horn wrote: > To be safe against concurrent changes to the VMA tree, we must take the > mmap lock around GUP operations (excluding the GUP-fast family of > operations, which will take the mmap lock by themselves if necessary). > > This code is only for testing, and it's only reachable by root through > debugfs, so this doesn't really have any impact; however, if we want to add > lockdep asserts into the GUP path, we need to have clean locking here. > > Signed-off-by: Jann Horn Acked-by: Michel Lespinasse Thanks for these cleanups :) -- Michel "Walken" Lespinasse A program is never fully debugged until the last user dies.