[PATCH] arch: um: Don't rename vmap to kernel_vmap

Johannes Berg johannes at sipsolutions.net
Sun Nov 23 23:49:35 PST 2025


On Sun, 2025-11-23 at 18:07 +0100, Miguel Ojeda wrote:
> 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")

Indeed, that was just missed during the removal, we can't link to
libpcap any more.

How do we want to take this patch in, and where is it needed? I hadn't
planned to send a UML PR to -rc still, but I guess I _can_ if needed?
But if anyone else wants to line it up through a tree (rust related?)
that has pending work anyway, that seems fair too. In which case:

Acked-by: Johannes Berg <johannes at sipsolutions.net>

Or it's not that urgent because all this came up in -next now? I didn't
really see (or fully understand) all the build bug reports.

johannes



More information about the linux-um mailing list