On Thu, Sep 26, 2013 at 12:18:34PM +0200, Dominik Paulus wrote:
> > I think a return of zero should mean total = -EBADMSG;. In other words
> > this check should be "if (ret < 0) {" and we hit the next else if.
> > Same below again.
>
> As we are wrapping kernel_recvmsg here, we wanted to leave th
Hi,
thank you very much for your feedback!
On Mon, Sep 23, 2013 at 12:59:29PM +0300, Dan Carpenter wrote:
> > + while (total < size) {
> > + uint32_t packetsize;
> > + struct kvec recvvec;
> > +
> > + /*
> > +* We use a global kfifo to buffer unrequeste
On Thu, Sep 19, 2013 at 04:11:57PM +0200, Dominik Paulus wrote:
> +/*
> + * Perform encryption/decryption on one chunk of data.
> + * Uses global crypto state stored in usbip_device.
> + * Parameters:
> + * encrypt: 1 to perform encryption, 0 to perform decryption operation
Make this a define:
#de
On Thu, Sep 19, 2013 at 04:11:57PM +0200, Dominik Paulus wrote:
> +int usbip_init_crypto(struct usbip_device *ud, unsigned char *sendkey,
> unsigned
> + char *recvkey)
> +{
> + int ret;
> +
> + ud->use_crypto = 1;
> +
> + ud->tfm_recv = crypto_alloc_aead("gcm(aes)", 0, 0);
On Thu, Sep 19, 2013 at 04:11:57PM +0200, Dominik Paulus wrote:
> +int usbip_init_crypto(struct usbip_device *ud, unsigned char *sendkey,
> unsigned
> + char *recvkey)
> +{
> + int ret;
> +
> + ud->use_crypto = 1;
> +
> + ud->tfm_recv = crypto_alloc_aead("gcm(aes)", 0, 0);
This adds code performing the actual encryption and authentication
operations in the usbip kernel code. The whole data stream may now be
encrypted and authenticated with AES-GCM and symmetric 128 bit keys.
Signed-off-by: Dominik Paulus
Signed-off-by: Tobias Polzer
---
drivers/staging/usbip/Kcon