[PATCH v2 02/17] crypto: talitos - Externalise specific SEC2 reset actions

2015-03-06 Thread Christophe Leroy
During init and reset, some actions are different between SEC1 and SEC2 This patch isolates them in small helper functions that we will be able to redefine for SEC1 Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 20 1 file changed, 16

[PATCH v2 10/17] crypto: talitos - Move interrupt related macros in talitos2.h

2015-03-06 Thread Christophe Leroy
Move interrupt related macros in talitos2.h as they are specific to SEC2 Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 58 - drivers/crypto/talitos2.h | 60 +++ 2

[PATCH v2 06/17] crypto: talitos - Add talitos2.c to isolate SEC2 specific functions

2015-03-06 Thread Christophe Leroy
scatterlists We move to talitos.h some of the helpers that are used by both talitos.c and talitos2.c Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/Kconfig| 4 + drivers/crypto/Makefile | 1 + drivers/crypto/talitos.c | 666

[PATCH v2 13/17] crypto: talitos - move sg_count() helper into talitos.h

2015-03-06 Thread Christophe Leroy
move sg_count() helper into talitos.h as it will be needed by SEC1 specific functions Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 20 drivers/crypto/talitos.h | 21 + 2 files changed, 21 insertions(+), 20

[PATCH v2 16/17] crypto: talitos - SEC1 bugs on 0 data hash

2015-03-06 Thread Christophe Leroy
SEC1 bugs on 0 data hash, so we submit an already padded block representing 0 data Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 3 +++ drivers/crypto/talitos1.c | 21 + drivers/crypto/talitos1.h | 4 drivers/crypto/talitos2

[PATCH v2 05/17] crypto: talitos - isolate scatter/gather handling for ahash

2015-03-06 Thread Christophe Leroy
SEC1 doesn't support scatter/gather, therefore this part of the code will have to be implemented differently for SEC1, so we isolate it in a small helper function Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 29 +++-- 1 file

[PATCH v2 17/17] crypto: talitos - Update DT bindings with SEC1

2015-03-06 Thread Christophe Leroy
This patch updates the documentation by including SEC1 into SEC2/3 doc Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- Documentation/devicetree/bindings/crypto/fsl-sec2.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings

[PATCH v2 08/17] crypto: talitos - Deport SEC2 error handling

2015-03-06 Thread Christophe Leroy
SEC2 and SEC1 error handling will be different because so many bits are different. So we move error handling into talitos2.c Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 103 +- drivers/crypto/talitos.h

[PATCH v2 07/17] crypto: talitos - Split talitos.h into 2 parts

2015-03-06 Thread Christophe Leroy
In order to be able to manage differences between SEC1 and SEC2, we split talitos.h into two parts. talitos2.h will contain all parts that are specific to SEC2 and different on SEC1 Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.h | 163

[PATCH v2 11/17] crypto: talitos - Move hash chain handling into talitos2.h

2015-03-06 Thread Christophe Leroy
Move hash chain handling into talitos2.h as only SEC2 has sg chaining capatibility Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 34 -- drivers/crypto/talitos2.h | 34 ++ 2 files changed

[PATCH v2 01/17] crypto: talitos - base address for Execution Units and macro for ISR masks

2015-03-06 Thread Christophe Leroy
SEC1 and SEC2 have different EU base addresses, so define base addresses as #define SEC1 and SEC2 have different bit masks for ISR registers, so create a macro to define them Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.h | 85

[PATCH v2 04/17] crypto: talitos - Refactor the sg in/out chain allocation

2015-03-06 Thread Christophe Leroy
This patch refactors the handling of the input and output data that is quite similar in several functions Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 163 --- 1 file changed, 85 insertions(+), 78 deletions

[PATCH v2 14/17] crypto: talitos - Add a helper function to clear j_extent field

2015-03-06 Thread Christophe Leroy
j_extent field is specific to SEC2 so we add a helper function to clear it so that SEC1 can redefine that function as nop Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 2 +- drivers/crypto/talitos2.h | 5 + 2 files changed, 6 insertions(+), 1

[PATCH v2 15/17] crypto: talitos - Implementation of SEC1

2015-03-06 Thread Christophe Leroy
are in addition * SEC1 doesn't support scatter/gather * SEC1 has a different descriptor structure We add a helper function for clearing the desc field in the descriptor as that field needs to be cleared on SEC1 and doesn't exist on SEC2. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr

[PATCH v2 12/17] crypto: talitos - Define compatible in talitos2.h instead of talitos.c

2015-03-06 Thread Christophe Leroy
Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 4 +--- drivers/crypto/talitos2.h | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 8b627d0..0262e75 100644 --- a/drivers/crypto

[PATCH v2 0/17] crypto: talitos - Add support for SEC1

2015-03-06 Thread Christophe Leroy
/17] crypto: talitos - Implementation of SEC1 [16/17] crypto: talitos - SEC1 bugs on 0 data hash [17/17] crypto: talitos - Update DT bindings with SEC1 Signed-off-by: Christophe Leroy christophe.le...@c-s.fr .../devicetree/bindings/crypto/fsl-sec2.txt| 5 +- drivers/crypto/Kconfig

[PATCH v2 09/17] crypto: talitos - Move reset/init helpers into talitos2.h

2015-03-06 Thread Christophe Leroy
Move reset/init helpers init talitos2.h as they are specific to SEC2 Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 19 --- drivers/crypto/talitos2.h | 20 2 files changed, 20 insertions(+), 19 deletions(-) diff

[PATCH v2 03/17] crypto: talitos - Use zero entry to init descriptors ptrs to zero

2015-03-06 Thread Christophe Leroy
Do use zero_entry value to init the descriptors ptrs to zero instead of writing 0 in each field Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers

[PATCH 03/17] crypto: talitos - Use zero entry to init descriptors ptrs to zero

2015-03-05 Thread Christophe Leroy
Do use zero_entry value to init the descriptors ptrs to zero instead of writing 0 in each field Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers

[PATCH 05/17] crypto: talitos - isolate scatter/gather handling for ahash

2015-03-05 Thread Christophe Leroy
SEC1 doesn't support scatter/gather, therefore this part of the code will have to be implemented differently for SEC1, so we isolate it in a small helper function Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 29 +++-- 1 file

[PATCH 09/17] crypto: talitos - Move reset/init helpers into talitos2.h

2015-03-05 Thread Christophe Leroy
Move reset/init helpers init talitos2.h as they are specific to SEC2 Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 19 --- drivers/crypto/talitos2.h | 20 2 files changed, 20 insertions(+), 19 deletions(-) diff

[PATCH 0/17] crypto: talitos - Add support for SEC1

2015-03-05 Thread Christophe Leroy
[17/17] crypto: talitos - Update DT bindings with SEC1 Signed-off-by: Christophe Leroy christophe.le...@c-s.fr .../devicetree/bindings/crypto/fsl-sec2.txt| 5 +- drivers/crypto/Kconfig | 8 + drivers/crypto/Makefile| 2

[PATCH 15/17] crypto: talitos - Implementation of SEC1

2015-03-05 Thread Christophe Leroy
are in addition * SEC1 doesn't support scatter/gather * SEC1 has a different descriptor structure We add a helper function for clearing the desc field in the descriptor as that field needs to be cleared on SEC1 and doesn't exist on SEC2. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr

[PATCH 10/17] crypto: talitos - Move interrupt related macros in talitos2.h

2015-03-05 Thread Christophe Leroy
Move interrupt related macros in talitos2.h as they are specific to SEC2 Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 58 - drivers/crypto/talitos2.h | 60 +++ 2

[PATCH 17/17] crypto: talitos - Update DT bindings with SEC1

2015-03-05 Thread Christophe Leroy
This patch updates the documentation by including SEC1 into SEC2/3 doc Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- Documentation/devicetree/bindings/crypto/fsl-sec2.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings

[PATCH 11/17] crypto: talitos - Move hash chain handling into talitos2.h

2015-03-05 Thread Christophe Leroy
Move hash chain handling into talitos2.h as only SEC2 has sg chaining capatibility Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 34 -- drivers/crypto/talitos2.h | 34 ++ 2 files changed

[PATCH 16/17] crypto: talitos - SEC1 bugs on 0 data hash

2015-03-05 Thread Christophe Leroy
SEC1 bugs on 0 data hash, so we submit an already padded block representing 0 data Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 3 +++ drivers/crypto/talitos1.c | 21 + drivers/crypto/talitos1.h | 4 drivers/crypto/talitos2

[PATCH 14/17] crypto: talitos - Add a helper function to clear j_extent field

2015-03-05 Thread Christophe Leroy
j_extent field is specific to SEC2 so we add a helper function to clear it so that SEC1 can redefine that function as nop Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 2 +- drivers/crypto/talitos2.h | 5 + 2 files changed, 6 insertions(+), 1

[PATCH 04/17] crypto: talitos - Refactor the sg in/out chain allocation

2015-03-05 Thread Christophe Leroy
This patch refactors the handling of the input and output data that is quite similar in several functions Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 163 --- 1 file changed, 85 insertions(+), 78 deletions

[PATCH 01/17] crypto: talitos - base address for Execution Units and macro for ISR masks

2015-03-05 Thread Christophe Leroy
SEC1 and SEC2 have different EU base addresses, so define base addresses as #define SEC1 and SEC2 have different bit masks for ISR registers, so create a macro to define them Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.h | 85

[PATCH 06/17] crypto: talitos - Add talitos2.c to isolate SEC2 specific functions

2015-03-05 Thread Christophe Leroy
scatterlists We move to talitos.h some of the helpers that are used by both talitos.c and talitos2.c Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/Kconfig| 4 + drivers/crypto/Makefile | 1 + drivers/crypto/talitos.c | 666

[PATCH 12/17] crypto: talitos - Define compatible in talitos2.h instead of talitos.c

2015-03-05 Thread Christophe Leroy
Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 4 +--- drivers/crypto/talitos2.h | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 6c1f6f1..9f75ec9 100644 --- a/drivers/crypto

[PATCH 07/17] crypto: talitos - Split talitos.h into 2 parts

2015-03-05 Thread Christophe Leroy
In order to be able to manage differences between SEC1 and SEC2, we split talitos.h into two parts. talitos2.h will contain all parts that are specific to SEC2 and different on SEC1 Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.h | 163

[PATCH 02/17] crypto: talitos - Externalise specific SEC2 reset actions

2015-03-05 Thread Christophe Leroy
During init and reset, some actions are different between SEC1 and SEC2 This patch isolates them in small helper functions that we will be able to redefine for SEC1 Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 20 1 file changed, 16

[PATCH 13/17] crypto: talitos - move sg_count() helper into talitos.h

2015-03-05 Thread Christophe Leroy
move sg_count() helper into talitos.h as it will be needed by SEC1 specific functions Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 20 drivers/crypto/talitos.h | 21 + 2 files changed, 21 insertions(+), 20

[PATCH 08/17] crypto: talitos - Deport SEC2 error handling

2015-03-05 Thread Christophe Leroy
SEC2 and SEC1 error handling will be different because so many bits are different. So we move error handling into talitos2.c Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 103 +- drivers/crypto/talitos.h

[PATCH v2] splice: sendfile() at once fails for big files

2015-04-23 Thread Christophe Leroy
-3.6.3.gz Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- v2: no change, only new commit text fs/splice.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/splice.c b/fs/splice.c index 476024b..fe61723 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1161,7

[PATCH v3] splice: sendfile() at once fails for big files

2015-05-06 Thread Christophe Leroy
-3.6.3.gz Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- v2: no change, only new commit text v3: comment added iaw Jens Axboe suggestion fs/splice.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fs/splice.c b/fs/splice.c index 476024b..bfe62ae 100644

[PATCH v3 13/17] crypto: talitos - adapt interrupts and reset functions to SEC1

2015-04-17 Thread Christophe Leroy
on SEC1. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 227 +++ drivers/crypto/talitos.h | 39 +--- 2 files changed, 199 insertions(+), 67 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto

[PATCH v3 00/17] crypto: talitos - Add support for SEC1

2015-04-17 Thread Christophe Leroy
time, talitos driver shall support both SEC1 and SEC2+ at the same time. Based on cryptodev-2.6 tree Christophe Leroy (17): crypto: talitos - Use zero entry to init descriptors ptrs to zero crypto: talitos - Refactor the sg in/out chain allocation crypto: talitos - talitos_ptr renamed ptr

[PATCH v3 10/17] crypto: talitos - fill in talitos descriptor iaw SEC1 or SEC2+

2015-04-17 Thread Christophe Leroy
talitos descriptor is slightly different for SEC1 and SEC2+, so lets the helper function that fills the descriptor take into account the type of SEC. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 105 ++- 1 file

[PATCH v3 02/17] crypto: talitos - Refactor the sg in/out chain allocation

2015-04-17 Thread Christophe Leroy
This patch refactors the handling of the input and output data that is quite similar in several functions Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 159 --- 1 file changed, 81 insertions(+), 78 deletions

[PATCH v3 07/17] crypto: talitos - enhanced talitos_desc struct for SEC1

2015-04-17 Thread Christophe Leroy
This patch enhances the talitos_desc struct with fields for SEC1. SEC1 has only one header field, and has a 'next_desc' field in addition. This mixed descriptor will continue to fit SEC2, and for SEC1 we will recopy hdr value into hdr1 value in talitos_submit() Signed-off-by: Christophe Leroy

[PATCH v3 03/17] crypto: talitos - talitos_ptr renamed ptr for more lisibility

2015-04-17 Thread Christophe Leroy
Linux CodyingStyle recommends to use short variables for local variables. ptr is just good enough for those 3 lines functions. It helps keep single lines shorter than 80 characters. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 20 ++-- 1

[PATCH v3 05/17] crypto: talitos - remove param 'extent' in map_single_talitos_ptr()

2015-04-17 Thread Christophe Leroy
map_single_talitos_ptr() is always called with extent == 0, so lets remove this unused parameter Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/crypto

[PATCH v3 06/17] crypto: talitos - helper function for ptr len

2015-04-17 Thread Christophe Leroy
This patch adds a helper function for reads and writes of the len param of the talitos descriptor. This will help implement SEC1 later. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 24 +--- 1 file changed, 17 insertions(+), 7

[PATCH v3 04/17] crypto: talitos - Add a helper function to clear j_extent field

2015-04-17 Thread Christophe Leroy
j_extent field is specific to SEC2 so we add a helper function to clear it so that SEC1 can redefine that function as nop Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH v3 04/17] crypto: talitos - Add a helper function to clear j_extent field

2015-04-17 Thread Christophe Leroy
j_extent field is specific to SEC2 so we add a helper function to clear it so that SEC1 can redefine that function as nop Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH v3 12/17] crypto: talitos - base address for Execution Units

2015-04-17 Thread Christophe Leroy
SEC 1.0, 1.2 and 2.x+ have different EU base addresses, so we need to define pointers for each EU in the driver private data structure. The proper address is set by the probe function depending on the SEC type, in order to provide access to the proper address. Signed-off-by: Christophe Leroy

[PATCH v3 01/17] crypto: talitos - Use zero entry to init descriptors ptrs to zero

2015-04-17 Thread Christophe Leroy
Do use zero_entry value to init the descriptors ptrs to zero instead of writing 0 in each field Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers

[PATCH v3 05/17] crypto: talitos - remove param 'extent' in map_single_talitos_ptr()

2015-04-17 Thread Christophe Leroy
map_single_talitos_ptr() is always called with extent == 0, so lets remove this unused parameter Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/crypto

[PATCH v3 06/17] crypto: talitos - helper function for ptr len

2015-04-17 Thread Christophe Leroy
This patch adds a helper function for reads and writes of the len param of the talitos descriptor. This will help implement SEC1 later. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 24 +--- 1 file changed, 17 insertions(+), 7

[PATCH v3 01/17] crypto: talitos - Use zero entry to init descriptors ptrs to zero

2015-04-17 Thread Christophe Leroy
Do use zero_entry value to init the descriptors ptrs to zero instead of writing 0 in each field Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers

[PATCH v3 09/17] crypto: talitos - Add a feature to tag SEC1

2015-04-17 Thread Christophe Leroy
. If both are compiled in, feature field is checked. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 3 +++ drivers/crypto/talitos.h | 17 + 2 files changed, 20 insertions(+) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index

[PATCH v3 08/17] crypto: talitos - add sub-choice in talitos CONFIG for SEC1

2015-04-17 Thread Christophe Leroy
This patch adds a CONFIG option to select SEC1, SEC2+ or both. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/Kconfig | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index 800bf41..8a76a01 100644

[PATCH v3 17/17] crypto: talitos - Update DT bindings with SEC1

2015-04-17 Thread Christophe Leroy
This patch updates the documentation by including SEC1 into SEC2/3 doc Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- Documentation/devicetree/bindings/crypto/fsl-sec2.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings

[PATCH v3 16/17] crypto: talitos - Add fsl,sec1.0 compatible

2015-04-17 Thread Christophe Leroy
We add a specific compatible for SEC1, to handle the differences between SEC1 and SEC2+ Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index

[PATCH v3 17/17] crypto: talitos - Update DT bindings with SEC1

2015-04-17 Thread Christophe Leroy
This patch updates the documentation by including SEC1 into SEC2/3 doc Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- Documentation/devicetree/bindings/crypto/fsl-sec2.txt | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings

[PATCH v3 11/17] crypto: talitos - adaptation of talitos_submit() for SEC1

2015-04-17 Thread Christophe Leroy
SEC1 descriptor is a bit different to SEC2+ descriptor. talitos_submit() will have to copy hdr field into hdr1 field and send the descriptor starting at hdr1 up to next_desc. For SEC2, it remains unchanged and next_desc is just ignored. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr

[PATCH v3 10/17] crypto: talitos - fill in talitos descriptor iaw SEC1 or SEC2+

2015-04-17 Thread Christophe Leroy
talitos descriptor is slightly different for SEC1 and SEC2+, so lets the helper function that fills the descriptor take into account the type of SEC. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 105 ++- 1 file

[PATCH v3 14/17] crypto: talitos - implement scatter/gather copy for SEC1

2015-04-17 Thread Christophe Leroy
also adapt the max buffer size which is only 32k on SEC1 while it is 64k on SEC2+ Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 138 ++- drivers/crypto/talitos.h | 3 +- 2 files changed, 103 insertions(+), 38

[PATCH v3 09/17] crypto: talitos - Add a feature to tag SEC1

2015-04-17 Thread Christophe Leroy
. If both are compiled in, feature field is checked. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 3 +++ drivers/crypto/talitos.h | 17 + 2 files changed, 20 insertions(+) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index

[PATCH v3 13/17] crypto: talitos - adapt interrupts and reset functions to SEC1

2015-04-17 Thread Christophe Leroy
on SEC1. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 227 +++ drivers/crypto/talitos.h | 39 +--- 2 files changed, 199 insertions(+), 67 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto

[PATCH v3 12/17] crypto: talitos - base address for Execution Units

2015-04-17 Thread Christophe Leroy
SEC 1.0, 1.2 and 2.x+ have different EU base addresses, so we need to define pointers for each EU in the driver private data structure. The proper address is set by the probe function depending on the SEC type, in order to provide access to the proper address. Signed-off-by: Christophe Leroy

[PATCH v3 14/17] crypto: talitos - implement scatter/gather copy for SEC1

2015-04-17 Thread Christophe Leroy
also adapt the max buffer size which is only 32k on SEC1 while it is 64k on SEC2+ Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 138 ++- drivers/crypto/talitos.h | 3 +- 2 files changed, 103 insertions(+), 38

[PATCH v3 08/17] crypto: talitos - add sub-choice in talitos CONFIG for SEC1

2015-04-17 Thread Christophe Leroy
This patch adds a CONFIG option to select SEC1, SEC2+ or both. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/Kconfig | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index 800bf41..8a76a01 100644

[PATCH v3 15/17] crypto: talitos - SEC1 bugs on 0 data hash

2015-04-17 Thread Christophe Leroy
SEC1 bugs on 0 data hash, so we submit an already padded block representing 0 data Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/crypto/talitos.c b/drivers/crypto

[PATCH v3 15/17] crypto: talitos - SEC1 bugs on 0 data hash

2015-04-17 Thread Christophe Leroy
SEC1 bugs on 0 data hash, so we submit an already padded block representing 0 data Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/crypto/talitos.c b/drivers/crypto

[PATCH v3 02/17] crypto: talitos - Refactor the sg in/out chain allocation

2015-04-17 Thread Christophe Leroy
This patch refactors the handling of the input and output data that is quite similar in several functions Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- drivers/crypto/talitos.c | 159 --- 1 file changed, 81 insertions(+), 78 deletions

[PATCH v3 07/17] crypto: talitos - enhanced talitos_desc struct for SEC1

2015-04-17 Thread Christophe Leroy
This patch enhances the talitos_desc struct with fields for SEC1. SEC1 has only one header field, and has a 'next_desc' field in addition. This mixed descriptor will continue to fit SEC2, and for SEC1 we will recopy hdr value into hdr1 value in talitos_submit() Signed-off-by: Christophe Leroy

Re: [PATCH 1/4] crypto: talitos: dma_map_sg can handle chained SG

2015-09-23 Thread Christophe Leroy
Le 23/09/2015 13:55, LABBE Corentin a écrit : The talitos driver use two dma_map_sg path according to SG are chained or not. Since dma_map_sg can handle both case, clean the code with all references to sg chained. Thus removing talitos_map_sg, talitos_unmap_sg_chain and sg_count functions.

[PATCH] crypto: talitos - add new crypto modes

2015-12-01 Thread Christophe Leroy
This patch adds the following algorithms to the talitos driver: * ecb(aes) * ctr(aes) * ecb(des) * cbc(des) * ecb(des3_ede) Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 83 drivers/crypto/talitos.

Re: [PATCH 2/6] crypto: talitos - making mapping helpers more generic

2016-06-06 Thread Christophe Leroy
Le 31/05/2016 à 11:46, Herbert Xu a écrit : On Fri, May 27, 2016 at 11:32:36AM +0200, Christophe Leroy wrote: + sg_count = sg_to_link_tbl_offset(src, sg_count, offset, len, +>link_tbl[tbl_off]) + if (sg_count == 1) { + /* O

[PATCH v2 0/7] crypto: talitos - implementation of AEAD for SEC1

2016-06-06 Thread Christophe Leroy
r the move. * reworked the DMA sync associated with mapping in order to not spend time syncing several times Christophe Leroy (7): crypto: talitos - using helpers for all talitos_ptr operations crypto: talitos - move mapping helpers before IPSEC functions crypto: talitos - making mapping helpers mo

[PATCH v2 6/7] crypto: talitos - implement cra_priority

2016-06-06 Thread Christophe Leroy
IPSEC_ESP and not HMAC_SNOOP_NO_AFEU which is less performant. This is done by adding a priority field in the template. If the field is 0, we use the default priority, otherwise we used the one in the field. Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos

[PATCH v2 4/7] crypto: talitos - Implement AEAD for SEC1 using HMAC_SNOOP_NO_AFEU

2016-06-06 Thread Christophe Leroy
has CICV out in pointer 6 * HMAC_SNOOP_NO_AFEU has no primary EU context out so we get it from the end of data out Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 209 --- 1 file changed, 124 insertions(

[PATCH v2 7/7] crypto: talitos - templates for AEAD using HMAC_SNOOP_NO_AFEU

2016-06-06 Thread Christophe Leroy
This will allow IPSEC on SEC1 Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 180 +++ 1 file changed, 180 insertions(+) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index dfd3a93..0

[PATCH v2 5/7] crypto: talitos - sg_to_link_tbl() not used anymore, remove it

2016-06-06 Thread Christophe Leroy
Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 4ff03c3..ff8cf39 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/tal

[PATCH v2 1/7] crypto: talitos - using helpers for all talitos_ptr operations

2016-06-06 Thread Christophe Leroy
keeping single lines of 80 chars Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 59 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c

[PATCH v2 3/7] crypto: talitos - making mapping helpers more generic

2016-06-06 Thread Christophe Leroy
to not make it several times. talitos_edesc_alloc() size calculation are fixed to also take into account AEAD specific parts also for SEC1 Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 230 +++ 1 file c

[PATCH v2 2/7] crypto: talitos - move mapping helpers before IPSEC functions

2016-06-06 Thread Christophe Leroy
In order to be able to use the mapping/unmapping helpers for IPSEC it needs to be move upper in the file Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 244 +++ 1 file changed, 122 insertions(+), 122 del

[PATCH 1/6] crypto: talitos - using helpers for all talitos_ptr operations

2016-05-27 Thread Christophe Leroy
keeping single lines of 80 chars Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 59 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c

[PATCH 0/6] crypto: talitos - implementation of AEAD for SEC1

2016-05-27 Thread Christophe Leroy
This set of patches provides the implementation of AEAD for talitos SEC1. Christophe Leroy (6): crypto: talitos - using helpers for all talitos_ptr operations crypto: talitos - making mapping helpers more generic crypto: talitos - Implement AEAD for SEC1 using HMAC_SNOOP_NO_AFEU crypto

[PATCH 3/6] crypto: talitos - Implement AEAD for SEC1 using HMAC_SNOOP_NO_AFEU

2016-05-27 Thread Christophe Leroy
has CICV out in pointer 6 * HMAC_SNOOP_NO_AFEU has no primary EU context out so we get it from the end of data out Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 205 +++ 1 file changed, 119 insertions(

[PATCH 6/6] crypto: talitos - templates for AEAD using HMAC_SNOOP_NO_AFEU

2016-05-27 Thread Christophe Leroy
This will allow IPSEC on SEC1 Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 180 +++ 1 file changed, 180 insertions(+) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index b554f56..d

[PATCH 2/6] crypto: talitos - making mapping helpers more generic

2016-05-27 Thread Christophe Leroy
calculation are fixed to also take into account AEAD specific parts also for SEC1 Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 243 ++- 1 file changed, 94 insertions(+), 149 deletions(-) diff --git a/drivers/

AEAD in TALITOS SEC1 versus TALITOS SEC2

2016-04-20 Thread Christophe Leroy
Today, in Talitos driver crypto alg registration is based on predefined templates with a predefined descriptor type and verification against the descriptors supported by the HW. This works well for ALG that require a unique descriptor. But for IPsec this is slightly different: * IPsec can be

Re: [PATCH 0/6] crypto: talitos - various fixes

2017-09-20 Thread Christophe LEROY
Looks like the linux-crypto list and patchwork was out of order when I sent this. I will send again, sorry for the noise on the other lists. Le 19/09/2017 à 14:58, Christophe Leroy a écrit : This serie provide various fixes on the talitos driver. Christophe Leroy (6): crypto: talitos

Test

2017-09-20 Thread Christophe LEROY
Sorry for the noise, but I have twice tried to send a PATCH serie to this list with a copy to linuxppc-...@lists.ozlabs.org, it appears properly in the linuxppc list/patchwork but it still doesn't appear on linux-crypto. Is there anything wrong with the list ? Christophe

Re: [PATCH 0/6] crypto: talitos - various fixes

2017-09-20 Thread christophe leroy
What's going wrong ? I have resent it and it the same again, the serie is not dispatched on the linux-crypto list, but when I answer to a mail of the serie, the answer shows up. What could be the issue ? Christophe Le 20/09/2017 à 10:35, Christophe LEROY a écrit : Looks like the linux-crypto

[PATCH 2/6] crypto: talitos - fix hashing

2017-09-21 Thread Christophe Leroy
md5sum on some files gives wrong result Exemple: With the md5sum from libkcapi: c15115c05bad51113f81bdaee735dd09 test With the original md5sum: bbdf41d80ba7e8b2b7be3a0772be76cb test This patch fixes this issue Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/

[PATCH 0/6] crypto: talitos - various fixes

2017-09-21 Thread Christophe Leroy
This serie provide various fixes on the talitos driver. Christophe Leroy (6): crypto: talitos - Don't provide setkey for non hmac hashing algs. crypto: talitos - fix hashing crypto: talitos - fix sha224 crypto: talitos - fix AEAD test failures crypto: talitos - use kzalloc instead

[PATCH 1/6] crypto: talitos - Don't provide setkey for non hmac hashing algs.

2017-09-21 Thread Christophe Leroy
at setkey() function is set only for hmac hashing. Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 79791c690858..5cc1600

[PATCH 3/6] crypto: talitos - fix sha224

2017-09-21 Thread Christophe Leroy
Kernel crypto tests report the following error at startup [2.752626] alg: hash: Test 4 failed for sha224-talitos [2.757907] : 30 e2 86 e2 e7 8a dd 0d d7 eb 9f d5 83 fe f1 b0 0010: 2d 5a 6c a5 f9 55 ea fd 0e 72 05 22 This patch fixes it Signed-off-by: Christophe Leroy

[PATCH 5/6] crypto: talitos - use kzalloc instead of kmalloc

2017-09-21 Thread Christophe Leroy
Use kzalloc() to zeroize the extended descriptor at allocation and further zeorising Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 23 +-- drivers/crypto/talitos.h | 2 -- 2 files changed, 1 insertion(+), 24 deletions(-) diff

[PATCH 6/6] crypto: talitos - fix memory corruption on SEC2

2017-09-21 Thread Christophe Leroy
all cases. Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- drivers/crypto/talitos.c | 40 ++-- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index a5b608b54c74..e7e31f8fd3

Re: [PATCH 5/6] crypto: talitos - use kzalloc instead of kmalloc

2017-10-05 Thread Christophe LEROY
Le 21/09/2017 à 09:19, Christophe Leroy a écrit : Use kzalloc() to zeroize the extended descriptor at allocation and further zeorising This patch significantly degrades performances. I will submit a new serie soon. Christophe Signed-off-by: Christophe Leroy <christophe.le...@c-s

md5sum (from libkcapi) fails on kernel 4.9 but not on 4.13

2017-10-16 Thread Christophe LEROY
Hi Stephan, I get an issue with md5sum of a big file with kernel 4.9. It don't get that issue with kernel 4.13. When I do an strace, I see a difference in the calls: at the end of the file, with 4.9 md5sum uses sendmsg() for the last block while with 4.13 it uses splice() as for all the

Re: md5sum (from libkcapi) fails on kernel 4.9 but not on 4.13

2017-10-17 Thread Christophe LEROY
Hi Stephan, Le 16/10/2017 à 23:10, Stephan Mueller a écrit : Am Montag, 16. Oktober 2017, 08:53:00 CEST schrieb Christophe LEROY: Hi Christophe, Hi Stephan, I get an issue with md5sum of a big file with kernel 4.9. It don't get that issue with kernel 4.13. The key to the difference

Re: md5sum (from libkcapi) fails on kernel 4.9 but not on 4.13

2017-10-17 Thread Christophe LEROY
Hi Again Stephan Le 17/10/2017 à 09:58, Christophe LEROY a écrit : Hi Stephan, Le 16/10/2017 à 23:10, Stephan Mueller a écrit : Am Montag, 16. Oktober 2017, 08:53:00 CEST schrieb Christophe LEROY: Hi Christophe, Hi Stephan, I get an issue with md5sum of a big file with kernel 4.9

  1   2   >