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:   Mon, 26 Aug 2019 20:13:35 +0200
From:   Bruno Thomsen <bruno.thomsen@...il.com>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Yuehaibing <yuehaibing@...wei.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        a.zummo@...ertech.it, linux-rtc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] rtc: pcf2127: Fix build error without CONFIG_WATCHDOG_CORE

Den man. 26. aug. 2019 kl. 15.20 skrev Guenter Roeck <linux@...ck-us.net>:
>
> On 8/26/19 1:12 AM, Yuehaibing wrote:
> >
> >
> > On 2019/8/23 22:05, Alexandre Belloni wrote:
> >> On 23/08/2019 20:45:53+0800, YueHaibing wrote:
> >>> If WATCHDOG_CORE is not set, build fails:
> >>>
> >>> drivers/rtc/rtc-pcf2127.o: In function `pcf2127_probe.isra.6':
> >>> drivers/rtc/rtc-pcf2127.c:478: undefined reference to `devm_watchdog_register_device'
> >>>
> >>> Add WATCHDOG_CORE Kconfig dependency to fix this.
> >>>
> >>> Reported-by: Hulk Robot <hulkci@...wei.com>
> >>> Fixes: bbc597561ce1 ("rtc: pcf2127: add watchdog feature support")
> >>> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> >>> ---
> >>>   drivers/rtc/Kconfig | 2 ++
> >>>   1 file changed, 2 insertions(+)
> >>>
> >>> diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
> >>> index 25af63d..9dce7dc 100644
> >>> --- a/drivers/rtc/Kconfig
> >>> +++ b/drivers/rtc/Kconfig
> >>> @@ -886,6 +886,8 @@ config RTC_DRV_DS3232_HWMON
> >>>   config RTC_DRV_PCF2127
> >>>     tristate "NXP PCF2127"
> >>>     depends on RTC_I2C_AND_SPI
> >>> +   depends on WATCHDOG
> >>
> >> Definitively not, I fixed it that way:
> >> +       select WATCHDOG_CORE if WATCHDOG
> >
> >
> > No, this still fails while WATCHDOG is not set
> >
>
> Correct, there are no dummy functions for watchdog device registration.
> There would have to be conditional code in the driver if the watchdog
> is supposed to be optional.

Hi

During review of version 1, there was a wish for the watchdog feature not
to be hidden behind Kconfig option, e.g. RTC_DRV_PCF2127_WDT, as
it would not result in a much bigger driver.

I did not add any other selects/depends on in Kconfig as
RTC_DRV_DS1374_WDT and RTC_DRV_M41T80_WDT options
does not select WATCHDOG_CORE and/or WATCHDOG either.
DS1374 and M41T80 does not seem to check on any other
WATCHDOG defines other then their _WDT Kconfig.

I can create a patch that hides the watchdog code if WATCHDOG
define is not set, if that's the right way?

Bruno

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ