rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Loading an out-of-tree module
@ 2021-04-29 14:32 Carlos
  2021-04-29 14:38 ` Sven Van Asbroeck
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Carlos @ 2021-04-29 14:32 UTC (permalink / raw)
  To: rust-for-linux

Good morning (or good afternoon) to all,

I managed to build an out-of-tree HelloWorld module. However, when I 
tried loading it in the kernel (booted with eudyptula-boot)
and dmesg inside the shell, I get a 'loading out-of-tree module taints kernel':

struct HelloWorld;

impl KernelModule for HelloWorld {
    fn init() -> KernelResult<Self> {
        pr_alert!("This is a rust kernel module");

        Ok(HelloWorld {})
    }
}

impl Drop for HelloWorld {
    fn drop(&mut self) {
        pr_alert!("Dropping rust kmod!");
    }
} 

[...]

$ insmod hello_world.kmod
$ dmesg | tail -1
[   38.462244] hello_world: loading out-of-tree module taints kernel.
$ rmmod hello_world 
[   38.462402] hello_world: This is a rust kernel module 
$ insmod hello_world.ko
[  315.360871] hello_world: Dropping rust kmod!
$ dmesg | tail -2
[   38.462402] hello_world: This is a rust kernel module
[  315.360871] hello_world: Dropping rust kmod!

And from then on all module messages are one off.
Is the 'loading out-of-tree module taints kernel' messsage something you
can disable at .config? Or is it something particular to eudyptula-boot?

Thank you for your patience,
Carlos

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-29 16:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 14:32 Loading an out-of-tree module Carlos
2021-04-29 14:38 ` Sven Van Asbroeck
2021-04-29 14:52 ` Sven Van Asbroeck
2021-04-29 15:16 ` Greg KH
2021-04-29 15:56   ` Carlos
2021-04-29 16:05     ` Wedson Almeida Filho
2021-04-29 16:06     ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).