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: Mon, 18 Mar 2024 16:39:21 +0800
From: James Lee <lizheng043@...il.com>
To: Ratheesh Kannoth <rkannoth@...vell.com>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org, 
	nhorman@...driver.com, davem@...emloft.net, jmorris@...ei.org, 
	James.Z.Li@...l.com
Subject: Re: [PATCH] neighbour: guarantee the localhost connections be
 established successfully even the ARP table is full

loopback neigh is a special device in the neighbour system which is
used by all local communications and state is NUD_NOARP.
Any setting value of gc_thresh3 might encounter arp table be full,
manually increasing gc_thresh3 can resolve this issue for every time,
but we hope this issue automatically be resolved in Linux kernel for
all local communications whenever ARP table is full, rather than
manually operation as a workaround.


Ratheesh Kannoth <rkannoth@...vell.com> 于2024年3月11日周一 21:51写道:
>
> On 2024-03-11 at 17:54:01, Zheng Li (lizheng043@...il.com) wrote:
> >
> > Inter-process communication on localhost should be established successfully even the ARP table is full,
> > many processes on server machine use the localhost to communicate such as command-line interface (CLI),
> > servers hope all CLI commands can be executed successfully even the arp table is full.
> > Right now CLI commands got timeout when the arp table is full.
> > Set the parameter of exempt_from_gc to be true for LOOPBACK net device to
> > keep localhost neigh in arp table, not removed by gc.
> >
> > the steps of reproduced:
> > server with "gc_thresh3 = 1024" setting, ping server from more than 1024 IPv4 addresses,
> > run "ssh localhost" on console interface, then the command will get timeout.
> it does not look correct to me. why gc has to behave differently for loopback devices.
> why can't a higher gc_thresh3 value (fine tuned to your use case) wont solve the issue ?
> can't you add localhost arp entry statically and get rid of gc issue ?
>
> >
> > Signed-off-by: Zheng Li <James.Z.Li@...l.com>
> > ---
> >  net/core/neighbour.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/net/core/neighbour.c b/net/core/neighbour.c
> > index 552719c3bbc3..d96dee3d4af6 100644
> > --- a/net/core/neighbour.c
> > +++ b/net/core/neighbour.c
> > @@ -734,7 +734,10 @@ ___neigh_create(struct neigh_table *tbl, const void *pkey,
> >  struct neighbour *__neigh_create(struct neigh_table *tbl, const void *pkey,
> >                                struct net_device *dev, bool want_ref)
> >  {
> > -     return ___neigh_create(tbl, pkey, dev, 0, false, want_ref);
> > +     if (dev->flags & IFF_LOOPBACK)
> > +             return ___neigh_create(tbl, pkey, dev, 0, true, want_ref);
> > +     else
> > +             return ___neigh_create(tbl, pkey, dev, 0, false, want_ref);
> >  }
> >  EXPORT_SYMBOL(__neigh_create);
> >
> > --
> > 2.17.1
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ