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] [day] [month] [year] [list]
Date:   Mon, 7 Sep 2020 08:09:12 +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 07/11] hv_netvsc: Use HV_HYP_PAGE_SIZE for Hyper-V
 communication

On Sat, Sep 05, 2020 at 12:30:48AM +0000, Michael Kelley wrote:
> From: Boqun Feng <boqun.feng@...il.com> Sent: Tuesday, September 1, 2020 8:01 PM
[...]
> >  struct rndis_request {
> >  	struct list_head list_ent;
> >  	struct completion  wait_event;
> > @@ -215,18 +215,18 @@ static int rndis_filter_send_request(struct rndis_device *dev,
> >  	packet->page_buf_cnt = 1;
> > 
> >  	pb[0].pfn = virt_to_phys(&req->request_msg) >>
> > -					PAGE_SHIFT;
> > +					HV_HYP_PAGE_SHIFT;
> >  	pb[0].len = req->request_msg.msg_len;
> >  	pb[0].offset =
> > -		(unsigned long)&req->request_msg & (PAGE_SIZE - 1);
> > +		(unsigned long)&req->request_msg & (HV_HYP_PAGE_SIZE - 1);
> 
> Use offset_in_hvpage() as defined in patch 6 of the series?
> 

Fair enough, I will use offset_in_hvpage() in the next version

Regards,
Boqun

> > 
> >  	/* Add one page_buf when request_msg crossing page boundary */
> > -	if (pb[0].offset + pb[0].len > PAGE_SIZE) {
> > +	if (pb[0].offset + pb[0].len > HV_HYP_PAGE_SIZE) {
> >  		packet->page_buf_cnt++;
> > -		pb[0].len = PAGE_SIZE -
> > +		pb[0].len = HV_HYP_PAGE_SIZE -
> >  			pb[0].offset;
> >  		pb[1].pfn = virt_to_phys((void *)&req->request_msg
> > -			+ pb[0].len) >> PAGE_SHIFT;
> > +			+ pb[0].len) >> HV_HYP_PAGE_SHIFT;
> >  		pb[1].offset = 0;
> >  		pb[1].len = req->request_msg.msg_len -
> >  			pb[0].len;
> > --
> > 2.28.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ