From owner-freebsd-emulation Thu Dec 2 10:59: 8 1999 Delivered-To: freebsd-emulation@freebsd.org Received: from mail.scc.nl (node1374.a2000.nl [62.108.19.116]) by hub.freebsd.org (Postfix) with ESMTP id 335C014C31 for ; Thu, 2 Dec 1999 10:58:59 -0800 (PST) (envelope-from freebsd-emulation@scc.nl) Received: (from daemon@localhost) by mail.scc.nl (8.9.3/8.9.3) id TAA07842 for emulation@FreeBSD.org; Thu, 2 Dec 1999 19:27:16 +0100 (CET) (envelope-from freebsd-emulation@scc.nl) Received: from GATEWAY by dwarf.hq.scc.nl with netnews for emulation@FreeBSD.org (emulation@FreeBSD.org) To: emulation@FreeBSD.org Date: Thu, 02 Dec 1999 19:27:12 +0100 From: Marcel Moolenaar Message-ID: <3846BA00.C73BC6C6@scc.nl> Organization: SCC vof Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <19991202172548.2955.qmail@abc.aaa-mainstreet.nl> Subject: Re: Emulation kernel bug (linux) Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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