Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1635432rwd; Mon, 15 May 2023 00:20:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7lGTNoqDnJXf7kXkn4Q5Mz6eB6uq2V7wR52Vx0441HBlbwtQXTKit8h9xsjo/53GAjsLE4 X-Received: by 2002:a05:6a00:895:b0:63d:2d99:2e7c with SMTP id q21-20020a056a00089500b0063d2d992e7cmr46803850pfj.0.1684135225396; Mon, 15 May 2023 00:20:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684135225; cv=none; d=google.com; s=arc-20160816; b=fzwj/1U/Axv5/Q/Zo0S7bmXGEi6xAC/BnZb/dfKi/Qu7mPXLvourY5+8GX7r5x0gFo B7Xmtc+FL+PGlEug5eX9yccItPj2hKUdlXOGh1kiuNw6pIZvYFjtOeN1Efur/tyKScrL CxBNHwMjmfWQIZ++qjycgJo/BOJ6URklqOSm8f0nfBUWJA9XjizY9a5H+DJRNl4ytAUt MAwttoPOJll3mumcFzmCjaq8hWJ6+njUTLtg3L71Evf2PwtSladZtRYg4/o/+hAqNtZE uW/WWRCyPiWcApwEubADrQkBqI8xjDkE6a84DAzXzzck9GfIewghHRMZvhMwtKWw1WiT 8pqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :mime-version:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=6PBemcNPoWe9oVs56Q8iJPd1Hh6luHfxm8DwLyJDgGA=; b=ewltnQIzL030bAB/7iLJx4/tsHvsMcNhsltFp2nnDu2+e9wGZ2ReSiMnm/uuZzFEYH LYC/c+t1DXW99qeEJlSxTtBRBjA5EJikYR3p7IjAnNzDgWtSsMxUdiZS1ilxzrh231ZJ exX4g87Wx+4JaBOhGIXLhIOokDPVErlNNGesV5oTwMwJ5d2luSb+u44k5myr3WVH2b9s 6V6VXrU32iGj1tBQD15DzfTS6ecX8GMtv8O6mXmDXjpkqdzt7YwQZDKfWYHUC+uo8GsC t497r1DhGsQbSYzNWx7VCEC4/PQpqWTh8P+8JtCDVYiCSIwdmAA8i+OIEY2bnEGgcmTp 2LnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=qi1ccoN0; 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=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v29-20020aa799dd000000b0063d270ccc12si16744144pfi.180.2023.05.15.00.20.13; Mon, 15 May 2023 00:20:25 -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=@samsung.com header.s=mail20170921 header.b=qi1ccoN0; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240695AbjEOHPd (ORCPT + 99 others); Mon, 15 May 2023 03:15:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240682AbjEOHPJ (ORCPT ); Mon, 15 May 2023 03:15:09 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5455710C6 for ; Mon, 15 May 2023 00:14:59 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230515071458euoutp02d4062292c28d89c5a37500626adc5f0a~fP8ROXlwL1669916699euoutp02M for ; Mon, 15 May 2023 07:14:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230515071458euoutp02d4062292c28d89c5a37500626adc5f0a~fP8ROXlwL1669916699euoutp02M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1684134898; bh=6PBemcNPoWe9oVs56Q8iJPd1Hh6luHfxm8DwLyJDgGA=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=qi1ccoN0pWjU7rFj1z4CZxoLnU31OK6QGEejPHUGOX2AunGSwiBzNqwrkVk2XJbV/ u52JqRO5b9uXC4X4qC5Ur9ASyOLRTV2dmGnUbpVvk1gzhT/jnUP4LJbkhQGi0I/Uca 0cPFbDiXZrrSSZjNKp10FfevNi6w9J6c3PtqcWi4= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20230515071457eucas1p19dac7057926ec5ad4f74741f5c43f473~fP8Q-HzD00315403154eucas1p1h; Mon, 15 May 2023 07:14:57 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 40.81.42423.1FBD1646; Mon, 15 May 2023 08:14:57 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230515071457eucas1p105a2dba9f4741cd6fe495bcf527d664d~fP8QsGIES0813608136eucas1p1W; Mon, 15 May 2023 07:14:57 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230515071457eusmtrp20ea15dfc6cc0842d3b98dee3e17325e5~fP8Qrj6kz2610526105eusmtrp2T; Mon, 15 May 2023 07:14:57 +0000 (GMT) X-AuditID: cbfec7f2-a3bff7000002a5b7-a1-6461dbf112b9 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 20.E9.14344.1FBD1646; Mon, 15 May 2023 08:14:57 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230515071457eusmtip28c38e715b8fe725587302344b7894ca7~fP8QXs6Bf2126721267eusmtip2B; Mon, 15 May 2023 07:14:57 +0000 (GMT) Received: from localhost (106.110.32.133) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 15 May 2023 08:14:56 +0100 From: Joel Granados To: CC: Sudip Mukherjee , Iurii Zaikin , Kees Cook , , , Joel Granados Subject: [PATCH 6/6] sysctl: stop exporting register_sysctl_table Date: Mon, 15 May 2023 09:14:46 +0200 Message-ID: <20230515071446.2277292-7-j.granados@samsung.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230515071446.2277292-1-j.granados@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [106.110.32.133] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42LZduznOd2PtxNTDJa0a1ic6c612LP3JIvF 5V1z2CxuTHjKaHHg9BRmi2U7/RzYPGY3XGTx2DnrLrvHgk2lHptWdbJ5fN4kF8AaxWWTkpqT WZZapG+XwJXxrvkje8EGyYrrV08yNTCuFe1i5OSQEDCRuHz7ClMXIxeHkMAKRomGl49YIZwv jBKzGzqYQKqEBD4zSuxfJQnTMXvFXmaI+HJGidWTKiEagGrendrEDOFsYZToP7yYHaSKTUBH 4vybO2AdIgLiEidOb2YEKWIWeMooMfdfL9gKYQF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dG iSNHt0M5WxgletpuMoFUsQnoSJx/c4cZxBYREJc4cXozI0gRs8BTRomZh56CFQkLOErcm9gP toJFQFViwfTd7CA2r4CtxPXvS6BWy0u0XZ/OCGJzCthJrNt/FKxXCKjm9K5trBD1ghInZz4B q2cGqm/eOpsZwpaQOPjiBTPEHCWJr296oV6olfj89xnjBEaRWUjaZyFpn4WkfQEj8ypGkdTS 4tz03GIjveLE3OLSvHS95PzcTYzACNx27OeWHYwrX33UO8TIxMF4iFGCg1lJhLd9ZnyKEG9K YmVValF+fFFpTmrxIUZToD8nMkuJJucDU0BeSbyhmYGpoYmZpYGppZmxkjivZ0FHopBAemJJ anZqakFqEUwfEwenVANTyVnrb3ufqZ6XTApIYepJ4VvfXF/60otlRbrU+RuuMrEr/7PF2Uve +Xk4+ezp0zPstommmjqkfvCtu3ZeRIW54Oy27kU/fhT9qi35se3YpIyj6ud3KQbmHt9fnZ7r LPk5Q3WNkuzC3+sSGnlWMUoIcuQsclTNSy+5wOPi8I6tYe/qM21zf9Taa+xmkb/qI2Z36ZfM rz9HcgL/Z71sDjDQSa1f8GRT6eKDXpM2sJVyXtz7imWOWn7CRc4fSicPOn9/tVhWe4mD0tzW zr8MthaJPxuzzyonxrB2e91ct4rrgKn820a2UN+9WpdPs4UJNF2Y/P6rwbOA1Q1qItppm3bO //zLMP3vMv+K3UcreBKUWIozEg21mIuKEwHPFX7DSQMAAA== X-CMS-MailID: 20230515071457eucas1p105a2dba9f4741cd6fe495bcf527d664d X-Msg-Generator: CA X-RootMTR: 20230515071457eucas1p105a2dba9f4741cd6fe495bcf527d664d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230515071457eucas1p105a2dba9f4741cd6fe495bcf527d664d References: <20230515071446.2277292-1-j.granados@samsung.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 We make register_sysctl_table static because the only function calling it is in fs/proc/proc_sysctl.c (__register_sysctl_base). We remove it from the sysctl.h header and modify the documentation in both the header and proc_sysctl.c files to mention "register_sysctl" instead of "register_sysctl_table". Signed-off-by: Joel Granados --- fs/proc/proc_sysctl.c | 5 ++--- include/linux/sysctl.h | 8 +------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 8038833ff5b0..f8f19e000d76 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -1582,7 +1582,7 @@ static int register_leaf_sysctl_tables(const char *path, char *pos, * array. A completely 0 filled entry terminates the table. * We are slowly deprecating this call so avoid its use. */ -struct ctl_table_header *register_sysctl_table(struct ctl_table *table) +static struct ctl_table_header *register_sysctl_table(struct ctl_table *table) { struct ctl_table *ctl_table_arg = table; int nr_subheaders = count_subheaders(table); @@ -1634,7 +1634,6 @@ struct ctl_table_header *register_sysctl_table(struct ctl_table *table) header = NULL; goto out; } -EXPORT_SYMBOL(register_sysctl_table); int __register_sysctl_base(struct ctl_table *base_table) { @@ -1700,7 +1699,7 @@ static void drop_sysctl_table(struct ctl_table_header *header) /** * unregister_sysctl_table - unregister a sysctl table hierarchy - * @header: the header returned from register_sysctl_table + * @header: the header returned from register_sysctl or __register_sysctl_table * * Unregisters the sysctl table and all children. proc entries may not * actually be removed until they are no longer used by anyone. diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 3d08277959af..218e56a26fb0 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -89,7 +89,7 @@ int proc_do_static_key(struct ctl_table *table, int write, void *buffer, size_t *lenp, loff_t *ppos); /* - * Register a set of sysctl names by calling register_sysctl_table + * Register a set of sysctl names by calling register_sysctl * with an initialised array of struct ctl_table's. An entry with * NULL procname terminates the table. table->de will be * set up by the registration and need not be initialised in advance. @@ -222,7 +222,6 @@ struct ctl_table_header *__register_sysctl_table( struct ctl_table_set *set, const char *path, struct ctl_table *table); struct ctl_table_header *register_sysctl(const char *path, struct ctl_table *table); -struct ctl_table_header *register_sysctl_table(struct ctl_table * table); void unregister_sysctl_table(struct ctl_table_header * table); extern int sysctl_init_bases(void); @@ -257,11 +256,6 @@ static inline int __register_sysctl_base(struct ctl_table *base_table) #define register_sysctl_base(table) __register_sysctl_base(table) -static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * table) -{ - return NULL; -} - static inline void register_sysctl_init(const char *path, struct ctl_table *table) { } -- 2.30.2