From patchwork Fri Jun 10 23:35:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 12878209 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DFEA5C433EF for ; Sat, 11 Jun 2022 00:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=fd0SblbFM9hmm/9jDnVH91ui++gmj32wHVsior4gOBk=; b=VqZCHwJ9fbv3L2IapBMVbpxZGe SghgQdZvsJhYzmXqmIzqlmWWhrIVM2aKqPCsoQRfFJCcfNrUXy3471du0yPOYBMKi2IFjdntBfqEO dhgOTWXPtMMk1XIAF3p2pEq4ptGkHhJxsQ3VsVtutOPs9Mqep0+wOSLL+/WBWFO2eDRq0P6gstvcT grHHq8IEHk7AgERXge8dT1LZSeaxgTodOYghbotdxxp8Kk90kXLgIeqDplrxaAWlK02I/zk4qVB69 /bvOURPYf5IlrfSTQRbK14YxbEqOKl0vNTpZg/s7O2HZ13iCMjHacG4aKdU8ukXdM/Tav894aURLd d8tsfpzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzoXQ-00AYyF-FM; Fri, 10 Jun 2022 23:59:36 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzoXO-00AYwD-Lh for linux-arm-kernel@bombadil.infradead.org; Fri, 10 Jun 2022 23:59:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:Cc:To:From:Subject: References:Mime-Version:Message-Id:In-Reply-To:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BpFfLPfj9HB+nDPTA+ic1GSTJwOiZRxRXxANj94F+og=; b=rwR1JCA4D+mOzIx37E+q8kf216 N6IZ7m21//9RMBEs/O9ZrBJ/ZJif7jF2vc0gI7u96/DIUSKcnLupeAysXQOMgXrmakbp/t4G0YTYd BI+jz/gbSOWt08r+4cFlMQI9s1xOeBW5OciYTmjTs+8r8xMZfwmecQuDkRDO9gcFW3Ri7qPB/JF9t 8VmMv9mxeFehNUMCnd9zQlBqM+fOTz2NZjkdKJLwMsLyOoV0jq7lrqvVLU4in/khHLjsUdaTNGSoQ 8yfdujqohd8BXmY5z4lN3RcJJWRt8jDn/njfpZLMETTCzrzJmWB6qXftotcBREXfr3Zg1Z69bYLIg 9zusM8cw==; Received: from mail-pf1-x44a.google.com ([2607:f8b0:4864:20::44a]) by casper.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzoAT-00Eq6S-9t for linux-arm-kernel@lists.infradead.org; Fri, 10 Jun 2022 23:35:55 +0000 Received: by mail-pf1-x44a.google.com with SMTP id z5-20020aa79f85000000b0051baa4e9fb8so293642pfr.7 for ; Fri, 10 Jun 2022 16:35:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=BpFfLPfj9HB+nDPTA+ic1GSTJwOiZRxRXxANj94F+og=; b=VIU2E8VBEnuRL6J8kKKaBjD8BXhxK52WDkoibzeklJoaWsAsTBFYw0i7vQgUm7b/Rr CVcqs0MvSHUk2z1wQJmqYl6LRD9a7E6wR1Yiww5vjlBnbmzidFl4KduEMSd701kZbufQ Hh6DelVz1NQ6J0VlRD43p0xM7oA/p4+Yx6+B2LeVTU9d0AhKd6iKDiADWvarXpp+MCbo T4NH8wPtIoXO3e4155dGRYGkbTWdP4RXnQYt+eDydIia6wTuMsUKDrnafWkf40OpVFYY oWLQbQ+sCUG0yaRW5J3UHrRXATwL5WpwCbHR/7fz6cjuJd46ZeqwwSCsJJ82BGByu5ZD 9Lxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=BpFfLPfj9HB+nDPTA+ic1GSTJwOiZRxRXxANj94F+og=; b=Fb36VMxYhL3DodUpZgTFXAFyhzrpjC77lBioi6yhWr7hkkEgsvS1gu3rs/DgTkStfS 2+S2vVZbQsqsYDvIZ0hNhsB50myN4s1HnAZlfkFXLMxe31BHl8FPs5CCoX8bjESFTT8R 4bOAscVQIQ8nzEwCVFiPIWdAIM8w9kBje7yVmJHplRm3FO4buL8lLlk99tC7RWXWlj8d lpZjtB/fD7CnY+jGf28JFtkON3J+a9X0jU83Cpfq8WuvL7SSSkWLsbJI0lTrEAmXfSoh yU+ozzKXyJsQ0pV2kZIsGPzkawjRhGrQgdCqQhc9Ut5pDrc7S0z7pHIzDJdcB0EtRNfb y1WA== X-Gm-Message-State: AOAM531MP5McoaCuzToZXo7RqlGsDmMm2sraKg3aOoesnzwlW72KB84K KInQ5prziuqd8gp9E7rmLpwEZC9hLisawD3AlHM= X-Google-Smtp-Source: ABdhPJzQj4Y8DD4Bqc8j25Xa6AUeKTnmqV8QeG2OCwDZhwNosr/6RBjo4qVYPKtN34nX09gCNWTcfEMVnXZ0DBxfwpI= X-Received: from samitolvanen1.mtv.corp.google.com ([2620:15c:201:2:f464:6db6:3d47:ed14]) (user=samitolvanen job=sendgmr) by 2002:a17:90b:4a8c:b0:1e2:f378:631d with SMTP id lp12-20020a17090b4a8c00b001e2f378631dmr2195230pjb.58.1654904149509; Fri, 10 Jun 2022 16:35:49 -0700 (PDT) Date: Fri, 10 Jun 2022 16:35:07 -0700 In-Reply-To: <20220610233513.1798771-1-samitolvanen@google.com> Message-Id: <20220610233513.1798771-15-samitolvanen@google.com> Mime-Version: 1.0 References: <20220610233513.1798771-1-samitolvanen@google.com> X-Developer-Key: i=samitolvanen@google.com; a=openpgp; fpr=35CCFB63B283D6D3AEB783944CB5F6848BBC56EE X-Developer-Signature: v=1; a=openpgp-sha256; l=2195; h=from:subject; bh=h/mWD/4PnVCDH1rjLuqLphSlmeevUzDBu9m4dTUTNtM=; b=owEB7QES/pANAwAKAUy19oSLvFbuAcsmYgBio9Uu2/m+W1W7sfPCsrXSMcJKHxwY9rswgwh30C4e Ca56uB6JAbMEAAEKAB0WIQQ1zPtjsoPW0663g5RMtfaEi7xW7gUCYqPVLgAKCRBMtfaEi7xW7lZyC/ 9LLlNqKUqkKdC5hqQA9zDyOBQJJzzdZElwz4yG1TM7N8FBp01GGa8IX21msOvtY45pBbK9IcxQ6+A8 Iggu25/NIDILzcNrfYsIg/KWP57X5PYBPPJnWz5OWGrfASn6jaqvKjum7FzyMLnkt715o3vSnZeW26 KKCI7vgs2WMWrW9677XdM8fPvUdDColtKqMM/yvwiy8yOFjD12LDICUjN3KMG0rdBojzVYG9wa1u1d FIEgEHQ6kfLt+lfR4rilXSnWMkGEEZO8KyMpGeN7m77akc+rSAWGNEQRZu5KFYWFImKu+rtbP/BaPc ttVafKDvdQNCWUVzwvapTVbV4+6WPdbF9RG23M+omQIfUtn+VanK58JCAqh3hbadTb3nLyFquz9lnc AdsLelsSYkpSrCVG76d0NP7md/9zob+oXkWExKc4d4IAERbZ6cT17XWy5q5p7CFKdlw+eWans9qe0L byIHDyMZ4GBbUlvCoEexRHFhhnSH3Vz7i4RWXRK/+ilO4= X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog Subject: [RFC PATCH v3 14/20] treewide: Drop __cficanonical From: Sami Tolvanen To: linux-kernel@vger.kernel.org Cc: Kees Cook , Josh Poimboeuf , Peter Zijlstra , x86@kernel.org, Catalin Marinas , Will Deacon , Mark Rutland , Nathan Chancellor , Nick Desaulniers , Joao Moreira , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev, Sami Tolvanen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220611_003553_504618_1CC36527 X-CRM114-Status: GOOD ( 14.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org CONFIG_CFI_CLANG doesn't use a jump table anymore and therefore, won't change function references to point elsewhere. Remove the __cficanonical attribute and all uses of it. Note that the Clang definition of the attribute was removed earlier, just clean up the no-op definition and users. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook --- include/linux/compiler_types.h | 4 ---- include/linux/init.h | 4 ++-- include/linux/pci.h | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index d08dfcb0ac68..2957edd29252 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -263,10 +263,6 @@ struct ftrace_likely_data { # define __nocfi #endif -#ifndef __cficanonical -# define __cficanonical -#endif - /* * Any place that could be marked with the "alloc_size" attribute is also * a place to be marked with the "malloc" attribute. Do this as part of the diff --git a/include/linux/init.h b/include/linux/init.h index 88f2964097f5..a0a90cd73ebe 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -220,8 +220,8 @@ extern bool initcall_debug; __initcall_name(initstub, __iid, id) #define __define_initcall_stub(__stub, fn) \ - int __init __cficanonical __stub(void); \ - int __init __cficanonical __stub(void) \ + int __init __stub(void); \ + int __init __stub(void) \ { \ return fn(); \ } \ diff --git a/include/linux/pci.h b/include/linux/pci.h index 81a57b498f22..c36c52933c8c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2029,8 +2029,8 @@ enum pci_fixup_pass { #ifdef CONFIG_LTO_CLANG #define __DECLARE_PCI_FIXUP_SECTION(sec, name, vendor, device, class, \ class_shift, hook, stub) \ - void __cficanonical stub(struct pci_dev *dev); \ - void __cficanonical stub(struct pci_dev *dev) \ + void stub(struct pci_dev *dev); \ + void stub(struct pci_dev *dev) \ { \ hook(dev); \ } \