From owner-freebsd-hackers@freebsd.org Sat Jan 30 23:09:31 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECFAAA73BEF for ; Sat, 30 Jan 2016 23:09:31 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f175.google.com (mail-yk0-f175.google.com [209.85.160.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B896737A; Sat, 30 Jan 2016 23:09:31 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-yk0-f175.google.com with SMTP id r207so65143238ykd.2; Sat, 30 Jan 2016 15:09:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=P2gxJarKHEEGa9tIu5V9I1yBxPlWszEKg1+TnEDKZ1o=; b=eFN1FECQXRYd/HY4MYx2QpWtqlaFwnzT2KRiEQdFWm/qsHBLaUnJ0QtecMdmGB/G3I 5mBDTQKHgep/vpoDM2QOk7uFW5OGZKPoZHWemHrmLTaEb9ixYbneN4UtFqP96viVGcfr CkaC1n3I7ecPrQVEd/i6UAa5f15J7npUKriYAgwAUOxJK6WvBbJYfN3/TKxG/f45FdvO hlco9ZptrafOdmGcy9RGNwrm8bhF8Uv8GCxuvTmmNE6ofVhnBI2z8ll7gTLzMaw3n5/H BFWHh5Wn8jfb1LKuqJRccwNqcyBV5AibOQTlJOWE/quuw07g1U+dVwyID3b4yf/PhYGj iWXA== X-Gm-Message-State: AG10YOSXk8wcc+SxJS0TCI+GWqRF3G24F/j5XmFChi3pRkdYi7mYTDbn9p9d5ynO+1RRqw== X-Received: by 10.37.12.195 with SMTP id 186mr8443305ybm.154.1454194886244; Sat, 30 Jan 2016 15:01:26 -0800 (PST) Received: from mail-yk0-f182.google.com (mail-yk0-f182.google.com. [209.85.160.182]) by smtp.gmail.com with ESMTPSA id u134sm11525343ywf.48.2016.01.30.15.01.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Jan 2016 15:01:26 -0800 (PST) Received: by mail-yk0-f182.google.com with SMTP id z7so35399141yka.3; Sat, 30 Jan 2016 15:01:25 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.37.5.151 with SMTP id 145mr7963399ybf.16.1454194885538; Sat, 30 Jan 2016 15:01:25 -0800 (PST) Reply-To: cem@FreeBSD.org Received: by 10.37.4.23 with HTTP; Sat, 30 Jan 2016 15:01:25 -0800 (PST) In-Reply-To: References: Date: Sat, 30 Jan 2016 15:01:25 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: aesni doesn't play nice with krb5 From: Conrad Meyer To: Alan Somers Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2016 23:09:32 -0000 I have an untested patch to fix this issue: https://reviews.freebsd.org/D5146 . If you have time, please review or test the patch. Thanks, Conrad On Wed, Jan 27, 2016 at 3:55 PM, Alan Somers wrote: > I'm experimenting with Kerberized NFS, but my performance sucks when I > use krb5p. I tracked the problem down to an interaction between aesni > and krb5: aes_set_key in kcrypto_aes.c registers for a crypto session > and requests support for two algorithms: CRYPTO_SHA1_HMAC and > CRYPTO_AES_CBC. aesni(4) supports the latter, but not the former. So > crypto_select_driver returns cryptosoft and krb5 uses software for > both algorithms. > > It's too bad that aesni doesn't support SHA1, but other software like > OpenSSL deals with it by using hardware for AES and software for SHA1. > It seems to me like krb5 could be made to do the same by registering > for two sessions, one for each algorithm. In fact, it seems like it > would be pretty easy to do. The changes would probably be confined > strictly to crypto_aes.c. Is there any reason why this wouldn't work? > > -Alan > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"