netlib.narod.ru< Назад | Оглавление | Далее >

include/linux/personality.h

15939 #ifndef _PERSONALITY_H
15940 #define _PERSONALITY_H
15941 
15942 #include <linux/linkage.h>
15943 #include <linux/ptrace.h>
15944 
15945 
15946 /* Flags for bug emulation. These occupy the top three
15947    bytes. */
15948 #define STICKY_TIMEOUTS         0x4000000
15949 #define WHOLE_SECONDS           0x2000000
15950 #define ADDR_LIMIT_32BIT        0x0800000
15951 
15952 /* Personality types. These go in the low byte. Avoid
15953  * using the top bit, it will conflict with error
15954  * returns.  */
15955 #define PER_MASK        (0x00ff)
15956 #define PER_LINUX       (0x0000)
15957 #define PER_LINUX_32BIT (0x0000 | ADDR_LIMIT_32BIT)
15958 #define PER_SVR4        (0x0001 | STICKY_TIMEOUTS)
15959 #define PER_SVR3        (0x0002 | STICKY_TIMEOUTS)
15960 #define PER_SCOSVR3     (0x0003 | STICKY_TIMEOUTS |     \
15961                                   WHOLE_SECONDS)
15962 #define PER_WYSEV386    (0x0004 | STICKY_TIMEOUTS)
15963 #define PER_ISCR4       (0x0005 | STICKY_TIMEOUTS)
15964 #define PER_BSD         (0x0006)
15965 #define PER_XENIX       (0x0007 | STICKY_TIMEOUTS)
15966 #define PER_LINUX32     (0x0008)
15967 
15968 /* Prototype for an lcall7 syscall handler. */
15969 typedef void (*lcall7_func)(struct pt_regs *);
15970 
15971 
15972 /* Description of an execution domain - personality range
15973  * supported, lcall7 syscall handler, start up / shut
15974  * down functions etc.  N.B. The name and lcall7 handler
15975  * must be where they are since the offset of the handler
15976  * is hard coded in kernel/sys_call.S.  */
15977 struct exec_domain {
15978   const char *name;
15979   lcall7_func handler;
15980   unsigned char pers_low, pers_high;
15981   unsigned long * signal_map;
15982   unsigned long * signal_invmap;
15983   struct module * module;
15984   struct exec_domain *next;
15985 };
15986 
15987 extern struct exec_domain default_exec_domain;
15988 
15989 extern struct exec_domain *lookup_exec_domain(
15990   unsigned long personality);
15991 extern int register_exec_domain(struct exec_domain *it);
15992 extern int unregister_exec_domain(struct exec_domain*it);
15993 asmlinkage int sys_personality(
15994   unsigned long personality);
15995 
15996 #endif /* _PERSONALITY_H */

netlib.narod.ru< Назад | Оглавление | Далее >

Сайт управляется системой uCoz