Date: Thu, 02 Dec 1999 19:27:12 +0100 From: Marcel Moolenaar <marcel@scc.nl> To: emulation@FreeBSD.org Subject: Re: Emulation kernel bug (linux) Message-ID: <3846BA00.C73BC6C6@scc.nl> References: <19991202172548.2955.qmail@abc.aaa-mainstreet.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
gary@aaa-mainstreet.nl wrote:
>
> A ktrace gives this:
>
[snip]
> 792 ide CALL setreuid(0,0xbfbfdb50,0)
> 792 ide RET setreuid 0
Use linux_kdump to view the ktrace file or use truss.
> main()
> {
> setreuid(-1, -1);
> }
>
> Runs fine as a BSD binary. I compile it under linux, though, and this happens:
>
> % ./lx
> zsh: segmentation fault (core dumped) ./lx
The Linux syscall is bodusly mapped onto the FreeBSD syscall. uid_t is
short in Linux and int in FreeBSD.
> Does it look familiar? Looks like the Visual Age problem. And I assume
> it is a bug, yes?
It is a bug, yes.
> So, is this a known problem?
setreuid is, but trace you gave has nothing to do with resuid (the trace
shows 3 args, while sereuid only has 2).
> If not, can someone give me some help in solving this - I have starting
> playing around with .ko files, and want to write one to override the
> setreuid call for linux so that it does nothing. I have just compiled
> my fist .ko file, and successfully loaded it (the helloworld example).
I wont stop you from writing your own module, but it's not the best way
to solve your problems :-)
> Any help much appreciated - and I'll gladly put in time to help improve the
> emulation - hey, you help me solve the kernel problems, and I'll make
> a port for the IBM program, OK?
Deal :-)
--
Marcel Moolenaar mailto:marcel@scc.nl
SCC Internetworking & Databases http://www.scc.nl/
The FreeBSD project mailto:marcel@FreeBSD.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3846BA00.C73BC6C6>
