diff options
author | Oliver Stannard <oliver.stannard@linaro.org> | 2019-12-11 12:03:12 +0000 |
---|---|---|
committer | Oliver Stannard <oliver.stannard@linaro.org> | 2019-12-11 12:06:20 +0000 |
commit | 6ae3d310bd94a338f2c121b19e7995dc72ca46dc (patch) | |
tree | c2e7f00c74567d9c6f462f6270449b75455ddc34 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 1fed9a0c0c3e74c21dfbd1edf18411a33b742f52 (diff) | |
download | bcm5719-llvm-6ae3d310bd94a338f2c121b19e7995dc72ca46dc.tar.gz bcm5719-llvm-6ae3d310bd94a338f2c121b19e7995dc72ca46dc.zip |
Revert "Reland [AArch64][MachineOutliner] Return address signing for outlined functions"
This reverts commit cec2d5c17457722113580251c8a045fa9aca9b1b.
Reverting because this is still creating outlined functions with return
address signing instructions with mismatches SP values. For example:
int *volatile v;
void foo(int x) {
int a[x];
v = &a[0];
v = &a[0];
v = &a[0];
v = &a[0];
v = &a[0];
v = &a[0];
}
void bar(int x) {
int a[x];
v = 0;
v = &a[0];
v = &a[0];
v = &a[0];
v = &a[0];
v = &a[0];
}
This generates these two outlined functions, both of which modify SP
between the paciasp and retaa instructions:
$ clang --target=aarch64-arm-none-eabi -march=armv8.3-a -c test2.c -o - -S -Oz -mbranch-protection=pac-ret+leaf
...
OUTLINED_FUNCTION_0: // @OUTLINED_FUNCTION_0
.cfi_sections .debug_frame
.cfi_startproc
// %bb.0:
paciasp
.cfi_negate_ra_state
mov w8, w0
lsl x8, x8, #2
add x8, x8, #15 // =15
mov x9, sp
and x8, x8, #0x7fffffff0
sub x8, x9, x8
mov x29, sp
mov sp, x8
adrp x9, v
retaa
...
OUTLINED_FUNCTION_1: // @OUTLINED_FUNCTION_1
.cfi_startproc
// %bb.0:
paciasp
.cfi_negate_ra_state
str x8, [x9, :lo12:v]
str x8, [x9, :lo12:v]
str x8, [x9, :lo12:v]
str x8, [x9, :lo12:v]
str x8, [x9, :lo12:v]
mov sp, x29
retaa
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions