Subject: Re: new kpi proposal, sysdisk(9)
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Elad Efrat <elad@NetBSD.org>
List: tech-kern
Date: 01/01/2007 13:15:13
YAMAMOTO Takashi wrote:

>> no, the way I understood it is that the ioctl stuff is for driver code;
>> sysdisk(9) is unrelated.
> 
> i don't understand how it can be unrelated to driver stuff,
> which knows overlapped partitions, etc.

it is right below: (sysdisk - subsystem that wants to protect itself can
register a disk as "used by the system", disk_ioctl - make it easier for
driver authors to avoid errors. the two complete each other.)

>> sysdisk(9) allows a subsystem that wants to
>> protect itself to do so, while the disk_ioctl() stuff is to (somewhat)
>> help driver authors.
> 
> what will be added to disk_ioctl?

nothing at this stage. I'm guessing we'd eventually want either there,
or in each of our own drivers, where relevant, a call to
kauth_authorize_device_passthru(), though.

>>>> and/or similar set of routines that
>>>> take a dev_t.
>>> can you explain?
>> yah, sysdisk(9) take struct vnode *, I thought about adding routines
>> that dev_t (and use vfinddev() to make it a struct vnode * internally).
>>
>> -e.
> 
> for what?

for when it's needed, that it'll be there. the idea is to have it really
simple to use. I *thought* about it, I'm not yet sure we will or will
not be doing it.

-e.