KVM: x86: Use sysfs_emit() instead of sprintf()
authorLike Xu <likexu@tencent.com>
Sun, 25 Jun 2023 07:34:38 +0000 (15:34 +0800)
committerSean Christopherson <seanjc@google.com>
Mon, 31 Jul 2023 20:55:26 +0000 (13:55 -0700)
commit1d6664fadda3e028b8220ba1ba487a928e801825
tree197f81e5a4d6b4f1a6e41618c7de9542ecb13ac6
parentfdf0eaf11452d72945af31804e2a1048ee1b574c
KVM: x86: Use sysfs_emit() instead of sprintf()

Use sysfs_emit() instead of the sprintf() for sysfs entries. sysfs_emit()
knows the maximum of the temporary buffer used for outputting sysfs
content and avoids overrunning the buffer length.

Signed-off-by: Like Xu <likexu@tencent.com>
Link: https://lore.kernel.org/r/20230625073438.57427-1-likexu@tencent.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/vmx/vmx.c