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=-15.1 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 4225DC4363D for ; Wed, 30 Sep 2020 23:21:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CCEA420848 for ; Wed, 30 Sep 2020 23:21:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="v4Ukut/5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CCEA420848 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id F32756B005C; Wed, 30 Sep 2020 19:21:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EBB496B0062; Wed, 30 Sep 2020 19:21:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D830B6B0068; Wed, 30 Sep 2020 19:21:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0109.hostedemail.com [216.40.44.109]) by kanga.kvack.org (Postfix) with ESMTP id C03BC6B005C for ; Wed, 30 Sep 2020 19:21:23 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 6B0773646 for ; Wed, 30 Sep 2020 23:21:23 +0000 (UTC) X-FDA: 77321301246.07.eggs10_480298027196 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 4FF521814C3A6 for ; Wed, 30 Sep 2020 23:21:23 +0000 (UTC) X-HE-Tag: eggs10_480298027196 X-Filterd-Recvd-Size: 3549 Received: from mail-yb1-f193.google.com (mail-yb1-f193.google.com [209.85.219.193]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Wed, 30 Sep 2020 23:21:22 +0000 (UTC) Received: by mail-yb1-f193.google.com with SMTP id x8so2552104ybe.12 for ; Wed, 30 Sep 2020 16:21:22 -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=G7CGUkI00TkehZQxNJlHHgSkAGTsbjHCotSAj0fE6m89IxiqPsqPTkz0bP0TYCvuXo 66ZgUwYKMutZaf51KF7u/+LYPiDctFMVs6IKtQOm1DEeu5iT8ye1uEonN73vj0Pty6a4 L51CEyEoccey2V7FSX6A1fNeiXbOF5sZBoC8cb0AJDek4LsusEOhhYv/WzYy4gl0f5Iq T2/IAO4cKfZuoNDEPs1RrFAbuo/YAIlqEp9vDKpJPggvyK4vBqkoRgfAWM1PkW8U9YJj KZ+K+ihqMJGVEmspuJ6NunBCcOYr1l3cfUn3EjbkrkroERJbkbiLrJraB+6P9zCsMoah Satg== X-Gm-Message-State: AOAM531XhBs2ZHNXqCuTR5dUqrI0Vl70+v7i/DKV7bbqLMAkEcXxLdYx sGEnuYcQZN8iX4Um/FF/3U3J7v+xxfStNf6AhPRZGp2upYbiRA== X-Google-Smtp-Source: ABdhPJzwEtWH0sHKPzgO//AINaKkaCCF9YqLLPoAQVMrYySJaubkHVFJMEgfvcio/aElNZn9XksgnqO18MZt6T21T7E= 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" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.