From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3653FC3567B for ; Mon, 24 Feb 2020 07:28:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 00DA62080D for ; Mon, 24 Feb 2020 07:28:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582529308; bh=UT7o8ME45O3oydZx0f3nD0anAxSyiu7DWY6wmBELUBA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=Ac40hy70FGYVcBR91/pfI35uiaAyLdF3l3jd4K/pAgOZD/3FHvCjyh0aQBsnOjxI/ k8gYo4s7JJDt1mEGbezrrb8rNCLxxAdWsVF9vcqutcDS9QkQ6qGcsmfY+tOBXX+Xiu hc0EFAooiSdvzOV6f8JnR8aWzyecJT+DC5/JCRIA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726452AbgBXH21 (ORCPT ); Mon, 24 Feb 2020 02:28:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:43402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726216AbgBXH21 (ORCPT ); Mon, 24 Feb 2020 02:28:27 -0500 Received: from dragon (80.251.214.228.16clouds.com [80.251.214.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8670E20578; Mon, 24 Feb 2020 07:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582529306; bh=UT7o8ME45O3oydZx0f3nD0anAxSyiu7DWY6wmBELUBA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=j04XlkcVj7zGetH++iayWjjYxOZJ6TuagInHORm/L8ezdhWhwK5tvleP8j9hg4NaN ODgGM+9xSSijf9ZYzpMasj1Mghc6fCfUOAcNZIYwnAo9rbo+F1wPt5Du+AGf9bwXEH V9yAmS3gstkQ+TP2/Tjrk/FD28w6IhK6QA/eG/Fs= Date: Mon, 24 Feb 2020 15:28:17 +0800 From: Shawn Guo To: Leonard Crestez Cc: Dong Aisheng , 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: Re: [PATCH v2 3/8] firmware: imx: misc: Align imx sc msg structs to 4 Message-ID: <20200224072816.GT27688@dragon> References: <582b80361beb66bd1844fda785aac2e800155d64.1582216144.git.leonard.crestez@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <582b80361beb66bd1844fda785aac2e800155d64.1582216144.git.leonard.crestez@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org On Thu, Feb 20, 2020 at 06:29:34PM +0200, Leonard Crestez wrote: > The imx SC api strongly assumes that messages are composed out of > 4-bytes words but some of our message structs have odd sizeofs. > > 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. > > Fixes: 15e1f2bc8b3b ("firmware: imx: add misc svc support") > Signed-off-by: Leonard Crestez Applied, thanks.