Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7531402rwd; Tue, 6 Jun 2023 12:07:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Li1jpUnP3WnwefxTZsXhF3+8OMdL8NlzCdd3X/i/Xov+7udmodXaSFdKsJ6UvIXmLi/9n X-Received: by 2002:a17:90a:3983:b0:259:24c4:4dd4 with SMTP id z3-20020a17090a398300b0025924c44dd4mr1140840pjb.10.1686078447220; Tue, 06 Jun 2023 12:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686078447; cv=none; d=google.com; s=arc-20160816; b=Cd56CdQlD3HLRwdiex8T5tbW9eBFdfB/LO8C+v3jZLPL/ctv27hNGQ/xVmtvCkoohf 8WUK5DI66ZJSaiP4tSK679Fmrbz3MqZK9zyhGeiw0g4g1UCPB6lhCM922UyPy2hOD8U1 f7DNEs5nA/00i1GkI/RzXw74heGelVocFaoHVfdS8P5/jCamYZXgwt4528LOGCsdHnWS 8VzphV12b+CfVKpg/KtgO2gryAwhUtVrqrsqTSgPcqsxpAGuQppBDvmFcRwaaxdqBjZb GP1utimDNmTxhzU75pe9mci+NYrQ02BtTtAua6SWNLnpsTQa70W8F5m4OxGVZ6NjgmHC /4mA== 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=TNU8U3MEcv3N7wCZBZ3gI1l1C49AkMXmwa8o/pNFlxI=; b=BqFq4eb4L6kuLv6BqNfEvReo1xzSkrJSCWyBioxzE2UmbkScxzfgoaUMG5+xPy9j1B z+D3LSMlS3/pnM+FY32mfEBaPL0+5ypZIoYMO4R6l6xRaJ1B+A07p9/D1Ml9mpwedFVE xMkSG8wP6iI/6Us8sHk2nm6tUp38ojy9nzocUvPWnLcy5i6crCBcaG9UCovykfccKPEl uFDTLE5WWGnmgBh+bgMn11WzlVhINv4WYCxgJl5maDVtLnya+Wc1eO7QsEzdzG9FnNIN Ix4352de5b+9aO3yMMnmF/IC2HWcXobdLGvAmvFGXHG3UFNJ5S2pF/HjLhY7a2ZwBdnN kn0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=HGl+ZjY2; 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 j9-20020a633c09000000b005348b4f79f1si7774564pga.345.2023.06.06.12.07.13; Tue, 06 Jun 2023 12:07:27 -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=HGl+ZjY2; 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 S239147AbjFFS43 (ORCPT + 99 others); Tue, 6 Jun 2023 14:56:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237797AbjFFS41 (ORCPT ); Tue, 6 Jun 2023 14:56:27 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1759101; Tue, 6 Jun 2023 11:56:26 -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=TNU8U3MEcv3N7wCZBZ3gI1l1C49AkMXmwa8o/pNFlxI=; b=HGl+ZjY2h2aXnhelLMYheyAbT1 40RXU03NIs3uiNpuX1SbfJoV8igDI6PNv5hjxfiE2tz7yCOeergGMeqt26CH7C8RZWcRA9a2L7/8p 7L+kGLQWe6Rek36zP7J3QLprzOErdPVJ42xDvh+KdyMpcyHESfROKaCMc3ew/1vDiKrOwVEAnKrxU PFztAhNpD2hc7otlj49Ih5dZ4hwMMl7jqH3O/LKOJlIyjoxJvwqJWDxS1mYWgh9dKEf1lHuyPJtOg gxqm+rfun+OhJtOf1JR2vi9tooluils1H9u7TMxXI30CdcuF+IklFYf8Rdx73OZY+phdMR12bSHGw HkX+J5kw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q6br0-002qXU-2a; Tue, 06 Jun 2023 18:56:26 +0000 Date: Tue, 6 Jun 2023 11:56:26 -0700 From: Luis Chamberlain To: Joel Granados Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH 0/8] Remove child from struct ctl_table Message-ID: References: <20230602110638.789426-1-j.granados@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230602110638.789426-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, URIBL_BLOCKED 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 02, 2023 at 01:06:30PM +0200, Joel Granados wrote: > Resending as the first set got mangled with smtp error. > > 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: @mcgrof: this is related to my previous series and it plugs a > sysct table leak in the parport driver. Please tell me if you want me to repost > the parport series with this one stiched in. > > 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 a u8 flag. The flag > is used to differentiate between permanently empty targets and non-empty ones. > > Comments/feedback greatly appreciated This all looks great, thanks so much for doing all this work! I pushed to sysctl-next. Luis