Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3076293pxj; Mon, 14 Jun 2021 13:54:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxifX7QlCOnApScPSnvEUZmsYUhdBsG5IaFQt+jVD9IahZWEYa1PlKlwd+fLGwsulNFzcwm X-Received: by 2002:a17:906:40ca:: with SMTP id a10mr16971469ejk.181.1623704039856; Mon, 14 Jun 2021 13:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623704039; cv=none; d=google.com; s=arc-20160816; b=lFYveBzFGSfpprQpiOPO9hBkacK+qMJbXLAkxj373qihwr50C6uI54358azkJP1FiX Lphzie7ykzeNbGlXEntxDwhNzsel56Qx64Oa/ytbk1aR3xLe5XUTTVAPSKs9AUye6cUm dxUUGMcwp/0NFMHjs4wR7/k7QOWqUP/9g9EWLcZ1FMoN+YjKY8sLtraAZ14EMgrDlWOR 18YH2AgtRgCmQO3gE42NxnFmORjUyus+8njmlZUAv1TxBLB5uO4UJCVW4CbWizrWhbF6 XcCammTvbX6K7zEokfXxRyHGytDNladgnXPzFlvWzUSRAXgwRfWIFELDOL0bULH0nL3E xJBQ== 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=/8yZyD8Qxeaf9TxEOG5j+rcsyw3CCIJC6f3Y8GUzKlI=; b=ih6L3y1jH/oI2B0n0fXTr8c/nRCLYI72tsaiy814sL/8GTjC16U+Lptq9m+dtIFCzp bxhx1tUm48EYwiwYaMb3vCsvVG8LjLrjS1TaC+eXT2hHT22BV3Yqo40bPOl+T9J4Px9u Zg+h1Qa+0rh8LBPO5+jonRhjwWWpMCrR+fhrkntSU/pGIkutlFQjbt6QVWDaUn3sTylG v823btJRh1I50KbX04uUo1YoJY3+8Med+fFAWqAIuajCGmGyWkj/z2LIXJAP4KCO5NJS fI/pbtCnqESIhVpGpmn+qCVVu054ubyFVjvACVmT9VxMpzIeeSQ1Z2fZhMT6cRiT+kHI PM3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=FwsY9dIC; 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 f10si70770edf.268.2021.06.14.13.53.37; Mon, 14 Jun 2021 13:53:59 -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=@google.com header.s=20161025 header.b=FwsY9dIC; 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 S234586AbhFNUwq (ORCPT + 99 others); Mon, 14 Jun 2021 16:52:46 -0400 Received: from mail-lf1-f44.google.com ([209.85.167.44]:33594 "EHLO mail-lf1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233479AbhFNUwp (ORCPT ); Mon, 14 Jun 2021 16:52:45 -0400 Received: by mail-lf1-f44.google.com with SMTP id bp38so23308246lfb.0 for ; Mon, 14 Jun 2021 13:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/8yZyD8Qxeaf9TxEOG5j+rcsyw3CCIJC6f3Y8GUzKlI=; b=FwsY9dIC3IaG2Ak8rp0lm7uluQN8dbgehHV2TIVQyx98A+obaK1k4e2raRoeYlnfKU 1Mqe08vQex+QNkn+2ZHVa6wan1Cwx/lX8eYch/6jucnH21Q+8JaBKiF4RQmUCXHtN4Ql 0NNJi7Ti6hCKtulSglwykq2lBRq3m/lg+TZskSPYR3r7DonLl+Ft1xlc6vunbF62NYEu l4oHURk707CoxCGWPfKXXKfeCdaYb2b/G4OdpK4pwerASPRmQoG83cXVtPDyNWw/ZqK5 Vv3nDV3z1F4haStaGLxHeYZ3SI1OjiVBnT6LNl4mAhtQ9wcmvX1So8gC1sjAaVKKve0k XuYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/8yZyD8Qxeaf9TxEOG5j+rcsyw3CCIJC6f3Y8GUzKlI=; b=K9dkTrM9gqe2g+MFKSeJi4y6AxcBAxml+ooCZCra3gVCoSPMvKBaaUnrT3z8i0corr pFMpDu6ks/L+zNCOgucx9dR2NoqaKofy+zdyFghoUdVtK9n+0x+mRyobSf2Yf+aGSoo2 P2gEpu6573JIUq1ntjD9wvaG+GOYBZlt3MIPPlbG4q5BbHghS2bOm9Vz3U9QBzBXuYf1 fGWbiuhM4K46Q5eIyLoc3tlqFj+M/M9G2y5zOzcq6BhAgBniGWdVeRuyPsbP8mAMxua1 dcer/ODLCieyKBvpjmLdamUgddMvy/CLmFxqkuDZM35py3LpPDR9GLwUfy6VzRb9m2HA BE7Q== X-Gm-Message-State: AOAM532GBQhJBIQ8MTqME8phgwFW4P9NoXaL1CRSzCWKbNifADF2Fx2L dzNIzIm70M47NY0DEjleWBAPC0+ww1F0UF/5kR1c1Q== X-Received: by 2002:a19:4843:: with SMTP id v64mr13899409lfa.374.1623703781370; Mon, 14 Jun 2021 13:49:41 -0700 (PDT) MIME-Version: 1.0 References: <20210612202505.GG68208@worktop.programming.kicks-ass.net> <202106140817.F584D2F@keescook> <20210614153545.GA68749@worktop.programming.kicks-ass.net> <202106140921.5E591BD@keescook> In-Reply-To: From: Nick Desaulniers Date: Mon, 14 Jun 2021 13:49:29 -0700 Message-ID: Subject: Re: [PATCH v9] pgo: add clang's Profile Guided Optimization infrastructure To: Kees Cook , Peter Zijlstra , Borislav Petkov 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 , Sami Tolvanen , Fangrui Song , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Andrey Konovalov , Dmitry Vyukov , Johannes Berg , oberpar@linux.vnet.ibm.com, linux-toolchains@vger.kernel.org, Borislav Petkov Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 14, 2021 at 11:07 AM Nick Desaulniers wrote: > > On Mon, Jun 14, 2021 at 9:23 AM Kees Cook wrote: > > > > 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. > > Cross referencing since these two threads are related. > https://lore.kernel.org/lkml/CAKwvOdmPTi93n2L0_yQkrzLdmpxzrOR7zggSzonyaw2PGshApw@mail.gmail.com/ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223 looked appropriate to me, so I commented on it. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223#c6 Patches for: PGO: https://reviews.llvm.org/D104253 GCOV: https://reviews.llvm.org/D104257 -- Thanks, ~Nick Desaulniers