From owner-cvs-src@FreeBSD.ORG Sat Jun 28 12:45:16 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 82B8137B401; Sat, 28 Jun 2003 12:45:16 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3142144013; Sat, 28 Jun 2003 12:45:16 -0700 (PDT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h5SJjG0U059715; Sat, 28 Jun 2003 12:45:16 -0700 (PDT) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h5SJjFjF059714; Sat, 28 Jun 2003 12:45:15 -0700 (PDT) Message-Id: <200306281945.h5SJjFjF059714@repoman.freebsd.org> From: Marcel Moolenaar Date: Sat, 28 Jun 2003 12:45:15 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: 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 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 19:45:16 -0000 marcel 2003/06/28 12:45:15 PDT FreeBSD src repository Modified files: sys/kern kern_thread.c sys/sys kse.h Log: Don't use fuword() and suword() on struct members of type int. This happens to work on 32-bit platforms as sizeof(long)=sizeof(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. Reviewed by: deischen Revision Changes Path 1.147 +4 -4 src/sys/kern/kern_thread.c 1.17 +3 -3 src/sys/sys/kse.h