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: <20170530133730.GA23855@ws00837>
Date:   Tue, 30 May 2017 15:37:32 +0200
From:   Gioh Kim <gi-oh.kim@...fitbricks.com>
To:     Radim Krčmář <rkrcmar@...hat.com>
Cc:     andre.przywara@....com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC] KVM: SVM: ignore type when setting segment registers

On Tue, May 30, 2017 at 02:54:21PM +0200, Radim Krčmář wrote:
> 2017-05-29 15:24+0200, Gioh Kim:
> > Current code sets unusable as 1 if present is 1 and type is 0.
> > In Long mode, type value in segment descriptor is ignored.
> > So I think type should be ignored when setting the segment registers,
> > if type means the descriptor type in the segment descriptor.
> > 
> > Is the type field of struct kvm_segment the descriptor type?
> 
> Yes.
> 
> > If so, why type is checked when setting segment registers?
> 
> No idea.  19bca6ab75d8 ("KVM: SVM: Fix cross vendor migration issue with
> unusable bit") also moved the assigment up to initialize it before use
> and I think that is enough.
> 
> > If the type field is not the descriptor type,
> > is it ok to set unusable when present is 1?
> 
> Looks like a bug.  type = 0 can be a usable read-only data segment.
> 
> > I'm copying a code as following to show what code I'm asking.
> 
> Please send it as a patch,

Hi Radim,

Thank you for reply.
I sent a patch: https://lkml.org/lkml/2017/5/30/459
I'd appreciate if if you could review it.

-- 
Best regards,
Gi-Oh Kim
TEL: 0176 2697 8962

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ