Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4284142rwd; Tue, 23 May 2023 05:58:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4kZHPB5cEssbCoqHjfThw9HFA7F+AoybrJOebE/WE/4SfM4wZme9+lPRYzKl2S404FWIMP X-Received: by 2002:a05:6a20:734e:b0:10a:eaff:9608 with SMTP id v14-20020a056a20734e00b0010aeaff9608mr10792400pzc.17.1684846686510; Tue, 23 May 2023 05:58:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684846686; cv=none; d=google.com; s=arc-20160816; b=xhFgNKfwlG0jtSMlLiB2iue0Sn+41Q74FsBjZlPuDjJXeQhXDeFCizbGwijuGOBXgI hU9/Gi40d8jXH3tqrF+9YXOdfMEtOdBuLFntiscLpSQFWZt0Cv2ydV69hR1mYuammH5n ng9WwlD/2ycihrZhoR4teKJXfaBljrUc2Ub49DYQqt9Sm6ijb2Rvu+WYrSObm9aLEAFh MOUue2D28bJQ+hGD6coa+8JAaoznjxN6nx1ISOviOH/TpPdNjYrzsLzVasq8+8JUbn8+ Ci6n/BWsDUlgAWoMK8TQFLbXCVwbo8miE27WbcssdiNFnlX8KaSD2cwee0BcPHpwKpD3 eC2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pvwywaq2OuwbUEx0x8CbwSg/m+izEAlSSRDMtkWrVx4=; b=yrwPjY4w9gAdFjqeqdyNTSIHzs0++zMW5BMRf5REHSceoN6tz4B0w+Ycf9LukbI1mm PyAXND4F+AgaEEsWzhxJLg7A2Nn0hz+b8nImYJc4hj+p2qQaV2GVeNzrLzpBsTOLOo5L 3UqN6PpFp3IECTpJ8AyNTyO5ZprQbiUE4rn5HA2Gj7n5se97eVx1Rt1ybzbht6J56QAz tuqvpWdWYEaNRtjNk3/XT0Rrv1o9SJCId1cVHwK649kOHZMkl7HNOVlS/hUWQdvRhLbQ naK5YBw8vJNBtbFQmmbbyz8AJ/cWQ105oUWHNpjzEi5H8KZRiq6ozA9ewplxz8J+hHum stFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pwL2kpk4; 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 b30-20020a63931e000000b005300dbf81d4si6546402pge.823.2023.05.23.05.57.50; Tue, 23 May 2023 05:58:06 -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=@kernel.org header.s=k20201202 header.b=pwL2kpk4; 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 S236860AbjEWM4N (ORCPT + 99 others); Tue, 23 May 2023 08:56:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234328AbjEWM4M (ORCPT ); Tue, 23 May 2023 08:56:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D5BF120; Tue, 23 May 2023 05:56:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0299F63207; Tue, 23 May 2023 12:56:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90F01C433EF; Tue, 23 May 2023 12:56:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684846566; bh=BlFTpPUzZRA+Lfm2VLhaVbfEaR3PZ2flj9ymLK2nYgA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pwL2kpk4GWvyLEoR3xe0WH3BUhFm3QXrN8u/bclr/UeINHbumUUYXTGikq4xCRcZc /gQMW/+w8aXJ8dm+VrpdhTeeQeHXK1iytxyfN5MCZpfRBWzKGEFRFajjaJj8++T/Zp Qvurw3APIuLHCeebjcFqITMwncZCtQ5L0YFizxz4eZNKeIvT0BFkQGtDKhSDU+K0tU FCY1NTwo9tCwV43wiToIpCw3R1gb+l5A5Cyv+MAeeIBMsWcNGGkzQNJddVBJgSOGVE R1CcOYWBYbE4VzzU256gF++CNrh2u95BtY3qkyhyPkiTpvLYxrQ9nPd8ROuC5ZfbPf 93prZOwlrR9OQ== Date: Tue, 23 May 2023 14:56:01 +0200 From: Christian Brauner To: Joel Granados Cc: mcgrof@kernel.org, Kees Cook , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Iurii Zaikin , Alexander Viro , Sudip Mukherjee Subject: Re: [PATCH v4 7/8] sysctl: Refactor base paths registrations Message-ID: <20230523-gipfel-urfassung-01205d1cdc33@brauner> References: <20230523122220.1610825-1-j.granados@samsung.com> <20230523122220.1610825-8-j.granados@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230523122220.1610825-8-j.granados@samsung.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 Tue, May 23, 2023 at 02:22:19PM +0200, Joel Granados wrote: > This is part of the general push to deprecate register_sysctl_paths and > register_sysctl_table. The old way of doing this through > register_sysctl_base and DECLARE_SYSCTL_BASE macro is replaced with a > call to register_sysctl_init. The 5 base paths affected are: "kernel", > "vm", "debug", "dev" and "fs". > > We remove the register_sysctl_base function and the DECLARE_SYSCTL_BASE > macro since they are no longer needed. > > In order to quickly acertain that the paths did not actually change I > executed `find /proc/sys/ | sha1sum` and made sure that the sha was the > same before and after the commit. > > We end up saving 563 bytes with this change: > > ./scripts/bloat-o-meter vmlinux.0.base vmlinux.1.refactor-base-paths > add/remove: 0/5 grow/shrink: 2/0 up/down: 77/-640 (-563) > Function old new delta > sysctl_init_bases 55 111 +56 > init_fs_sysctls 12 33 +21 > vm_base_table 128 - -128 > kernel_base_table 128 - -128 > fs_base_table 128 - -128 > dev_base_table 128 - -128 > debug_base_table 128 - -128 > Total: Before=21258215, After=21257652, chg -0.00% > > Signed-off-by: Joel Granados > [mcgrof: modified to use register_sysctl_init() over register_sysctl() > and add bloat-o-meter stats] > Signed-off-by: Luis Chamberlain > Tested-by: Stephen Rothwell > --- Acked-by: Christian Brauner