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

fix(driver): use extract__egid instread of extract__euid helper #779

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

Andreagit97
Copy link
Member

What type of PR is this?

/kind bug

Any specific area of the project related to this PR?

/area driver-modern-bpf

Does this PR require a change in the driver versions?

No

What this PR does / why we need it:

This PR fixes some typos, we need to extract the gid instead of the uid

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
@poiana
Copy link
Contributor

poiana commented Dec 8, 2022

LGTM label has been added.

Git tree hash: fe646a4564081b1eb1d14af058ee5c3188702aad

@poiana
Copy link
Contributor

poiana commented Dec 8, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, gnosek, hbrueckner

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dwindsor
Copy link
Contributor

dwindsor commented Dec 8, 2022

Nice! I assumed that since gid_t and uid_t are basically the same, that extract__euid would work! I assume that this will now be used in the getegid() modern probe?

@poiana poiana merged commit 475333b into master Dec 8, 2022
@poiana poiana deleted the fix_euid branch December 8, 2022 14:46
@Andreagit97
Copy link
Member Author

Andreagit97 commented Dec 8, 2022

I assume that this will now be used in the getegid() modern probe?

@dwindsor If you mean in the syscall getegid, the implementation you have done in #776 is correct! We are instrumenting the getegid syscall so we have direct access to the gid_t since it is the return value of the syscall. In this PR I have to use these helpers because we are trying to extract the git_t directly from the kernel and not from the syscall params. Let me know if this is not clear :)

@Andreagit97 Andreagit97 added this to the 4.0.0+driver milestone Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants