Re: upwards growing stacks ??

Richard B. Johnson (root@chaos.analogic.com)
Mon, 4 Oct 1999 08:29:59 -0400 (EDT)


On Sun, 3 Oct 1999, Linas Vepstas wrote:

> Hi,
>
> I've been porting the kernel to the ESA/390 architecture (mainframe)
> and have had the occasion to rethink the subroutine linkage. In particular,
> I have some weak reasons to want the stack to grow up, not down. However,
> the unix tradition & linux in particular usually have the stack grow down.
> So the questions:
>
> -- is it a bad idea to make the stack grow up?
> -- has anyone done this before w/ linux? (doesn't seem like it ...)
>
> -- should I do this, or should I stick to the traditional design?
>
> -- I'm making the following mods, will these be sufficient?
> Are they appropriate?
> o the expand_stack() inline in include/linux/mm.h assumes the
> stack grows down, & I will rework it to suit my needs ...
> o change VM_STACK_FLAGS to grow up as well ...
> o create a new vma that holds the stack base, out in high-memory,
> somewhere near TASK_SIZE - current->rlim[RLIMIT_STACK].rlim_cur

You have to worry about where the return address is put on an interrupt!

Cheers,
Dick Johnson
**** FILE SYSTEM WAS MODIFIED ****
Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/