search for: status_sg

Displaying 20 results from an estimated 43 matches for "status_sg".

2020 Jun 16
0
[PATCH 5.7 095/163] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()
...5 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -350,13 +350,18 @@ __virtio_crypto_skcipher_do_req(struct v int err; unsigned long flags; struct scatterlist outhdr, iv_sg, status_sg, **sgs; - int i; u64 dst_len; unsigned int num_out = 0, num_in = 0; int sg_total; uint8_t *iv; + struct scatterlist *sg; src_nents = sg_nents_for_len(req->src, req->cryptlen); + if (src_nents < 0) { + pr_err("Invalid number of src SG.\n"); + return src_nents; + } +...
2020 Jun 16
0
[PATCH 5.6 100/161] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()
...5 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -350,13 +350,18 @@ __virtio_crypto_skcipher_do_req(struct v int err; unsigned long flags; struct scatterlist outhdr, iv_sg, status_sg, **sgs; - int i; u64 dst_len; unsigned int num_out = 0, num_in = 0; int sg_total; uint8_t *iv; + struct scatterlist *sg; src_nents = sg_nents_for_len(req->src, req->cryptlen); + if (src_nents < 0) { + pr_err("Invalid number of src SG.\n"); + return src_nents; + } +...
2020 Jun 16
0
[PATCH 5.4 087/134] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()
...5b5da8b5..3b37d0150814 100644 --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -353,13 +353,18 @@ __virtio_crypto_ablkcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req, int err; unsigned long flags; struct scatterlist outhdr, iv_sg, status_sg, **sgs; - int i; u64 dst_len; unsigned int num_out = 0, num_in = 0; int sg_total; uint8_t *iv; + struct scatterlist *sg; src_nents = sg_nents_for_len(req->src, req->nbytes); + if (src_nents < 0) { + pr_err("Invalid number of src SG.\n"); + return src_nents; + } +...
2020 Jun 19
0
[PATCH 4.14 050/190] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()
...2b3137c6..fee78ec46bae 100644 --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -354,13 +354,18 @@ __virtio_crypto_ablkcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req, int err; unsigned long flags; struct scatterlist outhdr, iv_sg, status_sg, **sgs; - int i; u64 dst_len; unsigned int num_out = 0, num_in = 0; int sg_total; uint8_t *iv; + struct scatterlist *sg; src_nents = sg_nents_for_len(req->src, req->nbytes); + if (src_nents < 0) { + pr_err("Invalid number of src SG.\n"); + return src_nents; + } +...
2020 Jun 19
0
[PATCH 4.19 065/267] crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()
...060cc32f..e9a8485c4929 100644 --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -367,13 +367,18 @@ __virtio_crypto_ablkcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req, int err; unsigned long flags; struct scatterlist outhdr, iv_sg, status_sg, **sgs; - int i; u64 dst_len; unsigned int num_out = 0, num_in = 0; int sg_total; uint8_t *iv; + struct scatterlist *sg; src_nents = sg_nents_for_len(req->src, req->nbytes); + if (src_nents < 0) { + pr_err("Invalid number of src SG.\n"); + return src_nents; + } +...
2020 Jun 15
0
Patch "crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()" has been added to the 5.7-stable tree
...5 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -350,13 +350,18 @@ __virtio_crypto_skcipher_do_req(struct v int err; unsigned long flags; struct scatterlist outhdr, iv_sg, status_sg, **sgs; - int i; u64 dst_len; unsigned int num_out = 0, num_in = 0; int sg_total; uint8_t *iv; + struct scatterlist *sg; src_nents = sg_nents_for_len(req->src, req->cryptlen); + if (src_nents < 0) { + pr_err("Invalid number of src SG.\n"); + return src_nents; + } +...
2020 Jun 15
0
Patch "crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()" has been added to the 5.6-stable tree
...5 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) --- a/drivers/crypto/virtio/virtio_crypto_algs.c +++ b/drivers/crypto/virtio/virtio_crypto_algs.c @@ -350,13 +350,18 @@ __virtio_crypto_skcipher_do_req(struct v int err; unsigned long flags; struct scatterlist outhdr, iv_sg, status_sg, **sgs; - int i; u64 dst_len; unsigned int num_out = 0, num_in = 0; int sg_total; uint8_t *iv; + struct scatterlist *sg; src_nents = sg_nents_for_len(req->src, req->cryptlen); + if (src_nents < 0) { + pr_err("Invalid number of src SG.\n"); + return src_nents; + } +...
2016 Nov 27
2
[PATCH v2 2/2] crypto: add virtio-crypto driver
...gt;input.session_id); > + spin_unlock(&ctx->lock); > + > + kfree(cipher_key); > + return 0; > +} > + > +static int virtio_crypto_alg_ablkcipher_close_session( > + struct virtio_crypto_ablkcipher_ctx *ctx, > + int encrypt) > +{ > + struct scatterlist outhdr, status_sg, *sgs[2]; > + unsigned int tmp; > + struct virtio_crypto_destroy_session_req *destroy_session; > + struct virtio_crypto *vcrypto = ctx->vcrypto; > + int err; > + unsigned int num_out = 0, num_in = 0; > + > + spin_lock(&vcrypto->ctrl_lock); > + vcrypto->ctrl_stat...
2016 Nov 27
2
[PATCH v2 2/2] crypto: add virtio-crypto driver
...gt;input.session_id); > + spin_unlock(&ctx->lock); > + > + kfree(cipher_key); > + return 0; > +} > + > +static int virtio_crypto_alg_ablkcipher_close_session( > + struct virtio_crypto_ablkcipher_ctx *ctx, > + int encrypt) > +{ > + struct scatterlist outhdr, status_sg, *sgs[2]; > + unsigned int tmp; > + struct virtio_crypto_destroy_session_req *destroy_session; > + struct virtio_crypto *vcrypto = ctx->vcrypto; > + int err; > + unsigned int num_out = 0, num_in = 0; > + > + spin_lock(&vcrypto->ctrl_lock); > + vcrypto->ctrl_stat...
2016 Nov 28
0
[virtio-dev] Re: [PATCH v2 2/2] crypto: add virtio-crypto driver
...>lock); > > + > > + kfree(cipher_key); > > + return 0; > > +} > > + > > +static int virtio_crypto_alg_ablkcipher_close_session( > > + struct virtio_crypto_ablkcipher_ctx *ctx, > > + int encrypt) > > +{ > > + struct scatterlist outhdr, status_sg, *sgs[2]; > > + unsigned int tmp; > > + struct virtio_crypto_destroy_session_req *destroy_session; > > + struct virtio_crypto *vcrypto = ctx->vcrypto; > > + int err; > > + unsigned int num_out = 0, num_in = 0; > > + > > + spin_lock(&vcrypto->ctrl_...
2016 Nov 22
0
[PATCH v2 2/2] crypto: add virtio-crypto driver
...gt;dec_sess_info.session_id = + le64_to_cpu(vcrypto->input.session_id); + spin_unlock(&ctx->lock); + + kfree(cipher_key); + return 0; +} + +static int virtio_crypto_alg_ablkcipher_close_session( + struct virtio_crypto_ablkcipher_ctx *ctx, + int encrypt) +{ + struct scatterlist outhdr, status_sg, *sgs[2]; + unsigned int tmp; + struct virtio_crypto_destroy_session_req *destroy_session; + struct virtio_crypto *vcrypto = ctx->vcrypto; + int err; + unsigned int num_out = 0, num_in = 0; + + spin_lock(&vcrypto->ctrl_lock); + vcrypto->ctrl_status.status = VIRTIO_CRYPTO_ERR; + /* Pad...
2016 Nov 28
0
[PATCH v3] crypto: add virtio-crypto driver
...gt;dec_sess_info.session_id = + le64_to_cpu(vcrypto->input.session_id); + spin_unlock(&ctx->lock); + + kfree(cipher_key); + return 0; +} + +static int virtio_crypto_alg_ablkcipher_close_session( + struct virtio_crypto_ablkcipher_ctx *ctx, + int encrypt) +{ + struct scatterlist outhdr, status_sg, *sgs[2]; + unsigned int tmp; + struct virtio_crypto_destroy_session_req *destroy_session; + struct virtio_crypto *vcrypto = ctx->vcrypto; + int err; + unsigned int num_out = 0, num_in = 0; + + spin_lock(&vcrypto->ctrl_lock); + vcrypto->ctrl_status.status = VIRTIO_CRYPTO_ERR; + /* Pad...
2016 Nov 29
0
[PATCH v4 1/1] crypto: add virtio-crypto driver
..._info.session_id = + le64_to_cpu(vcrypto->input.session_id); + + spin_unlock(&vcrypto->ctrl_lock); + + kfree(cipher_key); + return 0; +} + +static int virtio_crypto_alg_ablkcipher_close_session( + struct virtio_crypto_ablkcipher_ctx *ctx, + int encrypt) +{ + struct scatterlist outhdr, status_sg, *sgs[2]; + unsigned int tmp; + struct virtio_crypto_destroy_session_req *destroy_session; + struct virtio_crypto *vcrypto = ctx->vcrypto; + int err; + unsigned int num_out = 0, num_in = 0; + + spin_lock(&vcrypto->ctrl_lock); + vcrypto->ctrl_status.status = VIRTIO_CRYPTO_ERR; + /* Pad...
2016 Nov 28
5
[PATCH v3] crypto: add virtio-crypto driver
...gt;input.session_id); > + spin_unlock(&ctx->lock); > + > + kfree(cipher_key); > + return 0; > +} > + > +static int virtio_crypto_alg_ablkcipher_close_session( > + struct virtio_crypto_ablkcipher_ctx *ctx, > + int encrypt) > +{ > + struct scatterlist outhdr, status_sg, *sgs[2]; > + unsigned int tmp; > + struct virtio_crypto_destroy_session_req *destroy_session; > + struct virtio_crypto *vcrypto = ctx->vcrypto; > + int err; > + unsigned int num_out = 0, num_in = 0; > + > + spin_lock(&vcrypto->ctrl_lock); > + vcrypto->ctrl_stat...
2016 Nov 28
5
[PATCH v3] crypto: add virtio-crypto driver
...gt;input.session_id); > + spin_unlock(&ctx->lock); > + > + kfree(cipher_key); > + return 0; > +} > + > +static int virtio_crypto_alg_ablkcipher_close_session( > + struct virtio_crypto_ablkcipher_ctx *ctx, > + int encrypt) > +{ > + struct scatterlist outhdr, status_sg, *sgs[2]; > + unsigned int tmp; > + struct virtio_crypto_destroy_session_req *destroy_session; > + struct virtio_crypto *vcrypto = ctx->vcrypto; > + int err; > + unsigned int num_out = 0, num_in = 0; > + > + spin_lock(&vcrypto->ctrl_lock); > + vcrypto->ctrl_stat...
2016 Dec 01
0
[PATCH v5 1/1] crypto: add virtio-crypto driver
...info.session_id = + le64_to_cpu(vcrypto->input.session_id); + + spin_unlock(&vcrypto->ctrl_lock); + + kzfree(cipher_key); + return 0; +} + +static int virtio_crypto_alg_ablkcipher_close_session( + struct virtio_crypto_ablkcipher_ctx *ctx, + int encrypt) +{ + struct scatterlist outhdr, status_sg, *sgs[2]; + unsigned int tmp; + struct virtio_crypto_destroy_session_req *destroy_session; + struct virtio_crypto *vcrypto = ctx->vcrypto; + int err; + unsigned int num_out = 0, num_in = 0; + + spin_lock(&vcrypto->ctrl_lock); + vcrypto->ctrl_status.status = VIRTIO_CRYPTO_ERR; + /* Pad...
2016 Dec 08
0
[PATCH v6 2/2] crypto: add virtio-crypto driver
...info.session_id = + le64_to_cpu(vcrypto->input.session_id); + + spin_unlock(&vcrypto->ctrl_lock); + + kzfree(cipher_key); + return 0; +} + +static int virtio_crypto_alg_ablkcipher_close_session( + struct virtio_crypto_ablkcipher_ctx *ctx, + int encrypt) +{ + struct scatterlist outhdr, status_sg, *sgs[2]; + unsigned int tmp; + struct virtio_crypto_destroy_session_req *destroy_session; + struct virtio_crypto *vcrypto = ctx->vcrypto; + int err; + unsigned int num_out = 0, num_in = 0; + + spin_lock(&vcrypto->ctrl_lock); + vcrypto->ctrl_status.status = VIRTIO_CRYPTO_ERR; + /* Pad...
2016 Dec 14
0
[PATCH v7 1/1] crypto: add virtio-crypto driver
...info.session_id = + le64_to_cpu(vcrypto->input.session_id); + + spin_unlock(&vcrypto->ctrl_lock); + + kzfree(cipher_key); + return 0; +} + +static int virtio_crypto_alg_ablkcipher_close_session( + struct virtio_crypto_ablkcipher_ctx *ctx, + int encrypt) +{ + struct scatterlist outhdr, status_sg, *sgs[2]; + unsigned int tmp; + struct virtio_crypto_destroy_session_req *destroy_session; + struct virtio_crypto *vcrypto = ctx->vcrypto; + int err; + unsigned int num_out = 0, num_in = 0; + + spin_lock(&vcrypto->ctrl_lock); + vcrypto->ctrl_status.status = VIRTIO_CRYPTO_ERR; + /* Pad...
2016 Dec 15
0
[PATCH v8 1/1] crypto: add virtio-crypto driver
...info.session_id = + le64_to_cpu(vcrypto->input.session_id); + + spin_unlock(&vcrypto->ctrl_lock); + + kzfree(cipher_key); + return 0; +} + +static int virtio_crypto_alg_ablkcipher_close_session( + struct virtio_crypto_ablkcipher_ctx *ctx, + int encrypt) +{ + struct scatterlist outhdr, status_sg, *sgs[2]; + unsigned int tmp; + struct virtio_crypto_destroy_session_req *destroy_session; + struct virtio_crypto *vcrypto = ctx->vcrypto; + int err; + unsigned int num_out = 0, num_in = 0; + + spin_lock(&vcrypto->ctrl_lock); + vcrypto->ctrl_status.status = VIRTIO_CRYPTO_ERR; + /* Pad...
2016 Nov 28
4
[PATCH v3] virtio-crypto: add Linux driver
v3: - set cpu affinity when data queues are not equal to the number of online cpus. [Michael] - add TODO comments for cpu hotplug (changing the relationship of binding virtqueue and cpu) - use __u32/64 in the config space since the virtio->get() doesn't support byte-swap yet. [Michael] - drop the whole patch 1 of v2 because the above reason. - add VERSION_1 check at the beginning of