lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 10 Feb 2022 09:21:13 +0000
From:   "Gonglei (Arei)" <arei.gonglei@...wei.com>
To:     zhenwei pi <pizhenwei@...edance.com>
CC:     "jasowang@...hat.com" <jasowang@...hat.com>,
        "virtualization@...ts.linux-foundation.org" 
        <virtualization@...ts.linux-foundation.org>,
        "linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "helei.sig11@...edance.com" <helei.sig11@...edance.com>,
        "mst@...hat.com" <mst@...hat.com>
Subject: RE: RE: [PATCH 2/3] virtio-crypto: introduce akcipher service



> -----Original Message-----
> From: zhenwei pi [mailto:pizhenwei@...edance.com]
> Sent: Thursday, February 10, 2022 4:18 PM
> To: Gonglei (Arei) <arei.gonglei@...wei.com>
> Cc: jasowang@...hat.com; virtualization@...ts.linux-foundation.org;
> linux-crypto@...r.kernel.org; linux-kernel@...r.kernel.org;
> helei.sig11@...edance.com; mst@...hat.com
> Subject: Re: RE: [PATCH 2/3] virtio-crypto: introduce akcipher service
> 
> >>   /* The accelerator hardware is ready */  #define
> >> VIRTIO_CRYPTO_S_HW_READY  (1 << 0) @@ -442,6 +520,7 @@ struct
> >> virtio_crypto_config {
> >>   	__le32 reserve;
> >>   	/* Maximum size of each crypto request's content */
> >>   	__le64 max_size;
> >> +	__le32 akcipher_algo;
> >>   };
> >>
> > You can use the reserve attribute. Keeping 64-bit aligned.
> >
> >>   struct virtio_crypto_inhdr {
> >> --
> >> 2.25.1
> >
> 
> Can I use the "__le32 reserve;" field directly?
> 
> struct virtio_crypto_config {
>          /* See VIRTIO_CRYPTO_OP_* above */
>          __le32  status;
> 
>          /*
>           * Maximum number of data queue
>           */
>          __le32  max_dataqueues;
> 
>          /*
>           * Specifies the services mask which the device support,
>           * see VIRTIO_CRYPTO_SERVICE_* above
>           */
>          __le32 crypto_services;
> 
>          /* Detailed algorithms mask */
>          __le32 cipher_algo_l;
>          __le32 cipher_algo_h;
>          __le32 hash_algo;
>          __le32 mac_algo_l;
>          __le32 mac_algo_h;
>          __le32 aead_algo;
>          /* Maximum length of cipher key */
>          __le32 max_cipher_key_len;
>          /* Maximum length of authenticated key */
>          __le32 max_auth_key_len;
>          __le32 reserve;            -->    __le32 akcipher_algo;
>          /* Maximum size of each crypto request's content */
>          __le64 max_size;
> };
> 


Yes, I think so. Otherwise you will add other reserved field :(

Regards,
-Gonglei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ