Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3204546pxb; Sun, 26 Sep 2021 08:11:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmYlP4cQWfMEAi59zVxhq8WecFYmwY5wEzZ51HUWBs0TnfEFU5FDUd2i7yiMc6YgxGv15v X-Received: by 2002:a05:6402:54a:: with SMTP id i10mr4561216edx.341.1632669074462; Sun, 26 Sep 2021 08:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632669074; cv=none; d=google.com; s=arc-20160816; b=HLeuLOcde1RA7DljvxE8V/8sEh4hZTJoLv0pIyWlnoGqDx3GVEcmtpZixcTA6Tj2Ge pGC6fBWapqSPspzUg+YW/nzrMGURBmxn0H5S4PPwPXFWGS2UCGP35L/pGZ8vtqBKl5SQ Vl6X87f1NebhQAD3Oa4ICxmerqGLC5djJ1zI2pX6ZXCvAKyHChpX+8x+2Cv5/m11oGWv sgMjrGinMWzU2ibBlxb2caYAsuv7HBBAn7efjMp2P8kd/VUh79+FXzQSAbNnVv7oRycR l9J9HLw/28WusFz+LUD3e9yQDZtcd+QZAHa8F/8Sorfd3QiXFf3k68gd/DKBcHqRaBIb BiqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ADz7NrPOTpj5cH5eFLTAbuzyUTNwCvRtncteUJ2axN0=; b=dKuPT2T682IAp6sSmt80y4hCrF0FpO1jzTvrTjUpDXi8+t1uie/K2yz+R8jIaZY+AA t6TBL3CwSACDYtyO7xmCeFbh2qoGpce3noABSw/T59hcwhCT3apwbAHtDbWJ190s+iUJ 5/+/VgpPXIEN+SVRkPwtvz/0VTNgY+mLWyJraQP74VuUVnZSV/i76vsOAK8nkPGHSNaT 8d5HnDtMDC65ntoVnFuUI58wSnckPFT/u7IuF9GUhHDeGzReMQcctSztrtFcPJEDJEfR VIXV2UuoV13TCm+/tw0V6xylldbrR0CBsNdhnazUa6CXAvrP8bhDzqL8JbKdLN/nOI7v 0bpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mRGrmQKC; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v15si17086472edl.392.2021.09.26.08.10.51; Sun, 26 Sep 2021 08:11:14 -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=@gmail.com header.s=20210112 header.b=mRGrmQKC; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231913AbhIZPKf (ORCPT + 99 others); Sun, 26 Sep 2021 11:10:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231972AbhIZPKc (ORCPT ); Sun, 26 Sep 2021 11:10:32 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4C76C061604 for ; Sun, 26 Sep 2021 08:08:55 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id mv7-20020a17090b198700b0019c843e7233so11310964pjb.4 for ; Sun, 26 Sep 2021 08:08:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ADz7NrPOTpj5cH5eFLTAbuzyUTNwCvRtncteUJ2axN0=; b=mRGrmQKCeyfZO1vkUkxfxWtIH5ebNTFnu0VuQU7fqGHVVXfc/LkeAbpYqCi57oBpkJ aC9H5Yq7DspxeQqkR9C33pDl6JjCJYb8Yyi/WcuqjMgYuxzzZT6B6HXBhJXDRYfh6bMz WCHNYuXGepTogHGihoDBqbx4T7xwSRiTaRYqdZVz44JLxG36XTwYJkPjhQpXbkWI/K73 LELs4VjM773hOVYRnvcJni5PFG+4yMYB6usBVzsK0+n1z2swrmb4IgaklhGVdu1VqhJs 8a/3yqe9oRjgYMq3wdbLnupHtnr903d8a9b7js7o4/s4gL4TPMWwRnbC2mw1GV7jdbZz 0EUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ADz7NrPOTpj5cH5eFLTAbuzyUTNwCvRtncteUJ2axN0=; b=O6hEgEDRcArpEpEBSZ3SR/bXwZ5MLEwjpNp0n9XTNJcvsZCPGGUEpm4gkxiUTMSmqn gqKA3l/h7Q1h3a5onPrXJUirQkFO6nVdhlxlHOxZZr8k7r1Vof8rUJMOzexSPqRNTcZ4 VOyAP5+GmQhPLvUX8o8f39B1vZ2MfL03sb5zcRDpPtMZVO8op2CbD86q/5XHeR1uFQWH C0LNYF+10tUgtCE5qaEdZB/lIvfEbTiPxZHWYx1sfR8OiDY9cD7lYRa5bBLx5hyJZZ72 9D59KZHT5H1++hx2ntxczBhcRg4opDhfnhJq4PAPdIkhRs22EVq4gu3Sk5+nZMGRI885 4Kkw== X-Gm-Message-State: AOAM5321j1hAlAQrytcegqzZdl5vH/LAqeExWFLFVaPbc8gJI0ujOJg3 TWiCDf89yahieIaWjA7JDF+Ow4Ikg6XOWQ== X-Received: by 2002:a17:902:a710:b029:12b:9b9f:c461 with SMTP id w16-20020a170902a710b029012b9b9fc461mr18126885plq.59.1632668935277; Sun, 26 Sep 2021 08:08:55 -0700 (PDT) Received: from localhost ([47.88.60.64]) by smtp.gmail.com with ESMTPSA id a10sm14160271pfn.48.2021.09.26.08.08.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Sep 2021 08:08:54 -0700 (PDT) From: Lai Jiangshan To: linux-kernel@vger.kernel.org Cc: Lai Jiangshan , Kees Cook , Nathan Chancellor , Miguel Ojeda , Nick Desaulniers , "Peter Zijlstra (Intel)" , Sami Tolvanen , Masahiro Yamada , Marco Elver , Arnd Bergmann , Ard Biesheuvel Subject: [PATCH V2 03/41] compiler_types.h: Add __noinstr_section() for noinstr Date: Sun, 26 Sep 2021 23:08:00 +0800 Message-Id: <20210926150838.197719-4-jiangshanlai@gmail.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20210926150838.197719-1-jiangshanlai@gmail.com> References: <20210926150838.197719-1-jiangshanlai@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lai Jiangshan And it will be extended for C entry code. Signed-off-by: Lai Jiangshan --- include/linux/compiler_types.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index b6ff83a714ca..3c77631c68bd 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -208,10 +208,12 @@ struct ftrace_likely_data { #endif /* Section for code which can't be instrumented at all */ -#define noinstr \ - noinline notrace __attribute((__section__(".noinstr.text"))) \ +#define __noinstr_section(section) \ + noinline notrace __attribute((__section__(section))) \ __no_kcsan __no_sanitize_address __no_profile __no_sanitize_coverage +#define noinstr __noinstr_section(".noinstr.text") + #endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ -- 2.19.1.6.gb485710b