Skip to content

Dynptr memset#9153

Closed
theihor wants to merge 2 commits intokernel-patches:bpf-next_basefrom
theihor:dynptr-memset
Closed

Dynptr memset#9153
theihor wants to merge 2 commits intokernel-patches:bpf-next_basefrom
theihor:dynptr-memset

Conversation

@theihor
Copy link
Copy Markdown
Contributor

@theihor theihor commented Jun 18, 2025

No description provided.

theihor added 2 commits June 18, 2025 15:09
Currently there is no straightforward way to fill dynptr memory with a
value (most commonly zero). One can do it with bpf_dynptr_write(), but
a temporary buffer is necessary for that.

Implement bpf_dynptr_memset() - an analogue of memset() from libc.

Signed-off-by: Ihor Solodrai <isolodrai@meta.com>
Add tests to verify the behavior of bpf_dynptr_memset():
  * normal memset 0
  * memset in dynptr that was adjusted
  * error: size overflow
  * error: readonly dynptr

Signed-off-by: Ihor Solodrai <isolodrai@meta.com>
@kernel-patches-daemon-bpf kernel-patches-daemon-bpf Bot force-pushed the bpf-next_base branch 4 times, most recently from 1c12ad1 to 4b5a6fc Compare June 23, 2025 16:35
@theihor theihor closed this Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant