NetBSD Problem Report #60216

From www@netbsd.org  Wed Apr 29 13:15:39 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "R12" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B4E5F1A9239
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 29 Apr 2026 13:15:39 +0000 (UTC)
Message-Id: <20260429131538.D8B951A923C@mollari.NetBSD.org>
Date: Wed, 29 Apr 2026 13:15:38 +0000 (UTC)
From: thorpej@me.com
Reply-To: thorpej@me.com
To: gnats-bugs@NetBSD.org
Subject: VM_MAXUSER_ADDRESS and VM_MAX_ADDRESS both exist, and that is dumb
X-Send-Pr-Version: www-1.0
X-From4GNATS: "thorpej@me.com via gnats" <gnats-admin@NetBSD.org>

>Number:         60216
>Category:       kern
>Synopsis:       VM_MAXUSER_ADDRESS and VM_MAX_ADDRESS both exist, and that is dumb
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 29 13:20:00 +0000 2026
>Originator:     Jason Thorpe
>Release:        NetBSD 11 (and 10, and 9, and 8, and ...)
>Organization:
Society for Aspiring Unix Grey-beards
>Environment:
NetBSD virt68k 11.99.5 NetBSD 11.99.5 (GENERIC) #195: Tue Apr 28 20:50:18 PDT 2026  thorpej@dhcp-194.ktnet:/Users/thorpej/NetBSD/current/src/sys/arch/virt68k/compile/GENERIC virt68k

>Description:
There are two constants in <machine/vmparam.h> that both basically describe the same thing:

#define VM_MAXUSER_ADDRESS      ((vaddr_t)(USRSTACK))
#define VM_MAX_ADDRESS          ((vaddr_t)(0-(UPAGES*PAGE_SIZE)))

There is absolutely no need for this, and it is probably a remnant of the "u." era, which we stopped living in literally decades ago.
>How-To-Repeat:
Look in <machine/vmparam.h>.
>Fix:
VM_MAXUSER_ADDRESS should be garbage-collected.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.