Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp564321ybt; Mon, 6 Jul 2020 16:44:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyodlYjgwt1au25bnHgPJMKYKH6MqVNNF/Y4EQ/B04uhlw0dM0suYLT+LjhLAGdo8xc8PU X-Received: by 2002:aa7:c583:: with SMTP id g3mr59564307edq.228.1594079064729; Mon, 06 Jul 2020 16:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594079064; cv=none; d=google.com; s=arc-20160816; b=CJXI+ils78mfPgMF5HaEiZPjwu/fks0ipPMxw+YhoKL8e1tzFAqKV/Th4VGJ6BTyki 1kFSc6f9b2BO0uwXzri6h1x9eQg7uR3HAPuaEGRzp3oMhV3FHa5jajurgvcjCydqMUYn Ug521ifcBGp67VxeI5rhrixOVH1EyM2CBmyKKIy5k3Y9JtfCq6VizTT36ZvKMe0uW60D 2vSaq4x43qNU5zQH+aZY+vpsaY3LQsHu/FB5SK6cXjuuUdNDO0+eu2mzaFuG5h+6EPaF w7SQRitg0gcFJUcuyHLfB7JihHnUIA3D42YNDYzbRfSF0+tbRr4N3miy1+IYAYRNoTyl dtPA== 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:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=Dhub6XbyioZ4Zjt+sCpQYvmyOI8hwv58/acHXCh1GqU=; b=ra8nuSut1O1OWN7tEtHXk4pExMns2x9wjajXi4umfStCrRX17H+4NGPLdSA6N1zBMW CrBEmyOKJhdawVrIb5+eE1TUyCpa6cAHbSISSyFNP5xoehcW7wT4A1jPjZbbI5rcjyy8 428MHaa6cwsNEY+Pcz6G0WlXhxxVFIJLeWwa+N5XY6GKLMqVN4qpp8Q2FQJVFOh6TCyl ghawn+orzKpTbdCbmRjq9YG+T3kPzvdIX9Z58s54SqEwE0lJJLs7BHhppiMkHq34MVG6 q5trooyZgCsz/rhrrVgDyswgrgkc9SQ+0w7pScu+LEn6/PBqZ/O7iBqnFY1AEQyLl1rM wPvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kH6JpuxO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c25si13973385edw.141.2020.07.06.16.44.02; Mon, 06 Jul 2020 16:44:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kH6JpuxO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727869AbgGFXli (ORCPT + 99 others); Mon, 6 Jul 2020 19:41:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:37638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726280AbgGFXlh (ORCPT ); Mon, 6 Jul 2020 19:41:37 -0400 Received: from paulmck-ThinkPad-P72.home (50-39-111-31.bvtn.or.frontiernet.net [50.39.111.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1A9A620720; Mon, 6 Jul 2020 23:41:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594078897; bh=yuEVLSFWzFuIU16JSRCjoy4DCC3vZQD9mtnpRVx+k3Q=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=kH6JpuxO4VcDqDcyojdQfYGTHKg4PNOiHrbQiENKeoPSy0ZVSRSUp36IctVlrxCfg Py5tnQ3aqNWzAsUWq7cSTJZ9xs4GrC7bOF7ScnS6uyF1RxsPRZrbPsF6yIEB4yWmBX Q00WDW1a9kdhgxJoHkm8GLzgTCfs57TBHtdBC46w= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id F16FE3522637; Mon, 6 Jul 2020 16:41:36 -0700 (PDT) Date: Mon, 6 Jul 2020 16:41:36 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Marco Elver , Nick Desaulniers , Sami Tolvanen , Masahiro Yamada , Will Deacon , Greg Kroah-Hartman , Kees Cook , clang-built-linux , Kernel Hardening , linux-arch , Linux ARM , Linux Kbuild mailing list , LKML , linux-pci@vger.kernel.org, "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH 00/22] add support for Clang LTO Message-ID: <20200706234136.GS9247@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200701150512.GH4817@hirez.programming.kicks-ass.net> <20200701160338.GN9247@paulmck-ThinkPad-P72> <20200702082040.GB4781@hirez.programming.kicks-ass.net> <20200702175948.GV9247@paulmck-ThinkPad-P72> <20200703131330.GX4800@hirez.programming.kicks-ass.net> <20200703144228.GF9247@paulmck-ThinkPad-P72> <20200706162633.GA13288@paulmck-ThinkPad-P72> <20200706182926.GH4800@hirez.programming.kicks-ass.net> <20200706183933.GE9247@paulmck-ThinkPad-P72> <20200706194012.GA5523@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200706194012.GA5523@worktop.programming.kicks-ass.net> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 06, 2020 at 09:40:12PM +0200, Peter Zijlstra wrote: > On Mon, Jul 06, 2020 at 11:39:33AM -0700, Paul E. McKenney wrote: > > On Mon, Jul 06, 2020 at 08:29:26PM +0200, Peter Zijlstra wrote: > > > On Mon, Jul 06, 2020 at 09:26:33AM -0700, Paul E. McKenney wrote: > > > > If they do not consider their Linux OS running correctly :-) > > > > Many of them really do not care at all. In fact, some would consider > > Linux failing to run as an added bonus. > > This I think is why we have compiler people in the thread that care a > lot more. Here is hoping! ;-) > > > > Nevertheless, yes, control dependencies also need attention. > > > > > > Today I added one more \o/ > > > > Just make sure you continually check to make sure that compilers > > don't break it, along with the others you have added. ;-) > > There's: > > kernel/locking/mcs_spinlock.h: smp_cond_load_acquire(l, VAL); \ > kernel/sched/core.c: smp_cond_load_acquire(&p->on_cpu, !VAL); > kernel/smp.c: smp_cond_load_acquire(&csd->node.u_flags, !(VAL & CSD_FLAG_LOCK)); > > arch/x86/kernel/alternative.c: atomic_cond_read_acquire(&desc.refs, !VAL); > kernel/locking/qrwlock.c: atomic_cond_read_acquire(&lock->cnts, !(VAL & _QW_LOCKED)); > kernel/locking/qrwlock.c: atomic_cond_read_acquire(&lock->cnts, !(VAL & _QW_LOCKED)); > kernel/locking/qrwlock.c: atomic_cond_read_acquire(&lock->cnts, VAL == _QW_WAITING); > kernel/locking/qspinlock.c: atomic_cond_read_acquire(&lock->val, !(VAL & _Q_LOCKED_MASK)); > kernel/locking/qspinlock.c: val = atomic_cond_read_acquire(&lock->val, !(VAL & _Q_LOCKED_PENDING_MASK)); > > include/linux/refcount.h: smp_acquire__after_ctrl_dep(); > ipc/mqueue.c: smp_acquire__after_ctrl_dep(); > ipc/msg.c: smp_acquire__after_ctrl_dep(); > ipc/sem.c: smp_acquire__after_ctrl_dep(); > kernel/locking/rwsem.c: smp_acquire__after_ctrl_dep(); > kernel/sched/core.c: smp_acquire__after_ctrl_dep(); > > kernel/events/ring_buffer.c:__perf_output_begin() > > And I'm fairly sure I'm forgetting some... One could argue there's too > many of them to check already. > > Both GCC and CLANG had better think about it. That would be good! I won't list the number of address/data dependencies given that there are well over a thousand of them. Thanx, Paul