From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= Subject: Re: Compiling xenlinux 2.4.29 with grsec.. help needed Date: Thu, 27 Jan 2005 22:18:28 +0200 Message-ID: <20050127201828.GA16286@edu.joroinen.fi> References: <20050126000653.GY16286@edu.joroinen.fi> <20050126041111.GA24811@grsecurity.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <20050126041111.GA24811@grsecurity.net> Sender: xen-devel-admin@lists.sourceforge.net Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Brad Spengler Cc: xen-devel@lists.sourceforge.net List-Id: xen-devel@lists.xenproject.org On Tue, Jan 25, 2005 at 11:11:11PM -0500, Brad Spengler wrote: > > -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing > > -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=3D2 > > -march=3Di686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=3Dfau= lt -c -o > > fault.o fault.c > > fault.c: In function =04o_page_fault': > > fault.c:135: warning: passing arg 1 of =05xpand_stack' from incompatible > > pointer type > > fault.c:135: warning: passing arg 2 of =05xpand_stack' makes pointer fr= om > > integer without a cast > > fault.c:135: error: too few arguments to function =05xpand_stack' > > make[5]: *** [fault.o] Error 1 > > make[5]: Leaving directory > > /root/stuff/xen/xen-2.0-grsec/linux-2.4.29-xenU/arch/xen/mm' > > make[4]: *** [first_rule] Error 2 > > make[4]: Leaving directory > > /root/stuff/xen/xen-2.0-grsec/linux-2.4.29-xenU/arch/xen/mm' > > make[3]: *** [_dir_arch/xen/mm] Error 2 > > make[3]: Leaving directory /root/stuff/xen/xen-2.0-grsec/linux-2.4.29-x= enU' > > make[2]: *** [build] Error 2 > > make[2]: Leaving directory /root/stuff/xen/xen-2.0-grsec' > > make[1]: *** [linux-2.4-xenU-build] Error 2 > > make[1]: Leaving directory /root/stuff/xen/xen-2.0-grsec' > > make: *** [kernels] Error 2 > >=20 > > So it seems that some hacking is required in arch/xen/mm/fault.c .. I d= on't > > have enough knowledge about linux memory management and/or grsec stuff = so I > > can't do this.. If somebody is willing to take a look at this, it would= be > > nice! >=20 > Most likely the change that has to be made is to add another argument to= =20 > the expand_stack calls in the file. Change it so it looks like: > expand_stack(current, ); >=20 > Unless the function in which expand_stack is called has a task_struct *= =20 > argument passed to it. In that case, use whatever variable name that is= =20 > instead of current. >=20 Thanks! With this change, grsec patched xenlinux 2.4.29 compiles OK. But.. the resulting kernel doesn't work. it crashes during boot.=20 Well, it seems this needs more work & debugging.. -- Pasi K=E4rkk=E4inen =20 ^ . . Linux / - \ Choice.of.the .Next.Generation. ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl