bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 06/14] adjust range when changing memory pageabilityg


From: Luca Dariz
Subject: Re: [PATCH 06/14] adjust range when changing memory pageabilityg
Date: Sat, 6 Jan 2024 19:31:25 +0100

Il 29/12/23 15:06, Samuel Thibault ha scritto:
Luca Dariz, le jeu. 28 déc. 2023 20:42:53 +0100, a ecrit:
* vm/vm_map.c: if the start address is not in the map, try to find the
   nearest entry instead of failing.

This caused the initial vm_wire_all(host, task VM_WIRE_ALL) in glibc
startup to fail with KERN_NO_SPACE.
---
  vm/vm_map.c | 21 ++++++++++++++++-----
  1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/vm/vm_map.c b/vm/vm_map.c
index 26e18676..4a5861e3 100644
--- a/vm/vm_map.c
+++ b/vm/vm_map.c
@@ -1774,13 +1774,24 @@ kern_return_t vm_map_pageable(
if (!vm_map_lookup_entry(map, start, &start_entry)) {
                /*
-                *      Start address is not in map; this is fatal.
+                *      Start address is not in map; try to find the nearest 
entry

It is wrong to drop the error like this. The caller did ask for these
addresses. If they are wrong, the caller should be told so, and not
papered over. Possibly it's vm_map_pageable_all or such that actually
needs to be fixed.

yes that seems a better place.


Luca




reply via email to

[Prev in Thread] Current Thread [Next in Thread]