All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Pearson <markpearson@lenovo.com>
To: Hans de Goede <hdegoede@redhat.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>, <linux-acpi@vger.kernel.org>
Subject: Re: [External] [PATCH] ACPI / EC: Mark the ec_sys write_support param as module_param_hw()
Date: Wed, 1 Dec 2021 09:06:00 -0500	[thread overview]
Message-ID: <6990b275-9a09-a135-8e9b-d5c963040770@lenovo.com> (raw)
In-Reply-To: <20211125103616.47742-1-hdegoede@redhat.com>


On 2021-11-25 05:36, Hans de Goede wrote:
> Using write_support=1 with the ec_sys module changes the mode of the
> "io" debugfs file to 0600. This will cause any attempts to access it under
> a kernel in lockdown mode to return -EPERM, which makes the entire ec_sys
> module unusable.
> 
> Use the special module_param_hw() macro for module parameters which
> may not be used while in lockdown mode, to avoid this.
> 
> Cc: Mark Pearson <markpearson@lenovo.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/acpi/ec_sys.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/ec_sys.c b/drivers/acpi/ec_sys.c
> index fd39c14493ab..c074a0fae059 100644
> --- a/drivers/acpi/ec_sys.c
> +++ b/drivers/acpi/ec_sys.c
> @@ -19,7 +19,7 @@ MODULE_DESCRIPTION("ACPI EC sysfs access driver");
>  MODULE_LICENSE("GPL");
>  
>  static bool write_support;
> -module_param(write_support, bool, 0644);
> +module_param_hw(write_support, bool, other, 0644);
>  MODULE_PARM_DESC(write_support, "Dangerous, reboot and removal of battery may "
>  		 "be needed.");
>  
> 
Looks good to me. Thanks Hans
Mark

  reply	other threads:[~2021-12-01 14:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25 10:36 [PATCH] ACPI / EC: Mark the ec_sys write_support param as module_param_hw() Hans de Goede
2021-12-01 14:06 ` Mark Pearson [this message]
2021-12-01 19:21   ` [External] " Rafael J. Wysocki

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=6990b275-9a09-a135-8e9b-d5c963040770@lenovo.com \
    --to=markpearson@lenovo.com \
    --cc=hdegoede@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.