KVM: x86: move guest_pv_has out of user_access section
stable inclusion from stable-v5.10.180 commit fcfe05990a5ce95361dbcae308632861d3c40dfd category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8FC2O Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fcfe05990a5ce95361dbcae308632861d3c40dfd -------------------------------- From: Paolo Bonzini <pbonzini@redhat.com> commit 3e067fd8 upstream. When UBSAN is enabled, the code emitted for the call to guest_pv_has includes a call to __ubsan_handle_load_invalid_value. objtool complains that this call happens with UACCESS enabled; to avoid the warning, pull the calls to user_access_begin into both arms of the "if" statement, after the check for guest_pv_has. Reported-by:Stephen Rothwell <sfr@canb.auug.org.au> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Rishabh Bhatnagar <risbhat@amazon.com> Tested-by:
Allen Pais <apais@linux.microsoft.com> Acked-by:
Sean Christopherson <seanjc@google.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment