From nobody Thu Apr 2 17:17:48 2026 Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B673C348866 for ; Wed, 11 Feb 2026 03:32:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770780737; cv=none; b=S7uBobiLYouS8MeQkaVVlb3JbJF9FIApScAfs59S9Uqgvm+UArmdAeal7v3hbnDiYeuMX4JyLWMTJbR1/Rdo/r6aTGApwDVkA0CLB2P8u7bXdXwMZkKlovSEh8JIT9B6QC5io+VuatnVgROy2aRRIe5d7+ad4WDwpbmFsAtOfWU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770780737; c=relaxed/simple; bh=9VdUnjWUzIRc5MRPzIsJU//SqqlQjG40MUyiPknL2gs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cS0Bdn8DePpcPtaIjbaFag81S/ViO6RxBDpRjvqc1RfAAghihRn+9b/pFeV+x3Rvk2MFhg5SPjZeo+MLR49EDB6PJsaSAcnkAUa0I/NTg19Ez04utq8OWd0a8dXDArNSZICn/3VjElCpoHBLFlQ5ZYyATitGPh/yY5eDEs2gyCE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DB1Dbdll; arc=none smtp.client-ip=209.85.215.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DB1Dbdll" Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-c5513f598c0so2278311a12.0 for ; Tue, 10 Feb 2026 19:32:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770780735; x=1771385535; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c4AFw0Ke6Jdsl0upZ9PbC8XO1EFiCkPW7RyBX/Dx3Ac=; b=DB1Dbdll2K5Lm5FX54944Tv++KRUsg60jNmVbZT1174jH5ASUE5MB9JfcR+RQBhrgD vFa4HhfXsu55Wlvv1gGQiDNBalLw+QFqU8zTvDlPP7ThCOrx6hAPxkrKxGF//mhMMfAf z9AmAvkJXBcLlEkXTPHeomVTBDkTC4Dfag/H9TckkhwJDVAFRN7lh/Ko2FfqDouzfGfq zHJxboARQJ4257ICQlFXUVFakdQ9eDWOPZrz/17/Jpx7nRi35Ep7l+oqTTIF6r/gCtL/ 1Wo7nCudZKYoXnbDpOlmgb90SvLuCthM3p4576xt+8iUhGViZ3p5eO9iu5AB6N/brAPH P7oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770780735; x=1771385535; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=c4AFw0Ke6Jdsl0upZ9PbC8XO1EFiCkPW7RyBX/Dx3Ac=; b=wWHqj/sNH7B+VraXvrAV1ZxGuhcwvZkIDKUP0mmqhZlRfGE5GlDP9ovDZfcdkDnUVe 5bcJl6p5S9oqFKIwFBHmnjFgwCEpwqclOTNmrbRM0vMMaLKwOcgYLba7NVivueBsZK/A tE424elotd/uIEdW9Ur+vG0ywz34QIMjWKUKlzEv7ZVtS61iJaBbC90nPE7SEjpa0yBl j0sPjHHr7daWLcL1V/dxeb/sDCeI0XCMmes6OozsNthbLg77olGN4Gp3ncPTwjYoCeAp A3wV6qbGhfcgk0tlAHbEK68wwHSTqs4CHNzksRQQ22namxFE6zYFKpomXhNKRApGINMA 9Erw== X-Forwarded-Encrypted: i=1; AJvYcCW7tmUym3Hc2XyNQJwi/QKwQCxd/YA7AIl55zJQcNNES0ubst0g81zhknnOere7jsz6JwFSQssYpI95BPk=@vger.kernel.org X-Gm-Message-State: AOJu0YyAVMI084hWKeGeig8t5/vezAAuyT2UROCm+THIZ1zAEMUY8Y6K BGt+VN4XjQi3ABDA/psbLcjv5tU7sev+jJxDDYjfLQrSJ3Z0rtv6lxW/pMFdP2oqVdk= X-Gm-Gg: AZuq6aIO60LWkp1TfqEkZB6rgZb45el1B0MmR/YvhChnIIHTqWVTeFgWaU+E66HRmE3 7VrWf74nUBw0kPIBdWkABjfKGtt7jxAtdbt/JHSYmhZHEigct2+kKrjI5O8roixtik0O+WrU/Ex Ti6lTqWfJH4UeNn814w6w2syM3fTqvnvF/a4X3o0fDLMyoFUFbI6o4B2wmBFA9jLrJ9bmKPLg6W oEuMn9JrxJ5t/OuEjT27d6n2LkYTArM8XowZrxZVJVHdSAswyj3lQ2r+xlo0YpNiaw42sJ56DZq 2WdbL3PJ71Jx82KMwieghpKEjBQ2QyS2RCyTSnSgPGIbO0FwlYvbtX7Bi3/kjbvNuFT8rYWB0d2 BP/8rwKw3Nm1amTPKFZja9CLqLQZ7fvaPryxpnz3QPuGlkzoPzChV4Y/R8/sXFKxtixEiK0lOvN s+Sxn109+y3SrWyX2CFgZ/4bV5UBZJWGVXswPRb8oKBw== X-Received: by 2002:a05:6a20:1589:b0:364:14f3:22a7 with SMTP id adf61e73a8af0-394323c170amr719059637.42.1770780735134; Tue, 10 Feb 2026 19:32:15 -0800 (PST) Received: from toolbx.alistair23.me ([2403:581e:fdf9:0:6209:4521:6813:45b7]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c6e197d63c9sm464856a12.20.2026.02.10.19.32.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Feb 2026 19:32:14 -0800 (PST) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: bhelgaas@google.com, lukas@wunner.de, rust-for-linux@vger.kernel.org, akpm@linux-foundation.org, linux-pci@vger.kernel.org, Jonathan.Cameron@huawei.com, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Cc: alex.gaynor@gmail.com, benno.lossin@proton.me, boqun.feng@gmail.com, a.hindborg@kernel.org, gary@garyguo.net, bjorn3_gh@protonmail.com, tmgross@umich.edu, alistair23@gmail.com, ojeda@kernel.org, wilfred.mallawa@wdc.com, aliceryhl@google.com, Alistair Francis Subject: [RFC v3 21/27] crypto: ecdsa: Load early in boot Date: Wed, 11 Feb 2026 13:29:28 +1000 Message-ID: <20260211032935.2705841-22-alistair.francis@wdc.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260211032935.2705841-1-alistair.francis@wdc.com> References: <20260211032935.2705841-1-alistair.francis@wdc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Alistair Francis Work is ongoing to support PCIe device attestation and authentication. As part of this probing a PCIe device will require signing via the SPDM protocol to the kernel. Linux should verify the device before enabling the device, which means we need the crypto functions to be ready before arch initilisation (where PCIe init happens). Move the crypto init to postcore to ensure it's loaded before PCIe devices. This allows us to verify the certificate chain provided by a PCIe device via SPDM before we enable it. Signed-off-by: Alistair Francis Reviewed-by: Jonathan Cameron --- crypto/ecdsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/ecdsa.c b/crypto/ecdsa.c index ce8e4364842f..b225911c5266 100644 --- a/crypto/ecdsa.c +++ b/crypto/ecdsa.c @@ -334,7 +334,7 @@ static void __exit ecdsa_exit(void) crypto_unregister_sig(&ecdsa_nist_p521); } =20 -module_init(ecdsa_init); +postcore_initcall(ecdsa_init); module_exit(ecdsa_exit); =20 MODULE_LICENSE("GPL"); --=20 2.52.0