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]
Date:	Mon, 22 Apr 2013 18:30:17 +0200
From:	Jesper Dangaard Brouer <brouer@...hat.com>
To:	Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc:	Eric Dumazet <eric.dumazet@...il.com>,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [net-next PATCH 2/3] net: fix enforcing of fragment queue hash
 list depth

On Mon, 2013-04-22 at 16:54 +0200, Hannes Frederic Sowa wrote:
> On Mon, Apr 22, 2013 at 11:10:34AM +0200, Jesper Dangaard Brouer wrote:
[...]
> > Besides, after we have implemented per hash bucket locking (in my change
> > commit 19952cc4 "net: frag queue per hash bucket locking").
> > Then, I don't think it is a big problem that a single hash bucket is
> > being "attacked".
> 
> I don't know, I wouldn't say so. The contention point is now the per
> hash bucket lock but it should show the same symptoms as before.

No, the contention point is the LRU list lock, not the hash bucket lock.
If you perf record/profile the code, you can easily miss that its the
LRU lock, because its inlined.  Try to rerun your tests with noinline
e.g.:


diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index 6f41b45..9963b87 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -138,14 +138,14 @@ static inline int sum_frag_mem_limit(struct
netns_frags *n
        return res;
 }
 
-static inline void inet_frag_lru_move(struct inet_frag_queue *q)
+static noinline void inet_frag_lru_move(struct inet_frag_queue *q)
 {
        spin_lock(&q->net->lru_lock);
        list_move_tail(&q->lru_list, &q->net->lru_list);
        spin_unlock(&q->net->lru_lock);
 }
 
-static inline void inet_frag_lru_del(struct inet_frag_queue *q)
+static noinline void inet_frag_lru_del(struct inet_frag_queue *q)
 {
        spin_lock(&q->net->lru_lock);
        list_del(&q->lru_list);
@@ -153,7 +153,7 @@ static inline void inet_frag_lru_del(struct
inet_frag_queue 
        spin_unlock(&q->net->lru_lock);
 }
 
-static inline void inet_frag_lru_add(struct netns_frags *nf,
+static noinline void inet_frag_lru_add(struct netns_frags *nf,
                                     struct inet_frag_queue *q)
 {
        spin_lock(&nf->lru_lock);





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