Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dfc544c7216b276c1e9c0c753299692df4068c44
Commit:     dfc544c7216b276c1e9c0c753299692df4068c44
Parent:     6df26700c0884cb3cce2b9fa4795888f86ca4d8f
Author:     Dan Williams <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 13 17:11:34 2007 +0100
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Wed Feb 14 15:21:22 2007 +0000

    [ARM] 4183/1: do_undefinstr: read svc undefined instructions with svc 
privileges
    
    do_undefinstr currently does not expect undefined instructions in kernel
    code, since it always uses get_user() to read the instruction.
    
    Dereference the 'pc' pointer directly in the SVC case.
    
    Per Nicolas Pitre's note, kernel code is never in thumb mode.
    
    Signed-off-by: Dan Williams <[EMAIL PROTECTED]>
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 arch/arm/kernel/traps.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 329609b..2409560 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -282,7 +282,10 @@ asmlinkage void do_undefinstr(struct pt_regs *regs)
        regs->ARM_pc -= correction;
 
        pc = (void __user *)instruction_pointer(regs);
-       if (thumb_mode(regs)) {
+
+       if (processor_mode(regs) == SVC_MODE) {
+               instr = *(u32 *) pc;
+       } else if (thumb_mode(regs)) {
                get_user(instr, (u16 __user *)pc);
        } else {
                get_user(instr, (u32 __user *)pc);
-
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

Reply via email to