Pointer authentication config and user facing options#156712
Conversation
Co-authored-by: Daniil Kovalev <dkovalev@accesssoftek.com>
Allow PAC metadata to be passed to `get_fn_addr` and related API changes.
The set of supported attributes is: function * "aarch64-jump-table-hardening" * "ptrauth-auth-traps" * "ptrauth-calls" * "ptrauth-indirect-gotos" * "ptrauth-returns" module * "ptrauth-elf-got" * "ptrauth-sign-personality"
Also add flag for ELF-GOT signing.
Also: * update tests to force dynamic library when targetting pauthtest * various test fixes * introduce end-to-end tests for pauthtest (in run-make)
This comment has been minimized.
This comment has been minimized.
77fe412 to
b0a7e47
Compare
This comment has been minimized.
This comment has been minimized.
b0a7e47 to
4e8d9e3
Compare
This comment has been minimized.
This comment has been minimized.
4e8d9e3 to
418f447
Compare
This comment has been minimized.
This comment has been minimized.
This patch brings: * unified handling of pointer authentication options through: `-Zpointer-authentication`, with possible values: `aarch64-jump-table-hardening`, `auth-traps`, `calls`, `elf-got`, `function-pointer-type-discrimination`, `indirect-gotos`, `init-fini`, `init-fini-address-discrimination`, `return-addresses`. Toggled with `+`/`-`. * centralized handling of pointer authentication features. Session holds `pointer_auth_config: Option<PointerAuthConfig>` * encapsulation of schema for function pointers and init/fini through `PointerAuthSchema`. This allowed for retiring of `PacMetadata`. * refactor enabling of pointer authentication in code, instead of relying on the target (`pauthtest`) use the session
418f447 to
6af45da
Compare
|
@davidtwco, @folkertdev, @tgross35, @madsmtm FWI this is a follow up to #155722 and #156548 |
|
This PR modifies If appropriate, please update Some changes occurred in src/tools/compiletest cc @jieyouxu The GCC codegen subtree was changed
Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb This PR modifies cc @jieyouxu These commits modify compiler targets. |
|
r? @mejrs rustbot has assigned @mejrs. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This patch brings:
-Zpointer-authentication, with possible values:aarch64-jump-table-hardening,auth-traps,calls,elf-got,function-pointer-type-discrimination,indirect-gotos,init-fini,init-fini-address-discrimination,return-addresses. Toggled with+/-.pointer_auth_config: Option<PointerAuthConfig>PointerAuthSchema. This allowed for retiring ofPacMetadata.relying on the target (
pauthtest) use the session