[PATCH] D54909: [clang][slh] add Clang attr no_speculative_load_hardening

Kristof Beyls via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 10:33:56 PST 2018


kristof.beyls added inline comments.


================
Comment at: clang/include/clang/Basic/AttrDocs.td:3667
+
+  Warning: This attribute may not prevent Speculative Load Hardening from being
+  enabled for a function which inlines a function that has the
----------------
Hi Zola,

I'm afraid I don't have time for an in-depth look in the next few days,
but I wonder if you have an answer to the follow higher-level question.
I wonder why not define no_speculative_load_hardening as giving a
guarantee that speculative load hardening doesn't happen on the code.
I'm not sure if there are users of this attribute that need the
guarantee that speculative load hardening doesn't happen, but there may?
I guess that to implement such behaviour, it would require also introducing a
no_speculative_load_hardening attribute at the LLVM-IR level?
Or somehow (I don't know if that's possible) make the existing
speculative_load_hardening attribute at LLVM-IR level have 3 potential
states: "no hardening", "must harden" and "don't care".
I guess the current proposed behaviour is because that's easier to implement,
or is there another reason?
What do you think?

Thanks,

Kristof


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54909/new/

https://reviews.llvm.org/D54909





More information about the llvm-commits mailing list