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, 26 Jul 2019 09:06:05 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     "Himadri Pandya" <himadrispandya@...il.com>
Cc:     "Michael Kelley" <Michael.H.Kelley@...rosoft.com>,
        "KY Srinivasan" <kys@...sages.microsoft.com>,
        "Haiyang Zhang" <haiyangz@...rosoft.com>,
        "Stephen Hemminger" <sthemmin@...rosoft.com>, <sashal@...nel.org>,
        <linux-hyperv@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        "himadri18.07" <himadri18.07@...il.com>
Subject: Re: [PATCH 2/2] Drivers: hv: util: Specify ring buffer size using
 Hyper-V page size

On Wed, 24 Jul 2019 22:03:15 -0700
"Himadri Pandya" <himadrispandya@...il.com> wrote:

> VMbus ring buffers are sized based on the 4K page size used by
> Hyper-V. The Linux guest page size may not be 4K on all architectures
> so use the Hyper-V page size to specify the ring buffer size.
> 
> Signed-off-by: Himadri Pandya <himadri18.07@...il.com>
> ---
>  drivers/hv/hv_util.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c
> index c2c08f26bd5f..766bd8457346 100644
> --- a/drivers/hv/hv_util.c
> +++ b/drivers/hv/hv_util.c
> @@ -413,8 +413,9 @@ static int util_probe(struct hv_device *dev,
>  
>  	hv_set_drvdata(dev, srv);
>  
> -	ret = vmbus_open(dev->channel, 4 * PAGE_SIZE, 4 * PAGE_SIZE, NULL,
> 0,
> -			srv->util_cb, dev->channel);
> +	ret = vmbus_open(dev->channel, 4 * HV_HYP_PAGE_SIZE,
> +			 4 * HV_HYP_PAGE_SIZE, NULL, 0, srv->util_cb,
> +			 dev->channel);
>  	if (ret)
>  		goto error;
>  

hv_util doesn't need lots of buffering. Why not define a fixed
value across all architectures. Maybe with some roundup to HV_HYP_PAGE_SIZE.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ