]> git.baikalelectronics.ru Git - kernel.git/commit
module: export module signature enforcement status
authorBruno E. O. Meneguele <brdeoliv@redhat.com>
Tue, 24 Oct 2017 17:37:00 +0000 (15:37 -0200)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Wed, 8 Nov 2017 20:16:36 +0000 (15:16 -0500)
commit1a3a157ba1259a80f05aed7cb6da6445d29cd8da
treec3df3df519da44cda091f23764425cae97715d26
parent4bc174c4221d34fee91b26412c6aedfd194dcad7
module: export module signature enforcement status

A static variable sig_enforce is used as status var to indicate the real
value of CONFIG_MODULE_SIG_FORCE, once this one is set the var will hold
true, but if the CONFIG is not set the status var will hold whatever
value is present in the module.sig_enforce kernel cmdline param: true
when =1 and false when =0 or not present.

Considering this cmdline param take place over the CONFIG value when
it's not set, other places in the kernel could misbehave since they
would have only the CONFIG_MODULE_SIG_FORCE value to rely on. Exporting
this status var allows the kernel to rely in the effective value of
module signature enforcement, being it from CONFIG value or cmdline
param.

Signed-off-by: Bruno E. O. Meneguele <brdeoliv@redhat.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
include/linux/module.h
kernel/module.c