From owner-p4-projects@FreeBSD.ORG Mon Jul 24 21:28:32 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 179AF16A4E5; Mon, 24 Jul 2006 21:28:32 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CFFD016A4DA for ; Mon, 24 Jul 2006 21:28:31 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AF6943D4C for ; Mon, 24 Jul 2006 21:28:31 +0000 (GMT) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6OLSV2f044063 for ; Mon, 24 Jul 2006 21:28:31 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6OLSV3D044060 for perforce@freebsd.org; Mon, 24 Jul 2006 21:28:31 GMT (envelope-from rdivacky@FreeBSD.org) Date: Mon, 24 Jul 2006 21:28:31 GMT Message-Id: <200607242128.k6OLSV3D044060@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 102313 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2006 21:28:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=102313 Change 102313 by rdivacky@rdivacky_witten on 2006/07/24 21:28:00 Safekeep handler. If we are passed descriptor \#6 change it to 3. Just to be safe. This doesnt happend in practise but better safe than sorry. Affected files ... .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_futex.c#10 edit .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_futex.h#3 edit .. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#23 edit Differences ... ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_futex.c#10 (text+ko) ==== ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_futex.h#3 (text+ko) ==== @@ -41,4 +41,10 @@ #define LINUX_FUTEX_CMP_REQUEUE 4 #define LINUX_FUTEX_WAKE_OP 5 +#define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ +#define FUTEX_OP_ADD 1 /* *(int *)UADDR2 += OPARG; */ +#define FUTEX_OP_OR 2 /* *(int *)UADDR2 |= OPARG; */ +#define FUTEX_OP_ANDN 3 /* *(int *)UADDR2 &= ~OPARG; */ +#define FUTEX_OP_XOR 4 /* *(int *)UADDR2 ^= OPARG; */ + #endif /* !_LINUX_FUTEX_H */ ==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#23 (text+ko) ==== @@ -475,16 +475,14 @@ if (idx != 6 && idx != 3) return (EINVAL); -#ifdef notyet /* this doesnt happen in practice */ if (idx == 6) { /* we might copy out the entry_number as 3 */ - idx = info.entry_number = 3; - error = copyout(&info, args->desc, sizeof(struct l_user_desc)); + info.entry_number = 3; + error = copyout(&info, (void *) td->td_frame->tf_esi, sizeof(struct l_user_desc)); if (error) return (error); } -#endif a[0] = LDT_entry_a(&info); a[1] = LDT_entry_b(&info);