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 syscall arguments to clone hooks #102

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 the missing arguments to the clone() system call, so that their values can be inspected when interception hooks are called. In our case, this is useful to keep track of what arguments have been passed to the clone() system call and react accordingly.


This change is Reviewable

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.

Reviewed 3 of 3 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @alberto-miranda)


test/test_clone_thread_preload.c, line 99 at r1 (raw file):

 */
static void
hook_child(unsigned long clone_flags,

What about parent hook? Would be nice to have it tested as well.

@codecov-io
Copy link

Codecov Report

Merging #102 (f4a14f6) into master (7031a8f) will increase coverage by 0.00%.
The diff coverage is 66.66%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #102   +/-   ##
=======================================
  Coverage   91.95%   91.96%           
=======================================
  Files          11       11           
  Lines         957      958    +1     
=======================================
+ Hits          880      881    +1     
  Misses         77       77           
Flag Coverage Δ
pmemfile_tests 86.37% <33.33%> (+0.01%) ⬆️
regular_tests 90.81% <66.66%> (+<0.01%) ⬆️

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.89% <66.66%> (+0.12%) ⬆️

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...f4a14f6. 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