From patchwork Sat Nov 17 01:26:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10687229 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 3AD844B7E for ; Sat, 17 Nov 2018 01:29:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2857C2C35F for ; Sat, 17 Nov 2018 01:29:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C6652C40B; Sat, 17 Nov 2018 01:29:09 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B34992C35F for ; Sat, 17 Nov 2018 01:29:08 +0000 (UTC) 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=5EVMQpDR3gtaowDh1P+iwdnlvf20hYQ7ZloU+xElCUw=; b=pjsevLq29hULu4 ur0C0Ei5tzTAsJj9BuGdV5YEBqmjIRlMdSMeiBZSNhserJdgr1CSC6stpN7qN46eyAARx2qqWS7JK RXQVlOtxWJT1SgOdJyvyBgRc014djqeWEGY2dnPsLKmmNSTaQvbNcDwXF+CDX0DMetrJoWJkObMEM 6ETSlaVIfZnK0AaWaUWjZXB7zEBU4XpH1ZEl/Cf18PH+HpuXAKhK8x6mKHl99ijxyOnDAb/WPrHiE L9bosN0WS4TVqgjxWuLrRNJrnKEo7178g2F+2ecto2smxF7vg5FVzwgq4L2P7b3GUOMPdaLaDmb7a Dj33X/f5YdGwAffymJRA==; 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 1gNpQ1-0001UV-TE; Sat, 17 Nov 2018 01:29:05 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNpQ0-0001UI-Rl for linux-arm-kernel@bombadil.infradead.org; Sat, 17 Nov 2018 01:29:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2lB07V4DXMa9yN7gSGsN0skPa5cPSki25s00+e1K2Gs=; b=wHUVVvnM+ij9xfNlhav0dMUOkK I9LegOq8wg9i3erVZKp7gNmHUDgDv1udmL0xlOLoAmAB5+pdu6QSP8fru87mjauvQFz5CIbOTYnvG PJ/PvtvFcpvh+WBCLy9aQrOuQUPgnYXqI0+eaUSTImi1Qz7hq+MvEPPdQaBoGmRPL8L772KRSOZLc /FpMv6iJuEjhQ3RuXZNQfQEy2Ho2gnA6ibiQwpgYmtXQr6Dv851zLDpz0NP2c8cNyuy/WDnToT61o Fjy2oL/m0ZSbLEmgC+qHvwZo8HIpEr7yLpKLgF0qurvD2MueCQDOk930IIG6cILwZ9j759N8mNSwa RJ8m8pFQ==; Received: from mail.kernel.org ([198.145.29.99]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gNpPx-0002Qj-3n for linux-arm-kernel@lists.infradead.org; Sat, 17 Nov 2018 01:29:03 +0000 Received: from ebiggers.mtv.corp.google.com (unknown [104.132.1.85]) (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 8479B20989; Sat, 17 Nov 2018 01:28:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542418129; bh=CSwsE0kpVtvEmLVf4WwakB/GXFTCzwqC/yTAkI0RlG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YoOFKaeQ05AZZs0hrDoUe8uhuLN+nPLg5XJo7f7X+j9AS5Llq9N9gJGfnt9RjVjgJ rwFg3MLGFeLlGUoaf5icu6rN5BZY9mF8MwALeu7B6TN8tPak70Zs8stSCucVDi4NOp n9grDHu89B1nsQJp/rHuZx5DfyG6iWZW0OaVtb+Q= From: Eric Biggers To: linux-crypto@vger.kernel.org, Herbert Xu Subject: [PATCH v4 02/14] crypto: chacha20-generic - don't unnecessarily use atomic walk Date: Fri, 16 Nov 2018 17:26:19 -0800 Message-Id: <20181117012631.23528-3-ebiggers@kernel.org> X-Mailer: git-send-email 2.19.1.1215.g8438c0b245-goog In-Reply-To: <20181117012631.23528-1-ebiggers@kernel.org> References: <20181117012631.23528-1-ebiggers@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181117_012901_373739_DCBBA694 X-CRM114-Status: GOOD ( 11.41 ) 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: "Jason A . Donenfeld" , Greg Kaiser , Tomer Ashur , Eric Biggers , Martin Willi , Samuel Neves , Ard Biesheuvel , linux-kernel@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Paul Crowley Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers chacha20-generic doesn't use SIMD instructions or otherwise disable preemption, so passing atomic=true to skcipher_walk_virt() is unnecessary. Suggested-by: Ard Biesheuvel Acked-by: Martin Willi Signed-off-by: Eric Biggers --- crypto/chacha20_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/chacha20_generic.c b/crypto/chacha20_generic.c index 3ae96587caf9..3529521d72a4 100644 --- a/crypto/chacha20_generic.c +++ b/crypto/chacha20_generic.c @@ -81,7 +81,7 @@ int crypto_chacha20_crypt(struct skcipher_request *req) u32 state[16]; int err; - err = skcipher_walk_virt(&walk, req, true); + err = skcipher_walk_virt(&walk, req, false); crypto_chacha20_init(state, ctx, walk.iv);