Skip to content

Commit

Permalink
Merge pull request #806 from vadorovsky/deprecate-syscall-prefix
Browse files Browse the repository at this point in the history
util: Deprecate `syscall_prefix`
  • Loading branch information
vadorovsky committed Oct 9, 2023
2 parents 0cd620a + bd6ba3a commit 66bd85a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions aya/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ fn parse_kernel_symbols(reader: impl BufRead) -> Result<BTreeMap<u64, String>, i
/// # Errors
///
/// Returns [`std::io::ErrorKind::NotFound`] if the prefix can't be guessed. Returns other [`std::io::Error`] kinds if `/proc/kallsyms` can't be opened or is somehow invalid.
#[deprecated(
since = "0.12.0",
note = "On some systems - commonly on 64 bit kernels that support running \
32 bit applications - the syscall prefix depends on what architecture an \
application is compiled for, therefore attaching to only one prefix is \
incorrect and can lead to security issues."
)]
pub fn syscall_prefix() -> Result<&'static str, io::Error> {
const PREFIXES: [&str; 7] = [
"sys_",
Expand Down

0 comments on commit 66bd85a

Please sign in to comment.