[PATCH] [stack protector] Improved data layout rules, WIP, part 2
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".
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
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8878 bytes
Desc: not available
More information about the llvm-commits