Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5059040rwd; Sun, 18 Jun 2023 04:47:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5d0196Mvq6EJFmbXoOmT5Bpmr4qlEAoP+WmcSgNkVGqW0NhphDKKUsh3uhF2ABDNiW8ZJj X-Received: by 2002:a9d:6344:0:b0:6b1:69a2:8a41 with SMTP id y4-20020a9d6344000000b006b169a28a41mr5008711otk.14.1687088850717; Sun, 18 Jun 2023 04:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687088850; cv=none; d=google.com; s=arc-20160816; b=EKRnRis/xHel8JyJj1gCwFWASZoRgMotUw2z5S8Tt3BbsGKKwg0bHUTVZWqte8h3dy 0gfIR7IWNVVyO07H/2KvZeZ7FnfzqIoBTFcN5iPmlaMaoBKYpdLmvzNCBqc7hYKhp75o 6+3EGAS0IWFAjIFh8d4pvjPH2JStRR48uyKhwh7FWv5PBO3s1R+MU+aQ+naDu4NM9nia bv+hpprdgtTs0Nwcj4E8rHbjhpI7uMZDKOcChEL6wOGWjNQo5A/KGAXrY1Pl/h50p56n xKVJzXvCUpY1GxfmiZBWC1kUCUwvKF1KzkMqLnKRwJAsv2MtB7ZkFUs4SiK68ekyGYqS 87kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=KTo4dg5Pw2cEjEIq8Y10umtMxG9ZrOcdRjy2b8H93Kw=; b=CieS8DiMFtUYO1Ikc3bMtPza73mWiIXF2cdyPmNrsLSRyuMz9CmzpuviLkCIAVMcIx cESVM9x0cI4UbhTL93BQSOtGVVaqqwuER8h6KJNs27wYZXe8Zm3xsy44099FRy2M7jse DvHZGuSzdFuBk4VlwhiD1lSjK3AGnHBTTScgOTGTCW/QeAtDTFOr8SkOpkftlxD5h/9O 3MXxLyBDkfY5JGcoGgZfscDb8u8+iNL4dLBUflWsHNJ+impb3IlW27EJrZ2jTDzKhpXd x4WS6r40rlNjzrAN/rR+0TTuBk1YsJ68MturH+8MWmnD/q/i+8t8rZcHGWbj9PESL4DV yY0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OmHgEWdB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k185-20020a6384c2000000b0054fe7239928si8654394pgd.388.2023.06.18.04.47.16; Sun, 18 Jun 2023 04:47:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OmHgEWdB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229725AbjFRJdk (ORCPT + 99 others); Sun, 18 Jun 2023 05:33:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjFRJdi (ORCPT ); Sun, 18 Jun 2023 05:33:38 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA3B310D3; Sun, 18 Jun 2023 02:33:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KTo4dg5Pw2cEjEIq8Y10umtMxG9ZrOcdRjy2b8H93Kw=; b=OmHgEWdBs/F6pO/K6891l6y4SH ZlQ298AuC+q4UP6CkIko5rDTMXTbQB1so/I90rY2F8+tNGmqwupZRKOFnwNIyi/Bl+Vjke5hv0NpW U8UATYg7aaTnYaFd1qUOC6J7CYjIj2j8VIG7WkXS5I6ZHkCNVnyWfBgQ5q6mTmfC0pQhGMjXgbGGm qPQwePIyexOUrabiXLBojG5V7oSPCkkBF1exhSE3JhlK1maA4gB3nA9iYzmNfZR0tiJY58d7glVFq aS6krm1SPqEhG75RhQ1yI0yJsMBbxTB2G3GPs0Crv9O3PDmgZVJMO3wM5VKrDZPNaWBkn1/37HZyJ dUajjQnA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qAomt-005Xgr-1D; Sun, 18 Jun 2023 09:33:35 +0000 Date: Sun, 18 Jun 2023 02:33:35 -0700 From: Luis Chamberlain To: Joel Granados Cc: linux-kselftest@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/8] Remove child from struct ctl_table Message-ID: References: <20230616085922.3066990-1-j.granados@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230616085922.3066990-1-j.granados@samsung.com> Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 16, 2023 at 10:59:14AM +0200, Joel Granados wrote: > This is part of the effort to remove the empty element of the ctl_table > structures (used to calculate size) and replace it with an ARRAY_SIZE call. By > replacing the child element in struct ctl_table with a flags element we make > sure that there are no forward recursions on child nodes and therefore set > ourselves up for just using an ARRAY_SIZE. We also added some self tests to > make sure that we do not break anything. > > Patchset is separated in 4: parport fixes, selftests fixes, selftests additions and > replacement of child element. Tested everything with sysctl self tests and everything > seems "ok". > > 1. parport fixes: This is related to my previous series and it plugs a sysct > table leak in the parport driver. @mcgrof: I'm just leaving this here so we > don't have to retest the parport stuff > > 2. Selftests fixes: Remove the prefixed zeros when passing a awk field to the > awk print command because it was causing $0009 to be interpreted as $0. > Replaced continue with return in sysctl.sh(test_case) so the test actually > gets skipped. The skip decision is now in sysctl.sh(skip_test). > > 3. Selftest additions: New test to confirm that unregister actually removes > targets. New test to confirm that permanently empty targets are indeed > created and that no other targets can be created "on top". > > 4. Replaced the child pointer in struct ctl_table with an enum which is used to > differentiate between permanently empty targets and non-empty ones. > > V2: Replaced the u8 flag with an enumeration. Thanks, I dropped the old patches and applied this new set. Pushed out to sysctl-next. Luis