An error occurred fetching the project authors.
- 17 Sep, 2015 1 commit
-
-
Brenden Blanco authored
This adds support for static helper functions that can be reused. It is not necessary to include pt_regs in the helper functions, even though external pointers may be dereferenced. Arguments in the helpers can also be reordered. Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
-
- 16 Sep, 2015 1 commit
-
-
Brenden Blanco authored
It is easy enough to wrap the type in a typeof(), otherwise the rewriter would need to do a deeper parsing of the type information to place it properly next to the variable name. Fixes: #219 Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
-
- 15 Sep, 2015 1 commit
-
-
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: Brenden Blanco <bblanco@plumgrid.com>
-
- 09 Sep, 2015 1 commit
-
-
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: Brenden Blanco <bblanco@plumgrid.com>
-
- 06 Sep, 2015 1 commit
-
-
Brenden Blanco authored
* Usage: BPF_HASH(tablename, key_type=u64, leaf_type=u64) 2nd and 3rd arguments are optional in the C++ default argument style Fixes: #135 Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
-
- 03 Sep, 2015 1 commit
-
-
Brenden Blanco authored
* Rename python module to bcc * Rename python-bpf (deb,rpm) package to python-bcc * Pending this change, I will likely re-tag 0.1.6, and upload the bcc package to pypi.python.org Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
-
- 12 Aug, 2015 2 commits
-
-
Brenden Blanco authored
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
-
Brenden Blanco authored
There was an issue where the rewrite of bpf_trace_printk combined with conversion of function argument to ctx->$reg was mangling the text. Fix up this case and add a test. Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
-
- 11 Aug, 2015 1 commit
-
-
Brenden Blanco authored
Issue occurs in the description visitor class, when the struct used in a map key is a pointer to self, as in: struct node; struct node { struct node *next; }; Avoid this in the desc by using "unsigned long long" for all pointers. Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
-
- 09 Aug, 2015 1 commit
-
-
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: Brenden Blanco <bblanco@plumgrid.com>
-
- 08 Aug, 2015 1 commit
-
-
Brenden Blanco authored
After the modules have been created, create a helper function for each table leaf/key type. Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
-
- 07 Aug, 2015 1 commit
-
-
Brenden Blanco authored
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
-
- 02 Jul, 2015 1 commit
-
-
Brenden Blanco authored
* Feedback given by some external users was that the PROTO syntax was opaque and unintuitive. As such, drop that macro and introduce an alternative syntax. * Convert all to use 'cursor_advance' macro API Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
-
- 01 Jul, 2015 1 commit
-
-
Brenden Blanco authored
* Rewrite accesses to args beyond the first to use bpf_probe_read - Support struct access - Support POD type accesses Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
-
- 29 Jun, 2015 1 commit
-
-
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: Brenden Blanco <bblanco@plumgrid.com>
-