From: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
To: Randy Dunlap <rdunlap@infradead.org>, jeyu@kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] module: Allow to disable modsign in kernel cmdline
Date: Tue, 28 Apr 2020 13:03:49 +0800 [thread overview]
Message-ID: <546660e1-6128-95a1-fbfe-10a9d3b0f6fb@linux.alibaba.com> (raw)
In-Reply-To: <713892bf-ffe8-8cfd-b2c5-7090626c02fe@infradead.org>
On 2020/4/28 11:47, Randy Dunlap wrote:
> On 4/27/20 8:43 PM, Tianjia Zhang wrote:
>> This change allows to disable modsign completely at the beginning,
>> and turn off by set the kernel cmdline `no_modsig_enforce` when
>> CONFIG_MODULE_SIG_FORCE is enabled.
>>
>> Yet another change allows to always show the current status of
>> modsign through `/sys/module/module/parameters/sig_enforce`.
>>
>> Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
>> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
>> ---
>> kernel/module.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/kernel/module.c b/kernel/module.c
>> index 646f1e2330d2..0e68e1286377 100644
>> --- a/kernel/module.c
>> +++ b/kernel/module.c
>> @@ -269,6 +269,14 @@ static void module_assert_mutex_or_preempt(void)
>>
>> static bool sig_enforce = IS_ENABLED(CONFIG_MODULE_SIG_FORCE);
>> module_param(sig_enforce, bool_enable_only, 0644);
>> +#ifdef CONFIG_MODULE_SIG_FORCE
>> +static int __init set_no_modsig_enforce(char *str)
>> +{
>> + sig_enforce = false;
>> + return 1;
>> +}
>> +__setup("no_modsig_enforce", set_no_modsig_enforce);
>> +#endif /* !CONFIG_MODULE_SIG_FORCE */
>>
>> /*
>> * Export sig_enforce kernel cmdline parameter to allow other subsystems rely
>>
>
> Hi,
> Please document this cmdline option, probably in
> Documentation/admin-guide/kernel-parameters.txt.
>
> thanks.
>
Thanks for your information, I will submit a v2 patch.
Thanks and best,
Tianjia
prev parent reply other threads:[~2020-04-28 5:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 3:43 Tianjia Zhang
2020-04-28 3:47 ` Randy Dunlap
2020-04-28 5:03 ` Tianjia Zhang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=546660e1-6128-95a1-fbfe-10a9d3b0f6fb@linux.alibaba.com \
--to=tianjia.zhang@linux.alibaba.com \
--cc=jeyu@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®