From: Dave Jones <davej@redhat.com>
To: David Rientjes <rientjes@google.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] Set bounds on what /proc/self/make-it-fail accepts.
Date: Tue, 18 Feb 2014 18:27:02 -0500 [thread overview]
Message-ID: <20140218232702.GA26051@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1402181429060.20772@chino.kir.corp.google.com>
On Tue, Feb 18, 2014 at 02:32:02PM -0800, David Rientjes wrote:
> On Tue, 18 Feb 2014, Dave Jones wrote:
>
> > /proc/self/make-it-fail is a boolean, but accepts any number, including
> > negative ones. Change variable to unsigned, and cap upper bound at 1.
>
> Hmm, this would break anything that uses anything other than one to enable
> it, but it looks like Documentation/fault-injection/fault-injection.txt
> only provides an example for when it does equal one, so it's probably an
> ok change. I'm just wondering why non-zero is wrong? Is this an
> interface that will be extended to support other modes?
"Wrong" is perhaps too strong a word, but we only ever check it for non-zero state,
so it seems at best suboptimal to allow strange configurations.
When I saw I could set it to nonsense values like -1, I figured it could
use some idiot proofing. The lack of any checking at all surprised me.
Future extension of this interface seems unlikely given the boolean sounding name.
(Though we've done that in the past with things like the overcommit_memory sysctl,
with pretty awful end-user results).
Dave
next prev parent reply other threads:[~2014-02-18 23:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-18 22:06 [PATCH] Set bounds on what /proc/self/make-it-fail accepts Dave Jones
2014-02-18 22:32 ` David Rientjes
2014-02-18 23:27 ` Dave Jones [this message]
2014-02-19 13:48 ` Akinobu Mita
2014-02-19 21:37 ` David Rientjes
2014-02-19 21:40 ` Andrew Morton
2014-02-19 21:55 ` Dave Jones
2014-02-19 22:00 ` Andrew Morton
2014-02-19 22:07 ` David Rientjes
2014-02-19 22:31 ` Dave Jones
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=20140218232702.GA26051@redhat.com \
--to=davej@redhat.com \
--cc=akinobu.mita@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rientjes@google.com \
--cc=viro@zeniv.linux.org.uk \
/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