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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <76e017c2579443f39c5fe5f2bdd169b7@SN2PR03MB061.namprd03.prod.outlook.com>
Date:	Thu, 20 Jun 2013 17:25:13 +0000
From:	KY Srinivasan <kys@...rosoft.com>
To:	Jason Wang <jasowang@...hat.com>,
	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:	Haiyang Zhang <haiyangz@...rosoft.com>
Subject: RE: [PATCH] drivers: hv: check interrupt mask before read_index



> -----Original Message-----
> From: Jason Wang [mailto:jasowang@...hat.com]
> Sent: Thursday, June 20, 2013 12:59 AM
> To: KY Srinivasan; devel@...uxdriverproject.org; linux-kernel@...r.kernel.org;
> gregkh@...uxfoundation.org
> Cc: Haiyang Zhang; Jason Wang
> Subject: [PATCH] drivers: hv: check interrupt mask before read_index
> 
> This patches add a read barriers to force the driver to check the interrupt mask
> before read_index. Otherwise we may lost a kick to host.
> 
> Cc: K. Y. Srinivasan <kys@...rosoft.com>
> Cc: Haiyang Zhang <haiyangz@...rosoft.com>
> Signed-off-by: Jason Wang <jasowang@...hat.com>
Signed-off-by:  K. Y. Srinivasan <kys@...rosoft.com>
> ---
>  drivers/hv/ring_buffer.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c
> index 791f45d..26c93cf 100644
> --- a/drivers/hv/ring_buffer.c
> +++ b/drivers/hv/ring_buffer.c
> @@ -75,6 +75,8 @@ static bool hv_need_to_signal(u32 old_write, struct
> hv_ring_buffer_info *rbi)
>  	if (rbi->ring_buffer->interrupt_mask)
>  		return false;
> 
> +	/* check interrupt_mask before read_index */
> +	rmb();
>  	/*
>  	 * This is the only case we need to signal when the
>  	 * ring transitions from being empty to non-empty.
> --
> 1.7.1
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ