NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/42496: DIOCGPART must die

>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
>Originator:     Antti Kantee
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
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)

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)

Home | Main Index | Thread Index | Old Index