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
| ||
|
Date: Thu, 12 Mar 2015 12:20:07 -0500 From: Joel Schopp <joel.schopp@....com> To: "Luck, Tony" <tony.luck@...el.com>, "jesse.larrew@....com" <jesse.larrew@....com>, "x86@...nel.org" <x86@...nel.org> CC: Borislav Petkov <bp@...en8.de>, Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, "H. Peter Anvin" <hpa@...or.com>, "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] mce: use safe MSR accesses On 03/11/2015 05:47 PM, Luck, Tony wrote: >> When running as a guest under kvm, it's possible that the MSR >> being accessed may not be implemented. All MSR accesses should >> be prepared to handle exceptions. > Isn't that a KVM bug? The code here first checks family/model before accessing the MSR: > > if (c->x86 == 0x15 && > (c->x86_model >= 0x10 && c->x86_model <= 0x1f)) { > > If kvm tells the guest that it is running on one of these models, shouldn't it provide > complete coverage for that model? These MSRs don't make sense in guest mode. The real question is if we fix that in KVM, here, or both. I'm a fan of fixing it in both places. Xen's behavior is to return a value of 0 if the guest tries to access these, that seems like a reasonable thing to do in KVM as well. I am volunteering myself to write that patch for KVM, but I would encourage accepting an updated version of this patch as well. > > If that isn't possible - then you should still do more than just s/rdmsrl/rdmsrl_safe/ ... like > check the return value to see whether you got an exception .. and thus should skip past > code that uses the "val" that you thought you read from the non-existent MSR. Initializing val to 0 where it is declared should have the desired effect. -- 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