lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220812101523.8066-1-kunyu@nfschina.com>
Date:   Fri, 12 Aug 2022 18:15:23 +0800
From:   Li kunyu <kunyu@...china.com>
To:     pbonzini@...hat.com
Cc:     kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Li kunyu <kunyu@...china.com>
Subject: [PATCH 1/5] kvm/kvm_main: Modify the offset type to size_t, which is consistent with the calling function

The offset variable is called size_t in the calling function.
Considering the number of bits in different architectures (32 and 64
represent different types), change it to a consistent variable.

Signed-off-by: Li kunyu <kunyu@...china.com>
---
 virt/kvm/kvm_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 515dfe9d3bcf..1b9700160eb1 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -5526,7 +5526,7 @@ static const struct file_operations stat_fops_per_vm = {
 
 static int vm_stat_get(void *_offset, u64 *val)
 {
-	unsigned offset = (long)_offset;
+	size_t offset = (size_t)_offset;
 	struct kvm *kvm;
 	u64 tmp_val;
 
@@ -5542,7 +5542,7 @@ static int vm_stat_get(void *_offset, u64 *val)
 
 static int vm_stat_clear(void *_offset, u64 val)
 {
-	unsigned offset = (long)_offset;
+	size_t offset = (size_t)_offset;
 	struct kvm *kvm;
 
 	if (val)
@@ -5562,7 +5562,7 @@ DEFINE_SIMPLE_ATTRIBUTE(vm_stat_readonly_fops, vm_stat_get, NULL, "%llu\n");
 
 static int vcpu_stat_get(void *_offset, u64 *val)
 {
-	unsigned offset = (long)_offset;
+	size_t offset = (size_t)_offset;
 	struct kvm *kvm;
 	u64 tmp_val;
 
@@ -5578,7 +5578,7 @@ static int vcpu_stat_get(void *_offset, u64 *val)
 
 static int vcpu_stat_clear(void *_offset, u64 val)
 {
-	unsigned offset = (long)_offset;
+	size_t offset = (size_t)_offset;
 	struct kvm *kvm;
 
 	if (val)
-- 
2.18.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ