bug-hurd
[Top][All Lists]
Advanced

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

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


From: Samuel Thibault
Subject: Re: [PATCH gnumach v4] Implement per task virtual memory limit
Date: Wed, 25 Jun 2025 01:46:58 +0200

Diego Nieto Cid, le mer. 25 juin 2025 00:44:04 +0100, a ecrit:
> On Wed, Jun 25, 2025 at 01:08:31AM +0200, Samuel Thibault wrote:
> > 
> > I meant a vm_protect that changes the maximum protection.
> > 
> 
> Ah, I think we concluded that the maximum protection can only go
> into strictier values due to the loop here[1].
> 
> More specifically the following if:
> 
>     if ((/* VM_PROT_ALL */ new_prot & (VM_PROT_NOTIFY | /* VM_PROT_NONE */ 
> current->max_protection))
>             != /* VM_PROT_ALL */ new_prot) {
>         vm_map_unlock(map);
>         return(KERN_PROTECTION_FAILURE);
>     }
> 
> Then: VM_PROT_ALL & VM_PROT_NONE == VM_PROT_NONE and VM_PROT_NONE != 
> VM_PROT_ALL
> and KERN_PROTECTION_FAILURE is returned.

Oh, right. That makes things simpler indeed :)

Samuel



reply via email to

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