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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1400229009.883.37.camel@kazak.uk.xensource.com>
Date:	Fri, 16 May 2014 09:30:09 +0100
From:	Ian Campbell <Ian.Campbell@...rix.com>
To:	David Vrabel <david.vrabel@...rix.com>
CC:	<netdev@...r.kernel.org>, <xen-devel@...ts.xenproject.org>,
	Wei Liu <wei.liu2@...rix.com>
Subject: Re: [PATCHv2 net-next] xen-netback: fix race between
 napi_complete() and interrupt handler

On Thu, 2014-05-15 at 18:17 +0100, David Vrabel wrote:
> When the NAPI budget was not all used, xenvif_poll() would call
> napi_complete() /after/ enabling the interrupt.  This resulted in a
> race between the napi_complete() and the napi_schedule() in the
> interrupt handler.  The use of local_irq_save/restore() avoided by
> race iff the handler is running on the same CPU but not if it was
> running on a different CPU.
> 
> Fix this properly by calling napi_complete() before reenabling
> interrupts (in the xenvif_napi_schedule_or_enable_irq() call).
> 
> Signed-off-by: David Vrabel <david.vrabel@...rix.com>
> ---
> v2:
> - Rename xenvif_check_rx_xenvif() to
>   xenvif_napi_schedule_or_enable_irq() to make it more obvious what it
>   does.

Which is to update the event pointer such that IRQs are generated again
rather than enabling IRQs as such (enable_irq makes me think of
EFLAGS.IF). But given that I can't think of a better way to describe it:
Acked-by: Ian Campbell <ian.campbell@...rix.com>
(although in this area Wei's ack is more important than mine IMHO).

I think this is intended as a replacement to Wei's "xen-netback: don't
move event pointer in TX credit timeout callback" rather than in
addition to, correct?

Ian.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ