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]
Message-ID: <46C1F168.5050102@goop.org>
Date:	Tue, 14 Aug 2007 11:16:08 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Jesper Juhl <jesper.juhl@...il.com>
CC:	Jeff Garzik <jeff@...zik.org>, NetDev <netdev@...r.kernel.org>,
	Keir Fraser <keir@...source.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] xen-netfront: Avoid deref'ing skbafter it is potentially
 freed.

Jesper Juhl wrote:
> This moves the updating of both tx_bytes and tx_packets inside the 
> spinlock, but as far as I can see we only _really_ need to move the 
> tx_bytes update. Considering that we generally want to do as little 
> work as possible while holding a lock, wouldn't the following be 
> slightly better?
>   

Hm, I think it would be better to keep them together.  The second add is
going to be pretty much free, particularly since the tx_bytes add will
probably pull tx_packets into cache.

I have a followup patch to convert it to using the netdevice stats
structure, which will definitely put them in the same cacheline (though
perhaps the stats structure should group tx and rx members together?).

    J

    J
-
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