x86/access: Make SMEP play nice with 5-level paging
Rework the walker to clear the USER bit on the test's text region when enabling SMEP. The walk_pte library function assumes 4-level paging (see PAGE_LEVEL), and completely botches 5-level paging. Through sheer dumb luck, the test works with 5-level paging, likely because of an unintentional collision with the test's own PTEs. Punt on the library for the time being as the access test is obviously more than capable of walking page tables, and fixing the library properly will involve poking many more tests. Signed-off-by:Sean Christopherson <seanjc@google.com> Message-Id: <20211125012857.508243-11-seanjc@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Loading
Please register or sign in to comment