8

What is the meaning of (OE+) in the following?

$ sudo cat /proc/modules | grep hello //hello_world is a kernel module created by me.
hello_world 20480 1 - Loading 0xffffffffc0221000 (OE+)

Here is my situation.
I have patched the Linux kernel function load_module(), which is called from finit_module(), the system call used by insmod to insert kernel modules. The patch looks for a specific module, created by me (called hello_world) being installed, and when it does, it prevents the call to do_init_module(), and returns 0 instead. do_init_call() is responsible for calling a module's init function, and setting the module state to live (MODULE_STATE_LIVE).

When I read /proc/modules, the module state is Loading, which is expected. I do not understand however the meaning of (OE+) at the end of output. This is not displayed against any other module, as is verified by the following command.

$ sudo cat /proc/modules | grep OE
hello_world 20480 1 - Loading 0xffffffffc0221000 (OE+)

I am using Linux kernel v4.7.3.

Update

All this is happening in a Qemu virtual machine. On the host, which is running Linux 4.4.0-36-generic (Ubuntu), I get the following.

$ sudo cat /proc/modules | grep OE
vboxpci 24576 0 - Live 0xffffffffc082a000 (OE)
vboxnetadp 28672 0 - Live 0xffffffffc066e000 (OE)
vboxnetflt 28672 0 - Live 0xffffffffc0635000 (OE)
vboxdrv 454656 3 vboxpci,vboxnetadp,vboxnetflt, Live 0xffffffffc0783000 (OE)
sep4_0 671744 0 - Live 0xffffffffc06de000 (OE)
socperf2_0 36864 1 sep4_0, Live 0xffffffffc0660000 (OE)
pax 16384 0 - Live 0xffffffffc05f9000 (OE)
Sam Protsenko
  • 14,045
  • 4
  • 59
  • 75
Sahil Singh
  • 3,352
  • 39
  • 62

1 Answers1

7

O means Out-of-tree module has been loaded.
E means Unsigned module has been loaded.
+ means that the module is being loaded.
- means that the module is being unloaded.

The source code for print_modules(), then module_flags(), and then print_tainted() functions may be helpful in figuring out the meaning of these and some other flags. Take a look at the comment just above print_tainted() function. Hope this helps.

Aleksey
  • 623
  • 5
  • 10
  • Tx,from the file- `P -Proprietary module has been loaded F -Module has been forcibly loaded S -SMP with CPUs not designed for SMP R -User forced a module unload M -System experienced a machine check exception B -System has hit bad_page U -Userspace-defined naughtiness D -Kernel has oopsed before A -ACPI table overridden W -Taint on warning C -modules from drivers/staging are loaded I -Working around severe firmware bug O -Out-of-tree module has been loaded E -Unsigned module has been loaded L -A soft lockup has previously occurred K -Kernel has been live patched` – Sahil Singh Sep 12 '16 at 13:27
  • Following your answer I found the whole table in /kernel/panic.c – Sahil Singh Sep 12 '16 at 13:30