diff options
Diffstat (limited to 'results/classifier/118/permissions/1421')
| -rw-r--r-- | results/classifier/118/permissions/1421 | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/results/classifier/118/permissions/1421 b/results/classifier/118/permissions/1421 new file mode 100644 index 000000000..9b7f2d6e9 --- /dev/null +++ b/results/classifier/118/permissions/1421 @@ -0,0 +1,49 @@ +permissions: 0.976 +graphic: 0.843 +device: 0.804 +debug: 0.803 +arm: 0.769 +kernel: 0.744 +architecture: 0.742 +performance: 0.739 +ppc: 0.661 +semantic: 0.534 +peripherals: 0.474 +vnc: 0.443 +PID: 0.401 +socket: 0.372 +boot: 0.317 +risc-v: 0.311 +network: 0.296 +user-level: 0.271 +VMM: 0.263 +register: 0.256 +virtual: 0.245 +x86: 0.244 +assembly: 0.221 +mistranslation: 0.200 +hypervisor: 0.182 +files: 0.161 +TCG: 0.147 +KVM: 0.028 +i386: 0.016 + +GDB memory reads fail on Cortex-M33 +Description of problem: +GDB fails to read memory from the guest. There appear to be at least two problems: + +1. In `arm_cpu_get_phys_page_attrs_debug`, `arm_is_secure(env)` returns false, because the implementation doesn't seem to know about Armv7-M or Armv8-M secure states. However, `arm_mmu_idx(env)` does know how to check `env->v7m.secure`, so it returns `ARMMMUIdx_MSPriv` (the S stands for secure). The mismatch between an apparently non-secure access to a secure MMU seems to cause the read to fail laster. +2. With the MPU enabled (not the case in this repro, but I can provide one), `cpu_memory_rw_debug` computes `page = addr & TARGET_PAGE_MASK`, and uses the page to compute permissions. However, TARGET_PAGE_MASK is based on 4K pages on this platform, but the MPU granularity is 32 bytes. So the wrong page is used for checking. +Steps to reproduce: +``` +# Sorry for the large clone. It's mostly unused files in CMSIS. +git clone --recursive -b qemu-repro-1 https://github.com/dreiss/mpu_experiments +cd mpu_experiments +git checkout origin/qemu-repro-1 +cmake -S . -B build -DBOARD=qemu-mps2-an505 -DAPP=mpu_stacktrace -DCMAKE_BUILD_TYPE=Debug +cmake --build build +/path/to/qemu-system-arm -machine mps2-an505 -nographic -kernel build/kernel.elf -s -S -d int +# Open a separate terminal and cd into mpu_experiments +gdb build/kernel.elf -ex 'target remote :1234' -ex 'break base_case' -ex continue -ex backtrace -ex quit +# Note the memory read failures in the backtrace. +``` |