On 9/19/19 11:04 AM, Navid Emamdoost wrote:
> Release all allocated memory if sha type is invalid:
> In ccp_run_sha_cmd, if the type of sha is invalid, the allocated
> hmac_buf should be released.
>
> v2: fix the goto.
>
> Signed-off-by: Navid Emamdoost
On 9/16/19 8:22 AM, Lendacky, Thomas wrote:
> On 9/13/19 6:48 PM, Navid Emamdoost wrote:
>> In ccp_run_sha_cmd, if the type of sha is invalid, the allocated
>> hmac_buf should be released.
>>
>> Signed-off-by: Navid Emamdoost
>> ---
>> drivers/crypto/ccp/ccp-ops.c | 1 +
>> 1 file changed, 1 in
And an apology for a ping using the wrong mail handler, and the top post...
Would love to know if this has gotten any cycles.
On 8/15/19 5:31 PM, Gary R Hook wrote:
> Context:
> We've run into a possible locking issue when using the AMD CCP device
> for crypto offload, with the n
Context:
We've run into a possible locking issue when using the AMD CCP device
for crypto offload, with the new extra tests, and with lock debugging
enabled.
Pre-reqs:
Enable the crypto self-tests and extra tests
Build the crypto testing module (tcrypt)
Enable the kern
>
> Similarly, ccp-dmaengine.c uses dma_get_mask(), which is defined in
> linux/dma-mapping.h, so include that explicitly since it requires nothing
> else from linux/pci.h.
>
> A future patch will remove the includes of linux/pci.h where it is not
> needed.
>
> Signe
On 8/2/19 6:20 PM, Bjorn Helgaas wrote:
> From: Bjorn Helgaas
>
> Remove unused includes of linux/pci.h.
>
> Signed-off-by: Bjorn Helgaas
Acked-by: Gary R Hook
> ---
> drivers/crypto/ccp/ccp-crypto.h | 1 -
> drivers/crypto/ccp/ccp-dev-v3.c | 1 -
> drivers/
On 7/30/19 1:28 PM, Hook, Gary wrote:
> Return and fail driver initialization if a DMA pool can't be
> allocated.
>
> Fixes: 4b394a232df7 ("crypto: ccp - Let a v5 CCP provide the same function as
> v3")
>
> Signed-off-by: Gary R Hook
> ---
> driver
On 7/18/19 8:16 AM, Chuhong Yuan wrote:
> Use dma_pool_zalloc instead of using dma_pool_alloc to allocate
> memory and then zeroing it with memset 0.
> This simplifies the code.
>
> Signed-off-by: Chuhong Yuan
Acked-by: Gary R Hook
> ---
> drivers/crypto/ccp/ccp-ops
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
>> Signed-off-by: David Rientjes
>
> Acked-by: Tom Lendacky
Acked-by: Ga
On 7/10/19 7:46 PM, Eric Biggers wrote:
>
> The generic implementation allows authentication tags of 4, 8, 12, 13, 14, 15,
> or 16 bytes. See crypto_gcm_setauthsize() in crypto/gcm.c, and see
> https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
> section 5.2.1.2 "Output
On 7/10/19 3:34 PM, Eric Biggers wrote:
> On Wed, Jul 10, 2019 at 03:59:05PM +0000, Gary R Hook wrote:
>> On 7/9/19 8:57 PM, Eric Biggers wrote:
>>> On Wed, Jul 10, 2019 at 12:09:22AM +, Hook, Gary wrote:
>>>> The AES GCM function reuses an 'op' da
self-test failure:
>> alg: aead: gcm-aes-ccp encryption test failed (wrong result) on test vector
>> 2, cfg="two even aligned splits"
>>
>> Fixes: 36cf515b9bbe ("crypto: ccp - Enable support for AES GCM on v5 CCPs")
>>
>> Signed
On 7/9/19 5:56 PM, Eric Biggers wrote:
> On Tue, Jul 09, 2019 at 10:09:16PM +0000, Gary R Hook wrote:
>> On 7/9/19 3:10 PM, Eric Biggers wrote:
>>> On Mon, Jul 08, 2019 at 05:08:09PM +, Gary R Hook wrote:
>>>> On 7/5/19 2:40 PM, Eric Biggers wrote:
>>>
On 7/9/19 3:10 PM, Eric Biggers wrote:
> On Mon, Jul 08, 2019 at 05:08:09PM +0000, Gary R Hook wrote:
>> On 7/5/19 2:40 PM, Eric Biggers wrote:
>>> Hi Gary,
>>>
>>> On Wed, Jul 03, 2019 at 07:21:26PM +, Hook, Gary wrote:
>>>> The AES GCM funct
36cf515b9bbe ("crypto: ccp - Enable support for AES GCM on v5 CCPs")
>>
>> Signed-off-by: Gary R Hook
>> ---
>> drivers/crypto/ccp/ccp-ops.c | 12 +++-
>> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> Is this patch meant to
On 7/2/19 12:32 PM, Cfir Cohen wrote:
> Avoid leaking GCM tag through timing side channel.
>
> Fixes: 36cf515b9bbe ("crypto: ccp - Enable support for AES GCM on v5 CCPs")
> Cc: # v4.12+
> Signed-off-by: Cfir Cohen
Acked-by: Gary R Hook
> ---
> drivers/cry
On 7/2/19 11:06 AM, Eric Biggers wrote:
> Hi Tom and Gary,
>
> On latest cryptodev tree, I'm seeing the following self-test failure after I
> built a kernel with the AMD CCP driver and crypto self-tests enabled, and
> booted
> it on system with a Ryzen processor ("Threadripper 1950X"):
>
> [
On 7/1/19 7:25 PM, Eric Biggers wrote:
> On Mon, Jul 01, 2019 at 05:01:32PM -0700, Cfir Cohen wrote:
>> Avoid leaking GCM tag through timing side channel.
>>
>> Signed-off-by: Cfir Cohen
>> ---
>> drivers/crypto/ccp/ccp-ops.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff
On 6/25/19 7:13 PM, Joe Perches wrote:
> On Tue, 2019-06-25 at 23:43 +, Hook, Gary wrote:
>> Tidy up the formatting/grammar in crypto_engine.rst. Use bulleted lists
>> where appropriate.
>
> Hi again Gary.
Howdy!
>
>> diff --git a/Documentation/crypto/crypto_engine.rst
>> b/Documentation/c
On 6/25/19 8:52 AM, Jonathan Corbet wrote:
> On Tue, 25 Jun 2019 13:33:27 +
> Gary R Hook wrote:
>
>>> It's been "valid" since I wrote it...it's just not upstream yet :) I
>>> expect it to be in 5.3, though. So the best way to refer to a kerne
On 6/24/19 3:37 PM, Jonathan Corbet wrote:
> On Mon, 24 Jun 2019 13:29:42 -0700
> Joe Perches wrote:
>
>>> Finally, would you prefer a v2 of the patch set? Happy to do
>>> whatever is preferred, of course.
>>
>> Whatever Jonathan decides is fine with me.
>> Mine was just a plea to avoid unnecessa
the
> value in the module_param() definition.
I'll take "who's an idiot" for $200, Alex.
There'll be v2 patchset a-comin'.
grh
>
> Thanks,
> Tom
>
>>
>> Signed-off-by: Gary R Hook
>> ---
>> drivers/crypto/ccp/ccp-debugfs.c |
On 6/24/19 5:03 PM, Eric Biggers wrote:
> On Mon, Jun 24, 2019 at 07:07:49PM +, Hook, Gary wrote:
>> Add a reference to the crypto engine documentation to
>> the index.
>>
>> Signed-off-by: Gary R Hook
>> ---
>> Documentation/crypto/index.rst |
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
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 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
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 09/25/2018 09:35 AM, Wei Yongjun wrote:
> Fixes the following sparse warning:
>
> drivers/crypto/ccp/psp-dev.c:444:5: warning:
> symbol 'sev_get_firmware' was not declared. Should it be static?
>
> Signed-off-by: Wei Yongjun
This appears to have been introduced by (cryptodev-2.6) commit
e
On 09/24/2018 04:44 PM, Nick Desaulniers wrote:
> On Mon, Sep 24, 2018 at 2:27 PM Gary R Hook wrote:
>>
>> On 09/24/2018 03:24 PM, Nick Desaulniers wrote:
>>> On Mon, Sep 24, 2018 at 12:18 PM Gary R Hook wrote:
>>>>
>>>> On 09/24/2018 12:26
On 09/24/2018 03:24 PM, Nick Desaulniers wrote:
> On Mon, Sep 24, 2018 at 12:18 PM Gary R Hook wrote:
>>
>> On 09/24/2018 12:26 PM, Nathan Chancellor wrote:
>>> Clang emits a warning about this construct:
>>>
>>> drivers/crypto/ccp/sp-platform.c:36:3
On 09/24/2018 02:40 PM, Nathan Chancellor wrote:
> On Mon, Sep 24, 2018 at 07:18:23PM +0000, Gary R Hook wrote:
>> On 09/24/2018 12:26 PM, Nathan Chancellor wrote:
>>> Clang emits a warning about this construct:
>>>
>>> drivers/crypto/ccp/sp-platfo
On 09/24/2018 12:26 PM, Nathan Chancellor wrote:
> Clang emits a warning about this construct:
>
> drivers/crypto/ccp/sp-platform.c:36:36: warning: tentative array
> definition assumed to have one element
> static const struct acpi_device_id sp_acpi_match[];
> ^
d on the family and
> model of the processor.
>
> Model specific firmware files are given highest priority. Followed by
> firmware for a subset of models. Lastly, failing the previous two options,
> fallback to looking for sev.fw.
>
> Signed-off-by: Janakaraj
y: Janakarajan Natarajan
Acked-by: Gary R Hook
> ---
> drivers/crypto/ccp/psp-dev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c
> index 72790d8..f541e60 100644
> --- a/drivers/crypto
pointer.
Add a pointer check of the psp_data field in the sp_device struct
in psp_dev_destroy() and return immediately if it is NULL.
Cc: # 4.16.x-
Fixes: 2a6170dfe755 ("crypto: ccp: Add Platform Security Processor (PSP) device
support")
Signed-off-by: Tom Lendacky
Acked-by: G
On 07/03/2018 12:12 PM, Tom Lendacky wrote:
Add a new CCP/PSP PCI device ID and new PSP register offsets.
Signed-off-by: Tom Lendacky
Acked-by: Gary R Hook
---
drivers/crypto/ccp/sp-pci.c | 29 -
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git
ecure Encrypted Virtualization
(SEV) command support")
Cc: # 4.16.x-
Signed-off-by: Tom Lendacky
---
Reviewed-by: Brijesh Singh
Acked-by: Gary R Hook
drivers/crypto/ccp/psp-dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ccp/p
-by: Gary R Hook
---
drivers/crypto/ccp/psp-dev.c | 24
drivers/crypto/ccp/psp-dev.h |9 -
drivers/crypto/ccp/sp-dev.h |7 ++-
drivers/crypto/ccp/sp-pci.c |7 ++-
4 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/drivers
On 07/03/2018 12:11 PM, Tom Lendacky wrote:
Remove some unused #defines for register offsets that are not used. This
will lessen the changes required when register offsets change between
versions of the device.
Signed-off-by: Tom Lendacky
Acked-by: Gary R Hook
---
drivers/crypto/ccp/psp
On 07/03/2018 12:11 PM, Tom Lendacky wrote:
Add a dev_notice() message to the PSP initialization to report when the
PSP initialization has succeeded and the PSP is enabled.
Signed-off-by: Tom Lendacky
Acked-by: Gary R Hook
---
drivers/crypto/ccp/psp-dev.c |2 ++
1 file changed, 2
pport")
Cc: # 4.16.x-
Signed-off-by: Tom Lendacky
Acked-by: Gary R Hook
---
drivers/crypto/ccp/psp-dev.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c
index ff478d8..973d683 100644
--- a/drivers/cryp
Add missing comments for union members ablkcipher, blkcipher,
cipher, and compress. This silences complaints when building
the htmldocs.
Fixes: 0d7f488f0305a (crypto: doc - cipher data structures)
Signed-off-by: Gary R Hook
---
include/linux/crypto.h |8
1 file changed, 8
Any change to the result buffer should only happen on final, finup
and digest operations. Changes to the buffer for update, import, export,
etc, are not allowed.
Fixes: 66d7b9f6175e ("crypto: testmgr - test misuse of result in ahash")
Signed-off-by: Gary R Hook
Cc:
---
0 files cha
The CCP driver copies data between scatter/gather lists and DMA buffers.
The length of the requested copy operation must be checked against
the available destination buffer length.
Reported-by: Maciej S. Szmigiero
Signed-off-by: Gary R Hook
---
0 files changed
diff --git a/drivers/crypto/ccp
On 03/05/2018 12:31 PM, Kamil Konieczny wrote:
On 05.03.2018 18:47, Gary R Hook wrote:
On 03/05/2018 03:57 AM, Kamil Konieczny wrote:
On 02.03.2018 22:11, Gary R Hook wrote:
Commit 466d7b9f6 (cryptodev-2.6) added code to testmgr to populate, for async
hash operations,
the result buffer
Acked-by: Gary R Hook
---
drivers/crypto/ccp/psp-dev.c | 15 +--
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c
index fcfa5b1eae61..8255258cd040 100644
--- a/drivers/crypto/ccp/psp-dev.c
+++ b/drivers/crypto/ccp
On 03/05/2018 03:57 AM, Kamil Konieczny wrote:
On 02.03.2018 22:11, Gary R Hook wrote:
Commit 466d7b9f6 (cryptodev-2.6) added code to testmgr to populate, for async
hash operations,
the result buffer with a known value and to test the buffer against that value
at intermediate
steps. If the
On 03/05/2018 03:50 AM, Herbert Xu wrote:
On Fri, Mar 02, 2018 at 03:11:52PM -0600, Gary R Hook wrote:
Commit 466d7b9f6 (cryptodev-2.6) added code to testmgr to populate, for
async hash operations, the result buffer with a known value and to test the
buffer against that value at intermediate
On 03/02/2018 05:58 PM, Maciej S. Szmigiero wrote:
On 03.03.2018 00:49, Hook, Gary wrote:
On 3/2/2018 5:15 PM, Maciej S. Szmigiero wrote:
Thanks.
However, what about the first patch from this series?
Without it, while it no longer should cause a buffer overflow, in-kernel
X.509 certificate ve
Commit 466d7b9f6 (cryptodev-2.6) added code to testmgr to populate, for
async hash operations, the result buffer with a known value and to test
the buffer against that value at intermediate steps. If the result
buffer changes the operation is failed.
My question is: why?
What problem does thi
On 02/24/2018 10:03 AM, Maciej S. Szmigiero wrote:
CCP RSA implementation uses a hardware input buffer which size depends only
on the current RSA key length. Key modulus and a message to be processed
is then copied to this buffer based on their own lengths.
Since the price for providing too long
in this huge buffer being passed by rsa-pkcs1pad to CCP even
for smaller key sizes and then in a buffer overflow when ccp_run_rsa_cmd()
tried to copy this large input buffer into a RSA key length-sized hardware
input buffer.
Signed-off-by: Maciej S. Szmigiero
Acked-by: Gary R Hook
Fixes
On 02/27/2018 01:36 PM, Sebastian Andrzej Siewior wrote:
On 2018-02-27 19:40:34 [+0100], Greg Kroah-Hartman wrote:
On Tue, Feb 27, 2018 at 06:33:14PM +0100, Sebastian Andrzej Siewior wrote:
On 2018-02-27 11:08:56 [-0600], Gary R Hook wrote:
That issue remains unclear to me: Are probes of PCI
0x90
| work_for_cpu_fn+0x11/0x20
| process_one_work+0x1ff/0x650
| worker_thread+0x1d4/0x3a0
| kthread+0xfe/0x130
| ret_from_fork+0x27/0x50
If any locking is required, a simple mutex will do it.
Cc: Gary R Hook
Signed-off-by: Sebastian Andrzej Siewior
Acked-by: Gary R Hook
---
driv
On 02/27/2018 11:33 AM, Sebastian Andrzej Siewior wrote:
On 2018-02-27 11:08:56 [-0600], Gary R Hook wrote:
That issue remains unclear to me: Are probes of PCI devices guaranteed to be
serialized? Observations on my CCPs says that they occur in order, but I
don't know for certain
On 02/26/2018 02:35 AM, Sebastian Andrzej Siewior wrote:
On 2018-02-25 21:04:27 [-0500], Hook, Gary wrote:
On 2/23/2018 5:33 PM, Sebastian Andrzej Siewior wrote:
I don't why we need take a single write lock and disable interrupts
while setting up debugfs. This is what what happens when we try a
On 01/07/2018 11:05 PM, Herbert Xu wrote:
On Fri, Jan 05, 2018 at 11:28:23AM -0600, Gary R Hook wrote:
It may not have been obvious from the title but this fixes a bug
which will impact the use of any HW RNG that is the only RNG
registered. The breakage of rmmod/modprobe -r that this fix
On 12/15/2017 01:55 PM, Gary R Hook wrote:
Commit 142a27f0a731 added support for a "best" RNG, and in doing so
introduced a hang from rmmod/modprobe -r when the last RNG on the list
was unloaded.
When the hwrng list is depleted, return the global variables to their
original state and
Please ignore; sent to the wrong list. Mea culpa.
On 12/20/2017 10:57 AM, Gary R Hook wrote:
The AMD IOMMU specification Rev 3.00 (December 2016) introduces a
new Enhanced PPR Handling Support (EPHSup) bit in the MMIO register
offset 0030h (IOMMU Extended Feature Register).
When EPHSup=1, the
support PPR for a
particular endpoint device.
Please see https://support.amd.com/TechDocs/48882_IOMMU.pdf for
this revision of the AMD IOMMU specification.
Signed-off-by: Gary R Hook
---
drivers/iommu/amd_iommu.c | 20 +++-
drivers/iommu/amd_iommu_types.h |2 ++
2 files
On 12/17/2017 03:49 AM, PrasannaKumar Muralidharan wrote:
On 17 December 2017 at 14:53, PrasannaKumar Muralidharan
wrote:
Hi Gary,
Some minor comments below.
On 16 December 2017 at 01:25, Gary R Hook wrote:
Commit 142a27f0a731 added support for a "best" RNG, and in doing so
in
ct.
Fixes: 142a27f0a731 ("hwrng: core - Reset user selected rng by writing "" to
rng_current")
Signed-off-by: Gary R Hook
---
Changes since v1: fix misspelled word in subject
drivers/char/hw_random/core.c |4
1 file changed, 4 insertions(+)
diff --git a/drivers/char/h
ct.
Fixes: 142a27f0a731 ("hwrng: core - Reset user selected rng by writing "" to
rng_current")
Signed-off-by: Gary R Hook
---
drivers/char/hw_random/core.c |4
1 file changed, 4 insertions(+)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
in
y Hook
Cc: Tom Lendacky
Cc: linux-crypto@vger.kernel.org
Cc: k...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Improvements-by: Borislav Petkov
Signed-off-by: Brijesh Singh
Acked-by: Gary R Hook
---
drivers/crypto/ccp/psp-dev.c | 77 +++-
1 fi
vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Improvements-by: Borislav Petkov
Signed-off-by: Brijesh Singh
Acked-by: Gary R Hook
---
drivers/crypto/ccp/psp-dev.c | 344 +++
drivers/crypto/ccp/psp-dev.h | 24 +++
drivers/crypto/ccp/sp-dev.c |
rčmář"
Cc: Borislav Petkov
Cc: Herbert Xu
Cc: Gary Hook
Cc: Tom Lendacky
Cc: linux-crypto@vger.kernel.org
Cc: k...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Improvements-by: Borislav Petkov
Signed-off-by: Brijesh Singh
Reviewed-by: Borislav Petkov
Acked-by: Gary R Hook
---
dri
y Hook
Cc: Tom Lendacky
Cc: linux-crypto@vger.kernel.org
Cc: k...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Improvements-by: Borislav Petkov
Signed-off-by: Brijesh Singh
Acked-by: Gary R Hook
---
drivers/crypto/ccp/psp-dev.c | 24
1 file changed, 24
Cc: linux-crypto@vger.kernel.org
Cc: k...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Brijesh Singh
Acked-by: Gary R Hook
---
Changes since v6:
* when sev_do_cmd() and sev_platform_shutdown() fails then propogate
the error status code from sev_do_cmd() because it c
Cc: linux-crypto@vger.kernel.org
Cc: k...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Brijesh Singh
Acked-by: Gary R Hook
---
Changes since v6:
* when sev_do_cmd() and sev_platform_shutdown() fails then propogate
the error status code from sev_do_cmd() because it c
ndacky
Cc: linux-crypto@vger.kernel.org
Cc: k...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Brijesh Singh
Acked-by: Gary R Hook
---
Changes since v6:
* when sev_do_cmd() and sev_platform_shutdown() fails then propogate
the error status code from sev_do_cmd() beca
Cc: linux-crypto@vger.kernel.org
Cc: k...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Brijesh Singh
---
Acked-by: Gary R Hook
Changes since v6:
* when sev_do_cmd() and sev_platform_shutdown() fails then propogate
the error status code from sev_do_cmd() because i
y Hook
Cc: Tom Lendacky
Cc: linux-crypto@vger.kernel.org
Cc: k...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Improvements-by: Borislav Petkov
Signed-off-by: Brijesh Singh
Acked-by: Gary R Hook
---
drivers/crypto/ccp/psp-dev.c | 28 +++-
1 file changed, 27
ndacky
Cc: linux-crypto@vger.kernel.org
Cc: k...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Brijesh Singh
Acked-by: Gary R Hook
---
drivers/crypto/ccp/psp-dev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-d
rčmář"
Cc: Borislav Petkov
Cc: Herbert Xu
Cc: Gary Hook
Cc: Tom Lendacky
Cc: linux-crypto@vger.kernel.org
Cc: k...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Improvements-by: Borislav Petkov
Signed-off-by: Brijesh Singh
Reviewed-by: Borislav Petkov
Acked-by: Gary R Hook
---
dri
Cc: Gary Hook
Cc: Herbert Xu
Cc: "David S. Miller"
Cc: linux-crypto@vger.kernel.org
Reviewed-by: Gary R Hook
---
drivers/crypto/ccp/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/ccp/Kconfig b/drivers/crypto/ccp/Kconfig
index 6d626606b9c5..9c84f9838
Radim Krčmář"
Cc: Borislav Petkov
Cc: Herbert Xu
Cc: Gary Hook
Cc: Tom Lendacky
Cc: linux-crypto@vger.kernel.org
Cc: k...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Improvements-by: Borislav Petkov
Signed-off-by: Brijesh Singh
Reviewed-by: Borislav Petkov
Acked-by: G
nux-crypto@vger.kernel.org
Cc: k...@vger.kernel.org
Cc: linux-ker...@vger.kernel.org
Improvements-by: Borislav Petkov
Signed-off-by: Brijesh Singh
Reviewed-by: Borislav Petkov
Acked-by: Gary R Hook
---
include/uapi/linux/psp-sev.h | 113 +++
1 file ch
as
v3")
Signed-off-by: Colin Ian King
Acked-by: Gary R Hook
---
drivers/crypto/ccp/ccp-dev-v5.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
index 65604fc65e8f..44a4d2779b15 100644
--- a/drivers/c
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
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
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
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
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
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 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 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 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 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/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
, 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/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
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 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
- 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
---
- 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
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 | 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
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 | 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
1 - 100 of 274 matches
Mail list logo