Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1198578pxa; Sat, 22 Aug 2020 15:24:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3vwIxcmOmxF6Eh5nthI8eCNfXRezYVzmlD5EfQdv7zUJFYoFZH1vXlo6GkHkDVOb0FgqY X-Received: by 2002:a17:906:3053:: with SMTP id d19mr7603563ejd.190.1598135069694; Sat, 22 Aug 2020 15:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598135069; cv=none; d=google.com; s=arc-20160816; b=zly+V7Ix/eUUJOVkNzDD0C6OZwNvNJVgwvJOnA0RoGihUzkcLk+8ktXPoJaXV/dide Qq97Bjrxe4OKubGP2D5Rf5Wd6tmdoQWjPUj9dot+npkfAW5gowp5SK/V5QvozrTj2m0H w8A2he0iMViF2xywje9+WzsdhDYcnZ6rjLnkZj0em3m31kRC+wtbCMwEEHWFiCSwgsHI 8ClaLgnAJHRTCI7WRB+AVO8nEE77kB0/JfPUB8d/hsmF7yMEu6yE3tt75L1LBuJpC3Vs 0o5HqLHIRFD2IldCieMV1raX4GuL+1BS23uD+G8V1uWz5VY6wEfAwZf+7JDscuxQSfsT 4SFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=yH1SIT4I5zLgF08JR3jAcoSi73lF2BBLmlCMe56jsJo=; b=OGHymEASs9ZEi2lsNU8mwv60UOmDiPhuylaLUqc0ByTfpsmUDQEEGjC5tCbJhO5b/M wwqIOV0wedwWJnrKAUznWG0lEA21MwNewWikrotIxeVmvQcsOtnRxx5Kp/AFv2xnVK/a zNQYQD386hDjubwvm+PZ9NQfZ6mhjoLGz4afTQ3tvQBkpeVlDFh1DE4EpxJtUzNDkeI2 Amc7++CAY0GsBPzCmYiS0ectlZBlB8wIP2VRqSTlZHTzpX4w/s89123lWzjcMTh2UhJ3 D9yuxGjB1vea8p2Ycd6Qu6WXZQTbVgeT9hIAuOXxuBIC1byuIFlhFF6AF1hsWWK8+DET 9vWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=WmOc7Bz7; 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 k29si1463922edj.389.2020.08.22.15.24.06; Sat, 22 Aug 2020 15:24:29 -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=@gmail.com header.s=20161025 header.b=WmOc7Bz7; 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 S1728732AbgHVVRM (ORCPT + 99 others); Sat, 22 Aug 2020 17:17:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728729AbgHVVRK (ORCPT ); Sat, 22 Aug 2020 17:17:10 -0400 Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3163DC061573 for ; Sat, 22 Aug 2020 14:17:10 -0700 (PDT) Received: by mail-qv1-xf44.google.com with SMTP id s15so2174256qvv.7 for ; Sat, 22 Aug 2020 14:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yH1SIT4I5zLgF08JR3jAcoSi73lF2BBLmlCMe56jsJo=; b=WmOc7Bz7Ll32cJhJcDO8Amc0lOJNVGAQOmwCLqbShhlht+9RXiGjKwioLIQm2VxblT oVSNEzdtWuoETaf32KrZjilxTsTacWAyu5BGiAO3MlccJihCcpI1RS5xZYvJv37rENtT v2q0DcJQmQtGk2Y8NHalFQnTTO1h4vL62tpUE7VUIjgkQI7Xu4JJMBtdY19AleMXhaJ2 s4x/L2mSKiNBuIYOeOVaIV0oJsd9YagzCvrmeximBMRYaRxD550EpJ5NqSNwSan16Xq2 7HaF+iLSuU0VJMR9C5gwNEd839GWAe2vESnQfyI9bOfumJq5qdGRJkBrBgAdqUXLXP7R 4TSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=yH1SIT4I5zLgF08JR3jAcoSi73lF2BBLmlCMe56jsJo=; b=N5dhRWt1Hj5/BYYYSgjg97JKUTs+lmQf2oQ8pg/ges8ZfdQpG5RB2fecL8zdDDm2A9 NuQFYRMgCCnu/ev5Au71rBz/LSb0zDmviJLLvz5kHGgkL3WZpT2OuLTWZL51UCojdw1m iYLQEaUWw2o7lbhG54wlWVCZ6buUim8vrjivIh62JjkxYJKXAJbLss5rVFHGkbNPi7Lw Oq+VXAr3pQeP8m6QWVrg5DL7qxo5K/w0HmsddETci4bErCdJ7In1LVy/YjvTG32r/pHG aD4z6Qd+pDTRMe+405Ab0b+9YkjWOCH8Lw68ha0QaJ3B+iewoXLfqgeE9dhXnPO48kDU 9www== X-Gm-Message-State: AOAM530RfBQebtZGNl5C0fGULlWm/yj5aiFkglsFiSqmHgUor5d3rfDN 4EbudGC+8jjDDI+Y7BMx21A= X-Received: by 2002:ad4:576c:: with SMTP id r12mr7992606qvx.232.1598131028339; Sat, 22 Aug 2020 14:17:08 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id j31sm6736810qtb.63.2020.08.22.14.17.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Aug 2020 14:17:07 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Sat, 22 Aug 2020 17:17:05 -0400 To: Miguel Ojeda Cc: Sedat Dilek , Segher Boessenkool , 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 Subject: Re: [PATCH] x86: work around clang IAS bug referencing __force_order Message-ID: <20200822211705.GA1382515@rani.riverdale.lan> References: <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=utf-8 Content-Disposition: inline In-Reply-To: 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 08:17:32PM +0200, Miguel Ojeda wrote: > On Sat, Aug 22, 2020 at 11:52 AM Sedat Dilek wrote: > > > > I am asking myself who is using such ancient compilers? > > There are many users/companies using older versions of compilers, > kernels and everything. GCC <= 4.9 will still be used/supported (by > third parties) for a handful of years at least. > > However, the important question is whether those users/companies care > about running the latest kernels. Many of those definitely do not want > to touch their kernel either. For those that do, there are several > longterms to pick from that still support 4.9, as well as other > workarounds. > > Thus I am usually in favor of raising the minimum whenever new hacks > are required to be added. On the other hand, we already raised the > version twice this year and it is not clear to me what is the minimum > version we would need to go for to ensure this does not bite us. > > > If this is a real problem with GCC version <= 5, so can this be moved > > to a GCC specific include header-file? > > Thinking of include/linux/compiler-gcc.h or > > include/linux/compiler_types.h with a GCC-VERSION check? > > That would be better if it can be done, yes. > > Cheers, > Miguel The fix landed in gcc 6.5, 7.3 and 8.1. The bug is presumably quite difficult to actually trigger. As a sample data point, I verified that 7.1 vs 7.1+fix have no differences on 32-bit and 64-bit x86 defconfigs, on current mainline. Assuming we don't want to risk removing force_order, I'd suggest - make it an input/output operand, so it enforces ordering fully. - either restrict it to gcc < 8, or just provide a proper definition in some file (maybe arch/x86/kernel/cpu/common.c)? Thanks.