Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 149483 - app-crypt/bestcrypt-1.6_p5 (stable version) doesn't work with 2.6.18
Summary: app-crypt/bestcrypt-1.6_p5 (stable version) doesn't work with 2.6.18
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Alon Bar-Lev (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 148429
  Show dependency tree
 
Reported: 2006-09-28 21:50 UTC by punta
Modified: 2006-10-20 08:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
bestcrypt-1.6_p7.ebuild (bestcrypt-1.6_p7.ebuild,3.27 KB, text/plain)
2006-10-11 11:36 UTC, Alon Bar-Lev (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description punta 2006-09-28 21:50:48 UTC
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
Comment 1 punta 2006-09-28 21:53:29 UTC
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

Comment 2 Stefan Behte (RETIRED) gentoo-dev Security 2006-10-04 09:02:14 UTC
Did you do "modules-update"? Did you re-emerge bestcrypt after installing the new kernel?
Comment 3 punta 2006-10-04 15:53:48 UTC
(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 :)
Comment 4 Stefan Behte (RETIRED) gentoo-dev Security 2006-10-08 08:23:34 UTC
Did you even try the version from the Jetico page?
Comment 5 Stefan Behte (RETIRED) gentoo-dev Security 2006-10-11 11:26:05 UTC
Well after updating to kernel 2.6.17 I've got the same problem :(
Comment 6 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-11 11:36:12 UTC
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
Comment 7 Stefan Behte (RETIRED) gentoo-dev Security 2006-10-11 14:30:57 UTC
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.
Comment 8 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-11 14:37:07 UTC
Which errors? Invalid module format?
Comment 9 Daniel Drake (RETIRED) gentoo-dev 2006-10-11 14:46:21 UTC
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.
Comment 10 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-11 14:52:41 UTC
Daniel, should recompile the kernel with current compiler should solve this?
Comment 11 Daniel Drake (RETIRED) gentoo-dev 2006-10-11 15:21:32 UTC
If the kernel was compiled with the old compiler and the module with new, yes. Otherwise, no.
Comment 12 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-11 15:56:41 UTC
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.
Comment 13 punta 2006-10-12 05:25:18 UTC
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
Comment 14 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-15 12:25:03 UTC
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?
Comment 15 Daniel Drake (RETIRED) gentoo-dev 2006-10-15 12:46:39 UTC
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.
Comment 16 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-15 12:52:32 UTC
Thank you Daniel,

I am using 2.6.18, installed a new Gentoo especially for this one.
Modules are loaded correctly.
Any more ideas?

Comment 17 Daniel Drake (RETIRED) gentoo-dev 2006-10-15 13:24:26 UTC
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.
Comment 18 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-15 14:45:56 UTC
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);
Comment 19 Daniel Drake (RETIRED) gentoo-dev 2006-10-15 16:32:42 UTC
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.
Comment 20 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-15 22:20:28 UTC
#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
Comment 21 Daniel Drake (RETIRED) gentoo-dev 2006-10-16 19:15:39 UTC
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...
Comment 22 Daniel Drake (RETIRED) gentoo-dev 2006-10-19 18:38:15 UTC
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.
Comment 23 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-20 01:10:19 UTC
Upstream is aware, are you sure you want to fail if SMP? It does not solve the problem, maybe a warning will do?
Comment 24 Daniel Drake (RETIRED) gentoo-dev 2006-10-20 05:04:10 UTC
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.
Comment 25 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-20 07:27:56 UTC
Fixed in app-crypt/bestcrypt-1.6_p8, upstream merged our patches and solved 2.6.18.
Comment 26 Daniel Drake (RETIRED) gentoo-dev 2006-10-20 07:50:55 UTC
Reopening as this is not fixed in stable tree
Comment 27 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-20 07:56:12 UTC
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?
Comment 28 Daniel Drake (RETIRED) gentoo-dev 2006-10-20 08:05:19 UTC
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 :)
Comment 29 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-20 08:19:42 UTC
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.
Comment 30 Daniel Drake (RETIRED) gentoo-dev 2006-10-20 08:22:38 UTC
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
Comment 31 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-20 08:32:29 UTC
Opened stable request at bug#152123.
Comment 32 Alon Bar-Lev (RETIRED) gentoo-dev 2006-10-20 08:33:09 UTC
Opened stable request at bug#152123.