Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2548126rdb; Sun, 3 Dec 2023 23:53:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IEH3vVV2vFl2kcCAACzBwBzPdTBiiN5iAxRv3vWir/z//NSs+8h8aZUQKp2ZNA8UNfaA5B1 X-Received: by 2002:a05:6a00:2d20:b0:6cd:e2c2:13dd with SMTP id fa32-20020a056a002d2000b006cde2c213ddmr1256935pfb.34.1701676435420; Sun, 03 Dec 2023 23:53:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701676435; cv=none; d=google.com; s=arc-20160816; b=zOQ09ckAis+bgQ6vDzH5Cy++NZ5OZHrQOLS4gvTB2pkOs6H4odga5fAhA+Ff0Dsxgm NleQDoAbbitM89d6U4u7f6DM63MBqBq8xFfO390FXtkAExS1TZi98BLWAolm3i3FgMj3 GAl9+L6E24OWf0mdGjbPeZTkWyK8YCekJ/itFrNs08VHYr4wGpuJdZoCPPL9A8lZ9tNW fYIIZgu4avH0kUkV6D/gB2Bc+LbRurGJAaTm10ll0i6dHhAfyvoO0QwX9gmSOpWIg7OA Yk7RSBuZdGBb6nVy45mJUng6coONe90j1nZjVZALk+jjzv1y6Cce6JyWD2OVQLIGGhMU pfcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=Wi54CdbVDZzkW+GjsQc9YDkAQ2D0j9ydOY7N1Ndkl8M=; fh=1v5zqbO9sIGUc9bsdyhYE0zxdK1knZz2xnJYWUWMFKo=; b=BNh9di/uCvUFw9eif3Iij0iXhGytZJt8vBI/cDkyDqk/uXpCyAISzv2isEgGZPGTRp 6TrxptUT5xVdneSakcco07rvicTNgJnER2/3+ZxdPGXsUothZM50j5FjKMENQ/TEQor8 EbmJdaWRPa3BgVGUfoiuY3TKhS7X7S4/xICfiUbBRJw8tFzye6iF3guZjeig9mYETMB5 OREYqD0BPmLdBz3YJYLffggifT6K20NL7iej5XhLIj2Pn0IpTVeOsXPZFLtbaatPrMdA 0nf22dvhAbTF1KzB3K6V4zCgsqQ+yj4QiPJLbktTtvEeFbCXnTyMKhikBEI95KRhJEGA 9neg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=rRkFq96C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id z20-20020a62d114000000b006ce36ffa533si3078969pfg.374.2023.12.03.23.53.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 23:53:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=rRkFq96C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4D19B80958AD; Sun, 3 Dec 2023 23:53:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343747AbjLDHx2 (ORCPT + 99 others); Mon, 4 Dec 2023 02:53:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343502AbjLDHws (ORCPT ); Mon, 4 Dec 2023 02:52:48 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACF72D45; Sun, 3 Dec 2023 23:52:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1701676352; bh=zByUx3Gq6P8LcvcqSjdgxm/5wuG+rVoanucvNQrnBwQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=rRkFq96C53W4Qa03A41B32MvmVyDQRkTNCbQcM+Xuz/1K/4p2IVfE2RJFXISV9AT8 +m2cFw8KOv+tWlhuOzE6u2hMX6VCaCZMEltICxc898tMWOwUHR0wapekUgvvel1l/P 8jLMdDolwt2ssl4Gs0CMz+V1cUJtzZejX/mM8hrk= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Mon, 04 Dec 2023 08:52:30 +0100 Subject: [PATCH v2 17/18] sysctl: make ctl_table sysctl_mount_point const MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20231204-const-sysctl-v2-17-7a5060b11447@weissschuh.net> References: <20231204-const-sysctl-v2-0-7a5060b11447@weissschuh.net> In-Reply-To: <20231204-const-sysctl-v2-0-7a5060b11447@weissschuh.net> To: Kees Cook , "Gustavo A. R. Silva" , Luis Chamberlain , Iurii Zaikin , Greg Kroah-Hartman , Joel Granados Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1701676350; l=707; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=zByUx3Gq6P8LcvcqSjdgxm/5wuG+rVoanucvNQrnBwQ=; b=T4fe4Y4H+z9NMgxNToLMvDIdzWzUsQ1ROmqM+wleaFzcaGQIwqyaLjcqz7LoArGFd6dKvGI3b rnc8VQL+TsKC8bU/mHopWYEMAy89LdgzfJW/9Gr5m8N/9iOqPxqaHiW X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 03 Dec 2023 23:53:49 -0800 (PST) This is a first example on how to use const struct ctl_table. Signed-off-by: Thomas Weißschuh --- fs/proc/proc_sysctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index d09107a5b43f..f2b663e0be33 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -30,7 +30,7 @@ static const struct file_operations proc_sys_dir_file_operations; static const struct inode_operations proc_sys_dir_operations; /* Support for permanently empty directories */ -static struct ctl_table sysctl_mount_point[] = { +static const struct ctl_table sysctl_mount_point[] = { { } }; -- 2.43.0