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, 30 Jan 2015 22:15:45 +0100
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Radim Krčmář <rkrcmar@...hat.com>
CC:	linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
	Nadav Amit <namit@...technion.ac.il>,
	Gleb Natapov <gleb@...nel.org>
Subject: Re: [PATCH 8/8] KVM: x86: simplify kvm_apic_map



On 30/01/2015 17:57, Radim Krčmář wrote:
> As optimizations go, we could drop the "&" on cid as "cid < 16" is
> checked later, so mode=4 practically does nothing ... Not the best for
> future bugs, but still pretty safe -- only x2APIC can set a value that
> would require the "&" and it can't have valid XAPIC mode, so u32 still
> protects us enough.
> 
>   *cid = ldr >> mode;
>   *lid = ldr & ((1 << mode) - 1);
> 
> Which is probably faster a solution where we don't shuffle switch cases
> to jump to x2APIC first.  A comparison is at the very bottom [2].
> 
> Would that be ok in v2?

Yes, this is okay.  Thanks for looking at it!

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ