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: <20230408050337.GA21166@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
Date:   Fri, 7 Apr 2023 22:03:37 -0700
From:   Saurabh Singh Sengar <ssengar@...ux.microsoft.com>
To:     "Michael Kelley (LINUX)" <mikelley@...rosoft.com>
Cc:     Stanislav Kinsburskii <skinsburskii@...ux.microsoft.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "x86@...nel.org" <x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        Dexuan Cui <decui@...rosoft.com>,
        "arnd@...db.de" <arnd@...db.de>,
        Tianyu Lan <Tianyu.Lan@...rosoft.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        "jgross@...e.com" <jgross@...e.com>,
        "mat.jonczyk@...pl" <mat.jonczyk@...pl>
Subject: Re: [PATCH v4 5/5] x86/hyperv: VTL support for Hyper-V

On Fri, Apr 07, 2023 at 08:56:29PM +0000, Michael Kelley (LINUX) wrote:
> From: Stanislav Kinsburskii <skinsburskii@...ux.microsoft.com> Sent: Thursday, April 6, 2023 7:08 AM
> > 
> > On Tue, Apr 04, 2023 at 02:01:04AM -0700, Saurabh Sengar wrote:
> 
> [snip]
> 
> > > --- /dev/null
> > > +++ b/arch/x86/hyperv/hv_vtl.c
> > > @@ -0,0 +1,227 @@
> > > +// SPDX-License-Identifier: GPL-2.0
> > > +/*
> > > + * Copyright (c) 2023, Microsoft Corporation.
> > > + *
> > > + * Author:
> > > + *   Saurabh Sengar <ssengar@...rosoft.com>
> > > + */
> > > +
> > > +#include <asm/apic.h>
> > > +#include <asm/boot.h>
> > > +#include <asm/desc.h>
> > > +#include <asm/i8259.h>
> > > +#include <asm/mshyperv.h>
> > > +#include <asm/realmode.h>
> > > +
> > > +extern struct boot_params boot_params;
> > > +static struct real_mode_header hv_vtl_real_mode_header;
> > > +
> > > +void __init hv_vtl_init_platform(void)
> > > +{
> > > +	pr_info("Linux runs in Hyper-V Virtual Trust Level\n");
> > > +
> > > +	x86_init.irqs.pre_vector_init = x86_init_noop;
> > > +	x86_init.timers.timer_init = x86_init_noop;
> > > +
> > > +	x86_platform.get_wallclock = get_rtc_noop;
> > > +	x86_platform.set_wallclock = set_rtc_noop;
> > 
> > Nit: this code is VTL feature and hypevisor specific.
> > Defining vtl_get_rtc_noop instead of exporting get_rtc_noop would allow to make
> > this series less intrusive to the rest of x86 generic code.
> > 
> > Reviewed-by: Stanislav Kinsburskii <stanislav.kinsburskii@...il.com>
> > 
> 
> Saurabh's initial version of the code did define its own version of
> get/set_rtc_noop().  I had suggested that he use the existing functions
> from x86 generic code, and KY had also commented about re-using
> existing code wherever possible.  :-)   My suggestion was partly because
> the VTL code is already re-using x86_init_noop(), and then just to avoid
> code duplication.  Admittedly, there's not much code being duplicated
> in these stub functions.  I slightly prefer re-using the existing functions,
> but don't feel strongly about it.

Thank you, Stanislav and Michael, for your comments.
Since the function is not doing anything significant, I think it's best to
minimize its effect on x86 generic code in this series.

I would like to redefine these functions in VTL code. Unless there are
compelling reasons against it, I plan to incorporate this change in the next
version.

- Saurabh

> Michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ