Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751882AbcCGB2g (ORCPT ); Sun, 6 Mar 2016 20:28:36 -0500 Received: from mleia.com ([178.79.152.223]:42128 "EHLO mail.mleia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751236AbcCGB2a (ORCPT ); Sun, 6 Mar 2016 20:28:30 -0500 Subject: Re: [PATCH 2/2] crypto: s5p-sss - Handle unaligned buffers To: Krzysztof Kozlowski , Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org References: <1457259436-32560-1-git-send-email-krzk@kernel.org> <1457259436-32560-2-git-send-email-krzk@kernel.org> From: Vladimir Zapolskiy Message-ID: <56DCD938.7090100@mleia.com> Date: Mon, 7 Mar 2016 03:28:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <1457259436-32560-2-git-send-email-krzk@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20160307_013151_130403_BE20D818 X-CRM114-Status: GOOD ( 15.64 ) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1230 Lines: 36 Hi Krzysztof, On 06.03.2016 12:17, Krzysztof Kozlowski wrote: > During crypto selftests on Odroid XU3 (Exynos5422) some of the > algorithms failed because of passing AES-block unaligned source and > destination buffers: excuse my ignorance what are the crypto selftests you reference? Are they run-time self tests run by crypto manager on algorithm registration? > alg: skcipher: encryption failed on chunk test 1 for ecb-aes-s5p: ret=22 > > Handle such case by copying the buffers to a new aligned and contiguous > space. I'm not quite convinced that a particular crypto accelerator driver is the right place for this change, at least I don't see in the change anything S5P-SSS specific, but it might be good to add the change. Briefly looking at other drivers similarly atmel-* and omap-* have slow path fallbacks, ./rockchip/rk3288_crypto_ablkcipher.c fails like s5p-sss etc. Anyway since it is a valid improvement, please feel free to add my Acked-by: Vladimir Zapolskiy > Signed-off-by: Krzysztof Kozlowski > --- > drivers/crypto/s5p-sss.c | 149 +++++++++++++++++++++++++++++++++++++++++++---- > 1 file changed, 137 insertions(+), 12 deletions(-) > -- With best wishes, Vladimir