]> asedeno.scripts.mit.edu Git - linux.git/commit
crypto: ccp - Fix SEV_VERSION_GREATER_OR_EQUAL
authorDavid Rientjes <rientjes@google.com>
Fri, 12 Jul 2019 20:41:58 +0000 (13:41 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 18 Jul 2019 05:39:54 +0000 (13:39 +0800)
commit83bf42510d7f7e1daa692c096e8e9919334d7b57
treed7b1ccc9672d03abc0a3465755716e7c0b0d24d7
parent538a5a072e6ef04377b180ee9b3ce5bae0a85da4
crypto: ccp - Fix SEV_VERSION_GREATER_OR_EQUAL

SEV_VERSION_GREATER_OR_EQUAL() will fail if upgrading from 2.2 to 3.1, for
example, because the minor version is not equal to or greater than the
major.

Fix this and move to a static inline function for appropriate type
checking.

Fixes: edd303ff0e9e ("crypto: ccp - Add DOWNLOAD_FIRMWARE SEV command")
Reported-by: Cfir Cohen <cfir@google.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Acked-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/psp-dev.c