JIRA: https://issues.redhat.com/browse/RHEL-85131
Upstream Status: merged into the linux.git
commit 9a7db819a184c21f605a4364131762d5db0c7010
Author: Zhu Jun <zhujun2@cmss.chinamobile.com>
Date: Tue Aug 20 00:42:42 2024 -0700
crypto: tools/ccp - Remove unused variable
the variable is never referenced in the code, just remove them.
Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-85131
Upstream Status: merged into the linux.git
commit 14af865be47ac16ba9f3c98d031dc1f30cb1a642
Author: Mario Limonciello <mario.limonciello@amd.com>
Date: Tue Feb 13 11:34:29 2024 -0600
crypto: ccp - Update return values for some unit tests
Until authenticated the platform enforces a state machine. Adjust
unit tests with this in mind.
Correct the return codes for all the states the unit tests ends up
hitting:
* Set Param / Get Param: DBC_ERROR_BAD_STATE
* Set UID: DBC_ERROR_SIGNATURE_INVALID
* Authencitated Nonce: DBC_ERROR_BAD_PARAMETERS
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-85131
Upstream Status: merged into the linux.git
commit 7b3c2348d314a18f6ed84bab67023ae5d1ec6b1e
Author: Mario Limonciello <mario.limonciello@amd.com>
Date: Tue Aug 29 10:07:59 2023 -0500
crypto: ccp - Fix some unfused tests
Some of the tests for unfused parts referenced a named member parameter,
but when the test suite was switched to call a python ctypes library they
weren't updated. Adjust them to refer to the first argument of the
process_param() call and set the data type of the signature appropriately.
Fixes: 15f8aa7bb3e5 ("crypto: ccp - Add unit tests for dynamic boost control")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-85131
Upstream Status: merged into the linux.git
commit 2ad01eb5fad24627ab4e196dc54a220753b2238b
Author: Mario Limonciello <mario.limonciello@amd.com>
Date: Tue Aug 29 10:07:58 2023 -0500
crypto: ccp - Fix sample application signature passing
When parameters are sent the PSP returns back it's own signature
for the application to verify the authenticity of the result.
Display this signature to the caller instead of the one the caller
sent.
Fixes: f40d42f116cf ("crypto: ccp - Add a sample python script for Dynamic Boost Control")
Fixes: febe3ed3222f ("crypto: ccp - Add a sample library for ioctl use")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-85131
Upstream Status: merged into the linux.git
commit 70f242c1933e9e881c13c31640bb6d56e8b7e738
Author: Mario Limonciello <mario.limonciello@amd.com>
Date: Tue Aug 29 10:07:57 2023 -0500
crypto: ccp - Fix DBC sample application error handling
The sample application was taking values from ioctl() and treating
those as the error codes to present to a user.
This is incorrect when ret is non-zero, the error is stored to `errno`.
Use this value instead.
Fixes: f40d42f116cf ("crypto: ccp - Add a sample python script for Dynamic Boost Control")
Fixes: febe3ed3222f ("crypto: ccp - Add a sample library for ioctl use")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-85131
Upstream Status: merged into the linux.git
commit 7f71c3e033824e1da237916a1885e3c0699f86b2
Author: Mario Limonciello <mario.limonciello@amd.com>
Date: Tue Aug 29 10:07:56 2023 -0500
crypto: ccp - Fix ioctl unit tests
A local environment change was importing ioctl_opt which is required
for ioctl tests to pass. Add the missing import for it.
Fixes: 15f8aa7bb3e5 ("crypto: ccp - Add unit tests for dynamic boost control")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-85131
Upstream Status: merged into the linux.git
commit 15f8aa7bb3e550278aa561e81b2e72ffa8e442b7
Author: Mario Limonciello <mario.limonciello@amd.com>
Date: Fri Jun 23 08:50:00 2023 -0500
crypto: ccp - Add unit tests for dynamic boost control
Interacting with dynamic boost control messages requires the caller
to supply a signature. To allow validation of individual dynamic
boost control components, introduce a set of tests that can be run.
The tests can be run in 3 distinct different environments, and so
certain tests will be skipped depending on the environment.
1. Systems that do not support DBC.
2. Production systems that support DBC but are secured silicon.
3. Pre-production systems that support DBC but are unsecured silicon.
Unsecured silicon does not validate the signature, and so this allows
testing more of the state machine and functionality.
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-85131
Upstream Status: merged into the linux.git
commit f40d42f116cf965a9e37e2991f19ca1b5b156210
Author: Mario Limonciello <mario.limonciello@amd.com>
Date: Fri Jun 23 08:49:59 2023 -0500
crypto: ccp - Add a sample python script for Dynamic Boost Control
Dynamic Boost Control commands are triggered by userspace with
an IOCTL interface that userspace will prepare proper buffers
for a request.
To allow prototyping and testing this interface, add a python3
command line script that loads the dbc_library.so for utilizing
the IOCTLs.
The signature to use and UID are passed as arguments to this script.
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
JIRA: https://issues.redhat.com/browse/RHEL-85131
Upstream Status: merged into the linux.git
commit febe3ed3222f92672d3e0471893aa8ab23275c28
Author: Mario Limonciello <mario.limonciello@amd.com>
Date: Fri Jun 23 08:49:58 2023 -0500
crypto: ccp - Add a sample library for ioctl use
Add a small shared library that demonstrates the usage of the
IOCTL interface. This library can be linked to but, is
intended to be loaded and used by higher level languages
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>