llvm / llvm/llvm-project

[PAC][libunwind] Refactor way of describing internal signing schemas

Open
#160,101 2 comments 0 reactions 0 assignees View on GitHub
hardening libunwind
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

#143230 introduces many macros for internal signing schemas. Let's adopt @atrosinenko 's approach to make the code more readable. See original comment from the PR below.

---

(As an illustration for the "cover letter" of this review) I assume many such macroses define purely internal signing schemas. In such cases it should be possible to compute the discriminator automatically - it could probably improve readability to use something like

```cpp
PTRAUTH_INTPTR(uintptr_t, start) = readEncodedPointer(&p, callSiteEncoding);
```

instead of

```cpp
uintptr_t __ptrauth_gcc_personality_start start =
readEncodedPointer(&p, callSiteEncoding);
```

_Originally posted by @atrosinenko in https://github.com/llvm/llvm-project/pull/143230#discussion_r2365576851_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.