Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b09e789c438c406bd9bcaac6f1c940a75007e59f Commit: b09e789c438c406bd9bcaac6f1c940a75007e59f Parent: e8c59c0cf9c91dccfb6367c306d753500d5a0150 Author: Shaohua Li <[EMAIL PROTECTED]> AuthorDate: Fri Aug 17 13:43:50 2007 -0700 Committer: Tony Luck <[EMAIL PROTECTED]> CommitDate: Fri Aug 17 13:43:50 2007 -0700
[IA64] forbid ptrace changes psr.ri to 3 The "ri" field in the processor status register only has defined values of 0, 1, 2. Do not let ptrace set this to 3. As with other reserved fields in registers we silently discard the value. Signed-off-by: Shaohua Li <[EMAIL PROTECTED]> Signed-off-by: Tony Luck <[EMAIL PROTECTED]> --- arch/ia64/kernel/ptrace.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index 00f8032..122444a 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c @@ -951,10 +951,14 @@ access_uarea (struct task_struct *child, unsigned long addr, return 0; case PT_CR_IPSR: - if (write_access) - pt->cr_ipsr = ((*data & IPSR_MASK) + if (write_access) { + unsigned long tmp = *data; + /* psr.ri==3 is a reserved value: SDM 2:25 */ + if ((tmp & IA64_PSR_RI) == IA64_PSR_RI) + tmp &= ~IA64_PSR_RI; + pt->cr_ipsr = ((tmp & IPSR_MASK) | (pt->cr_ipsr & ~IPSR_MASK)); - else + } else *data = (pt->cr_ipsr & IPSR_MASK); return 0; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html