Hi!

I'm trying to get running Adeos/Xenomai on a Netsilicon 9360
(ARM926EJ-Sid(wb) rev 4 (v5l))-Board with linux-2.6.15.7 and found
following bug in ipipe.root (__ipipe_syscall_root)

In __ipipe_syscall_root the syscall-nr is checked by:

__ipipe_syscall_watched_p(current, scno)

((
#define __NR_SYSCALL_BASE      0x900000
#define __ARM_NR_BASE                      (__NR_SYSCALL_BASE+0x0f0000)
#define __ipipe_syscall_watched_p(p, sc)        \
        (((p)->flags & PF_EVNOTIFY) || (unsigned long)sc >= __ARM_NR_BASE + 64)
))

but in entry-common.S this number is substracted by __NR_SYSCALL_BASE,
so the check (scno >= __ARM_NR_BASE + 64) can never succeed.

...

        ldr     ip, [tsk, #TI_FLAGS]            @ check for syscall tracing
        bic     scno, scno, #0xff000000         @ mask off SWI op-code
        eor     scno, scno, #__NR_SYSCALL_BASE  @ check OS number               
<---- substraction
#ifdef CONFIG_IPIPE
        stmfd   sp!, {r0-r3, ip}
        add     r1, sp, #S_OFF
        add     r1, r1, #20
        mov     r0, scno
        bl      __ipipe_syscall_root
        cmp     r0, #0
        ldmfd   sp!, {r0-r3, ip}
        blt     __ipipe_ret_fast_syscall
        bgt     __ipipe_fast_exit_syscall
#endif /* CONFIG_IPIPE */

...


My Patch:

--- ipipe-root.c.orig  2006-10-09 10:42:11.000000000 +0200
+++ ipipe-root.c  2006-10-09 10:42:26.000000000 +0200
@@ -339,7 +339,7 @@
 
        /* We use r7 to pass the syscall number to the other domains */
        origr7 = regs->ARM_r7;
-       regs->ARM_r7 = __NR_SYSCALL_BASE + scno;
+       scno=regs->ARM_r7 = __NR_SYSCALL_BASE + scno;
 
        /*
         * This routine either returns:





Manfred

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Adeos-main mailing list
[email protected]
https://mail.gna.org/listinfo/adeos-main

Reply via email to