Re: [PATCH v4 4/7] KVM: VMX: Implement LASS violation check

Binbin Wu <[email protected]>
Newsgroups org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest
Message-ID <[email protected]>
On 8/6/2026 9:15 AM, Sohil Mehta wrote:
> From: Zeng Guang <[email protected]>
> 
> Add a VMX implementation of the is_lass_violation() hook to let KVM
> detect Linear Address Space Separation (LASS) violations on linear
> addresses generated during emulation. LASS uses bit 63 of the linear
> address to determine which half of the address space is being targeted,
> and reports a violation when that half doesn't match the current
> privilege level.
> 
> Note, LASS takes effect only in IA-32e mode; it is ignored in legacy
> mode. LASS enforcement for supervisor-mode data accesses additionally
> requires SMAP to be enabled, and is suppressed for explicit accesses
> when RFLAGS.AC=1.
> 
> Enforce LASS violations on emulated instruction fetches and data
> accesses, including implicit supervisor accesses, so that the mode-based
> protections are applied before paging. Also enforce LASS on the linear
> addresses consumed by emulated VMX and SGX ENCLS instructions.
> 
> Linear addresses used for TLB invalidation (INVLPG, INVPCID, and
> INVVPID) and branch targets are not subject to LASS enforcement.
> 
> Signed-off-by: Zeng Guang <[email protected]>
> Signed-off-by: Binbin Wu <[email protected]>
> Signed-off-by: Sohil Mehta <[email protected]>

Reviewed-by: Binbin Wu <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.