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 | 106 ++++++++++++++++++ .../testing/selftests/bpf/progs/cgrp_sysctl.c | 51 +++++++++ 3 files changed, 162 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