mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-16 06:07:00 +02:00
qemu: update to 8.1.5.
Re-add patch removed in 147fb2841c
to avoid
deadlock when when cross compiling to arm musl.
This was noticed in webkit2, with the WebKit2 gir executable causing
qemu-user-static to become stuck.
This commit is contained in:
parent
8c6f733145
commit
7800361752
2 changed files with 44 additions and 2 deletions
42
srcpkgs/qemu/patches/mmap-mremap-efault.patch
Normal file
42
srcpkgs/qemu/patches/mmap-mremap-efault.patch
Normal file
|
@ -0,0 +1,42 @@
|
|||
Source: @pullmoll
|
||||
Upstream: no
|
||||
Reason: errno=EFAULT when the address passed to mremap(2) is not valid
|
||||
|
||||
See Rich Felker's comment at https://www.openwall.com/lists/musl/2017/06/21/2 for
|
||||
why we need to return errno as described in man mremap(2) from qemu-user-static.
|
||||
Also speed up the loop when checking for increasing the mappings size to go
|
||||
in steps of TARGET_PAGE_SIZE and OR-in a check for the very last byte of the range.
|
||||
diff --git linux-user/mmap.c linux-user/mmap.c
|
||||
index 7e3b245..1e8d0f1 100644
|
||||
--- a/linux-user/mmap.c
|
||||
+++ b/linux-user/mmap.c
|
||||
@@ -738,7 +738,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
|
||||
!guest_range_valid_untagged(new_addr, new_size)) ||
|
||||
((flags & MREMAP_MAYMOVE) == 0 &&
|
||||
!guest_range_valid_untagged(old_addr, new_size))) {
|
||||
- errno = ENOMEM;
|
||||
+ errno = EFAULT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -775,9 +775,10 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
|
||||
abi_ulong addr;
|
||||
for (addr = old_addr + old_size;
|
||||
addr < old_addr + new_size;
|
||||
- addr++) {
|
||||
+ addr += TARGET_PAGE_SIZE) {
|
||||
prot |= page_get_flags(addr);
|
||||
}
|
||||
+ prot |= page_get_flags(old_addr + new_size - 1);
|
||||
}
|
||||
if (prot == 0) {
|
||||
host_addr = mremap(g2h_untagged(old_addr),
|
||||
@@ -796,7 +797,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
- errno = ENOMEM;
|
||||
+ errno = EFAULT;
|
||||
host_addr = MAP_FAILED;
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'qemu'
|
||||
# This package should be updated together with qemu-user-static
|
||||
pkgname=qemu
|
||||
version=8.1.3
|
||||
version=8.1.5
|
||||
revision=1
|
||||
build_style=configure
|
||||
configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec --localstatedir=/var
|
||||
|
@ -28,7 +28,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
|
|||
license="GPL-2.0-only, LGPL-2.1-only"
|
||||
homepage="https://www.qemu.org"
|
||||
distfiles="https://wiki.qemu.org/download/qemu-${version}.tar.bz2"
|
||||
checksum=0e448fb68f3a3bf43a3206e72a91e69136283b430b5996156dd7dfc64e55c998
|
||||
checksum=a12e9b5cdf41a3eeb534fa1467b81946fb57b5b27bcabc2ec0e450e7e0e785ba
|
||||
ignore_elf_dirs="/usr/share/qemu"
|
||||
nostrip_files="hppa-firmware.img openbios-ppc openbios-sparc32 openbios-sparc64
|
||||
palcode-clipper s390-ccw.img s390-netboot.img u-boot.e500 opensbi-riscv32-generic-fw_dynamic.elf
|
||||
|
|
Loading…
Add table
Reference in a new issue