From owner-svn-src-stable@FreeBSD.ORG Sun Aug 11 01:06:36 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3E0C78E3; Sun, 11 Aug 2013 01:06:36 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2ADF9291D; Sun, 11 Aug 2013 01:06:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7B16aJt071393; Sun, 11 Aug 2013 01:06:36 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7B16aK0071392; Sun, 11 Aug 2013 01:06:36 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201308110106.r7B16aK0071392@svn.freebsd.org> From: Steven Hartland Date: Sun, 11 Aug 2013 01:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r254201 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Aug 2013 01:06:36 -0000 Author: smh Date: Sun Aug 11 01:06:35 2013 New Revision: 254201 URL: http://svnweb.freebsd.org/changeset/base/254201 Log: MFC: r253926 zfs_ioc_rename should not leave the value of zc_name passed in via zc altered on return. Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Aug 11 01:04:07 2013 (r254200) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Aug 11 01:06:35 2013 (r254201) @@ -3612,6 +3612,8 @@ zfs_ioc_rename(zfs_cmd_t *zc) at = strchr(zc->zc_name, '@'); if (at != NULL) { /* snaps must be in same fs */ + int error; + if (strncmp(zc->zc_name, zc->zc_value, at - zc->zc_name + 1)) return (SET_ERROR(EXDEV)); *at = '\0'; @@ -3620,14 +3622,19 @@ zfs_ioc_rename(zfs_cmd_t *zc) #else if (zc->zc_objset_type == DMU_OST_ZFS && allow_mounted) { #endif - int error = dmu_objset_find(zc->zc_name, + error = dmu_objset_find(zc->zc_name, recursive_unmount, at + 1, recursive ? DS_FIND_CHILDREN : 0); - if (error != 0) + if (error != 0) { + *at = '@'; return (error); + } } - return (dsl_dataset_rename_snapshot(zc->zc_name, - at + 1, strchr(zc->zc_value, '@') + 1, recursive)); + error = dsl_dataset_rename_snapshot(zc->zc_name, + at + 1, strchr(zc->zc_value, '@') + 1, recursive); + *at = '@'; + + return (error); } else { #ifdef illumos if (zc->zc_objset_type == DMU_OST_ZVOL) From owner-svn-src-stable@FreeBSD.ORG Sun Aug 11 01:14:46 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BF482B92; Sun, 11 Aug 2013 01:14:46 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AABF0296B; Sun, 11 Aug 2013 01:14:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7B1Ek4X075243; Sun, 11 Aug 2013 01:14:46 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7B1EkPF075242; Sun, 11 Aug 2013 01:14:46 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201308110114.r7B1EkPF075242@svn.freebsd.org> From: Steven Hartland Date: Sun, 11 Aug 2013 01:14:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254203 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Aug 2013 01:14:46 -0000 Author: smh Date: Sun Aug 11 01:14:46 2013 New Revision: 254203 URL: http://svnweb.freebsd.org/changeset/base/254203 Log: MFC: r253926 zfs_ioc_rename should not leave the value of zc_name passed in via zc altered on return. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Aug 11 01:09:16 2013 (r254202) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Aug 11 01:14:46 2013 (r254203) @@ -3612,6 +3612,8 @@ zfs_ioc_rename(zfs_cmd_t *zc) at = strchr(zc->zc_name, '@'); if (at != NULL) { /* snaps must be in same fs */ + int error; + if (strncmp(zc->zc_name, zc->zc_value, at - zc->zc_name + 1)) return (SET_ERROR(EXDEV)); *at = '\0'; @@ -3620,14 +3622,19 @@ zfs_ioc_rename(zfs_cmd_t *zc) #else if (zc->zc_objset_type == DMU_OST_ZFS && allow_mounted) { #endif - int error = dmu_objset_find(zc->zc_name, + error = dmu_objset_find(zc->zc_name, recursive_unmount, at + 1, recursive ? DS_FIND_CHILDREN : 0); - if (error != 0) + if (error != 0) { + *at = '@'; return (error); + } } - return (dsl_dataset_rename_snapshot(zc->zc_name, - at + 1, strchr(zc->zc_value, '@') + 1, recursive)); + error = dsl_dataset_rename_snapshot(zc->zc_name, + at + 1, strchr(zc->zc_value, '@') + 1, recursive); + *at = '@'; + + return (error); } else { #ifdef illumos if (zc->zc_objset_type == DMU_OST_ZVOL) From owner-svn-src-stable@FreeBSD.ORG Sun Aug 11 02:53:20 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BACC7AA7; Sun, 11 Aug 2013 02:53:20 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 99C2E2CA6; Sun, 11 Aug 2013 02:53:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7B2rK7Z013394; Sun, 11 Aug 2013 02:53:20 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7B2rIjV013376; Sun, 11 Aug 2013 02:53:18 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201308110253.r7B2rIjV013376@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 11 Aug 2013 02:53:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254205 - in stable/9/sys: conf fs/ext2fs modules/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Aug 2013 02:53:20 -0000 Author: pfg Date: Sun Aug 11 02:53:18 2013 New Revision: 254205 URL: http://svnweb.freebsd.org/changeset/base/254205 Log: MFC r252890, 252906, r252907, r253861, r254104: Implementation of the HTree directory index. This is a port of NetBSD's GSoC 2012 Ext3 HTree directory indexing by Vyacheslav Matyushin. It was cleaned up and enhanced for FreeBSD by Zheng Liu (lz@). This is an excellent example of work shared among different projects: Vyacheslav was able to look at an early prototype from Zheng Liu who was also able to check the code from Haiku (with permission). As in linux, the feature is not available by default and must be enabled explicitly with tune2fs. We still do not support the workarounds required in readdir for NFS. Submitted by: Zheng Liu Tested by: Mike Ma Sponsored by: Google Inc. Added: stable/9/sys/fs/ext2fs/ext2_hash.c - copied, changed from r252890, head/sys/fs/ext2fs/ext2_hash.c stable/9/sys/fs/ext2fs/ext2_htree.c - copied, changed from r252890, head/sys/fs/ext2fs/ext2_htree.c stable/9/sys/fs/ext2fs/htree.h - copied unchanged from r252890, head/sys/fs/ext2fs/htree.h Modified: stable/9/sys/conf/files stable/9/sys/fs/ext2fs/ext2_dir.h stable/9/sys/fs/ext2fs/ext2_extern.h stable/9/sys/fs/ext2fs/ext2_inode_cnv.c stable/9/sys/fs/ext2fs/ext2_lookup.c stable/9/sys/fs/ext2fs/ext2_vfsops.c stable/9/sys/fs/ext2fs/ext2fs.h stable/9/sys/modules/ext2fs/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Sun Aug 11 01:57:54 2013 (r254204) +++ stable/9/sys/conf/files Sun Aug 11 02:53:18 2013 (r254205) @@ -2377,6 +2377,8 @@ fs/ext2fs/ext2_balloc.c optional ext2fs fs/ext2fs/ext2_bmap.c optional ext2fs fs/ext2fs/ext2_inode.c optional ext2fs fs/ext2fs/ext2_inode_cnv.c optional ext2fs +fs/ext2fs/ext2_hash.c optional ext2fs +fs/ext2fs/ext2_htree.c optional ext2fs fs/ext2fs/ext2_lookup.c optional ext2fs fs/ext2fs/ext2_subr.c optional ext2fs fs/ext2fs/ext2_vfsops.c optional ext2fs Modified: stable/9/sys/fs/ext2fs/ext2_dir.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_dir.h Sun Aug 11 01:57:54 2013 (r254204) +++ stable/9/sys/fs/ext2fs/ext2_dir.h Sun Aug 11 02:53:18 2013 (r254205) @@ -40,6 +40,21 @@ struct ext2fs_direct { uint16_t e2d_namlen; /* length of string in e2d_name */ char e2d_name[EXT2FS_MAXNAMLEN];/* name with length<=EXT2FS_MAXNAMLEN */ }; + +enum slotstatus { + NONE, + COMPACT, + FOUND +}; + +struct ext2fs_searchslot { + enum slotstatus slotstatus; + doff_t slotoffset; /* offset of area with free space */ + int slotsize; /* size of area at slotoffset */ + int slotfreespace; /* amount of space free in slot */ + int slotneeded; /* sizeof the entry we are seeking */ +}; + /* * The new version of the directory entry. Since EXT2 structures are * stored in intel byte order, and the name_len field could never be Modified: stable/9/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_extern.h Sun Aug 11 01:57:54 2013 (r254204) +++ stable/9/sys/fs/ext2fs/ext2_extern.h Sun Aug 11 02:53:18 2013 (r254205) @@ -40,12 +40,15 @@ #define _FS_EXT2FS_EXT2_EXTERN_H_ struct ext2fs_dinode; +struct ext2fs_direct_2; +struct ext2fs_searchslot; struct indir; struct inode; struct mount; struct vfsconf; struct vnode; +int ext2_add_entry(struct vnode *, struct ext2fs_direct_2 *); int ext2_alloc(struct inode *, int32_t, int32_t, int, struct ucred *, int32_t *); int ext2_balloc(struct inode *, @@ -81,6 +84,18 @@ int ext2_dirempty(struct inode *, ino_t, int ext2_checkpath(struct inode *, struct inode *, struct ucred *); int cg_has_sb(int i); int ext2_inactive(struct vop_inactive_args *); +int ext2_htree_add_entry(struct vnode *, struct ext2fs_direct_2 *, + struct componentname *); +int ext2_htree_create_index(struct vnode *, struct componentname *, + struct ext2fs_direct_2 *); +int ext2_htree_has_idx(struct inode *); +int ext2_htree_hash(const char *, int, uint32_t *, int, uint32_t *, + uint32_t *); +int ext2_htree_lookup(struct inode *, const char *, int, struct buf **, + int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *); +int ext2_search_dirblock(struct inode *, void *, int *, const char *, int, + int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *); + /* Flags to low-level allocation routines. * The low 16-bits are reserved for IO_ flags from vnode.h. Copied and modified: stable/9/sys/fs/ext2fs/ext2_hash.c (from r252890, head/sys/fs/ext2fs/ext2_hash.c) ============================================================================== --- head/sys/fs/ext2fs/ext2_hash.c Sat Jul 6 18:28:06 2013 (r252890, copy source) +++ stable/9/sys/fs/ext2fs/ext2_hash.c Sun Aug 11 02:53:18 2013 (r254205) @@ -27,6 +27,30 @@ * $FreeBSD$ */ +/* + * The following notice applies to the code in ext2_half_md4(): + * + * Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved. + * + * License to copy and use this software is granted provided that it + * is identified as the "RSA Data Security, Inc. MD4 Message-Digest + * Algorithm" in all material mentioning or referencing this software + * or this function. + * + * License is also granted to make and use derivative works provided + * that such works are identified as "derived from the RSA Data + * Security, Inc. MD4 Message-Digest Algorithm" in all material + * mentioning or referencing the derived work. + * + * RSA Data Security, Inc. makes no representations concerning either + * the merchantability of this software or the suitability of this + * software for any particular purpose. It is provided "as is" + * without express or implied warranty of any kind. + * + * These notices must be retained in any copies of any part of this + * documentation and/or software. + */ + #include #include #include @@ -49,7 +73,7 @@ /* * FF, GG, and HH are transformations for rounds 1, 2, and 3. - * Rotation is separated from addition to prevent recompuatation + * Rotation is separated from addition to prevent recomputation. */ #define FF(a, b, c, d, x, s) { \ (a) += F ((b), (c), (d)) + (x); \ @@ -69,13 +93,13 @@ /* * MD4 basic transformation. It transforms state based on block. * - * This is a half md4 algorithm because in Linux it uses this algorithm in dir - * index. This function is copied from kern/md4c.c file and is modified as - * necessary. + * This is a half md4 algorithm since Linux uses this algorithm for dir + * index. This function is derived from the RSA Data Security, Inc. MD4 + * Message-Digest Algorithm and was modified as necessary. * * The return value of this function is uint32_t in Linux, but actually we don't - * need to check this value. So in our version this function don't return any - * values. + * need to check this value, so in our version this function doesn't return any + * value. */ static void ext2_half_md4(uint32_t hash[4], uint32_t data[8]) Copied and modified: stable/9/sys/fs/ext2fs/ext2_htree.c (from r252890, head/sys/fs/ext2fs/ext2_htree.c) ============================================================================== --- head/sys/fs/ext2fs/ext2_htree.c Sat Jul 6 18:28:06 2013 (r252890, copy source) +++ stable/9/sys/fs/ext2fs/ext2_htree.c Sun Aug 11 02:53:18 2013 (r254205) @@ -313,7 +313,7 @@ error: } /* - * Try to lookup an directory entry in HTree index + * Try to lookup a directory entry in HTree index */ int ext2_htree_lookup(struct inode *ip, const char *name, int namelen, @@ -458,7 +458,7 @@ ext2_htree_insert_entry(struct ext2fs_ht } /* - * Compare two entry sort descriptiors by name hash value. + * Compare two entry sort descriptors by name hash value. * This is used together with qsort. */ static int @@ -584,7 +584,7 @@ ext2_htree_split_dirblock(char *block1, ep = (struct ext2fs_direct_2 *)(block1 + offset); offset += ep->e2d_reclen; if (last->e2d_ino) { - /* trim the existing slot */ + /* Trim the existing slot */ last->e2d_reclen = entry_len; last = (struct ext2fs_direct_2 *) ((char *)last + entry_len); Modified: stable/9/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Sun Aug 11 01:57:54 2013 (r254204) +++ stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Sun Aug 11 02:53:18 2013 (r254205) @@ -91,7 +91,7 @@ ext2_ei2i(struct ext2fs_dinode *ei, stru ip->i_birthtime = ei->e2di_crtime; ip->i_birthnsec = XTIME_TO_NSEC(ei->e2di_crtime_extra); } - ip->i_flags = 0; + ip->i_flags = ei->e2di_flags; ip->i_flags |= (ei->e2di_flags & EXT2_APPEND) ? SF_APPEND : 0; ip->i_flags |= (ei->e2di_flags & EXT2_IMMUTABLE) ? SF_IMMUTABLE : 0; ip->i_flags |= (ei->e2di_flags & EXT2_NODUMP) ? UF_NODUMP : 0; @@ -135,7 +135,6 @@ ext2_i2ei(struct inode *ip, struct ext2f ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec); } ei->e2di_flags = ip->i_flags; - ei->e2di_flags = 0; ei->e2di_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND: 0; ei->e2di_flags |= (ip->i_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE: 0; ei->e2di_flags |= (ip->i_flags & UF_NODUMP) ? EXT2_NODUMP: 0; Modified: stable/9/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_lookup.c Sun Aug 11 01:57:54 2013 (r254204) +++ stable/9/sys/fs/ext2fs/ext2_lookup.c Sun Aug 11 02:53:18 2013 (r254205) @@ -113,9 +113,19 @@ static u_char dt_to_ext2_ft[] = { static int ext2_dirbadentry(struct vnode *dp, struct ext2fs_direct_2 *de, int entryoffsetinblock); +static int ext2_is_dot_entry(struct componentname *cnp); static int ext2_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, ino_t *dd_ino); +static int +ext2_is_dot_entry(struct componentname *cnp) +{ + if (cnp->cn_namelen <= 2 && cnp->cn_nameptr[0] == '.' && + (cnp->cn_nameptr[1] == '.' || cnp->cn_nameptr[1] == '0')) + return (1); + return (0); +} + /* * Vnode op for reading directories. * @@ -287,13 +297,9 @@ ext2_lookup_ino(struct vnode *vdp, struc struct buf *bp; /* a buffer of directory entries */ struct ext2fs_direct_2 *ep; /* the current directory entry */ int entryoffsetinblock; /* offset of ep in bp's buffer */ - enum {NONE, COMPACT, FOUND} slotstatus; - doff_t slotoffset; /* offset of area with free space */ + struct ext2fs_searchslot ss; doff_t i_diroff; /* cached i_diroff value */ doff_t i_offset; /* cached i_offset value */ - int slotsize; /* size of area at slotoffset */ - int slotfreespace; /* amount of space free in slot */ - int slotneeded; /* size of the entry we're seeking */ int numdirpasses; /* strategy for directory search */ doff_t endsearch; /* offset to end directory search */ doff_t prevoff; /* prev entry dp->i_offset */ @@ -301,12 +307,13 @@ ext2_lookup_ino(struct vnode *vdp, struc struct vnode *tdp; /* returned by VFS_VGET */ doff_t enduseful; /* pointer past last used dir slot */ u_long bmask; /* block offset mask */ - int namlen, error; + int error; struct ucred *cred = cnp->cn_cred; int flags = cnp->cn_flags; int nameiop = cnp->cn_nameiop; ino_t ino, ino1; int ltype; + int entry_found = 0; int DIRBLKSIZ = VTOI(vdp)->i_e2fs->e2fs_bsize; @@ -317,13 +324,11 @@ ext2_lookup_ino(struct vnode *vdp, struc bmask = VFSTOEXT2(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; restart: bp = NULL; - slotoffset = -1; + ss.slotoffset = -1; /* * We now have a segment name to search for, and a directory to search. - */ - - /* + * * Suppress search for slots unless creating * file and at end of pathname, in which case * we watch for a place to put the new file in @@ -331,18 +336,46 @@ restart: */ ino = 0; i_diroff = dp->i_diroff; - slotstatus = FOUND; - slotfreespace = slotsize = slotneeded = 0; + ss.slotstatus = FOUND; + ss.slotfreespace = ss.slotsize = ss.slotneeded = 0; if ((nameiop == CREATE || nameiop == RENAME) && (flags & ISLASTCN)) { - slotstatus = NONE; - slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen); + ss.slotstatus = NONE; + ss.slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen); /* was - slotneeded = (sizeof(struct direct) - MAXNAMLEN + + ss.slotneeded = (sizeof(struct direct) - MAXNAMLEN + cnp->cn_namelen + 3) &~ 3; */ } /* + * Try to lookup dir entry using htree directory index. + * + * If we got an error or we want to find '.' or '..' entry, + * we will fall back to linear search. + */ + if (!ext2_is_dot_entry(cnp) && ext2_htree_has_idx(dp)) { + numdirpasses = 1; + entryoffsetinblock = 0; + switch (ext2_htree_lookup(dp, cnp->cn_nameptr, cnp->cn_namelen, + &bp, &entryoffsetinblock, &i_offset, &prevoff, + &enduseful, &ss)) { + case 0: + ep = (struct ext2fs_direct_2 *)((char *)bp->b_data + + (i_offset & bmask)); + goto foundentry; + case ENOENT: + i_offset = roundup2(dp->i_size, DIRBLKSIZ); + goto notfound; + default: + /* + * Something failed; just fallback to do a linear + * search. + */ + break; + } + } + + /* * If there is cached information on a previous search of * this directory, pick up where we last left off. * We cache only lookups as these are the most common @@ -376,96 +409,38 @@ searchloop: /* * If necessary, get the next directory block. */ - if ((i_offset & bmask) == 0) { - if (bp != NULL) - brelse(bp); - if ((error = - ext2_blkatoff(vdp, (off_t)i_offset, NULL, - &bp)) != 0) - return (error); - entryoffsetinblock = 0; - } + if (bp != NULL) + brelse(bp); + error = ext2_blkatoff(vdp, (off_t)i_offset, NULL, &bp); + if (error != 0) + return (error); + entryoffsetinblock = 0; /* * If still looking for a slot, and at a DIRBLKSIZE * boundary, have to start looking for free space again. */ - if (slotstatus == NONE && + if (ss.slotstatus == NONE && (entryoffsetinblock & (DIRBLKSIZ - 1)) == 0) { - slotoffset = -1; - slotfreespace = 0; + ss.slotoffset = -1; + ss.slotfreespace = 0; } - /* - * Get pointer to next entry. - * Full validation checks are slow, so we only check - * enough to insure forward progress through the - * directory. Complete checks can be run by setting - * "vfs.e2fs.dirchk" to be true. - */ - ep = (struct ext2fs_direct_2 *) - ((char *)bp->b_data + entryoffsetinblock); - if (ep->e2d_reclen == 0 || - (dirchk && ext2_dirbadentry(vdp, ep, entryoffsetinblock))) { - int i; - ext2_dirbad(dp, i_offset, "mangled entry"); - i = DIRBLKSIZ - (entryoffsetinblock & (DIRBLKSIZ - 1)); - i_offset += i; - entryoffsetinblock += i; - continue; - } - - /* - * If an appropriate sized slot has not yet been found, - * check to see if one is available. Also accumulate space - * in the current block so that we can determine if - * compaction is viable. - */ - if (slotstatus != FOUND) { - int size = ep->e2d_reclen; - - if (ep->e2d_ino != 0) - size -= EXT2_DIR_REC_LEN(ep->e2d_namlen); - if (size > 0) { - if (size >= slotneeded) { - slotstatus = FOUND; - slotoffset = i_offset; - slotsize = ep->e2d_reclen; - } else if (slotstatus == NONE) { - slotfreespace += size; - if (slotoffset == -1) - slotoffset = i_offset; - if (slotfreespace >= slotneeded) { - slotstatus = COMPACT; - slotsize = i_offset + - ep->e2d_reclen - slotoffset; - } - } - } + error = ext2_search_dirblock(dp, bp->b_data, &entry_found, + cnp->cn_nameptr, cnp->cn_namelen, + &entryoffsetinblock, &i_offset, &prevoff, + &enduseful, &ss); + if (error != 0) { + brelse(bp); + return (error); } - - /* - * Check for a name match. - */ - if (ep->e2d_ino) { - namlen = ep->e2d_namlen; - if (namlen == cnp->cn_namelen && - !bcmp(cnp->cn_nameptr, ep->e2d_name, - (unsigned)namlen)) { - /* - * Save directory entry's inode number and - * reclen in ndp->ni_ufs area, and release - * directory buffer. - */ - ino = ep->e2d_ino; - goto found; - } + if (entry_found) { + ep = (struct ext2fs_direct_2 *)((char *)bp->b_data + + (entryoffsetinblock & bmask)); +foundentry: + ino = ep->e2d_ino; + goto found; } - prevoff = i_offset; - i_offset += ep->e2d_reclen; - entryoffsetinblock += ep->e2d_reclen; - if (ep->e2d_ino) - enduseful = i_offset; } -/* notfound: */ +notfound: /* * If we started in the middle of the directory and failed * to find our target, we must check the beginning as well. @@ -500,15 +475,15 @@ searchloop: * can be put in the range from dp->i_offset to * dp->i_offset + dp->i_count. */ - if (slotstatus == NONE) { + if (ss.slotstatus == NONE) { dp->i_offset = roundup2(dp->i_size, DIRBLKSIZ); dp->i_count = 0; enduseful = dp->i_offset; } else { - dp->i_offset = slotoffset; - dp->i_count = slotsize; - if (enduseful < slotoffset + slotsize) - enduseful = slotoffset + slotsize; + dp->i_offset = ss.slotoffset; + dp->i_count = ss.slotsize; + if (enduseful < ss.slotoffset + ss.slotsize) + enduseful = ss.slotoffset + ss.slotsize; } dp->i_endoff = roundup2(enduseful, DIRBLKSIZ); /* @@ -714,6 +689,102 @@ found: return (0); } +int +ext2_search_dirblock(struct inode *ip, void *data, int *foundp, + const char *name, int namelen, int *entryoffsetinblockp, + doff_t *offp, doff_t *prevoffp, doff_t *endusefulp, + struct ext2fs_searchslot *ssp) +{ + struct vnode *vdp; + struct ext2fs_direct_2 *ep, *top; + uint32_t bsize = ip->i_e2fs->e2fs_bsize; + int offset = *entryoffsetinblockp; + int namlen; + + vdp = ITOV(ip); + + ep = (struct ext2fs_direct_2 *)((char *)data + offset); + top = (struct ext2fs_direct_2 *)((char *)data + + bsize - EXT2_DIR_REC_LEN(0)); + + while (ep < top) { + /* + * Full validation checks are slow, so we only check + * enough to insure forward progress through the + * directory. Complete checks can be run by setting + * "vfs.e2fs.dirchk" to be true. + */ + if (ep->e2d_reclen == 0 || + (dirchk && ext2_dirbadentry(vdp, ep, offset))) { + int i; + ext2_dirbad(ip, *offp, "mangled entry"); + i = bsize - (offset & (bsize - 1)); + *offp += i; + offset += i; + continue; + } + + /* + * If an appropriate sized slot has not yet been found, + * check to see if one is available. Also accumulate space + * in the current block so that we can determine if + * compaction is viable. + */ + if (ssp->slotstatus != FOUND) { + int size = ep->e2d_reclen; + + if (ep->e2d_ino != 0) + size -= EXT2_DIR_REC_LEN(ep->e2d_namlen); + if (size > 0) { + if (size >= ssp->slotneeded) { + ssp->slotstatus = FOUND; + ssp->slotoffset = *offp; + ssp->slotsize = ep->e2d_reclen; + } else if (ssp->slotstatus == NONE) { + ssp->slotfreespace += size; + if (ssp->slotoffset == -1) + ssp->slotoffset = *offp; + if (ssp->slotfreespace >= ssp->slotneeded) { + ssp->slotstatus = COMPACT; + ssp->slotsize = *offp + + ep->e2d_reclen - + ssp->slotoffset; + } + } + } + } + + /* + * Check for a name match. + */ + if (ep->e2d_ino) { + namlen = ep->e2d_namlen; + if (namlen == namelen && + !bcmp(name, ep->e2d_name, (unsigned)namlen)) { + /* + * Save directory entry's inode number and + * reclen in ndp->ni_ufs area, and release + * directory buffer. + */ + *foundp = 1; + return (0); + } + } + *prevoffp = *offp; + *offp += ep->e2d_reclen; + offset += ep->e2d_reclen; + *entryoffsetinblockp = offset; + if (ep->e2d_ino) + *endusefulp = *offp; + /* + * Get pointer to the next entry. + */ + ep = (struct ext2fs_direct_2 *)((char *)data + offset); + } + + return (0); +} + void ext2_dirbad(struct inode *ip, doff_t offset, char *how) { @@ -781,16 +852,12 @@ ext2_dirbadentry(struct vnode *dp, struc int ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp) { - struct ext2fs_direct_2 *ep, *nep; struct inode *dp; - struct buf *bp; struct ext2fs_direct_2 newdir; struct iovec aiov; struct uio auio; - u_int dsize; - int error, loc, newentrysize, spacefree; - char *dirbuf; - int DIRBLKSIZ = ip->i_e2fs->e2fs_bsize; + int error, newentrysize; + int DIRBLKSIZ = ip->i_e2fs->e2fs_bsize; #ifdef INVARIANTS @@ -807,6 +874,28 @@ ext2_direnter(struct inode *ip, struct v newdir.e2d_type = EXT2_FT_UNKNOWN; bcopy(cnp->cn_nameptr, newdir.e2d_name, (unsigned)cnp->cn_namelen + 1); newentrysize = EXT2_DIR_REC_LEN(newdir.e2d_namlen); + + if (ext2_htree_has_idx(dp)) { + error = ext2_htree_add_entry(dvp, &newdir, cnp); + if (error) { + dp->i_flags &= ~EXT4_INDEX; + dp->i_flags |= IN_CHANGE | IN_UPDATE; + } + return (error); + } + + if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) && + !ext2_htree_has_idx(dp)) { + if ((dp->i_size / DIRBLKSIZ) == 1 && + dp->i_offset == DIRBLKSIZ) { + /* + * Making indexed directory when one block is not + * enough to save all entries. + */ + return ext2_htree_create_index(dvp, cnp, &newdir); + } + } + if (dp->i_count == 0) { /* * If dp->i_count is 0, then namei could find no @@ -838,6 +927,29 @@ ext2_direnter(struct inode *ip, struct v return (error); } + error = ext2_add_entry(dvp, &newdir); + if (!error && dp->i_endoff && dp->i_endoff < dp->i_size) + error = ext2_truncate(dvp, (off_t)dp->i_endoff, IO_SYNC, + cnp->cn_cred, cnp->cn_thread); + return (error); +} + +/* + * Insert an entry into the directory block. + * Compact the contents. + */ +int +ext2_add_entry(struct vnode *dvp, struct ext2fs_direct_2 *entry) +{ + struct ext2fs_direct_2 *ep, *nep; + struct inode *dp; + struct buf *bp; + u_int dsize; + int error, loc, newentrysize, spacefree; + char *dirbuf; + + dp = VTOI(dvp); + /* * If dp->i_count is non-zero, then namei found space * for the new entry in the range dp->i_offset to @@ -869,6 +981,7 @@ ext2_direnter(struct inode *ip, struct v * dp->i_offset + dp->i_count would yield the * space. */ + newentrysize = EXT2_DIR_REC_LEN(entry->e2d_namlen); ep = (struct ext2fs_direct_2 *)dirbuf; dsize = EXT2_DIR_REC_LEN(ep->e2d_namlen); spacefree = ep->e2d_reclen - dsize; @@ -894,15 +1007,15 @@ ext2_direnter(struct inode *ip, struct v if (ep->e2d_ino == 0) { if (spacefree + dsize < newentrysize) panic("ext2_direnter: compact1"); - newdir.e2d_reclen = spacefree + dsize; + entry->e2d_reclen = spacefree + dsize; } else { if (spacefree < newentrysize) panic("ext2_direnter: compact2"); - newdir.e2d_reclen = spacefree; + entry->e2d_reclen = spacefree; ep->e2d_reclen = dsize; ep = (struct ext2fs_direct_2 *)((char *)ep + dsize); } - bcopy((caddr_t)&newdir, (caddr_t)ep, (u_int)newentrysize); + bcopy((caddr_t)entry, (caddr_t)ep, (u_int)newentrysize); if (DOINGASYNC(dvp)) { bdwrite(bp); error = 0; @@ -910,9 +1023,6 @@ ext2_direnter(struct inode *ip, struct v error = bwrite(bp); } dp->i_flag |= IN_CHANGE | IN_UPDATE; - if (!error && dp->i_endoff && dp->i_endoff < dp->i_size) - error = ext2_truncate(dvp, (off_t)dp->i_endoff, IO_SYNC, - cnp->cn_cred, cnp->cn_thread); return (error); } Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vfsops.c Sun Aug 11 01:57:54 2013 (r254204) +++ stable/9/sys/fs/ext2fs/ext2_vfsops.c Sun Aug 11 02:53:18 2013 (r254205) @@ -399,6 +399,18 @@ compute_sb_data(struct vnode *devvp, str fs->e2fs_maxfilesize = 0x7fffffff; else fs->e2fs_maxfilesize = 0x7fffffffffffffff; + + if (es->e4fs_flags & E2FS_UNSIGNED_HASH) { + fs->e2fs_uhash = 3; + } else if ((es->e4fs_flags & E2FS_SIGNED_HASH) == 0) { +#ifdef __CHAR_UNSIGNED__ + es->e4fs_flags |= E2FS_UNSIGNED_HASH; + fs->e2fs_uhash = 3; +#else + es->e4fs_flags |= E2FS_SIGNED_HASH; +#endif + } + return (0); } Modified: stable/9/sys/fs/ext2fs/ext2fs.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2fs.h Sun Aug 11 01:57:54 2013 (r254204) +++ stable/9/sys/fs/ext2fs/ext2fs.h Sun Aug 11 02:53:18 2013 (r254205) @@ -147,6 +147,7 @@ struct m_ext2fs { int32_t e2fs_contigsumsize; /* size of cluster summary array */ int32_t *e2fs_maxcluster; /* max cluster in each cyl group */ struct csum *e2fs_clustersum; /* cluster summary in each cyl group */ + int32_t e2fs_uhash; /* 3 if hash should be signed, 0 if not */ }; /* cluster summary information */ @@ -228,6 +229,12 @@ struct csum { #define E2FS_ISCLEAN 0x0001 /* Unmounted cleanly */ #define E2FS_ERRORS 0x0002 /* Errors detected */ +/* + * Filesystem miscellaneous flags + */ +#define E2FS_SIGNED_HASH 0x0001 +#define E2FS_UNSIGNED_HASH 0x0002 + /* ext2 file system block group descriptor */ struct ext2_gd { Copied: stable/9/sys/fs/ext2fs/htree.h (from r252890, head/sys/fs/ext2fs/htree.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/fs/ext2fs/htree.h Sun Aug 11 02:53:18 2013 (r254205, copy of r252890, head/sys/fs/ext2fs/htree.h) @@ -0,0 +1,100 @@ +/*- + * Copyright (c) 2010, 2012 Zheng Liu + * Copyright (c) 2012, Vyacheslav Matyushin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _FS_EXT2FS_HTREE_H_ +#define _FS_EXT2FS_HTREE_H_ + +/* EXT3 HTree directory indexing */ + +#define EXT2_HTREE_LEGACY 0 +#define EXT2_HTREE_HALF_MD4 1 +#define EXT2_HTREE_TEA 2 +#define EXT2_HTREE_LEGACY_UNSIGNED 3 +#define EXT2_HTREE_HALF_MD4_UNSIGNED 4 +#define EXT2_HTREE_TEA_UNSIGNED 5 + +#define EXT2_HTREE_EOF 0x7FFFFFFF + +struct ext2fs_fake_direct { + uint32_t e2d_ino; /* inode number of entry */ + uint16_t e2d_reclen; /* length of this record */ + uint8_t e2d_namlen; /* length of string in d_name */ + uint8_t e2d_type; /* file type */ +}; + +struct ext2fs_htree_count { + uint16_t h_entries_max; + uint16_t h_entries_num; +}; + +struct ext2fs_htree_entry { + uint32_t h_hash; + uint32_t h_blk; +}; + +struct ext2fs_htree_root_info { + uint32_t h_reserved1; + uint8_t h_hash_version; + uint8_t h_info_len; + uint8_t h_ind_levels; + uint8_t h_reserved2; +}; + +struct ext2fs_htree_root { + struct ext2fs_fake_direct h_dot; + char h_dot_name[4]; + struct ext2fs_fake_direct h_dotdot; + char h_dotdot_name[4]; + struct ext2fs_htree_root_info h_info; + struct ext2fs_htree_entry h_entries[0]; +}; + +struct ext2fs_htree_node { + struct ext2fs_fake_direct h_fake_dirent; + struct ext2fs_htree_entry h_entries[0]; +}; + +struct ext2fs_htree_lookup_level { + struct buf *h_bp; + struct ext2fs_htree_entry *h_entries; + struct ext2fs_htree_entry *h_entry; +}; + +struct ext2fs_htree_lookup_info { + struct ext2fs_htree_lookup_level h_levels[2]; + uint32_t h_levels_num; +}; + +struct ext2fs_htree_sort_entry { + uint16_t h_offset; + uint16_t h_size; + uint32_t h_hash; +}; + +#endif /* !_FS_EXT2FS_HTREE_H_ */ Modified: stable/9/sys/modules/ext2fs/Makefile ============================================================================== --- stable/9/sys/modules/ext2fs/Makefile Sun Aug 11 01:57:54 2013 (r254204) +++ stable/9/sys/modules/ext2fs/Makefile Sun Aug 11 02:53:18 2013 (r254205) @@ -3,8 +3,8 @@ .PATH: ${.CURDIR}/../../fs/ext2fs KMOD= ext2fs SRCS= opt_ddb.h opt_directio.h opt_quota.h opt_suiddir.h vnode_if.h \ - ext2_alloc.c ext2_balloc.c ext2_bmap.c ext2_inode.c \ - ext2_inode_cnv.c ext2_lookup.c ext2_subr.c ext2_vfsops.c \ + ext2_alloc.c ext2_balloc.c ext2_bmap.c ext2_hash.c ext2_htree.c \ + ext2_inode.c ext2_inode_cnv.c ext2_lookup.c ext2_subr.c ext2_vfsops.c \ ext2_vnops.c .include From owner-svn-src-stable@FreeBSD.ORG Tue Aug 13 06:25:18 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 651E5809; Tue, 13 Aug 2013 06:25:18 +0000 (UTC) (envelope-from erwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 516862C21; Tue, 13 Aug 2013 06:25:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7D6PIqu057419; Tue, 13 Aug 2013 06:25:18 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7D6PIGb057418; Tue, 13 Aug 2013 06:25:18 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201308130625.r7D6PIGb057418@svn.freebsd.org> From: Erwin Lansing Date: Tue, 13 Aug 2013 06:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254270 - stable/9/etc/namedb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Aug 2013 06:25:18 -0000 Author: erwin Date: Tue Aug 13 06:25:17 2013 New Revision: 254270 URL: http://svnweb.freebsd.org/changeset/base/254270 Log: MFC r254132: Add empty zones for Shared Address Space (RFC 6598) Approved by: delphij (mentor) Sponsored by: DK Hostmaster A/S Modified: stable/9/etc/namedb/named.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/namedb/named.conf ============================================================================== --- stable/9/etc/namedb/named.conf Tue Aug 13 06:21:36 2013 (r254269) +++ stable/9/etc/namedb/named.conf Tue Aug 13 06:25:17 2013 (r254270) @@ -153,6 +153,72 @@ zone "30.172.in-addr.arpa" { type master zone "31.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; zone "168.192.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +// Shared Address Space (RFC 6598) +zone "64.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "65.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "66.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "67.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "68.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "69.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "70.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "71.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "72.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "73.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "74.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "75.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "76.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "77.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "78.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "79.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "80.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "81.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "82.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "83.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "84.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "85.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "86.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "87.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "88.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "89.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "90.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "91.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "92.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "93.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "94.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "95.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "96.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "97.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "98.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "99.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "100.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "101.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "102.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "103.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "104.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "105.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "106.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "107.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "108.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "109.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "110.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "111.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "112.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "113.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "114.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "115.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "116.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "117.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "118.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "119.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "120.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "121.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "122.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "123.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "124.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "125.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "126.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "127.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + // Link-local/APIPA (RFCs 3927, 5735 and 6303) zone "254.169.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; From owner-svn-src-stable@FreeBSD.ORG Tue Aug 13 22:05:59 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 33077160; Tue, 13 Aug 2013 22:05:59 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1CDC32952; Tue, 13 Aug 2013 22:05:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7DM5xgO092939; Tue, 13 Aug 2013 22:05:59 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7DM5pwi092877; Tue, 13 Aug 2013 22:05:51 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201308132205.r7DM5pwi092877@svn.freebsd.org> From: Scott Long Date: Tue, 13 Aug 2013 22:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254306 - in stable/9/sys: dev/aacraid dev/advansys dev/aic7xxx dev/amr dev/an dev/arcmsr dev/asr dev/ata dev/bktr dev/buslogic dev/dpt dev/e1000 dev/fatm dev/firewire dev/fxp dev/hatm ... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Aug 2013 22:05:59 -0000 Author: scottl Date: Tue Aug 13 22:05:50 2013 New Revision: 254306 URL: http://svnweb.freebsd.org/changeset/base/254306 Log: Merge r254263: Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI command register. The lazy BAR allocation code in FreeBSD sometimes disables this bit when it detects a range conflict, and will re-enable it on demand when a driver allocates the BAR. Thus, the bit is no longer a reliable indication of capability, and should not be checked. This results in the elimination of a lot of code from drivers, and also gives the opportunity to simplify a lot of drivers to use a helper API to set the busmaster enable bit. This changes fixes some recent reports of disk controllers and their associated drives/enclosures disappearing during boot. Candidate for 9.2 Submitted by: jhb Reviewed by: jfv, marius, adrian, achim Modified: stable/9/sys/dev/aacraid/aacraid_pci.c stable/9/sys/dev/advansys/adw_pci.c stable/9/sys/dev/aic7xxx/ahc_pci.c stable/9/sys/dev/aic7xxx/ahd_pci.c stable/9/sys/dev/amr/amr_pci.c stable/9/sys/dev/an/if_an_pci.c stable/9/sys/dev/arcmsr/arcmsr.c stable/9/sys/dev/asr/asr.c stable/9/sys/dev/ata/ata-pci.c stable/9/sys/dev/bktr/bktr_os.c stable/9/sys/dev/buslogic/bt_pci.c stable/9/sys/dev/dpt/dpt_pci.c stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/e1000/if_lem.c stable/9/sys/dev/fatm/if_fatm.c stable/9/sys/dev/firewire/fwohci_pci.c stable/9/sys/dev/fxp/if_fxp.c stable/9/sys/dev/hatm/if_hatm.c stable/9/sys/dev/ida/ida_pci.c stable/9/sys/dev/ips/ips_pci.c stable/9/sys/dev/isp/isp_pci.c stable/9/sys/dev/iwn/if_iwn.c stable/9/sys/dev/ixgb/if_ixgb.c stable/9/sys/dev/ixgbe/ixv.c stable/9/sys/dev/mfi/mfi_pci.c stable/9/sys/dev/mlx/mlx_pci.c stable/9/sys/dev/mly/mly.c stable/9/sys/dev/mn/if_mn.c stable/9/sys/dev/mps/mps_pci.c stable/9/sys/dev/mpt/mpt_pci.c stable/9/sys/dev/mwl/if_mwl_pci.c stable/9/sys/dev/mxge/if_mxge.c stable/9/sys/dev/pccbb/pccbb_pci.c stable/9/sys/dev/pst/pst-pci.c stable/9/sys/dev/rp/rp_pci.c stable/9/sys/dev/safe/safe.c stable/9/sys/dev/sound/pci/als4000.c stable/9/sys/dev/sound/pci/aureal.c stable/9/sys/dev/sound/pci/cmi.c stable/9/sys/dev/sound/pci/cs4281.c stable/9/sys/dev/sound/pci/csa.c stable/9/sys/dev/sound/pci/ds1.c stable/9/sys/dev/sound/pci/emu10k1.c stable/9/sys/dev/sound/pci/emu10kx.c stable/9/sys/dev/sound/pci/envy24.c stable/9/sys/dev/sound/pci/envy24ht.c stable/9/sys/dev/sound/pci/es137x.c stable/9/sys/dev/sound/pci/fm801.c stable/9/sys/dev/sound/pci/hdspe.c stable/9/sys/dev/sound/pci/maestro.c stable/9/sys/dev/sound/pci/maestro3.c stable/9/sys/dev/sound/pci/neomagic.c stable/9/sys/dev/sound/pci/solo.c stable/9/sys/dev/sound/pci/t4dwave.c stable/9/sys/dev/sound/pci/via82c686.c stable/9/sys/dev/sound/pci/vibes.c stable/9/sys/dev/stge/if_stge.c stable/9/sys/dev/sym/sym_hipd.c stable/9/sys/dev/tdfx/tdfx_pci.c stable/9/sys/dev/twa/tw_osl_freebsd.c stable/9/sys/dev/tws/tws.c stable/9/sys/dev/ubsec/ubsec.c stable/9/sys/dev/wi/if_wi_pci.c stable/9/sys/pci/ncr.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) Modified: stable/9/sys/dev/aacraid/aacraid_pci.c ============================================================================== --- stable/9/sys/dev/aacraid/aacraid_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/aacraid/aacraid_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -169,18 +169,12 @@ aacraid_pci_attach(device_t dev) /* * Verify that the adapter is correctly set up in PCI space. */ - command = pci_read_config(sc->aac_dev, PCIR_COMMAND, 2); - command |= PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, command, 2); + pci_enable_busmaster(dev); command = pci_read_config(sc->aac_dev, PCIR_COMMAND, 2); if (!(command & PCIM_CMD_BUSMASTEREN)) { device_printf(sc->aac_dev, "can't enable bus-master feature\n"); goto out; } - if ((command & PCIM_CMD_MEMEN) == 0) { - device_printf(sc->aac_dev, "memory window not available\n"); - goto out; - } /* * Detect the hardware interface version, set up the bus interface Modified: stable/9/sys/dev/advansys/adw_pci.c ============================================================================== --- stable/9/sys/dev/advansys/adw_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/advansys/adw_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -199,14 +199,13 @@ adw_pci_attach(device_t dev) { struct adw_softc *adw; struct adw_pci_identity *entry; - u_int32_t command; + u_int16_t command; struct resource *regs; int regs_type; int regs_id; int error; int zero; - command = pci_read_config(dev, PCIR_COMMAND, /*bytes*/1); entry = adw_find_pci_device(dev); if (entry == NULL) return (ENXIO); @@ -214,14 +213,11 @@ adw_pci_attach(device_t dev) regs_type = 0; regs_id = 0; #ifdef ADW_ALLOW_MEMIO - if ((command & PCIM_CMD_MEMEN) != 0) { - regs_type = SYS_RES_MEMORY; - regs_id = ADW_PCI_MEMBASE; - regs = bus_alloc_resource_any(dev, regs_type, - ®s_id, RF_ACTIVE); - } + regs_type = SYS_RES_MEMORY; + regs_id = ADW_PCI_MEMBASE; + regs = bus_alloc_resource_any(dev, regs_type, ®s_id, RF_ACTIVE); #endif - if (regs == NULL && (command & PCIM_CMD_PORTEN) != 0) { + if (regs == NULL) { regs_type = SYS_RES_IOPORT; regs_id = ADW_PCI_IOBASE; regs = bus_alloc_resource_any(dev, regs_type, @@ -296,6 +292,7 @@ adw_pci_attach(device_t dev) * 'control_flag' CONTROL_FLAG_IGNORE_PERR flag to tell the microcode * to ignore DMA parity errors. */ + command = pci_read_config(dev, PCIR_COMMAND, /*bytes*/2); if ((command & PCIM_CMD_PERRESPEN) == 0) adw_lram_write_16(adw, ADW_MC_CONTROL_FLAG, adw_lram_read_16(adw, ADW_MC_CONTROL_FLAG) Modified: stable/9/sys/dev/aic7xxx/ahc_pci.c ============================================================================== --- stable/9/sys/dev/aic7xxx/ahc_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/aic7xxx/ahc_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -139,12 +139,10 @@ int ahc_pci_map_registers(struct ahc_softc *ahc) { struct resource *regs; - u_int command; int regs_type; int regs_id; int allow_memio; - command = aic_pci_read_config(ahc->dev_softc, PCIR_COMMAND, /*bytes*/1); regs = NULL; regs_type = 0; regs_id = 0; @@ -166,7 +164,7 @@ ahc_pci_map_registers(struct ahc_softc * #endif } - if ((allow_memio != 0) && (command & PCIM_CMD_MEMEN) != 0) { + if (allow_memio != 0) { regs_type = SYS_RES_MEMORY; regs_id = AHC_PCI_MEMADDR; @@ -190,16 +188,11 @@ ahc_pci_map_registers(struct ahc_softc * bus_release_resource(ahc->dev_softc, regs_type, regs_id, regs); regs = NULL; - } else { - command &= ~PCIM_CMD_PORTEN; - aic_pci_write_config(ahc->dev_softc, - PCIR_COMMAND, - command, /*bytes*/1); } } } - if (regs == NULL && (command & PCIM_CMD_PORTEN) != 0) { + if (regs == NULL) { regs_type = SYS_RES_IOPORT; regs_id = AHC_PCI_IOADDR; regs = bus_alloc_resource_any(ahc->dev_softc, regs_type, @@ -217,11 +210,6 @@ ahc_pci_map_registers(struct ahc_softc * bus_release_resource(ahc->dev_softc, regs_type, regs_id, regs); regs = NULL; - } else { - command &= ~PCIM_CMD_MEMEN; - aic_pci_write_config(ahc->dev_softc, - PCIR_COMMAND, - command, /*bytes*/1); } } } Modified: stable/9/sys/dev/aic7xxx/ahd_pci.c ============================================================================== --- stable/9/sys/dev/aic7xxx/ahd_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/aic7xxx/ahd_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -143,13 +143,11 @@ ahd_pci_map_registers(struct ahd_softc * { struct resource *regs; struct resource *regs2; - u_int command; int regs_type; int regs_id; int regs_id2; int allow_memio; - command = aic_pci_read_config(ahd->dev_softc, PCIR_COMMAND, /*bytes*/1); regs = NULL; regs2 = NULL; regs_type = 0; @@ -165,8 +163,7 @@ ahd_pci_map_registers(struct ahd_softc * allow_memio = 1; } - if ((command & PCIM_CMD_MEMEN) != 0 - && (ahd->bugs & AHD_PCIX_MMAPIO_BUG) == 0 + if ((ahd->bugs & AHD_PCIX_MMAPIO_BUG) == 0 && allow_memio != 0) { regs_type = SYS_RES_MEMORY; @@ -199,15 +196,10 @@ ahd_pci_map_registers(struct ahd_softc * regs_id, regs); regs = NULL; AHD_CORRECTABLE_ERROR(ahd); - } else { - command &= ~PCIM_CMD_PORTEN; - aic_pci_write_config(ahd->dev_softc, - PCIR_COMMAND, - command, /*bytes*/1); } } } - if (regs == NULL && (command & PCIM_CMD_PORTEN) != 0) { + if (regs == NULL) { regs_type = SYS_RES_IOPORT; regs_id = AHD_PCI_IOADDR0; regs = bus_alloc_resource_any(ahd->dev_softc, regs_type, @@ -233,9 +225,6 @@ ahd_pci_map_registers(struct ahd_softc * } ahd->tags[1] = rman_get_bustag(regs2); ahd->bshs[1] = rman_get_bushandle(regs2); - command &= ~PCIM_CMD_MEMEN; - aic_pci_write_config(ahd->dev_softc, PCIR_COMMAND, - command, /*bytes*/1); ahd->platform_data->regs_res_type[1] = regs_type; ahd->platform_data->regs_res_id[1] = regs_id2; ahd->platform_data->regs[1] = regs2; Modified: stable/9/sys/dev/amr/amr_pci.c ============================================================================== --- stable/9/sys/dev/amr/amr_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/amr/amr_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -184,7 +184,6 @@ amr_pci_attach(device_t dev) struct amr_softc *sc; struct amr_ident *id; int rid, rtype, error; - u_int32_t command; debug_called(1); @@ -204,24 +203,8 @@ amr_pci_attach(device_t dev) if ((id = amr_find_ident(dev)) == NULL) return (ENXIO); - command = pci_read_config(dev, PCIR_COMMAND, 1); if (id->flags & AMR_ID_QUARTZ) { - /* - * Make sure we are going to be able to talk to this board. - */ - if ((command & PCIM_CMD_MEMEN) == 0) { - device_printf(dev, "memory window not available\n"); - return (ENXIO); - } sc->amr_type |= AMR_TYPE_QUARTZ; - } else { - /* - * Make sure we are going to be able to talk to this board. - */ - if ((command & PCIM_CMD_PORTEN) == 0) { - device_printf(dev, "I/O window not available\n"); - return (ENXIO); - } } if ((amr_force_sg32 == 0) && (id->flags & AMR_ID_DO_SG64) && @@ -231,11 +214,7 @@ amr_pci_attach(device_t dev) } /* force the busmaster enable bit on */ - if (!(command & PCIM_CMD_BUSMASTEREN)) { - device_printf(dev, "busmaster bit not set, enabling\n"); - command |= PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, command, 2); - } + pci_enable_busmaster(dev); /* * Allocate the PCI register window. Modified: stable/9/sys/dev/an/if_an_pci.c ============================================================================== --- stable/9/sys/dev/an/if_an_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/an/if_an_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -141,7 +141,6 @@ static int an_attach_pci(dev) device_t dev; { - u_int32_t command; struct an_softc *sc; int flags, error = 0; @@ -153,19 +152,6 @@ an_attach_pci(dev) sc->mpi350 = 1; sc->port_rid = PCIR_BAR(0); } else { - /* - * Map control/status registers. - */ - command = pci_read_config(dev, PCIR_COMMAND, 4); - command |= PCIM_CMD_PORTEN; - pci_write_config(dev, PCIR_COMMAND, command, 4); - command = pci_read_config(dev, PCIR_COMMAND, 4); - - if (!(command & PCIM_CMD_PORTEN)) { - device_printf(dev, "failed to enable I/O ports!\n"); - error = ENXIO; - goto fail; - } sc->port_rid = AN_PCI_LOIO; } error = an_alloc_port(dev, sc->port_rid, 1); Modified: stable/9/sys/dev/arcmsr/arcmsr.c ============================================================================== --- stable/9/sys/dev/arcmsr/arcmsr.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/arcmsr/arcmsr.c Tue Aug 13 22:05:50 2013 (r254306) @@ -4102,8 +4102,7 @@ static u_int32_t arcmsr_initialize(devic pci_command |= PCIM_CMD_BUSMASTEREN; pci_command |= PCIM_CMD_PERRESPEN; pci_command |= PCIM_CMD_MWRICEN; - /* Enable Busmaster/Mem */ - pci_command |= PCIM_CMD_MEMEN; + /* Enable Busmaster */ pci_write_config(dev, PCIR_COMMAND, pci_command, 2); switch(acb->adapter_type) { case ACB_ADAPTER_TYPE_A: { Modified: stable/9/sys/dev/asr/asr.c ============================================================================== --- stable/9/sys/dev/asr/asr.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/asr/asr.c Tue Aug 13 22:05:50 2013 (r254306) @@ -2428,9 +2428,7 @@ asr_attach(device_t dev) return(ENXIO); } /* Enable if not formerly enabled */ - pci_write_config(dev, PCIR_COMMAND, - pci_read_config(dev, PCIR_COMMAND, sizeof(char)) | - PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN, sizeof(char)); + pci_enable_busmaster(dev); sc->ha_pciBusNum = pci_get_bus(dev); sc->ha_pciDeviceNum = (pci_get_slot(dev) << 3) | pci_get_function(dev); Modified: stable/9/sys/dev/ata/ata-pci.c ============================================================================== --- stable/9/sys/dev/ata/ata-pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/ata/ata-pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -99,11 +99,8 @@ ata_pci_attach(device_t dev) ctlr->dev = dev; /* if needed try to enable busmastering */ + pci_enable_busmaster(dev); cmd = pci_read_config(dev, PCIR_COMMAND, 2); - if (!(cmd & PCIM_CMD_BUSMASTEREN)) { - pci_write_config(dev, PCIR_COMMAND, cmd | PCIM_CMD_BUSMASTEREN, 2); - cmd = pci_read_config(dev, PCIR_COMMAND, 2); - } /* if busmastering mode "stuck" use it */ if ((cmd & PCIM_CMD_BUSMASTEREN) == PCIM_CMD_BUSMASTEREN) { Modified: stable/9/sys/dev/bktr/bktr_os.c ============================================================================== --- stable/9/sys/dev/bktr/bktr_os.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/bktr/bktr_os.c Tue Aug 13 22:05:50 2013 (r254306) @@ -318,7 +318,6 @@ bktr_attach( device_t dev ) { u_long latency; u_long fun; - u_long val; unsigned int rev; unsigned int unit; int error = 0; @@ -336,9 +335,7 @@ bktr_attach( device_t dev ) /* * Enable bus mastering and Memory Mapped device */ - val = pci_read_config(dev, PCIR_COMMAND, 4); - val |= (PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN); - pci_write_config(dev, PCIR_COMMAND, val, 4); + pci_enable_busmaster(dev); /* * Map control/status registers. Modified: stable/9/sys/dev/buslogic/bt_pci.c ============================================================================== --- stable/9/sys/dev/buslogic/bt_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/buslogic/bt_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -57,24 +57,19 @@ __FBSDID("$FreeBSD$"); static int bt_pci_alloc_resources(device_t dev) { - int command, type = 0, rid, zero; + int type = 0, rid, zero; struct resource *regs = 0; struct resource *irq = 0; - command = pci_read_config(dev, PCIR_COMMAND, /*bytes*/1); #if 0 /* XXX Memory Mapped I/O seems to cause problems */ - if (command & PCIM_CMD_MEMEN) { - type = SYS_RES_MEMORY; - rid = BT_PCI_MEMADDR; - regs = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); - } + type = SYS_RES_MEMORY; + rid = BT_PCI_MEMADDR; + regs = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); #else - if (!regs && (command & PCIM_CMD_PORTEN)) { - type = SYS_RES_IOPORT; - rid = BT_PCI_IOADDR; - regs = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); - } + type = SYS_RES_IOPORT; + rid = BT_PCI_IOADDR; + regs = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); #endif if (!regs) return (ENOMEM); Modified: stable/9/sys/dev/dpt/dpt_pci.c ============================================================================== --- stable/9/sys/dev/dpt/dpt_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/dpt/dpt_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -77,23 +77,17 @@ dpt_pci_attach (device_t dev) dpt_softc_t * dpt; int error = 0; - u_int32_t command; - dpt = device_get_softc(dev); dpt->dev = dev; dpt_alloc(dev); - command = pci_read_config(dev, PCIR_COMMAND, /*bytes*/1); - #ifdef DPT_ALLOW_MMIO - if ((command & PCIM_CMD_MEMEN) != 0) { - dpt->io_rid = DPT_PCI_MEMADDR; - dpt->io_type = SYS_RES_MEMORY; - dpt->io_res = bus_alloc_resource_any(dev, dpt->io_type, - &dpt->io_rid, RF_ACTIVE); - } + dpt->io_rid = DPT_PCI_MEMADDR; + dpt->io_type = SYS_RES_MEMORY; + dpt->io_res = bus_alloc_resource_any(dev, dpt->io_type, + &dpt->io_rid, RF_ACTIVE); #endif - if (dpt->io_res == NULL && (command & PCIM_CMD_PORTEN) != 0) { + if (dpt->io_res == NULL) { dpt->io_rid = DPT_PCI_IOADDR; dpt->io_type = SYS_RES_IOPORT; dpt->io_res = bus_alloc_resource_any(dev, dpt->io_type, Modified: stable/9/sys/dev/e1000/if_em.c ============================================================================== --- stable/9/sys/dev/e1000/if_em.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/e1000/if_em.c Tue Aug 13 22:05:50 2013 (r254306) @@ -2442,16 +2442,8 @@ em_identify_hardware(struct adapter *ada device_t dev = adapter->dev; /* Make sure our PCI config space has the necessary stuff set */ + pci_enable_busmaster(dev); adapter->hw.bus.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2); - if (!((adapter->hw.bus.pci_cmd_word & PCIM_CMD_BUSMASTEREN) && - (adapter->hw.bus.pci_cmd_word & PCIM_CMD_MEMEN))) { - device_printf(dev, "Memory Access and/or Bus Master bits " - "were not set!\n"); - adapter->hw.bus.pci_cmd_word |= - (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN); - pci_write_config(dev, PCIR_COMMAND, - adapter->hw.bus.pci_cmd_word, 2); - } /* Save off the information about this board */ adapter->hw.vendor_id = pci_get_vendor(dev); Modified: stable/9/sys/dev/e1000/if_igb.c ============================================================================== --- stable/9/sys/dev/e1000/if_igb.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/e1000/if_igb.c Tue Aug 13 22:05:50 2013 (r254306) @@ -2410,16 +2410,8 @@ igb_identify_hardware(struct adapter *ad device_t dev = adapter->dev; /* Make sure our PCI config space has the necessary stuff set */ + pci_enable_busmaster(dev); adapter->hw.bus.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2); - if (!((adapter->hw.bus.pci_cmd_word & PCIM_CMD_BUSMASTEREN) && - (adapter->hw.bus.pci_cmd_word & PCIM_CMD_MEMEN))) { - INIT_DEBUGOUT("Memory Access and/or Bus Master " - "bits were not set!\n"); - adapter->hw.bus.pci_cmd_word |= - (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN); - pci_write_config(dev, PCIR_COMMAND, - adapter->hw.bus.pci_cmd_word, 2); - } /* Save off the information about this board */ adapter->hw.vendor_id = pci_get_vendor(dev); Modified: stable/9/sys/dev/e1000/if_lem.c ============================================================================== --- stable/9/sys/dev/e1000/if_lem.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/e1000/if_lem.c Tue Aug 13 22:05:50 2013 (r254306) @@ -2119,16 +2119,8 @@ lem_identify_hardware(struct adapter *ad device_t dev = adapter->dev; /* Make sure our PCI config space has the necessary stuff set */ + pci_enable_busmaster(dev); adapter->hw.bus.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2); - if (!((adapter->hw.bus.pci_cmd_word & PCIM_CMD_BUSMASTEREN) && - (adapter->hw.bus.pci_cmd_word & PCIM_CMD_MEMEN))) { - device_printf(dev, "Memory Access and/or Bus Master bits " - "were not set!\n"); - adapter->hw.bus.pci_cmd_word |= - (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN); - pci_write_config(dev, PCIR_COMMAND, - adapter->hw.bus.pci_cmd_word, 2); - } /* Save off the information about this board */ adapter->hw.vendor_id = pci_get_vendor(dev); Modified: stable/9/sys/dev/fatm/if_fatm.c ============================================================================== --- stable/9/sys/dev/fatm/if_fatm.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/fatm/if_fatm.c Tue Aug 13 22:05:50 2013 (r254306) @@ -2829,21 +2829,13 @@ fatm_attach(device_t dev) ifp->if_linkmiblen = sizeof(IFP2IFATM(sc->ifp)->mib); /* - * Enable memory and bustmaster + * Enable busmaster */ - cfg = pci_read_config(dev, PCIR_COMMAND, 2); - cfg |= PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, cfg, 2); + pci_enable_busmaster(dev); /* * Map memory */ - cfg = pci_read_config(dev, PCIR_COMMAND, 2); - if (!(cfg & PCIM_CMD_MEMEN)) { - if_printf(ifp, "failed to enable memory mapping\n"); - error = ENXIO; - goto fail; - } sc->memid = 0x10; sc->memres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->memid, RF_ACTIVE); Modified: stable/9/sys/dev/firewire/fwohci_pci.c ============================================================================== --- stable/9/sys/dev/firewire/fwohci_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/firewire/fwohci_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -242,7 +242,7 @@ fwohci_pci_init(device_t self) uint16_t cmd; cmd = pci_read_config(self, PCIR_COMMAND, 2); - cmd |= PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MWRICEN; + cmd |= PCIM_CMD_BUSMASTEREN | PCIM_CMD_MWRICEN; #if 1 /* for broken hardware */ cmd &= ~PCIM_CMD_MWRICEN; #endif Modified: stable/9/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/9/sys/dev/fxp/if_fxp.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/fxp/if_fxp.c Tue Aug 13 22:05:50 2013 (r254306) @@ -452,7 +452,6 @@ fxp_attach(device_t dev) * Enable bus mastering. */ pci_enable_busmaster(dev); - val = pci_read_config(dev, PCIR_COMMAND, 2); /* * Figure out which we should try first - memory mapping or i/o mapping? @@ -610,6 +609,7 @@ fxp_attach(device_t dev) * is a valid cacheline size (8 or 16 dwords), then tell * the board to turn on MWI. */ + val = pci_read_config(dev, PCIR_COMMAND, 2); if (val & PCIM_CMD_MWRICEN && pci_read_config(dev, PCIR_CACHELNSZ, 1) != 0) sc->flags |= FXP_FLAG_MWI_ENABLE; Modified: stable/9/sys/dev/hatm/if_hatm.c ============================================================================== --- stable/9/sys/dev/hatm/if_hatm.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/hatm/if_hatm.c Tue Aug 13 22:05:50 2013 (r254306) @@ -1686,7 +1686,7 @@ hatm_attach(device_t dev) * 4.2 BIOS Configuration */ v = pci_read_config(dev, PCIR_COMMAND, 2); - v |= PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MWRICEN; + v |= PCIM_CMD_BUSMASTEREN | PCIM_CMD_MWRICEN; pci_write_config(dev, PCIR_COMMAND, v, 2); /* @@ -1702,12 +1702,6 @@ hatm_attach(device_t dev) /* * Map memory */ - v = pci_read_config(dev, PCIR_COMMAND, 2); - if (!(v & PCIM_CMD_MEMEN)) { - device_printf(dev, "failed to enable memory\n"); - error = ENXIO; - goto failed; - } sc->memid = PCIR_BAR(0); sc->memres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->memid, RF_ACTIVE); Modified: stable/9/sys/dev/ida/ida_pci.c ============================================================================== --- stable/9/sys/dev/ida/ida_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/ida/ida_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -236,19 +236,8 @@ ida_pci_attach(device_t dev) struct ida_board *board = ida_pci_match(dev); u_int32_t id = pci_get_devid(dev); struct ida_softc *ida; - u_int command; int error, rid; - command = pci_read_config(dev, PCIR_COMMAND, 1); - - /* - * it appears that this board only does MEMIO access. - */ - if ((command & PCIM_CMD_MEMEN) == 0) { - device_printf(dev, "Only memory mapped I/O is supported\n"); - return (ENXIO); - } - ida = (struct ida_softc *)device_get_softc(dev); ida->dev = dev; ida->cmd = *board->accessor; Modified: stable/9/sys/dev/ips/ips_pci.c ============================================================================== --- stable/9/sys/dev/ips/ips_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/ips/ips_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -59,7 +59,6 @@ static int ips_pci_probe(device_t dev) static int ips_pci_attach(device_t dev) { - u_int32_t command; ips_softc_t *sc; @@ -95,22 +94,18 @@ static int ips_pci_attach(device_t dev) } else goto error; /* make sure busmastering is on */ - command = pci_read_config(dev, PCIR_COMMAND, 1); - command |= PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, command, 1); + pci_enable_busmaster(dev); /* seting up io space */ sc->iores = NULL; - if(command & PCIM_CMD_MEMEN){ - PRINTF(10, "trying MEMIO\n"); - if(pci_get_device(dev) == IPS_COPPERHEAD_DEVICE_ID) - sc->rid = PCIR_BAR(1); - else - sc->rid = PCIR_BAR(0); - sc->iotype = SYS_RES_MEMORY; - sc->iores = bus_alloc_resource_any(dev, sc->iotype, - &sc->rid, RF_ACTIVE); - } - if(!sc->iores && command & PCIM_CMD_PORTEN){ + PRINTF(10, "trying MEMIO\n"); + if(pci_get_device(dev) == IPS_COPPERHEAD_DEVICE_ID) + sc->rid = PCIR_BAR(1); + else + sc->rid = PCIR_BAR(0); + sc->iotype = SYS_RES_MEMORY; + sc->iores = bus_alloc_resource_any(dev, sc->iotype, &sc->rid, + RF_ACTIVE); + if(!sc->iores){ PRINTF(10, "trying PORTIO\n"); sc->rid = PCIR_BAR(0); sc->iotype = SYS_RES_IOPORT; Modified: stable/9/sys/dev/isp/isp_pci.c ============================================================================== --- stable/9/sys/dev/isp/isp_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/isp/isp_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -706,13 +706,10 @@ isp_pci_attach(device_t dev) pcs->irq = pcs->regs = NULL; pcs->rgd = pcs->rtp = pcs->iqd = 0; - cmd = pci_read_config(dev, PCIR_COMMAND, 2); - if (cmd & m1) { - pcs->rtp = (m1 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; - pcs->rgd = (m1 == PCIM_CMD_MEMEN)? MEM_MAP_REG : IO_MAP_REG; - pcs->regs = bus_alloc_resource_any(dev, pcs->rtp, &pcs->rgd, RF_ACTIVE); - } - if (pcs->regs == NULL && (cmd & m2)) { + pcs->rtp = (m1 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; + pcs->rgd = (m1 == PCIM_CMD_MEMEN)? MEM_MAP_REG : IO_MAP_REG; + pcs->regs = bus_alloc_resource_any(dev, pcs->rtp, &pcs->rgd, RF_ACTIVE); + if (pcs->regs == NULL) { pcs->rtp = (m2 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; pcs->rgd = (m2 == PCIM_CMD_MEMEN)? MEM_MAP_REG : IO_MAP_REG; pcs->regs = bus_alloc_resource_any(dev, pcs->rtp, &pcs->rgd, RF_ACTIVE); @@ -891,6 +888,7 @@ isp_pci_attach(device_t dev) /* * Make sure that SERR, PERR, WRITE INVALIDATE and BUSMASTER are set. */ + cmd = pci_read_config(dev, PCIR_COMMAND, 2); cmd |= PCIM_CMD_SEREN | PCIM_CMD_PERRESPEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_INVEN; if (IS_2300(isp)) { /* per QLogic errata */ cmd &= ~PCIM_CMD_INVEN; Modified: stable/9/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/9/sys/dev/iwn/if_iwn.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/iwn/if_iwn.c Tue Aug 13 22:05:50 2013 (r254306) @@ -455,12 +455,12 @@ iwn_attach(device_t dev) pci_write_config(dev, 0x41, 0, 1); /* Hardware bug workaround. */ - reg = pci_read_config(dev, PCIR_COMMAND, 1); + reg = pci_read_config(dev, PCIR_COMMAND, 2); if (reg & PCIM_CMD_INTxDIS) { DPRINTF(sc, IWN_DEBUG_RESET, "%s: PCIe INTx Disable set\n", __func__); reg &= ~PCIM_CMD_INTxDIS; - pci_write_config(dev, PCIR_COMMAND, reg, 1); + pci_write_config(dev, PCIR_COMMAND, reg, 2); } /* Enable bus-mastering. */ Modified: stable/9/sys/dev/ixgb/if_ixgb.c ============================================================================== --- stable/9/sys/dev/ixgb/if_ixgb.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/ixgb/if_ixgb.c Tue Aug 13 22:05:50 2013 (r254306) @@ -1209,15 +1209,9 @@ ixgb_identify_hardware(struct adapter * device_t dev = adapter->dev; /* Make sure our PCI config space has the necessary stuff set */ + pci_enable_busmaster(dev); adapter->hw.pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2); - if (!((adapter->hw.pci_cmd_word & PCIM_CMD_BUSMASTEREN) && - (adapter->hw.pci_cmd_word & PCIM_CMD_MEMEN))) { - device_printf(dev, - "Memory Access and/or Bus Master bits were not set!\n"); - adapter->hw.pci_cmd_word |= - (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN); - pci_write_config(dev, PCIR_COMMAND, adapter->hw.pci_cmd_word, 2); - } + /* Save off the information about this board */ adapter->hw.vendor_id = pci_get_vendor(dev); adapter->hw.device_id = pci_get_device(dev); Modified: stable/9/sys/dev/ixgbe/ixv.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixv.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/ixgbe/ixv.c Tue Aug 13 22:05:50 2013 (r254306) @@ -1561,14 +1561,8 @@ ixv_identify_hardware(struct adapter *ad ** Make sure BUSMASTER is set, on a VM under ** KVM it may not be and will break things. */ + pci_enable_busmaster(dev); pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2); - if (!((pci_cmd_word & PCIM_CMD_BUSMASTEREN) && - (pci_cmd_word & PCIM_CMD_MEMEN))) { - INIT_DEBUGOUT("Memory Access and/or Bus Master " - "bits were not set!\n"); - pci_cmd_word |= (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN); - pci_write_config(dev, PCIR_COMMAND, pci_cmd_word, 2); - } /* Save off the information about this board */ adapter->hw.vendor_id = pci_get_vendor(dev); Modified: stable/9/sys/dev/mfi/mfi_pci.c ============================================================================== --- stable/9/sys/dev/mfi/mfi_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/mfi/mfi_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -187,7 +187,6 @@ mfi_pci_attach(device_t dev) { struct mfi_softc *sc; struct mfi_ident *m; - uint32_t command; int count, error; sc = device_get_softc(dev); @@ -196,19 +195,8 @@ mfi_pci_attach(device_t dev) m = mfi_find_ident(dev); sc->mfi_flags = m->flags; - /* Verify that the adapter can be set up in PCI space */ - command = pci_read_config(dev, PCIR_COMMAND, 2); - command |= PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, command, 2); - command = pci_read_config(dev, PCIR_COMMAND, 2); - if ((command & PCIM_CMD_BUSMASTEREN) == 0) { - device_printf(dev, "Can't enable PCI busmaster\n"); - return (ENXIO); - } - if ((command & PCIM_CMD_MEMEN) == 0) { - device_printf(dev, "PCI memory window not available\n"); - return (ENXIO); - } + /* Ensure busmastering is enabled */ + pci_enable_busmaster(dev); /* Allocate PCI registers */ if ((sc->mfi_flags & MFI_FLAGS_1064R) || Modified: stable/9/sys/dev/mlx/mlx_pci.c ============================================================================== --- stable/9/sys/dev/mlx/mlx_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/mlx/mlx_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -113,21 +113,11 @@ mlx_pci_attach(device_t dev) { struct mlx_softc *sc; int i, error; - u_int32_t command; debug_called(1); - /* - * Make sure we are going to be able to talk to this board. - */ - command = pci_read_config(dev, PCIR_COMMAND, 2); - if ((command & PCIM_CMD_MEMEN) == 0) { - device_printf(dev, "memory window not available\n"); - return(ENXIO); - } /* force the busmaster enable bit on */ - command |= PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, command, 2); + pci_enable_busmaster(dev); /* * Initialise softc. Modified: stable/9/sys/dev/mly/mly.c ============================================================================== --- stable/9/sys/dev/mly/mly.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/mly/mly.c Tue Aug 13 22:05:50 2013 (r254306) @@ -333,7 +333,6 @@ static int mly_pci_attach(struct mly_softc *sc) { int i, error; - u_int32_t command; debug_called(1); @@ -342,21 +341,8 @@ mly_pci_attach(struct mly_softc *sc) /* * Verify that the adapter is correctly set up in PCI space. - * - * XXX we shouldn't do this; the PCI code should. */ - command = pci_read_config(sc->mly_dev, PCIR_COMMAND, 2); - command |= PCIM_CMD_BUSMASTEREN; - pci_write_config(sc->mly_dev, PCIR_COMMAND, command, 2); - command = pci_read_config(sc->mly_dev, PCIR_COMMAND, 2); - if (!(command & PCIM_CMD_BUSMASTEREN)) { - mly_printf(sc, "can't enable busmaster feature\n"); - goto fail; - } - if ((command & PCIM_CMD_MEMEN) == 0) { - mly_printf(sc, "memory window not available\n"); - goto fail; - } + pci_enable_busmaster(sc->mly_dev); /* * Allocate the PCI register window. Modified: stable/9/sys/dev/mn/if_mn.c ============================================================================== --- stable/9/sys/dev/mn/if_mn.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/mn/if_mn.c Tue Aug 13 22:05:50 2013 (r254306) @@ -1364,9 +1364,9 @@ mn_attach (device_t self) return(ENXIO); } - u = pci_read_config(self, PCIR_COMMAND, 1); + u = pci_read_config(self, PCIR_COMMAND, 2); printf("%x\n", u); - pci_write_config(self, PCIR_COMMAND, u | PCIM_CMD_PERRESPEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN, 1); + pci_write_config(self, PCIR_COMMAND, u | PCIM_CMD_PERRESPEN | PCIM_CMD_BUSMASTEREN, 2); #if 0 pci_write_config(self, PCIR_COMMAND, 0x02800046, 4); #endif Modified: stable/9/sys/dev/mps/mps_pci.c ============================================================================== --- stable/9/sys/dev/mps/mps_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/mps/mps_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -183,7 +183,6 @@ mps_pci_attach(device_t dev) { struct mps_softc *sc; struct mps_ident *m; - uint16_t command; int error; sc = device_get_softc(dev); @@ -193,18 +192,7 @@ mps_pci_attach(device_t dev) sc->mps_flags = m->flags; /* Twiddle basic PCI config bits for a sanity check */ - command = pci_read_config(dev, PCIR_COMMAND, 2); - command |= PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, command, 2); - command = pci_read_config(dev, PCIR_COMMAND, 2); - if ((command & PCIM_CMD_BUSMASTEREN) == 0) { - device_printf(dev, "Cannot enable PCI busmaster\n"); - return (ENXIO); - } - if ((command & PCIM_CMD_MEMEN) == 0) { - device_printf(dev, "PCI memory window not available\n"); - return (ENXIO); - } + pci_enable_busmaster(dev); /* Allocate the System Interface Register Set */ sc->mps_regs_rid = PCIR_BAR(1); Modified: stable/9/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/9/sys/dev/mpt/mpt_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/mpt/mpt_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -394,16 +394,11 @@ mpt_pci_attach(device_t dev) /* Print INFO level (if any) if bootverbose is set */ mpt->verbose += (bootverbose != 0)? 1 : 0; } - /* Make sure memory access decoders are enabled */ - cmd = pci_read_config(dev, PCIR_COMMAND, 2); - if ((cmd & PCIM_CMD_MEMEN) == 0) { - device_printf(dev, "Memory accesses disabled"); - return (ENXIO); - } /* * Make sure that SERR, PERR, WRITE INVALIDATE and BUSMASTER are set. */ + cmd = pci_read_config(dev, PCIR_COMMAND, 2); cmd |= PCIM_CMD_SERRESPEN | PCIM_CMD_PERRESPEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MWRICEN; Modified: stable/9/sys/dev/mwl/if_mwl_pci.c ============================================================================== --- stable/9/sys/dev/mwl/if_mwl_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/mwl/if_mwl_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -120,29 +120,6 @@ mwl_pci_probe(device_t dev) return ENXIO; } -static u_int32_t -mwl_pci_setup(device_t dev) -{ - u_int32_t cmd; - - /* - * Enable memory mapping and bus mastering. - */ - cmd = pci_read_config(dev, PCIR_COMMAND, 4); - cmd |= PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, cmd, 4); - cmd = pci_read_config(dev, PCIR_COMMAND, 4); - if ((cmd & PCIM_CMD_MEMEN) == 0) { - device_printf(dev, "failed to enable memory mapping\n"); - return 0; - } - if ((cmd & PCIM_CMD_BUSMASTEREN) == 0) { - device_printf(dev, "failed to enable bus mastering\n"); - return 0; - } - return 1; -} - static int mwl_pci_attach(device_t dev) { @@ -152,11 +129,8 @@ mwl_pci_attach(device_t dev) sc->sc_dev = dev; - /* - * Enable memory mapping and bus mastering. - */ - if (!mwl_pci_setup(dev)) - return 0; + pci_enable_busmaster(dev); + /* * Setup memory-mapping of PCI registers. */ @@ -285,8 +259,7 @@ mwl_pci_resume(device_t dev) { struct mwl_pci_softc *psc = device_get_softc(dev); - if (!mwl_pci_setup(dev)) - return ENXIO; + pci_enable_busmaster(dev); mwl_resume(&psc->sc_sc); Modified: stable/9/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/9/sys/dev/mxge/if_mxge.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/mxge/if_mxge.c Tue Aug 13 22:05:50 2013 (r254306) @@ -3826,7 +3826,7 @@ mxge_setup_cfg_space(mxge_softc_t *sc) { device_t dev = sc->dev; int reg; - uint16_t cmd, lnk, pectl; + uint16_t lnk, pectl; /* find the PCIe link width and set max read request to 4KB*/ if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { @@ -3846,9 +3846,6 @@ mxge_setup_cfg_space(mxge_softc_t *sc) /* Enable DMA and Memory space access */ pci_enable_busmaster(dev); - cmd = pci_read_config(dev, PCIR_COMMAND, 2); - cmd |= PCIM_CMD_MEMEN; - pci_write_config(dev, PCIR_COMMAND, cmd, 2); } static uint32_t Modified: stable/9/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- stable/9/sys/dev/pccbb/pccbb_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/pccbb/pccbb_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -471,10 +471,7 @@ cbb_chipinit(struct cbb_softc *sc) pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->subbus, 1); /* Enable memory access */ - PCI_MASK_CONFIG(sc->dev, PCIR_COMMAND, - | PCIM_CMD_MEMEN - | PCIM_CMD_PORTEN - | PCIM_CMD_BUSMASTEREN, 2); + pci_enable_busmaster(sc->dev); /* disable Legacy IO */ switch (sc->chipset) { Modified: stable/9/sys/dev/pst/pst-pci.c ============================================================================== --- stable/9/sys/dev/pst/pst-pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/pst/pst-pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -88,9 +88,7 @@ iop_pci_attach(device_t dev) RF_SHAREABLE | RF_ACTIVE); /* now setup the infrastructure to talk to the device */ - pci_write_config(dev, PCIR_COMMAND, - pci_read_config(dev, PCIR_COMMAND, 1) | - PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN, 1); + pci_enable_busmaster(dev); sc->ibase = rman_get_virtual(sc->r_mem); sc->reg = (struct i2o_registers *)sc->ibase; Modified: stable/9/sys/dev/rp/rp_pci.c ============================================================================== --- stable/9/sys/dev/rp/rp_pci.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/rp/rp_pci.c Tue Aug 13 22:05:50 2013 (r254306) @@ -151,7 +151,6 @@ rp_pciattach(device_t dev) CONTROLLER_t *ctlp; int unit; int retval; - u_int32_t stcmd; ctlp = device_get_softc(dev); bzero(ctlp, sizeof(*ctlp)); @@ -161,13 +160,6 @@ rp_pciattach(device_t dev) ctlp->aiop2off = rp_pci_aiop2off; ctlp->ctlmask = rp_pci_ctlmask; - /* Wake up the device. */ - stcmd = pci_read_config(dev, PCIR_COMMAND, 4); - if ((stcmd & PCIM_CMD_PORTEN) == 0) { - stcmd |= (PCIM_CMD_PORTEN); - pci_write_config(dev, PCIR_COMMAND, 4, stcmd); - } - /* The IO ports of AIOPs for a PCI controller are continuous. */ ctlp->io_num = 1; ctlp->io_rid = malloc(sizeof(*(ctlp->io_rid)) * ctlp->io_num, M_DEVBUF, M_NOWAIT | M_ZERO); Modified: stable/9/sys/dev/safe/safe.c ============================================================================== --- stable/9/sys/dev/safe/safe.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/safe/safe.c Tue Aug 13 22:05:50 2013 (r254306) @@ -220,28 +220,15 @@ safe_attach(device_t dev) { struct safe_softc *sc = device_get_softc(dev); u_int32_t raddr; - u_int32_t cmd, i, devinfo; + u_int32_t i, devinfo; int rid; bzero(sc, sizeof (*sc)); sc->sc_dev = dev; /* XXX handle power management */ - - cmd = pci_read_config(dev, PCIR_COMMAND, 4); - cmd |= PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN; - pci_write_config(dev, PCIR_COMMAND, cmd, 4); - cmd = pci_read_config(dev, PCIR_COMMAND, 4); - if (!(cmd & PCIM_CMD_MEMEN)) { - device_printf(dev, "failed to enable memory mapping\n"); - goto bad; - } - - if (!(cmd & PCIM_CMD_BUSMASTEREN)) { - device_printf(dev, "failed to enable bus mastering\n"); - goto bad; - } + pci_enable_busmaster(dev); /* * Setup memory-mapping of PCI registers. Modified: stable/9/sys/dev/sound/pci/als4000.c ============================================================================== --- stable/9/sys/dev/sound/pci/als4000.c Tue Aug 13 22:05:10 2013 (r254305) +++ stable/9/sys/dev/sound/pci/als4000.c Tue Aug 13 22:05:50 2013 (r254306) @@ -806,16 +806,13 @@ static int als_pci_attach(device_t dev) { struct sc_info *sc; - u_int32_t data; char status[SND_STATUSLEN]; sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO); sc->lock = snd_mtxcreate(device_get_nameunit(dev), "snd_als4000 softc"); sc->dev = dev; - data = pci_read_config(dev, PCIR_COMMAND, 2); - data |= (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); - pci_write_config(dev, PCIR_COMMAND, data, 2); + pci_enable_busmaster(dev); /* * By default the power to the various components on the * ALS4000 is entirely controlled by the pci powerstate. We *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Aug 14 01:55:01 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C7F0386D; Wed, 14 Aug 2013 01:55:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B430F2549; Wed, 14 Aug 2013 01:55:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7E1t1xY025221; Wed, 14 Aug 2013 01:55:01 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7E1t1kZ025220; Wed, 14 Aug 2013 01:55:01 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201308140155.r7E1t1kZ025220@svn.freebsd.org> From: Mark Johnston Date: Wed, 14 Aug 2013 01:55:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254310 - stable/9/sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 01:55:01 -0000 Author: markj Date: Wed Aug 14 01:55:01 2013 New Revision: 254310 URL: http://svnweb.freebsd.org/changeset/base/254310 Log: MFC r254020: Add a missing module version declaration to if_tun(4). Modified: stable/9/sys/net/if_tun.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/if_tun.c ============================================================================== --- stable/9/sys/net/if_tun.c Wed Aug 14 00:42:21 2013 (r254309) +++ stable/9/sys/net/if_tun.c Wed Aug 14 01:55:01 2013 (r254310) @@ -322,6 +322,7 @@ static moduledata_t tun_mod = { }; DECLARE_MODULE(if_tun, tun_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); +MODULE_VERSION(if_tun, 1); static void tunstart(struct ifnet *ifp) From owner-svn-src-stable@FreeBSD.ORG Wed Aug 14 01:55:45 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6E2CC9A3; Wed, 14 Aug 2013 01:55:45 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B30B2554; Wed, 14 Aug 2013 01:55:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7E1tjVd025357; Wed, 14 Aug 2013 01:55:45 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7E1tjgI025356; Wed, 14 Aug 2013 01:55:45 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201308140155.r7E1tjgI025356@svn.freebsd.org> From: Mark Johnston Date: Wed, 14 Aug 2013 01:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r254311 - stable/8/sys/net X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 01:55:45 -0000 Author: markj Date: Wed Aug 14 01:55:44 2013 New Revision: 254311 URL: http://svnweb.freebsd.org/changeset/base/254311 Log: MFC r254020: Add a missing module version declaration to if_tun(4). Modified: stable/8/sys/net/if_tun.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/net/ (props changed) Modified: stable/8/sys/net/if_tun.c ============================================================================== --- stable/8/sys/net/if_tun.c Wed Aug 14 01:55:01 2013 (r254310) +++ stable/8/sys/net/if_tun.c Wed Aug 14 01:55:44 2013 (r254311) @@ -322,6 +322,7 @@ static moduledata_t tun_mod = { }; DECLARE_MODULE(if_tun, tun_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); +MODULE_VERSION(if_tun, 1); static void tunstart(struct ifnet *ifp) From owner-svn-src-stable@FreeBSD.ORG Wed Aug 14 02:00:38 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 55586B04; Wed, 14 Aug 2013 02:00:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 42C88259A; Wed, 14 Aug 2013 02:00:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7E20c1u028213; Wed, 14 Aug 2013 02:00:38 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7E20cJb028212; Wed, 14 Aug 2013 02:00:38 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201308140200.r7E20cJb028212@svn.freebsd.org> From: Mark Johnston Date: Wed, 14 Aug 2013 02:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254312 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 02:00:38 -0000 Author: markj Date: Wed Aug 14 02:00:37 2013 New Revision: 254312 URL: http://svnweb.freebsd.org/changeset/base/254312 Log: MFC r254017: Fill in the description fields for M_FICT_PAGES. Modified: stable/9/sys/vm/vm_phys.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_phys.c ============================================================================== --- stable/9/sys/vm/vm_phys.c Wed Aug 14 01:55:44 2013 (r254311) +++ stable/9/sys/vm/vm_phys.c Wed Aug 14 02:00:37 2013 (r254312) @@ -90,7 +90,7 @@ static struct vm_phys_fictitious_seg { vm_page_t first_page; } vm_phys_fictitious_segs[VM_PHYS_FICTITIOUS_NSEGS]; static struct mtx vm_phys_fictitious_reg_mtx; -MALLOC_DEFINE(M_FICT_PAGES, "", ""); +MALLOC_DEFINE(M_FICT_PAGES, "vm_fictitious", "Fictitious VM pages"); static struct vm_freelist vm_phys_free_queues[VM_RAW_NFREELIST][VM_NFREEPOOL][VM_NFREEORDER]; From owner-svn-src-stable@FreeBSD.ORG Wed Aug 14 02:36:21 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DE93640C; Wed, 14 Aug 2013 02:36:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B240D276E; Wed, 14 Aug 2013 02:36:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7E2aLOx041014; Wed, 14 Aug 2013 02:36:21 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7E2aLg3041009; Wed, 14 Aug 2013 02:36:21 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201308140236.r7E2aLg3041009@svn.freebsd.org> From: Mark Johnston Date: Wed, 14 Aug 2013 02:36:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254313 - stable/9/usr.bin/truss X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 02:36:22 -0000 Author: markj Date: Wed Aug 14 02:36:21 2013 New Revision: 254313 URL: http://svnweb.freebsd.org/changeset/base/254313 Log: MFC r253850: Properly print arguments to vfork(2) and rfork(2). Modified: stable/9/usr.bin/truss/syscall.h stable/9/usr.bin/truss/syscalls.c Directory Properties: stable/9/usr.bin/truss/ (props changed) Modified: stable/9/usr.bin/truss/syscall.h ============================================================================== --- stable/9/usr.bin/truss/syscall.h Wed Aug 14 02:00:37 2013 (r254312) +++ stable/9/usr.bin/truss/syscall.h Wed Aug 14 02:36:21 2013 (r254313) @@ -40,7 +40,7 @@ enum Argtype { None = 1, Hex, Octal, Int Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, Umtx, Sigset, Sigprocmask, Kevent, Sockdomain, Socktype, Open, Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2, - Pathconf }; + Pathconf, Rforkflags }; #define ARG_MASK 0xff #define OUT 0x100 Modified: stable/9/usr.bin/truss/syscalls.c ============================================================================== --- stable/9/usr.bin/truss/syscalls.c Wed Aug 14 02:00:37 2013 (r254312) +++ stable/9/usr.bin/truss/syscalls.c Wed Aug 14 02:36:21 2013 (r254313) @@ -93,6 +93,9 @@ struct syscall syscalls[] = { { .name = "fcntl", .ret_type = 1, .nargs = 3, .args = { { Int, 0 } , { Fcntl, 1 }, { Fcntlflag | OUT, 2 } } }, { .name = "fork", .ret_type = 1, .nargs = 0 }, + { .name = "vfork", .ret_type = 1, .nargs = 0 }, + { .name = "rfork", .ret_type = 1, .nargs = 1, + .args = { { Rforkflags, 0 } } }, { .name = "getegid", .ret_type = 1, .nargs = 0 }, { .name = "geteuid", .ret_type = 1, .nargs = 0 }, { .name = "getgid", .ret_type = 1, .nargs = 0 }, @@ -369,6 +372,11 @@ static struct xlat pathconf_arg[] = { XEND }; +static struct xlat rfork_flags[] = { + X(RFPROC) X(RFNOWAIT) X(RFFDG) X(RFCFDG) X(RFTHREAD) X(RFMEM) + X(RFSIGSHARE) X(RFTSIGZMB) X(RFLINUXTHPN) XEND +}; + #undef X #undef XEND @@ -906,6 +914,9 @@ print_arg(struct syscall_args *sc, unsig case Pathconf: tmp = strdup(xlookup(pathconf_arg, args[sc->offset])); break; + case Rforkflags: + tmp = strdup(xlookup_bits(rfork_flags, args[sc->offset])); + break; case Sockaddr: { struct sockaddr_storage ss; char addr[64]; From owner-svn-src-stable@FreeBSD.ORG Wed Aug 14 02:37:08 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 69F6C541; Wed, 14 Aug 2013 02:37:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3D00E2777; Wed, 14 Aug 2013 02:37:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7E2b8B2041207; Wed, 14 Aug 2013 02:37:08 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7E2b7OG041200; Wed, 14 Aug 2013 02:37:07 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201308140237.r7E2b7OG041200@svn.freebsd.org> From: Mark Johnston Date: Wed, 14 Aug 2013 02:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r254314 - stable/8/usr.bin/truss X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 02:37:08 -0000 Author: markj Date: Wed Aug 14 02:37:07 2013 New Revision: 254314 URL: http://svnweb.freebsd.org/changeset/base/254314 Log: MFC r253850: Properly print arguments to vfork(2) and rfork(2). Modified: stable/8/usr.bin/truss/syscall.h stable/8/usr.bin/truss/syscalls.c Directory Properties: stable/8/usr.bin/truss/ (props changed) Modified: stable/8/usr.bin/truss/syscall.h ============================================================================== --- stable/8/usr.bin/truss/syscall.h Wed Aug 14 02:36:21 2013 (r254313) +++ stable/8/usr.bin/truss/syscall.h Wed Aug 14 02:37:07 2013 (r254314) @@ -40,7 +40,7 @@ enum Argtype { None = 1, Hex, Octal, Int Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, Umtx, Sigset, Sigprocmask, Kevent, Sockdomain, Socktype, Open, Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2, - Pathconf }; + Pathconf, Rforkflags }; #define ARG_MASK 0xff #define OUT 0x100 Modified: stable/8/usr.bin/truss/syscalls.c ============================================================================== --- stable/8/usr.bin/truss/syscalls.c Wed Aug 14 02:36:21 2013 (r254313) +++ stable/8/usr.bin/truss/syscalls.c Wed Aug 14 02:37:07 2013 (r254314) @@ -93,6 +93,9 @@ struct syscall syscalls[] = { { .name = "fcntl", .ret_type = 1, .nargs = 3, .args = { { Int, 0 } , { Fcntl, 1 }, { Fcntlflag | OUT, 2 } } }, { .name = "fork", .ret_type = 1, .nargs = 0 }, + { .name = "vfork", .ret_type = 1, .nargs = 0 }, + { .name = "rfork", .ret_type = 1, .nargs = 1, + .args = { { Rforkflags, 0 } } }, { .name = "getegid", .ret_type = 1, .nargs = 0 }, { .name = "geteuid", .ret_type = 1, .nargs = 0 }, { .name = "getgid", .ret_type = 1, .nargs = 0 }, @@ -367,6 +370,11 @@ static struct xlat pathconf_arg[] = { XEND }; +static struct xlat rfork_flags[] = { + X(RFPROC) X(RFNOWAIT) X(RFFDG) X(RFCFDG) X(RFTHREAD) X(RFMEM) + X(RFSIGSHARE) X(RFTSIGZMB) X(RFLINUXTHPN) XEND +}; + #undef X #undef XEND @@ -882,6 +890,9 @@ print_arg(struct syscall_args *sc, unsig case Pathconf: tmp = strdup(xlookup(pathconf_arg, args[sc->offset])); break; + case Rforkflags: + tmp = strdup(xlookup_bits(rfork_flags, args[sc->offset])); + break; case Sockaddr: { struct sockaddr_storage ss; char addr[64]; From owner-svn-src-stable@FreeBSD.ORG Wed Aug 14 16:15:14 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D24F0C0F; Wed, 14 Aug 2013 16:15:14 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AFDBE24DE; Wed, 14 Aug 2013 16:15:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7EGFEkb027210; Wed, 14 Aug 2013 16:15:14 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7EGFErK027209; Wed, 14 Aug 2013 16:15:14 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201308141615.r7EGFErK027209@svn.freebsd.org> From: Devin Teske Date: Wed, 14 Aug 2013 16:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254331 - stable/9/sys/boot/forth X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 16:15:14 -0000 Author: dteske Date: Wed Aug 14 16:15:14 2013 New Revision: 254331 URL: http://svnweb.freebsd.org/changeset/base/254331 Log: MFC r254237: Add optional support for default override of standard setup; but only if corresponding functions are provided. If override function does not exist, boot remains unmodified. This patch should not result in any changes. Modified: stable/9/sys/boot/forth/beastie.4th Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) Modified: stable/9/sys/boot/forth/beastie.4th ============================================================================== --- stable/9/sys/boot/forth/beastie.4th Wed Aug 14 15:50:34 2013 (r254330) +++ stable/9/sys/boot/forth/beastie.4th Wed Aug 14 16:15:14 2013 (r254331) @@ -123,6 +123,76 @@ variable logoY 0 25 at-xy ; +: tribute-art ( x y -- ) \ see tribute[bw]-logo + + \ Disable the brand art (we're going to use that space) + s" set loader_brand=none" evaluate + + \ Blank out the frame of the menu and move the title to left + s" set loader_menu_title=" evaluate + s" set loader_menu_frame=none" evaluate + + \ Move the menu to the center of the screen + s" set loader_menu_x=26" evaluate + s" set loader_menu_y=13" evaluate + s" set loader_menu_timeout_x=21" evaluate + s" set loader_menu_timeout_y=24" evaluate + + 2 - swap 39 - swap \ top-left (see `fbsdbw-logo' comments above) + + 2dup at-xy 11 spaces ." ,d b." 1+ + 2dup at-xy ." ,d88] [88b." 1+ + 2dup at-xy ." ,d888P" 34 emit ." ,d88b. " 34 emit ." Y888b." 1+ + 2dup at-xy ." , <888P" 34 emit ." ,dP" 34 emit ." ,db." 34 emit + ." Yb. " 34 emit ." Y888> ," 1+ + 2dup at-xy ." <88b.~ ,d888 " 34 emit ." YP" 34 emit + ." 888b. ~,d88>" 1+ + 2dup at-xy ." ," 34 emit ." Y888888P" 34 emit ." ,db.,db." 34 emit + ." Y888888P" 34 emit ." ," 1+ + 2dup at-xy ." <88b." 34 emit ." YP" 34 emit ." _ " 34 emit + ." YP" 34 emit 34 emit ." YP" 34 emit ." _ " 34 emit + ." YP" 34 emit ." ,d88>" 1+ + 2dup at-xy ." " 34 emit ." Y88b.,dP Yb.,d88P" 34 emit 1+ + at-xy ." " 34 emit ." YP" 34 emit ." " 34 emit + ." YP" 34 emit ." " +; + +: tribute-text ( x y -- ) \ see tribute[bw]-logo + + swap 2 - swap \ beastie adjustment (see `fbsdbw-logo' comments above) + + 2dup at-xy ." CEO Workstation" 1+ + 1+ + 2dup at-xy ." Nakatomi Socrates FreeBSD 9.2" 1+ + 2dup at-xy ." Z-Level Central Core" 1+ + 1+ + at-xy ." Preliminary Clearance Approved." +; + +: tribute-logo ( x y -- ) \ color Socrates tribute (16 rows x 32 columns) + + \ Produce the tribute art in bright green + 2dup at-xy ." " 2dup tribute-art ." " + + \ Produce the tribute text in regular green + 2dup at-xy ." " 2dup tribute-text ." " + + \ Distinguish the ``Free'' in tribute-text + 2 + swap 16 + swap at-xy ." Free" + + \ Put the cursor back at the bottom + 0 25 at-xy +; + +: tributebw-logo ( x y -- ) \ Socrates tribute (16 rows x 32 columns) + + \ Produce the tribute art and text + 2dup tribute-art tribute-text + + \ Put the cursor back at the bottom + 0 25 at-xy +; + : orb-logo ( x y -- ) \ color Orb mascot (15 rows x 30 columns) 3 + \ beastie adjustment (see `fbsdbw-logo' comments above) @@ -181,8 +251,10 @@ variable logoY \ beastie Color ``Helper Daemon'' mascot (19 rows x 34 columns) \ beastiebw B/W ``Helper Daemon'' mascot (19 rows x 34 columns) \ fbsdbw "FreeBSD" logo in B/W (13 rows x 21 columns) -\ orb Color ``Orb'' mascot (15 rows x 30 columns) (default) +\ orb Color ``Orb'' mascot (15 rows x 30 columns) (2nd default) \ orbbw B/W ``Orb'' mascot (15 rows x 32 columns) +\ tribute Color ``Tribute'' (must fit 19 rows x 34 columns) (default) +\ tributebw B/W ``Tribute'' (must fit 19 rows x 34 columns) \ \ NOTE: Setting `loader_logo' to an undefined value (such as "none") will \ prevent beastie from being drawn. @@ -203,9 +275,21 @@ variable logoY s" loader_logo" getenv dup -1 = if logoX @ logoY @ loader_color? if - orb-logo + s" tribute-logo" + sfind if + execute + else + drop + orb-logo + then else - orbbw-logo + s" tributebw-logo" + sfind if + execute + else + drop + orbbw-logo + then then drop exit then @@ -230,6 +314,24 @@ variable logoY logoX @ logoY @ orbbw-logo 2drop exit then + 2dup s" tribute" compare-insensitive 0= if + logoX @ logoY @ + s" tribute-logo" sfind if + execute + else + orb-logo + then + 2drop exit + then + 2dup s" tributebw" compare-insensitive 0= if + logoX @ logoY @ + s" tributebw-logo" sfind if + execute + else + orbbw-logo + then + 2drop exit + then 2drop ; From owner-svn-src-stable@FreeBSD.ORG Wed Aug 14 17:49:09 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 27393474; Wed, 14 Aug 2013 17:49:09 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 146902A65; Wed, 14 Aug 2013 17:49:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7EHn86q061458; Wed, 14 Aug 2013 17:49:08 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7EHn8Gq061456; Wed, 14 Aug 2013 17:49:08 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201308141749.r7EHn8Gq061456@svn.freebsd.org> From: Jeremie Le Hen Date: Wed, 14 Aug 2013 17:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254332 - stable/9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 17:49:09 -0000 Author: jlh Date: Wed Aug 14 17:49:08 2013 New Revision: 254332 URL: http://svnweb.freebsd.org/changeset/base/254332 Log: MFC r253853: Include /usr/local/etc/libmap.d/ by default. PR: 180568 Reviewed by: bapt Obtained from: kib Added: stable/9/etc/libmap.conf - copied unchanged from r253853, head/etc/libmap.conf Modified: stable/9/etc/Makefile Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/Makefile ============================================================================== --- stable/9/etc/Makefile Wed Aug 14 16:15:14 2013 (r254331) +++ stable/9/etc/Makefile Wed Aug 14 17:49:08 2013 (r254332) @@ -22,6 +22,7 @@ BIN1= crontab \ hosts.equiv \ inetd.conf \ libalias.conf \ + libmap.conf \ login.access \ login.conf \ mac.conf \ Copied: stable/9/etc/libmap.conf (from r253853, head/etc/libmap.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/etc/libmap.conf Wed Aug 14 17:49:08 2013 (r254332, copy of r253853, head/etc/libmap.conf) @@ -0,0 +1,2 @@ +# $FreeBSD$ +includedir /usr/local/etc/libmap.d From owner-svn-src-stable@FreeBSD.ORG Wed Aug 14 18:33:40 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 78E75596; Wed, 14 Aug 2013 18:33:40 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 664932D7A; Wed, 14 Aug 2013 18:33:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7EIXeeZ079487; Wed, 14 Aug 2013 18:33:40 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7EIXeJG079486; Wed, 14 Aug 2013 18:33:40 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201308141833.r7EIXeJG079486@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 14 Aug 2013 18:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254333 - stable/9/tools/tools/bootparttest X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 18:33:40 -0000 Author: ae Date: Wed Aug 14 18:33:39 2013 New Revision: 254333 URL: http://svnweb.freebsd.org/changeset/base/254333 Log: MFC r253986: Fix formatting warning. Modified: stable/9/tools/tools/bootparttest/bootparttest.c Directory Properties: stable/9/tools/tools/bootparttest/ (props changed) Modified: stable/9/tools/tools/bootparttest/bootparttest.c ============================================================================== --- stable/9/tools/tools/bootparttest/bootparttest.c Wed Aug 14 17:49:08 2013 (r254332) +++ stable/9/tools/tools/bootparttest/bootparttest.c Wed Aug 14 18:33:39 2013 (r254333) @@ -54,7 +54,7 @@ diskread(void *arg, void *buf, size_t bl struct disk *dp; dp = (struct disk *)arg; - printf("%s: read %d blocks from the offset %jd [+%jd]\n", dp->name, + printf("%s: read %lu blocks from the offset %jd [+%jd]\n", dp->name, blocks, offset, dp->offset); if (offset >= dp->mediasize / dp->sectorsize) return (-1); From owner-svn-src-stable@FreeBSD.ORG Thu Aug 15 01:32:49 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2598B78F; Thu, 15 Aug 2013 01:32:49 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 12DD1292D; Thu, 15 Aug 2013 01:32:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7F1WmTe067367; Thu, 15 Aug 2013 01:32:48 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7F1WmSh067366; Thu, 15 Aug 2013 01:32:48 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201308150132.r7F1WmSh067366@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 15 Aug 2013 01:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254347 - stable/9/contrib/sendmail/include/sm/os X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 01:32:49 -0000 Author: gshapiro Date: Thu Aug 15 01:32:48 2013 New Revision: 254347 URL: http://svnweb.freebsd.org/changeset/base/254347 Log: MFC: Temporarily revert sendmail 8.14.7 change to getipnodebyname() flags to prevent problems between the resolver and Microsoft DNS servers with AAAA lookups. The upstream open source project will work on a more permanent fix for the next release. Issue noted by Pavel Timofeev. Modified: stable/9/contrib/sendmail/include/sm/os/sm_os_freebsd.h Directory Properties: stable/9/contrib/sendmail/ (props changed) Modified: stable/9/contrib/sendmail/include/sm/os/sm_os_freebsd.h ============================================================================== --- stable/9/contrib/sendmail/include/sm/os/sm_os_freebsd.h Thu Aug 15 01:31:31 2013 (r254346) +++ stable/9/contrib/sendmail/include/sm/os/sm_os_freebsd.h Thu Aug 15 01:32:48 2013 (r254347) @@ -39,3 +39,7 @@ #ifndef SM_CONF_MSG # define SM_CONF_MSG 1 #endif /* SM_CONF_MSG */ + +#ifndef SM_IPNODEBYNAME_FLAGS +# define SM_IPNODEBYNAME_FLAGS AI_DEFAULT|AI_ALL +#endif /* SM_IPNODEBYNAME_FLAGS */ From owner-svn-src-stable@FreeBSD.ORG Thu Aug 15 01:40:55 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D3C1FA48; Thu, 15 Aug 2013 01:40:55 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C0DD1299C; Thu, 15 Aug 2013 01:40:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7F1etoj070080; Thu, 15 Aug 2013 01:40:55 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7F1etJQ070055; Thu, 15 Aug 2013 01:40:55 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201308150140.r7F1etJQ070055@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 15 Aug 2013 01:40:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r254348 - stable/8/contrib/sendmail/include/sm/os X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 01:40:55 -0000 Author: gshapiro Date: Thu Aug 15 01:40:55 2013 New Revision: 254348 URL: http://svnweb.freebsd.org/changeset/base/254348 Log: MFC: Temporarily revert sendmail 8.14.7 change to getipnodebyname() flags to prevent problems between the resolver and Microsoft DNS servers with AAAA lookups. The upstream open source project will work on a more permanent fix for the next release. Issue noted by Pavel Timofeev. Modified: stable/8/contrib/sendmail/include/sm/os/sm_os_freebsd.h Directory Properties: stable/8/contrib/sendmail/ (props changed) Modified: stable/8/contrib/sendmail/include/sm/os/sm_os_freebsd.h ============================================================================== --- stable/8/contrib/sendmail/include/sm/os/sm_os_freebsd.h Thu Aug 15 01:32:48 2013 (r254347) +++ stable/8/contrib/sendmail/include/sm/os/sm_os_freebsd.h Thu Aug 15 01:40:55 2013 (r254348) @@ -39,3 +39,7 @@ #ifndef SM_CONF_MSG # define SM_CONF_MSG 1 #endif /* SM_CONF_MSG */ + +#ifndef SM_IPNODEBYNAME_FLAGS +# define SM_IPNODEBYNAME_FLAGS AI_DEFAULT|AI_ALL +#endif /* SM_IPNODEBYNAME_FLAGS */ From owner-svn-src-stable@FreeBSD.ORG Thu Aug 15 01:42:47 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 18C7FB26; Thu, 15 Aug 2013 01:42:47 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 05E2D29A6; Thu, 15 Aug 2013 01:42:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7F1gkWd071337; Thu, 15 Aug 2013 01:42:46 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7F1gkCP071336; Thu, 15 Aug 2013 01:42:46 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <201308150142.r7F1gkCP071336@svn.freebsd.org> From: Gregory Neil Shapiro Date: Thu, 15 Aug 2013 01:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r254349 - stable/7/contrib/sendmail/include/sm/os X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 01:42:47 -0000 Author: gshapiro Date: Thu Aug 15 01:42:46 2013 New Revision: 254349 URL: http://svnweb.freebsd.org/changeset/base/254349 Log: MFC: Temporarily revert sendmail 8.14.7 change to getipnodebyname() flags to prevent problems between the resolver and Microsoft DNS servers with AAAA lookups. The upstream open source project will work on a more permanent fix for the next release. Issue noted by Pavel Timofeev. Modified: stable/7/contrib/sendmail/include/sm/os/sm_os_freebsd.h Directory Properties: stable/7/contrib/sendmail/ (props changed) Modified: stable/7/contrib/sendmail/include/sm/os/sm_os_freebsd.h ============================================================================== --- stable/7/contrib/sendmail/include/sm/os/sm_os_freebsd.h Thu Aug 15 01:40:55 2013 (r254348) +++ stable/7/contrib/sendmail/include/sm/os/sm_os_freebsd.h Thu Aug 15 01:42:46 2013 (r254349) @@ -39,3 +39,7 @@ #ifndef SM_CONF_MSG # define SM_CONF_MSG 1 #endif /* SM_CONF_MSG */ + +#ifndef SM_IPNODEBYNAME_FLAGS +# define SM_IPNODEBYNAME_FLAGS AI_DEFAULT|AI_ALL +#endif /* SM_IPNODEBYNAME_FLAGS */ From owner-svn-src-stable@FreeBSD.ORG Thu Aug 15 04:25:16 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A4480986; Thu, 15 Aug 2013 04:25:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 919A520E9; Thu, 15 Aug 2013 04:25:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7F4PGGb033675; Thu, 15 Aug 2013 04:25:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7F4PGMp033674; Thu, 15 Aug 2013 04:25:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201308150425.r7F4PGMp033674@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 Aug 2013 04:25:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254352 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 04:25:16 -0000 Author: tuexen Date: Thu Aug 15 04:25:16 2013 New Revision: 254352 URL: http://svnweb.freebsd.org/changeset/base/254352 Log: MFC r254338: Don't send uninitialized memory (two instances of 4 bytes) in every cookie on the wire. This bug was reported in https://bugzilla.mozilla.org/show_bug.cgi?id=905080 Modified: stable/9/sys/netinet/sctp_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_output.c ============================================================================== --- stable/9/sys/netinet/sctp_output.c Thu Aug 15 04:10:15 2013 (r254351) +++ stable/9/sys/netinet/sctp_output.c Thu Aug 15 04:25:16 2013 (r254352) @@ -5410,6 +5410,14 @@ do_a_abort: } SCTP_BUF_LEN(m) = sizeof(struct sctp_init_chunk); + /* + * We might not overwrite the identification[] completely and on + * some platforms time_entered will contain some padding. Therefore + * zero out the cookie to avoid putting uninitialized memory on the + * wire. + */ + memset(&stc, 0, sizeof(struct sctp_state_cookie)); + /* the time I built cookie */ (void)SCTP_GETTIME_TIMEVAL(&stc.time_entered); From owner-svn-src-stable@FreeBSD.ORG Thu Aug 15 04:27:11 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 207A8AA6; Thu, 15 Aug 2013 04:27:11 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C97520F1; Thu, 15 Aug 2013 04:27:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7F4RAAP033993; Thu, 15 Aug 2013 04:27:10 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7F4RA1j033992; Thu, 15 Aug 2013 04:27:10 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201308150427.r7F4RA1j033992@svn.freebsd.org> From: "Andrey A. Chernov" Date: Thu, 15 Aug 2013 04:27:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254353 - stable/9/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 04:27:11 -0000 Author: ache Date: Thu Aug 15 04:27:10 2013 New Revision: 254353 URL: http://svnweb.freebsd.org/changeset/base/254353 Log: MFC: r254091 According to POSIX \ in the fnmatch(3) pattern should escape any character including '\0', but our version replace escaped '\0' with '\\'. I.e. fnmatch("\\", "\\", 0) should not match while fnmatch("\\", "", 0) should (Linux and NetBSD does the same). Was vice versa. PR: 181129 Modified: stable/9/lib/libc/gen/fnmatch.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/fnmatch.c ============================================================================== --- stable/9/lib/libc/gen/fnmatch.c Thu Aug 15 04:25:16 2013 (r254352) +++ stable/9/lib/libc/gen/fnmatch.c Thu Aug 15 04:27:10 2013 (r254353) @@ -194,8 +194,6 @@ fnmatch1(pattern, string, stringstart, f &patmbs); if (pclen == (size_t)-1 || pclen == (size_t)-2) return (FNM_NOMATCH); - if (pclen == 0) - pc = '\\'; pattern += pclen; } /* FALLTHROUGH */ From owner-svn-src-stable@FreeBSD.ORG Thu Aug 15 04:35:26 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5D502C57; Thu, 15 Aug 2013 04:35:26 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48E4D2139; Thu, 15 Aug 2013 04:35:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7F4ZQZC037359; Thu, 15 Aug 2013 04:35:26 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7F4ZQGL037358; Thu, 15 Aug 2013 04:35:26 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201308150435.r7F4ZQGL037358@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 Aug 2013 04:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r254354 - stable/8/sys/netinet X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 04:35:26 -0000 Author: tuexen Date: Thu Aug 15 04:35:25 2013 New Revision: 254354 URL: http://svnweb.freebsd.org/changeset/base/254354 Log: MFC r254338: Don't send uninitialized memory (two instances of 4 bytes) in every cookie on the wire. This bug was reported in https://bugzilla.mozilla.org/show_bug.cgi?id=905080 Modified: stable/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Thu Aug 15 04:27:10 2013 (r254353) +++ stable/8/sys/netinet/sctp_output.c Thu Aug 15 04:35:25 2013 (r254354) @@ -5415,6 +5415,14 @@ do_a_abort: } SCTP_BUF_LEN(m) = sizeof(struct sctp_init_chunk); + /* + * We might not overwrite the identification[] completely and on + * some platforms time_entered will contain some padding. Therefore + * zero out the cookie to avoid putting uninitialized memory on the + * wire. + */ + memset(&stc, 0, sizeof(struct sctp_state_cookie)); + /* the time I built cookie */ (void)SCTP_GETTIME_TIMEVAL(&stc.time_entered); From owner-svn-src-stable@FreeBSD.ORG Thu Aug 15 10:31:31 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B6179397; Thu, 15 Aug 2013 10:31:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A2C89258B; Thu, 15 Aug 2013 10:31:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7FAVVft072565; Thu, 15 Aug 2013 10:31:31 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7FAVVgg072564; Thu, 15 Aug 2013 10:31:31 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201308151031.r7FAVVgg072564@svn.freebsd.org> From: Glen Barber Date: Thu, 15 Aug 2013 10:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254360 - stable/9/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 10:31:31 -0000 Author: gjb Date: Thu Aug 15 10:31:31 2013 New Revision: 254360 URL: http://svnweb.freebsd.org/changeset/base/254360 Log: MFC r254265: Make sure bootonly.iso for -BETAs and -RCs use the releases/ directory on the FTP mirrors to fetch distributions, since these are always pushed to releases/ during the release cycle. Modified: stable/9/usr.sbin/bsdinstall/scripts/mirrorselect Directory Properties: stable/9/usr.sbin/bsdinstall/scripts/ (props changed) Modified: stable/9/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- stable/9/usr.sbin/bsdinstall/scripts/mirrorselect Thu Aug 15 10:17:20 2013 (r254359) +++ stable/9/usr.sbin/bsdinstall/scripts/mirrorselect Thu Aug 15 10:31:31 2013 (r254360) @@ -162,7 +162,7 @@ exec 3>&- _UNAME_R=`uname -r` case ${_UNAME_R} in - *-CURRENT|*-STABLE|*-BETA*|*-PRERELEASE|*-RC*) + *-CURRENT|*-STABLE|*-PRERELEASE) RELDIR="snapshots" ;; *) From owner-svn-src-stable@FreeBSD.ORG Thu Aug 15 13:09:59 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8552058E; Thu, 15 Aug 2013 13:09:59 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 725942EEE; Thu, 15 Aug 2013 13:09:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7FD9x7d031491; Thu, 15 Aug 2013 13:09:59 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7FD9x13031489; Thu, 15 Aug 2013 13:09:59 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201308151309.r7FD9x13031489@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 15 Aug 2013 13:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254366 - stable/9/sys/boot/common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 13:09:59 -0000 Author: ae Date: Thu Aug 15 13:09:58 2013 New Revision: 254366 URL: http://svnweb.freebsd.org/changeset/base/254366 Log: MFC r254092: Make the check for number of entries less strict. Some partitioning tools can create GPT with number of entries less than 128. Modified: stable/9/sys/boot/common/part.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/common/part.c ============================================================================== --- stable/9/sys/boot/common/part.c Thu Aug 15 12:55:57 2013 (r254365) +++ stable/9/sys/boot/common/part.c Thu Aug 15 13:09:58 2013 (r254366) @@ -181,7 +181,7 @@ gpt_checkhdr(struct gpt_hdr *hdr, uint64 } hdr->hdr_entries = le32toh(hdr->hdr_entries); hdr->hdr_entsz = le32toh(hdr->hdr_entsz); - if (hdr->hdr_entries < 128 || + if (hdr->hdr_entries == 0 || hdr->hdr_entsz < sizeof(struct gpt_ent) || sectorsize % hdr->hdr_entsz != 0) { DEBUG("invalid entry size or number of entries"); @@ -203,11 +203,14 @@ gpt_checktbl(const struct gpt_hdr *hdr, int i, cnt; cnt = size / hdr->hdr_entsz; - /* Check CRC only when buffer size is enough for table. */ - if (hdr->hdr_entries <= cnt && - crc32(tbl, size) != hdr->hdr_crc_table) { - DEBUG("GPT table's CRC doesn't match"); - return (-1); + if (hdr->hdr_entries <= cnt) { + cnt = hdr->hdr_entries; + /* Check CRC only when buffer size is enough for table. */ + if (hdr->hdr_crc_table != + crc32(tbl, hdr->hdr_entries * hdr->hdr_entsz)) { + DEBUG("GPT table's CRC doesn't match"); + return (-1); + } } ent = (struct gpt_ent *)tbl; for (i = 0; i < cnt; i++, ent++) { From owner-svn-src-stable@FreeBSD.ORG Thu Aug 15 20:33:18 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ECBE51F8; Thu, 15 Aug 2013 20:33:18 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB6E02815; Thu, 15 Aug 2013 20:33:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7FKXInP002117; Thu, 15 Aug 2013 20:33:18 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7FKXICF002113; Thu, 15 Aug 2013 20:33:18 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201308152033.r7FKXICF002113@svn.freebsd.org> From: Jack F Vogel Date: Thu, 15 Aug 2013 20:33:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254382 - in stable/9/sys/dev: e1000 ixgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 20:33:19 -0000 Author: jfv Date: Thu Aug 15 20:33:17 2013 New Revision: 254382 URL: http://svnweb.freebsd.org/changeset/base/254382 Log: MFC r254008 Make the fallback from MSIX to MSI interrupt usage more graceful. Modified: stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixv.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) Modified: stable/9/sys/dev/e1000/if_em.c ============================================================================== --- stable/9/sys/dev/e1000/if_em.c Thu Aug 15 20:28:13 2013 (r254381) +++ stable/9/sys/dev/e1000/if_em.c Thu Aug 15 20:33:17 2013 (r254382) @@ -2742,7 +2742,7 @@ static int em_setup_msix(struct adapter *adapter) { device_t dev = adapter->dev; - int val = 0; + int val; /* ** Setup MSI/X for Hartwell: tests have shown @@ -2756,17 +2756,17 @@ em_setup_msix(struct adapter *adapter) int rid = PCIR_BAR(EM_MSIX_BAR); adapter->msix_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (!adapter->msix_mem) { + if (adapter->msix_mem == NULL) { /* May not be enabled */ device_printf(adapter->dev, "Unable to map MSIX table \n"); goto msi; } val = pci_msix_count(dev); - /* We only need 3 vectors */ - if (val > 3) + /* We only need/want 3 vectors */ + if (val >= 3) val = 3; - if ((val != 3) && (val != 5)) { + else { bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(EM_MSIX_BAR), adapter->msix_mem); adapter->msix_mem = NULL; @@ -2779,14 +2779,13 @@ em_setup_msix(struct adapter *adapter) device_printf(adapter->dev, "Using MSIX interrupts " "with %d vectors\n", val); + return (val); } - - return (val); + /* Fall through to MSI */ } msi: - val = pci_msi_count(dev); - if (val == 1 && pci_alloc_msi(dev, &val) == 0) { - adapter->msix = 1; + val = 1; + if (pci_alloc_msi(dev, &val) == 0) { device_printf(adapter->dev,"Using an MSI interrupt\n"); return (val); } Modified: stable/9/sys/dev/e1000/if_igb.c ============================================================================== --- stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 20:28:13 2013 (r254381) +++ stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 20:33:17 2013 (r254382) @@ -2834,24 +2834,19 @@ igb_setup_msix(struct adapter *adapter) goto msi; /* First try MSI/X */ + msgs = pci_msix_count(dev); + if (msgs == 0) + goto msi; rid = PCIR_BAR(IGB_MSIX_BAR); adapter->msix_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (!adapter->msix_mem) { + if (adapter->msix_mem == NULL) { /* May not be enabled */ device_printf(adapter->dev, "Unable to map MSIX table \n"); goto msi; } - msgs = pci_msix_count(dev); - if (msgs == 0) { /* system has msix disabled */ - bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(IGB_MSIX_BAR), adapter->msix_mem); - adapter->msix_mem = NULL; - goto msi; - } - /* Figure out a reasonable auto config value */ queues = (mp_ncpus > (msgs-1)) ? (msgs-1) : mp_ncpus; @@ -2894,20 +2889,27 @@ igb_setup_msix(struct adapter *adapter) "MSIX Configuration Problem, " "%d vectors configured, but %d queues wanted!\n", msgs, want); - return (0); + goto msi; } - if ((msgs) && pci_alloc_msix(dev, &msgs) == 0) { + if (pci_alloc_msix(dev, &msgs) == 0) { device_printf(adapter->dev, "Using MSIX interrupts with %d vectors\n", msgs); adapter->num_queues = queues; return (msgs); } + /* Fallback to MSI configuration */ msi: - msgs = pci_msi_count(dev); - if (msgs == 1 && pci_alloc_msi(dev, &msgs) == 0) { + if (adapter->msix_mem != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, + PCIR_BAR(IGB_MSIX_BAR), adapter->msix_mem); + adapter->msix_mem = NULL; + } + msgs = 1; + if (pci_alloc_msi(dev, &msgs) == 0) { device_printf(adapter->dev," Using MSI interrupt\n"); return (msgs); } + /* Default to a legacy interrupt */ return (0); } Modified: stable/9/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.c Thu Aug 15 20:28:13 2013 (r254381) +++ stable/9/sys/dev/ixgbe/ixgbe.c Thu Aug 15 20:33:17 2013 (r254382) @@ -2415,29 +2415,24 @@ ixgbe_setup_msix(struct adapter *adapter goto msi; /* First try MSI/X */ + msgs = pci_msix_count(dev); + if (msgs == 0) + goto msi; rid = PCIR_BAR(MSIX_82598_BAR); adapter->msix_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (!adapter->msix_mem) { + if (adapter->msix_mem == NULL) { rid += 4; /* 82599 maps in higher BAR */ adapter->msix_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); } - if (!adapter->msix_mem) { + if (adapter->msix_mem == NULL) { /* May not be enabled */ device_printf(adapter->dev, "Unable to map MSIX table \n"); goto msi; } - msgs = pci_msix_count(dev); - if (msgs == 0) { /* system has msix disabled */ - bus_release_resource(dev, SYS_RES_MEMORY, - rid, adapter->msix_mem); - adapter->msix_mem = NULL; - goto msi; - } - /* Figure out a reasonable auto config value */ queues = (mp_ncpus > (msgs-1)) ? (msgs-1) : mp_ncpus; @@ -2459,21 +2454,27 @@ ixgbe_setup_msix(struct adapter *adapter "MSIX Configuration Problem, " "%d vectors but %d queues wanted!\n", msgs, want); - return (0); /* Will go to Legacy setup */ + goto msi; } - if ((msgs) && pci_alloc_msix(dev, &msgs) == 0) { + if (pci_alloc_msix(dev, &msgs) == 0) { device_printf(adapter->dev, "Using MSIX interrupts with %d vectors\n", msgs); adapter->num_queues = queues; return (msgs); } msi: - msgs = pci_msi_count(dev); - if (msgs == 1 && pci_alloc_msi(dev, &msgs) == 0) + if (adapter->msix_mem != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, + rid, adapter->msix_mem); + adapter->msix_mem = NULL; + } + msgs = 1; + if (pci_alloc_msi(dev, &msgs) == 0) { device_printf(adapter->dev,"Using an MSI interrupt\n"); - else - device_printf(adapter->dev,"Using a Legacy interrupt\n"); - return (msgs); + return (msgs); + } + device_printf(adapter->dev,"Using a Legacy interrupt\n"); + return (0); } Modified: stable/9/sys/dev/ixgbe/ixv.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixv.c Thu Aug 15 20:28:13 2013 (r254381) +++ stable/9/sys/dev/ixgbe/ixv.c Thu Aug 15 20:33:17 2013 (r254382) @@ -1680,37 +1680,35 @@ static int ixv_setup_msix(struct adapter *adapter) { device_t dev = adapter->dev; - int rid, vectors, want = 2; + int rid, want; /* First try MSI/X */ rid = PCIR_BAR(3); adapter->msix_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (!adapter->msix_mem) { + if (adapter->msix_mem == NULL) { device_printf(adapter->dev, "Unable to map MSIX table \n"); goto out; } - vectors = pci_msix_count(dev); - if (vectors < 2) { - bus_release_resource(dev, SYS_RES_MEMORY, - rid, adapter->msix_mem); - adapter->msix_mem = NULL; - goto out; - } - /* ** Want two vectors: one for a queue, ** plus an additional for mailbox. */ + want = 2; if (pci_alloc_msix(dev, &want) == 0) { device_printf(adapter->dev, "Using MSIX interrupts with %d vectors\n", want); return (want); } out: + if (adapter->msix_mem != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, + rid, adapter->msix_mem); + adapter->msix_mem = NULL; + } device_printf(adapter->dev,"MSIX config error\n"); return (ENXIO); } From owner-svn-src-stable@FreeBSD.ORG Thu Aug 15 21:06:39 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 96084CEE; Thu, 15 Aug 2013 21:06:39 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 73B4529CC; Thu, 15 Aug 2013 21:06:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7FL6d5M014276; Thu, 15 Aug 2013 21:06:39 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7FL6c2x014271; Thu, 15 Aug 2013 21:06:38 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201308152106.r7FL6c2x014271@svn.freebsd.org> From: Jack F Vogel Date: Thu, 15 Aug 2013 21:06:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254383 - in stable/9/sys/dev: e1000 ixgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 21:06:39 -0000 Author: jfv Date: Thu Aug 15 21:06:38 2013 New Revision: 254383 URL: http://svnweb.freebsd.org/changeset/base/254383 Log: MFC r254262 Further improve the msix setup, make sure pci_alloc_msix() gives us the vectors we requested, and fall back to MSI when not, also release any allocated resources before the fallback. Modified: stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixv.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) Modified: stable/9/sys/dev/e1000/if_em.c ============================================================================== --- stable/9/sys/dev/e1000/if_em.c Thu Aug 15 20:33:17 2013 (r254382) +++ stable/9/sys/dev/e1000/if_em.c Thu Aug 15 21:06:38 2013 (r254383) @@ -2277,7 +2277,7 @@ em_local_timer(void *arg) /* Mask to use in the irq trigger */ if (adapter->msix_mem) - trigger = rxr->ims; /* RX for 82574 */ + trigger = rxr->ims; else trigger = E1000_ICS_RXDMT0; @@ -2767,23 +2767,30 @@ em_setup_msix(struct adapter *adapter) if (val >= 3) val = 3; else { - bus_release_resource(dev, SYS_RES_MEMORY, - PCIR_BAR(EM_MSIX_BAR), adapter->msix_mem); - adapter->msix_mem = NULL; device_printf(adapter->dev, - "MSIX: incorrect vectors, using MSI\n"); + "MSIX: insufficient vectors, using MSI\n"); goto msi; } - if (pci_alloc_msix(dev, &val) == 0) { + if ((pci_alloc_msix(dev, &val) == 0) && (val == 3)) { device_printf(adapter->dev, "Using MSIX interrupts " "with %d vectors\n", val); return (val); } - /* Fall through to MSI */ + + /* + ** If MSIX alloc failed or provided us with + ** less than needed, free and fall through to MSI + */ + pci_release_msi(dev); } msi: + if (adapter->msix_mem != NULL) { + bus_release_resource(dev, SYS_RES_MEMORY, + PCIR_BAR(EM_MSIX_BAR), adapter->msix_mem); + adapter->msix_mem = NULL; + } val = 1; if (pci_alloc_msi(dev, &val) == 0) { device_printf(adapter->dev,"Using an MSI interrupt\n"); Modified: stable/9/sys/dev/e1000/if_igb.c ============================================================================== --- stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 20:33:17 2013 (r254382) +++ stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 21:06:38 2013 (r254383) @@ -2891,13 +2891,18 @@ igb_setup_msix(struct adapter *adapter) msgs, want); goto msi; } - if (pci_alloc_msix(dev, &msgs) == 0) { + if ((pci_alloc_msix(dev, &msgs) == 0) && (msgs == want)) { device_printf(adapter->dev, "Using MSIX interrupts with %d vectors\n", msgs); adapter->num_queues = queues; return (msgs); } - /* Fallback to MSI configuration */ + /* + ** If MSIX alloc failed or provided us with + ** less than needed, free and fall through to MSI + */ + pci_release_msi(dev); + msi: if (adapter->msix_mem != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, @@ -2906,10 +2911,10 @@ msi: } msgs = 1; if (pci_alloc_msi(dev, &msgs) == 0) { - device_printf(adapter->dev," Using MSI interrupt\n"); + device_printf(adapter->dev," Using an MSI interrupt\n"); return (msgs); } - /* Default to a legacy interrupt */ + device_printf(adapter->dev," Using a Legacy interrupt\n"); return (0); } Modified: stable/9/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.c Thu Aug 15 20:33:17 2013 (r254382) +++ stable/9/sys/dev/ixgbe/ixgbe.c Thu Aug 15 21:06:38 2013 (r254383) @@ -2456,12 +2456,18 @@ ixgbe_setup_msix(struct adapter *adapter msgs, want); goto msi; } - if (pci_alloc_msix(dev, &msgs) == 0) { + if ((pci_alloc_msix(dev, &msgs) == 0) && (msgs == want)) { device_printf(adapter->dev, "Using MSIX interrupts with %d vectors\n", msgs); adapter->num_queues = queues; return (msgs); } + /* + ** If MSIX alloc failed or provided us with + ** less than needed, free and fall through to MSI + */ + pci_release_msi(dev); + msi: if (adapter->msix_mem != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, Modified: stable/9/sys/dev/ixgbe/ixv.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixv.c Thu Aug 15 20:33:17 2013 (r254382) +++ stable/9/sys/dev/ixgbe/ixv.c Thu Aug 15 21:06:38 2013 (r254383) @@ -1698,11 +1698,13 @@ ixv_setup_msix(struct adapter *adapter) ** plus an additional for mailbox. */ want = 2; - if (pci_alloc_msix(dev, &want) == 0) { + if ((pci_alloc_msix(dev, &want) == 0) && (want == 2)) { device_printf(adapter->dev, "Using MSIX interrupts with %d vectors\n", want); return (want); } + /* Release in case alloc was insufficient */ + pci_release_msi(dev); out: if (adapter->msix_mem != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, From owner-svn-src-stable@FreeBSD.ORG Thu Aug 15 21:24:44 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 64ADD385; Thu, 15 Aug 2013 21:24:44 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 518B72AC5; Thu, 15 Aug 2013 21:24:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7FLOih6021560; Thu, 15 Aug 2013 21:24:44 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7FLOiQs021559; Thu, 15 Aug 2013 21:24:44 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201308152124.r7FLOiQs021559@svn.freebsd.org> From: Jack F Vogel Date: Thu, 15 Aug 2013 21:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254385 - stable/9/sys/dev/e1000 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 21:24:44 -0000 Author: jfv Date: Thu Aug 15 21:24:43 2013 New Revision: 254385 URL: http://svnweb.freebsd.org/changeset/base/254385 Log: MFC r254264 Make the igb_mq_start() routine use TRYLOCK rather than simple queuing, there were latency and other problems with the latter. Modified: stable/9/sys/dev/e1000/if_igb.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) Modified: stable/9/sys/dev/e1000/if_igb.c ============================================================================== --- stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 21:09:05 2013 (r254384) +++ stable/9/sys/dev/e1000/if_igb.c Thu Aug 15 21:24:43 2013 (r254385) @@ -972,7 +972,13 @@ igb_mq_start(struct ifnet *ifp, struct m que = &adapter->queues[i]; err = drbr_enqueue(ifp, txr->br, m); - taskqueue_enqueue(que->tq, &txr->txq_task); + if (err) + return (err); + if (IGB_TX_TRYLOCK(txr)) { + err = igb_mq_start_locked(ifp, txr); + IGB_TX_UNLOCK(txr); + } else + taskqueue_enqueue(que->tq, &txr->txq_task); return (err); } From owner-svn-src-stable@FreeBSD.ORG Fri Aug 16 06:40:18 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1301CB1A; Fri, 16 Aug 2013 06:40:18 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E351022E6; Fri, 16 Aug 2013 06:40:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7G6eHLv030933; Fri, 16 Aug 2013 06:40:17 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7G6eD6p030905; Fri, 16 Aug 2013 06:40:13 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201308160640.r7G6eD6p030905@svn.freebsd.org> From: David Xu Date: Fri, 16 Aug 2013 06:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254398 - in stable/9: include lib/libc/gen lib/libc/sys lib/libthr/thread sys/compat/freebsd32 sys/kern sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Aug 2013 06:40:18 -0000 Author: davidxu Date: Fri Aug 16 06:40:12 2013 New Revision: 254398 URL: http://svnweb.freebsd.org/changeset/base/254398 Log: MFC r239347, 240295, 240296 and 253325: r239347 | davidxu | 2012-08-17 10:26:31 +0800 (Fri, 17 Aug 2012) | 7 lines Implement syscall clock_getcpuclockid2, so we can get a clock id for process, thread or others we want to support. Use the syscall to implement POSIX API clock_getcpuclock and pthread_getcpuclockid. PR: 168417 ------------------------------------------------------------------------ r240295 | davidxu | 2012-09-10 13:00:29 +0800 (Mon, 10 Sep 2012) | 2 lines Add missing prototype for clock_getcpuclockid. ------------------------------------------------------------------------ r240296 | davidxu | 2012-09-10 13:09:39 +0800 (Mon, 10 Sep 2012) | 2 lines Process CPU-Time Clocks option is supported, define _POSIX_CPUTIME. ------------------------------------------------------------------------ r253325 | kib | 2013-07-14 03:32:50 +0800 (Sun, 14 Jul 2013) | 6 lines Allow to call clock_gettime() on the clock id for zombie process. Reported by: Petr Salinger PR: threads/180496 Sponsored by: The FreeBSD Foundation Added: stable/9/lib/libc/gen/clock_getcpuclockid.c - copied unchanged from r239347, head/lib/libc/gen/clock_getcpuclockid.c Modified: stable/9/include/time.h stable/9/include/unistd.h stable/9/lib/libc/gen/Makefile.inc stable/9/lib/libc/gen/Symbol.map stable/9/lib/libc/gen/sysconf.c stable/9/lib/libc/sys/Symbol.map stable/9/lib/libthr/thread/thr_getcpuclockid.c stable/9/sys/compat/freebsd32/freebsd32_syscall.h stable/9/sys/compat/freebsd32/freebsd32_syscalls.c stable/9/sys/compat/freebsd32/freebsd32_sysent.c stable/9/sys/compat/freebsd32/freebsd32_systrace_args.c stable/9/sys/compat/freebsd32/syscalls.master stable/9/sys/kern/init_sysent.c stable/9/sys/kern/kern_time.c stable/9/sys/kern/syscalls.c stable/9/sys/kern/syscalls.master stable/9/sys/kern/systrace_args.c stable/9/sys/sys/syscall.h stable/9/sys/sys/syscall.mk stable/9/sys/sys/sysproto.h stable/9/sys/sys/time.h stable/9/sys/sys/unistd.h Directory Properties: stable/9/ (props changed) stable/9/include/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) stable/9/lib/libthr/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/include/time.h ============================================================================== --- stable/9/include/time.h Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/include/time.h Fri Aug 16 06:40:12 2013 (r254398) @@ -88,6 +88,13 @@ typedef __timer_t timer_t; #include #endif /* __POSIX_VISIBLE >= 199309 */ +#if __POSIX_VISIBLE >= 200112 +#ifndef _PID_T_DECLARED +typedef __pid_t pid_t; +#define _PID_T_DECLARED +#endif +#endif + /* These macros are also in sys/time.h. */ #if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 #define CLOCK_REALTIME 0 @@ -165,6 +172,10 @@ int clock_settime(clockid_t, const struc int nanosleep(const struct timespec *, struct timespec *); #endif /* __POSIX_VISIBLE >= 199309 */ +#if __POSIX_VISIBLE >= 200112 +int clock_getcpuclockid(pid_t, clockid_t *); +#endif + #if __POSIX_VISIBLE >= 199506 char *asctime_r(const struct tm *, char *); char *ctime_r(const time_t *, char *); Modified: stable/9/include/unistd.h ============================================================================== --- stable/9/include/unistd.h Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/include/unistd.h Fri Aug 16 06:40:12 2013 (r254398) @@ -100,6 +100,7 @@ typedef __useconds_t useconds_t; * returns -1, the functions may be stubbed out. */ #define _POSIX_BARRIERS 200112L +#define _POSIX_CPUTIME 200112L #define _POSIX_READER_WRITER_LOCKS 200112L #define _POSIX_REGEXP 1 #define _POSIX_SHELL 1 Modified: stable/9/lib/libc/gen/Makefile.inc ============================================================================== --- stable/9/lib/libc/gen/Makefile.inc Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/lib/libc/gen/Makefile.inc Fri Aug 16 06:40:12 2013 (r254398) @@ -8,7 +8,7 @@ SRCS+= __getosreldate.c __xuname.c \ _once_stub.c _pthread_stubs.c _rand48.c _spinlock_stub.c \ _thread_init.c \ alarm.c arc4random.c assert.c aux.c basename.c check_utility_compat.c \ - clock.c closedir.c confstr.c \ + clock.c clock_getcpuclockid.c closedir.c confstr.c \ crypt.c ctermid.c daemon.c devname.c dirname.c disklabel.c \ dlfcn.c drand48.c elf_utils.c erand48.c err.c errlst.c errno.c \ exec.c fdevname.c feature_present.c fmtcheck.c fmtmsg.c fnmatch.c \ Modified: stable/9/lib/libc/gen/Symbol.map ============================================================================== --- stable/9/lib/libc/gen/Symbol.map Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/lib/libc/gen/Symbol.map Fri Aug 16 06:40:12 2013 (r254398) @@ -380,6 +380,8 @@ FBSD_1.2 { }; FBSD_1.3 { + clock_getcpuclockid; + dirfd; fdlopen; __FreeBSD_libc_enter_restricted_mode; getcontextx; Copied: stable/9/lib/libc/gen/clock_getcpuclockid.c (from r239347, head/lib/libc/gen/clock_getcpuclockid.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/gen/clock_getcpuclockid.c Fri Aug 16 06:40:12 2013 (r254398, copy of r239347, head/lib/libc/gen/clock_getcpuclockid.c) @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2012 David Xu . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY DANIEL EISCHEN AND CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +clockid_t +clock_getcpuclockid(pid_t pid, clockid_t *clock_id) +{ + return clock_getcpuclockid2(pid, CPUCLOCK_WHICH_PID, clock_id); +} Modified: stable/9/lib/libc/gen/sysconf.c ============================================================================== --- stable/9/lib/libc/gen/sysconf.c Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/lib/libc/gen/sysconf.c Fri Aug 16 06:40:12 2013 (r254398) @@ -359,11 +359,7 @@ yesno: return (_POSIX_CLOCK_SELECTION); #endif case _SC_CPUTIME: -#if _POSIX_CPUTIME == 0 -#error "_POSIX_CPUTIME" -#else return (_POSIX_CPUTIME); -#endif #ifdef notdef case _SC_FILE_LOCKING: /* Modified: stable/9/lib/libc/sys/Symbol.map ============================================================================== --- stable/9/lib/libc/sys/Symbol.map Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/lib/libc/sys/Symbol.map Fri Aug 16 06:40:12 2013 (r254398) @@ -379,6 +379,7 @@ FBSD_1.2 { }; FBSD_1.3 { + clock_getcpuclockid2; posix_fadvise; wait6; }; @@ -488,6 +489,8 @@ FBSDprivate_1.0 { __sys_chown; _chroot; __sys_chroot; + _clock_getcpuclockid2; + __sys_clock_getcpuclockid2; _clock_getres; __sys_clock_getres; _clock_gettime; Modified: stable/9/lib/libthr/thread/thr_getcpuclockid.c ============================================================================== --- stable/9/lib/libthr/thread/thr_getcpuclockid.c Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/lib/libthr/thread/thr_getcpuclockid.c Fri Aug 16 06:40:12 2013 (r254398) @@ -39,9 +39,11 @@ __weak_reference(_pthread_getcpuclockid, int _pthread_getcpuclockid(pthread_t pthread, clockid_t *clock_id) { + if (pthread == NULL) return (EINVAL); - *clock_id = CLOCK_THREAD_CPUTIME_ID; + if (clock_getcpuclockid2(TID(pthread), CPUCLOCK_WHICH_TID, clock_id)) + return (errno); return (0); } Modified: stable/9/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_syscall.h Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/compat/freebsd32/freebsd32_syscall.h Fri Aug 16 06:40:12 2013 (r254398) @@ -212,6 +212,7 @@ #define FREEBSD32_SYS_freebsd32_ktimer_gettime 238 #define FREEBSD32_SYS_ktimer_getoverrun 239 #define FREEBSD32_SYS_freebsd32_nanosleep 240 +#define FREEBSD32_SYS_clock_getcpuclockid2 247 #define FREEBSD32_SYS_minherit 250 #define FREEBSD32_SYS_rfork 251 #define FREEBSD32_SYS_openbsd_poll 252 Modified: stable/9/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_syscalls.c Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/compat/freebsd32/freebsd32_syscalls.c Fri Aug 16 06:40:12 2013 (r254398) @@ -257,7 +257,7 @@ const char *freebsd32_syscallnames[] = { "#244", /* 244 = nosys */ "#245", /* 245 = nosys */ "#246", /* 246 = nosys */ - "#247", /* 247 = nosys */ + "clock_getcpuclockid2", /* 247 = clock_getcpuclockid2 */ "#248", /* 248 = ntp_gettime */ "#249", /* 249 = nosys */ "minherit", /* 250 = minherit */ Modified: stable/9/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_sysent.c Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/compat/freebsd32/freebsd32_sysent.c Fri Aug 16 06:40:12 2013 (r254398) @@ -294,7 +294,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 244 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 245 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 246 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 247 = nosys */ + { AS(clock_getcpuclockid2_args), (sy_call_t *)sys_clock_getcpuclockid2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 247 = clock_getcpuclockid2 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 248 = ntp_gettime */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 249 = nosys */ { AS(minherit_args), (sy_call_t *)sys_minherit, AUE_MINHERIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 250 = minherit */ Modified: stable/9/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_systrace_args.c Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/compat/freebsd32/freebsd32_systrace_args.c Fri Aug 16 06:40:12 2013 (r254398) @@ -1244,6 +1244,15 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } + /* clock_getcpuclockid2 */ + case 247: { + struct clock_getcpuclockid2_args *p = params; + iarg[0] = p->id; /* id_t */ + iarg[1] = p->which; /* int */ + uarg[2] = (intptr_t) p->clock_id; /* clockid_t * */ + *n_args = 3; + break; + } /* minherit */ case 250: { struct minherit_args *p = params; @@ -5104,6 +5113,22 @@ systrace_setargdesc(int sysnum, int ndx, break; }; break; + /* clock_getcpuclockid2 */ + case 247: + switch(ndx) { + case 0: + p = "id_t"; + break; + case 1: + p = "int"; + break; + case 2: + p = "clockid_t *"; + break; + default: + break; + }; + break; /* minherit */ case 250: switch(ndx) { Modified: stable/9/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/9/sys/compat/freebsd32/syscalls.master Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/compat/freebsd32/syscalls.master Fri Aug 16 06:40:12 2013 (r254398) @@ -461,7 +461,8 @@ 244 AUE_NULL UNIMPL nosys 245 AUE_NULL UNIMPL nosys 246 AUE_NULL UNIMPL nosys -247 AUE_NULL UNIMPL nosys +247 AUE_NULL NOPROTO { int clock_getcpuclockid2(id_t id,\ + int which, clockid_t *clock_id); } 248 AUE_NULL UNIMPL ntp_gettime 249 AUE_NULL UNIMPL nosys ; syscall numbers initially used in OpenBSD Modified: stable/9/sys/kern/init_sysent.c ============================================================================== --- stable/9/sys/kern/init_sysent.c Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/kern/init_sysent.c Fri Aug 16 06:40:12 2013 (r254398) @@ -281,7 +281,7 @@ struct sysent sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 244 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 245 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 246 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 247 = nosys */ + { AS(clock_getcpuclockid2_args), (sy_call_t *)sys_clock_getcpuclockid2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 247 = clock_getcpuclockid2 */ { AS(ntp_gettime_args), (sy_call_t *)sys_ntp_gettime, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 248 = ntp_gettime */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 249 = nosys */ { AS(minherit_args), (sy_call_t *)sys_minherit, AUE_MINHERIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 250 = minherit */ Modified: stable/9/sys/kern/kern_time.c ============================================================================== --- stable/9/sys/kern/kern_time.c Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/kern/kern_time.c Fri Aug 16 06:40:12 2013 (r254398) @@ -58,6 +58,12 @@ __FBSDID("$FreeBSD$"); #include #define MAX_CLOCKS (CLOCK_MONOTONIC+1) +#define CPUCLOCK_BIT 0x80000000 +#define CPUCLOCK_PROCESS_BIT 0x40000000 +#define CPUCLOCK_ID_MASK (~(CPUCLOCK_BIT|CPUCLOCK_PROCESS_BIT)) +#define MAKE_THREAD_CPUCLOCK(tid) (CPUCLOCK_BIT|(tid)) +#define MAKE_PROCESS_CPUCLOCK(pid) \ + (CPUCLOCK_BIT|CPUCLOCK_PROCESS_BIT|(pid)) static struct kclock posix_clocks[MAX_CLOCKS]; static uma_zone_t itimer_zone = NULL; @@ -162,6 +168,52 @@ settime(struct thread *td, struct timeva } #ifndef _SYS_SYSPROTO_H_ +struct clock_getcpuclockid2_args { + id_t id; + int which, + clockid_t *clock_id; +}; +#endif +/* ARGSUSED */ +int +sys_clock_getcpuclockid2(struct thread *td, struct clock_getcpuclockid2_args *uap) +{ + clockid_t clk_id; + struct proc *p; + pid_t pid; + lwpid_t tid; + int error; + + switch(uap->which) { + case CPUCLOCK_WHICH_PID: + if (uap->id != 0) { + p = pfind(uap->id); + if (p == NULL) + return (ESRCH); + error = p_cansee(td, p); + PROC_UNLOCK(p); + if (error) + return (error); + pid = uap->id; + } else { + pid = td->td_proc->p_pid; + } + clk_id = MAKE_PROCESS_CPUCLOCK(pid); + break; + case CPUCLOCK_WHICH_TID: + if (uap->id == 0) + tid = td->td_tid; + else + tid = uap->id; + clk_id = MAKE_THREAD_CPUCLOCK(tid); + break; + default: + return (EINVAL); + } + return (copyout(&clk_id, uap->clock_id, sizeof(clockid_t))); +} + +#ifndef _SYS_SYSPROTO_H_ struct clock_gettime_args { clockid_t clock_id; struct timespec *tp; @@ -181,12 +233,80 @@ sys_clock_gettime(struct thread *td, str return (error); } +static inline void +cputick2timespec(uint64_t runtime, struct timespec *ats) +{ + runtime = cputick2usec(runtime); + ats->tv_sec = runtime / 1000000; + ats->tv_nsec = runtime % 1000000 * 1000; +} + +static void +get_thread_cputime(struct thread *targettd, struct timespec *ats) +{ + uint64_t runtime, curtime, switchtime; + + if (targettd == NULL) { /* current thread */ + critical_enter(); + switchtime = PCPU_GET(switchtime); + curtime = cpu_ticks(); + runtime = curthread->td_runtime; + critical_exit(); + runtime += curtime - switchtime; + } else { + thread_lock(targettd); + runtime = targettd->td_runtime; + thread_unlock(targettd); + } + cputick2timespec(runtime, ats); +} + +static void +get_process_cputime(struct proc *targetp, struct timespec *ats) +{ + uint64_t runtime; + struct rusage ru; + + PROC_SLOCK(targetp); + rufetch(targetp, &ru); + runtime = targetp->p_rux.rux_runtime; + PROC_SUNLOCK(targetp); + cputick2timespec(runtime, ats); +} + +static int +get_cputime(struct thread *td, clockid_t clock_id, struct timespec *ats) +{ + struct proc *p, *p2; + struct thread *td2; + lwpid_t tid; + pid_t pid; + int error; + + p = td->td_proc; + if ((clock_id & CPUCLOCK_PROCESS_BIT) == 0) { + tid = clock_id & CPUCLOCK_ID_MASK; + td2 = tdfind(tid, p->p_pid); + if (td2 == NULL) + return (EINVAL); + get_thread_cputime(td2, ats); + PROC_UNLOCK(td2->td_proc); + } else { + pid = clock_id & CPUCLOCK_ID_MASK; + error = pget(pid, PGET_CANSEE, &p2); + if (error != 0) + return (EINVAL); + get_process_cputime(p2, ats); + PROC_UNLOCK(p2); + } + return (0); +} + int kern_clock_gettime(struct thread *td, clockid_t clock_id, struct timespec *ats) { struct timeval sys, user; struct proc *p; - uint64_t runtime, curtime, switchtime; p = td->td_proc; switch (clock_id) { @@ -229,17 +349,17 @@ kern_clock_gettime(struct thread *td, cl ats->tv_nsec = 0; break; case CLOCK_THREAD_CPUTIME_ID: - critical_enter(); - switchtime = PCPU_GET(switchtime); - curtime = cpu_ticks(); - runtime = td->td_runtime; - critical_exit(); - runtime = cputick2usec(runtime + curtime - switchtime); - ats->tv_sec = runtime / 1000000; - ats->tv_nsec = runtime % 1000000 * 1000; + get_thread_cputime(NULL, ats); + break; + case CLOCK_PROCESS_CPUTIME_ID: + PROC_LOCK(p); + get_process_cputime(p, ats); + PROC_UNLOCK(p); break; default: - return (EINVAL); + if ((int)clock_id >= 0) + return (EINVAL); + return (get_cputime(td, clock_id, ats)); } return (0); } @@ -333,12 +453,16 @@ kern_clock_getres(struct thread *td, clo ts->tv_nsec = 0; break; case CLOCK_THREAD_CPUTIME_ID: + case CLOCK_PROCESS_CPUTIME_ID: + cputime: /* sync with cputick2usec */ ts->tv_nsec = 1000000 / cpu_tickrate(); if (ts->tv_nsec == 0) ts->tv_nsec = 1000; break; default: + if ((int)clock_id < 0) + goto cputime; return (EINVAL); } return (0); Modified: stable/9/sys/kern/syscalls.c ============================================================================== --- stable/9/sys/kern/syscalls.c Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/kern/syscalls.c Fri Aug 16 06:40:12 2013 (r254398) @@ -254,7 +254,7 @@ const char *syscallnames[] = { "#244", /* 244 = nosys */ "#245", /* 245 = nosys */ "#246", /* 246 = nosys */ - "#247", /* 247 = nosys */ + "clock_getcpuclockid2", /* 247 = clock_getcpuclockid2 */ "ntp_gettime", /* 248 = ntp_gettime */ "#249", /* 249 = nosys */ "minherit", /* 250 = minherit */ Modified: stable/9/sys/kern/syscalls.master ============================================================================== --- stable/9/sys/kern/syscalls.master Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/kern/syscalls.master Fri Aug 16 06:40:12 2013 (r254398) @@ -461,7 +461,8 @@ 244 AUE_NULL UNIMPL nosys 245 AUE_NULL UNIMPL nosys 246 AUE_NULL UNIMPL nosys -247 AUE_NULL UNIMPL nosys +247 AUE_NULL STD { int clock_getcpuclockid2(id_t id,\ + int which, clockid_t *clock_id); } 248 AUE_NULL STD { int ntp_gettime(struct ntptimeval *ntvp); } 249 AUE_NULL UNIMPL nosys ; syscall numbers initially used in OpenBSD Modified: stable/9/sys/kern/systrace_args.c ============================================================================== --- stable/9/sys/kern/systrace_args.c Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/kern/systrace_args.c Fri Aug 16 06:40:12 2013 (r254398) @@ -1337,6 +1337,15 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } + /* clock_getcpuclockid2 */ + case 247: { + struct clock_getcpuclockid2_args *p = params; + iarg[0] = p->id; /* id_t */ + iarg[1] = p->which; /* int */ + uarg[2] = (intptr_t) p->clock_id; /* clockid_t * */ + *n_args = 3; + break; + } /* ntp_gettime */ case 248: { struct ntp_gettime_args *p = params; @@ -5393,6 +5402,22 @@ systrace_setargdesc(int sysnum, int ndx, break; }; break; + /* clock_getcpuclockid2 */ + case 247: + switch(ndx) { + case 0: + p = "id_t"; + break; + case 1: + p = "int"; + break; + case 2: + p = "clockid_t *"; + break; + default: + break; + }; + break; /* ntp_gettime */ case 248: switch(ndx) { Modified: stable/9/sys/sys/syscall.h ============================================================================== --- stable/9/sys/sys/syscall.h Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/sys/syscall.h Fri Aug 16 06:40:12 2013 (r254398) @@ -216,6 +216,7 @@ #define SYS_ktimer_gettime 238 #define SYS_ktimer_getoverrun 239 #define SYS_nanosleep 240 +#define SYS_clock_getcpuclockid2 247 #define SYS_ntp_gettime 248 #define SYS_minherit 250 #define SYS_rfork 251 Modified: stable/9/sys/sys/syscall.mk ============================================================================== --- stable/9/sys/sys/syscall.mk Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/sys/syscall.mk Fri Aug 16 06:40:12 2013 (r254398) @@ -168,6 +168,7 @@ MIASM = \ ktimer_gettime.o \ ktimer_getoverrun.o \ nanosleep.o \ + clock_getcpuclockid2.o \ ntp_gettime.o \ minherit.o \ rfork.o \ Modified: stable/9/sys/sys/sysproto.h ============================================================================== --- stable/9/sys/sys/sysproto.h Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/sys/sysproto.h Fri Aug 16 06:40:12 2013 (r254398) @@ -726,6 +726,11 @@ struct nanosleep_args { char rqtp_l_[PADL_(const struct timespec *)]; const struct timespec * rqtp; char rqtp_r_[PADR_(const struct timespec *)]; char rmtp_l_[PADL_(struct timespec *)]; struct timespec * rmtp; char rmtp_r_[PADR_(struct timespec *)]; }; +struct clock_getcpuclockid2_args { + char id_l_[PADL_(id_t)]; id_t id; char id_r_[PADR_(id_t)]; + char which_l_[PADL_(int)]; int which; char which_r_[PADR_(int)]; + char clock_id_l_[PADL_(clockid_t *)]; clockid_t * clock_id; char clock_id_r_[PADR_(clockid_t *)]; +}; struct ntp_gettime_args { char ntvp_l_[PADL_(struct ntptimeval *)]; struct ntptimeval * ntvp; char ntvp_r_[PADR_(struct ntptimeval *)]; }; @@ -1902,6 +1907,7 @@ int sys_ktimer_settime(struct thread *, int sys_ktimer_gettime(struct thread *, struct ktimer_gettime_args *); int sys_ktimer_getoverrun(struct thread *, struct ktimer_getoverrun_args *); int sys_nanosleep(struct thread *, struct nanosleep_args *); +int sys_clock_getcpuclockid2(struct thread *, struct clock_getcpuclockid2_args *); int sys_ntp_gettime(struct thread *, struct ntp_gettime_args *); int sys_minherit(struct thread *, struct minherit_args *); int sys_rfork(struct thread *, struct rfork_args *); @@ -2590,6 +2596,7 @@ int freebsd7_shmctl(struct thread *, str #define SYS_AUE_ktimer_gettime AUE_NULL #define SYS_AUE_ktimer_getoverrun AUE_NULL #define SYS_AUE_nanosleep AUE_NULL +#define SYS_AUE_clock_getcpuclockid2 AUE_NULL #define SYS_AUE_ntp_gettime AUE_NULL #define SYS_AUE_minherit AUE_MINHERIT #define SYS_AUE_rfork AUE_RFORK Modified: stable/9/sys/sys/time.h ============================================================================== --- stable/9/sys/sys/time.h Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/sys/time.h Fri Aug 16 06:40:12 2013 (r254398) @@ -266,6 +266,7 @@ struct clockinfo { #define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */ #define CLOCK_SECOND 13 /* FreeBSD-specific. */ #define CLOCK_THREAD_CPUTIME_ID 14 +#define CLOCK_PROCESS_CPUTIME_ID 15 #endif #ifndef TIMER_ABSTIME @@ -273,6 +274,11 @@ struct clockinfo { #define TIMER_ABSTIME 0x1 /* absolute timer */ #endif +#if __BSD_VISIBLE +#define CPUCLOCK_WHICH_PID 0 +#define CPUCLOCK_WHICH_TID 1 +#endif + #ifdef _KERNEL /* @@ -344,6 +350,7 @@ int utimes(const char *, const struct ti #if __BSD_VISIBLE int adjtime(const struct timeval *, struct timeval *); +int clock_getcpuclockid2(id_t, int, clockid_t *); int futimes(int, const struct timeval *); int futimesat(int, const char *, const struct timeval [2]); int lutimes(const char *, const struct timeval *); Modified: stable/9/sys/sys/unistd.h ============================================================================== --- stable/9/sys/sys/unistd.h Fri Aug 16 05:30:13 2013 (r254397) +++ stable/9/sys/sys/unistd.h Fri Aug 16 06:40:12 2013 (r254398) @@ -53,7 +53,7 @@ #define _POSIX_ASYNCHRONOUS_IO 0 #define _POSIX_CHOWN_RESTRICTED 1 #define _POSIX_CLOCK_SELECTION (-1) -#define _POSIX_CPUTIME (-1) +#define _POSIX_CPUTIME 200112L #define _POSIX_FSYNC 200112L #define _POSIX_IPV6 0 #define _POSIX_JOB_CONTROL 1 From owner-svn-src-stable@FreeBSD.ORG Fri Aug 16 06:42:27 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 116BFC71; Fri, 16 Aug 2013 06:42:27 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E3CB52320; Fri, 16 Aug 2013 06:42:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7G6gQOg032928; Fri, 16 Aug 2013 06:42:26 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7G6gPdw032918; Fri, 16 Aug 2013 06:42:25 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201308160642.r7G6gPdw032918@svn.freebsd.org> From: David Xu Date: Fri, 16 Aug 2013 06:42:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254399 - in stable/9/sys: compat/freebsd32 kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Aug 2013 06:42:27 -0000 Author: davidxu Date: Fri Aug 16 06:42:24 2013 New Revision: 254399 URL: http://svnweb.freebsd.org/changeset/base/254399 Log: Regen. Modified: stable/9/sys/compat/freebsd32/freebsd32_proto.h stable/9/sys/compat/freebsd32/freebsd32_syscall.h stable/9/sys/compat/freebsd32/freebsd32_syscalls.c stable/9/sys/compat/freebsd32/freebsd32_sysent.c stable/9/sys/kern/init_sysent.c stable/9/sys/kern/syscalls.c stable/9/sys/sys/syscall.h stable/9/sys/sys/syscall.mk stable/9/sys/sys/sysproto.h Modified: stable/9/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_proto.h Fri Aug 16 06:40:12 2013 (r254398) +++ stable/9/sys/compat/freebsd32/freebsd32_proto.h Fri Aug 16 06:42:24 2013 (r254399) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 254130 2013-08-09 06:51:34Z kib + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 254398 2013-08-16 06:40:12Z davidxu */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: stable/9/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_syscall.h Fri Aug 16 06:40:12 2013 (r254398) +++ stable/9/sys/compat/freebsd32/freebsd32_syscall.h Fri Aug 16 06:42:24 2013 (r254399) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 254130 2013-08-09 06:51:34Z kib + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 254398 2013-08-16 06:40:12Z davidxu */ #define FREEBSD32_SYS_syscall 0 Modified: stable/9/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_syscalls.c Fri Aug 16 06:40:12 2013 (r254398) +++ stable/9/sys/compat/freebsd32/freebsd32_syscalls.c Fri Aug 16 06:42:24 2013 (r254399) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 254130 2013-08-09 06:51:34Z kib + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 254398 2013-08-16 06:40:12Z davidxu */ const char *freebsd32_syscallnames[] = { Modified: stable/9/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_sysent.c Fri Aug 16 06:40:12 2013 (r254398) +++ stable/9/sys/compat/freebsd32/freebsd32_sysent.c Fri Aug 16 06:42:24 2013 (r254399) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 254130 2013-08-09 06:51:34Z kib + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 254398 2013-08-16 06:40:12Z davidxu */ #include "opt_compat.h" Modified: stable/9/sys/kern/init_sysent.c ============================================================================== --- stable/9/sys/kern/init_sysent.c Fri Aug 16 06:40:12 2013 (r254398) +++ stable/9/sys/kern/init_sysent.c Fri Aug 16 06:42:24 2013 (r254399) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/kern/syscalls.master 251051 2013-05-28 05:51:00Z kib + * created from FreeBSD: stable/9/sys/kern/syscalls.master 254398 2013-08-16 06:40:12Z davidxu */ #include "opt_compat.h" Modified: stable/9/sys/kern/syscalls.c ============================================================================== --- stable/9/sys/kern/syscalls.c Fri Aug 16 06:40:12 2013 (r254398) +++ stable/9/sys/kern/syscalls.c Fri Aug 16 06:42:24 2013 (r254399) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/kern/syscalls.master 251051 2013-05-28 05:51:00Z kib + * created from FreeBSD: stable/9/sys/kern/syscalls.master 254398 2013-08-16 06:40:12Z davidxu */ const char *syscallnames[] = { Modified: stable/9/sys/sys/syscall.h ============================================================================== --- stable/9/sys/sys/syscall.h Fri Aug 16 06:40:12 2013 (r254398) +++ stable/9/sys/sys/syscall.h Fri Aug 16 06:42:24 2013 (r254399) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/kern/syscalls.master 251051 2013-05-28 05:51:00Z kib + * created from FreeBSD: stable/9/sys/kern/syscalls.master 254398 2013-08-16 06:40:12Z davidxu */ #define SYS_syscall 0 Modified: stable/9/sys/sys/syscall.mk ============================================================================== --- stable/9/sys/sys/syscall.mk Fri Aug 16 06:40:12 2013 (r254398) +++ stable/9/sys/sys/syscall.mk Fri Aug 16 06:42:24 2013 (r254399) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: stable/9/sys/kern/syscalls.master 251051 2013-05-28 05:51:00Z kib +# created from FreeBSD: stable/9/sys/kern/syscalls.master 254398 2013-08-16 06:40:12Z davidxu MIASM = \ syscall.o \ exit.o \ Modified: stable/9/sys/sys/sysproto.h ============================================================================== --- stable/9/sys/sys/sysproto.h Fri Aug 16 06:40:12 2013 (r254398) +++ stable/9/sys/sys/sysproto.h Fri Aug 16 06:42:24 2013 (r254399) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/kern/syscalls.master 251051 2013-05-28 05:51:00Z kib + * created from FreeBSD: stable/9/sys/kern/syscalls.master 254398 2013-08-16 06:40:12Z davidxu */ #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-stable@FreeBSD.ORG Fri Aug 16 07:11:16 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D2AB05DC; Fri, 16 Aug 2013 07:11:16 +0000 (UTC) (envelope-from erwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BAC9824C6; Fri, 16 Aug 2013 07:11:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7G7BGXS044414; Fri, 16 Aug 2013 07:11:16 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7G7BDmV044390; Fri, 16 Aug 2013 07:11:13 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201308160711.r7G7BDmV044390@svn.freebsd.org> From: Erwin Lansing Date: Fri, 16 Aug 2013 07:11:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254402 - in stable/9: contrib/bind9 contrib/bind9/bin contrib/bind9/bin/check contrib/bind9/bin/confgen contrib/bind9/bin/dig contrib/bind9/bin/dig/include/dig contrib/bind9/bin/dnssec... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Aug 2013 07:11:16 -0000 Author: erwin Date: Fri Aug 16 07:11:13 2013 New Revision: 254402 URL: http://svnweb.freebsd.org/changeset/base/254402 Log: MFC 253983, 253984: Update Bind to 9.8.5-P2 New Features Adds a new configuration option, "check-spf"; valid values are "warn" (default) and "ignore". When set to "warn", checks SPF and TXT records in spf format, warning if either resource record type occurs without a corresponding record of the other resource record type. [RT #33355] Adds support for Uniform Resource Identifier (URI) resource records. [RT #23386] Adds support for the EUI48 and EUI64 RR types. [RT #33082] Adds support for the RFC 6742 ILNP record types (NID, LP, L32, and L64). [RT #31836] Feature Changes Changes timing of when slave zones send NOTIFY messages after loading a new copy of the zone. They now send the NOTIFY before writing the zone data to disk. This will result in quicker propagation of updates in multi-level server structures. [RT #27242] "named -V" can now report a source ID string. (This is will be of most interest to developers and troubleshooters). The source ID for ISC's production versions of BIND is defined in the "srcid" file in the build tree and is normally set to the most recent git hash. [RT #31494] Response Policy Zone performance enhancements. New "response-policy" option "min-ns-dots". "nsip" and "nsdname" now enabled by default with RPZ. [RT #32251] Approved by: delphij (mentor) Sponsored by: DK Hostmaster A/S Added: stable/9/contrib/bind9/lib/dns/rdata/generic/eui48_108.c - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/eui48_108.c stable/9/contrib/bind9/lib/dns/rdata/generic/eui48_108.h - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/eui48_108.h stable/9/contrib/bind9/lib/dns/rdata/generic/eui64_109.c - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/eui64_109.c stable/9/contrib/bind9/lib/dns/rdata/generic/eui64_109.h - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/eui64_109.h stable/9/contrib/bind9/lib/dns/rdata/generic/l32_105.c - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/l32_105.c stable/9/contrib/bind9/lib/dns/rdata/generic/l32_105.h - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/l32_105.h stable/9/contrib/bind9/lib/dns/rdata/generic/l64_106.c - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/l64_106.c stable/9/contrib/bind9/lib/dns/rdata/generic/l64_106.h - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/l64_106.h stable/9/contrib/bind9/lib/dns/rdata/generic/lp_107.c - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/lp_107.c stable/9/contrib/bind9/lib/dns/rdata/generic/lp_107.h - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/lp_107.h stable/9/contrib/bind9/lib/dns/rdata/generic/nid_104.c - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/nid_104.c stable/9/contrib/bind9/lib/dns/rdata/generic/nid_104.h - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/nid_104.h stable/9/contrib/bind9/lib/dns/rdata/generic/uri_256.c - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/uri_256.c stable/9/contrib/bind9/lib/dns/rdata/generic/uri_256.h - copied unchanged from r253983, head/contrib/bind9/lib/dns/rdata/generic/uri_256.h stable/9/contrib/bind9/lib/isc/include/isc/regex.h - copied unchanged from r253983, head/contrib/bind9/lib/isc/include/isc/regex.h stable/9/contrib/bind9/lib/isc/regex.c - copied unchanged from r253983, head/contrib/bind9/lib/isc/regex.c Replaced: stable/9/contrib/bind9/libtool.m4/ - copied from r253983, head/contrib/bind9/libtool.m4/ Deleted: stable/9/contrib/bind9/libtool.m4/lt~obsolete.m4 Modified: stable/9/contrib/bind9/CHANGES stable/9/contrib/bind9/COPYRIGHT stable/9/contrib/bind9/FAQ stable/9/contrib/bind9/FAQ.xml stable/9/contrib/bind9/Makefile.in stable/9/contrib/bind9/README stable/9/contrib/bind9/aclocal.m4 stable/9/contrib/bind9/bin/Makefile.in stable/9/contrib/bind9/bin/check/check-tool.c stable/9/contrib/bind9/bin/check/named-checkconf.c stable/9/contrib/bind9/bin/check/named-checkzone.8 stable/9/contrib/bind9/bin/check/named-checkzone.c stable/9/contrib/bind9/bin/check/named-checkzone.docbook stable/9/contrib/bind9/bin/check/named-checkzone.html stable/9/contrib/bind9/bin/confgen/keygen.c stable/9/contrib/bind9/bin/confgen/rndc-confgen.c stable/9/contrib/bind9/bin/dig/dig.1 stable/9/contrib/bind9/bin/dig/dig.c stable/9/contrib/bind9/bin/dig/dig.docbook stable/9/contrib/bind9/bin/dig/dig.html stable/9/contrib/bind9/bin/dig/dighost.c stable/9/contrib/bind9/bin/dig/host.c stable/9/contrib/bind9/bin/dig/include/dig/dig.h stable/9/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c stable/9/contrib/bind9/bin/dnssec/dnssec-keygen.c stable/9/contrib/bind9/bin/dnssec/dnssec-revoke.c stable/9/contrib/bind9/bin/dnssec/dnssec-settime.c stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.c stable/9/contrib/bind9/bin/named/Makefile.in stable/9/contrib/bind9/bin/named/client.c stable/9/contrib/bind9/bin/named/config.c stable/9/contrib/bind9/bin/named/control.c stable/9/contrib/bind9/bin/named/controlconf.c stable/9/contrib/bind9/bin/named/include/named/client.h stable/9/contrib/bind9/bin/named/include/named/globals.h stable/9/contrib/bind9/bin/named/include/named/server.h stable/9/contrib/bind9/bin/named/interfacemgr.c stable/9/contrib/bind9/bin/named/log.c stable/9/contrib/bind9/bin/named/logconf.c stable/9/contrib/bind9/bin/named/lwresd.c stable/9/contrib/bind9/bin/named/main.c stable/9/contrib/bind9/bin/named/named.conf.5 stable/9/contrib/bind9/bin/named/named.conf.docbook stable/9/contrib/bind9/bin/named/named.conf.html stable/9/contrib/bind9/bin/named/query.c stable/9/contrib/bind9/bin/named/server.c stable/9/contrib/bind9/bin/named/statschannel.c stable/9/contrib/bind9/bin/named/tkeyconf.c stable/9/contrib/bind9/bin/named/tsigconf.c stable/9/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c stable/9/contrib/bind9/bin/named/update.c stable/9/contrib/bind9/bin/named/xfrout.c stable/9/contrib/bind9/bin/named/zoneconf.c stable/9/contrib/bind9/bin/nsupdate/nsupdate.c stable/9/contrib/bind9/bin/rndc/rndc.c stable/9/contrib/bind9/bin/tools/genrandom.c stable/9/contrib/bind9/bin/tools/isc-hmac-fixup.8 stable/9/contrib/bind9/bin/tools/isc-hmac-fixup.docbook stable/9/contrib/bind9/bin/tools/isc-hmac-fixup.html stable/9/contrib/bind9/config.h.in stable/9/contrib/bind9/config.threads.in stable/9/contrib/bind9/configure.in stable/9/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/9/contrib/bind9/doc/arm/Bv9ARM.ch01.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch10.html stable/9/contrib/bind9/doc/arm/Bv9ARM.html stable/9/contrib/bind9/doc/arm/Bv9ARM.pdf stable/9/contrib/bind9/doc/arm/man.arpaname.html stable/9/contrib/bind9/doc/arm/man.ddns-confgen.html stable/9/contrib/bind9/doc/arm/man.dig.html stable/9/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html stable/9/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html stable/9/contrib/bind9/doc/arm/man.dnssec-keygen.html stable/9/contrib/bind9/doc/arm/man.dnssec-revoke.html stable/9/contrib/bind9/doc/arm/man.dnssec-settime.html stable/9/contrib/bind9/doc/arm/man.dnssec-signzone.html stable/9/contrib/bind9/doc/arm/man.genrandom.html stable/9/contrib/bind9/doc/arm/man.host.html stable/9/contrib/bind9/doc/arm/man.isc-hmac-fixup.html stable/9/contrib/bind9/doc/arm/man.named-checkconf.html stable/9/contrib/bind9/doc/arm/man.named-checkzone.html stable/9/contrib/bind9/doc/arm/man.named-journalprint.html stable/9/contrib/bind9/doc/arm/man.named.html stable/9/contrib/bind9/doc/arm/man.nsec3hash.html stable/9/contrib/bind9/doc/arm/man.nsupdate.html stable/9/contrib/bind9/doc/arm/man.rndc-confgen.html stable/9/contrib/bind9/doc/arm/man.rndc.conf.html stable/9/contrib/bind9/doc/arm/man.rndc.html stable/9/contrib/bind9/doc/arm/pkcs11.xml stable/9/contrib/bind9/doc/misc/options stable/9/contrib/bind9/isc-config.sh.in stable/9/contrib/bind9/lib/Makefile.in stable/9/contrib/bind9/lib/bind9/Makefile.in stable/9/contrib/bind9/lib/bind9/api stable/9/contrib/bind9/lib/bind9/check.c stable/9/contrib/bind9/lib/dns/Makefile.in stable/9/contrib/bind9/lib/dns/acache.c stable/9/contrib/bind9/lib/dns/adb.c stable/9/contrib/bind9/lib/dns/api stable/9/contrib/bind9/lib/dns/cache.c stable/9/contrib/bind9/lib/dns/client.c stable/9/contrib/bind9/lib/dns/db.c stable/9/contrib/bind9/lib/dns/dispatch.c stable/9/contrib/bind9/lib/dns/dlz.c stable/9/contrib/bind9/lib/dns/dnssec.c stable/9/contrib/bind9/lib/dns/dst_api.c stable/9/contrib/bind9/lib/dns/dst_internal.h stable/9/contrib/bind9/lib/dns/dst_openssl.h stable/9/contrib/bind9/lib/dns/ecdb.c stable/9/contrib/bind9/lib/dns/gen.c stable/9/contrib/bind9/lib/dns/gssapictx.c stable/9/contrib/bind9/lib/dns/include/dns/acache.h stable/9/contrib/bind9/lib/dns/include/dns/db.h stable/9/contrib/bind9/lib/dns/include/dns/message.h stable/9/contrib/bind9/lib/dns/include/dns/name.h stable/9/contrib/bind9/lib/dns/include/dns/ncache.h stable/9/contrib/bind9/lib/dns/include/dns/nsec.h stable/9/contrib/bind9/lib/dns/include/dns/nsec3.h stable/9/contrib/bind9/lib/dns/include/dns/rdata.h stable/9/contrib/bind9/lib/dns/include/dns/result.h stable/9/contrib/bind9/lib/dns/include/dns/rpz.h stable/9/contrib/bind9/lib/dns/include/dns/types.h stable/9/contrib/bind9/lib/dns/include/dns/validator.h stable/9/contrib/bind9/lib/dns/include/dns/view.h stable/9/contrib/bind9/lib/dns/include/dns/zone.h stable/9/contrib/bind9/lib/dns/include/dst/dst.h stable/9/contrib/bind9/lib/dns/master.c stable/9/contrib/bind9/lib/dns/message.c stable/9/contrib/bind9/lib/dns/name.c stable/9/contrib/bind9/lib/dns/ncache.c stable/9/contrib/bind9/lib/dns/nsec.c stable/9/contrib/bind9/lib/dns/nsec3.c stable/9/contrib/bind9/lib/dns/openssl_link.c stable/9/contrib/bind9/lib/dns/openssldsa_link.c stable/9/contrib/bind9/lib/dns/opensslecdsa_link.c stable/9/contrib/bind9/lib/dns/opensslgost_link.c stable/9/contrib/bind9/lib/dns/opensslrsa_link.c stable/9/contrib/bind9/lib/dns/peer.c stable/9/contrib/bind9/lib/dns/rbt.c stable/9/contrib/bind9/lib/dns/rbtdb.c stable/9/contrib/bind9/lib/dns/rdata.c stable/9/contrib/bind9/lib/dns/rdata/any_255/tsig_250.c stable/9/contrib/bind9/lib/dns/rdata/generic/dlv_32769.c stable/9/contrib/bind9/lib/dns/rdata/generic/mx_15.c stable/9/contrib/bind9/lib/dns/rdata/generic/sshfp_44.c stable/9/contrib/bind9/lib/dns/rdata/generic/txt_16.c stable/9/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c stable/9/contrib/bind9/lib/dns/rdata/in_1/nsap_22.c stable/9/contrib/bind9/lib/dns/request.c stable/9/contrib/bind9/lib/dns/resolver.c stable/9/contrib/bind9/lib/dns/result.c stable/9/contrib/bind9/lib/dns/rootns.c stable/9/contrib/bind9/lib/dns/rpz.c stable/9/contrib/bind9/lib/dns/sdb.c stable/9/contrib/bind9/lib/dns/sdlz.c stable/9/contrib/bind9/lib/dns/spnego.c stable/9/contrib/bind9/lib/dns/spnego_asn1.c stable/9/contrib/bind9/lib/dns/ssu.c stable/9/contrib/bind9/lib/dns/ssu_external.c stable/9/contrib/bind9/lib/dns/tkey.c stable/9/contrib/bind9/lib/dns/tsig.c stable/9/contrib/bind9/lib/dns/validator.c stable/9/contrib/bind9/lib/dns/view.c stable/9/contrib/bind9/lib/dns/xfrin.c stable/9/contrib/bind9/lib/dns/zone.c stable/9/contrib/bind9/lib/export/dns/Makefile.in stable/9/contrib/bind9/lib/export/irs/Makefile.in stable/9/contrib/bind9/lib/export/isc/Makefile.in stable/9/contrib/bind9/lib/export/isc/include/isc/Makefile.in stable/9/contrib/bind9/lib/export/isc/nls/Makefile.in stable/9/contrib/bind9/lib/export/isc/nothreads/Makefile.in stable/9/contrib/bind9/lib/export/isc/pthreads/Makefile.in stable/9/contrib/bind9/lib/export/isc/unix/Makefile.in stable/9/contrib/bind9/lib/export/isccfg/Makefile.in stable/9/contrib/bind9/lib/export/samples/Makefile.in stable/9/contrib/bind9/lib/export/samples/nsprobe.c stable/9/contrib/bind9/lib/export/samples/sample-async.c stable/9/contrib/bind9/lib/export/samples/sample-gai.c stable/9/contrib/bind9/lib/export/samples/sample-request.c stable/9/contrib/bind9/lib/export/samples/sample-update.c stable/9/contrib/bind9/lib/export/samples/sample.c stable/9/contrib/bind9/lib/irs/api stable/9/contrib/bind9/lib/irs/dnsconf.c stable/9/contrib/bind9/lib/irs/getaddrinfo.c stable/9/contrib/bind9/lib/irs/getnameinfo.c stable/9/contrib/bind9/lib/irs/resconf.c stable/9/contrib/bind9/lib/isc/Makefile.in stable/9/contrib/bind9/lib/isc/api stable/9/contrib/bind9/lib/isc/buffer.c stable/9/contrib/bind9/lib/isc/include/isc/Makefile.in stable/9/contrib/bind9/lib/isc/include/isc/buffer.h stable/9/contrib/bind9/lib/isc/include/isc/file.h stable/9/contrib/bind9/lib/isc/include/isc/list.h stable/9/contrib/bind9/lib/isc/include/isc/mem.h stable/9/contrib/bind9/lib/isc/include/isc/namespace.h stable/9/contrib/bind9/lib/isc/include/isc/region.h stable/9/contrib/bind9/lib/isc/include/isc/sockaddr.h stable/9/contrib/bind9/lib/isc/include/isc/socket.h stable/9/contrib/bind9/lib/isc/include/isc/task.h stable/9/contrib/bind9/lib/isc/include/isc/timer.h stable/9/contrib/bind9/lib/isc/inet_aton.c stable/9/contrib/bind9/lib/isc/mem.c stable/9/contrib/bind9/lib/isc/nothreads/Makefile.in stable/9/contrib/bind9/lib/isc/parseint.c stable/9/contrib/bind9/lib/isc/pthreads/thread.c stable/9/contrib/bind9/lib/isc/ratelimiter.c stable/9/contrib/bind9/lib/isc/sockaddr.c stable/9/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h stable/9/contrib/bind9/lib/isc/symtab.c stable/9/contrib/bind9/lib/isc/task.c stable/9/contrib/bind9/lib/isc/taskpool.c stable/9/contrib/bind9/lib/isc/timer.c stable/9/contrib/bind9/lib/isc/timer_api.c stable/9/contrib/bind9/lib/isc/unix/entropy.c stable/9/contrib/bind9/lib/isc/unix/file.c stable/9/contrib/bind9/lib/isc/unix/include/isc/time.h stable/9/contrib/bind9/lib/isc/unix/net.c stable/9/contrib/bind9/lib/isc/unix/socket.c stable/9/contrib/bind9/lib/isc/unix/time.c stable/9/contrib/bind9/lib/isccc/api stable/9/contrib/bind9/lib/isccc/cc.c stable/9/contrib/bind9/lib/isccfg/Makefile.in stable/9/contrib/bind9/lib/isccfg/aclconf.c stable/9/contrib/bind9/lib/isccfg/api stable/9/contrib/bind9/lib/isccfg/include/isccfg/cfg.h stable/9/contrib/bind9/lib/isccfg/namedconf.c stable/9/contrib/bind9/lib/isccfg/parser.c stable/9/contrib/bind9/lib/lwres/api stable/9/contrib/bind9/lib/lwres/context.c stable/9/contrib/bind9/lib/lwres/getaddrinfo.c stable/9/contrib/bind9/lib/lwres/getipnode.c stable/9/contrib/bind9/lib/lwres/getnameinfo.c stable/9/contrib/bind9/lib/lwres/getrrset.c stable/9/contrib/bind9/lib/lwres/lwinetaton.c stable/9/contrib/bind9/lib/lwres/print.c stable/9/contrib/bind9/ltmain.sh stable/9/contrib/bind9/make/rules.in stable/9/contrib/bind9/version stable/9/lib/bind/config.h stable/9/lib/bind/dns/code.h stable/9/lib/bind/dns/dns/enumtype.h stable/9/lib/bind/dns/dns/rdatastruct.h stable/9/lib/bind/isc/Makefile stable/9/usr.sbin/named/Makefile Directory Properties: stable/9/contrib/bind9/ (props changed) stable/9/lib/bind/ (props changed) stable/9/usr.sbin/named/ (props changed) Modified: stable/9/contrib/bind9/CHANGES ============================================================================== --- stable/9/contrib/bind9/CHANGES Fri Aug 16 07:03:28 2013 (r254401) +++ stable/9/contrib/bind9/CHANGES Fri Aug 16 07:11:13 2013 (r254402) @@ -1,20 +1,392 @@ - --- 9.8.4-P2 released --- + --- 9.8.5-P2 released --- -3516. [security] Removed the check for regex.h in configure in order - to disable regex syntax checking, as it exposes - BIND to a critical flaw in libregex on some - platforms. [RT #32688] +3621. [security] Incorrect bounds checking on private type 'keydata' + can lead to a remotely triggerable REQUIRE failure + (CVE-2013-4854). [RT #34238] - --- 9.8.4-P1 released --- + --- 9.8.5-P1 released --- -3407. [security] Named could die on specific queries with dns64 enabled. - [Addressed in change #3388 for BIND 9.8.5 and 9.9.3.] +3584. [security] Caching data from an incompletely signed zone could + trigger an assertion failure in resolver.c [RT #33690] - --- 9.8.4 released --- + --- 9.8.5 released --- + +3568. [cleanup] Add a product description line to the version file, + to be reported by named -v/-V. [RT #33366] + +3567. [bug] Silence clang static analyzer warnings. [RT #33365] + +3563. [contrib] zone2sqlite failed with some table names. [RT #33375] + +3561. [bug] dig: issue a warning if an EDNS query returns FORMERR + or NOTIMP. Adjust usage message. [RT #33363] + + --- 9.8.5rc1 released --- + +3560. [bug] isc-config.sh did not honor includedir and libdir + when set via configure. [RT #33345] + +3559. [func] Check that both forms of Sender Policy Framework + records exist or do not exist. [RT #33355] + +3558. [bug] IXFR of a DLZ stored zone was broken. [RT #33331] + +3556. [maint] Added AAAA for D.ROOT-SERVERS.NET. + +3555. [bug] Address theoretical race conditions in acache.c + (change #3553 was incomplete). [RT #33252] + +3553. [bug] Address suspected double free in acache. [RT #33252] + +3552. [bug] Wrong getopt option string for 'nsupdate -r'. + [RT #33280] + +3549. [doc] Documentation for "request-nsid" was missing. + [RT #33153] + +3548. [bug] The NSID request code in resolver.c was broken + resulting in invalid EDNS options being sent. + [RT #33153] + +3547. [bug] Some malformed unknown rdata records were not properly + detected and rejected. [RT #33129] + +3056. [func] Added support for URI resource record. [RT #23386] + + --- 9.8.5rc1 released --- + +3546. [func] Add EUI48 and EUI64 types. [RT #33082] + +3544. [contrib] check5011.pl: Script to report the status of + managed keys as recorded in managed-keys.bind. + Contributed by Tony Finch + +3543. [bug] Update socket structure before attaching to socket + manager after accept. [RT #33084] + +3542. [bug] masterformat system test was broken. [RT #33086] + +3541. [bug] Parts of libdns were not properly initialized when + built in libexport mode. [RT #33028] + +3540. [test] libt_api: t_info and t_assert were not thread safe. + +3539. [port] win32: timestamp format didn't match other platforms. + +3538. [test] Running "make test" now requires loopback interfaces + to be set up. [RT #32452] + +3537. [tuning] Slave zones, when updated, now send NOTIFY messages + to peers before being dumped to disk rather than + after. [RT #27242] + +3535. [bug] Minor win32 cleanups. [RT #32962] + +3534. [bug] Extra text after an embedded NULL was ignored when + parsing zone files. [RT #32699] + +3533. [contrib] query-loc-0.4.0: memory leaks. [RT #32960] + +3532. [contrib] zkt: fixed buffer overrun, resource leaks. [RT #32960] + +3531. [bug] win32: A uninitialized value could be returned on out + of memory. [RT #32960] + +3530. [contrib] Better RTT tracking in queryperf. [RT #30128] + +3526. [cleanup] Set up dependencies for unit tests correctly during + build. [RT #32803] + +3521. [bug] Address memory leak in opensslecdsa_link.c. [RT #32249] + +3520. [bug] 'mctx' was not being referenced counted in some places + where it should have been. [RT #32794] + + --- 9.8.5b2 released --- + +3517. [bug] Reorder destruction to avoid shutdown race. [RT #32777] + +3515. [port] '%T' is not portable in strftime(). [RT #32763] + +3514. [bug] The ranges for valid key sizes in ddns-confgen and + rndc-confgen were too constrained. Keys up to 512 + bits are now allowed for most algorithms, and up + to 1024 bits for hmac-sha384 and hmac-sha512. + [RT #32753] + +3509. [cleanup] Added a product line to version file to allow for + easy naming of different products (BIND + vs BIND ESV, for example). [RT #32755] + +3508. [contrib] queryperf was incorrectly rejecting the -T option. + [RT #32338] + +3503. [doc] Clarify size_spec syntax. [RT #32449] + +3500. [security] Support NAPTR regular expression validation on + all platforms without using libregex, which + can be vulnerable to memory exhaustion attack + (CVE-2013-2266). [RT #32688] + +3499. [doc] Corrected ARM documentation of built-in zones. + [RT #32694] + +3498. [bug] zone statistics for zones which matched a potential + empty zone could have their zone-statistics setting + overridden. + +3496. [func] Improvements to RPZ performance. The "response-policy" + syntax now includes a "min-ns-dots" clause, with + default 1, to exclude top-level domains from + NSIP and NSDNAME checking. --enable-rpz-nsip and + --enable-rpz-nsdname are now the default. [RT #32251] + +3489. [bug] --enable-developer now turns on ISC_LIST_CHECKINIT. + When cloning a rdataset do not copy the link contents. + [RT #32651] + +3488. [bug] Use after free error with DH generated keys. [RT #32649] + +3487. [bug] Change 3444 was not complete. There was a additional + place where the NOQNAME proof needed to be saved. + [RT #32629] + +3486. [bug] named could crash when using TKEY-negotiated keys + that had been deleted and then recreated. [RT #32506] + +3485. [cleanup] Only compile openssl_gostlink.c if we support GOST. + +3481. [cleanup] Removed use of const const in atf. + +3479. [bug] Address potential memory leaks in gssapi support + code. [RT #32405] + +3478. [port] Fix a build failure in strict C99 environments + [RT #32475] + +3474. [bug] nsupdate could assert when the local and remote + address families didn't match. [RT #22897] + +3470. [bug] Slave zones could fail to dump when successfully + refreshing after an initial failure. [RT #31276] + + --- 9.8.5b1 released --- + +3468. [security] RPZ rules to generate A records (but not AAAA records) + could trigger an assertion failure when used in + conjunction with DNS64 (CVE-2012-5689). [RT #32141] + +3467. [bug] Added checks in dnssec-keygen and dnssec-settime + to check for delete date < inactive date. [RT #31719] + +3465. [bug] Handle isolated reserved ports. [RT #31778] + +3464. [maint] Updates to PKCS#11 openssl patches, supporting + versions 0.9.8x, 1.0.0j, 1.0.1c [RT #29749] + +3463. [doc] Clarify managed-keys syntax in ARM. [RT #32232] + +3462. [doc] Clarify server selection behavior of dig when using + -4 or -6 options. [RT #32181] + +3461. [bug] Negative responses could incorrectly have AD=1 + set. [RT #32237] + +3458. [bug] Return FORMERR when presented with a overly long + domain named in a request. [RT #29682] + +3457. [protocol] Add ILNP records (NID, LP, L32, L64). [RT #31836] + +3456. [port] g++47: ATF failed to compile. [RT #32012] + +3455. [contrib] queryperf: fix getopt option list. [RT #32338] + +3454. [port] sparc64: improve atomic support. [RT #25182] + +3452. [bug] Accept duplicate singleton records. [RT #32329] + +3451. [port] Increase per thread stack size from 64K to 1M. + [RT #32230] + +3450. [bug] Stop logfileconfig system test spam system logs. + [RT #32315] + +3449. [bug] gen.c: use the pre-processor to construct format + strings so that compiler can perform sanity checks; + check the snprintf results. [RT #17576] + +3448. [bug] The allow-query-on ACL was not processed correctly. + [RT #29486] + +3447. [port] Add support for libxml2-2.9.x [RT #32231] + +3446. [port] win32: Add source ID (see change #3400) to build. + [RT #31683] + +3445. [bug] Warn about zone files with blank owner names + immediately after $ORIGIN directives. [RT #31848] + +3444. [bug] The NOQNAME proof was not being returned from cached + insecure responses. [RT #21409] + +3443. [bug] ddns-confgen: Some TSIG algorithms were incorrectly + rejected when generating keys. [RT #31927] + +3442. [port] Net::DNS 0.69 introduced a non backwards compatible + change. [RT #32216] + +3441. [maint] D.ROOT-SERVERS.NET is now 199.7.91.13. + +3440. [bug] Reorder get_key_struct to not trigger a assertion when + cleaning up due to out of memory error. [RT #32131] + +3439. [bug] contrib/dlz error checking fixes. [RT #32102] + +3438. [bug] Don't accept unknown data escape in quotes. [RT #32031] + +3437. [bug] isc_buffer_init -> isc_buffer_constinit to initialize + buffers with constant data. [RT #32064] + +3436. [bug] Check malloc/calloc return values. [RT #32088] + +3435. [bug] Cross compilation support in configure was broken. + [RT #32078] + +3431. [bug] ddns-confgen: Some valid key algorithms were + not accepted. [RT #31927] + +3430. [bug] win32: isc_time_formatISO8601 was missing the + 'T' between the date and time. [RT #32044] + +3429. [bug] dns_zone_getserial2 could a return success without + returning a valid serial. [RT #32007] + +3428. [cleanup] dig: Add timezone to date output. [RT #2269] + +3427. [bug] dig +trace incorrectly displayed name server + addresses instead of names. [RT #31641] + +3425. [bug] "acacheentry" reference counting was broken resulting + in use after free. [RT #31908] + +3422. [bug] Added a clear error message for when the SOA does not + match the referral. [RT #31281] + +3421. [bug] Named loops when re-signing if all keys are offline. + [RT #31916] + +3420. [bug] Address VPATH compilation issues. [RT #31879] + +3419. [bug] Memory leak on validation cancel. [RT #31869] + +3415. [bug] named could die with a REQUIRE failure if a validation + was canceled. [RT #31804] + +3412. [bug] Copy timeval structure from control message data. + [RT #31548] + +3411. [tuning] Use IPV6_USE_MIN_MTU or equivalent with TCP in addition + to UDP. [RT #31690] + +3410. [bug] Addressed Coverity warnings. [RT #31626] + +3409. [contrib] contrib/dane/mkdane.sh: Tool to generate TLSA RR's + from X.509 certificates, for use with DANE + (DNS-based Authentication of Named Entities). + [RT #30513] + +3406. [bug] mem.c: Fix compilation errors when building with + ISC_MEM_TRACKLINES or ISC_MEMPOOL_NAMES disabled. + Also, ISC_MEM_DEBUG is no longer optional. [RT #31559] + +3405. [bug] Handle time going backwards in acache. [RT #31253] + +3404. [bug] dnssec-signzone: When re-signing a zone, remove + RRSIG and NSEC records from nodes that used to be + in-zone but are now below a zone cut. [RT #31556] + +3403. [bug] Silence noisy OpenSSL logging. [RT #31497] + +3402. [test] The IPv6 interface numbers used for system + tests were incorrect on some platforms. [RT #25085] + +3401. [bug] Addressed Coverity warnings. [RT #31484] + +3400. [cleanup] "named -V" can now report a source ID string, defined + in the "srcid" file in the build tree and normally set + to the most recent git hash. [RT #31494] + +3397. [bug] dig crashed when using +nssearch with +tcp. [RT #25298] + +3396. [bug] OPT records were incorrectly removed from signed, + truncated responses. [RT #31439] + +3395. [protocol] Add RFC 6598 reverse zones to built in empty zones + list, 64.100.IN-ADDR.ARPA ... 127.100.IN-ADDR.ARPA. + [RT #31336] + +3394. [bug] Adjust 'successfully validated after lower casing + signer' log level and category. [RT #31414] + +3393. [bug] 'host -C' could core dump if REFUSED was received. + [RT #31381] + +3391. [bug] A DNSKEY lookup that encountered a CNAME failed. + [RT #31262] + +3390. [bug] Silence clang compiler warnings. [RT #30417] + +3389. [bug] Always return NOERROR (not 0) in TSIG. [RT #31275] + +3388. [bug] Fixed several Coverity warnings. + Note: This change includes a fix for a bug that + was subsequently determined to be an exploitable + security vulnerability, CVE-2012-5688: named could + die on specific queries with dns64 enabled. + [RT #30996] + +3386. [bug] Address locking violation when generating new NSEC / + NSEC3 chains. [RT #31224] + +3384. [bug] Improved logging of crypto errors. [RT #30963] 3383. [security] A certain combination of records in the RBT could - cause named to hang while populating the additional - section of a response. [RT #31090] + cause named to hang while populating the additional + section of a response. [RT #31090] + +3382. [bug] SOA query from slave used use-v6-udp-ports range, + if set, regardless of the address family in use. + [RT #24173] + +3381. [contrib] Update queryperf to support more RR types. + [RT #30762] + +3380. [bug] named could die if a nonexistent master list was + referenced in a also-notify. [RT #31004] + +3379. [bug] isc_interval_zero and isc_time_epoch should be + "const (type)* const". [RT #31069] + +3378. [bug] Handle missing 'managed-keys-directory' better. + [RT #30625] + +3376. [bug] Lack of EDNS support was being recorded without a + successful response. [RT #30811] + +3375. [func] Check that 'rndc dumpdb' works on a empty cache. + [RT #30808] + +3374. [bug] isc_parse_uint32 failed to return a range error on + systems with 64 bit longs. [RT #30232] + +3372. [bug] Silence spurious "deleted from unreachable cache" + messages. [RT #30501] + +3371. [bug] AD=1 should behave like DO=1 when deciding whether to + add NS RRsets to the additional section or not. + [RT #30479] + + --- 9.8.4 released --- 3373. [bug] win32: open raw files in binary mode. [RT #30944] @@ -135,11 +507,11 @@ --- 9.8.3 released --- 3318. [tuning] Reduce the amount of work performed while holding a - bucket lock when finshed with a fetch context. + bucket lock when finished with a fetch context. [RT #29239] -3314. [bug] The masters list could be updated while refesh_callback - and stub_callback were using it. [RT #26732] +3314. [bug] The masters list could be updated while stub_callback + or refresh_callback were using it. [RT #26732] 3313. [protocol] Add TLSA record type. [RT #28989] @@ -151,7 +523,7 @@ 3310. [test] Increase table size for mutex profiling. [RT #28809] -3309. [bug] resolver.c:fctx_finddone() was not threadsafe. +3309. [bug] resolver.c:fctx_finddone() was not thread safe. [RT #27995] 3307. [bug] Add missing ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS. @@ -328,7 +700,7 @@ 3234. [bug] 'make depend' produced invalid makefiles. [RT #26830] -3231. [bug] named could fail to send a uncompressable zone. +3231. [bug] named could fail to send a incompressible zone. [RT #26796] 3230. [bug] 'dig axfr' failed to properly handle a multi-message @@ -345,7 +717,7 @@ 3226. [bug] Address minor resource leakages. [RT #26624] -3221. [bug] Fixed a potential coredump on shutdown due to +3221. [bug] Fixed a potential core dump on shutdown due to referencing fetch context after it's been freed. [RT #26720] @@ -369,7 +741,7 @@ 3209. [func] Add "dnssec-lookaside 'no'". [RT #24858] -3208. [bug] 'dig -y' handle unknown tsig alorithm better. +3208. [bug] 'dig -y' handle unknown tsig algorithm better. [RT #25522] 3207. [contrib] Fixed build error in Berkeley DB DLZ module. [RT #26444] @@ -672,7 +1044,7 @@ 3077. [bug] zone.c:zone_refreshkeys() incorrectly called dns_zone_attach(), use zone->irefs instead. [RT #23303] -3075. [bug] dns_dnssec_findzonekeys{2} used a inconsistant +3075. [bug] dns_dnssec_findzonekeys{2} used a inconsistent timestamp when determining which keys are active. [RT #23642] @@ -686,7 +1058,7 @@ 3072. [bug] dns_dns64_aaaaok() potential NULL pointer dereference. [RT #20256] -3071. [bug] has_nsec could be used unintialised in +3071. [bug] has_nsec could be used uninitialized in update.c:next_active. [RT #20256] 3070. [bug] dnssec-signzone potential NULL pointer dereference. @@ -732,7 +1104,7 @@ 3052. [test] Fixed last autosign test report. [RT #23256] -3051. [bug] NS records obsure DNAME records at the bottom of the +3051. [bug] NS records obscure DNAME records at the bottom of the zone if both are present. [RT #23035] 3050. [bug] The autosign system test was timing dependent. @@ -742,7 +1114,7 @@ 3049. [bug] Save and restore the gid when creating creating named.pid at startup. [RT #23290] -3048. [bug] Fully separate view key mangement. [RT #23419] +3048. [bug] Fully separate view key management. [RT #23419] 3047. [bug] DNSKEY NODATA responses not cached fixed in validator.c. Tests added to dnssec system test. @@ -1079,7 +1451,7 @@ no data response. [RT #21744] 2952. [port] win32: named-checkzone and named-checkconf failed - to initialise winsock. [RT #21932] + to initialize winsock. [RT #21932] 2951. [bug] named failed to generate a correct signed response in a optout, delegation only zone with no secure @@ -1125,7 +1497,7 @@ in use. [RT# 21868] 2938. [bug] When generating signed responses, from a signed zone - that uses NSEC3, named would use a uninitialised + that uses NSEC3, named would use a uninitialized pointer if it needed to skip a NSEC3 record because it didn't match the selected NSEC3PARAM record for zone. [RT# 21868] @@ -1179,7 +1551,7 @@ revisit the issue and complete the fix later. [RT #21710] -2930. [experimental] New "rndc addzone" and "rndc delzone" commads +2930. [experimental] New "rndc addzone" and "rndc delzone" commands allow dynamic addition and deletion of zones. To enable this feature, specify a "new-zone-file" option at the view or options level in named.conf. @@ -1355,7 +1727,7 @@ successfully responds to the query using plain DNS. [RT #20930] -2873. [bug] Cancelling a dynamic update via the dns/client module +2873. [bug] Canceling a dynamic update via the dns/client module could trigger an assertion failure. [RT #21133] 2872. [bug] Modify dns/client.c:dns_client_createx() to only @@ -1397,7 +1769,7 @@ 2860. [bug] named-checkconf's usage was out of date. [RT #21039] -2859. [bug] When cancelling validation it was possible to leak +2859. [bug] When canceling validation it was possible to leak memory. [RT #20800] 2858. [bug] RTT estimates were not being adjusted on ICMP errors. @@ -1950,7 +2322,7 @@ 2695. [func] DHCP/DDNS - update fdwatch code for use by DHCP. Modify the api to isc_sockfdwatch_t (the - callback functon for isc_socket_fdwatchcreate) + callback function for isc_socket_fdwatchcreate) to include information about the direction (read or write) and add isc_socket_fdwatchpoke. [RT #20253] @@ -2015,7 +2387,7 @@ sets the time when a key is no longer used for signing but is still published. - The "unpublished" date (-U) is deprecated in - favour of "deleted" (-D). + favor of "deleted" (-D). [RT #20247] 2676. [bug] --with-export-installdir should have been @@ -2461,7 +2833,7 @@ 2553. [bug] Reference leak on DNSSEC validation errors. [RT #19291] -2552. [bug] zero-no-soa-ttl-cache was not being honoured. +2552. [bug] zero-no-soa-ttl-cache was not being honored. [RT #19340] 2551. [bug] Potential Reference leak on return. [RT #19341] @@ -2514,7 +2886,7 @@ 2534. [func] Check NAPTR records regular expressions and replacement strings to ensure they are syntactically - valid and consistant. [RT #18168] + valid and consistent. [RT #18168] 2533. [doc] ARM: document @ (at-sign). [RT #17144] Modified: stable/9/contrib/bind9/COPYRIGHT ============================================================================== --- stable/9/contrib/bind9/COPYRIGHT Fri Aug 16 07:03:28 2013 (r254401) +++ stable/9/contrib/bind9/COPYRIGHT Fri Aug 16 07:11:13 2013 (r254402) @@ -1,4 +1,4 @@ -Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC") +Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 1996-2003 Internet Software Consortium. Permission to use, copy, modify, and/or distribute this software for any Modified: stable/9/contrib/bind9/FAQ ============================================================================== --- stable/9/contrib/bind9/FAQ Fri Aug 16 07:03:28 2013 (r254401) +++ stable/9/contrib/bind9/FAQ Fri Aug 16 07:11:13 2013 (r254402) @@ -1,6 +1,6 @@ Frequently Asked Questions about BIND 9 -Copyright © 2004-2010 Internet Systems Consortium, Inc. ("ISC") +Copyright © 2004-2010, 2013 Internet Systems Consortium, Inc. ("ISC") Copyright © 2000-2003 Internet Software Consortium. @@ -869,7 +869,7 @@ A: If you run Tiger(Mac OS 10.4) or late Copy the key statement from /etc/rndc.conf into /etc/rndc.key, e.g.: key "rndc-key" { - algorithm hmac-md5; + algorithm hmac-sha256; secret "uvceheVuqf17ZwIcTydddw=="; }; Modified: stable/9/contrib/bind9/FAQ.xml ============================================================================== --- stable/9/contrib/bind9/FAQ.xml Fri Aug 16 07:03:28 2013 (r254401) +++ stable/9/contrib/bind9/FAQ.xml Fri Aug 16 07:11:13 2013 (r254402) @@ -1,7 +1,7 @@