Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1659839pxa; Thu, 20 Aug 2020 17:42:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfoyN1FF8ywkTNunprpxmNV1Wehyy2ek5OB9WQ4/t4jPMSB6080+cHpb+fezeerWVeSipg X-Received: by 2002:a17:906:5383:: with SMTP id g3mr539072ejo.370.1597970537275; Thu, 20 Aug 2020 17:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597970537; cv=none; d=google.com; s=arc-20160816; b=B4I+dqwAZz8WiCcB7CPcrMS704jpxor0KJh0GRKyDIl94W/xVuJYWZiqwy7VBgVXNU G7aMmERHS8e6IE3rrBJEqwutAk1LErtdHSMBjj60F23s9cPRDIH73kbWxSbhKvntA+NR G45G1IVZJektXRVNCk1v40gS60b+su5UpKxjWsn3KvSoAOabWpqym+0WfaG203Xner/K IebsTbbgbtlQK8p1PxCuyFjt9lL1Mb6RAooywAXN1TNEmcYFb7Uda172mCQNxEtm1cyj xg6M0bMAs33LSHvkNaw/bbuVEzwu50hYt4DIG/TV4AzH5wt62w2d2mETI9E+Qi8iTaMU ucvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=GRUgKcuRN8v1rgG8LJcASrlT3NFsgPKqmdOa0BdAnwU=; b=wkFk8Jbmo1VjNA71Ah9ZKi49UiPDEvmvhxEAGaoIgK27jtwU/C3YLmIgOcQK+GX5+u Xe1tQMeMvvJfC+MmxQaZ+7sQkudUgLYbCoP2HNrJpnr+F37NBAV0S3/uiWgi5ryp8dm7 QO1zISYJyvs+Zg7NRJJkhCNFh91znO6raXCSLKrYk4DaJwVpsKAN5VUMv6ITAagkVQS/ bq1CyOViyLMfvOhbx3d5LVlX8yFNnjXPl2F74NF9w18ChvFLDKxxgJKDt3KZk58dw4GE +wXAXTXqswlrITWZSAJNZzd7H+prPeLVcPq2xrWL0+8Vr4GZmsfVUBBTT5C0DKHLiqxt GiDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cGFoHPFj; dkim=neutral (no key) header.i=@linutronix.de header.b="t4gBM/DW"; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s21si85684ejx.227.2020.08.20.17.41.54; Thu, 20 Aug 2020 17:42:17 -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=@linutronix.de header.s=2020 header.b=cGFoHPFj; dkim=neutral (no key) header.i=@linutronix.de header.b="t4gBM/DW"; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726872AbgHUAhv (ORCPT + 99 others); Thu, 20 Aug 2020 20:37:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726868AbgHUAhu (ORCPT ); Thu, 20 Aug 2020 20:37:50 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94776C061385 for ; Thu, 20 Aug 2020 17:37:50 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1597970269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GRUgKcuRN8v1rgG8LJcASrlT3NFsgPKqmdOa0BdAnwU=; b=cGFoHPFj92uODRSX/MEXULlkNMAm1AmYWbdPKF4s0zwciS1yQWuWYwSHkoEYqvjaO4Ad4I ztoX+2Q94CW3h5wE5qrRYVtAkcVS5mMfrTA6XTrKZfiaKrnkrUlEhb7aJ+1yEHYfmn9PJO rGoUbmLiAXM9bIrxDgYAa5Cnw2BRRauHu7HAt5J8EWRtTdOzgdIatS7RLEIdxI0sOGhfHv b48htNrKUmyRIYchp94zxZ7FV2MfAGHoJYjn2A0BayQ7Di3NG1VvGC5iJ+XX7iuh3TUowo 4r73p1nV1kmP26x2ep7hXnSGE6vJNpMKdWpuS0roNaEHWq1+Ry+qi3zUDhx3pw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1597970269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GRUgKcuRN8v1rgG8LJcASrlT3NFsgPKqmdOa0BdAnwU=; b=t4gBM/DWFQEksA55Z7a7bVN5PkFdmzG1sCUArUl19hqmnycS1no3KeuRHmXMcps3b54Vj/ fZbHwBb6zcpwOSAg== To: Arvind Sankar Cc: Arvind Sankar , "Paul E. McKenney" , Nick Desaulniers , Ingo Molnar , Arnd Bergmann , Borislav Petkov , "maintainer\:X86 ARCHITECTURE \(32-BIT AND 64-BIT\)" , "H. Peter Anvin" , "Kirill A. Shutemov" , Zhenzhong Duan , Kees Cook , Peter Zijlstra , Juergen Gross , Andy Lutomirski , Andrew Cooper , LKML , clang-built-linux , Will Deacon , Linus Torvalds Subject: Re: [PATCH] x86: work around clang IAS bug referencing __force_order In-Reply-To: <20200820130641.GA536306@rani.riverdale.lan> References: <20200527135329.1172644-1-arnd@arndb.de> <878serh1b9.fsf@nanos.tec.linutronix.de> <87h7t6tpye.fsf@nanos.tec.linutronix.de> <20200813173701.GC4295@paulmck-ThinkPad-P72> <20200813180933.GA532283@rani.riverdale.lan> <875z9dioll.fsf@nanos.tec.linutronix.de> <20200820130641.GA536306@rani.riverdale.lan> Date: Fri, 21 Aug 2020 02:37:48 +0200 Message-ID: <87zh6ohm03.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 20 2020 at 09:06, Arvind Sankar wrote: > I don't think that's an issue, or at least, not one where force_order > helps. > > If the source for foo() is not visible to the compiler, the only reason > force_order prevents the reordering is because foo() might have > references to it, but equally foo() might have volatile asm, so the > reordering isn't possible anyway. > > If the source is visible, force_order won't prevent any reordering > except across references to force_order, but the only references are > from the volatile asm's which already prevent reordering. > > I think force_order can only help with buggy compilers, and for those it > should really have been an input-output operand -- it wouldn't currently > do anything to prevent cr writes from being reordered. Fair enough. Care to provide a patch which has the collected wisdom of this thread in the changelog? Thanks, tglx