[PATCH] vmalloc: export vrealloc_node_align_noprof

Alice Ryhl posted 1 patch 1 month ago
mm/vmalloc.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] vmalloc: export vrealloc_node_align_noprof
Posted by Alice Ryhl 1 month ago
This symbol is used from the Nova driver, so it needs to be exported to
avoid a build failure when building Nova as a module.

ERROR: modpost: "vrealloc_node_align_noprof" [drivers/gpu/nova-core/nova_core.ko] undefined!
ERROR: modpost: "vrealloc_node_align_noprof" [samples/rust/rust_dma.ko] undefined!

This error is only triggered if helpers are inlined into Rust.
Otherwise, Nova will call the exported symbol

	rust_helper_vrealloc_node_align()

instead. There is no Fixes: tag as that feature is still WIP.

I used non-GPL EXPORT_SYMBOL to match the rest of the file, but let me
know if I should use EXPORT_SYMBOL_GPL.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
This patch was split out from this series:
[PATCH 0/4] Inline helpers into Rust without full LTO
https://lore.kernel.org/all/20251202-inline-helpers-v1-0-879dae33a66a@google.com/
---
 mm/vmalloc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index ecbac900c35f9cf207ac9299be096939509be43c..c248b5edb682e9a08acc1c3e804122f5fea22d19 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -4355,6 +4355,7 @@ void *vrealloc_node_align_noprof(const void *p, size_t size, unsigned long align
 
 	return n;
 }
+EXPORT_SYMBOL(vrealloc_node_align_noprof);
 
 #if defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA32)
 #define GFP_VMALLOC32 (GFP_DMA32 | GFP_KERNEL)

---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20260107-export-vrealloc_node_align_noprof-1e7fb9b78e56

Best regards,
-- 
Alice Ryhl <aliceryhl@google.com>
Re: [PATCH] vmalloc: export vrealloc_node_align_noprof
Posted by Danilo Krummrich 1 month ago

On 1/7/26 4:16 PM, Alice Ryhl wrote:
> This symbol is used from the Nova driver, so it needs to be exported to
> avoid a build failure when building Nova as a module.
> 
> ERROR: modpost: "vrealloc_node_align_noprof" [drivers/gpu/nova-core/nova_core.ko] undefined!
> ERROR: modpost: "vrealloc_node_align_noprof" [samples/rust/rust_dma.ko] undefined!
> 
> This error is only triggered if helpers are inlined into Rust.
> Otherwise, Nova will call the exported symbol
> 
> 	rust_helper_vrealloc_node_align()
> 
> instead. There is no Fixes: tag as that feature is still WIP.
> 
> I used non-GPL EXPORT_SYMBOL to match the rest of the file, but let me
> know if I should use EXPORT_SYMBOL_GPL.
> 
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>

Reviewed-by: Danilo Krummrich <dakr@kernel.org>