All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Schlägl Manfred jun." <manfred.schlaegl@domain.hid>
To: adeos-main@gna.org
Subject: [Adeos-main] BUG: adeos-ipipe-2.6.15-arm-1.5-00.patch on 2.6.15.7 -- syscalls
Date: Mon, 09 Oct 2006 10:52:34 +0200	[thread overview]
Message-ID: <1160383954.5015.17.camel@domain.hid> (raw)

[-- Attachment #1: Type: text/plain, Size: 1738 bytes --]

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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2006-10-09  8:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-09  8:52 Schlägl Manfred jun. [this message]
2006-10-09 10:15 ` [Adeos-main] BUG: adeos-ipipe-2.6.15-arm-1.5-00.patch on 2.6.15.7 -- syscalls Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1160383954.5015.17.camel@domain.hid \
    --to=manfred.schlaegl@domain.hid \
    --cc=adeos-main@gna.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.