Blame view
include/linux/personality.h
1.51 KB
1da177e4c
|
1 2 |
#ifndef _LINUX_PERSONALITY_H #define _LINUX_PERSONALITY_H |
607ca46e9
|
3 |
#include <uapi/linux/personality.h> |
34e856e6a
|
4 |
|
1da177e4c
|
5 6 7 8 9 10 11 12 13 |
/* * Handling of different ABIs (personalities). */ struct exec_domain; struct pt_regs; extern int register_exec_domain(struct exec_domain *); extern int unregister_exec_domain(struct exec_domain *); |
485d52768
|
14 |
extern int __set_personality(unsigned int); |
1da177e4c
|
15 |
|
1da177e4c
|
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 |
/* * Description of an execution domain. * * The first two members are refernced from assembly source * and should stay where they are unless explicitly needed. */ typedef void (*handler_t)(int, struct pt_regs *); struct exec_domain { const char *name; /* name of the execdomain */ handler_t handler; /* handler for syscalls */ unsigned char pers_low; /* lowest personality */ unsigned char pers_high; /* highest personality */ unsigned long *signal_map; /* signal mapping */ unsigned long *signal_invmap; /* reverse signal mapping */ struct map_segment *err_map; /* error mapping */ struct map_segment *socktype_map; /* socket type mapping */ struct map_segment *sockopt_map; /* socket option mapping */ struct map_segment *af_map; /* address family mapping */ struct module *module; /* module context of the ed. */ struct exec_domain *next; /* linked list (internal) */ }; /* * Return the base personality without flags. */ #define personality(pers) (pers & PER_MASK) |
1da177e4c
|
44 45 46 47 48 |
/* * Change personality of the currently running process. */ #define set_personality(pers) \ |
d8b295f29
|
49 |
((current->personality == (pers)) ? 0 : __set_personality(pers)) |
1da177e4c
|
50 51 |
#endif /* _LINUX_PERSONALITY_H */ |