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=-6.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_PASS,URIBL_BLOCKED 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 2FE8EC282C9 for ; Sun, 27 Jan 2019 10:29:49 +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 E50AE2148D for ; Sun, 27 Jan 2019 10:29:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Btm/kMgo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E50AE2148D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sntech.de 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=IIo6DMGvQNHfTg/ObiMGdBaQ3KNY7hYKnIwe4mzGc9Q=; b=Btm/kMgody6BxY fR8p2zsAS0yukuNAvW7jtlESk6dn5QsGuVqdRyPblUmyVEMSzc7jGSKk96sbfl/yjXyj5i6FVe2zY Y2I7mRYDYCnVngzTYodQI6XvOFG6DuyUZzjzquN6Zj6lq1+Hvo/TXLsGU5VNUIMsmLk3rBOjxTWeF zk2nl8/ErElWcT6T2SWp2hUq5FWxDp626Usc+CKgGLZcaRsgsFCgIASrooJh+o7uEjvegixp9TTfU 0PxwJGc0jIRCYXRGVqytYJja8Y8UlrF4LR4VscACn00kN38q6c/sEexSFUJ/QwPvzGeL2rg7182U3 vouFwZBl+sY5GBYyWgNA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gnhhD-0004V7-P6; Sun, 27 Jan 2019 10:29:47 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gnhh8-0004Ul-OT; Sun, 27 Jan 2019 10:29:44 +0000 Received: from p5b12725f.dip0.t-ipconnect.de ([91.18.114.95] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gnhh0-0007bB-Ti; Sun, 27 Jan 2019 11:29:34 +0100 From: Heiko Stuebner To: Ard Biesheuvel Subject: Re: [Bug] Rockchip crypto driver sometimes produces wrong ciphertext Date: Sun, 27 Jan 2019 11:29:33 +0100 Message-ID: <1894799.pWIprST79S@phil> In-Reply-To: References: <20190126210530.GB709@sol.localdomain> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190127_022942_945914_5DBFE9ED X-CRM114-Status: GOOD ( 15.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zain Wang , Arnd Bergmann , Eric Biggers , linux-rockchip@lists.infradead.org, "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , Olof Johansson , ezequiel@collabora.com, linux-arm-kernel 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 (also add Ezequiel who has spent a bit of time on the rockchip crypto driver recently) Am Sonntag, 27. Januar 2019, 09:54:54 CET schrieb Ard Biesheuvel: > (add LAKML and arm-soc maintainers) > > On Sat, 26 Jan 2019 at 22:05, Eric Biggers wrote: > > > > Hello, > > > > I don't know whether anyone is actually maintaining the Rockchip crypto driver > > in drivers/crypto/rockchip/, but it's failing the improved crypto tests > > that I currently have out for review: https://patchwork.kernel.org/cover/10778089/ > > > > See the boot logs for RK3288 from the KernelCI job here: > > > > https://storage.kernelci.org/ardb/for-kernelci/v5.0-rc1-86-geaffe22db9d1/arm/multi_v7_defconfig/lab-collabora/boot-rk3288-rock2-square.txt > > https://storage.kernelci.org/ardb/for-kernelci/v5.0-rc1-86-geaffe22db9d1/arm/multi_v7_defconfig/lab-collabora/boot-rk3288-veyron-jaq.txt > > > > alg: skcipher: ecb-aes-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: use_digest src_divs=[15.64%@+3258, 84.36%@+4059] dst_divs=[69.11%@+1796, 8.49%@+4027, 6.34%@+1, 16.6%@+4058] iv_offset=21\" > > alg: skcipher: cbc-aes-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_digest src_divs=[100.0%@alignmask+3993] dst_divs=[65.31%@alignmask+1435, 34.69%@+14]\" > > alg: skcipher: ecb-des-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_final src_divs=[ 66.52%@+11, 33.48%@+1519] dst_divs=[58.82%@+1, 19.43%@+4082, 21.75%@+8]\" > > alg: skcipher: cbc-des-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_finup src_divs=[100.0%@+3980] dst_divs=[60.4%@+3763, 23.9%@+4011, 16.87%@+4046]\" > > alg: skcipher: ecb-des3-ede-rk encryption test failed (wrong result) on test vector 0, cfg=\"random: may_sleep use_digest src_divs=[100.0%@+4] dst_divs=[47.25%@+19, 14.83%@+22, 37.92%@+31]\" > > alg: skcipher: cbc-des3-ede-rk encryption test failed (wrong result) on test vector 0, cfg=\"two even aligned splits\" > > > > In other words: the ecb-aes-rk, cbc-aes-rk, ecb-des-rk, cbc-des-rk, > > ecb-des3-ede-rk, and cbc-des3-ede-rk algorithms are failing because they produce > > the wrong ciphertext on some scatterlist layouts. > > > > You can reproduce by pulling from > > https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git > > branch "testmgr-improvements", unsetting CONFIG_CRYPTO_MANAGER_DISABLE_TESTS, > > setting CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y, rebooting and checking dmesg. > > > > Note that I don't have this hardware myself, so if it turns out that no one is > > interested in fixing this anytime soon I'll instead have to propose disabling > > these algorithms until they can be fixed. > > > > Thanks, > > > > - Eric > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel