Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PF related panic



Michael L. Hitch wrote:

I'm not sure about the LKM builds on amd64, but certainly on 5.0 and later, the kernel modules were not getting built with the -mno-red-zone option, and modules had the potential of having interrupts clobber stack data that the compiler presumed was safe. I wouldn't be suprised if lkms
may have the same problem on amd64.

I rebuilt the module with -DDEBUG and -mno-red-zone and

# cd /usr/src/sys/lkm/net/pf
# export CPPFLAGS="-DDEBUG -mno-red-zone"
# make && make install

and rebooted with the debug kernel (with PF as module). And it works! No more crash...

Shouldn't we have this in netbsd-5 and netbsd-5-0?


Index: Makefile.inc
===================================================================
RCS file: /cvsroot/src/sys/lkm/Attic/Makefile.inc,v
retrieving revision 1.14
diff -u -r1.14 Makefile.inc
--- Makefile.inc        28 May 2007 12:06:24 -0000      1.14
+++ Makefile.inc        13 Nov 2009 07:33:32 -0000
@@ -8,6 +8,9 @@

 .include <bsd.own.mk>

+# Make modules work correctly
+CPPFLAGS+=-mno-red-zone
+
 CPPFLAGS+=-I${NETBSDSRCDIR}/common/include
 USE_FORT = no


Home | Main Index | Thread Index | Old Index