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 Sat, Feb 16, 2019 at 11:25:36PM +0100, Kamil Rytarowski wrote:
> We started to build and ship kernel modules through pkgsrc.

We did a long time ago, sort of...

> I would like to reserve 3 major numbers for the HAXM case from the base
> pool of devices and prevent potential future conflicts and compatibility
> breakage due to picking up another major number in a 3rd party software.
> 
> Where and how to reserve these major numbers?
> 
> I expect that we will start growing software that uses our kernel module
> framework. (I have got few candidates to get ported in future)
> 

Some history from AFS/OpenAFS/Arla:

Our base system reserves a syscall number (210) for the AFS syscall,
which is used either by the OpenAFS kernel module, or the Arla nnpfs
kernel module.  (Neither of these modules are currently functional with
modern NetBSD.)

Arla nnpfs additionally used a character device major, which it IIRC
allocated dynamically at module load time, which was then somehow
conveyed to userland to mknod the necessary device special before
starting arlad.

I'd suggest similar for this: allocate a MI range of character and block
majors for quasi-external use, and then make registrations for your
needs.

	Jonathan Kollasch

P.S.
Maybe reserve the first character major in the block for nnpfs
as a sort of monument to Arla (which is pretty much abandoned these
days).


Home | Main Index | Thread Index | Old Index