[PATCH 1/7] crypto:chelsio: Remove unused parameter

2017-10-02 Thread Harsh Jain
Remove unused parameter sent to latest fw. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 43 +++--- drivers/crypto/chelsio/chcr_algo.h | 12 +-- 2 files changed, 23 insertions(+), 32 deletions(-) diff --git a/drivers/crypto/chelsio/ch

[PATCH 4/7] crypto:chelsio:Use x8_ble gf multiplication to calculate IV.

2017-10-02 Thread Harsh Jain
gf128mul_x8_ble() will reduce gf Multiplication iteration by 8. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 11 +-- drivers/crypto/chelsio/chcr_crypto.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/chelsio/chcr_algo.c b/

[PATCH 3/7] crypto:gf128mul: The x8_ble multiplication functions

2017-10-02 Thread Harsh Jain
It multiply GF(2^128) elements in the ble format. It will be used by chelsio driver to fasten gf multiplication. Signed-off-by: Harsh Jain --- crypto/gf128mul.c | 13 + include/crypto/gf128mul.h | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/crypto/gf

[PATCH 0/7]crypto:chelsio: Bugs fixes

2017-10-02 Thread Harsh Jain
It includes bug fix and performance improvement changes. Harsh Jain (7): crypto:gf128mul: The x8_ble multiplication functions crypto:chelsio:Use x8_ble gf multiplication to calculate IV. crypto:chelsio:Remove allocation of sg list to implement 2K limit of dsgl header crypto:chelsio:Mov

[PATCH 6/7] crypto:chelsio:Move DMA un/mapping to chcr from lld cxgb4 driver

2017-10-02 Thread Harsh Jain
Allow chcr to do DMA mapping/Unmapping instead of lld cxgb4. It moves "Copy AAD to dst buffer" requirement from driver to firmware. Signed-off-by: Ganesh Goudar Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 1645 ++ drivers/crypto/chelsio/c

[PATCH 5/7] crypto:chelsio:Remove allocation of sg list to implement 2K limit of dsgl header

2017-10-02 Thread Harsh Jain
Update DMA address index instead of allocating new sg list to impose 2k size limit for each entry. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 237 +++ drivers/crypto/chelsio/chcr_algo.h | 3 +- drivers/crypto/chelsio/chcr_core.h |

[PATCH 7/7] crypto:chelsio: Fix memory leak

2017-10-02 Thread Harsh Jain
Fix memory leak when device does not support crypto. Reported-by: Dan Carpenter Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/chelsio/chcr_core.c b/drivers/crypto/chelsio/chcr_core.c i

[PATCH 2/7] crypto:chelsio: Check error code with IS_ERR macro

2017-10-02 Thread Harsh Jain
Check and return proper error code. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/chcr_algo.c index bdb1014..e4bf32d 100644 --- a/d

Re: [PATCH 2/2] MIPS: crypto: Add crc32 and crc32c hw accelerated module

2017-10-02 Thread Marcin Nowakowski
Hi Jonas, James, On 02.10.2017 16:20, Jonas Gorski wrote: On 29 September 2017 at 23:34, James Hogan wrote: Hi Marcin, On Wed, Sep 27, 2017 at 02:18:36PM +0200, Marcin Nowakowski wrote: This module registers crc32 and crc32c algorithms that use the optional CRC32[bhwd] and CRC32C[bhwd] instr

Re: [PATCH V2] Fix a sleep-in-atomic bug in shash_setkey_unaligned

2017-10-02 Thread Herbert Xu
On Mon, Oct 02, 2017 at 09:18:24PM -0700, Andy Lutomirski wrote: > > On Oct 2, 2017, at 7:25 PM, Jia-Ju Bai wrote: > > > > The SCTP program may sleep under a spinlock, and the function call path is: > > sctp_generate_t3_rtx_event (acquire the spinlock) > > sctp_do_sm > >sctp_side_effects > >

Re: [PATCH V2] Fix a sleep-in-atomic bug in shash_setkey_unaligned

2017-10-02 Thread Andy Lutomirski
> On Oct 2, 2017, at 7:25 PM, Jia-Ju Bai wrote: > > The SCTP program may sleep under a spinlock, and the function call path is: > sctp_generate_t3_rtx_event (acquire the spinlock) > sctp_do_sm >sctp_side_effects > sctp_cmd_interpreter >sctp_make_init_ack > sctp_pack_cook

[PATCH V2] Fix a sleep-in-atomic bug in shash_setkey_unaligned

2017-10-02 Thread Jia-Ju Bai
The SCTP program may sleep under a spinlock, and the function call path is: sctp_generate_t3_rtx_event (acquire the spinlock) sctp_do_sm sctp_side_effects sctp_cmd_interpreter sctp_make_init_ack sctp_pack_cookie crypto_shash_setkey shash_setke

[PATCH] Fix a sleep-in-atomic bug in shash_setkey_unaligned

2017-10-02 Thread Jia-Ju Bai
For the same reason, the orinoco driver may sleep in interrupt handler, and the function call path is: orinoco_rx_isr_tasklet orinoco_rx orinoco_mic crypto_shash_setkey shash_setkey_unaligned kmalloc(GFP_KERNEL) To fix it, GFP_KERNEL is replaced with GFP_ATOMIC. This

[PATCH v2] crypto: keywrap - simplify code

2017-10-02 Thread Stephan Müller
Hi Herbert, Changes v2: * use __be64 for A and R variables * eliminate tbe variable * use initial IV value with cpu_to_be64 when accessing variable A ---8<--- The code is simplified by using two __be64 values for the operation instead of using two arrays of u8. This allows to get rid of the memo

Re: [PATCH v8 0/4] crypto: add algif_akcipher user space API

2017-10-02 Thread Mat Martineau
Hi Tudor - On Mon, 2 Oct 2017, Tudor Ambarus wrote: Hi, all, On 08/10/2017 09:39 AM, Stephan Müller wrote: Hi, This patch set adds the AF_ALG user space API to externalize the asymmetric cipher API recently added to the kernel crypto API. Do we have enough pros and cons so we can decide w

[Part2 PATCH v4.1 06/29] crypto: ccp: Define SEV key management command id

2017-10-02 Thread Brijesh Singh
Define Secure Encrypted Virtualization (SEV) key management command id and structure. The command definition is available in SEV KM [1] spec 0.14. [1] http://support.amd.com/TechDocs/55766_SEV-KM API_Specification.pdf Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Borislav Petkov Cc: Herbert Xu Cc:

[Part2 PATCH v4.1 07/29] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-10-02 Thread Brijesh Singh
AMDs new Secure Encrypted Virtualization (SEV) feature allows the memory contents of a virtual machines to be transparently encrypted with a key unique to the guest VM. The programming and management of the encryption keys are handled by the AMD Secure Processor (AMD-SP), which exposes the commands

Re: [PATCH v4 23/27] x86_64: assembly, change all ENTRY+ENDPROC to SYM_FUNC_*

2017-10-02 Thread Boris Ostrovsky
On 10/02/2017 05:12 AM, Jiri Slaby wrote: > These are all functions which are invoked from elsewhere, so we annotate > them as global using the new SYM_FUNC_START. And their ENDPROC's by > SYM_FUNC_END. > > And make sure ENTRY/ENDPROC is not defined on X86_64, given these were > the last users. > >

[Part2 Patch v4.2] crypto: ccp: Add Platform Security Processor (PSP) device support

2017-10-02 Thread Brijesh Singh
The Platform Security Processor (PSP) is part of AMD Secure Processor (AMD-SP), PSP is a dedicated processor that provides the support for key management commands in a Secure Encrypted Virtualization (SEV) mode, along with software-based Trusted Execution Environment (TEE) to enable the third-party

Re: [PATCH 2/2] MIPS: crypto: Add crc32 and crc32c hw accelerated module

2017-10-02 Thread Jonas Gorski
On 29 September 2017 at 23:34, James Hogan wrote: > Hi Marcin, > > On Wed, Sep 27, 2017 at 02:18:36PM +0200, Marcin Nowakowski wrote: >> This module registers crc32 and crc32c algorithms that use the >> optional CRC32[bhwd] and CRC32C[bhwd] instructions in MIPSr6 cores. >> >> Signed-off-by: Marcin

Re: [PATCH v8 0/4] crypto: add algif_akcipher user space API

2017-10-02 Thread Tudor Ambarus
Hi, all, On 08/10/2017 09:39 AM, Stephan Müller wrote: Hi, This patch set adds the AF_ALG user space API to externalize the asymmetric cipher API recently added to the kernel crypto API. Do we have enough pros and cons so we can decide which interface to use for exporting akcipher/kpp to user

Re: [PATCH v4 23/27] x86_64: assembly, change all ENTRY+ENDPROC to SYM_FUNC_*

2017-10-02 Thread Rafael J. Wysocki
On Monday, October 2, 2017 11:12:42 AM CEST Jiri Slaby wrote: > These are all functions which are invoked from elsewhere, so we annotate > them as global using the new SYM_FUNC_START. And their ENDPROC's by > SYM_FUNC_END. > > And make sure ENTRY/ENDPROC is not defined on X86_64, given these were

Re: [PATCH 0/3] padata cpu awareness fixes

2017-10-02 Thread Herbert Xu
On Mon, Oct 02, 2017 at 01:14:24PM +0200, Mathias Krause wrote: > > Ping! Herbert, will these patches go through your tree or Steffen's? They are in my queue. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 0/3] padata cpu awareness fixes

2017-10-02 Thread Mathias Krause
On 12 September 2017 at 11:07, Steffen Klassert wrote: > On Fri, Sep 08, 2017 at 08:57:08PM +0200, Mathias Krause wrote: >> Hi Steffen, Herbert, >> >> this series solves multiple issues of padata I ran into while trying to >> make use of pcrypt for IPsec. >> >> The first issue is that the reorder

Re: [PATCH 2/4] staging: ccree: simplify access to struct device

2017-10-02 Thread Joe Perches
On Mon, 2017-10-02 at 10:03 +0100, Gilad Ben-Yossef wrote: > Introduce a DEV macro to retrieve struct device from private > data structure in preparation to replacing custom logging > macros with proper dev_dbg and friends which require struct > device. [] > diff --git a/drivers/staging/ccree/ssi_d

[PATCH v4 06/27] x86: crypto, annotate local functions

2017-10-02 Thread Jiri Slaby
Use the newly added SYM_FUNC_START_LOCAL to annotate starts of all functions which do not have ".globl" annotation, but their ends are annotated by ENDPROC. This is needed to balance ENDPROC for tools that are about to generate debuginfo. To be symmetric, we also convert their ENDPROCs to the new

[PATCH v4 08/27] x86: assembly, annotate aliases

2017-10-02 Thread Jiri Slaby
_key_expansion_128 is an alias to _key_expansion_256a, __memcpy to memcpy, xen_syscall32_target to xen_sysenter_target, and so on. Annotate them all using the new SYM_FUNC_START_ALIAS, SYM_FUNC_START_LOCAL_ALIAS, and SYM_FUNC_END_ALIAS. This will make the tools generating the debuginfo happy. Sign

[PATCH v4 26/27] x86_32: assembly, change all ENTRY+ENDPROC to SYM_FUNC_*

2017-10-02 Thread Jiri Slaby
These are all functions which are invoked from elsewhere, so we annotate them as global using the new SYM_FUNC_START (and their ENDPROC's by SYM_FUNC_END.) Now, we can finally force ENTRY/ENDPROC to be undefined on X86. Signed-off-by: Jiri Slaby Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: Ing

[PATCH v4 23/27] x86_64: assembly, change all ENTRY+ENDPROC to SYM_FUNC_*

2017-10-02 Thread Jiri Slaby
These are all functions which are invoked from elsewhere, so we annotate them as global using the new SYM_FUNC_START. And their ENDPROC's by SYM_FUNC_END. And make sure ENTRY/ENDPROC is not defined on X86_64, given these were the last users. Signed-off-by: Jiri Slaby Cc: "H. Peter Anvin" Cc: Th

[PATCH 3/4] staging: ccree: move to generic device log infra

2017-10-02 Thread Gilad Ben-Yossef
Move over from using macro wrappers around to printk to dev_err, dev_dbg and friends and clean up resulting fallout. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 226 ++ drivers/staging/ccree/ssi_buffer_mgr.c | 394 +++

[PATCH 2/4] staging: ccree: simplify access to struct device

2017-10-02 Thread Gilad Ben-Yossef
Introduce a DEV macro to retrieve struct device from private data structure in preparation to replacing custom logging macros with proper dev_dbg and friends which require struct device. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 11 --- drivers/staging/ccr

[PATCH 4/4] staging: ccree: simplify OOM handling

2017-10-02 Thread Gilad Ben-Yossef
Simplify handling of memory allocation failures and remove redundant log messages Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 11 -- drivers/staging/ccree/ssi_driver.c | 1 - drivers/staging/ccree/ssi_hash.c | 42 +---

[PATCH 0/4] staging: ccree: logging related coding style fixes

2017-10-02 Thread Gilad Ben-Yossef
The following patch set cleans up some code and builds upon this to replace ccree custom logging macros with the generic device dev_* facilities, handles the resulting fallout and further simplifies logging handling in some OOM error handling code path exposed by checkpatch following the change. P

[PATCH 1/4] staging: ccree: remove sysfs if of deleted code

2017-10-02 Thread Gilad Ben-Yossef
The ccree cycle count mechanism was removed in commit 7f821f0c6ffa ("staging: ccree: remove cycle count debug support") but the sysfs interface lingered on. Remove it now. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_sysfs.c | 266 -- 1 file c