A version 5 device provides the primitive commands
required for AES GCM. This patch adds support for
en/decryption.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/Makefile|1
drivers/crypto/ccp/ccp-crypto-aes-galois.c | 252 +++
drivers/crypto
The reverse-get/set functions can be simplified by
eliminating unused code.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-ops.c | 145 +-
1 file changed, 59 insertions(+), 86 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers
Wire up the v3 CCP as a cipher provider.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/Makefile |1
drivers/crypto/ccp/ccp-crypto-main.c | 15 ++
drivers/crypto/ccp/ccp-crypto-rsa.c | 258 ++
drivers/crypto/ccp/ccp-crypto.h | 24
Wire up support for Triple DES in ECB mode.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/Makefile |1
drivers/crypto/ccp/ccp-crypto-des3.c | 254 ++
drivers/crypto/ccp/ccp-crypto-main.c | 10 +
drivers/crypto/ccp/ccp-crypto.h | 25
On 10/13/2016 01:25 PM, Stephan Mueller wrote:
Am Donnerstag, 13. Oktober 2016, 09:53:09 CEST schrieb Gary R Hook:
Hi Gary,
Wire up the v3 CCP as a cipher provider.
Signed-off-by: Gary R Hook
---
...snip...
+}
+
+static void ccp_free_mpi_key(struct ccp_rsa_key *key)
+{
+ mpi_free
Move RSA support of general use into internal/rsa.h.
This allows reuse of, e.g. RSA MPI keys and support
functions.
Signed-off-by: Gary R Hook
---
crypto/rsa.c | 16
include/crypto/internal/rsa.h | 17 +
2 files changed, 17 insertions(+), 16
On 10/17/2016 10:08 AM, Wei Yongjun wrote:
From: Wei Yongjun
Fixes the following sparse warning:
drivers/crypto/ccp/ccp-dev.c:44:6: warning:
symbol 'ccp_error_codes' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
Excellent. Thank you.
Acked-by: Gary R Hook
Bit fields are not sensitive to endianness, so use
a transparent standard data type
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev.h | 42 +-
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-dev.h b
Clean up patch for an unneeded structure member.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev.h |1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/crypto/ccp/ccp-dev.h b/drivers/crypto/ccp/ccp-dev.h
index 0d996fe..b96d788 100644
--- a/drivers/crypto/ccp/ccp-dev.h
+++ b
Fix a few problems revealed by testing: verify consistent
units, especially in public slot allocation. Percolate
some common initialization code up to a common routine.
Add some comments.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v3.c |4
drivers/crypto/ccp/ccp-dev-v5.c
On 10/20/2016 02:20 PM, Paul Bolle wrote:
The abbreviation for Cryptographic Coprocessor is "CCP".
Signed-off-by: Paul Bolle
Acked-by: Gary R Hook
---
include/linux/ccp.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/ccp.h b/include/l
store in the LSB. Populate the descriptor with
the LSB location (address).
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v5.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
index ff7816a
Move the command queue tail pointer when an error is
detected. Always return the error.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v5.c |7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
The following series implements new function for a version
5 CCP: Support for SHA-2, wiring of RSA using the updated
framework, additional RSA features for new devices, AES GCM
mode, and Triple-DES in ECB and CBC mode.
---
Gary R Hook (9):
crypto: ccp - Fix handling of RSA exponent on a v5
store in the LSB. Populate the descriptor with
the LSB location (address).
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v5.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
index ff7816a
Move the command queue tail pointer when an error is
detected. Always return the error.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v5.c |7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
The reverse-get/set functions can be simplified by
eliminating unused code.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-ops.c | 142 +-
1 file changed, 56 insertions(+), 86 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers
Incorporate 384-bit and 512-bit hashing for a version 5 CCP
device
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-sha.c | 22 +++
drivers/crypto/ccp/ccp-crypto.h |8 ++--
drivers/crypto/ccp/ccp-ops.c| 72 +++
include
Wire up the CCP as an RSA cipher provider.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/Makefile |1
drivers/crypto/ccp/ccp-crypto-main.c | 19 ++
drivers/crypto/ccp/ccp-crypto-rsa.c | 294 ++
drivers/crypto/ccp/ccp-crypto.h | 32
RSA support of general use, but dependent upon MPI,
should go into internal/rsa.h
Signed-off-by: Gary R Hook
---
crypto/rsa.c | 16
include/crypto/internal/rsa.h | 17 +
2 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/crypto
Take advantage of the increased RSA key size support in
the v5 CCP.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-rsa.c |5 ++
drivers/crypto/ccp/ccp-crypto.h |1
drivers/crypto/ccp/ccp-dev-v3.c |1
drivers/crypto/ccp/ccp-dev-v5.c | 10 +++--
drivers
A version 5 device provides the primitive commands
required for AES GCM. This patch adds support for
en/decryption.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/Makefile|1
drivers/crypto/ccp/ccp-crypto-aes-galois.c | 257
drivers/crypto
Wire up support for Triple DES in ECB mode.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/Makefile |1
drivers/crypto/ccp/ccp-crypto-des3.c | 254 ++
drivers/crypto/ccp/ccp-crypto-main.c | 10 +
drivers/crypto/ccp/ccp-crypto.h | 20
ons through a
struct of function pointers
This patch series is based on cryptodev-2.6
---
Gary R Hook (4):
crypto: ccp - Remove check for x86 family and model
crypto: ccp - Support for multiple CCPs
crypto: ccp - CCP versioning support
crypto: ccp - Add abstraction for dev
Each x86 SoC will make use of a unique PCI ID for the CCP
device so it is not necessary to check for the CPU family
and model.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev.c | 47 ++
1 file changed, 11 insertions(+), 36 deletions(-)
diff
-by: Gary R Hook
---
drivers/crypto/ccp/Makefile |2
drivers/crypto/ccp/ccp-dev-v3.c | 534 +
drivers/crypto/ccp/ccp-dev.c | 306 +
drivers/crypto/ccp/ccp-dev.h | 138 +-
drivers/crypto/ccp/ccp-ops.c
manages the version-specific data.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-aes.c | 12 ++-
drivers/crypto/ccp/ccp-crypto-sha.c |9 +++-
drivers/crypto/ccp/ccp-dev.c| 27
drivers/crypto/ccp/ccp-dev.h|8
Enable management of >1 CCPs in a system. Each device will
get a unique identifier, as well as uniquely named
resources. Treat each CCP as an orthogonal unit and register
resources individually.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev.c |
This patch fixes a coccinelle warning about reusing a flags
variable in nested lock acquisition.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-dev.c b/drivers/crypto/ccp/ccp-dev.c
Each CCP queue can product interrupts for 4 conditions:
operation complete, queue empty, error, and queue stopped.
This driver only works with completion and error events.
Cc: # 4.9.x-
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v5.c |9 +
drivers/crypto/ccp/ccp
Correct the driver to attend to only relevant interrupt
bits, and ensure that interrupts are managed properly
at module unload.
Changes from V2:
- Apply patches to relevant stable branches
Changes from V1:
- Changed the #define to "SUPPORTED_INTERRUPTS"
---
Gary R Hook (2):
c
Each CCP queue can product interrupts for 4 conditions:
operation complete, queue empty, error, and queue stopped.
This driver only works with completion and error events.
Cc: # 4.9.x+
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v5.c |9 +
drivers/crypto/ccp/ccp
From: Gary R Hook
Ensure that we disable interrupts first when shutting down
the driver.
Cc: # 4.9.x+
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v5.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto
proper pair, with cover letter, is right behind this one.
Not that there's anything wrong with this one, only that it
went out without a cover letter.
...and now I see that there's a typo. Dang it.
Cc: # 4.9.x-
Signed-off-by: Gary R Hook
---
event being 'lost' and the queue hanging, waiting to be
serviced. Since the status bits are never fully de-asserted, the
CCP never generates another interrupt (all bits zero -> one or more
bits one), and no further CCP operations will be executed.
Cc: # 4.9.x+
Signed-off-by
serializing state changes, handles processing
of the interrupts, and avoids the loss of task completion
status.
---
Gary R Hook (2):
crypto: ccp - Change ISR handler method for a v3 CCP
crypto: ccp - Change ISR handler method for a v5 CCP
drivers/crypto/ccp/ccp-dev-v3.c | 120
event being 'lost' and the queue hanging, waiting to be
serviced. Since the status bits are never fully de-asserted, the
CCP never generates another interrupt (all bits zero -> one or more
bits one), and no further CCP operations will be executed.
Cc: # 4.9.x+
Signed-off-by
CC: # 4.9.x+
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/ccp/ccp-dev.c b/drivers/crypto/ccp/ccp-dev.c
index 92d1c6959f08..b7504562715c 100644
--- a/drivers/crypto/ccp/ccp-dev.c
+++ b/drivers/crypto/ccp/ccp
b/drivers/crypto/ccp/ccp-debugfs.c
new file mode 100644
index ..6d86693b117f
--- /dev/null
+++ b/drivers/crypto/ccp/ccp-debugfs.c
@@ -0,0 +1,345 @@
+/*
+ * AMD Cryptographic Coprocessor (CCP) driver
+ *
+ * Copyright (C) 2017 Advanced Micro Devices, Inc.
+ *
+ * Author: Gary R Hook
+
es from V1:
- Correct polarity of test when destroying devices at module unload
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/Makefile |3
drivers/crypto/ccp/ccp-debugfs.c | 345 ++
drivers/crypto/ccp/ccp-dev-v5.c | 28 +++
drivers/crypto/ccp
On 5/19/2017 1:53 AM, Corentin Labbe wrote:
This patch simply replace all occurrence of HMAC IPAD/OPAD value by their
define.
Signed-off-by: Corentin Labbe
Acked-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-sha.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff
krobot warning: make sure that all error return paths release locks.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-debugfs.c |7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-debugfs.c b/drivers/crypto/ccp/ccp-debugfs.c
index
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-debugfs.c | 18 +-
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-debugfs.c b/drivers/crypto/ccp/ccp-debugfs.c
index 3cd6c83754e0..99aba1622613 100644
--- a/drivers/crypto/ccp/ccp
The following series enables RSA operations on version 5 devices,
adds a set-reqsize function (to provide uniformity with other cipher
APIs), implements akcipher enablement in the crypto layer, and
makes a tweak for expanded v5 device capabilities.
---
Gary R Hook (4):
crypto: ccp - Fix
Version 5 devices have requirements for buffer lengths, as well as
parameter format (e.g. bits vs. bytes). Fix the base CCP driver
code to meet requirements all supported versions.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v5.c | 10 ++--
drivers/crypto/ccp/ccp-ops.c| 95
Signed-off-by: Gary R Hook
---
include/crypto/internal/akcipher.h |6 ++
1 file changed, 6 insertions(+)
diff --git a/include/crypto/internal/akcipher.h
b/include/crypto/internal/akcipher.h
index 479a0078f0f7..805686ba2be4 100644
--- a/include/crypto/internal/akcipher.h
+++ b/include
Wire up the v3 CCP as a cipher provider.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/Makefile |1
drivers/crypto/ccp/ccp-crypto-main.c | 21 ++
drivers/crypto/ccp/ccp-crypto-rsa.c | 286 ++
drivers/crypto/ccp/ccp-crypto.h | 31
A V5 device can accommodate larger keys, as well as read the keys
directly from memory instead of requiring them to be in a local
storage block.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-rsa.c |5 -
drivers/crypto/ccp/ccp-crypto.h |1 +
drivers/crypto/ccp/ccp
On 06/22/2017 12:15 AM, Stephan Müller wrote:
Am Donnerstag, 22. Juni 2017, 00:48:01 CEST schrieb Gary R Hook:
Hi Gary,
Thanks, Stephen. Good catch(es). I will re-work this, but it looks like
my changes should wait
until after the patch set posted by Brijesh (Introduce AMD Secure
Processor
Changes since v1:
- Remove unneeded local variable
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-debugfs.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-debugfs.c b/drivers/crypto/ccp/ccp-debugfs.c
index 3cd6c83754e0
Add/remove blank lines as appropriate.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev.c |1 +
include/linux/ccp.h |1 -
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/ccp/ccp-dev.c b/drivers/crypto/ccp/ccp-dev.c
index 2506b5025700
Use the CCP_NEW_JOBID() macro when assigning an identifier
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-ops.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
index c0dfdacbdff5..78f29d459df8 100644
On 06/27/2017 08:57 AM, Hook, Gary wrote:
Changes since v1:
- Remove unneeded local variable
My apologies for this patch... Pretty sure that the first version won't pass
review anyway because of this.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-debugfs.c |
Changes since v2:
- On failure remove only the DebugFS heirarchy for this device
Changes since v1:
- Remove unneeded local variable
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-debugfs.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers
On 06/30/2017 12:59 AM, Gustavo A. R. Silva wrote:
Print error message on platform_get_irq failure before return.
Signed-off-by: Gustavo A. R. Silva
---
drivers/crypto/ccp/ccp-platform.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/ccp/ccp-platform.c
b/
On 06/29/2017 11:54 AM, Singh, Brijesh wrote:
Update pci and platform files to use devres interface to allocate the PCI
and iomap resources. Also add helper functions to consolicate module init,
exit and power mangagement code duplication.
Signed-off-by: Brijesh Singh
Acked-by: Gary R Hook
: Brijesh Singh
Acked-by: Gary R Hook
---
drivers/crypto/Kconfig| 6 +-
drivers/crypto/ccp/Kconfig| 21 +++--
drivers/crypto/ccp/Makefile | 4 +-
drivers/crypto/ccp/ccp-dev-v3.c | 4 +-
drivers/crypto/ccp/ccp-dev-v5.c | 5 +-
drivers/crypto/ccp/ccp-dev.c
invoked upon interrupt.
Signed-off-by: Brijesh Singh
Acked-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v3.c | 6 +--
drivers/crypto/ccp/ccp-dev-v5.c | 7 ++-
drivers/crypto/ccp/ccp-dev.c | 3 +-
drivers/crypto/ccp/ccp-dev.h | 2 -
drivers/crypto/ccp/ccp-pci.c | 103
other than renaming file and structures
Signed-off-by: Brijesh Singh
Acked-by: Gary R Hook
---
drivers/crypto/ccp/Makefile| 4 +-
drivers/crypto/ccp/ccp-dev.h | 6 --
drivers/crypto/ccp/sp-dev.c| 12 ++--
drivers/cryp
On 06/29/2017 11:54 AM, Singh, Brijesh wrote:
Since SP device driver supports multiples devices (e.g CCP, PSP), we
should not fail the driver init just because CCP device is not found.
Signed-off-by: Brijesh Singh
Acked-by: Gary R Hook
---
drivers/crypto/ccp/sp-dev.c | 12
1
Some updates this year have not had copyright dates changed in modified
files. Correct this for 2017.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-aes-galois.c |2 +-
drivers/crypto/ccp/ccp-crypto-des3.c |2 +-
drivers/crypto/ccp/ccp-crypto-main.c |2
Version 5 CCPs have differing requirements for XTS-AES: key components
are stored in a 512-bit vector. The context must be little-endian
justified. AES-256 is supported now, so propagate the cipher size to
the command descriptor.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-aes
This series accomplishes the following:
- Fix RSA support in the base CCP driver
- Add the akcipher_set_reqsize() function
- Enable RSA support in the crypto layer
- Allow for a larger RSA modulus in a version 5 CCP
---
Gary R Hook (4):
crypto: ccp - Fix base RSA function for version
Version 5 devices have requirements for buffer lengths, as well as
parameter format (e.g. bits vs. bytes). Fix the base CCP driver
code to meet requirements all supported versions.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v5.c | 10 +++--
drivers/crypto/ccp/ccp-ops.c
Signed-off-by: Gary R Hook
---
0 files changed
diff --git a/include/crypto/internal/akcipher.h
b/include/crypto/internal/akcipher.h
index 479a0078f0f7..805686ba2be4 100644
--- a/include/crypto/internal/akcipher.h
+++ b/include/crypto/internal/akcipher.h
@@ -38,6 +38,12 @@ static inline void
A version 5 CCP can handle an RSA modulus up to 16k bits.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-rsa.c |5 -
drivers/crypto/ccp/ccp-crypto.h |1 +
drivers/crypto/ccp/ccp-dev-v3.c |1 +
drivers/crypto/ccp/ccp-dev-v5.c |2 ++
drivers/crypto
Wire up the CCP as an RSA cipher provider.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/Makefile |1
drivers/crypto/ccp/ccp-crypto-main.c | 19 ++
drivers/crypto/ccp/ccp-crypto-rsa.c | 296 ++
drivers/crypto/ccp/ccp-crypto.h | 31
On 07/18/2017 01:28 AM, Stephan Müller wrote:
Am Montag, 17. Juli 2017, 22:08:27 CEST schrieb Gary R Hook:
Hi Gary,
Version 5 CCPs have differing requirements for XTS-AES: key components
are stored in a 512-bit vector. The context must be little-endian
justified. AES-256 is supported now, so
On 07/21/2017 09:47 AM, Theodore Ts'o wrote:
On Fri, Jul 21, 2017 at 01:39:13PM +0200, Oliver Mangold wrote:
Better, but obviously there is still much room for improvement by reducing
the number of calls to RDRAND.
Hmm, is there some way we can easily tell we are running on Ryzen? Or
do we be
On 07/17/2017 04:48 PM, Lendacky, Thomas wrote:
On 7/17/2017 3:08 PM, Gary R Hook wrote:
Version 5 CCPs have differing requirements for XTS-AES: key components
are stored in a 512-bit vector. The context must be little-endian
justified. AES-256 is supported now, so propagate the cipher size to
Version 5 CCPs have some new requirements for XTS-AES: the type field
must be specified, and the key requires 512 bits, with each part
occupying 256 bits and padded with zeroes.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v5.c |2 ++
drivers/crypto/ccp/ccp-dev.h|2
Vet the key using the available standard function
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-aes-xts.c |9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/ccp/ccp-crypto-aes-xts.c
b/drivers/crypto/ccp/ccp-crypto-aes-xts.c
index
The CCP supports a limited set of unit-size values. Change the check
for this parameter such that acceptable values match the enumeration.
Then clarify the conditions under which we must use the fallback
implementation.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-aes-xts.c
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-aes-xts.c | 16 +---
drivers/crypto/ccp/ccp-crypto.h |2 +-
drivers/crypto/ccp/ccp-ops.c|3 +++
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-crypto-aes
xts_check_key() in the crypto layer
---
Gary R Hook (4):
crypto: ccp - Add a call to xts_check_key()
crypto: ccp - Enable XTS-AES-128 support on all CCPs
crypto: ccp - Rework the unit-size check for XTS-AES
crypto: ccp - Add XTS-AES-256 support for CCP version 5
drivers/crypto
Version 5 CCPs have some new requirements for XTS-AES: the type field
must be specified, and the key requires 512 bits, with each part
occupying 256 bits and padded with zeroes.
cc: # 4.9.x+
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-aes-xts.c |4 ++-
drivers/crypto/ccp
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-aes-xts.c | 26 ++
drivers/crypto/ccp/ccp-crypto.h |2 +-
drivers/crypto/ccp/ccp-ops.c|2 ++
3 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/ccp/ccp
The CCP supports a limited set of unit-size values. Change the check
for this parameter such that acceptable values match the enumeration.
Then clarify the conditions under which we must use the fallback
implementation.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-aes-xts.c
Vet the key using the available standard function
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-aes-xts.c |9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/ccp/ccp-crypto-aes-xts.c
b/drivers/crypto/ccp/ccp-crypto-aes-xts.c
index
- Remove unnecessary variable
- Delay a change (that belongs in the CCP v5 patch)
Changes since v1:
- rework the validation of the unit-size; move to a separate patch
- expand the key buffer to accommodate 256-bit keys
- use xts_check_key() in the crypto layer
---
Gary R Hook (3):
crypto
- Edit comments
- Remove unnecessary variable
- Delay a change (that belongs in the CCP v5 patch)
Changes since v1:
- rework the validation of the unit-size; move to a separate patch
- expand the key buffer to accommodate 256-bit keys
- use xts_check_key() in the crypto layer
---
On 07/31/2017 03:49 PM, Arnd Bergmann wrote:
The added support for version 5 CCPs introduced a false-positive
warning in the RSA implementation:
drivers/crypto/ccp/ccp-ops.c: In function 'ccp_run_rsa_cmd':
drivers/crypto/ccp/ccp-ops.c:1856:3: error: 'sb_count' may be used
uninitialized in this
select CRYPTO_RSA
help
Support for using the cryptographic API with the AMD Cryptographic
Coprocessor. This module supports offload of SHA and AES algorithms.
Reviewed by: Gary R Hook
On 08/01/2017 03:35 PM, Arnd Bergmann wrote:
On Tue, Aug 1, 2017 at 4:52 PM, Gary R Hook wrote:
On 07/31/2017 03:49 PM, Arnd Bergmann wrote:
The added support for version 5 CCPs introduced a false-positive
warning in the RSA implementation:
drivers/crypto/ccp/ccp-ops.c: In function
, 0))
+ if (sb_count)
cmd_q->ccp->vdata->perform->sbfree(cmd_q, op.sb_key, sb_count);
return ret;
Reviewed-by: Gary R Hook
On 08/08/2017 07:03 AM, Gilad Ben-Yossef wrote:
Replace -EBUSY with -EAGAIN when reporting transient busy
indication in the absence of backlog.
Signed-off-by: Gilad Ben-Yossef
Could we use "ccp" in the subject line, please?
---
drivers/crypto/ccp/ccp-crypto-main.c | 8 +++-
drivers/cry
On 08/08/2017 08:42 AM, Pan Bian wrote:
The return value of dma_map_single() should be checked by
dma_mapping_error(). However, in function ccp_init_dm_workarea(), its
return value is checked against NULL, which could result in failures.
Signed-off-by: Pan Bian
Acked-by: Gary R Hook
On 08/14/2017 10:21 AM, Gilad Ben-Yossef wrote:
Replace -EBUSY with -EAGAIN when reporting transient busy
indication in the absence of backlog.
Signed-off-by: Gilad Ben-Yossef
Reviewed-by: Gary R Hook
---
drivers/crypto/ccp/ccp-crypto-main.c | 8 +++-
drivers/crypto/ccp/ccp-dev.c
On 07/17/2017 04:48 PM, Lendacky, Thomas wrote:
On 7/17/2017 3:08 PM, Gary R Hook wrote:
Version 5 CCPs have differing requirements for XTS-AES: key components
are stored in a 512-bit vector. The context must be little-endian
justified. AES-256 is supported now, so propagate the cipher size to
On Tue, Jul 25, 2017 at 02:12:11PM -0500, Gary R Hook wrote:
> Version 5 CCPs have some new requirements for XTS-AES: the type field
> must be specified, and the key requires 512 bits, with each part
> occupying 256 bits and padded with zeroes.
>
> cc: # 4.9.x+
>
> Signe
On 08/18/2017 11:19 AM, Gary R Hook wrote:
On 07/17/2017 04:48 PM, Lendacky, Thomas wrote:
On 7/17/2017 3:08 PM, Gary R Hook wrote:
Version 5 CCPs have differing requirements for XTS-AES: key components
are stored in a 512-bit vector. The context must be little-endian
justified. AES-256 is
On 08/18/2017 11:02 PM, Herbert Xu wrote:
On Fri, Aug 18, 2017 at 11:41:04AM -0500, Gary R Hook wrote:
On Tue, Jul 25, 2017 at 02:12:11PM -0500, Gary R Hook wrote:
Version 5 CCPs have some new requirements for XTS-AES: the type field
must be specified, and the key requires 512 bits, with each
From: amd
Clean up the mapped pages and the unmap object once we are done with
it. This enables the final clean-up of the object once the transfer
is complete.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dmaengine.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers
From: amd
Use the provided mechanism in dmaengine.h to invoke the
completion callback.
Signed-off-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dmaengine.c |4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-dmaengine.c
b/drivers/crypto/ccp/ccp
On 09/06/2017 03:46 PM, Borislav Petkov wrote:
On Wed, Sep 06, 2017 at 03:38:38PM -0500, Brijesh Singh wrote:
This bit of my struggle -- tip/master is not in sync with cryptodev-2.6 [1].
Aaha.
In order to expand the CCP driver we need the following commits from the
cryptodev-2.6
57de3aefb73
On 09/07/2017 05:19 PM, Brijesh Singh wrote:
Hi Boris,
On 09/07/2017 09:27 AM, Borislav Petkov wrote:
...
The commit message above reads better to me as the help text than what
you have here.
Also, in order to make it easier for the user, I think we'll need a
CONFIG_AMD_MEM_ENCRYPT_SEV or s
en
of a mind to kick out and not try to do any further work. But debugfs is
to be treated as an exception to that paradigm? Carry on, ignore errors,
don't worry about it?
That said,
Acked-by: Gary R Hook
>
> Cc: Tom Lendacky
> Cc: Gary Hook
> Cc: Herbert Xu
> Cc: &quo
On 3/29/19 8:43 PM, YueHaibing wrote:
> Use kmemdup rather than duplicating its implementation
>
> Signed-off-by: YueHaibing
Acked-by: Gary R Hook
> ---
> drivers/crypto/ccp/ccp-crypto-rsa.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git
On 6/24/19 8:04 AM, Lendacky, Thomas wrote:
> On 6/23/19 2:18 PM, David Rientjes wrote:
>> If ccp_dev_init() fails, kfree() the allocated ccp since it will otherwise
>> be leaked.
>
> Not needed. It's allocated with devm_kzalloc(), so it won't be leaked.
>
>
On 6/24/19 2:30 PM, Joe Perches wrote:
> On Mon, 2019-06-24 at 19:07 +, Hook, Gary wrote:
>> Tidy up the crypto documentation by filling in some variable
>> descriptions, make some grammatical corrections, and enhance
>> formatting.
>
> While this seems generally OK, please try not to make the
101 - 200 of 274 matches
Mail list logo