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: <PU1P153MB01691DCFF28612DFCA852401BFBC0@PU1P153MB0169.APCP153.PROD.OUTLOOK.COM>
Date:   Sat, 31 Aug 2019 00:23:49 +0000
From:   Dexuan Cui <decui@...rosoft.com>
To:     Michael Kelley <mikelley@...rosoft.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Sasha Levin <Alexander.Levin@...rosoft.com>,
        "sashal@...nel.org" <sashal@...nel.org>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        KY Srinivasan <kys@...rosoft.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3 08/12] Drivers: hv: vmbus: Ignore the offers when
 resuming from hibernation

> From: Michael Kelley <mikelley@...rosoft.com>
> Sent: Friday, August 23, 2019 12:57 PM
> 
> From: Dexuan Cui <decui@...rosoft.com>  Sent: August 19, 2019 6:52 PM
> >
> > diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
> > @@ -337,6 +337,33 @@ struct vmbus_channel *relid2channel(u32 relid)
> >  }
> >
> >  /*
> > + * find_primary_channel_by_offer - Get the channel object given the new
> offer.
> > + * This is only used in the resume path of hibernation.
> > + */
> > +struct vmbus_channel *
> > +find_primary_channel_by_offer(const struct vmbus_channel_offer_channel
> *offer)
> > +{
> > +	struct vmbus_channel *channel;
> > +	const guid_t *inst1, *inst2;
> > +
> > +	WARN_ON(!mutex_is_locked(&vmbus_connection.channel_mutex));
> > +
> > +	/* Ignore sub-channel offers. */
> > +	if (offer->offer.sub_channel_index != 0)
> > +		return NULL;
> > +
> > +	list_for_each_entry(channel, &vmbus_connection.chn_list, listentry) {
> > +		inst1 = &channel->offermsg.offer.if_instance;
> > +		inst2 = &offer->offer.if_instance;
> > +
> > +		if (guid_equal(inst1, inst2))
> > +			return channel;
> > +	}
> > +
> > +	return NULL;
> > +}
> 
> Any particular reason this new function is in connection.c instead of
> putting it in channel_mgmt.c where it is called?

There is a similar function relid2channel(), which is in connection.c.

Since the new function is only used in channel_mgmt.c. I'll move it to
channel_mgmt.c in v4.

Thanks,
-- Dexuan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ