Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
charmoniumQ committed Aug 8, 2024
1 parent b13a0dc commit 422eb26
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 23 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ $ probe dump

That's a huge [work in progress](https://github.com/charmoniumQ/PROBE/pulls).

We're starting out with just "analysis" of the provenance. Does this input file influence that output file in the PROBEd process? Run


``` bash
nix shell nixpkgs#graphviz github:charmoniumQ/PROBE#probe-py-manual \
--command sh -c 'python -m probe_py.manual.cli process-graph | tee /dev/stderr | dot -Tpng -ooutput.png /dev/stdin'
```

## Developing PROBE

1. Follow the previous step to install Nix.
Expand Down
Binary file added output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion probe_src/libprobe/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SOURCE_VERSION ?= $(shell git rev-parse --short HEAD)
CFLAGS ?= -DSOURCE_VERSION=\"$(SOURCE_VERSION)\" -Wno-cast-function-type -Wno-array-parameter -ffreestanding -Wl,--as-needed -Wall -Wextra -pthread -fPIC -nostdlib -shared $(NIX_CFLAGS_COMPILE)
CFLAGS ?= -DSOURCE_VERSION=\"$(SOURCE_VERSION)\" -Wno-cast-function-type -Wno-array-parameter -ffreestanding -Wl,--as-needed -ldl -Wall -Wextra -pthread -fPIC -nostdlib -shared $(NIX_CFLAGS_COMPILE)
DBGCFLAGS ?= -Og -g
OPTCFLAGS ?= -O3 -DNDEBUG

Expand Down
22 changes: 0 additions & 22 deletions probe_src/libprobe/include/libprobe/prov_ops.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
#ifdef PYCPARSER
#define _BITS_BYTESWAP_H
#define __attribute__(x)
#define __bswap_64(x)
#define __restrict
#define __inline
#define __extension__
#define BORROWED
#define OWNED
#define _GNU_SOURCE
#define __asm__(x)
#define __signed__ signed
#include <stdint.h>
#include <stdbool.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/resource.h>
#include <utime.h>
#include <threads.h>
#include <pthread.h>
#endif

struct Path {
int32_t dirfd_minus_at_fdcwd;
const char* path; /* path valid if non-null */
Expand Down
6 changes: 6 additions & 0 deletions probe_src/probe_frontend/lib/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ fn main() {
.into_string()
.unwrap(),
)
.clang_args(
env::var("CFLAGS")
.unwrwap_or("".to_owned())
.split(':')
.filter(|string| !string.is_empty())
)
// .header_contents("sizeof", "
// const size_t OP_SIZE = sizeof(struct Op);
// ")
Expand Down
64 changes: 64 additions & 0 deletions test.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
strict digraph {
"(911755, 0, 911755, 0)" [label="911755.0.911755.0\nInitExecEpochOp"];
"(911755, 0, 911755, 1)" [label="911755.0.911755.1\nInitThreadOp"];
"(911755, 0, 911755, 2)" [label="911755.0.911755.2\nOpenOp\n. (fd=7)"];
"(911755, 0, 911755, 3)" [label="911755.0.911755.3\nReaddirOp"];
"(911755, 0, 911755, 4)" [label="911755.0.911755.4\nReaddirOp"];
"(911755, 0, 911755, 5)" [label="911755.0.911755.5\nReaddirOp"];
"(911755, 0, 911755, 6)" [label="911755.0.911755.6\nReaddirOp"];
"(911755, 0, 911755, 7)" [label="911755.0.911755.7\nReaddirOp"];
"(911755, 0, 911755, 8)" [label="911755.0.911755.8\nReaddirOp"];
"(911755, 0, 911755, 9)" [label="911755.0.911755.9\nReaddirOp"];
"(911755, 0, 911755, 10)" [label="911755.0.911755.10\nReaddirOp"];
"(911755, 0, 911755, 11)" [label="911755.0.911755.11\nReaddirOp"];
"(911755, 0, 911755, 12)" [label="911755.0.911755.12\nReaddirOp"];
"(911755, 0, 911755, 13)" [label="911755.0.911755.13\nReaddirOp"];
"(911755, 0, 911755, 14)" [label="911755.0.911755.14\nReaddirOp"];
"(911755, 0, 911755, 15)" [label="911755.0.911755.15\nReaddirOp"];
"(911755, 0, 911755, 16)" [label="911755.0.911755.16\nReaddirOp"];
"(911755, 0, 911755, 17)" [label="911755.0.911755.17\nReaddirOp"];
"(911755, 0, 911755, 18)" [label="911755.0.911755.18\nReaddirOp"];
"(911755, 0, 911755, 19)" [label="911755.0.911755.19\nReaddirOp"];
"(911755, 0, 911755, 20)" [label="911755.0.911755.20\nReaddirOp"];
"(911755, 0, 911755, 21)" [label="911755.0.911755.21\nReaddirOp"];
"(911755, 0, 911755, 22)" [label="911755.0.911755.22\nReaddirOp"];
"(911755, 0, 911755, 23)" [label="911755.0.911755.23\nReaddirOp"];
"(911755, 0, 911755, 24)" [label="911755.0.911755.24\nReaddirOp"];
"(911755, 0, 911755, 25)" [label="911755.0.911755.25\nReaddirOp"];
"(911755, 0, 911755, 26)" [label="911755.0.911755.26\nReaddirOp"];
"(911755, 0, 911755, 27)" [label="911755.0.911755.27\nReaddirOp"];
"(911755, 0, 911755, 28)" [label="911755.0.911755.28\nCloseOp\n7"];
"(911755, 0, 911755, 29)" [label="911755.0.911755.29\nCloseOp\n1"];
"(911755, 0, 911755, 30)" [label="911755.0.911755.30\nCloseOp\n2"];
"(911755, 0, 911755, 0)" -> "(911755, 0, 911755, 1)" [color=green];
"(911755, 0, 911755, 1)" -> "(911755, 0, 911755, 2)" [color=green];
"(911755, 0, 911755, 2)" -> "(911755, 0, 911755, 3)" [color=green];
"(911755, 0, 911755, 3)" -> "(911755, 0, 911755, 4)" [color=green];
"(911755, 0, 911755, 4)" -> "(911755, 0, 911755, 5)" [color=green];
"(911755, 0, 911755, 5)" -> "(911755, 0, 911755, 6)" [color=green];
"(911755, 0, 911755, 6)" -> "(911755, 0, 911755, 7)" [color=green];
"(911755, 0, 911755, 7)" -> "(911755, 0, 911755, 8)" [color=green];
"(911755, 0, 911755, 8)" -> "(911755, 0, 911755, 9)" [color=green];
"(911755, 0, 911755, 9)" -> "(911755, 0, 911755, 10)" [color=green];
"(911755, 0, 911755, 10)" -> "(911755, 0, 911755, 11)" [color=green];
"(911755, 0, 911755, 11)" -> "(911755, 0, 911755, 12)" [color=green];
"(911755, 0, 911755, 12)" -> "(911755, 0, 911755, 13)" [color=green];
"(911755, 0, 911755, 13)" -> "(911755, 0, 911755, 14)" [color=green];
"(911755, 0, 911755, 14)" -> "(911755, 0, 911755, 15)" [color=green];
"(911755, 0, 911755, 15)" -> "(911755, 0, 911755, 16)" [color=green];
"(911755, 0, 911755, 16)" -> "(911755, 0, 911755, 17)" [color=green];
"(911755, 0, 911755, 17)" -> "(911755, 0, 911755, 18)" [color=green];
"(911755, 0, 911755, 18)" -> "(911755, 0, 911755, 19)" [color=green];
"(911755, 0, 911755, 19)" -> "(911755, 0, 911755, 20)" [color=green];
"(911755, 0, 911755, 20)" -> "(911755, 0, 911755, 21)" [color=green];
"(911755, 0, 911755, 21)" -> "(911755, 0, 911755, 22)" [color=green];
"(911755, 0, 911755, 22)" -> "(911755, 0, 911755, 23)" [color=green];
"(911755, 0, 911755, 23)" -> "(911755, 0, 911755, 24)" [color=green];
"(911755, 0, 911755, 24)" -> "(911755, 0, 911755, 25)" [color=green];
"(911755, 0, 911755, 25)" -> "(911755, 0, 911755, 26)" [color=green];
"(911755, 0, 911755, 26)" -> "(911755, 0, 911755, 27)" [color=green];
"(911755, 0, 911755, 27)" -> "(911755, 0, 911755, 28)" [color=green];
"(911755, 0, 911755, 28)" -> "(911755, 0, 911755, 29)" [color=green];
"(911755, 0, 911755, 29)" -> "(911755, 0, 911755, 30)" [color=green];
}

0 comments on commit 422eb26

Please sign in to comment.