summary refs log tree commit diff stats
path: root/results/classifier/semantic-bugs/instruction/1771948
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-06-12 09:56:59 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-06-12 09:56:59 +0200
commitb89a938452613061c0f1f23e710281cf5c83cb29 (patch)
treed5faecfd167e088848cad894f8dc9cfef3352e3b /results/classifier/semantic-bugs/instruction/1771948
parent7b681b9f9eedaad2f081ae11a32f459f5a1312ff (diff)
downloadqemu-analysis-b89a938452613061c0f1f23e710281cf5c83cb29.tar.gz
qemu-analysis-b89a938452613061c0f1f23e710281cf5c83cb29.zip
add manually reviewed semantic bugs
Diffstat (limited to 'results/classifier/semantic-bugs/instruction/1771948')
-rw-r--r--results/classifier/semantic-bugs/instruction/177194851
1 files changed, 51 insertions, 0 deletions
diff --git a/results/classifier/semantic-bugs/instruction/1771948 b/results/classifier/semantic-bugs/instruction/1771948
new file mode 100644
index 000000000..636db688b
--- /dev/null
+++ b/results/classifier/semantic-bugs/instruction/1771948
@@ -0,0 +1,51 @@
+instruction: 0.898
+other: 0.852
+graphic: 0.837
+semantic: 0.818
+device: 0.763
+network: 0.610
+vnc: 0.606
+socket: 0.601
+mistranslation: 0.540
+assembly: 0.504
+boot: 0.482
+KVM: 0.408
+
+aarch64 msr CNTFRQ_EL0
+
+Hello,
+
+I'm running qemu 2.12 on a raspberry pi 3 with the command:
+
+qemu-system-aarch64 -M raspi3 -serial stdio -kernel executable.bin
+
+On my start file (right in the beginning with the highest EL), the following instructions:
+
+ldr x0 , =19200000
+msr CNTFRQ_EL0, x0
+
+
+and qemu halts on the "msr CNTFRQ_EL0, x0" instruction.
+
+I believe this is not a normal behavior.
+
+Thank you
+
+Mmm, that's not really supposed to happen. Do you have a test guest binary you can attach that I can reproduce with?
+
+
+Looking more closely at this, I think this is because you've passed QEMU a file which it is treating as a Linux kernel. (-kernel treats raw binaries and uimage files as Linux kernels; it treats ELF files as not being Linux kernels). Linux expects to be started in EL2, so although the emulated CPU has EL3, we start your program in EL2. Your program is therefore not running at the highest available exception level, and can't write to CNTFRQ_EL0.
+
+For "bare metal" images where you want to do things at EL3, it may be better to build them as ELF files which are linked to load at address 0. Note that all four cores will start at address zero simultaneously, so you'll need a bit of "pen code" to sort the secondaries out from the primary. https://github.com/raspberrypi/tools/blob/master/armstubs/armstub8.S might be useful reference. As I understand it, this is how your code would be run on real raspi3 hardware too.
+
+
+Thank you for your reply. Sorry to take so long (was on vacations).
+
+Your comment seems correct to me. I tried with the ELF file instead of the binary file and it worked perfectly (and all the cores were running instead of just core 0).
+
+From my point of view, this bug can be marked as invalid.
+
+Thank you again.
+
+
+