From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4CA6C2B9F4 for ; Mon, 14 Jun 2021 16:24:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C66061350 for ; Mon, 14 Jun 2021 16:24:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233640AbhFNQ0S (ORCPT ); Mon, 14 Jun 2021 12:26:18 -0400 Received: from mail-pg1-f179.google.com ([209.85.215.179]:46692 "EHLO mail-pg1-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233044AbhFNQ0R (ORCPT ); Mon, 14 Jun 2021 12:26:17 -0400 Received: by mail-pg1-f179.google.com with SMTP id n12so9035218pgs.13 for ; Mon, 14 Jun 2021 09:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/tqMNBdE4qHdzJKBoF81z2rnqzQbtDIbs5Mv0crRZTA=; b=kc8k59SHuwOaSDz4EZLDy/tjNmjX3sHx+Azxk4Uprh6yYNI/O7BgElJNrrJZE2jRji mCGEDJsuMfh8V5FyznUU3aTug4Pj9NzHk3Myu4dUt1RdlHv3GNfc/4Sx4Uef5FqXhZL3 uXeLN7/9BOdNG4fXsEcvyEwivlOob8kn+9hZs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/tqMNBdE4qHdzJKBoF81z2rnqzQbtDIbs5Mv0crRZTA=; b=TzXATOgHkuukMC04mgeQol+GOIgogs09qN1HpYG5Z24iqKvM9YLYxe7ZtwGCXl0vTD PKoq9kcfrGY4NYdkC1seUjYgjInLyeKqUuBvGCMpZHD+PTnVpqfyIExORrnLpcQLHrQS 1stdnFw/cK1DGDO4RxjM7W4esoGDzS4M99GSyrnL7H3f6hiZJkab9VRItqdVNEmmLfWj AIzDkogvvUgOe+HifbEVTnxUkK7eVUM26O8LzpCw2j4cvocpnTq0cA6qz5poUiohImNY UGGZ4v5bxSD1akwkdwruvEcCpYvgKDknlRNlioDaDnHyh0GM28dQXbpcuOuppk615QgI MOQg== X-Gm-Message-State: AOAM5320oPSusDEtYizuR1x4Oeo5N160ejiZj5xjEAUh6fLRlLFoUetT h99iyXd7sEaCjyb1neeLhhFtvw== X-Google-Smtp-Source: ABdhPJwixa3iu8aLgRgs1bvYerT2BJB3n8QFCj4rML9cDEQz4n41UsDtRE9d9b981B4LBVyujggAVQ== X-Received: by 2002:a63:d347:: with SMTP id u7mr18165235pgi.434.1623687780120; Mon, 14 Jun 2021 09:23:00 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id mi10sm17066933pjb.10.2021.06.14.09.22.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 09:22:59 -0700 (PDT) Date: Mon, 14 Jun 2021 09:22:58 -0700 From: Kees Cook To: Peter Zijlstra Cc: Marco Elver , Bill Wendling , Jonathan Corbet , Masahiro Yamada , Linux Doc Mailing List , LKML , Linux Kbuild mailing list , clang-built-linux , Andrew Morton , Nathan Chancellor , Nick Desaulniers , Sami Tolvanen , Fangrui Song , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Andrey Konovalov , Dmitry Vyukov , johannes.berg@intel.com, oberpar@linux.vnet.ibm.com, linux-toolchains@vger.kernel.org Subject: Re: [PATCH v9] pgo: add clang's Profile Guided Optimization infrastructure Message-ID: <202106140921.5E591BD@keescook> References: <20210612202505.GG68208@worktop.programming.kicks-ass.net> <202106140817.F584D2F@keescook> <20210614153545.GA68749@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210614153545.GA68749@worktop.programming.kicks-ass.net> Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org On Mon, Jun 14, 2021 at 05:35:45PM +0200, Peter Zijlstra wrote: > On Mon, Jun 14, 2021 at 08:26:01AM -0700, Kees Cook wrote: > > So, AFAICT, the original blocking issue ("PGO does not respect noinstr") > > is not actually an issue (noinstr contains notrace, which IS respected > > by PGO[2]), I think this is fine to move forward. > > It is *NOT*: https://godbolt.org/z/9c7xdvGd9 > > Look at how both compilers generate instrumentation in the no_instr() > function. Well that's disappointing. I'll put this on hold until Clang can grow an appropriate attribute (or similar work-around). Thanks for catching that. -- Kees Cook