NetBSD Problem Report #60243
From www@netbsd.org Sat May 9 14:05:01 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 "R13" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id A317D1A923A
for <gnats-bugs@gnats.NetBSD.org>; Sat, 9 May 2026 14:05:01 +0000 (UTC)
Message-Id: <20260509140500.9B65C1A923E@mollari.NetBSD.org>
Date: Sat, 9 May 2026 14:05:00 +0000 (UTC)
From: thorpej@me.com
Reply-To: thorpej@me.com
To: gnats-bugs@NetBSD.org
Subject: pmap_reference() is superfluous
X-Send-Pr-Version: www-1.0
X-From4GNATS: "thorpej@me.com via gnats" <gnats-admin@NetBSD.org>
>Number: 60243
>Category: kern
>Synopsis: pmap_reference() is superfluous
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat May 09 14:10:00 +0000 2026
>Originator: Jason Thorpe
>Release: NetBSD 11 (and 10, and 9, and 8, and ...)
>Organization:
Pmap Debuggers International
>Environment:
N/A
>Description:
The pmap_reference() function in the pmap(9) API is superfluous. In practice, it's only actually used in MI code for kernel sub-maps, and the kernel pmap is never deleted. The x86 pmap also uses it internally for mod/ref attribute gathering, but this is internal logic that could be private to that pmap.
Because of this superfluous API, all pmap implementations are required to maintain a reference count that is essentially unused.
>How-To-Repeat:
N/A
>Fix:
G/C it from the general pmap API.
(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.