tech-kern archive

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

Re: fault(4)



> Date: Sat, 8 Feb 2020 06:19:43 -0800 (PST)
> From: Paul Goyette <paul%whooppee.com@localhost>
> 
> If this is a device on which you can use ioctl() to configure, why is
> it not stored under sys/dev and why is it not included in kernel config
> with pseudo-device directive (and corresponding files.kern changes)?

There's no need for an _autoconf_ device (usually representing a
physical device in the hardware's device tree) in order to have a
userland /dev node (representing an interface between userland and
kernel).  See kern_cpu.c, kern_drvctl.c, &c., for other examples of
/dev nodes without autoconf devices.

One could use a pseudo-device just to get an initialization routine so
that it's self-contained; maxv chose to use a module instead for that.

We could have a fault injection hook that an unloadable module would
set up, but I see no need to block adoption of a very good thing that
already catches bugs until it is generalized to perfection!


Home | Main Index | Thread Index | Old Index