Sebastien Marie wrote:
> Assuming the check on protection is a bit too restrictive, and it is
> fine to have some chunks with PROT_NONE, I think we want something like:

are readonly stacks meaningful? if so, we should fix that too now instead of
waiting. 

> 
> Index: uvm/uvm_map.c
> ===================================================================
> RCS file: /cvs/src/sys/uvm/uvm_map.c,v
> retrieving revision 1.234
> diff -u -p -r1.234 uvm_map.c
> --- uvm/uvm_map.c     12 Apr 2018 17:13:44 -0000      1.234
> +++ uvm/uvm_map.c     16 Apr 2018 15:20:30 -0000
> @@ -1849,7 +1849,11 @@ uvm_map_is_stack_remappable(struct vm_ma
>  #if 0
>               printf("iter prot: 0x%x\n", iter->protection);
>  #endif
> -             if (iter->protection != (PROT_READ | PROT_WRITE)) {
> +             switch (iter->protection) {
> +             case PROT_READ|PROT_WRITE:
> +             case PROT_NONE:
> +                     break;
> +             default:
>                       printf("map stack 0x%lx-0x%lx of map %p failed: "
>                           "bad protection\n", addr, end, map);
>                       return FALSE;
> 
> 
> I will send a diff for emulators/qemu to add MAP_STACK after this part
> is resolved.
> 
> Thanks.
> -- 
> Sebastien Marie
> 

Reply via email to