aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers.c
diff options
context:
space:
mode:
authorMiguel Ojeda <[email protected]>2021-04-05 03:03:50 +0000
committerMiguel Ojeda <[email protected]>2022-09-28 06:56:25 +0000
commitb8a94bfb33952bb17fbc65f8903d242a721c533d (patch)
tree711d8fb9e4ac096d9a07fe046f77d0b7726bcdff /rust/helpers.c
parentkallsyms: support "big" kernel symbols (diff)
downloadkernel-b8a94bfb33952bb17fbc65f8903d242a721c533d.tar.gz
kernel-b8a94bfb33952bb17fbc65f8903d242a721c533d.zip
kallsyms: increase maximum kernel symbol length to 512
Rust symbols can become quite long due to namespacing introduced by modules, types, traits, generics, etc. For instance, the following code: pub mod my_module { pub struct MyType; pub struct MyGenericType<T>(T); pub trait MyTrait { fn my_method() -> u32; } impl MyTrait for MyGenericType<MyType> { fn my_method() -> u32 { 42 } } } generates a symbol of length 96 when using the upcoming v0 mangling scheme: _RNvXNtCshGpAVYOtgW1_7example9my_moduleINtB2_13MyGenericTypeNtB2_6MyTypeENtB2_7MyTrait9my_method At the moment, Rust symbols may reach up to 300 in length. Setting 512 as the maximum seems like a reasonable choice to keep some headroom. Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Co-developed-by: Alex Gaynor <[email protected]> Signed-off-by: Alex Gaynor <[email protected]> Co-developed-by: Wedson Almeida Filho <[email protected]> Signed-off-by: Wedson Almeida Filho <[email protected]> Co-developed-by: Gary Guo <[email protected]> Signed-off-by: Gary Guo <[email protected]> Co-developed-by: Boqun Feng <[email protected]> Signed-off-by: Boqun Feng <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/helpers.c')
0 files changed, 0 insertions, 0 deletions