BPF List
 help / color / mirror / Atom feed
* [PATCH v2 bpf-next 0/3] Fix and improvement for bpf_sysctl_set_new_value
@ 2024-05-20  9:14 Raman Shukhau
  2024-05-20  9:14 ` [PATCH v2 bpf-next 1/3] net: Fix " Raman Shukhau
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Raman Shukhau @ 2024-05-20  9:14 UTC (permalink / raw)
  To: bpf, ast, andrii, daniel; +Cc: Raman Shukhau

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-20 14:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-20  9:14 [PATCH v2 bpf-next 0/3] Fix and improvement for bpf_sysctl_set_new_value Raman Shukhau
2024-05-20  9:14 ` [PATCH v2 bpf-next 1/3] net: Fix " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox