Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: modload: Cannot allocate memory



On 23.01.2011 05:22, Shi Jie Gung wrote:
> Running NetBSD 5.99.44 (NETBSD_XEN3_DOMU) custom kernel on Debian Unstable, 
> Xen 
> 4.0.
> 
> modload failed with every kmod.
> 
> hp_netbsd# cd /stand/amd64/5.99.44/modules/hfs
> hp_netbsd# modload  hfs.kmod                                                  
>  
> WARNING: module error: Cannot load kernel object `hfs.kmod' error=12
> modload: Cannot allocate memory
> hp_netbsd# modload hfs                                                        
>  
> WARNING: module error: Cannot load kernel object `hfs' error=12
> modload: Cannot allocate memory
> hp_netbsd# dmesg|tail -n 2
> WARNING: module error: Cannot load kernel object `hfs.kmod' error=12
> WARNING: module error: Cannot load kernel object `hfs' error=12
> 
> On another virtualbox machine, modload also failed with Xen Dom0 kernel, but 
> works with standard NetBSD kernel.
> 
> I assign 1G ram to netbsd, still the same error.

IIRC, modules have a custom memory map within kernel, and code is
missing with the Xen kernels to initialize it. As such, it defaults to
0, hence the ENOMEM error.

Still, the way modules are currently loaded makes it impossible to
distinguish one kernel version to another, as modules should be bound to
a specific kernel rather than an machine architecture (in this case, x86).
This leads to problem with Xen, as certain architecture-dependent
functions (bus access routines, DMA, physical/virtual memory
translations, ...) differ, and loading a "GENERIC" module in a Xen
environment will ultimately lead to undefined behavior.

-- 
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost


Home | Main Index | Thread Index | Old Index