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: <6803158b-27b2-63ae-1720-72d9da78df1f@roeck-us.net>
Date:   Mon, 16 Jul 2018 06:31:12 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     michele.dionisio@...il.com, wim@...ux-watchdog.org,
        linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Michele Dionisio <michele.dionisio@...ersoft.com>
Subject: Re: watchdog: davinci_wdt: add possibility to configure watchdog
 period

On 07/16/2018 05:19 AM, michele.dionisio@...il.com wrote:
> From: Michele Dionisio <michele.dionisio@...ersoft.com>
> 
> It is not possible to implement setting of watchdog period because it is
> not possible to stop watchdog so it is nice to have possibility to
> configure watchdog period at module loading.
> 
> Signed-off-by: Michele Dionisio <michele.dionisio@...il.com>
> 
> diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
> index 6c6594261cb7..5f95afa20fee 100644
> --- a/drivers/watchdog/davinci_wdt.c
> +++ b/drivers/watchdog/davinci_wdt.c
> @@ -54,6 +54,10 @@
>   #define WDKEY_SEQ0		(0xa5c6 << 16)
>   #define WDKEY_SEQ1		(0xda7e << 16)
>   
> +static unsigned int init_timeout;
> +module_param(init_timeout, uint, 0);
> +MODULE_PARM_DESC(init_timeout, "initial watchdog timeout (in seconds)");
> +
>   static int heartbeat;
>   
>   /*
> @@ -223,8 +227,10 @@ static int davinci_wdt_probe(struct platform_device *pdev)
>   	wdd->ops		= &davinci_wdt_ops;
>   	wdd->min_timeout	= 1;
>   	wdd->max_timeout	= MAX_HEARTBEAT;
> -	wdd->timeout		= DEFAULT_HEARTBEAT;
> -	wdd->parent		= &pdev->dev;
> +	if ((init_timeout >= 1) && (init_timeout <= MAX_HEARTBEAT))
> +		wdd->timeout = init_timeout;
> +	else
> +		wdd->timeout = DEFAULT_HEARTBEAT;
>   
>   	watchdog_init_timeout(wdd, heartbeat, dev);
>   

NACK. This is done with the 'heartbeat' module parameter already.

Guenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ