Received: by 2002:ab2:6486:0:b0:1ef:eae8:a797 with SMTP id de6csp24419lqb; Fri, 15 Mar 2024 13:49:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpLg7dAXppi/adcRsUpSKg/kfz6g9SjQhfDcEQG7E1lovDQfa4avng7GODqvr5xSw/WJY+UxzGV+Iznfke8BHIFyvpAGTsFUwjEVJbFg== X-Google-Smtp-Source: AGHT+IEHO82p+wnNJO+cndNGoAyQhwZz8ixAzYKsa4no81bBwhTobGQCI3W2SLjlG61UIn8CVcqF X-Received: by 2002:a17:902:6504:b0:1dd:651d:cc3d with SMTP id b4-20020a170902650400b001dd651dcc3dmr5914914plk.4.1710535780547; Fri, 15 Mar 2024 13:49:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710535780; cv=pass; d=google.com; s=arc-20160816; b=IFPon02FWjGC/nu3XVSQsYMSJqsTVBUiqK5U8OhqT+FtD8YonairzS7UHelAe+zuof d0GUydJj1yuofe402i0slEr+JayPI7ufXsNLzlO0aLI7azTE7S+/Rfzq/2lh0nMtYGzv CO9g7T/cM2URaVlYu2f1usQXov4pYnV+87cns9A/z3maI2cnmWjqe2Zv3il3bjcdpKzT g3486mfMUoXpGZC3x9sewt60LQlkN2wYuGKBy/Hyzno7oTPAEUn6GXZGQmqgiNobsjcu 2rW42fZCLayuPqAoNJT4FE1LTRh0fEGwdweDu4JRVXP6nLk+M0uU723YnAt2SHfDeK5X E/gA== 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=dt3RSSxFIh3BCHHxJrwjnAoHDqJDG/guufZ1QNWwTCA=; fh=P5LopblOuM+wTyGvxUQN+d1jxiejuSAgMh+CJu1BpsA=; b=uqnUN8IJcXHDgLWC+S69/f46JES5jwBG+jIhyIbTS8TJNhD4w5pW+73cuS6bSHMTju Y4yYVGYa+q7lvs+Eqfq44kkok2UWCMrisNYK5AVsC8ecf4nPuq0dxZFXuKXqz4rgCZoT fG2uznyJkkfhEyXGGm3Ww5HPx1/VcnwxE8m2EAzstWyg4B0GqN1lPAFIkJ1wl4SZ+K14 av5mis+AY4us3alSfaDGoHd6GhdiP534yaBh2wB3jNPM1Akp2p18osmwEelTlfWm9Qh/ n1mzKrW0riL1wcWtrH4AHSq8UI/1Ufv9Y8w94PkVuzMlyIfQr90sBj3wcmZOQ2tHOO3H 5QNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=lRsv4Z9B; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-nfs+bounces-2337-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2337-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s14-20020a170902ea0e00b001dc28951d87si4298244plg.441.2024.03.15.13.49.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 13:49:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2337-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=lRsv4Z9B; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-nfs+bounces-2337-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2337-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4999DB20DE2 for ; Fri, 15 Mar 2024 20:49:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11CEB57333; Fri, 15 Mar 2024 20:48:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="lRsv4Z9B" 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 E18A31DFF8; Fri, 15 Mar 2024 20:48:25 +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=1710535709; cv=none; b=KzTqSrFnVGLgxZlYqp1g4EPEXFOhBsuGvfrA8+vRFCkUJwVg+aIJiSLp/OwxMGBmMOah9TIfhIkAFwGrFkHNuSGNJzsu19fqzTJa233YVzqMVceUYisAvTob/awmOnjT6DJDj3Aziiuepn25up7nPDEM8mjbVITwafaNAlOMaD0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710535709; c=relaxed/simple; bh=71R8uSwybXZePn/hRWXZmFtBWgxzbTZn7lLN/sI0ct8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lsMqLe2yOszEYIegQLCnXk2VO7A7CcNkGaDy23/E4oVTDaxnOVbj94Ac3xrZuZZQzqxwrrhHpMc+6yxb4e8L0eZTGdThP4FDafY8NOhiDdIikoxnHC/AzYyVuwV/lkda/GKpiA0S6KMdUfMRPwnRCFdJuyDKcbklz1n5Wk+Sw7M= 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=lRsv4Z9B; 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=1710535697; bh=71R8uSwybXZePn/hRWXZmFtBWgxzbTZn7lLN/sI0ct8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lRsv4Z9BtABJwb/x/sr0jT/ffaHtgaGIJaQNhXPIFehxU22UrZeOhl+MNP/n5GNRt JlHEstB5S7l8QpLccU0DCIGlvx+fB4q+PCoWEY+g0enoRMOwtyoGLxzzxdCrwcjk3Y FfwUZt+Em+SjtxwU6ocSEC2pAq54FlCCLx2fanAY= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 15 Mar 2024 21:48:00 +0100 Subject: [PATCH 02/11] cgroup: bpf: constify ctl_table arguments and fields 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: <20240315-sysctl-const-handler-v1-2-1322ac7cb03d@weissschuh.net> References: <20240315-sysctl-const-handler-v1-0-1322ac7cb03d@weissschuh.net> In-Reply-To: <20240315-sysctl-const-handler-v1-0-1322ac7cb03d@weissschuh.net> To: Greg Kroah-Hartman , Kees Cook , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Muchun Song , Andrew Morton , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Ahern , Simon Horman , Julian Anastasov , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , Luis Chamberlain , Joel Granados , Catalin Marinas , Will Deacon , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Gerald Schaefer , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Phillip Potter , Theodore Ts'o , "Jason A. Donenfeld" , Sudip Mukherjee , Mark Rutland , Atish Patra , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexander Viro , Christian Brauner , Jan Kara , Eric Biederman , Chandan Babu R , "Darrick J. Wong" , Steven Rostedt , Masami Hiramatsu , Peter Zijlstra , Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Ian Rogers , Adrian Hunter , Balbir Singh , "Naveen N. Rao" , Anil S Keshavamurthy , Petr Mladek , John Ogness , Sergey Senozhatsky , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Andy Lutomirski , Will Drewry , John Stultz , Stephen Boyd , Mathieu Desnoyers , "Matthew Wilcox (Oracle)" , Roopa Prabhu , Nikolay Aleksandrov , Remi Denis-Courmont , Allison Henderson , Marcelo Ricardo Leitner , Xin Long , Chuck Lever , Jeff Layton , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Trond Myklebust , Anna Schumaker , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Alexander Popov Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-fsdevel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-xfs@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, kexec@lists.infradead.org, bridge@lists.linux.dev, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-sctp@vger.kernel.org, linux-nfs@vger.kernel.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1710535695; l=686; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=71R8uSwybXZePn/hRWXZmFtBWgxzbTZn7lLN/sI0ct8=; b=1p7QVCfT76tMKe2lhkLAnq+rZy1Hhj119ioAiiSdaA/KcTCdEQiKcZfPuzjhQVMIgFHQpgyqi 8KV8JuqLJSRB3yPnZuNAH/QOQJporNVr2ZASPvZ5f6myZthtsTyJC9S X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= In a future commit the sysctl core will only use "const struct ctl_table". As a preparation for that adapt the cgroup-bpf code. Signed-off-by: Thomas Weißschuh --- include/linux/filter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/filter.h b/include/linux/filter.h index c99bc3df2d28..3238dcff5703 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -1366,7 +1366,7 @@ struct bpf_sock_ops_kern { struct bpf_sysctl_kern { struct ctl_table_header *head; - struct ctl_table *table; + const struct ctl_table *table; void *cur_val; size_t cur_len; void *new_val; -- 2.44.0