From owner-freebsd-bugs Thu Jun 8 7:10: 7 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 6187037BFFF for ; Thu, 8 Jun 2000 07:10:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA25356; Thu, 8 Jun 2000 07:10:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Thu, 8 Jun 2000 07:10:03 -0700 (PDT) Message-Id: <200006081410.HAA25356@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: misc/19086: pseudo-device vn doesn't work properly with msdos filesystems Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR misc/19086; it has been noted by GNATS. From: Bruce Evans To: Mark Abene Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: misc/19086: pseudo-device vn doesn't work properly with msdos filesystems Date: Fri, 9 Jun 2000 00:06:35 +1000 (EST) On Thu, 8 Jun 2000, Mark Abene wrote: > I just spent the past few hours narrowing the problem down to the very same > thing. Only now with this patch the kernel panics with an "unexpected machine > check" when trying to write more than 1024 bytes to a dos floppy. > Not good. The program counter shows it to be bombing out in the > unaligned_fixup routine. I'm stumped for the time being. > I'll investigate further but would be really curious to hear if you know > why this should be happening. msdosfs metadata is riddled with unaligned fields in Intel (little endian) order. naligned_fixup() apparently has problems fixing up the unaligned accesses related to this. Try changing getushort(), etc., in msdosfs to do byte accesses even in the little endian case. These macros currently only do byte access to fix up the byte order in the big endian case. It should use something like ntohs() for that and be more careful about unaligned accesses. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message