Skip to content

Commit e1c9529

Browse files
committed
Update pri_taint hypercall for LAVA - Just dwarf2 fix now
1 parent c980dca commit e1c9529

File tree

7 files changed

+223
-289
lines changed

7 files changed

+223
-289
lines changed

panda/plugins/dwarf2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Summary
55
-------
66

77
The `dwarf2` plugin is to be a replacement of `pri_dwarf` plugin. The workflow is to run
8-
`dwarfdump -dil ${TARGET_PROG} | PYTHONPATH="panda/scripts/" python -c "import sys;import dwarfdump;dwarfdump.parse_dwarfdump(sys.stdin.read(), '${TARGET_PROG}')"`.
8+
`dwarfdump -dil ${TARGET_PROG} | python -c "import sys;from pandare.extras import dwarfdump;dwarfdump.parse_dwarfdump(sys.stdin.read(), '${TARGET_PROG}')"`.
99
This is going to generate 4 json DWARF symbol files including: Line Info, Global Variables, Function Info, and Type Info. Place these json files under debug path for this plugin to read.
1010

1111
Arguments

panda/plugins/dwarf2/dwarf2.cpp

Lines changed: 130 additions & 183 deletions
Large diffs are not rendered by default.

panda/plugins/hypercaller/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ This was designed primarily for Python use cases:
5151
MAGIC = 0x12345678
5252
@panda.hypercall(MAGIC)
5353
def hypercall(cpu):
54-
print("Hello from my hypercall!"
54+
print("Hello from my hypercall!")
5555

5656
```
5757

@@ -64,7 +64,7 @@ It's much easier to handle this from Python, but here's an example of how you mi
6464
#include <panda/plugin.h>
6565
#include <hypercaller/hypercaller.h>
6666

67-
hypercall_t* register_hypercall;
67+
register_hypercall_t register_hypercall;
6868

6969
void my_hypercall(CPUState *cpu) {
7070
printf("Hello from my hypercall!\n");
@@ -76,7 +76,7 @@ bool init_plugin(void *self) {
7676
panda_require("hypercaller");
7777
hypercaller = panda_get_plugin_by_name("hypercaller");
7878
}
79-
register_hypercall = (hypercall_t*)dlsym(hypercaller, "register_hypercall");
79+
register_hypercall_t register_hypercall = (register_hypercall_t) dlsym(hypercaller, "register_hypercall");
8080
register_hypercall(0x12345678, my_hypercall);
8181
return true;
8282
}

panda/plugins/hypercaller/hypercaller.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// files in this directory that contain subsections like this one.
77

88
typedef void (*hypercall_t)(CPUState *cpu);
9+
typedef void (*register_hypercall_t)(uint32_t, hypercall_t);
910
void register_hypercall(uint32_t magic, hypercall_t);
1011
void unregister_hypercall(uint32_t magic);
1112

0 commit comments

Comments
 (0)