[llvm] [AArch64][PAC] Combine signing with address materialization (PR #130809)

Anatoly Trosinenko via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 4 11:19:45 PDT 2025


atrosinenko wrote:

@ahmedbougacha Considering the remaining signing oracles in #133788, there are six:

**MultiSource/Benchmarks/Prolangs-C++/employ**: Materialization of `_ZTV11PieceWorker+16` and `_ZTV20HourlyWorkerOvertime+16` in function `main`:
<details>
<summary>Command line</summary>

```
/path/to/bin/clang++ -DNDEBUG -target aarch64-linux-pauthtest \
    -march=v8.3-a --sysroot=... -rtlib=compiler-rt -stdlib=libc++ \
    -mllvm --aarch64-authenticated-lr-check-method=xpac-hint \
    -O2 -c /path/to/llvm-test-suite/MultiSource/Benchmarks/Prolangs-C++/employ/driver.cpp -o /tmp/employ.o
```
</details>

**MultiSource/Benchmarks/Prolangs-C++/ocean**: Materialization of `_ZTV8Obstacle+16` in function `_ZN5Ocean12addObstaclesEv` and of `_ZTV8Predator+16` in function `_ZN5Ocean12addPredatorsEv`:
<details>
<summary>Command line</summary>

```
/path/to/bin/clang++ -DNDEBUG -target aarch64-linux-pauthtest \
    -march=v8.3-a --sysroot=... -rtlib=compiler-rt -stdlib=libc++ \
    -mllvm --aarch64-authenticated-lr-check-method=xpac-hint \
    -O2 /path/to/llvm-test-suite/MultiSource/Benchmarks/Prolangs-C++/ocean/ocean.cpp -c -o /tmp/ocean.o
```
</details>

**MultiSource/Benchmarks/Prolangs-C++/simul**: Materialization of `_ZTV10pop_around+16` in function `main`:
<details>
<summary>Command line</summary>

```
/path/to/bin/clang++ -DNDEBUG -target aarch64-linux-pauthtest \
    -march=v8.3-a --sysroot=... -rtlib=compiler-rt -stdlib=libc++ \
    -mllvm --aarch64-authenticated-lr-check-method=xpac-hint \
    -O2 -c /path/to/llvm-test-suite/MultiSource/Benchmarks/Prolangs-C++/simul/simulate.cpp -o /tmp/simul.o
```
</details>

**MultiSource/Benchmarks/Prolangs-C++/family**: Materialization of `_ZTV5Child+16` in function `main`:
<details>
<summary>Command line</summary>

```
/path/to/bin/clang++ -DNDEBUG -target aarch64-linux-pauthtest \
    -march=v8.3-a --sysroot=... -rtlib=compiler-rt -stdlib=libc++ \
    -mllvm --aarch64-authenticated-lr-check-method=xpac-hint \
    -O2 -c /path/to/llvm-test-suite/MultiSource/Benchmarks/Prolangs-C++/family/family.cpp -o /tmp/family.o
```
</details>

I added some debug printing, and it turned out that while several of the affected symbols occur multiple times in calls to `@llvm.ptrauth.sign` intrinsic, at least one such call was always ignored due to `AddrDiscInst->getParent() != I.getParent()` condition.

https://github.com/llvm/llvm-project/pull/130809


More information about the llvm-commits mailing list