search for: crypto_engine_reqctx

Displaying 20 results from an estimated 21 matches for "crypto_engine_reqctx".

2018 Jan 10
1
[PATCH 1/6] Documentation: crypto: document crypto engine API
.../crypto_engine.rst > @@ -0,0 +1,46 @@ > +============= > +CRYPTO ENGINE > +============= > + > +Overview > +-------- > +The crypto engine API (CE), is a crypto queue manager. > + > +Requirement > +----------- > +You have to put at start of your tfm_ctx the struct crypto_engine_reqctx > +struct your_tfm_ctx { > + struct crypto_engine_reqctx enginectx; > + ... > +}; > +Why: Since CE manage only crypto_async_request, it cannot know the underlying > +request_type and so have access only on the TFM. > +So using container_of for accessing __ctx is i...
2018 Feb 15
0
[PATCH v2 0/6] crypto: engine - Permit to enqueue all async requests
...adding other algs(aead, asymetric_key) will make the situation worst. > > This patchset remove all algs specific stuff and now only process generic crypto_async_request. > > The requests handler function pointer are now moved out of struct engine and > are now stored directly in a crypto_engine_reqctx. > > The original proposal of Herbert [1] cannot be done completly since the crypto_engine > could only dequeue crypto_async_request and it is impossible to access any request_ctx > without knowing the underlying request type. > > So I do something near that was requested: addin...
2018 Jan 03
11
[PATCH 0/6] crypto: engine - Permit to enqueue all async requests
...dd too many functions and adding other algs(aead, asymetric_key) will make the situation worst. This patchset remove all algs specific stuff and now only process generic crypto_async_request. The requests handler function pointer are now moved out of struct engine and are now stored directly in a crypto_engine_reqctx. The original proposal of Herbert [1] cannot be done completly since the crypto_engine could only dequeue crypto_async_request and it is impossible to access any request_ctx without knowing the underlying request type. So I do something near that was requested: adding crypto_engine_reqctx in TFM...
2018 Feb 16
1
[PATCH v2 0/6] crypto: engine - Permit to enqueue all async requests
...asymetric_key) will make the situation worst. > > > > This patchset remove all algs specific stuff and now only process generic crypto_async_request. > > > > The requests handler function pointer are now moved out of struct engine and > > are now stored directly in a crypto_engine_reqctx. > > > > The original proposal of Herbert [1] cannot be done completly since the crypto_engine > > could only dequeue crypto_async_request and it is impossible to access any request_ctx > > without knowing the underlying request type. > > > > So I do something...
2017 Nov 29
9
[PATCH RFC 0/4] crypto: engine - Permit to enqueue all async requests
...dd too many functions and adding other algs(aead, asymetric_key) will make the situation worst. This patchset remove all algs specific stuff and now only process generic crypto_async_request. The requests handler function pointer are now moved out of struct engine and are now stored directly in a crypto_engine_reqctx. The original proposal of Herbert [1] cannot be done completly since the crypto_engine could only dequeue crypto_async_request and it is impossible to access any request_ctx without knowing the underlying request type. So I do something near that was requested: adding crypto_engine_reqctx in TFM...
2017 Nov 29
9
[PATCH RFC 0/4] crypto: engine - Permit to enqueue all async requests
...dd too many functions and adding other algs(aead, asymetric_key) will make the situation worst. This patchset remove all algs specific stuff and now only process generic crypto_async_request. The requests handler function pointer are now moved out of struct engine and are now stored directly in a crypto_engine_reqctx. The original proposal of Herbert [1] cannot be done completly since the crypto_engine could only dequeue crypto_async_request and it is impossible to access any request_ctx without knowing the underlying request type. So I do something near that was requested: adding crypto_engine_reqctx in TFM...
2018 Jan 03
0
[PATCH 1/6] Documentation: crypto: document crypto engine API
...00000..b0ed37f9fb0c --- /dev/null +++ b/Documentation/crypto/crypto_engine.rst @@ -0,0 +1,46 @@ +============= +CRYPTO ENGINE +============= + +Overview +-------- +The crypto engine API (CE), is a crypto queue manager. + +Requirement +----------- +You have to put at start of your tfm_ctx the struct crypto_engine_reqctx +struct your_tfm_ctx { + struct crypto_engine_reqctx enginectx; + ... +}; +Why: Since CE manage only crypto_async_request, it cannot know the underlying +request_type and so have access only on the TFM. +So using container_of for accessing __ctx is impossible. +Furthermore, the crypto...
2017 Dec 06
0
[PATCH RFC 0/4] crypto: engine - Permit to enqueue all async requests
...nd adding other algs(aead, asymetric_key) will make the situation worst. > > This patchset remove all algs specific stuff and now only process generic crypto_async_request. > > The requests handler function pointer are now moved out of struct engine and > are now stored directly in a crypto_engine_reqctx. > > The original proposal of Herbert [1] cannot be done completly since the crypto_engine > could only dequeue crypto_async_request and it is impossible to access any request_ctx > without knowing the underlying request type. > > So I do something near that was requested: adding...
2017 Dec 06
1
[PATCH RFC 1/4] crypto: engine - Permit to enqueue all async requests
...engine *engine, > bool in_kthread) > { > struct crypto_async_request *async_req, *backlog; > - struct ahash_request *hreq; > - struct ablkcipher_request *breq; > unsigned long flags; > bool was_busy = false; > - int ret, rtype; > + int ret; > + struct crypto_engine_reqctx *enginectx; > > spin_lock_irqsave(&engine->queue_lock, flags); > > @@ -94,7 +93,6 @@ static void crypto_pump_requests(struct crypto_engine *engine, > > spin_unlock_irqrestore(&engine->queue_lock, flags); > > - rtype = crypto_tfm_alg_type(engin...
2017 Dec 06
1
[PATCH RFC 1/4] crypto: engine - Permit to enqueue all async requests
...engine *engine, > bool in_kthread) > { > struct crypto_async_request *async_req, *backlog; > - struct ahash_request *hreq; > - struct ablkcipher_request *breq; > unsigned long flags; > bool was_busy = false; > - int ret, rtype; > + int ret; > + struct crypto_engine_reqctx *enginectx; > > spin_lock_irqsave(&engine->queue_lock, flags); > > @@ -94,7 +93,6 @@ static void crypto_pump_requests(struct crypto_engine *engine, > > spin_unlock_irqrestore(&engine->queue_lock, flags); > > - rtype = crypto_tfm_alg_type(engin...
2018 Jan 26
10
[PATCH v2 0/6] crypto: engine - Permit to enqueue all async requests
...dd too many functions and adding other algs(aead, asymetric_key) will make the situation worst. This patchset remove all algs specific stuff and now only process generic crypto_async_request. The requests handler function pointer are now moved out of struct engine and are now stored directly in a crypto_engine_reqctx. The original proposal of Herbert [1] cannot be done completly since the crypto_engine could only dequeue crypto_async_request and it is impossible to access any request_ctx without knowing the underlying request type. So I do something near that was requested: adding crypto_engine_reqctx in TFM...
2018 Jan 26
10
[PATCH v2 0/6] crypto: engine - Permit to enqueue all async requests
...dd too many functions and adding other algs(aead, asymetric_key) will make the situation worst. This patchset remove all algs specific stuff and now only process generic crypto_async_request. The requests handler function pointer are now moved out of struct engine and are now stored directly in a crypto_engine_reqctx. The original proposal of Herbert [1] cannot be done completly since the crypto_engine could only dequeue crypto_async_request and it is impossible to access any request_ctx without knowing the underlying request type. So I do something near that was requested: adding crypto_engine_reqctx in TFM...
2017 Nov 29
0
[PATCH RFC 1/4] crypto: engine - Permit to enqueue all async requests
...4,10 @@ static void crypto_pump_requests(struct crypto_engine *engine, bool in_kthread) { struct crypto_async_request *async_req, *backlog; - struct ahash_request *hreq; - struct ablkcipher_request *breq; unsigned long flags; bool was_busy = false; - int ret, rtype; + int ret; + struct crypto_engine_reqctx *enginectx; spin_lock_irqsave(&engine->queue_lock, flags); @@ -94,7 +93,6 @@ static void crypto_pump_requests(struct crypto_engine *engine, spin_unlock_irqrestore(&engine->queue_lock, flags); - rtype = crypto_tfm_alg_type(engine->cur_req->tfm); /* Until here we get...
2018 Jan 10
1
[PATCH 2/6] crypto: engine - Permit to enqueue all async requests
...engine *engine, > bool in_kthread) > { > struct crypto_async_request *async_req, *backlog; > - struct ahash_request *hreq; > - struct ablkcipher_request *breq; > unsigned long flags; > bool was_busy = false; > - int ret, rtype; > + int ret; > + struct crypto_engine_reqctx *enginectx; > > spin_lock_irqsave(&engine->queue_lock, flags); > > @@ -94,7 +92,6 @@ static void crypto_pump_requests(struct crypto_engine *engine, > > spin_unlock_irqrestore(&engine->queue_lock, flags); > > - rtype = crypto_tfm_alg_type(engin...
2018 Jan 10
1
[PATCH 6/6] crypto: stm32-cryp: convert to the new crypto engine API
...ndex cf1dddbeaa2c..99e0473ef247 100644 > --- a/drivers/crypto/stm32/stm32-cryp.c > +++ b/drivers/crypto/stm32/stm32-cryp.c > @@ -91,6 +91,7 @@ > #define _walked_out (cryp->out_walk.offset - cryp->out_sg->offset) > > struct stm32_cryp_ctx { > + struct crypto_engine_reqctx enginectx; > struct stm32_cryp *cryp; > int keylen; > u32 key[AES_KEYSIZE_256 / sizeof(u32)]; > @@ -494,10 +495,20 @@ static int stm32_cryp_cpu_start(struct stm32_cryp *cryp) > return 0; > } > > +static int stm32...
2018 Jan 10
1
[PATCH 5/6] crypto: stm32-hash: convert to the new crypto engine API
...stm32/stm32-hash.c > index 4ca4a264a833..9790c2c936c7 100644 > --- a/drivers/crypto/stm32/stm32-hash.c > +++ b/drivers/crypto/stm32/stm32-hash.c > @@ -122,6 +122,7 @@ enum stm32_hash_data_format { > #define HASH_DMA_THRESHOLD 50 > > struct stm32_hash_ctx { > + struct crypto_engine_reqctx enginectx; > struct stm32_hash_dev *hdev; > unsigned long flags; > > @@ -828,6 +829,11 @@ static int stm32_hash_hw_init(struct stm32_hash_dev *hdev, > return 0; > } > > +static int stm32_hash_one_request(struct crypto_engine *engine, > + void *areq)...
2018 Jan 03
0
[PATCH 2/6] crypto: engine - Permit to enqueue all async requests
...3,10 @@ static void crypto_pump_requests(struct crypto_engine *engine, bool in_kthread) { struct crypto_async_request *async_req, *backlog; - struct ahash_request *hreq; - struct ablkcipher_request *breq; unsigned long flags; bool was_busy = false; - int ret, rtype; + int ret; + struct crypto_engine_reqctx *enginectx; spin_lock_irqsave(&engine->queue_lock, flags); @@ -94,7 +92,6 @@ static void crypto_pump_requests(struct crypto_engine *engine, spin_unlock_irqrestore(&engine->queue_lock, flags); - rtype = crypto_tfm_alg_type(engine->cur_req->tfm); /* Until here we get...
2017 Dec 07
0
[PATCH RFC 1/4] crypto: engine - Permit to enqueue all async requests
...> > { > > struct crypto_async_request *async_req, *backlog; > > - struct ahash_request *hreq; > > - struct ablkcipher_request *breq; > > unsigned long flags; > > bool was_busy = false; > > - int ret, rtype; > > + int ret; > > + struct crypto_engine_reqctx *enginectx; > > > > spin_lock_irqsave(&engine->queue_lock, flags); > > > > @@ -94,7 +93,6 @@ static void crypto_pump_requests(struct crypto_engine *engine, > > > > spin_unlock_irqrestore(&engine->queue_lock, flags); > > >...
2017 Nov 29
0
[PATCH RFC 4/4] crypto: stm32: convert to the new crypto engine API
...crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c index 4ca4a264a833..e3f9f7b04ce2 100644 --- a/drivers/crypto/stm32/stm32-hash.c +++ b/drivers/crypto/stm32/stm32-hash.c @@ -122,6 +122,7 @@ enum stm32_hash_data_format { #define HASH_DMA_THRESHOLD 50 struct stm32_hash_ctx { + struct crypto_engine_reqctx enginectx; struct stm32_hash_dev *hdev; unsigned long flags; @@ -811,7 +812,7 @@ static void stm32_hash_finish_req(struct ahash_request *req, int err) rctx->flags |= HASH_FLAGS_ERRORS; } - crypto_finalize_hash_request(hdev->engine, req, err); + crypto_finalize_request(hdev->e...
2018 Jan 03
0
[PATCH 5/6] crypto: stm32-hash: convert to the new crypto engine API
...crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c index 4ca4a264a833..9790c2c936c7 100644 --- a/drivers/crypto/stm32/stm32-hash.c +++ b/drivers/crypto/stm32/stm32-hash.c @@ -122,6 +122,7 @@ enum stm32_hash_data_format { #define HASH_DMA_THRESHOLD 50 struct stm32_hash_ctx { + struct crypto_engine_reqctx enginectx; struct stm32_hash_dev *hdev; unsigned long flags; @@ -828,6 +829,11 @@ static int stm32_hash_hw_init(struct stm32_hash_dev *hdev, return 0; } +static int stm32_hash_one_request(struct crypto_engine *engine, + void *areq); +static int stm32_hash_prepare_req(struct crypto_...