From nobody Tue Feb 10 01:15:04 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90798C7EE22 for ; Mon, 15 May 2023 07:15:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238336AbjEOHPf (ORCPT ); Mon, 15 May 2023 03:15:35 -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: quoted-printable 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 4vybO2AdIgLiEidOb2YEKWIWeMooMfdfL9gKYQFHiXsT+1lAbBYBVYkF03eDNfMK2Epc/76E BWK1vETb9emMIDangJ3Euv1HmSBqBCVOznwCVsMMVNO8dTYzhC0hcfDFC2aIXiWJr296WSHs WolTW26BPS0h8IBDYuG64+wQCReJq1eWQTUIS7w6vgUqLiPxf+d8qIbJwLD494EdwlnNKLGs 8SsTRJW1RMuVJ1AdjhKTby0CinMA2XwSN94KQlzEJzFp23RmiDCvREeb0ARGlVlIfpiF5IdZ SH5YwMi8ilE8tbQ4Nz212DAvtVyvODG3uDQvXS85P3cTIzDFnP53/NMOxrmvPuodYmTiYDzE KMHBrCTC2z4zPkWINyWxsiq1KD++qDQntfgQozQHi5I4r7btyWQhgfTEktTs1NSC1CKYLBMH p1QDU4tGdPHVf9feVlw5O4n3yC93f5b2J/fjcuo/Vt9YduVkkkaP6VUbp52Nq93CvklfP3Sp uL5+h/sLbsY1x5Yazjs0yTS3Nu+8pOB/bhOHSpG1vee0FnMsaX0jxeXCf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MUoIcuQsclTNSy+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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 *pa= th, 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 *ta= ble) { struct ctl_table *ctl_table_arg =3D table; int nr_subheaders =3D count_subheaders(table); @@ -1634,7 +1634,6 @@ struct ctl_table_header *register_sysctl_table(struct= ctl_table *table) header =3D NULL; goto out; } -EXPORT_SYMBOL(register_sysctl_table); =20 int __register_sysctl_base(struct ctl_table *base_table) { @@ -1700,7 +1699,7 @@ static void drop_sysctl_table(struct ctl_table_header= *header) =20 /** * 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); =20 /* - * 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=20 * 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_tabl= e *table); -struct ctl_table_header *register_sysctl_table(struct ctl_table * table); void unregister_sysctl_table(struct ctl_table_header * table); =20 extern int sysctl_init_bases(void); @@ -257,11 +256,6 @@ static inline int __register_sysctl_base(struct ctl_ta= ble *base_table) =20 #define register_sysctl_base(table) __register_sysctl_base(table) =20 -static inline struct ctl_table_header *register_sysctl_table(struct ctl_ta= ble * table) -{ - return NULL; -} - static inline void register_sysctl_init(const char *path, struct ctl_table= *table) { } --=20 2.30.2