Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1382504ybm; Sat, 30 May 2020 07:15:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFwWU+mz65O1l2XgvpImFwqtYfND6TAbGbE2/GvxI/XMCdc2qf0NQyUee9hkekbrhlglpA X-Received: by 2002:a17:906:c112:: with SMTP id do18mr11324520ejc.231.1590848125370; Sat, 30 May 2020 07:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590848125; cv=none; d=google.com; s=arc-20160816; b=OfbYlskjmkEYblB5zs/kFbuiCm1sZD7ErIKCaeeTV51b9ZfW296jZpP3hvS81EJGLD YFAypV2pdvq9RylqHoO7l3VozgxyxT6niIZPG+TGTibiv+c6T1RKqsRxGMveGFi9sljL Z0XplcsHxiGw5tTAG3Kq2ITfZsJqovEKLaCo/o6i9QFK378QeG5W3zFs5ykV4emIhi08 pbSw37teoCpJsmzAq7nrTiXHf151MSP4la3W8pSJeqX/As00DBVaut1qM9dTuDF/Dk2r ilVmR0Pt9ZeCLcawXyqUR/3yISeGuFPM5uUGF3C5/eQK554ZNWARRZX2ejY+cZAIeL9A s7Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=V/chbeLr6Pv/LTlH8AAnPNnkz5qOweKs0s/rBwFUpOc=; b=GPcTjpUY1uD4icNQFaw7bApSklxslnFYvIIao835tAIX9M4EIRnifGjP7yZTGN871q ijuUAzhc5UKfFiZxNk+7H5+f7CfXhNzwVHmoy7IzaITu8RrGx3zgOFytm1LIFYO3yYvT BqeHV2fvCgq3QYPn9gKIQa8KGzFMwtZSAX5Xzn0EYj1eS5WEfnSHf16uzgQ4F2MEsRux wha6u4cIMRLTYuTEbOtF05i2B9RGvdAklc5t7kqlo1TYpL6WIMT957XiypTuCRDKnv0m m4Mc7NDzFg/bZ5nhjjH4+0xJleIXDmPIIhW8ttItKpMyNNtUJNcgTS4i4vdK1tE3Otua IrUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=HoLdFZWV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zo8si3232293ejb.156.2020.05.30.07.15.01; Sat, 30 May 2020 07:15:25 -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=@gmx.net header.s=badeba3b8450 header.b=HoLdFZWV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729072AbgE3ONL (ORCPT + 99 others); Sat, 30 May 2020 10:13:11 -0400 Received: from mout.gmx.net ([212.227.15.19]:34399 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727851AbgE3ONK (ORCPT ); Sat, 30 May 2020 10:13:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1590847967; bh=QrXSg+UsJWP9gK1C6YHtAzZxavSADYLznOMiGJYo0fM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=HoLdFZWVARYEkZXY0/me61dcAuoRwrKz1NSBFVE1YYveqh6oO0YVzWRzHnvdww8Yy htPuc0y2gICBAmFV2Sij79V7rsd/EgBdxnAEnO7n9gJ+paTa/ac0Y+r8DZLBMRLZSl pzyTN6iZb26Gtjh3gW/++oFKbQ8CYdaWy5AzyecA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([83.52.229.196]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MG9kM-1jmiGZ12Ts-00GZCW; Sat, 30 May 2020 16:12:47 +0200 From: Oscar Carter To: Kees Cook , Thomas Gleixner , Jason Cooper , Marc Zyngier , "Rafael J. Wysocki" , Len Brown Cc: Oscar Carter , kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH v4 0/3] drivers/acpi: Remove function callback casts Date: Sat, 30 May 2020 16:12:15 +0200 Message-Id: <20200530141218.4690-1-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:MKwnw8vsgVAwEAVuWa65vsFSug6LsmUBtFRTQuX0nExrfiTk0dD LAgIwS6u5buJEAwX1/thqgEhZqMh78xDqhrn7TONBLWfbmdMLZCdnivpzlM5h72SeeT3ZKk ksOs8/ynSWaFPdFxi7RL3ZnHlYeb3fvQjXAu7FQIJ2T8wfgKE4mfcV/tLoz164Q2HKoyV+F asaKS/TLfp6CpenJkyAKQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ZnBXQf3zzPs=:WNc8x7+IPX6FKsLCUyusxA cNqjWhONlAifoVAqd1jPrY/KDI5fyLupqrtwEzj0/bcrii1jovxCvEzo0V0Wp5qIXQwJRe3wt cRKsgzdDyRtgWBSiLGlaZHPQPBvnlAHxJd+gqL6DtzhpeZciUnlc0mfKkqp6JORNoOhp7izVV TcEgKpBlqc/2/7XZEwdT+UwsnjOxl0eg/8EzatLlZxjyw7whwSZUZ6jWfo+COYRVWQ1wbhLNY 75kn8sQZbpYjJhmiDmDYuUzf2UQF40H/ZFLnm7cnleayCFYQq4ZjrEZzMYHTwpLdGhTQ7apAS Yzk3VklRUuFsJ83kWpz7nwNQ9Wq0HyNdGAjrcZkVHWi44mi7w2oUgbGUJrSsEAr0I++nTxhSt SnNcMKHE/ULRIiuYjkhCl+3ihwcw/8VvKqr1urK0pYA6ecjRolVAs2GXXKpoCxuad3DD5Inv+ dkcLVAio0DG6wq5bXloOfXxktmkflQdIVB4jHqKXF6p07Z9uMNDM5v1eguQYizzR3zlsAt/3A vlA8EPGSSwFlybFXLXHax5p/OrOyqLACBj+Pq1jhz9hsYNzKytN7FOXBDABetbG5lMLpNVCKa 9mVuVhQdEgSkwBF+ATImYD8cU9t2NHgHXUBX6cOapY0DQYC2+6Nl6Q6lA4IEa2bvSPOT8CoY5 9MV2s3T0inxT4ePLjcZkCWxgYuT6eseDlxKRx1znIz44Q2emBvmiZD25t1kRrzFujAMbAzkuo dtb5rsbeD05N4ZDdWgMDIAWTj4OEYEWIVOAMIiQfwFE2PtJ6vOSWkNTej32Ll7kni2Y/zm1Ft 4n9e1Ye7JUbkJybKugn9QnKGcnF3a80TSDKIfqlxzZADvfnf7wibHtNX7etPIDz9wrGyFRFVk AVZABgLOzRuIK3XdaF4k8eC+3wc9x3T1akE6bcR82SIeVCNsfTi/2waIyvjLzL71U4ncnevf4 2b63kOOb678erZz6GqVzqg9C2WqKFiRAv71cWWhUICew6VkqXBPiPXR/Vj37sBC0kIBqlyqVq 1w7SB7xkLD0uVuceRl0hYV60275/UjfAYOpUH2Nj9/+TtOhTuEX16KRX888Ge27SX/bjB1PnH BW+Nis/I/ObxVhEaCG1na0Rglt478FyKbNl6aOf80O3PhpQNP9zAM5MvGN2qzzIJJJGZC3Ob4 u7mByRBf8FOK4tipjmzlCdNr1gvlwlAozjbCVpuzBaGP4eRxbmpZOIHSQWt/6CupZy3MQmGXz Hx+OiafBo0ua2gIpd Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds, there are the need to remove all the function callback casts in the acpi driver. The first patch creates a macro called ACPI_DECLARE_SUBTABLE_PROBE_ENTRY to initialize the acpi_probe_entry struct using the probe_subtbl field instead of the probe_table field to avoid function cast mismatches. The second patch modifies the IRQCHIP_ACPI_DECLARE macro to use the new defined macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY instead of the macro ACPI_DECLARE_PROBE_ENTRY. Also, modifies the prototype of the functions used by the invocation of the IRQCHIP_ACPI_DECLARE macro to match all the parameters. The third patch removes the function cast in the ACPI_DECLARE_PROBE_ENTRY macro to ensure that the functions passed as a last parameter to this macr= o have the right prototype. This macro is used only in another macro called "TIMER_ACPI_DECLARE". An this is used only in the file: drivers/clocksource/arm_arch_timer.c In this file, the function used in the last parameter of the TIMER_ACPI_DECLARE macro already has the right prototype. So there is no need to modify its prototype. Changelog v1->v2 - Add more details in the commit changelog to clarify the changes (Marc Zyngier) - Declare a new macro called ACPI_DECLARE_SUBTABLE_PROBE_ENTRY (Marc Zyngier) - In the IRQCHIP_ACPI_DECLARE use the new defined macro (Marc Zyngier) Changelog v2->v3 - Remove the cast of the macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY (Marc Zyngier) - Change the prototype of the functions used by the invocation of the macro IRQCHIP_ACPI_DECLARE (Marc Zyngier) - Split the changes in two patches. - Add these two lines, to give credit to Marc Zyngier Signed-off-by: Marc Zyngier Signed-off-by: Oscar Carter Changelog v3->v4 - Add a new patch to remove the cast of the macro ACPI_DECLARE_PROBE_ENTRY (Marc Zyngier) - Change the subject of the first patch Oscar Carter (3): drivers/acpi: Add new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY drivers/irqchip: Use new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY drivers/acpi: Remove function cast drivers/irqchip/irq-gic-v3.c | 2 +- drivers/irqchip/irq-gic.c | 2 +- include/linux/acpi.h | 23 +++++++++++++++++------ include/linux/irqchip.h | 5 +++-- 4 files changed, 22 insertions(+), 10 deletions(-) =2D- 2.20.1