Commit 3e067fd
committed
KVM: x86: move guest_pv_has out of user_access section
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>1 parent f5396f2 commit 3e067fd
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3292 | 3292 | | |
3293 | 3293 | | |
3294 | 3294 | | |
3295 | | - | |
3296 | | - | |
3297 | | - | |
3298 | 3295 | | |
3299 | 3296 | | |
3300 | 3297 | | |
| |||
3303 | 3300 | | |
3304 | 3301 | | |
3305 | 3302 | | |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
3306 | 3306 | | |
3307 | 3307 | | |
3308 | 3308 | | |
| |||
3325 | 3325 | | |
3326 | 3326 | | |
3327 | 3327 | | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
3328 | 3331 | | |
3329 | 3332 | | |
3330 | 3333 | | |
| |||
0 commit comments