Re: [PATCH v5 2/7] crypto: SHA1 multibuffer crypto hash infrastructure

2014-07-25 Thread Peter Zijlstra
On Tue, Jul 22, 2014 at 03:09:32PM -0700, Tim Chen wrote: > +/* Called in workqueue context, do one real cryption work (via > + * req->complete) and reschedule itself if there are more work to > + * do. */ You seem to manage the 'normal' comment style in other places, this one 'special' for a reas

Re: [PATCH v5 3/7] crypto: SHA1 multibuffer crypto opportunistic flush

2014-07-25 Thread Peter Zijlstra
On Tue, Jul 22, 2014 at 03:09:35PM -0700, Tim Chen wrote: > The crypto daemon can take advantage of available cpu > cycles to flush any unfinished jobs if it is the > only task running on the cpu, and there are no more crypto > jobs to process. You conveniently forgot to mention energy efficiency,

Re: [PATCH v5 2/7] crypto: SHA1 multibuffer crypto hash infrastructure

2014-07-25 Thread Peter Zijlstra
On Tue, Jul 22, 2014 at 03:09:32PM -0700, Tim Chen wrote: > This patch introduces the multi-buffer crypto daemon which is responsible > for submitting crypto jobs in a work queue to the responsible multi-buffer > crypto algorithm. The idea of the multi-buffer algorihtm is to put > data streams fro

[net-next] crypto: Resolve shadow warnings

2014-07-25 Thread Jeff Kirsher
From: Mark Rustad Change formal parameters to not clash with global names to eliminate many W=2 warnings. Signed-off-by: Mark Rustad Signed-off-by: Jeff Kirsher --- crypto/cryptd.c | 12 crypto/eseqiv.c | 8 ++--- crypto/gcm.c | 30 +-

Re: [PATCH v4 2/3] ARM: sunxi: dt: Add DT bindings documentation for SUNXI Security System

2014-07-25 Thread Maxime Ripard
On Sat, Jul 12, 2014 at 02:59:12PM +0200, LABBE Corentin wrote: > This patch adds documentation for Device-Tree bindings for the Security > System cryptographic accelerator driver. > > Signed-off-by: LABBE Corentin Acked-by: Maxime Ripard Thanks! Maxime -- Maxime Ripard, Free Electrons Embed

Re: [PATCH v4 3/3] crypto: Add Allwinner Security System crypto accelerator

2014-07-25 Thread Maxime Ripard
On Sat, Jul 12, 2014 at 02:59:13PM +0200, LABBE Corentin wrote: > Add support for the Security System included in Allwinner SoC A20. > The Security System is a hardware cryptographic accelerator that support > AES/MD5/SHA1/DES/3DES/PRNG algorithms. > > Signed-off-by: LABBE Corentin > --- > driv

[GIT PULL] Keyrings: PKCS#7 fixup

2014-07-25 Thread David Howells
nel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/keys-next-20140725 for you to fetch changes up to 8f3438ccea149647ad1849651d1e14c7b8b85e63: PKCS#7: Missing inclusion of linux/err.h (2014-07-25 11:33:53 +0100) (

Re: [PATCH -v5] random: introduce getrandom(2) system call

2014-07-25 Thread Henrique de Moraes Holschuh
On Thu, 24 Jul 2014, Theodore Ts'o wrote: > On Thu, Jul 24, 2014 at 05:30:19PM -0300, Henrique de Moraes Holschuh wrote: > > > I wouldn't add the error to the man page until we actually modify the > > > kernel to add such a restriction. > > > > By then, it might be too late. It would be really sa

Re: [PATCH -v5] random: introduce getrandom(2) system call

2014-07-25 Thread Theodore Ts'o
On Thu, Jul 24, 2014 at 04:27:36PM -0700, Andy Lutomirski wrote: > > I think that people might do: > > try getrandom(GRND_RANDOM) > fall back to /dev/random > fall back to something intensely stupid > > We want them to at least attempt the fallback from GRND_RANDOM to > !GRND_RANDOM. We can't

Re: [PATCH v5 2/7] crypto: SHA1 multibuffer crypto hash infrastructure

2014-07-25 Thread Tim Chen
On Fri, 2014-07-25 at 09:08 +0200, Peter Zijlstra wrote: > On Tue, Jul 22, 2014 at 03:09:32PM -0700, Tim Chen wrote: > > +/* Called in workqueue context, do one real cryption work (via > > + * req->complete) and reschedule itself if there are more work to > > + * do. */ > > You seem to manage the

Re: [PATCH v5 2/7] crypto: SHA1 multibuffer crypto hash infrastructure

2014-07-25 Thread Tim Chen
On Fri, 2014-07-25 at 09:26 +0200, Peter Zijlstra wrote: > On Tue, Jul 22, 2014 at 03:09:32PM -0700, Tim Chen wrote: > > This patch introduces the multi-buffer crypto daemon which is responsible > > for submitting crypto jobs in a work queue to the responsible multi-buffer > > crypto algorithm. Th

General flags to turn things off (getrandom, pid lookup, etc)

2014-07-25 Thread Andy Lutomirski
[new thread because this sort of combines two threads] There is recent interest in having a way to turn generally-available kernel features off. Maybe we should add a good one so we can stop bikeshedding and avoid proliferating dumb interfaces. Things that might want to be turn-off-able include:

Re: General flags to turn things off (getrandom, pid lookup, etc)

2014-07-25 Thread Dave Jones
On Fri, Jul 25, 2014 at 11:30:48AM -0700, Andy Lutomirski wrote: > There is recent interest in having a way to turn generally-available > kernel features off. Maybe we should add a good one so we can stop > bikeshedding and avoid proliferating dumb interfaces. > > Things that might want to

Re: General flags to turn things off (getrandom, pid lookup, etc)

2014-07-25 Thread Andy Lutomirski
On Fri, Jul 25, 2014 at 1:15 PM, Dave Jones wrote: > On Fri, Jul 25, 2014 at 11:30:48AM -0700, Andy Lutomirski wrote: > > > There is recent interest in having a way to turn generally-available > > kernel features off. Maybe we should add a good one so we can stop > > bikeshedding and avoid pro

Re: General flags to turn things off (getrandom, pid lookup, etc)

2014-07-25 Thread One Thousand Gnomes
On Fri, 25 Jul 2014 11:30:48 -0700 Andy Lutomirski wrote: > [new thread because this sort of combines two threads] > > There is recent interest in having a way to turn generally-available > kernel features off. Maybe we should add a good one so we can stop > bikeshedding and avoid proliferating

Re: General flags to turn things off (getrandom, pid lookup, etc)

2014-07-25 Thread Andy Lutomirski
On Fri, Jul 25, 2014 at 2:35 PM, One Thousand Gnomes wrote: > On Fri, 25 Jul 2014 11:30:48 -0700 > Andy Lutomirski wrote: > >> [new thread because this sort of combines two threads] >> >> There is recent interest in having a way to turn generally-available >> kernel features off. Maybe we should

[PATCH 00/10] crypto: qat: Checkpatch and other cleanups plus SKU1

2014-07-25 Thread Tadeusz Struk
issue. Hi, Minor cleanups for the qat driver. The last patch fixes SKU1 device startup issue. Rest of the patches clean up new checkpatch issues plus some minor and cosmetic updates. --- Tadeusz Struk (10): crypto: qat: Fixed SKU1 dev issue crypto: qat: Cleanup - Use hweight for bit c

[PATCH 01/10] crypto: qat: Cleanup - remove unnecessary return codes

2014-07-25 Thread Tadeusz Struk
Remove unnecessary return code variables and change function types accordingly. Signed-off-by: Bruce Allan Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/qat_uclo.c | 23 --- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/drivers/crypto/qat

[PATCH 10/10] crypto: qat: Fixed SKU1 dev issue

2014-07-25 Thread Tadeusz Struk
Fix for issue with SKU1 device. SKU1 device has 8 micro engines as opposed to 12 in other SKUs so it was not possible to start the non-existing micro engines. Signed-off-by: Bo Cui Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/qat_uclo.c |6 +- .../crypto/qat

[PATCH 09/10] crypto: qat: Cleanup - Use hweight for bit counting

2014-07-25 Thread Tadeusz Struk
Use predefined hweight32 function instead of writing a new one. Signed-off-by: Pingchao Yang Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/qat_hal.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_hal.c

[PATCH 05/10] crypto: qat: Cleanup - use min_t macro

2014-07-25 Thread Tadeusz Struk
prefer min_t() macro over two open-coded logical tests Signed-off-by: Bruce Allan Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/qat_uclo.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_uclo.c b/drivers/crypto/qat/

[PATCH 08/10] crypto: qat: Cleanup - Updated print outputs

2014-07-25 Thread Tadeusz Struk
Updated pr_err output to make it more consistent. Signed-off-by: Pingchao Yang Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/adf_accel_engine.c |4 ++-- drivers/crypto/qat/qat_common/adf_init.c |2 +- drivers/crypto/qat/qat_common/qat_hal.c |3 +--

[PATCH 04/10] crypto: qat: Cleanup - remove unnecessary parentheses

2014-07-25 Thread Tadeusz Struk
Resolve new strict checkpatch hits CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around ... Signed-off-by: Bruce Allan Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/icp_qat_hw.h |6 ++- drivers/crypto/qat/qat_common/qat_algs.c |2 + drivers/crypto/qat/qat_co

[PATCH 06/10] crypto: qat: Cleanup - change slice->regions to slice->region

2014-07-25 Thread Tadeusz Struk
Change ptr name slice->regions to slice->region to reflect the same in the page struct. Signed-off-by: Pingchao Yang Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/icp_qat_uclo.h |2 +- drivers/crypto/qat/qat_common/qat_uclo.c | 22 +++--- 2 files chan

[PATCH 07/10] crypto: qat: Cleanup - change ae_num to ae_id

2014-07-25 Thread Tadeusz Struk
Change the logic how acceleration engines are indexed to make it easier to read. Aslo some return code values updates to better reflect what failed. Signed-off-by: Pingchao Yang Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/qat_hal.c | 26 ++-- drivers/crypto/qat/qa

[PATCH 03/10] crypto: qat: Cleanup - remove unneeded header

2014-07-25 Thread Tadeusz Struk
Remove include of a no longer necessary header file. Signed-off-by: Bruce Allan Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/adf_cfg.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/qat/qat_common/adf_cfg.c b/drivers/crypto/qat/qat_common/adf_cfg.c inde

[PATCH 02/10] crypto: qat: Cleanup - checkpatch blank lines

2014-07-25 Thread Tadeusz Struk
Fix new checkpatch hits: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Bruce Allan Signed-off-by: Tadeusz Struk --- .../crypto/qat/qat_common/adf_transport_internal.h |3 +++ drivers/crypto/qat/qat_common/icp_qat_fw_la.h |

[PATCH 1/2] arm64 aes: fix encryption of unaligned data

2014-07-25 Thread Mikulas Patocka
cryptsetup fails on arm64 when using kernel encryption via AF_ALG socket. See https://bugzilla.redhat.com/show_bug.cgi?id=1122937 The bug is caused by incorrect handling of unaligned data in arch/arm64/crypto/aes-glue.c. Cryptsetup creates a buffer that is aligned on 8 bytes, but not on 16 bytes.

[PATCH 2/2] arm aes: fix encryption of unaligned data

2014-07-25 Thread Mikulas Patocka
Fix the same alignment bug as in arm64 - we need to pass residue unprocessed bytes as the last argument to blkcipher_walk_done. Signed-off-by: Mikulas Patocka Cc: sta...@vger.kernel.org # 3.13+ Index: linux-3.16.0-0.rc6.git1.1.fc21.aarch64/arch/arm/crypto/aesbs-glue.c ==

Re: General flags to turn things off (getrandom, pid lookup, etc)

2014-07-25 Thread H. Peter Anvin
On 07/25/2014 11:30 AM, Andy Lutomirski wrote: > - 32-bit GDT code segments [huge attack surface] > - 64-bit GDT code segments [probably pointless] I presume you mean s/GDT/LDT/. We already don't allow 64-bit LDT code segments. Also, it is unclear to me how 32-bit LDT segments have a hug

Re: General flags to turn things off (getrandom, pid lookup, etc)

2014-07-25 Thread Andy Lutomirski
On Fri, Jul 25, 2014 at 4:43 PM, H. Peter Anvin wrote: > On 07/25/2014 11:30 AM, Andy Lutomirski wrote: >> - 32-bit GDT code segments [huge attack surface] >> - 64-bit GDT code segments [probably pointless] > > I presume you mean s/GDT/LDT/. > > We already don't allow 64-bit LDT code segme

Re: [GIT PULL] Keyrings: PKCS#7 fixup

2014-07-25 Thread James Morris
-next (2014-07-22 21:55:45 +0100) > > are available in the git repository at: > > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git > tags/keys-next-20140725 > > for you to fetch changes up to 8f3438ccea149647ad1849651d1e14c7b8b85e63: > > PKCS