From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Earl Chew <echew@ixiacom.com>, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Eric Paris <eparis@redhat.com>,
"Serge E. Hallyn" <serge.hallyn@canonical.com>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
<adobriyan@gmail.com>
Subject: Re: [PATCH] Support single byte reads from integers published in procfs by kernel/sysctl.c
Date: Tue, 24 Jan 2012 22:28:51 -0800 [thread overview]
Message-ID: <m1hazke1ng.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20120124145037.f8223e37.akpm@linux-foundation.org> (Andrew Morton's message of "Tue, 24 Jan 2012 14:50:37 -0800")
Andrew Morton <akpm@linux-foundation.org> writes:
> On Mon, 23 Jan 2012 08:47:51 -0800
> Earl Chew <echew@ixiacom.com> wrote:
>
>> > Rereading different bytes of the integer multiple times when the integer
>> > may be changing does not seem like a reasonable implementation.
>>
>> Yes. I agree with you. I shall re-work the patch as per your suggestion.
>
> Yes, this is a bug and procfs should support byte-at-a-time reading of these
> strings. And yes, they are strings! Of digits.
>
> We fixed an instance of this in procfs a while ago (maybe a year ago?).
> But I forget where it was. It is surprising that a bug of this nature
> survived so long.
In the one value per file take on things where the expectation and
normal practice is to read or write the entire file not just a little
bit of it, I don't think it is that surprising.
At the same time I am more embarrassed that not long ago a bug was added
to sysctl where if someone makes a sysctl file pollable and then removes
the module we can oops the kernel merely by keeping that file open. So
far we are safe because no one has used the polling support on anything
that is modular but...
Eric
next prev parent reply other threads:[~2012-01-25 6:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-22 18:46 [PATCH] Support single byte reads from integers published in procfs by kernel/sysctl.c Earl Chew
2012-01-23 14:47 ` Eric W. Biederman
2012-01-23 15:49 ` Earl Chew
2012-01-23 16:35 ` Eric W. Biederman
2012-01-23 16:43 ` Eric W. Biederman
2012-01-23 16:47 ` Earl Chew
2012-01-24 22:50 ` Andrew Morton
2012-01-25 6:28 ` Eric W. Biederman [this message]
2012-01-25 15:27 ` Earl Chew
2012-01-29 22:56 ` Earl Chew
2012-01-30 0:15 ` Eric W. Biederman
2012-01-30 1:13 ` Earl Chew
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=m1hazke1ng.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=a.p.zijlstra@chello.nl \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=echew@ixiacom.com \
--cc=eparis@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=serge.hallyn@canonical.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.