Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp483994imb; Fri, 1 Mar 2019 06:05:34 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia1sEw18hvzzA0xadLGbM3JElPqqVTKroOssAwBpjy2rofDcKUMeKzu02FfCYFjEc2WiHEu X-Received: by 2002:a62:e216:: with SMTP id a22mr5682870pfi.20.1551449134274; Fri, 01 Mar 2019 06:05:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551449134; cv=none; d=google.com; s=arc-20160816; b=X0YunMUJ7bU+CPncOgrli6MwXWscKRjlZdKULJvcOcqFrg8fuWWNFZ/+2qEI2SzBlI eQm3xUp3JcVKSCAyl9unKp5L1pMp4qBvXobesoOJFBJg+baW4RiKoapH75ig5IkEyxRq 1f0+vp+5dZ3qI/ni80XqeLnzDmEhc7bC0oXBz52MnzEQtTCsY4pyDLtEn8pp0NWZdPHx bRIO/bDczLEBtoQDbiE7qeRn5skhwC2CuAuNSX1WppjKDt/+RkPFNBNQDOc9LwSaHPGU TlzfQLakD4yxLNRQmw52UksLIY07bFHna3HszctcWveR08B7My2FnlGfoiqAAB2IxAiU l+dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature:dkim-filter; bh=bQPqFzz2fmJkWr/uClmGTOF0FqSo0MUh9CDopv6RO/4=; b=GaYDsE9IGW1kLFV4ULjHbPjSBKU/GBkXscHjMObaNmB8p3Z8ghcyronLNJ8KQlupsp ftWrWZhpWDzR6CInnSQeUO1pa5Po70U9U1sDfLHpWA2IyFU/vB57tT5Ewau6ZAK6tfCK MAeSrymlZH3/7ARUWlIYJ4e961MXPVYW9jwFRrVpux8gp1cYArAa8lyDkaOx2Zz2eR8P 2cUVomcz3EZkGysd02kzdJfYwZME+N8T8HIDYjOdD/vVTHDJaH4vTWt04geDNVF8dUi4 OHals/ooWL7Qby+ZxfPcFzmdB7v082vCb5/qoGqEufdCsuRoBMq00tGIvGpyFZA17wJl nt/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=MFobuByC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si21981789plh.125.2019.03.01.06.05.18; Fri, 01 Mar 2019 06:05:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=MFobuByC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387963AbfCAODZ (ORCPT + 99 others); Fri, 1 Mar 2019 09:03:25 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:42096 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727492AbfCAODY (ORCPT ); Fri, 1 Mar 2019 09:03:24 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190301140323euoutp0183fc7490a29fd88579bf6fa862a676ad~H2qYaewg-0514905149euoutp01l for ; Fri, 1 Mar 2019 14:03:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190301140323euoutp0183fc7490a29fd88579bf6fa862a676ad~H2qYaewg-0514905149euoutp01l 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 Content-Transfer-Encoding: 8bit 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 ClHiIXH1rCtIWEggVuLw6+eMExgVZiF5bBaSx2YhnLCAkXkVo3hqaXFuemqxcV5quV5xYm5x aV66XnJ+7iZGYFI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rd7VHuZld+mfryTHFbfWU1niWZ/yLMn8k/I6O++Rezb01c59LyvK1axILcyLU1sco7Uy3 CVpTuyP1zLxw1c/8vDmbORKycmJl/16uvLGhK+WzEktxRqKhFnNRcSIAy/QkKp4CAAA= X-CMS-MailID: 20190301140321eucas1p2bf17a6e35d29e8d5f582a2d99fbf4c83 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190301140321eucas1p2bf17a6e35d29e8d5f582a2d99fbf4c83 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190301140321eucas1p2bf17a6e35d29e8d5f582a2d99fbf4c83 References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 { -- 2.21.0