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]
Date:   Tue, 7 May 2019 17:07:43 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Randy Dunlap <rdunlap@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        "linux-watchdog@...r.kernel.org" <linux-watchdog@...r.kernel.org>
Cc:     Vladimir Zapolskiy <vladimir_zapolskiy@...tor.com>,
        Wim Van Sebroeck <wim@...ux-watchdog.org>
Subject: Re: [PATCH] watchdog: fix watchdog_pretimeout.c build error when no
 default gov. is set

On 5/7/19 4:33 PM, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@...radead.org>
> 
> Fix build error when
> CONFIG_WATCHDOG_PRETIMEOUT_GOV=y
> # CONFIG_WATCHDOG_PRETIMEOUT_GOV_NOOP is not set
> # CONFIG_WATCHDOG_PRETIMEOUT_GOV_PANIC is not set
> 
> Fixes this build error:
> 
> ../drivers/watchdog/watchdog_pretimeout.c: In function ‘watchdog_register_governor’:
> ../drivers/watchdog/watchdog_pretimeout.c:139:26: error: ‘WATCHDOG_PRETIMEOUT_DEFAULT_GOV’ undeclared (first use in this function)
>    if (!strncmp(gov->name, WATCHDOG_PRETIMEOUT_DEFAULT_GOV,
> 

Ah, I knew I missed something. The following would be a better fix,
though, since it enforces that at least one pretimeout governor is enabled
(matching the old code):

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index e19960ace0c0..4a3461afa96f 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -71,6 +71,12 @@ config WATCHDOG_PRETIMEOUT_GOV
         help
           The option allows to select watchdog pretimeout governors.

+config WATCHDOG_PRETIMEOUT_GOV_SEL
+       tristate
+       depends on WATCHDOG_PRETIMEOUT_GOV
+       default m
+       select WATCHDOG_PRETIMEOUT_GOV_PANIC if WATCHDOG_PRETIMEOUT_GOV_NOOP=n
+
  if WATCHDOG_PRETIMEOUT_GOV

Can you send v2 with the above, or do you want me to send it and give you credit ?

Thanks,
Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ