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:   Fri, 13 Nov 2020 14:51:06 +0000
From:   Wei Liu <wei.liu@...nel.org>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>
Cc:     Wei Liu <wei.liu@...nel.org>,
        Linux on Hyper-V List <linux-hyperv@...r.kernel.org>,
        virtualization@...ts.linux-foundation.org,
        Linux Kernel List <linux-kernel@...r.kernel.org>,
        Michael Kelley <mikelley@...rosoft.com>,
        Vineeth Pillai <viremana@...ux.microsoft.com>,
        Sunil Muthuswamy <sunilmut@...rosoft.com>,
        Nuno Das Neves <nunodasneves@...ux.microsoft.com>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>
Subject: Re: [PATCH v2 03/17] Drivers: hv: vmbus: skip VMBus initialization
 if Linux is root

On Thu, Nov 12, 2020 at 04:24:38PM +0100, Vitaly Kuznetsov wrote:
> Wei Liu <wei.liu@...nel.org> writes:
> 
> > There is no VMBus and the other infrastructures initialized in
> > hv_acpi_init when Linux is running as the root partition.
> >
> > Signed-off-by: Wei Liu <wei.liu@...nel.org>
> > ---
> >  drivers/hv/vmbus_drv.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> > index 4fad3e6745e5..37c4d3a28309 100644
> > --- a/drivers/hv/vmbus_drv.c
> > +++ b/drivers/hv/vmbus_drv.c
> > @@ -2612,6 +2612,9 @@ static int __init hv_acpi_init(void)
> >  	if (!hv_is_hyperv_initialized())
> >  		return -ENODEV;
> >  
> > +	if (hv_root_partition)
> > +		return -ENODEV;
> > +
> 
> Nit: any particular reason why we need to return an error from here? I'd
> suggest we 'return 0;' if it doesn't break anything (we're still running
> on Hyper-V, it's just a coincedence that there's nothing to do here,
> eventually we may get some devices/handlers I guess. Also, there's going
> to be server-side Vmbus eventually, we may as well initialize it here.

Returning 0 should be fine. It is not likely to make any practical
difference at this stage.

Not sure what you mean by server-side Vmbus. If you mean Vmbus on the
host, yes, there will be. The initialization is, again, a bit different
there.  You will see why when my colleague post /dev/mshv code. The long
term goal is to refactor the Vmbus initialization code to work in all
scenarios.  We are not there yet though.

Wei.

> 
> >  	init_completion(&probe_event);
> >  
> >  	/*
> 
> -- 
> Vitaly
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ