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]
Date: Wed, 14 Feb 2024 18:15:52 +0800
From: WANG Xuerui <kernel@...0n.name>
To: Paolo Bonzini <pbonzini@...hat.com>,
	Huacai Chen <chenhuacai@...nel.org>
Cc: Tianrui Zhao <zhaotianrui@...ngson.cn>,
	Bibo Mao <maobibo@...ngson.cn>,
	kvm@...r.kernel.org,
	loongarch@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	WANG Xuerui <git@...0n.name>
Subject: [PATCH for-6.8 0/5] KVM: LoongArch: Fix wrong CPUCFG ID handling

From: WANG Xuerui <git@...0n.name>

Hi,

While trying to add loongarch to the Rust kvm-bindings crate, I
accidentally discovered faulty logic in the handling of CPUCFG IDs
("leaves" for those more familiar with x86), that could result in
incorrectly accepting every possible int for the ID; fortunately it is
6.8 material that hasn't seen a release yet, so a fix is possible.

The first two patches contain the fix, while the rest are general
drive-by refactoring and comment cleanups.

(As it is currently the Chinese holiday season, it is probably best for
this series to go through the kvm tree, instead of the loongarch one
even though they seem to like prefer collecting every loongarch patch.)

WANG Xuerui (5):
  KVM: LoongArch: Fix input value checking of _kvm_get_cpucfg
  KVM: LoongArch: Fix kvm_check_cpucfg incorrectly accepting bad CPUCFG
    IDs
  KVM: LoongArch: Rename _kvm_get_cpucfg to _kvm_get_cpucfg_mask
  KVM: LoongArch: Streamline control flow of kvm_check_cpucfg
  KVM: LoongArch: Clean up comments of _kvm_get_cpucfg_mask and
    kvm_check_cpucfg

 arch/loongarch/kvm/vcpu.c | 72 ++++++++++++++++-----------------------
 1 file changed, 29 insertions(+), 43 deletions(-)

-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ