Re: [PATCH] linux/types.h: enable endian checks for all sparse builds

2016-12-07 Thread Michael S. Tsirkin
On Thu, Dec 08, 2016 at 05:21:47AM +, Bart Van Assche wrote: > On 12/07/16 18:29, Michael S. Tsirkin wrote: > > By now, linux is mostly endian-clean. Enabling endian-ness > > checks for everyone produces about 200 new sparse warnings for me - > > less than 10% over the 2000 sparse warnings

Re: [PATCH] linux/types.h: enable endian checks for all sparse builds

2016-12-07 Thread Bart Van Assche
On 12/07/16 18:29, Michael S. Tsirkin wrote: > By now, linux is mostly endian-clean. Enabling endian-ness > checks for everyone produces about 200 new sparse warnings for me - > less than 10% over the 2000 sparse warnings already there. > > Not a big deal, OTOH enabling this helps people notice >

[PATCH v6 2/2] crypto: add virtio-crypto driver

2016-12-07 Thread Gonglei
This patch introduces virtio-crypto driver for Linux Kernel. The virtio crypto device is a virtual cryptography device as well as a kind of virtual hardware accelerator for virtual machines. The encryption anddecryption requests are placed in the data queue and are ultimately handled by

[PATCH v6 1/2] sparc: fix a building error reported by kbuild

2016-12-07 Thread Gonglei
>> arch/sparc/include/asm/topology_64.h:44:44: error: implicit declaration of function 'cpu_data' [-Werror=implicit-function-declaration] #define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id) ^ Let's include cpudata.h in topology_64.h.

[PATCH v6 0/2] virtio-crypto: add Linux driver

2016-12-07 Thread Gonglei
v6: - add patch 1/2 to make sparc architecture happy. [Sam] - close created sessions previousely when rekeying. - convert the priority of virtio crypto algs from 4001 to 501 which is enough. v5: - add comments for algs_lock and table_lock. [Stefan] - use kzfree instead of kfree for key

[PATCH] linux/types.h: enable endian checks for all sparse builds

2016-12-07 Thread Michael S. Tsirkin
By now, linux is mostly endian-clean. Enabling endian-ness checks for everyone produces about 200 new sparse warnings for me - less than 10% over the 2000 sparse warnings already there. Not a big deal, OTOH enabling this helps people notice they are introducing new bugs. So let's just drop

RE: [PATCH v5 1/1] crypto: add virtio-crypto driver

2016-12-07 Thread Gonglei (Arei)
Hi Sam, > > Subject: Re: [PATCH v5 1/1] crypto: add virtio-crypto driver > > On Mon, Dec 05, 2016 at 03:12:52AM +, Gonglei (Arei) wrote: > > I don't think the root cause of those warnings are introduced by > > virtio-crypto > driver. > > > > What's your opinion? Sam and David? > > Root

Re: [PATCH v5 1/1] crypto: add virtio-crypto driver

2016-12-07 Thread Sam Ravnborg
On Mon, Dec 05, 2016 at 03:12:52AM +, Gonglei (Arei) wrote: > I don't think the root cause of those warnings are introduced by > virtio-crypto driver. > > What's your opinion? Sam and David? Root cause here is that arch/sparc/include/asm/topology_64.h references cpu_data without including

Re: [PATCH v3 1/6] crypto: testmgr - avoid overlap in chunked tests

2016-12-07 Thread Eric Biggers
On Wed, Dec 07, 2016 at 07:53:51PM +, Ard Biesheuvel wrote: > Does this help at all? > > diff --git a/crypto/testmgr.c b/crypto/testmgr.c > index 670893bcf361..59e67f5b544b 100644 > --- a/crypto/testmgr.c > +++ b/crypto/testmgr.c > @@ -63,7 +63,7 @@ int alg_test(const char *driver, const char

Re: [PATCH v3 1/6] crypto: testmgr - avoid overlap in chunked tests

2016-12-07 Thread Ard Biesheuvel
On 7 December 2016 at 19:19, Eric Biggers wrote: > On Mon, Dec 05, 2016 at 06:42:23PM +, Ard Biesheuvel wrote: >> The IDXn offsets are chosen such that tap values (which may go up to >> 255) end up overlapping in the xbuf allocation. In particular, IDX1 >> and IDX3 are

Re: [PATCH 2/3] crypto: brcm: Add Broadcom SPU driver

2016-12-07 Thread Rob (William) Rice
Mark, Thanks for the comments. Replies below. Rob On 12/6/2016 9:18 AM, Mark Rutland wrote: On Wed, Nov 30, 2016 at 03:07:32PM -0500, Rob Rice wrote: +static const struct of_device_id bcm_spu_dt_ids[] = { + { + .compatible = "brcm,spum-crypto", + .data =

Re: [PATCH 1/3] crypto: brcm: DT documentation for Broadcom SPU driver

2016-12-07 Thread Rob (William) Rice
Mark, Thanks for your comments. Replies below. Rob On 12/6/2016 9:06 AM, Mark Rutland wrote: On Wed, Nov 30, 2016 at 03:07:31PM -0500, Rob Rice wrote: Device tree documentation for Broadcom Secure Processing Unit (SPU) crypto driver. Signed-off-by: Steve Lin

Re: [PATCH 10/10] virtio: enable endian checks for sparse builds

2016-12-07 Thread Stefan Hajnoczi
On Tue, Dec 06, 2016 at 05:41:05PM +0200, Michael S. Tsirkin wrote: > __CHECK_ENDIAN__ isn't on by default presumably because > it triggers too many sparse warnings for correct code. > But virtio is now clean of these warnings, and > we want to keep it this way - enable this for > sparse builds. >

Re: [PATCH v4] crypto: AF_ALG - fix AEAD tag memory handling

2016-12-07 Thread Stephan Müller
Am Mittwoch, 7. Dezember 2016, 20:09:14 CET schrieb Herbert Xu: Hi Herbert, > On Mon, Dec 05, 2016 at 03:26:19PM +0100, Stephan Mueller wrote: > > Hi Herbert, > > > > Changes v4: restore the old behavior -- if the caller does not provide > > sufficient output buffer size, return an error. > >

Re: [PATCH v2] crypto/mcryptd: Check mcryptd algorithm compatibility

2016-12-07 Thread Herbert Xu
On Mon, Dec 05, 2016 at 11:46:31AM -0800, Tim Chen wrote: > Algorithms not compatible with mcryptd could be spawned by mcryptd > with a direct crypto_alloc_tfm invocation using a "mcryptd(alg)" name > construct. This causes mcryptd to crash the kernel if an arbitrary > "alg" is incompatible and

Re: [PATCH v3 0/6] crypto: ARM/arm64 CRC-T10DIF/CRC32/CRC32C roundup

2016-12-07 Thread Herbert Xu
On Mon, Dec 05, 2016 at 06:42:22PM +, Ard Biesheuvel wrote: > This v3 combines the CRC-T10DIF and CRC32 implementations for both ARM and > arm64 that I sent out a couple of weeks ago, and adds support to the latter > for CRC32C. All applied. Thanks. -- Email: Herbert Xu

Re: [PATCH v4] crypto: AF_ALG - fix AEAD tag memory handling

2016-12-07 Thread Herbert Xu
On Mon, Dec 05, 2016 at 03:26:19PM +0100, Stephan Mueller wrote: > Hi Herbert, > > Changes v4: restore the old behavior -- if the caller does not provide > sufficient > output buffer size, return an error. Patch applied. Thanks. -- Email: Herbert Xu Home Page:

Re: [PATCH v2] crypto: sun4i-ss: support the Security System PRNG

2016-12-07 Thread Herbert Xu
On Mon, Dec 05, 2016 at 01:57:38PM +0100, Corentin Labbe wrote: > > So how to expose PRNG to user space ? or more generally how to "use" a PRNG ? We do have the algif_rng interface. > I found hisi-rng, crypto4xx_ and exynos-rng which seems to be PRNG used as > hwrng. Thanks for checking.

Re: [PATCH] crypto: caam - fix pointer size for AArch64 boot loader, AArch32 kernel

2016-12-07 Thread Herbert Xu
On Mon, Dec 05, 2016 at 11:06:58AM +0200, Horia Geantă wrote: > Start with a clean slate before dealing with bit 16 (pointer size) > of Master Configuration Register. > This fixes the case of AArch64 boot loader + AArch32 kernel, when > the boot loader might set MCFGR[PS] and kernel would fail to

Re: [patch] crypto: chcr - checking for IS_ERR() instead of NULL

2016-12-07 Thread Herbert Xu
On Thu, Dec 01, 2016 at 11:49:37PM +0300, Dan Carpenter wrote: > The create_hash_wr() function never returns error pointers. It returns > NULL on error. > > Fixes: 358961d1cd1e ("crypto: chcr - Added new structure chcr_wr") > Signed-off-by: Dan Carpenter Patch

Re: [PATCH v2] crypto/mcryptd: Check mcryptd algorithm compatibility

2016-12-07 Thread Herbert Xu
On Tue, Dec 06, 2016 at 04:07:46PM -0500, Mikulas Patocka wrote: > I think a proper fix would be to find the reason why mcryptd crashes and > fix that reason (i.e. make it fail in mcryptd_create_hash rather than > crash). > > Testing flags could fix the bug for now but it could backfire later

Re: [PATCH v4] crypto: AF_ALG - fix AEAD tag memory handling

2016-12-07 Thread Herbert Xu
On Wed, Dec 07, 2016 at 12:49:25PM +0100, Stephan Müller wrote: > Am Mittwoch, 7. Dezember 2016, 19:42:45 CET schrieb Herbert Xu: > > Hi Herbert, > > > > Hmm, I don't see the code that copies the AAD over. Did I miss it? > > You do not miss it. As I mentioned in a previous email, I would like:

Re: [PATCH v4] crypto: AF_ALG - fix AEAD tag memory handling

2016-12-07 Thread Stephan Müller
Am Mittwoch, 7. Dezember 2016, 19:42:45 CET schrieb Herbert Xu: Hi Herbert, > > Hmm, I don't see the code that copies the AAD over. Did I miss it? You do not miss it. As I mentioned in a previous email, I would like: - to include the current patch around the tag now as it has been on the

Re: [PATCH v4] crypto: AF_ALG - fix AEAD tag memory handling

2016-12-07 Thread Herbert Xu
On Mon, Dec 05, 2016 at 03:26:19PM +0100, Stephan Mueller wrote: > Hi Herbert, > > Changes v4: restore the old behavior -- if the caller does not provide > sufficient > output buffer size, return an error. > > ---8<--- > > For encryption, the AEAD ciphers require AAD || PT as input and

Re: [PATCH v5 1/1] crypto: add virtio-crypto driver

2016-12-07 Thread Herbert Xu
On Tue, Dec 06, 2016 at 09:01:49AM +, Gonglei (Arei) wrote: > > Would you please review and/or ack the virtio_crypto_algs.c? > It is the realization of specified algs based on Linux Crypto Framework. I have no issues with it. If the virtio folks are happy with the interface with the host