The following script works fine under the 2.6.18-r3 kernel, but fails under kernel 2.6.19-r1. #!/bin/bash losetup /dev/loop0 /space/.pgfile sleep 1 cryptsetup create pg /dev/loop0 sleep 1 mount /dev/mapper/pg /space/.pg The error I get in /var/log/messages is: Dec 3 16:36:05 monster device-mapper: table: 254:0: crypt: Error allocating crypto tfm Dec 3 16:36:05 monster device-mapper: ioctl: error adding target to table Dec 3 16:36:05 monster device-mapper: ioctl: device doesn't appear to be in the dev hash table. monster ~ # emerge --info Portage 2.1.1-r2 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r4, 2.6.19-gentoo-r1 x86_64) ================================================================= System uname: 2.6.19-gentoo-r1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ Gentoo Base System version 1.12.6 Last Sync: Sun, 03 Dec 2006 15:30:01 +0000 app-admin/eselect-compiler: [Not Present] dev-java/java-config: [Not Present] dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.60 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r4 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=k8 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X alsa berkdb bitmap-fonts cdr cli cracklib crypt dlloader dri dvd dvdr elibc_glibc gdbm gpm gtk iconv input_devices_keyboard input_devices_mouse insecure-drivers isdnlog jpeg kde kernel_linux libg++ lirc_devices_uirt2 logrotate mmx2 mp3 nas ncurses nls nptl nptlonly opengl pam paste64 pcre perl png ppds pppd python qt readline reflection sdk session spl ssl svg tcpd tiff truetype-fonts type1-fonts udev unicode userland_GNU video_cards_radeon vorbis wmf xorg zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Created attachment 103297 [details] my .config file for kernel 2.6.19-r1
Created attachment 103298 [details] my .config file for 2.6.18-r3
Same error here: $ sudo cryptsetup luksOpen /dev/hda8 crypt Enter LUKS passphrase: Failed to setup dm-crypt key mapping. Check kernel for support for the aes-cbc-plain cipher spec and verify that /dev/hda8 contains at least 261 sectors. Failed to read from key storage dmesg: device-mapper: ioctl: 4.10.0-ioctl (2006-09-14) initialised: dm-devel@redhat.com device-mapper: table: 254:0: crypt: Error allocating crypto tfm device-mapper: ioctl: error adding target to table device-mapper: ioctl: device doesn't appear to be in the dev hash table. The modules dm-crypt, sha1 and aes-i586 are loaded.
Is this on an amd64 platform as well? Also I tried this on the 2.6.19-r2 kernel as well, same result. (In reply to comment #3) > Same error here: > > $ sudo cryptsetup luksOpen /dev/hda8 crypt > Enter LUKS passphrase: > Failed to setup dm-crypt key mapping. > Check kernel for support for the aes-cbc-plain cipher spec and verify that > /dev/hda8 contains at least 261 sectors. > Failed to read from key storage > > > dmesg: > > device-mapper: ioctl: 4.10.0-ioctl (2006-09-14) initialised: > dm-devel@redhat.com > device-mapper: table: 254:0: crypt: Error allocating crypto tfm > device-mapper: ioctl: error adding target to table > device-mapper: ioctl: device doesn't appear to be in the dev hash table. > > > The modules dm-crypt, sha1 and aes-i586 are loaded. >
(In reply to comment #4) > Is this on an amd64 platform as well? > Also I tried this on the 2.6.19-r2 kernel as well, same result. > No, x86, vanilla-sources-2.6.19.1. emerge --info: (the kernel is the old one, until this bug is solved) Portage 2.1.2_rc3-r5 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.17.13 i686) ================================================================= System uname: 2.6.17.13 i686 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.12.7 Last Sync: Sat, 16 Dec 2006 12:30:04 +0000 dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.4.4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.UTF-8" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/overlays/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowext X a52 aac acpi aiglx alsa alsa_cards_emu10k1 berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups dbus dlloader dri dts dvd dvdr elibc_glibc emboss encode fam fbcon ffmpeg firefox flac fortran gdbm gif glade glitz gnome gpm gstreamer gtk hal iconv input_devices_evdev input_devices_keyboard ipv6 isdnlog joystick jpeg kernel_linux libg++ lirc lirc_devices_cph06x mad matroska mikmod mmx mmxext mp3 mpeg musepack ncurses nls nptl nptlonly nvidia ogg opengl pam pcre pdf perl png ppds pppd python quicktime rar readline real reflection session spell spl sse sse2 ssl subversion svg tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU userlocales v4l v4l2 video_cards_nvidia vorbis win32codecs x264 xcomposite xml xorg xpm xv xvid zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
It seems that now you need CBC support in the kernel (in Cryptographic options). I added it as advised in a thread in FGO and everything works as before.
thanks for the report, new warning added in cvs.