forked from 0x0d/ixi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsct.h
More file actions
54 lines (46 loc) · 1.07 KB
/
sct.h
File metadata and controls
54 lines (46 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef _SCT_H_
#define _SCT_H_
#include <linux/syscalls.h>
#include <linux/mempool.h>
/*
* IDT structure, the same for 32 and 64 bit
*/
struct idtr {
unsigned short limit;
void * base;
} __attribute__ ((packed));
#ifdef __i386__
/*
* x86 idt_descriptor
*/
struct idt_descriptor {
unsigned short offset_low;
unsigned short selector;
unsigned char zero;
unsigned char type_flags;
unsigned short offset_high;
} __attribute__ ((packed));
#elif defined(CONFIG_IA32_EMULATION)
/*
* x86_64 idt descriptor
* in long mode -- 64bit mode and compatity mode,
* every IDT entry has a 16-byte size
*/
struct idt_descriptor {
unsigned short offset_low;
unsigned short selector;
unsigned char zero1;
unsigned char type_flags;
unsigned short offset_middle;
unsigned int offset_high;
unsigned int zero2;
} __attribute__ ((packed));
#endif
#if defined(__i386__)
void *get_sys_call_table(void);
#elif defined(__x86_64__)
void *get_ia32_sys_call_table(void);
void *get_sys_call_table(void);
#endif
void *get_sys_call_table_brute(void);
#endif