From patchwork Fri Mar 1 14:02:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Konieczny X-Patchwork-Id: 10835389 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 97D031390 for ; Fri, 1 Mar 2019 14:03:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 880672F1A3 for ; Fri, 1 Mar 2019 14:03:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C3BB2F1B7; Fri, 1 Mar 2019 14:03:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BFCF2F1A3 for ; Fri, 1 Mar 2019 14:03:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727492AbfCAODa (ORCPT ); Fri, 1 Mar 2019 09:03:30 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:44454 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728149AbfCAODZ (ORCPT ); Fri, 1 Mar 2019 09:03:25 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190301140323euoutp024d892fbdca417aa5b68ddd716ac1d531~H2qYadyeU1305813058euoutp02p for ; Fri, 1 Mar 2019 14:03:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190301140323euoutp024d892fbdca417aa5b68ddd716ac1d531~H2qYadyeU1305813058euoutp02p DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1551449003; bh=bQPqFzz2fmJkWr/uClmGTOF0FqSo0MUh9CDopv6RO/4=; h=From:To:Cc:Subject:Date:References:From; b=MFobuByCDPg2mTEMh2mlLga4IwKi1TqWnH47fepvsgQZKMQEpFTh6np+4eM1Bgbew RO34rWsDDV/WkP5SNVwZ0FAmjHbePE7dBXJtK85fqYhLyJtRoz4APB2EdbM337qO6L oAHuTuvmMScXCZH3TSXKktPuvmggCOghhs+0wins= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190301140322eucas1p18c2e5f30802fd7ad16854b6eb521b7fb~H2qXqMMD62620126201eucas1p1O; Fri, 1 Mar 2019 14:03:22 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id BD.88.04806.AAB397C5; Fri, 1 Mar 2019 14:03:22 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190301140321eucas1p2bf17a6e35d29e8d5f582a2d99fbf4c83~H2qW0Yp_o3213732137eucas1p2K; Fri, 1 Mar 2019 14:03:21 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190301140321eusmtrp2251ca495ae042e85682659bb93a9cb62~H2qWlrb9n1128711287eusmtrp2j; Fri, 1 Mar 2019 14:03:21 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-ec-5c793baa509d Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 85.09.04128.9AB397C5; Fri, 1 Mar 2019 14:03:21 +0000 (GMT) Received: from AMDC3218.DIGITAL.local (unknown [106.120.51.18]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190301140321eusmtip2e3d60231d4f8627f339fede325a1f4ae~H2qWCTIkC0829808298eusmtip2n; Fri, 1 Mar 2019 14:03:21 +0000 (GMT) From: Kamil Konieczny To: k.konieczny@partner.samsung.com Cc: Herbert Xu , "David S. Miller" , Krzysztof Kozlowski , Vladimir Zapolskiy , Bartlomiej Zolnierkiewicz , Marek Szyprowski , linux-crypto@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: s5p-sss - fix AES support for Exynos5433 Date: Fri, 1 Mar 2019 15:02:54 +0100 Message-Id: <20190301140254.19341-1-k.konieczny@partner.samsung.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMKsWRmVeSWpSXmKPExsWy7djP87qrrCtjDHZck7fYOGM9q8Wc8y0s Ft2vZCz69v1ntDh/fgO7xf17P5ksLu+aw2Yx4/w+Jou1R+6yW/z/1czswOWxZeVNJo9tB1Q9 Nq3qZPP4t3AKi8fBd3uYPPq2rGL0+LxJLoA9issmJTUnsyy1SN8ugSvjzc7gggWcFZ2vr7A3 MD5l72Lk4JAQMJGYuEWoi5GLQ0hgBaPElH0rWCGcL4wSGxq/MUM4nxklmk9eZuxi5ATruHzw JlRiOaPExNudLHAt706/BatiEzCXeLT9DBOILSKgLDH53nRmEJtZ4DWTRO+/LBBbWMBRYuXs BewgNouAqsTtntdg9bwCLhKTru5jhdgmL/FzxSZ2iLigxMmZT1gg5shLNG+dDXaFhMBkdolt yx+xQTS4SJyZ3c0EYQtLvDq+hR3ClpH4v3M+VLxcYvfWZ+wQzS2MEnMnL4JKWEscPn6RFRQy zAKaEut36UOEHSXWvGljgwQYn8SNt4IQN/BJTNoG8hdImFeio00IolpXYt7/M1DnS0t0/V/H ClHiI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w SjUwBlubqt4TCEz2sXrVtPHD9ZMic8yTJBo/7kvbsoVrkyBf4e7gRYoPPH8Ffq5Ln3Vu6e3z QYrrd7VHuZld+mfryTHFbfWU1niWZ/yLMn8k/I6O++Rezb01c59LyvK1axILcyLU1sco7Uy3 CVpTuyP1zLxw1c/8vDmbORKycmJl/16uvLGhK+WzEktxRqKhFnNRcSIAy/QkKp4CAAA= X-CMS-MailID: 20190301140321eucas1p2bf17a6e35d29e8d5f582a2d99fbf4c83 X-Msg-Generator: CA X-RootMTR: 20190301140321eucas1p2bf17a6e35d29e8d5f582a2d99fbf4c83 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190301140321eucas1p2bf17a6e35d29e8d5f582a2d99fbf4c83 References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 0918f18c7179 ("crypto: s5p - add AES support for Exynos5433") introduced bug in dereferencing clk_names[1] on platforms different from Exynos5433. On Exynos board XU3 call trace is: "Unable to handle kernel paging request at virtual address 00004000" (strcmp) from [] (of_property_match_string+0x58/0xd0) ... (devm_clk_get) from [] (s5p_aes_probe+0xd4/0x4a0) (s5p_aes_probe) from [] (platform_drv_probe+0x6c/0xa4) Fix this by setting array clk_names size to 2. Fixes: 0918f18c7179 ("crypto: s5p - add AES support for Exynos5433") Reported-by: Krzysztof Kozlowski Signed-off-by: Kamil Konieczny Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski --- drivers/crypto/s5p-sss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 3f45cc5cb94a..2fb4ae459c45 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -241,7 +241,7 @@ struct samsung_aes_variant { unsigned int aes_offset; unsigned int hash_offset; - const char *clk_names[]; + const char *clk_names[2]; }; struct s5p_aes_reqctx {