From owner-freebsd-alpha@FreeBSD.ORG Mon Nov 15 21:07:40 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0222416A4CE; Mon, 15 Nov 2004 21:07:40 +0000 (GMT) Received: from ford.blinkenlights.nl (ford.blinkenlights.nl [213.204.211.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DA6F43D3F; Mon, 15 Nov 2004 21:07:39 +0000 (GMT) (envelope-from sten@blinkenlights.nl) Received: from tea.blinkenlights.nl (tea.blinkenlights.nl [192.168.1.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ford.blinkenlights.nl (Postfix) with ESMTP id 0D20E3E437; Mon, 15 Nov 2004 22:07:38 +0100 (CET) Received: by tea.blinkenlights.nl (Postfix, from userid 101) id 9096627D; Mon, 15 Nov 2004 22:07:37 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by tea.blinkenlights.nl (Postfix) with ESMTP id 8B89E139; Mon, 15 Nov 2004 22:07:37 +0100 (CET) Date: Mon, 15 Nov 2004 22:07:37 +0100 (CET) From: Sten Spans To: John Baldwin In-Reply-To: <200411151510.07790.jhb@FreeBSD.org> Message-ID: References: <200411151510.07790.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: Robert Watson cc: freebsd-alpha@FreeBSD.org Subject: Re: alpha and em mtu X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2004 21:07:40 -0000 On Mon, 15 Nov 2004, John Baldwin wrote: > On Monday 15 November 2004 02:34 pm, Sten Spans wrote: >> On Mon, 15 Nov 2004, John Baldwin wrote: >>> >> 548 /* >> 549 * Check that TCP offset makes sense, >> 550 * pull out TCP options and adjust length. XXX >> 551 */ >> 552 off = th->th_off << 2; >> 553 if (off < sizeof (struct tcphdr) || off > tlen) { >> 554 tcpstat.tcps_rcvbadoff++; >> 555 goto drop; >> 556 } >> >> >> The box that talks to the alpha has mtu 9014, this might >> help to expose the bug. > > It may be that the off0 argument is less than the size of an IP header but is > not a multiple of 4. Can you try this to see if it prints anything out > before crashing: > > Index: netinet/tcp_input.c > =================================================================== > RCS file: /usr/cvs/src/sys/netinet/tcp_input.c,v > retrieving revision 1.255 > diff -u -r1.255 tcp_input.c > --- netinet/tcp_input.c 7 Nov 2004 19:19:35 -0000 1.255 > +++ netinet/tcp_input.c 15 Nov 2004 20:09:27 -0000 > @@ -497,6 +497,8 @@ > ip_stripoptions(m, (struct mbuf *)0); > off0 = sizeof(struct ip); > } > + if (off0 & 0x3 != 0) > + printf("%s: off0 %d is misaligned\n", __func__, off0); > if (m->m_len < sizeof (struct tcpiphdr)) { > if ((m = m_pullup(m, sizeof (struct tcpiphdr))) == 0) { > tcpstat.tcps_rcvshort++; > changed to ((off0 & 0x3) != 0), didn't seem to print anything. -- Sten Spans "There is a crack in everything, that's how the light gets in." Leonard Cohen - Anthem