Merge branch 'v4.4/topic/mm-kaslr' into v4.4/topic/mm-kaslr-pax_usercopy
[firefly-linux-kernel-4.4.55.git] / include / linux / personality.h
index 646c0a7d50faae5980038fba2e0a41fddfa6b4c1..aeb7892b2468f8e1eefead4b1a723d5fed466bdd 100644 (file)
@@ -3,52 +3,14 @@
 
 #include <uapi/linux/personality.h>
 
-
-/*
- * 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 *);
-extern int             __set_personality(unsigned int);
-
-
-/*
- * 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)
 
-
 /*
  * Change personality of the currently running process.
  */
-#define set_personality(pers) \
-       ((current->personality == (pers)) ? 0 : __set_personality(pers))
+#define set_personality(pers)  (current->personality = (pers))
 
 #endif /* _LINUX_PERSONALITY_H */