Date: Thu, 6 Dec 2018 19:18:19 -0500 From: Jung-uk Kim <jkim@FreeBSD.org> To: John Nielsen <lists@jnielsen.net>, Xin LI <delphij@gmail.com> Cc: FreeBSD Stable <freebsd-stable@freebsd.org> Subject: Re: /dev/crypto not being used in 12-STABLE Message-ID: <fb1a6e23-0fb1-485d-d2b7-60d267d001ea@FreeBSD.org> In-Reply-To: <65a51dc6-7b20-70f3-ad53-8a3d99afbd8b@FreeBSD.org> References: <A418F9A1-7298-4DA7-A185-BD16941BEC46@jnielsen.net> <CAGMYy3vKez_NR6rtcFDGVsWV=qs%2BiaoAwb-D0ed0zT5og9RbOA@mail.gmail.com> <F67BC606-6210-48DD-B924-FF90C26704A1@jnielsen.net> <65a51dc6-7b20-70f3-ad53-8a3d99afbd8b@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --oOzpbl2i7zuMQy3GqzS1mE7eumiM6O8rN Content-Type: multipart/mixed; boundary="LBYCDNGDJ1U1Ktkr0eCpANnh8bg74iwgB"; protected-headers="v1" From: Jung-uk Kim <jkim@FreeBSD.org> To: John Nielsen <lists@jnielsen.net>, Xin LI <delphij@gmail.com> Cc: FreeBSD Stable <freebsd-stable@freebsd.org> Message-ID: <fb1a6e23-0fb1-485d-d2b7-60d267d001ea@FreeBSD.org> Subject: Re: /dev/crypto not being used in 12-STABLE References: <A418F9A1-7298-4DA7-A185-BD16941BEC46@jnielsen.net> <CAGMYy3vKez_NR6rtcFDGVsWV=qs+iaoAwb-D0ed0zT5og9RbOA@mail.gmail.com> <F67BC606-6210-48DD-B924-FF90C26704A1@jnielsen.net> <65a51dc6-7b20-70f3-ad53-8a3d99afbd8b@FreeBSD.org> In-Reply-To: <65a51dc6-7b20-70f3-ad53-8a3d99afbd8b@FreeBSD.org> --LBYCDNGDJ1U1Ktkr0eCpANnh8bg74iwgB Content-Type: multipart/mixed; boundary="------------4DD66C0B0B8C23E8586603B3" Content-Language: en-US This is a multi-part message in MIME format. --------------4DD66C0B0B8C23E8586603B3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 18. 12. 6., Jung-uk Kim wrote: > On 18. 12. 6., John Nielsen wrote: >>> On Dec 6, 2018, at 4:04 PM, Xin LI <delphij@gmail.com> wrote: >>> >>> On Thu, Dec 6, 2018 at 11:37 AM John Nielsen <lists@jnielsen.net> wro= te: >>>> >>>> I have upgraded two physical machines from 11-STABLE to 12-STABLE re= cently (one is 12.0-PRERELEASE r341380 and the other is 12.0-PRERELEASE r= 341391). I noticed today that neither machine seems to be utilizing /dev/= crypto. Typically I see at least ssh/sshd have the device open plus some = programs from ports. But 'fuser' doesn't list any processes on either mac= hine: >>>> >>>> # fuser /dev/crypto >>>> /dev/crypto: >>>> >>>> Both machines are running custom kernels that include "device crypto= " and "device cryptodev". One of them additionally has "device aesni". >>>> >>>> Is anyone else seeing this? Any idea what would cause it? >>> >>> Your average OpenSSL applications should not use /dev/crypto, if your= >>> goal is to utilize AES-NI (which does not require /dev/crypto). On >>> capable systems, AES-NI would be used automatically (and it's faster >>> this way). >> >> Thanks for the response. Is there a way to verify that AES-NI is being= used for e.g. ssh? >> I'm also curious why/when/how the change to not use (or support?) /dev= /crypto from base >> openssl was made. >=20 > OpenSSL 1.1.1 removed the old cryptodev: >=20 > https://svnweb.freebsd.org/base/vendor-crypto/openssl/dist/CHANGES?revi= sion=3D340690&view=3Dmarkup#l400 >=20 > Instead, OpenSSL added devcrypto engine for Linux: >=20 > https://github.com/openssl/openssl/commit/619eb33 >=20 > and added BSD support: >=20 > https://github.com/openssl/openssl/commit/4f79aff >=20 > then, completely removed BSD-specific cryptodev: >=20 > https://github.com/openssl/openssl/commit/f39a550 >=20 > However, it is disabled by default. Theoretically, it is functionally > equivalent but it wasn't tested much. >=20 > I can enable the new engine on head if many users request it. FYI, the attached patch should enable the new engine. Jung-uk Kim --------------4DD66C0B0B8C23E8586603B3 Content-Type: text/x-patch; name="devcrypto.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="devcrypto.diff" Index: secure/lib/libcrypto/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- secure/lib/libcrypto/Makefile (revision 341666) +++ secure/lib/libcrypto/Makefile (working copy) @@ -192,8 +192,8 @@ SRCS+=3D ecp_nistz256-x86.S ecp_nistz256.c .endif =20 # engine -SRCS+=3D eng_all.c eng_cnf.c eng_ctrl.c eng_dyn.c eng_err.c eng_fat.c -SRCS+=3D eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pkey.c +SRCS+=3D eng_all.c eng_cnf.c eng_ctrl.c eng_devcrypto.c eng_dyn.c eng_er= r.c +SRCS+=3D eng_fat.c eng_init.c eng_lib.c eng_list.c eng_openssl.c eng_pke= y.c SRCS+=3D eng_rdrand.c eng_table.c tb_asnmth.c tb_cipher.c tb_dh.c tb_dig= est.c SRCS+=3D tb_dsa.c tb_eckey.c tb_pkmeth.c tb_rand.c tb_rsa.c =20 Index: secure/lib/libcrypto/opensslconf.h.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- secure/lib/libcrypto/opensslconf.h.in (revision 341666) +++ secure/lib/libcrypto/opensslconf.h.in (working copy) @@ -46,9 +46,6 @@ extern "C" { #ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE # define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE #endif -#ifndef OPENSSL_NO_DEVCRYPTOENG -# define OPENSSL_NO_DEVCRYPTOENG -#endif #ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 # define OPENSSL_NO_EC_NISTP_64_GCC_128 #endif --------------4DD66C0B0B8C23E8586603B3-- --LBYCDNGDJ1U1Ktkr0eCpANnh8bg74iwgB-- --oOzpbl2i7zuMQy3GqzS1mE7eumiM6O8rN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAlwJvEsACgkQfJ+WJvzb 8UbsjAgAk3WENN9P4r4KmWisTNwrSHUl/6raF1TBtsyRwv+6TDuL4QQqxnZW7fnJ TZ7wOabLQaG4UELOeiKKryLuwd3wuFLDNoC4SLYDmzQmQig7urY4J23r5LZBgGVT cpYsq9pjQsNvCLtplcpXy8RFqdgWhBClfbUY8+1XexczpTS53+3waBibjqEfd3J4 gp99EgybvcbMxwImWynqzffMyN+11Asdr/FNbaCsyA+/LxDC5g0dEVmMFROVQ63X j7OBSbz1mIuVJrJq8GcajE0bAew2jKqlud2U0Gnfu+w569UYcrk5HjVvRFTZUzRw k0LSNFRrY90zGUsKegd6JL3CAvglqg== =nswm -----END PGP SIGNATURE----- --oOzpbl2i7zuMQy3GqzS1mE7eumiM6O8rN--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fb1a6e23-0fb1-485d-d2b7-60d267d001ea>