Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
qemu-usermode: linux-user: fix guest address space assert
[qemu-usermode] linux-user: fix guest address space assert. JB#51953
  • Loading branch information
jusa authored and krnlyng committed Dec 8, 2020
1 parent 15179d5 commit e21ea32
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
File renamed without changes.
26 changes: 26 additions & 0 deletions rpm/0101-linux-user-fix-guest-address-space-assert.patch
@@ -0,0 +1,26 @@
From cbdc0543f22d8e9ef60b073ce61199452167c04e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juho=20H=C3=A4m=C3=A4l=C3=A4inen?=
<juho.hamalainen@jolla.com>
Date: Tue, 8 Dec 2020 15:47:10 +0000
Subject: [PATCH 1/1] linux-user: fix guest address space assert

---
accel/tcg/translate-all.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 2d83013633..4cea23784a 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -2551,7 +2551,7 @@ void page_set_flags(target_ulong start, target_ulong end, int flags)
/* This function should never be called with addresses outside the
guest address space. If this assert fires, it probably indicates
a missing call to h2g_valid. */
- assert(end - 1 <= GUEST_ADDR_MAX);
+ assert(guest_addr_valid(end - 1));
assert(start < end);
assert_memory_lock();

--
2.26.2

5 changes: 3 additions & 2 deletions rpm/qemu-usermode.spec
Expand Up @@ -31,8 +31,9 @@ Patch13: 0017-Revert-linux-user-Use-safe_syscall-wrapper-for-fcntl.patch
# fix f_flags in statfs64
Patch14: 0018-linux-user-Support-f_flags-in-statfs64-when-availabl.patch

Patch19: 0001-linux-user-Force-avx1-and-avx2-off-since-they-cause-.patch
Patch20: 0001-linux-user-disable-commpage.patch
Patch19: 0099-linux-user-Force-avx1-and-avx2-off-since-they-cause-.patch
Patch20: 0100-linux-user-disable-commpage.patch
Patch21: 0101-linux-user-fix-guest-address-space-assert.patch

BuildRequires: pkgconfig(ext2fs)
BuildRequires: pkgconfig(glib-2.0)
Expand Down

0 comments on commit e21ea32

Please sign in to comment.