Re: Whizzy New Feature: Paged segmented memory

Anthony DeRobertis (asd@suespammers.org)
Tue, 08 Jan 2002 14:05:09 GMT


jtv writes:

> On Tue, Jan 08, 2002 at 02:17:14AM -0500, Anthony DeRobertis wrote:
>>
>> A nice thing about two stacks is that it can be a completely
>> userspace thing. No need to involve the kernel at all; just gcc
>> and friends.
>
> Doesn't it have ABI implications as well?

On every architecture I'm familiar with. But that's a userland issue. I
don't believe the kernel cares how userland uses its stacks.

Change gcc. Recompile world. All should work, assuming your gcc changes are
bug-free, no one made assumptions about stack layout, no one wrote assembly
code, etc. [In other words, after 4 months of debugging you might get X
running again...]

>
> If so, why not go all the way and have stacks grow upwards? :-)

Some architectures have hardware assistance for downward growing stacks. One
example is 68K. I think x86 does too. OTOH, I don't think PPC does, though I
haven't read the Green Book recently.

Actually, if I were to be implementing split-stack, I'd probably have one
grow upward. Probably the data stack, because some architectures (68K, at
least) force the address stack to grow downwards.

Put an unmapped page between the two stacks, and all should be fine.

>
>
> Jeroen
>

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