Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4400131pxv; Tue, 29 Jun 2021 06:16:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzhUq0+h2i/MjmPg/aCAuk06KNJQHkKx1kO+cyUvkJQPCS4e32fC49SADLVh9zoCEw9IxW X-Received: by 2002:a17:906:9be5:: with SMTP id de37mr8214922ejc.549.1624972567732; Tue, 29 Jun 2021 06:16:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624972567; cv=none; d=google.com; s=arc-20160816; b=AXjmNQXSycYoneufIkP6xpApMBBZU/jEC39b59fptAOK2aT/xcJhp+YmCyYm+q81f1 CH9G5KSMihpFSdZ9D1mxXg9WsoDObOZzkzDETip5ZpBykdFJez28Jy8+XgAWiPPWft5H WE4/iVhRfhRlP6F8/wzmpGeV8crxM4kDnJrvKHMDnKE7CGopOU0GlhfrwyZJECrmq6Ih G9y5Q+PtB8SnDnMbXbchf8hPpGbPZeq4BzVba2vvHzsrXVckqPjKN+RGTXP8wqYRdAR6 MG63wXTU6VlnJ6GPzKB+jicw2K+kZlVRLWmc/1OsIk1AgwU02qw7HV+/664AVFPhDtnC oAzw== 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; bh=iXAotg2AfBiILz9WSg1zsq+4IwUhnsBYFdN2rz9idTM=; b=jYgOP5mxTIPcu8/+jU4Kog4Afq3cY+YVJn5Nso6KgXNOulBujn1+Im7V6jqT2UiYJP eKy/nhY5msOMOJV4YofwCy13Gyht9c9vop6aYMJO6kK5qggu8fz3FafdltSAo29cnQWI QU4NiznAGOtE+MfHcJVCzo+VYxKJuHHtlVGlSMDeoRHarQLBGBduJxGsBan1FSqrVq6N 46Gz1Hgocoj5R1PP3QRSvbCSSXkqd+lG/fTglqH0qobmtAn+vi7T4e3BOPPS1qv7f9A4 ep7urM1VVmzVDzyDp8o6gAhOq2d8NcPXrVPZKRaOOKwOBFgmzf94qSRt3lmsMvVwvR8I 57nA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si17206169edq.447.2021.06.29.06.15.43; Tue, 29 Jun 2021 06:16:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233966AbhF2NQo (ORCPT + 99 others); Tue, 29 Jun 2021 09:16:44 -0400 Received: from foss.arm.com ([217.140.110.172]:50892 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233056AbhF2NQn (ORCPT ); Tue, 29 Jun 2021 09:16:43 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 11EFC106F; Tue, 29 Jun 2021 06:14:11 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.7.175]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E55A83F718; Tue, 29 Jun 2021 06:14:06 -0700 (PDT) Date: Tue, 29 Jun 2021 14:14:00 +0100 From: Mark Rutland To: Kees Cook , Peter Zijlstra Cc: Linus Torvalds , linux-kernel@vger.kernel.org, Bill Wendling , Bill Wendling , Catalin Marinas , clang-built-linux@googlegroups.com, Fangrui Song , Heiko Carstens , Jarmo Tiitto , Lukas Bulwahn , Masahiro Yamada , Miguel Ojeda , Nathan Chancellor , Nick Desaulniers , Peter Oberparleiter , Sami Tolvanen , Will Deacon Subject: Re: [GIT PULL] Clang feature updates for v5.14-rc1 Message-ID: <20210629131400.GA24514@C02TD0UTHF1T.local> References: <202106281231.E99B92BB13@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202106281231.E99B92BB13@keescook> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kees, On Mon, Jun 28, 2021 at 12:32:24PM -0700, Kees Cook wrote: > Hi Linus, > > Please pull these Clang feature updates for v5.14-rc1. > > Thanks! > > -Kees > > The following changes since commit d07f6ca923ea0927a1024dfccafc5b53b61cfecc: > > Linux 5.13-rc2 (2021-05-16 15:27:44 -0700) > > are available in the Git repository at: > > https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/clang-features-v5.14-rc1 > > for you to fetch changes up to 6a0544606ec7f03e4a2534c87ea989de4bac41ae: > > pgo: rectify comment to proper kernel-doc syntax (2021-06-28 12:10:31 -0700) > > ---------------------------------------------------------------- > Clang feature updates for v5.14-rc1 > > The big addition for this merge window is the core support for Clang's > Profile Guided Optimization, which lets Clang build the kernel for > improved performance when running specific kernel workloads. This > currently covers only vmlinux, but module support is under active > development. (Sami Tolvanen, Bill Wendling, Kees Cook, Jarmo Tiitto, > Lukas Bulwahn) I thought the PGO stuff was on hold given Peter had open concerns, e.g. https://lore.kernel.org/r/20210614154639.GB68749@worktop.programming.kicks-ass.net ... and there didn't seem to be a strong conclusion to the contrary. > Added CC_HAS_NO_PROFILE_FN_ATTR in preparation for PGO support in > the face of the noinstr attribute, paving the way for PGO and fixing > GCOV. (Nick Desaulniers) > > x86_64 LTO coverage is expaned to 32-bit x86. (Nathan Chancellor) > > Small fixes to CFI. (Mark Rutland, Nathan Chancellor) FWIW, all the rest of this looks good to me. Thanks, Mark. > > ---------------------------------------------------------------- > Bill Wendling (1): > pgo: rename the raw profile file to vmlinux.profraw > > Jarmo Tiitto (2): > pgo: Limit allocate_node() to vmlinux sections > pgo: Fix sleep in atomic section in prf_open() > > Kees Cook (2): > MAINTAINERS: Expand and relocate PGO entry > pgo: Clean up prf_open() error paths > > Lukas Bulwahn (1): > pgo: rectify comment to proper kernel-doc syntax > > Mark Rutland (1): > CFI: Move function_nocfi() into compiler.h > > Nathan Chancellor (2): > MAINTAINERS: Add Clang CFI section > x86, lto: Enable Clang LTO for 32-bit as well > > Nick Desaulniers (3): > compiler_attributes.h: define __no_profile, add to noinstr > compiler_attributes.h: cleanups for GCC 4.9+ > Kconfig: Introduce ARCH_WANTS_NO_INSTR and CC_HAS_NO_PROFILE_FN_ATTR > > Sami Tolvanen (1): > pgo: Add Clang's Profile Guided Optimization infrastructure > > Documentation/dev-tools/index.rst | 1 + > Documentation/dev-tools/pgo.rst | 127 +++++++++++ > MAINTAINERS | 25 ++ > Makefile | 3 + > arch/Kconfig | 8 + > arch/arm64/Kconfig | 1 + > arch/arm64/include/asm/compiler.h | 16 ++ > arch/arm64/include/asm/memory.h | 16 -- > arch/s390/Kconfig | 1 + > arch/x86/Kconfig | 6 +- > arch/x86/boot/Makefile | 1 + > arch/x86/boot/compressed/Makefile | 1 + > arch/x86/crypto/Makefile | 3 + > arch/x86/entry/vdso/Makefile | 1 + > arch/x86/kernel/Makefile | 3 + > arch/x86/kernel/vmlinux.lds.S | 2 + > arch/x86/platform/efi/Makefile | 1 + > arch/x86/purgatory/Makefile | 1 + > arch/x86/realmode/rm/Makefile | 1 + > arch/x86/um/vdso/Makefile | 1 + > drivers/firmware/efi/libstub/Makefile | 1 + > include/asm-generic/vmlinux.lds.h | 32 +++ > include/linux/compiler.h | 10 + > include/linux/compiler_attributes.h | 19 +- > include/linux/compiler_types.h | 2 +- > include/linux/mm.h | 10 - > init/Kconfig | 3 + > kernel/Makefile | 1 + > kernel/gcov/Kconfig | 1 + > kernel/pgo/Kconfig | 37 +++ > kernel/pgo/Makefile | 5 + > kernel/pgo/fs.c | 413 ++++++++++++++++++++++++++++++++++ > kernel/pgo/instrument.c | 188 ++++++++++++++++ > kernel/pgo/pgo.h | 211 +++++++++++++++++ > scripts/Makefile.lib | 10 + > 35 files changed, 1130 insertions(+), 32 deletions(-) > create mode 100644 Documentation/dev-tools/pgo.rst > create mode 100644 kernel/pgo/Kconfig > create mode 100644 kernel/pgo/Makefile > create mode 100644 kernel/pgo/fs.c > create mode 100644 kernel/pgo/instrument.c > create mode 100644 kernel/pgo/pgo.h > > -- > Kees Cook