[PATCH v6 3/4] tee: optee: add TEE bus device enumeration support

2019-01-28 Thread Sumit Garg
OP-TEE provides a pseudo TA to enumerate TAs which can act as devices/ services for TEE bus. So implement device enumeration using invoke function: PTA_CMD_GET_DEVICES provided by pseudo TA to fetch array of device UUIDs. Also register these enumerated devices with TEE bus as "optee-clntX" device.

[PATCH v6 4/4] hwrng: add OP-TEE based rng driver

2019-01-28 Thread Sumit Garg
On ARM SoC's with TrustZone enabled, peripherals like entropy sources might not be accessible to normal world (linux in this case) and rather accessible to secure world (OP-TEE in this case) only. So this driver aims to provides a generic interface to OP-TEE based random number generator service.

[PATCH v6 0/4] Introduce TEE bus driver framework

2019-01-28 Thread Sumit Garg
This series introduces a generic TEE bus driver concept for TEE based kernel drivers which would like to communicate with TEE based devices/ services. Patch #1 adds TEE bus concept where devices/services are identified via Universally Unique Identifier (UUID) and drivers register a table of device

[PATCH v6 2/4] tee: add supp_nowait flag in tee_context struct

2019-01-28 Thread Sumit Garg
This flag indicates that requests in this context should not wait for tee-supplicant daemon to be started if not present and just return with an error code. It is needed for requests which should be non-blocking in nature like ones arising from TEE based kernel drivers or any in kernel api that use

[PATCH v6 1/4] tee: add bus driver framework for TEE based devices

2019-01-28 Thread Sumit Garg
Introduce a generic TEE bus driver concept for TEE based kernel drivers which would like to communicate with TEE based devices/services. Also add support in module device table for these new TEE based devices. In this TEE bus concept, devices/services are identified via Universally Unique Identifi

Re: [PATCH v2 0/4] crypto: hisilicon: Add HiSilicon QM and ZIP controller driver

2019-01-28 Thread Zhou Wang
On 2019/1/23 21:08, Zhou Wang wrote: > This series adds HiSilicon QM and ZIP controller driver in crypto subsystem. > > A simple QM/ZIP driver which helps to provide an example for a general > accelerator framework is under review in community[1]. Based on this simple > driver, this series adds HW

[patch-next] crypto: testmgr - use kmemdup

2019-01-28 Thread Christopher Diaz Riveros
Fixes coccinnelle alerts: /crypto/testmgr.c:2112:13-20: WARNING opportunity for kmemdup /crypto/testmgr.c:2130:13-20: WARNING opportunity for kmemdup /crypto/testmgr.c:2152:9-16: WARNING opportunity for kmemdup Signed-off-by: Christopher Diaz Riveros --- crypto/testmgr.c | 9 +++-- 1 file c

Re: [PATCH v2 2/2] crypto: caam - fix DMA mapping of stack memory

2019-01-28 Thread Horia Geanta
On 1/28/2019 9:00 PM, Roland Hieber wrote: > Hi Horia, > > I didn't understand your patch thoroughly yet, but I tested it and it > gets rid of my DMA-API warning, so: > As mentioned in the commit message, the main idea is to use the buffer holding the partial hash (state->caam_ctx) also for the f

Re: [PATCH v2 2/2] crypto: caam - fix DMA mapping of stack memory

2019-01-28 Thread Roland Hieber
Hi Horia, I didn't understand your patch thoroughly yet, but I tested it and it gets rid of my DMA-API warning, so: Tested-by: Roland Hieber Thanks! :) - Roland On Sat, Jan 26, 2019 at 08:02:15PM +0200, Horia Geantă wrote: > Roland reports the following issue and provides a root cause analys

[PATCH AUTOSEL 4.20 032/304] crypto: aes_ti - disable interrupts while accessing S-box

2019-01-28 Thread Sasha Levin
From: Eric Biggers [ Upstream commit 0a6a40c2a8c184a2fb467efacfb1cd338d719e0b ] In the "aes-fixed-time" AES implementation, disable interrupts while accessing the S-box, in order to make cache-timing attacks more difficult. Previously it was possible for the CPU to be interrupted while the S-bo

[PATCH AUTOSEL 4.20 266/304] crypto: ux500 - Use proper enum in cryp_set_dma_transfer

2019-01-28 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 9d880c5945c748d8edcac30965f3349a602158c4 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/cryp/cryp_core.c:559:5: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different en

[PATCH AUTOSEL 4.20 267/304] crypto: ux500 - Use proper enum in hash_set_dma_transfer

2019-01-28 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 5ac93f808338f4dd465402e91869702eb87db241 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/hash/hash_core.c:169:4: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different en

[PATCH AUTOSEL 4.19 224/258] crypto: ux500 - Use proper enum in hash_set_dma_transfer

2019-01-28 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 5ac93f808338f4dd465402e91869702eb87db241 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/hash/hash_core.c:169:4: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different en

[PATCH AUTOSEL 4.14 018/170] crypto: aes_ti - disable interrupts while accessing S-box

2019-01-28 Thread Sasha Levin
From: Eric Biggers [ Upstream commit 0a6a40c2a8c184a2fb467efacfb1cd338d719e0b ] In the "aes-fixed-time" AES implementation, disable interrupts while accessing the S-box, in order to make cache-timing attacks more difficult. Previously it was possible for the CPU to be interrupted while the S-bo

[PATCH AUTOSEL 4.14 145/170] crypto: ux500 - Use proper enum in hash_set_dma_transfer

2019-01-28 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 5ac93f808338f4dd465402e91869702eb87db241 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/hash/hash_core.c:169:4: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different en

[PATCH AUTOSEL 4.14 144/170] crypto: ux500 - Use proper enum in cryp_set_dma_transfer

2019-01-28 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 9d880c5945c748d8edcac30965f3349a602158c4 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/cryp/cryp_core.c:559:5: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different en

[PATCH AUTOSEL 4.9 088/107] crypto: ux500 - Use proper enum in hash_set_dma_transfer

2019-01-28 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 5ac93f808338f4dd465402e91869702eb87db241 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/hash/hash_core.c:169:4: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different en

[PATCH AUTOSEL 4.9 087/107] crypto: ux500 - Use proper enum in cryp_set_dma_transfer

2019-01-28 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 9d880c5945c748d8edcac30965f3349a602158c4 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/cryp/cryp_core.c:559:5: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different en

[PATCH AUTOSEL 4.4 67/80] crypto: ux500 - Use proper enum in hash_set_dma_transfer

2019-01-28 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 5ac93f808338f4dd465402e91869702eb87db241 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/hash/hash_core.c:169:4: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different en

[PATCH AUTOSEL 4.4 66/80] crypto: ux500 - Use proper enum in cryp_set_dma_transfer

2019-01-28 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 9d880c5945c748d8edcac30965f3349a602158c4 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/cryp/cryp_core.c:559:5: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different en

[PATCH AUTOSEL 3.18 49/61] crypto: ux500 - Use proper enum in cryp_set_dma_transfer

2019-01-28 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 9d880c5945c748d8edcac30965f3349a602158c4 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/cryp/cryp_core.c:559:5: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different en

[PATCH AUTOSEL 3.18 50/61] crypto: ux500 - Use proper enum in hash_set_dma_transfer

2019-01-28 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 5ac93f808338f4dd465402e91869702eb87db241 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/hash/hash_core.c:169:4: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different en

[PATCH AUTOSEL 4.19 223/258] crypto: ux500 - Use proper enum in cryp_set_dma_transfer

2019-01-28 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 9d880c5945c748d8edcac30965f3349a602158c4 ] Clang warns when one enumerated type is implicitly converted to another: drivers/crypto/ux500/cryp/cryp_core.c:559:5: warning: implicit conversion from enumeration type 'enum dma_data_direction' to different en

[PATCH AUTOSEL 4.19 026/258] crypto: aes_ti - disable interrupts while accessing S-box

2019-01-28 Thread Sasha Levin
From: Eric Biggers [ Upstream commit 0a6a40c2a8c184a2fb467efacfb1cd338d719e0b ] In the "aes-fixed-time" AES implementation, disable interrupts while accessing the S-box, in order to make cache-timing attacks more difficult. Previously it was possible for the CPU to be interrupted while the S-bo

Re: [PATCH v2 0/6] General Key Derivation Function Support

2019-01-28 Thread Stephan Mueller
Am Mittwoch, 16. Januar 2019, 12:06:54 CET schrieb Stephan Müller: Hi Herbert, > Changes v2: > * Incorporation of all comments from Eric Biggers > > Stephan Mueller (6): > crypto: add template handling for RNGs > crypto: kdf - SP800-108 Key Derivation Function > crypto: kdf - add known ans

Re: [PATCH 0/3] crypto: crct10dif assembly cleanup and optimizations

2019-01-28 Thread Ard Biesheuvel
On Mon, 28 Jan 2019 at 09:57, Eric Biggers wrote: > > The x86, arm, and arm64 asm implementations of crct10dif are very > difficult to understand partly because many of the comments, labels, and > macros are named incorrectly: the lengths mentioned are usually off by a > factor of two from the act

[PATCH 3/3] crypto: arm64/crct10dif-ce - cleanup and optimizations

2019-01-28 Thread Eric Biggers
From: Eric Biggers The x86, arm, and arm64 asm implementations of crct10dif are very difficult to understand partly because many of the comments, labels, and macros are named incorrectly: the lengths mentioned are usually off by a factor of two from the actual code. Many other things are unneces

[PATCH 2/3] crypto: arm/crct10dif-ce - cleanup and optimizations

2019-01-28 Thread Eric Biggers
From: Eric Biggers The x86, arm, and arm64 asm implementations of crct10dif are very difficult to understand partly because many of the comments, labels, and macros are named incorrectly: the lengths mentioned are usually off by a factor of two from the actual code. Many other things are unneces

[PATCH 0/3] crypto: crct10dif assembly cleanup and optimizations

2019-01-28 Thread Eric Biggers
The x86, arm, and arm64 asm implementations of crct10dif are very difficult to understand partly because many of the comments, labels, and macros are named incorrectly: the lengths mentioned are usually off by a factor of two from the actual code. Many other things are unnecessarily convoluted as

[PATCH 1/3] crypto: x86/crct10dif-pcl - cleanup and optimizations

2019-01-28 Thread Eric Biggers
From: Eric Biggers The x86, arm, and arm64 asm implementations of crct10dif are very difficult to understand partly because many of the comments, labels, and macros are named incorrectly: the lengths mentioned are usually off by a factor of two from the actual code. Many other things are unneces