From owner-freebsd-bugs@FreeBSD.ORG Mon Feb 28 13:30:11 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30D3F1065687 for ; Mon, 28 Feb 2011 13:30:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E2D408FC28 for ; Mon, 28 Feb 2011 13:30:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p1SDUAcT066656 for ; Mon, 28 Feb 2011 13:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p1SDUALe066653; Mon, 28 Feb 2011 13:30:10 GMT (envelope-from gnats) Resent-Date: Mon, 28 Feb 2011 13:30:10 GMT Resent-Message-Id: <201102281330.p1SDUALe066653@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stefan Grundmann Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0853106567A for ; Mon, 28 Feb 2011 13:24:01 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 854638FC0C for ; Mon, 28 Feb 2011 13:24:01 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p1SDO126080479 for ; Mon, 28 Feb 2011 13:24:01 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p1SDO19K080465; Mon, 28 Feb 2011 13:24:01 GMT (envelope-from nobody) Message-Id: <201102281324.p1SDO19K080465@red.freebsd.org> Date: Mon, 28 Feb 2011 13:24:01 GMT From: Stefan Grundmann To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/155118: geom_eli containers created on systems with aesni(4) enabled are not working on systems without aesni(4) and vice versa. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2011 13:30:11 -0000 >Number: 155118 >Category: kern >Synopsis: geom_eli containers created on systems with aesni(4) enabled are not working on systems without aesni(4) and vice versa. >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Feb 28 13:30:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Stefan Grundmann >Release: FreeBSD 8.2-STABLE >Organization: >Environment: FreeBSD seth 8.2-STABLE FreeBSD 8.2-STABLE #1: Fri Feb 25 13:36:59 UTC 2011 sg@seth:/usr/obj/usr/src/sys/GENERIC amd64 >Description: geom_eli containers created on systems with aesni(4) enabled are not working on systems without aesni(4) and vice versa. i tested this only on amd64 and only for AES-XTC and AES-CBC. The problem might also exists for 3DES-CBC if 3DES hardware crypto is used. If this behavior (incompatibility of "Crypto: hardware" and "Crypto: software" in geom_eli) is known, it shopuld be documented in the geli man page. best regards Stefan Grundmann >How-To-Repeat: seth# mdconfig -a -t malloc -s 8M -u 666 seth# echo -n foobar > /tmp/pass seth# kldunload aesni kldunload: can't find file aesni seth# geli init -J /tmp/pass -i 5 -e AES-XTS -l 256 md666 Metadata backup can be found in /var/backups/md666.eli and can be restored with the following command: # geli restore /var/backups/md666.eli md666 seth# geli attach -j /tmp/pass md666 seth# dd if=/dev/zero of=/dev/md666.eli dd: /dev/md666.eli: end of device 16384+0 records in 16383+0 records out 8388096 bytes transferred in 0.986972 secs (8498818 bytes/sec) seth# dd if=/dev/md666.eli bs=1M | md5 7+1 records in 7+1 records out 8388096 bytes transferred in 0.522124 secs (16065339 bytes/sec) 23a0c69af6b0a448c0372e738ccccbeb seth# geli detach md666 seth# kldload aesni seth# geli attach -j /tmp/pass md666 seth# dd if=/dev/md666.eli bs=1M | md5 7+1 records in 7+1 records out 8388096 bytes transferred in 0.406862 secs (20616562 bytes/sec) a775583473215888a1a02d583b826d50 seth# geli detach md666 seth# seth# kldunload aesni seth# geli attach -j /tmp/pass md666 seth# dd if=/dev/md666.eli bs=1M | md5 7+1 records in 7+1 records out 8388096 bytes transferred in 0.719863 secs (11652348 bytes/sec) 23a0c69af6b0a448c0372e738ccccbeb >Fix: >Release-Note: >Audit-Trail: >Unformatted: