Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp479113img; Tue, 26 Feb 2019 03:31:07 -0800 (PST) X-Google-Smtp-Source: AHgI3IY8KijV+5Pjxzdje+NABwknFWZnavO5ZF/yMgaeY40jYBppU8W79QR8PIPBZ1KOJE+8Jgmx X-Received: by 2002:a17:902:a508:: with SMTP id s8mr24736842plq.275.1551180667055; Tue, 26 Feb 2019 03:31:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551180667; cv=none; d=google.com; s=arc-20160816; b=EM6/wv9MK/dPahMWAWyt8VEih3iElvJFzq0K4krT0g+bZ1Gi1Jb6fs3h6YvR50iToV SXn/Vidm6tzaGfBJTB5L0PonME9iMQmFfQfIVZPqA58IzUDfBZvRL7oZdu0uEdRXkM0/ P2QVIAfwS1vwy1ikMQ9Z8K59j060PuophXEDTGnH9AorZSSbByzA5LBYWniMfROp1wal nM3NSyqjw0pKoi6wIf+KTm5cQJ5NhkvZRfm0aIZX7XKNqsHo0IEeAwrCkQtDyAxOY947 MIoXtmjTaXJl5TU4GeplNRxCVGZIXgSA1QNcW8J30FlrlaurUxIJ+XTmIDcCmrXNz8aX dQeA== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=jp15CbZEciO3m/0WvVWv7QR8Lj8BP3FD6sOHwW4m1MU=; b=UAB4b9bLsY4WFZNX+yCh84lOl8BpV/6bKYlildVTWK7z3G/hrcvTQJ8Sr8bngMWpeb 8aYFyzy99TVsSt1CAkr+dYX1lB69E8vK1GF0pGxLX8128DXNb/9J9/HxeSpAwefpz6Hs gyTEdRv/0EVxk+JHetekk0DVrYLcwPwMjEi1/hz9UXKJQ+kzDjipwiKw5Y4M5BD4oBUh o5f96cuIyeMwapXMukGIdaeATd5CLFN6meudMW/kO2OEKDDF0OFncQ/hgiOutlzXiYFo cGvFZqMEAJJNkSXimNW5+F0aG6YmH0JpMZkJETWTlB4+wxUZmvmQRBezd5rrUUN7Lfog nY/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=CkuYtFbL; 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 e2si11741123pgs.387.2019.02.26.03.30.51; Tue, 26 Feb 2019 03:31:07 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=CkuYtFbL; 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 S1726397AbfBZLaS (ORCPT + 99 others); Tue, 26 Feb 2019 06:30:18 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:35970 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726018AbfBZLaS (ORCPT ); Tue, 26 Feb 2019 06:30:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jp15CbZEciO3m/0WvVWv7QR8Lj8BP3FD6sOHwW4m1MU=; b=CkuYtFbLR3wImMTD0DgVKIT5o kVHMRTCjk+OUvnvF5Nwa+NEom/jFfiBuEsru+yUHZZyujN4XbTIUurBLGvXFjvVnatmcJie3niJ9n k2Y012kt7DxqHfF/Bu6n+A+hATlv8X8VfxX61mDdlgBwZlb2aj0UqDIv/iFxg8scAR/YwmkC9v3qn 5ZICWK9EjEXA12hG4w11dFN8xPx4cLp7Zmnp0/grmXDiXAqwas2v2QFZG5ZwuSCVZa75wrBbg7Oym rzTTvnjReZHS7pzc3y3VT6mqsSOfWXiR1UIzwYwCjO8o0/ObFKhJnEr920uDBsn9M+YZQBzM00v92 MSLekDeXg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gyaw5-0007mB-Pv; Tue, 26 Feb 2019 11:30:09 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 25ADE20269AFC; Tue, 26 Feb 2019 12:30:08 +0100 (CET) Date: Tue, 26 Feb 2019 12:30:08 +0100 From: Peter Zijlstra To: "Paul E. McKenney" Cc: 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 Subject: Re: [RFC PATCH] tools/memory-model: Remove (dep ; rfi) from ppo Message-ID: <20190226113008.GI32534@hirez.programming.kicks-ass.net> References: <20190220092604.GD32494@hirez.programming.kicks-ass.net> <20190220131456.GA3215@andrea> <20190220132714.GI32494@hirez.programming.kicks-ass.net> <20190222112128.GA7213@andrea> <20190222130014.GY32494@hirez.programming.kicks-ass.net> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190226112521.GH32534@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 26, 2019 at 12:25:21PM +0100, Peter Zijlstra wrote: > On Tue, Feb 26, 2019 at 12:21:33PM +0100, Peter Zijlstra wrote: > > > Also; we need to find a GCC person to find/give us a knob to kill this > > entire class of nonsense. This is just horrible broken shit: > > > > > > ~/tmp# gcc -O2 -fno-strict-aliasing -o ptr ptr.c ; ./ptr > > p=0x5635dd3d5034 q=0x5635dd3d5034 > > x=1 y=2 *p=11 *q=2 > > ~/tmp# cat ptr.c > > #include > > #include > > int y = 2, x = 1; > > int main (int argc, char **argv) { > > int *p = &x + argc; > > damn; wrong version; that should've been: s/argc/1/ > same result though. Note that gcc (as used above) was: gcc (Debian 7.3.0-3) 7.3.0 When I used the argc variant, gcc-8 'works', but with s/argc/1/ it is still broken. gcc-8 (Debian 8.2.0-21) 8.2.0 gcc (Debian 7.3.0-3) 7.3.0 gcc-6 (Debian 6.4.0-12) 6.4.0 20180123 gcc-5 (Debian 5.5.0-8) 5.5.0 20171010 gcc-4.6 (Debian 4.6.3-14) 4.6.3 all generate the exact same broken crap with the '+ 1' variant. > > int *q = &y; > > printf("p=%p q=%p\n", p, q); > > if (!memcmp(&p, &q, sizeof(p))) { > > *p = 11; > > printf("x=%d y=%d *p=%d *q=%d\n", x, y, *p, *q); > > } > > }