2 * BK Id: SCCS/s.checks.c 1.9 11/16/01 12:28:23 dgibson
4 #include <linux/errno.h>
5 #include <linux/sched.h>
6 #include <linux/kernel.h>
9 #include <linux/smp_lock.h>
10 #include <linux/stddef.h>
11 #include <linux/unistd.h>
12 #include <linux/ptrace.h>
13 #include <linux/slab.h>
14 #include <linux/user.h>
15 #include <linux/a.out.h>
17 #include <asm/pgtable.h>
18 #include <asm/uaccess.h>
19 #include <asm/system.h>
22 int printf(const char *, ...);
25 * Do various before compile checks of data structures
32 if ( sizeof(struct thread_struct) % 16 )
34 printf("Thread struct is not modulo 16 bytes: "
35 "%d bytes total, %d bytes off\n",
36 sizeof(struct thread_struct),
37 sizeof(struct thread_struct)%16);
42 if ( sizeof(struct pt_regs) % 16 )
44 printf("pt_regs struct is not modulo 16 bytes: "
45 "%d bytes total, %d bytes off\n",
46 sizeof(struct pt_regs),
47 sizeof(struct pt_regs)%16);
52 printf("Task size : %d bytes\n"
53 "Tss size : %d bytes\n"
54 "pt_regs size : %d bytes\n"
55 "Kernel stack size: %d bytes\n",
56 sizeof(struct task_struct), sizeof(struct thread_struct),
57 sizeof(struct pt_regs),
58 sizeof(union task_union) - sizeof(struct task_struct));