Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5012853ybv; Wed, 26 Feb 2020 06:59:09 -0800 (PST) X-Google-Smtp-Source: APXvYqy1ObyeMjSGCLHC1vsjP1tKdYh1Qp7TZHHmTN86cZc77LzTO6Tc643tilHfhoHXBJ68ZbFT X-Received: by 2002:aca:a810:: with SMTP id r16mr3403267oie.116.1582729149796; Wed, 26 Feb 2020 06:59:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582729149; cv=none; d=google.com; s=arc-20160816; b=tGpMne3euxIllmWYhcJS593BC4csGuImplJ/XnPo1TmxQ4E1ZZhVPCDJPBVkP2tStD 8M/s/JBa+v9FZV5Py51czEM1TSU++HFqvs45ghNzc3cfWmcIwTpWQhyefS+U3nFHHMCK DVGPG4W7GPhp7Q3dD4lWPkl7dngmnMoQryAhpu51sX3Ptd7oc8VwuDyLYLnVDmBJlmta cUUHXRPCfEllnfdodBnDcF0j+4MyG+59Jvs6sdUEeWp9xzm45Dd5AaiBsecJPNUJV3XG sVpZ3VcsNvPzZq8Omp1Nl7BYDkv4YLPjtVz84aRs4zp1PYidvMUszd9uLFJkeFsoJTmK Fk/A== 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=zaYGYELMslMmJD1woQ417nsbBErxD4wNHFyUs7gp9ls=; b=IlWF522fvIO83uJJb8Gy3ISkQMbOBzQLBJhYrRuJ+Tw8j4aoQ5a0banbpNIKXjpRCu iyqd344yDz5L6deatC/M+eS1BD6JF2idyc9aSy4Tobv26r8oXNsogP/4UzbAB92kuZHr Slh0S/JbJNTDfTfb5b9CrcIkyfsmqKDNF//XPFGwjZVpZQQR4DB4mRET3w7Oy4uh2Jhw WQz/fRzO3eMoq7ymLJ5+F/ra/OmQFXnUfRhs4lJxjsB2hGCjUJE3rvcXKcR0Z1JPDr/A 3Y8MFFQtzTGFfRDx1oZMh/JXGJEG/W59hZmREbGknLXxECYMuxsVH2ZhOn9Gc/4fkh5D H6+g== 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 g26si1374502otn.180.2020.02.26.06.58.58; Wed, 26 Feb 2020 06:59:09 -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 S1727299AbgBZO6N (ORCPT + 99 others); Wed, 26 Feb 2020 09:58:13 -0500 Received: from netrider.rowland.org ([192.131.102.5]:45985 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726926AbgBZO6N (ORCPT ); Wed, 26 Feb 2020 09:58:13 -0500 Received: (qmail 5669 invoked by uid 500); 26 Feb 2020 09:58:12 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 26 Feb 2020 09:58:12 -0500 Date: Wed, 26 Feb 2020 09:58:12 -0500 (EST) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Boqun Feng cc: linux-kernel@vger.kernel.org, , Andrea Parri , Will Deacon , Peter Zijlstra , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Subject: Re: [PATCH] tools/memory-model: Remove lock-final checking in lock.cat In-Reply-To: <20200226032142.89424-1-boqun.feng@gmail.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, 26 Feb 2020, Boqun Feng wrote: > In commit 30b795df11a1 ("tools/memory-model: Improve mixed-access > checking in lock.cat"), we have added the checking to disallow any > normal memory access to lock variables, and this checking is stronger > than lock-final. So remove the lock-final checking as it's unnecessary > now. I don't understand this description. Why do you say that the normal-access checking is stronger than the lock-final check? > Signed-off-by: Boqun Feng > --- > tools/memory-model/lock.cat | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/tools/memory-model/lock.cat b/tools/memory-model/lock.cat > index 6b52f365d73a..827a3646607c 100644 > --- a/tools/memory-model/lock.cat > +++ b/tools/memory-model/lock.cat > @@ -54,9 +54,6 @@ flag ~empty LKR \ domain(lk-rmw) as unpaired-LKR > *) > empty ([LKW] ; po-loc ; [LKR]) \ (po-loc ; [UL] ; po-loc) as lock-nest > > -(* The final value of a spinlock should not be tested *) > -flag ~empty [FW] ; loc ; [ALL-LOCKS] as lock-final > - > (* > * Put lock operations in their appropriate classes, but leave UL out of W > * until after the co relation has been generated. With this check removed, what will prevent people from writing litmus tests like this? C test { spinlock_t s; } ... exists (s=0) Alan