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

2021-09-16 Thread Alexandros Lamprineas via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1bd5ea968e92: [ARM] Mitigate the cve-2021-35465 security vulnurability. (authored by labrinea). Repository: rG LLVM Github Monorepo CHANGES

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

2021-09-15 Thread Sam Elliott via Phabricator via cfe-commits
lenary accepted this revision. lenary added a comment. This revision is now accepted and ready to land. LGTM, but the most recent way of implementing this (using target features) was something I suggested to Alexandros based on @ostannard's feedback about LTO. I think it is cleaner, and this

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

2021-09-15 Thread Alexandros Lamprineas via Phabricator via cfe-commits
labrinea updated this revision to Diff 372677. labrinea added a comment. Changes in this revision: - added `-verify-machineinstrs` to the tests - that yield two bugs that I had to address: *** Bad machine code: Explicit operand marked as def *** - function:func - basic block: %bb.0

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

2021-09-15 Thread Alexandros Lamprineas via Phabricator via cfe-commits
labrinea updated this revision to Diff 372674. labrinea added a comment. Changes in this revision: - Replaced the backend option that enables the mitigation with a subtarget feature so that it works with LTO (@lenary thanks for the offline hint) - Enabled the subtarget feature on the affected

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

2021-09-14 Thread Alexandros Lamprineas via Phabricator via cfe-commits
labrinea added a comment. @ostannard, can you explain what you meant with supporting LTO? I didn't quite undestand. Are you happy with the rest of the changes? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109157/new/ https://reviews.llvm.org/D109157

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

2021-09-08 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: llvm/test/CodeGen/ARM/cmse-cve-2021-35465-return.ll:6 +; RUN: FileCheck %s --check-prefix=CHECK-8M-FP-CVE-2021-35465 + +%indirect = type { double, double, double, double, double, double, double, double } As

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

2021-09-07 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. The driver part looks good to me. I will let Oli do the approval as he also looked at the codegen (and I didn't). Comment at: clang/include/clang/Driver/Options.td:3274 + Group, + HelpText<"Work around VLLDM erratum CVE-2021-35465 (Arm only)">;

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

2021-09-07 Thread Alexandros Lamprineas via Phabricator via cfe-commits
labrinea updated this revision to Diff 371083. labrinea added a comment. Changes in this revision: - renamed fix_cve_2021_35465 to Fix_CVE_2021_35465 - added more Driver tests to cover the use of -mfix-cmse-cve-2021-35465 with -mno-fix-cmse-cve-2021-35465 - fixed code indentation CHANGES

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

2021-09-07 Thread Sjoerd Meijer via Phabricator via cfe-commits
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");

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

2021-09-07 Thread Alexandros Lamprineas via Phabricator via cfe-commits
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)) +

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

2021-09-07 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1646 - if (Args.getLastArg(options::OPT_mcmse)) + bool fix_cve_2021_35465 = false; + if (Args.getLastArg(options::OPT_mcmse)) { Nit: capital F in variable name.

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

2021-09-07 Thread Alexandros Lamprineas via Phabricator via cfe-commits
labrinea updated this revision to Diff 371028. labrinea added a comment. Changes in this revision: - pass the -arm-fix-cmse-cve-2021-35465 option once - document -m(no)fix-cmse-cve-2021-35465 in ClangCommandLineReference.rst - add clang tests with the mitigation expicitely disabled on affected

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

2021-09-06 Thread Alexandros Lamprineas via Phabricator via cfe-commits
labrinea added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1665 + +CmdArgs.push_back("-mllvm"); +if (A->getOption().matches(options::OPT_mfix_cmse_cve_2021_35465)) ostannard wrote: > ostannard wrote: > > labrinea wrote: > > >

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

2021-09-06 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
ostannard added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1665 + +CmdArgs.push_back("-mllvm"); +if (A->getOption().matches(options::OPT_mfix_cmse_cve_2021_35465)) ostannard wrote: > labrinea wrote: > > ostannard wrote: > > > Are

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

2021-09-06 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
ostannard added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1665 + +CmdArgs.push_back("-mllvm"); +if (A->getOption().matches(options::OPT_mfix_cmse_cve_2021_35465)) labrinea wrote: > ostannard wrote: > > Are these optional also

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

2021-09-06 Thread Alexandros Lamprineas via Phabricator via cfe-commits
labrinea added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1665 + +CmdArgs.push_back("-mllvm"); +if (A->getOption().matches(options::OPT_mfix_cmse_cve_2021_35465)) ostannard wrote: > Are these optional also being passed through to

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

2021-09-06 Thread Sjoerd Meijer via Phabricator via cfe-commits
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"); If

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

2021-09-06 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
ostannard added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1665 + +CmdArgs.push_back("-mllvm"); +if (A->getOption().matches(options::OPT_mfix_cmse_cve_2021_35465)) Are these optional also being passed through to the linker when

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

2021-09-02 Thread Alexandros Lamprineas via Phabricator via cfe-commits
labrinea created this revision. labrinea added reviewers: llvm-commits, momchil.velikov. Herald added subscribers: dang, hiraditya, kristof.beyls. labrinea requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: cfe-commits. Recently a vulnerability issue