All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: Cheng Jin <chengjin@cs.caltech.edu>
Cc: netdev@oss.sgi.com
Subject: Re: struct sock size limit?
Date: Sun, 27 Oct 2002 03:18:40 -0300	[thread overview]
Message-ID: <20021027061840.GA4720@conectiva.com.br> (raw)
In-Reply-To: <Pine.LNX.4.33L0.0210262236120.4401-100000@fast2.cs.caltech.edu>

Em Sat, Oct 26, 2002 at 10:44:03PM -0700, Cheng Jin escreveu:
> Hi,
> 
> I have been adding members to struct sock (by changing struct tcp_opt) in
> linux 2.4.18-3 kernel.  I haven't had problems with the kernel until
> today.   When I added a few more bytes (~ 20 bytes) on top of my old
> addition (around 80 bytes), the kernel would crash calling udp_sendmsg

beware the data dependencies of struct sock and tcp_tw_bucket, etc, I
bet you're adding new struct members at the start of struct sock, see the
comment in include/net/tcp.h, just above struct tcp_tw_bucket definition...
and also study current include/net/sock.h in 2.5, this thing was all
changed (for the better 8) ).

> (syslogd initialization).  I suspect that there may be some kind of size
> limit with struct sock/tcp_opt.  The TCP connected state is checked
> from within udp_sendmsg (no idea why that is so).

so look at other protocols such as decnet that also uses the TCP_ state
macros :-) its just reusing those macros.
 
> I searched around on google, but didn't find anything on struct sock or
> struct tcp_opt.  Does anyone know whether the size of struct sock/tcp_opt
> is capped?
> 
> Thanks a lot,
> 
> Cheng
> 
> Lab # 626 395 8820
> 

      reply	other threads:[~2002-10-27  6:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-27  5:44 struct sock size limit? Cheng Jin
2002-10-27  6:18 ` Arnaldo Carvalho de Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021027061840.GA4720@conectiva.com.br \
    --to=acme@conectiva.com.br \
    --cc=chengjin@cs.caltech.edu \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.