[PATCH] D109153: [ARM][CMSE] Clear the secure fp-registers when using softfp abi.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 2 06:22:55 PDT 2021


labrinea created this revision.
labrinea added reviewers: momchil.velikov, dmgreen, llvm-commits.
Herald added subscribers: hiraditya, kristof.beyls.
labrinea requested review of this revision.
Herald added a project: LLVM.

When expanding the non-secure call instruction we are emiting code to clear the secure floating-point registers only if the targeted architecture has floating-point support. The potential problem is when the source code containing non-secure calls are built with -mfloat-abi=soft but some other part of the system has been built with -mfloat-abi=softfp (soft and softfp are compatible as they use the same procedure calling standard). In this case floating-point registers could leak to non-secure state as the non-secure won't have cleared them assuming no floating-point has been used.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109153

Files:
  llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
  llvm/test/CodeGen/ARM/cmse-clear.ll
  llvm/test/CodeGen/ARM/cmse.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109153.370251.patch
Type: text/x-patch
Size: 6503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210902/44fffd74/attachment.bin>


More information about the llvm-commits mailing list