linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Stanislav German-Evtushenko <ginermail@gmail.com>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>,
	"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>
Subject: Re: [PATCH] watchdog: Device must be opened for writing
Date: Sat, 14 Aug 2021 18:33:19 -0700	[thread overview]
Message-ID: <b9818198-48f1-c75e-2dbe-eabfc36b6725@roeck-us.net> (raw)
In-Reply-To: <CAPeRZrV+HwdmBKFB3tmG_tEHjsR8h3WLxKQYGDLOLgw178oq=A@mail.gmail.com>

On 8/14/21 5:19 PM, Stanislav German-Evtushenko wrote:
> On Saturday, August 14, 2021, Guenter Roeck <linux@roeck-us.net <mailto:linux@roeck-us.net>> 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 <ginermail@gmail.com <mailto:ginermail@gmail.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

  parent reply	other threads:[~2021-08-15  1:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-14 19:13 [PATCH] watchdog: Device must be opened for writing 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 [this message]
2021-08-15  4:32       ` Stanislav German-Evtushenko

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=b9818198-48f1-c75e-2dbe-eabfc36b6725@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=ginermail@gmail.com \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=wim@linux-watchdog.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).