Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add Read-Only CTX Descriptor. #639

Open
gtrevi opened this issue May 17, 2024 · 0 comments
Open

Feature Request: Add Read-Only CTX Descriptor. #639

gtrevi opened this issue May 17, 2024 · 0 comments

Comments

@gtrevi
Copy link
Contributor

gtrevi commented May 17, 2024

Description:

I would like to propose the addition of a feature that allows the declaration of the CTX descriptor as read-only. This enhancement would enable scenarios where buffers are passed in fast pipelines, such as networking data paths, without the need for memory allocation.

Rationale:

Currently, the verifier permits BPF programs to modify the context buffer, which necessitates memory allocation to prevent potential issues. This can lead to catastrophic failures, as the modified memory may be reused by the caller for further processing. By allowing the CTX descriptor to be read-only, we can ensure the integrity of the context buffer and improve the efficiency of data processing pipelines.

Benefits:

  • Avoids unnecessary memory allocation.
  • Prevents potential catastrophic failures due to unintended modifications.
  • Improves performance in fast data pipelines, especially in networking scenarios.
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

No branches or pull requests

1 participant