Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Macleod" <macleod@mail2000.com.tw>
To: linux-mips@linux-mips.org
Subject: Re: System call select on R4600
Date: Wed, 25 Aug 2004 10:18:04 +0800 (CST)	[thread overview]
Message-ID: <1093400284.64232.macleod@mail2000.com.tw> (raw)


 After trace system, found this problem is from scall_o32.S
 line 161 in 2.4.26 kernel.

 bltz t0, bad_stack   # -> sp is bad

 If stack address larger than 0x7fffffff, branch will take, 
 and that's why I got "-4142" errno on select system call
 even parameters in stack are correct. I tried to remove this
 line and seems "select" works fine.


-----Original message-----
From:Ralf Baechle <ralf@linux-mips.org>
To:Macleod <macleod@mail2000.com.tw>
Cc:linux-mips@linux-mips.org
Date:Sun, 22 Aug 2004 14:14:36 +0200
Subject:Re: System call select on R4600

On Sun, Aug 22, 2004 at 11:54:10AM +0800, Macleod wrote:

>  My problem is "select" system call always return -1
>  and errno is -4142, but sys_select has never been called.
>  Think, it has some problem on handling system call. 
>  Because if I change SYS(sys_select, 5) to 4 arguments,
>  sys_select will be executed. 
>  Thanks!

This is a bug which was fixed a while ago.  I assume your application
is picking up a bad definition from an old kernel header package or so.
Still doing syscalls directly is a fragily; better avoid and use your
libc's select(3).

  Ralf

             reply	other threads:[~2004-08-25  2:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-25  2:18 Macleod [this message]
2004-08-25  8:00 ` System call select on R4600 Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2004-08-22  3:54 Macleod
2004-08-22 12:14 ` Ralf Baechle

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=1093400284.64232.macleod@mail2000.com.tw \
    --to=macleod@mail2000.com.tw \
    --cc=linux-mips@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox