Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp471767img; Tue, 26 Feb 2019 03:23:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IZXGCOrKng1XEmzTHnyXAiNJ+Ui9hVw3xHi3b2WoubSXWDnKf2HuLUCpExLL3ppWE0kA0vb X-Received: by 2002:a63:354a:: with SMTP id c71mr24262785pga.150.1551180183653; Tue, 26 Feb 2019 03:23:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551180183; cv=none; d=google.com; s=arc-20160816; b=klvcpRYC5qFTQJfkUTPQPmXgkCkO4uqdmt8QJnO/b098pn6PtNniqbQoZ+lBgccTmY Gu3KTHutfJonIgAa7AYnd1P0i5T5fb5koZyhe+PsEo0DEAM1SpgbOR8r1xU8mWlFH1Wy eF/K2VzNreJS2Htqw4nJB2GC9kpwv9zH7zIVVc6ZD23iP9XdiF+34bkQdw/Q3gurMxms NqkGFvfeSCX4mXc7lmFqXrZhyMyVioGkb0Ix9qjovZDhKBi+Z5Ym4GAucAq7UIGassY7 Fj7OgSMEW5uwTUNhXFU7h7Qjn93dl/g0kV8qtBMmI4jjtLNvFgx5rseXQu0I2LHgWJad 4hGw== 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=OeENYbOJS5f/atpeOUhAXqdh/4h//qbQmgWFDgpngQo=; b=0l6pp8HJ1n2xmkoEp1asIzQlsau5Zarsb33/PfXIOm2mwiS+0xW8QNOfnraBWF1VQy +rJzJ7mP1OV9x6qtXurrsYcTRNmGkJB+8rmjhsmF58TiEGW41UDpZlDw+X9GIoeLJboQ 1xE4/X+T0f6dgUyRqFY/G9nt7aMo+5xitO9pbof+yCoYDwsITWbpi2amrCJnimhy6vKz SguOuGF1nEqOIbkKCDSMaj0LXL7768+7jv+7RoM6k7+BS7RTnDAkp7jROOz7LSzBimmn qYpgjxxDb0lqxBj60jf+En0PxzkMn/803Mtt2ZfSItllu7dSjv5UZZ2WnrbQ8D2o5PnR 6aAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=W03q3A96; 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 q17si11802274pll.343.2019.02.26.03.22.48; Tue, 26 Feb 2019 03:23:03 -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=W03q3A96; 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 S1728483AbfBZLVo (ORCPT + 99 others); Tue, 26 Feb 2019 06:21:44 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:60712 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726115AbfBZLVo (ORCPT ); Tue, 26 Feb 2019 06:21:44 -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=OeENYbOJS5f/atpeOUhAXqdh/4h//qbQmgWFDgpngQo=; b=W03q3A96vJ9rU159Pk+LCW9Vd zp4/+RAkWqDFDLPPmiu8ERbN/xHU/U2SzQU9x0qgUz4xhlf+EYB2mNnor/8REV9VCimTMT8sCbiBp s17R5xVsDHz56ySZ+7ijxIwrnFECyvvsCMOAd7PnAYH2b4eIUWe8KLkh72bFj6LV6aOa25Eh//Uxb D9lyqeeQTLe2DRjDeWKmoBNlKPV3x8i2S2uJdUnzdhV2yPlTYAVxjnhlkQvXeUZjfv46wnWY6rsY/ jFQ4tdQTM8bSMiIzKpWQfRiJQfuY8HNyre90D5QhfW5iT9RLWj2sr33sgIO0aHHlTWHCf/FXd8WgI MFWFLG0/w==; 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 1gyano-0004Jv-7a; Tue, 26 Feb 2019 11:21:36 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C776820269AFC; Tue, 26 Feb 2019 12:21:33 +0100 (CET) Date: Tue, 26 Feb 2019 12:21:33 +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: <20190226112133.GG32534@hirez.programming.kicks-ass.net> References: <1550617057-4911-1-git-send-email-andrea.parri@amarulasolutions.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190226104551.GF32534@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 11:45:51AM +0100, Peter Zijlstra wrote: > On Tue, Feb 26, 2019 at 10:30:09AM +0100, Peter Zijlstra wrote: > > On Mon, Feb 25, 2019 at 09:55:17AM -0800, Paul E. McKenney wrote: > > > But if you know of any code in the Linux kernel that needs to compare > > > pointers, one of which might be in the process of being freed, please > > > do point me at it. > > > > I'm having the utmost difficulty of understanding why that would be a > > problem. It's just a value. Freeing memory does not affect the actual > > memory or any pointers to it. > > > > *confusion* > > > > None of this makes any kind of sense. > > I found and started to read: > > www.open-std.org/jtc1/sc22/wg14/www/docs/n2311.pdf > > and that's all massive bong-hits. That's utterly insane. > > Even the proposed semantics are crazy; they include UB and are therefore > broken on principle. But also; the provenance ID has words like: > "allocated storage duration", how is that well defined in the context of > concurrent execution? > > Also, isn't the kernel filled with inter-object pointer arithmetic? > > PNVI also looks like something that simply cannot work; how are we at > compile time supposed to know the active (concurrent modified) heap > layout. What is a 'live' object? 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; 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); } }