Displaying 6 results from an estimated 6 matches for "vmi_annot".
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...ations proc_vmi_info_operations = {
+ .open = proc_vmi_info_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+#define VDEF(call) #call ,
+static char *vmi_call_name[] = {
+ VMI_CALLS
+};
+#undef VDEF
+
+static void print_annotation(struct seq_file *m, struct vmi_annotation *a)
+{
+ seq_printf(m, "%s %p %d %p %d %d\n",
+ vmi_call_name[a->vmi_call], a->nativeEIP, a->native_size,
+ a->translationEIP, a->translation_size, a->nop_size);
+}
+
+static int proc_vmi_annotations_show(struct seq_file *m, void *v)
+{
+ struct vmi_annotati...
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...ations proc_vmi_info_operations = {
+ .open = proc_vmi_info_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+#define VDEF(call) #call ,
+static char *vmi_call_name[] = {
+ VMI_CALLS
+};
+#undef VDEF
+
+static void print_annotation(struct seq_file *m, struct vmi_annotation *a)
+{
+ seq_printf(m, "%s %p %d %p %d %d\n",
+ vmi_call_name[a->vmi_call], a->nativeEIP, a->native_size,
+ a->translationEIP, a->translation_size, a->nop_size);
+}
+
+static int proc_vmi_annotations_show(struct seq_file *m, void *v)
+{
+ struct vmi_annotati...
2007 Apr 18
3
[RFC, PATCH 4/24] i386 Vmi inline implementation
...0x90; \
+ .equ vmi_pad, vmi_pad - vmi_cur_pad; \
+.endr;
+
+/*
+ * Create an annotation for a VMI call; the VMI call currently must be
+ * wrapped in one of the vmi_raw_call (for assembler) or one of the
+ * family of defined wrappers for C code.
+ * XXXPara - use local labels
+ */
+#define vmi_annotate(name) \
+ .pushsection .vmi.annotation,"a"; \
+ .align 4; \
+ .long name; \
+ .long vmi_padded_begin; \
+ .long vmi_translation_begin; \
+ .byte vmi_padded_len; \
+ .byte vmi_translation_len; \
+ .byte vmi_pad_total; \
+ .byte 0; \
+ .popsection;
+
+#define...
2007 Apr 18
3
[RFC, PATCH 4/24] i386 Vmi inline implementation
...0x90; \
+ .equ vmi_pad, vmi_pad - vmi_cur_pad; \
+.endr;
+
+/*
+ * Create an annotation for a VMI call; the VMI call currently must be
+ * wrapped in one of the vmi_raw_call (for assembler) or one of the
+ * family of defined wrappers for C code.
+ * XXXPara - use local labels
+ */
+#define vmi_annotate(name) \
+ .pushsection .vmi.annotation,"a"; \
+ .align 4; \
+ .long name; \
+ .long vmi_padded_begin; \
+ .long vmi_translation_begin; \
+ .byte vmi_padded_len; \
+ .byte vmi_translation_len; \
+ .byte vmi_pad_total; \
+ .byte 0; \
+ .popsection;
+
+#define...
2007 Apr 18
7
[RFC, PATCH 5/24] i386 Vmi code patching
...PUSH_EDX 0x52
+#define MNEM_PUSH_EBX 0x53
+#define MNEM_PUSH_ESP 0x54
+#define MNEM_PUSH_EBP 0x55
+#define MNEM_PUSH_ESI 0x56
+#define MNEM_PUSH_EDI 0x57
+#define MNEM_OPSIZE 0x66
+#define MNEM_LEA 0x8d
+#define MNEM_NOP 0x90
+#define MNEM_CALL_NEAR 0xe8
+
+static inline void patch_call_site(struct vmi_annotation *a, unsigned char *eip)
+{
+ unsigned long call = a->vmi_call;
+ unsigned char *dest = (unsigned char *)(&((VROMCallTable *)vmi_rom)->vromCall[call]);
+ *(unsigned long *)(eip+1) = dest-eip-5;
+}
+
+static void fixup_translation(struct vmi_annotation *a)
+{
+ unsigned char *c, *start...
2007 Apr 18
7
[RFC, PATCH 5/24] i386 Vmi code patching
...PUSH_EDX 0x52
+#define MNEM_PUSH_EBX 0x53
+#define MNEM_PUSH_ESP 0x54
+#define MNEM_PUSH_EBP 0x55
+#define MNEM_PUSH_ESI 0x56
+#define MNEM_PUSH_EDI 0x57
+#define MNEM_OPSIZE 0x66
+#define MNEM_LEA 0x8d
+#define MNEM_NOP 0x90
+#define MNEM_CALL_NEAR 0xe8
+
+static inline void patch_call_site(struct vmi_annotation *a, unsigned char *eip)
+{
+ unsigned long call = a->vmi_call;
+ unsigned char *dest = (unsigned char *)(&((VROMCallTable *)vmi_rom)->vromCall[call]);
+ *(unsigned long *)(eip+1) = dest-eip-5;
+}
+
+static void fixup_translation(struct vmi_annotation *a)
+{
+ unsigned char *c, *start...