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

Hajime Tazaki thehajime at gmail.com
Thu Jul 23 23:50:15 PDT 2026


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.

> ---
>  arch/um/Makefile | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/um/Makefile b/arch/um/Makefile
> index 937639edc295..1f85b73d4abb 100644
> --- a/arch/um/Makefile
> +++ b/arch/um/Makefile
> @@ -148,6 +148,12 @@ export CFLAGS_vmlinux := $(LINK-y) $(LINK_WRAPS) $(LD_FLAGS_CMDLINE) $(CC_FLAGS_
>  CLEAN_FILES += linux x.i gmon.out
>  MRPROPER_FILES += $(HOST_DIR)/include/generated
>  
> +ifeq ($(CONFIG_MMU),y)
> +UTS_MACHINE := "um"
> +else
> +UTS_MACHINE := "um\(nommu\)"
> +endif
> +

with only this diff, there is no visible changes with uname command on
UML (both mmu/nommu), as setup_machinename() overwrite this.

maybe we could drop this patch if we cannot put a name 'um' in the
machine name ?

-- Hajime



More information about the linux-um mailing list