From owner-freebsd-stable Sat Feb 22 23: 3:43 2003 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8692337B401; Sat, 22 Feb 2003 23:03:41 -0800 (PST) Received: from HAL9000.homeunix.com (12-233-57-224.client.attbi.com [12.233.57.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id D190743FB1; Sat, 22 Feb 2003 23:03:40 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id h1N73X3W001359; Sat, 22 Feb 2003 23:03:33 -0800 (PST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id h1N73TLQ001358; Sat, 22 Feb 2003 23:03:29 -0800 (PST) (envelope-from das@FreeBSD.ORG) Date: Sat, 22 Feb 2003 23:03:29 -0800 From: David Schultz To: "Marc G. Fournier" Cc: Luoqi Chen , freebsd-stable@FreeBSD.ORG, Tor.Egge@cvsup.no.freebsd.org, freebsd-emulation@FreeBSD.ORG Subject: Re: Raising KVA_PAGES breaks linux emulation? Message-ID: <20030223070329.GB1053@HAL9000.homeunix.com> Mail-Followup-To: "Marc G. Fournier" , Luoqi Chen , freebsd-stable@FreeBSD.ORG, Tor.Egge@cvsup.no.freebsd.org, freebsd-emulation@FreeBSD.ORG References: <20030222155404.F61064@hub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030222155404.F61064@hub.org> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Marc G. Fournier : > On Sat, 22 Feb 2003, Luoqi Chen wrote: > > Module builds seem to use CFLAGS (while kernel builds use COPTFLAGS). > > Right, and, as was found out, this doesn't just affect kernel+modules, but > libc_r as well ... anything else it might affect? :( > > > A better way is to have kernel Makefile passing opt_global.h to the > > modules. The best solution for this particular problem would probably > > be changing USRSTACK to a global variable instead of a #define. > > I realize we're in a freeze for 4.8-RELEASE, but sicne KVA_PAGES is > documented, and its use does break things, any chance on getting this > fixed before the RELEASE? For libc_r, we can do better than documenting the problem: we can fix it! All we have to do is ask the kernel for the value of KVA_PAGES via sysctl instead of relying on the static value. Most of the work is already done, so the fix is a 2-line patch. I'm going to run it by the libc_r maintainer ASAP if he hasn't dealt with it already, but I don't know about getting the fix into 4.8-RELEASE. I don't know what modules in general or the linuxolator specifically need KVA_PAGES for, but it may be possible to have them extract the information from a global symbol in the kernel proper, instead of using a compile-time constant. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message