[PATCH] D109157: [ARM] Mitigate the cve-2021-35465 security vulnurability.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 7 05:49:12 PDT 2021


labrinea marked 4 inline comments as done and 6 inline comments as done.
labrinea added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1666
+    CmdArgs.push_back("-mllvm");
+    if (A->getOption().matches(options::OPT_mfix_cmse_cve_2021_35465))
+      CmdArgs.push_back("-arm-fix-cmse-cve-2021-35465=1");
----------------
SjoerdMeijer wrote:
> I am wondering if this should use `getLastArg` and what happens with test cases (which I guess need adding) that have both:
> 
>   -mno-fix-cmse-cve-2021-35465  -mfix-cmse-cve-2021-35465 
> 
> or
> 
>   -mfix-cmse-cve-2021-35465  -mno-fix-cmse-cve-2021-35465
That's the whole point of `getLastArg` as far as I understand: for options that can either enable or disable a feature, so that the last one wins. I'll add more tests.


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

https://reviews.llvm.org/D109157



More information about the llvm-commits mailing list