From patchwork Thu May 31 17:12:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Achim Gottinger X-Patchwork-Id: 923528 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ag-web.biz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IcZJMeOZ"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="ef/MdV5P"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40xb4v5PzLz9s1B for ; Fri, 1 Jun 2018 04:06:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:MIME-Version:Date:Message-ID:From:To: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=O09vs1e3duGlfi+KpzkDnVl2nVfGhYwP4rUcKXAGnO8=; b=IcZJMeOZm3g6dA EVq3vZFD76h3EKgNBXYAiCti6MoE0MYsJYM3oG4Y9iXCpEw2dn8+GQpp7fB5rKC+kqTWxQLnKPnx6 aoEug7M+YsnxUoshlYHUBAIGBLjersV68HwwG+ThMvQNeBrv1x2eU3q0GBy5w1elJaARNVJr8cr69 9lLhVoP16i46DC3JhljXkfE79ihUBxAAuLn0KMtpen1655iakjvP6tdBXFGr5u57SJOhXIHjd7MBC 7p+OtY8WifK6oMq7ogKOV/YRh2bUfft7ipMtY/evdwaGcJ3PnuxmJjuzMxWI6dZNap0YFnzXDq1Wa LURYPsL6ReTdiwtjHEjw==; 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 1fORxr-00038Q-4b; Thu, 31 May 2018 18:06:19 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fORwy-0002aK-Ep for openwrt-devel@bombadil.infradead.org; Thu, 31 May 2018 18:05:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:To:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ONSxpoz5qujzr6cNiw9jgYdEaUw0GIFUuFiHGUjfPHo=; b=ef/MdV5PMBB257EJOsaNfSN+ce QOBG6CtzmBdQrDXjw9hmYHT8Z0nE+RK18Gxvz1wkX7yICp84NJ3FdiBIselFnGRLrc3mxL3I8KWZm GtbjtcvEGz67mDNv4Oe77soEDAuttM2FZqkkflebbrtL9lSd7nJNXDFM6XEbZRnzlZeGy7otFGV6R X4n3MJoN63UvMvatU2/T3Q625PaYqBCiEL6svnEO7qRFe2wy9BxM1ItqyTdQMd3tbM04o4YctioTO nUlsqiistqm2Rp15QQDuqQB/iiDNyRSsJvA8V+9h46q0Mw82oY2T8+Ibl3OPcQoDv+0/E4tGe78qr qqV/0XEg==; Received: from www307.your-server.de ([188.40.30.2]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOR7y-0007cC-4J for openwrt-devel@lists.openwrt.org; Thu, 31 May 2018 17:12:43 +0000 Received: from [88.67.185.253] (helo=logon-achim.ag-web.local) by www307.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1fOR7f-0001qN-Ml for openwrt-devel@lists.openwrt.org; Thu, 31 May 2018 19:12:24 +0200 Received: from localhost (logon-achim.ag-web.local [127.0.0.1]) by logon-achim.ag-web.local (Postfix) with ESMTP id 28B0A890A9 for ; Thu, 31 May 2018 19:12:20 +0200 (CEST) Received: from logon-achim.ag-web.local ([127.0.0.1]) by localhost (logon-achim.ag-web.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8EBOjUNtp4oF for ; Thu, 31 May 2018 19:12:20 +0200 (CEST) Received: from [192.168.100.108] (win7-a-fm2.ag-web.local [192.168.100.108]) by logon-achim.ag-web.local (Postfix) with ESMTPSA id 0306D890A8 for ; Thu, 31 May 2018 19:12:19 +0200 (CEST) To: openwrt-devel@lists.openwrt.org From: Achim Gottinger Message-ID: Date: Thu, 31 May 2018 19:12:19 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 Content-Language: de-DE X-Authenticated-Sender: achim@ag-web.biz X-Virus-Scanned: Clear (ClamAV 0.99.3/24620/Thu May 31 14:38:53 2018) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180531_131242_336212_AA219B0E X-CRM114-Status: UNSURE ( 9.75 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [188.40.30.2 listed in list.dnswl.org] Subject: [OpenWrt-Devel] [PATCH] mpc85xx: revert enabling the crypto acceleration driver in the kernel config instead of packaging it X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Hello List, Since the commit https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c00e5a4f09115ec976fac7dc380f576ef6a24fab strongswan is broken on WDR4900v1. An bug report can be seen here: https://bugs.openwrt.org/index.php?do=details&task_id=1262. To get strongswan working again i made an patch which reverts the changes from above commit. Now if the caam modules are loaded strongswan still fails but without the caam modules loades it works as expected. With the caam modules build in caam can not be disabled by the openwrt user. --------------------------- --------------------------- Signed-off-by: Achim Gottinger Signed-off-by: Achim Gottinger Signed-off-by: Achim Gottinger Signed-off-by: Achim Gottinger Signed-off-by: Achim Gottinger Tested-by: Magnus Kroken diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index 2ea2d2c0e7..4074e2679a 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -271,6 +271,31 @@ endef  $(eval $(call KernelPackage,crypto-hmac)) +define KernelPackage/crypto-hw-caam +  TITLE:=Freescale CAAM driver (SEC4) +  DEPENDS:=@TARGET_mpc85xx +kmod-crypto-aead +kmod-crypto-authenc +kmod-crypto-hash +kmod-random-core +  KCONFIG:= \ +       CONFIG_CRYPTO_HW=y \ +       CONFIG_CRYPTO_DEV_FSL_CAAM \ +       CONFIG_CRYPTO_DEV_FSL_CAAM_JR \ +       CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API \ +       CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API \ +       CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API \ +       CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 \ +       CONFIG_CRYPTO_DEV_FSL_CAAM_IMX=n \ +       CONFIG_CRYPTO_DEV_FSL_CAAM_INTC=n \ +       CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG=n +  FILES:= \ +       $(LINUX_DIR)/drivers/crypto/caam/caam.ko \ +       $(LINUX_DIR)/drivers/crypto/caam/caamalg.ko \ +       $(LINUX_DIR)/drivers/crypto/caam/caamhash.ko \ +       $(LINUX_DIR)/drivers/crypto/caam/caam_jr.ko \ +       $(LINUX_DIR)/drivers/crypto/caam/caamrng.ko +  AUTOLOAD:=$(call AutoLoad,09,caam caamalg caamhash caam_jr caamrng) +  $(call AddDepends/crypto) +endef + +$(eval $(call KernelPackage,crypto-hw-caam))  define KernelPackage/crypto-hw-ccp    TITLE:=AMD Cryptographic Coprocessor diff --git a/target/linux/mpc85xx/config-4.9 b/target/linux/mpc85xx/config-4.9 index 68568c4a62..dc2e5a8820 100644 --- a/target/linux/mpc85xx/config-4.9 +++ b/target/linux/mpc85xx/config-4.9 @@ -47,16 +47,16 @@ CONFIG_CRYPTO_AEAD2=y  CONFIG_CRYPTO_AKCIPHER=y  CONFIG_CRYPTO_AKCIPHER2=y  CONFIG_CRYPTO_AUTHENC=y -CONFIG_CRYPTO_DEV_FSL_CAAM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y -CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y +#CONFIG_CRYPTO_DEV_FSL_CAAM=y +#CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y +#CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y  # CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set  # CONFIG_CRYPTO_DEV_FSL_CAAM_IMX is not set  # CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set -CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y -CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y -CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 -CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y +#CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y +#CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y +#CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 +#CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y  CONFIG_CRYPTO_HASH=y  CONFIG_CRYPTO_HASH2=y  CONFIG_CRYPTO_HW=y