An error occurred fetching the project authors.
  1. 17 Sep, 2015 1 commit
  2. 16 Sep, 2015 1 commit
  3. 15 Sep, 2015 1 commit
    • Brenden Blanco's avatar
      Translate multiple pointer dereference into bpr_probe_read · 70fa0a1c
      Brenden Blanco authored
      This commit adds support for multiple consecutive and nested pointer
      dereference of function arguments that should be converted to
      bpf_probe_read. The logic works by marking variables as needing a
      probe_read if they come from the register argument, and then applying
      this property transitively.
      
      Supported syntax:
      ```
      int trace_entry(struct pt_regs *ctx, struct file *file) {
          struct vfsmount *mnt = file->f_path.mnt;
          struct super_block *k = mnt->mnt_sb;
          const char *name = file->f_path.dentry->d_name.name;
      ```
      
      Not supported: probe reads from map leaves, probe reads after explicit casts.
      
      Fixes: #188
      Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
      70fa0a1c
  4. 09 Sep, 2015 1 commit
    • Brenden Blanco's avatar
      Fix the inline replace of kprobe args · 3c4a29ce
      Brenden Blanco authored
      The way in which args 1+ were being replaced in the C file was
      fragile. Instead, assign the registers from ptregs into the function
      arguments as the first statement(s) in the body of the function.
      e.g.:
      int sys_clone(struct ptregs *ctx, struct request *req) {
        // do something with req
      }
      becomes:
      int sys_clone(struct ptregs *ctx, struct request *req) {
        req = ctx->di;
        // do something with req
      
      Fixes: #192
      Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
      3c4a29ce
  5. 06 Sep, 2015 1 commit
  6. 03 Sep, 2015 1 commit
  7. 12 Aug, 2015 2 commits
  8. 11 Aug, 2015 1 commit
  9. 09 Aug, 2015 1 commit
    • Brenden Blanco's avatar
      Add update_table API: accepts sscanf style strings and populates a map · 985adf61
      Brenden Blanco authored
      This is the culmination of the previous patches. It adds an api that can
      input map data in a string format, but validating the numbers and
      locations of data fields. The use case is for fuse file input/output. A
      printf api may follow.
      
      Take the table with key/leaf of:
        struct Key { int a; int b; };
        struct Leaf { int a; int b; int c; struct SubLeaf { int x; int y; } s; };
      
      One would input to this table using:
        update_table(table_name, "{1 2}", "{1 2 -3 {9 0xa}}");
      
      The implementation uses a JITed function for each unique type, that is
      invoked to run sscanf on behalf of the caller. The input must have the
      exact right number of arguments. Bit fields are supported, but the
      caller must be aware of the collapse of those bitfields into an aligned
      field, as well as endianness.
      Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
      985adf61
  10. 08 Aug, 2015 1 commit
  11. 07 Aug, 2015 1 commit
  12. 02 Jul, 2015 1 commit
  13. 01 Jul, 2015 1 commit
  14. 29 Jun, 2015 1 commit
    • Brenden Blanco's avatar
      Clean some brittle parts of clang rewriter · 561dafc0
      Brenden Blanco authored
      * Rewrites of text inside of a macro (even if just the arguments) is not
        support by clang. Convert macro definitions to pure rewrites instead.
      * For packet field access, no longer require 'skb' named
        argument...instead, learn it from the function parameter list.
      * Add a complex test case...supposedly this should have failed issue
        #10, but the C version does not exhibit the same failure as the B
        version.
      Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
      561dafc0