From owner-freebsd-ia64 Wed Dec 25 1:16:19 2002 Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2449537B401; Wed, 25 Dec 2002 01:16:18 -0800 (PST) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCC2B43EA9; Wed, 25 Dec 2002 01:16:17 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id C7E832A8A5; Wed, 25 Dec 2002 01:16:17 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: obrien@freebsd.org Cc: ia64@freebsd.org Subject: Re: cvsup binary package for ia64 ? In-Reply-To: <20021225040036.GD17618@dragon.nuxi.com> Date: Wed, 25 Dec 2002 01:16:17 -0800 From: Peter Wemm Message-Id: <20021225091617.C7E832A8A5@canning.wemm.org> Sender: owner-freebsd-ia64@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org "David O'Brien" wrote: > On Tue, Dec 24, 2002 at 12:19:03AM -0800, Peter Wemm wrote: > > Paul Saab wrote: > > > it doesn't work. > > > > More specifically, the i386 modula-3 runtime wants to execute code on the > > non-executable data segment and/or stack and do other nasty things. It > > blows up spectacularly. > > I thought either you or DFR managed to run the i386 CVSup client on > IA-64. Was that with a hacked up system or something? Personally, I have not quite managed it. But I only tried with the version that uses the newer m3 implementation vs the older m3 implementation from DEC. Part of the solution was to make the data segment executable for i386 binaries. This can be done by flipping a bit in the elf header, but I added an #ifdef'ed hack in the kernel.. See kern/imgact_elf.c, around line 720.. /* * Some x86 binaries assume read == executable, * notably the M3 runtime and therefore cvsup */ if (prot & VM_PROT_READ) prot |= VM_PROT_EXECUTE; It seems that ia64 trips up x86 binaries when they actually get what they ask for. Interestingly, the x86-64 cpu also adds a NX (no-execute) bit, so the same problem could exist there. Anyway, this may not be all of the problems. I dont know how faithful our emulation of the i386 signal context stuff is.. These hacks got me further along, but not far enough. Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the message