Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 420951 - sys-apps/kmod-8 - kmod doesn't work properly under x32 ABI
Summary: sys-apps/kmod-8 - kmod doesn't work properly under x32 ABI
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://sourceware.org/bugzilla/show_b...
Whiteboard:
Keywords:
Depends on:
Blocks: x32
  Show dependency tree
 
Reported: 2012-06-13 09:10 UTC by Light
Modified: 2012-06-15 14:55 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Light 2012-06-13 09:10:32 UTC
I emerged kmod-8 and gentoo-sources-3.4.0, however, when I issue command lsmod, I only see 
Module                  Size  Used by
then a series(77 lines) of
libkmod: kmod_module_get_holders: could not open '/sys/module//holders': No such file or directory
                          -2  -2 

And I find out in ifconfig there is only lo, so I assume many modules aren't load correctly. When I try to modprobe them myself, I just see Segmentation fault. Then I "borrowed" the working kernel and modules from my amd64 system( it's 3.4.0 and should work), I can enter the x32 system, however the two errors mentioned above still exist., so I can conclude that these two errors have nothing to do with my kernel configuration, but kmod.

Reproducible: Always

Steps to Reproduce:
#1. lsmod
#2. modprobe r8169
Actual Results:  
#1. 77lines of: libkmod: kmod_module_get_holders: could not open '/sys/module//holders': No such file or directory
                          -2  -2 
#2. Segmentation fault

Expected Results:  
#1. should list modules loaded
#2. should load the module
Comment 1 SpanKY gentoo-dev 2012-06-13 16:12:27 UTC
hmm, looks like a glibc problem

$ cat test.c
#include <stdio.h>
#include <string.h>
int main() {
    char line[] = "udf 75868 1 - Live 0xffffffffa0bfb000\n";
    char *saveptr, *tok = strtok_r(line, " \t", &saveptr);
    printf("tok: {%s}\nshould be: {udf}\n", tok);
    return 0;
}

$ gcc test.c -m64 && ./a.out
tok: {udf}
should be: {udf}

$ gcc test.c -mx32 && ./a.out
tok: {}
should be: {udf}
Comment 2 SpanKY gentoo-dev 2012-06-14 18:31:04 UTC
upstream has committed a fix and i pushed it into glibc.  sync up, make sure glibc is using patchset version 17, and then re-emerge glibc.

http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.15/1200_all_glibc-2.15-x32.patch?r1=1.2&r2=1.3
http://sources.gentoo.org/sys-libs/glibc/glibc-2.15-r2.ebuild?r1=1.7&r2=1.8

kmod now works for me:
$ lsmod
Module                  Size  Used by
udf                    75868  0
usb_storage            35339  1
dm_mod                 63508  0
xt_tcpudp               2311  2