WSL2-Linux-Kernel/Documentation
Kay Sievers 578454ff7e driver core: add devname module aliases to allow module on-demand auto-loading
This adds:
  alias: devname:<name>
to some common kernel modules, which will allow the on-demand loading
of the kernel module when the device node is accessed.

Ideally all these modules would be compiled-in, but distros seems too
much in love with their modularization that we need to cover the common
cases with this new facility. It will allow us to remove a bunch of pretty
useless init scripts and modprobes from init scripts.

The static device node aliases will be carried in the module itself. The
program depmod will extract this information to a file in the module directory:
  $ cat /lib/modules/2.6.34-00650-g537b60d-dirty/modules.devname
  # Device nodes to trigger on-demand module loading.
  microcode cpu/microcode c10:184
  fuse fuse c10:229
  ppp_generic ppp c108:0
  tun net/tun c10:200
  dm_mod mapper/control c10:235

Udev will pick up the depmod created file on startup and create all the
static device nodes which the kernel modules specify, so that these modules
get automatically loaded when the device node is accessed:
  $ /sbin/udevd --debug
  ...
  static_dev_create_from_modules: mknod '/dev/cpu/microcode' c10:184
  static_dev_create_from_modules: mknod '/dev/fuse' c10:229
  static_dev_create_from_modules: mknod '/dev/ppp' c108:0
  static_dev_create_from_modules: mknod '/dev/net/tun' c10:200
  static_dev_create_from_modules: mknod '/dev/mapper/control' c10:235
  udev_rules_apply_static_dev_perms: chmod '/dev/net/tun' 0666
  udev_rules_apply_static_dev_perms: chmod '/dev/fuse' 0666

A few device nodes are switched to statically allocated numbers, to allow
the static nodes to work. This might also useful for systems which still run
a plain static /dev, which is completely unsafe to use with any dynamic minor
numbers.

Note:
The devname aliases must be limited to the *common* and *single*instance*
device nodes, like the misc devices, and never be used for conceptually limited
systems like the loop devices, which should rather get fixed properly and get a
control node for losetup to talk to, instead of creating a random number of
device nodes in advance, regardless if they are ever used.

This facility is to hide the mess distros are creating with too modualized
kernels, and just to hide that these modules are not compiled-in, and not to
paper-over broken concepts. Thanks! :)

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Cc: Ian Kent <raven@themaw.net>
Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-25 15:08:26 -07:00
..
ABI mm: compaction: add /sys trigger for per-node memory compaction 2010-05-25 08:06:59 -07:00
DocBook docbook: make mtd nand module init static 2010-05-24 07:30:55 -07:00
PCI Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2010-05-21 18:58:52 -07:00
RCU Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 08:27:54 -07:00
accounting
acpi
aoe
arm Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-05-20 09:20:59 -07:00
auxdisplay
blackfin Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
block Documentation: fix block/biodoc.txt dma mapping description 2010-03-08 09:11:07 +01:00
blockdev
cdrom
cgroups Merge branch 'master' into for-2.6.35 2010-05-21 21:27:26 +02:00
connector Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
console doc: fix console doc typo 2010-02-24 13:51:32 +01:00
cpu-freq
cpuidle
cris
crypto
development-process Documentation/development-process: add staging & mmotm info 2010-05-24 07:30:55 -07:00
device-mapper dm: document when snapshot has finished merging 2010-03-06 02:29:56 +00:00
driver-model
dvb Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
early-userspace
fault-injection lkdtm: add debugfs access and loosen KPROBE ties 2010-03-06 11:26:32 -08:00
fb fbdev: rename imacfb.txt to efifb.txt and change imacfb to efifb. 2010-04-07 08:38:02 -07:00
filesystems Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs 2010-05-25 08:17:01 -07:00
firmware_class
frv
hwmon Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
i2c i2c-i801: Let the user disable selected driver features 2010-05-21 18:40:54 +02:00
i2o
ia64
ide
infiniband
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-05-20 09:20:59 -07:00
ioctl Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2010-03-19 09:43:06 -07:00
isdn gigaset: small documentation improvement 2010-02-26 01:24:22 -08:00
ja_JP
kbuild Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
kdump
ko_KR
kvm KVM: MMU: Segregate shadow pages with different cr0.wp 2010-05-19 11:41:09 +03:00
laptops Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86 2010-05-21 17:13:24 -07:00
lguest Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
m68k
make
mips
misc-devices
mn10300
mtd
namespaces
netlabel Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
networking Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2010-05-20 21:04:44 -07:00
parisc
pcmcia pcmcia: dev_node removal (core) 2010-05-10 10:23:17 +02:00
power Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2010-05-21 18:58:52 -07:00
powerpc Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2010-05-21 11:17:05 -07:00
pps
prctl
s390 Merge branch 'for-next' into for-linus 2010-03-08 16:55:37 +01:00
scheduler sched: Remove USER_SCHED from documentation 2010-04-02 20:12:01 +02:00
scsi Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
serial ldisc: new dcd_change() method for line disciplines 2010-03-12 15:52:43 -08:00
sh
sound Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2010-05-20 09:41:44 -07:00
sparc
spi spi/ep93xx: implemented driver for Cirrus EP93xx SPI controller 2010-05-25 00:23:16 -06:00
sysctl mm: compaction: add a tunable that decides when memory should be compacted and when it should be reclaimed 2010-05-25 08:06:59 -07:00
telephony
thermal
timers Documentation/timers/hpet_example: drop duplicate header files 2010-05-24 07:30:56 -07:00
trace Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-05-20 09:20:59 -07:00
uml
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2010-05-20 21:26:12 -07:00
video4linux V4L/DVB: saa7134: Add support new Behold TV cards 2010-05-19 12:58:41 -03:00
vm Documentation/vm: use better value for MAP_HUGETLB 2010-05-24 07:30:56 -07:00
w1 Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
watchdog watchdog: update/improve/consolidate watchdog driver 2010-05-25 09:05:34 +00:00
wimax
x86 x86, numa: Remove configurable node size support for numa emulation 2010-02-15 14:34:18 -08:00
zh_CN
00-INDEX Add a document describing the padata interface 2010-05-14 09:18:55 -06:00
BUG-HUNTING
Changes netfilter: xtables: remove xt_string revision 0 2010-03-25 17:04:57 +01:00
CodingStyle
DMA-API-HOWTO.txt Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
DMA-API.txt Documentation: rename PCI-DMA-mapping.txt to DMA-API-HOWTO.txt 2010-03-12 15:52:43 -08:00
DMA-ISA-LPC.txt
DMA-attributes.txt
HOWTO Documentation/HOWTO: update git home URL 2010-04-22 15:24:56 -07:00
IO-mapping.txt
IPMI.txt ipmi: add parameter to limit CPU usage in kipmid 2010-03-12 15:52:39 -08:00
IRQ-affinity.txt
IRQ.txt
Intel-IOMMU.txt
Makefile Documentation/fs/: split txt and source files 2010-03-12 15:52:35 -08:00
ManagementStyle
SAK.txt
SELinux.txt
SM501.txt
SecurityBugs
Smack.txt Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
SubmitChecklist Documentation: update SubmitChecklist for O=objdir and kconfig testing 2010-05-24 07:31:20 -07:00
SubmittingDrivers
SubmittingPatches
VGA-softcursor.txt
applying-patches.txt
atomic_ops.txt Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
bad_memory.txt
basic_profiling.txt
binfmt_misc.txt
braille-console.txt
bt8xxgpio.txt
btmrvl.txt
cachetlb.txt Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
circular-buffers.txt Document Linux's circular buffering capabilities 2010-03-24 16:31:22 -07:00
cpu-hotplug.txt
cpu-load.txt
cputopology.txt
credentials.txt CRED: Holding a spinlock does not imply the holding of RCU read lock 2010-04-27 08:49:03 +10:00
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
devices.txt driver core: add devname module aliases to allow module on-demand auto-loading 2010-05-25 15:08:26 -07:00
dmaengine.txt
dontdiff Merge branch 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig 2010-02-25 14:43:57 -08:00
dynamic-debug-howto.txt
edac.txt
eisa.txt
email-clients.txt Documentation/email-clients.txt: update gmail information 2010-03-12 15:52:35 -08:00
feature-removal-schedule.txt Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2010-05-20 21:04:44 -07:00
flexible-arrays.txt
futex-requeue-pi.txt
gcov.txt
gpio.txt gpio: introduce gpio_request_one() and friends 2010-03-06 11:26:48 -08:00
highuid.txt
hw_random.txt
init.txt init/main.c: improve usability in case of init binary failure 2010-03-06 11:26:29 -08:00
initrd.txt
intel_txt.txt Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-05-20 09:20:59 -07:00
io-mapping.txt
io_ordering.txt
iostats.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt
kernel-docs.txt Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
kernel-parameters.txt watchdog: update/improve/consolidate watchdog driver 2010-05-25 09:05:34 +00:00
keys-request-key.txt
keys.txt
kmemcheck.txt
kmemleak.txt
kobject.txt kobject: documentation: Update to refer to kset-example.c. 2010-03-19 07:12:20 -07:00
kprobes.txt Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-05-20 09:20:59 -07:00
kref.txt
ldm.txt
leds-class.txt
leds-lp3944.txt
local_ops.txt
lockdep-design.txt
lockstat.txt
logo.gif
logo.txt
magic-number.txt
mca.txt
md.txt Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
memory-barriers.txt Document Linux's circular buffering capabilities 2010-03-24 16:31:22 -07:00
memory-hotplug.txt
memory.txt
mono.txt
mutex-design.txt
nmi_watchdog.txt
nommu-mmap.txt
numastat.txt
oops-tracing.txt panic: Add taint flag TAINT_FIRMWARE_WORKAROUND ('I') 2010-05-19 08:37:43 +01:00
padata.txt Add a document describing the padata interface 2010-05-14 09:18:55 -06:00
parport-lowlevel.txt
parport.txt
pi-futex.txt
pnp.txt
preempt-locking.txt
printk-formats.txt
prio_tree.txt
rbtree.txt rbtree: Add support for augmented rbtrees 2010-02-18 15:40:56 -08:00
rfkill.txt Document the rfkill sysfs ABI 2010-03-10 17:09:33 -05:00
robust-futex-ABI.txt
robust-futexes.txt
rt-mutex-design.txt Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
rt-mutex.txt
rtc.txt
serial-console.txt
sgi-ioc4.txt
sgi-visws.txt
slow-work.txt
sparse.txt doc: Change urls for sparse 2010-04-27 22:59:07 +02:00
spinlocks.txt
stable_api_nonsense.txt
stable_kernel_rules.txt Documentation: -stable rules: upstream commit ID requirement reworded 2010-04-22 15:24:56 -07:00
svga.txt
sysfs-rules.txt Fix typos in comments 2010-03-16 11:47:56 +01:00
sysrq.txt Input: Documentation/sysrq.txt - update KEY_SYSRQ info 2010-05-19 10:14:15 -07:00
tomoyo.txt
unaligned-memory-access.txt
unicode.txt
unshare.txt
vgaarbiter.txt
video-output.txt
volatile-considered-harmful.txt Documentation/volatile-considered-harmful.txt: correct cpu_relax() documentation 2010-03-24 16:31:20 -07:00
zorro.txt