]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - arch/x86/include/asm/processor.h
x86/uaccess: Move thread_info::addr_limit to thread_struct
[mirror_ubuntu-artful-kernel.git] / arch / x86 / include / asm / processor.h
index cbdfe5f763470dda0d1e758c9825172f2e8d8d25..89314ed74fee3c795585c24630ddcbe83ea7d831 100644 (file)
@@ -371,6 +371,10 @@ extern unsigned int xstate_size;
 
 struct perf_event;
 
+typedef struct {
+       unsigned long           seg;
+} mm_segment_t;
+
 struct thread_struct {
        /* Cached TLS descriptors: */
        struct desc_struct      tls_array[GDT_ENTRY_TLS_ENTRIES];
@@ -419,6 +423,8 @@ struct thread_struct {
        /* Max allowed port in the bitmap, in bytes: */
        unsigned                io_bitmap_max;
 
+       mm_segment_t            addr_limit;
+
        unsigned int            sig_on_uaccess_err:1;
        unsigned int            uaccess_err:1;  /* uaccess failed */
 
@@ -493,11 +499,6 @@ static inline void load_sp0(struct tss_struct *tss,
 #define set_iopl_mask native_set_iopl_mask
 #endif /* CONFIG_PARAVIRT */
 
-typedef struct {
-       unsigned long           seg;
-} mm_segment_t;
-
-
 /* Free all resources held by a thread. */
 extern void release_thread(struct task_struct *);
 
@@ -719,6 +720,7 @@ static inline void spin_lock_prefetch(const void *x)
        .sp0                    = TOP_OF_INIT_STACK,                      \
        .sysenter_cs            = __KERNEL_CS,                            \
        .io_bitmap_ptr          = NULL,                                   \
+       .addr_limit             = KERNEL_DS,                              \
 }
 
 extern unsigned long thread_saved_pc(struct task_struct *tsk);
@@ -768,8 +770,9 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk);
 #define STACK_TOP              TASK_SIZE
 #define STACK_TOP_MAX          TASK_SIZE_MAX
 
-#define INIT_THREAD  { \
-       .sp0 = TOP_OF_INIT_STACK \
+#define INIT_THREAD  {                                         \
+       .sp0                    = TOP_OF_INIT_STACK,            \
+       .addr_limit             = KERNEL_DS,                    \
 }
 
 /*