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=-3.9 required=3.0 tests=BAYES_00,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 34DFCC4742C for ; Tue, 3 Nov 2020 00:33:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 816E622275 for ; Tue, 3 Nov 2020 00:33:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="IDtvJilp"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="U66ioQL9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 816E622275 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0351B6B005C; Mon, 2 Nov 2020 19:33:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F27656B005D; Mon, 2 Nov 2020 19:33:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E16556B0068; Mon, 2 Nov 2020 19:33:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0247.hostedemail.com [216.40.44.247]) by kanga.kvack.org (Postfix) with ESMTP id B531D6B005C for ; Mon, 2 Nov 2020 19:33:50 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 534B58249980 for ; Tue, 3 Nov 2020 00:33:50 +0000 (UTC) X-FDA: 77441234220.06.crib48_3000124272b4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 2C2921004550A for ; Tue, 3 Nov 2020 00:33:50 +0000 (UTC) X-HE-Tag: crib48_3000124272b4 X-Filterd-Recvd-Size: 3464 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Tue, 3 Nov 2020 00:33:49 +0000 (UTC) Date: Tue, 3 Nov 2020 01:33:46 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1604363628; 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; bh=Y77zxdoENlOcmN7TXezQoE5rEB/c1724Uvi6xgzFbN4=; b=IDtvJilpB3dhGEU4+MoaabkPWj1Pw3lho68xze8cDPoOjGCanGINaxHLOnPsudUqdb0Jse DA7zOfTnQEPSvoi53R96yAfkV/9Dack82pfFCyCi4/0C8U03uwsgHLP+QYRJvUQcskP9rF SOJpakh9HBuI1ghZWN7Ft6Ufw9p+gxRHcUE3yTjhLHSpSsL/jYQAfbdAQEfrvl/G5/xnfe TPEwRilkCPace4WIySmPjMbQW4Z5cWTClC4RzVK1Y4MBmwrNrKBp6/+jiH0iT/CuCYSVM9 b7G9FWhgWVxoAqTsU1cpK5fZ9yhHs6kuRe90DfJeqOpUSJMjg81JqIYQhy7q7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1604363628; 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; bh=Y77zxdoENlOcmN7TXezQoE5rEB/c1724Uvi6xgzFbN4=; b=U66ioQL9OTKucJydCuw1jdnhEYPGbmmLfaUA0Fb4gCxBhyuOUz9tL7Mmu7qTyad8RuNFlE T+Q/RCXP7KOhSHBw== From: "Ahmed S. Darwish" To: Peter Xu Cc: Jason Gunthorpe , linux-kernel@vger.kernel.org, Linus Torvalds , Andrea Arcangeli , Andrew Morton , "Aneesh Kumar K.V" , Christoph Hellwig , Hugh Dickins , Jan Kara , Jann Horn , John Hubbard , Kirill Shutemov , Kirill Tkhai , Leon Romanovsky , Linux-MM , Michal Hocko , Oleg Nesterov , Peter Zijlstra , Ingo Molnar , Will Deacon , Thomas Gleixner , Sebastian Siewior Subject: Re: [PATCH v2 2/2] mm: prevent gup_fast from racing with COW during fork Message-ID: <20201103003346.GC52235@lx-t490> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201031152605.GD6357@xz-x1> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Oct 31, 2020 at 11:26:05AM -0400, Peter Xu wrote: ... > Shall we document this explicitly (if this patch still needs a repost)? Yes, this patch series needs a v3 :) > Seems not straightforward since that seems not the usual way to use seqcount, > not sure whether I'm the only one that feels this way, though. Yes, this usage is correct but not common. I've proposed a more explicit comment above the write section code, in my reply to patch #2. ... > The other thing is, considering this use of seqcount seems to be quite special > as explained below, I'm just not sure whether this would confuse lockdep or > kcsan, etc., if we decide to use write_seqcount_t_begin(). > Lockdep won't be confused as it's not used in the raw_*() variant of the seqcount APIs. AFAIK KCSAN also has some margin to protect itself from this: see seqlock.h KCSAN_SEQLOCK_REGION_MAX. Thanks, > Peter Xu Ahmed Darwish Linutronix GmbH