The Hexagon compiler/assembler (clang 21.1.8) generates packets containing
both a memd register-pair load and a dealloc_return instruction. When
executed under QEMU system emulation, this packet corrupts callee-saved
registers: the upper byte of a restored kernel pointer is zeroed (e.g.,
0xc0ca5960 becomes 0x00ca5960), leading to a page fault and kernel panic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. | |
| # SPDX-License-Identifier: BSD-3-Clause | |
| # Take a baremetal or QuRT toolchain from e.g. https://github.com/snapdragon-toolchain/hexagon-sdk/releases | |
| # and combine it with a linux toolchain from https://github.com/qualcomm/toolchain_for_hexagon/releases | |
| set -euo pipefail |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cd $(mktemp -d) | |
| wget https://artifacts.codelinaro.org/artifactory/codelinaro-toolchain-for-hexagon/23.1.0-rc1/rootfs.ext2.gz | |
| gunzip rootfs.ext2.gz | |
| # qemu-img create -f qcow2 my_disk.qcow2 10G | |
| # dd if=rootfs.ext2 of=my_disk.qcow2 bs=1M conv=notrunc | |
| # sudo modprobe nbd max_part=16 | |
| # sudo qemu-nbd --connect=/dev/nbd0 my_disk.qcow2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. | |
| # SPDX-License-Identifier: BSD-3-Clause-Clear | |
| # | |
| # Build and run a C++ exception handling test for Hexagon Linux using | |
| # clang+llvm-22.1.4-cross-hexagon-unknown-linux-musl and qemu-hexagon. | |
| set -euo pipefail | |
| TOOLCHAIN=/local/mnt/workspace/install/clang+llvm-22.1.4-cross-hexagon-unknown-linux-musl/x86_64-linux-gnu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| f0VMRgEBAQAAAAAAAAAAAAIApAABAAAA4AcCADQAAACoFQAAaQAAADQAIAAJACgAFAASAAYAAAA0 | |
| AAAANAABADQAAQAgAQAAIAEAAAQAAAAEAAAAAwAAAFQBAABUAQEAVAEBABoAAAAaAAAABAAAAAEA | |
| AAABAAAAAAAAAAAAAQAAAAEA4AcAAOAHAAAEAAAAAAABAAEAAADgBwAA4AcCAOAHAgCwCQAAsAkA | |
| AAUAAAAAAAEAAQAAAJARAACQEQMAkBEDAIwAAABwDgAABgAAAAAAAQABAAAAHBIAABwSBAAcEgQA | |
| IAAAACAAAAAGAAAAAAABAAIAAACQEQAAkBEDAJARAwCAAAAAgAAAAAYAAAAEAAAAUuV0ZJARAACQ | |
| EQMAkBEDAIwAAABwDgAABAAAAAEAAABR5XRkAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAC9s | |
| aWIvbGQtbXVzbC1oZXhhZ29uLnNvLjEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAIgAA | |
| AAcAAAAAAAAAAAAAACIAAAANAAAAAAAAAAAAAAASAAAAHwAAAAAAAAAAAAAAEgAAACcAAAAAAAAA | |
| AAAAABIAAAAuAAAAAAAAAAAAAAASAAAAAQAAAAcAAAABAAAAGgAAAAAAAAAAAAAABwAAAAcAAAAA | |
| AAAABQAAAAAAAAAGAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAEAAAADAAAAAAAAAABf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -euo pipefail | |
| echo creating init file | |
| echo <<EOF > input.S | |
| .section .text | |
| EOF | |
| echo '' > keep_syms.txt | |
| for i in $(seq 0 100000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:16.04 | |
| VOLUME ['/tmp/'] | |
| RUN apt-get update && apt-get install -y --force-yes build-essential subversion chrpath wget file python python-virtualenv cmake ninja-build tar tcl && \ | |
| cd /tmp && \ | |
| wget --quiet https://raw.githubusercontent.com/llvm/llvm-project/master/llvm/utils/release/test-release.sh && \ | |
| wget --quiet https://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz && \ | |
| tar xf clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz && \ | |
| chmod +x test-release.sh && \ | |
| /usr/bin/env CXX=/tmp/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang++ \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| + mkdir obj_target_v60_83latest_test-suite | |
| + cd obj_target_v60_83latest_test-suite | |
| + cmake -GNinja -DCMAKE_C_COMPILER=hexagon-linux-clang -DCMAKE_CXX_COMPILER=hexagon-linux-clang++ -C/local/mnt/workspace/testing/test-suite/cmake/caches/O0.cmake -DTEST_SUITE_EXTRA_C_FLAGS=-mv60 -DTEST_SUITE_EXTRA_CXX_FLAGS=-mv60 -DTEST_SUITE_EXTRA_EXE_LINKER_FLAGS=-mv60 -DARCH:STRING=Hexagon -DTEST_SUITE_CXX_ABI_LIBNAME:STRING=libc++abi -DBENCHMARK_USE_LIBCXX:BOOL=ON -DTEST_SUITE_REMOTE_CLIENT:STRING=ssh -DTEST_SUITE_REMOTE_HOST:STRING=aus-dragon820-05 -DTEST_SUITE_LIT_FLAGS:STRING=-vj4 -DFP_TOLERANCE:STRING=1.5 -DFP_ABSTOLERANCE:STRING=1.5 /local/mnt/workspace/testing/test-suite | |
| loading initial cache file /local/mnt/workspace/testing/test-suite/cmake/caches/O0.cmake | |
| -- The C compiler identification is Clang 7.0.0 | |
| -- The CXX compiler identification is Clang 7.0.0 | |
| -- Check for working C compiler using: Ninja | |
| -- Check for working C compiler using: Ninja -- works | |
| -- Detecting C compiler ABI info | |
| -- Detecting C compiler ABI info - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -x | |
| set -euo pipefail | |
| test_suite=$(readlink -f ${1-../test-suite/}) | |
| PATH=/prj/dsp/qdsp6/release/internal/HEXAGON/branch-8.4lnx/latest/Tools/bin:$PATH | |
| qemu=~bcain/src/hexagon-clang/qemu.sh | |
| Q6_ARCH=v65 | |
| opt=O0 | |
| flavor=qemu_${Q6_ARCH}_84latest_${opt} |
NewerOlder