linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Eric Sandeen <sandeen@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	fsdevel <linux-fsdevel@vger.kernel.org>,
	netdev@vger.kernel.org, Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH] sysctl: Fix proc_do_large_bitmap for large input buffers
Date: Tue, 19 Mar 2019 15:30:05 +0000	[thread overview]
Message-ID: <20190319153005.GA1146@42.do-not-panic.com> (raw)
In-Reply-To: <0ffd0eea-ca64-0128-2835-a9856b224e07@sandeen.net>

On Mon, Mar 04, 2019 at 10:43:09PM -0600, Eric Sandeen wrote:
> On 2/20/19 5:32 PM, Eric Sandeen wrote:
> > Today, proc_do_large_bitmap() truncates a large write input buffer
> > to PAGE_SIZE - 1, which may result in misparsed numbers at the
> > (truncated) end of the buffer.  Further, it fails to notify the caller
> > that the buffer was truncated, so it doesn't get called iteratively
> > to finish the entire input buffer.
> > 
> > Tell the caller if there's more work to do by adding the skipped
> > amount back to left/*lenp before returning.
> > 
> > To fix the misparsing, reset the position if we have completely
> > consumed a truncated buffer (or if just one char is left, which
> > may be a "-" in a range), and ask the caller to come back for
> > more.
> > 
> > Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> 
> Would be nice to fix this bug.  I submitted the test node patch as well
> as an attempt to integrate it into the test harness, though there's
> wonkiness there still, and I could use more experienced eyes.

Sorry for the delay.

I'm rolling these changes in with some minor adjustments, can you send
me your respective lib/test_sysctl.c changes? I don't see that they had
been sent.

  Luis

  reply	other threads:[~2019-03-19 15:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-20 23:32 [PATCH] sysctl: Fix proc_do_large_bitmap for large input buffers Eric Sandeen
2019-02-20 23:35 ` Eric Sandeen
2019-02-21 15:18   ` Luis Chamberlain
2019-02-21 17:47     ` Eric Sandeen
2019-02-21 17:52       ` Luis Chamberlain
2019-02-21 17:59         ` Eric Sandeen
2019-02-21 17:45 ` [PATCH] sysctl: add proc_do_large_bitmap test node Eric Sandeen
2019-02-21 18:40   ` Kees Cook
2019-02-21 18:43   ` [PATCH] test_sysctl: add proc_do_large_bitmap test function Eric Sandeen
2019-02-21 19:01     ` Eric Sandeen
2019-02-21 19:16     ` [PATCH V2] " Eric Sandeen
2019-03-05  4:43 ` [PATCH] sysctl: Fix proc_do_large_bitmap for large input buffers Eric Sandeen
2019-03-19 15:30   ` Luis Chamberlain [this message]
2019-03-19 15:57     ` Luis Chamberlain

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=20190319153005.GA1146@42.do-not-panic.com \
    --to=mcgrof@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=sandeen@sandeen.net \
    /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).