From patchwork Sat May 30 14:12:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Carter X-Patchwork-Id: 11580419 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 BCE0B157C for ; Sat, 30 May 2020 14:13:08 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 25FCD20723 for ; Sat, 30 May 2020 14:13:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="SXoQBLmA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25FCD20723 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-18900-patchwork-kernel-hardening=patchwork.kernel.org@lists.openwall.com Received: (qmail 11785 invoked by uid 550); 30 May 2020 14:13:04 -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 11692 invoked from network); 30 May 2020 14:13:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1590847972; bh=WpWBS1h4iFsnXoGPg78caQDYyu6KqHawDxsVmNiamSU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=SXoQBLmAwSGqo4tCeYU/Zx9q0f8qgnTmsZDu0G7HdehPbWQCuNOyWD4hlShL3v1wU V4kvaRPWDV8F03mTCEs9zNuwGmN5D5Ta3KTD6Lz2yK0ctUboEri3uCTOLlm5ypOuya 41N0gKDM6Bu8g+tk8Cer+K8PeREDkRODuJ/oc7SY= 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 v4 1/3] drivers/acpi: Add new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY Date: Sat, 30 May 2020 16:12:16 +0200 Message-Id: <20200530141218.4690-2-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200530141218.4690-1-oscar.carter@gmx.com> References: <20200530141218.4690-1-oscar.carter@gmx.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:/rzWHQBS9mAF5Dq69ySv2ghKTMSNoHsXtrY06FlbNlCLctBog2h GquuZ3gO8MDe6A8Z2BaeYjzuJ3fh0mT886iSp+41lefypofuNPMxqsapdxBE/HvGX24Ad+c x01aB3qMVALCkK4+nFlABsd3pJnKDuOUSKfFoUNRwgnmSU04m+fnLHMLN9HJoOvAEV5W+Ev aexHAq7rgG/Pz+XyFr/ZQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:rZJg1BspP+4=:g9tGS7uJEgIj9WdvSdDiK5 eJGRfi22XrohexF0AwzPv1+wsZtsv3A5+ArDMBs8BzoRlBQ//i9qJQnzC4uaA19S+tINecsYU B0Yf9/pnsP8FRRqouS6MW5Nc8Eere+xEh88Er04vnu5SacWm3uFp2y1HGTb73EINDQ2c1thb/ Pz5urOY1VyPyy+DHe0Txhz0V8E639SStcjTVUIHzY6zvGGNJCfwCKwk9m7Arm8ArWOSQW9LXN ybRUWSmBZAPJiFVBqI7WkY13i0CTebH/dAIk0462nnEunCZ5E64LQQv4J6LGYPMBKvDQ0+WvR lRUK2MxwSUFGeUvigQBJdQ2QybiS0dOe5vYHcbn/ahpfbAPUub/razB5lOWwb/xKvqjIXKQYW tBLSv7k8dSf63PlrvG2wR0r6YbLan53+GCYNY1kwvNRj98/vS7lXZEv7ps2BZvlIrSE3DE0yN N4i9tAsjGoA/PAfs6YBO6KqNHANA4hyL3NCmL4h/vTfjDksKXXKGPuSO42nGrucLI1abHl/xX 2mthkRQfb0Wf7BBWVhkXiPNgJavDKmfgzj5WSv/zHkwORdvS3OPLN2QcupgSxvudMzaW3TDFr nLm37xUgf7JRFZaxer5RKDE4tIKIo0im/ZnBsEy2QTkJau+pXpwaKo4Gm7b0C7YqLra5XRIyi bd6r6cZnQEG32eQ8hlZJtmeQGBdD2dpluaeA82CNVchtd/l6/bZ8gLKfLX1lKbmLSOftGiCzI aFaXA5l3eo5Ar9kYQyKeWEwa6WgHRBt3vtrCKU+PeNMzjuqW004WZ8dccclcrkQE8/V9LJL0i JLFBoUy86NzTfw7ONaDYgoJPXqIKUcyOYq13ZLmhE5CtBSS48D0RGiiNbTS78newGnjkq+8bQ V3ZDeVM6UVtDWW7aIttkpsugnBkIOy5sHxJtjUgeQtFXKAhR6JoUhzKuINzkcT3IxMG7ZL/V9 tTYltu9MYlbXO0w+Ag6mKEiTQIzHohiQCeR2vfJW+IdtWwTz49HVnlKT4aQ45kdF1RH2PSu62 /bY+fMKsErE9Aj2aRx9DbZUaWC5cCJirEhaz+w5pt0gOcFm4eGvl2+RZvbCbZuNmGkUH41BFB 5E+kIWR6gfaOZxFr/gVWmXzI02dIeHXBxxutqTiZMQKR6xnSfyj0twurmm+m5Nk6ETzVAqso1 3KhjSLlShUEdFu3+YEjFuVODEvpO6CJCSaPmonG3Y4M64nF+3EHphKxjjpoQHfJca+gmdzdRD Xk2glYlcudPVNtjTT 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. 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:12:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Carter X-Patchwork-Id: 11580423 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 48DBC739 for ; Sat, 30 May 2020 14:13:16 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id A3ADA2076B for ; Sat, 30 May 2020 14:13:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="KOnE/fEg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3ADA2076B 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-18901-patchwork-kernel-hardening=patchwork.kernel.org@lists.openwall.com Received: (qmail 12146 invoked by uid 550); 30 May 2020 14:13:08 -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 12061 invoked from network); 30 May 2020 14:13:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1590847975; bh=VwkT9W/eCoeMypTuqR4X64dMx6qnkNnC0OSefVf8Ut0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=KOnE/fEgwMGIRcV+X+JFG01J41kK3TwmN9khzSF4Hs5bGbrBGra/AXxWnznHG8uKe y3OEWZ8tm0uojFo01dFKzmP/qO6u0r8dVfQLESHtGaa4YsRLl7grwP97KmEXAC+qCm 0X/KXT+9pKxM5S7LL2oWVay1wvTDC2b+Q9O/T8fc= 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 v4 2/3] drivers/irqchip: Use new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY Date: Sat, 30 May 2020 16:12:17 +0200 Message-Id: <20200530141218.4690-3-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200530141218.4690-1-oscar.carter@gmx.com> References: <20200530141218.4690-1-oscar.carter@gmx.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:KSFJmjg5dkwrVKgtoNNJGFp5HGBWuPjWSuoaFf3Pyd8FrL91ODF D0aKga5ATiXUGeeglnF0FS7il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IokoxABNBUtnI0uWC0XOYY8z 3J3VsfHZGdyMPeeBI/i8agDLEAWc3Pdg9W8/65dC8yo+KCEmUhqo0EKjNalKosY5AxVAmnJjp XIpDTvkSjDZI1f4ZgDo0dPDJI/uBzNPOGtGv/0tUHg4+NuTLxYO9rzO+2IVRYXj8HCg232gag 8E3ZqG1v/UDgNzbf/ypZUvk9/l1zdrmlmlNWixh6fbB5OUuNAumAGRuYbWjDpBaET9aWLI2Kt f2CwRWH5kQHw8W9IXt30iMwNaqVWfQn4Z7RkO4llIfHAXFF1PnDaY9M7XlfdHuopPWopPKyJe /24nvi5DSh6l1di+x27tyBshtMbeSYCLlelnROYVSThNwnKR4UbGGR2r9XELC9EEHAXWg3JCc D2a3kF93yCuK8TXKT 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. 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:12:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Carter X-Patchwork-Id: 11580429 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 110A9739 for ; Sat, 30 May 2020 14:13:24 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 6BC942074D for ; Sat, 30 May 2020 14:13:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="hSVTnX4k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BC942074D 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-18902-patchwork-kernel-hardening=patchwork.kernel.org@lists.openwall.com Received: (qmail 13631 invoked by uid 550); 30 May 2020 14:13:12 -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 13545 invoked from network); 30 May 2020 14:13:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1590847980; bh=4aAFMoHtjyY/Q2RFBNxXGgd+DkpDJi7dqREis+/wdI8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=hSVTnX4kBTDTy1eOv2iIoarNQ3WSaVS2CrZdsj8lVZ0jWEbMJwTSv7u72jBzvRSOI RM21oS1cblvRC7TopVKQzkiJ2PBme/O1qKNmcLnYUnpM+rYAjv15xo2TijiCfUkKKl ureeUaNvnGsIr8hASZdZh773MshbiY4k0/84PF2A= 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 v4 3/3] drivers/acpi: Remove function cast Date: Sat, 30 May 2020 16:12:18 +0200 Message-Id: <20200530141218.4690-4-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200530141218.4690-1-oscar.carter@gmx.com> References: <20200530141218.4690-1-oscar.carter@gmx.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:oHXe89xpsuoMF9wFHTqM4CUIIcLdbkiC6aMpNXHAGF+bxFJyxhO irBB/KIQQ7139fmvSgWKMK3ZYF3yl02bZYtOfk1vK6O6SQ9dj5fwNJ5yYxAx3YiY31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d1QDpMpqjqyW3m1VP7h95SbVCBDkLUxTsB0JaW6x2 ljunxoNZ9of0eV35G7Ehwc5GqtIqUDGmHdIo2q8SJLob5VZ1EgeLuizoeBMD49TKhjPJdea4y qOoYtwuGUjWt53zzNxT9hvB12wvEWpZJ0yX1y7negUfBNOrBs0I/1vLBEw0c2CudxiccrN1VD C8xvX0AMoujHAhSxlqiaV6qDCYet4+/5/RGUhoOBH6fYnRMj7vDM4LXXHTs+WSDKI7QFU5Xls cfTv7qOtJvdjVfgSk90SvYKWeOtZdkTIgmDcY5Ju036K5MdxXQfIBvYMS2vk4dw4ZIxQfHtPR wsHBJqZxNHoe3gfI3 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) \