From: Stanislav German-Evtushenko <email@example.com> To: Guenter Roeck <firstname.lastname@example.org> Cc: Wim Van Sebroeck <email@example.com>, "firstname.lastname@example.org" <email@example.com> Subject: Re: [PATCH] watchdog: Device must be opened for writing Date: Sun, 15 Aug 2021 04:32:13 +0000 [thread overview] Message-ID: <CAPeRZrWeiQRWhVi5N2ho=RhvaSjR4NcMFGgewWkfM5tj+tSRaQ@mail.gmail.com> (raw) In-Reply-To: <firstname.lastname@example.org> On 8/15/21, Guenter Roeck <email@example.com> wrote: > On 8/14/21 5:19 PM, Stanislav German-Evtushenko wrote: >> On Saturday, August 14, 2021, Guenter Roeck <firstname.lastname@example.org >> <mailto:email@example.com>> wrote: >> > On Sun, Aug 15, 2021 at 04:13:45AM +0900, Stanislav German-Evtushenko >> wrote: >> >> If userspace opens the watchdog device self-feeding stops. Sometimes >> >> opening the device happens by accident, e.g. by mistakenly running >> grep >> >> recursively in a wrong directory which leads to the server being >> reset. >> >> >> >> Watchdog device does not handle read operation therefore the issue can >> be >> >> prevented by requiring the device to be opened for writing: >> >> >> >> - Prevent opening the device without FMODE_WRITE >> >> >> >> Signed-off-by: Stanislav German-Evtushenko <firstname.lastname@example.org >> <mailto:email@example.com>> >> > >> > NACK. That would be a major undocumented ABI change. Opening >> /dev/watchdog >> > for reading can be and is used today to test a watchdog. >> > >> > Guenter >> > >> >> I see. This is unfortunate. >> >> In this case I'll try to find the right place in the documentation and >> make it more explicit unless it is already there and I've overlooked. >> > No. That isn't the point. This is used and must not be changed. > Again, people (including me( are _using_ this to test watchdogs. > We are not going to disable that because some people are not > careful when executing commands as root. > > Guenter > I mean I would describe the existing behavior as this is not obvious. As for testing, opening for writing is not harder than for reading but I understand that it would be a breaking change now.
prev parent reply other threads:[~2021-08-15 4:32 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-14 19:13 Stanislav German-Evtushenko 2021-08-14 19:56 ` Guenter Roeck [not found] ` <CAPeRZrV+HwdmBKFB3tmG_tEHjsR8h3WLxKQYGDLOLgw178oq=A@mail.gmail.com> 2021-08-15 1:33 ` Guenter Roeck 2021-08-15 4:32 ` Stanislav German-Evtushenko [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAPeRZrWeiQRWhVi5N2ho=RhvaSjR4NcMFGgewWkfM5tj+tSRaQ@mail.gmail.com' \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH] watchdog: Device must be opened for writing' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).