[PATCH] [stack protector] Improved data layout rules, WIP, part 3
Joshua_Magee at playstation.sony.com
Tue Nov 12 16:25:43 PST 2013
jmagee added you to the CC list for the revision "[stack protector] Improved data layout rules, WIP, part 3".
This is the third 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 [DONE]: Update the StackProtector pass to do the datalayout analysis.
- Committed in r193653.
- Review at: http://llvm-reviews.chandlerc.com/D1789
Patch 3 [This patch]: Use the new layout analysis to replicate the old layout behaviour.
- This changes the MachineFrameInfo API to use the new
SSPLayoutKind information (instead of a boolean flag) and updates a few
pass dependencies (to preserve the SSP analysis).
- The actual layout is roughly the same - i.e., only LargeArray stack objects
will be placed near the canary. Everything else is laid out normally. Note
that the stack layout is not be identical in all cases because the current
heuristic used for layout (MayNeedSP) misses structures that contain large
- I included new test cases for verifying the layout for ssp. Equivalent
cases for sspreq and sspstrong will be included in the next patch.
Patch 4: A patch that implements the improved layout rules.
- This patch would change the PrologueEpilogInserter and
LocalStackSlotAllocation passes to follow the extended stack layout rules
for sspstrong and sspreq.
- This patch would also include the documentation updates and final tests.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 38186 bytes
Desc: not available
More information about the llvm-commits