tech-kern archive

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

Re: Reserve device major numbers for pkgsrc



On 17.02.2019 21:28, Christoph Badura wrote:
> On Sat, Feb 16, 2019 at 09:02:05PM -0800, John Nemeth wrote:
>> On Feb 16, 11:25pm, Kamil Rytarowski wrote:
>> } Where and how to reserve these major numbers?
>>
>>      The ideal thing is to not reserve numbers at all and have them
>> allocated dynamically.  This requires the module reporting the
>> number that was allocated to userland somehow.  However, the only
>> thing that is coming to mind off the top of my head is printf(9)
>> which would normally land in /var/log/messages.
> 
> We have sysctl as an easy an convenient way.
> 

From end-user point of view major and minor numbers don't matter most of
the time (are there exceptions?) and it might be picked by the kernel
dynamically.

I don't see how printing them in dmesg(8) or exposing to sysctl(2) help.

> Maybe we should think of a standard way to do that there.  E.g. like a
> separate hierarchy for modules and a standard way of naming them.
> 

I'm not sure what does this part mean, but HAXM (and certainly other
users of device nodes) needs them located in exact places (/dev/HAXM etc).

> --chris
> 

devfs is the way to go, but I cannot add this now or short term.

Once we will get devfs functional we can remove restriction of building
the full release as root on NetBSD as this supports generating /dev
entries (mknod(8)). We could drop -U option entirely and need for
privileged builds. (I'm aware that this can be worked around and OS will
try to generate the devices on the first boot).

From the HAXM point of view I will enable support for 64 VMs and until
then I will keep the restriction to 8 VMs in order to reduce the
population of HAX entries in /dev.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index