lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <097b8aff-70f4-bd0f-e561-60a773b3231c@redhat.com>
Date:   Tue, 23 Mar 2021 21:58:50 +0100
From:   Hans de Goede <hdegoede@...hat.com>
To:     Luca Stefani <luca.stefani.ge1@...il.com>
Cc:     Corentin Chary <corentin.chary@...il.com>,
        Mark Gross <mgross@...ux.intel.com>,
        acpi4asus-user@...ts.sourceforge.net,
        platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] platform/x86: asus-wmi: Add param to turn fn-lock mode
 on by default

Hi,

On 3/23/21 9:25 PM, Luca Stefani wrote:
> * On recent ZenBooks the fn-lock is disabled
>   by default on boot while running Windows.
> 
> * Add a module param ( fnlock_default ) that allows
>   changing the default at probe time
> 
> Signed-off-by: Luca Stefani <luca.stefani.ge1@...il.com>
> ---
>  drivers/platform/x86/asus-wmi.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index 9ca15f724343..f3ed72f01462 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -47,6 +47,9 @@ MODULE_AUTHOR("Corentin Chary <corentin.chary@...il.com>, "
>  MODULE_DESCRIPTION("Asus Generic WMI Driver");
>  MODULE_LICENSE("GPL");
>  
> +static bool fnlock_default = false;

The initial value of this needs to be true, so that there is no behavioral
change when people upgrade from a kernel without this to one with it.

And then people who want a different behavior can get that by setting
the module option.

Regards,

Hans


> +module_param(fnlock_default, bool, 0444);
> +
>  #define to_asus_wmi_driver(pdrv)					\
>  	(container_of((pdrv), struct asus_wmi_driver, platform_driver))
>  
> @@ -2673,7 +2676,7 @@ static int asus_wmi_add(struct platform_device *pdev)
>  		err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL);
>  
>  	if (asus_wmi_has_fnlock_key(asus)) {
> -		asus->fnlock_locked = true;
> +		asus->fnlock_locked = fnlock_default;
>  		asus_wmi_fnlock_update(asus);
>  	}
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ