NetBSD Problem Report #42496

From www@NetBSD.org  Tue Dec 22 17:47:51 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 710D063C501
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 22 Dec 2009 17:47:51 +0000 (UTC)
Message-Id: <20091222174751.3E8F863C4ED@www.NetBSD.org>
Date: Tue, 22 Dec 2009 17:47:51 +0000 (UTC)
From: pooka@iki.fi
Reply-To: pooka@iki.fi
To: gnats-bugs@NetBSD.org
Subject: DIOCGPART must die
X-Send-Pr-Version: www-1.0

>Number:         42496
>Category:       kern
>Synopsis:       DIOCGPART must die
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 22 17:50:00 +0000 2009
>Last-Modified:  Thu Dec 24 02:50:02 +0000 2009
>Originator:     Antti Kantee
>Release:        
>Organization:
>Environment:
>Description:
The DIOCGPART ioctl is "transactionally" horrible.  I'm sure it was
a good idea at the time, but: it returns "some" pointers to "some"
address space.  This brings two major problems:

1) it is impossible to implement a non-kernel server which supports
   DIOCGPART
2) the caller has no way of knowing when the pointers returned
   are no longer valid (most of the time we get lucky, but
   then again that's mostly why computers work at all)
>How-To-Repeat:

>Fix:
Replace it with something that returns e.g. struct disklabel and
an index for dl.d_partitions[]?
(unless there are more deep-rooted issue.  I didn't check fully)

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/42496: DIOCGPART must die
Date: Thu, 24 Dec 2009 03:49:35 +0100

 On Tue, Dec 22, 2009 at 05:50:00PM +0000, pooka@iki.fi wrote:
 > >Fix:
 > Replace it with something that returns e.g. struct disklabel and
 > an index for dl.d_partitions[]?

 struct disklabel should not be used in new MI code.

 Martin

NetBSD Home
NetBSD PR Database Search

(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.