Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 149483
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Alon Bar-Lev (RETIRED) <alonbl@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: punta <punta@245t.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
bestcrypt-1.6_p7.ebuild bestcrypt-1.6_p7.ebuild text/plain Alon Bar-Lev (RETIRED) 2006-10-11 11:36 0000 3.27 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 149483 depends on: Show dependency tree
Bug 149483 blocks: 148429
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-09-28 21:50 0000
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 From punta 2006-09-28 21:53:29 0000 -------
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 From Stefan Behte 2006-10-04 09:02:14 0000 -------
Did you do "modules-update"? Did you re-emerge bestcrypt after installing the
new kernel?

------- Comment #3 From punta 2006-10-04 15:53:48 0000 -------
(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 From Stefan Behte 2006-10-08 08:23:34 0000 -------
Did you even try the version from the Jetico page?

------- Comment #5 From Stefan Behte 2006-10-11 11:26:05 0000 -------
Well after updating to kernel 2.6.17 I've got the same problem :(

------- Comment #6 From Alon Bar-Lev (RETIRED) 2006-10-11 11:36:12 0000 -------
Created an attachment (id=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 From Stefan Behte 2006-10-11 14:30:57 0000 -------
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 From Alon Bar-Lev (RETIRED) 2006-10-11 14:37:07 0000 -------
Which errors? Invalid module format?

------- Comment #9 From Daniel Drake 2006-10-11 14:46:21 0000 -------
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 From Alon Bar-Lev (RETIRED) 2006-10-11 14:52:41 0000 -------
Daniel, should recompile the kernel with current compiler should solve this?

------- Comment #11 From Daniel Drake 2006-10-11 15:21:32 0000 -------
If the kernel was compiled with the old compiler and the module with new, yes.
Otherwise, no.

------- Comment #12 From Alon Bar-Lev (RETIRED) 2006-10-11 15:56:41 0000 -------
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 From punta 2006-10-12 05:25:18 0000 -------
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 From Alon Bar-Lev (RETIRED) 2006-10-15 12:25:03 0000 -------
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 From Daniel Drake 2006-10-15 12:46:39 0000 -------
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 From Alon Bar-Lev (RETIRED) 2006-10-15 12:52:32 0000 -------
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 From Daniel Drake 2006-10-15 13:24:26 0000 -------
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 From Alon Bar-Lev (RETIRED) 2006-10-15 14:45:56 0000 -------
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 From Daniel Drake 2006-10-15 16:32:42 0000 -------
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 From Alon Bar-Lev (RETIRED) 2006-10-15 22:20:28 0000 -------
#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 From Daniel Drake 2006-10-16 19:15:39 0000 -------
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 From Daniel Drake 2006-10-19 18:38:15 0000 -------
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 From Alon Bar-Lev (RETIRED) 2006-10-20 01:10:19 0000 -------
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 From Daniel Drake 2006-10-20 05:04:10 0000 -------
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 From Alon Bar-Lev (RETIRED) 2006-10-20 07:27:56 0000 -------
Fixed in app-crypt/bestcrypt-1.6_p8, upstream merged our patches and solved
2.6.18.

------- Comment #26 From Daniel Drake 2006-10-20 07:50:55 0000 -------
Reopening as this is not fixed in stable tree

------- Comment #27 From Alon Bar-Lev (RETIRED) 2006-10-20 07:56:12 0000 -------
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 From Daniel Drake 2006-10-20 08:05:19 0000 -------
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 From Alon Bar-Lev (RETIRED) 2006-10-20 08:19:42 0000 -------
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 From Daniel Drake 2006-10-20 08:22:38 0000 -------
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 From Alon Bar-Lev (RETIRED) 2006-10-20 08:32:29 0000 -------
Opened stable request at bug#152123.

------- Comment #32 From Alon Bar-Lev (RETIRED) 2006-10-20 08:33:09 0000 -------
Opened stable request at bug#152123.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug