syscall_intercept icon indicating copy to clipboard operation
syscall_intercept copied to clipboard

Add intercept hook after kernel syscall completes

Open alberto-miranda opened this issue 5 years ago • 2 comments

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 avatar Mar 30 '20 14:03 alberto-miranda

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 :)

alberto-miranda avatar Mar 30 '20 15:03 alberto-miranda

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%) :arrow_down:
regular_tests 90.71% <50.00%> (-0.09%) :arrow_down:

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%) :arrow_down:

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.

codecov-commenter avatar May 15 '21 13:05 codecov-commenter