diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-05-30 01:21:45 +0300 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-06-03 15:34:46 +0300 |
| commit | 09912b8ad22f981d83818fc83a141dd8216d9ffb (patch) | |
| tree | 0f6cc7ec208cab9a9458ef86732ef6644e7cedee /scripts/objdiff | |
| parent | 42a842f3f6b9eaa361914c96a7c974973e1e2132 (diff) | |
| download | linux-09912b8ad22f981d83818fc83a141dd8216d9ffb.tar.xz | |
KVM: x86/xen: Bug the VM if 32-bit KVM observes a 64-bit mode hypercall
Bug the VM if 32-bit KVM attempts to handle a 64-bit hypercall, primarily
so that a future change to set "input" in mode-specific code doesn't
trigger a false positive warn=>error:
arch/x86/kvm/xen.c:1687:6: error: variable 'input' is used uninitialized
whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
1687 | if (!longmode) {
| ^~~~~~~~~
arch/x86/kvm/xen.c:1708:31: note: uninitialized use occurs here
1708 | trace_kvm_xen_hypercall(cpl, input, params[0], params[1], params[2],
| ^~~~~
x86/kvm/xen.c:1687:2: note: remove the 'if' if its condition is always true
1687 | if (!longmode) {
| ^~~~~~~~~~~~~~
arch/x86/kvm/xen.c:1677:11: note: initialize the variable 'input' to silence this warning
1677 | u64 input, params[6], r = -ENOSYS;
| ^
1 error generated.
Note, params[] also has the same flaw, but -Wsometimes-uninitialized
doesn't seem to be enforced for arrays, presumably because it's difficult
to avoid false positives on specific entries.
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Link: https://patch.msgid.link/20260529222223.870923-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
