Re: [PATCH] Differentiate scenarios when watchdog is closed

From: Guenter Roeck

Date: Tue Sep 01 2026 - 13:33:21 EST


On 8/31/26 13:05, chaithco@xxxxxxxxxx wrote:
On Thu, 2026-08-27 at 11:10 -0700, Guenter Roeck wrote:
Problem is that we don't know if "something bad happened". The same
message
will be seen if the watchdog daemon was killed or crashed. We can not
just
assume that closing the watchdog device was intentional.

That's the same sticking point I've come across. Differentiating
between positive intentional closure versus malicious or buggy closure
would somehow need to be communicated to the kernel. It makes more
sense that users of the watchdog which intend to close the watchdog
while still running maybe denote such. I opened a PR with systemd at
https://github.com/systemd/systemd/pull/43552 to see if there was some
way this could be tackled from that perspective.

I'd want to see a message even if the watchdog is closed but left running
on purpose. The best we can do is to add another message if there was an
error when trying to stop the watchdog. That should not happen too often
(well, not at all, really, unless there is a bug or hardware problem),
so it would not really add noise.

Thanks,
Guenter