]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kbuild: rust: remove the `alloc` crate and `GlobalAlloc`
authorDanilo Krummrich <dakr@kernel.org>
Fri, 7 Mar 2025 22:49:54 +0000 (23:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 12:01:47 +0000 (13:01 +0100)
commit298be04c036ac57c6e6a91d2bbd0dda0c9b075be
tree3b45b7cf6b58958de3b4fbb165bdfc4a4f918416
parent1ef4cf5f98c42e8482331e1c69a15ba702b9e4c3
kbuild: rust: remove the `alloc` crate and `GlobalAlloc`

commit 392e34b6bc22077ef63abf62387ea3e9f39418c1 upstream.

Now that we have our own `Allocator`, `Box` and `Vec` types we can remove
Rust's `alloc` crate and the `new_uninit` unstable feature.

Also remove `Kmalloc`'s `GlobalAlloc` implementation -- we can't remove
this in a separate patch, since the `alloc` crate requires a
`#[global_allocator]` to set, that implements `GlobalAlloc`.

Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20241004154149.93856-29-dakr@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rust/Makefile
rust/exports.c
rust/kernel/alloc/allocator.rs
scripts/Makefile.build
scripts/generate_rust_analyzer.py