CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
79 lines
2.1 KiB
ArmAsm
79 lines
2.1 KiB
ArmAsm
# This test checks that PointerAuthCFIAnalyzer pass ignores functions with
|
|
# malformed .cfi_negate_ra_state sequences in the input binary.
|
|
|
|
# The cases checked are:
|
|
# - extra .cfi_negate_ra_state in Signed state: checked in foo,
|
|
# - extra .cfi_negate_ra_state in Unsigned state: checked in bar,
|
|
# - missing .cfi_negate_ra_state from PSign or PAuth instructions: checked in baz.
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o
|
|
# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
|
|
# RUN: llvm-bolt %t.exe -o %t.exe.bolt -v=1 --no-threads | FileCheck %s --check-prefix=CHECK-BOLT
|
|
|
|
# CHECK-BOLT: BOLT-INFO: inconsistent RAStates in function foo: ptr authenticating inst encountered in Unsigned RA state
|
|
# CHECK-BOLT: BOLT-INFO: inconsistent RAStates in function bar: ptr signing inst encountered in Signed RA state
|
|
# CHECK-BOLT: BOLT-INFO: inconsistent RAStates in function baz: ptr sign/auth inst without .cfi_negate_ra_state
|
|
|
|
# Check that the incorrect functions got ignored, so they are not in the new .text section
|
|
# RUN: llvm-objdump %t.exe.bolt -d -j .text | FileCheck %s --check-prefix=CHECK-OBJDUMP
|
|
# CHECK-OBJDUMP-NOT: <foo>:
|
|
# CHECK-OBJDUMP-NOT: <bar>:
|
|
# CHECK-OBJDUMP-NOT: <baz>:
|
|
|
|
|
|
.text
|
|
.globl foo
|
|
.p2align 2
|
|
.type foo,@function
|
|
foo:
|
|
.cfi_startproc
|
|
hint #25
|
|
.cfi_negate_ra_state
|
|
mov x1, #0
|
|
.cfi_negate_ra_state // Incorrect CFI in signed state
|
|
hint #29
|
|
.cfi_negate_ra_state
|
|
ret
|
|
.cfi_endproc
|
|
.size foo, .-foo
|
|
|
|
.text
|
|
.globl bar
|
|
.p2align 2
|
|
.type bar,@function
|
|
bar:
|
|
.cfi_startproc
|
|
mov x1, #0
|
|
.cfi_negate_ra_state // Incorrect CFI in unsigned state
|
|
hint #25
|
|
.cfi_negate_ra_state
|
|
mov x1, #0
|
|
hint #29
|
|
.cfi_negate_ra_state
|
|
ret
|
|
.cfi_endproc
|
|
.size bar, .-bar
|
|
|
|
.text
|
|
.globl baz
|
|
.p2align 2
|
|
.type baz,@function
|
|
baz:
|
|
.cfi_startproc
|
|
mov x1, #0
|
|
hint #25
|
|
.cfi_negate_ra_state
|
|
mov x1, #0
|
|
hint #29
|
|
// Missing .cfi_negate_ra_state
|
|
ret
|
|
.cfi_endproc
|
|
.size baz, .-baz
|
|
|
|
.global _start
|
|
.type _start, %function
|
|
_start:
|
|
b foo
|
|
b bar
|
|
b baz
|