Re: [PATCH v3 2/3] docs: watchdog: npcm: Add reset status description
| Newsgroups | org.kernel.vger.linux-watchdog,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] The watchdog driver abuses standard Watchdog UAPI constants to report non-watchdog platform reset causes, violating the userspace ABI contract. -- commit 72fd6c8b87d96376853f3dcd5ef1597495cf9817 Author: Tomer Maimon <[email protected]> docs: watchdog: npcm: Add reset status description Add documentation describing how the NPCM watchdog driver reports reset causes through bootstatus on NPCM750 and NPCM845 systems. > diff --git a/Documentation/watchdog/npcm_wdt.rst b/Documentation/watchdog/npcm_wdt.rst > new file mode 100644 > index 0000000000000..cdc45ade9e0d9 > --- /dev/null > +++ b/Documentation/watchdog/npcm_wdt.rst [ ... ] > +.. list-table:: Reset-cause mapping > + :header-rows: 1 > + > + * - Platform > + - Reset indication > + - Bootstatus flag > + - Reported meaning > + * - NPCM750 and NPCM845 > + - ``PORST`` > + - ``WDIOF_OVERHEAT`` > + - power-on reset > + * - NPCM750 and NPCM845 > + - ``CORST`` > + - ``WDIOF_FANFAULT`` > + - core reset [Severity: High] Is it correct to map generic Watchdog UAPI thermal and fan failure flags to standard platform reset indications? The generic Watchdog API defines strict semantics for its status flags. For instance, WDIOF_OVERHEAT means a reset due to CPU overheat, and WDIOF_FANFAULT means a fan failed. By mapping standard SoC reset causes like Power-On Reset (PORST) to WDIOF_OVERHEAT and Core Reset (CORST) to WDIOF_FANFAULT, might this break the userspace ABI contract? During a normal cold boot, reading the SoC latch would unconditionally expose this to userspace via the WDIOC_GETBOOTSTATUS ioctl or sysfs. Standard userspace monitoring daemons (like systemd or wdctl) reading bootstatus might erroneously conclude the system suffered a thermal event or fan failure, potentially triggering unintended emergency actions or false alarms. -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2