Changeset 281720 in webkit


Ignore:
Timestamp:
Aug 27, 2021 2:16:21 PM (3 years ago)
Author:
mark.lam@apple.com
Message:

Changed ARM64 probe trampoline to do ptr auth the standard way.
https://bugs.webkit.org/show_bug.cgi?id=229629
rdar://problem/82453220

Reviewed by Saam Barati.

Also fix a comment, and add back 2 lines that I accidentally deleted in r281718.

  • assembler/MacroAssemblerARM64.cpp:
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r281718 r281720  
     12021-08-27  Mark Lam  <mark.lam@apple.com>
     2
     3        Changed ARM64 probe trampoline to do ptr auth the standard way.
     4        https://bugs.webkit.org/show_bug.cgi?id=229629
     5        rdar://problem/82453220
     6
     7        Reviewed by Saam Barati.
     8
     9        Also fix a comment, and add back 2 lines that I accidentally deleted in r281718.
     10
     11        * assembler/MacroAssemblerARM64.cpp:
     12
    1132021-08-27  Mark Lam  <mark.lam@apple.com>
    214
  • trunk/Source/JavaScriptCore/assembler/MacroAssemblerARM64.cpp

    r281718 r281720  
    501501    // either modify lr or pc, but not both in the same probe invocation. The probe
    502502    // mechanism ensures that we never try to modify both lr and pc with a RELEASE_ASSERT
    503     // in Probe::().
     503    // in Probe::executeJSCJITProbe().
    504504
    505505    // Determine if the probe handler changed the pc.
     
    522522    "movz      x28, #" STRINGIZE_VALUE_OF(JIT_PROBE_PC_PTR_TAG) "\n"
    523523    "autib     x27, x28" "\n"
    524     "lsr       x28, x27, #8" "\n"
    525     "and       x28, x28, #0xff000000000000" "\n"
    526     "orr       x28, x28, x27" "\n"
    527     "ldrb      w28, [x28]" "\n"
     524    "mov       x28, x27" "\n"
     525    "xpaci     x28" "\n"
     526    "cmp       x28, x27" "\n"
     527    "beq     " LOCAL_LABEL_STRING(ctiMasmProbeTrampolinePCAuthDone) "\n"
     528    "brk       #0xc471" "\n"
     529    LOCAL_LABEL_STRING(ctiMasmProbeTrampolinePCAuthDone) ":" "\n"
    528530#endif
    529531    "sub       x27, x27, #" STRINGIZE_VALUE_OF(2 * GPREG_SIZE) "\n" // The return point PC is at 2 instructions before the end of the probe.
     
    547549    "movz      x27, #" STRINGIZE_VALUE_OF(JIT_PROBE_PC_PTR_TAG) "\n"
    548550    "autib     x28, x27" "\n"
    549     "lsr       x27, x28, #8" "\n"
    550     "and       x27, x27, #0xff000000000000" "\n"
    551     "orr       x27, x27, x28" "\n"
    552     "ldrb      w27, [x27]" "\n"
     551    "mov       x27, x28" "\n"
     552    "xpaci     x27" "\n"
     553    "cmp       x27, x28" "\n"
     554    "beq     " LOCAL_LABEL_STRING(ctiMasmProbeTrampolinePCAuthDone2) "\n"
     555    "brk       #0xc471" "\n"
     556    LOCAL_LABEL_STRING(ctiMasmProbeTrampolinePCAuthDone2) ":" "\n"
     557    "add       x27, x30, #48" "\n" // Compute sp at return point.
     558    "pacib     x28, x27" "\n"
    553559#endif
    554560    "ldr       x27, [sp, #" STRINGIZE_VALUE_OF(PROBE_CPU_FP_OFFSET) "]" "\n"
Note: See TracChangeset for help on using the changeset viewer.