mbox series

[0/6] sysctl: add pending proc_do_large_bitmap fix

Message ID 20190320222831.8243-1-mcgrof@kernel.org (mailing list archive)
Headers show
Series sysctl: add pending proc_do_large_bitmap fix | expand

Message

Luis Chamberlain March 20, 2019, 10:28 p.m. UTC
Andrew, Kees,

Eric sent a fix out for proc_do_large_bitmap() last month for when
using a large input buffer. After patch review a test case for the issue
was built and submitted. I noticed there were a few issues with the
tests, but instead of just asking Eric to address them I've taken
care of them and ammended the commit where necessary. There's a
few issues he reported which I also address and fix in this series.

Since we *do* expect users of these scripts to also use them on older
kernels, I've also addressed not breaking calling the script for them,
and gives us an easy way to easily extend our tests cases for future
kernels as well.

Before anyone considers these for stable as minor fixes, I'd recommend
we also address the discrepancy on the read side of things: modify the
test script to use diff against the target file instead of using the
temp file.

Eric Sandeen (2):
  test_sysctl: add proc_do_large_bitmap() test case
  sysctl: Fix proc_do_large_bitmap for large input buffers

Luis Chamberlain (4):
  test_sysctl: remove superfluous test_reqs()
  test_sysctl: load module before testing for it
  test_sysctl: ignore diff output on verify_diff_w()
  test_sysctl: allow graceful use on older kernels

 kernel/sysctl.c                          |  30 ++++-
 lib/test_sysctl.c                        |  18 ++-
 tools/testing/selftests/sysctl/sysctl.sh | 161 +++++++++++++++++++----
 3 files changed, 178 insertions(+), 31 deletions(-)

Comments

Kees Cook March 21, 2019, 4:42 p.m. UTC | #1
On Wed, Mar 20, 2019 at 3:28 PM Luis Chamberlain <mcgrof@kernel.org> wrote:
>
> Andrew, Kees,
>
> Eric sent a fix out for proc_do_large_bitmap() last month for when
> using a large input buffer. After patch review a test case for the issue
> was built and submitted. I noticed there were a few issues with the
> tests, but instead of just asking Eric to address them I've taken
> care of them and ammended the commit where necessary. There's a
> few issues he reported which I also address and fix in this series.
>
> Since we *do* expect users of these scripts to also use them on older
> kernels, I've also addressed not breaking calling the script for them,
> and gives us an easy way to easily extend our tests cases for future
> kernels as well.
>
> Before anyone considers these for stable as minor fixes, I'd recommend
> we also address the discrepancy on the read side of things: modify the
> test script to use diff against the target file instead of using the
> temp file.
>
> Eric Sandeen (2):
>   test_sysctl: add proc_do_large_bitmap() test case
>   sysctl: Fix proc_do_large_bitmap for large input buffers
>
> Luis Chamberlain (4):
>   test_sysctl: remove superfluous test_reqs()
>   test_sysctl: load module before testing for it
>   test_sysctl: ignore diff output on verify_diff_w()
>   test_sysctl: allow graceful use on older kernels

Thanks for collecting and updating these!

Acked-by: Kees Cook <keescook@chromium.org>

Andrew, can you carry these?

-Kees

>
>  kernel/sysctl.c                          |  30 ++++-
>  lib/test_sysctl.c                        |  18 ++-
>  tools/testing/selftests/sysctl/sysctl.sh | 161 +++++++++++++++++++----
>  3 files changed, 178 insertions(+), 31 deletions(-)
>
> --
> 2.18.0
>
Eric Sandeen March 21, 2019, 5:13 p.m. UTC | #2
On 3/20/19 5:28 PM, Luis Chamberlain wrote:
> Andrew, Kees,
> 
> Eric sent a fix out for proc_do_large_bitmap() last month for when
> using a large input buffer. After patch review a test case for the issue
> was built and submitted. I noticed there were a few issues with the
> tests, but instead of just asking Eric to address them I've taken
> care of them and ammended the commit where necessary. There's a
> few issues he reported which I also address and fix in this series.
> 
> Since we *do* expect users of these scripts to also use them on older
> kernels, I've also addressed not breaking calling the script for them,
> and gives us an easy way to easily extend our tests cases for future
> kernels as well.
> 
> Before anyone considers these for stable as minor fixes, I'd recommend
> we also address the discrepancy on the read side of things: modify the
> test script to use diff against the target file instead of using the
> temp file.
> 
> Eric Sandeen (2):
>   test_sysctl: add proc_do_large_bitmap() test case
>   sysctl: Fix proc_do_large_bitmap for large input buffers

Isn't this missing:

[PATCH] sysctl: add proc_do_large_bitmap test node

?

> Luis Chamberlain (4):
>   test_sysctl: remove superfluous test_reqs()
>   test_sysctl: load module before testing for it
>   test_sysctl: ignore diff output on verify_diff_w()
>   test_sysctl: allow graceful use on older kernels
> 
>  kernel/sysctl.c                          |  30 ++++-
>  lib/test_sysctl.c                        |  18 ++-
>  tools/testing/selftests/sysctl/sysctl.sh | 161 +++++++++++++++++++----
>  3 files changed, 178 insertions(+), 31 deletions(-)
>
Eric Sandeen March 21, 2019, 7:18 p.m. UTC | #3
On 3/21/19 12:13 PM, Eric Sandeen wrote:
> On 3/20/19 5:28 PM, Luis Chamberlain wrote:
>> Andrew, Kees,
>>
>> Eric sent a fix out for proc_do_large_bitmap() last month for when
>> using a large input buffer. After patch review a test case for the issue
>> was built and submitted. I noticed there were a few issues with the
>> tests, but instead of just asking Eric to address them I've taken
>> care of them and ammended the commit where necessary. There's a
>> few issues he reported which I also address and fix in this series.
>>
>> Since we *do* expect users of these scripts to also use them on older
>> kernels, I've also addressed not breaking calling the script for them,
>> and gives us an easy way to easily extend our tests cases for future
>> kernels as well.
>>
>> Before anyone considers these for stable as minor fixes, I'd recommend
>> we also address the discrepancy on the read side of things: modify the
>> test script to use diff against the target file instead of using the
>> temp file.
>>
>> Eric Sandeen (2):
>>   test_sysctl: add proc_do_large_bitmap() test case
>>   sysctl: Fix proc_do_large_bitmap for large input buffers
> 
> Isn't this missing:
> 
> [PATCH] sysctl: add proc_do_large_bitmap test node

Oh, I see, you rolled it into the test patch.  that wasn't clear...
Eric Sandeen April 24, 2019, 5:42 p.m. UTC | #4
On 3/21/19 11:42 AM, Kees Cook wrote:
> On Wed, Mar 20, 2019 at 3:28 PM Luis Chamberlain <mcgrof@kernel.org> wrote:
>>
>> Andrew, Kees,
>>
>> Eric sent a fix out for proc_do_large_bitmap() last month for when
>> using a large input buffer. After patch review a test case for the issue
>> was built and submitted. I noticed there were a few issues with the
>> tests, but instead of just asking Eric to address them I've taken
>> care of them and ammended the commit where necessary. There's a
>> few issues he reported which I also address and fix in this series.
>>
>> Since we *do* expect users of these scripts to also use them on older
>> kernels, I've also addressed not breaking calling the script for them,
>> and gives us an easy way to easily extend our tests cases for future
>> kernels as well.
>>
>> Before anyone considers these for stable as minor fixes, I'd recommend
>> we also address the discrepancy on the read side of things: modify the
>> test script to use diff against the target file instead of using the
>> temp file.
>>
>> Eric Sandeen (2):
>>   test_sysctl: add proc_do_large_bitmap() test case
>>   sysctl: Fix proc_do_large_bitmap for large input buffers
>>
>> Luis Chamberlain (4):
>>   test_sysctl: remove superfluous test_reqs()
>>   test_sysctl: load module before testing for it
>>   test_sysctl: ignore diff output on verify_diff_w()
>>   test_sysctl: allow graceful use on older kernels
> 
> Thanks for collecting and updating these!
> 
> Acked-by: Kees Cook <keescook@chromium.org>
> 
> Andrew, can you carry these?

Ping?  This seems to have never made it off the list into anybody's
tree.

Thanks,
-Eric
Kees Cook April 24, 2019, 7:05 p.m. UTC | #5
On Wed, Apr 24, 2019 at 10:42 AM Eric Sandeen <sandeen@sandeen.net> wrote:
>
> On 3/21/19 11:42 AM, Kees Cook wrote:
> > On Wed, Mar 20, 2019 at 3:28 PM Luis Chamberlain <mcgrof@kernel.org> wrote:
> >>
> >> Andrew, Kees,
> >>
> >> Eric sent a fix out for proc_do_large_bitmap() last month for when
> >> using a large input buffer. After patch review a test case for the issue
> >> was built and submitted. I noticed there were a few issues with the
> >> tests, but instead of just asking Eric to address them I've taken
> >> care of them and ammended the commit where necessary. There's a
> >> few issues he reported which I also address and fix in this series.
> >>
> >> Since we *do* expect users of these scripts to also use them on older
> >> kernels, I've also addressed not breaking calling the script for them,
> >> and gives us an easy way to easily extend our tests cases for future
> >> kernels as well.
> >>
> >> Before anyone considers these for stable as minor fixes, I'd recommend
> >> we also address the discrepancy on the read side of things: modify the
> >> test script to use diff against the target file instead of using the
> >> temp file.
> >>
> >> Eric Sandeen (2):
> >>   test_sysctl: add proc_do_large_bitmap() test case
> >>   sysctl: Fix proc_do_large_bitmap for large input buffers
> >>
> >> Luis Chamberlain (4):
> >>   test_sysctl: remove superfluous test_reqs()
> >>   test_sysctl: load module before testing for it
> >>   test_sysctl: ignore diff output on verify_diff_w()
> >>   test_sysctl: allow graceful use on older kernels
> >
> > Thanks for collecting and updating these!
> >
> > Acked-by: Kees Cook <keescook@chromium.org>
> >
> > Andrew, can you carry these?
>
> Ping?  This seems to have never made it off the list into anybody's
> tree.

Andrew, do you want me to send this to you again, or carry separately?

-Kees