Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2780152lqt; Tue, 23 Apr 2024 00:56:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2n6ryHNqhuZTJQWzoxSmfpSlSwatGttIr7HvfVfgLUl9SJUOuxGxzTYaVTQbzrfvZqMn7KIGTS+Gz5XxWw1A7Nhe7jFBpYUwMjIZJjQ== X-Google-Smtp-Source: AGHT+IGwwOCGzHgeXgO49fMXRRZ/0KZibxJrtI9/7acfG/lqDUSdE5C1K6fu9tkX8NyNSGGVvg08 X-Received: by 2002:a50:9316:0:b0:56c:d35:1775 with SMTP id m22-20020a509316000000b0056c0d351775mr10707064eda.35.1713858994047; Tue, 23 Apr 2024 00:56:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713858994; cv=pass; d=google.com; s=arc-20160816; b=bxrLrnRLeQy/cRJzRpAFXoGAuY8uPuVHpdKtbcFstXqOEEyE6zTtlJpfK4M2R07kvd YmrEEOc93lxp3S/fUK301ZhM6jrMIUJ6UYmfwkJNf9OqMYkgFwYDntjiYicOdsbl+bYY gWCjuAzcaJDtWhLkeHkDb0Tke9NcOjF8IKyf4PHk9pKzdvvUpvPVJwdlYgkt4WPT/Lsk duIq201wDHEBXD1i27s15IOCxzUH5z+p9nupit4JeoVosQZEHgMk6xrGXXzow5bOZIBv S+Z+PcPa2ZxYG1J1tS6NuU7utnZdmMWCYE8FWPt8v8qea2IcCmBMgHy0bn91WWFZbqSY GRkQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=3MfFt51f4y3TwLLTLV3pPxUJwgdlScOTYqT2TYQV5hQ=; fh=VMT1zhh5TdCzVW4WOkCTD64YoVs6fdICDULVwYjy/wU=; b=JvOAwrjjPQUXiasi0Oe973EDrwlQx8TeZCdkwjBPiHRGoRdj9BerwkYEytEhQ6WOIv epPDjxPYHFH3QD5Mlig7UTTvoYclL635l6OLZAZgsVjzjtRub4csJiJZEHwsBxESUVwC pq4lfHb88hYuC7asajnGnLPueC3YGbOUDMjcHTPkpXOOi0zMvwVgqNgA9UIu/k3q2QfD Ek8CxBYeK1OByDNcG5GoL6Pg7hygXH8F3qb7KjQSrq0MP8UT6ND6AWJ/q0Gdv0v9PpRJ 6MD1QakGHyCAbtKPIKdHQlm0ShCnG+YRfB4d7tTVmINayQYdnhl5z/17K07tbDJB9xrs d/6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=Jh4kHqKR; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-nfs+bounces-2931-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2931-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id eb11-20020a0564020d0b00b0057203f45e4fsi3067916edb.646.2024.04.23.00.56.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 00:56:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2931-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=Jh4kHqKR; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-nfs+bounces-2931-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2931-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C15691F23418 for ; Tue, 23 Apr 2024 07:56:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB1C3524DE; Tue, 23 Apr 2024 07:56:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="Jh4kHqKR" X-Original-To: linux-nfs@vger.kernel.org Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 219CB4CDF9; Tue, 23 Apr 2024 07:56:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713858976; cv=none; b=qTqKVK4QplRoX22fdwUY0wMCJrziQb0ZBlJfz1yfw7if6/jRzOkNGnebci7dm59g8njd/ohJK19J77XzYGcEYaq5N9GOY+5hjX1sITAAW+NF7PnoeT22h8isTEtbtehn7UwFqKozNr+0WxqdNOff/hqX5TCsJDtGhjIVgiz5lEk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713858976; c=relaxed/simple; bh=rhTtJbRFTTDD/EEuqh+xmQGgJG7l1CgJQWXHlODBL5I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qm96t/1+h/2dALNfImfZmQxqYh5lHZheJ4Fd9pvb4QxMaXdGV/pnxvwQmV0Lywu0ToE+0f02FZIPFH/EeXeelZEY7gbFZvm5eb8meGnV1rJ7LqlJ8wEpeU3COh5jonq5iOGf10BAeVPiVjRHduHqc/7EcCKnLBjDms5/91eFHN8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=Jh4kHqKR; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1713858962; bh=rhTtJbRFTTDD/EEuqh+xmQGgJG7l1CgJQWXHlODBL5I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Jh4kHqKR8uFfgbO8D9WK1hxUfjPm8iO4Tj/1g9oqbdvZsvOO7NNctmOr5j9hI/VKE pHafcxJ8BdeddjSts/bMxWLccdEWmQmje38r1ok3DoPkrNGs3KG6i7U8YJpR6imRw2 VR1iTBJjamva0pTfL/MxJ99YyYItdDSAEsnB8hOA= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 23 Apr 2024 09:54:41 +0200 Subject: [PATCH v3 06/11] ipv4/sysctl: constify ctl_table arguments of utility functions Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240423-sysctl-const-handler-v3-6-e0beccb836e2@weissschuh.net> References: <20240423-sysctl-const-handler-v3-0-e0beccb836e2@weissschuh.net> In-Reply-To: <20240423-sysctl-const-handler-v3-0-e0beccb836e2@weissschuh.net> To: Luis Chamberlain , Joel Granados , Kees Cook Cc: Eric Dumazet , Dave Chinner , linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-xfs@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, kexec@lists.infradead.org, linux-hardening@vger.kernel.org, bridge@lists.linux.dev, lvs-devel@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-sctp@vger.kernel.org, linux-nfs@vger.kernel.org, apparmor@lists.ubuntu.com, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1713858961; l=1269; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=rhTtJbRFTTDD/EEuqh+xmQGgJG7l1CgJQWXHlODBL5I=; b=xkBxm95PFV9biLBQXL/jnQoslPWOqeiKfLilfo9X0/w/rpk96uwZ6XcT8dAItQlTvocuJZiXJ AWgjsh5bK7RD2GBrU5dFR8YS1o9Y0qoHpG5ydJoQPSEwJ0OoCUdGv/k X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= In a future commit the proc_handlers themselves will change to "const struct ctl_table". As a preparation for that adapt the internal helpers. Signed-off-by: Thomas Weißschuh --- net/ipv4/sysctl_net_ipv4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index ce5d19978a26..fc4c001bf72a 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -130,7 +130,8 @@ static int ipv4_privileged_ports(struct ctl_table *table, int write, return ret; } -static void inet_get_ping_group_range_table(struct ctl_table *table, kgid_t *low, kgid_t *high) +static void inet_get_ping_group_range_table(const struct ctl_table *table, + kgid_t *low, kgid_t *high) { kgid_t *data = table->data; struct net *net = @@ -145,7 +146,8 @@ static void inet_get_ping_group_range_table(struct ctl_table *table, kgid_t *low } /* Update system visible IP port range */ -static void set_ping_group_range(struct ctl_table *table, kgid_t low, kgid_t high) +static void set_ping_group_range(const struct ctl_table *table, + kgid_t low, kgid_t high) { kgid_t *data = table->data; struct net *net = -- 2.44.0