Date: 2 Dec 1999 17:25:48 -0000 From: gary@aaa-mainstreet.nl To: freebsd-emulation@freebsd.org Subject: Emulation kernel bug (linux) Message-ID: <19991202172548.2955.qmail@abc.aaa-mainstreet.nl>
next in thread | raw e-mail | index | archive | help
Hi,
I'm trying to get linux Visual-Age for Java from IBM running under BSD 3.3.
I get a core dump:
% ./ide
zsh: segmentation fault ./ide
A ktrace gives this:
792 ide CALL mkdir(0)
792 ide RET mkdir 0
792 ide CALL getpid
792 ide RET getpid 792/0x318
792 ide CALL getpid
792 ide RET getpid 792/0x318
792 ide CALL obs_vread(0xa,0xbfbfdb20
792 ide RET obs_vread 0
792 ide CALL obs_vread(0xc,0xbfbfdb14
792 ide RET obs_vread 0
792 ide CALL setreuid(0,0xbfbfdb50,0)
792 ide RET setreuid 0
792 ide PSIG SIGSEGV SIG_DFL
792 ide NAMI "ide.core"
So I took a look at setreuid (which is not necessary anyway - why not
run with the standard ids?). So I wrote this:
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
Does it look familiar? Looks like the Visual Age problem. And I assume
it is a bug, yes?
My system looks like this:
%uname
FreeBSD 3.3-RELEASE FreeBSD 3.3-RELEASE #0: Thu Sep 16 23:40:35 GMT 1999 jkh@highwing.cdrom.com:/usr/src/sys/compile/GENERIC i386
% kldstat
Id Refs Address Size Name
1 6 0xc0100000 277038 kernel
2 1 0xc0a32000 4000 kernfs.ko
3 2 0xc0a4d000 a000 ibcs2.ko
4 1 0xc0a5b000 3000 ibcs2_coff.ko
5 1 0xc0a61000 e000 linux.ko
5 1 0xc0a61000 e000 linux.ko
Tail end of kldstat -v:
Contains modules:
Id Name
20 linuxelf
21 linuxaout
So, is this a known problem?
If so, let me know how to fix it.
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).
Now, this got loaded at 210, and seems to work fine. Is there I can
load this at 70, so that it removes setreuid functionaility?
Would I do that by changing NO_SYSCALL in the helloworld example?
But of course this is the wrong approach - I really want to override
the linux setreuid, don't I. But that is currently mapped to BSD
setreuid(). So, how do I override the linux setreuid(), but not the
BSD version?
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?
Thanks,
Gary <gary@hotlava.com>
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?19991202172548.2955.qmail>
