BestCrypt-1.6-5.tar.gz Modules fail to load when starting /etc/init.d/bcrypt: Initializing BestCrypt. FATAL: Error inserting bc (/lib/modules/2.6.18/block/bc.ko): Invalid module format WARNING: Error inserting bc (/lib/modules/2.6.18/block/bc.ko): Invalid module format FATAL: Error inserting bc_blowfish (/lib/modules/2.6.18/block/bc_blowfish.ko): Invalid module format WARNING: Error inserting bc (/lib/modules/2.6.18/block/bc.ko): Invalid module format FATAL: Error inserting bc_des (/lib/modules/2.6.18/block/bc_des.ko): Invalid module format WARNING: Error inserting bc (/lib/modules/2.6.18/block/bc.ko): Invalid module format FATAL: Error inserting bc_gost (/lib/modules/2.6.18/block/bc_gost.ko): Invalid module format WARNING: Error inserting bc (/lib/modules/2.6.18/block/bc.ko): Invalid module format FATAL: Error inserting bc_twofish (/lib/modules/2.6.18/block/bc_twofish.ko): Invalid module format WARNING: Error inserting bc (/lib/modules/2.6.18/block/bc.ko): Invalid module format FATAL: Error inserting bc_bf448 (/lib/modules/2.6.18/block/bc_bf448.ko): Invalid module format WARNING: Error inserting bc (/lib/modules/2.6.18/block/bc.ko): Invalid module format FATAL: Error inserting bc_bf128 (/lib/modules/2.6.18/block/bc_bf128.ko): Invalid module format WARNING: Error inserting bc (/lib/modules/2.6.18/block/bc.ko): Invalid module format FATAL: Error inserting bc_3des (/lib/modules/2.6.18/block/bc_3des.ko): Invalid module format WARNING: Error inserting bc (/lib/modules/2.6.18/block/bc.ko): Invalid module format FATAL: Error inserting bc_idea (/lib/modules/2.6.18/block/bc_idea.ko): Invalid module format WARNING: Error inserting bc (/lib/modules/2.6.18/block/bc.ko): Invalid module format FATAL: Error inserting bc_rijn (/lib/modules/2.6.18/block/bc_rijn.ko): Invalid module format WARNING: Error inserting bc (/lib/modules/2.6.18/block/bc.ko): Invalid module format FATAL: Error inserting bc_cast (/lib/modules/2.6.18/block/bc_cast.ko): Invalid module format
localhost punta # emerge --info Portage 2.1.1 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.18 i686) ================================================================= System uname: 2.6.18 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz Gentoo Base System version 1.12.5 Last Sync: Thu, 28 Sep 2006 09:00:01 +0000 app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.2.11-r1 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.59-r7 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-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.ii.net/pub/Gentoo/" LINGUAS="" 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/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aac aalib aavm alsa berkdb bindist bitmap-fonts cairo cdr cli crypt cups dbus dga directfb dlloader dri dvb dvd dvdr elibc_glibc emboss encode esd evms2 evo fam fbcon firefox fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal innodb input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog java jpeg kde kernel_linux ldap libg++ mad mikmod mmx mmx2 mp3 mpeg mysql ncurses nls nptl nptlonly ogg opengl oss pam pcre perl php png ppds pppd python qt3 qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl svga tcltk tcpd tiff tk truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo vorbis win32codecs xml xmms xorg xv zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Did you do "modules-update"? Did you re-emerge bestcrypt after installing the new kernel?
(In reply to comment #2) > Did you do "modules-update"? Did you re-emerge bestcrypt after installing the > new kernel? > yes, I have tried everything :)
Did you even try the version from the Jetico page?
Well after updating to kernel 2.6.17 I've got the same problem :(
Created attachment 99377 [details] bestcrypt-1.6_p7.ebuild Please try the following ebuild. It is the most recent version from upstream. mkdir -p /usr/local/portage/app-crypt cp -a /usr/portage/app-crypt/bestcrypt /usr/local/portage/app-crypt cd /usr/local/portage/app-crypt/bestcrypt <put the new ebuild here> ebuild bestcrypt-1.6_p7.ebuild digest emerge --update bestcrypt
emerge --update bestcrypt didn't work so I did ebuild bestcrypt-1.6_p7.ebuild merge which worked fine. But the errors are still the same.
Which errors? Invalid module format?
Please look for more errors at the end of "dmesg" after trying to load the module. Chances are it's just a compiler mismatch or something.
Daniel, should recompile the kernel with current compiler should solve this?
If the kernel was compiled with the old compiler and the module with new, yes. Otherwise, no.
The new version was added to portage. From source it seems that it should support 2.6.18. But I need confirmation. Please try to recompile your kernel with current compiler setting, then re-emerge bestcrypt.
same with the new version after a recompiled kernel. dmesg reports: bc: Unknown symbol tasklist_lock bc: Unknown symbol tasklist_lock "bc_blowfish": Unknown symbol unregister_bc_algo "bc_blowfish": Unknown symbol register_bc_algo bc: Unknown symbol tasklist_lock "bc_des": Unknown symbol unregister_bc_algo "bc_des": Unknown symbol register_bc_algo bc: Unknown symbol tasklist_lock "bc_gost": Unknown symbol unregister_bc_algo "bc_gost": Unknown symbol register_bc_algo bc: Unknown symbol tasklist_lock "bc_twofish": Unknown symbol unregister_bc_algo "bc_twofish": Unknown symbol register_bc_algo bc: Unknown symbol tasklist_lock "bc_bf448": Unknown symbol unregister_bc_algo "bc_bf448": Unknown symbol register_bc_algo bc: Unknown symbol tasklist_lock "bc_bf128": Unknown symbol unregister_bc_algo "bc_bf128": Unknown symbol register_bc_algo bc: Unknown symbol tasklist_lock "bc_3des": Unknown symbol unregister_bc_algo "bc_3des": Unknown symbol register_bc_algo bc: Unknown symbol tasklist_lock "bc_idea": Unknown symbol unregister_bc_algo "bc_idea": Unknown symbol register_bc_algo bc: Unknown symbol tasklist_lock "bc_rijn": Unknown symbol unregister_bc_algo "bc_rijn": Unknown symbol register_bc_algo bc: Unknown symbol tasklist_lock "bc_cast": Unknown symbol unregister_bc_algo "bc_cast": Unknown symbol register_bc_algo
Works for me. I've installed a test machine, compiled a kernel, emerged bestcrypt and modules successfully loaded. After compiling the new kernel did you emerge --oneshot bestcrypt?
I don't think that is possible, unless you are talking about some kernel other than 2.6.18, or if comment #13 was referring to an older version of the module. The tasklist_lock symbol has been removed in 2.6.18 so there's no way this module will load if it refers to that. Haven't checked the other symbols, this is just one that jumps out at me.
Thank you Daniel, I am using 2.6.18, installed a new Gentoo especially for this one. Modules are loaded correctly. Any more ideas?
You could look at the source to confirm that the latest bestcrypt does *not* refer to tasklist_lock when compiled for 2.6.18. That might indiciate whether the correct version of bestcrypt was being tested in comment #13.
You are right! CONFIG_SMP causes the module to use this symbol. What is the replacement? write_lock_irq(&tasklist_lock); write_unlock_irq(&tasklist_lock);
Depends on the context. Doing the operation under RCU might be a suitable alternative, depending on which structures are being accessed in the critical section.
#ifdef CONFIG_SMP write_lock_irq(&tasklist_lock); #endif for (i = 0; i < bc_pid_next; i++) { if (NULL == find_task_by_pid(bc_pid_table[i])) { bc_pid_next--; if (bc_pid_next) bc_pid_table[i] = bc_pid_table[bc_pid_next]; bc_pid_table[bc_pid_next] = 0; i--; } } #ifdef CONFIG_SMP write_unlock_irq(&tasklist_lock); #endif
The tasklist lock is needed due to the find_task_by_pid() call I cannot find any exported functions which access the tasklist in a locked manner. There may be other kernel functions which can tell you whether a process exists or not, but I'm not sure. This kind of thing should be done in userspace...
For now this ebuild should probably be modified to bail out on 2.6.18 if CONFIG_SMP is set. Please also ensure upstream are aware of this issue.
Upstream is aware, are you sure you want to fail if SMP? It does not solve the problem, maybe a warning will do?
If there is only a warning, the merge will complete and they will be unable to load the module, right? Unless I'm missing something, bailing out would be more sensible here, rather than installing broken stuff.
Fixed in app-crypt/bestcrypt-1.6_p8, upstream merged our patches and solved 2.6.18.
Reopening as this is not fixed in stable tree
How can I fix it in stable tree, while it has not been tested for X weeks? Also, there is no point in opening so many bugs this way, a stable request should be opened, right?
We backport the fix, which should be just a small patch, or if its not we modify the stable tree ebuild to bail out on 2.6.18 with a message suggesting the unstable version. I'll look at backporting this later today unless someone beats me to it :)
The major difference between 5 and 8 is 2.6.18... http://www.jetico.com/linux/bcrypt-help/l_chang.htm The: /dev/bcrypt devices used by mounted containers are protected. Seems simple enough. I don't see any reason to backport.
It's your choice, if the diff of changes really only is 2.6.18 support then you can file a bug to get it marked stable
Opened stable request at bug#152123.