NetBSD Problem Report #57748
From www@netbsd.org Mon Dec 4 01:26:17 2023
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))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id DAC651A9238
for <gnats-bugs@gnats.NetBSD.org>; Mon, 4 Dec 2023 01:26:17 +0000 (UTC)
Message-Id: <20231204012616.E665B1A9239@mollari.NetBSD.org>
Date: Mon, 4 Dec 2023 01:26:16 +0000 (UTC)
From: thorpej@me.com
Reply-To: thorpej@me.com
To: gnats-bugs@NetBSD.org
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
>Closed-Date:
>Last-Modified: Mon Dec 04 01:50:56 +0000 2023
>Originator: Jason Thorpe
>Release: 10.99.10
>Organization:
CISCy Business
>Environment:
Any 32-bit platform.
>Description:
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.
>How-To-Repeat:
Go ahead, try it.
>Fix:
Possibly use uintmax_t for both addresses and sizes?
>Release-Note:
>Audit-Trail:
From: "Jason R Thorpe" <thorpej@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
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-By: thorpej@NetBSD.org
Responsible-Changed-When: Mon, 04 Dec 2023 01:50:56 +0000
Responsible-Changed-Why:
Take.
State-Changed-From-To: open->analyzed
State-Changed-By: thorpej@NetBSD.org
State-Changed-When: Mon, 04 Dec 2023 01:50:56 +0000
State-Changed-Why:
Issue understood.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.