From owner-freebsd-bugs Wed May 30 2:50: 7 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8421237B43F for ; Wed, 30 May 2001 02:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4U9o1d29632; Wed, 30 May 2001 02:50:01 -0700 (PDT) (envelope-from gnats) Received: from granger.mail.mindspring.net (granger.mail.mindspring.net [207.69.200.148]) by hub.freebsd.org (Postfix) with ESMTP id 00F0237B42C for ; Wed, 30 May 2001 02:48:24 -0700 (PDT) (envelope-from sj@mindspring.com) Received: from mindspring.com (user-1120jtj.dsl.mindspring.com [66.32.79.179]) by granger.mail.mindspring.net (8.9.3/8.8.5) with ESMTP id FAA17743 for ; Wed, 30 May 2001 05:48:23 -0400 (EDT) Received: (from root@localhost) by mindspring.com (8.11.3/8.11.3) id f4U9mMb00741; Wed, 30 May 2001 05:48:22 -0400 (EDT) (envelope-from sj) Message-Id: <200105300948.f4U9mMb00741@mindspring.com> Date: Wed, 30 May 2001 05:48:22 -0400 (EDT) From: Sudish Joseph Reply-To: Sudish Joseph To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: kern/27767: PPPoE makes 32-bit assumptions and breaks on Alpha Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 27767 >Category: kern >Synopsis: PPPoE makes 32-bit assumptions and breaks on an Alpha >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed May 30 02:50:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Sudish Joseph >Release: FreeBSD 4.3-STABLE alpha >Organization: >Environment: System: FreeBSD aleph.weenal.com 4.3-STABLE FreeBSD 4.3-STABLE #0: Wed May 30 02:26:09 GMT 2001 root@aleph.weenal.com:/usr/obj/usr/src/sys/SUDISH alpha >Description: /usr/src/sys/netgraph/ng_pppoe.c relies on the IA-32 assumption that sizeof(char *) == 4. It attempts to stuff a pointer into the 32-bit PPPoE tag field. This breaks under alpha, where a pointer is 64 bits. The kluge I use to workaround this is included below. It's not a real fix (which would be to use an index into a table of pointers as the tag field or something similar), however, it allows me to get a working network for now. All the alpha-specific kluge below does is to mask out the upper 32 bits. It works, given that all of netgraph is in the same 32-bit segment. But, obviously, this is not a general fix. With the kluge below, and the /usr/sbin/ppp fix that I send-pr'ed just prior to this message, I now have a working DSL connection from FreeBSD- alpha. Very cool! >How-To-Repeat: Attempt to use netgraph-based PPPoE on an Alpha. It will fail. >Fix: This is not a true fix, but an alpha-specific workaround. The patch below does point out the nature of the problem. --- /sys/netgraph/ng_pppoe.c Sat Nov 4 08:23:16 2000 +++ /sys/netgraph/ng_pppoe.c Wed Apr 4 22:59:52 2001 @@ -441,7 +441,7 @@ if ((hook->private == &privp->debug_hook) || (hook->private == &privp->ethernet_hook)) continue; - if (uniq.pointer == hook->private) + if (uniq.pointer == (void *)(((long) hook->private) << 32)) break; } return (hook); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message