summary refs log tree commit diff stats
path: root/results/classifier/deepseek-r1:14b/output/hypervisor/1729
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-07-03 19:39:53 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-07-03 19:39:53 +0200
commitdee4dcba78baf712cab403d47d9db319ab7f95d6 (patch)
tree418478faf06786701a56268672f73d6b0b4eb239 /results/classifier/deepseek-r1:14b/output/hypervisor/1729
parent4d9e26c0333abd39bdbd039dcdb30ed429c475ba (diff)
downloadqemu-analysis-dee4dcba78baf712cab403d47d9db319ab7f95d6.tar.gz
qemu-analysis-dee4dcba78baf712cab403d47d9db319ab7f95d6.zip
restructure results
Diffstat (limited to 'results/classifier/deepseek-r1:14b/output/hypervisor/1729')
-rw-r--r--results/classifier/deepseek-r1:14b/output/hypervisor/172948
1 files changed, 48 insertions, 0 deletions
diff --git a/results/classifier/deepseek-r1:14b/output/hypervisor/1729 b/results/classifier/deepseek-r1:14b/output/hypervisor/1729
new file mode 100644
index 000000000..ba83385e2
--- /dev/null
+++ b/results/classifier/deepseek-r1:14b/output/hypervisor/1729
@@ -0,0 +1,48 @@
+
+mremap fails with EFAULT if address range overlaps with stack guard
+Description of problem:
+When running 32-bit user-static on 64-bit host, `mremap` behave differently from the kernel. This difference let programs that call `pthread_getattr_np` on musl-libc to run into a loop on repeated calling `mremap`.
+
+https://git.musl-libc.org/cgit/musl/plain/src/thread/pthread_getattr_np.c
+
+``` c
+		while (mremap(p-l-PAGE_SIZE, PAGE_SIZE, 2*PAGE_SIZE, 0)==MAP_FAILED && errno==ENOMEM)
+			l += PAGE_SIZE;
+```
+Steps to reproduce:
+Compile the following program against musl-libc arm 32-bit, and run it in qemu-user-static on x86_64 host.
+
+``` c
+#define _GNU_SOURCE
+#include <pthread.h>
+
+int main(int argc, char *argv[]) {
+	pthread_attr_t attr;
+	return pthread_getattr_np(pthread_self(), &attr);
+}
+```
+
+For example, on x86_64 fedora 38 with podman and qemu-user-static installed, we can reproduce this with alpine container:
+
+```
+$ podman run --rm -it --arch arm/v7 docker.io/library/alpine:latest
+
+/ # apk add alpine-sdk
+
+......
+
+/ # cat test.c
+#define _GNU_SOURCE
+#include <pthread.h>
+
+int main(int argc, char *argv[]) {
+	pthread_attr_t attr;
+	return pthread_getattr_np(pthread_self(), &attr);
+}
+
+/ # gcc test.c
+
+/ # ./a.out
+```
+Additional information:
+Original thread on musl mail list where this was initially reported: https://www.openwall.com/lists/musl/2017/06/15/9