From 760bbe70cb64f59a61d1b4b298c7703bdabf6f9b Mon Sep 17 00:00:00 2001 From: Jim Huang Date: Thu, 22 Jul 2021 07:29:07 +0800 Subject: [PATCH] Drop duplicated module author information --- examples/bottomhalf.c | 4 +--- examples/completions.c | 1 - examples/cryptosha256.c | 1 - examples/cryptosk.c | 1 - examples/devicemodel.c | 1 - examples/example_atomic.c | 1 - examples/example_mutex.c | 1 - examples/example_rwlock.c | 1 - examples/example_spinlock.c | 1 - examples/example_tasklet.c | 1 - examples/hello-4.c | 2 +- examples/hello-5.c | 1 - examples/hello-sysfs.c | 1 - examples/intrpt.c | 1 - examples/ioctl.c | 1 - examples/kbleds.c | 1 - examples/other/cat_noblock.c | 1 - examples/print_string.c | 1 - examples/procfs4.c | 1 - examples/sched.c | 1 - lkmpg.tex | 11 +++++++---- 21 files changed, 9 insertions(+), 26 deletions(-) diff --git a/examples/bottomhalf.c b/examples/bottomhalf.c index c98380e..e04ea57 100644 --- a/examples/bottomhalf.c +++ b/examples/bottomhalf.c @@ -1,8 +1,7 @@ /* * bottomhalf.c - Top and bottom half interrupt handling * - * Copyright (C) 2017 by Bob Mottram - * Based upon the Rpi example by Stefan Wendler (devnull@kaltpost.de) + * Based upon the RPi example by Stefan Wendler (devnull@kaltpost.de) * from: * https://github.com/wendlers/rpi-kmod-samples * @@ -154,5 +153,4 @@ void cleanup_module() } MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Bob Mottram"); MODULE_DESCRIPTION("Interrupt with top and bottom half"); diff --git a/examples/completions.c b/examples/completions.c index b64dac5..88c7be9 100644 --- a/examples/completions.c +++ b/examples/completions.c @@ -69,6 +69,5 @@ void completions_exit(void) module_init(completions_init); module_exit(completions_exit); -MODULE_AUTHOR("Bob Mottram"); MODULE_DESCRIPTION("Completions example"); MODULE_LICENSE("GPL"); diff --git a/examples/cryptosha256.c b/examples/cryptosha256.c index 27b67e3..598aa39 100644 --- a/examples/cryptosha256.c +++ b/examples/cryptosha256.c @@ -55,6 +55,5 @@ void cryptosha256_exit(void) {} module_init(cryptosha256_init); module_exit(cryptosha256_exit); -MODULE_AUTHOR("Bob Mottram"); MODULE_DESCRIPTION("sha256 hash test"); MODULE_LICENSE("GPL"); diff --git a/examples/cryptosk.c b/examples/cryptosk.c index b8ffda5..c22746a 100644 --- a/examples/cryptosk.c +++ b/examples/cryptosk.c @@ -191,6 +191,5 @@ void cryptoapi_exit(void) module_init(cryptoapi_init); module_exit(cryptoapi_exit); -MODULE_AUTHOR("Bob Mottram"); MODULE_DESCRIPTION("Symmetric key encryption example"); MODULE_LICENSE("GPL"); diff --git a/examples/devicemodel.c b/examples/devicemodel.c index 323b96f..6b742fb 100644 --- a/examples/devicemodel.c +++ b/examples/devicemodel.c @@ -89,7 +89,6 @@ static void devicemodel_exit(void) } MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Bob Mottram"); MODULE_DESCRIPTION("Linux Device Model example"); module_init(devicemodel_init); diff --git a/examples/example_atomic.c b/examples/example_atomic.c index 205a1c1..51d7408 100644 --- a/examples/example_atomic.c +++ b/examples/example_atomic.c @@ -67,6 +67,5 @@ static void example_atomic_exit(void) module_init(example_atomic_init); module_exit(example_atomic_exit); -MODULE_AUTHOR("Bob Mottram"); MODULE_DESCRIPTION("Atomic operations example"); MODULE_LICENSE("GPL"); diff --git a/examples/example_mutex.c b/examples/example_mutex.c index 3b3b657..935c748 100644 --- a/examples/example_mutex.c +++ b/examples/example_mutex.c @@ -34,6 +34,5 @@ static void example_mutex_exit(void) module_init(example_mutex_init); module_exit(example_mutex_exit); -MODULE_AUTHOR("Bob Mottram"); MODULE_DESCRIPTION("Mutex example"); MODULE_LICENSE("GPL"); diff --git a/examples/example_rwlock.c b/examples/example_rwlock.c index 00c7a51..231f48b 100644 --- a/examples/example_rwlock.c +++ b/examples/example_rwlock.c @@ -48,6 +48,5 @@ static void example_rwlock_exit(void) module_init(example_rwlock_init); module_exit(example_rwlock_exit); -MODULE_AUTHOR("Bob Mottram"); MODULE_DESCRIPTION("Read/Write locks example"); MODULE_LICENSE("GPL"); diff --git a/examples/example_spinlock.c b/examples/example_spinlock.c index 9bfd132..e40eb35 100644 --- a/examples/example_spinlock.c +++ b/examples/example_spinlock.c @@ -58,6 +58,5 @@ static void example_spinlock_exit(void) module_init(example_spinlock_init); module_exit(example_spinlock_exit); -MODULE_AUTHOR("Bob Mottram"); MODULE_DESCRIPTION("Spinlock example"); MODULE_LICENSE("GPL"); diff --git a/examples/example_tasklet.c b/examples/example_tasklet.c index 7056937..12645fa 100644 --- a/examples/example_tasklet.c +++ b/examples/example_tasklet.c @@ -30,6 +30,5 @@ static void example_tasklet_exit(void) module_init(example_tasklet_init); module_exit(example_tasklet_exit); -MODULE_AUTHOR("Bob Mottram"); MODULE_DESCRIPTION("Tasklet example"); MODULE_LICENSE("GPL"); diff --git a/examples/hello-4.c b/examples/hello-4.c index 08b98cd..1ad8b8c 100644 --- a/examples/hello-4.c +++ b/examples/hello-4.c @@ -6,7 +6,7 @@ #include /* Needed by all modules */ MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Bob Mottram"); +MODULE_AUTHOR("LKMPG"); MODULE_DESCRIPTION("A sample driver"); MODULE_SUPPORTED_DEVICE("testdevice"); diff --git a/examples/hello-5.c b/examples/hello-5.c index 718f969..edc11eb 100644 --- a/examples/hello-5.c +++ b/examples/hello-5.c @@ -8,7 +8,6 @@ #include MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Peter Jay Salzman"); static short int myshort = 1; static int myint = 420; diff --git a/examples/hello-sysfs.c b/examples/hello-sysfs.c index 599191e..49bf6ba 100644 --- a/examples/hello-sysfs.c +++ b/examples/hello-sysfs.c @@ -10,7 +10,6 @@ #include MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Bob Mottram"); static struct kobject *mymodule; diff --git a/examples/intrpt.c b/examples/intrpt.c index 0e7a946..226202f 100644 --- a/examples/intrpt.c +++ b/examples/intrpt.c @@ -140,5 +140,4 @@ void cleanup_module() } MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Bob Mottram"); MODULE_DESCRIPTION("Handle some GPIO interrupts"); diff --git a/examples/ioctl.c b/examples/ioctl.c index 3b7fe5a..73af12b 100644 --- a/examples/ioctl.c +++ b/examples/ioctl.c @@ -213,5 +213,4 @@ module_init(ioctl_init); module_exit(ioctl_exit); MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Wang Chen Shu"); MODULE_DESCRIPTION("This is test_ioctl module"); diff --git a/examples/kbleds.c b/examples/kbleds.c index c734653..873166d 100644 --- a/examples/kbleds.c +++ b/examples/kbleds.c @@ -12,7 +12,6 @@ #include /* For vc_cons */ MODULE_DESCRIPTION("Example module illustrating the use of Keyboard LEDs."); -MODULE_AUTHOR("Daniele Paolo Scarpazza"); MODULE_LICENSE("GPL"); struct timer_list my_timer; diff --git a/examples/other/cat_noblock.c b/examples/other/cat_noblock.c index 574dab7..d427bd0 100644 --- a/examples/other/cat_noblock.c +++ b/examples/other/cat_noblock.c @@ -1,6 +1,5 @@ /* cat_noblock.c - open a file and display its contents, but exit rather than * wait for input */ -/* Copyright (C) 1998 by Ori Pomerantz */ #include /* for errno */ #include /* for open */ diff --git a/examples/print_string.c b/examples/print_string.c index 5ff68c7..c3add58 100644 --- a/examples/print_string.c +++ b/examples/print_string.c @@ -11,7 +11,6 @@ #include /* For LINUX_VERSION_CODE */ MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Peter Jay Salzman"); static void print_string(char *str) { diff --git a/examples/procfs4.c b/examples/procfs4.c index 4d63424..e2dc57c 100644 --- a/examples/procfs4.c +++ b/examples/procfs4.c @@ -16,7 +16,6 @@ #define PROC_NAME "iter" -MODULE_AUTHOR("Philippe Reynes"); MODULE_LICENSE("GPL"); /** diff --git a/examples/sched.c b/examples/sched.c index 60b0d5f..3f94bc2 100644 --- a/examples/sched.c +++ b/examples/sched.c @@ -25,5 +25,4 @@ void cleanup_module() } MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Bob Mottram"); MODULE_DESCRIPTION("Workqueue example"); diff --git a/lkmpg.tex b/lkmpg.tex index 12ddd1b..19dfcfc 100644 --- a/lkmpg.tex +++ b/lkmpg.tex @@ -399,12 +399,15 @@ REGPARM 4KSTACKS gcc-3.3' should be '2.6.5-1.358 686 REGPARM 4KSTACKS gcc-3.3' In other words, your kernel refuses to accept your module because version strings (more precisely, version magics) do not match. Incidentally, version magics are stored in the module object in the form of a static string, starting with vermagic:. Version data are inserted in your module when it is linked against the \textbf{init/vermagic.o} file. To inspect version magics and other strings stored in a given module, issue the modinfo module.ko command: \begin{verbatim} -# sudo modinfo hello-4.ko -license: GPL -author: Bob Mottram +# modinfo hello-4.ko description: A sample driver -vermagic: 5.6.7-1.358 amd64 REGPARM 4KSTACKS gcc-4.9.2 +author: LKMPG +license: GPL +srcversion: B2AA7FBFCC2C39AED665382 depends: +retpoline: Y +name: hello_4 +vermagic: 5.4.0-70-generic SMP mod_unload modversions \end{verbatim} To overcome this problem we could resort to the \textbf{--force-vermagic} option, but this solution is potentially unsafe, and unquestionably inacceptable in production modules. Consequently, we want to compile our module in an environment which was identical to the one in which our precompiled kernel was built. How to do this, is the subject of the remainder of this chapter.