[PATCH] D40478: Added control flow architecture protection Flag

Oren Ben Simhon via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 25 06:28:48 PST 2017


oren_ben_simhon added a comment.

In https://reviews.llvm.org/D40478#962348, @craig.topper wrote:

> Are we sure we want a different command line option name from gcc? From our internal conversations with the gcc folks I thought they were suggesting that -fcf-protection could imply a software mechanism if a hardware mechanism was not available thorugh -mibt or -march?
>
> Should we emit an error to the user if -mibt isn't available?  We should be able to add virtual methods on TargetInfo that X86 can customize to check for ibt and shstk.
>
> Can you provide more information about the miscompile on MSVC? I think we should do more to understand that, this sounds like it could be a time bomb waiting to fail somewhere else.


LLVM already has a flag for SW mechanisms "-sanitize=*". Anyway I believe that GCC and LLVM should agree first before i change it. I restored cf-protection and will create a new patch review after an agreement with GCC will be made.

I added an error message.

I currently don't have more information. After seeing the issue I workaround it. I prefer not to open MSVC miscompilation issue in this code review and investigate it on a different thread.


Repository:
  rL LLVM

https://reviews.llvm.org/D40478





More information about the cfe-commits mailing list