From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Subject: Re: [RFC PATCH] tools/memory-model: Remove (dep ; rfi) from ppo Date: Tue, 26 Feb 2019 07:39:57 -0800 Message-ID: <20190226153957.GN4072@linux.ibm.com> References: <20190225175517.GK4072@linux.ibm.com> <20190226093009.GS32477@hirez.programming.kicks-ass.net> <20190226104551.GF32534@hirez.programming.kicks-ass.net> <20190226112133.GG32534@hirez.programming.kicks-ass.net> <20190226112521.GH32534@hirez.programming.kicks-ass.net> <20190226113008.GI32534@hirez.programming.kicks-ass.net> <20190226113813.GA14753@zn.tnic> <20190226134906.GG32494@hirez.programming.kicks-ass.net> <20190226142845.GK4072@linux.ibm.com> <20190226144730.GV32477@hirez.programming.kicks-ass.net> Reply-To: paulmck@linux.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190226144730.GV32477@hirez.programming.kicks-ass.net> Sender: linux-kernel-owner@vger.kernel.org To: Peter Zijlstra Cc: Borislav Petkov , Andrea Parri , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Alan Stern , Will Deacon , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , Akira Yokosawa , Daniel Lustig List-Id: linux-arch.vger.kernel.org On Tue, Feb 26, 2019 at 03:47:30PM +0100, Peter Zijlstra wrote: > On Tue, Feb 26, 2019 at 06:28:45AM -0800, Paul E. McKenney wrote: > > I must confess to not being all that sympathetic to code that takes > > advantage of happenstance stack-frame layout. Is there some reason > > we need that? > > Not that I'm aware; but if it gets this 'obvious' case wrong, I worry > what else it gets wrong. > > At the very least we should get this fixed and compile a kernel with the > fixed compiler to see what (if anything) changes in the generated code > and analyse the changes (if any) to make sure we were ok (or not). > > I mean; yes that example is UB, but the result is also clearly batshit > insane. My understanding is that their goal is better analysis of pointer aliasing, and that this case is a side effect. Thanx, Paul From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44074 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726478AbfBZPkG (ORCPT ); Tue, 26 Feb 2019 10:40:06 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1QFOswq137807 for ; Tue, 26 Feb 2019 10:40:04 -0500 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0a-001b2d01.pphosted.com with ESMTP id 2qw6bb85x6-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 26 Feb 2019 10:40:04 -0500 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 26 Feb 2019 15:40:03 -0000 Date: Tue, 26 Feb 2019 07:39:57 -0800 From: "Paul E. McKenney" Subject: Re: [RFC PATCH] tools/memory-model: Remove (dep ; rfi) from ppo Reply-To: paulmck@linux.ibm.com References: <20190225175517.GK4072@linux.ibm.com> <20190226093009.GS32477@hirez.programming.kicks-ass.net> <20190226104551.GF32534@hirez.programming.kicks-ass.net> <20190226112133.GG32534@hirez.programming.kicks-ass.net> <20190226112521.GH32534@hirez.programming.kicks-ass.net> <20190226113008.GI32534@hirez.programming.kicks-ass.net> <20190226113813.GA14753@zn.tnic> <20190226134906.GG32494@hirez.programming.kicks-ass.net> <20190226142845.GK4072@linux.ibm.com> <20190226144730.GV32477@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190226144730.GV32477@hirez.programming.kicks-ass.net> Message-ID: <20190226153957.GN4072@linux.ibm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Peter Zijlstra Cc: Borislav Petkov , Andrea Parri , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Alan Stern , Will Deacon , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , Akira Yokosawa , Daniel Lustig Message-ID: <20190226153957.5LXiPyNHV3pHqKDGjp8oKi_7mLEfurnx8NGYLI3xksE@z> On Tue, Feb 26, 2019 at 03:47:30PM +0100, Peter Zijlstra wrote: > On Tue, Feb 26, 2019 at 06:28:45AM -0800, Paul E. McKenney wrote: > > I must confess to not being all that sympathetic to code that takes > > advantage of happenstance stack-frame layout. Is there some reason > > we need that? > > Not that I'm aware; but if it gets this 'obvious' case wrong, I worry > what else it gets wrong. > > At the very least we should get this fixed and compile a kernel with the > fixed compiler to see what (if anything) changes in the generated code > and analyse the changes (if any) to make sure we were ok (or not). > > I mean; yes that example is UB, but the result is also clearly batshit > insane. My understanding is that their goal is better analysis of pointer aliasing, and that this case is a side effect. Thanx, Paul