crypto: ccp: Fix uAPI definitions of PSP errors
PATCH 1/1 crypto: ccp: Fix uAPI definitions of PSP errors
Additions to the error enum after explicit 0x27 setting for SEV_RET_INVALID_KEY leads to incorrect value assignments.
Use explicit values to match the manufacturer specifications more clearly.
---
Reposting as requested in
https://lore.kernel.org/r/[email protected]
I wrote it in the first place but since then it travelled a lot, feel free to correct the chain of SOBs and RB :)
--- include/uapi/linux/psp-sev.h | 21 +++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
include/uapi/linux/psp-sev.h +14 -7
@@ -73,13 +73,20 @@ typedef enum {SEV_RET_INVALID_PARAM ,SEV_RET_RESOURCE_LIMIT ,SEV_RET_SECURE_DATA_INVALID , -SEV_RET_INVALID_KEY =0x27 , -SEV_RET_INVALID_PAGE_SIZE , -SEV_RET_INVALID_PAGE_STATE , -SEV_RET_INVALID_MDATA_ENTRY , -SEV_RET_INVALID_PAGE_OWNER , -SEV_RET_INVALID_PAGE_AEAD_OFLOW , -SEV_RET_RMP_INIT_REQUIRED , +SEV_RET_INVALID_PAGE_SIZE =0x0019 , +SEV_RET_INVALID_PAGE_STATE =0x001A , +SEV_RET_INVALID_MDATA_ENTRY =0x001B , +SEV_RET_INVALID_PAGE_OWNER =0x001C , +SEV_RET_AEAD_OFLOW =0x001D , +SEV_RET_EXIT_RING_BUFFER =0x001F , +SEV_RET_RMP_INIT_REQUIRED =0x0020 , +SEV_RET_BAD_SVN =0x0021 , +SEV_RET_BAD_VERSION =0x0022 , +SEV_RET_SHUTDOWN_REQUIRED =0x0023 , +SEV_RET_UPDATE_FAILED =0x0024 , +SEV_RET_RESTORE_REQUIRED =0x0025 , +SEV_RET_RMP_INITIALIZATION_FAILED =0x0026 , +SEV_RET_INVALID_KEY =0x0027 ,SEV_RET_MAX , } sev_ret_code;
Signature · 1 line
2.47.1
Quoted 12 lines · Alexey Kardashevskiy
Additions to the error enum after explicit
0x27setting forSEV_RET_INVALID_KEYleads to incorrect value assignments.Use explicit values to match the manufacturer specifications more clearly.
Fixes 3a45dc2b419e ("crypto: ccp: Define the SEV-SNP commands")Signed-off-by Dionna Glaze <[email protected]>Reviewed-by Tom Lendacky <[email protected]>Signed-off-by Alexey Kardashevskiy <[email protected]>
Quoted 7 lines
---
Reposting as requested in
https://lore.kernel.org/r/[email protected]I wrote it in the first place but since then it travelled a lot, feel free to correct the chain of SOBs and RB :)
It's all good. Thanks for seeing this through to the end.
Signature · 1 line
-Dionna Glaze, PhD, CISSP, CCSP (she/her)
Quoted 15 lines · Dionna Amalie Glaze
Quoted 14 lines · Alexey Kardashevskiy
Additions to the error enum after explicit
0x27setting forSEV_RET_INVALID_KEYleads to incorrect value assignments.Use explicit values to match the manufacturer specifications more clearly.
Fixes 3a45dc2b419e ("crypto: ccp: Define the SEV-SNP commands")Signed-off-by Dionna Glaze <[email protected]>Reviewed-by Tom Lendacky <[email protected]>Signed-off-by Alexey Kardashevskiy <[email protected]>---
Quoted 7 lines
Quoted 5 lines
Reposting as requested in
https://lore.kernel.org/r/[email protected]I wrote it in the first place but since then it travelled a lot, feel free to correct the chain of SOBs and RB :)
It's all good. Thanks for seeing this through to the end.
It should be corrected because the current SOB chain says that Dionna is the author but From is yours, making you the author when it gets applied.
All is documented here and in the following sections:
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteHerbert Xu
maintainerQuoted 3 lines · Borislav Petkov
It should be corrected because the current SOB chain says that Dionna is the author but From is yours, making you the author when it gets applied.
I'll fix this one by hand.
Thanks,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Herbert Xu
maintainerQuoted 13 lines · Alexey Kardashevskiy
Additions to the error enum after explicit
0x27setting forSEV_RET_INVALID_KEYleads to incorrect value assignments.Use explicit values to match the manufacturer specifications more clearly.
Fixes 3a45dc2b419e ("crypto: ccp: Define the SEV-SNP commands")Signed-off-by Dionna Glaze <[email protected]>Reviewed-by Tom Lendacky <[email protected]>Signed-off-by Alexey Kardashevskiy <[email protected]>---
Quoted 8 lines
Reposting as requested in
https://lore.kernel.org/r/[email protected]I wrote it in the first place but since then it travelled a lot, feel free to correct the chain of SOBs and RB :)
--- include/uapi/linux/psp-sev.h | 21 +++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt