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=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 E44C2C34026 for ; Tue, 18 Feb 2020 09:18:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA7BE22527 for ; Tue, 18 Feb 2020 09:18:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582017521; bh=WDLKT1u/eZpoRYcR0EZB25T+ZUURdxqfLJomoJXA9B8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=ZYTQ7BIxbtSu85MX0GDOT9ZlokNJV9AgAKqtU/WT/i8H+nnnnejqRXA+ptMHMiy85 wjyvHzm9OX5kt+QZLO+KpI8ORhXVXxCjRP051BzKLLBDs9BEYAmgYjw6wmp7IywpZh Gkm41jh1BW0XNsIcrLnoN2FK5ff5AYliP7TrJsKA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726199AbgBRJSl (ORCPT ); Tue, 18 Feb 2020 04:18:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:41174 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726186AbgBRJSl (ORCPT ); Tue, 18 Feb 2020 04:18:41 -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 1331321D7D; Tue, 18 Feb 2020 09:18:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582017520; bh=WDLKT1u/eZpoRYcR0EZB25T+ZUURdxqfLJomoJXA9B8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KxQdcdNXE9bbEEapbGIJeH6RMZTaUyfg/N5Fkb7XCzkcHvbvoCuiux3AOFlStTllp VdH2Eae5w/YC8wsB+61k+X/nVXRVnnJgMrzdnfD/PkPk/WoVCGW4ebxw1mv6jl00Sg BB5FUHHRvBZNYeWhnQvTaqpZg+oMj4uXwVEx61Ys= Date: Tue, 18 Feb 2020 17:18:32 +0800 From: Shawn Guo To: Leonard Crestez Cc: Aisheng Dong , Fabio Estevam , Michael Turquette , Stephen Boyd , Stefan Agner , Linus Walleij , Alessandro Zummo , Alexandre Belloni , Anson Huang , Abel Vesa , Franck Lenormand , "kernel@pengutronix.de" , dl-linux-imx , "linux-arm-kernel@lists.infradead.org" , "open list:COMMON CLK FRAMEWORK" , "open list:PIN CONTROLLER - FREESCALE" , "open list:REAL TIME CLOCK (RTC) SUBSYSTEM" Subject: Re: [PATCH] firmware: imx: Align imx SC msg structs to 4 Message-ID: <20200218091831.GB6075@dragon> References: <3a8b6772a1edffdd7cdb54d6d50030b03ba0bebb.1581455751.git.leonard.crestez@nxp.com> <20200217062129.GB6790@dragon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Mon, Feb 17, 2020 at 08:37:45PM +0000, Leonard Crestez wrote: > On 17.02.2020 08:21, Shawn Guo wrote: > > On Tue, Feb 11, 2020 at 11:24:33PM +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 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. > >> > >> Cc: stable@vger.kernel.org > > > > Should we have a fixes tag and send it for -rc? > > I haven't check but this would probably have to be split into multiple > patches because the structs were not added all at once. Or maybe we can just drop the stable tag, as it addresses a corner case issue which could concern very few people? Shawn