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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 C2C83C2BBC7 for ; Sat, 11 Apr 2020 23:41:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9439B206A1 for ; Sat, 11 Apr 2020 23:41:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586648490; bh=rjytP4Nsb3o8SYY72ku2H/NNEttzxHpHq53ChREMXFI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=BgvxdbfrOb55xVXwGCF6Mc99O4SD1sc2vrM6SXzsFp6EQjzx2JHI/y7IGyCMETQu+ MhaLz5vCl3twK0HZjPLsNeJmZFhvwPe2+kdETXIT+2QEazGrLVl9uSIgwNEFqFkGBz qH6zDj/L39iRAcUALohaBJp6nH0xL1QOVEfhIiL8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726837AbgDKXHG (ORCPT ); Sat, 11 Apr 2020 19:07:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:42514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728535AbgDKXGx (ORCPT ); Sat, 11 Apr 2020 19:06:53 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B9A93216FD; Sat, 11 Apr 2020 23:06:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586646413; bh=rjytP4Nsb3o8SYY72ku2H/NNEttzxHpHq53ChREMXFI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nlO77yEQWkUuUGFBAe5TyPY/Hqy6khi8DFLoTnfcBjAaN8CUHmWs9J6fwmWpttShw OUwLfUxJN7GLNsRQnjVOa6hiwhBl6stPjwcKBv4O3e/MHJ9jW1rMtvqbSnZGGfiw/p 9y0mG7oLdvkHRRRvAmtSo9mpTaCJ9RFRaEtWCE1M= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Leonard Crestez , Alexandre Belloni , Sasha Levin , linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.6 148/149] rtc: imx-sc: Align imx sc msg structs to 4 Date: Sat, 11 Apr 2020 19:03:45 -0400 Message-Id: <20200411230347.22371-148-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200411230347.22371-1-sashal@kernel.org> References: <20200411230347.22371-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-rtc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org From: Leonard Crestez [ Upstream commit a29de86521d8a80cb0b426638d4e38707cafa2e2 ] 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: a3094fc1a15e ("rtc: imx-sc: add rtc alarm support") Signed-off-by: Leonard Crestez Link: https://lore.kernel.org/r/13404bac8360852d86c61fad5ae5f0c91ffc4cb6.1582216144.git.leonard.crestez@nxp.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin --- drivers/rtc/rtc-imx-sc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-imx-sc.c b/drivers/rtc/rtc-imx-sc.c index cf2c12107f2b8..a5f59e6f862e0 100644 --- a/drivers/rtc/rtc-imx-sc.c +++ b/drivers/rtc/rtc-imx-sc.c @@ -37,7 +37,7 @@ struct imx_sc_msg_timer_rtc_set_alarm { u8 hour; u8 min; u8 sec; -} __packed; +} __packed __aligned(4); static int imx_sc_rtc_read_time(struct device *dev, struct rtc_time *tm) { -- 2.20.1 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=-10.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 4B0BDC2BBC7 for ; Sat, 11 Apr 2020 23:10:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03D5B2166E for ; Sat, 11 Apr 2020 23:10:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gsh/sdrn"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="nlO77yEQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03D5B2166E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=84Ru28BOR95S+KVJdNoCwEgYP7nYi4vxtaYdiAxvCDE=; b=gsh/sdrnWejaad asrYaSTPCwAwSS5wSeWoWYHHISpwzTUCCyZeiynMfnUQT90eizqgfNOtYzDwqJU6JRxjUU4u9cFmi AzFsj13MzxlNjXimcfGCI/fha6Zw2xCZ4aKjHeDW/a8u7FNR21fAYS8zlDAdTcVGhc8Up3jqfx05z oW1jJerxLrbrzzHl7VgW4DYzjfwIwZNfN1hCSl1XtWKHU1YK1H2qyKqPsjumsGoVb31ayrs/x08um FC3wVoCo3QlJhU4gUPJUjMdTIwVDPnizbkQv8X5j9YysU+p3Fl4NZzCio9TgKOchsavcwull9K+k8 rKFRthUnpRHbMexRm9wQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNPGc-0006WS-LD; Sat, 11 Apr 2020 23:10:26 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNPDB-0000wW-UN for linux-arm-kernel@lists.infradead.org; Sat, 11 Apr 2020 23:06:55 +0000 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B9A93216FD; Sat, 11 Apr 2020 23:06:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586646413; bh=rjytP4Nsb3o8SYY72ku2H/NNEttzxHpHq53ChREMXFI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nlO77yEQWkUuUGFBAe5TyPY/Hqy6khi8DFLoTnfcBjAaN8CUHmWs9J6fwmWpttShw OUwLfUxJN7GLNsRQnjVOa6hiwhBl6stPjwcKBv4O3e/MHJ9jW1rMtvqbSnZGGfiw/p 9y0mG7oLdvkHRRRvAmtSo9mpTaCJ9RFRaEtWCE1M= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.6 148/149] rtc: imx-sc: Align imx sc msg structs to 4 Date: Sat, 11 Apr 2020 19:03:45 -0400 Message-Id: <20200411230347.22371-148-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200411230347.22371-1-sashal@kernel.org> References: <20200411230347.22371-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200411_160654_027824_DE22C5D3 X-CRM114-Status: GOOD ( 10.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , linux-rtc@vger.kernel.org, Alexandre Belloni , Leonard Crestez , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Leonard Crestez [ Upstream commit a29de86521d8a80cb0b426638d4e38707cafa2e2 ] 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: a3094fc1a15e ("rtc: imx-sc: add rtc alarm support") Signed-off-by: Leonard Crestez Link: https://lore.kernel.org/r/13404bac8360852d86c61fad5ae5f0c91ffc4cb6.1582216144.git.leonard.crestez@nxp.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin --- drivers/rtc/rtc-imx-sc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-imx-sc.c b/drivers/rtc/rtc-imx-sc.c index cf2c12107f2b8..a5f59e6f862e0 100644 --- a/drivers/rtc/rtc-imx-sc.c +++ b/drivers/rtc/rtc-imx-sc.c @@ -37,7 +37,7 @@ struct imx_sc_msg_timer_rtc_set_alarm { u8 hour; u8 min; u8 sec; -} __packed; +} __packed __aligned(4); static int imx_sc_rtc_read_time(struct device *dev, struct rtc_time *tm) { -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel