Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Apr 1999 16:16:29 -0500
From:      Chas Pinckard <cpinckard@dynasty.net>
To:        FreeBsd Current List <freebsd-current@FreeBSD.ORG>
Subject:   Re: Any action on PR 10570 ? getting closer to 65K :-(
Message-ID:  <372A1DAD.A72FD38C@dynasty.net>
References:  <XFMail.990430112019.jdp@polstra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
John Polstra wrote:

> Rodney W. Grimes wrote:
> >> Pierre Beyssac wrote:
> >>
> >> > Wouldn't it be sensible to issue a warning (or panic) when
> >> > increasing the reference count reaches 0, rather than causing a
> >> > later kernel segfault? It would involve some overhead though, and
> >> > I'm not sure having 2^32 routes is currently realistic since most
> >> > machines don't even have that many bytes of RAM, but it might be
> >> > true one day...
> >>
> >> It would be pretty hard to create 2^32 routes, given that IPv4 only
> >> has 32-bit addresses. :-) Also, if you time it I suspect you'll find
> >> that it would take a geological lifetime on a fast machine to add that
> >> many routes.
> >
> > But some of us are playing with IPv6 and it is easy to create >2^32
> > routes in that environment.
>
> You're being totally unrealistic.  You can't create >2^32 of
> _anything_ on an i386 without running out of memory.
>
> Even if you could address that much memory, you or your machine would
> be dead from old age long before it managed to add that many routes.
> Let's say, _totally_ unrealistically, that you added 100 routes per
> second continuously.  It would still take you 500 days to wrap the
> 32-bit counter.
>
> Regarding IPv6, it would be a surprise if that structure remained
> the same at all for IPv6.
>
> > The checks could be added _today_ with very little testing needed,
> > simple return an error if attempting to wrap the route ref count
> > from 65536->0.  At least then we don't blow chunks latter and end
> > up segfaulting.
> >
> > This is a real bug fix.
>
> No it's not.  It doesn't fix anything, because your 16-bit counter
> has wrapped around and now it's not valid any more.  It doesn't
> matter whether you detect it and warn about it or not.  The damage
> is already done.
>
> On the other hand, increasing the size of the variable eliminates
> the problem entirely.  And once you do that, the overflow test is
> unnecessary.
>
> John

So what about those i586/pentium machines? Do they have the 32bit counters so
you can implement the higher bit counts?

Chas




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?372A1DAD.A72FD38C>