From owner-cvs-src@FreeBSD.ORG Sat Jun 28 15:56:17 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B872537B401; Sat, 28 Jun 2003 15:56:17 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 535B344035; Sat, 28 Jun 2003 15:56:17 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from tiger (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with SMTP id h5SMuFUp028880; Sat, 28 Jun 2003 15:56:16 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <005501c33dc8$edf33b40$0701a8c0@tiger> From: "David Xu" To: "Marcel Moolenaar" , , , References: <200306281945.h5SJjFjF059714@repoman.freebsd.org> Date: Sun, 29 Jun 2003 06:59:27 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Subject: Re: cvs commit: src/sys/kern kern_thread.c src/sys/sys kse.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David Xu List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jun 2003 22:56:18 -0000 Thank you! ----- Original Message -----=20 From: "Marcel Moolenaar" To: ; ; = Sent: Sunday, June 29, 2003 3:45 AM Subject: cvs commit: src/sys/kern kern_thread.c src/sys/sys kse.h > marcel 2003/06/28 12:45:15 PDT >=20 > FreeBSD src repository >=20 > Modified files: > sys/kern kern_thread.c=20 > sys/sys kse.h=20 > Log: > Don't use fuword() and suword() on struct members of type int. This > happens to work on 32-bit platforms as sizeof(long)=3Dsizeof(int), = but > wrecks all kinds of havoc (garbage reads, corrupting writes and > misaligned loads/stores) on 64-bit architectures. > The fix for now is to use fuword32() and suword32() and change the > type of the applicable int fields to int32. This is to make it > explicit that we depend on these fields being 32-bit. We may want > to revisit this later. > =20 > Reviewed by: deischen > =20 > Revision Changes Path > 1.147 +4 -4 src/sys/kern/kern_thread.c > 1.17 +3 -3 src/sys/sys/kse.h >