Subject: Re: IPSEC still fails on BETA2/vax (not anymore!)
To: Anders Magnusson <email@example.com>
From: Olaf Seibert <firstname.lastname@example.org>
Date: 07/15/2002 01:03:15
On Sun 14 Jul 2002 at 22:40:45 +0200, Anders Magnusson wrote:
> > -#define ISTACK_SIZE NBPG
> > +#define ISTACK_SIZE (NBPG * 2)
> > vaddr_t istack;
> > /*
> > * This code uses bitfield operators for most page table entries.
> > This seems to fix the problem for me. So unless there are hidden
> > assumptions in the code that ISTACK_SIZE is just NBPG, I would propose
> > this change to go into -current and pulled up to the 1.6 branch.
> > The larger size could possibly be made dependent on IPSEC, but since the
> > interrupt stack is allocated only once anyway, this seems a bit
> > over-frugal to me.
> Yes, thanks for finding this. Even though I donīt like that people write
> in-kernel code that eats up the stack (and especially not on interrupt
> level, there may be nested interrupts) it would be OK to do in this case.
> There are no dependencies on the interrupt stack size elsewhere, just
> enlarge it.
I agree with you about using up stack. That's why I don't really like
the following patch, which I needed to get the nfs mount command to work
(which overflowed the kernel stack). Even more so because there is a
kernel stack for each process so the price to be paid is much higher,
even when IPsec is not used. I wonder if there would be some other
clever solution. Why is the kernel stack in the U area anyway? Can't it
just grow on the normal process stack? Perhaps the answer is in the
Lions book, or The Design and Implementation Of 4.xBSD, but I don't
recall it exactly. Maybe it has something to do with pageability of the
user stack ISTR (after some thinking).
--- sys/arch/vax/include/param.h.orig Sun Apr 21 23:00:29 2002
+++ sys/arch/vax/include/param.h Sat Jul 13 13:50:09 2002
@@ -84,7 +84,7 @@
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
#define MAXBSIZE 0x4000 /* max FS block size - XXX */
-#define UPAGES 2 /* pages of u-area */
+#define UPAGES 3 /* pages of u-area */
#define USPACE (NBPG*UPAGES)
#define REDZONEADDR (VAX_NBPG*3) /* Must be > sizeof(struct user) */
(patch performed via an IPsec telnet connection and redirected to an
IPsec NFS mount).
> -- Ragge
___ Olaf 'Rhialto' Seibert - rhialto@ -- Woe betide the one who feels
\X/ polderland.nl -- remorse without sin - Tom Poes, "Het boze oog", 4444.