linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vmalloc: export vrealloc_node_align_noprof
@ 2026-01-07 15:16 Alice Ryhl
  2026-01-07 15:18 ` Danilo Krummrich
  0 siblings, 1 reply; 2+ messages in thread
From: Alice Ryhl @ 2026-01-07 15:16 UTC (permalink / raw)
  To: Andrew Morton, Uladzislau Rezki
  Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Trevor Gross, Danilo Krummrich,
	linux-mm, linux-kernel, rust-for-linux, Alice Ryhl

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>



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] vmalloc: export vrealloc_node_align_noprof
  2026-01-07 15:16 [PATCH] vmalloc: export vrealloc_node_align_noprof Alice Ryhl
@ 2026-01-07 15:18 ` Danilo Krummrich
  0 siblings, 0 replies; 2+ messages in thread
From: Danilo Krummrich @ 2026-01-07 15:18 UTC (permalink / raw)
  To: Alice Ryhl
  Cc: Andrew Morton, Uladzislau Rezki, Miguel Ojeda, Boqun Feng,
	Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Trevor Gross, linux-mm, linux-kernel, rust-for-linux



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>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-07 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-07 15:16 [PATCH] vmalloc: export vrealloc_node_align_noprof Alice Ryhl
2026-01-07 15:18 ` Danilo Krummrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox