Skip to content

Commit

Permalink
Fix vdso_get_symbols_info() assertion for ARM64
Browse files Browse the repository at this point in the history
On ARM64 I have been seeing test failures:

```
test vdso::tests::vdso_can_find_symbols_info ... FAILED
test vdso::tests::vdso_patch_info_is_valid ... FAILED
```

Looking closer, this was caused by the debug assertion in
vdso_get_symbols_info() which asserts that all symbols found in the VDSO
are ELF STT_FUNC symbols. Unfortunately, this is not the case on ARM64,
because the VDSO's `__kernel_rt_sigreturn` is special and does appear
as STT_NONE symbol.

Fixup the debug assertion by special-casing for this special function.

Signed-off-by: Bjoern Doebel <doebel@amazon.de>
  • Loading branch information
bjoernd committed Sep 14, 2023
1 parent cc6d88b commit 2b70b57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reverie-ptrace/src/vdso.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ fn vdso_get_symbols_info() -> HashMap<&'static str, (u64, usize)> {
if let Some((name, _)) =
VDSO_SYMBOLS.iter().find(|&(name, _)| name == &sym_name)
{
debug_assert!(sym.is_function());
debug_assert!(sym.is_function() || name == &"__kernel_rt_sigreturn");
res.insert(*name, (sym.st_value, sym.st_size as usize));
}
});
Expand Down

0 comments on commit 2b70b57

Please sign in to comment.