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] [day] [month] [year] [list]
Message-ID: <2cbf879d-8052-29e4-5f2a-40a6562dc4b4@denx.de>
Date:   Fri, 1 Sep 2023 22:59:21 +0200
From:   Marek Vasut <marex@...x.de>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     linux-arm-kernel@...ts.infradead.org,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Antonio Borneo <antonio.borneo@...s.st.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Marc Zyngier <maz@...nel.org>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Richard Cochran <richardcochran@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Wim Van Sebroeck <wim@...ux-watchdog.org>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-watchdog@...r.kernel.org
Subject: Re: [PATCH v2 2/3] watchdog: stm32_iwdg: Add pretimeout support

On 8/6/23 16:19, Guenter Roeck wrote:
> On Wed, May 17, 2023 at 09:43:48PM +0200, Marek Vasut wrote:
>> The STM32MP15xx IWDG adds registers which permit this IP to generate
>> pretimeout interrupt. This interrupt can also be used to wake the CPU
>> from suspend. Implement support for generating this interrupt and let
>> userspace configure the pretimeout. In case the pretimeout is not
>> configured by user, set pretimeout to half of the WDT timeout cycle.

[...]

>>   static int stm32_iwdg_probe(struct platform_device *pdev)
>>   {
>>   	struct device *dev = &pdev->dev;
>> @@ -253,6 +340,11 @@ static int stm32_iwdg_probe(struct platform_device *pdev)
>>   	wdd->max_hw_heartbeat_ms = ((RLR_MAX + 1) * wdt->data->max_prescaler *
>>   				    1000) / wdt->rate;
>>   
>> +	/* Initialize IRQ, this might override wdd->info, hence it is here. */
>> +	ret = stm32_iwdg_irq_init(pdev, wdt);
>> +	if (ret)
>> +		return ret;
>> +
> 
> What if the interrupt fires for whatever reason and the watchdog
> isn't registered yet and the driver data is not set and the
> watchdog core doesn't know about the watchdog ?

That cannot happen since the pretimeout IRQ was not configured yet.
That can only happen once the core is aware of the WDT and calls 
set_pretimeout .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ