Re: [bug] sha1-avx2 and read beyond

2017-07-03 Thread Herbert Xu
On Mon, Jul 03, 2017 at 08:33:44PM +0800, Herbert Xu wrote: > On Sat, Jun 24, 2017 at 12:56:52AM +, Albrekht, Ilya wrote: > > Hello all, > > > > I'm sorry for late reply (I was out of office for a month). > > > > It's been a while since we touched this code. We are going to do our best > >

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

2017-07-03 Thread Corentin Labbe
The Security System has a PRNG, this patch adds support for it via crypto_rng. Signed-off-by: Corentin Labbe --- Change since v4 - Fixed some spelling issue in Kconfig and patch description Changes since v3 (note: the v3 miss changes and version tag sorry) - Replaced

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

2017-07-03 Thread Corentin Labbe
On Mon, Jun 26, 2017 at 02:36:43PM +0200, Frans Klaver wrote: > Hi, > > On Mon, Jun 26, 2017 at 2:20 PM, Corentin Labbe > wrote: > > The Security System have a PRNG, this patch add support for it via > > crypto_rng. > > s,have,has, > s,add,adds, > > > > >

Re: [PATCH v3 RESEND 5/5] crypto: ccp - remove ccp_present() check from device initialize

2017-07-03 Thread Gary R Hook
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 ---

Re: [PATCH v3 RESEND 4/5] crypto: ccp - rename ccp driver initialize files as sp device

2017-07-03 Thread Gary R Hook
On 06/29/2017 11:54 AM, Singh, Brijesh wrote: CCP device initializes is now integerated into higher level SP device, to avoid the confusion lets rename the ccp driver initialization files (ccp-platform.c->sp-platform.c, ccp-pci.c->sp-pci.c). The patch does not make any functional changes other

Re: [PATCH v3 RESEND 2/5] crypto: ccp - Introduce the AMD Secure Processor device

2017-07-03 Thread Gary R Hook
On 06/29/2017 11:54 AM, Singh, Brijesh wrote: The CCP device is part of the AMD Secure Processor. In order to expand the usage of the AMD Secure Processor, create a framework that allows functional components of the AMD Secure Processor to be initialized and handled appropriately.

Re: [PATCH v3 RESEND 3/5] crypto: cpp - Abstract interrupt registeration

2017-07-03 Thread Gary R Hook
On 06/29/2017 11:54 AM, Singh, Brijesh wrote: The CCP and PSP devices part of AMD Secure Procesor may share the same interrupt. Hence we expand the SP device to register a common interrupt handler and provide functions to CCP and PSP devices to register their interrupt callback which will be

Re: [PATCH v3 RESEND 1/5] crypto: ccp - Use devres interface to allocate PCI/iomap and cleanup

2017-07-03 Thread Gary R Hook
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

Re: [PATCH v3 01/28] crypto: change backlog return code to -EIOCBQUEUED

2017-07-03 Thread Gilad Ben-Yossef
On Mon, Jul 3, 2017 at 3:35 PM, Herbert Xu wrote: > On Sun, Jul 02, 2017 at 05:41:43PM +0300, Gilad Ben-Yossef wrote: >> The crypto API was using the -EBUSY return value to indicate >> both a hard failure to submit a crypto operation into a >> transformation provider

Re: [PATCH v3 01/28] crypto: change backlog return code to -EIOCBQUEUED

2017-07-03 Thread Herbert Xu
On Sun, Jul 02, 2017 at 05:41:43PM +0300, Gilad Ben-Yossef wrote: > The crypto API was using the -EBUSY return value to indicate > both a hard failure to submit a crypto operation into a > transformation provider when the latter was busy and the backlog > mechanism was not enabled as well as a

Re: [bug] sha1-avx2 and read beyond

2017-07-03 Thread Herbert Xu
On Sat, Jun 24, 2017 at 12:56:52AM +, Albrekht, Ilya wrote: > Hello all, > > I'm sorry for late reply (I was out of office for a month). > > It's been a while since we touched this code. We are going to do our best to > support it. I'll be back to the office earlier next week and will

Re: [PATCH 00/10] Fix alignment issues in staging/ccree

2017-07-03 Thread Simon Sandström
On Mon, Jul 03, 2017 at 10:19:31AM +0300, Gilad Ben-Yossef wrote: > but for the few cases where its a complex expression that can be > broken down like this one: > > WARNING: line over 80 characters > #93: FILE: drivers/staging/ccree/ssi_buffer_mgr.c:437: > + (AES_BLOCK_SIZE +

[PATCH] crypto: change hwrng device default permissions to 0444

2017-07-03 Thread Harald Freudenberger
Currently /dev/hwrng uses default device node permissions which is 0600. So by default the device node is not accessible by an ordinary user. Some distros do rewrite the device node permissions via udev rule, others don't. This patch provides 0444 as the new mode value and so makes the device node

[RFT PATCH] crypto: arm64/ghash - add NEON accelerated fallback for 64-bit PMULL

2017-07-03 Thread Ard Biesheuvel
Implement a NEON fallback for systems that do support NEON but have no support for the optional 64x64->128 polynomial multiplication instruction that is part of the ARMv8 Crypto Extensions. It is based on the paper "Fast Software Polynomial Multiplication on ARM Processors Using the NEON Engine"

[PATCH 2/3] crypto: hwrng remember rng chosen by user

2017-07-03 Thread Harald Freudenberger
When a user chooses a rng source via sysfs attribute this rng should be sticky, even when other sources with better quality to register. This patch introduces a simple way to remember the user's choise. Signed-off-by: Harald Freudenberger ---

[PATCH 0/3] crypto hwrng consider quality value, remember user choice

2017-07-03 Thread Harald Freudenberger
The hwrng core implementation currently doesn't consider the quality field of the struct hwrng. So the first registered rng is the winner and further rng sources even with much better quality are ignored. The behavior should be that always the best rng with the highest quality rate should be used

[PATCH 3/3] crypto: hwrng add sysfs attribute to show user selected rng

2017-07-03 Thread Harald Freudenberger
This patch introduces a new sysfs attribute file 'rng_selected' which shows the the rng chosen by userspace. If a rng source is chosen by user via echo some valid string to rng_current there should be a way to signal this choice to userspace. The new attribute file 'rng_selected' shows either the

[PATCH 1/3] crypto: hwrng use rng source with best quality

2017-07-03 Thread Harald Freudenberger
This patch rewoks the hwrng to always use the rng source with best entropy quality. On registation and unregistration the hwrng now tries to choose the best (= highest quality value) rng source. The handling of the internal list of registered rng sources is now always sorted by quality and the

Re: [PATCH 00/10] Fix alignment issues in staging/ccree

2017-07-03 Thread Gilad Ben-Yossef
Hi, On Sun, Jul 2, 2017 at 2:25 AM, Simon Sandström wrote: > Fixes a total of 195 alignment issues in staging/ccree reported by > checkpatch.pl. Adds a few "line over 80 characters" warnings as a > result of the realignments, but I could try to get rid of them in the > same