All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] bpf: fix sysctl new-value handling in __cgroup_bpf_run_filter_sysctl
@ 2026-06-03 10:53 Dawei Feng
  2026-06-03 10:53 ` [PATCH v3 1/3] bpf: NUL-terminate replaced sysctl value Dawei Feng
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Dawei Feng @ 2026-06-03 10:53 UTC (permalink / raw)
  To: martin.lau
  Cc: emil, ast, daniel, andrii, eddyz87, memxor, song, yonghong.song,
	jolsa, kees, joel.granados, bpf, linux-kernel, linux-fsdevel,
	jianhao.xu, Dawei Feng

This series fixes three bugs in the sysctl write-buffer replacement path
of __cgroup_bpf_run_filter_sysctl(). It resolves a kvzalloc()/kfree()
mismatch, adds a missing NUL terminator to the replacement string, and
updates a stale return value check to safely restore the replacement
functionality.

Patch Summary:
- patch 1 NUL-terminates the replaced sysctl value
- patch 2 uses kvfree() for the replaced sysctl write buffer
- patch 3 restores sysctl new-value replacement

Changelog:
v2 -> v3:
- reordered patches 1 and 2
- added the missing Reviewed-by/Acked-by tags to patches 2 and 3
- fixed the incorrect Fixes tag in patch 3
- simplified the dynamic test logs in patch 1 and 2, and updated
  titles

Dawei Feng (3):
  bpf: NUL-terminate replaced sysctl value
  bpf: use kvfree() for replaced sysctl write buffer
  bpf: Restore sysctl new-value from 1 to 0

 kernel/bpf/cgroup.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.34.1

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

end of thread, other threads:[~2026-06-05 23:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03 10:53 [PATCH v3 0/3] bpf: fix sysctl new-value handling in __cgroup_bpf_run_filter_sysctl Dawei Feng
2026-06-03 10:53 ` [PATCH v3 1/3] bpf: NUL-terminate replaced sysctl value Dawei Feng
2026-06-03 11:36   ` bot+bpf-ci
2026-06-03 14:37   ` Yonghong Song
2026-06-03 23:23     ` Alexei Starovoitov
2026-06-04 19:35       ` Yonghong Song
2026-06-03 14:47   ` Yonghong Song
2026-06-03 10:53 ` [PATCH v3 2/3] bpf: use kvfree() for replaced sysctl write buffer Dawei Feng
2026-06-03 10:53 ` [PATCH v3 3/3] bpf: Restore sysctl new-value from 1 to 0 Dawei Feng
2026-06-03 11:19   ` Jiayuan Chen
2026-06-03 11:36   ` bot+bpf-ci
2026-06-03 13:32   ` Mykyta Yatsenko
2026-06-05  2:55   ` Xu Kuohai
2026-06-05 23:00 ` [PATCH v3 0/3] bpf: fix sysctl new-value handling in __cgroup_bpf_run_filter_sysctl patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.