Re: [PATCH v2 01/17] psp: add documentation
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-06-26 13:49:34
On Thu, 26 Jun 2025 07:55:34 -0400 Daniel Zahka wrote:
quoted
quoted
+after ``psp-versions-ena`` has been disabled. User may also disable +``psp-versions-ena`` while there are active associations, which will +break all PSP Rx processing. + +Drivers are expected to ensure that device key is usable upon init +(working keys can be allocated), and that no duplicate keys may be generated +(reuse of SPI without key rotation). Drivers may achieve this by rotating +keys twice before registering the PSP device.Since the device returns a { session_key, spi } pair, risk of reuse is purely in firmware.
I don't think this is a requirement put forward in the spec? Specifically if a device wants to allow partitioning of the SPI space it may let the host pick the SPI. To me the device allocating the SPIs seemed more like a convenience thing that a security feature to prevent reuse.
quoted
I don't follow the need for the extra double rotation.Indeed that last sentence is superfluous. Re-initializing a device shouldn't leave a device key from a previous initialization, while resetting the spi space. If something like that were possible, it should probably be obvious to the driver writer to do something like double rotate the keys.