From patchwork Wed Mar 20 22:28:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 10862671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3A9A1390 for ; Wed, 20 Mar 2019 22:29:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA0BB29E50 for ; Wed, 20 Mar 2019 22:29:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE69F29ED8; Wed, 20 Mar 2019 22:29:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F4C629E50 for ; Wed, 20 Mar 2019 22:29:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727612AbfCTW2o (ORCPT ); Wed, 20 Mar 2019 18:28:44 -0400 Received: from mail-yw1-f68.google.com ([209.85.161.68]:44679 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727540AbfCTW2o (ORCPT ); Wed, 20 Mar 2019 18:28:44 -0400 Received: by mail-yw1-f68.google.com with SMTP id c4so3315515ywa.11; Wed, 20 Mar 2019 15:28:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dLQbQLb+LbBg3EhbjazMgrlxpCtWNa1jT7fqdBlxHDI=; b=PIU1W786gGBdSihC6oNyGT5Atvhr2uKXXa6ebd6tyEQFffMOSxGFvq/M3nN+FM0X7K 2u/MV1gi8M/N5JdsmqWRr1q1/iC7irvS6vAyqws734tZyZNtHAISQFg2CRmMxislicsu rpti39rsFXD7BtL/YGrz3EQPmF6iSMiO8k4KOAifL8lxHH7hehMZKBgacJfIv/t/WOMU 6oRHwu08b2IC2L8qMrADGll2ybDVOWjxUpGA5axuow3roJtJg60gD+C3Gf8wJRT8d2Rr yTYfLHCMIiJnsouThGo+dOLx2bjfsdQXIbEWWeJppm2zJbNQzn6nVMmQMXK05es2Du/a YHpA== X-Gm-Message-State: APjAAAUsr8F50FkJgaHel3ec+ezgBpoHTKxO5YekHH2jdXtJkvKVFz8F NgyXyBTf8aQNZneVaqCWLds= X-Google-Smtp-Source: APXvYqxMOGiDKdeYU9yFNJbhABVHoRIp8mFO4uHfsWaFPECYjaxm4OrH4E3cVV5S+wL2CK0ugNkeDg== X-Received: by 2002:a81:8807:: with SMTP id y7mr459608ywf.265.1553120923407; Wed, 20 Mar 2019 15:28:43 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id g1sm1051945ywf.0.2019.03.20.15.28.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Mar 2019 15:28:41 -0700 (PDT) Received: by 42.do-not-panic.com (sSMTP sendmail emulation); Wed, 20 Mar 2019 22:28:39 +0000 From: Luis Chamberlain To: akpm@linux-foundation.org, keescook@chromium.org Cc: sandeen@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain Subject: [PATCH 0/6] sysctl: add pending proc_do_large_bitmap fix Date: Wed, 20 Mar 2019 22:28:25 +0000 Message-Id: <20190320222831.8243-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) Acked-by: Kees Cook