GithubHelp home page GithubHelp logo

etrace's People

Contributors

dependabot[bot] avatar gui774ume avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

etrace's Issues

kprobe/kretprobe sys_execve can't get argv

hi, i try to use 'kprobe/kretprobe' hook sys function: 'sys_execve'.

i want to cache the param: const __user char *const __user *argv

but in kprobe, i can't get argv value , it is empty.

So, why? please tell me, thanks!

this is my code:

image

image

when i run : ls or clear or cat ...

cat trace_pipe, it appear :

     git-58259   [000] d... 226270.286553: bpf_trace_printk: enter save args info buffer agrp, agrp value

empty!!!
i's confused, may be i use wrong method. but i don't know correct ways. i hope you can help me!!! thanks!!!

Define if args should be fetched on syscall entry or syscall exit

What's happening ?

Syscall parameters are fetched on syscall return. The rationale was that I wanted to avoid page faults (and thus the -14 error on return of the bpf_probe_read* helpers). Unfortunately some parameters (like the execve arguments) need to be fetched on entry, since the values will no longer exist once the new binary is executed.

Page faults

I see 2 options to resolve the page fault problem:

  • If this entry / exit problem applies to the execve syscall only, we should hook later in the execve syscall call path (I'm thinking something like security_bprm_committed_creds ) to read the parameters.
  • We can try to look for a sleepable hook point.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.