Re: [RFC PATCH] KEYS: Provide keyctls to do public key operations

2016-04-15 Thread Mat Martineau
On Thu, 14 Apr 2016, David Howells wrote: The interface for the active ops is a bit clunky as the syscall interface doesn't provide sufficient argument space to pass everything I need to specify. Some basic integer arguments are specified in a struct and more complex options through a string

Re: [RFC PATCH] KEYS: Provide keyctls to do public key operations

2016-04-15 Thread David Howells
Tadeusz Struk wrote: > > --- a/crypto/asymmetric_keys/signature.c > > +++ b/crypto/asymmetric_keys/signature.c > > Since this file implements the enc/dec operations also > should it be renamed to crypto/asymmetric_keys/public_key_ops.c > or something similar?

Re: [PATCH v5 6/6] crypto: AF_ALG - add support for key_id

2016-04-15 Thread Tadeusz Struk
On 04/15/2016 02:32 PM, kbuild test robot wrote: > Hi Tadeusz, > > [auto build test ERROR on cryptodev/master] > [also build test ERROR on v4.6-rc3 next-20160415] > [if your patch is applied to the wrong git tree, please drop us a note to > help improving the system] >

Re: [PATCH v5 6/6] crypto: AF_ALG - add support for key_id

2016-04-15 Thread kbuild test robot
Hi Tadeusz, [auto build test ERROR on cryptodev/master] [also build test ERROR on v4.6-rc3 next-20160415] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Tadeusz-Struk/crypto-algif-add

Re: [cryptodev:master 43/49] WARNING: drivers/crypto/qat/qat_common/intel_qat.o(.init.text+0x30d): Section mismatch in reference from the function init_module() to the function .exit.text:adf_exit_vf_

2016-04-15 Thread Tadeusz Struk
On 04/15/2016 12:52 PM, kbuild test robot wrote: > tree: > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git > master > head: 5f575efea79caae69b81f922d99b221302a2c003 > commit: d6064165ba4449ea085a389724d728258a3180ec [43/49] crypto: qat - > adf_dev_stop should not

[PATCH v5 2/6] crypto: AF_ALG -- add setpubkey setsockopt call

2016-04-15 Thread Tadeusz Struk
From: Stephan Mueller For supporting asymmetric ciphers, user space must be able to set the public key. The patch adds a new setsockopt call for setting the public key. Signed-off-by: Stephan Mueller Signed-off-by: Tadeusz Struk

[PATCH v5 4/6] crypto: algif_akcipher - enable compilation

2016-04-15 Thread Tadeusz Struk
From: Stephan Mueller Add the Makefile and Kconfig updates to allow algif_akcipher to be compiled. Signed-off-by: Stephan Mueller Signed-off-by: Tadeusz Struk --- crypto/Kconfig |9 + crypto/Makefile |1 + 2

[PATCH v5 3/6] crypto: AF_ALG -- add asymmetric cipher interface

2016-04-15 Thread Tadeusz Struk
From: Stephan Mueller This patch adds the user space interface for asymmetric ciphers. The interface allows the use of sendmsg as well as vmsplice to provide data. This version has been rebased on top of 4.6 and a few chackpatch issues have been fixed. Signed-off-by:

[PATCH v5 1/6] crypto: AF_ALG -- add sign/verify API

2016-04-15 Thread Tadeusz Struk
From: Stephan Mueller Add the flags for handling signature generation and signature verification. Also, the patch adds the interface for setting a public key. Signed-off-by: Stephan Mueller Signed-off-by: Tadeusz Struk ---

[PATCH v5 5/6] crypto: algif_akcipher - add ops_nokey

2016-04-15 Thread Tadeusz Struk
Similar to algif_skcipher and algif_hash, algif_akcipher needs to prevent user space from using the interface in an improper way. This patch adds nokey ops handlers, which do just that. Signed-off-by: Tadeusz Struk --- crypto/algif_akcipher.c | 159

[PATCH v5 0/6] crypto: algif - add akcipher

2016-04-15 Thread Tadeusz Struk
First four patches are a resend of the v3 algif_akcipher from Stephan Mueller, with minor changes after rebase on top of 4.6-rc1. The next three patches add support for keys stored in system keyring subsystem. First patch adds algif_akcipher nokey hadlers. Second patch adds generic sign,

[PATCH v5 6/6] crypto: AF_ALG - add support for key_id

2016-04-15 Thread Tadeusz Struk
This patch adds support for asymmetric key type to AF_ALG. It will work as follows: A new PF_ALG socket options are added on top of existing ALG_SET_KEY and ALG_SET_PUBKEY, namely ALG_SET_KEY_ID and ALG_SET_PUBKEY_ID for setting public and private keys respectively. When these new options will be

[cryptodev:master 43/49] WARNING: drivers/crypto/qat/qat_common/intel_qat.o(.init.text+0x30d): Section mismatch in reference from the function init_module() to the function .exit.text:adf_exit_vf_wq()

2016-04-15 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 5f575efea79caae69b81f922d99b221302a2c003 commit: d6064165ba4449ea085a389724d728258a3180ec [43/49] crypto: qat - adf_dev_stop should not be called in atomic context config: i386-allmodconfig (attached

Re: [RFC PATCH] KEYS: Provide keyctls to do public key operations

2016-04-15 Thread Tadeusz Struk
Hi David, On 04/14/2016 03:00 PM, David Howells wrote: > diff --git a/crypto/asymmetric_keys/signature.c > b/crypto/asymmetric_keys/signature.c > index 11b7ba170904..8ecbeda16b53 100644 > --- a/crypto/asymmetric_keys/signature.c > +++ b/crypto/asymmetric_keys/signature.c Since this file

[PATCH] crypto: qat - fix section mismatch warning

2016-04-15 Thread Tadeusz Struk
Subject: [PATCH] crypto: qat - fix section mismatch warning Fix Section mismatch warinig in adf_exit_vf_wq() Reported-by: kbuild test robot Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/adf_vf_isr.c | 2 +- 1 file changed, 1

[PATCH 2/3] crypto: qat - check if PF is running

2016-04-15 Thread Tadeusz Struk
Before VF sends a signal to PF it should check if PF is still running. Tested-by: Suman Bangalore Sathyanarayana Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_c3xxxvf/adf_drv.c | 2 ++

[PATCH 3/3] crypto: qat - interrupts need to be enabled when VFs are disabled

2016-04-15 Thread Tadeusz Struk
IRQs need to be enabled when VFs go down in case some VF to PF comms happens. Tested-by: Suman Bangalore Sathyanarayana Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/adf_init.c | 3 ++- 1 file changed, 2

[PATCH 1/3] crypto: qat - move vf2pf_init and vf2pf_exit to common

2016-04-15 Thread Tadeusz Struk
The vf2pf_init and vf2pf_exit are exactly the same for all VFs so move them to common and reuse. Tested-by: Suman Bangalore Sathyanarayana Signed-off-by: Tadeusz Struk --- .../crypto/qat/qat_c3xxxvf/adf_c3xxxvf_hw_data.c |

[cryptodev:master 43/49] WARNING: drivers/crypto/qat/built-in.o(.init.text+0x309): Section mismatch in reference from the function adf_register_ctl_device_driver() to the function .exit.text:adf_exit_

2016-04-15 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 5f575efea79caae69b81f922d99b221302a2c003 commit: d6064165ba4449ea085a389724d728258a3180ec [43/49] crypto: qat - adf_dev_stop should not be called in atomic context config: i386-randconfig-s1-201615

RE: [PATCH v3 1/3] crypto: rsa - generalize ASN.1 sequences

2016-04-15 Thread Tudor-Dan Ambarus
> On Fri, Apr 15, 2016 at 02:32:42PM +, Tudor-Dan Ambarus wrote: > > > On Wed, Apr 06, 2016 at 04:37:04PM +0300, Tudor Ambarus wrote: > > > > This approach has the advantage that users can select specific > > > > parser actions by using a general parser with function pointers > > > > to

Re: [PATCH v5 1/3] Documentation: devicetree: add Freescale SCC bindings

2016-04-15 Thread Herbert Xu
On Tue, Apr 12, 2016 at 11:04:24AM +0200, Steffen Trumtrar wrote: > Add documentation for the Freescale Security Controller (SCC) > found on i.MX25 SoCs. > > Signed-off-by: Steffen Trumtrar > Acked-by: Rob Herring All applied. -- Email: Herbert Xu

Re: [PATCH v3 1/3] crypto: rsa - generalize ASN.1 sequences

2016-04-15 Thread Herbert Xu
On Fri, Apr 15, 2016 at 02:32:42PM +, Tudor-Dan Ambarus wrote: > > On Wed, Apr 06, 2016 at 04:37:04PM +0300, Tudor Ambarus wrote: > > > This approach has the advantage that users can select specific > > > parser actions by using a general parser with function pointers > > > to specific

Re: [PATCH] crypto: document correct return value for request allocation

2016-04-15 Thread Herbert Xu
On Sat, Apr 02, 2016 at 10:54:56AM -0500, Eric Biggers wrote: > Signed-off-by: Eric Biggers Applied. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe

Re: [PATCH resend] crypto: get rid of superfluous __GFP_REPEAT

2016-04-15 Thread Herbert Xu
On Thu, Apr 14, 2016 at 10:51:42AM +0200, Michal Hocko wrote: > From: Michal Hocko > > __GFP_REPEAT has a rather weak semantic but since it has been introduced > around 2.6.12 it has been ignored for low order allocations. > > lzo_init uses __GFP_REPEAT to allocate

Re: [PATCH] crypto: ccp - Prevent information leakage on export

2016-04-15 Thread Herbert Xu
On Wed, Apr 13, 2016 at 10:52:25AM -0500, Tom Lendacky wrote: > Prevent information from leaking to userspace by doing a memset to 0 of > the export state structure before setting the structure values and copying > it. This prevents un-initialized padding areas from being copied into the > export

Re: [PATCH v4 0/2] Add Hisilicon Random Number Generator(RNG) support

2016-04-15 Thread Herbert Xu
On Wed, Apr 13, 2016 at 06:11:26PM +0800, Kefeng Wang wrote: > Changes since v3: > - Compatible name "hisilicon,hip04-rng" and "hisilicon,hip05-rng" are used, > suggested by Robe Herring > - Add reviewed-by from Mathieu Poirier All applied. -- Email: Herbert Xu

Re: [PATCH] crypto: sha1-mb - use corrcet pointer while completing jobs

2016-04-15 Thread Herbert Xu
On Tue, Apr 12, 2016 at 09:45:51AM +, Xiaodong Liu wrote: > In sha_complete_job, incorrect mcryptd_hash_request_ctx pointer is used > when check and complete other jobs. If the memory of first completed req > is freed, while still completing other jobs in the func, kernel will > crash since

Re: [PATCH] crypto: rsa - fix dst len

2016-04-15 Thread Herbert Xu
On Wed, Apr 06, 2016 at 02:42:32PM -0700, Tadeusz Struk wrote: > The output buffer length has to be at least as big as the key_size. > It is then updated to the actual output size by the implementation. > > Cc: > Signed-off-by: Tadeusz Struk

Re: [PATCH v2] crypto: qat - adf_dev_stop should not be called in atomic context

2016-04-15 Thread Herbert Xu
On Wed, Apr 06, 2016 at 11:01:54AM -0700, Tadeusz Struk wrote: > VFs call adf_dev_stop() from a PF to VF interrupt bottom half. > This causes an oops "scheduling while atomic", because it tries > to acquire a mutex to un-register crypto algorithms. > This patch fixes the issue by calling

RE: [PATCH v3 1/3] crypto: rsa - generalize ASN.1 sequences

2016-04-15 Thread Tudor-Dan Ambarus
> On Wed, Apr 06, 2016 at 04:37:04PM +0300, Tudor Ambarus wrote: > > This approach has the advantage that users can select specific > > parser actions by using a general parser with function pointers > > to specific actions. > > I don't understand why we need different parsing functions in the >

Re: [PATCH v2] crypto: ccp - Register the CCP as a DMA resource

2016-04-15 Thread Herbert Xu
On Tue, Apr 05, 2016 at 10:42:38AM -0500, Gary R Hook wrote: > The CCP has the ability to provide DMA services to the > kernel using pass-through mode of the device. Register > these services as general purpose DMA channels. You forgot the Signed-off-by. -- Email: Herbert Xu

Re: [patch] crypto,ccp: Fix RT breaking #include

2016-04-15 Thread Herbert Xu
On Tue, Apr 05, 2016 at 03:03:21PM +0200, Mike Galbraith wrote: > > Direct include of rwlock_types.h breaks RT, use spinlock_types.h instead. > > Fixes: 553d2374db0b crypto: ccp - Support for multiple CCPs > Signed-off-by: Mike Galbraith Applied. -- Email: Herbert Xu

Re: [PATCH v3 1/3] crypto: rsa - generalize ASN.1 sequences

2016-04-15 Thread Herbert Xu
On Wed, Apr 06, 2016 at 04:37:04PM +0300, Tudor Ambarus wrote: > Use common ASN.1 sequences for all RSA implementations. > > Give hardware RSA implementations the chance to use > the RSA's software implementation parser even if they > are likely to want to use raw integers. > > The parser

Re: ppc/talitos oops on call to crypto_alloc_aead

2016-04-15 Thread Herbert Xu
Jonas Eymann wrote: > > running a current 4.4.6 kernel on a board using a Freescale P1020, I ran into > an oops when calling crypto_alloc_aead using the talitos driver. I could also > reproduce this using the run-time self tests: Thanks for the patch. Could you please add a

Re: [PATCH v2 0/4] Introduce bulk mode for crypto engine framework

2016-04-15 Thread Herbert Xu
On Tue, Mar 15, 2016 at 03:47:58PM +0800, Baolin Wang wrote: > Now some cipher hardware engines prefer to handle bulk block by merging > requests > to increase the block size and thus increase the hardware engine processing > speed. > > This patchset introduces request bulk mode to help the

[PATCH 2/2 v2] crypto: kpp - Add DH software implementation

2016-04-15 Thread Salvatore Benedetto
* Implement MPI based Diffie-Hellman under kpp API * Test provided uses data generad by OpenSSL Signed-off-by: Salvatore Benedetto --- crypto/Kconfig | 8 ++ crypto/Makefile | 2 + crypto/dh.c | 224

[PATCH 1/2 v2] crypto: Key-agreement Protocol Primitives API (KPP)

2016-04-15 Thread Salvatore Benedetto
Add key-agreement protocol primitives (kpp) API which allows to implement primitives required by protocols such as DH and ECDH. The API is composed mainly by the following functions * set_params() - It allows the user to set the parameters known to both parties involved in the key-agreement

[PATCH 0/2 v2] Key-agreement Protocol Primitives (KPP) API

2016-04-15 Thread Salvatore Benedetto
Hi Herb, the following patchset introduces a new API for abstracting key-agreement protocols such as DH and ECDH. It provides the primitives required for implementing the protocol, thus the name KPP (Key-agreement Protocol Primitives). Regards, Salvatore Changes from v1: * Change check in