Re: netbsd32 syscalls sy_flags

[email protected] (Christos Zoulas)
Newsgroups gmane.os.netbsd.ports.mips.devel,gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
In article <[email protected]>,  <[email protected]> wrote:
>Hi,
>I've been trying to run code meant for MIPS o32 ABI on MIPS n32.
>
>Background:
>Both of them run under netbsd32 compat (when running mips64).
>MIPS o32 ABI calling convention says there are 4 registers meant for
>passing arguments, the rest go onto the stack.
>Also, o32 has 32bit registers.
>
>So a syscall with 64bit parameters has to be split up to using two
>arguments/stack slots.
>
>The code within sys/arch/mips/mips/syscall.c expects to know which
>arguments are 64bit through callp->sy_flags for its own logic.
>
>However, when making an lseek call, it seems to have sy_flags=0, so it
>treats all the arguments as being 32bit, and grabs the upper half of the
>offset as "whence" (usually zero), which is broken.
>
>(The relevant code is in lines 205 onwards...
>
>It tells a given argument is 64bit using:

cvs update, I fixed it.

christos
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.