Re: [PATCH 1/2] crypto: ccp - simplify sev_update_firmware()
From: Herbert Xu
Date: Sat Mar 14 2026 - 01:09:21 EST
On Mon, Mar 02, 2026 at 08:02:23AM -0700, Tycho Andersen wrote:
> From: "Tycho Andersen (AMD)" <tycho@xxxxxxxxxx>
>
> sev_do_cmd() has its own command buffer (sev->cmd_buf) with the correct
> alignment, perms, etc. that it copies the command into, so prepending it to
> the firmware data is unnecessary.
>
> Switch sev_update_firmware() to using a stack allocated command in light of
> this copy, and drop all of the resulting pointer math.
>
> Signed-off-by: Tycho Andersen (AMD) <tycho@xxxxxxxxxx>
> ---
> drivers/crypto/ccp/sev-dev.c | 27 +++++++++------------------
> 1 file changed, 9 insertions(+), 18 deletions(-)
All applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt