From owner-cvs-src@FreeBSD.ORG Mon Feb 7 18:44:55 2005 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 BDFC216A4CE; Mon, 7 Feb 2005 18:44:55 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F74C43D2F; Mon, 7 Feb 2005 18:44:55 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j17IitB8032545; Mon, 7 Feb 2005 18:44:55 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j17Iit8X032544; Mon, 7 Feb 2005 18:44:55 GMT (envelope-from jhb) Message-Id: <200502071844.j17Iit8X032544@repoman.freebsd.org> From: John Baldwin Date: Mon, 7 Feb 2005 18:44:55 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/compat/linux linux_ipc.c src/sys/kern kern_descrip.c sysv_msg.c vfs_lookup.c vfs_syscalls.c src/sys/sys syscallsubr.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: Mon, 07 Feb 2005 18:44:55 -0000 jhb 2005-02-07 18:44:55 UTC FreeBSD src repository Modified files: sys/compat/linux linux_ipc.c sys/kern kern_descrip.c sysv_msg.c vfs_lookup.c vfs_syscalls.c sys/sys syscallsubr.h Log: - Tweak kern_msgctl() to return a copy of the requested message queue id structure in the struct pointed to by the 3rd argument for IPC_STAT and get rid of the 4th argument. The old way returned a pointer into the kernel array that the calling function would then access afterwards without holding the appropriate locks and doing non-lock-safe things like copyout() with the data anyways. This change removes that unsafeness and resulting race conditions as well as simplifying the interface. - Implement kern_foo wrappers for stat(), lstat(), fstat(), statfs(), fstatfs(), and fhstatfs(). Use these wrappers to cut out a lot of code duplication for freebsd4 and netbsd compatability system calls. - Add a new lookup function kern_alternate_path() that looks up a filename under an alternate prefix and determines which filename should be used. This is basically a more general version of linux_emul_convpath() that can be shared by all the ABIs thus allowing for further reduction of code duplication. Revision Changes Path 1.42 +2 -3 src/sys/compat/linux/linux_ipc.c 1.274 +17 -19 src/sys/kern/kern_descrip.c 1.59 +5 -7 src/sys/kern/sysv_msg.c 1.70 +113 -0 src/sys/kern/vfs_lookup.c 1.371 +96 -122 src/sys/kern/vfs_syscalls.c 1.22 +17 -5 src/sys/sys/syscallsubr.h