NetBSD Problem Report #57748

From  Mon Dec  4 01:26:17 2023
Return-Path: <>
Received: from ( [])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id DAC651A9238
	for <>; Mon,  4 Dec 2023 01:26:17 +0000 (UTC)
Message-Id: <>
Date: Mon,  4 Dec 2023 01:26:16 +0000 (UTC)
Subject: vmem(9) cannot manage a full 32-bit address space on 32-bit platforms
X-Send-Pr-Version: www-1.0

>Number:         57748
>Category:       kern
>Synopsis:       vmem(9) cannot manage a full 32-bit address space on 32-bit platforms
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    thorpej
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 04 01:30:00 +0000 2023
>Last-Modified:  Mon Dec 04 01:50:56 +0000 2023
>Originator:     Jason Thorpe
>Release:        10.99.10
CISCy Business
Any 32-bit platform.
vmem(9) uses:

typedef uintptr_t vmem_addr_t;
typedef size_t vmem_size_t;

...meaning that one cannot create a vmem arena that covers a full 32-bit address space, because the size would overflow.
Go ahead, try it.
Possibly use uintmax_t for both addresses and sizes?


From: "Jason R Thorpe" <>
Subject: PR/57748 CVS commit: src/sys/dev/vme
Date: Mon, 4 Dec 2023 01:49:29 +0000

 Module Name:	src
 Committed By:	thorpej
 Date:		Mon Dec  4 01:49:29 UTC 2023

 Modified Files:
 	src/sys/dev/vme: vme.c vmevar.h

 Log Message:
 Manage VME address space using vmem(9) rather than extent(9).

 XXX PR kern/57748 applies here; we lose the last byte of A32 space.

 To generate a diff of this commit:
 cvs rdiff -u -r1.29 -r1.30 src/sys/dev/vme/vme.c
 cvs rdiff -u -r1.14 -r1.15 src/sys/dev/vme/vmevar.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: kern-bug-people->thorpej
Responsible-Changed-When: Mon, 04 Dec 2023 01:50:56 +0000

State-Changed-From-To: open->analyzed
State-Changed-When: Mon, 04 Dec 2023 01:50:56 +0000
Issue understood.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.