Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2891482pxj; Mon, 14 Jun 2021 09:26:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2qk6Ct4qzbj+SFmoSwwfVXcqJA5XQh80Lz1OeUJSvW/27qlmr1xF/oLcJ+Hfg7nhxx/Y7 X-Received: by 2002:a17:906:7f0e:: with SMTP id d14mr15697436ejr.103.1623688013012; Mon, 14 Jun 2021 09:26:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623688013; cv=none; d=google.com; s=arc-20160816; b=McFIMF4bxuY2wMHCdp5m9F9pfjMdaQJ78tM1zmw6EdmkuiciEfn1yuRneQqLF8tbh7 xpuK8uaSW+O0NWNg+CLupmvGkGQV//OT8wcErPgyiwKRLa//INzC4DDCdUOLfbVCma61 hyH2bmFAtQBNMc7Ev+xOh/HISe6UbXUae32MeZFqREWrQgRaVzU9mi+ojylo+wALknJE Tk2vWWXWCD/NziUuvLnGdVleAQ4BKtvHjcKmBAJa/2zVr9LWkYTY/hcDxCPAJWSA3utH H1ZAC2G2wJpe6yMO/j3yAQNTD9XNAV6Bmwib22QoxmdhwqWCAd9SgFquVrGTbKyHAz6M mDpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/tqMNBdE4qHdzJKBoF81z2rnqzQbtDIbs5Mv0crRZTA=; b=SLfsb0fwvN34A8ve/VOMEs/JsCY1eudW0pxRn/G5oBwTi3X5yYxWKM1DACtg1NiroZ QVrNcmj9UuhbfKfeT7C4Rk7CgjQhaH98IvEvQcIFKiYTheVP7WZtUJSUwBGLH+QlDbFX UMkV3LqnSlBYEKV0DGIapqwHRMhW3CaRgwhh+xBrf2p3O+OZ0jtoS0UN3FoX87IOnbb/ EKpFXlrY/r23rdLHrpj4ALGxnGaziEb04I8V+xqjS7DoTpjyD3Y2d7wHE1GoDyy2kRx7 gG2hMPrALX4EMQG7c5w0j6OjO2zez7V2eH6ctAJoQ3gPH9Xl7+cSrW9lJBhjMsEdZ9U3 Xqgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kc8k59SH; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n13si11340042ejh.510.2021.06.14.09.26.30; Mon, 14 Jun 2021 09:26:52 -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=pass header.i=@chromium.org header.s=google header.b=kc8k59SH; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233430AbhFNQZS (ORCPT + 99 others); Mon, 14 Jun 2021 12:25:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234054AbhFNQZR (ORCPT ); Mon, 14 Jun 2021 12:25:17 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8274DC061767 for ; Mon, 14 Jun 2021 09:23:00 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id w31so6550692pga.6 for ; Mon, 14 Jun 2021 09:23: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=Xb/bmOg6gbYCiAyCZmRGxWxAfj8NRkCm5B8Fm/Xs/caq2Jk5I1yXxDt7L+l68v5b7j 9yzfC6eLCpNR6pMnEBtsC47RViU9QQSh4llAWa7XrKcEpXvksszkEDd4EKEhle6o625H 5DV8YDocrAOTMlHUhPE60rq66PxMGOhgJZtwme1BNWQn5LX2AAfALlUNGEX1yGg+Z1cQ Wb1/Kt6SPnH0VtSuOo9/Cj8hs4cKW6Z5E03a476gP44sLgiUBSOfqX/invRCu+QCEirX Eu4FXTXJou1jucKKZjpLTTVkFieNcUFm3RFyOrGMhRBwtstOuO2iIEY3Vr4rLuHg4bJp 1cGA== X-Gm-Message-State: AOAM533SmB9gbihVRr7+IIk7dt3wEWRMgy5I9DXi3GNIcs9K1Umzjdpp cWYVYB4xOM97Y0qlFuk0ZiDUdQ== 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-kernel@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