Commit b1ccbc9
committed
[AArch64][PAC] Do not execute AUT instructions speculatively
A generic authentication instruction may crash the process on failure.
Furthermore, it can be executed conditionally and/or its signing schema
can be chosen dynamically. For this reason, while it may be beneficial
to permit DCE to remove AUTx16x17 or AUTxMxN instructions unless their
results have any uses (at least fake ones, if we just want to check the
signature), AUT instructions are not safe to be executed speculatively.
As a quick fix for miscompilation possibility, this patch marks AUTxMxN
pseudo instruction as having unmodelled side effects.1 parent 7512ab1 commit b1ccbc9
File tree
2 files changed
+28
-22
lines changed- llvm
- lib/Target/AArch64
- test/CodeGen/AArch64
2 files changed
+28
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2155 | 2155 | | |
2156 | 2156 | | |
2157 | 2157 | | |
2158 | | - | |
| 2158 | + | |
2159 | 2159 | | |
2160 | 2160 | | |
2161 | 2161 | | |
| |||
Lines changed: 27 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
773 | | - | |
| 773 | + | |
| 774 | + | |
774 | 775 | | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
779 | 781 | | |
780 | 782 | | |
781 | 783 | | |
| |||
792 | 794 | | |
793 | 795 | | |
794 | 796 | | |
795 | | - | |
| 797 | + | |
| 798 | + | |
796 | 799 | | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
801 | 805 | | |
802 | 806 | | |
803 | 807 | | |
| |||
826 | 830 | | |
827 | 831 | | |
828 | 832 | | |
829 | | - | |
| 833 | + | |
| 834 | + | |
830 | 835 | | |
831 | | - | |
832 | | - | |
833 | | - | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
834 | 839 | | |
835 | 840 | | |
836 | 841 | | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
841 | 848 | | |
842 | 849 | | |
843 | 850 | | |
844 | | - | |
845 | | - | |
846 | | - | |
| 851 | + | |
| 852 | + | |
847 | 853 | | |
848 | 854 | | |
849 | 855 | | |
| |||
0 commit comments