Port-arm archive

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

vmparam.h version 1.28 and problem running /sbin/init


After sys/arch/arm/include/arm32/vmparam.h was upgaded we had an error
with OLinuXino to run /sbin/init. It looks like this after DEBUG and
DIAGNOSTIC are enabled:

root file system type: ffs
WARNING: no TOD clock present
WARNING: using filesystem time
init: copying out path `/sbin/init' 11
check_exec: rejecting 0x4001b018 due to too high entry address (> 0x3ffff000)
check_exec: rejecting 0x4001b018 due to too high entry address (> 0x3ffff000)
exec /sbin/init: error 8
init: copying out path `/sbin/oinit' 12
exec /sbin/oinit: error 2
init: copying out path `/sbin/init.bak' 15
exec /sbin/init.bak: error 2
init path (default /sbin/init):

If vmparam.h is reverted to 1.26 everything works as expected and 
init runs normally.

I'd like to fix this issue with but I don't know where to start.


options         KERNEL_BASE_EXT=0x40000000

Does this issue have something to do with USER/KERNEL split?
How I can get over this? Should I change (or remove) KERNEL_BASE_EXT
so KERNEL_BASE would be 0x80000000 and fix initialization code to match

What was changed between /sbin/init stopped working? Here's the diff:
$ cvs diff -r1.26 sys/arch/arm/include/arm32/vmparam.h 

-#define        MAXTSIZ         (16*1024*1024)          /* max text size */
+#define        MAXTSIZ         (64*1024*1024)          /* max text size */
-#define        MAXDSIZ         (512*1024*1024)         /* max data size */
+#define        MAXDSIZ         (1024*1024*1024)        /* max data size */
-#define        MAXSSIZ         (8*1024*1024)           /* max stack size */
+#define        MAXSSIZ         (32*1024*1024)          /* max stack size */
-#define        PAGE_SHIFT      12
+#define        PAGE_SHIFT      PGSHIFT
-#define        VM_MAXUSER_ADDRESS      ((vaddr_t) KERNEL_BASE)
+#define        VM_MAXUSER_ADDRESS      ((vaddr_t) KERNEL_BASE - 0x1000)
-#define        VM_MAX_KERNEL_ADDRESS   ((vaddr_t) 0xffffffff)
+#define        VM_MAX_KERNEL_ADDRESS   ((vaddr_t) 0xffffefff)

It was noted that when MAXDSIZ is larger than (960*1024*1024) things go
wrong. For example, when it is set to (992*1024*1024) init execution fails.

Error eventually happens at
sys/kern/kern_exec.c check_exec():

        epp->ep_vm_maxaddr = VM_MAXUSER_ADDRESS;
        if (epp->ep_entry > epp->ep_vm_maxaddr) {
                // ENOEXEC

Home | Main Index | Thread Index | Old Index