Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp423612ybt; Mon, 6 Jul 2020 12:41:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX31b5k4vapmhbhdkSF2yBKjvj3plsda1DymkxdrZOPLC4budJYpyjq3B+W7aTIKvnbmGj X-Received: by 2002:a17:906:648f:: with SMTP id e15mr43206185ejm.99.1594064469781; Mon, 06 Jul 2020 12:41:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594064469; cv=none; d=google.com; s=arc-20160816; b=PFko10duuzJBkaKA/u+0V9aFok2NNddaRZieE9BPKIW+dS0gKo0S6yNeVlE2s0p959 J1n6D7AcPUR2vIp76y16qwuwyheTdmY0R/kckM23h/GR78Nm69Aac/u71eo2lpLgnkLC DZ59TrlJnFtx5sUcB7WjO76pZSqlXB7znwR4TCofpQTAoOjn0LMWvn/urGaIR99xiwVF GhSsEDjAOUc8Hk9IXTVeQmFsPoH1wqIzz9Xw5Fm5bpsY3NUDY/FPKQ3aP2GYWaWFs51e Bu9bbMP0XW59QW7MphlGffakMiu5udtle7U1i2GHMPQ2/9lCBQFe4YzrCmloOaqk0Pyh p9pw== 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=Fga2epNTXBelXbYkbTxROQdchUloEASZKoCcJ/iKrWw=; b=JgxO4uZWn9D740bU7MXkmkr+KTvTFQAZskniE5S6ZNoGlr7HpvFkMp9O52UBE7j+LD bxd2WpR2NPzeWYXrgagObzJstpSN/fRUsT7/FQqJqxECUI2qkNwdXPWqpZoVMr/6vftG E3tJ58w+e24R1CPw7OCYtoudDG10jPf0uvXXKXUPpCYsBhWekfmbb5u0JegAVaB7LCDF I5NWqXKgaiU82fRTZyCkMWFcAJKrmyeb/YkWVgSufJwiwkWfPTHgPoRzvbdCWNbiPEaK KbzE2n5jq9VYj7dnELoNaVcCGemQuVZxLcLVKSSXEp9Q0kn9ddbFSdargkblugiE7Hl8 714w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=BeTQRyoG; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lw21si13612555ejb.302.2020.07.06.12.40.46; Mon, 06 Jul 2020 12:41:09 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=BeTQRyoG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726758AbgGFTkZ (ORCPT + 99 others); Mon, 6 Jul 2020 15:40:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgGFTkZ (ORCPT ); Mon, 6 Jul 2020 15:40:25 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E687C061755; Mon, 6 Jul 2020 12:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=Fga2epNTXBelXbYkbTxROQdchUloEASZKoCcJ/iKrWw=; b=BeTQRyoGVX7klkBfy71IhIii42 JLJVPvYdGVws5AyPO2wATPQh812LcOHjFg8RqbL8QgCaxHK+B103YXboryKFzbnforwfw09tNatE9 Ijvwo8PiAqBc+pqw5sDe87w5LOI2SYN6KwrLb1mF4UNVYiAxzyYRJj/nUVEy5N9Th6O/tYCF8VpZV yC2XlC+u2k195dE9l9ZVM2DO+equSQoon5zhP1iEjupkjTXqD4be/tJ9YsR2I1ClBCDJd+yYpIZXF Q6+cIuj+PAzHD6t30ZZbYPyuTxPG3nfJprRPcGf3KxUTK93dlpHy3vdg6mTpTVbfsaduXM8c65F50 6jIUEBlQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsWyN-0001u4-QE; Mon, 06 Jul 2020 19:40:16 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id D9A28980DD2; Mon, 6 Jul 2020 21:40:12 +0200 (CEST) Date: Mon, 6 Jul 2020 21:40:12 +0200 From: Peter Zijlstra To: "Paul E. McKenney" 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: <20200706194012.GA5523@worktop.programming.kicks-ass.net> References: <20200701140654.GL9247@paulmck-ThinkPad-P72> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200706183933.GE9247@paulmck-ThinkPad-P72> 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 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. > > > 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.