From owner-freebsd-stable@FreeBSD.ORG Wed Nov 28 19:32:05 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47DD816A41A; Wed, 28 Nov 2007 19:32:05 +0000 (UTC) (envelope-from simon@zaphod.nitro.dk) Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38]) by mx1.freebsd.org (Postfix) with ESMTP id B950813C447; Wed, 28 Nov 2007 19:32:04 +0000 (UTC) (envelope-from simon@zaphod.nitro.dk) Received: from zaphod.nitro.dk (unknown [192.168.3.39]) by mx.nitro.dk (Postfix) with ESMTP id F04342DD0D5; Wed, 28 Nov 2007 19:12:38 +0000 (UTC) Received: by zaphod.nitro.dk (Postfix, from userid 3000) id C434B11458; Wed, 28 Nov 2007 20:12:38 +0100 (CET) Date: Wed, 28 Nov 2007 20:12:38 +0100 From: "Simon L. Nielsen" To: Norikatsu Shigemura Message-ID: <20071128191237.GA1200@zaphod.nitro.dk> References: <20071127092729.189bcbae@titan.flintsbach.schmalzbauer.de> <200711271237.lARCbdMB077950@lava.sentex.ca> <20071129015144.24c67521.nork@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071129015144.24c67521.nork@FreeBSD.org> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Harald Schmalzbauer , freebsd-stable@freebsd.org Subject: Re: cryptodev and ssh on RELENG_7 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2007 19:32:05 -0000 On 2007.11.29 01:51:44 +0900, Norikatsu Shigemura wrote: > On Tue, 27 Nov 2007 07:37:49 -0500 > Mike Tancsa wrote: > > >I have a HiFN crypto card and can remember that it was used for ssh > > >connections with 3des encryption (on 6.1 afair). > > >But with RELENG_7 it isn't used at all (no interrupts) if I > > >'ssh -v -c 3des-cbc user@host' > > >Any ideas what is wrong? > > >dmesg: > > >hifn0 mem > > >0x80000000-0x80000fff,0x80040000-0x80041fff,0x80080000-0x80087fff irq > > >12 at device 13.0 on pci0 hifn0: [ITHREAD] hifn0: Hifn 7955, rev 0, > > >32KB dram, pll=0x801 > > >crw-rw-rw- 1 root wheel - 0, 41 Nov 27 08:13:41 2007 /dev/crypto > > Hi, > > Are you sure you have device crypto and device cryptodev in > > the kernel? Also, there is a program in > > /usr/src/tools/tools/crypto called hifnstats. It will show some > > usuage stats. e.g. > > This issue is one of a gcc42 issue. But gcc42 is not wrong. > OpenSSL has a using __FreeBSD_version issue. So to fix this > issue, you should apply following patch. Actually I just don't see how the code in question could have ever detected FreeBSD correctly, unless the normal OpenSSL build system does some magic for this (which it doesn't seem to). I'm doing "make universe" test builds with the patch below now. I will try test this with actual hardware tomorrow (if I can find it), but it's quite possible I won't have time until Friday to get something set up to test. If somebody else can test the patch below with some crypto hardware that would be great. Thanks for the patch btw. :-). > --- crypto/openssl/crypto/engine/eng_cryptodev.c.orig 2006-07-30 04:10:18.000000000 +0900 > +++ crypto/openssl/crypto/engine/eng_cryptodev.c 2007-11-08 01:55:35.000000000 +0900 > @@ -32,7 +32,7 @@ > #include > > #if (defined(__unix__) || defined(unix)) && !defined(USG) && \ > - (defined(OpenBSD) || defined(__FreeBSD_version)) > + (defined(OpenBSD) || defined(__FreeBSD__)) > #include > # if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041) > # define HAVE_CRYPTODEV > -- Simon L. Nielsen