Hello everyone,It may not be the best place to ask this but I found nothing on the internet about it.I'm working on Spectre V1 detection and stumbled upon the mitigation provided by clang, the "-mspeculative-load-hardening" option. I found it really interesting, and my question is the following: is there a way to tweak the compiler to print a message whenever it applies the mitigation, telling the user at which line of its code it applied the patch ?I have no idea of the difficulty of such a feature, but I'm ready to learn how to do it myself if anybody has time to tell me how to !Thanks for any help,milsegv_______________________________________________
cfe-dev mailing list
cfe...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
For reporting from the backend, the “optimization remarks” feature might be what you are looking for. I have not used it myself so I should not provide details, but it is enabled from the clang command line with the `-R` option I believe.
--paulr
Hello !I have checked the speculative-load-hardening source code, especially the file lib/Target/X86/X86SpeculativeLoadHardening.cpp . At the beginning of the file, I see that a bunch of parameters are registered from the command line, but I couldn't manage to make it work. I checked with 'clang --help-hidden', they don't appear in it. I tried something like '-mspeculative-load-hardening-ip' and '-mspeculative-load-hardening-args=-ip' but none of it worked, and I didn't find any documentation on how to send arguments to a pass (this page didn't told it http://llvm.org/docs/CommandLine.html ).Do you know how to tell the speculative load hardening pass to trigger some command line arguments ?Thanks for any answer,milsegv‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐On Monday, April 27, 2020 5:14 PM, Zola Bridges <zb...@google.com> wrote:You're welcome! Take care,Zola BridgesOn Mon, Apr 27, 2020 at 2:02 AM milsegv <mil...@protonmail.com> wrote:Hello Zola,Thanks a lot four your help and your time,Have a nice day,milsegv‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐