From patchwork Thu Feb 20 16:29:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 11394497 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 6B5EB159A for ; Thu, 20 Feb 2020 16:29:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 554D624672 for ; Thu, 20 Feb 2020 16:29:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728406AbgBTQ3q (ORCPT ); Thu, 20 Feb 2020 11:29:46 -0500 Received: from inva021.nxp.com ([92.121.34.21]:58946 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726871AbgBTQ3p (ORCPT ); Thu, 20 Feb 2020 11:29:45 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6343A200BED; Thu, 20 Feb 2020 17:29:43 +0100 (CET) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 54446200BC4; Thu, 20 Feb 2020 17:29:43 +0100 (CET) Received: from fsr-ub1864-112.ea.freescale.net (fsr-ub1864-112.ea.freescale.net [10.171.82.98]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 2BDDD20328; Thu, 20 Feb 2020 17:29:42 +0100 (CET) From: Leonard Crestez To: Shawn Guo , Dong Aisheng Cc: Fabio Estevam , Michael Turquette , Stephen Boyd , Stefan Agner , Linus Walleij , Alessandro Zummo , Alexandre Belloni , Anson Huang , Abel Vesa , Franck LENORMAND , kernel@pengutronix.de, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org Subject: [PATCH v2 0/8] firmware: imx: Align imx SC msg structs to 4 Date: Thu, 20 Feb 2020 18:29:31 +0200 Message-Id: X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org The imx SC api strongly assumes that messages are composed out of 4-bytes words but some of our message structs have sizeof "6" and "7". This produces many oopses with CONFIG_KASAN=y: BUG: KASAN: stack-out-of-bounds in imx_mu_send_data+0x108/0x1f0 It shouldn't cause an issues in normal use because these structs are always allocated on the stack but tools like KASAN are very useful on stable kernels. Chnages since v1: * Split into many patches with individual fixes: tags Link to v1: https://patchwork.kernel.org/patch/11376909/ Leonard Crestez (8): clk: imx: Align imx sc clock msg structs to 4 clk: imx: Align imx sc clock parent msg structs to 4 firmware: imx: misc: Align imx sc msg structs to 4 firmware: imx: scu-pd: Align imx sc msg structs to 4 firmware: imx: Align imx_sc_msg_req_cpu_start to 4 pinctrl: imx: scu: Align imx sc msg structs to 4 rtc: imx-sc: Align imx sc msg structs to 4 soc: imx-scu: Align imx sc msg structs to 4 drivers/clk/imx/clk-scu.c | 8 ++++---- drivers/firmware/imx/misc.c | 8 ++++---- drivers/firmware/imx/scu-pd.c | 2 +- drivers/pinctrl/freescale/pinctrl-scu.c | 4 ++-- drivers/rtc/rtc-imx-sc.c | 2 +- drivers/soc/imx/soc-imx-scu.c | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-)