Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] qemu: update to 8.1.5.
@ 2024-02-17  7:42 oreo639
  2024-02-18  1:59 ` [PR PATCH] [Updated] " oreo639
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: oreo639 @ 2024-02-17  7:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]

There is a new pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages qemu
https://github.com/void-linux/void-packages/pull/48789

qemu: update to 8.1.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48789.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qemu-48789.patch --]
[-- Type: text/x-diff, Size: 2559 bytes --]

From d878c229d7dfb8f03fffe3783bfac93344e9d7d6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Feb 2024 23:31:30 -0800
Subject: [PATCH 1/2] qemu: update to 8.1.5.

---
 srcpkgs/qemu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qemu/template b/srcpkgs/qemu/template
index 92df1dcb9de25..fe70489fbc352 100644
--- a/srcpkgs/qemu/template
+++ b/srcpkgs/qemu/template
@@ -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

From 00eb2c9c50da0eb09c1b3f95bd13087b8b3342aa Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Feb 2024 23:31:55 -0800
Subject: [PATCH 2/2] qemu-user-static: update to 8.1.5.

---
 srcpkgs/qemu-user-static/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qemu-user-static/template b/srcpkgs/qemu-user-static/template
index 0674a92878a80..edb2b1fe60baf 100644
--- a/srcpkgs/qemu-user-static/template
+++ b/srcpkgs/qemu-user-static/template
@@ -1,7 +1,7 @@
 # Template file for 'qemu-user-static'
 # This package should be updated together with qemu
 pkgname=qemu-user-static
-version=8.1.3
+version=8.1.5
 revision=1
 build_style=configure
 configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec
@@ -14,7 +14,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
 
 _fmts="aarch64 aarch64_be alpha arm armeb cris hppa i386 m68k microblaze
  microblazeel mips mipsel mips64 mips64el mipsn32 mipsn32el or1k

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] qemu: update to 8.1.5.
  2024-02-17  7:42 [PR PATCH] qemu: update to 8.1.5 oreo639
@ 2024-02-18  1:59 ` oreo639
  2024-02-18  2:06 ` oreo639
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: oreo639 @ 2024-02-18  1:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages qemu
https://github.com/void-linux/void-packages/pull/48789

qemu: update to 8.1.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48789.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qemu-48789.patch --]
[-- Type: text/x-diff, Size: 4614 bytes --]

From d878c229d7dfb8f03fffe3783bfac93344e9d7d6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Feb 2024 23:31:30 -0800
Subject: [PATCH 1/2] qemu: update to 8.1.5.

---
 srcpkgs/qemu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qemu/template b/srcpkgs/qemu/template
index 92df1dcb9de25..fe70489fbc352 100644
--- a/srcpkgs/qemu/template
+++ b/srcpkgs/qemu/template
@@ -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

From f52c8b50352da830a1db12b8480ff45e9739725f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Feb 2024 23:31:55 -0800
Subject: [PATCH 2/2] qemu-user-static: update to 8.1.5.

---
 srcpkgs/qemu-user-static/template             |  4 +-
 srcpkgs/qemu/patches/mmap-mremap-efault.patch | 42 +++++++++++++++++++
 2 files changed, 44 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/qemu/patches/mmap-mremap-efault.patch

diff --git a/srcpkgs/qemu-user-static/template b/srcpkgs/qemu-user-static/template
index 0674a92878a80..edb2b1fe60baf 100644
--- a/srcpkgs/qemu-user-static/template
+++ b/srcpkgs/qemu-user-static/template
@@ -1,7 +1,7 @@
 # Template file for 'qemu-user-static'
 # This package should be updated together with qemu
 pkgname=qemu-user-static
-version=8.1.3
+version=8.1.5
 revision=1
 build_style=configure
 configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec
@@ -14,7 +14,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
 
 _fmts="aarch64 aarch64_be alpha arm armeb cris hppa i386 m68k microblaze
  microblazeel mips mipsel mips64 mips64el mipsn32 mipsn32el or1k
diff --git a/srcpkgs/qemu/patches/mmap-mremap-efault.patch b/srcpkgs/qemu/patches/mmap-mremap-efault.patch
new file mode 100644
index 0000000000000..5a70e9658b300
--- /dev/null
+++ b/srcpkgs/qemu/patches/mmap-mremap-efault.patch
@@ -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;
+         }
+     }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] qemu: update to 8.1.5.
  2024-02-17  7:42 [PR PATCH] qemu: update to 8.1.5 oreo639
  2024-02-18  1:59 ` [PR PATCH] [Updated] " oreo639
@ 2024-02-18  2:06 ` oreo639
  2024-02-18 10:47 ` chrysos349
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: oreo639 @ 2024-02-18  2:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages qemu
https://github.com/void-linux/void-packages/pull/48789

qemu: update to 8.1.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48789.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qemu-48789.patch --]
[-- Type: text/x-diff, Size: 4839 bytes --]

From d878c229d7dfb8f03fffe3783bfac93344e9d7d6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Feb 2024 23:31:30 -0800
Subject: [PATCH 1/2] qemu: update to 8.1.5.

---
 srcpkgs/qemu/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qemu/template b/srcpkgs/qemu/template
index 92df1dcb9de25..fe70489fbc352 100644
--- a/srcpkgs/qemu/template
+++ b/srcpkgs/qemu/template
@@ -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

From 454a7e49afe711472a88b1bef9b487e886d49c98 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Feb 2024 23:31:55 -0800
Subject: [PATCH 2/2] qemu-user-static: update to 8.1.5.

Re-add patch removed in 147fb2841cdd6532a73009079f73cf0568ada885 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.
---
 srcpkgs/qemu-user-static/template             |  4 +-
 srcpkgs/qemu/patches/mmap-mremap-efault.patch | 42 +++++++++++++++++++
 2 files changed, 44 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/qemu/patches/mmap-mremap-efault.patch

diff --git a/srcpkgs/qemu-user-static/template b/srcpkgs/qemu-user-static/template
index 0674a92878a80..edb2b1fe60baf 100644
--- a/srcpkgs/qemu-user-static/template
+++ b/srcpkgs/qemu-user-static/template
@@ -1,7 +1,7 @@
 # Template file for 'qemu-user-static'
 # This package should be updated together with qemu
 pkgname=qemu-user-static
-version=8.1.3
+version=8.1.5
 revision=1
 build_style=configure
 configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec
@@ -14,7 +14,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
 
 _fmts="aarch64 aarch64_be alpha arm armeb cris hppa i386 m68k microblaze
  microblazeel mips mipsel mips64 mips64el mipsn32 mipsn32el or1k
diff --git a/srcpkgs/qemu/patches/mmap-mremap-efault.patch b/srcpkgs/qemu/patches/mmap-mremap-efault.patch
new file mode 100644
index 0000000000000..5a70e9658b300
--- /dev/null
+++ b/srcpkgs/qemu/patches/mmap-mremap-efault.patch
@@ -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;
+         }
+     }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: qemu: update to 8.1.5.
  2024-02-17  7:42 [PR PATCH] qemu: update to 8.1.5 oreo639
  2024-02-18  1:59 ` [PR PATCH] [Updated] " oreo639
  2024-02-18  2:06 ` oreo639
@ 2024-02-18 10:47 ` chrysos349
  2024-02-18 10:48 ` chrysos349
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: chrysos349 @ 2024-02-18 10:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

New comment by chrysos349 on void-packages repository

https://github.com/void-linux/void-packages/pull/48789#issuecomment-1951131585

Comment:
`qemu-8.1.5` not only fixed the issue with cross-building `webkit2gtk` for `armv6l-musl`, but also `devhelp` for the same arch.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: qemu: update to 8.1.5.
  2024-02-17  7:42 [PR PATCH] qemu: update to 8.1.5 oreo639
                   ` (2 preceding siblings ...)
  2024-02-18 10:47 ` chrysos349
@ 2024-02-18 10:48 ` chrysos349
  2024-02-18 21:36 ` [PR PATCH] [Updated] " oreo639
  2024-02-18 23:37 ` [PR PATCH] [Merged]: " oreo639
  5 siblings, 0 replies; 7+ messages in thread
From: chrysos349 @ 2024-02-18 10:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

New comment by chrysos349 on void-packages repository

https://github.com/void-linux/void-packages/pull/48789#issuecomment-1951131585

Comment:
~~`qemu-8.1.5`~~ the restored patch `mmap-mremap-efault.patch` not only fixed the issue with cross-building `webkit2gtk` for `armv6l-musl`, but also `devhelp` for the same arch.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] qemu: update to 8.1.5.
  2024-02-17  7:42 [PR PATCH] qemu: update to 8.1.5 oreo639
                   ` (3 preceding siblings ...)
  2024-02-18 10:48 ` chrysos349
@ 2024-02-18 21:36 ` oreo639
  2024-02-18 23:37 ` [PR PATCH] [Merged]: " oreo639
  5 siblings, 0 replies; 7+ messages in thread
From: oreo639 @ 2024-02-18 21:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages qemu
https://github.com/void-linux/void-packages/pull/48789

qemu: update to 8.1.5.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/48789.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-qemu-48789.patch --]
[-- Type: text/x-diff, Size: 4851 bytes --]

From d9fcad1430b3b85e1acfdd46ee44419b11f38e6d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Feb 2024 23:31:30 -0800
Subject: [PATCH 1/2] qemu: update to 8.1.5.

Re-add patch removed in 147fb2841cdd6532a73009079f73cf0568ada885 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.
---
 srcpkgs/qemu/patches/mmap-mremap-efault.patch | 42 +++++++++++++++++++
 srcpkgs/qemu/template                         |  4 +-
 2 files changed, 44 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/qemu/patches/mmap-mremap-efault.patch

diff --git a/srcpkgs/qemu/patches/mmap-mremap-efault.patch b/srcpkgs/qemu/patches/mmap-mremap-efault.patch
new file mode 100644
index 0000000000000..5a70e9658b300
--- /dev/null
+++ b/srcpkgs/qemu/patches/mmap-mremap-efault.patch
@@ -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;
+         }
+     }
diff --git a/srcpkgs/qemu/template b/srcpkgs/qemu/template
index 92df1dcb9de25..fe70489fbc352 100644
--- a/srcpkgs/qemu/template
+++ b/srcpkgs/qemu/template
@@ -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

From 9b556d898668a46e1a3cdaeeb070f5be0ff19413 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Fri, 16 Feb 2024 23:31:55 -0800
Subject: [PATCH 2/2] qemu-user-static: update to 8.1.5.

---
 srcpkgs/qemu-user-static/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/qemu-user-static/template b/srcpkgs/qemu-user-static/template
index 0674a92878a80..edb2b1fe60baf 100644
--- a/srcpkgs/qemu-user-static/template
+++ b/srcpkgs/qemu-user-static/template
@@ -1,7 +1,7 @@
 # Template file for 'qemu-user-static'
 # This package should be updated together with qemu
 pkgname=qemu-user-static
-version=8.1.3
+version=8.1.5
 revision=1
 build_style=configure
 configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec
@@ -14,7 +14,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
 
 _fmts="aarch64 aarch64_be alpha arm armeb cris hppa i386 m68k microblaze
  microblazeel mips mipsel mips64 mips64el mipsn32 mipsn32el or1k

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Merged]: qemu: update to 8.1.5.
  2024-02-17  7:42 [PR PATCH] qemu: update to 8.1.5 oreo639
                   ` (4 preceding siblings ...)
  2024-02-18 21:36 ` [PR PATCH] [Updated] " oreo639
@ 2024-02-18 23:37 ` oreo639
  5 siblings, 0 replies; 7+ messages in thread
From: oreo639 @ 2024-02-18 23:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

There's a merged pull request on the void-packages repository

qemu: update to 8.1.5.
https://github.com/void-linux/void-packages/pull/48789

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-18 23:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-17  7:42 [PR PATCH] qemu: update to 8.1.5 oreo639
2024-02-18  1:59 ` [PR PATCH] [Updated] " oreo639
2024-02-18  2:06 ` oreo639
2024-02-18 10:47 ` chrysos349
2024-02-18 10:48 ` chrysos349
2024-02-18 21:36 ` [PR PATCH] [Updated] " oreo639
2024-02-18 23:37 ` [PR PATCH] [Merged]: " oreo639

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).