[PATCH] [stack protector] Improved data layout rules, WIP, part 2
Josh Magee
Joshua_Magee at playstation.sony.com
Wed Oct 2 09:42:53 PDT 2013
jmagee added you to the CC list for the revision "[stack protector] Improved data layout rules, WIP, part 2".
Hi,
This is the second part in a series of patches that will update the stack layout
rules for SSP, specifically to support the ssp-strong rules.
The breakdown of the series is:
Patch 1 [DONE]: Split the StackProtector pass from a single cpp file,
StackProtector.cpp, into StackProtector.h and StackProtector.cpp.
- Committed in r191570.
- Review at: http://llvm-reviews.chandlerc.com/D1521
Patch 2 [This patch]: Update the StackProtector pass to do the datalayout analysis.
- This modifies the pass to classify every SSP-triggering AllocaInst according
to an SSPLayoutKind (LargeArray, SmallArray, AddrOf).
- The analysis is collected by the pass and made available for use, but at
this point no other pass will actually use it.
Patch 3: Use the new layout analysis to replicate the old layout behaviour.
- Essentially, this is changing the MachineFrameInfo API to use the new
SSPLayoutKind information (instead of a boolean flag) and updating a few
pass dependencies (to preserve the SSP analysis).
- The actual layout would stay roughly the same - i.e., only LargeArray stack
objects will be placed near the canary. Everything else would be laid out
normally. The stack layout would not be identical in all cases because the
current heuristic used for layout (MayNeedSP) misses structures that contain
large arrays.
Patch 4: A patch that implements the improved layout rules.
- This patch would change the PrologueEpilogInserter and
LocalStackSlotAllocation passes to follow the improved stack layout rules.
- This patch would also include the documentation updates and final tests.
Thanks,
Josh
http://llvm-reviews.chandlerc.com/D1789
Files:
include/llvm/CodeGen/StackProtector.h
lib/CodeGen/StackProtector.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1789.3.patch
Type: text/x-patch
Size: 8878 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131002/7d77e568/attachment.bin>
More information about the llvm-commits
mailing list