[PATCH v2 04/10] um: change machine name for uname output

Hajime Tazaki thehajime at gmail.com
Fri Jul 24 00:16:36 PDT 2026


On Fri, 24 Jul 2026 15:54:30 +0900,
Johannes Berg wrote:
> 
> On Fri, 2026-07-24 at 15:50 +0900, Hajime Tazaki wrote:
> > On Thu, 23 Jul 2026 18:35:45 +0900,
> > Johannes Berg wrote:
> > > 
> > > From: Hajime Tazaki <thehajime at gmail.com>
> > > 
> > > This commit tries to display MMU/!MMU mode from the output of uname(2)
> > > so that users can distinguish which mode of UML is running right now.
> > > 
> > > Signed-off-by: Hajime Tazaki <thehajime at gmail.com>
> > > [remove / to fix regression with systemd userspace]
> > > Signed-off-by: Johannes Berg <johannes.berg at intel.com>
> > > ---
> > > v2: regression fix
> > 
> > I'd like to know what kind of regression did you see.
> 
> With your original change, systemd doesn't boot, it asserts here:
> https://github.com/systemd/systemd/blob/main/src/basic/architecture.c#L136

thanks,

> > with only this diff, there is no visible changes with uname command on
> > UML (both mmu/nommu), as setup_machinename() overwrite this.
> 
> Oops. I never tested it, sorry. Just saw the boot failure with my
> standard 64-bit (and maybe 32-bit as well?) boot test filesystems.
> 
> > maybe we could drop this patch if we cannot put a name 'um' in the
> > machine name ?
> 
> Sure, we can drop it. Or arrange so only nommu is different? Or even
> call it SUBARCH-nommu?

systemd detects UML via systemd-detect-virt, not `uname -m`:

https://github.com/obbardc/systemd/blob/master/src/basic/virt.c#L298

it looks like it uses vendor_id field of /proc/cpuinfo.
I guess they are right.

my original intention for this patch (to uname output) is to avoid
confusion (of myself) which UML (MMU or NOMMU) I am running so, it's
purely a kind of debugging purpose.

I think we can drop it and come back later if we really need to
provide a way to detect nommu UML (probably extending show_cpuinfo()).

-- Hajime



More information about the linux-um mailing list