Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I was trying to load a module using insmod, but the module did not load, as the size of the module was too big. Is there any limit to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie rinjo's Avatar
    Join Date
    Feb 2007
    Location
    Bangalore, India
    Posts
    228

    Red face changing the kernel loadable module size


    Hi,

    I was trying to load a module using insmod, but the module did not load, as the size of the module was too big.
    Is there any limit to the size of kernel module that can be loaded onto Linux?
    If there is, is there any way to changing this limit?

    Any pointers will be highly appreciated.

    --Rinjo
    Linux Rocks!!!!
    -- Rinjo
    Setup: Oses: Windows 7 HB and Fedora 17 dual boot Hardware: HP Pavilion G6-2005AX laptop, AMD A8 Quad Core, 4 GB RAM, 1.5 GB dual Graphics card, 500GB HDD.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    Did you build the module with debugging enabled? This is the most common reason for this error. If you want it to be debuggable, you have to build the entire kernel and all related modules as debuggable as well (flags CONFIG_DEBUG_INFO and CONFIG_DEBUG_KERNEL enabled). Otherwise, just build your module without debugging info and it will probably shrink to where the kernel is happy to load it.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Newbie rinjo's Avatar
    Join Date
    Feb 2007
    Location
    Bangalore, India
    Posts
    228
    Thanks Rubberman.
    Yes, I was trying to place the module in a kernel that was not build with debug on. I will build the kernel in debug mode and they try and insert the module.
    And now I am bit inquisitive... Is there some configurable kernel parameter that decides what is the max size of kernel module that can be inserted?
    Linux Rocks!!!!
    -- Rinjo
    Setup: Oses: Windows 7 HB and Fedora 17 dual boot Hardware: HP Pavilion G6-2005AX laptop, AMD A8 Quad Core, 4 GB RAM, 1.5 GB dual Graphics card, 500GB HDD.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    Quote Originally Posted by rinjo View Post
    Thanks Rubberman.
    Yes, I was trying to place the module in a kernel that was not build with debug on. I will build the kernel in debug mode and they try and insert the module.
    And now I am bit inquisitive... Is there some configurable kernel parameter that decides what is the max size of kernel module that can be inserted?
    Don't know off-hand since I haven't run into this problem in the past, but I'll check and get back to you about that. Is this for a 32-bit, or 64-bit system?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    Ok. What I came up with is that the load_module() function used will bail out if a module file is greater than 64MB in size. How big is your module?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #6
    Linux Newbie rinjo's Avatar
    Join Date
    Feb 2007
    Location
    Bangalore, India
    Posts
    228
    Thanks again.
    Oops! The kernel module that I was trying to load is about 80MB is size.
    I guess I will need to rework on the module and make it fit into that 64MB limit, to make it loadable.
    Linux Rocks!!!!
    -- Rinjo
    Setup: Oses: Windows 7 HB and Fedora 17 dual boot Hardware: HP Pavilion G6-2005AX laptop, AMD A8 Quad Core, 4 GB RAM, 1.5 GB dual Graphics card, 500GB HDD.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •