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

Revert overly strict check in link attach to provider #3495

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

Alan-Jowett
Copy link
Member

Description

Resolves: #3484

The values bpf_attach_type and link_type aren't meaningful to ebpfcore and it shouldn't block new values.

Copilot summary:
This pull request primarily focuses on enhancing the logging and error reporting mechanism in the libs/execution_context and libs/shared directories. The key changes include the addition of more detailed logging messages and the removal of certain conditions in the ebpf_validate_attach_provider_data function.

Enhancements to logging and error reporting:

  • libs/execution_context/ebpf_link.c: In the _ebpf_link_client_attach_provider function, the logging mechanism has been updated to provide more detailed information when the provider's ModuleId or program_type does not match the link's attach_type or program_type respectively.
  • libs/execution_context/ebpf_program.c: In the _ebpf_program_type_specific_program_information_attach_provider function, the log message now includes the program_type and ModuleId in case of a module ID mismatch.
  • libs/shared/shared_common.c: In the ebpf_validate_attach_provider_data function, the conditions checking the link_type and bpf_attach_type have been removed, simplifying the function.

Testing

CI/CD + testing with ntosebpfext

Documentation

No.

Installation

No.

@Alan-Jowett Alan-Jowett added this pull request to the merge queue Apr 25, 2024
Merged via the queue into microsoft:main with commit 92678e9 Apr 25, 2024
87 checks passed
@Alan-Jowett Alan-Jowett deleted the issue3484 branch April 25, 2024 01:19
shankarseal pushed a commit to shankarseal/ebpf-for-windows that referenced this pull request Apr 25, 2024
shankarseal added a commit that referenced this pull request Apr 25, 2024
* Fixes for memory leaks and crashes (#3485)

* test

* fix

* fix

* fix

* fix

* fix

* more fixes

* fix

* fix

* fix

* Revert "test"

This reverts commit ff02406.

* fix

* fix

* Revert overly strict check in link attach to provider (#3495)

Signed-off-by: Alan Jowett <[email protected]>
Co-authored-by: Alan Jowett <[email protected]>

---------

Signed-off-by: Alan Jowett <[email protected]>
Co-authored-by: Anurag Saxena <[email protected]>
Co-authored-by: Alan Jowett <[email protected]>
Co-authored-by: Alan Jowett <[email protected]>
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.

ebpf_validate_attach_provider_data is too restrictive
4 participants