[PATCH] D54555: [clang][slh] add attribute for speculative load hardening

Aaron Ballman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 16 16:26:22 PST 2018


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

In https://reviews.llvm.org/D54555#1301748, @chandlerc wrote:

> In https://reviews.llvm.org/D54555#1301091, @aaron.ballman wrote:
>
> > Would there be value in making this a type attribute that appertains to the function type so that you don't lose this protection when calling through function pointers (as you could then add the attribute to the function pointer type as well)? If the stack pointer value is changed as part of the function prologue, this may not be needed, but if the stack pointer value is changed on the calling side, perhaps this would add value?
>
>
> IMO, no.
>
> This is fundamentally a property of the definition of a function, not of a call of a function. Whether the function being called has SLH or not doesn't change how you call it in any way.


Great! Thank you for the explanations.

I think the interaction with the command line flag and the negative version of this attribute can be done incrementally. This LGTM!


Repository:
  rL LLVM

https://reviews.llvm.org/D54555





More information about the llvm-commits mailing list