From owner-freebsd-arch Sat Aug 17 12: 6:37 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91B4737B400 for ; Sat, 17 Aug 2002 12:06:33 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 463C243E6E for ; Sat, 17 Aug 2002 12:06:33 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.4) with ESMTP id g7HJ6Wdc068154; Sat, 17 Aug 2002 12:06:32 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.4/Submit) id g7HJ6WiA068153; Sat, 17 Aug 2002 12:06:32 -0700 (PDT) (envelope-from dillon) Date: Sat, 17 Aug 2002 12:06:32 -0700 (PDT) From: Matthew Dillon Message-Id: <200208171906.g7HJ6WiA068153@apollo.backplane.com> To: Ian Dowse Cc: arch@FreeBSD.ORG Subject: Re: Solving the stack gap issue References: <200208171918.aa72556@salmon.maths.tcd.ie> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :A few approaches have been suggested: :- Lock access to the stack gap, so that only one thread at a time : can use it. :- Use a different address region for each thread. :- Avoid the need for the stack gap by providing kernel-callable versions : of all syscalls. : :... :I have attempted to implement the third approach. It requires more :extensive changes than the others, but it has the advantage of :aiming to remove the stack gap hack instead of just adding another :bad-aid to it. That said, it does add some overhead to normal system :calls, so it may be that some ugliness is necessary to balance this :tradeoff. Good god! Ian, you've done the grunge work that nobody else wanted to do! This is great! It will also make the ABI work discussed a few months ago far easier to accomplish. I believe that your patch and approach is not only convenient, it is a necessary prerequisit for current and future ABI work in -current. I think you should commit it as soon as you think it's safe. Is there any specific kind of testing you would like done? Now that I have the TCP stuff comitted, the next thing on my agenda is the 64 bit ABI. Your work simplifies my task enormously. For example it allows me to make sys_*() functions take 64 bit arguments natively where appropriate and make the 32 bit syscalls convert. -Matt Matthew Dillon :Anyway, there's a patch against -current at: : : http://www.maths.tcd.ie/~iedowse/FreeBSD/stackgap.diff : :This removes 80-90% of the stack gap uses in the i386 Linux emulation :code. I haven't done more than a basic level of testing though. I'm :also not particularly attached to any of the approaches taken here :- it is really just a proof of concept for this approach. Any :comments welcome! : :Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message