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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no 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 3FF79C64E7B for ; Mon, 16 Nov 2020 13:54:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E0EF222B9 for ; Mon, 16 Nov 2020 13:54:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="t/iUAs6+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729161AbgKPNyL (ORCPT ); Mon, 16 Nov 2020 08:54:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728752AbgKPNyK (ORCPT ); Mon, 16 Nov 2020 08:54:10 -0500 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58605C0613D1 for ; Mon, 16 Nov 2020 05:54:10 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id 10so14190873pfp.5 for ; Mon, 16 Nov 2020 05:54:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=9xqbMfDK84LfAE+DUJJfb4bFExHt13Qqq3+lMB9/cx4=; b=t/iUAs6+5bIjom4ikhmS3npW0WvegKoLTw5jPVBg96byt6IbU77zK3ar4lY0y3Wq82 f7iJp/NXK97qVqZfFPFLiBRAT5vOBwpaIAtCbs4AtRpMPGApm+faOvB7vJDblLR00Qtl PB3peuUHmHs6FAog5Zm34ZU735euugn99XRiH9IzvFGTMMTfwH9LdV5o7QgMwSaAv1Cm KvP73xEOS5CXMRI0yKhmZ59VWAPrKPmSZYq7LkilCtUnlCktjHTQm1TItSehuUm+QVPO o2XtAkUMbXHohHquMSbEq+pn4yVVCzEjtjwds9cYqwzUfbdzh/z3N7fYw/MZ7BuljcOR IAgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9xqbMfDK84LfAE+DUJJfb4bFExHt13Qqq3+lMB9/cx4=; b=U+JitBG8971qZPCufCeE2pc1zCyiBZQXD58kvCFTYXiuR53Is7ZiVdfRQr0H2K2x2e 14EyY6WCr2uZuP/yl9C9QkdYb96tx7636M9ZJx7A+YAEcAkRWHbfAkM+uXRLqp/dByOu Mv89auDGHcaLYW8LvYan5xhP7qn8UaacREUGPWqbwoKPYXfmRYkYTLjog8o7T7Lkvzcs //p0qTNCkFabq4aOh5Qn8ZtD1WmcIPH3I5qO1Wj4N3PoxzE6iZUSOIwqI/UuWFBJHQLv 1YLD15uubDFe+gWWMzC78rhKkBhCVXHM0EBaKsaa8bqbr4FNoVBi8aeoo6ooVTlQz0y2 HbPA== X-Gm-Message-State: AOAM532r6PjMWmjS6y03B6Bv8wqvUl3dq1zP+CXZMasHre6XD/OoaOxO 47arEEQHMdoepFMicUyTYA9PBMGcg+mSnuYl X-Google-Smtp-Source: ABdhPJwuCTWXJaoWWI+pfrE1aZ7EfaWhfZNABzQEKZKsQKPygPQPkunTV2QwgIehC+6Jy3uALDTFSA== X-Received: by 2002:a63:2cc3:: with SMTP id s186mr4196229pgs.230.1605534849841; Mon, 16 Nov 2020 05:54:09 -0800 (PST) Received: from localhost.localdomain ([163.172.76.58]) by smtp.googlemail.com with ESMTPSA id u22sm15864031pgf.24.2020.11.16.05.54.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 05:54:09 -0800 (PST) From: Corentin Labbe To: arnd@arndb.de, davem@davemloft.net, herbert@gondor.apana.org.au, jernej.skrabec@siol.net, mripard@kernel.org, wens@csie.org Cc: linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Corentin Labbe Subject: [PATCH v3 0/7] crypto: sun4i-ss: prevent always fallback for ciphers Date: Mon, 16 Nov 2020 13:53:38 +0000 Message-Id: <20201116135345.11834-1-clabbe@baylibre.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hello For help testing on "crypto: sun4i-ss - Fix sparse endianness markers", I have added "stats" support like other allwinner's crypto drivers. Seeing stats showed a clear problem, the ciphers function were not used at all. This is due to the not-inialized need_fallback which is "init" as true everytime. So basicly, since the patch introduced it, this probem hidden some bugs. This serie fixes all hidden problems, then fix the initialization of "need_fallback" and then add the stats like other allwinner drivers. Regards Changes since v2: - patch #1: move buf/bufo out of function for reducing stack usage - patch #4: use writesl() - patch #6: use IS_ENABLED instead of #ifdef Changes since v1: - patch #4 is sufficient to fix BE problem (removed todo) Corentin Labbe (7): crypto: sun4i-ss: linearize buffers content must be kept crypto: sun4i-ss: checking sg length is not sufficient crypto: sun4i-ss: IV register does not work on A10 and A13 crypto: sun4i-ss: handle BigEndian for cipher crypto: sun4i-ss: initialize need_fallback crypto: sun4i-ss: enabled stats via debugfs crypto: sun4i-ss: add SPDX header and remove blank lines drivers/crypto/allwinner/Kconfig | 9 ++ .../allwinner/sun4i-ss/sun4i-ss-cipher.c | 87 +++++++++++++------ .../crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 56 ++++++++++++ .../crypto/allwinner/sun4i-ss/sun4i-ss-hash.c | 6 ++ .../crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | 6 ++ drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h | 8 ++ 6 files changed, 146 insertions(+), 26 deletions(-) -- 2.26.2 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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 A1AA1C5519F for ; Mon, 16 Nov 2020 13:54:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 58DB322280 for ; Mon, 16 Nov 2020 13:54:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="q75dSjGc"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="t/iUAs6+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58DB322280 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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:In-Reply-To:References:List-Owner; bh=yt7f/zPJ4EqhVAYjvsCvKeH7SrTX0nQT5cxQ1dT9nWs=; b=q75dSjGcHLN33/8Bb4+e7dqNgY 5QrdCUJXxITBvuE0DAgRdpJ5Z94cz9aDdv/0qCHo8UITyE7VRLIw7ht0yNa0/OFh2IOsA3UpvC/Ek CdvIC1pyRnn5gLPHQ3pjoUvIyIw/Dpj48KSjRLabCVldH2pC4eFaS8qP1m8XYmHmtN1f7stzWbIds Bqv9jZHera3/woA5zyqlvIC6UxI6vjAYOGRZQGJXZJNXxXd21j8aHyjuV+vVy5hjND3nffhie78SI TdchpTpN35DfKOSclPcToGncxam2exJlmjmmRJy2nv8hDb167pxwOSXQ4df8Xq0FaHjflJfpd+7dM tm3UsKuw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1keexV-000471-0G; Mon, 16 Nov 2020 13:54:17 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1keexR-00044E-Pq for linux-arm-kernel@lists.infradead.org; Mon, 16 Nov 2020 13:54:15 +0000 Received: by mail-pg1-x543.google.com with SMTP id t21so6969136pgl.3 for ; Mon, 16 Nov 2020 05:54:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=9xqbMfDK84LfAE+DUJJfb4bFExHt13Qqq3+lMB9/cx4=; b=t/iUAs6+5bIjom4ikhmS3npW0WvegKoLTw5jPVBg96byt6IbU77zK3ar4lY0y3Wq82 f7iJp/NXK97qVqZfFPFLiBRAT5vOBwpaIAtCbs4AtRpMPGApm+faOvB7vJDblLR00Qtl PB3peuUHmHs6FAog5Zm34ZU735euugn99XRiH9IzvFGTMMTfwH9LdV5o7QgMwSaAv1Cm KvP73xEOS5CXMRI0yKhmZ59VWAPrKPmSZYq7LkilCtUnlCktjHTQm1TItSehuUm+QVPO o2XtAkUMbXHohHquMSbEq+pn4yVVCzEjtjwds9cYqwzUfbdzh/z3N7fYw/MZ7BuljcOR IAgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9xqbMfDK84LfAE+DUJJfb4bFExHt13Qqq3+lMB9/cx4=; b=i430qmMcT8E7dGSeKA72pW9goI8MAsKAZNOHcNOkX5wpkM/DKvlk3IEP2rDVreZ9z9 INjWjcUyaxqEP09pEtRhFQfN8PBKUGw/7IMiAu4ceQkOVaTLH3cNrF5uTt4hxBqpUbVm kDJgQCehqds1mv0Y5xEcY9JVF7WxWF3bmQVnoTKzR/zUHs0dEOmRiBmbD4pGp1xDw5yX 5vXG5SMeo0DHtPok9bPcAqhNZ3iIV3JLnEllbBCqfnNSEuP25Z/gRxZIBJJAVEdaPNjC oQ95C1e1fwvxqsdWGPgFdRtXD8ULNTuBNvbATBMqUDz7vLDpUFZ6juVgvibcUJJ4B7+F +h6w== X-Gm-Message-State: AOAM533T2dos7uXIIyfOaAaBB6LE5vIW+ZV74wgc+I4I0aTRYg4MTSay Vi8nbH7J+rllWm+hp5ZbIPAIxQ== X-Google-Smtp-Source: ABdhPJwuCTWXJaoWWI+pfrE1aZ7EfaWhfZNABzQEKZKsQKPygPQPkunTV2QwgIehC+6Jy3uALDTFSA== X-Received: by 2002:a63:2cc3:: with SMTP id s186mr4196229pgs.230.1605534849841; Mon, 16 Nov 2020 05:54:09 -0800 (PST) Received: from localhost.localdomain ([163.172.76.58]) by smtp.googlemail.com with ESMTPSA id u22sm15864031pgf.24.2020.11.16.05.54.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 05:54:09 -0800 (PST) From: Corentin Labbe To: arnd@arndb.de, davem@davemloft.net, herbert@gondor.apana.org.au, jernej.skrabec@siol.net, mripard@kernel.org, wens@csie.org Subject: [PATCH v3 0/7] crypto: sun4i-ss: prevent always fallback for ciphers Date: Mon, 16 Nov 2020 13:53:38 +0000 Message-Id: <20201116135345.11834-1-clabbe@baylibre.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201116_085413_949071_4736B0E5 X-CRM114-Status: GOOD ( 12.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corentin Labbe , linux-sunxi@googlegroups.com, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello For help testing on "crypto: sun4i-ss - Fix sparse endianness markers", I have added "stats" support like other allwinner's crypto drivers. Seeing stats showed a clear problem, the ciphers function were not used at all. This is due to the not-inialized need_fallback which is "init" as true everytime. So basicly, since the patch introduced it, this probem hidden some bugs. This serie fixes all hidden problems, then fix the initialization of "need_fallback" and then add the stats like other allwinner drivers. Regards Changes since v2: - patch #1: move buf/bufo out of function for reducing stack usage - patch #4: use writesl() - patch #6: use IS_ENABLED instead of #ifdef Changes since v1: - patch #4 is sufficient to fix BE problem (removed todo) Corentin Labbe (7): crypto: sun4i-ss: linearize buffers content must be kept crypto: sun4i-ss: checking sg length is not sufficient crypto: sun4i-ss: IV register does not work on A10 and A13 crypto: sun4i-ss: handle BigEndian for cipher crypto: sun4i-ss: initialize need_fallback crypto: sun4i-ss: enabled stats via debugfs crypto: sun4i-ss: add SPDX header and remove blank lines drivers/crypto/allwinner/Kconfig | 9 ++ .../allwinner/sun4i-ss/sun4i-ss-cipher.c | 87 +++++++++++++------ .../crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 56 ++++++++++++ .../crypto/allwinner/sun4i-ss/sun4i-ss-hash.c | 6 ++ .../crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | 6 ++ drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h | 8 ++ 6 files changed, 146 insertions(+), 26 deletions(-) -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel