From patchwork Fri May 13 20:21:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 12849385 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 6D9B9C433F5 for ; Fri, 13 May 2022 20:25:48 +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=d0KZ77v5kO4gBAT3YYZSAcEzD9iVhlPXD9Wxs5jhYZw=; b=3WYpmtfpTpFE7YL/RD58CcVNLC tu9KIPjMlCiUhesKmVz624TI6ZV/pViRWlL42xF3PFdEEmpSJ5K+OY4Q3ToO2UlLURSPqkoLETPDE lDyDD2TYtxiMQAz93u0DHk9pBOBMuo21cKoDcMRQgmwIrPJv0WhhmQQz+9kVlcUrvOJ5rouzBXvrE ZUhg4cFDiJR5l4Zf6yoWysp91XHvpfQEEaRj92brh9fjZydh9mJocRh1rUunC01FcCc+E+JJiHEmU /BdRcGMJTxGXMlXRpO862uaW435EsWVTJ9q+//nrXMXbqE93LKiuVFMxVuSM1P1W0QheCCpyDoZAC 2rIvoMLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1npbq2-00HSQT-MF; Fri, 13 May 2022 20:24:38 +0000 Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1npbnp-00HRJc-VM for linux-arm-kernel@lists.infradead.org; Fri, 13 May 2022 20:22:23 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-2f4e17a5809so81517657b3.2 for ; Fri, 13 May 2022 13:22:21 -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=bOpzM5rX2l4ip7yxSBZMEDJLuv66hWELCctweBJJHks=; b=rL/hL6OntTIlT6+vghCQAiZfUmoZf+JKLSwkZf+IrrsNgssVEJVawitmFaYY55jmBe amD7Eq+wsfiNCduzWZ9qsgP4L4Eaoz5WdsbalKIQn6dmzQtZSjg5Ws94G9xU2GMA3379 ptYLd/GCT/HZYVruQu1ULOS8r60MhY8tYFWaQkLiwx/jHZy3Hv8nqZJGcbTTlO61CRHO Ui5viFE1OPI2iQTd8ZFgpeNNg8UIf9lxq/5l0yMHnkI4aHbNASnhtiPtCkKN6ow4/8Gy Buw+p+M5hlwFYUt71jzAT461tK+NYI45ChnwXdq3pjmdEybkufp0sSLOl8jFCSlKjOtr c9KQ== 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=bOpzM5rX2l4ip7yxSBZMEDJLuv66hWELCctweBJJHks=; b=yWcDZZ0+NTCSB4tGo7utHUTXDyPNw8QODHtVl+J4tP8IPXoDc+XwFbwC1Ui6jokSQ1 yeAIPSTD07kKdxrrpInfI230QDCk6Tm9s9SGacF/hyLS9Xdl8Lu7vrY1MKHVYMrd0TqV TECrHV+lqqnmDoijqcJ0WumvQjmi2ighJ8qgNlBtZNVPiDlmIft/46IJ1EeohQyskwZa hWACuemtHJrdZLRM1Z32Jfji/sOKWs0tqQJGWD8Rs+R6zK2J5claAKAUoBCVHzInJdqr vu/tHO4vqsk58rnBieiR4znusE6V+17IqZJRB9FopOWFQQ45r3cOWR5ZD4ijsCP9wXMf DIWw== X-Gm-Message-State: AOAM532aoc8MUtGLGa1hp0KGJ2kc6mP+YsZ/oc04fMSQmh+LaAoMtYgf XuXguQSzO9CiNNZz7hvEyfHxD6PvqdyQy0uYQ2k= X-Google-Smtp-Source: ABdhPJwWzw5BAhCv70kXSSaCh7PhBQVVl4ghLTYlA0W/0QO97ijY+sTWmPSKw5zlsA+je25PPHFJReZCMSvJtqlJTmo= X-Received: from samitolvanen1.mtv.corp.google.com ([2620:15c:201:2:e0:c17e:c2dc:13eb]) (user=samitolvanen job=sendgmr) by 2002:a25:b320:0:b0:645:6969:52f4 with SMTP id l32-20020a25b320000000b00645696952f4mr6410598ybj.466.1652473340628; Fri, 13 May 2022 13:22:20 -0700 (PDT) Date: Fri, 13 May 2022 13:21:46 -0700 In-Reply-To: <20220513202159.1550547-1-samitolvanen@google.com> Message-Id: <20220513202159.1550547-9-samitolvanen@google.com> Mime-Version: 1.0 References: <20220513202159.1550547-1-samitolvanen@google.com> X-Developer-Key: i=samitolvanen@google.com; a=openpgp; fpr=35CCFB63B283D6D3AEB783944CB5F6848BBC56EE X-Developer-Signature: v=1; a=openpgp-sha256; l=835; h=from:subject; bh=HH1ZoZ4U7IrTG0qT02hkMGqwA8ikkqMw52ht6iNCIe8=; b=owEB7QES/pANAwAKAUy19oSLvFbuAcsmYgBifr3j/HnryEij1/HDUc2sbZLQyYN7d6556HPZq1qT l1xSJNOJAbMEAAEKAB0WIQQ1zPtjsoPW0663g5RMtfaEi7xW7gUCYn694wAKCRBMtfaEi7xW7ktXDA CU67UkQ9+rP6BZrl4m0BX4xUiwzSmmKPLl9nByQ7yxpXu6x9cOxvsh7U+Y+kdEvD+wXiJX/83jCg88 viRNpRYeMvJXxI1DPEyJhK+E2GSrC8RfNlnOKOCBWyBm9pDr7/akIxQSKPItAZ9NR9hoZDzYxImk2b kFlY7+tt3abbniKqgwD2SlAe9ab1jJeTDp1b8ijpK85f3dEHhJtGWHn4ijrJQWlimUHtN4amn+DJmV I7Ti8ClmSh7Lky12ga65DmJQ3s1WHHj5ZrZGalNG25evyzYj+FTwpvEv/D9IRDB2+brvZ/pidt0x7N F1EQbzuYgZCDrr4PNCycx1HLCBZ4pC1q+96fvrsjj4UyPP6hEiyzGaqhTM211QovCAKh8N5YyyY8Kq cgmRTA/+rmphPKNrl6e434tN7thBoUXXn9pnTlR1B7tNq5ZAio1MvLBno+7zYk2Lthd97TwEgrcjPV xYOFqJC1W7SajhbCnMeZUuTW5HZSIq64lZnTLiQXLJKfU= X-Mailer: git-send-email 2.36.0.550.gb090851708-goog Subject: [RFC PATCH v2 08/21] psci: Fix the function type for psci_initcall_t 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-20220513_132222_046757_45614990 X-CRM114-Status: GOOD ( 12.88 ) 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 Functions called through a psci_initcall_t pointer all have non-const arguments. Fix the type definition to avoid tripping indirect call checks with CFI_CLANG. Reported-by: Mark Rutland Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook --- drivers/firmware/psci/psci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index cfb448eabdaa..6554bf4b8c99 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -521,7 +521,7 @@ static int __init psci_probe(void) return 0; } -typedef int (*psci_initcall_t)(const struct device_node *); +typedef int (*psci_initcall_t)(struct device_node *); /* * PSCI init function for PSCI versions >=0.2