summary refs log tree commit diff stats
path: root/results/classifier/user-mode-bugs/2304
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-07-05 20:00:38 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-07-05 20:00:38 +0200
commit96049c939b1916d80532630d63c14e04d5244f1d (patch)
tree7fb9df428f074078e714f1e038210cdff887185a /results/classifier/user-mode-bugs/2304
parent40bbb77d4dfebff4f99c2f90b2c0db737b0ecc5a (diff)
downloadqemu-analysis-96049c939b1916d80532630d63c14e04d5244f1d.tar.gz
qemu-analysis-96049c939b1916d80532630d63c14e04d5244f1d.zip
lock user-mode and semantic-bugs
Diffstat (limited to 'results/classifier/user-mode-bugs/2304')
-rw-r--r--results/classifier/user-mode-bugs/230440
1 files changed, 40 insertions, 0 deletions
diff --git a/results/classifier/user-mode-bugs/2304 b/results/classifier/user-mode-bugs/2304
new file mode 100644
index 000000000..1836734eb
--- /dev/null
+++ b/results/classifier/user-mode-bugs/2304
@@ -0,0 +1,40 @@
+
+
+Disabling SVE via `-cpu max,sve=off` leaves SVE2 advertised by `getauxval`
+Description of problem:
+The documentation on https://qemu-project.gitlab.io/qemu/system/arm/cpu-features.html suggests that it should be possible to disable SVE support by passing `-cpu max,sve=off` on the command line, however this appears to only disable the SVE support advertised in the return value from `getauxval(AT_HWCAP)`. In particular it leaves SVE2 reported as enabled. This leaves the feature set advertised by `getauxval` in an inconsistent state since SVE is mandatory if SVE2 is available.
+
+This may also affect other feature dependencies for example FEAT_SVE_BITPerm also requiring SVE2 to be available, I've not checked exhaustively.
+
+For example, given the following code:
+
+    #include <sys/auxv.h>
+    #include <stdio.h>
+
+    int main() {
+      unsigned long hwcap = getauxval(AT_HWCAP);
+      unsigned long hwcap2 = getauxval(AT_HWCAP2);
+
+      if (hwcap & HWCAP_SVE) {
+        printf("have sve!\n");
+      } else {
+        printf("don't have sve!\n");
+      }
+      if (hwcap2 & HWCAP2_SVE2) {
+        printf("have sve2!\n");
+      } else {
+        printf("don't have sve2!\n");
+      }
+    }
+
+We can observe the following:
+
+    $ aarch64-linux-gnu-gcc test.c -static
+    $ ../qemu-aarch64 -cpu max ./a.out
+    have sve!
+    have sve2!
+    $ ../qemu-aarch64 -cpu max,sve=off ./a.out
+    don't have sve!
+    have sve2!
+
+I don't believe that there is a `-cpu ...,sve2=off` option, so I would expect that disabling SVE also prevents SVE2 from being advertised as available.