From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Kees Cook <keescook@chromium.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Luis Chamberlain <mcgrof@kernel.org>,
Iurii Zaikin <yzaikin@google.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Joel Granados <j.granados@samsung.com>
Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org,
"Thomas Weißschuh" <linux@weissschuh.net>
Subject: [PATCH RFC 2/7] bpf: cgroup: call proc handler through helper
Date: Sat, 25 Nov 2023 13:52:51 +0100 [thread overview]
Message-ID: <20231125-const-sysctl-v1-2-5e881b0e0290@weissschuh.net> (raw)
In-Reply-To: <20231125-const-sysctl-v1-0-5e881b0e0290@weissschuh.net>
The sysctl core will introduce a second handler function.
To prepare for this use the provided helper function to call either
handler function.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
kernel/bpf/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
index 491d20038cbe..d537b1c80a36 100644
--- a/kernel/bpf/cgroup.c
+++ b/kernel/bpf/cgroup.c
@@ -1715,7 +1715,7 @@ int __cgroup_bpf_run_filter_sysctl(struct ctl_table_header *head,
ctx.cur_val = kmalloc_track_caller(ctx.cur_len, GFP_KERNEL);
if (!ctx.cur_val ||
- table->proc_handler(table, 0, ctx.cur_val, &ctx.cur_len, &pos)) {
+ sysctl_run_handler(table, 0, ctx.cur_val, &ctx.cur_len, &pos)) {
/* Let BPF program decide how to proceed. */
ctx.cur_len = 0;
}
--
2.43.0
next prev parent reply other threads:[~2023-11-25 12:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20231125125305eucas1p2ebdf870dd8ef46ea9d346f727b832439@eucas1p2.samsung.com>
2023-11-25 12:52 ` [PATCH RFC 0/7] sysctl: constify sysctl ctl_tables Thomas Weißschuh
2023-11-25 12:52 ` [PATCH RFC 1/7] sysctl: add helper sysctl_run_handler Thomas Weißschuh
2023-11-25 12:52 ` Thomas Weißschuh [this message]
2023-11-25 12:52 ` [PATCH RFC 3/7] sysctl: add proc_handler_new to struct ctl_table Thomas Weißschuh
2023-11-25 12:52 ` [PATCH RFC 4/7] net: sysctl: add new sysctl table handler to debug message Thomas Weißschuh
2023-11-25 12:52 ` [PATCH RFC 5/7] treewide: sysctl: migrate proc_dostring to proc_handler_new Thomas Weißschuh
2023-11-25 12:52 ` [PATCH RFC 6/7] treewide: sysctl: migrate proc_dobool " Thomas Weißschuh
2023-11-25 12:52 ` [PATCH RFC 7/7] treewide: sysctl: migrate proc_dointvec " Thomas Weißschuh
2023-11-27 10:13 ` [PATCH RFC 0/7] sysctl: constify sysctl ctl_tables Joel Granados
2023-11-28 8:18 ` Thomas Weißschuh
2023-12-01 16:31 ` Joel Granados
2023-12-03 15:37 ` Thomas Weißschuh
2023-12-04 8:43 ` Joel Granados
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231125-const-sysctl-v1-2-5e881b0e0290@weissschuh.net \
--to=linux@weissschuh.net \
--cc=gregkh@linuxfoundation.org \
--cc=gustavoars@kernel.org \
--cc=j.granados@samsung.com \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=yzaikin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®