Re: [PATCH v3 1/1] dm-integrity: integrity protection device-mapper target

2013-02-05 Thread Kasatkin, Dmitry
Hi Mikulas, I made fixes based on your comments. Can you think now about adding this target to the device-mapper tree, may be with different name, though? - Dmitry On Tue, Jan 22, 2013 at 2:37 PM, Dmitry Kasatkin wrote: > Device-mapper "integrity" target provides transparent cryptographic integ

[PATCH 3/3] crypto: user - ensure user supplied strings are nul-terminated

2013-02-05 Thread Mathias Krause
To avoid misuse, ensure cru_name and cru_driver_name are always nul-terminated strings. Signed-off-by: Mathias Krause --- crypto/crypto_user.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c index 423a267..dfd511f 100644 --- a/cry

[PATCHv2 2/3] crypto: user - fix empty string test in report API

2013-02-05 Thread Mathias Krause
The current test for empty strings fails because it is testing the address of a field, not a pointer. So the test will always be true. Test the first character in the string to not be null instead. Signed-off-by: Mathias Krause Cc: Steffen Klassert --- v2: - switched to simple character test, as

[PATCHv2 1/3] crypto: user - fix info leaks in report API

2013-02-05 Thread Mathias Krause
Three errors resulting in kernel memory disclosure: 1/ The structures used for the netlink based crypto algorithm report API are located on the stack. As snprintf() does not fill the remainder of the buffer with null bytes, those stack bytes will be disclosed to users of the API. Switch to strncpy

[PATCHv2 0/3] crypto user API fixes

2013-02-05 Thread Mathias Krause
This series fixes kernel memory disclosures (aka info leaks) and a bug in the empty string test. In addition to the first version of this series it also ensures all user supplied strings are nul-terminated before using them. Patch 1 is the same as in the first series, patch 2 was changed as sugges

[PATCH 1/2] crypto: caam - support for RNG version retrieval

2013-02-05 Thread Alex Porosanu
This patch adds support for retrieving the version of the RNG block inside the SEC. This is done by retrieving the corresponding value from the the CHAVID register. Signed-off-by: Alex Porosanu --- drivers/crypto/caam/ctrl.c | 11 +++ drivers/crypto/caam/regs.h | 37 +

[PATCH 0/2] RNG4 support for SEC versions < 5

2013-02-05 Thread Alex Porosanu
There are (at least) two platforms which have SEC < 5 but the new RNG4 block. These platforms are BSC 9131 and BSC 9132 (that I know of so far). Thus the condition in the caam driver which checks for the version of the SEC block to decide if further initialization of the RNG block is needed or n

[PATCH 2/2] crypto: caam - fix RNG init for SEC with RNG version greater than 4

2013-02-05 Thread Alex Porosanu
For SEC including a RNG block with a version greater than 4, special initialization must occur before any descriptor can be submitted. Not only SEC with a version greater than 5.0 need this, but also any SEC that has RNG block version ID greater or equal to 4. Example platforms: BSC 9131/9132 have

Re: [PATCH 2/2] crypto: user - fix empty string test in report API

2013-02-05 Thread Herbert Xu
On Tue, Feb 05, 2013 at 09:35:31AM +0100, Mathias Krause wrote: > On Mon, Feb 4, 2013 at 2:15 PM, Herbert Xu > wrote: > > On Sun, Feb 03, 2013 at 12:09:01PM +0100, Mathias Krause wrote: > >> The current test for empty strings fails because it is testing the > >> address of a field, not a pointer.

Re: [PATCH 2/2] crypto: user - fix empty string test in report API

2013-02-05 Thread Mathias Krause
On Mon, Feb 4, 2013 at 2:15 PM, Herbert Xu wrote: > On Sun, Feb 03, 2013 at 12:09:01PM +0100, Mathias Krause wrote: >> The current test for empty strings fails because it is testing the >> address of a field, not a pointer. So the test will always be true. >> Test for the string length instead. >>