2 Compatibility with the linux kernel environment
16 extern struct module
*module_list
;
27 struct task_struct
*next
;
30 unsigned long __get_free_page(int type
);
31 void *kmalloc(size_t size
, int type
);
33 void free_page(unsigned long page
);
34 void kfree(void *mem
);
35 void vfree(void *mem
);
37 size_t strncpy_from_user(char *addr
, const char *user_name
, size_t size
);
39 void lock_kernel(void);
40 void unlock_kernel(void);
42 /* void __asm__(char *str); */
44 #define for_each_task(t) for(t= task_list; t; t=t->next)
45 extern struct task_struct
*task_list
;
47 typedef struct { int foo
; } pgprot_t
;
48 extern void *__vmalloc(unsigned long size
, int gfp_mask
, pgprot_t prot
);
50 #define ElfW(type) Elf_ ## type
51 typedef unsigned long Elf_Addr
;
52 typedef unsigned long Elf_Word
;
54 void kallsyms_sections(void *infop
,
55 int (*fp
)(void *token
, const char *modname
, const char *secname
,
56 ElfW(Addr
) secstart
, ElfW(Addr
) secend
, ElfW(Word
) secflags
));
58 unsigned long __generic_copy_to_user(void *, const void *, unsigned long);
59 unsigned long __generic_copy_from_user(void *, const void *, unsigned long);
61 struct lock
{ int dummy
; };
62 extern struct lock tasklist_lock
;
63 void read_lock(struct lock
*lock
);
64 void read_unlock(struct lock
*lock
);
66 void udelay(unsigned long usecs
);
68 int copy_to_user(void * result_record
, void *res
, size_t size
);
70 void panic(char *str
);
72 #define PAGE_SIZE (0x1000)
73 #define PAGE_MASK (0x0fff)
74 #define PAGE_OFFSET 0 /* What does this do? */
75 #define TASK_SIZE 0 /* What does this do? */
77 void printk(char *fmt
, ...);
80 #include "db_machdep.h"
81 int kallsyms_address_to_symbol(db_expr_t off
,
82 const char * *mod_name
, unsigned long *mod_start
, unsigned long *mod_end
,
83 const char * *sec_name
, unsigned long *sec_start
, unsigned long *sec_end
,
84 const char * *sym_name
, unsigned long *sym_start
, unsigned long *sym_end
);
86 int read_nlist(const char *filenamer
, struct nlist
**nlist_table
);
88 unsigned long text_read_ul(void *addr
);
89 unsigned char text_read_ub(void *addr
);
90 void text_write_ul(void *addr
, unsigned long value
);
91 void text_write_ub(void *addr
, unsigned char value
);
93 extern pid_t victim_pid
;
94 extern char *victim_exe
;
96 void load_nlist(char *exe_name
, unsigned long *btextp
, unsigned long *etextp
);