mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jia Zhang <zhang.jia@linux.alibaba.com>
To: Jessica Yu <jeyu@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/4] modsign enhancement
Date: Mon, 12 Mar 2018 22:15:48 +0800	[thread overview]
Message-ID: <6727b467-e2fe-4981-fe77-b9ec3ebf8818@linux.alibaba.com> (raw)
In-Reply-To: <20180312132823.dixp7gkjypjlgymt@redbean.localdomain>



On 2018/3/12 下午9:28, Jessica Yu wrote:
> +++ Jia Zhang [08/03/18 12:26 +0800]:
>> This patch series allows to disable module validity enforcement
>> in runtime through /sys/kernel/security/modsign/enforce interface.
>>
>> Assuming CONFIG_MODULE_SIG_FORCE=y, here are the instructions to
>> disable the validity enforcement.
>>
>> # cat /sys/kernel/security/modsign/enforce
>> # echo -n 0 > data
>> # openssl smime -sign -nocerts -noattr -binary -in data \
>>    -inkey <system_trusted_key> -signer <cert> -outform der \
>>    -out /sys/kernel/security/modsign/enforce
>>
>> Now enable enforcement again on demand.
>>
>> # echo 1 > /sys/kernel/security/modsign/enforce
>>
>> Changelog:
>> v2:
>> - Support to disable validity enforcement in runtime.
> 
> NAK - please use /sys/module/module/parameters/sig_enforce.
> 
> And I would rather keep this parameter bool_enable_only, plain and simple.
> What use case do you have/why would you want to disable signature
> enforcement - after having enabled it - during runtime?  None of this
> is explained nor justified in the cover letter.

Because there is no way to disable it such as module.no_sig_enforce when
MODULE_SIG_FORCE=y available unless re-compiling a kernel without this
enforcement. This is inconvenient a bit. IMA and SELinux both have
cmdline control, but modsign doesn't have.

Even we really have a module.no_sig_enforce in cmdline, runtime
disablement can be used to avoid machine reboot. Sometimes machine
reboot is expensive.

If you agree, I can implement the runtime disablement via
/sys/module/module/parameters/sig_enforce. Additionally, supporting
module.no_sig_enforce when MODULE_SIG_FORCE=y is another one to be
implemented.

Thanks,
Jia

> 
> Thanks,
> 
> Jessica

      reply	other threads:[~2018-03-12 14:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-08  4:26 Jia Zhang
2018-03-08  4:27 ` [PATCH 1/4] module: Do not access sig_enforce directly Jia Zhang
2018-03-08  4:27 ` [PATCH 2/4] module: Create the entry point initialize_module() Jia Zhang
2018-03-08  4:27 ` [PATCH 3/4] module: Support to show the current enforcement policy Jia Zhang
2018-03-08  4:27 ` [PATCH 4/4] module: Support to disable validity enforcement in runtime Jia Zhang
2018-03-12 13:28 ` [PATCH v2 0/4] modsign enhancement Jessica Yu
2018-03-12 14:15   ` Jia 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=6727b467-e2fe-4981-fe77-b9ec3ebf8818@linux.alibaba.com \
    --to=zhang.jia@linux.alibaba.com \
    --cc=jeyu@kernel.org \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome