module: limit enabling module.sig_enforce
stable inclusion from stable-5.10.47 commit 3051f230f19feb02dfe5b36794f8c883b576e184 bugzilla: 172973 https://gitee.com/openeuler/kernel/issues/I4DAKB Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3051f230f19feb02dfe5b36794f8c883b576e184 -------------------------------- [ Upstream commit 0c18f29a ] Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/sig_enforce dependent on CONFIG_MODULE_SIG=y. Fixes: fda784e5 ("module: export module signature enforcement status") Reported-by: NNayna Jain <nayna@linux.ibm.com> Tested-by: NMimi Zohar <zohar@linux.ibm.com> Tested-by: NJessica Yu <jeyu@kernel.org> Signed-off-by: NMimi Zohar <zohar@linux.ibm.com> Signed-off-by: NJessica Yu <jeyu@kernel.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录