Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp881967pxa; Sat, 22 Aug 2020 03:33:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8rm05f9nQ7F0ceBLFysIFOwGjEEzUhdxgEQy8F7CgcYlgeV49ehC6jaNIazwFcu17x0x2 X-Received: by 2002:a17:906:ca4f:: with SMTP id jx15mr7033838ejb.449.1598092390849; Sat, 22 Aug 2020 03:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598092390; cv=none; d=google.com; s=arc-20160816; b=uJ1p9vZJt+MVunt/nHbrDWvxjn0qRHceT4y1khtWTelmXkdJYZh7dNMAro5maWFD8P +eGPE04GvqXnq4GN+eYIK2Ah2Tk38SVxTpP+SjLwBls2JAYR8doi5/A/TBx+chSXPgiv ty2zjZxOgeLlN3YlnjKyIUj+UU8HKiSG1MIK4BSCsXa2g/7axFiRiXRcXfTpFIbuscc+ 2lyb+d5a60eXZVfB2sdCKPMizspbQ++hWUqTVCqsUIGC0rjAswwkdCcW6cbSn3EESZ8X JaUv7PjgcTIB1m/yEDMA+0PS26UOCCHKfAVWPnlTTKzndH1I2mtuW8s7v3QLehDX+6R+ wBdg== 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; bh=0FTCB9OWGk1I+OHk3Bn1nlkof8QkvHU/hAJB0+ACyWQ=; b=NRgAmmGH6Z1Aqo35VTNj+8z019Q3Tn2SxVbciOJj13VlKPkBK+Z/4aUIOygtO4sss8 QGmP+q2iLaGgoOpr3jgsf0G2JhXzM0LhbY7dx/B49wOD726oRnsKb3J3pa9NnEASlIWP RsHCZ0LsiIuihsuwR7abttnBxdAuS/g0KnUE096rMJ66YXKOlMDA6ZL6F4JKfcpUPDD9 niLgfzHdK5QtL+mrdwlEvVPXd+PMWGfGzO6+BD62HAhJ6nEfE4WjSBdov+HwnlYocLZm EZ3dKqE+TmPGcAudHL9yiu3FG3Nq4nEvbwYyVrp2aK3J72fNs3QlBtavRKbulbF681Ld 7hUA== ARC-Authentication-Results: i=1; mx.google.com; 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 j14si3094810ejd.406.2020.08.22.03.32.33; Sat, 22 Aug 2020 03:33:10 -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; 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 S1727794AbgHVK1Q (ORCPT + 99 others); Sat, 22 Aug 2020 06:27:16 -0400 Received: from gate.crashing.org ([63.228.1.57]:55074 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726728AbgHVK1Q (ORCPT ); Sat, 22 Aug 2020 06:27:16 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 07MAQeoZ015812; Sat, 22 Aug 2020 05:26:40 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 07MAQb3f015811; Sat, 22 Aug 2020 05:26:37 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Sat, 22 Aug 2020 05:26:37 -0500 From: Segher Boessenkool To: Sedat Dilek Cc: Arvind Sankar , Thomas Gleixner , Nick Desaulniers , "Paul E. McKenney" , 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 , Miguel Ojeda Subject: Re: [PATCH] x86: work around clang IAS bug referencing __force_order Message-ID: <20200822102637.GM28786@gate.crashing.org> References: <875z9dioll.fsf@nanos.tec.linutronix.de> <20200820130641.GA536306@rani.riverdale.lan> <87zh6ohm03.fsf@nanos.tec.linutronix.de> <20200821230435.GA56974@rani.riverdale.lan> <87eenzqzmr.fsf@nanos.tec.linutronix.de> <20200822035552.GA104886@rani.riverdale.lan> <20200822084133.GL28786@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 22, 2020 at 11:51:56AM +0200, Sedat Dilek wrote: > On Sat, Aug 22, 2020 at 11:23 AM Sedat Dilek wrote: > > > > On Sat, Aug 22, 2020 at 10:42 AM Segher Boessenkool > > wrote: > > > > > > Hi Arvind, > > > > > > On Fri, Aug 21, 2020 at 11:55:52PM -0400, Arvind Sankar wrote: > > > > Cc Segher. > > > > > > > > Segher, we were looking at gcc PR82602, where IRA could reorder volatile > > > > asm's (reported on ARM). The fix was backported to gcc-6. > > > > > > I know ;-) > > > > > > > Do you know if > > > > there is any reason the problem couldn't occur on x86 on older gcc > > > > without the fix? > > > > > > No, I see no particular reason, at least GCC 5 seems vulnerable. (The > > > GCC 5 release branch was closed at the time this bug report was made, > > > already). There is no reason I see why it would work on x86 but fail > > > elsewhere, either. > There exist gcc-4.8 and gcc-4.9 for Debian/jessie where EOL was June > 30, 2020 (see [1] and [2]). > > In the latest available version "4.9.2-10+deb8u1" I see no PR82602 was > backported (see [3] and [4]). [ There is GCC 4.9.4, no one should use an older 4.9. ] I mentioned 5 for a reason: the whole function this patch is to did not exist before then! That does not mean the bug existed or did not exist before GCC 5, but it does for example mean that a backport to 4.9 or older isn't trivial at all. > I am asking myself who is using such ancient compilers? Some distros have a GCC 4.8 as system compiler. We allow building GCC itself with a compiler that far back, for various reasons as well (and this is very sharp already, the last mainline GCC 4.8 release is from June 2015, not all that long ago at all). But, one reason this works is because people actually test it. Does anyone actually test the kernel with old compilers? It isn't hard to build a new compiler (because we make sure building a newer compiler works with older compilers, etc. :-) ), and as you say, most distros have newer compilers available nowadays. Segher