This is an archive of the discontinued LLVM Phabricator instance.

[SPARC] [SSP] Add support for LOAD_STACK_GUARD.
ClosedPublic

Authored by koriakin on Apr 21 2016, 1:42 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

koriakin retitled this revision from to [SPARC] [SSP] Add support for LOAD_STACK_GUARD..
koriakin updated this object.
koriakin added reviewers: venkatra, jyknight.
koriakin set the repository for this revision to rL LLVM.
koriakin added a subscriber: llvm-commits.
jyknight accepted this revision.Apr 25 2016, 8:35 PM
jyknight edited edge metadata.

Looks reasonable. OK, with requested comment addition.

(BTW: the current interface in llvm for overriding the behavior of SSP seems unnecessarily confusing, I hope that gets cleaned up at some point.)

lib/Target/Sparc/SparcInstrInfo.cpp
500 ↗(On Diff #54568)

Is there some ABI documentation that mentions these offsets? Or is this simply offsetof(tcbhead_t, stack_guard) from sysdeps/sparc/nptl/tls.h in glibc?

Can you add a comment here, whatever the source?

This revision is now accepted and ready to land.Apr 25 2016, 8:35 PM

Looks reasonable. OK, with requested comment addition.

(BTW: the current interface in llvm for overriding the behavior of SSP seems unnecessarily confusing, I hope that gets cleaned up at some point.)

Yeah, there are several, and it's a mess. The LOAD_STACK_GUARD is the most confusing so far, with the justification that it avoids spilling the correct guard onto the stack, thus nullifying the protection...

lib/Target/Sparc/SparcInstrInfo.cpp
500 ↗(On Diff #54568)

I'm afraid not, it's just offsetof in tcbhead_t. I copied these from gcc. I'll add a comment.

This revision was automatically updated to reflect the committed changes.