[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZrQARho24sFfqlYM@pollux>
Date: Thu, 8 Aug 2024 01:16:22 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Benno Lossin <benno.lossin@...ton.me>
Cc: ojeda@...nel.org, alex.gaynor@...il.com, wedsonaf@...il.com,
boqun.feng@...il.com, gary@...yguo.net, bjorn3_gh@...tonmail.com,
a.hindborg@...sung.com, aliceryhl@...gle.com,
akpm@...ux-foundation.org, daniel.almeida@...labora.com,
faith.ekstrand@...labora.com, boris.brezillon@...labora.com,
lina@...hilina.net, mcanal@...lia.com, zhiw@...dia.com,
acurrid@...dia.com, cjia@...dia.com, jhubbard@...dia.com,
airlied@...hat.com, ajanulgu@...hat.com, lyude@...hat.com,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH v4 21/28] rust: alloc: remove `GlobalAlloc` and
`krealloc_aligned`
On Wed, Aug 07, 2024 at 09:23:04PM +0000, Benno Lossin wrote:
> On 05.08.24 17:19, Danilo Krummrich wrote:
> > Now that we have all the `Allocator`s and the kernel `Box` and `Vec`
> > implementations in place, remove `GlobalAlloc` and `krealloc_aligned`.
>
> When I try to compile this patch, then I get this error:
>
> UPD include/generated/utsversion.h
> CC init/version-timestamp.o
> KSYMS .tmp_vmlinux0.kallsyms.S
> AS .tmp_vmlinux0.kallsyms.o
> LD .tmp_vmlinux1
> ld.lld: error: undefined symbol: __rust_realloc
> >>> referenced by usercopy_64.c
> >>> vmlinux.o:(alloc::raw_vec::finish_grow::<alloc::alloc::Global>)
>
> ld.lld: error: undefined symbol: __rust_alloc
> >>> referenced by usercopy_64.c
> >>> vmlinux.o:(alloc::raw_vec::finish_grow::<alloc::alloc::Global>)
> make[2]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1
>
> So maybe the `#[global_allocator]` needs to stay until we remove the
> `alloc` dependency?
Yes, I think so. I compile checked the single patches with `M=rust` and
`M=drivers`, which only compiles, but doesn't link things, so it didn't catch
it.
>
> ---
> Cheers,
> Benno
>
> > Signed-off-by: Danilo Krummrich <dakr@...nel.org>
> > ---
> > rust/kernel/alloc/allocator.rs | 63 ++--------------------------------
> > 1 file changed, 2 insertions(+), 61 deletions(-)
>
Powered by blists - more mailing lists