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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 5 Jul 2019 14:46:10 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Liran Alon <liran.alon@...cle.com>
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH] KVM: LAPIC: ARBPRI is a reserved register for x2APIC

On 05/07/19 14:37, Liran Alon wrote:
>> +	u64 rmask = 0x43ff01ffffffe70cULL;
> Why not rename this to “used_bits_mask” and calculate it properly by macros?
> It seems a lot nicer than having a pre-calculated magic.

Yes, I wanted to do the same but I didn't have time right now.  I am
planning to cleanup after the merge window, but if a patch comes soon I
can apply it instead of course. :)

Something like

#define APIC_VALID_REG_MASK(reg)	(1ull << ((reg) >> 4))
#define APIC_VALID_REGS_MASK(first, count) \
	(APIC_VALID_REG_MASK(first) * (1ull << ((count) - 1)))

followed by

	if (offset > 0x3f0 ||
	    !(valid_regs_mask & APIC_VALID_REG_MASK(offset))

Paolo

> -Liran
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ