Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2071887pxj; Sat, 19 Jun 2021 02:02:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMnSf3CDRH+MH3b1Bj8Vwd+cXVdwFmTQfkMCIo0bfGTl0tAEXPgtcyfsfriXfhUJuIbokI X-Received: by 2002:a92:cbd0:: with SMTP id s16mr10254695ilq.19.1624093369074; Sat, 19 Jun 2021 02:02:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624093369; cv=none; d=google.com; s=arc-20160816; b=EbTFE/necqOQQLpQH0dgsP91Zk1v+Uk1hHevlMYf2PMSU44M+ku9X+oY16CP8BEFG8 tSt088IOBJtfNfKqAGmNo0AgfHz0opdy4ku1ChXVk58e04g+FMYln0ACoTa16qAJkICH iSpd1XZNzh4aXcDJOv9Z0qjt0Du9P6QlgilVpn6vIkkbAWx2w7Q2xCCEX1WJNf2pvN0+ VzAPIbOe+5y6TWNRCNd0+0MXXpPpAP8UZs3uDIr1vlLTz8dwP7cdlf2AS7Cb0XzInhZc XLD/YNTEf2jzozjqOm7q52quulCS17CGtoXe1dGKwn3oxEe5F7uhmxauO7hrcQYg4oRa 1z3Q== 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=zAYV7wMM7Ezv8dDkbAjr47uPXYKTsdhdBtQn9j9OFnQ=; b=pgkFOedqt+btv95fLHOw09u3GPxS+WbNmHHCKhM76PkSD+A442WVJDlrFpcK2uJyra KFgkKAGC5Rb1sJzvWcknqpCcJOS/06sEveOfHkFqBh+kkP6kVkEQcvRL8kq0WSFz4BKS Ggd8QUkbXTzsiOm26usUB/+Wzgx2x9cSP5PLPnJOJYJWc3zG83v8wbIjdt6nQThQFerJ ofubC4CVUheL2tgVKBBgHqSEAzmuOOwHQLksu+i/PNHcI2WeN5GhErBEGpgSWJFc/7Xe LG12d0XMvnDpNSKwr4JXceg1fhXL3POufHQWzm9o3i5P0018OgOq2oFXqKR9QIOp1yHn /4zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Q2OJ2V/f"; 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 y16si12920965jat.77.2021.06.19.02.02.30; Sat, 19 Jun 2021 02:02:49 -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="Q2OJ2V/f"; 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 S235013AbhFSCsA (ORCPT + 99 others); Fri, 18 Jun 2021 22:48:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234923AbhFSCr7 (ORCPT ); Fri, 18 Jun 2021 22:47:59 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17FF0C061760 for ; Fri, 18 Jun 2021 19:45:48 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id y15so3326358pfl.4 for ; Fri, 18 Jun 2021 19:45:48 -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=zAYV7wMM7Ezv8dDkbAjr47uPXYKTsdhdBtQn9j9OFnQ=; b=Q2OJ2V/f8FZEH317J3bz6jJZxIGjbRaNkKQIRx821VhRbFsIHrPq+Zay4VGnDoiem3 h5LzzP3EtTb95X3yOnHsnK0DXz+ppJPbmxOjwonoz6Vp5YBhvZqOmANEITrlb7cwBX66 OHR4Cr7BDqNiJ6hJrDmkmpm82iFxhnS7Uk1do= 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=zAYV7wMM7Ezv8dDkbAjr47uPXYKTsdhdBtQn9j9OFnQ=; b=JzbZfk6xpa+2E7se/aTR2CJPLgZjEFfwjk7zvSX5VSS8ulJExy9Hsrd258/QeBOPrC Ax2KALynQJU9+WsE1OTYgInTQuqCu7X+KzqvUZt7b3IVDeS7oGZSB8MT2FUHcGDtyu98 pAQmjefTpTrLyq4E8pG44kAv28j7+ahyQgsdxOFsU4muHnqGRxru6Bs1yVfRxEeHFbuj lRkfqMKPsFDcjNpQbaCgyJsOX42m9u1EOxSKrxhrL/ZDCSfxqf8nUeUc5rsqvlpNQXw4 LCY38mPLjfw+Hk+M+UZ+bcBdVGK5xWdV6a1dT8GSGctA+bQwDScXPM8ADtdyACdorqgI SMkg== X-Gm-Message-State: AOAM530oZ0KlKWmAGLRQ2iyINKmCmoVsCFmAFFlXieq91E6LKH+cUHJc Vds9QHVwP4dYdVpk8dsTvN9KLw== X-Received: by 2002:a62:6581:0:b029:2ef:bcb1:c406 with SMTP id z123-20020a6265810000b02902efbcb1c406mr8009133pfb.28.1624070747426; Fri, 18 Jun 2021 19:45:47 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id h21sm8559917pfv.190.2021.06.18.19.45.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 19:45:46 -0700 (PDT) Date: Fri, 18 Jun 2021 19:45:45 -0700 From: Kees Cook To: Nick Desaulniers Cc: Peter Zijlstra , Bill Wendling , Sami Tolvanen , Peter Oberparleiter , Masahiro Yamada , Miguel Ojeda , Nathan Chancellor , Luc Van Oostenryck , Ard Biesheuvel , Will Deacon , Arnd Bergmann , Andrew Morton , Rasmus Villemoes , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, x86@kernel.org, Borislav Petkov , Martin Liska , Marco Elver , Jonathan Corbet , Fangrui Song , linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org, Dmitry Vyukov , johannes.berg@intel.com, linux-toolchains@vger.kernel.org Subject: Re: [PATCH 0/2] no_profile fn attr and Kconfig for GCOV+PGO Message-ID: <202106181945.AC10BF38ED@keescook> References: <20210618233023.1360185-1-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210618233023.1360185-1-ndesaulniers@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 18, 2021 at 04:30:21PM -0700, Nick Desaulniers wrote: > When we say noinstr, we mean noinstr. GCOV and PGO can both instrument > functions. Add a new function annotation __no_profile that expands to > __attribute__((__no_profile__)) and Kconfig value > CC_HAS_NO_PROFILE_FN_ATTR. > > Base is > https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/log/?h=for-next/clang/pgo. > > Nick Desaulniers (2): > compiler_attributes.h: define __no_profile, add to noinstr > Kconfig: CC_HAS_NO_PROFILE_FN_ATTR, depend on for GCOV and PGO Oh, awesome! Thanks for the fast work on this. If there are no objections, I'll apply this in front of the PGO series and put it in -next. -Kees > > include/linux/compiler_attributes.h | 12 ++++++++++++ > include/linux/compiler_types.h | 2 +- > init/Kconfig | 3 +++ > kernel/gcov/Kconfig | 1 + > kernel/pgo/Kconfig | 3 ++- > 5 files changed, 19 insertions(+), 2 deletions(-) > > > base-commit: 4356bc4c0425c81e204f561acf4dd0095544a6cb > -- > 2.32.0.288.g62a8d224e6-goog > -- Kees Cook