From: Raman Shukhau <ramasha@meta.com>
To: <bpf@vger.kernel.org>, <ast@kernel.org>, <andrii@kernel.org>,
<daniel@iogearbox.net>
Cc: Raman Shukhau <ramasha@meta.com>
Subject: [PATCH v2 bpf-next 0/3] Fix and improvement for bpf_sysctl_set_new_value
Date: Mon, 20 May 2024 02:14:21 -0700 [thread overview]
Message-ID: <20240520091424.2427762-1-ramasha@meta.com> (raw)
Changes v1 => v2:
1. corrected copyright comments
2. unsigned int for sysctl name to prevent build test error:
"R2 min value is negative, either use unsigned or 'var &= const'"
Fix and improvement for bpf_sysctl_set_new_value
This patch set is doing several changes around bpf_sysctl_set_new_value
(1 fix, 1 improvement, 1 test):
1. Fix is for return value check, when sysctl value is updated from BPF
handler with call to bpf_sysctl_set_new_value.
2. Improvement for bpf_sysctl_set_new_value to match behavior with
sysctl write call. Result value shouldn't include "\0", otherwise
proc_sys_call_handler rejects value.
3. New cgrp_sysctl test suite is added. It has single test to check
behavior of bpf_sysctl_set_new_value and is called from BPF
test_progs test suite.
Raman Shukhau (3):
net: Fix for bpf_sysctl_set_new_value
net: Improvement for bpf_sysctl_set_new_value
net: new cgrp_sysctl test suite
kernel/bpf/cgroup.c | 7 +-
.../selftests/bpf/prog_tests/cgrp_sysctl.c | 103 ++++++++++++++++++
.../testing/selftests/bpf/progs/cgrp_sysctl.c | 51 +++++++++
3 files changed, 159 insertions(+), 2 deletions(-)
create mode 100644 tools/testing/selftests/bpf/prog_tests/cgrp_sysctl.c
create mode 100644 tools/testing/selftests/bpf/progs/cgrp_sysctl.c
--
2.43.0
next reply other threads:[~2024-05-20 9:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 9:14 Raman Shukhau [this message]
2024-05-20 9:14 ` [PATCH v2 bpf-next 1/3] net: Fix for bpf_sysctl_set_new_value Raman Shukhau
2024-05-20 9:14 ` [PATCH v2 bpf-next 2/3] net: Improvement " Raman Shukhau
2024-05-20 9:14 ` [PATCH v2 bpf-next 3/3] net: new cgrp_sysctl test suite Raman Shukhau
2024-05-20 14:59 ` [PATCH v2 bpf-next 0/3] Fix and improvement for bpf_sysctl_set_new_value Alexei Starovoitov
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=20240520091424.2427762-1-ramasha@meta.com \
--to=ramasha@meta.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
/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