From patchwork Thu Sep 28 13:28:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1840854 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=XrpuS0ZT; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=J91CjtDG; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RxDsH5mPfz1ynX for ; Thu, 28 Sep 2023 23:31:31 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References:Message-Id: MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XcjGkk8RmkoH/mbV3uUQdjxg15ZqScFZ1ukWp1jM6Fc=; b=XrpuS0ZTic4smr lGiCJxE6GJ7B7XjpwcB4S9ht3MyIWF9gY3dUnrt/mjBm5kvmuNUbwmzaMCJN0/OXjOJajJmwaUeed YhMLkyVOgXb7eQ/SkrvZpahq9NnqhqhAYD1f7irPfwyfVsr/o0TMkNaJ/eICuu7WmUI7EJekxbyNW Gd0aTTiH+syUFEpTgRWN0TbNk4xDOAanMyIT7wWixeXLmsPB8OsxCwvGWlpF2ag6cUWPQLMAqKB4c jw7x5UMm6D+rLs4U3aDdc0Smd/KHJPg8PsWw90PWLQdJTT9kHaKBFNIXawPFxla8BOc/H7V6gSWjQ oGhztIqO42TPZuEk6MZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlr4V-004Jf1-0V; Thu, 28 Sep 2023 13:28:51 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlr4K-004JWN-2J for openwrt-devel@lists.openwrt.org; Thu, 28 Sep 2023 13:28:42 +0000 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2c124adf469so215147251fa.0 for ; Thu, 28 Sep 2023 06:28:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695907719; x=1696512519; darn=lists.openwrt.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=7XZxj5NP/Ni0SOX0Zy5tokHL4QdN0PJ2KrbUuQSgs5c=; b=J91CjtDG41Z3c36YHFfWnuCn+2NtMXOsYfP6aaz9VP06Vm0rePR9LTN5n2JY7+4RAm opKj4BevwIRFIsXJ9hlgOwCV+2qmc7lY0eXSX/Os+ikJXZsUN6Rhzss9y5xunNOge/lZ 6DDSidX7BP3k+f5P6KLeVMloHUtUKn7tb9w84BbdS1yAMQlNkERKzJiOmultdoEzpdI7 fXWRoAVQ3CKr/pPlJbBJj4/x5gkBe3iZto9unfi64l6jLsJsVbIX46NCY+6vuBZoJ3CN MzLuFuZcgkON9sXUz5UVYWsh9/MTDK4ZTSV9pfh5cj1+AyRqHuKaaeU6qAqt349TYSUt GuyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695907719; x=1696512519; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7XZxj5NP/Ni0SOX0Zy5tokHL4QdN0PJ2KrbUuQSgs5c=; b=kq5gtnWrchSyMFXvv5u0pWNKQxBew3ns2f46QhGbvhTOxoFLnm1zIx47DZpICs089v LUlZBeeTfSK1oIhHzrwG2Z+hrmmbJmF6QmALqHImRxudBH5Mcmqv5PUfh4xeCCsuEyAq l11qQFlOt+CFx3qXOAjOPAKCr1M50Q5GzE4COavkMQenn068tA3PI/jzO91EIxy29FLq HHPJNaDX8Ery/NMGEEVlXQm2rg2vSaFp7mPqwOOk8AoQ9IzDJDh5q07i0anJMpPwzL7t zUY0IfkOxG6iGK8F1+7EveLLeumMBJp/ErMJG4Yl8hgqYy0uKZEKVOKc9ndbbncfXm1m /u7A== X-Gm-Message-State: AOJu0YyuPm86XrJzDcDqLfpZnynJoZ8im8XWzuXqAGUnN+T2irzZz3V2 bxNee5XpfCJxAgzaIh5CKaaBrw== X-Google-Smtp-Source: AGHT+IHKCjKHnesfWytmXKj+iqprh944PAXY9l4gW23+Ka4PQW6QW3hlBqIJoU18UxnPrJ3l26b3cw== X-Received: by 2002:a2e:3a05:0:b0:2bc:b815:d64d with SMTP id h5-20020a2e3a05000000b002bcb815d64dmr1333302lja.30.1695907719321; Thu, 28 Sep 2023 06:28:39 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id c13-20020a05651c014d00b002c01ecf6c01sm3574690ljd.51.2023.09.28.06.28.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 06:28:39 -0700 (PDT) From: Linus Walleij Date: Thu, 28 Sep 2023 15:28:29 +0200 Subject: [PATCH v2 6/9] ixp4xx: Add a ixp4xx hardware crypto kernel module MIME-Version: 1.0 Message-Id: <20230928-ixp4xx-v2-6-ce011eef8239@linaro.org> References: <20230928-ixp4xx-v2-0-ce011eef8239@linaro.org> In-Reply-To: <20230928-ixp4xx-v2-0-ce011eef8239@linaro.org> To: Imre Kaloz , Krzysztof Halasa , Howard Harte , openwrt-devel@lists.openwrt.org X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230928_062840_754958_EDDB8371 X-CRM114-Status: UNSURE ( 9.27 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The IXP4xx crypto module must be loaded after the rootfs is up as it depends on loading some NPE microcode from the file system. Signed-off-by: Linus Walleij --- package/kernel/linux/modules/crypto.mk | 13 +++++++++++++ target/linux/ixp4xx/Makefile | 1 + 2 files changed, 14 insertions(+) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:232 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens , Linus Walleij , Raylynn Knight Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The IXP4xx crypto module must be loaded after the rootfs is up as it depends on loading some NPE microcode from the file system. Signed-off-by: Linus Walleij --- package/kernel/linux/modules/crypto.mk | 13 +++++++++++++ target/linux/ixp4xx/Makefile | 1 + 2 files changed, 14 insertions(+) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index 501be4b0a02c..bfb70f0344fb 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -399,6 +399,19 @@ endef $(eval $(call KernelPackage,crypto-hw-hifn-795x)) +define KernelPackage/crypto-hw-ixp4xx + TITLE:=Intel IXP4xx crypto accelerator + DEPENDS:=@TARGET_ixp4xx +kmod-random-core +kmod-crypto-manager +kmod-crypto-authenc +kmod-crypto-des + KCONFIG:= \ + CONFIG_CRYPTO_HW=y \ + CONFIG_CRYPTO_DEV_IXP4XX + FILES:=$(LINUX_DIR)/drivers/crypto/ixp4xx_crypto.ko + AUTOLOAD:=$(call AutoLoad,09,ixp4xx_crypto) + $(call AddDepends/crypto) +endef + +$(eval $(call KernelPackage,crypto-hw-ixp4xx)) + define KernelPackage/crypto-hw-padlock TITLE:=VIA PadLock ACE with AES/SHA hw crypto module diff --git a/target/linux/ixp4xx/Makefile b/target/linux/ixp4xx/Makefile index 89a1b2407bfe..6cd30877eeee 100644 --- a/target/linux/ixp4xx/Makefile +++ b/target/linux/ixp4xx/Makefile @@ -21,6 +21,7 @@ KERNELNAME:=zImage dtbs include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += fconfig \ + kmod-crypto-hw-ixp4xx \ kmod-usb-ledtrig-usbport \ kmod-leds-gpio