Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp296263imu; Mon, 26 Nov 2018 11:02:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/W/KIcdWKkewUpZo+6bhtAmVLV/0UwpKoBwSrmnq352g58V4A7XOHSS8i8WYF/gaC1bQttt X-Received: by 2002:a63:94:: with SMTP id 142mr25529423pga.74.1543258933232; Mon, 26 Nov 2018 11:02:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543258933; cv=none; d=google.com; s=arc-20160816; b=QNiEYWN1lcAk6AfsQiPHyQrSBfKPgEHe6wx/obZqcFKRyGdNVpnCB+NeuSOvex5jyl QsgVqZi3nM0RwjRpMqqHxULAxNS2vuIpvIYG/JMP6wADgdjsJTgP9+lTiiw11YuY4rzX 8mPzW9/NdeERxnY97gGbyAVP8LZo87rtlXkrq2Gsn0ZAg8FQv05zQ0JdEevLGaMa2k84 0kuEwYf40FXdpkI7peonO2ha6E+x62ACOZHZoX/lZTCEuhF7AtmZnuHIQ8QSy/jah/kM wDL/St2j+QFoKX1nVuhWzQVY2IK8hQpkHfS1ZuvtjAy+N6WwRlvzUL92GdAKDJP56cgJ omtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date; bh=G64qH+u2CeYj7CVxoLpzQjeRRUfLSXoX2onu3Fd0dD4=; b=cxT32xnP7A8iQ55yeVWnMdTcT/f3NzAGLtL+oNoXFepIepphB4Rz3/QRjbTx81JZ7o Trsf2sexqQJrNAp4sRXU6QOJzg6rkIxKoj5buIePR+GCXcZqLYR0LchfScKEtYhkobMg Zv636zkFcWfkvX45zWaiHe7REu/YDv9NuaAzajEs+XjMKqo7el1Trhqko3ShdsCdgewY PdZinsBr7/8kwsVxxHP0WfsPVVOgi4ITcV3ngUeT+I7sBvQD9ObWoxT1CKromKYSaRFr fvhDXEFe3/GUx6spPOOGDSqjGDq/2j40Bicxf+UxvZ2si4uwluXuao7fnbjaBA5EyaW2 oLQg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si1071999pgn.145.2018.11.26.11.01.28; Mon, 26 Nov 2018 11:02:13 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726743AbeK0Fzj (ORCPT + 99 others); Tue, 27 Nov 2018 00:55:39 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:23301 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbeK0Fzi (ORCPT ); Tue, 27 Nov 2018 00:55:38 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAQIwmEG141021 for ; Mon, 26 Nov 2018 14:00:36 -0500 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p0mpuw13y-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 26 Nov 2018 14:00:36 -0500 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 26 Nov 2018 19:00:32 -0000 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 26 Nov 2018 19:00:26 -0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAQJ0PU915794188 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 26 Nov 2018 19:00:25 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0E082B2064; Mon, 26 Nov 2018 19:00:25 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D0E41B2066; Mon, 26 Nov 2018 19:00:24 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.38]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 26 Nov 2018 19:00:24 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 7597316C342C; Mon, 26 Nov 2018 11:00:27 -0800 (PST) Date: Mon, 26 Nov 2018 11:00:27 -0800 From: "Paul E. McKenney" To: Ran Rozenstein Cc: Joel Fernandes , "linux-kernel@vger.kernel.org" , "mingo@kernel.org" , "jiangshanlai@gmail.com" , "dipankar@in.ibm.com" , "akpm@linux-foundation.org" , "mathieu.desnoyers@efficios.com" , "josh@joshtriplett.org" , "tglx@linutronix.de" , "peterz@infradead.org" , "rostedt@goodmis.org" , "dhowells@redhat.com" , "edumazet@google.com" , "fweisbec@gmail.com" , "oleg@redhat.com" , Maor Gottlieb , Tariq Toukan , Eran Ben Elisha , Leon Romanovsky Subject: Re: [PATCH tip/core/rcu 02/19] rcu: Defer reporting RCU-preempt quiescent states when disabled Reply-To: paulmck@linux.ibm.com References: <20180829222021.GA29944@linux.vnet.ibm.com> <20180829222047.319-2-paulmck@linux.vnet.ibm.com> <20181029142735.GZ4170@linux.ibm.com> <20181030034452.GA224709@google.com> <20181030125800.GE4170@linux.ibm.com> <20181030222123.GB44036@joelaf.mtv.corp.google.com> <20181031182259.GH4170@linux.ibm.com> <20181102194356.GA8378@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18112619-2213-0000-0000-0000031FA716 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010125; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01123136; UDB=6.00583023; IPR=6.00903266; MB=3.00024340; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-26 19:00:30 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112619-2214-0000-0000-00005C6466AE Message-Id: <20181126190027.GH4170@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-26_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811260163 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 26, 2018 at 01:55:37PM +0000, Ran Rozenstein wrote: > > > > Hearing no objections, here is the updated patch. > > > > Thanx, Paul > > > > ------------------------------------------------------------------------ > > > > commit 970cab5d3d206029ed27274a98ea1c3d7e780e53 > > Author: Paul E. McKenney > > Date: Mon Oct 29 07:36:50 2018 -0700 > > > > rcu: Avoid signed integer overflow in rcu_preempt_deferred_qs() > > > > Subtracting INT_MIN can be interpreted as unconditional signed integer > > overflow, which according to the C standard is undefined behavior. > > Therefore, kernel build arguments notwithstanding, it would be good to > > future-proof the code. This commit therefore substitutes INT_MAX for > > INT_MIN in order to avoid undefined behavior. > > > > While in the neighborhood, this commit also creates some meaningful > > names > > for INT_MAX and friends in order to improve readability, as suggested > > by Joel Fernandes. > > > > Reported-by: Ran Rozenstein > > Signed-off-by: Paul E. McKenney > > > > squash! rcu: Avoid signed integer overflow in rcu_preempt_deferred_qs() > > > > While in the neighborhood, use macros to give meaningful names. > > > > Signed-off-by: Paul E. McKenney > > Hi, > > What is the acceptance status of this patch? It is queued in -rcu. If no problems arise beforehand, I intend to submit it as part of a pull request into -tip, which (again if no problems arise) be pulled into mainline during the next merge window. Oddly enough, a couple of weeks ago the C++ Standards Committee voted in a proposal for C++20 removing undefined behavior for signed integer overflow. This is C++ rather than C, and C must support additional hardware that wouldn't much like forcing twos complement for signed integer overflow. But still... ;-) Thanx, Paul