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

_open_osfhandle() fails for the program handle returned by ebpfcore. #287

Closed
saxena-anurag opened this issue Jun 18, 2021 · 7 comments · Fixed by #346 or #513
Closed

_open_osfhandle() fails for the program handle returned by ebpfcore. #287

saxena-anurag opened this issue Jun 18, 2021 · 7 comments · Fixed by #346 or #513
Assignees
Labels
bug Something isn't working triaged Discussed in a triage meeting
Milestone

Comments

@saxena-anurag
Copy link
Contributor

_open_osfhandle() is failing currently when called for the program handle returned by ebpfcore. It may have to do with the CreateOptions used in ZwCreateFile, needs to be investigated.

@dthaler dthaler added the bug Something isn't working label Jun 19, 2021
@dthaler dthaler added the triaged Discussed in a triage meeting label Jun 21, 2021
@dthaler dthaler added this to the 2107 milestone Jun 21, 2021
@Alan-Jowett Alan-Jowett modified the milestones: 2107, 2108 Jul 26, 2021
@Alan-Jowett Alan-Jowett linked a pull request Jul 26, 2021 that will close this issue
@dthaler dthaler reopened this Jul 27, 2021
@dthaler
Copy link
Collaborator

dthaler commented Jul 27, 2021

Reopening since there is still the workaround to use sequential ids that needs to be removed if this fixes the underlying issue.

@Alan-Jowett
Copy link
Member

Assigning back to @saxena-anurag as the driver issue should now be fixed.

@dthaler
Copy link
Collaborator

dthaler commented Jul 27, 2021

@saxena-anurag I can do this one if you prefer

@Alan-Jowett
Copy link
Member

I am fine doing it, I just couldn't find where the code is that is doing this.

@dthaler
Copy link
Collaborator

dthaler commented Jul 27, 2021

I made a change, I just need to test it

@saxena-anurag
Copy link
Contributor Author

The code has issue#287 mentioned where we need to make the change. Mainly 2 places:

  1. Where the fd is generated (function _get_next_file_descriptor())
  2. Where we get handle from fd (function _get_handle_from_fd())

I think we will also need to write a platform specific version of _open_osfhandle(), like there is for DeviceIoControl() for UM tests to work.

@dthaler
Copy link
Collaborator

dthaler commented Jul 28, 2021

Yeah, ebpf_handle_user.c just returns integers, not things that _open_osfhandle() will accept

@saxena-anurag saxena-anurag modified the milestones: 2108, 2109 Aug 30, 2021
@Alan-Jowett Alan-Jowett self-assigned this Sep 10, 2021
Alan-Jowett referenced this issue in Alan-Jowett/ebpf-for-windows Sep 11, 2021
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged Discussed in a triage meeting
Projects
None yet
3 participants