On Mon, Dec 01, 2008 at 04:28:49PM -0800, Shasi Pulijala ([EMAIL PROTECTED]) 
wrote:
> This Openssl patch is the version 3 which incorporates some changes suggested 
> by the Linux Crypto Maintainer. Openssl still needs to be patched with OCF 
> first to use the linux cryptodev interface. The major changes in this patch 
> include:
> 
> 1) Addition of a header file that defines the crypto and hash algorithm/modes 
> as a bitmap.
> 2) The structures session_op and crypt_op need to be included from the linux 
> kernel headers.

There are other problems mentioned prviously which were not included
here: http://marc.info/?l=linux-crypto-vger&m=122727693310351&w=2

>  /* NB: deprecated */
> +#ifndef CRYPTODEV_LINUX
>  struct session_op {
>       u_int32_t       cipher;         /* ie. CRYPTO_DES_CBC */
>       u_int32_t       mac;            /* ie. CRYPTO_MD5_HMAC */
> @@ -187,8 +189,9 @@
>       int             mackeylen;      /* mac key */
>       caddr_t         mackey;

If this strcuture is shared between kernelspace and userspace things are
very broken: pointer types may have different sizes in kernel and
userspace.

> -     u_int32_t       ses;            /* returns: session # */ 
> +     u_int32_t       ses;            /* returns: session # */
> };
> +#endif
>  
>  struct session2_op {
>       u_int32_t       cipher;         /* ie. CRYPTO_DES_CBC */
> @@ -199,11 +202,12 @@
>       int             mackeylen;      /* mac key */
>       caddr_t         mackey;

The same.

> -     u_int32_t       ses;            /* returns: session # */
> +     u_int32_t       ses;            /* returns: session # */
>       int             crid;           /* driver id + flags (rw) */
>       int             pad[4];         /* for future expansion */
> };
>  
> +#ifndef CRYPTODEV_LINUX
>  struct crypt_op {
>       u_int32_t       ses;
>       u_int16_t       op;             /* i.e. COP_ENCRYPT */
> @@ -217,7 +221,7 @@
>       caddr_t         mac;            /* must be big enough for chosen MAC */
>       caddr_t         iv;

The same.

Please provide full patch next time, it is hard to tell if there are
other problem places without looking at the code.

-- 
        Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to