[PATCH] arch: um: Don't rename vmap to kernel_vmap
Miguel Ojeda
miguel.ojeda.sandonis at gmail.com
Sun Nov 23 09:07:54 PST 2025
On Sat, Nov 22, 2025 at 9:32 AM David Gow <davidgow at google.com> wrote:
>
> In order to work around the existence of a vmap symbol in libpcap, the
> UML makefile unconditionally redefines vmap to kernel_vmap. However,
> this not only affects the actual vmap symbol, but also anything else
> named vmap, including a number of struct members in DRM.
>
> This would not be too much of a problem, since all uses are also
> updated, except we now have Rust DRM bindings, which expect the
> corresponding Rust structs to have 'vmap' names. Since the redefinition
> applies in bindgen, but not to Rust code, we end up with errors such as:
>
> error[E0560]: struct `drm_gem_object_funcs` has no fields named `vmap`
> --> rust/kernel/drm/gem/mod.rs:210:9
>
> Since, as far as I can tell, we no longer actually link to libpcap, it
> should be safe to just remove this define unconditionally.
>
> (If it's not, we can possibly either disable DRM Rust bindings under
> UML, or move the redefinition of vmap behind some config option.)
>
> We also take this opportunity to update the comment.
>
> Signed-off-by: David Gow <davidgow at google.com>
Nice, thanks for this!
Yeah, I guess we would otherwise need to do the same kind of "wild"
macro replacement in Rust code to support this or conditional
compilation, and neither sounds good.
If it is not actually needed, then this sounds like a win-win.
It seems it was indeed gone in commit:
12b8e7e69aa7 ("um: Remove obsolete pcap driver")
So it sounds reasonable to me assuming I am not missing anything,
which I may be... FWIW:
Acked-by: Miguel Ojeda <ojeda at kernel.org>
Cheers,
Miguel
More information about the linux-um
mailing list