Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp939450ybl; Wed, 29 Jan 2020 12:20:20 -0800 (PST) X-Google-Smtp-Source: APXvYqyTAtdvqHdNUteDGnff2M1K6IlvFICtx8X1fw2xjUNPsCUy0cacjP7CdcjgGkBri/twpeg8 X-Received: by 2002:a9d:4c92:: with SMTP id m18mr825236otf.168.1580329219849; Wed, 29 Jan 2020 12:20:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580329219; cv=none; d=google.com; s=arc-20160816; b=QdJPYsuTfizG0MGuoKXlUOeei7D428aZz0bG6j/oeZOYlcgp1li4JAQQ/jjpHi+Nzv IkRqmZPLbZgW2Pas0ne/xRndNxsn/sMSkxKpKXQBXnx9ljCdTAVqi6Ps6I4STgqkcFOf QPfp6RK24v9Dga5ED9Oq/JuMbirW9zu6Nt/1cwh58hKtk8H2f64h9v2n+0SdQ+jVv3ak IJLNCECzoNXrUxOOLKg5cffgtUsHUzwtOAMhM59+T0PFHSci3chcSBWUOF+ln+2V5k+A vfFNMEAarECsO74RelnDFgDoGhBAg/nAnguJBFJCEmn3qpAuz+Urt5NRhqBV9qyxnLuX qnOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=WtGEfepyy0LbV7lFOfxrrSzZDn1Nz2ZTUtAy6mD4oJ8=; b=wR6GdmHy/ONBLA7KtpD33Pt/EnghddtZ8QGRpC4g7EWEp5uCPjN2x87ie3FgKWe91U vyZ8ZvKIcNrz/eS4rBo5x+4p1BX66dAnxoreVDPlY5wcU64Py/A2K2+MFz3WqDX5MuDH kMjAKQndhX3Hfnuz/QLshrSOpfpYdVmqbuAh5/bBw0HquCV2ErbzInC7tVpG6K3aGHkh 9C6N1sUGzwwu0SsZyHjDtGx7752Vu7lUecfaEqCOHOagNKL0vAz4ka9LoSoDOoEl2HZ1 x9ozBzIgFaItaZo7ExtLGt7oOGsY7rMwuunHogTVveioSeIkrw1J18pRXTW2Np68ora7 1qaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jGfMBgUq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si1668463otk.91.2020.01.29.12.20.07; Wed, 29 Jan 2020 12:20:19 -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; dkim=pass header.i=@kernel.org header.s=default header.b=jGfMBgUq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727458AbgA2T0D (ORCPT + 99 others); Wed, 29 Jan 2020 14:26:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:35222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726298AbgA2T0D (ORCPT ); Wed, 29 Jan 2020 14:26:03 -0500 Received: from paulmck-ThinkPad-P72.home (unknown [199.201.64.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2B80120661; Wed, 29 Jan 2020 19:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580325963; bh=Yl825t3iEZ9buUUQpy6DFrNLD2QXVg3+Vh95zXjA0YU=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=jGfMBgUqiwXEsv1joHMa8MKSKFPtqcwjn8dKeRt42hRj347g6r/6iUVVtrCDGp8jm ueQnutfF7uiJ22pzV2wrZGkmv+6IsJQ3/qHtLb2LjoyR2OB2B6Z0EuRzXnIrmwgFo+ 29p9L+TisDEIg31p+KXsqiWEac31vlGQVfo7ewpk= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id C3B9A3521AEF; Wed, 29 Jan 2020 11:26:02 -0800 (PST) Date: Wed, 29 Jan 2020 11:26:02 -0800 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Marco Elver , Qian Cai , Will Deacon , Ingo Molnar , Linux Kernel Mailing List , kasan-dev Subject: Re: [PATCH] locking/osq_lock: fix a data race in osq_wait_next Message-ID: <20200129192602.GA2935@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200122165938.GA16974@willie-the-truck> <20200122223851.GA45602@google.com> <20200123093905.GU14914@hirez.programming.kicks-ass.net> <20200128165655.GM14914@hirez.programming.kicks-ass.net> <20200129002253.GT2935@paulmck-ThinkPad-P72> <20200129184935.GU14879@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200129184935.GU14879@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 29, 2020 at 07:49:35PM +0100, Peter Zijlstra wrote: > On Tue, Jan 28, 2020 at 04:22:53PM -0800, Paul E. McKenney wrote: > > On Tue, Jan 28, 2020 at 05:56:55PM +0100, Peter Zijlstra wrote: > > > On Tue, Jan 28, 2020 at 12:46:26PM +0100, Marco Elver wrote: > > > > > > > > Marco, any thought on improving KCSAN for this to reduce the false > > > > > positives? > > > > > > > > Define 'false positive'. > > > > > > I'll use it where the code as written is correct while the tool > > > complains about it. > > > > I could be wrong, but I would guess that Marco is looking for something > > a little less subjective and a little more specific. ;-) > > How is that either? If any valid translation by a compile results in > correct functionality, yet the tool complains, then surely we can speak > of a objective fact. Marco covered my concern in his point about the need to change the compiler. In any case, agreed, if a read does nothing but feed into the old/new values for a CAS, the only thing a reasonable compiler (as opposed to a just-barely-meets-the-standard demonic compiler) can do to you is to decrease the CAS success rate. Thanx, Paul