Guillaume Gomez
0846622465
Rollup merge of #156973 - Darksonn:unwind-tables-module, r=nnethercote
...
Add uwtable annotation to modules when required
When unwind tables are enabled with `-Cforce-unwind-tables=y`, Rust will annotate all functions with the `uwtable` annotation. However, this annotation is missing on modules, which leads to incorrect unwind tables being generated by LLVM for constructors (such as `asan.module_ctor`).
This was discovered because it leads to a crash in Linux when KASAN and dynamic shadow call stack are both enabled. In this scenario, the kernel uses the unwind tables to locate the `paciasp` and `autiasp` instructions in each function and patches the machine code at boot to use the shadow call stack instructions instead. However, LLVM's AArch64PointerAuth pass emits DWARF info for `paciasp` whenever `-g` is passed, but only emits DWARF info for `autiasp` when the `uwtable` attribute is present. Since the `uwtable` annotation is missing for modules, the relevant directives are generated for only the `autiasp` instruction in `asan.module_ctor`, and not for the `paciasp` instruction. This causes the kernel's dynamic SCS logic to patch the prolouge of `asan.module_ctor`, but not the epilogue. This leads to a crash as the shadow call stack becomes unbalanced.
The fact that LLVM doesn't use the same condition for whether to emit DWARF information for both instructions may be a separate bug in LLVM.
Relevant issue: https://github.com/llvm/llvm-project/issues/188234
AI assistance was used to determine the root cause of this crash from the observed symptoms, and to write the tests. Also thanks to @samitolvanen and @maurer for debugging this issue.
Similar to this previous PR of mine: rust-lang/rust#130824
2026-05-27 20:45:14 +02:00
..
2025-11-06 15:39:45 -08:00
2025-12-05 08:37:22 -06:00
2026-03-02 23:30:45 -05:00
2025-07-22 14:28:48 +02:00
2025-11-08 10:57:35 -07:00
2025-11-02 16:20:06 +01:00
2025-07-22 14:28:48 +02:00
2026-05-25 17:15:32 +10:00
2025-11-02 16:20:06 +01:00
2025-12-18 19:12:09 -05:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-04-25 14:57:23 -07:00
2026-03-08 10:22:26 -03:00
2025-07-22 14:28:48 +02:00
2026-04-20 19:15:52 +02:00
2026-01-26 13:43:06 -06:00
2026-01-12 11:03:07 +01:00
2025-07-22 14:28:48 +02:00
2026-05-22 22:02:06 -07:00
2026-04-27 04:07:34 +02:00
2026-03-12 16:45:42 -07:00
2026-01-20 16:26:15 +08:00
2026-01-25 16:27:23 +01:00
2025-11-02 16:20:06 +01:00
2025-07-22 14:28:48 +02:00
2026-05-25 17:15:32 +10:00
2025-07-22 14:28:48 +02:00
2026-01-13 15:21:20 +00:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2026-03-12 16:45:42 -07:00
2026-05-04 15:35:40 +02:00
2026-05-24 09:24:32 -04:00
2026-05-22 22:02:06 -07:00
2026-05-22 22:02:06 -07:00
2025-07-22 14:28:48 +02:00
2025-09-11 16:13:32 -07:00
2025-11-02 16:20:06 +01:00
2025-11-02 16:20:06 +01:00
2026-01-26 12:43:52 +00:00
2025-11-02 16:20:06 +01:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-02-27 12:08:59 -08:00
2025-11-02 16:20:06 +01:00
2025-11-02 16:20:06 +01:00
2025-11-02 16:20:06 +01:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2025-07-22 14:28:48 +02:00
2026-01-21 23:39:03 +00:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2025-11-02 16:20:06 +01:00
2025-11-20 19:23:10 +01:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-02-09 15:53:38 -05:00
2025-09-09 21:54:54 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-01-20 14:47:04 +01:00
2026-01-09 10:41:37 +01:00
2025-07-22 14:28:48 +02:00
2026-03-13 11:54:06 +00:00
2025-07-22 14:28:48 +02:00
2026-05-09 01:01:03 -07:00
2026-05-22 22:02:06 -07:00
2025-11-19 11:55:09 +00:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-08-15 16:42:21 +00:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-09-01 13:45:00 +07:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-05-22 22:02:06 -07:00
2025-07-22 14:28:48 +02:00
2026-02-12 09:58:25 +01:00
2025-07-26 01:02:29 +02:00
2026-02-02 18:45:26 -05:00
2025-11-19 11:55:09 +00:00
2025-08-21 11:07:25 +01:00
2025-07-22 14:28:48 +02:00
2025-08-01 18:38:22 +01:00
2025-07-22 14:28:48 +02:00
2026-02-14 01:39:16 -08:00
2025-10-13 16:52:12 +00:00
2026-02-25 21:31:51 +08:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2026-04-22 16:02:11 +02:00
2026-04-30 20:32:15 +02:00
2025-07-22 14:28:48 +02:00
2026-05-23 16:49:04 -04:00
2026-04-22 17:37:17 +08:00
2025-07-22 14:28:48 +02:00
2026-02-10 12:39:45 +01:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-21 18:48:04 +08:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-21 13:04:48 -06:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-19 13:19:22 +04:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-29 11:20:23 -07:00
2025-07-22 14:28:48 +02:00
2025-11-19 11:55:09 +00:00
2025-07-22 14:28:48 +02:00
2025-10-10 20:14:23 -04:00
2025-09-16 11:49:20 -07:00
2025-09-16 11:49:20 -07:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-05-11 17:42:43 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2025-11-02 16:20:06 +01:00
2025-11-02 16:20:06 +01:00
2025-09-13 16:06:22 -07:00
2026-03-12 16:45:42 -07:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-10-02 14:55:50 +08:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-27 14:42:07 +03:00
2026-02-27 12:08:59 -08:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-03-12 16:45:42 -07:00
2025-11-02 16:20:06 +01:00
2025-09-05 20:44:49 -04:00
2026-01-20 16:26:15 +08:00
2025-07-29 18:59:09 +02:00
2026-04-28 09:56:22 -07:00
2025-07-22 14:28:48 +02:00
2026-05-04 15:35:40 +02:00
2025-07-22 14:28:48 +02:00
2026-05-22 22:02:06 -07:00
2026-05-22 22:02:06 -07:00
2025-07-29 11:20:23 -07:00
2025-07-22 14:28:48 +02:00
2025-12-03 14:34:07 -08:00
2025-10-23 00:38:28 +00:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2025-11-02 16:20:06 +01:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-05-26 14:43:44 +00:00
2026-05-26 14:43:44 +00:00
2025-11-02 16:20:06 +01:00
2025-11-02 16:20:06 +01:00
2026-03-29 02:11:32 -05:00
2025-07-22 14:28:48 +02:00
2026-05-03 10:59:52 +02:00
2025-11-02 16:20:06 +01:00
2025-08-06 18:01:07 +00:00
2025-07-22 14:28:48 +02:00
2026-03-13 10:17:20 -04:00
2025-09-23 10:21:17 +02:00
2026-03-17 10:51:31 +01:00
2025-11-02 16:20:06 +01:00
2026-04-24 10:03:45 +02:00
2025-11-02 16:20:06 +01:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2025-11-02 16:20:06 +01:00
2026-04-22 17:37:17 +08:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-04-14 03:25:02 +05:30
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-05-04 15:35:40 +02:00
2026-03-09 09:18:23 +00:00
2025-07-22 14:28:48 +02:00
2025-10-10 20:14:23 -04:00
2025-09-16 11:49:20 -07:00
2025-08-21 11:07:25 +01:00
2025-07-22 14:28:48 +02:00
2025-09-21 20:37:51 -04:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-03-02 15:18:55 +01:00
2025-07-22 14:28:48 +02:00
2025-08-11 22:00:41 +00:00
2026-04-25 20:06:30 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-04-16 12:29:39 +00:00
2026-02-24 08:33:15 +00:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-03-05 11:53:38 +01:00
2025-11-23 08:23:49 -05:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2025-07-22 14:28:48 +02:00
2025-11-19 11:55:09 +00:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-03 08:12:16 -06:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-21 13:04:48 -06:00
2026-04-25 14:57:23 -07:00
2025-07-22 14:28:48 +02:00
2026-02-11 20:42:35 -06:00
2025-07-22 14:28:48 +02:00
2026-03-31 09:06:31 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-09-23 10:59:29 +00:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2025-11-19 11:55:09 +00:00
2026-01-24 19:23:17 +02:00
2026-04-13 13:26:50 +02:00
2026-04-03 03:22:19 +02:00
2026-03-13 10:17:20 -04:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-10-31 16:12:30 -07:00
2025-07-22 14:28:48 +02:00
2026-03-12 16:45:42 -07:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-03-07 10:42:02 -08:00
2025-11-02 16:20:06 +01:00
2025-08-18 19:37:13 +00:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2025-11-02 16:20:06 +01:00
2025-11-02 16:20:06 +01:00
2025-11-06 12:49:48 +01:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-01-05 05:17:56 +09:00
2025-10-31 16:12:30 -07:00
2025-07-22 14:28:48 +02:00
2025-11-21 13:04:48 -06:00
2025-11-21 13:04:48 -06:00
2025-12-21 00:58:00 +00:00
2026-03-13 10:17:20 -04:00
2025-09-16 11:49:20 -07:00
2025-10-31 16:12:30 -07:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-03-12 16:45:42 -07:00
2025-10-31 16:12:30 -07:00
2025-08-21 11:07:25 +01:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-02-02 16:47:09 +05:30
2025-11-02 16:20:06 +01:00
2025-07-22 14:28:48 +02:00
2025-12-31 15:22:07 +01:00
2026-05-11 17:42:43 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-03-12 16:45:42 -07:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-09-16 11:49:20 -07:00
2026-02-27 10:51:55 +01:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2025-11-02 16:20:06 +01:00
2026-04-28 09:56:22 -07:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-11-02 16:20:06 +01:00
2025-09-16 11:49:20 -07:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-29 11:20:23 -07:00
2025-11-19 13:19:22 +04:00
2025-07-22 14:28:48 +02:00
2025-08-18 19:37:13 +00:00
2025-11-23 08:23:49 -05:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-03-05 11:53:38 +01:00
2025-09-11 16:13:32 -07:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-05-04 15:35:40 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-09-26 13:32:03 -04:00
2025-07-22 14:28:48 +02:00
2026-03-12 16:45:42 -07:00
2025-07-22 14:28:48 +02:00
2026-05-04 15:35:40 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-09-26 13:32:03 -04:00
2025-11-21 13:04:48 -06:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00
2026-03-05 11:53:38 +01:00
2025-07-22 14:28:48 +02:00
2025-10-30 15:13:32 +03:00
2025-07-22 14:28:48 +02:00
2025-07-22 14:28:48 +02:00