Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp728823imp; Thu, 21 Feb 2019 09:59:58 -0800 (PST) X-Google-Smtp-Source: AHgI3IYCXgX7H+wS3I5k3MbZ8de9pzKNvxHl6bWf85byxwRjzaMxyG1G6cS9tHBFdrz4RUspsYOC X-Received: by 2002:a63:1616:: with SMTP id w22mr35116464pgl.200.1550771998010; Thu, 21 Feb 2019 09:59:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550771998; cv=none; d=google.com; s=arc-20160816; b=XpuJQjNb6ltGfBo2/RYyhmcvqCXMBRnA14pseDjiSROUbhKQCdDnLxvDh18UobhM9x 3RSb2qGNZSs6eCAskodwmjPS40LcrgFWTPER1XkFTyfbvDpcNlFq1zNUvCwWz4e/91K7 BLCSWoGK8qnhixZcyNUmTs4qWNxMLiaS3VPOpXzRX50MMUPbHmvuminS32DjaFytmYx3 W6IU+R0CwakKEU+0KWM+bebaOR36QLUYVj0MvLtmPabmsdD+F/49ayhTH1r5KvlPjkb4 JEGu4KfwuysZACk1eVAYPL9kr3nDrPIJTBlvsyZFRBUKuA/yyqQDNsFFmFLN/jBJYpxC oElQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=gbWJFZRKuC71hcQntsLaIpf971tRo1bCDBgQBn/biSw=; b=PKWZjAT5GF7/NFv9jVCBi+hix0GQCggxD4fYWCcP9LIpKEW6AKsTBB3w72H1VdZcz3 +kWuBUUN1uQo7zLKmO9cq9hW38ClBZEWi2qVW6sJORzyoLp2Df710UQNfPInNHwSDLBU o4rfS96y+iGpiQe2WeKsKCQBu5lcNjcP6P26Ld3x9QdlBdihTGfWLcPn1x1LJXmF0Go1 LPW0qp+SOhZIrJzCKW/sr/3JMWBB1AtYXET8qwCDHwDTnJ7qEX54ypfLPIMUbBkEDFAW XsxyYjs+tkOUIwkhDhwDauxwJCgMaqLURKoCNJTnzqcGSF2wq/qQWJEywmUKffjiC07P HHvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11si23293355pla.405.2019.02.21.09.59.43; Thu, 21 Feb 2019 09:59:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728682AbfBUR7W (ORCPT + 99 others); Thu, 21 Feb 2019 12:59:22 -0500 Received: from sandeen.net ([63.231.237.45]:55870 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbfBUR7V (ORCPT ); Thu, 21 Feb 2019 12:59:21 -0500 Received: from [10.0.0.4] (liberator [10.0.0.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTPSA id C211C2AB6; Thu, 21 Feb 2019 11:59:03 -0600 (CST) Subject: Re: [PATCH] sysctl: Fix proc_do_large_bitmap for large input buffers To: Luis Chamberlain , Eric Sandeen Cc: Andrew Morton , Linux Kernel Mailing List , fsdevel , netdev@vger.kernel.org, Kees Cook References: <53be40fc-6ec4-c714-a64e-f69c96f7058f@redhat.com> <76eca432-8dfc-18f3-4977-567ac1707ff5@sandeen.net> <20190221151854.GJ11489@garbanzo.do-not-panic.com> <72a6d9bc-cfb9-a21a-960d-bb01331c0dd7@redhat.com> <20190221175232.GM11489@garbanzo.do-not-panic.com> From: Eric Sandeen Openpgp: preference=signencrypt Autocrypt: addr=sandeen@sandeen.net; prefer-encrypt=mutual; keydata= mQINBE6x99QBEADMR+yNFBc1Y5avoUhzI/sdR9ANwznsNpiCtZlaO4pIWvqQJCjBzp96cpCs nQZV32nqJBYnDpBDITBqTa/EF+IrHx8gKq8TaSBLHUq2ju2gJJLfBoL7V3807PQcI18YzkF+ WL05ODFQ2cemDhx5uLghHEeOxuGj+1AI+kh/FCzMedHc6k87Yu2ZuaWF+Gh1W2ix6hikRJmQ vj5BEeAx7xKkyBhzdbNIbbjV/iGi9b26B/dNcyd5w2My2gxMtxaiP7q5b6GM2rsQklHP8FtW ZiYO7jsg/qIppR1C6Zr5jK1GQlMUIclYFeBbKggJ9mSwXJH7MIftilGQ8KDvNuV5AbkronGC sEEHj2khs7GfVv4pmUUHf1MRIvV0x3WJkpmhuZaYg8AdJlyGKgp+TQ7B+wCjNTdVqMI1vDk2 BS6Rg851ay7AypbCPx2w4d8jIkQEgNjACHVDU89PNKAjScK1aTnW+HNUqg9BliCvuX5g4z2j gJBs57loTWAGe2Ve3cMy3VoQ40Wt3yKK0Eno8jfgzgb48wyycINZgnseMRhxc2c8hd51tftK LKhPj4c7uqjnBjrgOVaVBupGUmvLiePlnW56zJZ51BR5igWnILeOJ1ZIcf7KsaHyE6B1mG+X dmYtjDhjf3NAcoBWJuj8euxMB6TcQN2MrSXy5wSKaw40evooGwARAQABtCVFcmljIFIuIFNh bmRlZW4gPHNhbmRlZW5Ac2FuZGVlbi5uZXQ+iQI7BBMBAgAlAhsDBgsJCAcDAgYVCAIJCgsE FgIDAQIeAQIXgAUCUzMzbAIZAQAKCRAgrhaS4T3e4Fr7D/wO+fenqVvHjq21SCjDCrt8HdVj aJ28B1SqSU2toxyg5I160GllAxEHpLFGdbFAhQfBtnmlY9eMjwmJb0sCIrkrB6XNPSPA/B2B UPISh0z2odJv35/euJF71qIFgWzp2czJHkHWwV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fQWWW0dQxP7HNwqmOWYF/6m+1gK/Y2gY3jAQnsWTru4RV TZGnKwEPmOCpSUvsTRXsVHgsWJ70qd0yOSjWuiv4b8vmD3+QFgyvCBxPMdP3xsxN5etheLMO gRwWpLn6yNFq/xtgs+ECgG+gR78yXQyA7iCs5tFs2OrMqV5juSMGmn0kxJUAEQEAAYkCHwQY AQIACQUCTrH31AIbDAAKCRAgrhaS4T3e4BKwD/0ZOOmUNOZCSOLAMjZx3mtYtjYgfUNKi0ki YPveGoRWTqbis8UitPtNrG4XxgzLOijSdOEzQwkdOIp/QnZhGNssMejCnsluK0GQd+RkFVWN mcQT78hBeGcnEMAXZKq7bkIKzvc06GFmkMbX/gAl6DiNGv0UNAX+5FYh+ucCJZSyAp3sA+9/ LKjxnTedX0aygXA6rkpX0Y0FvN/9dfm47+LGq7WAqBOyYTU3E6/+Z72bZoG/cG7ANLxcPool LOrU43oqFnD8QwcN56y4VfFj3/jDF2MX3xu4v2OjglVjMEYHTCxP3mpxesGHuqOit/FR+mF0 MP9JGfj6x+bj/9JMBtCW1bY/aPeMdPGTJvXjGtOVYblGZrSjXRn5++Uuy36CvkcrjuziSDG+ JEexGxczWwN4mrOQWhMT5Jyb+18CO+CWxJfHaYXiLEW7dI1AynL4jjn4W0MSiXpWDUw+fsBO Pk6ah10C4+R1Jc7dyUsKksMfvvhRX1hTIXhth85H16706bneTayZBhlZ/hK18uqTX+s0onG/ m1F3vYvdlE4p2ts1mmixMF7KajN9/E5RQtiSArvKTbfsB6Two4MthIuLuf+M0mI4gPl9SPlf fWCYVPhaU9o83y1KFbD/+lh1pjP7bEu/YudBvz7F2Myjh4/9GUAijrCTNeDTDAgvIJDjXuLX pA== Message-ID: <48cd5dc7-483d-9c44-8148-5261b5dbb9d7@sandeen.net> Date: Thu, 21 Feb 2019 11:59:20 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190221175232.GM11489@garbanzo.do-not-panic.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/21/19 11:52 AM, Luis Chamberlain wrote: > On Thu, Feb 21, 2019 at 11:47:49AM -0600, Eric Sandeen wrote: >> On 2/21/19 9:18 AM, Luis Chamberlain wrote: >>> On Wed, Feb 20, 2019 at 05:35:04PM -0600, Eric Sandeen wrote: >>>> Here's a pretty hacky test script to test this code via >>>> ip_local_reserved_ports >>> >>> Thanks Eric! >>> >>> So /proc/sys/net/ipv4/ip_local_reserved_ports is a production knob, and >>> if we wanted to stress test it with a selftest it could break other self >>> tests or change the system behaviour. Because of this we have now have >>> lib/test_sysctl.c, and we test this with the script: >>> >>> tools/testing/selftests/sysctl/sysctl.sh >>> >>> Any chance you can extend lib/test_sysctl.c with a new respective bitmap >>> knob, >> >> Done > > Thanks! > >>> and add a respective test? This will ensure we don't regress >>> later. 0-day runs sysctl.sh so it should catch any regressions in the >>> future. >> >> As you know, learning somebody else's test harness infra is a PITA. ;) >> Can you find me off-list and give me a hand with this? > > Sure, its actually quite simple, just as root, run the script. Running it looks easy. I'd like to know about how to extend it. Thanks, -Eric