Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5223033pxb; Wed, 26 Jan 2022 07:22:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiNg3FlNMY0Cjt9h/rehJrYzTT2/Uv83e7wIwM2qYByV94oCpTaEAJy+kKYxW/2Em+2Uui X-Received: by 2002:a63:d314:: with SMTP id b20mr19414603pgg.207.1643210577332; Wed, 26 Jan 2022 07:22:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643210577; cv=none; d=google.com; s=arc-20160816; b=AbOw2Y//qq+p83CKLJ4Btgw2pEEPFIPKKkOiMLd8kf1LI66+r+es30jPdWvBD+4+Ue 29Bdt6hIMd0vHBygULkujpZ70jBGHJ6mcfRMTE6BVg4AO4u/t9bQwG0NBFuqsVbv8z0V iXkQdxrVtOvuCgiPsYsMXZOvwHM+GV+GXlqoBfDCwEigDuW1LKFxjmGHlu9a+/HqcAk3 GCOJ68V10c3TuJZOJpe42Rcl+T+YzSj9VZMeMU+gm7GgFl38R2tEffH4hR987qvyV1BM z5FGQDBZRGfST60fZSjQ8q1fdKxP/rQV31oFUQXkoCXTSnU3iRJqlf6eYJmIgwCtUkNg WWgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bddl5zJdvIpRDv67hFhNPIFJF2EsWzz+rWzL2YtGbis=; b=FKhtMdoztp+ioOE6pvH7ZWP79zPsOzZINK2ucmj85LU9vBEOYD/fkpSPg0t7XowPeJ U8Ab2VOYdLuoCjLVRxQtOw362kgsOznNXG44nlcU1lXhk3TK+LWEDaKhmufJJJ2m3gEp 9mjpLE3M5fa+lQCeRyHR0loUQZbAcxTBt4pTIzv3SheoxW2kDC5zxt0VqwQ0XfY8CORs mga38EL1v5fPm9Jsf1TcD/U/c4QI+46E23UuAoonlpKEG4KR2a0hl5YnDjE4xcJHq2xC aYRVLplzTjj4O6D51esEv4xYdttWDQtyD0dGdmADlNA4vT8Uo0lyOdWDEVNlcFW4RMlh 3/fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=WV88Mu2I; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j192si11108135pge.768.2022.01.26.07.22.44; Wed, 26 Jan 2022 07:22:57 -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; dkim=pass header.i=@google.com header.s=20210112 header.b=WV88Mu2I; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236172AbiAZCMg (ORCPT + 99 others); Tue, 25 Jan 2022 21:12:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236160AbiAZCMf (ORCPT ); Tue, 25 Jan 2022 21:12:35 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 197D7C061744 for ; Tue, 25 Jan 2022 18:12:35 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id a28so30146375lfl.7 for ; Tue, 25 Jan 2022 18:12:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bddl5zJdvIpRDv67hFhNPIFJF2EsWzz+rWzL2YtGbis=; b=WV88Mu2IYWreQ+WiCxBelZUJuTKAVWWEgH3YCtPtNnx6tnPxQgSzuSZobST9MpDmjb wA5DDI/36Kw0RyGu3tPuYilQX3CVnUSb5nR1+wo4Zmj3j4WY1jp2oD8kPuGpbW4llu4R UPbnBBSspuBe33Pq4EFjRQPpR6AcyqpQOXYyr3WK/aNitUSB5kl/oIWC0jyvPzLwcAiI mfSAiYFn7Y2zuc6UzG4zk5Xo+W1QGNMIqMzsPlBs3BrbWKpQzJ4r7ziryknf4Qs3J1sq AQKtkHJC6Qs20zQirJzKp+sMEcT69CV3B9NXGe0MCHitX7Hw3S7q5Ng6JjYpwOt571o6 jA+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bddl5zJdvIpRDv67hFhNPIFJF2EsWzz+rWzL2YtGbis=; b=hd0peA+HjpnMXw4K+tlEunzImWdmHxcBtV6ExEZO2njfb0EzQR93LECxfkkVUVhK+Z K9ISoHgW9993h+U3mD2zOIhNnvhkeU6rUDUQxWL971PHEvbjKURItMPedK/i5AysC6bg 502kEVwUj1hKZDtAOtIpodLW2OEIFgeD54ZFQszWiNJTzwin3jGy9W8gBBulbj4Z+vvI aCPeqoKDOB1jNe2zaO+ZekBBTEYk1BsLV3maubuNX6P+cp77s+6c9mozwZaorTzwR4d8 AbY1nFSx/UaTJqxuClyRLQ4jIZb+G+zX8uER+kfX/Jr8a707BvORPnYo2p2KE5T1R9tb vL8A== X-Gm-Message-State: AOAM531W8ESnM2/xIsHBD8QQylgSzgYnljc7UmMuj0E1s9QhcDVafjOo QAZjtBJIzWvp2uTN5SnpvoGsuQmMMTUCt3XHlaLiyQ== X-Received: by 2002:a05:6512:3c8e:: with SMTP id h14mr9770534lfv.489.1643163152731; Tue, 25 Jan 2022 18:12:32 -0800 (PST) MIME-Version: 1.0 References: <20220114010526.1776605-1-ndesaulniers@google.com> <20220118192256.jzk5dnceeusq7x7u@treble> <20220118230120.pivvson7qekfiqic@treble> <20220125233128.GT614@gate.crashing.org> In-Reply-To: From: Nick Desaulniers Date: Tue, 25 Jan 2022 18:12:20 -0800 Message-ID: Subject: Re: [PATCH] objtool: prefer memory clobber & %= to volatile & __COUNTER__ To: Segher Boessenkool 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, apinski@marvell.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 25, 2022 at 4:59 PM Nick Desaulniers wrote: > > On Tue, Jan 25, 2022 at 3:34 PM Segher Boessenkool > wrote: > > > > Hi! > > > > On Mon, Jan 24, 2022 at 03:26:36PM -0800, Nick Desaulniers wrote: > > > > > 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? > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104236 Andrew clarified (thanks Andrew!) that %= can't be used as I imagined https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104236#c4 and that I think was alluded to in commit 3d1e236022cc ("objtool: Prevent GCC from merging annotate_unreachable()") which is fine, so I'll just need to keep usage of __COUNTER__. I'll try out a revised approach for this patch tomorrow. -- Thanks, ~Nick Desaulniers