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:	Tue, 29 Jan 2013 14:32:18 +0000
From:	KY Srinivasan <kys@...rosoft.com>
To:	Olaf Hering <olaf@...fle.de>, Jan Beulich <JBeulich@...e.com>
CC:	Stefano Stabellini <stefano.stabellini@...citrix.com>,
	Greg KH <gregkh@...uxfoundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] x86: Hyper-V: register clocksource only if its
 advertised



> -----Original Message-----
> From: Olaf Hering [mailto:olaf@...fle.de]
> Sent: Tuesday, January 29, 2013 4:27 AM
> To: Jan Beulich
> Cc: Stefano Stabellini; KY Srinivasan; Greg KH; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH] x86: Hyper-V: register clocksource only if its advertised
> 
> On Tue, Jan 29, Jan Beulich wrote:
> 
> > >>> On 28.01.13 at 18:44, Stefano Stabellini <stefano.stabellini@...citrix.com>
> wrote:
> > > I think that Olaf made his point very clear: a feature A should only be
> > > enabled if the corresponding flag A is set.
> > > In fact it seems to me that this patch is correct on its own merits,
> > > regardless of Xen does or does not.
> > >
> > > The Xen tools might or might not know whether a guest is going to be
> > > Linux, Windows, FreeBSD or whatever else people use nowadays.  Setting
> > > viridian=1 is the safe choice, given that it shouldn't create any
> > > issues: after all guests are supposed to check for feature flags before
> > > using them.
> > >
> > > If Xen is going to implement "Partition Reference Counter", it is also
> > > going to set the corresponding flag, so the guest OS (Windows, Linux,
> > > my pet OS) can check whether the feature is available and decide whether
> > > it wants to use it.
> >
> > While I agree in general, the specific case of the callback vector
> > seems a little more difficult: As KY says, there's no feature flag
> > for this (or perhaps more precisely for it being deliverable across
> > all CPUs), and hence there's both the problem of detection and
> > the problem of disambiguation (as otherwise both the Hyper-V
> > code and the Xen code in Linux could be trying to use the same
> > vector).
> 
> This is true, but belongs to that other thread about the interrupt
> vector. I agree that the detection in ms_hyperv_platform() should be
> extended, with a DMI check for example.
I want to explore extending ms_hyperv_platform() to detect if Hyper-V is being
emulated. Since Hyper-V is never going to emulate Xen, in my view this would be a
better option. 

 
> 
> The patch which started this thread is still valid because it enables
> feature B only if the featurebit for B is enabled.

Why would we need this if we have some other way of detecting that Hyper-V is being
emulated. Furthermore, I am not sure I understand the logic here. The fact that the hypervisor
supports PARTITION_REFERENCE_COUNTER does not necessarily mean that we should register
a clocksource based on that reference counter. It is true that that is the case on Hyper-V today.
However, on other hypervisors emulating Hyper-V, other standard clocksources maybe more
appropriate.

I agree with you that your patch is valid for making the Hyper-V code more robust but not for dealing
with general issue of Xen emulating Hyper-V. I will Ack your patch. 

Regards,

K. Y 
> 
> Olaf
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ