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  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:   Sun, 6 Sep 2020 12:51:05 +0800
From:   Boqun Feng <boqun.feng@...il.com>
To:     Michael Kelley <mikelley@...rosoft.com>
Cc:     "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Wei Liu <wei.liu@...nel.org>, Jiri Kosina <jikos@...nel.org>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>
Subject: Re: [RFC v2 03/11] Drivers: hv: vmbus: Introduce types of GPADL

On Sat, Sep 05, 2020 at 12:19:08AM +0000, Michael Kelley wrote:
[...]
> > 
> > @@ -462,7 +576,13 @@ static int __vmbus_open(struct vmbus_channel *newchannel,
> >  	open_msg->openid = newchannel->offermsg.child_relid;
> >  	open_msg->child_relid = newchannel->offermsg.child_relid;
> >  	open_msg->ringbuffer_gpadlhandle = newchannel->ringbuffer_gpadlhandle;
> > -	open_msg->downstream_ringbuffer_pageoffset = newchannel-
> > >ringbuffer_send_offset;
> > +	/*
> > +	 * The unit of ->downstream_ringbuffer_pageoffset is HV_HYP_PAGE and
> > +	 * the unit of ->ringbuffer_send_offset is PAGE, so here we first
> > +	 * calculate it into bytes and then convert into HV_HYP_PAGE.
> > +	 */
> > +	open_msg->downstream_ringbuffer_pageoffset =
> > +		hv_ring_gpadl_send_offset(newchannel->ringbuffer_send_offset << PAGE_SHIFT) >> HV_HYP_PAGE_SHIFT;
> 
> Line length?
> 

Thanks for the review! I've resolved all your comments on wording for
patch #2 and #4 in my local branch. For this line length issue, I fix it
with two changes:

1)	both the callsite of hv_ring_gpadl_send_offset() use ">> ..."
	to calculate the index in HV_HYP_PAGE, so I change the function
	to return offset in unit of HV_HYP_PAGE instead of bytes, and
	that can save us the ">> ..." here.

2)	newchannel->ringbuffer_send_offset is read in the previous code
	of the function into local variable "send_pages", so I use it
	to replace the "newchannel->ringbuffer_send_offset" here.

now the code is:

	open_msg->downstream_ringbuffer_pageoffset =
		hv_ring_gpadl_send_hvpgoffset(send_pages << PAGE_SHIFT);

Regards,
Boqun


> >  	open_msg->target_vp = hv_cpu_number_to_vp_number(newchannel->target_cpu);
> > 
> >  	if (userdatalen)
> > @@ -556,7 +676,6 @@ int vmbus_open(struct vmbus_channel *newchannel,
> >  }
> >  EXPORT_SYMBOL_GPL(vmbus_open);
> > 

Powered by blists - more mailing lists