From owner-freebsd-current@FreeBSD.ORG Tue May 18 15:30:40 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AF601065670 for ; Tue, 18 May 2010 15:30:40 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id 9E57D8FC18 for ; Tue, 18 May 2010 15:30:39 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 707E045CA6; Tue, 18 May 2010 17:30:37 +0200 (CEST) Received: from localhost (pdawidek.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 9FE7045C9B; Tue, 18 May 2010 17:30:29 +0200 (CEST) Date: Tue, 18 May 2010 17:30:19 +0200 From: Pawel Jakub Dawidek To: Kostik Belousov Message-ID: <20100518153019.GA1699@garage.freebsd.pl> References: <20100515100401.GT83316@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: <20100515100401.GT83316@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-current@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: AESNI driver and fpu_kern KPI X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2010 15:30:40 -0000 --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 15, 2010 at 01:04:01PM +0300, Kostik Belousov wrote: > Hello, >=20 > please find at http://people.freebsd.org/~kib/misc/aesni.1.patch the > combined patch, containing the fpu_kern KPI and Intel AESNI crypto(9) > driver. I did development and some testing on the hardware generously > provided by Sentex Communications to Netperf cluster. Nice work. Few comments: - Could you modify this chunk in padlock.c: + td =3D curthread; + error =3D fpu_kern_enter(td, &ses->ses_fpu_ctx); + if (error !=3D 0) + goto out; error =3D padlock_hash_setup(ses, macini); + fpu_kern_leave(td, &ses->ses_fpu_ctx); + out: To something without goto, eg.: td =3D curthread; error =3D fpu_kern_enter(td, &ses->ses_fpu_ctx); if (error =3D=3D 0) { error =3D padlock_hash_setup(ses, macini); fpu_kern_leave(td, &ses->ses_fpu_ctx); } - I see that in sys/dev/random/nehemiah.c you don't check for return value of fpu_kern_enter(). That's the only place where you ignore it. Is that intended? - Unfortunately the driver in its current version can't be used with IPsec and with GELI where authentication is enabled. This is because the driver doesn't support sessions where both encryption and authentication is defined. Do you have plans to change it? I saw that you based crypto(9) bits on padlock, which does support sessions with authentication by calculating hashes in software. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --k1lZvvs/B4yU6o8G Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkvysooACgkQForvXbEpPzRgIACgmBAAtggqwnb21MTpF1dI+cAB kawAn17T+DC1JxoO+ECEHnXXGEWnbfiI =iy9u -----END PGP SIGNATURE----- --k1lZvvs/B4yU6o8G--