This is an archive of the discontinued LLVM Phabricator instance.

[PPC, SSP] Support PowerPC Linux stack protection using LOAD_STACK_GUARD
ClosedPublic

Authored by timshen on Feb 29 2016, 1:58 PM.

Details

Reviewers
echristo
iteratee
Summary

Let PowerPC handle LOAD_STACK_GUARD manually, since glibc isn't offering a __stack_chk_guard symbol, but put it in TCB.

Diff Detail

Event Timeline

timshen updated this revision to Diff 49423.Feb 29 2016, 1:58 PM
timshen retitled this revision from to [SSP, 2/2] Load the correct stack guard values on PowerPC.
timshen updated this object.
timshen added a reviewer: echristo.
timshen added subscribers: llvm-commits, iteratee, hfinkel and 2 others.
timshen updated this revision to Diff 49428.Feb 29 2016, 3:11 PM

Updated for only doing manual lowering on Linux (similar to X86).

timshen updated this revision to Diff 54245.Apr 19 2016, 12:49 PM

Rebase to pick up SSP infrastructure change.

timshen retitled this revision from [SSP, 2/2] Load the correct stack guard values on PowerPC to [PPC, SSP] Support PowerPC Linux stack protection using LOAD_STACK_GUARD.Apr 19 2016, 12:50 PM
timshen added a reviewer: iteratee.
timshen removed a subscriber: iteratee.
echristo accepted this revision.Apr 19 2016, 12:54 PM
echristo edited edge metadata.

Hi Tim,

Other than one patch I'd like you to write first this just needs comments and you're good to go. Thanks a ton.

-eric

lib/Target/PowerPC/PPCISelLowering.cpp
12017

Comment explaining why on all 3 of these functions please.

lib/Target/PowerPC/PPCISelLowering.h
694

Mind going back in time and renaming this getSDagStackGuard please?

lib/Target/PowerPC/PPCInstrInfo.cpp
1860

Comments.

This revision is now accepted and ready to land.Apr 19 2016, 12:54 PM
timshen updated this revision to Diff 54248.Apr 19 2016, 1:18 PM
timshen marked 3 inline comments as done.
timshen edited edge metadata.

Updated and simplified.

lib/Target/PowerPC/PPCISelLowering.cpp
12017

Through commenting the functions, I actually simplifies them by overriding only two of them. :)

lib/Target/PowerPC/PPCInstrInfo.cpp
1860

Done in the header.

timshen added inline comments.Apr 19 2016, 1:19 PM
lib/Target/PowerPC/PPCISelLowering.cpp
12017

s/simplifies/simplified/. Apparently my English is broken. :P

timshen closed this revision.Apr 19 2016, 1:26 PM

Did this get committed? I can't seem to find the subject line anywhere &
the Differential revision isn't mentioned in a commit that I can find, etc.

This is committed as r266809.