summary refs log tree commit diff stats
path: root/results/classifier/semantic-bugs/1809546
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-07-06 16:43:19 +0000
committerChristian Krinitsin <mail@krinitsin.com>2025-07-06 16:43:19 +0000
commit238ec2b7cc1557d6f34c33cc482e4d0cd3e266dd (patch)
treecd8a1b75ba7b3543eb7fe6857f408e7be4d9fd0b /results/classifier/semantic-bugs/1809546
parent96049c939b1916d80532630d63c14e04d5244f1d (diff)
downloademulator-bug-study-238ec2b7cc1557d6f34c33cc482e4d0cd3e266dd.tar.gz
emulator-bug-study-238ec2b7cc1557d6f34c33cc482e4d0cd3e266dd.zip
add results
Diffstat (limited to 'results/classifier/semantic-bugs/1809546')
-rw-r--r--results/classifier/semantic-bugs/180954647
1 files changed, 1 insertions, 46 deletions
diff --git a/results/classifier/semantic-bugs/1809546 b/results/classifier/semantic-bugs/1809546
index dfeb2f57..f02d9255 100644
--- a/results/classifier/semantic-bugs/1809546
+++ b/results/classifier/semantic-bugs/1809546
@@ -1,15 +1,3 @@
-semantic: 0.913
-instruction: 0.876
-device: 0.860
-other: 0.855
-boot: 0.852
-assembly: 0.850
-graphic: 0.848
-network: 0.811
-mistranslation: 0.754
-vnc: 0.735
-socket: 0.612
-KVM: 0.608
 
 Writing a byte to a pl011 SFR overwrites the whole SFR
 
@@ -54,37 +42,4 @@ Compiling the original C code with optimizations makes the driver work. It compi
 
 Attached is the an assembly file, and linkscript, that shows the problem, and also includes the working code.
 
-I haven't debugged inside of QEMU itself but it seems to me that the problem is in pl011_write in pl011.c - the functions looks at which offset is being written, and then writes the entire SFR that offset falls under, which means that changing a single byte will change the whole SFR.
-
-
-
-Adding the link script.
-
-Yes, our PL011 implementation assumes that you only ever access the 32-bit registers with full width 32-bit word reads and writes. Don't try to do byte accesses to them. The PL011 data sheet doesn't specifically say that partial-width accesses to registers are permitted, so I think that trying to access offset 0x39 falls under the general note in section 3.1 that attempting to access reserved or unused address locations can result in unpredictable behaviour.
-
-You need to make sure you write your C code in a manner which enforces that accesses to device registers are done as single 32-bit accesses, and the compiler does not silently break them down into multiple reads and writes, or you will be in for a lot of pain trying to figure out what is going on if the compiler ever does it with registers that are write-to-clear or similar behaviour. Linux, for instance, does this by having readl() and writel() functions that end up doing inline asm of ldr/str instructions.
-
-
-Thanks for the response.
-
-I don't think section 3.1 applies to 8-bit accesses. That is specifically about reserved locations, and neither offset 0x38 nor 0x39 are reserved, so I think it's a matter of whether 32-bit access is required or not.
-
-From what I usually see in ARM documentation, 32-bit access is explicitly mentioned when required. For the PL011, it's mentioned for the UARTPeriphID_n registers, for instance. In many other cases access size depends on the implementation and the corresponding memory mapping of that implementation.
-
-I understand that *in practice* you should ensure single-access writes unless doing otherwise is explicitly allowed. However, in cases like the PL011 it seems ambiguous whether that is actually required, so it seems like the best choice would be to explicitly document it for the QEMU implementation. That would save some guesswork.
-
-The QEMU project is currently considering to move its bug tracking to
-another system. For this we need to know which bugs are still valid
-and which could be closed already. Thus we are setting older bugs to
-"Incomplete" now.
-
-If you still think this bug report here is valid, then please switch
-the state back to "New" within the next 60 days, otherwise this report
-will be marked as "Expired". Or please mark it as "Fix Released" if
-the problem has been solved with a newer version of QEMU already.
-
-Thank you and sorry for the inconvenience.
-
-
-[Expired for QEMU because there has been no activity for 60 days.]
-
+I haven't debugged inside of QEMU itself but it seems to me that the problem is in pl011_write in pl011.c - the functions looks at which offset is being written, and then writes the entire SFR that offset falls under, which means that changing a single byte will change the whole SFR.
\ No newline at end of file