Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2396039ybc; Wed, 13 Nov 2019 13:53:29 -0800 (PST) X-Google-Smtp-Source: APXvYqyQsSONhh4txowMHkyuz5JLu8mjnF5XqbNa5NzJYegM4Z8Kep5Fddo+v2NY7rMB6Hf6fH0r X-Received: by 2002:a17:907:2078:: with SMTP id qp24mr5082842ejb.157.1573682009200; Wed, 13 Nov 2019 13:53:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573682009; cv=none; d=google.com; s=arc-20160816; b=o3HtKuH+a/a6oeMGXNTA+hPDSuKB1FVF4exLfbospGST7bUY8EwR+TxxOxEbJMl1ED 39YVKbztF0/qkhpIT4ODvEORP/i+O9CJeWYeS6enTEJnMKX+KCqJrrS/mjGNy4AmsOhC noxCfkW+D0K90jsqVa/Mxe0hJoJGIk0aaIxdS0Rayu55o8nKNyGnPv1sZydGDZgjic4J SPM9Ybmzm+zyCsjHUwgwY4o7+mrDevMjQyF0eBmsNKUhpa4DG4+4R+EMqOdI9wlQ1dgW OcxHYyFiClbF3ZGzxZAgCVFpxlNDGN9aFFGEYqsnS8SrvBJXQOUJY13alBuPKm+j1A+b /8YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=8D6FneHEx2JjbMj/TnMccTBxYikw2YdZjooxD2V1cWo=; b=V9q3cwTGkjJjP/ck/mOXpDH4e8fzq7exErdPFJj8owqbaxkCdAIcBqoq+GUI0O3+XS T+HnsOZgiQth+sjHgX9qIAvOrox+NkrQkOzo2oPmeppFf3IF7flE5v3mXx24u126cdMO b1HAyhpvizaQlO07VvsZJsWUdsRaAFjjLfHVgkZrjSNtGLLACw/3qLBosfqERd0DkP81 EGUJe0m4CEDEiOlGIbx7Dj69Ps85HpLB34GmOej28i026Umc9xFedeJby8Bze2h3Zs00 /2tYpBp0J1SdQsDFyUk1utM+Xkpkb1+Mggvj5bkngV3QbepY4XaJYe1f0dXXKAl3cEPS TL9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6si1978958ejw.412.2019.11.13.13.53.04; Wed, 13 Nov 2019 13:53:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726985AbfKMVus (ORCPT + 99 others); Wed, 13 Nov 2019 16:50:48 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:41778 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726979AbfKMVus (ORCPT ); Wed, 13 Nov 2019 16:50:48 -0500 Received: (qmail 5977 invoked by uid 2102); 13 Nov 2019 16:50:47 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 13 Nov 2019 16:50:47 -0500 Date: Wed, 13 Nov 2019 16:50:47 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Marco Elver cc: Linus Torvalds , Eric Dumazet , Alexei Starovoitov , Eric Dumazet , syzbot , linux-fsdevel , Linux Kernel Mailing List , syzkaller-bugs , Al Viro , Andrea Parri , "Paul E. McKenney" , LKMM Maintainers -- Akira Yokosawa Subject: Re: KCSAN: data-race in __alloc_file / __alloc_file In-Reply-To: <20191113213336.GA20665@google.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 13 Nov 2019, Marco Elver wrote: > An expression works fine. The below patch would work with KCSAN, and all > your above examples work. > > Re name: would it make sense to more directly convey the intent? I.e. > "this expression can race, and it's fine that the result is approximate > if it does"? > > My vote would go to something like 'smp_lossy' or 'lossy_race' -- but > don't have a strong preference, and would also be fine with 'data_race'. > Whatever is most legible. Comments? Lossiness isn't really relevant. Things like sticky writes work perfectly well with data races; they don't lose anything. My preference would be for "data_race" or something very similar ("racy"? "race_ok"?). That's the whole point -- we know the operation can be part of a data race and we don't care. Alan Stern