NetBSD Problem Report #32700
From yamt@mwd.biglobe.ne.jp Thu Feb 2 15:11:54 2006
Return-Path: <yamt@mwd.biglobe.ne.jp>
Received: from yamt.dyndns.org (FLA1Aaq096.kng.mesh.ad.jp [218.227.227.96])
by narn.netbsd.org (Postfix) with ESMTP id BE8CA63B876
for <gnats-bugs@gnats.NetBSD.org>; Thu, 2 Feb 2006 15:11:53 +0000 (UTC)
Message-Id: <1138892920.493066.884.nullmailer@yamt.dyndns.org>
Date: Fri, 03 Feb 2006 00:08:40 +0900
From: yamt@mwd.biglobe.ne.jp
Reply-To: yamt@mwd.biglobe.ne.jp
To: gnats-bugs@netbsd.org
Subject: userspace bus_dmamap_load is problematic
X-Send-Pr-Version: 3.95
>Number: 32700
>Category: kern
>Synopsis: userspace bus_dmamap_load is problematic
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 02 15:15:00 +0000 2006
>Originator: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release: NetBSD 3.99.15
>Organization:
>Environment:
System: NetBSD kaeru 3.99.15 NetBSD 3.99.15 (build.kaeru.xen.nodebug) #: Tue Jan 24 07:52:10 JST 2006 takashi@kaeru:/home/takashi/work/kernel/build.kaeru.xen.nodebug i386
Architecture: i386
Machine: i386
>Description:
bus_dmamap_load and bus_dmamap_load_uio can take userspace
addresses. however, they are fragile, at best.
- dmover seems to pass userspace addresses to bus_dmamap_load_uio
without wiring. handling of VA which doesn't have page-mapping
seems vary on bus_dma implementations.
- rrunner.c does uvm_vslock loop like the following.
it's problematic if (page-extended) iovs are overwrapped.
for (i = 0; i < uio->uio_iovcnt; i++) {
iovp = &uio->uio_iov[i];
error = uvm_vslock(p, iovp->iov_base, iovp->iov_len,
VM_PROT_WRITE);
- even if a driver does uvm_vslock, there are problems described
in PR/25639.
>How-To-Repeat:
code inspection.
>Fix:
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.