From owner-freebsd-amd64@FreeBSD.ORG Sat Feb 4 18:04:08 2012 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1946106566C for ; Sat, 4 Feb 2012 18:04:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 704E18FC08 for ; Sat, 4 Feb 2012 18:04:07 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q14I423B028159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 4 Feb 2012 20:04:02 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q14I41bV045937; Sat, 4 Feb 2012 20:04:01 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q14I415w045936; Sat, 4 Feb 2012 20:04:01 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 4 Feb 2012 20:04:01 +0200 From: Konstantin Belousov To: Dennis Glatting Message-ID: <20120204180401.GV3283@deviant.kiev.zoral.com.ua> References: <4F2CFFC3.30909@gurgelmail.com> <20120204124952.GK3283@deviant.kiev.zoral.com.ua> <7e0e01cc2b957c417a3f69232b33ebe0@antiszoc.hu> <1328372906.15339.98.camel@btw.pki2.com> <20120204163303.GR3283@deviant.kiev.zoral.com.ua> <1328373505.14163.8.camel@btw.pki2.com> <1328373948.14163.13.camel@btw.pki2.com> <20120204170431.GT3283@deviant.kiev.zoral.com.ua> <1328375448.14163.14.camel@btw.pki2.com> <1328377314.14163.21.camel@btw.pki2.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KNVwDSkw2BjFUkD8" Content-Disposition: inline In-Reply-To: <1328377314.14163.21.camel@btw.pki2.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-amd64@freebsd.org Subject: Re: aesni module with AMD CPUs? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2012 18:04:09 -0000 --KNVwDSkw2BjFUkD8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 04, 2012 at 09:41:54AM -0800, Dennis Glatting wrote: > On Sat, 2012-02-04 at 09:10 -0800, Dennis Glatting wrote: > > > What is written into dmesg after the load ? > > > Try to restart sshd and log into the system over ssh after aesni(4) > > and > > > cryptodev(4) modules are loaded. > >=20 >=20 > Sorry, BD3 is in the process of being updated to pick up the LSI patches > (Thank you LSI and others). >=20 >=20 > On BD3: >=20 >=20 > bd3# kldload aesni > bd3# kldstat | grep -i aesni > 8 1 0xffffffff81768000 1a2b aesni.ko > bd3# /etc/rc.d/sshd restart > Stopping sshd. > Waiting for PIDS: 1832. > Starting sshd. > bd3# >=20 >=20 >=20 > On BTW: >=20 >=20 > btw> ssh -v dennisg@bd3 > OpenSSH_5.4p1_hpn13v11 FreeBSD-20100308, OpenSSL 0.9.8q 2 Dec 2010 > debug1: Reading configuration data /etc/ssh/ssh_config > debug1: Connecting to bd3.pki2.com [192.168.23.22] port 22. > debug1: Connection established. > debug1: identity file /home/dennis_glatting/.ssh/id_rsa type -1 > debug1: identity file /home/dennis_glatting/.ssh/id_rsa-cert type -1 > debug1: identity file /home/dennis_glatting/.ssh/id_dsa type -1 > debug1: identity file /home/dennis_glatting/.ssh/id_dsa-cert type -1 > debug1: Remote protocol version 2.0, remote software version > OpenSSH_5.8p2_hpn13v11 FreeBSD-20110503 > debug1: match: OpenSSH_5.8p2_hpn13v11 FreeBSD-20110503 pat OpenSSH* > debug1: Enabling compatibility mode for protocol 2.0 > debug1: Local version string SSH-2.0-OpenSSH_5.4p1_hpn13v11 > FreeBSD-20100308 > debug1: SSH2_MSG_KEXINIT sent > debug1: SSH2_MSG_KEXINIT received > debug1: kex: server->client aes128-ctr hmac-sha1 none > debug1: kex: client->server aes128-ctr hmac-sha1 none > debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<2048<8192) sent > debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP > debug1: SSH2_MSG_KEX_DH_GEX_INIT sent > debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY > debug1: Host 'bd3.pki2.com' is known and matches the RSA host key. > debug1: Found key in /home/dennis_glatting/.ssh/known_hosts:41 > debug1: ssh_rsa_verify: signature correct > debug1: SSH2_MSG_NEWKEYS sent > debug1: expecting SSH2_MSG_NEWKEYS > debug1: SSH2_MSG_NEWKEYS received > debug1: Roaming not allowed by server > debug1: SSH2_MSG_SERVICE_REQUEST sent > debug1: SSH2_MSG_SERVICE_ACCEPT received > debug1: Authentications that can continue: > publickey,keyboard-interactive > debug1: Next authentication method: publickey > debug1: Trying private key: /home/dennis_glatting/.ssh/id_rsa > debug1: Trying private key: /home/dennis_glatting/.ssh/id_dsa > debug1: Next authentication method: keyboard-interactive > Password: > debug1: Authentication succeeded (keyboard-interactive). > debug1: Final hpn_buffer_size =3D 2097152 > debug1: HPN Disabled: 0, HPN Buffer Size: 2097152 > debug1: channel 0: new [client-session] > debug1: Enabled Dynamic Window Scaling >=20 > debug1: Requesting no-more-sessions@openssh.com > debug1: Entering interactive session. > Last login: Sat Feb 4 09:38:12 2012 from btw.pki2.com > FreeBSD 9.0-STABLE (SMUNI) #2: Sat Feb 4 09:15:42 PST 2012 >=20 > bd3> >=20 >=20 > Back to BD3: >=20 > bd3# dmesg|tail > da9 at mps2 bus 0 scbus4 target 0 lun 0 > da9: Fixed Direct Access SCSI-6 device > da9: 300.000MB/s transfers > da9: Command Queueing enabled > da9: 2384658MB (4883781168 512 byte sectors: 255H 63S/T 304001C) > Trying to mount root from ufs:/dev/gpt/disk0 [rw]... > ZFS filesystem version 5 > ZFS storage pool version 28 > cryptosoft0: on motherboard > aesni0: on motherboard > bd3# >=20 >=20 > bd3# tail /var/log/messages > (snip -- sorry) > Feb 4 09:38:18 bd3 su: dennisg to root on /dev/pts/0 > Feb 4 09:38:22 bd3 kernel: cryptosoft0: on > motherboard > Feb 4 09:38:22 bd3 kernel: aesni0: on motherboard > bd3# >=20 >=20 >=20 > I /assume/ sshd is using the driver. How would I know? Without reading the code and possibly adding some printfs or logs, you cannot. But I do know that sshd prefer /dev/crypto when available, over the usermode algorithm implementation. You can also look at the users of /dev/crypto, using "fuser /dev/crypto" command, and see what that pids are. Overall, from logs you have provide, I think it is safe to claim that AESNI properly attached and working on bulldozer. Also, there is src/tools/tools/crypto, in particular, cryptotest, which I used while developing aesni(4). You would need to learn how to use it, but it would make you 100% certain that AESNI driver working. --KNVwDSkw2BjFUkD8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk8tcxEACgkQC3+MBN1Mb4ijMACgoMG4veMZOg1VAmcIlMZG86iM D7EAn2UVYlaAuD0RUWEe5yEPEu1AFXiP =Zx8C -----END PGP SIGNATURE----- --KNVwDSkw2BjFUkD8--