qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] linux-user: Clarify error on failure to map guest address space
@ 2023-03-27 11:55 Andrew Jeffery
  2023-03-27 11:55 ` [PATCH 1/2] linux-user: elfload: s/min_mmap_addr/mmap_min_addr/ Andrew Jeffery
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrew Jeffery @ 2023-03-27 11:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, laurent

Hello,

This series is a couple of trivial improvements to the error message from linux-user's ELF loader
when it fails to mmap() the guest's address space. Both issues caused me brief confusion when trying
to sort myself out after hitting https://gitlab.com/qemu-project/qemu/-/issues/447

I've build tested the two as a sanity check.

Cheers,

Andrew

Andrew Jeffery (2):
  linux-user: elfload: s/min_mmap_addr/mmap_min_addr/
  linux-user: elfload: Specify -R is an option for qemu-user binaries

 linux-user/elfload.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.39.2



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

* [PATCH 1/2] linux-user: elfload: s/min_mmap_addr/mmap_min_addr/
  2023-03-27 11:55 [PATCH 0/2] linux-user: Clarify error on failure to map guest address space Andrew Jeffery
@ 2023-03-27 11:55 ` Andrew Jeffery
  2023-03-27 11:55 ` [PATCH 2/2] linux-user: elfload: Specify -R is an option for qemu-user binaries Andrew Jeffery
  2023-06-09 20:43 ` [PATCH 0/2] linux-user: Clarify error on failure to map guest address space Michael Tokarev
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Jeffery @ 2023-03-27 11:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, laurent

As-is the error message can cause some confusion as the mentioned sysctl
attribute name is wrong:

https://www.kernel.org/doc/html/latest/admin-guide/sysctl/vm.html#mmap-min-addr

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 linux-user/elfload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 1dbc1f0f9baa..601b156b476b 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -2771,7 +2771,7 @@ static void pgb_reserved_va(const char *image_name, abi_ulong guest_loaddr,
     if (addr == MAP_FAILED || addr != test) {
         error_report("Unable to reserve 0x%lx bytes of virtual address "
                      "space at %p (%s) for use as guest address space (check your "
-                     "virtual memory ulimit setting, min_mmap_addr or reserve less "
+                     "virtual memory ulimit setting, mmap_min_addr or reserve less "
                      "using -R option)", reserved_va, test, strerror(errno));
         exit(EXIT_FAILURE);
     }
-- 
2.39.2



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

* [PATCH 2/2] linux-user: elfload: Specify -R is an option for qemu-user binaries
  2023-03-27 11:55 [PATCH 0/2] linux-user: Clarify error on failure to map guest address space Andrew Jeffery
  2023-03-27 11:55 ` [PATCH 1/2] linux-user: elfload: s/min_mmap_addr/mmap_min_addr/ Andrew Jeffery
@ 2023-03-27 11:55 ` Andrew Jeffery
  2023-06-09 20:43 ` [PATCH 0/2] linux-user: Clarify error on failure to map guest address space Michael Tokarev
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Jeffery @ 2023-03-27 11:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, laurent

Given several different concepts are suggested for investigation, let's
not confuse e.g. ulimit's -R with what was actually intended.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 linux-user/elfload.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 601b156b476b..694794f97202 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -2772,7 +2772,8 @@ static void pgb_reserved_va(const char *image_name, abi_ulong guest_loaddr,
         error_report("Unable to reserve 0x%lx bytes of virtual address "
                      "space at %p (%s) for use as guest address space (check your "
                      "virtual memory ulimit setting, mmap_min_addr or reserve less "
-                     "using -R option)", reserved_va, test, strerror(errno));
+                     "using qemu-user's -R option)",
+                     reserved_va, test, strerror(errno));
         exit(EXIT_FAILURE);
     }
 
-- 
2.39.2



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

* Re: [PATCH 0/2] linux-user: Clarify error on failure to map guest address space
  2023-03-27 11:55 [PATCH 0/2] linux-user: Clarify error on failure to map guest address space Andrew Jeffery
  2023-03-27 11:55 ` [PATCH 1/2] linux-user: elfload: s/min_mmap_addr/mmap_min_addr/ Andrew Jeffery
  2023-03-27 11:55 ` [PATCH 2/2] linux-user: elfload: Specify -R is an option for qemu-user binaries Andrew Jeffery
@ 2023-06-09 20:43 ` Michael Tokarev
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2023-06-09 20:43 UTC (permalink / raw)
  To: Andrew Jeffery, qemu-devel; +Cc: qemu-trivial, laurent

27.03.2023 14:55, Andrew Jeffery wrote:
> Hello,
> 
> This series is a couple of trivial improvements to the error message from linux-user's ELF loader
> when it fails to mmap() the guest's address space. Both issues caused me brief confusion when trying
> to sort myself out after hitting https://gitlab.com/qemu-project/qemu/-/issues/447
> 
> I've build tested the two as a sanity check.

Ping?  That seems like some nice rewording, but not my area..

Thanks!

/mjt


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

end of thread, other threads:[~2023-06-09 20:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 11:55 [PATCH 0/2] linux-user: Clarify error on failure to map guest address space Andrew Jeffery
2023-03-27 11:55 ` [PATCH 1/2] linux-user: elfload: s/min_mmap_addr/mmap_min_addr/ Andrew Jeffery
2023-03-27 11:55 ` [PATCH 2/2] linux-user: elfload: Specify -R is an option for qemu-user binaries Andrew Jeffery
2023-06-09 20:43 ` [PATCH 0/2] linux-user: Clarify error on failure to map guest address space Michael Tokarev

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).