Merge branch 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 15 Apr 2015 20:53:55 +0000 (13:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 15 Apr 2015 20:53:55 +0000 (13:53 -0700)
Pull exec domain removal from Richard Weinberger:
 "This series removes execution domain support from Linux.

  The idea behind exec domains was to support different ABIs.  The
  feature was never complete nor stable.  Let's rip it out and make the
  kernel signal handling code less complicated"

* 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc: (27 commits)
  arm64: Removed unused variable
  sparc: Fix execution domain removal
  Remove rest of exec domains.
  arch: Remove exec_domain from remaining archs
  arc: Remove signal translation and exec_domain
  xtensa: Remove signal translation and exec_domain
  xtensa: Autogenerate offsets in struct thread_info
  x86: Remove signal translation and exec_domain
  unicore32: Remove signal translation and exec_domain
  um: Remove signal translation and exec_domain
  tile: Remove signal translation and exec_domain
  sparc: Remove signal translation and exec_domain
  sh: Remove signal translation and exec_domain
  s390: Remove signal translation and exec_domain
  mn10300: Remove signal translation and exec_domain
  microblaze: Remove signal translation and exec_domain
  m68k: Remove signal translation and exec_domain
  m32r: Remove signal translation and exec_domain
  m32r: Autogenerate offsets in struct thread_info
  frv: Remove signal translation and exec_domain
  ...

85 files changed:
arch/alpha/include/asm/thread_info.h
arch/arc/include/asm/thread_info.h
arch/arc/kernel/signal.c
arch/arm/Kconfig
arch/arm/configs/badge4_defconfig
arch/arm/include/asm/thread_info.h
arch/arm/kernel/Makefile
arch/arm/kernel/arthur.c [deleted file]
arch/arm/kernel/asm-offsets.c
arch/arm/kernel/signal.c
arch/arm/kernel/traps.c
arch/arm64/include/asm/thread_info.h
arch/arm64/kernel/asm-offsets.c
arch/arm64/kernel/signal.c
arch/avr32/include/asm/thread_info.h
arch/avr32/kernel/asm-offsets.c
arch/blackfin/include/asm/thread_info.h
arch/blackfin/kernel/asm-offsets.c
arch/blackfin/kernel/signal.c
arch/blackfin/kernel/traps.c
arch/c6x/include/asm/thread_info.h
arch/cris/arch-v10/kernel/signal.c
arch/cris/arch-v32/kernel/signal.c
arch/cris/include/asm/thread_info.h
arch/frv/include/asm/thread_info.h
arch/frv/kernel/asm-offsets.c
arch/frv/kernel/signal.c
arch/hexagon/include/asm/thread_info.h
arch/ia64/include/asm/thread_info.h
arch/ia64/mm/init.c
arch/m32r/include/asm/asm-offsets.h [new file with mode: 0644]
arch/m32r/include/asm/thread_info.h
arch/m32r/kernel/asm-offsets.c
arch/m32r/kernel/entry.S
arch/m32r/kernel/signal.c
arch/m68k/include/asm/thread_info.h
arch/m68k/kernel/signal.c
arch/metag/include/asm/thread_info.h
arch/metag/kernel/irq.c
arch/microblaze/include/asm/thread_info.h
arch/microblaze/kernel/signal.c
arch/mips/include/asm/thread_info.h
arch/mips/kernel/asm-offsets.c
arch/mn10300/include/asm/thread_info.h
arch/mn10300/kernel/asm-offsets.c
arch/mn10300/kernel/signal.c
arch/nios2/include/asm/thread_info.h
arch/openrisc/include/asm/thread_info.h
arch/openrisc/kernel/signal.c
arch/parisc/include/asm/thread_info.h
arch/parisc/kernel/asm-offsets.c
arch/powerpc/include/asm/thread_info.h
arch/s390/include/asm/thread_info.h
arch/s390/kernel/asm-offsets.c
arch/s390/kernel/compat_signal.c
arch/s390/kernel/signal.c
arch/score/include/asm/thread_info.h
arch/score/kernel/asm-offsets.c
arch/sh/include/asm/thread_info.h
arch/sh/kernel/asm-offsets.c
arch/sh/kernel/irq.c
arch/sh/kernel/signal_32.c
arch/sh/kernel/signal_64.c
arch/sparc/include/asm/thread_info_32.h
arch/sparc/include/asm/thread_info_64.h
arch/sparc/kernel/traps_32.c
arch/sparc/kernel/traps_64.c
arch/tile/include/asm/thread_info.h
arch/tile/kernel/compat_signal.c
arch/tile/kernel/signal.c
arch/um/include/asm/thread_info.h
arch/unicore32/include/asm/thread_info.h
arch/unicore32/kernel/asm-offsets.c
arch/unicore32/kernel/signal.c
arch/x86/include/asm/thread_info.h
arch/x86/kernel/signal.c
arch/x86/um/signal.c
arch/xtensa/include/asm/thread_info.h
arch/xtensa/kernel/asm-offsets.c
arch/xtensa/kernel/signal.c
include/linux/personality.h
include/linux/sched.h
kernel/exec_domain.c
kernel/exit.c
kernel/fork.c

index d5b98ab514bbda2bbd6270ea7802a8a402857f37..32e920a83ae57b88431adaf4957672e6cbdb02f0 100644 (file)
@@ -18,7 +18,6 @@ struct thread_info {
        unsigned int            flags;          /* low level flags */
        unsigned int            ieee_state;     /* see fpu.h */
 
-       struct exec_domain      *exec_domain;   /* execution domain */
        mm_segment_t            addr_limit;     /* thread address space */
        unsigned                cpu;            /* current CPU */
        int                     preempt_count; /* 0 => preemptable, <0 => BUG */
@@ -35,7 +34,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .addr_limit     = KERNEL_DS,            \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
 }
index 1163a1838ac1ae4e6ef3220196d7a0cf581a72de..aca0d5a45c7b84c2bdc0f95da1549ad7d3f1af68 100644 (file)
@@ -43,7 +43,6 @@ struct thread_info {
        int preempt_count;              /* 0 => preemptable, <0 => BUG */
        struct task_struct *task;       /* main task structure */
        mm_segment_t addr_limit;        /* thread address space */
-       struct exec_domain *exec_domain;/* execution domain */
        __u32 cpu;                      /* current CPU */
        unsigned long thr_ptr;          /* TLS ptr */
 };
@@ -56,7 +55,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task       = &tsk,                     \
-       .exec_domain    = &default_exec_domain, \
        .flags      = 0,                        \
        .cpu        = 0,                        \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
index edda76fae83f25219bd74c5487a458e29c765373..2251fb4bbfd76c4e8ab67477302d1e215017e73d 100644 (file)
@@ -171,18 +171,6 @@ static inline void __user *get_sigframe(struct ksignal *ksig,
        return frame;
 }
 
-/*
- * translate the signal
- */
-static inline int map_sig(int sig)
-{
-       struct thread_info *thread = current_thread_info();
-       if (thread->exec_domain && thread->exec_domain->signal_invmap
-           && sig < 32)
-               sig = thread->exec_domain->signal_invmap[sig];
-       return sig;
-}
-
 static int
 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)
 {
@@ -231,7 +219,7 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)
                return err;
 
        /* #1 arg to the user Signal handler */
-       regs->r0 = map_sig(ksig->sig);
+       regs->r0 = ksig->sig;
 
        /* setup PC of user space signal handler */
        regs->ret = (unsigned long)ksig->ka.sa.sa_handler;
index 7cbf4ef5c6fd8532cb06fb739e42c9e142ff02fd..392e7ae69452e26b97ed8e8d265b7958e0ae75c2 100644 (file)
@@ -2133,16 +2133,6 @@ menu "Userspace binary formats"
 
 source "fs/Kconfig.binfmt"
 
-config ARTHUR
-       tristate "RISC OS personality"
-       depends on !AEABI
-       help
-         Say Y here to include the kernel code necessary if you want to run
-         Acorn RISC OS/Arthur binaries under Linux. This code is still very
-         experimental; if this sounds frightening, say N and sleep in peace.
-         You can also say M here to compile this support as a module (which
-         will be called arthur).
-
 endmenu
 
 menu "Power management options"
index 0494c8f229a2360fa30646b2683d74de8ee8785c..d590098783127816c95d2140a5769730780cb78d 100644 (file)
@@ -12,7 +12,6 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
 CONFIG_FPE_NWFPE=y
 CONFIG_BINFMT_AOUT=m
 CONFIG_BINFMT_MISC=m
-CONFIG_ARTHUR=m
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
index 72812a1f3d1cc9df83c8b7354655adf345069dad..bd32eded3e5061b49048e3110902b7edc63e3638 100644 (file)
@@ -23,7 +23,6 @@
 #ifndef __ASSEMBLY__
 
 struct task_struct;
-struct exec_domain;
 
 #include <asm/types.h>
 #include <asm/domain.h>
@@ -53,7 +52,6 @@ struct thread_info {
        int                     preempt_count;  /* 0 => preemptable, <0 => bug */
        mm_segment_t            addr_limit;     /* address limit */
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        __u32                   cpu;            /* cpu */
        __u32                   cpu_domain;     /* cpu domain */
        struct cpu_context_save cpu_context;    /* cpu context */
@@ -73,7 +71,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                                          \
 {                                                                      \
        .task           = &tsk,                                         \
-       .exec_domain    = &default_exec_domain,                         \
        .flags          = 0,                                            \
        .preempt_count  = INIT_PREEMPT_COUNT,                           \
        .addr_limit     = KERNEL_DS,                                    \
index ba5f83226011849e9dacfb6429c9df9f6b8be459..752725dcbf42914032d0bee4f9c9f48e65fde7c5 100644 (file)
@@ -34,7 +34,6 @@ obj-$(CONFIG_CPU_IDLE)                += cpuidle.o
 obj-$(CONFIG_ISA_DMA_API)      += dma.o
 obj-$(CONFIG_FIQ)              += fiq.o fiqasm.o
 obj-$(CONFIG_MODULES)          += armksyms.o module.o
-obj-$(CONFIG_ARTHUR)           += arthur.o
 obj-$(CONFIG_ISA_DMA)          += dma-isa.o
 obj-$(CONFIG_PCI)              += bios32.o isa.o
 obj-$(CONFIG_ARM_CPU_SUSPEND)  += sleep.o suspend.o
diff --git a/arch/arm/kernel/arthur.c b/arch/arm/kernel/arthur.c
deleted file mode 100644 (file)
index 321c529..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- *  linux/arch/arm/kernel/arthur.c
- *
- *  Copyright (C) 1998, 1999, 2000, 2001 Philip Blundell
- *
- * Arthur personality
- */
-
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#include <linux/module.h>
-#include <linux/personality.h>
-#include <linux/stddef.h>
-#include <linux/signal.h>
-#include <linux/init.h>
-#include <linux/sched.h>
-
-#include <asm/ptrace.h>
-
-/* Arthur doesn't have many signals, and a lot of those that it does
-   have don't map easily to any Linux equivalent.  Never mind.  */
-
-#define ARTHUR_SIGABRT         1
-#define ARTHUR_SIGFPE          2
-#define ARTHUR_SIGILL          3
-#define ARTHUR_SIGINT          4
-#define ARTHUR_SIGSEGV         5
-#define ARTHUR_SIGTERM         6
-#define ARTHUR_SIGSTAK         7
-#define ARTHUR_SIGUSR1         8
-#define ARTHUR_SIGUSR2         9
-#define ARTHUR_SIGOSERROR      10
-
-static unsigned long arthur_to_linux_signals[32] = {
-       0,      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
-};
-
-static unsigned long linux_to_arthur_signals[32] = {
-       0,              -1,             ARTHUR_SIGINT,  -1,
-               ARTHUR_SIGILL,  5,              ARTHUR_SIGABRT, 7,
-       ARTHUR_SIGFPE,  9,              ARTHUR_SIGUSR1, ARTHUR_SIGSEGV, 
-       ARTHUR_SIGUSR2, 13,             14,             ARTHUR_SIGTERM,
-       16,             17,             18,             19,
-       20,             21,             22,             23,
-       24,             25,             26,             27,
-       28,             29,             30,             31
-};
-
-static void arthur_lcall7(int nr, struct pt_regs *regs)
-{
-       struct siginfo info;
-       info.si_signo = SIGSWI;
-       info.si_errno = nr;
-       /* Bounce it to the emulator */
-       send_sig_info(SIGSWI, &info, current);
-}
-
-static struct exec_domain arthur_exec_domain = {
-       .name           = "Arthur",
-       .handler        = arthur_lcall7,
-       .pers_low       = PER_RISCOS,
-       .pers_high      = PER_RISCOS,
-       .signal_map     = arthur_to_linux_signals,
-       .signal_invmap  = linux_to_arthur_signals,
-       .module         = THIS_MODULE,
-};
-
-/*
- * We could do with some locking to stop Arthur being removed while
- * processes are using it.
- */
-
-static int __init arthur_init(void)
-{
-       return register_exec_domain(&arthur_exec_domain);
-}
-
-static void __exit arthur_exit(void)
-{
-       unregister_exec_domain(&arthur_exec_domain);
-}
-
-module_init(arthur_init);
-module_exit(arthur_exit);
-
-MODULE_LICENSE("GPL");
index 61bb5a65eb37e177fdd706fa8785567bf23fd4b3..871b8267d211af0e5eaf9d5fb9f8329ae33696e1 100644 (file)
@@ -67,7 +67,6 @@ int main(void)
   DEFINE(TI_PREEMPT,           offsetof(struct thread_info, preempt_count));
   DEFINE(TI_ADDR_LIMIT,                offsetof(struct thread_info, addr_limit));
   DEFINE(TI_TASK,              offsetof(struct thread_info, task));
-  DEFINE(TI_EXEC_DOMAIN,       offsetof(struct thread_info, exec_domain));
   DEFINE(TI_CPU,               offsetof(struct thread_info, cpu));
   DEFINE(TI_CPU_DOMAIN,                offsetof(struct thread_info, cpu_domain));
   DEFINE(TI_CPU_SAVE,          offsetof(struct thread_info, cpu_context));
index 023ac905e4c38c9858e5c644a374c343a0be334b..423663e23791e1349f877990b021f8371fe85c24 100644 (file)
@@ -318,17 +318,6 @@ get_sigframe(struct ksignal *ksig, struct pt_regs *regs, int framesize)
        return frame;
 }
 
-/*
- * translate the signal
- */
-static inline int map_sig(int sig)
-{
-       struct thread_info *thread = current_thread_info();
-       if (sig < 32 && thread->exec_domain && thread->exec_domain->signal_invmap)
-               sig = thread->exec_domain->signal_invmap[sig];
-       return sig;
-}
-
 static int
 setup_return(struct pt_regs *regs, struct ksignal *ksig,
             unsigned long __user *rc, void __user *frame)
@@ -412,7 +401,7 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig,
                }
        }
 
-       regs->ARM_r0 = map_sig(ksig->sig);
+       regs->ARM_r0 = ksig->sig;
        regs->ARM_sp = (unsigned long)frame;
        regs->ARM_lr = retcode;
        regs->ARM_pc = handler;
index 788e23fe64d8e5502f553464c8718a2bf00bf2cb..3dce1a342030d161b1a0ee5442c0c11c5ca06780 100644 (file)
@@ -505,12 +505,10 @@ asmlinkage void bad_mode(struct pt_regs *regs, int reason)
 
 static int bad_syscall(int n, struct pt_regs *regs)
 {
-       struct thread_info *thread = current_thread_info();
        siginfo_t info;
 
-       if ((current->personality & PER_MASK) != PER_LINUX &&
-           thread->exec_domain->handler) {
-               thread->exec_domain->handler(n, regs);
+       if ((current->personality & PER_MASK) != PER_LINUX) {
+               send_sig(SIGSEGV, current, 1);
                return regs->ARM_r0;
        }
 
index 702e1e6a0d80f915871ff7c938b93695a22ba5aa..dcd06d18a42a36a4859c34370819d323f7e171d7 100644 (file)
@@ -33,7 +33,6 @@
 #ifndef __ASSEMBLY__
 
 struct task_struct;
-struct exec_domain;
 
 #include <asm/types.h>
 
@@ -47,7 +46,6 @@ struct thread_info {
        unsigned long           flags;          /* low level flags */
        mm_segment_t            addr_limit;     /* address limit */
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        int                     preempt_count;  /* 0 => preemptable, <0 => bug */
        int                     cpu;            /* cpu */
 };
@@ -55,7 +53,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                                          \
 {                                                                      \
        .task           = &tsk,                                         \
-       .exec_domain    = &default_exec_domain,                         \
        .flags          = 0,                                            \
        .preempt_count  = INIT_PREEMPT_COUNT,                           \
        .addr_limit     = KERNEL_DS,                                    \
index f7fa65d4c3525e47de17d8349e4ae415e4de18ad..56cadd3606bf70c3e18d2df8da882804288a8e35 100644 (file)
@@ -38,7 +38,6 @@ int main(void)
   DEFINE(TI_PREEMPT,           offsetof(struct thread_info, preempt_count));
   DEFINE(TI_ADDR_LIMIT,                offsetof(struct thread_info, addr_limit));
   DEFINE(TI_TASK,              offsetof(struct thread_info, task));
-  DEFINE(TI_EXEC_DOMAIN,       offsetof(struct thread_info, exec_domain));
   DEFINE(TI_CPU,               offsetof(struct thread_info, cpu));
   BLANK();
   DEFINE(THREAD_CPU_CONTEXT,   offsetof(struct task_struct, thread.cpu_context));
index 660ccf9f7524cb665e3318b32fa23bfe06577e05..e18c48cb6db1cb844411ad0c7919ac7ea7799f41 100644 (file)
@@ -287,18 +287,11 @@ static void setup_restart_syscall(struct pt_regs *regs)
  */
 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)
 {
-       struct thread_info *thread = current_thread_info();
        struct task_struct *tsk = current;
        sigset_t *oldset = sigmask_to_save();
        int usig = ksig->sig;
        int ret;
 
-       /*
-        * translate the signal
-        */
-       if (usig < 32 && thread->exec_domain && thread->exec_domain->signal_invmap)
-               usig = thread->exec_domain->signal_invmap[usig];
-
        /*
         * Set up the stack frame
         */
index d56afa99a5149c5a2504d3e7c472a940b9ab4930..d4d3079541ea56aad05fb7373dd5e5b12cff8607 100644 (file)
 #include <asm/types.h>
 
 struct task_struct;
-struct exec_domain;
 
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        __u32                   cpu;
        __s32                   preempt_count;  /* 0 => preemptable, <0 => BUG */
@@ -36,7 +34,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                                          \
 {                                                                      \
        .task           = &tsk,                                         \
-       .exec_domain    = &default_exec_domain,                         \
        .flags          = 0,                                            \
        .cpu            = 0,                                            \
        .preempt_count  = INIT_PREEMPT_COUNT,                           \
index e41c84516e5d1e7949dd7279ac4ee8d2229c01af..2c9764fe3532494385b7b8d19347082a5808ad4c 100644 (file)
@@ -12,7 +12,6 @@
 void foo(void)
 {
        OFFSET(TI_task, thread_info, task);
-       OFFSET(TI_exec_domain, thread_info, exec_domain);
        OFFSET(TI_flags, thread_info, flags);
        OFFSET(TI_cpu, thread_info, cpu);
        OFFSET(TI_preempt_count, thread_info, preempt_count);
index 57c3a8bd583d46d34d2169637fbf4b9a838af172..2966b93850a1d1f85e736ad2806787db8124afa0 100644 (file)
@@ -37,7 +37,6 @@ typedef unsigned long mm_segment_t;
 
 struct thread_info {
        struct task_struct *task;       /* main task structure */
-       struct exec_domain *exec_domain;        /* execution domain */
        unsigned long flags;    /* low level flags */
        int cpu;                /* cpu we're on */
        int preempt_count;      /* 0 => preemptable, <0 => BUG */
@@ -53,7 +52,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
@@ -75,15 +73,6 @@ static inline struct thread_info *current_thread_info(void)
 
 #endif                         /* __ASSEMBLY__ */
 
-/*
- * Offsets in thread_info structure, used in assembly code
- */
-#define TI_TASK                0
-#define TI_EXECDOMAIN  4
-#define TI_FLAGS       8
-#define TI_CPU         12
-#define TI_PREEMPT     16
-
 /*
  * thread information flag bit numbers
  */
index 37fcae95021615d6f5fb08aca571dac2973a0be0..486560aea050e760d82ff8b481ac7698e122eebd 100644 (file)
@@ -42,6 +42,12 @@ int main(void)
        DEFINE(THREAD_PC, offsetof(struct thread_struct, pc));
        DEFINE(KERNEL_STACK_SIZE, THREAD_SIZE);
 
+       /* offsets in thread_info struct */
+       OFFSET(TI_TASK, thread_info, task);
+       OFFSET(TI_FLAGS, thread_info, flags);
+       OFFSET(TI_CPU, thread_info, cpu);
+       OFFSET(TI_PREEMPT, thread_info, preempt_count);
+
        /* offsets into the pt_regs */
        DEFINE(PT_ORIG_R0, offsetof(struct pt_regs, orig_r0));
        DEFINE(PT_ORIG_P0, offsetof(struct pt_regs, orig_p0));
index f2a8b5493bd32820dfd96eacaf168be2c4fc3b8e..ea570db598e503eb9e29dff95f5c556e05375167 100644 (file)
@@ -151,11 +151,7 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)
 
        frame = get_sigframe(ksig, sizeof(*frame));
 
-       err |= __put_user((current_thread_info()->exec_domain
-                          && current_thread_info()->exec_domain->signal_invmap
-                          && ksig->sig < 32
-                          ? current_thread_info()->exec_domain->
-                          signal_invmap[ksig->sig] : ksig->sig), &frame->sig);
+       err |= __put_user(ksig->sig, &frame->sig);
 
        err |= __put_user(&frame->info, &frame->pinfo);
        err |= __put_user(&frame->uc, &frame->puc);
index de5c2c3ebd9b36ec8cd0faa9afc257a5704c4dfd..1ed85ddadc0d25135cf6bf494f1934ae52874f85 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/fixed_code.h>
 #include <asm/pseudo_instructions.h>
 #include <asm/pda.h>
+#include <asm/asm-offsets.h>
 
 #ifdef CONFIG_KGDB
 # include <linux/kgdb.h>
index 584e253f32179952ab1d4b77a53892fe4e42d608..acc70c135ab850d60d212699e0d42a18cb09ff43 100644 (file)
@@ -40,7 +40,6 @@ typedef struct {
  */
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        int                     cpu;            /* cpu we're on */
        int                     preempt_count;  /* 0 = preemptable, <0 = BUG */
@@ -55,7 +54,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
index 74d7ba35120d3130a611f3aba8433139a7dc7a97..7122d9773b13922184ee8077a3ffb503beef35d4 100644 (file)
@@ -321,8 +321,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
        if (err)
                return -EFAULT;
 
-       /* TODO what is the current->exec_domain stuff and invmap ? */
-
        /* Set up registers for signal handler */
 
        /* What we enter NOW   */
index 870e3e069318522ef26912ee92c4453721782ec9..0c9ce9eac6143dae6545e659b048ece37f5c8730 100644 (file)
@@ -287,8 +287,6 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                return -EFAULT;
 
-       /* TODO: what is the current->exec_domain stuff and invmap ? */
-
        err |= __put_user(&frame->info, &frame->pinfo);
        err |= __put_user(&frame->uc, &frame->puc);
        err |= copy_siginfo_to_user(&frame->info, &ksig->info);
index 7286db5ed90e383161df1a72573b957d528b6540..4ead1b40d2d743dab304678f2f872762447477ed 100644 (file)
@@ -28,7 +28,6 @@
 #ifndef __ASSEMBLY__
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        __u32                   cpu;            /* current CPU */
        int                     preempt_count;  /* 0 => preemptable, <0 => BUG */
@@ -50,7 +49,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                          \
 {                                                      \
        .task           = &tsk,                         \
-       .exec_domain    = &default_exec_domain,         \
        .flags          = 0,                            \
        .cpu            = 0,                            \
        .preempt_count  = INIT_PREEMPT_COUNT,           \
index 6b917f1c29554304758f75e8fb50405da3217f68..ccba3b6ce918e64e9cd4ec106003b4e878ca4ca8 100644 (file)
@@ -31,7 +31,6 @@
 
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        unsigned long           status;         /* thread-synchronous flags */
        __u32                   cpu;            /* current CPU */
@@ -59,7 +58,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
index 446e89d500cc4fe9db3a8ad97c655df7c6c585d0..8414293f213a417fd8a8be049409b10966f1c062 100644 (file)
@@ -34,7 +34,6 @@ void foo(void)
 {
        /* offsets into the thread_info structure */
        OFFSET(TI_TASK,                 thread_info, task);
-       OFFSET(TI_EXEC_DOMAIN,          thread_info, exec_domain);
        OFFSET(TI_FLAGS,                thread_info, flags);
        OFFSET(TI_STATUS,               thread_info, status);
        OFFSET(TI_CPU,                  thread_info, cpu);
index 85ca6727ca075c8ce47ca73f801ed612cdeeb86d..82d5e914dc1591c010130068bcd517777dd54bd5 100644 (file)
@@ -174,20 +174,14 @@ static inline void __user *get_sigframe(struct ksignal *ksig,
 static int setup_frame(struct ksignal *ksig, sigset_t *set)
 {
        struct sigframe __user *frame;
-       int rsig, sig = ksig->sig;
+       int sig = ksig->sig;
 
        frame = get_sigframe(ksig, sizeof(*frame));
 
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                return -EFAULT;
 
-       rsig = sig;
-       if (sig < 32 &&
-           __current_thread_info->exec_domain &&
-           __current_thread_info->exec_domain->signal_invmap)
-               rsig = __current_thread_info->exec_domain->signal_invmap[sig];
-
-       if (__put_user(rsig, &frame->sig) < 0)
+       if (__put_user(sig, &frame->sig) < 0)
                return -EFAULT;
 
        if (setup_sigcontext(&frame->sc, set->sig[0]))
@@ -253,20 +247,14 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set)
 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set)
 {
        struct rt_sigframe __user *frame;
-       int rsig, sig = ksig->sig;
+       int sig = ksig->sig;
 
        frame = get_sigframe(ksig, sizeof(*frame));
 
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                return -EFAULT;
 
-       rsig = sig;
-       if (sig < 32 &&
-           __current_thread_info->exec_domain &&
-           __current_thread_info->exec_domain->signal_invmap)
-               rsig = __current_thread_info->exec_domain->signal_invmap[sig];
-
-       if (__put_user(rsig,            &frame->sig) ||
+       if (__put_user(sig,             &frame->sig) ||
            __put_user(&frame->info,    &frame->pinfo) ||
            __put_user(&frame->uc,      &frame->puc))
                return -EFAULT;
index bacd3d6030c5764a5bf8762f54666b2f5d7cbfa8..b80fe1db7b6484883e3ebfdfe0973b1883c8183a 100644 (file)
@@ -47,7 +47,6 @@ typedef struct {
 
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        __u32                   cpu;            /* current cpu */
        int                     preempt_count;  /* 0=>preemptible,<0=>BUG */
@@ -77,7 +76,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                   \
 {                                               \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .preempt_count  = 1,                    \
index c16f21a068ff7edc553dff54570463622d5f5f9f..aa995b67c3f51abe459879648025cdd1fe30724c 100644 (file)
@@ -20,7 +20,6 @@
  */
 struct thread_info {
        struct task_struct *task;       /* XXX not really needed, except for dup_task_struct() */
-       struct exec_domain *exec_domain;/* execution domain */
        __u32 flags;                    /* thread_info flags (see TIF_*) */
        __u32 cpu;                      /* current CPU */
        __u32 last_cpu;                 /* Last CPU thread ran on */
@@ -40,7 +39,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .addr_limit     = KERNEL_DS,            \
index 6b3345758d3e3298ed8ee23b592d21adda88034d..a9b65cf7b34a74b120f842a8344a2ce763ca963a 100644 (file)
@@ -692,31 +692,6 @@ int arch_remove_memory(u64 start, u64 size)
 #endif
 #endif
 
-/*
- * Even when CONFIG_IA32_SUPPORT is not enabled it is
- * useful to have the Linux/x86 domain registered to
- * avoid an attempted module load when emulators call
- * personality(PER_LINUX32). This saves several milliseconds
- * on each such call.
- */
-static struct exec_domain ia32_exec_domain;
-
-static int __init
-per_linux32_init(void)
-{
-       ia32_exec_domain.name = "Linux/x86";
-       ia32_exec_domain.handler = NULL;
-       ia32_exec_domain.pers_low = PER_LINUX32;
-       ia32_exec_domain.pers_high = PER_LINUX32;
-       ia32_exec_domain.signal_map = default_exec_domain.signal_map;
-       ia32_exec_domain.signal_invmap = default_exec_domain.signal_invmap;
-       register_exec_domain(&ia32_exec_domain);
-
-       return 0;
-}
-
-__initcall(per_linux32_init);
-
 /**
  * show_mem - give short summary of memory stats
  *
diff --git a/arch/m32r/include/asm/asm-offsets.h b/arch/m32r/include/asm/asm-offsets.h
new file mode 100644 (file)
index 0000000..d370ee3
--- /dev/null
@@ -0,0 +1 @@
+#include <generated/asm-offsets.h>
index 32422d0211c3d50e405cb66bacc9712d44a53196..f630d9c30b28ff5d9fca0e7b0331df834b36a03c 100644 (file)
@@ -24,7 +24,6 @@
 
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        unsigned long           status;         /* thread-synchronous flags */
        __u32                   cpu;            /* current CPU */
@@ -38,18 +37,7 @@ struct thread_info {
        __u8                    supervisor_stack[0];
 };
 
-#else /* !__ASSEMBLY__ */
-
-/* offsets into the thread_info struct for assembly code access */
-#define TI_TASK                0x00000000
-#define TI_EXEC_DOMAIN 0x00000004
-#define TI_FLAGS       0x00000008
-#define TI_STATUS      0x0000000C
-#define TI_CPU         0x00000010
-#define TI_PRE_COUNT   0x00000014
-#define TI_ADDR_LIMIT  0x00000018
-
-#endif
+#endif /* !__ASSEMBLY__ */
 
 #define THREAD_SIZE            (PAGE_SIZE << 1)
 #define THREAD_SIZE_ORDER      1
@@ -61,7 +49,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
index 9e263112a6e2f8174a3b51002c62ec54121df146..cd3d2fc9c8df032ca9173af69e0ce0026981b333 100644 (file)
@@ -1 +1,14 @@
-/* Dummy asm-offsets.c file. Required by kbuild and ready to be used - hint! */
+#include <linux/thread_info.h>
+#include <linux/kbuild.h>
+
+int foo(void)
+{
+       OFFSET(TI_TASK, thread_info, task);
+       OFFSET(TI_FLAGS, thread_info, flags);
+       OFFSET(TI_STATUS, thread_info, status);
+       OFFSET(TI_CPU, thread_info, cpu);
+       OFFSET(TI_PRE_COUNT, thread_info, preempt_count);
+       OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit);
+
+       return 0;
+}
index 7c3db9940ce1f1e1254561ff0992c3980127beeb..c639bfa32232a29fe001ec47b956a60e9bffb305 100644 (file)
@@ -65,6 +65,7 @@
 #include <asm/page.h>
 #include <asm/m32r.h>
 #include <asm/mmu_context.h>
+#include <asm/asm-offsets.h>
 
 #if !defined(CONFIG_MMU)
 #define sys_madvise            sys_ni_syscall
index 8c25e0c8f6a5c752ba9c201de8292e4dd0c5120b..1c81e24fd0064a2c428ee88da199ac101f5d1169 100644 (file)
@@ -172,20 +172,14 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
 {
        struct rt_sigframe __user *frame;
        int err = 0;
-       int signal, sig = ksig->sig;
+       int sig = ksig->sig;
 
        frame = get_sigframe(ksig, regs->spu, sizeof(*frame));
 
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                return -EFAULT;
 
-       signal = current_thread_info()->exec_domain
-               && current_thread_info()->exec_domain->signal_invmap
-               && sig < 32
-               ? current_thread_info()->exec_domain->signal_invmap[sig]
-               : sig;
-
-       err |= __put_user(signal, &frame->sig);
+       err |= __put_user(sig, &frame->sig);
        if (err)
                return -EFAULT;
 
@@ -209,7 +203,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
 
        /* Set up registers for signal handler */
        regs->spu = (unsigned long)frame;
-       regs->r0 = signal;      /* Arg for signal handler */
+       regs->r0 = sig; /* Arg for signal handler */
        regs->r1 = (unsigned long)&frame->info;
        regs->r2 = (unsigned long)&frame->uc;
        regs->bpc = (unsigned long)ksig->ka.sa.sa_handler;
index c54256e69e642a7395899a085763250ca9f37bfb..cee13c2e5161f4d3b67ba00e634c7c8b3664a97a 100644 (file)
@@ -26,7 +26,6 @@
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
        unsigned long           flags;
-       struct exec_domain      *exec_domain;   /* execution domain */
        mm_segment_t            addr_limit;     /* thread address space */
        int                     preempt_count;  /* 0 => preemptable, <0 => BUG */
        __u32                   cpu;            /* should always be 0 on m68k */
@@ -37,7 +36,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .addr_limit     = KERNEL_DS,            \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
 }
index d7179281e74aff6a8bf2ef21fe4f699e63a4d224..af1c4f330aefc67a025e5db896053a60b3847fa0 100644 (file)
@@ -863,12 +863,7 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
        if (fsize)
                err |= copy_to_user (frame + 1, regs + 1, fsize);
 
-       err |= __put_user((current_thread_info()->exec_domain
-                          && current_thread_info()->exec_domain->signal_invmap
-                          && sig < 32
-                          ? current_thread_info()->exec_domain->signal_invmap[sig]
-                          : sig),
-                         &frame->sig);
+       err |= __put_user(sig, &frame->sig);
 
        err |= __put_user(regs->vector, &frame->code);
        err |= __put_user(&frame->sc, &frame->psc);
@@ -948,12 +943,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
        if (fsize)
                err |= copy_to_user (&frame->uc.uc_extra, regs + 1, fsize);
 
-       err |= __put_user((current_thread_info()->exec_domain
-                          && current_thread_info()->exec_domain->signal_invmap
-                          && sig < 32
-                          ? current_thread_info()->exec_domain->signal_invmap[sig]
-                          : sig),
-                         &frame->sig);
+       err |= __put_user(sig, &frame->sig);
        err |= __put_user(&frame->info, &frame->pinfo);
        err |= __put_user(&frame->uc, &frame->puc);
        err |= copy_siginfo_to_user(&frame->info, &ksig->info);
index afb3ca4776d1df43271cbbe1514ad5e8478186bf..32677cc278aa16d310b84bfda09a6bc317ba4115 100644 (file)
@@ -28,7 +28,6 @@
 /* This must be 8 byte aligned so we can ensure stack alignment. */
 struct thread_info {
        struct task_struct *task;       /* main task structure */
-       struct exec_domain *exec_domain;        /* execution domain */
        unsigned long flags;    /* low level flags */
        unsigned long status;   /* thread-synchronous flags */
        u32 cpu;                /* current CPU */
@@ -68,7 +67,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
index 5385dd1216b7ce5788093718e5e169c6a1d0906b..4f8f1f87ef1160fb5cd88a2fc7e771682891b2df 100644 (file)
@@ -132,7 +132,6 @@ void irq_ctx_init(int cpu)
 
        irqctx = (union irq_ctx *) &hardirq_stack[cpu * THREAD_SIZE];
        irqctx->tinfo.task              = NULL;
-       irqctx->tinfo.exec_domain       = NULL;
        irqctx->tinfo.cpu               = cpu;
        irqctx->tinfo.preempt_count     = HARDIRQ_OFFSET;
        irqctx->tinfo.addr_limit        = MAKE_MM_SEG(0);
@@ -141,7 +140,6 @@ void irq_ctx_init(int cpu)
 
        irqctx = (union irq_ctx *) &softirq_stack[cpu * THREAD_SIZE];
        irqctx->tinfo.task              = NULL;
-       irqctx->tinfo.exec_domain       = NULL;
        irqctx->tinfo.cpu               = cpu;
        irqctx->tinfo.preempt_count     = 0;
        irqctx->tinfo.addr_limit        = MAKE_MM_SEG(0);
index b699fbd7de4acac800ca7c26da59ec9d18938b4f..383f387b4eeeec61c0c979dec26e98817011899e 100644 (file)
@@ -65,7 +65,6 @@ typedef struct {
 
 struct thread_info {
        struct task_struct      *task; /* main task structure */
-       struct exec_domain      *exec_domain; /* execution domain */
        unsigned long           flags; /* low level flags */
        unsigned long           status; /* thread-synchronous flags */
        __u32                   cpu; /* current CPU */
@@ -81,7 +80,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
index 20ccd4e2baa54c88f4fbcdd13c1a407ee66ffc82..97001524ca2d8e3062a51e4a536ad4d1d18a702f 100644 (file)
@@ -158,7 +158,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
 {
        struct rt_sigframe __user *frame;
        int err = 0, sig = ksig->sig;
-       unsigned long signal;
        unsigned long address = 0;
 #ifdef CONFIG_MMU
        pmd_t *pmdp;
@@ -170,12 +169,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                return -EFAULT;
 
-       signal = current_thread_info()->exec_domain
-               && current_thread_info()->exec_domain->signal_invmap
-               && sig < 32
-               ? current_thread_info()->exec_domain->signal_invmap[sig]
-               : (unsigned long)sig;
-
        if (ksig->ka.sa.sa_flags & SA_SIGINFO)
                err |= copy_siginfo_to_user(&frame->info, &ksig->info);
 
@@ -230,7 +223,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
        regs->r1 = (unsigned long) frame;
 
        /* Signal handler args: */
-       regs->r5 = signal; /* arg 0: signum */
+       regs->r5 = sig; /* arg 0: signum */
        regs->r6 = (unsigned long) &frame->info; /* arg 1: siginfo */
        regs->r7 = (unsigned long) &frame->uc; /* arg2: ucontext */
        /* Offset to handle microblaze rtid r14, 0 */
index 55ed6602204cae5ae1219ee15f5a98b2c9f2813e..8408a30c47f33f826503488c5d25230ec6deaf66 100644 (file)
@@ -23,7 +23,6 @@
  */
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        unsigned long           tp_value;       /* thread pointer */
        __u32                   cpu;            /* current CPU */
@@ -44,7 +43,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = _TIF_FIXADE,          \
        .cpu            = 0,                    \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
index e59fd7cfac9e35b2eeb90912c58504b9ed435606..beabe19ff8e5c963af0cf38147a3f4b7af64efca 100644 (file)
@@ -92,7 +92,6 @@ void output_thread_info_defines(void)
 {
        COMMENT("MIPS thread_info offsets.");
        OFFSET(TI_TASK, thread_info, task);
-       OFFSET(TI_EXEC_DOMAIN, thread_info, exec_domain);
        OFFSET(TI_FLAGS, thread_info, flags);
        OFFSET(TI_TP_VALUE, thread_info, tp_value);
        OFFSET(TI_CPU, thread_info, cpu);
index c1c374f0ec12ef17b458f0a36ff71d4ca88fcc8c..4861a78c7160f7b1912804439307b77599317619 100644 (file)
@@ -40,7 +40,6 @@ typedef struct {
 
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        struct pt_regs          *frame;         /* current exception frame */
        unsigned long           flags;          /* low level flags */
        __u32                   cpu;            /* current CPU */
@@ -74,7 +73,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
index d780670cbaf36595a30cd33925b8176e3f1f83b7..e5a61c659b5ac040e5f1e8c7e6c4d7a50238ad57 100644 (file)
@@ -22,7 +22,6 @@ void foo(void)
        BLANK();
 
        OFFSET(TI_task,                 thread_info, task);
-       OFFSET(TI_exec_domain,          thread_info, exec_domain);
        OFFSET(TI_frame,                thread_info, frame);
        OFFSET(TI_flags,                thread_info, flags);
        OFFSET(TI_cpu,                  thread_info, cpu);
@@ -85,7 +84,6 @@ void foo(void)
        DEFINE(SIGCHLD_asm,             SIGCHLD);
        BLANK();
 
-       OFFSET(EXEC_DOMAIN_handler,     exec_domain, handler);
        OFFSET(RT_SIGFRAME_sigcontext,  rt_sigframe, uc.uc_mcontext);
 
        DEFINE(PAGE_SIZE_asm,           PAGE_SIZE);
index 8609845f12c58185158c4bdfdc0695cb8155ecec..dfd0301cf200b93c169ef8b76a2aae5194bfc1a2 100644 (file)
@@ -202,20 +202,14 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
                       struct pt_regs *regs)
 {
        struct sigframe __user *frame;
-       int rsig, sig = ksig->sig;
+       int sig = ksig->sig;
 
        frame = get_sigframe(ksig, regs, sizeof(*frame));
 
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                return -EFAULT;
 
-       rsig = sig;
-       if (sig < 32 &&
-           current_thread_info()->exec_domain &&
-           current_thread_info()->exec_domain->signal_invmap)
-               rsig = current_thread_info()->exec_domain->signal_invmap[sig];
-
-       if (__put_user(rsig, &frame->sig) < 0 ||
+       if (__put_user(sig, &frame->sig) < 0 ||
            __put_user(&frame->sc, &frame->psc) < 0)
                return -EFAULT;
 
@@ -270,20 +264,14 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
                          struct pt_regs *regs)
 {
        struct rt_sigframe __user *frame;
-       int rsig, sig = ksig->sig;
+       int sig = ksig->sig;
 
        frame = get_sigframe(ksig, regs, sizeof(*frame));
 
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                return -EFAULT;
 
-       rsig = sig;
-       if (sig < 32 &&
-           current_thread_info()->exec_domain &&
-           current_thread_info()->exec_domain->signal_invmap)
-               rsig = current_thread_info()->exec_domain->signal_invmap[sig];
-
-       if (__put_user(rsig, &frame->sig) ||
+       if (__put_user(sig, &frame->sig) ||
            __put_user(&frame->info, &frame->pinfo) ||
            __put_user(&frame->uc, &frame->puc) ||
            copy_siginfo_to_user(&frame->info, &ksig->info))
index a16e55cbd8ad99dce9f448d14c3a4ddeb20b8e42..d69c338bd19c37dfa88b1ff9c1eadf3490d478cb 100644 (file)
@@ -39,7 +39,6 @@ typedef struct {
  */
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        __u32                   cpu;            /* current CPU */
        int                     preempt_count;  /* 0 => preemptable,<0 => BUG */
@@ -58,7 +57,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
index 875f0845a70760b215a06d8afded0f56b564f7e0..6e619a79a4010bf63767205c289d841a567ae124 100644 (file)
@@ -48,7 +48,6 @@ typedef unsigned long mm_segment_t;
 
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        __u32                   cpu;            /* current CPU */
        __s32                   preempt_count; /* 0 => preemptable, <0 => BUG */
@@ -73,7 +72,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                          \
 {                                                      \
        .task           = &tsk,                         \
-       .exec_domain    = &default_exec_domain,         \
        .flags          = 0,                            \
        .cpu            = 0,                            \
        .preempt_count  = 1,                            \
index 4112175bf803b46b8fbd089f92d789b2011bc0ce..c82be69b43c64dc83ca24280d5261ff7b7e5bac6 100644 (file)
@@ -193,8 +193,6 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
        if (err)
                return -EFAULT;
 
-       /* TODO what is the current->exec_domain stuff and invmap ? */
-
        /* Set up registers for signal handler */
        regs->pc = (unsigned long)ksig->ka.sa.sa_handler; /* what we enter NOW */
        regs->gpr[9] = (unsigned long)return_ip;     /* what we enter LATER */
index fb13e3865563cd9333b76806f52e019437b31c8b..e96e693fd58ca0df4a231a35a6f753e447dac1cb 100644 (file)
@@ -9,7 +9,6 @@
 
 struct thread_info {
        struct task_struct *task;       /* main task structure */
-       struct exec_domain *exec_domain;/* execution domain */
        unsigned long flags;            /* thread_info flags (see TIF_*) */
        mm_segment_t addr_limit;        /* user-level address space limit */
        __u32 cpu;                      /* current CPU */
@@ -19,7 +18,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .addr_limit     = KERNEL_DS,            \
index dcd55103a4bb7ff433433c1bcdadc466376de52e..59001cea13f9bea05c1071cc6aaaf1fad9ad3458 100644 (file)
@@ -242,7 +242,6 @@ int main(void)
        DEFINE(PT_SZ_ALGN, align_frame(sizeof(struct pt_regs), FRAME_ALIGN));
        BLANK();
        DEFINE(TI_TASK, offsetof(struct thread_info, task));
-       DEFINE(TI_EXEC_DOMAIN, offsetof(struct thread_info, exec_domain));
        DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
        DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
        DEFINE(TI_SEGMENT, offsetof(struct thread_info, addr_limit));
index 72489799cf022f97885f1a973ac2fce7fdf32c6d..7efee4a3240ba291481ccf135725fc8371cdcbee 100644 (file)
@@ -39,7 +39,6 @@
  */
 struct thread_info {
        struct task_struct *task;               /* main task structure */
-       struct exec_domain *exec_domain;        /* execution domain */
        int             cpu;                    /* cpu we're on */
        int             preempt_count;          /* 0 => preemptable,
                                                   <0 => BUG */
@@ -55,7 +54,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task =         &tsk,                   \
-       .exec_domain =  &default_exec_domain,   \
        .cpu =          0,                      \
        .preempt_count = INIT_PREEMPT_COUNT,    \
        .flags =        0,                      \
index d532098d98bfc2430031ba8e3fc79dba4af5c9c7..4c27ec764c3681105ffd4acdd8458b671806e7ee 100644 (file)
@@ -29,7 +29,6 @@
  */
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        unsigned long           sys_call_table; /* System call table address */
        unsigned int            cpu;            /* current CPU */
@@ -46,7 +45,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
index f35058da8eafd53b678405b5ac6466ff707a3c2f..c7d1b9d0901147ba359fa03e2e4e026699413fa2 100644 (file)
@@ -34,7 +34,6 @@ int main(void)
        DEFINE(__THREAD_per_paid, offsetof(struct task_struct, thread.per_event.paid));
        BLANK();
        DEFINE(__TI_task, offsetof(struct thread_info, task));
-       DEFINE(__TI_domain, offsetof(struct thread_info, exec_domain));
        DEFINE(__TI_flags, offsetof(struct thread_info, flags));
        DEFINE(__TI_sysc_table, offsetof(struct thread_info, sys_call_table));
        DEFINE(__TI_cpu, offsetof(struct thread_info, cpu));
index bc1df12dd4f8160df92580d5e04a6a5f76e08608..fe8d6924efaa8f00205c8c2755bdc64f17d0e8ba 100644 (file)
@@ -370,16 +370,6 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
        return (void __user *)((sp - frame_size) & -8ul);
 }
 
-static inline int map_signal(int sig)
-{
-       if (current_thread_info()->exec_domain
-           && current_thread_info()->exec_domain->signal_invmap
-           && sig < 32)
-               return current_thread_info()->exec_domain->signal_invmap[sig];
-        else
-               return sig;
-}
-
 static int setup_frame32(struct ksignal *ksig, sigset_t *set,
                         struct pt_regs *regs)
 {
@@ -449,7 +439,7 @@ static int setup_frame32(struct ksignal *ksig, sigset_t *set,
                (regs->psw.mask & ~PSW_MASK_ASC);
        regs->psw.addr = (__force __u64) ksig->ka.sa.sa_handler;
 
-       regs->gprs[2] = map_signal(sig);
+       regs->gprs[2] = sig;
        regs->gprs[3] = (__force __u64) &frame->sc;
 
        /* We forgot to include these in the sigcontext.
@@ -532,7 +522,7 @@ static int setup_rt_frame32(struct ksignal *ksig, sigset_t *set,
                (regs->psw.mask & ~PSW_MASK_ASC);
        regs->psw.addr = (__u64 __force) ksig->ka.sa.sa_handler;
 
-       regs->gprs[2] = map_signal(ksig->sig);
+       regs->gprs[2] = ksig->sig;
        regs->gprs[3] = (__force __u64) &frame->info;
        regs->gprs[4] = (__force __u64) &frame->uc;
        regs->gprs[5] = task_thread_info(current)->last_break;
index 7fec60cb0b7586a35f3b9dea618abb46bba2f43b..c551f22ce066466ebc6d6666b85a459716842683 100644 (file)
@@ -301,16 +301,6 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
        return (void __user *)((sp - frame_size) & -8ul);
 }
 
-static inline int map_signal(int sig)
-{
-       if (current_thread_info()->exec_domain
-           && current_thread_info()->exec_domain->signal_invmap
-           && sig < 32)
-               return current_thread_info()->exec_domain->signal_invmap[sig];
-       else
-               return sig;
-}
-
 static int setup_frame(int sig, struct k_sigaction *ka,
                       sigset_t *set, struct pt_regs * regs)
 {
@@ -378,7 +368,7 @@ static int setup_frame(int sig, struct k_sigaction *ka,
                (regs->psw.mask & ~PSW_MASK_ASC);
        regs->psw.addr = (unsigned long) ka->sa.sa_handler | PSW_ADDR_AMODE;
 
-       regs->gprs[2] = map_signal(sig);
+       regs->gprs[2] = sig;
        regs->gprs[3] = (unsigned long) &frame->sc;
 
        /* We forgot to include these in the sigcontext.
@@ -458,7 +448,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
                (regs->psw.mask & ~PSW_MASK_ASC);
        regs->psw.addr = (unsigned long) ksig->ka.sa.sa_handler | PSW_ADDR_AMODE;
 
-       regs->gprs[2] = map_signal(ksig->sig);
+       regs->gprs[2] = ksig->sig;
        regs->gprs[3] = (unsigned long) &frame->info;
        regs->gprs[4] = (unsigned long) &frame->uc;
        regs->gprs[5] = task_thread_info(current)->last_break;
index 33864fa2a8d4cd7cc4135e9fa87b3eab591609aa..7d9ffb15c47779bfd270de262252a1d98a0fee99 100644 (file)
@@ -28,7 +28,6 @@
  */
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        unsigned long           tp_value;       /* thread pointer */
        __u32                   cpu;            /* current CPU */
@@ -53,7 +52,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .cpu            = 0,                    \
        .preempt_count  = 1,                    \
        .addr_limit     = KERNEL_DS,            \
index b4d5214a7a7e261d21c3353c7901d2c0b3d129ba..52794f9421e240934061e0564e578ff9edc7f5e2 100644 (file)
@@ -100,7 +100,6 @@ void output_thread_info_defines(void)
 {
        COMMENT("SCORE thread_info offsets.");
        OFFSET(TI_TASK, thread_info, task);
-       OFFSET(TI_EXEC_DOMAIN, thread_info, exec_domain);
        OFFSET(TI_FLAGS, thread_info, flags);
        OFFSET(TI_TP_VALUE, thread_info, tp_value);
        OFFSET(TI_CPU, thread_info, cpu);
index 657c039196276118a150a33a93f34daf61f29544..2afa321157be6f4e83ce791090026a29a73abc23 100644 (file)
@@ -27,7 +27,6 @@
 
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        __u32                   status;         /* thread synchronous flags */
        __u32                   cpu;
@@ -56,7 +55,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .status         = 0,                    \
        .cpu            = 0,                    \
index 542225fedb112088b881a12bb76b4c637ce9f92d..4bd44da910f374616a4dee3eabcaef4c52639b4a 100644 (file)
@@ -21,7 +21,6 @@ int main(void)
 {
        /* offsets into the thread_info struct */
        DEFINE(TI_TASK,         offsetof(struct thread_info, task));
-       DEFINE(TI_EXEC_DOMAIN,  offsetof(struct thread_info, exec_domain));
        DEFINE(TI_FLAGS,        offsetof(struct thread_info, flags));
        DEFINE(TI_CPU,          offsetof(struct thread_info, cpu));
        DEFINE(TI_PRE_COUNT,    offsetof(struct thread_info, preempt_count));
index 65a1ecd77f96005b8977df46076475266d0a37e6..eb10ff84015c4c92f28e03756f90859705802d70 100644 (file)
@@ -124,7 +124,6 @@ void irq_ctx_init(int cpu)
 
        irqctx = (union irq_ctx *)&hardirq_stack[cpu * THREAD_SIZE];
        irqctx->tinfo.task              = NULL;
-       irqctx->tinfo.exec_domain       = NULL;
        irqctx->tinfo.cpu               = cpu;
        irqctx->tinfo.preempt_count     = HARDIRQ_OFFSET;
        irqctx->tinfo.addr_limit        = MAKE_MM_SEG(0);
@@ -133,7 +132,6 @@ void irq_ctx_init(int cpu)
 
        irqctx = (union irq_ctx *)&softirq_stack[cpu * THREAD_SIZE];
        irqctx->tinfo.task              = NULL;
-       irqctx->tinfo.exec_domain       = NULL;
        irqctx->tinfo.cpu               = cpu;
        irqctx->tinfo.preempt_count     = 0;
        irqctx->tinfo.addr_limit        = MAKE_MM_SEG(0);
index 97292890b51bc4d36121cfa35fde08c79e3260f5..f7c3d5c25caf9f5d88d549d7c07b720959bc5149 100644 (file)
@@ -267,19 +267,12 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
 {
        struct sigframe __user *frame;
        int err = 0, sig = ksig->sig;
-       int signal;
 
        frame = get_sigframe(&ksig->ka, regs->regs[15], sizeof(*frame));
 
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                return -EFAULT;
 
-       signal = current_thread_info()->exec_domain
-               && current_thread_info()->exec_domain->signal_invmap
-               && sig < 32
-               ? current_thread_info()->exec_domain->signal_invmap[sig]
-               : sig;
-
        err |= setup_sigcontext(&frame->sc, regs, set->sig[0]);
 
        if (_NSIG_WORDS > 1)
@@ -313,7 +306,7 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
 
        /* Set up registers for signal handler */
        regs->regs[15] = (unsigned long) frame;
-       regs->regs[4] = signal; /* Arg for signal handler */
+       regs->regs[4] = sig; /* Arg for signal handler */
        regs->regs[5] = 0;
        regs->regs[6] = (unsigned long) &frame->sc;
 
@@ -340,19 +333,12 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
 {
        struct rt_sigframe __user *frame;
        int err = 0, sig = ksig->sig;
-       int signal;
 
        frame = get_sigframe(&ksig->ka, regs->regs[15], sizeof(*frame));
 
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                return -EFAULT;
 
-       signal = current_thread_info()->exec_domain
-               && current_thread_info()->exec_domain->signal_invmap
-               && sig < 32
-               ? current_thread_info()->exec_domain->signal_invmap[sig]
-               : sig;
-
        err |= copy_siginfo_to_user(&frame->info, &ksig->info);
 
        /* Create the ucontext.  */
@@ -390,7 +376,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
 
        /* Set up registers for signal handler */
        regs->regs[15] = (unsigned long) frame;
-       regs->regs[4] = signal; /* Arg for signal handler */
+       regs->regs[4] = sig; /* Arg for signal handler */
        regs->regs[5] = (unsigned long) &frame->info;
        regs->regs[6] = (unsigned long) &frame->uc;
 
index 0462995d4d7f66ed9531948aaf0d3ef9bdd63b63..d8a3f0d2280983030ccd7b637ed5d940ed50219a 100644 (file)
@@ -385,12 +385,6 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                return -EFAULT;
 
-       signal = current_thread_info()->exec_domain
-               && current_thread_info()->exec_domain->signal_invmap
-               && sig < 32
-               ? current_thread_info()->exec_domain->signal_invmap[sig]
-               : sig;
-
        err |= setup_sigcontext(&frame->sc, regs, set->sig[0]);
 
        /* Give up earlier as i386, in case */
@@ -441,7 +435,7 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs
         * All edited pointers are subject to NEFF.
         */
        regs->regs[REG_SP] = neff_sign_extend((unsigned long)frame);
-       regs->regs[REG_ARG1] = signal; /* Arg for signal handler */
+       regs->regs[REG_ARG1] = sig; /* Arg for signal handler */
 
         /* FIXME:
            The glibc profiling support for SH-5 needs to be passed a sigcontext
@@ -459,7 +453,7 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs
 
        /* Broken %016Lx */
        pr_debug("SIG deliver (#%d,%s:%d): sp=%p pc=%08Lx%08Lx link=%08Lx%08Lx\n",
-                signal, current->comm, current->pid, frame,
+                sig, current->comm, current->pid, frame,
                 regs->pc >> 32, regs->pc & 0xffffffff,
                 DEREF_REG_PR >> 32, DEREF_REG_PR & 0xffffffff);
 
@@ -471,19 +465,12 @@ static int setup_rt_frame(struct ksignal *kig, sigset_t *set,
 {
        struct rt_sigframe __user *frame;
        int err = 0, sig = ksig->sig;
-       int signal;
 
        frame = get_sigframe(&ksig->ka, regs->regs[REG_SP], sizeof(*frame));
 
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                return -EFAULT;
 
-       signal = current_thread_info()->exec_domain
-               && current_thread_info()->exec_domain->signal_invmap
-               && sig < 32
-               ? current_thread_info()->exec_domain->signal_invmap[sig]
-               : sig;
-
        err |= __put_user(&frame->info, &frame->pinfo);
        err |= __put_user(&frame->uc, &frame->puc);
        err |= copy_siginfo_to_user(&frame->info, &ksig->info);
@@ -540,13 +527,13 @@ static int setup_rt_frame(struct ksignal *kig, sigset_t *set,
         * All edited pointers are subject to NEFF.
         */
        regs->regs[REG_SP] = neff_sign_extend((unsigned long)frame);
-       regs->regs[REG_ARG1] = signal; /* Arg for signal handler */
+       regs->regs[REG_ARG1] = sig; /* Arg for signal handler */
        regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->info;
        regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->uc.uc_mcontext;
        regs->pc = neff_sign_extend((unsigned long)ksig->ka.sa.sa_handler);
 
        pr_debug("SIG deliver (#%d,%s:%d): sp=%p pc=%08Lx%08Lx link=%08Lx%08Lx\n",
-                signal, current->comm, current->pid, frame,
+                sig, current->comm, current->pid, frame,
                 regs->pc >> 32, regs->pc & 0xffffffff,
                 DEREF_REG_PR >> 32, DEREF_REG_PR & 0xffffffff);
 
index fd7bd0a440ca717844918de9558be3a213eec571..229475f0d7ce0a700619848c9525d2c24e77d591 100644 (file)
@@ -27,7 +27,6 @@
 struct thread_info {
        unsigned long           uwinmask;
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        int                     cpu;            /* cpu we're on */
        int                     preempt_count;  /* 0 => preemptable,
@@ -35,6 +34,8 @@ struct thread_info {
        int                     softirq_count;
        int                     hardirq_count;
 
+       u32 __unused;
+
        /* Context switch saved kernel state. */
        unsigned long ksp;      /* ... ksp __attribute__ ((aligned (8))); */
        unsigned long kpc;
@@ -56,7 +57,6 @@ struct thread_info {
 {                                                      \
        .uwinmask       =       0,                      \
        .task           =       &tsk,                   \
-       .exec_domain    =       &default_exec_domain,   \
        .flags          =       0,                      \
        .cpu            =       0,                      \
        .preempt_count  =       INIT_PREEMPT_COUNT,     \
@@ -85,12 +85,11 @@ register struct thread_info *current_thread_info_reg asm("g6");
  */
 #define TI_UWINMASK    0x00    /* uwinmask */
 #define TI_TASK                0x04
-#define TI_EXECDOMAIN  0x08    /* exec_domain */
-#define TI_FLAGS       0x0c
-#define TI_CPU         0x10
-#define TI_PREEMPT     0x14    /* preempt_count */
-#define TI_SOFTIRQ     0x18    /* softirq_count */
-#define TI_HARDIRQ     0x1c    /* hardirq_count */
+#define TI_FLAGS       0x08
+#define TI_CPU         0x0c
+#define TI_PREEMPT     0x10    /* preempt_count */
+#define TI_SOFTIRQ     0x14    /* softirq_count */
+#define TI_HARDIRQ     0x18    /* hardirq_count */
 #define TI_KSP         0x20    /* ksp */
 #define TI_KPC         0x24    /* kpc (ldd'ed with kpc) */
 #define TI_KPSR                0x28    /* kpsr */
index ff455164732a9b33b291df5a370d80c27e12828b..bde59825d06c8c1bfbcb49991c1c23cbb8300587 100644 (file)
@@ -31,7 +31,6 @@
 #include <asm/types.h>
 
 struct task_struct;
-struct exec_domain;
 
 struct thread_info {
        /* D$ line 1 */
@@ -44,7 +43,6 @@ struct thread_info {
        /* D$ line 2 */
        unsigned long           fault_address;
        struct pt_regs          *kregs;
-       struct exec_domain      *exec_domain;
        int                     preempt_count;  /* 0 => preemptable, <0 => BUG */
        __u8                    new_child;
        __u8                    current_ds;
@@ -80,18 +78,17 @@ struct thread_info {
 #define TI_KSP         0x00000018
 #define TI_FAULT_ADDR  0x00000020
 #define TI_KREGS       0x00000028
-#define TI_EXEC_DOMAIN 0x00000030
-#define TI_PRE_COUNT   0x00000038
-#define TI_NEW_CHILD   0x0000003c
-#define TI_CURRENT_DS  0x0000003d
-#define TI_CPU         0x0000003e
-#define TI_UTRAPS      0x00000040
-#define TI_REG_WINDOW  0x00000048
-#define TI_RWIN_SPTRS  0x000003c8
-#define TI_GSR         0x00000400
-#define TI_XFSR                0x00000438
-#define TI_KUNA_REGS   0x00000470
-#define TI_KUNA_INSN   0x00000478
+#define TI_PRE_COUNT   0x00000030
+#define TI_NEW_CHILD   0x00000034
+#define TI_CURRENT_DS  0x00000035
+#define TI_CPU         0x00000036
+#define TI_UTRAPS      0x00000038
+#define TI_REG_WINDOW  0x00000040
+#define TI_RWIN_SPTRS  0x000003c0
+#define TI_GSR         0x000003f8
+#define TI_XFSR                0x00000430
+#define TI_KUNA_REGS   0x00000468
+#define TI_KUNA_INSN   0x00000470
 #define TI_FPREGS      0x00000480
 
 /* We embed this in the uppermost byte of thread_info->flags */
@@ -119,7 +116,6 @@ struct thread_info {
 {                                                      \
        .task           =       &tsk,                   \
        .current_ds     =       ASI_P,                  \
-       .exec_domain    =       &default_exec_domain,   \
        .preempt_count  =       INIT_PREEMPT_COUNT,     \
 }
 
index 6fd386c5232a65dc068d48e811f8508cc771cae6..4f21df7d4f13bd32935f870ec26fa6e03b0f8a01 100644 (file)
@@ -433,7 +433,6 @@ void trap_init(void)
        /* Force linker to barf if mismatched */
        if (TI_UWINMASK    != offsetof(struct thread_info, uwinmask) ||
            TI_TASK        != offsetof(struct thread_info, task) ||
-           TI_EXECDOMAIN  != offsetof(struct thread_info, exec_domain) ||
            TI_FLAGS       != offsetof(struct thread_info, flags) ||
            TI_CPU         != offsetof(struct thread_info, cpu) ||
            TI_PREEMPT     != offsetof(struct thread_info, preempt_count) ||
index 0e699745d64311d44439327d3e971ce78114b7da..d21cd625c0dedda934ec4ebde5a6aed8015a7415 100644 (file)
@@ -2691,8 +2691,6 @@ void __init trap_init(void)
                                               fault_address) ||
                     TI_KREGS != offsetof(struct thread_info, kregs) ||
                     TI_UTRAPS != offsetof(struct thread_info, utraps) ||
-                    TI_EXEC_DOMAIN != offsetof(struct thread_info,
-                                               exec_domain) ||
                     TI_REG_WINDOW != offsetof(struct thread_info,
                                               reg_window) ||
                     TI_RWIN_SPTRS != offsetof(struct thread_info,
index 96c14c1430d8e75f66fb333233c318b15a781056..98ee10a0ae89e8434e1ac45c68e9140d7027fcc8 100644 (file)
@@ -26,7 +26,6 @@
  */
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        unsigned long           status;         /* thread-synchronous flags */
        __u32                   homecache_cpu;  /* CPU we are homecached on */
@@ -51,7 +50,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
index 8c5abf2e4794ef269f4ad890902a317dd6b01bb1..5cbc864398d310924356897880ad332084aa301f 100644 (file)
@@ -196,19 +196,12 @@ int compat_setup_rt_frame(struct ksignal *ksig, sigset_t *set,
        unsigned long restorer;
        struct compat_rt_sigframe __user *frame;
        int err = 0, sig = ksig->sig;
-       int usig;
 
        frame = compat_get_sigframe(&ksig->ka, regs, sizeof(*frame));
 
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                goto err;
 
-       usig = current_thread_info()->exec_domain
-               && current_thread_info()->exec_domain->signal_invmap
-               && sig < 32
-               ? current_thread_info()->exec_domain->signal_invmap[sig]
-               : sig;
-
        /* Always write at least the signal number for the stack backtracer. */
        if (ksig->ka.sa.sa_flags & SA_SIGINFO) {
                /* At sigreturn time, restore the callee-save registers too. */
@@ -243,7 +236,7 @@ int compat_setup_rt_frame(struct ksignal *ksig, sigset_t *set,
        regs->ex1 = PL_ICS_EX1(USER_PL, 1); /* set crit sec in handler */
        regs->sp = ptr_to_compat_reg(frame);
        regs->lr = restorer;
-       regs->regs[0] = (unsigned long) usig;
+       regs->regs[0] = (unsigned long) sig;
        regs->regs[1] = ptr_to_compat_reg(&frame->info);
        regs->regs[2] = ptr_to_compat_reg(&frame->uc);
        regs->flags |= PT_FLAGS_CALLER_SAVES;
index 8a524e332c1a280b848eeb67dd3f6e34263ce32b..87299a6cfec87d27296eccf7b47fc1f60b5bac0a 100644 (file)
@@ -151,19 +151,12 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
        unsigned long restorer;
        struct rt_sigframe __user *frame;
        int err = 0, sig = ksig->sig;
-       int usig;
 
        frame = get_sigframe(&ksig->ka, regs, sizeof(*frame));
 
        if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
                goto err;
 
-       usig = current_thread_info()->exec_domain
-               && current_thread_info()->exec_domain->signal_invmap
-               && sig < 32
-               ? current_thread_info()->exec_domain->signal_invmap[sig]
-               : sig;
-
        /* Always write at least the signal number for the stack backtracer. */
        if (ksig->ka.sa.sa_flags & SA_SIGINFO) {
                /* At sigreturn time, restore the callee-save registers too. */
@@ -198,7 +191,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
        regs->ex1 = PL_ICS_EX1(USER_PL, 1); /* set crit sec in handler */
        regs->sp = (unsigned long) frame;
        regs->lr = restorer;
-       regs->regs[0] = (unsigned long) usig;
+       regs->regs[0] = (unsigned long) sig;
        regs->regs[1] = (unsigned long) &frame->info;
        regs->regs[2] = (unsigned long) &frame->uc;
        regs->flags |= PT_FLAGS_CALLER_SAVES;
index e04114c4fcd9e5a4bc61def6cfbd9480c69046bd..b30c85b141d95f4bf4eb296dc5e4ceff4b67672a 100644 (file)
@@ -14,7 +14,6 @@
 
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        __u32                   cpu;            /* current CPU */
        int                     preempt_count;  /* 0 => preemptable,
@@ -28,7 +27,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task =         &tsk,                   \
-       .exec_domain =  &default_exec_domain,   \
        .flags =                0,              \
        .cpu =          0,                      \
        .preempt_count = INIT_PREEMPT_COUNT,    \
index 63e2839dfeb8f829135067afd2cdf81a13292e58..e79ad6d5b5b2983c9a6d5464a6788a5fea20da2d 100644 (file)
@@ -24,7 +24,6 @@
 #ifndef __ASSEMBLY__
 
 struct task_struct;
-struct exec_domain;
 
 #include <asm/types.h>
 
@@ -71,7 +70,6 @@ struct thread_info {
                                                /* <0 => bug */
        mm_segment_t            addr_limit;     /* address limit */
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        __u32                   cpu;            /* cpu */
        struct cpu_context_save cpu_context;    /* cpu context */
        __u32                   syscall;        /* syscall number */
@@ -84,7 +82,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                                          \
 {                                                                      \
        .task           = &tsk,                                         \
-       .exec_domain    = &default_exec_domain,                         \
        .flags          = 0,                                            \
        .preempt_count  = INIT_PREEMPT_COUNT,                           \
        .addr_limit     = KERNEL_DS,                                    \
index ffcbe7536ca7ae02212944d6b0f480a3edcbbcb0..80d50c4651e337c01926f449197a9a388b00e4c8 100644 (file)
@@ -42,7 +42,6 @@ int main(void)
        DEFINE(TI_PREEMPT,      offsetof(struct thread_info, preempt_count));
        DEFINE(TI_ADDR_LIMIT,   offsetof(struct thread_info, addr_limit));
        DEFINE(TI_TASK,         offsetof(struct thread_info, task));
-       DEFINE(TI_EXEC_DOMAIN,  offsetof(struct thread_info, exec_domain));
        DEFINE(TI_CPU,          offsetof(struct thread_info, cpu));
        DEFINE(TI_CPU_SAVE,     offsetof(struct thread_info, cpu_context));
        DEFINE(TI_USED_CP,      offsetof(struct thread_info, used_cp));
index d329f85766cc5cd0b794e37a7e3ff1fd90157f9f..4ae51cf15adea6ef7ddc6741b431793b545903d3 100644 (file)
@@ -329,13 +329,6 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs,
                }
        }
 
-       /*
-        * translate the signal
-        */
-       if (usig < 32 && thread->exec_domain
-                       && thread->exec_domain->signal_invmap)
-               usig = thread->exec_domain->signal_invmap[usig];
-
        /*
         * Set up the stack frame
         */
index ea2dbe82cba3a74e06e269655cdfca8a67253e52..b4bdec3e9523e03b7ece3154302c8d95ce2a9ac8 100644 (file)
  */
 #ifndef __ASSEMBLY__
 struct task_struct;
-struct exec_domain;
 #include <asm/processor.h>
 #include <linux/atomic.h>
 
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        __u32                   flags;          /* low level flags */
        __u32                   status;         /* thread synchronous flags */
        __u32                   cpu;            /* current CPU */
@@ -66,7 +64,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .saved_preempt_count = INIT_PREEMPT_COUNT,      \
index 3e581865c8e2a048bbc307a9d3fc4e04ad14b4d7..f9804080ccb36c3b95345a0c53cfe2cd392cfcd1 100644 (file)
@@ -593,24 +593,10 @@ badframe:
        return 0;
 }
 
-/*
- * OK, we're invoking a handler:
- */
-static int signr_convert(int sig)
-{
-#ifdef CONFIG_X86_32
-       struct thread_info *info = current_thread_info();
-
-       if (info->exec_domain && info->exec_domain->signal_invmap && sig < 32)
-               return info->exec_domain->signal_invmap[sig];
-#endif /* CONFIG_X86_32 */
-       return sig;
-}
-
 static int
 setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs)
 {
-       int usig = signr_convert(ksig->sig);
+       int usig = ksig->sig;
        sigset_t *set = sigmask_to_save();
        compat_sigset_t *cset = (compat_sigset_t *) set;
 
index 0c8c32bfd7928ee252c562e0a8767ec37e02844e..592491d1d70d9b2ceb95600707c6ba7daa693049 100644 (file)
@@ -549,13 +549,6 @@ int setup_signal_stack_si(unsigned long stack_top, struct ksignal *ksig,
        if (err)
                return err;
 
-       /* Set up registers for signal handler */
-       {
-               struct exec_domain *ed = current_thread_info()->exec_domain;
-               if (unlikely(ed && ed->signal_invmap && sig < 32))
-                       sig = ed->signal_invmap[sig];
-       }
-
        PT_REGS_SP(regs) = (unsigned long) frame;
        PT_REGS_DI(regs) = sig;
        /* In case the signal handler was declared without prototypes */
index a9b5d3ba196cd70dbf0b72782db03ad7de8475b5..9ad12c6171842513d0df4a6dd31de0666a31cbfc 100644 (file)
@@ -44,7 +44,6 @@ typedef struct xtregs_coprocessor {
 
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
-       struct exec_domain      *exec_domain;   /* execution domain */
        unsigned long           flags;          /* low level flags */
        unsigned long           status;         /* thread-synchronous flags */
        __u32                   cpu;            /* current CPU */
@@ -61,17 +60,6 @@ struct thread_info {
        xtregs_user_t           xtregs_user;
 };
 
-#else /* !__ASSEMBLY__ */
-
-/* offsets into the thread_info struct for assembly code access */
-#define TI_TASK                 0x00000000
-#define TI_EXEC_DOMAIN  0x00000004
-#define TI_FLAGS        0x00000008
-#define TI_STATUS       0x0000000C
-#define TI_CPU          0x00000010
-#define TI_PRE_COUNT    0x00000014
-#define TI_ADDR_LIMIT   0x00000018
-
 #endif
 
 /*
@@ -83,7 +71,6 @@ struct thread_info {
 #define INIT_THREAD_INFO(tsk)                  \
 {                                              \
        .task           = &tsk,                 \
-       .exec_domain    = &default_exec_domain, \
        .flags          = 0,                    \
        .cpu            = 0,                    \
        .preempt_count  = INIT_PREEMPT_COUNT,   \
index 1915c7c889ba7dbc7b94e87b85d7551d93eb92b2..b123ace3b67c7651c1e25505a5649e45be3fe874 100644 (file)
@@ -77,6 +77,14 @@ int main(void)
        DEFINE(TASK_THREAD_INFO, offsetof (struct task_struct, stack));
        DEFINE(TASK_STRUCT_SIZE, sizeof (struct task_struct));
 
+       /* offsets in thread_info struct */
+       OFFSET(TI_TASK, thread_info, task);
+       OFFSET(TI_FLAGS, thread_info, flags);
+       OFFSET(TI_STSTUS, thread_info, status);
+       OFFSET(TI_CPU, thread_info, cpu);
+       OFFSET(TI_PRE_COUNT, thread_info, preempt_count);
+       OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit);
+
        /* struct thread_info (offset from start_struct) */
        DEFINE(THREAD_RA, offsetof (struct task_struct, thread.ra));
        DEFINE(THREAD_SP, offsetof (struct task_struct, thread.sp));
index 6b3790445cbed4c5d2ab7fb31cdc6bb6d3db25f8..e87adaa07ff3f0d7cb5ac6816ba6593d9b09ed1d 100644 (file)
@@ -336,7 +336,6 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
 {
        struct rt_sigframe *frame;
        int err = 0, sig = ksig->sig;
-       int signal;
        unsigned long sp, ra, tp;
 
        sp = regs->areg[1];
@@ -354,12 +353,6 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
                return -EFAULT;
        }
 
-       signal = current_thread_info()->exec_domain
-               && current_thread_info()->exec_domain->signal_invmap
-               && sig < 32
-               ? current_thread_info()->exec_domain->signal_invmap[sig]
-               : sig;
-
        if (ksig->ka.sa.sa_flags & SA_SIGINFO) {
                err |= copy_siginfo_to_user(&frame->info, &ksig->info);
        }
@@ -400,14 +393,14 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
         * Note: PS.CALLINC is set to one by start_thread
         */
        regs->areg[4] = (((unsigned long) ra) & 0x3fffffff) | 0x40000000;
-       regs->areg[6] = (unsigned long) signal;
+       regs->areg[6] = (unsigned long) sig;
        regs->areg[7] = (unsigned long) &frame->info;
        regs->areg[8] = (unsigned long) &frame->uc;
        regs->threadptr = tp;
 
 #if DEBUG_SIG
        printk("SIG rt deliver (%s:%d): signal=%d sp=%p pc=%08x\n",
-               current->comm, current->pid, signal, frame, regs->pc);
+               current->comm, current->pid, sig, frame, regs->pc);
 #endif
 
        return 0;
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 */
index f74d4cc3a3e54f72026449a8f70ff287dc807248..8222ae40ecb0167d55f3b59027277d2a9e98d80d 100644 (file)
@@ -125,7 +125,6 @@ struct sched_attr {
        u64 sched_period;
 };
 
-struct exec_domain;
 struct futex_pi_state;
 struct robust_list_head;
 struct bio_list;
@@ -2311,11 +2310,6 @@ extern void set_curr_task(int cpu, struct task_struct *p);
 
 void yield(void);
 
-/*
- * The default (Linux) execution domain.
- */
-extern struct exec_domain      default_exec_domain;
-
 union thread_union {
        struct thread_info thread_info;
        unsigned long stack[THREAD_SIZE/sizeof(long)];
index 83d4382f56998d8bcde22b4d9cc4822360d41afa..6873bb3e6b7e80adcd9cb638b93d530b81881a43 100644 (file)
 #include <linux/types.h>
 #include <linux/fs_struct.h>
 
-
-static void default_handler(int, struct pt_regs *);
-
-static struct exec_domain *exec_domains = &default_exec_domain;
-static DEFINE_RWLOCK(exec_domains_lock);
-
-
-static unsigned long ident_map[32] = {
-       0,      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
-};
-
-struct exec_domain default_exec_domain = {
-       .name           = "Linux",              /* name */
-       .handler        = default_handler,      /* lcall7 causes a seg fault. */
-       .pers_low       = 0,                    /* PER_LINUX personality. */
-       .pers_high      = 0,                    /* PER_LINUX personality. */
-       .signal_map     = ident_map,            /* Identity map signals. */
-       .signal_invmap  = ident_map,            /*  - both ways. */
-};
-
-
-static void
-default_handler(int segment, struct pt_regs *regp)
-{
-       set_personality(0);
-
-       if (current_thread_info()->exec_domain->handler != default_handler)
-               current_thread_info()->exec_domain->handler(segment, regp);
-       else
-               send_sig(SIGSEGV, current, 1);
-}
-
-static struct exec_domain *
-lookup_exec_domain(unsigned int personality)
-{
-       unsigned int pers = personality(personality);
-       struct exec_domain *ep;
-
-       read_lock(&exec_domains_lock);
-       for (ep = exec_domains; ep; ep = ep->next) {
-               if (pers >= ep->pers_low && pers <= ep->pers_high)
-                       if (try_module_get(ep->module))
-                               goto out;
-       }
-
-#ifdef CONFIG_MODULES
-       read_unlock(&exec_domains_lock);
-       request_module("personality-%d", pers);
-       read_lock(&exec_domains_lock);
-
-       for (ep = exec_domains; ep; ep = ep->next) {
-               if (pers >= ep->pers_low && pers <= ep->pers_high)
-                       if (try_module_get(ep->module))
-                               goto out;
-       }
-#endif
-
-       ep = &default_exec_domain;
-out:
-       read_unlock(&exec_domains_lock);
-       return ep;
-}
-
-int
-register_exec_domain(struct exec_domain *ep)
-{
-       struct exec_domain      *tmp;
-       int                     err = -EBUSY;
-
-       if (ep == NULL)
-               return -EINVAL;
-
-       if (ep->next != NULL)
-               return -EBUSY;
-
-       write_lock(&exec_domains_lock);
-       for (tmp = exec_domains; tmp; tmp = tmp->next) {
-               if (tmp == ep)
-                       goto out;
-       }
-
-       ep->next = exec_domains;
-       exec_domains = ep;
-       err = 0;
-
-out:
-       write_unlock(&exec_domains_lock);
-       return err;
-}
-EXPORT_SYMBOL(register_exec_domain);
-
-int
-unregister_exec_domain(struct exec_domain *ep)
-{
-       struct exec_domain      **epp;
-
-       epp = &exec_domains;
-       write_lock(&exec_domains_lock);
-       for (epp = &exec_domains; *epp; epp = &(*epp)->next) {
-               if (ep == *epp)
-                       goto unregister;
-       }
-       write_unlock(&exec_domains_lock);
-       return -EINVAL;
-
-unregister:
-       *epp = ep->next;
-       ep->next = NULL;
-       write_unlock(&exec_domains_lock);
-       return 0;
-}
-EXPORT_SYMBOL(unregister_exec_domain);
-
-int __set_personality(unsigned int personality)
-{
-       struct exec_domain *oep = current_thread_info()->exec_domain;
-
-       current_thread_info()->exec_domain = lookup_exec_domain(personality);
-       current->personality = personality;
-       module_put(oep->module);
-
-       return 0;
-}
-EXPORT_SYMBOL(__set_personality);
-
 #ifdef CONFIG_PROC_FS
 static int execdomains_proc_show(struct seq_file *m, void *v)
 {
-       struct exec_domain      *ep;
-
-       read_lock(&exec_domains_lock);
-       for (ep = exec_domains; ep; ep = ep->next)
-               seq_printf(m, "%d-%d\t%-16s\t[%s]\n",
-                              ep->pers_low, ep->pers_high, ep->name,
-                              module_name(ep->module));
-       read_unlock(&exec_domains_lock);
+       seq_puts(m, "0-0\tLinux           \t[kernel]\n");
        return 0;
 }
 
index feff10bbb30777f93c33369a186650a6eb1a2e6a..22fcc05dec4022fa54f2507cb13eddf2137abacc 100644 (file)
@@ -756,8 +756,6 @@ void do_exit(long code)
 
        cgroup_exit(tsk);
 
-       module_put(task_thread_info(tsk)->exec_domain->module);
-
        /*
         * FIXME: do that only when needed, using sched_exit tracepoint
         */
index cf65139615a0d38e3fef37ee3a6e2e270c01ccaf..f2c1e7352298b6a1f67639dc9db7b363896a4597 100644 (file)
@@ -1279,9 +1279,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
        if (nr_threads >= max_threads)
                goto bad_fork_cleanup_count;
 
-       if (!try_module_get(task_thread_info(p)->exec_domain->module))
-               goto bad_fork_cleanup_count;
-
        delayacct_tsk_init(p);  /* Must remain after dup_task_struct() */
        p->flags &= ~(PF_SUPERPRIV | PF_WQ_WORKER);
        p->flags |= PF_FORKNOEXEC;
@@ -1590,7 +1587,6 @@ bad_fork_cleanup_threadgroup_lock:
        if (clone_flags & CLONE_THREAD)
                threadgroup_change_end(current);
        delayacct_tsk_free(p);
-       module_put(task_thread_info(p)->exec_domain->module);
 bad_fork_cleanup_count:
        atomic_dec(&p->cred->user->processes);
        exit_creds(p);