search for: virtio_crypto_cipher_create_sess

Displaying 20 results from an estimated 36 matches for "virtio_crypto_cipher_create_sess".

2016 Nov 28
1
[PATCH v3] crypto: add virtio-crypto driver
...t; > + >>> > > + memcpy(cipher_key, key, keylen); >>> > > + >>> > > + spin_lock(&vcrypto->ctrl_lock); >>> > > + /* Pad ctrl header */ >>> > > + vcrypto->ctrl.header.opcode = >>> > > + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); >>> > > + vcrypto->ctrl.header.algo = cpu_to_le32(alg); >>> > > + /* Set the default dataqueue id to 0 */ >>> > > + vcrypto->ctrl.header.queue_id = 0; >>> > > + >>> > > + vcrypto->input.status = cpu_to_le32(VIR...
2016 Nov 28
1
[PATCH v3] crypto: add virtio-crypto driver
...t; > + >>> > > + memcpy(cipher_key, key, keylen); >>> > > + >>> > > + spin_lock(&vcrypto->ctrl_lock); >>> > > + /* Pad ctrl header */ >>> > > + vcrypto->ctrl.header.opcode = >>> > > + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); >>> > > + vcrypto->ctrl.header.algo = cpu_to_le32(alg); >>> > > + /* Set the default dataqueue id to 0 */ >>> > > + vcrypto->ctrl.header.queue_id = 0; >>> > > + >>> > > + vcrypto->input.status = cpu_to_le32(VIR...
2016 Nov 17
0
[PATCH] crypto: add virtio-crypto driver
...= encrypt ? VIRTIO_CRYPTO_OP_ENCRYPT : > VIRTIO_CRYPTO_OP_DECRYPT; > + int err; > + unsigned int num_out = 0, num_in = 0; > + > + memset(&ctrl, 0, sizeof(ctrl)); > + memset(&input, 0, sizeof(input)); > + /* Pad ctrl header */ > + ctrl.header.opcode = > cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); > + ctrl.header.algo = cpu_to_le32((uint32_t)alg); > + /* Set the default dataqueue id to 0 */ > + ctrl.header.queue_id = 0; > + > + input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); > + /* Pad cipher's parameters */ > + ctrl.u.sym_create_session.op_type = > + cpu_to_...
2016 Nov 14
3
[PATCH] crypto: add virtio-crypto driver
..._crypto *vcrypto = ctx->vcrypto; + int op = encrypt ? VIRTIO_CRYPTO_OP_ENCRYPT : VIRTIO_CRYPTO_OP_DECRYPT; + int err; + unsigned int num_out = 0, num_in = 0; + + memset(&ctrl, 0, sizeof(ctrl)); + memset(&input, 0, sizeof(input)); + /* Pad ctrl header */ + ctrl.header.opcode = cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + ctrl.header.algo = cpu_to_le32((uint32_t)alg); + /* Set the default dataqueue id to 0 */ + ctrl.header.queue_id = 0; + + input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); + /* Pad cipher's parameters */ + ctrl.u.sym_create_session.op_type = + cpu_to_le32(VIRTIO_CRYPTO_SYM_OP_CIPHER); + ctr...
2016 Nov 14
3
[PATCH] crypto: add virtio-crypto driver
..._crypto *vcrypto = ctx->vcrypto; + int op = encrypt ? VIRTIO_CRYPTO_OP_ENCRYPT : VIRTIO_CRYPTO_OP_DECRYPT; + int err; + unsigned int num_out = 0, num_in = 0; + + memset(&ctrl, 0, sizeof(ctrl)); + memset(&input, 0, sizeof(input)); + /* Pad ctrl header */ + ctrl.header.opcode = cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + ctrl.header.algo = cpu_to_le32((uint32_t)alg); + /* Set the default dataqueue id to 0 */ + ctrl.header.queue_id = 0; + + input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); + /* Pad cipher's parameters */ + ctrl.u.sym_create_session.op_type = + cpu_to_le32(VIRTIO_CRYPTO_SYM_OP_CIPHER); + ctr...
2016 Nov 28
5
[PATCH v3] crypto: add virtio-crypto driver
...t; + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); > + > + if (!cipher_key) > + return -ENOMEM; > + > + memcpy(cipher_key, key, keylen); > + > + spin_lock(&vcrypto->ctrl_lock); > + /* Pad ctrl header */ > + vcrypto->ctrl.header.opcode = > + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); > + vcrypto->ctrl.header.algo = cpu_to_le32(alg); > + /* Set the default dataqueue id to 0 */ > + vcrypto->ctrl.header.queue_id = 0; > + > + vcrypto->input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); > + /* Pad cipher's parameters */ > + vcrypto->ctrl.u.sym_cr...
2016 Nov 28
5
[PATCH v3] crypto: add virtio-crypto driver
...t; + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); > + > + if (!cipher_key) > + return -ENOMEM; > + > + memcpy(cipher_key, key, keylen); > + > + spin_lock(&vcrypto->ctrl_lock); > + /* Pad ctrl header */ > + vcrypto->ctrl.header.opcode = > + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); > + vcrypto->ctrl.header.algo = cpu_to_le32(alg); > + /* Set the default dataqueue id to 0 */ > + vcrypto->ctrl.header.queue_id = 0; > + > + vcrypto->input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); > + /* Pad cipher's parameters */ > + vcrypto->ctrl.u.sym_cr...
2016 Nov 27
2
[PATCH v2 2/2] crypto: add virtio-crypto driver
...like this? Is there code that recovers if this fails? > + > + if (!cipher_key) > + return -ENOMEM; > + > + memcpy(cipher_key, key, keylen); > + > + spin_lock(&vcrypto->ctrl_lock); > + /* Pad ctrl header */ > + vcrypto->ctrl.header.opcode = > + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); > + vcrypto->ctrl.header.algo = cpu_to_le32((uint32_t)alg); why cast here? > + /* Set the default dataqueue id to 0 */ > + vcrypto->ctrl.header.queue_id = 0; > + > + vcrypto->input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); > + /* Pad cipher's parameters */ >...
2016 Nov 27
2
[PATCH v2 2/2] crypto: add virtio-crypto driver
...like this? Is there code that recovers if this fails? > + > + if (!cipher_key) > + return -ENOMEM; > + > + memcpy(cipher_key, key, keylen); > + > + spin_lock(&vcrypto->ctrl_lock); > + /* Pad ctrl header */ > + vcrypto->ctrl.header.opcode = > + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); > + vcrypto->ctrl.header.algo = cpu_to_le32((uint32_t)alg); why cast here? > + /* Set the default dataqueue id to 0 */ > + vcrypto->ctrl.header.queue_id = 0; > + > + vcrypto->input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); > + /* Pad cipher's parameters */ >...
2016 Nov 28
0
[virtio-dev] Re: [PATCH v2 2/2] crypto: add virtio-crypto driver
...> > > + > > + if (!cipher_key) > > + return -ENOMEM; > > + > > + memcpy(cipher_key, key, keylen); > > + > > + spin_lock(&vcrypto->ctrl_lock); > > + /* Pad ctrl header */ > > + vcrypto->ctrl.header.opcode = > > + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); > > + vcrypto->ctrl.header.algo = cpu_to_le32((uint32_t)alg); > > why cast here? > Will change the type of alg at the beginning of definition, remove the cast as well. > > + /* Set the default dataqueue id to 0 */ > > + vcrypto->ctrl.header.queue_id = 0; &gt...
2016 Nov 22
0
[PATCH v2 2/2] crypto: add virtio-crypto driver
...o using + * dynamically-allocated for the key + */ + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); + + if (!cipher_key) + return -ENOMEM; + + memcpy(cipher_key, key, keylen); + + spin_lock(&vcrypto->ctrl_lock); + /* Pad ctrl header */ + vcrypto->ctrl.header.opcode = + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + vcrypto->ctrl.header.algo = cpu_to_le32((uint32_t)alg); + /* Set the default dataqueue id to 0 */ + vcrypto->ctrl.header.queue_id = 0; + + vcrypto->input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); + /* Pad cipher's parameters */ + vcrypto->ctrl.u.sym_create_session.op_type = +...
2016 Nov 28
0
[PATCH v3] crypto: add virtio-crypto driver
...o using + * dynamically-allocated for the key + */ + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); + + if (!cipher_key) + return -ENOMEM; + + memcpy(cipher_key, key, keylen); + + spin_lock(&vcrypto->ctrl_lock); + /* Pad ctrl header */ + vcrypto->ctrl.header.opcode = + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + vcrypto->ctrl.header.algo = cpu_to_le32(alg); + /* Set the default dataqueue id to 0 */ + vcrypto->ctrl.header.queue_id = 0; + + vcrypto->input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); + /* Pad cipher's parameters */ + vcrypto->ctrl.u.sym_create_session.op_type = + cpu_to_le...
2016 Nov 29
0
[PATCH v4 1/1] crypto: add virtio-crypto driver
...o using + * dynamically-allocated for the key + */ + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); + + if (!cipher_key) + return -ENOMEM; + + memcpy(cipher_key, key, keylen); + + spin_lock(&vcrypto->ctrl_lock); + /* Pad ctrl header */ + vcrypto->ctrl.header.opcode = + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + vcrypto->ctrl.header.algo = cpu_to_le32(alg); + /* Set the default dataqueue id to 0 */ + vcrypto->ctrl.header.queue_id = 0; + + vcrypto->input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); + /* Pad cipher's parameters */ + vcrypto->ctrl.u.sym_create_session.op_type = + cpu_to_le...
2016 Dec 01
0
[PATCH v5 1/1] crypto: add virtio-crypto driver
...o using + * dynamically-allocated for the key + */ + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); + + if (!cipher_key) + return -ENOMEM; + + memcpy(cipher_key, key, keylen); + + spin_lock(&vcrypto->ctrl_lock); + /* Pad ctrl header */ + vcrypto->ctrl.header.opcode = + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + vcrypto->ctrl.header.algo = cpu_to_le32(alg); + /* Set the default dataqueue id to 0 */ + vcrypto->ctrl.header.queue_id = 0; + + vcrypto->input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); + /* Pad cipher's parameters */ + vcrypto->ctrl.u.sym_create_session.op_type = + cpu_to_le...
2016 Dec 08
0
[PATCH v6 2/2] crypto: add virtio-crypto driver
...o using + * dynamically-allocated for the key + */ + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); + + if (!cipher_key) + return -ENOMEM; + + memcpy(cipher_key, key, keylen); + + spin_lock(&vcrypto->ctrl_lock); + /* Pad ctrl header */ + vcrypto->ctrl.header.opcode = + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + vcrypto->ctrl.header.algo = cpu_to_le32(alg); + /* Set the default dataqueue id to 0 */ + vcrypto->ctrl.header.queue_id = 0; + + vcrypto->input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); + /* Pad cipher's parameters */ + vcrypto->ctrl.u.sym_create_session.op_type = + cpu_to_le...
2016 Dec 14
0
[PATCH v7 1/1] crypto: add virtio-crypto driver
...o using + * dynamically-allocated for the key + */ + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); + + if (!cipher_key) + return -ENOMEM; + + memcpy(cipher_key, key, keylen); + + spin_lock(&vcrypto->ctrl_lock); + /* Pad ctrl header */ + vcrypto->ctrl.header.opcode = + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + vcrypto->ctrl.header.algo = cpu_to_le32(alg); + /* Set the default dataqueue id to 0 */ + vcrypto->ctrl.header.queue_id = 0; + + vcrypto->input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); + /* Pad cipher's parameters */ + vcrypto->ctrl.u.sym_create_session.op_type = + cpu_to_le...
2016 Dec 15
0
[PATCH v8 1/1] crypto: add virtio-crypto driver
...o using + * dynamically-allocated for the key + */ + uint8_t *cipher_key = kmalloc(keylen, GFP_ATOMIC); + + if (!cipher_key) + return -ENOMEM; + + memcpy(cipher_key, key, keylen); + + spin_lock(&vcrypto->ctrl_lock); + /* Pad ctrl header */ + vcrypto->ctrl.header.opcode = + cpu_to_le32(VIRTIO_CRYPTO_CIPHER_CREATE_SESSION); + vcrypto->ctrl.header.algo = cpu_to_le32(alg); + /* Set the default dataqueue id to 0 */ + vcrypto->ctrl.header.queue_id = 0; + + vcrypto->input.status = cpu_to_le32(VIRTIO_CRYPTO_ERR); + /* Pad cipher's parameters */ + vcrypto->ctrl.u.sym_create_session.op_type = + cpu_to_le...
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
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
2016 Dec 08
4
[PATCH v6 0/2] virtio-crypto: add Linux driver
v6: - add patch 1/2 to make sparc architecture happy. [Sam] - close created sessions previousely when rekeying. - convert the priority of virtio crypto algs from 4001 to 501 which is enough. v5: - add comments for algs_lock and table_lock. [Stefan] - use kzfree instead of kfree for key material security. [Stefan] - drop unnecessary spin_lock for struct virtio_crypto_ablkcipher_ctx. -