From patchwork Wed Apr 1 16:17:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 228280 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 08284C43331 for ; Wed, 1 Apr 2020 16:56:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B48B62078C for ; Wed, 1 Apr 2020 16:56:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585760207; bh=nnRmublHebH8tVwLmAi+UQ/zgzXNjJ2XDyx3i9qUhW8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=p0Y6GKs/jjA8PJ0Cm0Qoyvqih4UK3rDWw1i32KgIuIOJZEd3W4B0n1plcVNm16RtB 57ceMOYjy7UKLIkfA3ELjMMXoG/JZoKF5RPkyE2+5PtmXvSjgpUdZW0kCRhwBV2B30 BkDSXJCAkTI4TNVzRkD5UZAPirW31X6yYGxKrJCo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732885AbgDAQUV (ORCPT ); Wed, 1 Apr 2020 12:20:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:42928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732879AbgDAQUV (ORCPT ); Wed, 1 Apr 2020 12:20:21 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 5D44120857; Wed, 1 Apr 2020 16:20:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585758020; bh=nnRmublHebH8tVwLmAi+UQ/zgzXNjJ2XDyx3i9qUhW8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mDz2gcUaFSYZI3eInFS7xdD0J4BDsGpZlfmmZNfVXcOEaPK2mVAJc0H6sZnD9lrvY JvGycoBvfAAPZlYDTYW4RtJWX2m+jiXgbeLLm/JoF5frToc1E5kZeXj/3M81HpUpka GQSjtaWwqJkcJVNz1jYNg21Egrx8Tp3TVkC8fGpo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leonard Crestez , Stephen Boyd Subject: [PATCH 5.5 18/30] clk: imx: Align imx sc clock parent msg structs to 4 Date: Wed, 1 Apr 2020 18:17:22 +0200 Message-Id: <20200401161429.561629963@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200401161414.345528747@linuxfoundation.org> References: <20200401161414.345528747@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Leonard Crestez commit 8400ab8896324641243b57fc49b448023c07409a upstream. 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. Fix by marking with __aligned(4). Fixes: 666aed2d13ee ("clk: imx: scu: add set parent support") Signed-off-by: Leonard Crestez Link: https://lkml.kernel.org/r/aad021e432b3062c142973d09b766656eec18fde.1582216144.git.leonard.crestez@nxp.com Signed-off-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman --- drivers/clk/imx/clk-scu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/clk/imx/clk-scu.c +++ b/drivers/clk/imx/clk-scu.c @@ -84,7 +84,7 @@ struct imx_sc_msg_get_clock_parent { struct req_get_clock_parent { __le16 resource; u8 clk; - } __packed req; + } __packed __aligned(4) req; struct resp_get_clock_parent { u8 parent; } resp;