From patchwork Sat May 30 14:34:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Carter X-Patchwork-Id: 11580435 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D805B159A for ; Sat, 30 May 2020 14:35:12 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 3DA22206C3 for ; Sat, 30 May 2020 14:35:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="L8gCbXzL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3DA22206C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-18905-patchwork-kernel-hardening=patchwork.kernel.org@lists.openwall.com Received: (qmail 29739 invoked by uid 550); 30 May 2020 14:35:10 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 29704 invoked from network); 30 May 2020 14:35:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1590849298; bh=SSghX4fQBGTxIf7PjXQdIdo641GED8Z6u8uODLHkLDM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=L8gCbXzL6EKPS8AfkRBg60sOFN3vbAALJMC7py8wlXIGGkK4lXWc2EAPK2TxOUUMF 500O/PaQNitoNBNzTQnEXe4ujn59ci6/obkcXdeO4xRRh3uNXURRXPlRqFnqfc/5d+ T8neJQaxaMvvyO0fYNiLbhkDNlGRgWUJ+K1vVR7Y= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c 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 v5 1/3] drivers/acpi: Add new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY Date: Sat, 30 May 2020 16:34:28 +0200 Message-Id: <20200530143430.5203-2-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200530143430.5203-1-oscar.carter@gmx.com> References: <20200530143430.5203-1-oscar.carter@gmx.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:VMbpkJlC9z2iGZqsa3hJwDi6r26hEeojKiR18HY8sccgOf7TldP Rg/Z1TVPSM6eZgVXCLGW3zCDC7NFuS7NnCZ+quqGcOdkFKfic4obopuS/s/xqGXrmpQvlA5 pX7uxhflFk5guHrwZSyxtQ9iRQ3v+yWqMyityiKReB4eB2sEU42wb+WwlvG8Hd4C/hZ2Yoi 5NDs4Q85gOrUd+MKNTAGg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:HOkbiwqPs2g=:4rorHEqjsGladeRvpVY1Jg 5gG1LP/CUqmOXXyFaVWAwBJjwM9NBENHow4ziciD3WSB4g1sC3oARZ9EGCvK+JcyKFbn/Wq7M o2QYoTXwGN0BPcTIMkjiTDuP1kI6N2Mmu3u58dADUsRKJ0g4Vra6cGBx3aj9TCDgUPN2afT/d MbEJaSPDlTUCYSALntyv6JJMHOiHqLka+DslEP4PyYR7AdYSnElpWKxv8FEvCqsxm8wcxB29L NMwhy7Dfo8Hj3+rCEpFQIL9RDcjiO89rrjb7JQYs6GTdAMZn2/0daE0gnPxjh1pipgiP3x7xu /mdwDj4wVMmgW/68sJanmt6yH4DoUrVww0HpB78bsbeGpYGQwctFtOdRqmvwRO6wFAzyxHMZw FBRHG2LFh4w7f8dgNpNMhbl5rTO5/4ATo7NIXyJdCXMewu1LDqRXja+xoKQY8Dxm+SMFTWW+E vvGdfYnR8+G4fibkh1dBCytAFcfhHlVuk3ENSzQQuDZTxJyF4q2E7o6vgCvy9q/U36hKqWkUX UocC8Uu8ZhlaRPK8z4xDKkPUUeqWIqw7GiENWigGwpySXmAaSebvwmC5kejmR+NAb9xpIa+dK FgX/92JfFhvg7icCqzgNhME4onGI3ZOQVhZY24RulzDBnnzwMH4FPIj9AHpocRu3NQUwDYyEs pSuFirNpC/lRYc5XEdZl7s3LUH5edju+twzPir08jnQeRiC/O7EgGW1hntRYxCsIMVC/V4iuU 6dUGiaI1Y2hliNTFIxQ26oaSOfUQNI4XepP2rY4Dai8T2OO33crv6nAj8Q1W2uUtABy2H5xbB y6PlAdiZBsi7WAYScUw6JbJLNFeGpgOqg8erdcdiwvziBRH6XNVhY3QZmiuaBa1PE/2612Bik cJXlJdkm1XkgDAMYaIWCO8cFNEFxjBErbggvQDLipYHw/hRNcTq0ppm3gSWNj6ReCGKVrvWDm ebGk96z00nRLRuE5aNwJvR79zbAnmNTvN3YgZ4Bjtk7U0tN2bAQrzWRjvlqZ1oHzCQgoDhuMj mmJAGP9CSGnrNPfND4Hbo2km3lBtT7HY6rlWsBJ1SDJyePgpANF0WqS/44xDbNS8e959Wkamd tWH39wlrPnifiaC7QVabVxaYAXevLaPVm5NTqEQzhZ+IIfBuYfbNZbaWxz2ZHBspqWLZRVNuI DbLwH0CcSCLipNuz489vq9bPwpLBsLYqn0hRGjSqj/unwmDNgFZeXB4QVnh6VvwXaZoqiB6y1 pqRTmIK4Ats5yAipC 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. To do this, create a new 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. This is a previous work to be able to modify the IRQCHIP_ACPI_DECLARE macro to use this new defined macro. Even though these two commented fields are part of a union, this is necessary to avoid function cast mismatches. That is, due to the IRQCHIP_ACPI_DECLARE invocations use as last parameter a function with the protoype "int (*func)(struct acpi_subtable_header *, const unsigned long)" it's necessary that this macro initialize the probe_subtbl field of the acpi_probe_entry struct and not the probe_table field. Co-developed-by: Marc Zyngier Signed-off-by: Marc Zyngier Signed-off-by: Oscar Carter --- include/linux/acpi.h | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.20.1 diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d661cd0ee64d..cf74e044a570 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1154,6 +1154,17 @@ struct acpi_probe_entry { .driver_data = data, \ } +#define ACPI_DECLARE_SUBTABLE_PROBE_ENTRY(table, name, table_id, \ + subtable, valid, data, fn) \ + static const struct acpi_probe_entry __acpi_probe_##name \ + __used __section(__##table##_acpi_probe_table) = { \ + .id = table_id, \ + .type = subtable, \ + .subtable_valid = valid, \ + .probe_subtbl = fn, \ + .driver_data = data, \ + } + #define ACPI_PROBE_TABLE(name) __##name##_acpi_probe_table #define ACPI_PROBE_TABLE_END(name) __##name##_acpi_probe_table_end From patchwork Sat May 30 14:34:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Carter X-Patchwork-Id: 11580439 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 69A80159A for ; Sat, 30 May 2020 14:35:19 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id C3F312074D for ; Sat, 30 May 2020 14:35:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="Gage6s6P" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3F312074D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-18906-patchwork-kernel-hardening=patchwork.kernel.org@lists.openwall.com Received: (qmail 30279 invoked by uid 550); 30 May 2020 14:35:15 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 30190 invoked from network); 30 May 2020 14:35:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1590849303; bh=neh9UrSP9bO+wKS/cV7Mb81hOYu1y9//cRNSX6IME/o=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Gage6s6P+ywkOKvWAUrO/6qoivELPDqxdLIDl7Gi2GWRuVJ8xx45oAKhuehIP5qlt O1YyDs/DsSke1xiq6Qsyri2WFKGoe0FSGISrgwU7wXhNKem/fX01m3Pj5ZKXVkR8Di vT36vpjo0yOEOqpPvDdPykXIgSVtfNWy3/MwgBgM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c 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 v5 2/3] drivers/irqchip: Use new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY Date: Sat, 30 May 2020 16:34:29 +0200 Message-Id: <20200530143430.5203-3-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200530143430.5203-1-oscar.carter@gmx.com> References: <20200530143430.5203-1-oscar.carter@gmx.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:M4l/lu2Ot1isOnN2R13KTRlp5jrXN1XOyn2M/ueqxzZSv7vJOol B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Fz+p/me80JHtwJECQ2BI7K+mpf6DHOHCklNZHvW9E2DRHOVGP4w lKiEtAmwptzHL553zERLTNKztFCgomtt7x5mhpjtYRt3Xz4PaBzEzHXnTOqAXubeV2xGqlP9r 0i8a5p7VI61JByjOXDlQpuNVv6Bpq19u2/KIOFS1/pwfm7iZBgb+LrLLgAZmPSdYpDd+5Z9NB 3ffH/lpB7yBuqres4SKTOvZl0k176MSMVFy2N7UBCaFAbqKBYUt4otf5HBAvPO+fJT4uyx3ci 3B9R+ZUYf6/1A27MM1EFdaXRUbPKlz76tVQ747vlrI+uoeImupOseTAfzXCQJCtD0qmmz9gDq B73bJxilzmR7RVBVnzgTK1fNRD4HqLbVZ73lyumWQlKYX29KJhDuGYZEiGgKnQ131T/VbQjcJ NGGlGTrjbdItsZhPR 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. To do this, modify the IRQCHIP_ACPI_DECLARE macro to use the new defined macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY instead of the macro ACPI_DECLARE_PROBE_ENTRY. This is necessary to be able to initialize the the acpi_probe_entry struct using the probe_subtbl field instead of the probe_table field and avoid function cast mismatches. Also, modify the prototype of the functions used by the invocation of the IRQCHIP_ACPI_DECLARE macro to match all the parameters. Co-developed-by: Marc Zyngier Signed-off-by: Marc Zyngier Signed-off-by: Oscar Carter --- drivers/irqchip/irq-gic-v3.c | 2 +- drivers/irqchip/irq-gic.c | 2 +- include/linux/irqchip.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) -- 2.20.1 diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index d7006ef18a0d..3870e9d4d3a8 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3.c @@ -2117,7 +2117,7 @@ static void __init gic_acpi_setup_kvm_info(void) } static int __init -gic_acpi_init(struct acpi_subtable_header *header, const unsigned long end) +gic_acpi_init(union acpi_subtable_headers *header, const unsigned long end) { struct acpi_madt_generic_distributor *dist; struct fwnode_handle *domain_handle; diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 30ab623343d3..fc431857ce90 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -1593,7 +1593,7 @@ static void __init gic_acpi_setup_kvm_info(void) gic_set_kvm_info(&gic_v2_kvm_info); } -static int __init gic_v2_acpi_init(struct acpi_subtable_header *header, +static int __init gic_v2_acpi_init(union acpi_subtable_headers *header, const unsigned long end) { struct acpi_madt_generic_distributor *dist; diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h index 950e4b2458f0..447f22880a69 100644 --- a/include/linux/irqchip.h +++ b/include/linux/irqchip.h @@ -39,8 +39,9 @@ * @fn: initialization function */ #define IRQCHIP_ACPI_DECLARE(name, subtable, validate, data, fn) \ - ACPI_DECLARE_PROBE_ENTRY(irqchip, name, ACPI_SIG_MADT, \ - subtable, validate, data, fn) + ACPI_DECLARE_SUBTABLE_PROBE_ENTRY(irqchip, name, \ + ACPI_SIG_MADT, subtable, \ + validate, data, fn) #ifdef CONFIG_IRQCHIP void irqchip_init(void); From patchwork Sat May 30 14:34:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Carter X-Patchwork-Id: 11580445 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ECACF913 for ; Sat, 30 May 2020 14:35:27 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 54F1D206EB for ; Sat, 30 May 2020 14:35:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="B1TeUi/l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54F1D206EB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-18907-patchwork-kernel-hardening=patchwork.kernel.org@lists.openwall.com Received: (qmail 32196 invoked by uid 550); 30 May 2020 14:35:25 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 32117 invoked from network); 30 May 2020 14:35:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1590849313; bh=4aAFMoHtjyY/Q2RFBNxXGgd+DkpDJi7dqREis+/wdI8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=B1TeUi/lsLdF61Cx4hYcW/cBgnibwLwuRW8TIyY20DvfuYMbFI6azop1w/Ka/HlJF k2N8TjmeSS5vrZw4NSVNs0SynWkcLuD61v0+QykvYZGmrUgZQjsP2Z+9u+dfL7PMiX H0fehQpsOV/7diTaCdHRhK1cn0baJaNWjT+Dw6Eg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c 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 v5 3/3] drivers/acpi: Remove function cast Date: Sat, 30 May 2020 16:34:30 +0200 Message-Id: <20200530143430.5203-4-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200530143430.5203-1-oscar.carter@gmx.com> References: <20200530143430.5203-1-oscar.carter@gmx.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:6xz29xMs/Yu3U3voBqqhgHSTkGGG3eO26WFOTSFpn94tiVLeGJo 9391DE3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g1vT+Hw1ukORnGy6Vz bkHBtZ/bJEg7kmDzck0B4TzEZ4kRVPdU14WuyMmjVTqLB1kHZNazJVf6RD0nyisLdDNzsJ79i dJ8B2Iw2EBT5u0Lyg94nfI4FmZpnbuYE0fcPGFEoKlrSddCrz9gBgq22iV6M08Yta1S8f+Xee qx+Fi1N+kQlK4WFtF4RpJbEEH2kSTox9zT7pIFOGtOpM9h0AG9kU+neVHupNUhAOccdTIqrzi LwErGzOsxjL5zfA7dzVidm8TCtUwmtKV7w9T30/yKgDjvADpq0y7SWxd3jUC/tCXl0gtiu6JF jGY4TAS8EcYhp7rlKHTKZsjqXHxSFTFm/ggYn1hDtNy6XmeMhD70WZoGxbc+FGIOoaGoc52kz yDcHrSEHvk7L1KtDG Remove the function cast in the ACPI_DECLARE_PROBE_ENTRY macro to ensure that the functions passed as a last parameter to this macro have the right prototype. This is an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds. Suggested-by: Marc Zyngier Signed-off-by: Oscar Carter --- include/linux/acpi.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.20.1 diff --git a/include/linux/acpi.h b/include/linux/acpi.h index cf74e044a570..1cda2d32e4c4 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1143,16 +1143,16 @@ struct acpi_probe_entry { kernel_ulong_t driver_data; }; -#define ACPI_DECLARE_PROBE_ENTRY(table, name, table_id, subtable, valid, data, fn) \ +#define ACPI_DECLARE_PROBE_ENTRY(table, name, table_id, subtable, \ + valid, data, fn) \ static const struct acpi_probe_entry __acpi_probe_##name \ - __used __section(__##table##_acpi_probe_table) \ - = { \ + __used __section(__##table##_acpi_probe_table) = { \ .id = table_id, \ .type = subtable, \ .subtable_valid = valid, \ - .probe_table = (acpi_tbl_table_handler)fn, \ - .driver_data = data, \ - } + .probe_table = fn, \ + .driver_data = data, \ + } #define ACPI_DECLARE_SUBTABLE_PROBE_ENTRY(table, name, table_id, \ subtable, valid, data, fn) \