The hello.ko cannot see any information by using insmod

hello.c

#include <linux/module.h>


static int __init hello_init(void) {
  printk("<1>" "Hello Example Init
");
  return 0;
}


static void __exit hello_exit(void) {
  printk("<1>" "Hello Example Exit
");
}


module_init(hello_init);
module_exit(hello_exit);
MODULE_AUTHOR("Hubert Huang");
MODULE_DESCRIPTION("Hello World Example");
MODULE_LICENSE("GPL v2");

I cannot see “Hello Example Init” in my konsole or dmesg(insmod hello: module_layout: kernel tainted. rmmod Disabling lock debugging due to kernel taint).But after insmod hello.ko, I can see “hello” is there by using lsmod.
Did I make something wrong or does it matter systemd or openSUSE?

“insmod hello: module_layout: kernel tainted. rmmod Disabling lock debugging due to kernel taint” may be wrong.

On 2015-06-25 05:16, hyx0408 wrote:
>
> “insmod hello: module_layout: kernel tainted. rmmod Disabling lock
> debugging due to kernel taint” may be wrong.

Is your kernel tainted or not? The boot log might say, although later
actions may taint it.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

No. I try insmod and rmmod hello.ko several times, there is no more “kernel tainted” information merging in dmesg.

Ooops~~~! You are right! The hello.ko really tainted the kernel that I consider “signature and/or required key missing” cause it. I’m working on it, now. Do you have any advise?
Thank you for your reply.

I may be wrong, by IMHO you are trying to program something. Then why is this in Hardware, were other programmers will not realy look?

When you want this moved to Development > Programming/Scripting, please ask so here and I will do that.

On 2015-06-26 10:26, hcvv wrote:
>
> I may be wrong, by IMHO you are trying to program something. Then why is
> this in Hardware, were other programmers will not realy look?

I would agree.

I’m interested in learning how to make kernel modules, so I can not help
someone explaining how to do it :wink:


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))