Date: Thu, 23 Nov 2000 07:27:51 -0800 From: Mike Smith <msmith@freebsd.org> To: Jonathan Lemon <jlemon@flugsvamp.com> Cc: marcel@cup.hp.com, emulation@freebsd.org Subject: Re: "Bogon" Discovered in linux.ko syscall-mapping Message-ID: <200011231527.eANFRpF00909@mass.osd.bsdi.com> In-Reply-To: Your message of "Wed, 22 Nov 2000 20:39:46 CST." <200011230239.eAN2dkB87509@prism.flugsvamp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> >You're probably right. We can't map Linux' reboot to FreeBSDs as is. > > Yeah. I have a simplistic linux wrapper for the reboot call somewhere, > I should dig it up and commit it. The real problem, actually, is not this at all. The problem is that we assume that an unbranded static ELF binary is a FreeBSD binary (this is wrong), and attempt to execute it as such. Most linux binaries make syscall 55 (fcntl) pretty early on (I think it may even be in the glibc startup). Unfortunately, 55 is reboot in the BSD syscall table. If you're running the Linux binary as root, you die. The correct fix is to not execute unbranded ELF binaries as FreeBSD binaries. FreeBSD binaries are always branded, so this is not a problem. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E 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?200011231527.eANFRpF00909>