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