Re: [PATCH] ccree: Removed a sparse warning in ssi_fips.h

2017-07-30 Thread Gilad Ben-Yossef
Hi Rishabh, Thanks you for spotting this. On Sun, Jul 30, 2017 at 5:15 PM, rishabh hardas wrote: > Sparse was giving out a warning 'warning: symbol 'cc_set_ree_fips_status' was > not declared. Should it be static?' > which has been removed by making it static. > >

[PATCH] staging: ccree: Use sizeof(variable) in memory allocs

2017-07-30 Thread Simon Sandström
Fixes 9 checkpatch.pl warnings of type "Prefer kmalloc(sizeof(variable)...) over kmalloc(sizeof(type)...)" in staging/ccree. Signed-off-by: Simon Sandström --- drivers/staging/ccree/ssi_aead.c| 4 ++-- drivers/staging/ccree/ssi_cipher.c | 5 ++---

[PATCH] crypto: AF_ALG - return error code when no data was processed

2017-07-30 Thread Stephan Müller
If no data has been processed during recvmsg, return the error code. This covers all errors received during non-AIO operations. If any error occurs during a synchronous operation in addition to -EIOCBQUEUED or -EBADMSG (like -ENOMEM), it should be relayed to the caller. Signed-off-by: Stephan

[PATCH] crypto: algif_aead - copy AAD from src to dst

2017-07-30 Thread Stephan Müller
Use the NULL cipher to copy the AAD and PT/CT from the TX SGL to the RX SGL. This allows an in-place crypto operation on the RX SGL for encryption, because the TX data is always smaller or equal to the RX data (the RX data will hold the tag). For decryption, a per-request TX SGL is created which

[ANNOUNCE] libkcapi v0.14.0 released

2017-07-30 Thread Stephan Müller
Hi, The Linux kernel exports a network interface of type AF_ALG to allow user space to utilize the kernel crypto API. libkcapi uses this network interface and exports an easy to use API so that a developer does not need to consider the low-level network interface handling. The library does

[PATCH] staging: ccree: Fix format/argument mismatches

2017-07-30 Thread Joe Perches
By default, debug logging is disabled by CC_DEBUG not being defined. Convert SSI_LOG_DEBUG to use no_printk instead of an empty define to validate formats and arguments. Fix fallout. Miscellanea: o One of the conversions now uses %pR instead of multiple uses of %pad Signed-off-by: Joe Perches

Re: [PATCH 2/3] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-07-30 Thread Gilad Ben-Yossef
On Thu, Jul 27, 2017 at 10:48 PM, Dan Carpenter wrote: > On Thu, Jul 27, 2017 at 05:27:33PM +0300, Gilad Ben-Yossef wrote: >> + new_drvdata->cc_base = devm_ioremap_resource(_dev->dev, >> + req_mem_cc_regs); >> + if

[PATCH v2 3/6] staging: ccree: Replace kzalloc with devm_kzalloc

2017-07-30 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_kzalloc, which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace kzalloc with devm_kzalloc. (b) drop kfree(), because memory allocated with devm_kzalloc() is

[PATCH v2 5/6] staging: ccree: Use platform_get_irq and devm_request_irq

2017-07-30 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_request_irq(), which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace platform_get_resource(), request_irq() and corresponding error handling with

[PATCH v2 2/6] staging: ccree: kmalloc by sizeof var not type

2017-07-30 Thread Gilad Ben-Yossef
Change places where we alloc memory by sizeof type to sizeof var. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 4 ++-- drivers/staging/ccree/ssi_cipher.c | 4 ++-- drivers/staging/ccree/ssi_driver.c | 2 +-

[PATCH v2 6/6] staging: ccree: simplify resource release on error

2017-07-30 Thread Gilad Ben-Yossef
The resource release on probe/init error was being handled in an awkward manner and possibly leaking memory on certain (unlikely) error path. Fix it by simplifying the error resource release and making it easier to track. Reported-by: Dan Carpenter Signed-off-by: Gilad

[PATCH v2 0/6] ccree style fixes and simplification

2017-07-30 Thread Gilad Ben-Yossef
Various style code fixes and simplification from myself and Suniel. Changes from v2: - Rebase on top of current staging-next. - Added resource release on error simplification patch suggested by Dan C. as part of the review. I made sure the code applies on top both current staging-next (commit

[PATCH v2 4/6] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-07-30 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_ioremap_resource(), which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace request_mem_region(), ioremap() and corresponding error handling with

Re: [PATCH v5 3/6] iomap: introduce io{read|write}64_{lo_hi|hi_lo}

2017-07-30 Thread Andy Shevchenko
On Thu, Jul 27, 2017 at 2:19 AM, Logan Gunthorpe wrote: > In order to provide non-atomic functions for io{read|write}64 that will > use readq and writeq when appropriate. We define a number of variants > of these functions in the generic iomap that will do non-atomic >

Re: [PATCH v3 7/7] ima: Support module-style appended signatures for appraisal

2017-07-30 Thread Mimi Zohar
On Thu, 2017-07-06 at 19:17 -0300, Thiago Jung Bauermann wrote: > This patch introduces the modsig keyword to the IMA policy syntax to > specify that a given hook should expect the file to have the IMA signature > appended to it. Here is how it can be used in a rule: > > appraise

[PATCH] ccree: Removed a sparse warning in ssi_fips.h

2017-07-30 Thread rishabh hardas
Sparse was giving out a warning 'warning: symbol 'cc_set_ree_fips_status' was not declared. Should it be static?' which has been removed by making it static. Signed-off-by: rishabh hardas --- drivers/staging/ccree/ssi_fips.h | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] Removed a sparse warning

2017-07-30 Thread Greg KH
On Sun, Jul 30, 2017 at 03:05:18PM +0530, rishabh hardas wrote: > Signed-off-by: rishabh hardas > --- > drivers/staging/ccree/ssi_fips.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I can't take patches without any changelog text at all. Please read the

Re: [RFC PATCH v12 3/4] Linux Random Number Generator

2017-07-30 Thread Pavel Machek
Hi! On Tue 2017-07-18 21:51:33, Theodore Ts'o wrote: > On Tue, Jul 18, 2017 at 09:00:10PM -0400, Sandy Harris wrote: > > The only really good solution I know of is to find a way to provide a > > chunk of randomness early in the boot process. John Denker has a good > > discussion of doing this by

[PATCH] Removed a sparse warning

2017-07-30 Thread rishabh hardas
Signed-off-by: rishabh hardas --- drivers/staging/ccree/ssi_fips.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_fips.h b/drivers/staging/ccree/ssi_fips.h index 369ddf9..846bd55 100644 ---