Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / arch / arm64 / include / asm / ptrace.h
index e9e5467..7f94755 100644 (file)
@@ -58,6 +58,7 @@
 #define COMPAT_PSR_Z_BIT       0x40000000
 #define COMPAT_PSR_N_BIT       0x80000000
 #define COMPAT_PSR_IT_MASK     0x0600fc00      /* If-Then execution state mask */
+#define COMPAT_PSR_GE_MASK     0x000f0000
 
 #ifdef CONFIG_CPU_BIG_ENDIAN
 #define COMPAT_PSR_ENDSTATE    COMPAT_PSR_E_BIT
@@ -116,6 +117,8 @@ struct pt_regs {
        };
        u64 orig_x0;
        u64 syscallno;
+       u64 orig_addr_limit;
+       u64 unused;     // maintain 16 byte alignment
 };
 
 #define arch_has_single_step() (1)
@@ -151,35 +154,9 @@ static inline unsigned long regs_return_value(struct pt_regs *regs)
        return regs->regs[0];
 }
 
-/*
- * Are the current registers suitable for user mode? (used to maintain
- * security in signal handlers)
- */
-static inline int valid_user_regs(struct user_pt_regs *regs)
-{
-       if (user_mode(regs) && (regs->pstate & PSR_I_BIT) == 0) {
-               regs->pstate &= ~(PSR_F_BIT | PSR_A_BIT);
-
-               /* The T bit is reserved for AArch64 */
-               if (!(regs->pstate & PSR_MODE32_BIT))
-                       regs->pstate &= ~COMPAT_PSR_T_BIT;
-
-               return 1;
-       }
-
-       /*
-        * Force PSR to something logical...
-        */
-       regs->pstate &= PSR_f | PSR_s | (PSR_x & ~PSR_A_BIT) | \
-                       COMPAT_PSR_T_BIT | PSR_MODE32_BIT;
-
-       if (!(regs->pstate & PSR_MODE32_BIT)) {
-               regs->pstate &= ~COMPAT_PSR_T_BIT;
-               regs->pstate |= PSR_MODE_EL0t;
-       }
-
-       return 0;
-}
+/* We must avoid circular header include via sched.h */
+struct task_struct;
+int valid_user_regs(struct user_pt_regs *regs, struct task_struct *task);
 
 #define instruction_pointer(regs)      ((unsigned long)(regs)->pc)