Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5108794pxb; Wed, 26 Jan 2022 05:07:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQ8eBCK06P8CzIUuABhtIdmBoRkDldMUlWgtLPB2+bEvKaAFYE+Yj+R8eUcAJF+LaqiQve X-Received: by 2002:a50:da8f:: with SMTP id q15mr25293187edj.0.1643202439564; Wed, 26 Jan 2022 05:07:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643202439; cv=none; d=google.com; s=arc-20160816; b=fmiD/btAlFxCmDMUgZRhCHrScLOuw9M0xRqHNCottgE4eR/QYC72xbzeHY2QeJW53I GSDRYWXtO71teOrwLetUyHeau1P97XbY2qT8okKdhaslx4usrjMsBpeQ4xcz795BvODU mHUomJFWlDxAGSXeWfIQ2U4NS5k7WIMkE3VaH8eaXyUMDHQcdF6RrexadYw1NXcWdpEQ HDQRDVsmqtm87/xnjAVv+7jv1uat2XjuXSFRfMYa/WpVjST4JYyHNKoCSv3G2gv11kKs R32+mZsUdcjrV0T0FcRz0fczwXaEsEI4Q0u5NIqd9s4+u1vQiQdhwn1tjVHvQZ1imwu2 SNuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=KhWWb8YN6k2513foI8yLWji/OhndjL2Ge0qYaFQ78UE=; b=JWuGQ76uFs1sgxMh9czemhbcaFgH/UVzQW6kTssjmPk7iYHWh/Desu5az0osBwsx0g Jnj9c/2bDs5GkVIhAk85hwQakymLh21OcAHmO3QCP3gOqWOsV2t35+cQ2eta348xO6pC +RxLaOBeBaJyDGSld1NT9DIlbNRZMs4nJwCr1JSpuVzRIsJ8tp2YGfjuLyckewAKQRi/ /rmYucojN8VNau4g9/V+LLhUGNSJtOhOxDrlWZTW77+BmAj6yAIJvkcWFNqI5p9ybW2j 38zb7WJrFN9BJss2tuxhJ8Zv6koW0nMWKXHL/qf8hAiqi0iAU5nCXs9Ffz/fwfhl98sL FUgg== 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 x25si11566570edq.325.2022.01.26.05.06.53; Wed, 26 Jan 2022 05:07:19 -0800 (PST) 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 S234927AbiAYXje (ORCPT + 99 others); Tue, 25 Jan 2022 18:39:34 -0500 Received: from gate.crashing.org ([63.228.1.57]:54754 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234898AbiAYXjb (ORCPT ); Tue, 25 Jan 2022 18:39:31 -0500 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 20PNVUiB032739; Tue, 25 Jan 2022 17:31:30 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 20PNVSKH032738; Tue, 25 Jan 2022 17:31:28 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 25 Jan 2022 17:31:28 -0600 From: Segher Boessenkool To: Nick Desaulniers Cc: Josh Poimboeuf , Borislav Petkov , Vasily Gorbik , Linus Torvalds , Ingo Molnar , Dave Hansen , Thomas Gleixner , Peter Zijlstra , Luc Van Oostenryck , x86@kernel.org, llvm@lists.linux.dev, linux-sparse@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot , Nathan Chancellor , linux-toolchains@vger.kernel.org Subject: Re: [PATCH] objtool: prefer memory clobber & %= to volatile & __COUNTER__ Message-ID: <20220125233128.GT614@gate.crashing.org> References: <20220114010526.1776605-1-ndesaulniers@google.com> <20220118192256.jzk5dnceeusq7x7u@treble> <20220118230120.pivvson7qekfiqic@treble> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! On Mon, Jan 24, 2022 at 03:26:36PM -0800, Nick Desaulniers wrote: > I noticed in that report and > https://lore.kernel.org/lkml/202201190702.XNSXrMTK-lkp@intel.com/ > that gcc-9 was used. I wonder if %= has been fixed in gcc-10+? Have > there been other reports with gcc-10+ for my patch? None of the %= code (which is trivial) has been changed since 1992. > If this is fixed in gcc-10, then we can probably add a comment with a > FIXME link to the issue or commit to replace __COUNTER__ with %= one > day. If not, then we can probably come up with a reduced test case > for the GCC devs to take a look at, then add the FIXME comment to > kernel sources. Please open a PR? > I'm more confident that we can remove the `volatile` keyword (I was > thinking about adding a new diagnostic to clang to warn that volatile > is redundate+implied for asm goto or inline asm that doesn't have > outputs) though that's not the problem here and will probably generate > some kernel wide cleanup before we could enable such a flag. Its main value is that it would discourage users from thinking volatile is magic. Seriously worth some pain! > Perhaps > there are known compiler versions that still require the keyword for > those cases for some reason. It was removed from compiler-gcc.h in 3347acc6fcd4 (which changed the minimum required GCC version to GCC 5). Segher