]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
security: tlk_driver: fix register offset
authorAllen Yu <alleny@nvidia.com>
Wed, 8 Jul 2015 12:30:44 +0000 (20:30 +0800)
committerVarun Wadekar <vwadekar@nvidia.com>
Thu, 9 Jul 2015 03:38:07 +0000 (20:38 -0700)
Struct pt_regs starts with X0 from offset 0. This patch corrects the
offsets for general-purpose registers while saving them in fiq glue.

Bug 200121109

Change-Id: I83d2e41ed14438cca0a6344632de4cf5aff5932d
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/767553
Reviewed-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Ian Chang <ianc@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Reviewed-by: Chris Johnson <cwj@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
security/tlk_driver/ote_asm.S

index fd63d0732c55286742cf98a82bd45b6f99e69f6e..8a3bfd0e311f88722e69c14c37b0678448355ddf 100644 (file)
@@ -25,22 +25,22 @@ ENTRY(_tlk_generic_smc)
 ENDPROC(_tlk_generic_smc)
 
 ENTRY(tlk_fiq_glue_aarch64)
-       sub     sp, sp, #S_FRAME_SIZE - S_LR
-       stp     x0, x1, [sp, #-16]!
-       stp     x2, x3, [sp, #-16]!
-       stp     x4, x5, [sp, #-16]!
-       stp     x6, x7, [sp, #-16]!
-       stp     x8, x9, [sp, #-16]!
-       stp     x10, x11, [sp, #-16]!
-       stp     x12, x13, [sp, #-16]!
-       stp     x14, x15, [sp, #-16]!
-       stp     x16, x17, [sp, #-16]!
-       stp     x18, x19, [sp, #-16]!
-       stp     x20, x21, [sp, #-16]!
-       stp     x22, x23, [sp, #-16]!
-       stp     x24, x25, [sp, #-16]!
-       stp     x26, x27, [sp, #-16]!
-       stp     x28, x29, [sp, #-16]!
+       sub     sp, sp, #S_FRAME_SIZE
+       stp     x0, x1, [sp, #16 * 0]
+       stp     x2, x3, [sp, #16 * 1]
+       stp     x4, x5, [sp, #16 * 2]
+       stp     x6, x7, [sp, #16 * 3]
+       stp     x8, x9, [sp, #16 * 4]
+       stp     x10, x11, [sp, #16 * 5]
+       stp     x12, x13, [sp, #16 * 6]
+       stp     x14, x15, [sp, #16 * 7]
+       stp     x16, x17, [sp, #16 * 8]
+       stp     x18, x19, [sp, #16 * 9]
+       stp     x20, x21, [sp, #16 * 10]
+       stp     x22, x23, [sp, #16 * 11]
+       stp     x24, x25, [sp, #16 * 12]
+       stp     x26, x27, [sp, #16 * 13]
+       stp     x28, x29, [sp, #16 * 14]
        ldr     x0, =0x82000006         /* get FIQ regs */
        smc     #0
        stp     x0, x1, [sp, #S_PC]     /* original pc, cpsr */