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

Add intercept hook after kernel syscall completes #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alberto-miranda
Copy link

@alberto-miranda alberto-miranda commented Mar 30, 2020

This PR adds an additional intercept_hook_point_post_kernel hook to the API that allows users to register a function to be called after a system call has been executed by the kernel by using syscall_no_intercept. In our case, this allows us to debug our interception layer, since we can now keep track of/log system call results for those syscalls where we don't really need to do anything. Since this has proved really useful to us, we thought it might be a worthwhile addition to the API.


This change is Reviewable

@alberto-miranda
Copy link
Author

This PR doesn't include a specific test for the new hook since I was unsure what the best way to test it was. I'm open to suggestions :)

Copy link
Contributor

@krzycz krzycz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you elaborate on your concerns about the test?

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@pbalcer pbalcer requested a review from GBuella December 30, 2020 09:23
@codecov-commenter
Copy link

Codecov Report

Merging #103 (a526e12) into master (7031a8f) will decrease coverage by 0.08%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #103      +/-   ##
==========================================
- Coverage   91.95%   91.86%   -0.09%     
==========================================
  Files          11       11              
  Lines         957      959       +2     
==========================================
+ Hits          880      881       +1     
- Misses         77       78       +1     
Flag Coverage Δ
pmemfile_tests 86.28% <50.00%> (-0.08%) ⬇️
regular_tests 90.71% <50.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
include/libsyscall_intercept_hook_point.h 50.00% <ø> (ø)
src/intercept.c 80.37% <50.00%> (-0.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7031a8f...a526e12. Read the comment docs.

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.

None yet

3 participants