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]
Message-ID: <5405F503.9040507@redhat.com>
Date:	Tue, 02 Sep 2014 18:49:07 +0200
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	David Matlack <dmatlack@...gle.com>
CC:	linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
	stable@...r.kernel.org,
	Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
Subject: Re: [PATCH 2/3] kvm: fix potentially corrupt mmio cache

Il 02/09/2014 18:44, David Matlack ha scritto:
> >
> > -#define MMIO_GEN_SHIFT                 19
> > -#define MMIO_GEN_LOW_SHIFT             9
> > -#define MMIO_GEN_LOW_MASK              ((1 << MMIO_GEN_LOW_SHIFT) - 1)
> > +#define MMIO_GEN_SHIFT                 20
> > +#define MMIO_GEN_LOW_SHIFT             10
> > +#define MMIO_GEN_LOW_MASK              ((1 << MMIO_GEN_LOW_SHIFT) - 2)
> >  #define MMIO_GEN_MASK                  ((1 << MMIO_GEN_SHIFT) - 1)
> >  #define MMIO_MAX_GEN                   ((1 << MMIO_GEN_SHIFT) - 1)
> >
> > @@ -4428,7 +4432,7 @@ void kvm_mmu_invalidate_mmio_sptes(struct kvm *kvm)
> >          * The very rare case: if the generation-number is round,
> >          * zap all shadow pages.
> >          */
> > -       if (unlikely(kvm_current_mmio_generation(kvm) >= MMIO_MAX_GEN)) {
> > +       if (unlikely(kvm_current_mmio_generation(kvm) == 0)) {
> 
> This should be in patch 1/3.

I don't think so.  This change is not due to the removal of biasing in
x86.c, but rather due to removing bit 0 from MMIO_GEN_LOW_MASK.

I placed it here, because the previous test works just fine until bit 0
is removed from MMIO_GEN_LOW_MASK.

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