From: Ralf Baechle <ralf@linux-mips.org>
To: Macleod <macleod@mail2000.com.tw>
Cc: linux-mips@linux-mips.org
Subject: Re: System call select on R4600
Date: Wed, 25 Aug 2004 10:00:45 +0200 [thread overview]
Message-ID: <20040825080045.GA25537@linux-mips.org> (raw)
In-Reply-To: <1093400284.64232.macleod@mail2000.com.tw>
On Wed, Aug 25, 2004 at 10:18:04AM +0800, Macleod wrote:
> 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.
Oh yes, I forgot on this one :-) It's intentional; making all syscalls
work from kernel mode would add some overhead. Possible solutions:
- move to 64-bit kernels; the 64-bit syscall interface happens to support
upto 8 arguments for syscalls from kernel mode.
- move your module or parts of it to userspace. Something that's using
select suspiciously looks like something that shouldn't be in the kernel.
- use the proper kernel APIs. Kernel programming isn't user space
programming.
Ralf
next prev parent reply other threads:[~2004-08-25 8:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-25 2:18 System call select on R4600 Macleod
2004-08-25 8:00 ` Ralf Baechle [this message]
-- 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=20040825080045.GA25537@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=macleod@mail2000.com.tw \
/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