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

Sjoerd Meijer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 7 06:01:48 PDT 2021


SjoerdMeijer 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");
----------------
labrinea wrote:
> 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.
Ah, got confused, it's indeed right there!


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

https://reviews.llvm.org/D109157



More information about the cfe-commits mailing list