diff options
| author | Gary Guo <[email protected]> | 2025-01-05 19:40:06 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2025-03-06 19:49:06 +0000 |
| commit | 41b6a8122d888299e3e437dae3a36431e6dfd5c9 (patch) | |
| tree | 516c026b431de8d25cf8b27d049a335bf37b62ee /lib/test_fortify/write_overflow-strscpy.c | |
| parent | MAINTAINERS: add Danilo Krummrich as Rust reviewer (diff) | |
| download | kernel-41b6a8122d888299e3e437dae3a36431e6dfd5c9.tar.gz kernel-41b6a8122d888299e3e437dae3a36431e6dfd5c9.zip | |
rust: alloc: make `ReallocFunc::call` inline
This function can be called with different function pointers when
different allocator (e.g. Kmalloc, Vmalloc, KVmalloc), however since
this function is not polymorphic, only one instance is generated,
and function pointers are used. Given that this function is called
for any Rust-side allocation/deallocation, performance matters a lot,
so making this function inlineable.
This is discovered when doing helper inlining work, since it's discovered
that even with helpers inlined, rust_helper_ symbols are still present
in final vmlinux binary, and it turns out this function is inhibiting
the inlining, and introducing indirect function calls.
Signed-off-by: Gary Guo <[email protected]>
Acked-by: Danilo Krummrich <[email protected]>
Reviewed-by: Boqun Feng <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strscpy.c')
0 files changed, 0 insertions, 0 deletions
