Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jun 2023 11:19:11 +0100
From:      Mark Murray <markm@FreeBSD.org>
To:        Mark Johnston <markj@FreeBSD.org>
Cc:        "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org>
Subject:   Re: git: 9d5a47e13c17 - main - ossl: Provide a fallback definition of __uint128_t when needed
Message-ID:  <0D94F493-2C78-4604-A6B4-422741929862@FreeBSD.org>
In-Reply-To: <202306041639.354Gdu2O043884@gitrepo.freebsd.org>
References:  <202306041639.354Gdu2O043884@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_07A87620-5DF6-48E5-A683-167AF465984F
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_D2FA5B17-A905-46C3-A53A-3D16FA44BD37"


--Apple-Mail=_D2FA5B17-A905-46C3-A53A-3D16FA44BD37
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hi

I see some duplication here; in sys/dev/random/uint128.h I solved the =
same problem, except I needed some very basic functionality as well. =
Maybe we combine these two somehow?

M
--
Mark R V Murray



> On 4 Jun 2023, at 17:39, Mark Johnston <markj@FreeBSD.org> wrote:
>=20
> The branch main has been updated by markj:
>=20
> URL: =
https://cgit.FreeBSD.org/src/commit/?id=3D9d5a47e13c175adf7486956847c3d060=
fe059f2c
>=20
> commit 9d5a47e13c175adf7486956847c3d060fe059f2c
> Author:     Mark Johnston <markj@FreeBSD.org>
> AuthorDate: 2023-06-02 22:18:05 +0000
> Commit:     Mark Johnston <markj@FreeBSD.org>
> CommitDate: 2023-06-04 16:39:44 +0000
>=20
>    ossl: Provide a fallback definition of __uint128_t when needed
>=20
>    This is required on i386.  The patch has no functional change, =
since
>    AES-GCM isn't implemented for that platform.
>=20
>    Fixes:  9a3444d91c70 ("ossl: Add a VAES-based AES-GCM =
implementation for amd64")
>    Reported by:    Jenkins
> ---
> sys/crypto/openssl/ossl_aes_gcm.h | 4 ++++
> 1 file changed, 4 insertions(+)
>=20
> diff --git a/sys/crypto/openssl/ossl_aes_gcm.h =
b/sys/crypto/openssl/ossl_aes_gcm.h
> index 9ce8ee193483..cd0c1e324354 100644
> --- a/sys/crypto/openssl/ossl_aes_gcm.h
> +++ b/sys/crypto/openssl/ossl_aes_gcm.h
> @@ -49,6 +49,10 @@ struct ossl_aes_gcm_ops {
> 	    size_t len);
> };
>=20
> +#ifndef __SIZEOF_INT128__
> +typedef	struct { uint64_t v[2]; } __uint128_t;
> +#endif
> +
> struct ossl_gcm_context {
> 	struct {
> 		union {
>=20



--
Mark R V Murray


--Apple-Mail=_D2FA5B17-A905-46C3-A53A-3D16FA44BD37
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"overflow-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: =
after-white-space;">Hi<div><br></div><div>I see some duplication here; =
in sys/dev/random/uint128.h I solved the same problem, except I needed =
some very basic functionality as well. Maybe we combine these two =
somehow?</div><div><br></div><div>M</div><div>--&nbsp;<br><div>Mark R V =
Murray
</div>


<br><br><div><br><blockquote type=3D"cite"><div>On 4 Jun 2023, at 17:39, =
Mark Johnston &lt;markj@FreeBSD.org&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div><div>The branch main has been =
updated by markj:<br><br>URL: =
https://cgit.FreeBSD.org/src/commit/?id=3D9d5a47e13c175adf7486956847c3d060=
fe059f2c<br><br>commit =
9d5a47e13c175adf7486956847c3d060fe059f2c<br>Author: =
&nbsp;&nbsp;&nbsp;&nbsp;Mark Johnston =
&lt;markj@FreeBSD.org&gt;<br>AuthorDate: 2023-06-02 22:18:05 =
+0000<br>Commit: &nbsp;&nbsp;&nbsp;&nbsp;Mark Johnston =
&lt;markj@FreeBSD.org&gt;<br>CommitDate: 2023-06-04 16:39:44 =
+0000<br><br> &nbsp;&nbsp;&nbsp;ossl: Provide a fallback definition of =
__uint128_t when needed<br><br> &nbsp;&nbsp;&nbsp;This is required on =
i386. &nbsp;The patch has no functional change, since<br> =
&nbsp;&nbsp;&nbsp;AES-GCM isn't implemented for that platform.<br><br> =
&nbsp;&nbsp;&nbsp;Fixes: &nbsp;9a3444d91c70 ("ossl: Add a VAES-based =
AES-GCM implementation for amd64")<br> &nbsp;&nbsp;&nbsp;Reported by: =
&nbsp;&nbsp;&nbsp;Jenkins<br>---<br> sys/crypto/openssl/ossl_aes_gcm.h | =
4 ++++<br> 1 file changed, 4 insertions(+)<br><br>diff --git =
a/sys/crypto/openssl/ossl_aes_gcm.h =
b/sys/crypto/openssl/ossl_aes_gcm.h<br>index 9ce8ee193483..cd0c1e324354 =
100644<br>--- a/sys/crypto/openssl/ossl_aes_gcm.h<br>+++ =
b/sys/crypto/openssl/ossl_aes_gcm.h<br>@@ -49,6 +49,10 @@ struct =
ossl_aes_gcm_ops {<br> <span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span> &nbsp;&nbsp;&nbsp;size_t =
len);<br> };<br><br>+#ifndef __SIZEOF_INT128__<br>+typedef<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>struct { =
uint64_t v[2]; } __uint128_t;<br>+#endif<br>+<br> struct =
ossl_gcm_context {<br> <span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>struct {<br> <span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>union =
{<br><br></div></div></blockquote></div><br></div><br><br><div>
--&nbsp;<br>Mark R V Murray
</div>
<br></body></html>=

--Apple-Mail=_D2FA5B17-A905-46C3-A53A-3D16FA44BD37--

--Apple-Mail=_07A87620-5DF6-48E5-A683-167AF465984F
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.2
Comment: GPGTools - http://gpgtools.org

iQEzBAEBCgAdFiEEyzPHvybPbOpU9MCxQlsJDh9CUqAFAmR/CB8ACgkQQlsJDh9C
UqBl7gf/Z4/jvJuJ5NKDTmYCotcZU5iwP8+bTkj4FmOnC75+UZZtIz7JbtzTIH6u
qzGWtqe3Mej3xC5rRa0Kyqrr3x9IiPqsbf3eo77z+d4xhP0v9E5INp4WLBJDTouH
AkKtNW766wWO+WQQCwQu8rwWXJgBatV/x9th4M2HVz5OpfM6nLY/Bs0QSHibLmRF
ca/eew3boMRtUSFCcCczAUJraTWvmaUrcOj3BKx+Zm0k2o0+bi9xm7haHl3p0On2
SAkL0noz2uXlArNixaD9NTDJZruFnQVPJL5rKyFxtL1UsDeTW6ybVUdGfMIQ4UwV
gXab/9b6rwTDKHj1v62ojH8Fw4+jTw==
=2XBq
-----END PGP SIGNATURE-----

--Apple-Mail=_07A87620-5DF6-48E5-A683-167AF465984F--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0D94F493-2C78-4604-A6B4-422741929862>