Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp476085img; Tue, 26 Feb 2019 03:27:44 -0800 (PST) X-Google-Smtp-Source: AHgI3IbW5VryscsBo7KlejCyig/W0D0wZW9Bq42u0NfvfD4EsBwXiMlaajqxzU1XuW0FowO6yhNw X-Received: by 2002:a65:64d5:: with SMTP id t21mr2414535pgv.266.1551180464656; Tue, 26 Feb 2019 03:27:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551180464; cv=none; d=google.com; s=arc-20160816; b=ZeN2us8hQo5U7bPGH/BSJL5/Yx4dDc5qO54GbcwKoYvk25N9wWO1r2maEyHvNjBsVE xzG1bAXQ8c8P0LoRj4KnSyaobQXkUU2j7cQJ8fyq2IPWYM+hKUv4d1sDte4YdkGeLxZI x1VpvfQKoNZP30K3stXEVWduZ7BUbYFCElZ+EPj6JIS1+2WppPq9dWIrdR20MpRpUwCH U7heaJTp4UhSxRri2qbVfXYeUpygRMyR+JSscNVXzIArctVFFl+SEavFjH67WxK+11e7 VW4KmRQH9BXqcDF641izOrGlfpet8D49ApPpthmrFJgNccGQLy3Z+PqymKZbEx8izmRf A0dA== 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=qLZDyuxEqHHZxgWif0G+gtirBnXXdyU1+gqVsC36lHE=; b=DCjEWu7RNWztP4THeRcF3Swhheuipaiam1p2RCfetR7BKlUJf2t1QrbvnfzPdeQRYY IwmygPC6fFmRA6FvOgLXLPaK7oEwzVZnRAb0mvsZDKgAMDDTrGRGb3ZO30jWkeDGeeLi 0u++xpv37epsicbYn4iithGB6if+YdHhCoe5hPLiT6Knb8A6QBOzrD59ugboN1lRwHvn t+qnegnYU6fF+D9Mzdt/KrgWhMmLFY/U8uWJ3IMTdHsNoM8M25rs1WPSrjgz+eXJML+n 9viku9T1Pp+fpwr0asB6rUzLvUH8hBqbUAQODBbZod2qASG5bW/MK+yeZ4/xZWOBx3DN 9pvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=RWUgnebv; 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 f7si8144279pgo.569.2019.02.26.03.27.28; Tue, 26 Feb 2019 03:27:44 -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=merlin.20170209 header.b=RWUgnebv; 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 S1727845AbfBZLZk (ORCPT + 99 others); Tue, 26 Feb 2019 06:25:40 -0500 Received: from merlin.infradead.org ([205.233.59.134]:50238 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726240AbfBZLZj (ORCPT ); Tue, 26 Feb 2019 06:25:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=qLZDyuxEqHHZxgWif0G+gtirBnXXdyU1+gqVsC36lHE=; b=RWUgnebv7xFFCnS/jfw+vyjei kCtJlT1dwh8hPZylVMJOK9dHZmMdr30glrp2VaxLrzKbnB7lGWN9E8SuJ4Zs8gFTBepvxDD1tAwzQ hkjwqrWsZxRE9fqnQOJr1TYcKTa2SBUcVaJPU1umco+wj7nANMyjtQuu/zFTGaOeS8YV0nX7WVa+9 3G6s2rKIKQJ1ZGR2lmC1l01hpWQWLUP1xYLLgSrHFxJ43tuzJoBveILmmXfrHjYzow4RJdAzsdlTb yccXRXiT6SetUPXRkknY9BkUiNLzYGcci47QwwSIwqWZc4fuCZRGrgOCNSKnBn4lfEW5i9uDs5w9U fPLZtMGXg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gyarT-00057q-FS; Tue, 26 Feb 2019 11:25:23 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 01E9B20269AFC; Tue, 26 Feb 2019 12:25:21 +0100 (CET) Date: Tue, 26 Feb 2019 12:25:21 +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: <20190226112521.GH32534@hirez.programming.kicks-ass.net> References: <20190220020117.GD11787@linux.ibm.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190226112133.GG32534@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: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. > 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); > } > }