Skip to content

aya-ebpf: return &CStr from _str helpers#1531

Draft
tamird wants to merge 1 commit into
aya-rs:mainfrom
tamird:read-str-return-cstr
Draft

aya-ebpf: return &CStr from _str helpers#1531
tamird wants to merge 1 commit into
aya-rs:mainfrom
tamird:read-str-return-cstr

Conversation

@tamird
Copy link
Copy Markdown
Member

@tamird tamird commented Apr 13, 2026

Replace deprecated helpers with non-deprecated ones and change to return
CStr since the underlying helpers are documented as always
nul-terminating the destination buffer.

TODO: the code (correctly) documents an inconsistency in the kernel
where it returns len=0 when the copied string is empty; that is fine
when the destination is non-empty but when the destination is empty
it's not possible to return a CStr backed by that buffer. So what do?


This change is Reviewable

Replace deprecated helpers with non-deprecated ones and change to return
`CStr` since the underlying helpers are documented as always
nul-terminating the destination buffer.

TODO: the code (correctly) documents an inconsistency in the kernel
where it returns len=0 when the copied string is empty; that is fine
when the destination is non-empty but when the destination *is* empty
it's not possible to return a CStr backed by that buffer. So what do?
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 13, 2026

Deploy Preview for aya-rs-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 91b6a15
🔍 Latest deploy log https://app.netlify.com/projects/aya-rs-docs/deploys/69dd22b3cd89370008787db1
😎 Deploy Preview https://deploy-preview-1531--aya-rs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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