bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH gnumach v2] Implement per task virtual memory limit


From: Sergey Bugaev
Subject: Re: [PATCH gnumach v2] Implement per task virtual memory limit
Date: Tue, 31 Dec 2024 07:41:14 +0300

On Tue, Dec 31, 2024 at 1:30 AM Diego Nieto Cid <dnietoc@gmail.com> wrote:
> On Mon, Dec 30, 2024 at 07:08:55PM +0100, Samuel Thibault wrote:
> > You also need to take into account the case where
> > current->max_protection was NONE and new_prot is not NONE, you then have
> > to decrease size_none.
> Ah right, the & in the expression tricked me into believing that 
> max_protection could
> not be raised.

Huh? That's my understanding as well. max_protection can never be
raised; if max_protection was VM_PROT_NONE and the one we're
attempting to set isn't, we'll fail with KERN_PROTECTION_FAILURE here,
no?

if ((new_prot & (VM_PROT_NOTIFY | current->max_protection))
   != new_prot) {
      vm_map_unlock(map);
      return(KERN_PROTECTION_FAILURE);
}

Sergey



reply via email to

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