Hi Duncan,<div><br></div><div>It doesn't appear to be what I'm looking for as there is copying of the old stack to the new stack. Additionally, according to the LLVM docs on segmented stacks (<a href="http://llvm.org/releases/3.0/docs/SegmentedStacks.html">http://llvm.org/releases/3.0/docs/SegmentedStacks.html</a>) the stacklings are allocated memory from the heap. Since this places them all on the same memory segment, a read/write from one stackling could technically overflow to read/write another stackling ... unless there is something I've overlooked or is undocumented.</div>
<div><br></div><div>What I've been looking at currently is a suggestion made to me last night to either</div><div>(1) modify the allocated space for local variables in LLVM so that there are multiples of them</div><div>
(2) treat all local variables as globals and specify explicitly where each should be written</div><div><br></div><div>The primary goal I'm trying to achieve is such that a read/write to one or more variables on one stack cannot overflow to those on another stack due to either a protection page in between and/or implicit protections from being on different memory segments.</div>
<div><br></div><div>Thank you,</div><div><br></div><div>~Brent Roth~</div><div><br><div class="gmail_quote">On Mon, Jun 3, 2013 at 8:33 AM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Brent,<div class="im"><br>
<br>
On 03/06/13 14:32, Brent Gregory Roth wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Duncan,<br>
<br>
Are the segmented stacks actually on separate memory segments? My intended<br>
purpose for placing different datatypes on separate stacks is such that memory<br>
accesses to one datatype won't be allowed to overflow to another datatype.<br>
<br>
If they aren't, in fact, on separate memory segments, are you aware of a way to<br>
place a non-readable/-writable segment in between two other stack segments?<br>
</blockquote>
<br></div>
it is essentially the same thing as GCC's split stacks:<br>
<br>
<a href="http://gcc.gnu.org/wiki/SplitStacks" target="_blank">http://gcc.gnu.org/wiki/<u></u>SplitStacks</a><br>
<br>
Ciao, Duncan.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
Thanks,<br>
<br>
~Brent Roth~<br>
<br>
On Mon, Jun 3, 2013 at 3:20 AM, Duncan Sands <<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a><br></div><div class="im">
<mailto:<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>>> wrote:<br>
<br>
    Hi Brent, LLVM supports segmented stacks, I suggest you do a case<br>
    insensitive grep for segmented.stack in the source code (the . is<br>
    to match any character).<br>
<br>
    Ciao, Duncan.<br>
<br>
<br>
    On 03/06/13 00:35, Brent Gregory Roth wrote:<br>
<br>
        Greetings,<br>
<br>
        First, my apologies if I have incorrectly used any of these lists.<br>
<br>
        I'm sending this email in order to get some help on where in the<br>
        codebases for LLVM and/or Clang I should be looking in order to<br>
        accomplish the following:<br>
<br>
        - create 4 additional memory segment<br>
        - - 2 to be used as "additional stacks"<br>
        - - 2 to be used as "additional heaps"<br>
<br>
        - modify the stack frame and stack pointer registers (in order to make<br>
        use of the 2 "additional stacks")<br>
<br>
        - modify segment descriptors, as needed, to support reads/writes to the<br>
        additional segments<br>
<br>
        - modify which stack variables go to which of the three stacks<br>
        - - same for heaps<br>
<br>
        Thank you.<br>
<br>
        Sincerely,<br>
<br>
        ~Brent Roth~<br></div>
        ______________________________<u></u>___________________<br>
        LLVM Developers mailing list<br>
        <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>

        <a href="http://lists.cs.uiuc.edu/__mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/__<u></u>mailman/listinfo/llvmdev</a><br>
        <<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a>><br>
<br>
<br>
    ______________________________<u></u>___________________<br>
    LLVM Developers mailing list<br>
    <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>

    <a href="http://lists.cs.uiuc.edu/__mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/__<u></u>mailman/listinfo/llvmdev</a><br>
    <<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a>><br>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br></div>