Skip to content

Conversation

@Abyss-W4tcher
Copy link

@Abyss-W4tcher Abyss-W4tcher commented Aug 29, 2024

Hi,

This PR adds support to detect different compile units (languages) in a DWARF data. The goal is to prevent name and type confusion accross multiple languages exposing concurrent symbols and types. When detected, everything is typed accordingly to a language, even base types, to avoid potentially dangerous shortcuts and assumptions.

To illustrate with a Linux kernel 6.5+, here are the resulting ISF base types (vmlinux provided in #57) :

['_Bool', '__int128', '__int128 unsigned', 'char', 'double', 'float', 'int', 'long int', 'long long int', 'long long unsigned int', 'long unsigned int', 'pointer', 'rust.!', 'rust.()', 'rust.__ARRAY_SIZE_TYPE__', 'rust.bool', 'rust.f32', 'rust.f64', 'rust.i128', 'rust.i16', 'rust.i32', 'rust.i64', 'rust.i8', 'rust.isize', 'rust.pointer', 'rust.u128', 'rust.u16', 'rust.u32', 'rust.u64', 'rust.u8', 'rust.usize', 'short int', 'short unsigned int', 'signed char', 'ssizetype', 'unsigned char', 'unsigned int', 'void']

I attached two ISF to this PR, to check out the differences before and after rust detection. Directly referring to #57, allows to see two distinct fs_struct and rust.fs_struct structs.

compile_units_handling.zipv2

Fixes #57, fixes #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle Rust bindings in the Linux kernel fs_struct type is not converted correctly

1 participant