This is an archive of the discontinued LLVM Phabricator instance.

Disable check noreturn call in stack protector
ClosedPublic

Authored by xiangzhangllvm on Jan 11 2023, 5:20 PM.

Details

Summary

Background
We enhance the stack protector at D139254
From then, tack protector will check the stack before return and call no-return function.
(Before, we only check before return, this give attack space in our user's code, and uses
hope we can fix it.)
In D139254 smeenai hope to use a option come back
to the previous action (only check for return) by consider the code size in their project. So I
implemented this patch.
To encourage users to use strict stack protect (both check for return and no-return call), I only
implement the option as a LLVM option first. If we have more requirements as smeenai do. We
will consider add a standard FE option.

Diff Detail

Event Timeline

xiangzhangllvm created this revision.Jan 11 2023, 5:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2023, 5:20 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
xiangzhangllvm requested review of this revision.Jan 11 2023, 5:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2023, 5:20 PM
lanza accepted this revision.Jan 12 2023, 10:47 AM
lanza added a reviewer: lanza.

I work with Shoaib and this looks like a good solution for us! Thank you!

This revision is now accepted and ready to land.Jan 12 2023, 10:48 AM
This revision was landed with ongoing or failed builds.Jan 12 2023, 4:32 PM
This revision was automatically updated to reflect the committed changes.