Linux Kernel Architecture

(Jacob Rumans) #1

Chapter7:Modules


ID_FS_VERSION=FAT16
ID_FS_UUID=0920-E14D
ID_FS_UUID_ENC=0920-E14D
ID_FS_LABEL=KINGSTON
ID_FS_LABEL_ENC=KINGSTON
ID_FS_LABEL_SAFE=KINGSTON
DEVNAME=/dev/sdc1
DEVLINKS=/dev/disk/by-id/usb-Kingston_DataTraveler_II_5B67040095EB-0:0-part1
/dev/disk/by-path/pci-0000:00:1a.7-usb-0:4:1.0-scsi-0:0:0:0-part1
/dev/disk/by-uuid/0920-E14D /dev/disk/by-label/KINGSTON


The message provides information about the name of the newly detected partition (/dev/sdc1)and
the filesystem that is found on the partition (vfat). This is enough forudevdto automatically mount the
filesystem and make the USB stick accessible.

7.5 Version Control


Constantly changing kernel sources naturally has implications for driver and module programming —
particularly in the context of proprietary binary-only drivers; and it is these implications that are dis-
cussed in this section.

When new features are implemented or overall design is revised, it is often necessary to modify the
interfaces between the individual parts of the kernel to cope with the new situation or to support a
range of performance and design improvements. Of course, developers do their best, whenever possible,
to restrict changes to internal functions not directly used by drivers. However, this does not rule out
occasional modifications to the ‘‘public‘‘ interfaces. Naturally, the module interface is also affected by
such changes.

When drivers are made available in the source code, this does not present a problem so long as an indus-
trious kernel hacker can be found to adapt the code to the new structures — with most drivers, this can
be done in a matter of days (if not hours). Since there isno explicit ‘‘development kernel‘‘ anymore, it is
unavoidable that interface changes are introduced between two stable revisions of the kernel, but since
the in-tree code can be easily updated, this does not pose a particular problem.

The situation is different with drivers distributed by manufacturers in binary only. Users are forced
to rely on the goodwill of the manufacturers and must wait until a new driver has been developed
and released. This approach gives rise to a whole range of problems, two of which are technical^23 and
therefore of particular interest to us:

❑ If the module uses an obsolete interface, not only is correct module functioning impaired, but
also there is a great likelihood that the system will crash.
❑ Because the interfaces differ for SMP and single-processor systems, two binary versions are
needed, and again this can cause the system to crash if the wrong one is loaded.

Of course, these arguments also apply if Open Source modules in binary only are used. Sometimes, this
is the only option available to technically less experienced users until manufacturers offer an appropriate
update.

(^23) There is a wealth of detailed information on moral, ethical, and ideological issues on the Internet.

Free download pdf