lkml.org 
[lkml]   [2018]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/7] pipe, sysctl: drop 'min' parameter from pipe-max-size converter
On Tue, Jan 09, 2018 at 02:20:45PM -0800, Kees Cook wrote:
> On Sun, Jan 7, 2018 at 9:35 PM, Eric Biggers <ebiggers3@gmail.com> wrote:
> > From: Eric Biggers <ebiggers@google.com>
> >
> > Before validating the given value against pipe_min_size,
> > do_proc_dopipe_max_size_conv() calls round_pipe_size(), which rounds the
> > value up to pipe_min_size. Therefore, the second check against
> > pipe_min_size is redundant. Remove it.
>
> Well, it's not redundant: it provides a hint to anyone trying to tweak
> the sysctl about the minimum value. I think this should stay, but that
> pipe_min_size should be made const.
>
> -Kees
>

It *is* redundant, because it doesn't do anything. round_pipe_size() already
rounds the value up to the minimum.

Eric

\
 
 \ /
  Last update: 2018-01-14 23:20    [W:1.075 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site