Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Dec 2018 11:32:06 -0800
From:      John Baldwin <jhb@FreeBSD.org>
To:        Andrew Turner <andrew@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r342552 - head/sys/arm64/arm64
Message-ID:  <5b47ea61-32d5-2e47-a713-9076eed17f8f@FreeBSD.org>
In-Reply-To: <201812271414.wBREEfCG022470@repo.freebsd.org>
References:  <201812271414.wBREEfCG022470@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/27/18 6:14 AM, Andrew Turner wrote:
> Author: andrew
> Date: Thu Dec 27 14:14:41 2018
> New Revision: 342552
> URL: https://svnweb.freebsd.org/changeset/base/342552
> 
> Log:
>   Pass VM_PROT_EXECUTE to vm_fault for instruction faults.
>   
>   We need to tell vm_fault the reason for the fault was because we tried to
>   execute from the memory location. Without this it may return with success
>   as we only request read-only memory, then we return to the same location
>   and try to execute from the same memory address. This leads to an infinite
>   loop raising the same fault and returning to the same invalid location.

Note that on other architectures, ftype isn't a mask, but is a single value
(one of VM_PROT_READ/WRITE/EXECUTE) to indicate the type of faulting access.
I fixed this in riscv's pmap recently (it seemed to have been copied from
arm64).

-- 
John Baldwin

                                                                            



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5b47ea61-32d5-2e47-a713-9076eed17f8f>