BUG: adeos-ipipe-2.6.15-arm-1.5-00.patch on 2.6.15.7 -- syscalls
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 2006-10-09 10:42:26.000000000 +0200 renamed from ipipe-root.c.orig 2006-10-09 10:42:11.000000000 +0200 +1 -1
@@ -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
Hi,
Quoted 6 lines · Schlägl Manfred jun.
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)
Indeed, I messed this up. You are likely running 1.5-00. A similar fix was applied for 1.5-01, IIRC:
http://download.gna.org/adeos/patches/v2.6/arm/adeos-ipipe-2.6.15-arm-1.5-01.patch
Thanks,
Signature · 1 line
Philippe.