Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4541044pxj; Tue, 22 Jun 2021 02:35:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0Cx2YGavaSdcHQbofyBDYct+3qA3s4ZX+v1kdTkf7vZwdOSwzJr3qH/cleIRxege7l4OW X-Received: by 2002:a05:6402:100e:: with SMTP id c14mr3590738edu.51.1624354545353; Tue, 22 Jun 2021 02:35:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624354545; cv=none; d=google.com; s=arc-20160816; b=JXqIEicq6K7GXSSE2oA453iTznOY3kcYI9b3TO8/3laPIO6cNbHL5QHV7TprtjzJJQ XndVZNgBFeCVT/SG7e/HZvBmpcTnZ5DNuOJOCR81dYd2/Bo1yQCdr/O3pLl6vYwWqpE1 kvkLDswEaTfg60F/E65q8UffM5zL3TJN2zcwrtYQVQudYk7RtyBp4SqqaDxIBD+/GyHR 9Q7LA2+HpgJ56/ZX0oKeJRKsF3cciMc2I3XmA/oAn5CJu/nlfsoVQ+Vmt5gicaapAibl k2zN+wsb6OnJass5ZCaI/sjQ1L4RtSYLXeVy0yO+hEk2B4v04g/5liHeQKFanqRpmr1C 5j0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=q/kOB4NKVpOx4buNmAVOSPQSRCs7ghgBdjl2ofeD1UY=; b=ofAAWUwfDB3kgZPqhNNmy8EfPisAtg17TJ/hR8a4W76KaYgysOpxV0s9bC7Ol8MvuG wHTBaAHPzSJ2Phcd+hvq/0YtiODm4a2lDWZWlyScPFcyxo2NFhl5wUoutEZaVjE/9Hs2 OCAFI6VE0IY/M5FS2NGyGV2gnF2v0KqdT6/a7QMUexKJfAugU5NcyCyvM54cn6iMBbVX IPyMiYxXOXq21dVmIl6mCTMJCLKXJYruFdq0AObpfGKNkOymyeizJqBDHPMIsvYIdOaB jTdMSLFrdI5lmogC2SkjQHZitkzOvQRn45VnAXM01MGKCoNfOIaGdVzeiOLtX5Y0m9S4 yj6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=B3rySooA; 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si19191601edt.177.2021.06.22.02.35.23; Tue, 22 Jun 2021 02:35:45 -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=@ibm.com header.s=pp1 header.b=B3rySooA; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229917AbhFVJgP (ORCPT + 99 others); Tue, 22 Jun 2021 05:36:15 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41664 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbhFVJgO (ORCPT ); Tue, 22 Jun 2021 05:36:14 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15M9SEc9129533; Tue, 22 Jun 2021 05:33:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pp1; bh=q/kOB4NKVpOx4buNmAVOSPQSRCs7ghgBdjl2ofeD1UY=; b=B3rySooAldKi+TpuBkc68WvK+ISXh17O9NHym2k8b5DygnZNQyfG5uoGPhcV7MIkQA8+ 5u78W72sTaIRWNWyYeqT/4r4B7cFbEW2y6JBFz4Rqf+lYQh5vWDk0Mk4GK7cyWER+0GY cYPP5hv/G9YFauG5g68j+oZ+34QBz+gaJQWSrexIRf/gz7F5i76YOmnWU45FUJ6b5O66 AJaZ5/4lrS/SWR/bwuF4lpMviOJh8PIWz0PfeWaCttWS+1zhmdxZ9YzPEiT0lNh2bQ7i A+SU0V4kHseHlgWfMNnrCs7gTyyWJSfznQNF/ud8V515xDb186x6FbTZP383aFP1Alk0 LQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 39bct1h0hh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Jun 2021 05:33:33 -0400 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15M9T655134078; Tue, 22 Jun 2021 05:33:32 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 39bct1h0gj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Jun 2021 05:33:32 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15M9RbTB000559; Tue, 22 Jun 2021 09:33:30 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03ams.nl.ibm.com with ESMTP id 3998789bf3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Jun 2021 09:33:30 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15M9W7Bn34603406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 22 Jun 2021 09:32:07 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 32B1CAE051; Tue, 22 Jun 2021 09:33:27 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0CAC4AE04D; Tue, 22 Jun 2021 09:33:26 +0000 (GMT) Received: from osiris (unknown [9.145.20.128]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 22 Jun 2021 09:33:25 +0000 (GMT) Date: Tue, 22 Jun 2021 11:33:24 +0200 From: Heiko Carstens To: Nick Desaulniers Cc: Kees Cook , 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, Vasily Gorbik , Christian Borntraeger , linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Catalin Marinas Subject: Re: [PATCH v2 3/3] Kconfig: add ARCH_WANTS_NO_INSTR+CC_HAS_NO_PROFILE_FN_ATTR, depend on for GCOV and PGO Message-ID: References: <20210621231822.2848305-1-ndesaulniers@google.com> <20210621231822.2848305-4-ndesaulniers@google.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210621231822.2848305-4-ndesaulniers@google.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 3zDGCVJf9g2k5E222QjL_kpljCj0uR2S X-Proofpoint-ORIG-GUID: wOSKkkZu1vnWUXVoAF3BJoqRyevFgeXb X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-22_05:2021-06-21,2021-06-22 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 priorityscore=1501 impostorscore=0 clxscore=1011 phishscore=0 suspectscore=0 mlxlogscore=870 mlxscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106220058 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 21, 2021 at 04:18:22PM -0700, Nick Desaulniers wrote: > We don't want compiler instrumentation to touch noinstr functions, which > are annotated with the no_profile_instrument_function function > attribute. Add a Kconfig test for this and make PGO and GCOV depend on > it. > > If an architecture is using noinstr, it should denote that via this > Kconfig value. That makes Kconfigs that depend on noinstr able to > express dependencies in an architecturally agnostic way. > > Cc: Masahiro Yamada > Cc: Peter Oberparleiter > Link: https://lore.kernel.org/lkml/YMTn9yjuemKFLbws@hirez.programming.kicks-ass.net/ > Link: https://lore.kernel.org/lkml/YMcssV%2Fn5IBGv4f0@hirez.programming.kicks-ass.net/ > Suggested-by: Nathan Chancellor > Suggested-by: Peter Zijlstra > Signed-off-by: Nick Desaulniers > --- > Changes V1 -> V2: > * Add ARCH_WANTS_NO_INSTR > * Change depdendencies to be !ARCH_WANTS_NO_INSTR || CC_HAS_NO_PROFILE_FN_ATTR > rather than list architectures explicitly, as per Nathan. > * s/no_profile/no_profile_instrument_function/ > > arch/Kconfig | 7 +++++++ > arch/arm64/Kconfig | 1 + > arch/s390/Kconfig | 1 + > arch/x86/Kconfig | 1 + > init/Kconfig | 3 +++ > kernel/gcov/Kconfig | 1 + > kernel/pgo/Kconfig | 3 ++- > 7 files changed, 16 insertions(+), 1 deletion(-) For s390: Acked-by: Heiko Carstens