From owner-freebsd-alpha Tue Jan 22 16: 2:52 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 210A837B416 for ; Tue, 22 Jan 2002 16:02:49 -0800 (PST) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id SAA27346; Tue, 22 Jan 2002 18:59:01 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id g0MNwVe49342; Tue, 22 Jan 2002 18:58:31 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15437.64679.699916.530314@grasshopper.cs.duke.edu> Date: Tue, 22 Jan 2002 18:58:31 -0500 (EST) To: Bernd Walter Cc: Volker Stolz , freebsd-alpha@FreeBSD.ORG Subject: Re: alpha/33841: ifconfig causes unaligned accesses on Alpha In-Reply-To: <20020122145652.G71841@cicely8.cicely.de> References: <20020122141403.A11773@i2.informatik.rwth-aachen.de> <20020122145652.G71841@cicely8.cicely.de> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Bernd Walter writes: > > I will setup a testbox at the end of this week and will fix the > ifconfig issue unless someone else did. Cool. So far, I've only managed to paper over it w/a crude hack. A generic solution at the kernel level would be much preferable. I've appended my hack.. Cheers, Drew Index: sbin/ifconfig/ifconfig.c =================================================================== RCS file: /home/ncvs/src/sbin/ifconfig/ifconfig.c,v retrieving revision 1.51.2.15 diff -u -r1.51.2.15 ifconfig.c --- sbin/ifconfig/ifconfig.c 14 Dec 2001 23:36:23 -0000 1.51.2.15 +++ sbin/ifconfig/ifconfig.c 22 Jan 2002 23:51:54 -0000 @@ -1123,17 +1123,21 @@ * specified, show it and it only; otherwise, show them all. */ void -status(afp, addrcount, sdl, ifm, ifam) +status(afp, addrcount, sdl, ifm_in, ifam) const struct afswtch *afp; int addrcount; struct sockaddr_dl *sdl; - struct if_msghdr *ifm; + struct if_msghdr *ifm_in; struct ifa_msghdr *ifam; { const struct afswtch *p = NULL; struct rt_addrinfo info; int allfamilies, s; struct ifstat ifs; + struct if_msghdr ifm_aligned, *ifm; + + bcopy(ifm_in, &ifm_aligned, sizeof(*ifm)); + ifm = &ifm_aligned; if (afp == NULL) { allfamilies = 1; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message