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-next>] [day] [month] [year] [list]
Message-ID: <20250522055715.3533356-1-george.cherian@marvell.com>
Date: Thu, 22 May 2025 05:57:13 +0000
From: George Cherian <george.cherian@...vell.com>
To: <linux@...ck-us.net>, <wim@...ux-watchdog.org>, <a.fatoum@...gutronix.de>
CC: <linux-watchdog@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        "George
 Cherian" <george.cherian@...vell.com>
Subject: [RESEND PATCH v5 0/2] Add reset_on_panic support for watchdog

This series adds a new option to watchdog core to reconfigure the
watchdog timeout on panic. This is useul in certain systems which prevents
successful loading of kdump kernel due to watchdog reset.

Some of the watchdog drivers ops could sleep. For such drivers the 
reset_on_panic is not valid as the notifier callback happens
in atomic context. Introduce WDIOF_OPS_ATOMIC flag to watchdog_info
options to indicate whether the stop/set_timeout function would sleep.


Changelog:
v1 -> v2
- Remove the per driver flag setting option
- Take the parameter via kernel command-line parameter to watchdog_core.

v2 -> v3
- Remove the helper function watchdog_stop_on_panic() from watchdog.h.
- There are no users for this. 

v3 -> v4
- Since the panic notifier is in atomic context, watchdog functions
  which sleep can't be called. 
- Add an options flag WDIOF_STOP_MAYSLEEP to indicate whether stop
  function sleeps.
- Simplify the stop_on_panic kernel command line parsing.
- Enable the panic notiffier only if the watchdog stop function doesn't
  sleep

v4 -> v5
- Remove the kernel command line option.
- Incorporate the suggestions by Ahamad Fatoum.
- Give an option to watchdog core to set the timeout in case of panic.
- This timeout is configurable runtime via sysfs.
- This way it addresses all the watchdogs as long as they have watchdog
  ops  atomic.
- Enable this feature to sbsa watchdog.

George Cherian (2):
  drivers: watchdog: Introduce watchdog reset timeout on panic
  drivers: sbsa_gwdt: Enable the reset_on_panic feature

 drivers/watchdog/sbsa_gwdt.c     |  3 +++
 drivers/watchdog/watchdog_core.c | 33 ++++++++++++++++++++++++++++++++
 drivers/watchdog/watchdog_dev.c  | 28 +++++++++++++++++++++++++++
 include/linux/watchdog.h         |  3 +++
 include/uapi/linux/watchdog.h    |  1 +
 5 files changed, 68 insertions(+)

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ