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

Log openat modes instead of every read / write #20

Closed
5 tasks done
krs85 opened this issue Dec 9, 2020 · 0 comments
Closed
5 tasks done

Log openat modes instead of every read / write #20

krs85 opened this issue Dec 9, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@krs85
Copy link
Contributor

krs85 commented Dec 9, 2020

Right now we are intercepting every read and write. This is expensive and noisy. For now, let's instead log open calls by their mode. If a file is opened for reading only, we assume it's been read. If a file is opened with writing only, we assume it was written to. If it opens for both, we assume it was read and written.

  • Remove read and write handling in event loop

  • Stop intercepting read and write

  • Extend handling of openat to report the mode the file is opened in

  • move this logic to a helper function handle_openat()

  • call this function in the posthook, not the prehook. The fd is not correct until the posthook, and we only want to report successful openings in read, write, or read/write mode, and successful file creations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant