From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 03:49:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83F9AEE7; Sun, 7 Jun 2015 03:49:42 +0000 (UTC) (envelope-from bdrewery@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7250B16BB; Sun, 7 Jun 2015 03:49:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t573ngd7064018; Sun, 7 Jun 2015 03:49:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t573ngeh064017; Sun, 7 Jun 2015 03:49:42 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201506070349.t573ngeh064017@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 7 Jun 2015 03:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284105 - head/bin/cp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 03:49:42 -0000 Author: bdrewery Date: Sun Jun 7 03:49:41 2015 New Revision: 284105 URL: https://svnweb.freebsd.org/changeset/base/284105 Log: Cleanup some indentation issues. Modified: head/bin/cp/utils.c Modified: head/bin/cp/utils.c ============================================================================== --- head/bin/cp/utils.c Sat Jun 6 22:03:24 2015 (r284104) +++ head/bin/cp/utils.c Sun Jun 7 03:49:41 2015 (r284105) @@ -122,18 +122,17 @@ copy_file(const FTSENT *entp, int dne) /* remove existing destination file name, * create a new file */ (void)unlink(to.p_path); - if (!lflag) + if (!lflag) { to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, fs->st_mode & ~(S_ISUID | S_ISGID)); - } else { - if (!lflag) - /* overwrite existing destination file name */ - to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); - } - } else { - if (!lflag) - to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, - fs->st_mode & ~(S_ISUID | S_ISGID)); + } + } else if (!lflag) { + /* overwrite existing destination file name */ + to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); + } + } else if (!lflag) { + to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, + fs->st_mode & ~(S_ISUID | S_ISGID)); } if (to_fd == -1) { From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 06:30:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1EB76E4F; Sun, 7 Jun 2015 06:30:27 +0000 (UTC) (envelope-from bdrewery@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 007471A55; Sun, 7 Jun 2015 06:30:27 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t576UQW1040645; Sun, 7 Jun 2015 06:30:26 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t576UPOi040637; Sun, 7 Jun 2015 06:30:25 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201506070630.t576UPOi040637@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 7 Jun 2015 06:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284106 - head/bin/cp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 06:30:27 -0000 Author: bdrewery Date: Sun Jun 7 06:30:25 2015 New Revision: 284106 URL: https://svnweb.freebsd.org/changeset/base/284106 Log: Implement '-s' to copy as symlink, similar to the current -l link(2) handling. This is also implemented in at least GNU coreutils cp. While here also improve the '-l' handling to not open(2) the source file as it does not actually need the descriptor. Sponsored by: EMC / Isilon Storage Division Modified: head/bin/cp/cp.1 head/bin/cp/cp.c head/bin/cp/extern.h head/bin/cp/utils.c Modified: head/bin/cp/cp.1 ============================================================================== --- head/bin/cp/cp.1 Sun Jun 7 03:49:41 2015 (r284105) +++ head/bin/cp/cp.1 Sun Jun 7 06:30:25 2015 (r284106) @@ -32,7 +32,7 @@ .\" @(#)cp.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 15, 2013 +.Dd June 6, 2015 .Dt CP 1 .Os .Sh NAME @@ -45,7 +45,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpvx +.Op Fl alpsvx .Ar source_file target_file .Nm .Oo @@ -53,7 +53,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpvx +.Op Fl alpsvx .Ar source_file ... target_directory .Sh DESCRIPTION In the first synopsis form, the @@ -179,6 +179,8 @@ If the source file has both its set-user and either the user ID or group ID cannot be preserved, neither the set-user-ID nor set-group-ID bits are preserved in the copy's permissions. +.It Fl s +Create symbolic links to regular files in a hierarchy instead of copying. .It Fl v Cause .Nm @@ -298,7 +300,10 @@ differ as they copy special files as nor files while recreating a hierarchy. .Pp The -.Fl v +.Fl l, +.Fl s, +.Fl v, +.Fl x and .Fl n options are non-standard and their use in scripts is not recommended. Modified: head/bin/cp/cp.c ============================================================================== --- head/bin/cp/cp.c Sun Jun 7 03:49:41 2015 (r284105) +++ head/bin/cp/cp.c Sun Jun 7 06:30:25 2015 (r284106) @@ -83,7 +83,7 @@ static char emptystring[] = ""; PATH_T to = { to.p_path, emptystring, "" }; -int fflag, iflag, lflag, nflag, pflag, vflag; +int fflag, iflag, lflag, nflag, pflag, sflag, vflag; static int Rflag, rflag; volatile sig_atomic_t info; @@ -102,7 +102,7 @@ main(int argc, char *argv[]) fts_options = FTS_NOCHDIR | FTS_PHYSICAL; Hflag = Lflag = 0; - while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1) + while ((ch = getopt(argc, argv, "HLPRafilnprsvx")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -145,6 +145,9 @@ main(int argc, char *argv[]) rflag = Lflag = 1; Hflag = 0; break; + case 's': + sflag = 1; + break; case 'v': vflag = 1; break; @@ -163,6 +166,8 @@ main(int argc, char *argv[]) if (Rflag && rflag) errx(1, "the -R and -r options may not be specified together"); + if (lflag && sflag) + errx(1, "the -l and -s options may not be specified together"); if (rflag) Rflag = 1; if (Rflag) { @@ -452,7 +457,7 @@ copy(char *argv[], enum op type, int fts break; case S_IFBLK: case S_IFCHR: - if (Rflag) { + if (Rflag && !sflag) { if (copy_special(curr->fts_statp, !dne)) badcp = rval = 1; } else { @@ -465,7 +470,7 @@ copy(char *argv[], enum op type, int fts curr->fts_path); break; case S_IFIFO: - if (Rflag) { + if (Rflag && !sflag) { if (copy_fifo(curr->fts_statp, !dne)) badcp = rval = 1; } else { Modified: head/bin/cp/extern.h ============================================================================== --- head/bin/cp/extern.h Sun Jun 7 03:49:41 2015 (r284105) +++ head/bin/cp/extern.h Sun Jun 7 06:30:25 2015 (r284106) @@ -37,7 +37,7 @@ typedef struct { } PATH_T; extern PATH_T to; -extern int fflag, iflag, lflag, nflag, pflag, vflag; +extern int fflag, iflag, lflag, nflag, pflag, sflag, vflag; extern volatile sig_atomic_t info; __BEGIN_DECLS Modified: head/bin/cp/utils.c ============================================================================== --- head/bin/cp/utils.c Sun Jun 7 03:49:41 2015 (r284105) +++ head/bin/cp/utils.c Sun Jun 7 06:30:25 2015 (r284106) @@ -77,13 +77,15 @@ copy_file(const FTSENT *entp, int dne) ssize_t wcount; size_t wresid; off_t wtotal; - int ch, checkch, from_fd = 0, rcount, rval, to_fd = 0; + int ch, checkch, from_fd, rcount, rval, to_fd; char *bufp; #ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED char *p; #endif - if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) { + from_fd = to_fd = -1; + if (!lflag && !sflag && + (from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) { warn("%s", entp->fts_path); return (1); } @@ -103,8 +105,8 @@ copy_file(const FTSENT *entp, int dne) if (nflag) { if (vflag) printf("%s not overwritten\n", to.p_path); - (void)close(from_fd); - return (1); + rval = 1; + goto done; } else if (iflag) { (void)fprintf(stderr, "overwrite %s? %s", to.p_path, YESNO); @@ -112,9 +114,9 @@ copy_file(const FTSENT *entp, int dne) while (ch != '\n' && ch != EOF) ch = getchar(); if (checkch != 'y' && checkch != 'Y') { - (void)close(from_fd); (void)fprintf(stderr, "not overwritten\n"); - return (1); + rval = 1; + goto done; } } @@ -122,28 +124,28 @@ copy_file(const FTSENT *entp, int dne) /* remove existing destination file name, * create a new file */ (void)unlink(to.p_path); - if (!lflag) { + if (!lflag && !sflag) { to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, fs->st_mode & ~(S_ISUID | S_ISGID)); } - } else if (!lflag) { + } else if (!lflag && !sflag) { /* overwrite existing destination file name */ to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); } - } else if (!lflag) { + } else if (!lflag && !sflag) { to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, fs->st_mode & ~(S_ISUID | S_ISGID)); } - if (to_fd == -1) { + if (!lflag && !sflag && to_fd == -1) { warn("%s", to.p_path); - (void)close(from_fd); - return (1); + rval = 1; + goto done; } rval = 0; - if (!lflag) { + if (!lflag && !sflag) { /* * Mmap and write if less than 8M (the limit is so we don't totally * trash memory on big files. This is really a minor hack, but it @@ -229,11 +231,16 @@ copy_file(const FTSENT *entp, int dne) rval = 1; } } - } else { + } else if (lflag) { if (link(entp->fts_path, to.p_path)) { warn("%s", to.p_path); rval = 1; } + } else if (sflag) { + if (symlink(entp->fts_path, to.p_path)) { + warn("%s", to.p_path); + rval = 1; + } } /* @@ -243,7 +250,7 @@ copy_file(const FTSENT *entp, int dne) * to remove it if we created it and its length is 0. */ - if (!lflag) { + if (!lflag && !sflag) { if (pflag && setfile(fs, to_fd)) rval = 1; if (pflag && preserve_fd_acls(from_fd, to_fd) != 0) @@ -254,8 +261,9 @@ copy_file(const FTSENT *entp, int dne) } } - (void)close(from_fd); - +done: + if (from_fd != -1) + (void)close(from_fd); return (rval); } @@ -535,8 +543,8 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", -"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file", -" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... " +"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file target_file", +" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file ... " "target_directory"); exit(EX_USAGE); } From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 08:54:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2491ED5F; Sun, 7 Jun 2015 08:54:26 +0000 (UTC) (envelope-from avg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 122BA1B37; Sun, 7 Jun 2015 08:54:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t578sP9F012093; Sun, 7 Jun 2015 08:54:25 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t578sPdR012092; Sun, 7 Jun 2015 08:54:25 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506070854.t578sPdR012092@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sun, 7 Jun 2015 08:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284107 - head/sys/cddl/compat/opensolaris/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 08:54:26 -0000 Author: avg Date: Sun Jun 7 08:54:25 2015 New Revision: 284107 URL: https://svnweb.freebsd.org/changeset/base/284107 Log: compat nvpair.h: make sure that the names are mangled only for kernel Currently there is no good reason to mangle the userland API. The change was introduced in eac1d566b46edef765754203bef22c75c1699966, r279437. Also see https://reviews.freebsd.org/D1881. I am still convinced that nv should not have introduced intentionally conflicting API. Discussed with: rstone X-MFC with: r279437 Sponsored by: ClusterHQ Modified: head/sys/cddl/compat/opensolaris/sys/nvpair.h Modified: head/sys/cddl/compat/opensolaris/sys/nvpair.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/nvpair.h Sun Jun 7 06:30:25 2015 (r284106) +++ head/sys/cddl/compat/opensolaris/sys/nvpair.h Sun Jun 7 08:54:25 2015 (r284107) @@ -29,6 +29,8 @@ #ifndef _OPENSOLARIS_SYS_NVPAIR_H_ #define _OPENSOLARIS_SYS_NVPAIR_H_ +#ifdef _KERNEL + /* * Some of the symbols in the Illumos nvpair library conflict with symbols * provided by nv(9), so we use this preprocessor hack to avoid the conflict. @@ -254,6 +256,8 @@ #define nvpair_unpack illumos_nvpair_unpack #define nvpair_unpack_descriptor illumos_nvpair_unpack_descriptor +#endif /* _KERNEL */ + #include_next #endif From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 09:10:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81333122; Sun, 7 Jun 2015 09:10:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AFF11DAF; Sun, 7 Jun 2015 09:10:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Z1Wah-0000Qr-MI; Sun, 07 Jun 2015 12:10:03 +0300 Date: Sun, 7 Jun 2015 12:10:03 +0300 From: Slawa Olhovchenkov To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284082 - head/sys/fs/unionfs Message-ID: <20150607091003.GD58397@zxy.spb.ru> References: <201506061636.t56GaDK0035920@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201506061636.t56GaDK0035920@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 09:10:14 -0000 On Sat, Jun 06, 2015 at 04:36:13PM +0000, Mark Johnston wrote: > Author: markj > Date: Sat Jun 6 16:36:13 2015 > New Revision: 284082 > URL: https://svnweb.freebsd.org/changeset/base/284082 > > Log: > unionfs: fix suspendability check bugs > > - MNTK_SUSPENDABLE is set in mnt_kern_flag, not mnt_flag. > - The lower layer of a unionfs mount is read-only, so the mount should > be suspendable iff the upper layer is suspendable. > - Remove a couple of superfluous comments. Can you look also to bug 175449? > Differential Revision: https://reviews.freebsd.org/D2714 > Reviewed by: kib, mjg > > Modified: > head/sys/fs/unionfs/union_vfsops.c > > Modified: head/sys/fs/unionfs/union_vfsops.c > ============================================================================== > --- head/sys/fs/unionfs/union_vfsops.c Sat Jun 6 16:20:39 2015 (r284081) > +++ head/sys/fs/unionfs/union_vfsops.c Sat Jun 6 16:36:13 2015 (r284082) > @@ -291,18 +291,11 @@ unionfs_domount(struct mount *mp) > } > > MNT_ILOCK(mp); > - /* > - * Check mnt_flag > - */ > if ((ump->um_lowervp->v_mount->mnt_flag & MNT_LOCAL) && > (ump->um_uppervp->v_mount->mnt_flag & MNT_LOCAL)) > mp->mnt_flag |= MNT_LOCAL; > > - /* > - * Check mnt_kern_flag > - */ > - if ((ump->um_lowervp->v_mount->mnt_flag & MNTK_SUSPENDABLE) || > - (ump->um_uppervp->v_mount->mnt_flag & MNTK_SUSPENDABLE)) > + if ((ump->um_uppervp->v_mount->mnt_kern_flag & MNTK_SUSPENDABLE) != 0) > mp->mnt_kern_flag |= MNTK_SUSPENDABLE; > MNT_IUNLOCK(mp); > > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 10:02:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC7E97B5; Sun, 7 Jun 2015 10:02:00 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA5951AC4; Sun, 7 Jun 2015 10:02:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57A20SH045783; Sun, 7 Jun 2015 10:02:00 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57A20qp045780; Sun, 7 Jun 2015 10:02:00 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071002.t57A20qp045780@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 10:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284108 - in head/lib/libedit: . edit/readline X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 10:02:01 -0000 Author: bapt Date: Sun Jun 7 10:01:59 2015 New Revision: 284108 URL: https://svnweb.freebsd.org/changeset/base/284108 Log: Sync with NetBSD: - fix types of rl_completion_entry_function and rl_add_defun - call update pos before completion to refresh the screen From Thomas Eriksson Adjust API to a more modern readline (Ryo Onodera) remove duplicate declaration Modified: head/lib/libedit/edit/readline/readline.h head/lib/libedit/readline.c Modified: head/lib/libedit/edit/readline/readline.h ============================================================================== --- head/lib/libedit/edit/readline/readline.h Sun Jun 7 08:54:25 2015 (r284107) +++ head/lib/libedit/edit/readline/readline.h Sun Jun 7 10:01:59 2015 (r284108) @@ -1,4 +1,4 @@ -/* $NetBSD: readline.h,v 1.34 2013/05/28 00:10:34 christos Exp $ */ +/* $NetBSD: readline.h,v 1.37 2015/06/02 15:36:45 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -41,9 +41,8 @@ /* typedefs */ typedef int Function(const char *, int); typedef void VFunction(void); -typedef void VCPFunction(char *); -typedef char *CPFunction(const char *, int); -typedef char **CPPFunction(const char *, int, int); +typedef void rl_vcpfunc_t(char *); +typedef char **rl_completion_func_t(const char *, int, int); typedef char *rl_compentry_func_t(const char *, int); typedef int rl_command_func_t(int, int); @@ -110,9 +109,9 @@ extern int max_input_history; extern char *rl_basic_word_break_characters; extern char *rl_completer_word_break_characters; extern char *rl_completer_quote_characters; -extern Function *rl_completion_entry_function; +extern rl_compentry_func_t *rl_completion_entry_function; extern char *(*rl_completion_word_break_hook)(void); -extern CPPFunction *rl_attempted_completion_function; +extern rl_completion_func_t *rl_attempted_completion_function; extern int rl_attempted_completion_over; extern int rl_completion_type; extern int rl_completion_query_items; @@ -177,7 +176,7 @@ char *filename_completion_function(cons char *username_completion_function(const char *, int); int rl_complete(int, int); int rl_read_key(void); -char **completion_matches(const char *, CPFunction *); +char **completion_matches(const char *, rl_compentry_func_t *); void rl_display_match_list(char **, int, int); int rl_insert(int, int); @@ -186,7 +185,7 @@ void rl_reset_terminal(const char *); int rl_bind_key(int, rl_command_func_t *); int rl_newline(int, int); void rl_callback_read_char(void); -void rl_callback_handler_install(const char *, VCPFunction *); +void rl_callback_handler_install(const char *, rl_vcpfunc_t *); void rl_callback_handler_remove(void); void rl_redisplay(void); int rl_get_previous_history(int, int); @@ -196,7 +195,7 @@ int rl_read_init_file(const char *); int rl_parse_and_bind(const char *); int rl_variable_bind(const char *, const char *); void rl_stuff_char(int); -int rl_add_defun(const char *, Function *, int); +int rl_add_defun(const char *, rl_command_func_t *, int); HISTORY_STATE *history_get_history_state(void); void rl_get_screen_size(int *, int *); void rl_set_screen_size(int, int); Modified: head/lib/libedit/readline.c ============================================================================== --- head/lib/libedit/readline.c Sun Jun 7 08:54:25 2015 (r284107) +++ head/lib/libedit/readline.c Sun Jun 7 10:01:59 2015 (r284108) @@ -1,4 +1,4 @@ -/* $NetBSD: readline.c,v 1.115 2015/04/01 15:23:15 christos Exp $ */ +/* $NetBSD: readline.c,v 1.117 2015/06/02 15:35:31 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: readline.c,v 1.115 2015/04/01 15:23:15 christos Exp $"); +__RCSID("$NetBSD: readline.c,v 1.117 2015/06/02 15:35:31 christos Exp $"); #endif /* not lint && not SCCSID */ #include __FBSDID("$FreeBSD$"); @@ -80,7 +80,7 @@ FILE *rl_outstream = NULL; int rl_point = 0; int rl_end = 0; char *rl_line_buffer = NULL; -VCPFunction *rl_linefunc = NULL; +rl_vcpfunc_t *rl_linefunc = NULL; int rl_done = 0; VFunction *rl_event_hook = NULL; KEYMAP_ENTRY_ARRAY emacs_standard_keymap, @@ -109,9 +109,9 @@ int rl_attempted_completion_over = 0; char *rl_basic_word_break_characters = break_chars; char *rl_completer_word_break_characters = NULL; char *rl_completer_quote_characters = NULL; -Function *rl_completion_entry_function = NULL; +rl_compentry_func_t *rl_completion_entry_function = NULL; char *(*rl_completion_word_break_hook)(void) = NULL; -CPPFunction *rl_attempted_completion_function = NULL; +rl_completion_func_t *rl_attempted_completion_function = NULL; Function *rl_pre_input_hook = NULL; Function *rl_startup1_hook = NULL; int (*rl_getc_function)(FILE *) = NULL; @@ -162,7 +162,7 @@ int rl_completion_append_character = ' ' static History *h = NULL; static EditLine *e = NULL; -static Function *map[256]; +static rl_command_func_t *map[256]; static jmp_buf topbuf; /* internal functions */ @@ -1829,9 +1829,11 @@ rl_complete(int ignore __attribute__((__ else breakchars = rl_basic_word_break_characters; + _rl_update_pos(); + /* Just look at how many global variables modify this operation! */ return fn_complete(e, - (CPFunction *)rl_completion_entry_function, + (rl_compentry_func_t *)rl_completion_entry_function, rl_attempted_completion_function, ct_decode_string(rl_basic_word_break_characters, &wbreak_conv), ct_decode_string(breakchars, &sprefix_conv), @@ -1960,7 +1962,7 @@ rl_bind_wrapper(EditLine *el __attribute _rl_update_pos(); - (*map[c])(NULL, c); + (*map[c])(1, c); /* If rl_done was set by the above call, deal with it here */ if (rl_done) @@ -1970,7 +1972,7 @@ rl_bind_wrapper(EditLine *el __attribute } int -rl_add_defun(const char *name, Function *fun, int c) +rl_add_defun(const char *name, rl_command_func_t *fun, int c) { char dest[8]; if ((size_t)c >= sizeof(map) / sizeof(map[0]) || c < 0) @@ -2009,7 +2011,7 @@ rl_callback_read_char(void) } void -rl_callback_handler_install(const char *prompt, VCPFunction *linefunc) +rl_callback_handler_install(const char *prompt, rl_vcpfunc_t *linefunc) { if (e == NULL) { rl_initialize(); From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 10:50:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E61BA0; Sun, 7 Jun 2015 10:50:18 +0000 (UTC) (envelope-from andrew@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3D9A14A1; Sun, 7 Jun 2015 10:50:17 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57AoHVB066545; Sun, 7 Jun 2015 10:50:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57AoGSi066539; Sun, 7 Jun 2015 10:50:16 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201506071050.t57AoGSi066539@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 7 Jun 2015 10:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284109 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 10:50:18 -0000 Author: andrew Date: Sun Jun 7 10:50:15 2015 New Revision: 284109 URL: https://svnweb.freebsd.org/changeset/base/284109 Log: Remove pc_cpu, it was duplicating pc_cpuid so was unneeded. Modified: head/sys/arm/arm/genassym.c head/sys/arm/arm/machdep.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/vfp.c head/sys/arm/include/pcpu.h Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Sun Jun 7 10:01:59 2015 (r284108) +++ head/sys/arm/arm/genassym.c Sun Jun 7 10:50:15 2015 (r284109) @@ -133,8 +133,6 @@ ASSYM(ARM_RAS_END, ARM_RAS_END); #ifdef VFP ASSYM(PCB_VFPSTATE, offsetof(struct pcb, pcb_vfpstate)); -ASSYM(PC_CPU, offsetof(struct pcpu, pc_cpu)); - ASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap)); #endif Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sun Jun 7 10:01:59 2015 (r284108) +++ head/sys/arm/arm/machdep.c Sun Jun 7 10:50:15 2015 (r284109) @@ -916,9 +916,6 @@ pcpu0_init(void) #endif pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); -#ifdef VFP - PCPU_SET(cpu, 0); -#endif } #if defined(LINUX_BOOT_ABI) Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Sun Jun 7 10:01:59 2015 (r284108) +++ head/sys/arm/arm/mp_machdep.c Sun Jun 7 10:50:15 2015 (r284109) @@ -197,8 +197,6 @@ init_secondary(int cpu) pc->pc_curpcb = pc->pc_idlethread->td_pcb; set_curthread(pc->pc_idlethread); #ifdef VFP - pc->pc_cpu = cpu; - vfp_init(); #endif Modified: head/sys/arm/arm/vfp.c ============================================================================== --- head/sys/arm/arm/vfp.c Sun Jun 7 10:01:59 2015 (r284108) +++ head/sys/arm/arm/vfp.c Sun Jun 7 10:50:15 2015 (r284109) @@ -199,7 +199,7 @@ vfp_bounce(u_int addr, u_int insn, struc */ fmxr(fpexc, fpexc | VFPEXC_EN); curpcb = curthread->td_pcb; - cpu = PCPU_GET(cpu); + cpu = PCPU_GET(cpuid); if (curpcb->pcb_vfpcpu != cpu || curthread != PCPU_GET(fpcurthread)) { vfp_restore(&curpcb->pcb_vfpstate); curpcb->pcb_vfpcpu = cpu; Modified: head/sys/arm/include/pcpu.h ============================================================================== --- head/sys/arm/include/pcpu.h Sun Jun 7 10:01:59 2015 (r284108) +++ head/sys/arm/include/pcpu.h Sun Jun 7 10:50:15 2015 (r284109) @@ -42,12 +42,11 @@ struct vmspace; #ifdef VFP #define PCPU_MD_FIELDS \ - unsigned int pc_cpu; \ unsigned int pc_vfpsid; \ unsigned int pc_vfpmvfr0; \ unsigned int pc_vfpmvfr1; \ struct pmap *pc_curpmap; \ - char __pad[137] + char __pad[141] #else #define PCPU_MD_FIELDS \ char __pad[157] From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 10:57:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9BCE22E; Sun, 7 Jun 2015 10:57:03 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7FA316A6; Sun, 7 Jun 2015 10:57:03 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57Av3gJ071272; Sun, 7 Jun 2015 10:57:03 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57Av319071267; Sun, 7 Jun 2015 10:57:03 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071057.t57Av319071267@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 10:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284110 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 10:57:04 -0000 Author: bapt Date: Sun Jun 7 10:57:02 2015 New Revision: 284110 URL: https://svnweb.freebsd.org/changeset/base/284110 Log: Instead of always casting the pw_checkname input to u_char * and casting it back to char *, change pw_checkname to directly take char * in input Modified: head/usr.sbin/pw/pw.h head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw.h ============================================================================== --- head/usr.sbin/pw/pw.h Sun Jun 7 10:50:15 2015 (r284109) +++ head/usr.sbin/pw/pw.h Sun Jun 7 10:57:02 2015 (r284110) @@ -108,7 +108,7 @@ struct carg *getarg(struct cargs * _args int pw_user(struct userconf * cnf, int mode, struct cargs * _args); int pw_group(struct userconf * cnf, int mode, struct cargs * _args); -char *pw_checkname(u_char *name, int gecos); +char *pw_checkname(char *name, int gecos); int addnispwent(const char *path, struct passwd *pwd); int delnispwent(const char *path, const char *login); Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sun Jun 7 10:50:15 2015 (r284109) +++ head/usr.sbin/pw/pw_group.c Sun Jun 7 10:57:02 2015 (r284110) @@ -146,7 +146,7 @@ pw_group(struct userconf * cnf, int mode grp->gr_gid = (gid_t) atoi(a_gid->val); if (a_newname != NULL) - grp->gr_name = pw_checkname((u_char *)a_newname->val, 0); + grp->gr_name = pw_checkname(a_newname->val, 0); } else { if (a_name == NULL) /* Required */ errx(EX_DATAERR, "group name required"); @@ -156,7 +156,7 @@ pw_group(struct userconf * cnf, int mode extendarray(&members, &grmembers, 200); members[0] = NULL; grp = &fakegroup; - grp->gr_name = pw_checkname((u_char *)a_name->val, 0); + grp->gr_name = pw_checkname(a_name->val, 0); grp->gr_passwd = "*"; grp->gr_gid = gr_gidpolicy(cnf, args); grp->gr_mem = members; Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 10:50:15 2015 (r284109) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 10:57:02 2015 (r284110) @@ -263,7 +263,7 @@ pw_user(struct userconf * cnf, int mode, } } if ((arg = getarg(args, 'L')) != NULL) - cnf->default_class = pw_checkname((u_char *)arg->val, 0); + cnf->default_class = pw_checkname(arg->val, 0); if ((arg = getarg(args, 'G')) != NULL && arg->val) { int i = 0; @@ -323,7 +323,7 @@ pw_user(struct userconf * cnf, int mode, } if ((a_name = getarg(args, 'n')) != NULL) - pwd = GETPWNAM(pw_checkname((u_char *)a_name->val, 0)); + pwd = GETPWNAM(pw_checkname(a_name->val, 0)); a_uid = getarg(args, 'u'); if (a_uid == NULL) { @@ -510,7 +510,7 @@ pw_user(struct userconf * cnf, int mode, if ((arg = getarg(args, 'l')) != NULL) { if (strcmp(pwd->pw_name, "root") == 0) errx(EX_DATAERR, "can't rename `root' account"); - pwd->pw_name = pw_checkname((u_char *)arg->val, 0); + pwd->pw_name = pw_checkname(arg->val, 0); edited = 1; } @@ -648,7 +648,7 @@ pw_user(struct userconf * cnf, int mode, * Shared add/edit code */ if ((arg = getarg(args, 'c')) != NULL) { - char *gecos = pw_checkname((u_char *)arg->val, 1); + char *gecos = pw_checkname(arg->val, 1); if (strcmp(pwd->pw_gecos, gecos) != 0) { pwd->pw_gecos = gecos; edited = 1; @@ -1239,11 +1239,11 @@ print_user(struct passwd * pwd, int pret return EXIT_SUCCESS; } -char * -pw_checkname(u_char *name, int gecos) +char * +pw_checkname(char *name, int gecos) { char showch[8]; - u_char const *badchars, *ch, *showtype; + const char *badchars, *ch, *showtype; int reject; ch = name; @@ -1294,7 +1294,8 @@ pw_checkname(u_char *name, int gecos) if (!gecos && (ch - name) > LOGNAMESIZE) errx(EX_DATAERR, "name too long `%s' (max is %d)", name, LOGNAMESIZE); - return (char *)name; + + return (name); } From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 11:26:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8537956E; Sun, 7 Jun 2015 11:26:29 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 731F31CF1; Sun, 7 Jun 2015 11:26:29 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57BQTod086258; Sun, 7 Jun 2015 11:26:29 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57BQTKc086257; Sun, 7 Jun 2015 11:26:29 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071126.t57BQTKc086257@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 11:26:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284111 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 11:26:29 -0000 Author: bapt Date: Sun Jun 7 11:26:28 2015 New Revision: 284111 URL: https://svnweb.freebsd.org/changeset/base/284111 Log: Move user deletion code into a separate function to improve readability Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 10:57:02 2015 (r284110) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 11:26:28 2015 (r284111) @@ -51,6 +51,8 @@ static const char rcsid[] = static char locked_str[] = "*LOCKED*"; +static int delete_user(struct userconf *cnf, struct passwd *pwd, + struct carg *a_name, int delete, int mode); static int print_user(struct passwd * pwd, int pretty, int v7); static uid_t pw_uidpolicy(struct userconf * cnf, struct cargs * args); static uid_t pw_gidpolicy(struct userconf * cnf, struct cargs * args, char *nam, gid_t prefer); @@ -394,112 +396,10 @@ pw_user(struct userconf * cnf, int mode, errx(EX_DATAERR, "user '%s' is not locked", pwd->pw_name); pwd->pw_passwd += sizeof(locked_str)-1; edited = 1; - } else if (mode == M_DELETE) { - /* - * Handle deletions now - */ - char file[MAXPATHLEN]; - char home[MAXPATHLEN]; - uid_t uid = pwd->pw_uid; - struct group *gr; - char grname[LOGNAMESIZE]; - - if (strcmp(pwd->pw_name, "root") == 0) - errx(EX_DATAERR, "cannot remove user 'root'"); - - if (!PWALTDIR()) { - /* - * Remove opie record from /etc/opiekeys - */ - - rmopie(pwd->pw_name); - - /* - * Remove crontabs - */ - snprintf(file, sizeof(file), "/var/cron/tabs/%s", pwd->pw_name); - if (access(file, F_OK) == 0) { - snprintf(file, sizeof(file), "crontab -u %s -r", pwd->pw_name); - system(file); - } - } - /* - * Save these for later, since contents of pwd may be - * invalidated by deletion - */ - snprintf(file, sizeof(file), "%s/%s", _PATH_MAILDIR, pwd->pw_name); - strlcpy(home, pwd->pw_dir, sizeof(home)); - gr = GETGRGID(pwd->pw_gid); - if (gr != NULL) - strlcpy(grname, gr->gr_name, LOGNAMESIZE); - else - grname[0] = '\0'; - - rc = delpwent(pwd); - if (rc == -1) - err(EX_IOERR, "user '%s' does not exist", pwd->pw_name); - else if (rc != 0) - err(EX_IOERR, "passwd update"); - - if (cnf->nispasswd && *cnf->nispasswd=='/') { - rc = delnispwent(cnf->nispasswd, a_name->val); - if (rc == -1) - warnx("WARNING: user '%s' does not exist in NIS passwd", pwd->pw_name); - else if (rc != 0) - warn("WARNING: NIS passwd update"); - /* non-fatal */ - } - - grp = GETGRNAM(a_name->val); - if (grp != NULL && - (grp->gr_mem == NULL || *grp->gr_mem == NULL) && - strcmp(a_name->val, grname) == 0) - delgrent(GETGRNAM(a_name->val)); - SETGRENT(); - while ((grp = GETGRENT()) != NULL) { - int i, j; - char group[MAXLOGNAME]; - if (grp->gr_mem != NULL) { - for (i = 0; grp->gr_mem[i] != NULL; i++) { - if (!strcmp(grp->gr_mem[i], a_name->val)) { - for (j = i; grp->gr_mem[j] != NULL; j++) - grp->gr_mem[j] = grp->gr_mem[j+1]; - strlcpy(group, grp->gr_name, MAXLOGNAME); - chggrent(group, grp); - } - } - } - } - ENDGRENT(); - - pw_log(cnf, mode, W_USER, "%s(%u) account removed", a_name->val, uid); - - if (PWALTDIR()) { - /* - * Remove mail file - */ - remove(file); - - /* - * Remove at jobs - */ - if (getpwuid(uid) == NULL) - rmat(uid); - - /* - * Remove home directory and contents - */ - if (getarg(args, 'r') != NULL && *home == '/' && getpwuid(uid) == NULL) { - if (stat(home, &st) != -1) { - rm_r(home, uid); - pw_log(cnf, mode, W_USER, "%s(%u) home '%s' %sremoved", - a_name->val, uid, home, - stat(home, &st) == -1 ? "" : "not completely "); - } - } - } - return EXIT_SUCCESS; - } else if (mode == M_PRINT) + } else if (mode == M_DELETE) + return (delete_user(cnf, pwd, a_name, + getarg(args, 'r') != NULL, mode)); + else if (mode == M_PRINT) return print_user(pwd, getarg(args, 'P') != NULL, getarg(args, '7') != NULL); @@ -1155,6 +1055,115 @@ pw_password(struct userconf * cnf, struc return pw_pwcrypt(pwbuf); } +static int +delete_user(struct userconf *cnf, struct passwd *pwd, struct carg *a_name, + int delete, int mode) +{ + char file[MAXPATHLEN]; + char home[MAXPATHLEN]; + uid_t uid = pwd->pw_uid; + struct group *gr, *grp; + char grname[LOGNAMESIZE]; + int rc; + struct stat st; + + if (strcmp(pwd->pw_name, "root") == 0) + errx(EX_DATAERR, "cannot remove user 'root'"); + + if (!PWALTDIR()) { + /* + * Remove opie record from /etc/opiekeys + */ + + rmopie(pwd->pw_name); + + /* + * Remove crontabs + */ + snprintf(file, sizeof(file), "/var/cron/tabs/%s", pwd->pw_name); + if (access(file, F_OK) == 0) { + snprintf(file, sizeof(file), "crontab -u %s -r", pwd->pw_name); + system(file); + } + } + /* + * Save these for later, since contents of pwd may be + * invalidated by deletion + */ + snprintf(file, sizeof(file), "%s/%s", _PATH_MAILDIR, pwd->pw_name); + strlcpy(home, pwd->pw_dir, sizeof(home)); + gr = GETGRGID(pwd->pw_gid); + if (gr != NULL) + strlcpy(grname, gr->gr_name, LOGNAMESIZE); + else + grname[0] = '\0'; + + rc = delpwent(pwd); + if (rc == -1) + err(EX_IOERR, "user '%s' does not exist", pwd->pw_name); + else if (rc != 0) + err(EX_IOERR, "passwd update"); + + if (cnf->nispasswd && *cnf->nispasswd=='/') { + rc = delnispwent(cnf->nispasswd, a_name->val); + if (rc == -1) + warnx("WARNING: user '%s' does not exist in NIS passwd", pwd->pw_name); + else if (rc != 0) + warn("WARNING: NIS passwd update"); + /* non-fatal */ + } + + grp = GETGRNAM(a_name->val); + if (grp != NULL && + (grp->gr_mem == NULL || *grp->gr_mem == NULL) && + strcmp(a_name->val, grname) == 0) + delgrent(GETGRNAM(a_name->val)); + SETGRENT(); + while ((grp = GETGRENT()) != NULL) { + int i, j; + char group[MAXLOGNAME]; + if (grp->gr_mem != NULL) { + for (i = 0; grp->gr_mem[i] != NULL; i++) { + if (!strcmp(grp->gr_mem[i], a_name->val)) { + for (j = i; grp->gr_mem[j] != NULL; j++) + grp->gr_mem[j] = grp->gr_mem[j+1]; + strlcpy(group, grp->gr_name, MAXLOGNAME); + chggrent(group, grp); + } + } + } + } + ENDGRENT(); + + pw_log(cnf, mode, W_USER, "%s(%u) account removed", a_name->val, uid); + + if (PWALTDIR()) { + /* + * Remove mail file + */ + remove(file); + + /* + * Remove at jobs + */ + if (getpwuid(uid) == NULL) + rmat(uid); + + /* + * Remove home directory and contents + */ + if (delete && *home == '/' && getpwuid(uid) == NULL) { + if (stat(home, &st) != -1) { + rm_r(home, uid); + pw_log(cnf, mode, W_USER, "%s(%u) home '%s' %sremoved", + a_name->val, uid, home, + stat(home, &st) == -1 ? "" : "not completely "); + } + } + } + + return (EXIT_SUCCESS); +} static int print_user(struct passwd * pwd, int pretty, int v7) From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 11:30:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDB3F746; Sun, 7 Jun 2015 11:30:33 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC4511D6A; Sun, 7 Jun 2015 11:30:33 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57BUXmm087372; Sun, 7 Jun 2015 11:30:33 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57BUXus087371; Sun, 7 Jun 2015 11:30:33 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071130.t57BUXus087371@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 11:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284112 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 11:30:34 -0000 Author: bapt Date: Sun Jun 7 11:30:33 2015 New Revision: 284112 URL: https://svnweb.freebsd.org/changeset/base/284112 Log: Remove one level of indentation Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 11:26:28 2015 (r284111) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 11:30:33 2015 (r284112) @@ -1152,13 +1152,12 @@ delete_user(struct userconf *cnf, struct /* * Remove home directory and contents */ - if (delete && *home == '/' && getpwuid(uid) == NULL) { - if (stat(home, &st) != -1) { - rm_r(home, uid); - pw_log(cnf, mode, W_USER, "%s(%u) home '%s' %sremoved", - a_name->val, uid, home, - stat(home, &st) == -1 ? "" : "not completely "); - } + if (delete && *home == '/' && getpwuid(uid) == NULL && + stat(home, &st) != -1) { + rm_r(home, uid); + pw_log(cnf, mode, W_USER, "%s(%u) home '%s' %sremoved", + a_name->val, uid, home, + stat(home, &st) == -1 ? "" : "not completely "); } } From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 11:35:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DA529C6; Sun, 7 Jun 2015 11:35:35 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BD931F08; Sun, 7 Jun 2015 11:35:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57BZZ2Z091551; Sun, 7 Jun 2015 11:35:35 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57BZZJa091550; Sun, 7 Jun 2015 11:35:35 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071135.t57BZZJa091550@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 11:35:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284113 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 11:35:35 -0000 Author: bapt Date: Sun Jun 7 11:35:34 2015 New Revision: 284113 URL: https://svnweb.freebsd.org/changeset/base/284113 Log: Improve readability by reducing indentations levels Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 11:30:33 2015 (r284112) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 11:35:34 2015 (r284113) @@ -1122,15 +1122,17 @@ delete_user(struct userconf *cnf, struct while ((grp = GETGRENT()) != NULL) { int i, j; char group[MAXLOGNAME]; - if (grp->gr_mem != NULL) { - for (i = 0; grp->gr_mem[i] != NULL; i++) { - if (!strcmp(grp->gr_mem[i], a_name->val)) { - for (j = i; grp->gr_mem[j] != NULL; j++) - grp->gr_mem[j] = grp->gr_mem[j+1]; - strlcpy(group, grp->gr_name, MAXLOGNAME); - chggrent(group, grp); - } - } + if (grp->gr_mem == NULL) + continue; + + for (i = 0; grp->gr_mem[i] != NULL; i++) { + if (strcmp(grp->gr_mem[i], a_name->val)) + continue; + + for (j = i; grp->gr_mem[j] != NULL; j++) + grp->gr_mem[j] = grp->gr_mem[j+1]; + strlcpy(group, grp->gr_name, MAXLOGNAME); + chggrent(group, grp); } } ENDGRENT(); From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 11:38:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DDC4B2E; Sun, 7 Jun 2015 11:38:27 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C3341F20; Sun, 7 Jun 2015 11:38:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57BcQqR091932; Sun, 7 Jun 2015 11:38:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57BcQfk091931; Sun, 7 Jun 2015 11:38:26 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071138.t57BcQfk091931@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 11:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284114 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 11:38:27 -0000 Author: bapt Date: Sun Jun 7 11:38:26 2015 New Revision: 284114 URL: https://svnweb.freebsd.org/changeset/base/284114 Log: Test explicitly the result of strcmp to be consistent with the rest of the code Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 11:35:34 2015 (r284113) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 11:38:26 2015 (r284114) @@ -1126,7 +1126,7 @@ delete_user(struct userconf *cnf, struct continue; for (i = 0; grp->gr_mem[i] != NULL; i++) { - if (strcmp(grp->gr_mem[i], a_name->val)) + if (strcmp(grp->gr_mem[i], a_name->val) != 0) continue; for (j = i; grp->gr_mem[j] != NULL; j++) From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 13:59:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDFD3BF1; Sun, 7 Jun 2015 13:59:04 +0000 (UTC) (envelope-from andrew@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBE3E1F68; Sun, 7 Jun 2015 13:59:04 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57Dx417069092; Sun, 7 Jun 2015 13:59:04 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57Dx3To069080; Sun, 7 Jun 2015 13:59:03 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201506071359.t57Dx3To069080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 7 Jun 2015 13:59:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284115 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 13:59:04 -0000 Author: andrew Date: Sun Jun 7 13:59:02 2015 New Revision: 284115 URL: https://svnweb.freebsd.org/changeset/base/284115 Log: Stop checking for ARM_TP_ADDRESS when we mean to check if building for ARMv6 or later. Modified: head/sys/arm/arm/exception.S head/sys/arm/arm/genassym.c head/sys/arm/arm/swtch.S head/sys/arm/arm/sys_machdep.c head/sys/arm/arm/vm_machdep.c Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Sun Jun 7 11:38:26 2015 (r284114) +++ head/sys/arm/arm/exception.S Sun Jun 7 13:59:02 2015 (r284115) @@ -49,6 +49,7 @@ #include "assym.s" #include "opt_kdtrace.h" +#include #include #include #include @@ -80,7 +81,7 @@ _C_LABEL(dtrace_invop_calltrap_addr): * NOTE: r13 and r14 are stored separately as a work around for the * SA110 rev 2 STM^ bug */ -#ifdef ARM_TP_ADDRESS +#if __ARM_ARCH < 6 #define PUSHFRAME \ sub sp, sp, #4; /* Align the stack */ \ str lr, [sp, #-4]!; /* Push the return address */ \ @@ -114,7 +115,7 @@ _C_LABEL(dtrace_invop_calltrap_addr): * Since the current mode is used, the SVC lr field is ignored. */ -#ifdef ARM_TP_ADDRESS +#if __ARM_ARCH < 6 #define PULLFRAME \ ldr r0, [sp], #4; /* Get the SPSR from stack */ \ msr spsr_fsxc, r0; \ @@ -145,7 +146,7 @@ _C_LABEL(dtrace_invop_calltrap_addr): * NOTE: r13 and r14 are stored separately as a work around for the * SA110 rev 2 STM^ bug */ -#ifdef ARM_TP_ADDRESS +#if __ARM_ARCH < 6 #define PUSHFRAMEINSVC \ stmdb sp, {r0-r3}; /* Save 4 registers */ \ mov r0, lr; /* Save xxx32 r14 */ \ @@ -218,7 +219,7 @@ _C_LABEL(dtrace_invop_calltrap_addr): * exit. */ -#ifdef ARM_TP_ADDRESS +#if __ARM_ARCH < 6 #define PULLFRAMEFROMSVCANDEXIT \ ldr r0, [sp], #4; /* Get the SPSR from stack */ \ msr spsr_fsxc, r0; /* restore SPSR */ \ Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Sun Jun 7 11:38:26 2015 (r284114) +++ head/sys/arm/arm/genassym.c Sun Jun 7 13:59:02 2015 (r284115) @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#include #include #include #include @@ -124,7 +126,7 @@ ASSYM(P_FLAG, offsetof(struct proc, p_fl ASSYM(SIGF_UC, offsetof(struct sigframe, sf_uc)); -#ifdef ARM_TP_ADDRESS +#if __ARM_ARCH < 6 ASSYM(ARM_TP_ADDRESS, ARM_TP_ADDRESS); ASSYM(ARM_RAS_START, ARM_RAS_START); ASSYM(ARM_RAS_END, ARM_RAS_END); Modified: head/sys/arm/arm/swtch.S ============================================================================== --- head/sys/arm/arm/swtch.S Sun Jun 7 11:38:26 2015 (r284114) +++ head/sys/arm/arm/swtch.S Sun Jun 7 13:59:02 2015 (r284115) @@ -198,20 +198,20 @@ ENTRY(cpu_throw) str r7, [r6, #PC_CURPCB] /* We have a new curthread now so make a note it */ str r5, [r6, #PC_CURTHREAD] -#ifndef ARM_TP_ADDRESS +#if __ARM_ARCH >= 6 mcr p15, 0, r5, c13, c0, 4 #endif /* Set the new tp */ ldr r6, [r5, #(TD_MD + MD_TP)] -#ifdef ARM_TP_ADDRESS +#if __ARM_ARCH >= 6 + mcr p15, 0, r6, c13, c0, 3 +#else ldr r4, =ARM_TP_ADDRESS str r6, [r4] ldr r6, [r5, #(TD_MD + MD_RAS_START)] str r6, [r4, #4] /* ARM_RAS_START */ ldr r6, [r5, #(TD_MD + MD_RAS_END)] str r6, [r4, #8] /* ARM_RAS_END */ -#else - mcr p15, 0, r6, c13, c0, 3 #endif /* Restore all the saved registers and exit */ add r3, r7, #PCB_R4 @@ -245,7 +245,7 @@ ENTRY(cpu_switch) /* We have a new curthread now so make a note it */ GET_PCPU(r7, r2) str r1, [r7, #PC_CURTHREAD] -#ifndef ARM_TP_ADDRESS +#if __ARM_ARCH >= 6 mcr p15, 0, r1, c13, c0, 4 #endif @@ -259,7 +259,14 @@ ENTRY(cpu_switch) ldr r2, [r0, #(TD_PCB)] mov r4, r0 /* Save the old thread. */ -#ifdef ARM_TP_ADDRESS +#if __ARM_ARCH >= 6 + /* + * Set new tp. No need to store the old one first, userland can't + * change it directly on armv6. + */ + ldr r9, [r1, #(TD_MD + MD_TP)] + mcr p15, 0, r9, c13, c0, 3 +#else /* Store the old tp; userland can change it on armv4. */ ldr r3, =ARM_TP_ADDRESS ldr r9, [r3] @@ -276,13 +283,6 @@ ENTRY(cpu_switch) str r9, [r3, #4] ldr r9, [r1, #(TD_MD + MD_RAS_END)] str r9, [r3, #8] -#else - /* - * Set new tp. No need to store the old one first, userland can't - * change it directly on armv6. - */ - ldr r9, [r1, #(TD_MD + MD_TP)] - mcr p15, 0, r9, c13, c0, 3 #endif /* Get the user structure for the new process in r9 */ Modified: head/sys/arm/arm/sys_machdep.c ============================================================================== --- head/sys/arm/arm/sys_machdep.c Sun Jun 7 11:38:26 2015 (r284114) +++ head/sys/arm/arm/sys_machdep.c Sun Jun 7 13:59:02 2015 (r284115) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -162,7 +163,7 @@ arm32_set_tp(struct thread *td, void *ar { td->td_md.md_tp = (register_t)args; -#ifndef ARM_TP_ADDRESS +#if __ARM_ARCH >= 6 set_tls(args); #else *(register_t *)ARM_TP_ADDRESS = (register_t)args; @@ -174,7 +175,7 @@ static int arm32_get_tp(struct thread *td, void *args) { -#ifndef ARM_TP_ADDRESS +#if __ARM_ARCH >= 6 td->td_retval[0] = td->td_md.md_tp; #else td->td_retval[0] = *(register_t *)ARM_TP_ADDRESS; Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Sun Jun 7 11:38:26 2015 (r284114) +++ head/sys/arm/arm/vm_machdep.c Sun Jun 7 13:59:02 2015 (r284115) @@ -54,6 +54,8 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#include #include #include #include @@ -143,10 +145,10 @@ cpu_fork(register struct thread *td1, re /* Setup to release spin count in fork_exit(). */ td2->td_md.md_spinlock_count = 1; td2->td_md.md_saved_cspr = PSR_SVC32_MODE;; -#ifdef ARM_TP_ADDRESS - td2->td_md.md_tp = *(register_t *)ARM_TP_ADDRESS; -#else +#if __ARM_ARCH >= 6 td2->td_md.md_tp = td1->td_md.md_tp; +#else + td2->td_md.md_tp = *(register_t *)ARM_TP_ADDRESS; #endif } @@ -273,10 +275,10 @@ cpu_set_user_tls(struct thread *td, void td->td_md.md_tp = (register_t)tls_base; if (td == curthread) { critical_enter(); -#ifdef ARM_TP_ADDRESS - *(register_t *)ARM_TP_ADDRESS = (register_t)tls_base; -#else +#if __ARM_ARCH >= 6 set_tls(tls_base); +#else + *(register_t *)ARM_TP_ADDRESS = (register_t)tls_base; #endif critical_exit(); } From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 14:06:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B8C5E4F; Sun, 7 Jun 2015 14:06:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 767C411C5; Sun, 7 Jun 2015 14:06:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t57E6Li7094020 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 7 Jun 2015 17:06:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t57E6Li7094020 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t57E6LPE094019; Sun, 7 Jun 2015 17:06:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 7 Jun 2015 17:06:21 +0300 From: Konstantin Belousov To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284105 - head/bin/cp Message-ID: <20150607140621.GI2499@kib.kiev.ua> References: <201506070349.t573ngeh064017@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201506070349.t573ngeh064017@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 14:06:27 -0000 On Sun, Jun 07, 2015 at 03:49:42AM +0000, Bryan Drewery wrote: > Author: bdrewery > Date: Sun Jun 7 03:49:41 2015 > New Revision: 284105 > URL: https://svnweb.freebsd.org/changeset/base/284105 > > Log: > Cleanup some indentation issues. > > Modified: > head/bin/cp/utils.c > > Modified: head/bin/cp/utils.c > ============================================================================== > --- head/bin/cp/utils.c Sat Jun 6 22:03:24 2015 (r284104) > +++ head/bin/cp/utils.c Sun Jun 7 03:49:41 2015 (r284105) > @@ -122,18 +122,17 @@ copy_file(const FTSENT *entp, int dne) > /* remove existing destination file name, > * create a new file */ > (void)unlink(to.p_path); > - if (!lflag) > + if (!lflag) { It seems that the next two lines are indented in a funny way as well. > to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, > fs->st_mode & ~(S_ISUID | S_ISGID)); > - } else { > - if (!lflag) > - /* overwrite existing destination file name */ > - to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); > - } > - } else { > - if (!lflag) > - to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, > - fs->st_mode & ~(S_ISUID | S_ISGID)); > + } > + } else if (!lflag) { > + /* overwrite existing destination file name */ > + to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); > + } > + } else if (!lflag) { > + to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, > + fs->st_mode & ~(S_ISUID | S_ISGID)); > } > > if (to_fd == -1) { From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 14:20:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7710E151; Sun, 7 Jun 2015 14:20:49 +0000 (UTC) (envelope-from araujo@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 656F915D9; Sun, 7 Jun 2015 14:20:49 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57EKnYJ083110; Sun, 7 Jun 2015 14:20:49 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57EKnio083109; Sun, 7 Jun 2015 14:20:49 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201506071420.t57EKnio083109@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Sun, 7 Jun 2015 14:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284116 - head/sys/boot/ficl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 14:20:49 -0000 Author: araujo (ports committer) Date: Sun Jun 7 14:20:48 2015 New Revision: 284116 URL: https://svnweb.freebsd.org/changeset/base/284116 Log: Include header libi386.h to silence the clang warning of implicit declaration of functions biospci_*. Differential Revision: D2668 Reviewed by: rodrigc Modified: head/sys/boot/ficl/loader.c Modified: head/sys/boot/ficl/loader.c ============================================================================== --- head/sys/boot/ficl/loader.c Sun Jun 7 13:59:02 2015 (r284115) +++ head/sys/boot/ficl/loader.c Sun Jun 7 14:20:48 2015 (r284116) @@ -46,6 +46,7 @@ #include "bootstrap.h" #include #include "ficl.h" +#include "../i386/libi386/libi386.h" /* FreeBSD's loader interaction words and extras * From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 14:32:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E3FA32E; Sun, 7 Jun 2015 14:32:53 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CCD618C6; Sun, 7 Jun 2015 14:32:53 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57EWrIN091451; Sun, 7 Jun 2015 14:32:53 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57EWrLK091450; Sun, 7 Jun 2015 14:32:53 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071432.t57EWrLK091450@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 14:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284117 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 14:32:53 -0000 Author: bapt Date: Sun Jun 7 14:32:52 2015 New Revision: 284117 URL: https://svnweb.freebsd.org/changeset/base/284117 Log: Fix pw userdel -r not deleting homedir Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 14:20:48 2015 (r284116) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 14:32:52 2015 (r284117) @@ -1139,7 +1139,7 @@ delete_user(struct userconf *cnf, struct pw_log(cnf, mode, W_USER, "%s(%u) account removed", a_name->val, uid); - if (PWALTDIR()) { + if (!PWALTDIR()) { /* * Remove mail file */ From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 14:34:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC82E476; Sun, 7 Jun 2015 14:34:40 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA01D18CD; Sun, 7 Jun 2015 14:34:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57EYer7091854; Sun, 7 Jun 2015 14:34:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57EYcK0091841; Sun, 7 Jun 2015 14:34:38 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071434.t57EYcK0091841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 14:34:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284118 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 14:34:40 -0000 Author: bapt Date: Sun Jun 7 14:34:38 2015 New Revision: 284118 URL: https://svnweb.freebsd.org/changeset/base/284118 Log: Add a new global struct pwconf to store etcpath, rootdir and struct userconf Do not add anymore -R and -V to arglist Add an error message if both -V and -R are set in arguments Modified: head/usr.sbin/pw/grupd.c head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw.h head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/pwupd.c head/usr.sbin/pw/pwupd.h Modified: head/usr.sbin/pw/grupd.c ============================================================================== --- head/usr.sbin/pw/grupd.c Sun Jun 7 14:32:52 2015 (r284117) +++ head/usr.sbin/pw/grupd.c Sun Jun 7 14:34:38 2015 (r284118) @@ -39,28 +39,14 @@ static const char rcsid[] = #include "pwupd.h" -static char * grpath = _PATH_PWD; - -int -setgrdir(const char * dir) -{ - if (dir == NULL) - return -1; - else - grpath = strdup(dir); - if (grpath == NULL) - return -1; - - return 0; -} - char * getgrpath(const char * file) { static char pathbuf[MAXPATHLEN]; - snprintf(pathbuf, sizeof pathbuf, "%s/%s", grpath, file); - return pathbuf; + snprintf(pathbuf, sizeof pathbuf, "%s/%s", conf.etcpath, file); + + return (pathbuf); } static int @@ -76,7 +62,7 @@ gr_update(struct group * grp, char const if (group != NULL) old_gr = GETGRNAM(group); - if (gr_init(grpath, NULL)) + if (gr_init(conf.etcpath, NULL)) err(1, "gr_init()"); if ((pfd = gr_lock()) == -1) { Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun Jun 7 14:32:52 2015 (r284117) +++ head/usr.sbin/pw/pw.c Sun Jun 7 14:34:38 2015 (r284118) @@ -33,6 +33,7 @@ static const char rcsid[] = #include #include #include +#include #include #include "pw.h" @@ -84,6 +85,8 @@ struct pwf VPWF = vgetgrnam, }; +struct pwconf conf; + static struct cargs arglist; static int getindex(const char *words[], const char *word); @@ -97,11 +100,9 @@ main(int argc, char *argv[]) int mode = -1; int which = -1; char *config = NULL; - struct userconf *cnf; struct stat st; char arg; - struct carg *carg; - char *etcpath = NULL; + bool relocated = false; static const char *opts[W_NUM][M_NUM] = { @@ -123,12 +124,15 @@ main(int argc, char *argv[]) } }; - static int (*funcs[W_NUM]) (struct userconf * _cnf, int _mode, struct cargs * _args) = + static int (*funcs[W_NUM]) (int _mode, struct cargs * _args) = { /* Request handlers */ pw_user, pw_group }; + conf.rootdir[0] = '\0'; + strlcpy(conf.etcpath, _PATH_PWD, sizeof(conf.etcpath)); + LIST_INIT(&arglist); (void)setlocale(LC_ALL, ""); @@ -146,6 +150,10 @@ main(int argc, char *argv[]) */ arg = argv[1][1]; if (arg == 'V' || arg == 'R') { + if (relocated) + errx(EXIT_FAILURE, "Both '-R' and '-V' " + "specified, only one accepted"); + relocated = true; optarg = &argv[1][2]; if (*optarg == '\0') { if (stat(argv[2], &st) != 0) @@ -159,7 +167,14 @@ main(int argc, char *argv[]) ++argv; --argc; } - addarg(&arglist, arg, optarg); + memcpy(&PWF, &VPWF, sizeof PWF); + if (arg == 'R') { + strlcpy(conf.rootdir, optarg, + sizeof(conf.rootdir)); + PWF._altdir = PWF_ROOTDIR; + } + snprintf(conf.etcpath, sizeof(conf.etcpath), + "%s%s", optarg, arg == 'R' ? "/etc" : ""); } else break; } @@ -220,37 +235,18 @@ main(int argc, char *argv[]) */ config = getarg(&arglist, 'C') ? getarg(&arglist, 'C')->val : NULL; - - if ((carg = getarg(&arglist, 'R')) != NULL) { - asprintf(&etcpath, "%s/etc", carg->val); - if (etcpath == NULL) + if (config == NULL) { /* Only override config location if -C not specified */ + asprintf(&config, "%s/pw.conf", conf.etcpath); + if (config == NULL) errx(EX_OSERR, "out of memory"); } - if (etcpath == NULL && (carg = getarg(&arglist, 'V')) != NULL) { - etcpath = strdup(carg->val); - if (etcpath == NULL) - errx(EX_OSERR, "out of memory"); - } - if (etcpath && *etcpath) { - if (config == NULL) { /* Only override config location if -C not specified */ - asprintf(&config, "%s/pw.conf", etcpath); - if (config == NULL) - errx(EX_OSERR, "out of memory"); - } - setpwdir(etcpath); - setgrdir(etcpath); - memcpy(&PWF, &VPWF, sizeof PWF); - if (getarg(&arglist, 'R')) - PWF._altdir = PWF_ROOTDIR; - } - free(etcpath); /* * Now, let's do the common initialisation */ - cnf = read_userconfig(config); + conf.userconf = read_userconfig(config); - ch = funcs[which] (cnf, mode, &arglist); + ch = funcs[which] (mode, &arglist); /* * If everything went ok, and we've been asked to update @@ -274,7 +270,7 @@ main(int argc, char *argv[]) if ((i = WEXITSTATUS(i)) != 0) errx(ch, "make exited with status %d", i); else - pw_log(cnf, mode, which, "NIS maps updated"); + pw_log(conf.userconf, mode, which, "NIS maps updated"); } } return ch; Modified: head/usr.sbin/pw/pw.h ============================================================================== --- head/usr.sbin/pw/pw.h Sun Jun 7 14:32:52 2015 (r284117) +++ head/usr.sbin/pw/pw.h Sun Jun 7 14:34:38 2015 (r284118) @@ -72,30 +72,6 @@ struct carg LIST_HEAD(cargs, carg); -struct userconf -{ - int default_password; /* Default password for new users? */ - int reuse_uids; /* Reuse uids? */ - int reuse_gids; /* Reuse gids? */ - char *nispasswd; /* Path to NIS version of the passwd file */ - char *dotdir; /* Where to obtain skeleton files */ - char *newmail; /* Mail to send to new accounts */ - char *logfile; /* Where to log changes */ - char *home; /* Where to create home directory */ - mode_t homemode; /* Home directory permissions */ - char *shelldir; /* Where shells are located */ - char **shells; /* List of shells */ - char *shell_default; /* Default shell */ - char *default_group; /* Default group number */ - char **groups; /* Default (additional) groups */ - char *default_class; /* Default user class */ - uid_t min_uid, max_uid; /* Allowed range of uids */ - gid_t min_gid, max_gid; /* Allowed range of gids */ - int expire_days; /* Days to expiry */ - int password_days; /* Days to password expiry */ - int numgroups; /* (internal) size of default_group array */ -}; - #define _DEF_DIRMODE (S_IRWXU | S_IRWXG | S_IRWXO) #define _PATH_PW_CONF "/etc/pw.conf" #define _UC_MAXLINE 1024 @@ -106,8 +82,8 @@ int write_userconfig(char const * file); struct carg *addarg(struct cargs * _args, int ch, char *argstr); struct carg *getarg(struct cargs * _args, int ch); -int pw_user(struct userconf * cnf, int mode, struct cargs * _args); -int pw_group(struct userconf * cnf, int mode, struct cargs * _args); +int pw_user(int mode, struct cargs * _args); +int pw_group(int mode, struct cargs * _args); char *pw_checkname(char *name, int gecos); int addnispwent(const char *path, struct passwd *pwd); Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sun Jun 7 14:32:52 2015 (r284117) +++ head/usr.sbin/pw/pw_group.c Sun Jun 7 14:34:38 2015 (r284118) @@ -48,7 +48,7 @@ static int print_group(struct group static gid_t gr_gidpolicy(struct userconf * cnf, struct cargs * args); int -pw_group(struct userconf * cnf, int mode, struct cargs * args) +pw_group(int mode, struct cargs * args) { int rc; struct carg *a_newname = getarg(args, 'l'); @@ -58,6 +58,7 @@ pw_group(struct userconf * cnf, int mode struct group *grp = NULL; int grmembers = 0; char **members = NULL; + struct userconf *cnf = conf.userconf; static struct group fakegroup = { Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 14:32:52 2015 (r284117) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 14:34:38 2015 (r284118) @@ -55,7 +55,7 @@ static int delete_user(struct userconf * struct carg *a_name, int delete, int mode); static int print_user(struct passwd * pwd, int pretty, int v7); static uid_t pw_uidpolicy(struct userconf * cnf, struct cargs * args); -static uid_t pw_gidpolicy(struct userconf * cnf, struct cargs * args, char *nam, gid_t prefer); +static uid_t pw_gidpolicy(struct cargs * args, char *nam, gid_t prefer); static time_t pw_pwdpolicy(struct userconf * cnf, struct cargs * args); static time_t pw_exppolicy(struct userconf * cnf, struct cargs * args); static char *pw_homepolicy(struct userconf * cnf, struct cargs * args, char const * user); @@ -66,19 +66,18 @@ static void rmat(uid_t uid); static void rmopie(char const * name); static void -create_and_populate_homedir(int mode, struct cargs *args, struct passwd *pwd, - struct userconf *cnf) +create_and_populate_homedir(int mode, struct passwd *pwd) { char *homedir, *dotdir; - struct carg *arg; + struct userconf *cnf = conf.userconf; homedir = dotdir = NULL; - if ((arg = getarg(args, 'R'))) { - asprintf(&homedir, "%s/%s", arg->val, pwd->pw_dir); + if (conf.rootdir[0] != '\0') { + asprintf(&homedir, "%s/%s", conf.rootdir, pwd->pw_dir); if (homedir == NULL) errx(EX_OSERR, "out of memory"); - asprintf(&dotdir, "%s/%s", arg->val, cnf->dotdir); + asprintf(&dotdir, "%s/%s", conf.rootdir, cnf->dotdir); } copymkdir(homedir ? homedir : pwd->pw_dir, dotdir ? dotdir: cnf->dotdir, @@ -120,7 +119,7 @@ create_and_populate_homedir(int mode, st */ int -pw_user(struct userconf * cnf, int mode, struct cargs * args) +pw_user(int mode, struct cargs * args) { int rc, edited = 0; char *p = NULL; @@ -131,6 +130,7 @@ pw_user(struct userconf * cnf, int mode, struct passwd *pwd = NULL; struct group *grp; struct stat st; + struct userconf *cnf; char line[_PASSWORD_LEN+1]; char path[MAXPATHLEN]; FILE *fp; @@ -154,6 +154,7 @@ pw_user(struct userconf * cnf, int mode, #endif }; + cnf = conf.userconf; /* * With M_NEXT, we only need to return the @@ -165,7 +166,7 @@ pw_user(struct userconf * cnf, int mode, if (getarg(args, 'q')) return next; printf("%u:", next); - pw_group(cnf, mode, args); + pw_group(mode, args); return EXIT_SUCCESS; } @@ -528,7 +529,7 @@ pw_user(struct userconf * cnf, int mode, pwd->pw_name = a_name->val; pwd->pw_class = cnf->default_class ? cnf->default_class : ""; pwd->pw_uid = pw_uidpolicy(cnf, args); - pwd->pw_gid = pw_gidpolicy(cnf, args, pwd->pw_name, (gid_t) pwd->pw_uid); + pwd->pw_gid = pw_gidpolicy(args, pwd->pw_name, (gid_t) pwd->pw_uid); pwd->pw_change = pw_pwdpolicy(cnf, args); pwd->pw_expire = pw_exppolicy(cnf, args); pwd->pw_dir = pw_homepolicy(cnf, args, pwd->pw_name); @@ -740,7 +741,7 @@ pw_user(struct userconf * cnf, int mode, */ if (PWALTDIR() != PWF_ALT && getarg(args, 'm') != NULL && pwd->pw_dir && *pwd->pw_dir == '/' && pwd->pw_dir[1]) - create_and_populate_homedir(mode, args, pwd, cnf); + create_and_populate_homedir(mode, pwd); /* * Finally, send mail to the new user as well, if we are asked to @@ -824,11 +825,12 @@ pw_uidpolicy(struct userconf * cnf, stru static uid_t -pw_gidpolicy(struct userconf * cnf, struct cargs * args, char *nam, gid_t prefer) +pw_gidpolicy(struct cargs * args, char *nam, gid_t prefer) { struct group *grp; gid_t gid = (uid_t) - 1; struct carg *a_gid = getarg(args, 'g'); + struct userconf *cnf = conf.userconf; /* * If no arg given, see if default can help out @@ -874,11 +876,11 @@ pw_gidpolicy(struct userconf * cnf, stru { addarg(&grpargs, 'N', NULL); addarg(&grpargs, 'q', NULL); - gid = pw_group(cnf, M_NEXT, &grpargs); + gid = pw_group(M_NEXT, &grpargs); } else { - pw_group(cnf, M_ADD, &grpargs); + pw_group(M_ADD, &grpargs); if ((grp = GETGRNAM(nam)) != NULL) gid = grp->gr_gid; } Modified: head/usr.sbin/pw/pwupd.c ============================================================================== --- head/usr.sbin/pw/pwupd.c Sun Jun 7 14:32:52 2015 (r284117) +++ head/usr.sbin/pw/pwupd.c Sun Jun 7 14:34:38 2015 (r284118) @@ -44,28 +44,12 @@ static const char rcsid[] = #include "pwupd.h" -static char pathpwd[] = _PATH_PWD; -static char * pwpath = pathpwd; - -int -setpwdir(const char * dir) -{ - if (dir == NULL) - return (-1); - else - pwpath = strdup(dir); - if (pwpath == NULL) - return (-1); - - return (0); -} - char * getpwpath(char const * file) { static char pathbuf[MAXPATHLEN]; - snprintf(pathbuf, sizeof pathbuf, "%s/%s", pwpath, file); + snprintf(pathbuf, sizeof pathbuf, "%s/%s", conf.etcpath, file); return (pathbuf); } @@ -80,9 +64,9 @@ pwdb_check(void) args[i++] = _PATH_PWD_MKDB; args[i++] = "-C"; - if (pwpath != pathpwd) { + if (strcmp(conf.etcpath, _PATH_PWD) != 0) { args[i++] = "-d"; - args[i++] = pwpath; + args[i++] = conf.etcpath; } args[i++] = getpwpath(_MASTERPASSWD); args[i] = NULL; @@ -117,7 +101,7 @@ pw_update(struct passwd * pwd, char cons if (user != NULL) old_pw = GETPWNAM(user); - if (pw_init(pwpath, NULL)) + if (pw_init(conf.etcpath, NULL)) err(1, "pw_init()"); if ((pfd = pw_lock()) == -1) { pw_fini(); Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sun Jun 7 14:32:52 2015 (r284117) +++ head/usr.sbin/pw/pwupd.h Sun Jun 7 14:34:38 2015 (r284118) @@ -29,6 +29,7 @@ #ifndef _PWUPD_H_ #define _PWUPD_H_ +#include #include #include #include @@ -41,8 +42,7 @@ #define RET_SETGRENT void #endif -struct pwf -{ +struct pwf { int _altdir; void (*_setpwent)(void); void (*_endpwent)(void); @@ -56,8 +56,38 @@ struct pwf struct group * (*_getgrnam)(const char * nam); }; +struct userconf { + int default_password; /* Default password for new users? */ + int reuse_uids; /* Reuse uids? */ + int reuse_gids; /* Reuse gids? */ + char *nispasswd; /* Path to NIS version of the passwd file */ + char *dotdir; /* Where to obtain skeleton files */ + char *newmail; /* Mail to send to new accounts */ + char *logfile; /* Where to log changes */ + char *home; /* Where to create home directory */ + mode_t homemode; /* Home directory permissions */ + char *shelldir; /* Where shells are located */ + char **shells; /* List of shells */ + char *shell_default; /* Default shell */ + char *default_group; /* Default group number */ + char **groups; /* Default (additional) groups */ + char *default_class; /* Default user class */ + uid_t min_uid, max_uid; /* Allowed range of uids */ + gid_t min_gid, max_gid; /* Allowed range of gids */ + int expire_days; /* Days to expiry */ + int password_days; /* Days to password expiry */ + int numgroups; /* (internal) size of default_group array */ +}; + +struct pwconf { + char rootdir[MAXPATHLEN]; + char etcpath[MAXPATHLEN]; + struct userconf *userconf; +}; + extern struct pwf PWF; extern struct pwf VPWF; +extern struct pwconf conf; #define SETPWENT() PWF._setpwent() #define ENDPWENT() PWF._endpwent() @@ -91,14 +121,12 @@ int addpwent(struct passwd * pwd); int delpwent(struct passwd * pwd); int chgpwent(char const * login, struct passwd * pwd); -int setpwdir(const char * dir); char * getpwpath(char const * file); int addgrent(struct group * grp); int delgrent(struct group * grp); int chggrent(char const * name, struct group * grp); -int setgrdir(const char * dir); char * getgrpath(const char *file); void vsetpwent(void); From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 14:54:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1B65E41; Sun, 7 Jun 2015 14:54:07 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D00F31D34; Sun, 7 Jun 2015 14:54:07 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57Es7xI003622; Sun, 7 Jun 2015 14:54:07 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57Es7t5003621; Sun, 7 Jun 2015 14:54:07 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071454.t57Es7t5003621@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 14:54:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284119 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 14:54:08 -0000 Author: bapt Date: Sun Jun 7 14:54:07 2015 New Revision: 284119 URL: https://svnweb.freebsd.org/changeset/base/284119 Log: Handle -C and -Y locally and stop adding them to arglist Modified: head/usr.sbin/pw/pw.c Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun Jun 7 14:34:38 2015 (r284118) +++ head/usr.sbin/pw/pw.c Sun Jun 7 14:54:07 2015 (r284119) @@ -102,7 +102,7 @@ main(int argc, char *argv[]) char *config = NULL; struct stat st; char arg; - bool relocated = false; + bool relocated, nis; static const char *opts[W_NUM][M_NUM] = { @@ -130,6 +130,7 @@ main(int argc, char *argv[]) pw_group }; + relocated = nis = false; conf.rootdir[0] = '\0'; strlcpy(conf.etcpath, _PATH_PWD, sizeof(conf.etcpath)); @@ -210,10 +211,20 @@ main(int argc, char *argv[]) optarg = NULL; while ((ch = getopt(argc, argv, opts[which][mode])) != -1) { - if (ch == '?') + switch (ch) { + case '?': errx(EX_USAGE, "unknown switch"); - else + break; + case 'C': + config = optarg; + break; + case 'Y': + nis = true; + break; + default: addarg(&arglist, ch, optarg); + break; + } optarg = NULL; } @@ -234,7 +245,6 @@ main(int argc, char *argv[]) * Set our base working path if not overridden */ - config = getarg(&arglist, 'C') ? getarg(&arglist, 'C')->val : NULL; if (config == NULL) { /* Only override config location if -C not specified */ asprintf(&config, "%s/pw.conf", conf.etcpath); if (config == NULL) @@ -252,7 +262,7 @@ main(int argc, char *argv[]) * If everything went ok, and we've been asked to update * the NIS maps, then do it now */ - if (ch == EXIT_SUCCESS && getarg(&arglist, 'Y') != NULL) { + if (ch == EXIT_SUCCESS && nis) { pid_t pid; fflush(NULL); From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 14:57:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D1432DA; Sun, 7 Jun 2015 14:57:17 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B84B1D55; Sun, 7 Jun 2015 14:57:17 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57EvHE7004616; Sun, 7 Jun 2015 14:57:17 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57EvHsc004615; Sun, 7 Jun 2015 14:57:17 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071457.t57EvHsc004615@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 14:57:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284120 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 14:57:17 -0000 Author: bapt Date: Sun Jun 7 14:57:16 2015 New Revision: 284120 URL: https://svnweb.freebsd.org/changeset/base/284120 Log: Sort headers Modified: head/usr.sbin/pw/pwupd.h Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sun Jun 7 14:54:07 2015 (r284119) +++ head/usr.sbin/pw/pwupd.h Sun Jun 7 14:57:16 2015 (r284120) @@ -29,13 +29,13 @@ #ifndef _PWUPD_H_ #define _PWUPD_H_ +#include #include #include + #include #include -#include - #if defined(__FreeBSD__) #define RET_SETGRENT int #else From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 15:09:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39E46F5B; Sun, 7 Jun 2015 15:09:55 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 280941FC8; Sun, 7 Jun 2015 15:09:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57F9t9k011653; Sun, 7 Jun 2015 15:09:55 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57F9s86011647; Sun, 7 Jun 2015 15:09:54 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071509.t57F9s86011647@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 15:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284121 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 15:09:55 -0000 Author: bapt Date: Sun Jun 7 15:09:53 2015 New Revision: 284121 URL: https://svnweb.freebsd.org/changeset/base/284121 Log: Handle dryrun (-N) via global pwconf Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/pwupd.h Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun Jun 7 14:57:16 2015 (r284120) +++ head/usr.sbin/pw/pw.c Sun Jun 7 15:09:53 2015 (r284121) @@ -132,6 +132,7 @@ main(int argc, char *argv[]) relocated = nis = false; conf.rootdir[0] = '\0'; + conf.dryrun = false; strlcpy(conf.etcpath, _PATH_PWD, sizeof(conf.etcpath)); LIST_INIT(&arglist); @@ -218,6 +219,9 @@ main(int argc, char *argv[]) case 'C': config = optarg; break; + case 'N': + conf.dryrun = true; + break; case 'Y': nis = true; break; @@ -231,7 +235,7 @@ main(int argc, char *argv[]) /* * Must be root to attempt an update */ - if (geteuid() != 0 && mode != M_PRINT && mode != M_NEXT && getarg(&arglist, 'N')==NULL) + if (geteuid() != 0 && mode != M_PRINT && mode != M_NEXT && !conf.dryrun) errx(EX_NOPERM, "you must be root to run this program"); /* Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sun Jun 7 14:57:16 2015 (r284120) +++ head/usr.sbin/pw/pw_group.c Sun Jun 7 15:09:53 2015 (r284121) @@ -258,7 +258,7 @@ pw_group(int mode, struct cargs * args) grp->gr_mem = members; } - if (getarg(args, 'N') != NULL) + if (conf.dryrun) return print_group(grp, getarg(args, 'P') != NULL); if (mode == M_ADD && (rc = addgrent(grp)) != 0) { Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 14:57:16 2015 (r284120) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 15:09:53 2015 (r284121) @@ -620,7 +620,7 @@ pw_user(int mode, struct cargs * args) /* * Special case: -N only displays & exits */ - if (getarg(args, 'N') != NULL) + if (conf.dryrun) return print_user(pwd, getarg(args, 'P') != NULL, getarg(args, '7') != NULL); @@ -872,9 +872,7 @@ pw_gidpolicy(struct cargs * args, char * snprintf(tmp, sizeof(tmp), "%u", prefer); addarg(&grpargs, 'g', tmp); } - if (getarg(args, 'N')) - { - addarg(&grpargs, 'N', NULL); + if (conf.dryrun) { addarg(&grpargs, 'q', NULL); gid = pw_group(M_NEXT, &grpargs); } @@ -1035,7 +1033,7 @@ pw_password(struct userconf * cnf, struc * We give this information back to the user */ if (getarg(args, 'h') == NULL && getarg(args, 'H') == NULL && - getarg(args, 'N') == NULL) { + !conf.dryrun) { if (isatty(STDOUT_FILENO)) printf("Password for '%s' is: ", user); printf("%s\n", pwbuf); Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sun Jun 7 14:57:16 2015 (r284120) +++ head/usr.sbin/pw/pwupd.h Sun Jun 7 15:09:53 2015 (r284121) @@ -35,6 +35,7 @@ #include #include +#include #if defined(__FreeBSD__) #define RET_SETGRENT int @@ -82,6 +83,7 @@ struct userconf { struct pwconf { char rootdir[MAXPATHLEN]; char etcpath[MAXPATHLEN]; + bool dryrun; struct userconf *userconf; }; From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 15:27:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5E916E6; Sun, 7 Jun 2015 15:27:18 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B704314BD; Sun, 7 Jun 2015 15:27:18 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57FRIOD022734; Sun, 7 Jun 2015 15:27:18 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57FRHfQ022725; Sun, 7 Jun 2015 15:27:17 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071527.t57FRHfQ022725@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 15:27:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284122 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 15:27:18 -0000 Author: bapt Date: Sun Jun 7 15:27:17 2015 New Revision: 284122 URL: https://svnweb.freebsd.org/changeset/base/284122 Log: Handle pretty print (-P) via global pwconf Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/pwupd.h Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun Jun 7 15:09:53 2015 (r284121) +++ head/usr.sbin/pw/pw.c Sun Jun 7 15:27:17 2015 (r284122) @@ -133,6 +133,7 @@ main(int argc, char *argv[]) relocated = nis = false; conf.rootdir[0] = '\0'; conf.dryrun = false; + conf.pretty = false; strlcpy(conf.etcpath, _PATH_PWD, sizeof(conf.etcpath)); LIST_INIT(&arglist); @@ -222,6 +223,9 @@ main(int argc, char *argv[]) case 'N': conf.dryrun = true; break; + case 'P': + conf.pretty = true; + break; case 'Y': nis = true; break; Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sun Jun 7 15:09:53 2015 (r284121) +++ head/usr.sbin/pw/pw_group.c Sun Jun 7 15:27:17 2015 (r284122) @@ -44,7 +44,7 @@ static const char rcsid[] = static struct passwd *lookup_pwent(const char *user); static void delete_members(char ***members, int *grmembers, int *i, struct carg *arg, struct group *grp); -static int print_group(struct group * grp, int pretty); +static int print_group(struct group * grp); static gid_t gr_gidpolicy(struct userconf * cnf, struct cargs * args); int @@ -89,11 +89,9 @@ pw_group(int mode, struct cargs * args) } if (mode == M_PRINT && getarg(args, 'a')) { - int pretty = getarg(args, 'P') != NULL; - SETGRENT(); while ((grp = GETGRENT()) != NULL) - print_group(grp, pretty); + print_group(grp); ENDGRENT(); return EXIT_SUCCESS; } @@ -119,7 +117,7 @@ pw_group(int mode, struct cargs * args) fakegroup.gr_name = a_name ? a_name->val : "nogroup"; fakegroup.gr_gid = a_gid ? (gid_t) atol(a_gid->val) : (gid_t)-1; fakegroup.gr_mem = fmems; - return print_group(&fakegroup, getarg(args, 'P') != NULL); + return print_group(&fakegroup); } errx(EX_DATAERR, "unknown group `%s'", a_name ? a_name->val : a_gid->val); } @@ -141,7 +139,7 @@ pw_group(int mode, struct cargs * args) pw_log(cnf, mode, W_GROUP, "%s(%u) removed", a_name->val, gid); return EXIT_SUCCESS; } else if (mode == M_PRINT) - return print_group(grp, getarg(args, 'P') != NULL); + return print_group(grp); if (a_gid) grp->gr_gid = (gid_t) atoi(a_gid->val); @@ -259,7 +257,7 @@ pw_group(int mode, struct cargs * args) } if (conf.dryrun) - return print_group(grp, getarg(args, 'P') != NULL); + return print_group(grp); if (mode == M_ADD && (rc = addgrent(grp)) != 0) { if (rc == -1) @@ -412,9 +410,9 @@ gr_gidpolicy(struct userconf * cnf, stru static int -print_group(struct group * grp, int pretty) +print_group(struct group * grp) { - if (!pretty) { + if (!conf.pretty) { char *buf = NULL; buf = gr_make(grp); Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 15:09:53 2015 (r284121) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 15:27:17 2015 (r284122) @@ -53,7 +53,7 @@ static char locked_str[] = "*LOCKED*"; static int delete_user(struct userconf *cnf, struct passwd *pwd, struct carg *a_name, int delete, int mode); -static int print_user(struct passwd * pwd, int pretty, int v7); +static int print_user(struct passwd * pwd, int v7); static uid_t pw_uidpolicy(struct userconf * cnf, struct cargs * args); static uid_t pw_gidpolicy(struct cargs * args, char *nam, gid_t prefer); static time_t pw_pwdpolicy(struct userconf * cnf, struct cargs * args); @@ -316,11 +316,10 @@ pw_user(int mode, struct cargs * args) } if (mode == M_PRINT && getarg(args, 'a')) { - int pretty = getarg(args, 'P') != NULL; int v7 = getarg(args, '7') != NULL; SETPWENT(); while ((pwd = GETPWENT()) != NULL) - print_user(pwd, pretty, v7); + print_user(pwd, v7); ENDPWENT(); return EXIT_SUCCESS; } @@ -363,7 +362,6 @@ pw_user(int mode, struct cargs * args) fakeuser.pw_name = a_name ? a_name->val : "nouser"; fakeuser.pw_uid = a_uid ? (uid_t) atol(a_uid->val) : (uid_t) -1; return print_user(&fakeuser, - getarg(args, 'P') != NULL, getarg(args, '7') != NULL); } if (a_name == NULL) @@ -401,9 +399,7 @@ pw_user(int mode, struct cargs * args) return (delete_user(cnf, pwd, a_name, getarg(args, 'r') != NULL, mode)); else if (mode == M_PRINT) - return print_user(pwd, - getarg(args, 'P') != NULL, - getarg(args, '7') != NULL); + return print_user(pwd, getarg(args, '7') != NULL); /* * The rest is edit code @@ -621,9 +617,7 @@ pw_user(int mode, struct cargs * args) * Special case: -N only displays & exits */ if (conf.dryrun) - return print_user(pwd, - getarg(args, 'P') != NULL, - getarg(args, '7') != NULL); + return print_user(pwd, getarg(args, '7') != NULL); if (mode == M_ADD) { edited = 1; /* Always */ @@ -1167,9 +1161,9 @@ delete_user(struct userconf *cnf, struct } static int -print_user(struct passwd * pwd, int pretty, int v7) +print_user(struct passwd * pwd, int v7) { - if (!pretty) { + if (!conf.pretty) { char *buf; if (!v7) Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sun Jun 7 15:09:53 2015 (r284121) +++ head/usr.sbin/pw/pwupd.h Sun Jun 7 15:27:17 2015 (r284122) @@ -84,6 +84,7 @@ struct pwconf { char rootdir[MAXPATHLEN]; char etcpath[MAXPATHLEN]; bool dryrun; + bool pretty; struct userconf *userconf; }; From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 15:29:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C57C784C; Sun, 7 Jun 2015 15:29:58 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3FD914CE; Sun, 7 Jun 2015 15:29:58 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57FTw4E023249; Sun, 7 Jun 2015 15:29:58 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57FTwVG023248; Sun, 7 Jun 2015 15:29:58 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071529.t57FTwVG023248@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 15:29:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284123 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 15:29:58 -0000 Author: bapt Date: Sun Jun 7 15:29:58 2015 New Revision: 284123 URL: https://svnweb.freebsd.org/changeset/base/284123 Log: Initialize conf using menset(3) Modified: head/usr.sbin/pw/pw.c Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun Jun 7 15:27:17 2015 (r284122) +++ head/usr.sbin/pw/pw.c Sun Jun 7 15:29:58 2015 (r284123) @@ -131,9 +131,7 @@ main(int argc, char *argv[]) }; relocated = nis = false; - conf.rootdir[0] = '\0'; - conf.dryrun = false; - conf.pretty = false; + memset(&conf, 0, sizeof(conf)); strlcpy(conf.etcpath, _PATH_PWD, sizeof(conf.etcpath)); LIST_INIT(&arglist); From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 15:33:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B958B21; Sun, 7 Jun 2015 15:33:09 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6038316E7; Sun, 7 Jun 2015 15:33:09 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57FX9tu027660; Sun, 7 Jun 2015 15:33:09 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57FX8aJ027654; Sun, 7 Jun 2015 15:33:08 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071533.t57FX8aJ027654@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 15:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284124 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 15:33:09 -0000 Author: bapt Date: Sun Jun 7 15:33:08 2015 New Revision: 284124 URL: https://svnweb.freebsd.org/changeset/base/284124 Log: Handle -7 via gloval pwconf Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/pwupd.h Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun Jun 7 15:29:58 2015 (r284123) +++ head/usr.sbin/pw/pw.c Sun Jun 7 15:33:08 2015 (r284124) @@ -215,6 +215,9 @@ main(int argc, char *argv[]) case '?': errx(EX_USAGE, "unknown switch"); break; + case '7': + conf.v7 = true; + break; case 'C': config = optarg; break; Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 15:29:58 2015 (r284123) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 15:33:08 2015 (r284124) @@ -53,7 +53,7 @@ static char locked_str[] = "*LOCKED*"; static int delete_user(struct userconf *cnf, struct passwd *pwd, struct carg *a_name, int delete, int mode); -static int print_user(struct passwd * pwd, int v7); +static int print_user(struct passwd * pwd); static uid_t pw_uidpolicy(struct userconf * cnf, struct cargs * args); static uid_t pw_gidpolicy(struct cargs * args, char *nam, gid_t prefer); static time_t pw_pwdpolicy(struct userconf * cnf, struct cargs * args); @@ -316,10 +316,9 @@ pw_user(int mode, struct cargs * args) } if (mode == M_PRINT && getarg(args, 'a')) { - int v7 = getarg(args, '7') != NULL; SETPWENT(); while ((pwd = GETPWENT()) != NULL) - print_user(pwd, v7); + print_user(pwd); ENDPWENT(); return EXIT_SUCCESS; } @@ -1161,15 +1160,15 @@ delete_user(struct userconf *cnf, struct } static int -print_user(struct passwd * pwd, int v7) +print_user(struct passwd * pwd) { if (!conf.pretty) { char *buf; - if (!v7) + if (!conf.v7) pwd->pw_passwd = (pwd->pw_passwd == NULL) ? "" : "*"; - buf = v7 ? pw_make_v7(pwd) : pw_make(pwd); + buf = conf.v7 ? pw_make_v7(pwd) : pw_make(pwd); printf("%s\n", buf); free(buf); } else { Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sun Jun 7 15:29:58 2015 (r284123) +++ head/usr.sbin/pw/pwupd.h Sun Jun 7 15:33:08 2015 (r284124) @@ -85,6 +85,7 @@ struct pwconf { char etcpath[MAXPATHLEN]; bool dryrun; bool pretty; + bool v7; struct userconf *userconf; }; From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 15:47:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D61CDC; Sun, 7 Jun 2015 15:47:59 +0000 (UTC) (envelope-from hselasky@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B7081993; Sun, 7 Jun 2015 15:47:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57Flwxx034333; Sun, 7 Jun 2015 15:47:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57FlwQD034329; Sun, 7 Jun 2015 15:47:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201506071547.t57FlwQD034329@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 7 Jun 2015 15:47:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284125 - in head/sys/dev/usb: . quirk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 15:47:59 -0000 Author: hselasky Date: Sun Jun 7 15:47:58 2015 New Revision: 284125 URL: https://svnweb.freebsd.org/changeset/base/284125 Log: Add new USB quirk. PR: 200693 MFC after: 1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Sun Jun 7 15:33:08 2015 (r284124) +++ head/sys/dev/usb/quirk/usb_quirk.c Sun Jun 7 15:47:58 2015 (r284125) @@ -94,6 +94,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(SILICONPORTALS, YAPPHONE, 0x100, 0x100, UQ_AU_INP_ASYNC), USB_QUIRK(LOGITECH, UN53B, 0x0000, 0xffff, UQ_NO_STRINGS), USB_QUIRK(REALTEK, RTL8196EU, 0x0000, 0xffff, UQ_CFG_INDEX_1), + USB_QUIRK(REALTEK, RTL8153, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(ELSA, MODEM1, 0x0000, 0xffff, UQ_CFG_INDEX_1), USB_QUIRK(PLANEX2, MZKUE150N, 0x0000, 0xffff, UQ_CFG_INDEX_1), /* Quirks for printer devices */ Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Jun 7 15:33:08 2015 (r284124) +++ head/sys/dev/usb/usbdevs Sun Jun 7 15:47:58 2015 (r284125) @@ -3748,6 +3748,7 @@ product REALTEK USB20CRW 0x0158 USB20CRW product REALTEK RTL8188ETV 0x0179 RTL8188ETV product REALTEK RTL8188CTV 0x018a RTL8188CTV product REALTEK USBKR100 0x8150 USBKR100 USB Ethernet +product REALTEK RTL8153 0x8153 RTL8153 USB Ethernet product REALTEK RTL8188CE_0 0x8170 RTL8188CE product REALTEK RTL8171 0x8171 RTL8171 product REALTEK RTL8172 0x8172 RTL8172 From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 15:54:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D013434F; Sun, 7 Jun 2015 15:54:57 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE4E71BD4; Sun, 7 Jun 2015 15:54:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57FsveL039238; Sun, 7 Jun 2015 15:54:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57FsvF5039237; Sun, 7 Jun 2015 15:54:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071554.t57FsvF5039237@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 15:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284126 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 15:54:57 -0000 Author: bapt Date: Sun Jun 7 15:54:57 2015 New Revision: 284126 URL: https://svnweb.freebsd.org/changeset/base/284126 Log: Finish converting -7 to pwconf Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 15:47:58 2015 (r284125) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 15:54:57 2015 (r284126) @@ -360,8 +360,7 @@ pw_user(int mode, struct cargs * args) if (mode == M_PRINT && getarg(args, 'F')) { fakeuser.pw_name = a_name ? a_name->val : "nouser"; fakeuser.pw_uid = a_uid ? (uid_t) atol(a_uid->val) : (uid_t) -1; - return print_user(&fakeuser, - getarg(args, '7') != NULL); + return print_user(&fakeuser); } if (a_name == NULL) errx(EX_NOUSER, "no such uid `%s'", a_uid->val); @@ -398,7 +397,7 @@ pw_user(int mode, struct cargs * args) return (delete_user(cnf, pwd, a_name, getarg(args, 'r') != NULL, mode)); else if (mode == M_PRINT) - return print_user(pwd, getarg(args, '7') != NULL); + return print_user(pwd); /* * The rest is edit code @@ -616,7 +615,7 @@ pw_user(int mode, struct cargs * args) * Special case: -N only displays & exits */ if (conf.dryrun) - return print_user(pwd, getarg(args, '7') != NULL); + return print_user(pwd); if (mode == M_ADD) { edited = 1; /* Always */ From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 17:06:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E16236FF; Sun, 7 Jun 2015 17:06:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pd0-x235.google.com (mail-pd0-x235.google.com [IPv6:2607:f8b0:400e:c02::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0DEB1C18; Sun, 7 Jun 2015 17:06:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pdbki1 with SMTP id ki1so85755936pdb.1; Sun, 07 Jun 2015 10:06:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3b8k5eEkL2OLrxi4naeOOy53I6f475uRqoCZGhUGHV8=; b=rNbGr24xnika8MpxFN9Gu4ugS7iuhqto7xuGa3r58gGC2K82zbFDlt0IUzUtkiXllZ 50QHsAHD5O1mLQIOVHnofdtjWS2V1cwaZ9q/tVpuGFReKF1AHAE1iEnskoXyIekuQytO p6gxv3dsK8tj36FaHlt0lk8EmRAjFyEDkWkCUWWHK+06baM3Y6BMRHcVPFcu2nN4/Gt+ wIJ7NHs4E1/tD+mJy1vtKjDFvTaB5F5YzJw4DLfhSFWlNx+qF8Ti64fPaPdvlYxoDW89 x7KLQdQrnQ+R7jhoBQXr0ZQqOj6q04/7HmNl3MHus8QIRs8B3feuawWgQ7IwlWYvBzWV ldnA== X-Received: by 10.66.145.133 with SMTP id su5mr22341567pab.114.1433696816123; Sun, 07 Jun 2015 10:06:56 -0700 (PDT) Received: from [192.168.20.7] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id k9sm141063pdp.60.2015.06.07.10.06.55 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Jun 2015 10:06:55 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r284116 - head/sys/boot/ficl From: Garrett Cooper X-Mailer: iPhone Mail (12F70) In-Reply-To: <201506071420.t57EKnio083109@svn.freebsd.org> Date: Sun, 7 Jun 2015 10:06:54 -0700 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <5F622B98-A1AE-41FB-8E4A-E767DB928689@gmail.com> References: <201506071420.t57EKnio083109@svn.freebsd.org> To: Marcelo Araujo X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 17:06:57 -0000 > On Jun 7, 2015, at 07:20, Marcelo Araujo wrote: >=20 > Author: araujo (ports committer) > Date: Sun Jun 7 14:20:48 2015 > New Revision: 284116 > URL: https://svnweb.freebsd.org/changeset/base/284116 >=20 > Log: > Include header libi386.h to silence the clang warning of implicit declara= tion > of functions biospci_*. >=20 > Differential Revision: D2668 > Reviewed by: rodrigc >=20 > Modified: > head/sys/boot/ficl/loader.c >=20 > Modified: head/sys/boot/ficl/loader.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/sys/boot/ficl/loader.c Sun Jun 7 13:59:02 2015 (r284115) > +++ head/sys/boot/ficl/loader.c Sun Jun 7 14:20:48 2015 (r284116) > @@ -46,6 +46,7 @@ > #include "bootstrap.h" > #include > #include "ficl.h" > +#include "../i386/libi386/libi386.h" Hi Marcelo, This commit's explicitly polluting the ficl interpreter with code from x86 o= n all platforms. Seems like the code should be refactored to not explicitly i= nclude this symbol, then #include this header there. That's the real bug.. Also, I'm not a huge fan of relative #include's. I prefer using CFLAGS with -= I (mostly personal preference, however I think it affects file generation to= o). Thanks!= From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 17:12:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8ADFEA6C for ; Sun, 7 Jun 2015 17:12:35 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 541951E2A for ; Sun, 7 Jun 2015 17:12:35 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1726E2048E for ; Sun, 7 Jun 2015 13:12:28 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Sun, 07 Jun 2015 13:12:28 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=F1oA3LJN/hb6mmDX6m2pVBLe9u8=; b=gYFia1 8qCuCh70ZZU+C3FCZeDY54BHlhmzDmYyHJ/bP5ge1t8OB/N1a5oIhM0RU2/371x5 IvItXY8FdVbqP2Yz1kS7s6+z7j2kJobhdxxDdOnUF9laR/Wq7fwpNKbC1Y8LtazN 49IwsIULjQIMxpwlY2dl9Zuh+R+AKeTgg8J28= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=F1oA3LJN/hb6mmD X6m2pVBLe9u8=; b=R9q0cGQxNNvPRNtmEDG9jPjIuu2LORvN9jLOqQLSmjY1KiS NtbnZTj4J47FLNZIhFzCXIq62Zr+uRh3nx6UcepZGh4ILet9obRiCkjHvaMVNNpK RM7KLsgXh0BwsJjjlVE1xc8hBq56GezV9owiKdBZnFntDMc6ngTxEvohbLeo= X-Sasl-enc: eP9aqPI8RqJINX5ATJeuIpQR9F+NzNAVtsivVgG1hM4w 1433697147 Received: from [192.168.1.64] (unknown [94.194.112.63]) by mail.messagingengine.com (Postfix) with ESMTPA id 2E378C00023; Sun, 7 Jun 2015 13:12:27 -0400 (EDT) Message-ID: <55747B7A.9070205@fastmail.net> Date: Sun, 07 Jun 2015 18:12:26 +0100 From: Bruce Simpson User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Garrett Cooper , Marcelo Araujo CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r284116 - head/sys/boot/ficl References: <201506071420.t57EKnio083109@svn.freebsd.org> <5F622B98-A1AE-41FB-8E4A-E767DB928689@gmail.com> In-Reply-To: <5F622B98-A1AE-41FB-8E4A-E767DB928689@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 17:12:35 -0000 On 07/06/2015 18:06, Garrett Cooper wrote: > This commit's explicitly polluting the ficl interpreter with code from x86 on all platforms. +1 From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 18:59:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54FC77A2; Sun, 7 Jun 2015 18:59:48 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 292491621; Sun, 7 Jun 2015 18:59:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57IxmTM036075; Sun, 7 Jun 2015 18:59:48 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57Ixm6T036074; Sun, 7 Jun 2015 18:59:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201506071859.t57Ixm6T036074@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 7 Jun 2015 18:59:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284127 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 18:59:48 -0000 Author: markj Date: Sun Jun 7 18:59:47 2015 New Revision: 284127 URL: https://svnweb.freebsd.org/changeset/base/284127 Log: witness: don't warn about matrix inconsistencies without holding the mutex Lock order checking is done without the witness mutex held, so multiple threads that are racing to establish a new lock order may read matrix entries that are in an inconsistent state. Don't print a warning in this case, but instead just redo the check after taking the witness lock. Differential Revision: https://reviews.freebsd.org/D2713 Reviewed by: jhb MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Sun Jun 7 15:54:57 2015 (r284126) +++ head/sys/kern/subr_witness.c Sun Jun 7 18:59:47 2015 (r284127) @@ -1170,19 +1170,25 @@ witness_checkorder(struct lock_object *l /* * Try to perform most checks without a lock. If this succeeds we - * can skip acquiring the lock and return success. + * can skip acquiring the lock and return success. Otherwise we redo + * the check with the lock held to handle races with concurrent updates. */ w1 = plock->li_lock->lo_witness; if (witness_lock_order_check(w1, w)) return; + mtx_lock_spin(&w_mtx); + if (witness_lock_order_check(w1, w)) { + mtx_unlock_spin(&w_mtx); + return; + } + witness_lock_order_add(w1, w); + /* * Check for duplicate locks of the same type. Note that we only * have to check for this on the last lock we just acquired. Any * other cases will be caught as lock order violations. */ - mtx_lock_spin(&w_mtx); - witness_lock_order_add(w1, w); if (w1 == w) { i = w->w_index; if (!(lock->lo_flags & LO_DUPOK) && !(flags & LOP_DUPOK) && @@ -1996,7 +2002,10 @@ _isitmyx(struct witness *w1, struct witn /* The flags on one better be the inverse of the flags on the other */ if (!((WITNESS_ATOD(r1) == r2 && WITNESS_DTOA(r2) == r1) || - (WITNESS_DTOA(r1) == r2 && WITNESS_ATOD(r2) == r1))) { + (WITNESS_DTOA(r1) == r2 && WITNESS_ATOD(r2) == r1))) { + /* Don't squawk if we're potentially racing with an update. */ + if (!mtx_owned(&w_mtx)) + return (0); printf("%s: rmatrix mismatch between %s (index %d) and %s " "(index %d): w_rmatrix[%d][%d] == %hhx but " "w_rmatrix[%d][%d] == %hhx\n", From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 19:03:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55346A21; Sun, 7 Jun 2015 19:03:43 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 422B41830; Sun, 7 Jun 2015 19:03:43 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57J3h6K040324; Sun, 7 Jun 2015 19:03:43 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57J3gsr040316; Sun, 7 Jun 2015 19:03:42 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071903.t57J3gsr040316@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 19:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284128 - in head/usr.sbin/pw: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 19:03:43 -0000 Author: bapt Date: Sun Jun 7 19:03:41 2015 New Revision: 284128 URL: https://svnweb.freebsd.org/changeset/base/284128 Log: Refactor input validation Mutualize code to validate inputs of both 'user' and 'group' command Test that the input name fits into MAXLOGNAME Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw.h head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/tests/pw_useradd.sh Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun Jun 7 18:59:47 2015 (r284127) +++ head/usr.sbin/pw/pw.c Sun Jun 7 19:03:41 2015 (r284128) @@ -99,9 +99,11 @@ main(int argc, char *argv[]) int ch; int mode = -1; int which = -1; + long id = -1; char *config = NULL; struct stat st; - char arg; + const char *errstr; + char arg, *name; bool relocated, nis; static const char *opts[W_NUM][M_NUM] = @@ -124,12 +126,14 @@ main(int argc, char *argv[]) } }; - static int (*funcs[W_NUM]) (int _mode, struct cargs * _args) = + static int (*funcs[W_NUM]) (int _mode, char *_name, long _id, + struct cargs * _args) = { /* Request handlers */ pw_user, pw_group }; + name = NULL; relocated = nis = false; memset(&conf, 0, sizeof(conf)); strlcpy(conf.etcpath, _PATH_PWD, sizeof(conf.etcpath)); @@ -190,9 +194,15 @@ main(int argc, char *argv[]) mode = tmp % M_NUM; } else if (strcmp(argv[1], "help") == 0 && argv[2] == NULL) cmdhelp(mode, which); - else if (which != -1 && mode != -1) - addarg(&arglist, 'n', argv[1]); - else + else if (which != -1 && mode != -1) { + if (strspn(argv[1], "0123456789") == strlen(argv[1])) { + id = strtonum(argv[1], 0, LONG_MAX, &errstr); + if (errstr != NULL) + errx(EX_USAGE, "Bad id '%s': %s", + argv[1], errstr); + } else + name = argv[1]; + } else errx(EX_USAGE, "unknown keyword `%s'", argv[1]); ++argv; --argc; @@ -230,6 +240,30 @@ main(int argc, char *argv[]) case 'Y': nis = true; break; + case 'g': + if (which == 0) { /* for user* */ + addarg(&arglist, 'g', optarg); + break; + } + /* FALLTHROUGH */ + case 'u': + if (strspn(optarg, "0123456789") != strlen(optarg)) + errx(EX_USAGE, "%s expects a number", + which == 1 ? "-g" : "-u" ); + id = strtonum(optarg, 0, LONG_MAX, &errstr); + if (errstr != NULL) + errx(EX_USAGE, "Bad id '%s': %s", optarg, + errstr); + break; + case 'n': + if (strspn(optarg, "0123456789") != strlen(optarg)) { + name = optarg; + break; + } + id = strtonum(optarg, 0, LONG_MAX, &errstr); + if (errstr != NULL) + errx(EX_USAGE, "Bad id '%s': %s", optarg, + errstr); default: addarg(&arglist, ch, optarg); break; @@ -237,6 +271,9 @@ main(int argc, char *argv[]) optarg = NULL; } + if (name != NULL && strlen(name) >= MAXLOGNAME) + errx(EX_USAGE, "name too long: %s", name); + /* * Must be root to attempt an update */ @@ -265,7 +302,7 @@ main(int argc, char *argv[]) */ conf.userconf = read_userconfig(config); - ch = funcs[which] (mode, &arglist); + ch = funcs[which] (mode, name, id, &arglist); /* * If everything went ok, and we've been asked to update Modified: head/usr.sbin/pw/pw.h ============================================================================== --- head/usr.sbin/pw/pw.h Sun Jun 7 18:59:47 2015 (r284127) +++ head/usr.sbin/pw/pw.h Sun Jun 7 19:03:41 2015 (r284128) @@ -82,8 +82,8 @@ int write_userconfig(char const * file); struct carg *addarg(struct cargs * _args, int ch, char *argstr); struct carg *getarg(struct cargs * _args, int ch); -int pw_user(int mode, struct cargs * _args); -int pw_group(int mode, struct cargs * _args); +int pw_user(int mode, char *name, long id, struct cargs * _args); +int pw_group(int mode, char *name, long id, struct cargs * _args); char *pw_checkname(char *name, int gecos); int addnispwent(const char *path, struct passwd *pwd); Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sun Jun 7 18:59:47 2015 (r284127) +++ head/usr.sbin/pw/pw_group.c Sun Jun 7 19:03:41 2015 (r284128) @@ -48,12 +48,10 @@ static int print_group(struct group * gr static gid_t gr_gidpolicy(struct userconf * cnf, struct cargs * args); int -pw_group(int mode, struct cargs * args) +pw_group(int mode, char *name, long id, struct cargs * args) { int rc; struct carg *a_newname = getarg(args, 'l'); - struct carg *a_name = getarg(args, 'n'); - struct carg *a_gid = getarg(args, 'g'); struct carg *arg; struct group *grp = NULL; int grmembers = 0; @@ -68,11 +66,6 @@ pw_group(int mode, struct cargs * args) NULL }; - if (a_gid != NULL) { - if (strspn(a_gid->val, "0123456789") != strlen(a_gid->val)) - errx(EX_USAGE, "-g expects a number"); - } - if (mode == M_LOCK || mode == M_UNLOCK) errx(EX_USAGE, "'lock' command is not available for groups"); @@ -95,67 +88,63 @@ pw_group(int mode, struct cargs * args) ENDGRENT(); return EXIT_SUCCESS; } - if (a_gid == NULL) { - if (a_name == NULL) - errx(EX_DATAERR, "group name or id required"); - - if (mode != M_ADD && grp == NULL && isdigit((unsigned char)*a_name->val)) { - (a_gid = a_name)->ch = 'g'; - a_name = NULL; - } - } - grp = (a_name != NULL) ? GETGRNAM(a_name->val) : GETGRGID((gid_t) atoi(a_gid->val)); + if (id < 0 && name == NULL) + errx(EX_DATAERR, "group name or id required"); + + grp = (name != NULL) ? GETGRNAM(name) : GETGRGID(id); if (mode == M_UPDATE || mode == M_DELETE || mode == M_PRINT) { - if (a_name == NULL && grp == NULL) /* Try harder */ - grp = GETGRGID(atoi(a_gid->val)); + if (name == NULL && grp == NULL) /* Try harder */ + grp = GETGRGID(id); if (grp == NULL) { if (mode == M_PRINT && getarg(args, 'F')) { char *fmems[1]; fmems[0] = NULL; - fakegroup.gr_name = a_name ? a_name->val : "nogroup"; - fakegroup.gr_gid = a_gid ? (gid_t) atol(a_gid->val) : (gid_t)-1; + fakegroup.gr_name = name ? name : "nogroup"; + fakegroup.gr_gid = (gid_t) id; fakegroup.gr_mem = fmems; return print_group(&fakegroup); } - errx(EX_DATAERR, "unknown group `%s'", a_name ? a_name->val : a_gid->val); + if (name == NULL) + errx(EX_DATAERR, "unknown group `%s'", name); + else + errx(EX_DATAERR, "unknown group `%ld'", id); } - if (a_name == NULL) /* Needed later */ - a_name = addarg(args, 'n', grp->gr_name); + if (name == NULL) /* Needed later */ + name = grp->gr_name; /* * Handle deletions now */ if (mode == M_DELETE) { - gid_t gid = grp->gr_gid; - rc = delgrent(grp); if (rc == -1) - err(EX_IOERR, "group '%s' not available (NIS?)", grp->gr_name); + err(EX_IOERR, "group '%s' not available (NIS?)", + name); else if (rc != 0) { err(EX_IOERR, "group update"); } - pw_log(cnf, mode, W_GROUP, "%s(%u) removed", a_name->val, gid); + pw_log(cnf, mode, W_GROUP, "%s(%ld) removed", name, id); return EXIT_SUCCESS; } else if (mode == M_PRINT) return print_group(grp); - if (a_gid) - grp->gr_gid = (gid_t) atoi(a_gid->val); + if (id > 0) + grp->gr_gid = (gid_t) id; if (a_newname != NULL) grp->gr_name = pw_checkname(a_newname->val, 0); } else { - if (a_name == NULL) /* Required */ + if (name == NULL) /* Required */ errx(EX_DATAERR, "group name required"); else if (grp != NULL) /* Exists */ - errx(EX_DATAERR, "group name `%s' already exists", a_name->val); + errx(EX_DATAERR, "group name `%s' already exists", name); extendarray(&members, &grmembers, 200); members[0] = NULL; grp = &fakegroup; - grp->gr_name = pw_checkname(a_name->val, 0); + grp->gr_name = pw_checkname(name, 0); grp->gr_passwd = "*"; grp->gr_gid = gr_gidpolicy(cnf, args); grp->gr_mem = members; @@ -265,7 +254,7 @@ pw_group(int mode, struct cargs * args) grp->gr_name); else err(EX_IOERR, "group update"); - } else if (mode == M_UPDATE && (rc = chggrent(a_name->val, grp)) != 0) { + } else if (mode == M_UPDATE && (rc = chggrent(name, grp)) != 0) { if (rc == -1) errx(EX_IOERR, "group '%s' not available (NIS?)", grp->gr_name); @@ -273,9 +262,10 @@ pw_group(int mode, struct cargs * args) err(EX_IOERR, "group update"); } - arg = a_newname != NULL ? a_newname : a_name; + if (a_newname != NULL) + name = a_newname->val; /* grp may have been invalidated */ - if ((grp = GETGRNAM(arg->val)) == NULL) + if ((grp = GETGRNAM(name)) == NULL) errx(EX_SOFTWARE, "group disappeared during update"); pw_log(cnf, mode, W_GROUP, "%s(%u)", grp->gr_name, grp->gr_gid); Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 18:59:47 2015 (r284127) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 19:03:41 2015 (r284128) @@ -52,7 +52,7 @@ static const char rcsid[] = static char locked_str[] = "*LOCKED*"; static int delete_user(struct userconf *cnf, struct passwd *pwd, - struct carg *a_name, int delete, int mode); + char *name, int delete, int mode); static int print_user(struct passwd * pwd); static uid_t pw_uidpolicy(struct userconf * cnf, struct cargs * args); static uid_t pw_gidpolicy(struct cargs * args, char *nam, gid_t prefer); @@ -119,13 +119,11 @@ create_and_populate_homedir(int mode, st */ int -pw_user(int mode, struct cargs * args) +pw_user(int mode, char *name, long id, struct cargs * args) { int rc, edited = 0; char *p = NULL; char *passtmp; - struct carg *a_name; - struct carg *a_uid; struct carg *arg; struct passwd *pwd = NULL; struct group *grp; @@ -166,7 +164,7 @@ pw_user(int mode, struct cargs * args) if (getarg(args, 'q')) return next; printf("%u:", next); - pw_group(mode, args); + pw_group(mode, name, -1, args); return EXIT_SUCCESS; } @@ -323,29 +321,11 @@ pw_user(int mode, struct cargs * args) return EXIT_SUCCESS; } - if ((a_name = getarg(args, 'n')) != NULL) - pwd = GETPWNAM(pw_checkname(a_name->val, 0)); - a_uid = getarg(args, 'u'); - - if (a_uid == NULL) { - if (a_name == NULL) - errx(EX_DATAERR, "user name or id required"); + if (name != NULL) + pwd = GETPWNAM(pw_checkname(name, 0)); - /* - * Determine whether 'n' switch is name or uid - we don't - * really don't really care which we have, but we need to - * know. - */ - if (mode != M_ADD && pwd == NULL - && strspn(a_name->val, "0123456789") == strlen(a_name->val) - && *a_name->val) { - (a_uid = a_name)->ch = 'u'; - a_name = NULL; - } - } else { - if (strspn(a_uid->val, "0123456789") != strlen(a_uid->val)) - errx(EX_USAGE, "-u expects a number"); - } + if (id < 0 && name == NULL) + errx(EX_DATAERR, "user name or id required"); /* * Update, delete & print require that the user exists @@ -353,22 +333,22 @@ pw_user(int mode, struct cargs * args) if (mode == M_UPDATE || mode == M_DELETE || mode == M_PRINT || mode == M_LOCK || mode == M_UNLOCK) { - if (a_name == NULL && pwd == NULL) /* Try harder */ - pwd = GETPWUID(atoi(a_uid->val)); + if (name == NULL && pwd == NULL) /* Try harder */ + pwd = GETPWUID(id); if (pwd == NULL) { if (mode == M_PRINT && getarg(args, 'F')) { - fakeuser.pw_name = a_name ? a_name->val : "nouser"; - fakeuser.pw_uid = a_uid ? (uid_t) atol(a_uid->val) : (uid_t) -1; + fakeuser.pw_name = name ? name : "nouser"; + fakeuser.pw_uid = (uid_t) id; return print_user(&fakeuser); } - if (a_name == NULL) - errx(EX_NOUSER, "no such uid `%s'", a_uid->val); - errx(EX_NOUSER, "no such user `%s'", a_name->val); + if (name == NULL) + errx(EX_NOUSER, "no such uid `%ld'", id); + errx(EX_NOUSER, "no such user `%s'", name); } - if (a_name == NULL) /* May be needed later */ - a_name = addarg(args, 'n', newstr(pwd->pw_name)); + if (name == NULL) + name = pwd->pw_name; /* * The M_LOCK and M_UNLOCK functions simply add or remove @@ -394,7 +374,7 @@ pw_user(int mode, struct cargs * args) pwd->pw_passwd += sizeof(locked_str)-1; edited = 1; } else if (mode == M_DELETE) - return (delete_user(cnf, pwd, a_name, + return (delete_user(cnf, pwd, name, getarg(args, 'r') != NULL, mode)); else if (mode == M_PRINT) return print_user(pwd); @@ -511,16 +491,16 @@ pw_user(int mode, struct cargs * args) * Add code */ - if (a_name == NULL) /* Required */ + if (name == NULL) /* Required */ errx(EX_DATAERR, "login name required"); - else if ((pwd = GETPWNAM(a_name->val)) != NULL) /* Exists */ - errx(EX_DATAERR, "login name `%s' already exists", a_name->val); + else if ((pwd = GETPWNAM(name)) != NULL) /* Exists */ + errx(EX_DATAERR, "login name `%s' already exists", name); /* * Now, set up defaults for a new user */ pwd = &fakeuser; - pwd->pw_name = a_name->val; + pwd->pw_name = name; pwd->pw_class = cnf->default_class ? cnf->default_class : ""; pwd->pw_uid = pw_uidpolicy(cnf, args); pwd->pw_gid = pw_gidpolicy(args, pwd->pw_name, (gid_t) pwd->pw_uid); @@ -635,13 +615,13 @@ pw_user(int mode, struct cargs * args) } } else if (mode == M_UPDATE || mode == M_LOCK || mode == M_UNLOCK) { if (edited) { /* Only updated this if required */ - rc = chgpwent(a_name->val, pwd); + rc = chgpwent(name, pwd); if (rc == -1) errx(EX_IOERR, "user '%s' does not exist (NIS?)", pwd->pw_name); else if (rc != 0) err(EX_IOERR, "passwd file update"); if ( cnf->nispasswd && *cnf->nispasswd=='/') { - rc = chgnispwent(cnf->nispasswd, a_name->val, pwd); + rc = chgnispwent(cnf->nispasswd, name, pwd); if (rc == -1) warn("User '%s' not found in NIS passwd", pwd->pw_name); else @@ -693,16 +673,16 @@ pw_user(int mode, struct cargs * args) /* go get a current version of pwd */ - pwd = GETPWNAM(a_name->val); + pwd = GETPWNAM(name); if (pwd == NULL) { /* This will fail when we rename, so special case that */ if (mode == M_UPDATE && (arg = getarg(args, 'l')) != NULL) { - a_name->val = arg->val; /* update new name */ - pwd = GETPWNAM(a_name->val); /* refetch renamed rec */ + name = arg->val; /* update new name */ + pwd = GETPWNAM(name); /* refetch renamed rec */ } } if (pwd == NULL) /* can't go on without this */ - errx(EX_NOUSER, "user '%s' disappeared during update", a_name->val); + errx(EX_NOUSER, "user '%s' disappeared during update", name); grp = GETGRGID(pwd->pw_gid); pw_log(cnf, mode, W_USER, "%s(%u):%s(%u):%s:%s:%s", @@ -849,7 +829,6 @@ pw_gidpolicy(struct cargs * args, char * char tmp[32]; LIST_INIT(&grpargs); - addarg(&grpargs, 'n', nam); /* * We need to auto-create a group with the user's name. We @@ -866,11 +845,11 @@ pw_gidpolicy(struct cargs * args, char * } if (conf.dryrun) { addarg(&grpargs, 'q', NULL); - gid = pw_group(M_NEXT, &grpargs); + gid = pw_group(M_NEXT, nam, -1, &grpargs); } else { - pw_group(M_ADD, &grpargs); + pw_group(M_ADD, nam, -1, &grpargs); if ((grp = GETGRNAM(nam)) != NULL) gid = grp->gr_gid; } @@ -1048,7 +1027,7 @@ pw_password(struct userconf * cnf, struc } static int -delete_user(struct userconf *cnf, struct passwd *pwd, struct carg *a_name, +delete_user(struct userconf *cnf, struct passwd *pwd, char *name, int delete, int mode) { char file[MAXPATHLEN]; @@ -1097,7 +1076,7 @@ delete_user(struct userconf *cnf, struct err(EX_IOERR, "passwd update"); if (cnf->nispasswd && *cnf->nispasswd=='/') { - rc = delnispwent(cnf->nispasswd, a_name->val); + rc = delnispwent(cnf->nispasswd, name); if (rc == -1) warnx("WARNING: user '%s' does not exist in NIS passwd", pwd->pw_name); else if (rc != 0) @@ -1105,11 +1084,11 @@ delete_user(struct userconf *cnf, struct /* non-fatal */ } - grp = GETGRNAM(a_name->val); + grp = GETGRNAM(name); if (grp != NULL && (grp->gr_mem == NULL || *grp->gr_mem == NULL) && - strcmp(a_name->val, grname) == 0) - delgrent(GETGRNAM(a_name->val)); + strcmp(name, grname) == 0) + delgrent(GETGRNAM(name)); SETGRENT(); while ((grp = GETGRENT()) != NULL) { int i, j; @@ -1118,7 +1097,7 @@ delete_user(struct userconf *cnf, struct continue; for (i = 0; grp->gr_mem[i] != NULL; i++) { - if (strcmp(grp->gr_mem[i], a_name->val) != 0) + if (strcmp(grp->gr_mem[i], name) != 0) continue; for (j = i; grp->gr_mem[j] != NULL; j++) @@ -1129,7 +1108,7 @@ delete_user(struct userconf *cnf, struct } ENDGRENT(); - pw_log(cnf, mode, W_USER, "%s(%u) account removed", a_name->val, uid); + pw_log(cnf, mode, W_USER, "%s(%u) account removed", name, uid); if (!PWALTDIR()) { /* @@ -1150,7 +1129,7 @@ delete_user(struct userconf *cnf, struct stat(home, &st) != -1) { rm_r(home, uid); pw_log(cnf, mode, W_USER, "%s(%u) home '%s' %sremoved", - a_name->val, uid, home, + name, uid, home, stat(home, &st) == -1 ? "" : "not completely "); } } Modified: head/usr.sbin/pw/tests/pw_useradd.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_useradd.sh Sun Jun 7 18:59:47 2015 (r284127) +++ head/usr.sbin/pw/tests/pw_useradd.sh Sun Jun 7 19:03:41 2015 (r284128) @@ -169,12 +169,19 @@ user_add_password_expiration_date_relati atf_fail "Expiration time($TIME) was not within $EPOCH - $BUF seconds." } +atf_test_case user_add_name_too_long +user_add_name_too_long_body() { + populate_etc_skel + atf_check -e match:"too long" -s exit:64 \ + ${PW} useradd name_very_vert_very_very_very_long +} + atf_init_test_cases() { atf_add_test_case user_add atf_add_test_case user_add_noupdate atf_add_test_case user_add_comments atf_add_test_case user_add_comments_noupdate - atf_add_test_case user_add_comments_invalid + atf_add_test_case user_add_comments_invalid atf_add_test_case user_add_comments_invalid_noupdate atf_add_test_case user_add_homedir atf_add_test_case user_add_account_expiration_epoch @@ -185,4 +192,5 @@ atf_init_test_cases() { atf_add_test_case user_add_password_expiration_date_numeric atf_add_test_case user_add_password_expiration_date_month atf_add_test_case user_add_password_expiration_date_relative + atf_add_test_case user_add_name_too_long } From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 19:33:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73B13D0E; Sun, 7 Jun 2015 19:33:27 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54DDE1EB4; Sun, 7 Jun 2015 19:33:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57JXR0r054859; Sun, 7 Jun 2015 19:33:27 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57JXPvl054850; Sun, 7 Jun 2015 19:33:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071933.t57JXPvl054850@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 19:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284129 - in head/usr.sbin/pw: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 19:33:27 -0000 Author: bapt Date: Sun Jun 7 19:33:25 2015 New Revision: 284129 URL: https://svnweb.freebsd.org/changeset/base/284129 Log: In case of rename validate the length of the new name Check early that the new name fits MAXLOGNAME and store it in pwconf Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/pwupd.h head/usr.sbin/pw/tests/pw_groupmod.sh head/usr.sbin/pw/tests/pw_usermod.sh Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun Jun 7 19:03:41 2015 (r284128) +++ head/usr.sbin/pw/pw.c Sun Jun 7 19:33:25 2015 (r284129) @@ -234,6 +234,11 @@ main(int argc, char *argv[]) case 'N': conf.dryrun = true; break; + case 'l': + if (strlen(optarg) >= MAXLOGNAME) + errx(EX_USAGE, "new name too long: %s", optarg); + conf.newname = optarg; + break; case 'P': conf.pretty = true; break; Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sun Jun 7 19:03:41 2015 (r284128) +++ head/usr.sbin/pw/pw_group.c Sun Jun 7 19:33:25 2015 (r284129) @@ -51,7 +51,6 @@ int pw_group(int mode, char *name, long id, struct cargs * args) { int rc; - struct carg *a_newname = getarg(args, 'l'); struct carg *arg; struct group *grp = NULL; int grmembers = 0; @@ -133,8 +132,8 @@ pw_group(int mode, char *name, long id, if (id > 0) grp->gr_gid = (gid_t) id; - if (a_newname != NULL) - grp->gr_name = pw_checkname(a_newname->val, 0); + if (conf.newname != NULL) + grp->gr_name = pw_checkname(conf.newname, 0); } else { if (name == NULL) /* Required */ errx(EX_DATAERR, "group name required"); @@ -262,8 +261,8 @@ pw_group(int mode, char *name, long id, err(EX_IOERR, "group update"); } - if (a_newname != NULL) - name = a_newname->val; + if (conf.newname != NULL) + name = conf.newname; /* grp may have been invalidated */ if ((grp = GETGRNAM(name)) == NULL) errx(EX_SOFTWARE, "group disappeared during update"); Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 19:03:41 2015 (r284128) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 19:33:25 2015 (r284129) @@ -382,10 +382,10 @@ pw_user(int mode, char *name, long id, s /* * The rest is edit code */ - if ((arg = getarg(args, 'l')) != NULL) { + if (conf.newname != NULL) { if (strcmp(pwd->pw_name, "root") == 0) errx(EX_DATAERR, "can't rename `root' account"); - pwd->pw_name = pw_checkname(arg->val, 0); + pwd->pw_name = pw_checkname(conf.newname, 0); edited = 1; } @@ -676,8 +676,8 @@ pw_user(int mode, char *name, long id, s pwd = GETPWNAM(name); if (pwd == NULL) { /* This will fail when we rename, so special case that */ - if (mode == M_UPDATE && (arg = getarg(args, 'l')) != NULL) { - name = arg->val; /* update new name */ + if (mode == M_UPDATE && conf.newname != NULL) { + name = conf.newname; /* update new name */ pwd = GETPWNAM(name); /* refetch renamed rec */ } } Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sun Jun 7 19:03:41 2015 (r284128) +++ head/usr.sbin/pw/pwupd.h Sun Jun 7 19:33:25 2015 (r284129) @@ -83,6 +83,7 @@ struct userconf { struct pwconf { char rootdir[MAXPATHLEN]; char etcpath[MAXPATHLEN]; + char *newname; bool dryrun; bool pretty; bool v7; Modified: head/usr.sbin/pw/tests/pw_groupmod.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_groupmod.sh Sun Jun 7 19:03:41 2015 (r284128) +++ head/usr.sbin/pw/tests/pw_groupmod.sh Sun Jun 7 19:33:25 2015 (r284129) @@ -71,10 +71,21 @@ do_not_duplicate_group_on_gid_change_bod atf_check -o inline:"testgroup:*:12345:\n" -s exit:0 -x grep "^testgroup" ${HOME}/group } +atf_test_case groupmod_rename +groupmod_rename_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} groupadd foo + atf_check -s exit:0 ${PW} groupmod foo -l bar + atf_check -s exit:0 -o match:"^bar:.*" \ + grep "^bar:.*" ${HOME}/group +} + atf_init_test_cases() { atf_add_test_case groupmod_user atf_add_test_case groupmod_invalid_user atf_add_test_case groupmod_bug_193704 atf_add_test_case usermod_bug_185666 atf_add_test_case do_not_duplicate_group_on_gid_change + atf_add_test_case groupmod_rename } Modified: head/usr.sbin/pw/tests/pw_usermod.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_usermod.sh Sun Jun 7 19:03:41 2015 (r284128) +++ head/usr.sbin/pw/tests/pw_usermod.sh Sun Jun 7 19:33:25 2015 (r284129) @@ -100,13 +100,34 @@ user_mod_name_noupdate_body() { grep "^foo:.*" $HOME/master.passwd } +atf_test_case user_mod_rename +user_mod_rename_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd foo + atf_check -s exit:0 ${PW} usermod foo -l bar + atf_check -s exit:0 -o match:"^bar:.*" \ + grep "^bar:.*" ${HOME}/master.passwd +} + +atf_test_case user_mod_rename_too_long +user_mod_rename_too_long_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd foo + atf_check -s exit:64 -e match:"too long" ${PW} usermod foo \ + -l name_very_very_very_very_very_long +} + atf_init_test_cases() { atf_add_test_case user_mod atf_add_test_case user_mod_noupdate atf_add_test_case user_mod_comments atf_add_test_case user_mod_comments_noupdate - atf_add_test_case user_mod_comments_invalid - atf_add_test_case user_mod_comments_invalid_noupdate - atf_add_test_case user_mod_name + atf_add_test_case user_mod_comments_invalid + atf_add_test_case user_mod_comments_invalid_noupdate + atf_add_test_case user_mod_rename atf_add_test_case user_mod_name_noupdate + atf_add_test_case user_mod_rename + atf_add_test_case user_mod_rename_too_long } From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 19:39:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3272ED8; Sun, 7 Jun 2015 19:39:06 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C19841EF8; Sun, 7 Jun 2015 19:39:06 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57Jd6WG055603; Sun, 7 Jun 2015 19:39:06 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57Jd6FT055602; Sun, 7 Jun 2015 19:39:06 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071939.t57Jd6FT055602@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 19:39:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284130 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 19:39:06 -0000 Author: bapt Date: Sun Jun 7 19:39:06 2015 New Revision: 284130 URL: https://svnweb.freebsd.org/changeset/base/284130 Log: Remove uneeded code (already done by pw_make_v7) Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 19:33:25 2015 (r284129) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 19:39:06 2015 (r284130) @@ -1143,9 +1143,6 @@ print_user(struct passwd * pwd) if (!conf.pretty) { char *buf; - if (!conf.v7) - pwd->pw_passwd = (pwd->pw_passwd == NULL) ? "" : "*"; - buf = conf.v7 ? pw_make_v7(pwd) : pw_make(pwd); printf("%s\n", buf); free(buf); From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 19:59:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB9206CC; Sun, 7 Jun 2015 19:59:02 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CC3513C4; Sun, 7 Jun 2015 19:59:02 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57Jx2RI066011; Sun, 7 Jun 2015 19:59:02 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57Jx1ut066003; Sun, 7 Jun 2015 19:59:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506071959.t57Jx1ut066003@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 19:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284133 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 19:59:02 -0000 Author: bapt Date: Sun Jun 7 19:59:01 2015 New Revision: 284133 URL: https://svnweb.freebsd.org/changeset/base/284133 Log: Fix duplicate checking Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/pwupd.h Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun Jun 7 19:48:21 2015 (r284132) +++ head/usr.sbin/pw/pw.c Sun Jun 7 19:59:01 2015 (r284133) @@ -269,6 +269,10 @@ main(int argc, char *argv[]) if (errstr != NULL) errx(EX_USAGE, "Bad id '%s': %s", optarg, errstr); + break; + case 'o': + conf.checkduplicate = true; + break; default: addarg(&arglist, ch, optarg); break; Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sun Jun 7 19:48:21 2015 (r284132) +++ head/usr.sbin/pw/pw_group.c Sun Jun 7 19:59:01 2015 (r284133) @@ -45,7 +45,7 @@ static struct passwd *lookup_pwent(const static void delete_members(char ***members, int *grmembers, int *i, struct carg *arg, struct group *grp); static int print_group(struct group * grp); -static gid_t gr_gidpolicy(struct userconf * cnf, struct cargs * args); +static gid_t gr_gidpolicy(struct userconf * cnf, long id); int pw_group(int mode, char *name, long id, struct cargs * args) @@ -73,7 +73,7 @@ pw_group(int mode, char *name, long id, * next gid to stdout */ if (mode == M_NEXT) { - gid_t next = gr_gidpolicy(cnf, args); + gid_t next = gr_gidpolicy(cnf, id); if (getarg(args, 'q')) return next; printf("%u\n", next); @@ -145,7 +145,7 @@ pw_group(int mode, char *name, long id, grp = &fakegroup; grp->gr_name = pw_checkname(name, 0); grp->gr_passwd = "*"; - grp->gr_gid = gr_gidpolicy(cnf, args); + grp->gr_gid = gr_gidpolicy(cnf, id); grp->gr_mem = members; } @@ -336,19 +336,18 @@ delete_members(char ***members, int *grm static gid_t -gr_gidpolicy(struct userconf * cnf, struct cargs * args) +gr_gidpolicy(struct userconf * cnf, long id) { struct group *grp; gid_t gid = (gid_t) - 1; - struct carg *a_gid = getarg(args, 'g'); /* * Check the given gid, if any */ - if (a_gid != NULL) { - gid = (gid_t) atol(a_gid->val); + if (id > 0) { + gid = (gid_t) id; - if ((grp = GETGRGID(gid)) != NULL && getarg(args, 'o') == NULL) + if ((grp = GETGRGID(gid)) != NULL && conf.checkduplicate) errx(EX_DATAERR, "gid `%u' has already been allocated", grp->gr_gid); } else { struct bitmap bm; Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 19:48:21 2015 (r284132) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 19:59:01 2015 (r284133) @@ -54,7 +54,7 @@ static char locked_str[] = "*LOCKED*"; static int delete_user(struct userconf *cnf, struct passwd *pwd, char *name, int delete, int mode); static int print_user(struct passwd * pwd); -static uid_t pw_uidpolicy(struct userconf * cnf, struct cargs * args); +static uid_t pw_uidpolicy(struct userconf * cnf, long id); static uid_t pw_gidpolicy(struct cargs * args, char *nam, gid_t prefer); static time_t pw_pwdpolicy(struct userconf * cnf, struct cargs * args); static time_t pw_exppolicy(struct userconf * cnf, struct cargs * args); @@ -160,7 +160,7 @@ pw_user(int mode, char *name, long id, s */ if (mode == M_NEXT) { - uid_t next = pw_uidpolicy(cnf, args); + uid_t next = pw_uidpolicy(cnf, id); if (getarg(args, 'q')) return next; printf("%u:", next); @@ -389,8 +389,8 @@ pw_user(int mode, char *name, long id, s edited = 1; } - if ((arg = getarg(args, 'u')) != NULL && isdigit((unsigned char)*arg->val)) { - pwd->pw_uid = (uid_t) atol(arg->val); + if (id > 0 && isdigit((unsigned char)*arg->val)) { + pwd->pw_uid = (uid_t)id; edited = 1; if (pwd->pw_uid != 0 && strcmp(pwd->pw_name, "root") == 0) errx(EX_DATAERR, "can't change uid of `root' account"); @@ -502,7 +502,7 @@ pw_user(int mode, char *name, long id, s pwd = &fakeuser; pwd->pw_name = name; pwd->pw_class = cnf->default_class ? cnf->default_class : ""; - pwd->pw_uid = pw_uidpolicy(cnf, args); + pwd->pw_uid = pw_uidpolicy(cnf, id); pwd->pw_gid = pw_gidpolicy(args, pwd->pw_name, (gid_t) pwd->pw_uid); pwd->pw_change = pw_pwdpolicy(cnf, args); pwd->pw_expire = pw_exppolicy(cnf, args); @@ -741,19 +741,18 @@ pw_user(int mode, char *name, long id, s static uid_t -pw_uidpolicy(struct userconf * cnf, struct cargs * args) +pw_uidpolicy(struct userconf * cnf, long id) { struct passwd *pwd; uid_t uid = (uid_t) - 1; - struct carg *a_uid = getarg(args, 'u'); /* * Check the given uid, if any */ - if (a_uid != NULL) { - uid = (uid_t) atol(a_uid->val); + if (id > 0) { + uid = (uid_t) id; - if ((pwd = GETPWUID(uid)) != NULL && getarg(args, 'o') == NULL) + if ((pwd = GETPWUID(uid)) != NULL && conf.checkduplicate) errx(EX_DATAERR, "uid `%u' has already been allocated", pwd->pw_uid); } else { struct bitmap bm; Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sun Jun 7 19:48:21 2015 (r284132) +++ head/usr.sbin/pw/pwupd.h Sun Jun 7 19:59:01 2015 (r284133) @@ -87,6 +87,7 @@ struct pwconf { bool dryrun; bool pretty; bool v7; + bool checkduplicate; struct userconf *userconf; }; From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 20:06:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE7AA9B4 for ; Sun, 7 Jun 2015 20:06:21 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm18-vm0.bullet.mail.bf1.yahoo.com (nm18-vm0.bullet.mail.bf1.yahoo.com [98.139.213.138]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D411166F for ; Sun, 7 Jun 2015 20:06:21 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1433707245; bh=Vj0KcGm4eTlu6xN7R1X7Xda20X7NaTaNjweS/zYx/5U=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=l29+ihJ4y367sQGeQQDz8FC6F+S28RS5lsDdiF+XENCqlJsgJNqTCUW8ecZOn7UZzY8+vQWePRgldlR0rVV+B2EXIsnQ42Yh8T8z+1xvwuYHGWvNIMHr0wx+6S1dscPYKB4wP9XilGi7l3ZXa/mmOKAbfcMEdHoNF20kqH3AnmzC/Y0o6eZ8ntMD0TBZHkt2L6XgFKcSNEyV8+Q2bMzFHmBrmOrSChrMziWvavtttSv1q17fHMCKGzuks/mPbOHXLv0kqjDHvZmmg83iz8mhAzypasEbryYbN3Y/ydB8tSri1cl35Vyz47IzIRKozinvIbccOycfni/MDri2F3T5gw== Received: from [66.196.81.171] by nm18.bullet.mail.bf1.yahoo.com with NNFMP; 07 Jun 2015 20:00:45 -0000 Received: from [68.142.230.75] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 07 Jun 2015 20:00:45 -0000 Received: from [127.0.0.1] by smtp232.mail.bf1.yahoo.com with NNFMP; 07 Jun 2015 20:00:45 -0000 X-Yahoo-Newman-Id: 606842.79970.bm@smtp232.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: hsnO4pAVM1nfCCeHSl3DS9ayEYwWf1ff_qdmrI9NCtI5gKv FC.n7.W6bMGAONuEELqQNzu7MSVdZdlnuh_tODQta01OcasaEPku5Ps5JHAB Wtf.SZ5PfchwSpLlTieJNazIRq7.YvZEIzbPZ4YVah2lYyJwEgd166nFzeig zjuS3tk6qboqOBe_kQSQxpFCpbviJiO4VWqPdcnZZaUA3e6oYVUeYdn9VTUN 76._XzKZHHKJWScCaBzsXl0OCaOVgBfCAFs4EcoQAGoB.bC6s3GGmmQMSctd Xww10RNloRixrhRvY.OxTm1m.vT66fRbC6CpujKhu6QvWzgLviw.qgy2sLJ6 gsH1vKJZ78LyXqnee5qmQTiM72sy_T6JJfxn2bLQCkmTC5sPNiYl8Ax8j4JH LZyxUXhTejkyhaLJflqkvAdtkiNR.XuThoFaVxXM9VtV_c2aFcejfoyR0coz eXTCHmGzo3O8VUaeA6LZc9zXWA3MiuoelrRrcnHV3unzgHOCRXQF7g1J2RsG 5Zr3v4esxE4l7f4aanJsRDFdtaBXV.GAZ X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <5574A2F9.8080404@FreeBSD.org> Date: Sun, 07 Jun 2015 15:00:57 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Marcelo Araujo CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r284116 - head/sys/boot/ficl References: <201506071420.t57EKnio083109@svn.freebsd.org> <5F622B98-A1AE-41FB-8E4A-E767DB928689@gmail.com> In-Reply-To: <5F622B98-A1AE-41FB-8E4A-E767DB928689@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 20:06:21 -0000 On 06/07/15 12:06, Garrett Cooper wrote: >> On Jun 7, 2015, at 07:20, Marcelo Araujo wrote: >> >> Author: araujo (ports committer) >> Date: Sun Jun 7 14:20:48 2015 >> New Revision: 284116 >> URL: https://svnweb.freebsd.org/changeset/base/284116 >> >> Log: >> Include header libi386.h to silence the clang warning of implicit declaration >> of functions biospci_*. >> >> Differential Revision: D2668 >> Reviewed by: rodrigc >> >> Modified: >> head/sys/boot/ficl/loader.c >> >> Modified: head/sys/boot/ficl/loader.c >> ============================================================================== >> --- head/sys/boot/ficl/loader.c Sun Jun 7 13:59:02 2015 (r284115) >> +++ head/sys/boot/ficl/loader.c Sun Jun 7 14:20:48 2015 (r284116) >> @@ -46,6 +46,7 @@ >> #include "bootstrap.h" >> #include >> #include "ficl.h" >> +#include "../i386/libi386/libi386.h" > Hi Marcelo, > > This commit's explicitly polluting the ficl interpreter with code from x86 on all platforms. Seems like the code should be refactored to not explicitly include this symbol, then #include this header there. That's the real bug.. +1 Let's revert and let the ficl GSoC take care of it. Pedro. From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 20:44:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1219C8; Sun, 7 Jun 2015 20:44:08 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFA421F6B; Sun, 7 Jun 2015 20:44:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57Ki8W5094317; Sun, 7 Jun 2015 20:44:08 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57Ki77L094309; Sun, 7 Jun 2015 20:44:07 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506072044.t57Ki77L094309@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 20:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284135 - in head/usr.sbin/pw: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 20:44:09 -0000 Author: bapt Date: Sun Jun 7 20:44:06 2015 New Revision: 284135 URL: https://svnweb.freebsd.org/changeset/base/284135 Log: Fix generating configuration file Added: head/usr.sbin/pw/tests/pw.conf (contents, props changed) head/usr.sbin/pw/tests/pw_config.sh (contents, props changed) Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/pwupd.h head/usr.sbin/pw/tests/Makefile Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun Jun 7 20:10:11 2015 (r284134) +++ head/usr.sbin/pw/pw.c Sun Jun 7 20:44:06 2015 (r284135) @@ -229,7 +229,8 @@ main(int argc, char *argv[]) conf.v7 = true; break; case 'C': - config = optarg; + conf.config = optarg; + config = conf.config; break; case 'N': conf.dryrun = true; Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 20:10:11 2015 (r284134) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 20:44:06 2015 (r284135) @@ -292,7 +292,7 @@ pw_user(int mode, char *name, long id, s if ((arg = getarg(args, 'w')) != NULL) cnf->default_password = boolean_val(arg->val, cnf->default_password); if (mode == M_ADD && getarg(args, 'D')) { - if (getarg(args, 'n') != NULL) + if (name != NULL) errx(EX_DATAERR, "can't combine `-D' with `-n name'"); if ((arg = getarg(args, 'u')) != NULL && (p = strtok(arg->val, ", \t")) != NULL) { if ((cnf->min_uid = (uid_t) atoi(p)) == 0) @@ -307,9 +307,8 @@ pw_user(int mode, char *name, long id, s cnf->max_gid = 32000; } - arg = getarg(args, 'C'); - if (write_userconfig(arg ? arg->val : NULL)) - return EXIT_SUCCESS; + if (write_userconfig(conf.config)) + return (EXIT_SUCCESS); err(EX_IOERR, "config udpate"); } Modified: head/usr.sbin/pw/pwupd.h ============================================================================== --- head/usr.sbin/pw/pwupd.h Sun Jun 7 20:10:11 2015 (r284134) +++ head/usr.sbin/pw/pwupd.h Sun Jun 7 20:44:06 2015 (r284135) @@ -84,6 +84,7 @@ struct pwconf { char rootdir[MAXPATHLEN]; char etcpath[MAXPATHLEN]; char *newname; + char *config; bool dryrun; bool pretty; bool v7; Modified: head/usr.sbin/pw/tests/Makefile ============================================================================== --- head/usr.sbin/pw/tests/Makefile Sun Jun 7 20:10:11 2015 (r284134) +++ head/usr.sbin/pw/tests/Makefile Sun Jun 7 20:44:06 2015 (r284135) @@ -7,6 +7,7 @@ TESTSDIR= ${TESTSBASE}/usr.sbin/pw ATF_TESTS_SH= pw_etcdir \ pw_lock \ + pw_config \ pw_groupdel \ pw_groupmod \ pw_useradd \ @@ -18,7 +19,7 @@ ATF_TESTS_SH= pw_etcdir \ TEST_METADATA.${tp}+= required_user="root" .endfor -FILES= group helper_functions.shin master.passwd +FILES= group helper_functions.shin master.passwd pw.conf FILESDIR= ${TESTSDIR} ATF_TESTS_SH+= pw_test Added: head/usr.sbin/pw/tests/pw.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pw/tests/pw.conf Sun Jun 7 20:44:06 2015 (r284135) @@ -0,0 +1,62 @@ +# +# pw.conf - user/group configuration defaults +# + +# Password for new users? no=nologin yes=loginid none=blank random=random +defaultpasswd = "no" + +# Reuse gaps in uid sequence? (yes or no) +reuseuids = "no" + +# Reuse gaps in gid sequence? (yes or no) +reusegids = "no" + +# Path to the NIS passwd file (blank or 'no' for none) +nispasswd = + +# Obtain default dotfiles from this directory +skeleton = "/usr/share/skel" + +# Mail this file to new user (/etc/newuser.msg or no) +newmail = "no" + +# Log add/change/remove information in this file +logfile = "/var/log/userlog" + +# Root directory in which $HOME directory is created +home = "/home" + +# Mode for the new $HOME directory, will be modified by umask +homemode = 0777 + +# Colon separated list of directories containing valid shells +shellpath = "/bin" + +# Comma separated list of available shells (without paths) +shells = "sh","csh","tcsh" + +# Default shell (without path) +defaultshell = "sh" + +# Default group (leave blank for new group per user) +defaultgroup = "" + +# Extra groups for new users +extragroups = + +# Default login class for new users +defaultclass = "" + +# Range of valid default user ids +minuid = 1000 +maxuid = 32000 + +# Range of valid default group ids +mingid = 1000 +maxgid = 32000 + +# Days after which account expires (0=disabled) +expire_days = 0 + +# Days after which password expires (0=disabled) +password_days = 0 Added: head/usr.sbin/pw/tests/pw_config.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pw/tests/pw_config.sh Sun Jun 7 20:44:06 2015 (r284135) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + +atf_test_case generate_config +generate_config_body() { + atf_check -s exit:0 \ + ${PW} useradd -D -C ${HOME}/foo.conf + atf_check -o file:$(atf_get_srcdir)/pw.conf \ + cat ${HOME}/foo.conf +} + +atf_init_test_cases() { + atf_add_test_case generate_config +} From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 21:00:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 246EDAD4; Sun, 7 Jun 2015 21:00:01 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12BAF1217; Sun, 7 Jun 2015 21:00:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57L00RP001204; Sun, 7 Jun 2015 21:00:00 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57L007f001153; Sun, 7 Jun 2015 21:00:00 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506072100.t57L007f001153@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 21:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284137 - in head/usr.sbin/pw: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 21:00:01 -0000 Author: bapt Date: Sun Jun 7 20:59:59 2015 New Revision: 284137 URL: https://svnweb.freebsd.org/changeset/base/284137 Log: Fix setting uid/gid min/max via pw Added: head/usr.sbin/pw/tests/pw-modified.conf - copied, changed from r284135, head/usr.sbin/pw/tests/pw.conf Modified: head/usr.sbin/pw/pw.c head/usr.sbin/pw/tests/Makefile head/usr.sbin/pw/tests/pw_config.sh Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun Jun 7 20:45:13 2015 (r284136) +++ head/usr.sbin/pw/pw.c Sun Jun 7 20:59:59 2015 (r284137) @@ -251,11 +251,20 @@ main(int argc, char *argv[]) addarg(&arglist, 'g', optarg); break; } - /* FALLTHROUGH */ - case 'u': if (strspn(optarg, "0123456789") != strlen(optarg)) - errx(EX_USAGE, "%s expects a number", - which == 1 ? "-g" : "-u" ); + errx(EX_USAGE, "-g expects a number"); + id = strtonum(optarg, 0, LONG_MAX, &errstr); + if (errstr != NULL) + errx(EX_USAGE, "Bad id '%s': %s", optarg, + errstr); + break; + case 'u': + if (strspn(optarg, "0123456789,") != strlen(optarg)) + errx(EX_USAGE, "-u expects a number"); + if (strchr(optarg, ',') != NULL) { + addarg(&arglist, 'u', optarg); + break; + } id = strtonum(optarg, 0, LONG_MAX, &errstr); if (errstr != NULL) errx(EX_USAGE, "Bad id '%s': %s", optarg, Modified: head/usr.sbin/pw/tests/Makefile ============================================================================== --- head/usr.sbin/pw/tests/Makefile Sun Jun 7 20:45:13 2015 (r284136) +++ head/usr.sbin/pw/tests/Makefile Sun Jun 7 20:59:59 2015 (r284137) @@ -19,7 +19,8 @@ ATF_TESTS_SH= pw_etcdir \ TEST_METADATA.${tp}+= required_user="root" .endfor -FILES= group helper_functions.shin master.passwd pw.conf +FILES= group helper_functions.shin master.passwd pw.conf \ + pw-modified.conf FILESDIR= ${TESTSDIR} ATF_TESTS_SH+= pw_test Copied and modified: head/usr.sbin/pw/tests/pw-modified.conf (from r284135, head/usr.sbin/pw/tests/pw.conf) ============================================================================== --- head/usr.sbin/pw/tests/pw.conf Sun Jun 7 20:44:06 2015 (r284135, copy source) +++ head/usr.sbin/pw/tests/pw-modified.conf Sun Jun 7 20:59:59 2015 (r284137) @@ -48,12 +48,12 @@ extragroups = defaultclass = "" # Range of valid default user ids -minuid = 1000 -maxuid = 32000 +minuid = 2000 +maxuid = 5000 # Range of valid default group ids -mingid = 1000 -maxgid = 32000 +mingid = 2100 +maxgid = 6000 # Days after which account expires (0=disabled) expire_days = 0 Modified: head/usr.sbin/pw/tests/pw_config.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_config.sh Sun Jun 7 20:45:13 2015 (r284136) +++ head/usr.sbin/pw/tests/pw_config.sh Sun Jun 7 20:59:59 2015 (r284137) @@ -11,6 +11,16 @@ generate_config_body() { cat ${HOME}/foo.conf } +atf_test_case modify_config_uid_gid_boundaries +modify_config_uid_gid_boundaries_body() { + atf_check -s exit:0 \ + ${PW} useradd -D -C ${HOME}/foo.conf \ + -u 2000,5000 -i 2100,6000 + atf_check -o file:$(atf_get_srcdir)/pw-modified.conf \ + cat ${HOME}/foo.conf +} + atf_init_test_cases() { atf_add_test_case generate_config + atf_add_test_case modify_config_uid_gid_boundaries } From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 21:57:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C5D0D35; Sun, 7 Jun 2015 21:57:22 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A76410EA; Sun, 7 Jun 2015 21:57:22 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57LvMHr030942; Sun, 7 Jun 2015 21:57:22 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57LvLww030937; Sun, 7 Jun 2015 21:57:21 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506072157.t57LvLww030937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 21:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284139 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 21:57:22 -0000 Author: bapt Date: Sun Jun 7 21:57:20 2015 New Revision: 284139 URL: https://svnweb.freebsd.org/changeset/base/284139 Log: Remove '-q' support for pw [user|group] next the intent of -q in this command is to return as exit status the value of the next group/user id, which does not make sense given exit status are limited to values between 0 and 255. Modified: head/usr.sbin/pw/pw.8 head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw.8 ============================================================================== --- head/usr.sbin/pw/pw.8 Sun Jun 7 21:14:48 2015 (r284138) +++ head/usr.sbin/pw/pw.8 Sun Jun 7 21:57:20 2015 (r284139) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 3, 2015 +.Dd June 7, 2015 .Dt PW 8 .Os .Sh NAME @@ -128,7 +128,6 @@ .Op Fl V Ar etcdir .Ar usernext .Op Fl C Ar config -.Op Fl q .Nm .Op Fl R Ar rootdir .Op Fl V Ar etcdir @@ -184,7 +183,6 @@ .Op Fl V Ar etcdir .Ar groupnext .Op Fl C Ar config -.Op Fl q .Nm .Op Fl R Ar rootdir .Op Fl V Ar etcdir Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun Jun 7 21:14:48 2015 (r284138) +++ head/usr.sbin/pw/pw.c Sun Jun 7 21:57:20 2015 (r284139) @@ -113,7 +113,7 @@ main(int argc, char *argv[]) "R:V:C:qn:u:rY", "R:V:C:qn:u:c:d:e:p:g:G:mM:l:k:s:w:L:h:H:FNPY", "R:V:C:qn:u:FPa7", - "R:V:C:q", + "R:V:C", "R:V:C:q", "R:V:C:q" }, @@ -122,7 +122,7 @@ main(int argc, char *argv[]) "R:V:C:qn:g:Y", "R:V:C:qn:d:g:l:h:H:FM:m:NPY", "R:V:C:qn:g:FPa", - "R:V:C:q" + "R:V:C" } }; @@ -469,8 +469,7 @@ cmdhelp(int mode, int which) "usage: pw usernext [switches]\n" "\t-V etcdir alternate /etc location\n" "\t-R rootir alternate root directory\n" - "\t-C config configuration file\n" - "\t-q quiet operation\n", + "\t-C config configuration file\n", "usage pw: lock [switches]\n" "\t-V etcdir alternate /etc locations\n" "\t-C config configuration file\n" @@ -524,7 +523,6 @@ cmdhelp(int mode, int which) "\t-V etcdir alternate /etc location\n" "\t-R rootir alternate root directory\n" "\t-C config configuration file\n" - "\t-q quiet operation\n" } }; Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sun Jun 7 21:14:48 2015 (r284138) +++ head/usr.sbin/pw/pw_group.c Sun Jun 7 21:57:20 2015 (r284139) @@ -73,11 +73,8 @@ pw_group(int mode, char *name, long id, * next gid to stdout */ if (mode == M_NEXT) { - gid_t next = gr_gidpolicy(cnf, id); - if (getarg(args, 'q')) - return next; - printf("%u\n", next); - return EXIT_SUCCESS; + printf("%u\n", gr_gidpolicy(cnd, id)); + return (EXIT_SUCCESS); } if (mode == M_PRINT && getarg(args, 'a')) { Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sun Jun 7 21:14:48 2015 (r284138) +++ head/usr.sbin/pw/pw_user.c Sun Jun 7 21:57:20 2015 (r284139) @@ -158,14 +158,10 @@ pw_user(int mode, char *name, long id, s * With M_NEXT, we only need to return the * next uid to stdout */ - if (mode == M_NEXT) - { - uid_t next = pw_uidpolicy(cnf, id); - if (getarg(args, 'q')) - return next; - printf("%u:", next); + if (mode == M_NEXT) { + printf("%u:", pw_uidpolicy(cnf, id)); pw_group(mode, name, -1, args); - return EXIT_SUCCESS; + return (EXIT_SUCCESS); } /* From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 21:59:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6558E83; Sun, 7 Jun 2015 21:59:44 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 926D910F6; Sun, 7 Jun 2015 21:59:44 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t57Lxisx031260; Sun, 7 Jun 2015 21:59:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t57LxiPE031259; Sun, 7 Jun 2015 21:59:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506072159.t57LxiPE031259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 7 Jun 2015 21:59:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284140 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 21:59:44 -0000 Author: bapt Date: Sun Jun 7 21:59:43 2015 New Revision: 284140 URL: https://svnweb.freebsd.org/changeset/base/284140 Log: Fix mistakes than came along with r284139 Modified: head/usr.sbin/pw/pw.c Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Sun Jun 7 21:57:20 2015 (r284139) +++ head/usr.sbin/pw/pw.c Sun Jun 7 21:59:43 2015 (r284140) @@ -113,7 +113,7 @@ main(int argc, char *argv[]) "R:V:C:qn:u:rY", "R:V:C:qn:u:c:d:e:p:g:G:mM:l:k:s:w:L:h:H:FNPY", "R:V:C:qn:u:FPa7", - "R:V:C", + "R:V:C:", "R:V:C:q", "R:V:C:q" }, @@ -122,7 +122,7 @@ main(int argc, char *argv[]) "R:V:C:qn:g:Y", "R:V:C:qn:d:g:l:h:H:FM:m:NPY", "R:V:C:qn:g:FPa", - "R:V:C" + "R:V:C:" } }; From owner-svn-src-head@FreeBSD.ORG Sun Jun 7 22:41:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31598612; Sun, 7 Jun 2015 22:41:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10A3E1BDA; Sun, 7 Jun 2015 22:41:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t57MfmtG023215; Sun, 7 Jun 2015 22:41:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 81D4E896B; Sun, 7 Jun 2015 22:41:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id pFZ9ipbXMfQW; Sun, 7 Jun 2015 22:41:45 +0000 (UTC) Message-ID: <5574C8B2.4020700@FreeBSD.org> DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 62D388967 Date: Sun, 07 Jun 2015 17:41:54 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Konstantin Belousov CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284105 - head/bin/cp References: <201506070349.t573ngeh064017@svn.freebsd.org> <20150607140621.GI2499@kib.kiev.ua> In-Reply-To: <20150607140621.GI2499@kib.kiev.ua> OpenPGP: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jG0cP0iLUjUhQ1rbAHsBbIqikQXwO15oG" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 22:41:49 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jG0cP0iLUjUhQ1rbAHsBbIqikQXwO15oG Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 6/7/2015 9:06 AM, Konstantin Belousov wrote: > On Sun, Jun 07, 2015 at 03:49:42AM +0000, Bryan Drewery wrote: >> Author: bdrewery >> Date: Sun Jun 7 03:49:41 2015 >> New Revision: 284105 >> URL: https://svnweb.freebsd.org/changeset/base/284105 >> >> Log: >> Cleanup some indentation issues. >> >> Modified: >> head/bin/cp/utils.c >> >> Modified: head/bin/cp/utils.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/bin/cp/utils.c Sat Jun 6 22:03:24 2015 (r284104) >> +++ head/bin/cp/utils.c Sun Jun 7 03:49:41 2015 (r284105) >> @@ -122,18 +122,17 @@ copy_file(const FTSENT *entp, int dne) >> /* remove existing destination file name,=20 >> * create a new file */ >> (void)unlink(to.p_path); >> - if (!lflag) >> + if (!lflag) { > It seems that the next two lines are indented in a funny way as well. I fixed the "look" around code I was updating to make my update more clea= r. The whitespace in the lines I updated in this commit is still wrong in many ways. There's several style/whitespace issues in the bin/cp files and I wasn't sure what scope of reindentation would be acceptable to others. If there's no objection I will cleanup all of the bin/cp files. Regards, Bryan Drewery --jG0cP0iLUjUhQ1rbAHsBbIqikQXwO15oG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVdMiyAAoJEDXXcbtuRpfPy3EIAMJ+D1uXcLODIdJ/Egsg7L0C MI6uaxlJOeKni6nB7dq+8XXFN3EEwZFTljqgXyr4gBeSBM3Fd4jH4isfzahsoEls KWH6RgR1wYF59zLmNji4jb+7OlwrYGK66DXhKgcSltWfe5oG2Yz4NFnY6pep/DKS CQG9ZteYvMwDotLu4wD4P141EyeRvxpkgXmRIPMTXUCuZ5A5NvxrlhTeWmAGyDqG jltEl4oHeK4jOCtcdnvYirjGiWVXMRbyANg9QK8ZzdWPn3oA3VbykJiS5hQDuTAV TLYO6FLSD/+mr75mGYYUJMEkLVsHJyO6DO9Mr3REz2t+MuRKwNkXAJa9y0arUzc= =7QIT -----END PGP SIGNATURE----- --jG0cP0iLUjUhQ1rbAHsBbIqikQXwO15oG-- From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 00:30:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2D8BFBE; Mon, 8 Jun 2015 00:30:58 +0000 (UTC) (envelope-from adrian@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0BDE134E; Mon, 8 Jun 2015 00:30:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t580Uwww007536; Mon, 8 Jun 2015 00:30:58 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t580UwwQ007535; Mon, 8 Jun 2015 00:30:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201506080030.t580UwwQ007535@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 8 Jun 2015 00:30:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284141 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 00:30:59 -0000 Author: adrian Date: Mon Jun 8 00:30:58 2015 New Revision: 284141 URL: https://svnweb.freebsd.org/changeset/base/284141 Log: Remove the start-scan call and re-inline it for now. Modified: head/sys/net80211/ieee80211_scan_sw.c Modified: head/sys/net80211/ieee80211_scan_sw.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sw.c Sun Jun 7 21:59:43 2015 (r284140) +++ head/sys/net80211/ieee80211_scan_sw.c Mon Jun 8 00:30:58 2015 (r284141) @@ -198,17 +198,6 @@ ieee80211_swscan_set_scan_duration(struc SCAN_PRIVATE(ss)->ss_duration = duration; } -void -ieee80211_swscan_run_scan_task(struct ieee80211vap *vap) -{ - struct ieee80211com *ic = vap->iv_ic; - struct ieee80211_scan_state *ss = ic->ic_scan; - - IEEE80211_LOCK_ASSERT(ic); - - ieee80211_runtask(ic, &SCAN_PRIVATE(ss)->ss_scan_task); -} - /* * Start a scan unless one is already going. */ @@ -272,7 +261,7 @@ ieee80211_swscan_start_scan_locked(const ic->ic_flags |= IEEE80211_F_SCAN; /* Start scan task */ - ieee80211_swscan_run_scan_task(vap); + ieee80211_runtask(ic, &SCAN_PRIVATE(ss)->ss_scan_task); } return 1; } else { From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 02:31:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81106AE5; Mon, 8 Jun 2015 02:31:47 +0000 (UTC) (envelope-from araujo@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F3151FBA; Mon, 8 Jun 2015 02:31:47 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t582VlhB072489; Mon, 8 Jun 2015 02:31:47 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t582Vl38072488; Mon, 8 Jun 2015 02:31:47 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201506080231.t582Vl38072488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 8 Jun 2015 02:31:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284142 - head/sys/boot/ficl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 02:31:47 -0000 Author: araujo (ports committer) Date: Mon Jun 8 02:31:46 2015 New Revision: 284142 URL: https://svnweb.freebsd.org/changeset/base/284142 Log: Revert my previoius commit as it explicit pollute the ficl on other architectures. It will be reworked by GSoC students. Requested by: ngie, bms and pfg. Modified: head/sys/boot/ficl/loader.c Modified: head/sys/boot/ficl/loader.c ============================================================================== --- head/sys/boot/ficl/loader.c Mon Jun 8 00:30:58 2015 (r284141) +++ head/sys/boot/ficl/loader.c Mon Jun 8 02:31:46 2015 (r284142) @@ -46,7 +46,6 @@ #include "bootstrap.h" #include #include "ficl.h" -#include "../i386/libi386/libi386.h" /* FreeBSD's loader interaction words and extras * From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 02:32:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20807D25; Mon, 8 Jun 2015 02:32:11 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-ob0-x230.google.com (mail-ob0-x230.google.com [IPv6:2607:f8b0:4003:c01::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D72B11FF1; Mon, 8 Jun 2015 02:32:10 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by obbqz1 with SMTP id qz1so70677641obb.3; Sun, 07 Jun 2015 19:32:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=iVYRK9LwUYb2TYC0qLirNsVeQ0/m4/MLFvQUuh6nbu4=; b=xx+sgnnC+DEtbd/wrt8B8sTAaeDWvRqib/ZY9KknHb6QGZg19Jtd5RXbNNaUKR8GaV PbH0HE+ZS6YPsd/j9thWjRXe7BpwXpfZSVjKCKuC1NF9AaHF6r7VflEoQo3Sv64+fgPg KPxKeiEEDZbKsNeKoykuqI19AZUP095yk3Mlhr1ekrFfrnj5mxx4zfn/vCRCSyZDFKag nraQGVWNZXveSj1XGBNNP3jen0f/3+sv/W5hYoGk9bIOVT9GPSNb4gc92ceS8x0hQOzK vZEtwmaFC48+iyscrqVWKAfyUzWlTiztqkxClwf31p8ugA16YlnJ6jePUUeMB2hWmjo5 h6KQ== MIME-Version: 1.0 X-Received: by 10.202.84.136 with SMTP id i130mr10982076oib.114.1433730730193; Sun, 07 Jun 2015 19:32:10 -0700 (PDT) Received: by 10.202.11.193 with HTTP; Sun, 7 Jun 2015 19:32:10 -0700 (PDT) Reply-To: araujo@FreeBSD.org In-Reply-To: <5574A2F9.8080404@FreeBSD.org> References: <201506071420.t57EKnio083109@svn.freebsd.org> <5F622B98-A1AE-41FB-8E4A-E767DB928689@gmail.com> <5574A2F9.8080404@FreeBSD.org> Date: Mon, 8 Jun 2015 10:32:10 +0800 Message-ID: Subject: Re: svn commit: r284116 - head/sys/boot/ficl From: Marcelo Araujo To: Pedro Giffuni Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 02:32:11 -0000 2015-06-08 4:00 GMT+08:00 Pedro Giffuni : > > > On 06/07/15 12:06, Garrett Cooper wrote: > >> On Jun 7, 2015, at 07:20, Marcelo Araujo wrote: >>> >>> Author: araujo (ports committer) >>> Date: Sun Jun 7 14:20:48 2015 >>> New Revision: 284116 >>> URL: https://svnweb.freebsd.org/changeset/base/284116 >>> >>> Log: >>> Include header libi386.h to silence the clang warning of implicit >>> declaration >>> of functions biospci_*. >>> >>> Differential Revision: D2668 >>> Reviewed by: rodrigc >>> >>> Modified: >>> head/sys/boot/ficl/loader.c >>> >>> Modified: head/sys/boot/ficl/loader.c >>> >>> ============================================================================== >>> --- head/sys/boot/ficl/loader.c Sun Jun 7 13:59:02 2015 (r284115) >>> +++ head/sys/boot/ficl/loader.c Sun Jun 7 14:20:48 2015 (r284116) >>> @@ -46,6 +46,7 @@ >>> #include "bootstrap.h" >>> #include >>> #include "ficl.h" >>> +#include "../i386/libi386/libi386.h" >>> >> Hi Marcelo, >> >> This commit's explicitly polluting the ficl interpreter with code from >> x86 on all platforms. Seems like the code should be refactored to not >> explicitly include this symbol, then #include this header there. That's the >> real bug.. >> > +1 > > Let's revert and let the ficl GSoC take care of it. > > Pedro. > Done, thanks! -- -- Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_) From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 02:35:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7397FBF; Mon, 8 Jun 2015 02:35:44 +0000 (UTC) (envelope-from adrian@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D45C0104E; Mon, 8 Jun 2015 02:35:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t582ZixR073234; Mon, 8 Jun 2015 02:35:44 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t582Zh4U073225; Mon, 8 Jun 2015 02:35:43 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201506080235.t582Zh4U073225@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 8 Jun 2015 02:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284143 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 02:35:45 -0000 Author: adrian Date: Mon Jun 8 02:35:43 2015 New Revision: 284143 URL: https://svnweb.freebsd.org/changeset/base/284143 Log: Break out the current 802.11 software scan methods into an indirect table. In order for drivers to provide an alternate set of scan methods, these have to finally use an indirection table and all of the calls in ieee80211_scan.c need to use said table. For all existing drivers - this is basically a glorified, KBI-breaking functional no-op. This is also not the final form - too much functionality is currently hiding in ieee80211_scan_sw.c that should be in ieee80211_scan.c. That'll be the target of some follow-up commits. Note: * You have to recompile your kernel/drivers after this - the net80211 KBI has changed. * I'm not yet planning on bumping any versioning - I have a few more things to shuffle around. Tested: * urtwn(4) - STA mode * Intel 7260 in local repo - overriding the methods and table at attach time has the desired effect (ie, all the methods are called, but nothing is ever performed.) Modified: head/sys/net80211/ieee80211_scan.c head/sys/net80211/ieee80211_scan.h head/sys/net80211/ieee80211_scan_sw.c head/sys/net80211/ieee80211_scan_sw.h head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_scan.c ============================================================================== --- head/sys/net80211/ieee80211_scan.c Mon Jun 8 02:31:46 2015 (r284142) +++ head/sys/net80211/ieee80211_scan.c Mon Jun 8 02:35:43 2015 (r284143) @@ -71,15 +71,14 @@ __FBSDID("$FreeBSD$"); void ieee80211_scan_attach(struct ieee80211com *ic) { - /* - * For now, the swscan module does both the - * allocation (so it can pad it) and sets up the net80211 - * bits. - * - * I'll split this stuff later. + * If there's no scan method pointer, attach the + * swscan set as a default. */ - ieee80211_swscan_attach(ic); + if (ic->ic_scan_methods == NULL) + ieee80211_swscan_attach(ic); + else + ic->ic_scan_methods->sc_attach(ic); } void @@ -88,12 +87,11 @@ ieee80211_scan_detach(struct ieee80211co /* * Ideally we'd do the ss_ops detach call here; - * but then ieee80211_swscan_detach would need - * to be split in two. + * but then sc_detach() would need to be split in two. * * I'll do that later. */ - ieee80211_swscan_detach(ic); + ic->ic_scan_methods->sc_detach(ic); } static const struct ieee80211_roamparam defroam[IEEE80211_MODE_MAX] = { @@ -122,6 +120,8 @@ static const struct ieee80211_roamparam void ieee80211_scan_vattach(struct ieee80211vap *vap) { + struct ieee80211com *ic = vap->iv_ic; + vap->iv_bgscanidle = (IEEE80211_BGSCAN_IDLE_DEFAULT*1000)/hz; vap->iv_bgscanintvl = IEEE80211_BGSCAN_INTVAL_DEFAULT*hz; vap->iv_scanvalid = IEEE80211_SCAN_VALID_DEFAULT*hz; @@ -129,7 +129,7 @@ ieee80211_scan_vattach(struct ieee80211v vap->iv_roaming = IEEE80211_ROAMING_AUTO; memcpy(vap->iv_roamparms, defroam, sizeof(defroam)); - ieee80211_swscan_vattach(vap); + ic->ic_scan_methods->sc_vattach(vap); } void @@ -141,7 +141,7 @@ ieee80211_scan_vdetach(struct ieee80211v IEEE80211_LOCK(ic); ss = ic->ic_scan; - ieee80211_swscan_vdetach(vap); + ic->ic_scan_methods->sc_vdetach(vap); if (ss != NULL && ss->ss_vap == vap) { if (ss->ss_ops != NULL) { @@ -314,6 +314,7 @@ ieee80211_start_scan(struct ieee80211vap u_int nssid, const struct ieee80211_scan_ssid ssids[]) { const struct ieee80211_scanner *scan; + struct ieee80211com *ic = vap->iv_ic; scan = ieee80211_scanner_get(vap->iv_opmode); if (scan == NULL) { @@ -324,8 +325,7 @@ ieee80211_start_scan(struct ieee80211vap return 0; } - /* XXX ops */ - return ieee80211_swscan_start_scan(scan, vap, flags, duration, + return ic->ic_scan_methods->sc_start_scan(scan, vap, flags, duration, mindwell, maxdwell, nssid, ssids); } @@ -376,11 +376,10 @@ ieee80211_check_scan(struct ieee80211vap /* * XXX TODO: separate things out a bit better. - * XXX TODO: ops */ ieee80211_scan_update_locked(vap, scan); - result = ieee80211_swscan_check_scan(scan, vap, flags, duration, + result = ic->ic_scan_methods->sc_check_scan(scan, vap, flags, duration, mindwell, maxdwell, nssid, ssids); IEEE80211_UNLOCK(ic); @@ -408,6 +407,7 @@ ieee80211_check_scan_current(struct ieee int ieee80211_bg_scan(struct ieee80211vap *vap, int flags) { + struct ieee80211com *ic = vap->iv_ic; const struct ieee80211_scanner *scan; // IEEE80211_UNLOCK_ASSERT(sc); @@ -425,10 +425,8 @@ ieee80211_bg_scan(struct ieee80211vap *v * XXX TODO: pull apart the bgscan logic into whatever * belongs here and whatever belongs in the software * scanner. - * - * XXX TODO: ops */ - return (ieee80211_swscan_bg_scan(scan, vap, flags)); + return (ic->ic_scan_methods->sc_bg_scan(scan, vap, flags)); } /* @@ -437,9 +435,9 @@ ieee80211_bg_scan(struct ieee80211vap *v void ieee80211_cancel_scan(struct ieee80211vap *vap) { + struct ieee80211com *ic = vap->iv_ic; - /* XXX TODO: ops */ - ieee80211_swscan_cancel_scan(vap); + ic->ic_scan_methods->sc_cancel_scan(vap); } /* @@ -448,9 +446,9 @@ ieee80211_cancel_scan(struct ieee80211va void ieee80211_cancel_anyscan(struct ieee80211vap *vap) { + struct ieee80211com *ic = vap->iv_ic; - /* XXX TODO: ops */ - ieee80211_swscan_cancel_anyscan(vap); + ic->ic_scan_methods->sc_cancel_anyscan(vap); } /* @@ -460,9 +458,9 @@ ieee80211_cancel_anyscan(struct ieee8021 void ieee80211_scan_next(struct ieee80211vap *vap) { + struct ieee80211com *ic = vap->iv_ic; - /* XXX TODO: ops */ - ieee80211_swscan_scan_next(vap); + ic->ic_scan_methods->sc_scan_next(vap); } /* @@ -481,8 +479,7 @@ ieee80211_scan_done(struct ieee80211vap ss = ic->ic_scan; ss->ss_next = ss->ss_last; /* all channels are complete */ - /* XXX TODO: ops */ - ieee80211_swscan_scan_done(vap); + ic->ic_scan_methods->sc_scan_done(vap); IEEE80211_UNLOCK(ic); } @@ -504,8 +501,7 @@ ieee80211_probe_curchan(struct ieee80211 return; } - /* XXX TODO: ops */ - ieee80211_swscan_probe_curchan(vap, force); + ic->ic_scan_methods->sc_scan_probe_curchan(vap, force); } #ifdef IEEE80211_DEBUG @@ -567,8 +563,9 @@ ieee80211_add_scan(struct ieee80211vap * const struct ieee80211_frame *wh, int subtype, int rssi, int noise) { + struct ieee80211com *ic = vap->iv_ic; - return (ieee80211_swscan_add_scan(vap, curchan, sp, wh, subtype, + return (ic->ic_scan_methods->sc_add_scan(vap, curchan, sp, wh, subtype, rssi, noise)); } Modified: head/sys/net80211/ieee80211_scan.h ============================================================================== --- head/sys/net80211/ieee80211_scan.h Mon Jun 8 02:31:46 2015 (r284142) +++ head/sys/net80211/ieee80211_scan.h Mon Jun 8 02:35:43 2015 (r284143) @@ -80,6 +80,39 @@ struct ieee80211_scan_ssid { #define IEEE80211_SCAN_MAX_SSID 1 /* max # ssid's to probe */ /* + * High-level implementation visible to ieee80211_scan.[ch]. + * + * The default scanner (ieee80211_scan_sw.[ch]) implements a software + * driven scanner. Firmware driven scanning needs a different set of + * behaviours. + */ +struct ieee80211_scan_methods { + void (*sc_attach)(struct ieee80211com *); + void (*sc_detach)(struct ieee80211com *); + void (*sc_vattach)(struct ieee80211vap *); + void (*sc_vdetach)(struct ieee80211vap *); + void (*sc_set_scan_duration)(struct ieee80211vap *, u_int); + int (*sc_start_scan)(const struct ieee80211_scanner *, + struct ieee80211vap *, int, u_int, u_int, u_int, u_int, + const struct ieee80211_scan_ssid ssids[]); + int (*sc_check_scan)(const struct ieee80211_scanner *, + struct ieee80211vap *, int, u_int, u_int, u_int, u_int, + const struct ieee80211_scan_ssid ssids[]); + int (*sc_bg_scan)(const struct ieee80211_scanner *, + struct ieee80211vap *, int); + void (*sc_cancel_scan)(struct ieee80211vap *); + void (*sc_cancel_anyscan)(struct ieee80211vap *); + void (*sc_scan_next)(struct ieee80211vap *); + void (*sc_scan_done)(struct ieee80211vap *); + void (*sc_scan_probe_curchan)(struct ieee80211vap *, int); + void (*sc_add_scan)(struct ieee80211vap *, + struct ieee80211_channel *, + const struct ieee80211_scanparams *, + const struct ieee80211_frame *, + int, int, int); +}; + +/* * Scan state visible to the 802.11 layer. Scan parameters and * results are stored in this data structure. The ieee80211_scan_state * structure is extended with space that is maintained private to Modified: head/sys/net80211/ieee80211_scan_sw.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sw.c Mon Jun 8 02:31:46 2015 (r284142) +++ head/sys/net80211/ieee80211_scan_sw.c Mon Jun 8 02:35:43 2015 (r284143) @@ -102,33 +102,7 @@ static void scan_task(void *, int); MALLOC_DEFINE(M_80211_SCAN, "80211scan", "802.11 scan state"); -void -ieee80211_swscan_attach(struct ieee80211com *ic) -{ - struct scan_state *ss; - - ss = (struct scan_state *) IEEE80211_MALLOC(sizeof(struct scan_state), - M_80211_SCAN, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO); - if (ss == NULL) { - ic->ic_scan = NULL; - return; - } - callout_init_mtx(&ss->ss_scan_timer, IEEE80211_LOCK_OBJ(ic), 0); - cv_init(&ss->ss_scan_cv, "scan"); - TASK_INIT(&ss->ss_scan_task, 0, scan_task, ss); - - ic->ic_scan = &ss->base; - ss->base.ss_ic = ic; - - ic->ic_scan_curchan = scan_curchan; - ic->ic_scan_mindwell = scan_mindwell; - - /* - * TODO: all of the non-vap scan calls should be methods! - */ -} - -void +static void ieee80211_swscan_detach(struct ieee80211com *ic) { struct ieee80211_scan_state *ss = ic->ic_scan; @@ -159,7 +133,7 @@ ieee80211_swscan_detach(struct ieee80211 } } -void +static void ieee80211_swscan_vattach(struct ieee80211vap *vap) { /* nothing to do for now */ @@ -169,7 +143,7 @@ ieee80211_swscan_vattach(struct ieee8021 } -void +static void ieee80211_swscan_vdetach(struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; @@ -185,7 +159,7 @@ ieee80211_swscan_vdetach(struct ieee8021 } } -void +static void ieee80211_swscan_set_scan_duration(struct ieee80211vap *vap, u_int duration) { struct ieee80211com *ic = vap->iv_ic; @@ -278,7 +252,7 @@ ieee80211_swscan_start_scan_locked(const * * Called without the comlock held; grab the comlock as appropriate. */ -int +static int ieee80211_swscan_start_scan(const struct ieee80211_scanner *scan, struct ieee80211vap *vap, int flags, u_int duration, u_int mindwell, u_int maxdwell, @@ -305,7 +279,7 @@ ieee80211_swscan_start_scan(const struct * * XXX TODO: split out! */ -int +static int ieee80211_swscan_check_scan(const struct ieee80211_scanner *scan, struct ieee80211vap *vap, int flags, u_int duration, u_int mindwell, u_int maxdwell, @@ -363,7 +337,7 @@ ieee80211_swscan_check_scan(const struct * Restart a previous scan. If the previous scan completed * then we start again using the existing channel list. */ -int +static int ieee80211_swscan_bg_scan(const struct ieee80211_scanner *scan, struct ieee80211vap *vap, int flags) { @@ -454,7 +428,7 @@ ieee80211_swscan_bg_scan(const struct ie /* * Cancel any scan currently going on for the specified vap. */ -void +static void ieee80211_swscan_cancel_scan(struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; @@ -488,7 +462,7 @@ ieee80211_swscan_cancel_scan(struct ieee /* * Cancel any scan currently going on. */ -void +static void ieee80211_swscan_cancel_anyscan(struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; @@ -522,7 +496,7 @@ ieee80211_swscan_cancel_anyscan(struct i * Public access to scan_next for drivers that manage * scanning themselves (e.g. for firmware-based devices). */ -void +static void ieee80211_swscan_scan_next(struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; @@ -540,7 +514,7 @@ ieee80211_swscan_scan_next(struct ieee80 * Public access to scan_next for drivers that are not able to scan single * channels (e.g. for firmware-based devices). */ -void +static void ieee80211_swscan_scan_done(struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; @@ -559,7 +533,7 @@ ieee80211_swscan_scan_done(struct ieee80 * listen for beacons on the channel; if we receive something * then we'll transmit a probe request. */ -void +static void ieee80211_swscan_probe_curchan(struct ieee80211vap *vap, int force) { struct ieee80211com *ic = vap->iv_ic; @@ -887,7 +861,7 @@ done: /* * Process a beacon or probe response frame. */ -void +static void ieee80211_swscan_add_scan(struct ieee80211vap *vap, struct ieee80211_channel *curchan, const struct ieee80211_scanparams *sp, @@ -935,3 +909,50 @@ ieee80211_swscan_add_scan(struct ieee802 } } +static struct ieee80211_scan_methods swscan_methods = { + .sc_attach = ieee80211_swscan_attach, + .sc_detach = ieee80211_swscan_detach, + .sc_vattach = ieee80211_swscan_vattach, + .sc_vdetach = ieee80211_swscan_vdetach, + .sc_set_scan_duration = ieee80211_swscan_set_scan_duration, + .sc_start_scan = ieee80211_swscan_start_scan, + .sc_check_scan = ieee80211_swscan_check_scan, + .sc_bg_scan = ieee80211_swscan_bg_scan, + .sc_cancel_scan = ieee80211_swscan_cancel_scan, + .sc_cancel_anyscan = ieee80211_swscan_cancel_anyscan, + .sc_scan_next = ieee80211_swscan_scan_next, + .sc_scan_done = ieee80211_swscan_scan_done, + .sc_scan_probe_curchan = ieee80211_swscan_probe_curchan, + .sc_add_scan = ieee80211_swscan_add_scan +}; + +/* + * Default scan attach method. + */ +void +ieee80211_swscan_attach(struct ieee80211com *ic) +{ + struct scan_state *ss; + + /* + * Setup the default methods + */ + ic->ic_scan_methods = &swscan_methods; + + /* Allocate initial scan state */ + ss = (struct scan_state *) IEEE80211_MALLOC(sizeof(struct scan_state), + M_80211_SCAN, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO); + if (ss == NULL) { + ic->ic_scan = NULL; + return; + } + callout_init_mtx(&ss->ss_scan_timer, IEEE80211_LOCK_OBJ(ic), 0); + cv_init(&ss->ss_scan_cv, "scan"); + TASK_INIT(&ss->ss_scan_task, 0, scan_task, ss); + + ic->ic_scan = &ss->base; + ss->base.ss_ic = ic; + + ic->ic_scan_curchan = scan_curchan; + ic->ic_scan_mindwell = scan_mindwell; +} Modified: head/sys/net80211/ieee80211_scan_sw.h ============================================================================== --- head/sys/net80211/ieee80211_scan_sw.h Mon Jun 8 02:31:46 2015 (r284142) +++ head/sys/net80211/ieee80211_scan_sw.h Mon Jun 8 02:35:43 2015 (r284143) @@ -28,34 +28,5 @@ #define __NET80211_IEEE80211_SCAN_SW_H__ extern void ieee80211_swscan_attach(struct ieee80211com *ic); -extern void ieee80211_swscan_detach(struct ieee80211com *ic); - -extern void ieee80211_swscan_vattach(struct ieee80211vap *vap); -extern void ieee80211_swscan_vdetach(struct ieee80211vap *vap); - -extern int ieee80211_swscan_start_scan(const struct ieee80211_scanner *scan, - struct ieee80211vap *vap, int flags, - u_int duration, u_int mindwell, u_int maxdwell, - u_int nssid, const struct ieee80211_scan_ssid ssids[]); -extern void ieee80211_swscan_set_scan_duration(struct ieee80211vap *vap, - u_int duration); -extern void ieee80211_swscan_run_scan_task(struct ieee80211vap *vap); -extern int ieee80211_swscan_check_scan(const struct ieee80211_scanner *scan, - struct ieee80211vap *vap, int flags, - u_int duration, u_int mindwell, u_int maxdwell, - u_int nssid, const struct ieee80211_scan_ssid ssids[]); -extern int ieee80211_swscan_bg_scan(const struct ieee80211_scanner *scan, - struct ieee80211vap *vap, int flags); -extern void ieee80211_swscan_cancel_scan(struct ieee80211vap *vap); -extern void ieee80211_swscan_cancel_anyscan(struct ieee80211vap *vap); -extern void ieee80211_swscan_scan_next(struct ieee80211vap *vap); -extern void ieee80211_swscan_scan_done(struct ieee80211vap *vap); -extern void ieee80211_swscan_probe_curchan(struct ieee80211vap *vap, - int force); -extern void ieee80211_swscan_add_scan(struct ieee80211vap *vap, - struct ieee80211_channel *curchan, - const struct ieee80211_scanparams *sp, - const struct ieee80211_frame *wh, - int subtype, int rssi, int noise); #endif /* __NET80211_IEEE80211_SCAN_SW_H__ */ Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Mon Jun 8 02:31:46 2015 (r284142) +++ head/sys/net80211/ieee80211_var.h Mon Jun 8 02:35:43 2015 (r284143) @@ -197,6 +197,7 @@ struct ieee80211com { struct ieee80211_dfs_state ic_dfs; /* DFS state */ struct ieee80211_scan_state *ic_scan; /* scan state */ + struct ieee80211_scan_methods *ic_scan_methods; /* scan methods */ int ic_lastdata; /* time of last data frame */ int ic_lastscan; /* time last scan completed */ From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 03:00:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82F4754D; Mon, 8 Jun 2015 03:00:38 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63D9015D1; Mon, 8 Jun 2015 03:00:38 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5830cbP084861; Mon, 8 Jun 2015 03:00:38 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5830bfn084857; Mon, 8 Jun 2015 03:00:37 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506080300.t5830bfn084857@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 8 Jun 2015 03:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284144 - head/sys/dev/proto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 03:00:38 -0000 Author: marcel Date: Mon Jun 8 03:00:36 2015 New Revision: 284144 URL: https://svnweb.freebsd.org/changeset/base/284144 Log: Add DMA memory allocation and freeing. Slightly rework the tag handling. Modified: head/sys/dev/proto/proto_busdma.c head/sys/dev/proto/proto_busdma.h head/sys/dev/proto/proto_core.c head/sys/dev/proto/proto_dev.h Modified: head/sys/dev/proto/proto_busdma.c ============================================================================== --- head/sys/dev/proto/proto_busdma.c Mon Jun 8 02:35:43 2015 (r284143) +++ head/sys/dev/proto/proto_busdma.c Mon Jun 8 03:00:36 2015 (r284144) @@ -39,6 +39,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -47,33 +49,72 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_PROTO_BUSDMA, "proto_busdma", "DMA management data"); static int -proto_busdma_tag_create(struct proto_ioc_busdma *ioc, - struct proto_tag **tag_io, bus_dma_tag_t *busdma_tag_io) +proto_busdma_tag_create(struct proto_busdma *busdma, struct proto_tag *parent, + struct proto_ioc_busdma *ioc) { struct proto_tag *tag; - int error; - error = bus_dma_tag_create(*busdma_tag_io, ioc->u.tag.align, - ioc->u.tag.bndry, ioc->u.tag.maxaddr, BUS_SPACE_MAXADDR, - NULL, NULL, ioc->u.tag.maxsz, ioc->u.tag.nsegs, - ioc->u.tag.maxsegsz, ioc->u.tag.flags, NULL, NULL, - busdma_tag_io); - if (error) - return (error); + /* + * If nsegs is 1, ignore maxsegsz. What this means is that if we have + * just 1 segment, then maxsz should be equal to maxsegsz. To keep it + * simple for us, limit maxsegsz to maxsz in any case. + */ + if (ioc->u.tag.maxsegsz > ioc->u.tag.maxsz || ioc->u.tag.nsegs == 1) + ioc->u.tag.maxsegsz = ioc->u.tag.maxsz; + + /* A bndry of 0 really means ~0, or no boundary. */ + if (ioc->u.tag.bndry == 0) + ioc->u.tag.bndry = ~0U; tag = malloc(sizeof(*tag), M_PROTO_BUSDMA, M_WAITOK | M_ZERO); - tag->parent = *tag_io; - tag->busdma_tag = *busdma_tag_io; - *tag_io = tag; + if (parent != NULL) { + tag->parent = parent; + LIST_INSERT_HEAD(&parent->children, tag, peers); + tag->align = MAX(ioc->u.tag.align, parent->align); + tag->bndry = MIN(ioc->u.tag.bndry, parent->bndry); + tag->maxaddr = MIN(ioc->u.tag.maxaddr, parent->maxaddr); + tag->maxsz = MIN(ioc->u.tag.maxsz, parent->maxsz); + tag->maxsegsz = MIN(ioc->u.tag.maxsegsz, parent->maxsegsz); + tag->nsegs = MIN(ioc->u.tag.nsegs, parent->nsegs); + tag->datarate = MIN(ioc->u.tag.datarate, parent->datarate); + /* Write constraints back */ + ioc->u.tag.align = tag->align; + ioc->u.tag.bndry = tag->bndry; + ioc->u.tag.maxaddr = tag->maxaddr; + ioc->u.tag.maxsz = tag->maxsz; + ioc->u.tag.maxsegsz = tag->maxsegsz; + ioc->u.tag.nsegs = tag->nsegs; + ioc->u.tag.datarate = tag->datarate; + } else { + tag->align = ioc->u.tag.align; + tag->bndry = ioc->u.tag.bndry; + tag->maxaddr = ioc->u.tag.maxaddr; + tag->maxsz = ioc->u.tag.maxsz; + tag->maxsegsz = ioc->u.tag.maxsegsz; + tag->nsegs = ioc->u.tag.nsegs; + tag->datarate = ioc->u.tag.datarate; + } + LIST_INSERT_HEAD(&busdma->tags, tag, tags); + ioc->result = (uintptr_t)(void *)tag; return (0); } -static void -proto_busdma_tag_destroy(struct proto_tag *tag) +static int +proto_busdma_tag_destroy(struct proto_busdma *busdma, struct proto_tag *tag) { - bus_dma_tag_destroy(tag->busdma_tag); + if (!LIST_EMPTY(&tag->mds)) + return (EBUSY); + if (!LIST_EMPTY(&tag->children)) + return (EBUSY); + + if (tag->parent != NULL) { + LIST_REMOVE(tag, peers); + tag->parent = NULL; + } + LIST_REMOVE(tag, tags); free(tag, M_PROTO_BUSDMA); + return (0); } static struct proto_tag * @@ -81,11 +122,66 @@ proto_busdma_tag_lookup(struct proto_bus { struct proto_tag *tag; - LIST_FOREACH(tag, &busdma->tags, link) { + LIST_FOREACH(tag, &busdma->tags, tags) { if ((void *)tag == (void *)key) return (tag); - } - return (NULL); + } + return (NULL); +} + +static int +proto_busdma_mem_alloc(struct proto_busdma *busdma, struct proto_tag *tag, + struct proto_ioc_busdma *ioc) +{ + struct proto_md *md; + int error; + + md = malloc(sizeof(*md), M_PROTO_BUSDMA, M_WAITOK | M_ZERO); + md->tag = tag; + + error = bus_dma_tag_create(busdma->bd_roottag, tag->align, tag->bndry, + tag->maxaddr, BUS_SPACE_MAXADDR, NULL, NULL, tag->maxsz, + tag->nsegs, tag->maxsegsz, 0, NULL, NULL, &md->bd_tag); + if (error) { + free(md, M_PROTO_BUSDMA); + return (error); + } + error = bus_dmamem_alloc(md->bd_tag, &md->kva, 0, &md->bd_map); + if (error) { + bus_dma_tag_destroy(md->bd_tag); + free(md, M_PROTO_BUSDMA); + return (error); + } + LIST_INSERT_HEAD(&tag->mds, md, peers); + LIST_INSERT_HEAD(&busdma->mds, md, mds); + ioc->u.mem.nsegs = 1; + ioc->u.mem.physaddr = pmap_kextract((uintptr_t)(md->kva)); + ioc->result = (uintptr_t)(void *)md; + return (0); +} + +static int +proto_busdma_mem_free(struct proto_busdma *busdma, struct proto_md *md) +{ + + LIST_REMOVE(md, mds); + LIST_REMOVE(md, peers); + bus_dmamem_free(md->bd_tag, md->kva, md->bd_map); + bus_dma_tag_destroy(md->bd_tag); + free(md, M_PROTO_BUSDMA); + return (0); +} + +static struct proto_md * +proto_busdma_md_lookup(struct proto_busdma *busdma, u_long key) +{ + struct proto_md *md; + + LIST_FOREACH(md, &busdma->mds, mds) { + if ((void *)md == (void *)key) + return (md); + } + return (NULL); } struct proto_busdma * @@ -109,12 +205,13 @@ proto_busdma_detach(struct proto_softc * int proto_busdma_cleanup(struct proto_softc *sc, struct proto_busdma *busdma) { + struct proto_md *md, *md1; struct proto_tag *tag, *tag1; - LIST_FOREACH_SAFE(tag, &busdma->tags, link, tag1) { - LIST_REMOVE(tag, link); - proto_busdma_tag_destroy(tag); - } + LIST_FOREACH_SAFE(md, &busdma->mds, mds, md1) + proto_busdma_mem_free(busdma, md); + LIST_FOREACH_SAFE(tag, &busdma->tags, tags, tag1) + proto_busdma_tag_destroy(busdma, tag); return (0); } @@ -123,19 +220,14 @@ proto_busdma_ioctl(struct proto_softc *s struct proto_ioc_busdma *ioc) { struct proto_tag *tag; - bus_dma_tag_t busdma_tag; + struct proto_md *md; int error; error = 0; switch (ioc->request) { case PROTO_IOC_BUSDMA_TAG_CREATE: - busdma_tag = bus_get_dma_tag(sc->sc_dev); - tag = NULL; - error = proto_busdma_tag_create(ioc, &tag, &busdma_tag); - if (error) - break; - LIST_INSERT_HEAD(&busdma->tags, tag, link); - ioc->key = (uintptr_t)(void *)tag; + busdma->bd_roottag = bus_get_dma_tag(sc->sc_dev); + error = proto_busdma_tag_create(busdma, NULL, ioc); break; case PROTO_IOC_BUSDMA_TAG_DERIVE: tag = proto_busdma_tag_lookup(busdma, ioc->key); @@ -143,12 +235,7 @@ proto_busdma_ioctl(struct proto_softc *s error = EINVAL; break; } - busdma_tag = tag->busdma_tag; - error = proto_busdma_tag_create(ioc, &tag, &busdma_tag); - if (error) - break; - LIST_INSERT_HEAD(&busdma->tags, tag, link); - ioc->key = (uintptr_t)(void *)tag; + error = proto_busdma_tag_create(busdma, tag, ioc); break; case PROTO_IOC_BUSDMA_TAG_DESTROY: tag = proto_busdma_tag_lookup(busdma, ioc->key); @@ -156,8 +243,23 @@ proto_busdma_ioctl(struct proto_softc *s error = EINVAL; break; } - LIST_REMOVE(tag, link); - proto_busdma_tag_destroy(tag); + error = proto_busdma_tag_destroy(busdma, tag); + break; + case PROTO_IOC_BUSDMA_MEM_ALLOC: + tag = proto_busdma_tag_lookup(busdma, ioc->u.mem.tag); + if (tag == NULL) { + error = EINVAL; + break; + } + error = proto_busdma_mem_alloc(busdma, tag, ioc); + break; + case PROTO_IOC_BUSDMA_MEM_FREE: + md = proto_busdma_md_lookup(busdma, ioc->key); + if (md == NULL) { + error = EINVAL; + break; + } + error = proto_busdma_mem_free(busdma, md); break; default: error = EINVAL; Modified: head/sys/dev/proto/proto_busdma.h ============================================================================== --- head/sys/dev/proto/proto_busdma.h Mon Jun 8 02:35:43 2015 (r284143) +++ head/sys/dev/proto/proto_busdma.h Mon Jun 8 03:00:36 2015 (r284144) @@ -29,14 +29,36 @@ #ifndef _DEV_PROTO_BUSDMA_H_ #define _DEV_PROTO_BUSDMA_H_ +struct proto_md; + struct proto_tag { - LIST_ENTRY(proto_tag) link; + LIST_ENTRY(proto_tag) tags; struct proto_tag *parent; - bus_dma_tag_t busdma_tag; + LIST_ENTRY(proto_tag) peers; + LIST_HEAD(,proto_tag) children; + LIST_HEAD(,proto_md) mds; + bus_addr_t align; + bus_addr_t bndry; + bus_addr_t maxaddr; + bus_size_t maxsz; + bus_size_t maxsegsz; + u_int nsegs; + u_int datarate; +}; + +struct proto_md { + LIST_ENTRY(proto_md) mds; + LIST_ENTRY(proto_md) peers; + struct proto_tag *tag; + void *kva; + bus_dma_tag_t bd_tag; + bus_dmamap_t bd_map; }; struct proto_busdma { LIST_HEAD(,proto_tag) tags; + LIST_HEAD(,proto_md) mds; + bus_dma_tag_t bd_roottag; }; struct proto_busdma *proto_busdma_attach(struct proto_softc *); Modified: head/sys/dev/proto/proto_core.c ============================================================================== --- head/sys/dev/proto/proto_core.c Mon Jun 8 02:35:43 2015 (r284143) +++ head/sys/dev/proto/proto_core.c Mon Jun 8 03:00:36 2015 (r284144) @@ -370,6 +370,10 @@ proto_ioctl(struct cdev *cdev, u_long cm error = 0; switch (cmd) { case PROTO_IOC_REGION: + if (r->r_type == PROTO_RES_BUSDMA) { + error = EINVAL; + break; + } region = (struct proto_ioc_region *)data; region->size = r->r_size; if (r->r_type == PROTO_RES_PCICFG) @@ -378,6 +382,10 @@ proto_ioctl(struct cdev *cdev, u_long cm region->address = rman_get_start(r->r_d.res); break; case PROTO_IOC_BUSDMA: + if (r->r_type != PROTO_RES_BUSDMA) { + error = EINVAL; + break; + } busdma = (struct proto_ioc_busdma *)data; error = proto_busdma_ioctl(sc, r->r_d.busdma, busdma); break; Modified: head/sys/dev/proto/proto_dev.h ============================================================================== --- head/sys/dev/proto/proto_dev.h Mon Jun 8 02:35:43 2015 (r284143) +++ head/sys/dev/proto/proto_dev.h Mon Jun 8 03:00:36 2015 (r284144) @@ -45,6 +45,8 @@ struct proto_ioc_busdma { #define PROTO_IOC_BUSDMA_TAG_CREATE 1 #define PROTO_IOC_BUSDMA_TAG_DERIVE 2 #define PROTO_IOC_BUSDMA_TAG_DESTROY 3 +#define PROTO_IOC_BUSDMA_MEM_ALLOC 10 +#define PROTO_IOC_BUSDMA_MEM_FREE 11 unsigned long key; union { struct { @@ -57,6 +59,12 @@ struct proto_ioc_busdma { unsigned int datarate; unsigned int flags; } tag; + struct { + unsigned long tag; + unsigned int flags; + unsigned int nsegs; + unsigned long physaddr; + } mem; } u; unsigned long result; }; From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 03:01:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7CA68D6; Mon, 8 Jun 2015 03:01:20 +0000 (UTC) (envelope-from adrian@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C60401829; Mon, 8 Jun 2015 03:01:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5831K7b086054; Mon, 8 Jun 2015 03:01:20 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5831KF2086052; Mon, 8 Jun 2015 03:01:20 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201506080301.t5831KF2086052@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 8 Jun 2015 03:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284145 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 03:01:21 -0000 Author: adrian Date: Mon Jun 8 03:01:19 2015 New Revision: 284145 URL: https://svnweb.freebsd.org/changeset/base/284145 Log: Cope with .. less memory. Modified: head/sys/mips/conf/AR71XX_BASE head/sys/mips/conf/AR724X_BASE Modified: head/sys/mips/conf/AR71XX_BASE ============================================================================== --- head/sys/mips/conf/AR71XX_BASE Mon Jun 8 03:00:36 2015 (r284144) +++ head/sys/mips/conf/AR71XX_BASE Mon Jun 8 03:01:19 2015 (r284145) @@ -26,6 +26,9 @@ makeoptions DEBUG=-g #Build kernel with # modules already built. makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci" +# For small memory footprints +options VM_KMEM_SIZE_SCALE=1 + options DDB options KDB Modified: head/sys/mips/conf/AR724X_BASE ============================================================================== --- head/sys/mips/conf/AR724X_BASE Mon Jun 8 03:00:36 2015 (r284144) +++ head/sys/mips/conf/AR724X_BASE Mon Jun 8 03:01:19 2015 (r284145) @@ -27,6 +27,9 @@ makeoptions DEBUG=-g #Build kernel with # modules already built. makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci hwpmc cam" +# For small memory footprints +options VM_KMEM_SIZE_SCALE=1 + options DDB options KDB From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 03:23:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04366C28; Mon, 8 Jun 2015 03:23:22 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E56C01D33; Mon, 8 Jun 2015 03:23:21 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t583NLQG098401; Mon, 8 Jun 2015 03:23:21 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t583NKWB098393; Mon, 8 Jun 2015 03:23:20 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506080323.t583NKWB098393@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 8 Jun 2015 03:23:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284146 - in head/tools/bus_space: . C Python X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 03:23:22 -0000 Author: marcel Date: Mon Jun 8 03:23:20 2015 New Revision: 284146 URL: https://svnweb.freebsd.org/changeset/base/284146 Log: Add busdma_mem_alloc & busdma_mem_free. Modified: head/tools/bus_space/C/lang.c head/tools/bus_space/C/libbus_space.h head/tools/bus_space/Python/lang.c head/tools/bus_space/busdma.c head/tools/bus_space/busdma.h Modified: head/tools/bus_space/C/lang.c ============================================================================== --- head/tools/bus_space/C/lang.c Mon Jun 8 03:01:19 2015 (r284145) +++ head/tools/bus_space/C/lang.c Mon Jun 8 03:23:20 2015 (r284146) @@ -137,3 +137,21 @@ busdma_tag_destroy(busdma_tag_t tag) return (bd_tag_destroy(tag)); } +int +busdma_mem_alloc(busdma_tag_t tag, u_int flags, busdma_md_t *out_p) +{ + int res; + + res = bd_mem_alloc(tag, flags); + if (res == -1) + return (errno); + *out_p = res; + return (0); +} + +int +busdma_mem_free(busdma_md_t md) +{ + + return (bd_mem_free(md)); +} Modified: head/tools/bus_space/C/libbus_space.h ============================================================================== --- head/tools/bus_space/C/libbus_space.h Mon Jun 8 03:01:19 2015 (r284145) +++ head/tools/bus_space/C/libbus_space.h Mon Jun 8 03:23:20 2015 (r284146) @@ -42,6 +42,7 @@ int bus_space_write_4(int rid, long ofs, typedef unsigned long bus_addr_t; typedef unsigned long bus_size_t; typedef int busdma_tag_t; +typedef int busdma_md_t; int busdma_tag_create(const char *dev, bus_addr_t align, bus_addr_t bndry, bus_addr_t maxaddr, bus_size_t maxsz, u_int nsegs, @@ -53,4 +54,7 @@ int busdma_tag_derive(busdma_tag_t tag, busdma_tag_t *out_p); int busdma_tag_destroy(busdma_tag_t tag); +int busdma_mem_alloc(busdma_tag_t tag, u_int flags, busdma_md_t *out_p); +int busdma_mem_free(busdma_md_t md); + #endif /* _LIBBUS_SPACE_H_ */ Modified: head/tools/bus_space/Python/lang.c ============================================================================== --- head/tools/bus_space/Python/lang.c Mon Jun 8 03:01:19 2015 (r284145) +++ head/tools/bus_space/Python/lang.c Mon Jun 8 03:23:20 2015 (r284146) @@ -178,12 +178,13 @@ static PyObject * busdma_tag_create(PyObject *self, PyObject *args) { char *dev; - long align, bndry, maxaddr, maxsz, maxsegsz; - int tid, nsegs, datarate, flags; + u_long align, bndry, maxaddr, maxsz, maxsegsz; + u_int nsegs, datarate, flags; + int tid; - if (!PyArg_ParseTuple(args, "sllllilii", &dev, &align, &bndry, + if (!PyArg_ParseTuple(args, "skkkkIkII", &dev, &align, &bndry, &maxaddr, &maxsz, &nsegs, &maxsegsz, &datarate, &flags)) - return (NULL); + return (NULL); tid = bd_tag_create(dev, align, bndry, maxaddr, maxsz, nsegs, maxsegsz, datarate, flags); if (tid == -1) { @@ -196,10 +197,11 @@ busdma_tag_create(PyObject *self, PyObje static PyObject * busdma_tag_derive(PyObject *self, PyObject *args) { - long align, bndry, maxaddr, maxsz, maxsegsz; - int ptid, tid, nsegs, datarate, flags; + u_long align, bndry, maxaddr, maxsz, maxsegsz; + u_int nsegs, datarate, flags; + int ptid, tid; - if (!PyArg_ParseTuple(args, "illllilii", &ptid, &align, &bndry, + if (!PyArg_ParseTuple(args, "ikkkkIkII", &ptid, &align, &bndry, &maxaddr, &maxsz, &nsegs, &maxsegsz, &datarate, &flags)) return (NULL); tid = bd_tag_derive(ptid, align, bndry, maxaddr, maxsz, nsegs, @@ -226,6 +228,37 @@ busdma_tag_destroy(PyObject *self, PyObj Py_RETURN_NONE; } +static PyObject * +busdma_mem_alloc(PyObject *self, PyObject *args) +{ + u_int flags; + int mdid, tid; + + if (!PyArg_ParseTuple(args, "iI", &tid, &flags)) + return (NULL); + mdid = bd_mem_alloc(tid, flags); + if (mdid == -1) { + PyErr_SetString(PyExc_IOError, strerror(errno)); + return (NULL); + } + return (Py_BuildValue("i", mdid)); +} + +static PyObject * +busdma_mem_free(PyObject *self, PyObject *args) +{ + int error, mdid; + + if (!PyArg_ParseTuple(args, "i", &mdid)) + return (NULL); + error = bd_mem_free(mdid); + if (error) { + PyErr_SetString(PyExc_IOError, strerror(error)); + return (NULL); + } + Py_RETURN_NONE; +} + static PyMethodDef bus_space_methods[] = { { "read_1", bus_read_1, METH_VARARGS, "Read a 1-byte data item." }, { "read_2", bus_read_2, METH_VARARGS, "Read a 2-byte data item." }, @@ -246,9 +279,16 @@ static PyMethodDef bus_space_methods[] = }; static PyMethodDef busdma_methods[] = { - { "tag_create", busdma_tag_create, METH_VARARGS, "Create a root tag." }, - { "tag_derive", busdma_tag_derive, METH_VARARGS, "Derive a child tag." }, - { "tag_destroy", busdma_tag_destroy, METH_VARARGS, "Destroy a tag." }, + { "tag_create", busdma_tag_create, METH_VARARGS, + "Create a root tag." }, + { "tag_derive", busdma_tag_derive, METH_VARARGS, + "Derive a child tag." }, + { "tag_destroy", busdma_tag_destroy, METH_VARARGS, + "Destroy a tag." }, + { "mem_alloc", busdma_mem_alloc, METH_VARARGS, + "Allocate memory according to the DMA constraints." }, + { "mem_free", busdma_mem_free, METH_VARARGS, + "Free allocated memory." }, { NULL, NULL, 0, NULL } }; Modified: head/tools/bus_space/busdma.c ============================================================================== --- head/tools/bus_space/busdma.c Mon Jun 8 03:01:19 2015 (r284145) +++ head/tools/bus_space/busdma.c Mon Jun 8 03:23:20 2015 (r284146) @@ -40,82 +40,101 @@ __FBSDID("$FreeBSD$"); #include "../../sys/dev/proto/proto_dev.h" -struct tag { - int tid; +struct obj { + int oid; + u_int type; +#define OBJ_TYPE_NONE 0 +#define OBJ_TYPE_TAG 1 +#define OBJ_TYPE_MD 2 u_int refcnt; int fd; - struct tag *ptag; + struct obj *parent; u_long key; - u_long align; - u_long bndry; - u_long maxaddr; + union { + struct { + unsigned long align; + unsigned long bndry; + unsigned long maxaddr; + unsigned long maxsz; + unsigned long maxsegsz; + unsigned long nsegs; + unsigned long datarate; + } tag; + struct { + } md; + } u; }; -static struct tag **tidtbl = NULL; -static int ntids = 0; +static struct obj **oidtbl = NULL; +static int noids = 0; -static struct tag * -tag_alloc(void) +static struct obj * +obj_alloc(u_int type) { - struct tag **newtbl, *tag; - int tid; + struct obj **newtbl, *obj; + int oid; - tag = malloc(sizeof(struct tag)); - tag->refcnt = 0; + obj = malloc(sizeof(struct obj)); + obj->type = type; + obj->refcnt = 0; - for (tid = 0; tid < ntids; tid++) { - if (tidtbl[tid] == 0) + for (oid = 0; oid < noids; oid++) { + if (oidtbl[oid] == 0) break; } - if (tid == ntids) { - newtbl = realloc(tidtbl, sizeof(struct tag *) * (ntids + 1)); + if (oid == noids) { + newtbl = realloc(oidtbl, sizeof(struct obj *) * (noids + 1)); if (newtbl == NULL) { - free(tag); + free(obj); return (NULL); } - tidtbl = newtbl; - ntids++; + oidtbl = newtbl; + noids++; } - tidtbl[tid] = tag; - tag->tid = tid; - return (tag); + oidtbl[oid] = obj; + obj->oid = oid; + return (obj); } static int -tag_free(struct tag *tag) +obj_free(struct obj *obj) { - tidtbl[tag->tid] = NULL; - free(tag); + oidtbl[obj->oid] = NULL; + free(obj); return (0); } -static struct tag * -tid_lookup(int tid) +static struct obj * +obj_lookup(int oid, u_int type) { - struct tag *tag; + struct obj *obj; - if (tid < 0 || tid >= ntids) { + if (oid < 0 || oid >= noids) { errno = EINVAL; return (NULL); } - tag = tidtbl[tid]; - if (tag->refcnt == 0) { + obj = oidtbl[oid]; + if (obj->refcnt == 0) { errno = ENXIO; return (NULL); } - return (tag); + if (type != OBJ_TYPE_NONE && obj->type != type) { + errno = ENODEV; + return (NULL); + } + return (obj); } -struct tag * -bd_tag_new(struct tag *ptag, int fd, u_long align, u_long bndry, +struct obj * +bd_tag_new(struct obj *ptag, int fd, u_long align, u_long bndry, u_long maxaddr, u_long maxsz, u_int nsegs, u_long maxsegsz, u_int datarate, u_int flags) { struct proto_ioc_busdma ioc; - struct tag *tag; + struct obj *tag; - tag = tag_alloc(); + tag = obj_alloc(OBJ_TYPE_TAG); if (tag == NULL) return (NULL); @@ -132,16 +151,20 @@ bd_tag_new(struct tag *ptag, int fd, u_l ioc.u.tag.datarate = datarate; ioc.u.tag.flags = flags; if (ioctl(fd, PROTO_IOC_BUSDMA, &ioc) == -1) { - tag_free(tag); + obj_free(tag); return (NULL); } tag->refcnt = 1; tag->fd = fd; - tag->ptag = ptag; - tag->key = ioc.key; - tag->align = ioc.u.tag.align; - tag->bndry = ioc.u.tag.bndry; - tag->maxaddr = ioc.u.tag.maxaddr; + tag->parent = ptag; + tag->key = ioc.result; + tag->u.tag.align = ioc.u.tag.align; + tag->u.tag.bndry = ioc.u.tag.bndry; + tag->u.tag.maxaddr = ioc.u.tag.maxaddr; + tag->u.tag.maxsz = ioc.u.tag.maxsz; + tag->u.tag.maxsegsz = ioc.u.tag.maxsegsz; + tag->u.tag.nsegs = ioc.u.tag.nsegs; + tag->u.tag.datarate = ioc.u.tag.datarate; return (tag); } @@ -149,7 +172,7 @@ int bd_tag_create(const char *dev, u_long align, u_long bndry, u_long maxaddr, u_long maxsz, u_int nsegs, u_long maxsegsz, u_int datarate, u_int flags) { - struct tag *tag; + struct obj *tag; int fd; fd = open(dev, O_RDWR); @@ -162,16 +185,16 @@ bd_tag_create(const char *dev, u_long al close(fd); return (-1); } - return (tag->tid); + return (tag->oid); } int bd_tag_derive(int ptid, u_long align, u_long bndry, u_long maxaddr, u_long maxsz, u_int nsegs, u_long maxsegsz, u_int datarate, u_int flags) { - struct tag *ptag, *tag; + struct obj *ptag, *tag; - ptag = tid_lookup(ptid); + ptag = obj_lookup(ptid, OBJ_TYPE_TAG); if (ptag == NULL) return (-1); @@ -179,20 +202,17 @@ bd_tag_derive(int ptid, u_long align, u_ maxsegsz, datarate, flags); if (tag == NULL) return (-1); - while (ptag != NULL) { - ptag->refcnt++; - ptag = ptag->ptag; - } - return (tag->tid); + ptag->refcnt++; + return (tag->oid); } int bd_tag_destroy(int tid) { struct proto_ioc_busdma ioc; - struct tag *ptag, *tag; + struct obj *ptag, *tag; - tag = tid_lookup(tid); + tag = obj_lookup(tid, OBJ_TYPE_TAG); if (tag == NULL) return (errno); if (tag->refcnt > 1) @@ -204,15 +224,62 @@ bd_tag_destroy(int tid) if (ioctl(tag->fd, PROTO_IOC_BUSDMA, &ioc) == -1) return (errno); - ptag = tag->ptag; - if (ptag == NULL) + if (tag->parent != NULL) + tag->parent->refcnt--; + else close(tag->fd); - else { - do { - ptag->refcnt--; - ptag = ptag->ptag; - } while (ptag != NULL); + obj_free(tag); + return (0); +} + +int +bd_mem_alloc(int tid, u_int flags) +{ + struct proto_ioc_busdma ioc; + struct obj *md, *tag; + + tag = obj_lookup(tid, OBJ_TYPE_TAG); + if (tag == NULL) + return (-1); + + md = obj_alloc(OBJ_TYPE_MD); + if (md == NULL) + return (-1); + + memset(&ioc, 0, sizeof(ioc)); + ioc.request = PROTO_IOC_BUSDMA_MEM_ALLOC; + ioc.u.mem.tag = tag->key; + ioc.u.mem.flags = flags; + if (ioctl(tag->fd, PROTO_IOC_BUSDMA, &ioc) == -1) { + obj_free(md); + return (-1); } - tag_free(tag); + + md->refcnt = 1; + md->fd = tag->fd; + md->parent = tag; + tag->refcnt++; + md->key = ioc.result; + return (md->oid); +} + +int +bd_mem_free(int mdid) +{ + struct proto_ioc_busdma ioc; + struct obj *md; + + md = obj_lookup(mdid, OBJ_TYPE_MD); + if (md == NULL) + return (errno); + + memset(&ioc, 0, sizeof(ioc)); + ioc.request = PROTO_IOC_BUSDMA_MEM_FREE; + ioc.key = md->key; + if (ioctl(md->fd, PROTO_IOC_BUSDMA, &ioc) == -1) + return (errno); + + md->parent->refcnt--; + obj_free(md); return (0); } Modified: head/tools/bus_space/busdma.h ============================================================================== --- head/tools/bus_space/busdma.h Mon Jun 8 03:01:19 2015 (r284145) +++ head/tools/bus_space/busdma.h Mon Jun 8 03:23:20 2015 (r284146) @@ -37,4 +37,7 @@ int bd_tag_derive(int tid, u_long align, u_int flags); int bd_tag_destroy(int tid); +int bd_mem_alloc(int tid, u_int flags); +int bd_mem_free(int mdid); + #endif /* _TOOLS_BUS_DMA_H_ */ From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 04:52:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C084A561 for ; Mon, 8 Jun 2015 04:52:39 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90C4311A2 for ; Mon, 8 Jun 2015 04:52:39 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id F1CCB205FC for ; Mon, 8 Jun 2015 00:52:36 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute6.internal (MEProxy); Mon, 08 Jun 2015 00:52:36 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=BwoO8MiQTtgIIzVuUlBIkOLY0z8=; b=YU/e/W iC63Anw9gBjBVKhqiipjbDH1yMMWIUWsZVQRO4/Nx4Jv0LNZOXBzuI4TrJQfy5bA NXvCqOGWk3yJgo819PxaRM4hhpg5SE85kBIrbYMNiRKPumXyibFF9JVpOF4QySiK qcdGDbmPzOwXrtNaiXYY69pDo9lG0ekLx0qjE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=BwoO8MiQTtgIIzV uUlBIkOLY0z8=; b=fKlhhTpdpBAiomc+z+rJ2T21Rvk212zyZL83qXqPa277tZW gOaErLG9tQJ8L+uP3kFH8cqTQ/2H+ZoH7CRkef46IrmxZD/GpsfPeFMYaja3nMaH pxSOl8f6dAmKU/UEXYpEiO5s8EXd0bZ2kzo/DnDNUJkE4WnaeIQm0H90DNpA= Received: by web6.nyi.internal (Postfix, from userid 99) id C601C46DFE; Mon, 8 Jun 2015 00:52:36 -0400 (EDT) Message-Id: <1433739156.3126307.289375233.42FD30F0@webmail.messagingengine.com> X-Sasl-Enc: ZKyMKGOGZyPF3ip5Y6lVlRACxL7N97rvQGNT5i1JSAq6 1433739156 From: Bruce Simpson To: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-b076c697 In-Reply-To: <201506080323.t583NKWB098393@svn.freebsd.org> References: <201506080323.t583NKWB098393@svn.freebsd.org> Subject: Re: svn commit: r284146 - in head/tools/bus_space: . C Python Date: Mon, 08 Jun 2015 05:52:36 +0100 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 04:52:39 -0000 Marcel, On Mon, 8 Jun 2015, at 04:23, Marcel Moolenaar wrote: > Log: > Add busdma_mem_alloc & busdma_mem_free. Nice! Is there a man page or documentation for this anywhere? Also: is it feasible to extend to build/attach to a VirtIO function? (May be PCI, not MMIO). cheers Bruce -- BMS (sent via webmail) From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 04:59:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A33C6E0; Mon, 8 Jun 2015 04:59:36 +0000 (UTC) (envelope-from alc@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0701E11CF; Mon, 8 Jun 2015 04:59:36 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t584xZCP043001; Mon, 8 Jun 2015 04:59:35 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t584xXnF042989; Mon, 8 Jun 2015 04:59:33 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201506080459.t584xXnF042989@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 8 Jun 2015 04:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284147 - in head/sys: amd64/include arm/include arm64/include i386/include mips/include powerpc/include sparc64/include vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 04:59:36 -0000 Author: alc Date: Mon Jun 8 04:59:32 2015 New Revision: 284147 URL: https://svnweb.freebsd.org/changeset/base/284147 Log: Retire VM_FREEPOOL_CACHE as the next step in eliminating PG_CACHE pages. Differential Revision: https://reviews.freebsd.org/D2712 Reviewed by: kib Sponsored by: EMC / Isilon Storage Division Modified: head/sys/amd64/include/vmparam.h head/sys/arm/include/vmparam.h head/sys/arm64/include/vmparam.h head/sys/i386/include/vmparam.h head/sys/mips/include/vmparam.h head/sys/powerpc/include/vmparam.h head/sys/sparc64/include/vmparam.h head/sys/vm/vm_page.c head/sys/vm/vm_reserv.c Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Mon Jun 8 03:23:20 2015 (r284146) +++ head/sys/amd64/include/vmparam.h Mon Jun 8 04:59:32 2015 (r284147) @@ -90,13 +90,12 @@ #define VM_PHYSSEG_MAX 63 /* - * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool + * Create two free page pools: VM_FREEPOOL_DEFAULT is the default pool * from which physical pages are allocated and VM_FREEPOOL_DIRECT is * the pool from which physical pages for page tables and small UMA * objects are allocated. */ -#define VM_NFREEPOOL 3 -#define VM_FREEPOOL_CACHE 2 +#define VM_NFREEPOOL 2 #define VM_FREEPOOL_DEFAULT 0 #define VM_FREEPOOL_DIRECT 1 Modified: head/sys/arm/include/vmparam.h ============================================================================== --- head/sys/arm/include/vmparam.h Mon Jun 8 03:23:20 2015 (r284146) +++ head/sys/arm/include/vmparam.h Mon Jun 8 04:59:32 2015 (r284147) @@ -84,13 +84,12 @@ #define VM_PHYSSEG_SPARSE /* - * Create two free page pools. Since the ARM kernel virtual address + * Create one free page pool. Since the ARM kernel virtual address * space does not include a mapping onto the machine's entire physical * memory, VM_FREEPOOL_DIRECT is defined as an alias for the default * pool, VM_FREEPOOL_DEFAULT. */ -#define VM_NFREEPOOL 2 -#define VM_FREEPOOL_CACHE 1 +#define VM_NFREEPOOL 1 #define VM_FREEPOOL_DEFAULT 0 #define VM_FREEPOOL_DIRECT 0 Modified: head/sys/arm64/include/vmparam.h ============================================================================== --- head/sys/arm64/include/vmparam.h Mon Jun 8 03:23:20 2015 (r284146) +++ head/sys/arm64/include/vmparam.h Mon Jun 8 04:59:32 2015 (r284147) @@ -75,13 +75,12 @@ #define VM_PHYSSEG_MAX 64 /* - * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool + * Create two free page pools: VM_FREEPOOL_DEFAULT is the default pool * from which physical pages are allocated and VM_FREEPOOL_DIRECT is * the pool from which physical pages for small UMA objects are * allocated. */ -#define VM_NFREEPOOL 3 -#define VM_FREEPOOL_CACHE 2 +#define VM_NFREEPOOL 2 #define VM_FREEPOOL_DEFAULT 0 #define VM_FREEPOOL_DIRECT 1 Modified: head/sys/i386/include/vmparam.h ============================================================================== --- head/sys/i386/include/vmparam.h Mon Jun 8 03:23:20 2015 (r284146) +++ head/sys/i386/include/vmparam.h Mon Jun 8 04:59:32 2015 (r284147) @@ -83,13 +83,12 @@ #define VM_PHYSSEG_MAX 17 /* - * Create two free page pools. Since the i386 kernel virtual address + * Create one free page pool. Since the i386 kernel virtual address * space does not include a mapping onto the machine's entire physical * memory, VM_FREEPOOL_DIRECT is defined as an alias for the default * pool, VM_FREEPOOL_DEFAULT. */ -#define VM_NFREEPOOL 2 -#define VM_FREEPOOL_CACHE 1 +#define VM_NFREEPOOL 1 #define VM_FREEPOOL_DEFAULT 0 #define VM_FREEPOOL_DIRECT 0 Modified: head/sys/mips/include/vmparam.h ============================================================================== --- head/sys/mips/include/vmparam.h Mon Jun 8 03:23:20 2015 (r284146) +++ head/sys/mips/include/vmparam.h Mon Jun 8 04:59:32 2015 (r284147) @@ -149,13 +149,12 @@ #define VM_PHYSSEG_SPARSE /* - * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool + * Create two free page pools: VM_FREEPOOL_DEFAULT is the default pool * from which physical pages are allocated and VM_FREEPOOL_DIRECT is * the pool from which physical pages for small UMA objects are * allocated. */ -#define VM_NFREEPOOL 3 -#define VM_FREEPOOL_CACHE 2 +#define VM_NFREEPOOL 2 #define VM_FREEPOOL_DEFAULT 0 #define VM_FREEPOOL_DIRECT 1 Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Mon Jun 8 03:23:20 2015 (r284146) +++ head/sys/powerpc/include/vmparam.h Mon Jun 8 04:59:32 2015 (r284147) @@ -136,13 +136,12 @@ struct pmap_physseg { #endif /* - * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool + * Create two free page pools: VM_FREEPOOL_DEFAULT is the default pool * from which physical pages are allocated and VM_FREEPOOL_DIRECT is * the pool from which physical pages for small UMA objects are * allocated. */ -#define VM_NFREEPOOL 3 -#define VM_FREEPOOL_CACHE 2 +#define VM_NFREEPOOL 2 #define VM_FREEPOOL_DEFAULT 0 #define VM_FREEPOOL_DIRECT 1 Modified: head/sys/sparc64/include/vmparam.h ============================================================================== --- head/sys/sparc64/include/vmparam.h Mon Jun 8 03:23:20 2015 (r284146) +++ head/sys/sparc64/include/vmparam.h Mon Jun 8 04:59:32 2015 (r284147) @@ -75,13 +75,12 @@ #define VM_PHYSSEG_MAX 64 /* - * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool + * Create two free page pools: VM_FREEPOOL_DEFAULT is the default pool * from which physical pages are allocated and VM_FREEPOOL_DIRECT is * the pool from which physical pages for small UMA objects are * allocated. */ -#define VM_NFREEPOOL 3 -#define VM_FREEPOOL_CACHE 2 +#define VM_NFREEPOOL 2 #define VM_FREEPOOL_DEFAULT 0 #define VM_FREEPOOL_DIRECT 1 Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Jun 8 03:23:20 2015 (r284146) +++ head/sys/vm/vm_page.c Mon Jun 8 04:59:32 2015 (r284147) @@ -2708,7 +2708,6 @@ vm_page_cache(vm_page_t m) #else if (TRUE) { #endif - vm_phys_set_pool(VM_FREEPOOL_CACHE, m, 0); vm_phys_free_pages(m, 0); } vm_page_free_wakeup(); Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Mon Jun 8 03:23:20 2015 (r284146) +++ head/sys/vm/vm_reserv.c Mon Jun 8 04:59:32 2015 (r284147) @@ -801,9 +801,6 @@ vm_reserv_free_page(vm_page_t m) rv = vm_reserv_from_page(m); if (rv->object == NULL) return (FALSE); - if ((m->flags & PG_CACHED) != 0 && m->pool != VM_FREEPOOL_CACHE) - vm_phys_set_pool(VM_FREEPOOL_CACHE, rv->pages, - VM_LEVEL_0_ORDER); vm_reserv_depopulate(rv, m - rv->pages); return (TRUE); } From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 05:06:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCFA68A1; Mon, 8 Jun 2015 05:06:18 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB88B1464; Mon, 8 Jun 2015 05:06:18 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5856Ime047620; Mon, 8 Jun 2015 05:06:18 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5856IND047619; Mon, 8 Jun 2015 05:06:18 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506080506.t5856IND047619@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 8 Jun 2015 05:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284148 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 05:06:18 -0000 Author: bapt Date: Mon Jun 8 05:06:17 2015 New Revision: 284148 URL: https://svnweb.freebsd.org/changeset/base/284148 Log: Fix typo Modified: head/usr.sbin/pw/pw_group.c Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Mon Jun 8 04:59:32 2015 (r284147) +++ head/usr.sbin/pw/pw_group.c Mon Jun 8 05:06:17 2015 (r284148) @@ -73,7 +73,7 @@ pw_group(int mode, char *name, long id, * next gid to stdout */ if (mode == M_NEXT) { - printf("%u\n", gr_gidpolicy(cnd, id)); + printf("%u\n", gr_gidpolicy(cnf, id)); return (EXIT_SUCCESS); } From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 05:10:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90328A66; Mon, 8 Jun 2015 05:10:58 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4680D161B; Mon, 8 Jun 2015 05:10:57 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from [10.1.254.15] (208.185.168.138.IPYX-104653-ZYO.zip.zayo.com [208.185.168.138] (may be forged)) (authenticated bits=0) by mail.xcllnt.net (8.14.9/8.14.9) with ESMTP id t585Albk047519 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 7 Jun 2015 22:10:48 -0700 (PDT) (envelope-from marcel@xcllnt.net) Subject: Re: svn commit: r284146 - in head/tools/bus_space: . C Python Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_CFD8F633-9FA7-43CE-8B8C-667855234E03"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Marcel Moolenaar In-Reply-To: <1433739156.3126307.289375233.42FD30F0@webmail.messagingengine.com> Date: Sun, 7 Jun 2015 22:10:41 -0700 Cc: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201506080323.t583NKWB098393@svn.freebsd.org> <1433739156.3126307.289375233.42FD30F0@webmail.messagingengine.com> To: Bruce Simpson X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 05:10:58 -0000 --Apple-Mail=_CFD8F633-9FA7-43CE-8B8C-667855234E03 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 7, 2015, at 9:52 PM, Bruce Simpson wrote: >=20 > Marcel, >=20 > On Mon, 8 Jun 2015, at 04:23, Marcel Moolenaar wrote: >> Log: >> Add busdma_mem_alloc & busdma_mem_free. >=20 > Nice! Is there a man page or documentation for this anywhere? Not yet. I want to flesh it out further before documenting. I=E2=80=99m not sure the API is stable enough yet. I=E2=80=99m still = figure things out as I go. > Also: is it feasible to extend to build/attach to a VirtIO function? > (May be PCI, not MMIO). I think so. If there=E2=80=99s an easy environment for me to play with, I can take a look. I think qemu would do right? -- Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_CFD8F633-9FA7-43CE-8B8C-667855234E03 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVdSPRAAoJEIda8t8f0tjjkRMP/jRYb1YCwMiDja9XOaPmRYpg rAkYqyHZJEbAMwU5ZU9G7Zv+P98/QsYDXzUfEZaV6o6uXfkMtBoRzsO4Z4oNK1HL 1g8jcljUBF5FkgGrq9DF6eiOxvBrbMAhDKpw5sQfhaMqTXFlrcexOU8/KrutnDPx uN9rYHBEYu9YlZJ4VzNkbOW9zAj6QrTr8cf+u3ohPKQ2Dvprlt3g7WoreB+R7Zcv 2zMyh0bxv0A7uNqlyMsvsHvzh9FOS9F6zvkRBREaWzbhQRQ5zR+/YJtviw3X+4f1 RWSEkOSO5xWFyck01xyFAlMKk2tKdgRhQaptvXuKSsiovpFkzsCbJtLy7WFhyZoy cHIiMkZW0VsuOBsz95lMWuRdlkPthfm/K4w9YvhAdOrl/ntdWt89xj6VvS6rs3Ko cJhVGZW2pZ3RS1c6C9qBgWVHJQlc4fmvPdZDVxFIGi6POmAk7p4lBO8kLyGrve/x wEyHwwWb24VJH1mbrvYdT2NzucaUsPvHgGCciPfbrciIPI9gbITaa0EmlkJcf+UI EYLBOS397dNuqEtylV57VRv0S2dcb8Y+kJAlp+HHJOIE+vzvmyw+dbnhejmN7N2H 1B1Zk4gducjYif6c97RWjWrONxZi8NxI7fPsJzBwrmzUIRCYovTHQrqbt4iuGyhu rQZVcEMeKDlLGn/fZBh1 =AgCz -----END PGP SIGNATURE----- --Apple-Mail=_CFD8F633-9FA7-43CE-8B8C-667855234E03-- From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 05:17:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04349C37 for ; Mon, 8 Jun 2015 05:17:36 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C60F216D3 for ; Mon, 8 Jun 2015 05:17:35 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id F2D6220396 for ; Mon, 8 Jun 2015 01:17:34 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute2.internal (MEProxy); Mon, 08 Jun 2015 01:17:34 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=dAe1VV3QN8kvYkZ/2yb1mAeiwG4=; b=adVstu Tw7uCR30RpqpwvRzjUav6qPAzzrs/NgYgVCFs1kwIx/jatQR47bNfm4jF41wK0r7 jL2QRrL+iQOi79ip2FzipMyBqZSZTzfTkInv5ISr5rWfmly8TnihBEK85sGYSqIj VD3+v4YUN+VmmNRnvdnEe/M8E75qxT96wC+DM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=dAe1VV3QN8kvYkZ /2yb1mAeiwG4=; b=bjN6JLSOKYdoAJWno2Yl81xzyM5OI7hxmukn8JnCwabhwQh 7BZBHwKxImZLYuqnACJg/d1uhhh3j9V96vLgg8h4nOxafsXNLDLN5Ep3ltaDFEfm yOIaQD5AfDbFUiqMhzEyJdIhEP6Bjec5EYMnv3xLzGpeLH2A3eu6IDWP76TM= Received: by web6.nyi.internal (Postfix, from userid 99) id BEEB546E53; Mon, 8 Jun 2015 01:17:34 -0400 (EDT) Message-Id: <1433740654.3134532.289382577.2D3A01C5@webmail.messagingengine.com> X-Sasl-Enc: 81lMipL/vc83lXU81zEDWMcWupFYYXcYSmCReKTo4HSk 1433740654 From: Bruce Simpson To: Marcel Moolenaar Cc: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, wca@FreeBSD.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-b076c697 In-Reply-To: References: <201506080323.t583NKWB098393@svn.freebsd.org> <1433739156.3126307.289375233.42FD30F0@webmail.messagingengine.com> Subject: Re: svn commit: r284146 - in head/tools/bus_space: . C Python Date: Mon, 08 Jun 2015 06:17:34 +0100 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 05:17:36 -0000 Marcel, (Cc: Will as he's expressed interest in this) No problem... still tied up here... On Mon, 8 Jun 2015, at 06:10, Marcel Moolenaar wrote: > > On Jun 7, 2015, at 9:52 PM, Bruce Simpson wrote: > > Nice! Is there a man page or documentation for this anywhere? >=20 > Not yet. I want to flesh it out further before documenting. > I=E2=80=99m not sure the API is stable enough yet. I=E2=80=99m still figu= re > things out as I go. > > Also: is it feasible to extend to build/attach to a VirtIO function? > > (May be PCI, not MMIO). >=20 > I think so. If there=E2=80=99s an easy environment for me to play > with, I can take a look. I think qemu would do right? If you load a FreeBSD VM into KVM, and turn on host-guest sharing, you'll see a VirtIO function for Plan 9's v9fs exposed on the PCI bus. This speaks a Linux-specific variant of the 9P protocol, 9P2000.L. FreeBSD currently does not understand how to talk to it, nor do our existing 9p ports. BHyve doesn't support host-guest sharing (yet). Note: I neither claim nor argue that this is the most efficient host-guest solution -- there are anecdotal reports that the claims IBM have made in published papers cannot be verified in production -- but it makes sense to re-use (and perhaps improve upon) what IBM have done here, for the sake of interop more than anything else. There is a FUSE-based implementation in Python, py9p, which might serve as the basis for a prototype. NetBSD have a newer alternative but it looks like more work to make it talk to the VirtIO function. --=20 BMS (sent via webmail) From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 05:21:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2AB5DBF for ; Mon, 8 Jun 2015 05:21:24 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D21B17C1 for ; Mon, 8 Jun 2015 05:21:24 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2589A20B3B for ; Mon, 8 Jun 2015 01:21:23 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute1.internal (MEProxy); Mon, 08 Jun 2015 01:21:23 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=vi/q7IvMQk6G76XeP2mbb4RXzao=; b=cZ/aOD VTCDLNPxirWUlspSKnALnguK2jHpSd2UVSz2tFnQobdDPwYyfIKhS11qcdOXLkN0 ll9oTbIyDC9hHqJWzg89AEfi7kzuBNCb2bZ8fbuvneLGdCKws+EvirdZXfVfpkSh jWB5xJYcT2SEGXGrqd3cYhce6IAbZmSabWSOg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=vi/q7IvMQk6G76X eP2mbb4RXzao=; b=VofdBOVah9pnYn+rOh4GZGmxhQTahno6ECFokyfCVMDCgJB DxsuFArcRiHsavWvGYdJ1mqAl6NWqP5H1PoeBOYbw4cqHuScgRdW5LVPkynGqqUx OrSEdZIZYbHHr/gPdDj035rAMmpYB/8J6HtezHvBP/yAEKedGr0/TEpPfrFs= Received: by web6.nyi.internal (Postfix, from userid 99) id D086E46E79; Mon, 8 Jun 2015 01:21:22 -0400 (EDT) Message-Id: <1433740882.3135677.289384481.368BBD98@webmail.messagingengine.com> X-Sasl-Enc: FqClhRLCkATbRY9rGR7ct0JLrmfNRWpF+5ANnt/MwjIN 1433740882 From: Bruce Simpson To: Marcel Moolenaar Cc: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-b076c697 In-Reply-To: References: <201506080323.t583NKWB098393@svn.freebsd.org> <1433739156.3126307.289375233.42FD30F0@webmail.messagingengine.com> Subject: Re: svn commit: r284146 - in head/tools/bus_space: . C Python Date: Mon, 08 Jun 2015 06:21:22 +0100 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 05:21:24 -0000 On Mon, 8 Jun 2015, at 06:10, Marcel Moolenaar wrote: > > Also: is it feasible to extend to build/attach to a VirtIO function? > > (May be PCI, not MMIO). >=20 > I think so. If there=E2=80=99s an easy environment for me to play > with, I can take a look. I think qemu would do right? I can't speak to the MMIO case, but it may be of interest for CHERI. This was added to VirtIO to support paravirtualization in emulators for non-x86 SoCs (e.g. ARM, MIPS). [See VirtIO spec white paper.] --=20 BMS (sent via webmail) From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 05:27:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA10BF43; Mon, 8 Jun 2015 05:27:35 +0000 (UTC) (envelope-from bapt@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8829190E; Mon, 8 Jun 2015 05:27:35 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t585RZVp057442; Mon, 8 Jun 2015 05:27:35 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t585RYth057438; Mon, 8 Jun 2015 05:27:34 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201506080527.t585RYth057438@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 8 Jun 2015 05:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284149 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 05:27:36 -0000 Author: bapt Date: Mon Jun 8 05:27:34 2015 New Revision: 284149 URL: https://svnweb.freebsd.org/changeset/base/284149 Log: backout remove of -q option for pw [user|group] next While the return code is broken, some corner case usage depends on the functionnality, so backout until we get better regression tests covering those corner case usage. Modified: head/usr.sbin/pw/pw.8 head/usr.sbin/pw/pw.c head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw.8 ============================================================================== --- head/usr.sbin/pw/pw.8 Mon Jun 8 05:06:17 2015 (r284148) +++ head/usr.sbin/pw/pw.8 Mon Jun 8 05:27:34 2015 (r284149) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 7, 2015 +.Dd June 3, 2015 .Dt PW 8 .Os .Sh NAME @@ -128,6 +128,7 @@ .Op Fl V Ar etcdir .Ar usernext .Op Fl C Ar config +.Op Fl q .Nm .Op Fl R Ar rootdir .Op Fl V Ar etcdir @@ -183,6 +184,7 @@ .Op Fl V Ar etcdir .Ar groupnext .Op Fl C Ar config +.Op Fl q .Nm .Op Fl R Ar rootdir .Op Fl V Ar etcdir Modified: head/usr.sbin/pw/pw.c ============================================================================== --- head/usr.sbin/pw/pw.c Mon Jun 8 05:06:17 2015 (r284148) +++ head/usr.sbin/pw/pw.c Mon Jun 8 05:27:34 2015 (r284149) @@ -113,7 +113,7 @@ main(int argc, char *argv[]) "R:V:C:qn:u:rY", "R:V:C:qn:u:c:d:e:p:g:G:mM:l:k:s:w:L:h:H:FNPY", "R:V:C:qn:u:FPa7", - "R:V:C:", + "R:V:C:q", "R:V:C:q", "R:V:C:q" }, @@ -122,7 +122,7 @@ main(int argc, char *argv[]) "R:V:C:qn:g:Y", "R:V:C:qn:d:g:l:h:H:FM:m:NPY", "R:V:C:qn:g:FPa", - "R:V:C:" + "R:V:C:q" } }; @@ -469,7 +469,8 @@ cmdhelp(int mode, int which) "usage: pw usernext [switches]\n" "\t-V etcdir alternate /etc location\n" "\t-R rootir alternate root directory\n" - "\t-C config configuration file\n", + "\t-C config configuration file\n" + "\t-q quiet operation\n", "usage pw: lock [switches]\n" "\t-V etcdir alternate /etc locations\n" "\t-C config configuration file\n" @@ -523,6 +524,7 @@ cmdhelp(int mode, int which) "\t-V etcdir alternate /etc location\n" "\t-R rootir alternate root directory\n" "\t-C config configuration file\n" + "\t-q quiet operation\n" } }; Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Mon Jun 8 05:06:17 2015 (r284148) +++ head/usr.sbin/pw/pw_group.c Mon Jun 8 05:27:34 2015 (r284149) @@ -73,8 +73,11 @@ pw_group(int mode, char *name, long id, * next gid to stdout */ if (mode == M_NEXT) { - printf("%u\n", gr_gidpolicy(cnf, id)); - return (EXIT_SUCCESS); + gid_t next = gr_gidpolicy(cnf, id); + if (getarg(args, 'q')) + return next; + printf("%u\n", next); + return EXIT_SUCCESS; } if (mode == M_PRINT && getarg(args, 'a')) { Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Mon Jun 8 05:06:17 2015 (r284148) +++ head/usr.sbin/pw/pw_user.c Mon Jun 8 05:27:34 2015 (r284149) @@ -158,10 +158,14 @@ pw_user(int mode, char *name, long id, s * With M_NEXT, we only need to return the * next uid to stdout */ - if (mode == M_NEXT) { - printf("%u:", pw_uidpolicy(cnf, id)); + if (mode == M_NEXT) + { + uid_t next = pw_uidpolicy(cnf, id); + if (getarg(args, 'q')) + return next; + printf("%u:", next); pw_group(mode, name, -1, args); - return (EXIT_SUCCESS); + return EXIT_SUCCESS; } /* From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 12:52:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8FF217F; Mon, 8 Jun 2015 12:52:41 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7994169A; Mon, 8 Jun 2015 12:52:41 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58Cqfai098438; Mon, 8 Jun 2015 12:52:41 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58Cqf39098437; Mon, 8 Jun 2015 12:52:41 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506081252.t58Cqf39098437@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 8 Jun 2015 12:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284151 - head/sys/geom/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 12:52:42 -0000 Author: ae Date: Mon Jun 8 12:52:41 2015 New Revision: 284151 URL: https://svnweb.freebsd.org/changeset/base/284151 Log: Teach G_PART_GPT class to handle g_resize_provider event. MFC after: 10 days Modified: head/sys/geom/part/g_part_gpt.c Modified: head/sys/geom/part/g_part_gpt.c ============================================================================== --- head/sys/geom/part/g_part_gpt.c Mon Jun 8 07:06:33 2015 (r284150) +++ head/sys/geom/part/g_part_gpt.c Mon Jun 8 12:52:41 2015 (r284151) @@ -760,7 +760,7 @@ g_part_gpt_resize(struct g_part_table *b struct g_part_gpt_entry *entry; if (baseentry == NULL) - return (EOPNOTSUPP); + return (g_part_gpt_recover(basetable)); entry = (struct g_part_gpt_entry *)baseentry; baseentry->gpe_end = baseentry->gpe_start + gpp->gpp_size - 1; From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 13:23:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C6FA699; Mon, 8 Jun 2015 13:23:58 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A9081DE8; Mon, 8 Jun 2015 13:23:58 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58DNwT9013533; Mon, 8 Jun 2015 13:23:58 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58DNvdN013522; Mon, 8 Jun 2015 13:23:57 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201506081323.t58DNvdN013522@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 8 Jun 2015 13:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284152 - in head: share/man/man4 sys/conf sys/modules/geom/geom_map X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 13:23:58 -0000 Author: ae Date: Mon Jun 8 13:23:56 2015 New Revision: 284152 URL: https://svnweb.freebsd.org/changeset/base/284152 Log: Add makefile to build geom_map kld. Document some GEOM_* options in NOTES and geom(4). Added: head/sys/modules/geom/geom_map/ head/sys/modules/geom/geom_map/Makefile (contents, props changed) Modified: head/share/man/man4/geom.4 head/share/man/man4/geom_map.4 head/sys/conf/NOTES head/sys/conf/options Modified: head/share/man/man4/geom.4 ============================================================================== --- head/share/man/man4/geom.4 Mon Jun 8 12:52:41 2015 (r284151) +++ head/share/man/man4/geom.4 Mon Jun 8 13:23:56 2015 (r284152) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 10, 2013 +.Dd June 8, 2015 .Dt GEOM 4 .Os .Sh NAME @@ -52,12 +52,14 @@ .Cd options GEOM_JOURNAL .Cd options GEOM_LABEL .Cd options GEOM_LINUX_LVM +.Cd options GEOM_MAP .Cd options GEOM_MBR .Cd options GEOM_MIRROR .Cd options GEOM_MULTIPATH .Cd options GEOM_NOP .Cd options GEOM_PART_APM .Cd options GEOM_PART_BSD +.Cd options GEOM_PART_BSD64 .Cd options GEOM_PART_EBR .Cd options GEOM_PART_EBR_COMPAT .Cd options GEOM_PART_GPT @@ -71,6 +73,7 @@ .Cd options GEOM_SHSEC .Cd options GEOM_STRIPE .Cd options GEOM_SUNLABEL +.Cd options GEOM_UNCOMPRESS .Cd options GEOM_UZIP .Cd options GEOM_VIRSTOR .Cd options GEOM_VOL Modified: head/share/man/man4/geom_map.4 ============================================================================== --- head/share/man/man4/geom_map.4 Mon Jun 8 12:52:41 2015 (r284151) +++ head/share/man/man4/geom_map.4 Mon Jun 8 13:23:56 2015 (r284152) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 2011 +.Dd June 8, 2015 .Dt GEOM_MAP 4 .Os .Sh NAME @@ -36,7 +36,7 @@ To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent -.Cd "device geom_map" +.Cd "options geom_map" .Ed .Sh DESCRIPTION The Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Jun 8 12:52:41 2015 (r284151) +++ head/sys/conf/NOTES Mon Jun 8 13:23:56 2015 (r284152) @@ -156,6 +156,7 @@ options GEOM_GATE # Userland services. options GEOM_JOURNAL # Journaling. options GEOM_LABEL # Providers labelization. options GEOM_LINUX_LVM # Linux LVM2 volumes +options GEOM_MAP # Map based partitioning options GEOM_MBR # DOS/MBR partitioning options GEOM_MIRROR # Disk mirroring. options GEOM_MULTIPATH # Disk multipath @@ -176,6 +177,7 @@ options GEOM_RAID3 # RAID3 functionali options GEOM_SHSEC # Shared secret. options GEOM_STRIPE # Disk striping. options GEOM_SUNLABEL # Sun/Solaris partitioning +options GEOM_UNCOMPRESS # Read-only compressed disks (lzma, zip) options GEOM_UZIP # Read-only compressed disks options GEOM_VINUM # Vinum logical volume manager options GEOM_VIRSTOR # Virtual storage. Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Mon Jun 8 12:52:41 2015 (r284151) +++ head/sys/conf/options Mon Jun 8 13:23:56 2015 (r284152) @@ -108,6 +108,7 @@ GEOM_JOURNAL opt_geom.h GEOM_LABEL opt_geom.h GEOM_LABEL_GPT opt_geom.h GEOM_LINUX_LVM opt_geom.h +GEOM_MAP opt_geom.h GEOM_MBR opt_geom.h GEOM_MIRROR opt_geom.h GEOM_MULTIPATH opt_geom.h Added: head/sys/modules/geom/geom_map/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/geom/geom_map/Makefile Mon Jun 8 13:23:56 2015 (r284152) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../geom + +KMOD= geom_map +SRCS= geom_map.c bus_if.h device_if.h + +.include From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 14:06:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F519E33; Mon, 8 Jun 2015 14:06:48 +0000 (UTC) (envelope-from jhb@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 312821872; Mon, 8 Jun 2015 14:06:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58E6mOD033493; Mon, 8 Jun 2015 14:06:48 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58E6mvA033492; Mon, 8 Jun 2015 14:06:48 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506081406.t58E6mvA033492@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 8 Jun 2015 14:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284153 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 14:06:48 -0000 Author: jhb Date: Mon Jun 8 14:06:47 2015 New Revision: 284153 URL: https://svnweb.freebsd.org/changeset/base/284153 Log: Add an internal "locked" variant of linker_file_lookup_set() and change the public function to acquire the global linker lock directly. This permits linker_file_lookup_set() to be safely used from other modules. Modified: head/sys/kern/kern_linker.c Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Mon Jun 8 13:23:56 2015 (r284152) +++ head/sys/kern/kern_linker.c Mon Jun 8 14:06:47 2015 (r284153) @@ -137,6 +137,8 @@ static int linker_file_add_dependency(li linker_file_t dep); static caddr_t linker_file_lookup_symbol_internal(linker_file_t file, const char* name, int deps); +static int linker_file_lookup_set_locked(linker_file_t file, + const char *name, void *firstp, void *lastp, int *countp); static int linker_load_module(const char *kldname, const char *modname, struct linker_file *parent, const struct mod_depend *verinfo, struct linker_file **lfpp); @@ -189,7 +191,8 @@ linker_file_sysinit(linker_file_t lf) sx_assert(&kld_sx, SA_XLOCKED); - if (linker_file_lookup_set(lf, "sysinit_set", &start, &stop, NULL) != 0) + if (linker_file_lookup_set_locked(lf, "sysinit_set", &start, &stop, + NULL) != 0) return; /* * Perform a bubble sort of the system initialization objects by @@ -237,7 +240,7 @@ linker_file_sysuninit(linker_file_t lf) sx_assert(&kld_sx, SA_XLOCKED); - if (linker_file_lookup_set(lf, "sysuninit_set", &start, &stop, + if (linker_file_lookup_set_locked(lf, "sysuninit_set", &start, &stop, NULL) != 0) return; @@ -288,7 +291,8 @@ linker_file_register_sysctls(linker_file sx_assert(&kld_sx, SA_XLOCKED); - if (linker_file_lookup_set(lf, "sysctl_set", &start, &stop, NULL) != 0) + if (linker_file_lookup_set_locked(lf, "sysctl_set", &start, &stop, + NULL) != 0) return; sx_xunlock(&kld_sx); @@ -309,7 +313,8 @@ linker_file_unregister_sysctls(linker_fi sx_assert(&kld_sx, SA_XLOCKED); - if (linker_file_lookup_set(lf, "sysctl_set", &start, &stop, NULL) != 0) + if (linker_file_lookup_set_locked(lf, "sysctl_set", &start, &stop, + NULL) != 0) return; sx_xunlock(&kld_sx); @@ -332,7 +337,7 @@ linker_file_register_modules(linker_file sx_assert(&kld_sx, SA_XLOCKED); - if (linker_file_lookup_set(lf, "modmetadata_set", &start, + if (linker_file_lookup_set_locked(lf, "modmetadata_set", &start, &stop, NULL) != 0) { /* * This fallback should be unnecessary, but if we get booted @@ -742,8 +747,8 @@ linker_file_add_dependency(linker_file_t * This function is used in this file so we can avoid having lots of (void **) * casts. */ -int -linker_file_lookup_set(linker_file_t file, const char *name, +static int +linker_file_lookup_set_locked(linker_file_t file, const char *name, void *firstp, void *lastp, int *countp) { @@ -751,6 +756,19 @@ linker_file_lookup_set(linker_file_t fil return (LINKER_LOOKUP_SET(file, name, firstp, lastp, countp)); } +int +linker_file_lookup_set(linker_file_t file, const char *name, + void *firstp, void *lastp, int *countp) +{ + int error; + + sx_slock(&kld_sx); + error = linker_file_lookup_set_locked(file, name, firstp, lastp, + countp); + sx_sunlock(&kld_sx); + return (error); +} + /* * List all functions in a file. */ @@ -1469,8 +1487,8 @@ linker_preload(void *arg) /* * First get a list of stuff in the kernel. */ - if (linker_file_lookup_set(linker_kernel_file, MDT_SETNAME, &start, - &stop, NULL) == 0) + if (linker_file_lookup_set_locked(linker_kernel_file, MDT_SETNAME, + &start, &stop, NULL) == 0) linker_addmodules(linker_kernel_file, start, stop, 1); /* @@ -1479,7 +1497,7 @@ linker_preload(void *arg) */ restart: TAILQ_FOREACH(lf, &loaded_files, loaded) { - error = linker_file_lookup_set(lf, MDT_SETNAME, &start, + error = linker_file_lookup_set_locked(lf, MDT_SETNAME, &start, &stop, NULL); /* * First, look to see if we would successfully link with this @@ -1573,7 +1591,7 @@ restart: panic("cannot add dependency"); } lf->userrefs++; /* so we can (try to) kldunload it */ - error = linker_file_lookup_set(lf, MDT_SETNAME, &start, + error = linker_file_lookup_set_locked(lf, MDT_SETNAME, &start, &stop, NULL); if (!error) { for (mdp = start; mdp < stop; mdp++) { @@ -1610,7 +1628,7 @@ restart: goto fail; } linker_file_register_modules(lf); - if (linker_file_lookup_set(lf, "sysinit_set", &si_start, + if (linker_file_lookup_set_locked(lf, "sysinit_set", &si_start, &si_stop, NULL) == 0) sysinit_add(si_start, si_stop); linker_file_register_sysctls(lf); @@ -2042,7 +2060,7 @@ linker_load_dependencies(linker_file_t l if (error) return (error); } - if (linker_file_lookup_set(lf, MDT_SETNAME, &start, &stop, + if (linker_file_lookup_set_locked(lf, MDT_SETNAME, &start, &stop, &count) != 0) return (0); for (mdp = start; mdp < stop; mdp++) { From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 15:17:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 085B39D0; Mon, 8 Jun 2015 15:17:12 +0000 (UTC) (envelope-from br@bsdpad.com) Received: from bsdpad.com (xc1.bsdpad.com [195.154.136.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C28B619FF; Mon, 8 Jun 2015 15:17:11 +0000 (UTC) (envelope-from br@bsdpad.com) Received: from localhost ([127.0.0.1] helo=bsdpad.com) by bsdpad.com with smtp (Exim 4.83 (FreeBSD)) (envelope-from ) id 1Z1yJp-0009qx-OK; Mon, 08 Jun 2015 15:46:29 +0100 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Mon, 8 Jun 2015 15:46:29 +0100 (BST) Date: Mon, 8 Jun 2015 15:46:29 +0100 From: Ruslan Bukin To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284153 - head/sys/kern Message-ID: <20150608144629.GA37834@bsdpad.com> References: <201506081406.t58E6mvA033492@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201506081406.t58E6mvA033492@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 15:17:12 -0000 For some reason it hangs for me after 'random' lines on arm64 FreeBSD clang version 3.6.1 (tags/RELEASE_361/final 237755) 20150525 CPU: ARM Cortex-A57 r1p0 IMPLEMENT ME: dtrace_toxic_ranges random: entropy device infrastructure driver random: selecting highest priority adaptor On Mon, Jun 08, 2015 at 02:06:48PM +0000, John Baldwin wrote: > Author: jhb > Date: Mon Jun 8 14:06:47 2015 > New Revision: 284153 > URL: https://svnweb.freebsd.org/changeset/base/284153 > > Log: > Add an internal "locked" variant of linker_file_lookup_set() and change > the public function to acquire the global linker lock directly. This > permits linker_file_lookup_set() to be safely used from other modules. > > Modified: > head/sys/kern/kern_linker.c > > Modified: head/sys/kern/kern_linker.c > ============================================================================== > --- head/sys/kern/kern_linker.c Mon Jun 8 13:23:56 2015 (r284152) > +++ head/sys/kern/kern_linker.c Mon Jun 8 14:06:47 2015 (r284153) > @@ -137,6 +137,8 @@ static int linker_file_add_dependency(li > linker_file_t dep); > static caddr_t linker_file_lookup_symbol_internal(linker_file_t file, > const char* name, int deps); > +static int linker_file_lookup_set_locked(linker_file_t file, > + const char *name, void *firstp, void *lastp, int *countp); > static int linker_load_module(const char *kldname, > const char *modname, struct linker_file *parent, > const struct mod_depend *verinfo, struct linker_file **lfpp); > @@ -189,7 +191,8 @@ linker_file_sysinit(linker_file_t lf) > > sx_assert(&kld_sx, SA_XLOCKED); > > - if (linker_file_lookup_set(lf, "sysinit_set", &start, &stop, NULL) != 0) > + if (linker_file_lookup_set_locked(lf, "sysinit_set", &start, &stop, > + NULL) != 0) > return; > /* > * Perform a bubble sort of the system initialization objects by > @@ -237,7 +240,7 @@ linker_file_sysuninit(linker_file_t lf) > > sx_assert(&kld_sx, SA_XLOCKED); > > - if (linker_file_lookup_set(lf, "sysuninit_set", &start, &stop, > + if (linker_file_lookup_set_locked(lf, "sysuninit_set", &start, &stop, > NULL) != 0) > return; > > @@ -288,7 +291,8 @@ linker_file_register_sysctls(linker_file > > sx_assert(&kld_sx, SA_XLOCKED); > > - if (linker_file_lookup_set(lf, "sysctl_set", &start, &stop, NULL) != 0) > + if (linker_file_lookup_set_locked(lf, "sysctl_set", &start, &stop, > + NULL) != 0) > return; > > sx_xunlock(&kld_sx); > @@ -309,7 +313,8 @@ linker_file_unregister_sysctls(linker_fi > > sx_assert(&kld_sx, SA_XLOCKED); > > - if (linker_file_lookup_set(lf, "sysctl_set", &start, &stop, NULL) != 0) > + if (linker_file_lookup_set_locked(lf, "sysctl_set", &start, &stop, > + NULL) != 0) > return; > > sx_xunlock(&kld_sx); > @@ -332,7 +337,7 @@ linker_file_register_modules(linker_file > > sx_assert(&kld_sx, SA_XLOCKED); > > - if (linker_file_lookup_set(lf, "modmetadata_set", &start, > + if (linker_file_lookup_set_locked(lf, "modmetadata_set", &start, > &stop, NULL) != 0) { > /* > * This fallback should be unnecessary, but if we get booted > @@ -742,8 +747,8 @@ linker_file_add_dependency(linker_file_t > * This function is used in this file so we can avoid having lots of (void **) > * casts. > */ > -int > -linker_file_lookup_set(linker_file_t file, const char *name, > +static int > +linker_file_lookup_set_locked(linker_file_t file, const char *name, > void *firstp, void *lastp, int *countp) > { > > @@ -751,6 +756,19 @@ linker_file_lookup_set(linker_file_t fil > return (LINKER_LOOKUP_SET(file, name, firstp, lastp, countp)); > } > > +int > +linker_file_lookup_set(linker_file_t file, const char *name, > + void *firstp, void *lastp, int *countp) > +{ > + int error; > + > + sx_slock(&kld_sx); > + error = linker_file_lookup_set_locked(file, name, firstp, lastp, > + countp); > + sx_sunlock(&kld_sx); > + return (error); > +} > + > /* > * List all functions in a file. > */ > @@ -1469,8 +1487,8 @@ linker_preload(void *arg) > /* > * First get a list of stuff in the kernel. > */ > - if (linker_file_lookup_set(linker_kernel_file, MDT_SETNAME, &start, > - &stop, NULL) == 0) > + if (linker_file_lookup_set_locked(linker_kernel_file, MDT_SETNAME, > + &start, &stop, NULL) == 0) > linker_addmodules(linker_kernel_file, start, stop, 1); > > /* > @@ -1479,7 +1497,7 @@ linker_preload(void *arg) > */ > restart: > TAILQ_FOREACH(lf, &loaded_files, loaded) { > - error = linker_file_lookup_set(lf, MDT_SETNAME, &start, > + error = linker_file_lookup_set_locked(lf, MDT_SETNAME, &start, > &stop, NULL); > /* > * First, look to see if we would successfully link with this > @@ -1573,7 +1591,7 @@ restart: > panic("cannot add dependency"); > } > lf->userrefs++; /* so we can (try to) kldunload it */ > - error = linker_file_lookup_set(lf, MDT_SETNAME, &start, > + error = linker_file_lookup_set_locked(lf, MDT_SETNAME, &start, > &stop, NULL); > if (!error) { > for (mdp = start; mdp < stop; mdp++) { > @@ -1610,7 +1628,7 @@ restart: > goto fail; > } > linker_file_register_modules(lf); > - if (linker_file_lookup_set(lf, "sysinit_set", &si_start, > + if (linker_file_lookup_set_locked(lf, "sysinit_set", &si_start, > &si_stop, NULL) == 0) > sysinit_add(si_start, si_stop); > linker_file_register_sysctls(lf); > @@ -2042,7 +2060,7 @@ linker_load_dependencies(linker_file_t l > if (error) > return (error); > } > - if (linker_file_lookup_set(lf, MDT_SETNAME, &start, &stop, > + if (linker_file_lookup_set_locked(lf, MDT_SETNAME, &start, &stop, > &count) != 0) > return (0); > for (mdp = start; mdp < stop; mdp++) { > From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 16:07:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B03335D0; Mon, 8 Jun 2015 16:07:08 +0000 (UTC) (envelope-from emaste@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E4741697; Mon, 8 Jun 2015 16:07:08 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58G78vf092856; Mon, 8 Jun 2015 16:07:08 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58G78EF092855; Mon, 8 Jun 2015 16:07:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506081607.t58G78EF092855@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 8 Jun 2015 16:07:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284157 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 16:07:08 -0000 Author: emaste Date: Mon Jun 8 16:07:07 2015 New Revision: 284157 URL: https://svnweb.freebsd.org/changeset/base/284157 Log: Add user facing errors for exceeding process memory limits Previously the process terminating with SIGABRT at startup was the only notification. PR: 200617 Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2731 Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Mon Jun 8 15:24:24 2015 (r284156) +++ head/sys/kern/imgact_elf.c Mon Jun 8 16:07:07 2015 (r284157) @@ -732,7 +732,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i u_long addr, baddr, et_dyn_addr, entry = 0, proghdr = 0; int32_t osrel = 0; int error = 0, i, n, interp_name_len = 0; - const char *interp = NULL, *newinterp = NULL; + const char *err_str = NULL, *interp = NULL, *newinterp = NULL; Elf_Brandinfo *brand_info; char *path; struct sysentvec *sv; @@ -755,11 +755,14 @@ __CONCAT(exec_, __elfN(imgact))(struct i if ((hdr->e_phoff > PAGE_SIZE) || (u_int)hdr->e_phentsize * hdr->e_phnum > PAGE_SIZE - hdr->e_phoff) { /* Only support headers in first page for now */ + uprintf("Program headers not in the first page\n"); return (ENOEXEC); } - phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); - if (!aligned(phdr, Elf_Addr)) + phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); + if (!aligned(phdr, Elf_Addr)) { + uprintf("Unaligned program headers\n"); return (ENOEXEC); + } n = 0; baddr = 0; for (i = 0; i < hdr->e_phnum; i++) { @@ -773,8 +776,10 @@ __CONCAT(exec_, __elfN(imgact))(struct i /* Path to interpreter */ if (phdr[i].p_filesz > MAXPATHLEN || phdr[i].p_offset > PAGE_SIZE || - phdr[i].p_filesz > PAGE_SIZE - phdr[i].p_offset) + phdr[i].p_filesz > PAGE_SIZE - phdr[i].p_offset) { + uprintf("Invalid PT_INTERP\n"); return (ENOEXEC); + } interp = imgp->image_header + phdr[i].p_offset; interp_name_len = phdr[i].p_filesz; break; @@ -795,8 +800,10 @@ __CONCAT(exec_, __elfN(imgact))(struct i return (ENOEXEC); } if (hdr->e_type == ET_DYN) { - if ((brand_info->flags & BI_CAN_EXEC_DYN) == 0) + if ((brand_info->flags & BI_CAN_EXEC_DYN) == 0) { + uprintf("Cannot execute shared object\n"); return (ENOEXEC); + } /* * Honour the base load address from the dso if it is * non-zero for some reason. @@ -901,12 +908,19 @@ __CONCAT(exec_, __elfN(imgact))(struct i * not actually fault in all the segments pages. */ PROC_LOCK(imgp->proc); - if (data_size > lim_cur(imgp->proc, RLIMIT_DATA) || - text_size > maxtsiz || - total_size > lim_cur(imgp->proc, RLIMIT_VMEM) || - racct_set(imgp->proc, RACCT_DATA, data_size) != 0 || - racct_set(imgp->proc, RACCT_VMEM, total_size) != 0) { + if (data_size > lim_cur(imgp->proc, RLIMIT_DATA)) + err_str = "Data segment size exceeds process limit"; + else if (text_size > maxtsiz) + err_str = "Text segment size exceeds system limit"; + else if (total_size > lim_cur(imgp->proc, RLIMIT_VMEM)) + err_str = "Total segment size exceeds process limit"; + else if (racct_set(imgp->proc, RACCT_DATA, data_size) != 0) + err_str = "Data segment size exceeds resource limit"; + else if (racct_set(imgp->proc, RACCT_VMEM, total_size) != 0) + err_str = "Total segment size exceeds resource limit"; + if (err_str != NULL) { PROC_UNLOCK(imgp->proc); + uprintf("%s\n", err_str); return (ENOMEM); } From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 17:39:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02F2518A; Mon, 8 Jun 2015 17:39:26 +0000 (UTC) (envelope-from dchagin@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB4C11EE2; Mon, 8 Jun 2015 17:39:25 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58HdPV6039892; Mon, 8 Jun 2015 17:39:25 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58HdP8h039891; Mon, 8 Jun 2015 17:39:25 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201506081739.t58HdP8h039891@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Mon, 8 Jun 2015 17:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284159 - head/sys/amd64/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 17:39:26 -0000 Author: dchagin Date: Mon Jun 8 17:39:25 2015 New Revision: 284159 URL: https://svnweb.freebsd.org/changeset/base/284159 Log: Futex is an aligned 32-bit integer. Use the proper instruction and operand when dereferencing futex pointer. Modified: head/sys/amd64/linux/linux_support.s Modified: head/sys/amd64/linux/linux_support.s ============================================================================== --- head/sys/amd64/linux/linux_support.s Mon Jun 8 16:24:43 2015 (r284158) +++ head/sys/amd64/linux/linux_support.s Mon Jun 8 17:39:25 2015 (r284159) @@ -45,9 +45,9 @@ ENTRY(futex_xchgl) movq $VM_MAXUSER_ADDRESS-4,%rax cmpq %rax,%rsi ja futex_fault - xchgq %rdi,(%rsi) - movq %rdi,(%rdx) - xorq %rax,%rax + xchgl %edi,(%rsi) + movl %edi,(%rdx) + xorl %eax,%eax movq %rax,PCB_ONFAULT(%r8) ret @@ -60,9 +60,9 @@ ENTRY(futex_addl) #ifdef SMP lock #endif - xaddq %rdi,(%rsi) - movq %rdi,(%rdx) - xorq %rax,%rax + xaddl %edi,(%rsi) + movl %edi,(%rdx) + xorl %eax,%eax movq %rax,PCB_ONFAULT(%r8) ret @@ -72,16 +72,16 @@ ENTRY(futex_orl) movq $VM_MAXUSER_ADDRESS-4,%rax cmpq %rax,%rsi ja futex_fault - movq (%rsi),%rax -1: movq %rax,%rcx - orq %rdi,%rcx + movl (%rsi),%eax +1: movl %eax,%ecx + orl %edi,%ecx #ifdef SMP lock #endif - cmpxchgq %rcx,(%rsi) + cmpxchgl %ecx,(%rsi) jnz 1b - movq %rax,(%rdx) - xorq %rax,%rax + movl %eax,(%rdx) + xorl %eax,%eax movq %rax,PCB_ONFAULT(%r8) ret @@ -91,16 +91,16 @@ ENTRY(futex_andl) movq $VM_MAXUSER_ADDRESS-4,%rax cmpq %rax,%rsi ja futex_fault - movq (%rsi),%rax -1: movq %rax,%rcx - andq %rdi,%rcx + movl (%rsi),%eax +1: movl %eax,%ecx + andl %edi,%ecx #ifdef SMP lock #endif - cmpxchgq %rcx,(%rsi) + cmpxchgl %ecx,(%rsi) jnz 1b - movq %rax,(%rdx) - xorq %rax,%rax + movl %eax,(%rdx) + xorl %eax,%eax movq %rax,PCB_ONFAULT(%r8) ret @@ -110,15 +110,15 @@ ENTRY(futex_xorl) movq $VM_MAXUSER_ADDRESS-4,%rax cmpq %rax,%rsi ja futex_fault - movq (%rsi),%rax -1: movq %rax,%rcx - xorq %rdi,%rcx + movl (%rsi),%eax +1: movl %eax,%ecx + xorl %edi,%ecx #ifdef SMP lock #endif - cmpxchgq %rcx,(%rsi) + cmpxchgl %ecx,(%rsi) jnz 1b - movq %rax,(%rdx) - xorq %rax,%rax + movl %eax,(%rdx) + xorl %eax,%eax movq %rax,PCB_ONFAULT(%r8) ret From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 17:59:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F057589; Mon, 8 Jun 2015 17:59:34 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 02BE613CA; Mon, 8 Jun 2015 17:59:33 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t58HxOZG023204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Jun 2015 10:59:24 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t58HxNpW023203; Mon, 8 Jun 2015 10:59:23 -0700 (PDT) (envelope-from jmg) Date: Mon, 8 Jun 2015 10:59:23 -0700 From: John-Mark Gurney To: Marcel Moolenaar Cc: Bruce Simpson , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284146 - in head/tools/bus_space: . C Python Message-ID: <20150608175922.GE86224@funkthat.com> References: <201506080323.t583NKWB098393@svn.freebsd.org> <1433739156.3126307.289375233.42FD30F0@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Mon, 08 Jun 2015 10:59:24 -0700 (PDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 17:59:34 -0000 Marcel Moolenaar wrote this message on Sun, Jun 07, 2015 at 22:10 -0700: > > On Jun 7, 2015, at 9:52 PM, Bruce Simpson wrote: > > > > Marcel, > > > > On Mon, 8 Jun 2015, at 04:23, Marcel Moolenaar wrote: > >> Log: > >> Add busdma_mem_alloc & busdma_mem_free. > > > > Nice! Is there a man page or documentation for this anywhere? > > Not yet. I want to flesh it out further before documenting. > I???m not sure the API is stable enough yet. I???m still figure > things out as I go. Please document... Even if you change the API, it's not hard to change the documentation.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 18:06:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D520868; Mon, 8 Jun 2015 18:06:01 +0000 (UTC) (envelope-from jhb@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2369168C; Mon, 8 Jun 2015 18:06:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58I60MR054300; Mon, 8 Jun 2015 18:06:00 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58I60lq054299; Mon, 8 Jun 2015 18:06:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506081806.t58I60lq054299@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 8 Jun 2015 18:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284160 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 18:06:01 -0000 Author: jhb Date: Mon Jun 8 18:06:00 2015 New Revision: 284160 URL: https://svnweb.freebsd.org/changeset/base/284160 Log: Revert r284153, as I believe it breaks the dtrace sdt module. I will fix the original issue a different way. Modified: head/sys/kern/kern_linker.c Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Mon Jun 8 17:39:25 2015 (r284159) +++ head/sys/kern/kern_linker.c Mon Jun 8 18:06:00 2015 (r284160) @@ -137,8 +137,6 @@ static int linker_file_add_dependency(li linker_file_t dep); static caddr_t linker_file_lookup_symbol_internal(linker_file_t file, const char* name, int deps); -static int linker_file_lookup_set_locked(linker_file_t file, - const char *name, void *firstp, void *lastp, int *countp); static int linker_load_module(const char *kldname, const char *modname, struct linker_file *parent, const struct mod_depend *verinfo, struct linker_file **lfpp); @@ -191,8 +189,7 @@ linker_file_sysinit(linker_file_t lf) sx_assert(&kld_sx, SA_XLOCKED); - if (linker_file_lookup_set_locked(lf, "sysinit_set", &start, &stop, - NULL) != 0) + if (linker_file_lookup_set(lf, "sysinit_set", &start, &stop, NULL) != 0) return; /* * Perform a bubble sort of the system initialization objects by @@ -240,7 +237,7 @@ linker_file_sysuninit(linker_file_t lf) sx_assert(&kld_sx, SA_XLOCKED); - if (linker_file_lookup_set_locked(lf, "sysuninit_set", &start, &stop, + if (linker_file_lookup_set(lf, "sysuninit_set", &start, &stop, NULL) != 0) return; @@ -291,8 +288,7 @@ linker_file_register_sysctls(linker_file sx_assert(&kld_sx, SA_XLOCKED); - if (linker_file_lookup_set_locked(lf, "sysctl_set", &start, &stop, - NULL) != 0) + if (linker_file_lookup_set(lf, "sysctl_set", &start, &stop, NULL) != 0) return; sx_xunlock(&kld_sx); @@ -313,8 +309,7 @@ linker_file_unregister_sysctls(linker_fi sx_assert(&kld_sx, SA_XLOCKED); - if (linker_file_lookup_set_locked(lf, "sysctl_set", &start, &stop, - NULL) != 0) + if (linker_file_lookup_set(lf, "sysctl_set", &start, &stop, NULL) != 0) return; sx_xunlock(&kld_sx); @@ -337,7 +332,7 @@ linker_file_register_modules(linker_file sx_assert(&kld_sx, SA_XLOCKED); - if (linker_file_lookup_set_locked(lf, "modmetadata_set", &start, + if (linker_file_lookup_set(lf, "modmetadata_set", &start, &stop, NULL) != 0) { /* * This fallback should be unnecessary, but if we get booted @@ -747,26 +742,13 @@ linker_file_add_dependency(linker_file_t * This function is used in this file so we can avoid having lots of (void **) * casts. */ -static int -linker_file_lookup_set_locked(linker_file_t file, const char *name, - void *firstp, void *lastp, int *countp) -{ - - sx_assert(&kld_sx, SA_LOCKED); - return (LINKER_LOOKUP_SET(file, name, firstp, lastp, countp)); -} - int linker_file_lookup_set(linker_file_t file, const char *name, void *firstp, void *lastp, int *countp) { - int error; - sx_slock(&kld_sx); - error = linker_file_lookup_set_locked(file, name, firstp, lastp, - countp); - sx_sunlock(&kld_sx); - return (error); + sx_assert(&kld_sx, SA_LOCKED); + return (LINKER_LOOKUP_SET(file, name, firstp, lastp, countp)); } /* @@ -1487,8 +1469,8 @@ linker_preload(void *arg) /* * First get a list of stuff in the kernel. */ - if (linker_file_lookup_set_locked(linker_kernel_file, MDT_SETNAME, - &start, &stop, NULL) == 0) + if (linker_file_lookup_set(linker_kernel_file, MDT_SETNAME, &start, + &stop, NULL) == 0) linker_addmodules(linker_kernel_file, start, stop, 1); /* @@ -1497,7 +1479,7 @@ linker_preload(void *arg) */ restart: TAILQ_FOREACH(lf, &loaded_files, loaded) { - error = linker_file_lookup_set_locked(lf, MDT_SETNAME, &start, + error = linker_file_lookup_set(lf, MDT_SETNAME, &start, &stop, NULL); /* * First, look to see if we would successfully link with this @@ -1591,7 +1573,7 @@ restart: panic("cannot add dependency"); } lf->userrefs++; /* so we can (try to) kldunload it */ - error = linker_file_lookup_set_locked(lf, MDT_SETNAME, &start, + error = linker_file_lookup_set(lf, MDT_SETNAME, &start, &stop, NULL); if (!error) { for (mdp = start; mdp < stop; mdp++) { @@ -1628,7 +1610,7 @@ restart: goto fail; } linker_file_register_modules(lf); - if (linker_file_lookup_set_locked(lf, "sysinit_set", &si_start, + if (linker_file_lookup_set(lf, "sysinit_set", &si_start, &si_stop, NULL) == 0) sysinit_add(si_start, si_stop); linker_file_register_sysctls(lf); @@ -2060,7 +2042,7 @@ linker_load_dependencies(linker_file_t l if (error) return (error); } - if (linker_file_lookup_set_locked(lf, MDT_SETNAME, &start, &stop, + if (linker_file_lookup_set(lf, MDT_SETNAME, &start, &stop, &count) != 0) return (0); for (mdp = start; mdp < stop; mdp++) { From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 18:30:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B5B8FF4; Mon, 8 Jun 2015 18:30:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E57FF1BDD; Mon, 8 Jun 2015 18:30:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D6F06B997; Mon, 8 Jun 2015 14:30:07 -0400 (EDT) From: John Baldwin To: Ruslan Bukin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284153 - head/sys/kern Date: Mon, 08 Jun 2015 14:04:45 -0400 Message-ID: <1554833.IUNnl2bGYK@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.1-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <20150608144629.GA37834@bsdpad.com> References: <201506081406.t58E6mvA033492@svn.freebsd.org> <20150608144629.GA37834@bsdpad.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 08 Jun 2015 14:30:07 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 18:30:09 -0000 On Monday, June 08, 2015 03:46:29 PM Ruslan Bukin wrote: > For some reason it hangs for me after 'random' lines on arm64 Are you using dtrace? It looks like sdt was using the public symbol before but in a context where the caller held the lock. I will revert this for now. I think I can perhaps make it 'automatic' by having it acquire a read lock (possibly recursing) if it doesn't already hold a write lock. > FreeBSD clang version 3.6.1 (tags/RELEASE_361/final 237755) 20150525 > CPU: ARM Cortex-A57 r1p0 > IMPLEMENT ME: dtrace_toxic_ranges > random: entropy device infrastructure driver > random: selecting highest priority adaptor > > On Mon, Jun 08, 2015 at 02:06:48PM +0000, John Baldwin wrote: > > Author: jhb > > Date: Mon Jun 8 14:06:47 2015 > > New Revision: 284153 > > URL: https://svnweb.freebsd.org/changeset/base/284153 > > > > Log: > > Add an internal "locked" variant of linker_file_lookup_set() and change > > the public function to acquire the global linker lock directly. This > > permits linker_file_lookup_set() to be safely used from other modules. > > > > Modified: > > head/sys/kern/kern_linker.c > > > > Modified: head/sys/kern/kern_linker.c > > ============================================================================== > > --- head/sys/kern/kern_linker.c Mon Jun 8 13:23:56 2015 (r284152) > > +++ head/sys/kern/kern_linker.c Mon Jun 8 14:06:47 2015 (r284153) > > @@ -137,6 +137,8 @@ static int linker_file_add_dependency(li > > linker_file_t dep); > > static caddr_t linker_file_lookup_symbol_internal(linker_file_t file, > > const char* name, int deps); > > +static int linker_file_lookup_set_locked(linker_file_t file, > > + const char *name, void *firstp, void *lastp, int *countp); > > static int linker_load_module(const char *kldname, > > const char *modname, struct linker_file *parent, > > const struct mod_depend *verinfo, struct linker_file **lfpp); > > @@ -189,7 +191,8 @@ linker_file_sysinit(linker_file_t lf) > > > > sx_assert(&kld_sx, SA_XLOCKED); > > > > - if (linker_file_lookup_set(lf, "sysinit_set", &start, &stop, NULL) != 0) > > + if (linker_file_lookup_set_locked(lf, "sysinit_set", &start, &stop, > > + NULL) != 0) > > return; > > /* > > * Perform a bubble sort of the system initialization objects by > > @@ -237,7 +240,7 @@ linker_file_sysuninit(linker_file_t lf) > > > > sx_assert(&kld_sx, SA_XLOCKED); > > > > - if (linker_file_lookup_set(lf, "sysuninit_set", &start, &stop, > > + if (linker_file_lookup_set_locked(lf, "sysuninit_set", &start, &stop, > > NULL) != 0) > > return; > > > > @@ -288,7 +291,8 @@ linker_file_register_sysctls(linker_file > > > > sx_assert(&kld_sx, SA_XLOCKED); > > > > - if (linker_file_lookup_set(lf, "sysctl_set", &start, &stop, NULL) != 0) > > + if (linker_file_lookup_set_locked(lf, "sysctl_set", &start, &stop, > > + NULL) != 0) > > return; > > > > sx_xunlock(&kld_sx); > > @@ -309,7 +313,8 @@ linker_file_unregister_sysctls(linker_fi > > > > sx_assert(&kld_sx, SA_XLOCKED); > > > > - if (linker_file_lookup_set(lf, "sysctl_set", &start, &stop, NULL) != 0) > > + if (linker_file_lookup_set_locked(lf, "sysctl_set", &start, &stop, > > + NULL) != 0) > > return; > > > > sx_xunlock(&kld_sx); > > @@ -332,7 +337,7 @@ linker_file_register_modules(linker_file > > > > sx_assert(&kld_sx, SA_XLOCKED); > > > > - if (linker_file_lookup_set(lf, "modmetadata_set", &start, > > + if (linker_file_lookup_set_locked(lf, "modmetadata_set", &start, > > &stop, NULL) != 0) { > > /* > > * This fallback should be unnecessary, but if we get booted > > @@ -742,8 +747,8 @@ linker_file_add_dependency(linker_file_t > > * This function is used in this file so we can avoid having lots of (void **) > > * casts. > > */ > > -int > > -linker_file_lookup_set(linker_file_t file, const char *name, > > +static int > > +linker_file_lookup_set_locked(linker_file_t file, const char *name, > > void *firstp, void *lastp, int *countp) > > { > > > > @@ -751,6 +756,19 @@ linker_file_lookup_set(linker_file_t fil > > return (LINKER_LOOKUP_SET(file, name, firstp, lastp, countp)); > > } > > > > +int > > +linker_file_lookup_set(linker_file_t file, const char *name, > > + void *firstp, void *lastp, int *countp) > > +{ > > + int error; > > + > > + sx_slock(&kld_sx); > > + error = linker_file_lookup_set_locked(file, name, firstp, lastp, > > + countp); > > + sx_sunlock(&kld_sx); > > + return (error); > > +} > > + > > /* > > * List all functions in a file. > > */ > > @@ -1469,8 +1487,8 @@ linker_preload(void *arg) > > /* > > * First get a list of stuff in the kernel. > > */ > > - if (linker_file_lookup_set(linker_kernel_file, MDT_SETNAME, &start, > > - &stop, NULL) == 0) > > + if (linker_file_lookup_set_locked(linker_kernel_file, MDT_SETNAME, > > + &start, &stop, NULL) == 0) > > linker_addmodules(linker_kernel_file, start, stop, 1); > > > > /* > > @@ -1479,7 +1497,7 @@ linker_preload(void *arg) > > */ > > restart: > > TAILQ_FOREACH(lf, &loaded_files, loaded) { > > - error = linker_file_lookup_set(lf, MDT_SETNAME, &start, > > + error = linker_file_lookup_set_locked(lf, MDT_SETNAME, &start, > > &stop, NULL); > > /* > > * First, look to see if we would successfully link with this > > @@ -1573,7 +1591,7 @@ restart: > > panic("cannot add dependency"); > > } > > lf->userrefs++; /* so we can (try to) kldunload it */ > > - error = linker_file_lookup_set(lf, MDT_SETNAME, &start, > > + error = linker_file_lookup_set_locked(lf, MDT_SETNAME, &start, > > &stop, NULL); > > if (!error) { > > for (mdp = start; mdp < stop; mdp++) { > > @@ -1610,7 +1628,7 @@ restart: > > goto fail; > > } > > linker_file_register_modules(lf); > > - if (linker_file_lookup_set(lf, "sysinit_set", &si_start, > > + if (linker_file_lookup_set_locked(lf, "sysinit_set", &si_start, > > &si_stop, NULL) == 0) > > sysinit_add(si_start, si_stop); > > linker_file_register_sysctls(lf); > > @@ -2042,7 +2060,7 @@ linker_load_dependencies(linker_file_t l > > if (error) > > return (error); > > } > > - if (linker_file_lookup_set(lf, MDT_SETNAME, &start, &stop, > > + if (linker_file_lookup_set_locked(lf, MDT_SETNAME, &start, &stop, > > &count) != 0) > > return (0); > > for (mdp = start; mdp < stop; mdp++) { > > > -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 19:13:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0C47E1C; Mon, 8 Jun 2015 19:13:05 +0000 (UTC) (envelope-from delphij@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EBA017CA; Mon, 8 Jun 2015 19:13:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58JD5tS090443; Mon, 8 Jun 2015 19:13:05 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58JD5KX090442; Mon, 8 Jun 2015 19:13:05 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201506081913.t58JD5KX090442@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 8 Jun 2015 19:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284162 - head/bin/ls X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 19:13:05 -0000 Author: delphij Date: Mon Jun 8 19:13:04 2015 New Revision: 284162 URL: https://svnweb.freebsd.org/changeset/base/284162 Log: It has been long time that when doing 'ls -G /path/to/a/symlink', instead of using the color of symbolic link, the color is determined by the link target. This behavior was quite confusing. Looking at the file history, it looks like that r203665 intends to fix this but the issue was never actually fixed. Fix this by not setting FTS_COMFOLLOW when color is requested like what was done in r203665. MFC after: 2 weeks Modified: head/bin/ls/ls.c Modified: head/bin/ls/ls.c ============================================================================== --- head/bin/ls/ls.c Mon Jun 8 18:59:14 2015 (r284161) +++ head/bin/ls/ls.c Mon Jun 8 19:13:04 2015 (r284162) @@ -413,9 +413,14 @@ main(int argc, char *argv[]) /* * If not -F, -P, -d or -l options, follow any symbolic links listed on - * the command line. + * the command line, unless in color mode in which case we need to + * distinguish file type for a symbolic link itself and its target. */ - if (!f_nofollow && !f_longform && !f_listdir && (!f_type || f_slash)) + if (!f_nofollow && !f_longform && !f_listdir && (!f_type || f_slash) +#ifdef COLORLS + && !f_color +#endif + ) fts_options |= FTS_COMFOLLOW; /* From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 19:24:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19BB7482; Mon, 8 Jun 2015 19:24:20 +0000 (UTC) (envelope-from bdrewery@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEB4C1A4C; Mon, 8 Jun 2015 19:24:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58JOJhf095755; Mon, 8 Jun 2015 19:24:19 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58JOJQw095752; Mon, 8 Jun 2015 19:24:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201506081924.t58JOJQw095752@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 8 Jun 2015 19:24:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284163 - head/bin/cp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 19:24:20 -0000 Author: bdrewery Date: Mon Jun 8 19:24:18 2015 New Revision: 284163 URL: https://svnweb.freebsd.org/changeset/base/284163 Log: Cleanup some style(9) issues. - Whitespace. - Comments. - Wrap long lines. MFC after: 2 weeks X-MFC-with: r284105,r284106 Sponsored by: EMC / Isilon Storage Division Modified: head/bin/cp/cp.c head/bin/cp/utils.c Modified: head/bin/cp/cp.c ============================================================================== --- head/bin/cp/cp.c Mon Jun 8 19:13:04 2015 (r284162) +++ head/bin/cp/cp.c Mon Jun 8 19:24:18 2015 (r284163) @@ -75,8 +75,8 @@ __FBSDID("$FreeBSD$"); #include "extern.h" #define STRIP_TRAILING_SLASH(p) { \ - while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \ - *--(p).p_end = 0; \ + while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \ + *--(p).p_end = 0; \ } static char emptystring[] = ""; @@ -188,7 +188,7 @@ main(int argc, char *argv[]) if (strlcpy(to.p_path, target, sizeof(to.p_path)) >= sizeof(to.p_path)) errx(1, "%s: name too long", target); to.p_end = to.p_path + strlen(to.p_path); - if (to.p_path == to.p_end) { + if (to.p_path == to.p_end) { *to.p_end++ = '.'; *to.p_end = 0; } @@ -245,10 +245,10 @@ main(int argc, char *argv[]) type = FILE_TO_FILE; if (have_trailing_slash && type == FILE_TO_FILE) { - if (r == -1) + if (r == -1) { errx(1, "directory %s does not exist", - to.p_path); - else + to.p_path); + } else errx(1, "%s is not a directory", to.p_path); } } else @@ -299,8 +299,8 @@ copy(char *argv[], enum op type, int fts /* * If we are in case (2) or (3) above, we need to append the - * source name to the target name. - */ + * source name to the target name. + */ if (type != FILE_TO_FILE) { /* * Need to remember the roots of traversals to create @@ -379,7 +379,8 @@ copy(char *argv[], enum op type, int fts mode = curr->fts_statp->st_mode; if ((mode & (S_ISUID | S_ISGID | S_ISTXT)) || ((mode | S_IRWXU) & mask) != (mode & mask)) - if (chmod(to.p_path, mode & mask) != 0){ + if (chmod(to.p_path, mode & mask) != + 0) { warn("chmod: %s", to.p_path); rval = 1; } @@ -387,7 +388,7 @@ copy(char *argv[], enum op type, int fts continue; } - /* Not an error but need to remember it happened */ + /* Not an error but need to remember it happened. */ if (stat(to.p_path, &to_stat) == -1) dne = 1; else { @@ -413,7 +414,7 @@ copy(char *argv[], enum op type, int fts switch (curr->fts_statp->st_mode & S_IFMT) { case S_IFLNK: - /* Catch special case of a non-dangling symlink */ + /* Catch special case of a non-dangling symlink. */ if ((fts_options & FTS_LOGICAL) || ((fts_options & FTS_COMFOLLOW) && curr->fts_level == 0)) { @@ -438,7 +439,7 @@ copy(char *argv[], enum op type, int fts * modified by the umask. Trade-off between being * able to write the directory (if from directory is * 555) and not causing a permissions race. If the - * umask blocks owner writes, we fail.. + * umask blocks owner writes, we fail. */ if (dne) { if (mkdir(to.p_path, @@ -467,7 +468,7 @@ copy(char *argv[], enum op type, int fts break; case S_IFSOCK: warnx("%s is a socket (not copied).", - curr->fts_path); + curr->fts_path); break; case S_IFIFO: if (Rflag && !sflag) { Modified: head/bin/cp/utils.c ============================================================================== --- head/bin/cp/utils.c Mon Jun 8 19:13:04 2015 (r284162) +++ head/bin/cp/utils.c Mon Jun 8 19:24:18 2015 (r284163) @@ -57,15 +57,19 @@ __FBSDID("$FreeBSD$"); #define cp_pct(x, y) ((y == 0) ? 0 : (int)(100.0 * (x) / (y))) -/* Memory strategy threshold, in pages: if physmem is larger then this, use a - * large buffer */ +/* + * Memory strategy threshold, in pages: if physmem is larger then this, use a + * large buffer. + */ #define PHYSPAGES_THRESHOLD (32*1024) -/* Maximum buffer size in bytes - do not allow it to grow larger than this */ +/* Maximum buffer size in bytes - do not allow it to grow larger than this. */ #define BUFSIZE_MAX (2*1024*1024) -/* Small (default) buffer size in bytes. It's inefficient for this to be - * smaller than MAXPHYS */ +/* + * Small (default) buffer size in bytes. It's inefficient for this to be + * smaller than MAXPHYS. + */ #define BUFSIZE_SMALL (MAXPHYS) int @@ -109,7 +113,7 @@ copy_file(const FTSENT *entp, int dne) goto done; } else if (iflag) { (void)fprintf(stderr, "overwrite %s? %s", - to.p_path, YESNO); + to.p_path, YESNO); checkch = ch = getchar(); while (ch != '\n' && ch != EOF) ch = getchar(); @@ -119,24 +123,27 @@ copy_file(const FTSENT *entp, int dne) goto done; } } - + if (fflag) { - /* remove existing destination file name, - * create a new file */ - (void)unlink(to.p_path); - if (!lflag && !sflag) { - to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, - fs->st_mode & ~(S_ISUID | S_ISGID)); - } + /* + * Remove existing destination file name create a new + * file. + */ + (void)unlink(to.p_path); + if (!lflag && !sflag) { + to_fd = open(to.p_path, + O_WRONLY | O_TRUNC | O_CREAT, + fs->st_mode & ~(S_ISUID | S_ISGID)); + } } else if (!lflag && !sflag) { - /* overwrite existing destination file name */ + /* Overwrite existing destination file name. */ to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); } } else if (!lflag && !sflag) { to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, fs->st_mode & ~(S_ISUID | S_ISGID)); } - + if (!lflag && !sflag && to_fd == -1) { warn("%s", to.p_path); rval = 1; @@ -147,20 +154,20 @@ copy_file(const FTSENT *entp, int dne) if (!lflag && !sflag) { /* - * Mmap and write if less than 8M (the limit is so we don't totally - * trash memory on big files. This is really a minor hack, but it - * wins some CPU back. + * Mmap and write if less than 8M (the limit is so we don't + * totally trash memory on big files. This is really a minor + * hack, but it wins some CPU back. * Some filesystems, such as smbnetfs, don't support mmap, * so this is a best-effort attempt. */ #ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED if (S_ISREG(fs->st_mode) && fs->st_size > 0 && - fs->st_size <= 8 * 1024 * 1024 && + fs->st_size <= 8 * 1024 * 1024 && (p = mmap(NULL, (size_t)fs->st_size, PROT_READ, MAP_SHARED, from_fd, (off_t)0)) != MAP_FAILED) { wtotal = 0; for (bufp = p, wresid = fs->st_size; ; - bufp += wcount, wresid -= (size_t)wcount) { + bufp += wcount, wresid -= (size_t)wcount) { wcount = write(to_fd, bufp, wresid); if (wcount <= 0) break; @@ -205,7 +212,7 @@ copy_file(const FTSENT *entp, int dne) wtotal = 0; while ((rcount = read(from_fd, buf, bufsize)) > 0) { for (bufp = buf, wresid = rcount; ; - bufp += wcount, wresid -= wcount) { + bufp += wcount, wresid -= wcount) { wcount = write(to_fd, bufp, wresid); if (wcount <= 0) break; @@ -242,7 +249,7 @@ copy_file(const FTSENT *entp, int dne) rval = 1; } } - + /* * Don't remove the target even after an error. The target might * not be a regular file, or its attributes might be important, @@ -345,7 +352,7 @@ setfile(struct stat *fs, int fd) fdval = fd != -1; islink = !fdval && S_ISLNK(fs->st_mode); fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX | - S_IRWXU | S_IRWXG | S_IRWXO; + S_IRWXU | S_IRWXG | S_IRWXO; tspec[0] = fs->st_atim; tspec[1] = fs->st_mtim; @@ -360,7 +367,7 @@ setfile(struct stat *fs, int fd) else { gotstat = 1; ts.st_mode &= S_ISUID | S_ISGID | S_ISVTX | - S_IRWXU | S_IRWXG | S_IRWXO; + S_IRWXU | S_IRWXG | S_IRWXO; } /* * Changing the ownership probably won't succeed, unless we're root @@ -484,7 +491,7 @@ preserve_dir_acls(struct stat *fs, char return (0); /* - * If the file is a link we will not follow it + * If the file is a link we will not follow it. */ if (S_ISLNK(fs->st_mode)) { aclgetf = acl_get_link_np; @@ -543,8 +550,10 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", -"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file target_file", -" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file ... " -"target_directory"); + "usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] " + "source_file target_file", + " cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] " + "source_file ... " + "target_directory"); exit(EX_USAGE); } From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 19:45:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E30A8B4E; Mon, 8 Jun 2015 19:45:25 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF5901F39; Mon, 8 Jun 2015 19:45:25 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58JjPh2008011; Mon, 8 Jun 2015 19:45:25 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58JjPsI008001; Mon, 8 Jun 2015 19:45:25 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506081945.t58JjPsI008001@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 8 Jun 2015 19:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284165 - in head: contrib/top usr.bin/top X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 19:45:26 -0000 Author: marcel Date: Mon Jun 8 19:45:24 2015 New Revision: 284165 URL: https://svnweb.freebsd.org/changeset/base/284165 Log: Move contrib/top/top.X to contrib/top/top.xs and move contrib/top/top.local.H to contrib/top/top.local.hs. This fixes a build breakage when src is on a case- insensitive file system -- we never properly create top.x nor top.local.h. Change the makefile accordingly. MFC after: 3 days Added: head/contrib/top/top.local.hs - copied unchanged from r284153, head/contrib/top/top.local.H head/contrib/top/top.xs - copied unchanged from r284163, head/contrib/top/top.X Deleted: head/contrib/top/top.X head/contrib/top/top.local.H Modified: head/usr.bin/top/Makefile Copied: head/contrib/top/top.local.hs (from r284153, head/contrib/top/top.local.H) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/top/top.local.hs Mon Jun 8 19:45:24 2015 (r284165, copy of r284153, head/contrib/top/top.local.H) @@ -0,0 +1,68 @@ +/* + * Top - a top users display for Berkeley Unix + * + * Definitions for things that might vary between installations. + */ + +/* + * The space command forces an immediate update. Sometimes, on loaded + * systems, this update will take a significant period of time (because all + * the output is buffered). So, if the short-term load average is above + * "LoadMax", then top will put the cursor home immediately after the space + * is pressed before the next update is attempted. This serves as a visual + * acknowledgement of the command. On Suns, "LoadMax" will get multiplied by + * "FSCALE" before being compared to avenrun[0]. Therefore, "LoadMax" + * should always be specified as a floating point number. + */ +#ifndef LoadMax +#define LoadMax %LoadMax% +#endif + +/* + * "Table_size" defines the size of the hash tables used to map uid to + * username. The number of users in /etc/passwd CANNOT be greater than + * this number. If the error message "table overflow: too many users" + * is printed by top, then "Table_size" needs to be increased. Things will + * work best if the number is a prime number that is about twice the number + * of lines in /etc/passwd. + */ +#ifndef Table_size +#define Table_size %TableSize% +#endif + +/* + * "Nominal_TOPN" is used as the default TOPN when Default_TOPN is Infinity + * and the output is a dumb terminal. If we didn't do this, then + * installations who use a default TOPN of Infinity will get every + * process in the system when running top on a dumb terminal (or redirected + * to a file). Note that Nominal_TOPN is a default: it can still be + * overridden on the command line, even with the value "infinity". + */ +#ifndef Nominal_TOPN +#define Nominal_TOPN %NominalTopn% +#endif + +#ifndef Default_TOPN +#define Default_TOPN %topn% +#endif + +#ifndef Default_DELAY +#define Default_DELAY %delay% +#endif + +/* + * If the local system's getpwnam interface uses random access to retrieve + * a record (i.e.: 4.3 systems, Sun "yellow pages"), then defining + * RANDOM_PW will take advantage of that fact. If RANDOM_PW is defined, + * then getpwnam is used and the result is cached. If not, then getpwent + * is used to read and cache the password entries sequentially until the + * desired one is found. + * + * We initially set RANDOM_PW to something which is controllable by the + * Configure script. Then if its value is 0, we undef it. + */ + +#define RANDOM_PW %random% +#if RANDOM_PW == 0 +#undef RANDOM_PW +#endif Copied: head/contrib/top/top.xs (from r284163, head/contrib/top/top.X) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/top/top.xs Mon Jun 8 19:45:24 2015 (r284165, copy of r284163, head/contrib/top/top.X) @@ -0,0 +1,448 @@ +.\" NOTE: changes to the manual page for "top" should be made in the +.\" file "top.X" and NOT in the file "top.1". +.\" $FreeBSD$ +.nr N %topn% +.nr D %delay% +.TH TOP 1 Local +.UC 4 +.SH NAME +top \- display and update information about the top cpu processes +.SH SYNOPSIS +.B top +[ +.B \-abCHIijnPqStuvz +] [ +.BI \-d count +] [ +.BI \-m io | cpu +] [ +.BI \-o field +] [ +.BI \-s time +] [ +.BI \-J jail +] [ +.BI \-U username +] [ +.I number +] +.SH DESCRIPTION +.\" This defines appropriate quote strings for nroff and troff +.ds lq \&" +.ds rq \&" +.if t .ds lq `` +.if t .ds rq '' +.\" Just in case these number registers aren't set yet... +.if \nN==0 .nr N 10 +.if \nD==0 .nr D 2 +.I Top +displays the top +.if !\nN==-1 \nN +processes on the system and periodically updates this information. +.if \nN==-1 \ +\{\ +If standard output is an intelligent terminal (see below) then +as many processes as will fit on the terminal screen are displayed +by default. Otherwise, a good number of them are shown (around 20). +.\} +Raw cpu percentage is used to rank the processes. If +.I number +is given, then the top +.I number +processes will be displayed instead of the default. +.PP +.I Top +makes a distinction between terminals that support advanced capabilities +and those that do not. This +distinction affects the choice of defaults for certain options. In the +remainder of this document, an \*(lqintelligent\*(rq terminal is one that +supports cursor addressing, clear screen, and clear to end of line. +Conversely, a \*(lqdumb\*(rq terminal is one that does not support such +features. If the output of +.I top +is redirected to a file, it acts as if it were being run on a dumb +terminal. +.SH OPTIONS +.TP +.B \-C +Toggle CPU display mode. +By default top displays the weighted CPU percentage in the WCPU column +(this is the same value that +.IR ps (1) +displays as CPU). +Each time +.B \-C +flag is passed it toggles between \*(lqraw cpu\*(rq mode +and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or +the \*(lqWCPU\*(rq column respectively. +.TP +.B \-S +Show system processes in the display. Normally, system processes such as +the pager and the swapper are not shown. This option makes them visible. +.TP +.B \-a +Display command names derived from the argv[] vector, rather than real +executable name. It's useful when you want to watch applications, that +puts their status information there. If the real name differs from argv[0], +it will be displayed in parenthesis. +.TP +.B \-b +Use \*(lqbatch\*(rq mode. In this mode, all input from the terminal is +ignored. Interrupt characters (such as ^C and ^\e) still have an effect. +This is the default on a dumb terminal, or when the output is not a terminal. +.TP +.B \-H +Display each thread for a multithreaded process individually. +By default a single summary line is displayed for each process. +.TP +.B \-i +Use \*(lqinteractive\*(rq mode. In this mode, any input is immediately +read for processing. See the section on \*(lqInteractive Mode\*(rq +for an explanation of +which keys perform what functions. After the command is processed, the +screen will immediately be updated, even if the command was not +understood. This mode is the default when standard output is an +intelligent terminal. +.TP +.B \-I +Do not display idle processes. +By default, top displays both active and idle processes. +.TP +.B \-j +Display the +.IR jail (8) +ID. +.TP +.B \-t +Do not display the +.I top +process. +.TP +.BI \-m display +Display either 'cpu' or 'io' statistics. Default is 'cpu'. +.TP +.B \-n +Use \*(lqnon-interactive\*(rq mode. This is identical to \*(lqbatch\*(rq +mode. +.TP +.B \-P +Display per-cpu CPU usage statistics. +.TP +.B \-q +Renice +.I top +to -20 so that it will run faster. This can be used when the system is +being very sluggish to improve the possibility of discovering the problem. +This option can only be used by root. +.TP +.B \-u +Do not take the time to map uid numbers to usernames. Normally, +.I top +will read as much of the file \*(lq/etc/passwd\*(rq as is necessary to map +all the user id numbers it encounters into login names. This option +disables all that, while possibly decreasing execution time. The uid +numbers are displayed instead of the names. +.TP +.B \-v +Write version number information to stderr then exit immediately. +No other processing takes place when this option is used. To see current +revision information while top is running, use the help command \*(lq?\*(rq. +.TP +.B \-z +Do not display the system idle process. +.TP +.BI \-d count +Show only +.I count +displays, then exit. A display is considered to be one update of the +screen. This option allows the user to select the number of displays he +wants to see before +.I top +automatically exits. For intelligent terminals, no upper limit +is set. The default is 1 for dumb terminals. +.TP +.BI \-s time +Set the delay between screen updates to +.I time +seconds. The default delay between updates is \nD seconds. +.TP +.BI \-o field +Sort the process display area on the specified field. The field name is +the name of the column as seen in the output, but in lower case. Likely +values are \*(lqcpu\*(rq, \*(lqsize\*(rq, \*(lqres\*(rq, and \*(lqtime\*(rq, +but may vary on different operating systems. Note that +not all operating systems support this option. +.TP +.BI \-J jail +Show only those processes owned by +.IR jail . +This may be either the +.B jid +or +.B name +of the jail. +Use +.B 0 +to limit to host processes. +Using this option implies the +.B \-j +flag. +.PP +.BI \-U username +Show only those processes owned by +.IR username . +This option currently only accepts usernames and will not understand +uid numbers. +.PP +Both +.I count +and +.I number +fields can be specified as \*(lqinfinite\*(rq, indicating that they can +stretch as far as possible. This is accomplished by using any proper +prefix of the keywords +\*(lqinfinity\*(rq, +\*(lqmaximum\*(rq, +or +\*(lqall\*(rq. +The default for +.I count +on an intelligent terminal is, in fact, +.BI infinity . +.PP +The environment variable +.B TOP +is examined for options before the command line is scanned. This enables +a user to set his or her own defaults. The number of processes to display +can also be specified in the environment variable +.BR TOP . +The options +.BR \-a , +.BR \-C , +.BR \-H , +.BR \-I , +.BR \-j , +.BR \-P , +.BR \-S , +.BR \-t , +.BR \-u , +and +.B \-z +are actually toggles. A second specification of any of these options +will negate the first. Thus a user who has the environment variable +.B TOP +set to \*(lq\-I\*(rq may use the command \*(lqtop \-I\*(rq to see idle processes. +.SH "INTERACTIVE MODE" +When +.I top +is running in \*(lqinteractive mode\*(rq, it reads commands from the +terminal and acts upon them accordingly. In this mode, the terminal is +put in \*(lqCBREAK\*(rq, so that a character will be +processed as soon as it is typed. Almost always, a key will be +pressed when +.I top +is between displays; that is, while it is waiting for +.I time +seconds to elapse. If this is the case, the command will be +processed and the display will be updated immediately thereafter +(reflecting any changes that the command may have specified). This +happens even if the command was incorrect. If a key is pressed while +.I top +is in the middle of updating the display, it will finish the update and +then process the command. Some commands require additional information, +and the user will be prompted accordingly. While typing this information +in, the user's erase and kill keys (as set up by the command +.IR stty ) +are recognized, and a newline terminates the input. +.PP +These commands are currently recognized (^L refers to control-L): +.TP +.B ^L +Redraw the screen. +.IP "\fBh\fP\ or\ \fB?\fP" +Display a summary of the commands (help screen). Version information +is included in this display. +.TP +.B q +Quit +.IR top. +.TP +.B d +Change the number of displays to show (prompt for new number). +Remember that the next display counts as one, so typing +.B d1 +will make +.I top +show one final display and then immediately exit. +.TP +.B m +Toggle the display between 'cpu' and 'io' modes. +.TP +.B n or # +Change the number of processes to display (prompt for new number). +.TP +.B s +Change the number of seconds to delay between displays +(prompt for new number). +.TP +.B S +Toggle the display of system processes. +.TP +.B a +Toggle the display of process titles. +.TP +.B k +Send a signal (\*(lqkill\*(rq by default) to a list of processes. This +acts similarly to the command +.IR kill (1)). +.TP +.B r +Change the priority (the \*(lqnice\*(rq) of a list of processes. +This acts similarly to the command +.IR renice (8)). +.TP +.B u +Display only processes owned by a specific username (prompt for username). +If the username specified is simply \*(lq+\*(rq, then processes belonging +to all users will be displayed. +.TP +.B o +Change the order in which the display is sorted. This command is not +available on all systems. The sort key names vary from system to system +but usually include: \*(lqcpu\*(rq, \*(lqres\*(rq, \*(lqsize\*(rq, +\*(lqtime\*(rq. The default is cpu. +.TP +.B e +Display a list of system errors (if any) generated by the last +.BR k ill +or +.BR r enice +command. +.TP +.B H +Toggle the display of threads. +.TP +.B i +(or +.BR I ) +Toggle the display of idle processes. +.TP +.B j +Toggle the display of +.IR jail (8) +ID. +.TP +.B J +Display only processes owned by a specific jail (prompt for jail). +If the jail specified is simply \*(lq+\*(rq, then processes belonging +to all jails and the host will be displayed. +This will also enable the display of JID. +.TP +.B P +Toggle the display of per-CPU statistics. +.TP +.B t +Toggle the display of the +.I top +process. +.TP +.B z +Toggle the display of the system idle process. +.SH "THE DISPLAY" +The actual display varies depending on the specific variant of Unix +that the machine is running. This description may not exactly match +what is seen by top running on this particular machine. Differences +are listed at the end of this manual entry. +.PP +The top few lines of the display show general information +about the state of the system, including +the last process id assigned to a process (on most systems), +the three load averages, +the current time, +the number of existing processes, +the number of processes in each state +(sleeping, running, starting, zombies, and stopped), +and a percentage of time spent in each of the processor states +(user, nice, system, and idle). +It also includes information about physical and virtual memory allocation. +.PP +The remainder of the screen displays information about individual +processes. This display is similar in spirit to +.IR ps (1) +but it is not exactly the same. PID is the process id, +JID, when displayed, is the +.IR jail (8) +ID corresponding to the process, +USERNAME is the name of the process's owner (if +.B \-u +is specified, a UID column will be substituted for USERNAME), +PRI is the current priority of the process, +NICE is the nice amount (in the range \-20 to 20), +SIZE is the total size of the process (text, data, and stack), +RES is the current amount of resident memory (both SIZE and RES are +given in kilobytes), +STATE is the current state (one of \*(lqSTART\*(rq, \*(lqRUN\*(rq +(shown as \*(lqCPUn\*(rq on SMP systems), \*(lqSLEEP\*(rq, \*(lqSTOP\*(rq, +\*(lqZOMB\*(rq, \*(lqWAIT\*(rq, \*(lqLOCK\*(rq or the event on which the +process waits), +C is the processor number on which the process is executing +(visible only on SMP systems), +TIME is the number of system and user cpu seconds that the process has used, +WCPU, when displayed, is the weighted cpu percentage (this is the same +value that +.IR ps (1) +displays as CPU), +CPU is the raw percentage and is the field that is sorted to determine +the order of the processes, and +COMMAND is the name of the command that the process is currently running +(if the process is swapped out, this column is marked \*(lq\*(rq). +.SH NOTES +If a process is in the \*(lqSLEEP\*(rq or \*(lqLOCK\*(rq state, +the state column will report the name of the event or lock on which the +process is waiting. +Lock names are prefixed with an asterisk \*(lq*\*(rq while sleep events +are not. +.SH AUTHOR +William LeFebvre, EECS Department, Northwestern University +.SH ENVIRONMENT +.DT +TOP user-configurable defaults for options. +.SH FILES +.DT +/dev/kmem kernel memory +.br +/dev/mem physical memory +.br +/etc/passwd used to map uid numbers to user names +.br +/boot/kernel/kernel system image +.SH BUGS +Don't shoot me, but the default for +.B \-I +has changed once again. So many people were confused by the fact that +.I top +wasn't showing them all the processes that I have decided to make the +default behavior show idle processes, just like it did in version 2. +But to appease folks who can't stand that behavior, I have added the +ability to set \*(lqdefault\*(rq options in the environment variable +.B TOP +(see the OPTIONS section). Those who want the behavior that version +3.0 had need only set the environment variable +.B TOP +to \*(lq\-I\*(rq. +.PP +The command name for swapped processes should be tracked down, but this +would make the program run slower. +.PP +As with +.IR ps (1), +things can change while +.I top +is collecting information for an update. The picture it gives is only a +close approximation to reality. +.SH "SEE ALSO" +kill(1), +ps(1), +stty(1), +mem(4), +renice(8) Modified: head/usr.bin/top/Makefile ============================================================================== --- head/usr.bin/top/Makefile Mon Jun 8 19:44:04 2015 (r284164) +++ head/usr.bin/top/Makefile Mon Jun 8 19:45:24 2015 (r284165) @@ -30,8 +30,8 @@ sigdesc.h: ${SIGCONV_AWK} ${SIGNAL_H} awk -f ${SIGCONV_AWK} < ${SIGNAL_H} > ${.TARGET} CLEANFILES+= top.local.h top.x -.SUFFIXES: .X .x .H .h -.X.x .H.h: +.SUFFIXES: .xs .x .hs .h +.xs.x .hs.h: @${ECHO} Making ${.TARGET} from ${.IMPSRC} @sed -e's,%LoadMax%,5.0,g' \ -e's,%TableSize%,20011,g' \ From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 20:03:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB8881B8; Mon, 8 Jun 2015 20:03:16 +0000 (UTC) (envelope-from jkim@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A348146E; Mon, 8 Jun 2015 20:03:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58K3Gib017960; Mon, 8 Jun 2015 20:03:16 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58K3GDu017959; Mon, 8 Jun 2015 20:03:16 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201506082003.t58K3GDu017959@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 8 Jun 2015 20:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284166 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 20:03:16 -0000 Author: jkim Date: Mon Jun 8 20:03:15 2015 New Revision: 284166 URL: https://svnweb.freebsd.org/changeset/base/284166 Log: Properly initialize flags for accept4(2) not to return spurious EINVAL. Note this fixes a Linuxulator regression introduced in r283490. PR: 200662 Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Mon Jun 8 19:45:24 2015 (r284165) +++ head/sys/compat/linux/linux_socket.c Mon Jun 8 20:03:15 2015 (r284166) @@ -787,6 +787,7 @@ linux_accept_common(struct thread *td, i /* XXX: */ bsd_args.name = (struct sockaddr * __restrict)PTRIN(addr); bsd_args.anamelen = PTRIN(namelen);/* XXX */ + bsd_args.flags = 0; error = linux_set_socket_flags(flags, &bsd_args.flags); if (error != 0) return (error); From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 20:12:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 474287C8; Mon, 8 Jun 2015 20:12:45 +0000 (UTC) (envelope-from dim@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 358E81703; Mon, 8 Jun 2015 20:12:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58KCjlT023062; Mon, 8 Jun 2015 20:12:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58KCjZX023061; Mon, 8 Jun 2015 20:12:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201506082012.t58KCjZX023061@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 8 Jun 2015 20:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284167 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 20:12:45 -0000 Author: dim Date: Mon Jun 8 20:12:44 2015 New Revision: 284167 URL: https://svnweb.freebsd.org/changeset/base/284167 Log: Merge r283870 from amd64: Remove unneeded NULL checks in trap_fatal(). Since td_name is an array member of struct thread, it can never be NULL, so the check can be removed. In addition, curproc can never be NULL, so remove the if statement, and splice the two printfs() together. While here, remove the u_long cast, and use the correct printf format specifier for curproc->p_pid. Requested by: jhb MFC after: 3 days Modified: head/sys/i386/i386/trap.c Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Mon Jun 8 20:03:15 2015 (r284166) +++ head/sys/i386/i386/trap.c Mon Jun 8 20:12:44 2015 (r284167) @@ -998,12 +998,8 @@ trap_fatal(frame, eva) if (frame->tf_eflags & PSL_VM) printf("vm86, "); printf("IOPL = %d\n", (frame->tf_eflags & PSL_IOPL) >> 12); - printf("current process = "); - if (curproc) { - printf("%lu (%s)\n", (u_long)curproc->p_pid, curthread->td_name); - } else { - printf("Idle\n"); - } + printf("current process = %d (%s)\n", + curproc->p_pid, curthread->td_name); #ifdef KDB if (debugger_on_panic || kdb_active) { From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 21:32:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5797BF2D; Mon, 8 Jun 2015 21:32:32 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.net) Received: from heemeyer.club (heemeyer.club [IPv6:2001:19f0:6400:80a1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2ABC31AE7; Mon, 8 Jun 2015 21:32:31 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.net) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru [78.107.232.239]) by heemeyer.club (8.15.1/8.15.1) with ESMTPS id t58LWSoK058296 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 8 Jun 2015 21:32:29 GMT (envelope-from dchagin@dchagin.static.corbina.net) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] claimed to be dchagin.static.corbina.net Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.15.1/8.15.1) with ESMTPS id t58LWRFZ002029 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 9 Jun 2015 00:32:27 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.15.1/8.15.1/Submit) id t58LWRJk002028; Tue, 9 Jun 2015 00:32:27 +0300 (MSK) (envelope-from dchagin) Date: Tue, 9 Jun 2015 00:32:27 +0300 From: Chagin Dmitry To: Jung-uk Kim Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284166 - head/sys/compat/linux Message-ID: <20150608213227.GA2019@dchagin.static.corbina.net> References: <201506082003.t58K3GDu017959@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201506082003.t58K3GDu017959@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 21:32:32 -0000 On Mon, Jun 08, 2015 at 08:03:16PM +0000, Jung-uk Kim wrote: > Author: jkim > Date: Mon Jun 8 20:03:15 2015 > New Revision: 284166 > URL: https://svnweb.freebsd.org/changeset/base/284166 > > Log: > Properly initialize flags for accept4(2) not to return spurious EINVAL. > Note this fixes a Linuxulator regression introduced in r283490. > > PR: 200662 > Thank you! -- Have fun! chd From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 21:47:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A9EE6A8; Mon, 8 Jun 2015 21:47:46 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECD781DCD; Mon, 8 Jun 2015 21:47:45 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58LljME076495; Mon, 8 Jun 2015 21:47:45 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58LljFN076490; Mon, 8 Jun 2015 21:47:45 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506082147.t58LljFN076490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 8 Jun 2015 21:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284168 - head/sys/dev/proto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 21:47:46 -0000 Author: marcel Date: Mon Jun 8 21:47:44 2015 New Revision: 284168 URL: https://svnweb.freebsd.org/changeset/base/284168 Log: Implement mmap(2) for the busdma resource. Modified: head/sys/dev/proto/proto_busdma.c head/sys/dev/proto/proto_busdma.h head/sys/dev/proto/proto_core.c Modified: head/sys/dev/proto/proto_busdma.c ============================================================================== --- head/sys/dev/proto/proto_busdma.c Mon Jun 8 20:12:44 2015 (r284167) +++ head/sys/dev/proto/proto_busdma.c Mon Jun 8 21:47:44 2015 (r284168) @@ -146,16 +146,17 @@ proto_busdma_mem_alloc(struct proto_busd free(md, M_PROTO_BUSDMA); return (error); } - error = bus_dmamem_alloc(md->bd_tag, &md->kva, 0, &md->bd_map); + error = bus_dmamem_alloc(md->bd_tag, &md->virtaddr, 0, &md->bd_map); if (error) { bus_dma_tag_destroy(md->bd_tag); free(md, M_PROTO_BUSDMA); return (error); } + md->physaddr = pmap_kextract((uintptr_t)(md->virtaddr)); LIST_INSERT_HEAD(&tag->mds, md, peers); LIST_INSERT_HEAD(&busdma->mds, md, mds); ioc->u.mem.nsegs = 1; - ioc->u.mem.physaddr = pmap_kextract((uintptr_t)(md->kva)); + ioc->u.mem.physaddr = md->physaddr; ioc->result = (uintptr_t)(void *)md; return (0); } @@ -166,7 +167,7 @@ proto_busdma_mem_free(struct proto_busdm LIST_REMOVE(md, mds); LIST_REMOVE(md, peers); - bus_dmamem_free(md->bd_tag, md->kva, md->bd_map); + bus_dmamem_free(md->bd_tag, md->virtaddr, md->bd_map); bus_dma_tag_destroy(md->bd_tag); free(md, M_PROTO_BUSDMA); return (0); @@ -267,3 +268,16 @@ proto_busdma_ioctl(struct proto_softc *s } return (error); } + +int +proto_busdma_mmap_allowed(struct proto_busdma *busdma, vm_paddr_t physaddr) +{ + struct proto_md *md; + + LIST_FOREACH(md, &busdma->mds, mds) { + if (physaddr >= trunc_page(md->physaddr) && + physaddr <= trunc_page(md->physaddr + md->tag->maxsz)) + return (1); + } + return (0); +} Modified: head/sys/dev/proto/proto_busdma.h ============================================================================== --- head/sys/dev/proto/proto_busdma.h Mon Jun 8 20:12:44 2015 (r284167) +++ head/sys/dev/proto/proto_busdma.h Mon Jun 8 21:47:44 2015 (r284168) @@ -50,7 +50,8 @@ struct proto_md { LIST_ENTRY(proto_md) mds; LIST_ENTRY(proto_md) peers; struct proto_tag *tag; - void *kva; + void *virtaddr; + vm_paddr_t physaddr; bus_dma_tag_t bd_tag; bus_dmamap_t bd_map; }; @@ -69,4 +70,6 @@ int proto_busdma_cleanup(struct proto_so int proto_busdma_ioctl(struct proto_softc *, struct proto_busdma *, struct proto_ioc_busdma *); +int proto_busdma_mmap_allowed(struct proto_busdma *, vm_paddr_t); + #endif /* _DEV_PROTO_BUSDMA_H_ */ Modified: head/sys/dev/proto/proto_core.c ============================================================================== --- head/sys/dev/proto/proto_core.c Mon Jun 8 20:12:44 2015 (r284167) +++ head/sys/dev/proto/proto_core.c Mon Jun 8 21:47:44 2015 (r284168) @@ -402,19 +402,29 @@ proto_mmap(struct cdev *cdev, vm_ooffset { struct proto_res *r; - r = cdev->si_drv2; - - if (r->r_type != SYS_RES_MEMORY) - return (ENXIO); if (offset & PAGE_MASK) return (EINVAL); if (prot & PROT_EXEC) return (EACCES); - if (offset >= r->r_size) - return (EINVAL); - *paddr = rman_get_start(r->r_d.res) + offset; + + r = cdev->si_drv2; + + switch (r->r_type) { + case SYS_RES_MEMORY: + if (offset >= r->r_size) + return (EINVAL); + *paddr = rman_get_start(r->r_d.res) + offset; #ifndef __sparc64__ - *memattr = VM_MEMATTR_UNCACHEABLE; + *memattr = VM_MEMATTR_UNCACHEABLE; #endif + break; + case PROTO_RES_BUSDMA: + if (!proto_busdma_mmap_allowed(r->r_d.busdma, offset)) + return (EINVAL); + *paddr = offset; + break; + default: + return (ENXIO); + } return (0); } From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 22:01:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B56B29FD; Mon, 8 Jun 2015 22:01:35 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3CAF11EB; Mon, 8 Jun 2015 22:01:35 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t58M1Zpn086935; Mon, 8 Jun 2015 22:01:35 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t58M1Zdr086934; Mon, 8 Jun 2015 22:01:35 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506082201.t58M1Zdr086934@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 8 Jun 2015 22:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284169 - head/tools/bus_space X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 22:01:35 -0000 Author: marcel Date: Mon Jun 8 22:01:34 2015 New Revision: 284169 URL: https://svnweb.freebsd.org/changeset/base/284169 Log: Map the allocated DMA memory into the address space. Modified: head/tools/bus_space/busdma.c Modified: head/tools/bus_space/busdma.c ============================================================================== --- head/tools/bus_space/busdma.c Mon Jun 8 21:47:44 2015 (r284168) +++ head/tools/bus_space/busdma.c Mon Jun 8 22:01:34 2015 (r284169) @@ -61,7 +61,9 @@ struct obj { unsigned long datarate; } tag; struct { - } md; + unsigned long physaddr; + void *virtaddr; + } mem; } u; }; @@ -260,6 +262,10 @@ bd_mem_alloc(int tid, u_int flags) md->parent = tag; tag->refcnt++; md->key = ioc.result; + md->u.mem.physaddr = ioc.u.mem.physaddr; + md->u.mem.virtaddr = mmap(NULL, tag->u.tag.maxsz, + PROT_READ | PROT_WRITE, MAP_NOCORE | MAP_SHARED, md->fd, + md->u.mem.physaddr); return (md->oid); } @@ -273,6 +279,8 @@ bd_mem_free(int mdid) if (md == NULL) return (errno); + if (md->u.mem.virtaddr != MAP_FAILED) + munmap(md->u.mem.virtaddr, md->parent->u.tag.maxsz); memset(&ioc, 0, sizeof(ioc)); ioc.request = PROTO_IOC_BUSDMA_MEM_FREE; ioc.key = md->key; From owner-svn-src-head@FreeBSD.ORG Mon Jun 8 23:27:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 597C2B84; Mon, 8 Jun 2015 23:27:55 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0A051579; Mon, 8 Jun 2015 23:27:54 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: by wibdq8 with SMTP id dq8so466306wib.1; Mon, 08 Jun 2015 16:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=rPdMtIh+jkIzIiWQ1k8SXaUkYaE0DoBeZUJKyyUcf7Q=; b=fQ/8J+aOHI4aTsD9r+ZU/TgMq0Uben0AxK483FE5357dkwIgXuuvZYw1nsWlCc3qom l9Vsg9PjEHYA9c8a/tVuYpeVLJr40AK7LBNgH7XYkRD1321aNkYHuX35C6ToYSJFSPkW ouLJ9B1zIEsbXdsWxFR8qc9Dj6jBpI4S6yDl2C6kGvwPfP9chSyydHiPDcHyqqI18TO+ +ld/VHeM7R/lFAZOoT7VYAHNW1kfsTyE9+7QuKkTH0jt8VogPT5a5RBkJB1dW7Ij8Mk+ 7AC6ddYyV5rP/8FgRtV+Wtnh7Q0Ia5VPUq8Vi0r2IbkOU0BVC63ZfYXwJESZdTYeb2no 4kIw== MIME-Version: 1.0 X-Received: by 10.194.77.179 with SMTP id t19mr36005188wjw.30.1433806073136; Mon, 08 Jun 2015 16:27:53 -0700 (PDT) Received: by 10.194.162.8 with HTTP; Mon, 8 Jun 2015 16:27:53 -0700 (PDT) In-Reply-To: References: <201506052252.t55MqgOT000856@svn.freebsd.org> Date: Mon, 8 Jun 2015 16:27:53 -0700 Message-ID: Subject: Re: svn commit: r284049 - in head/sys: dev/ixl modules/ixl modules/ixlv From: Jack Vogel To: Adrian Chadd Cc: Jack F Vogel , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2015 23:27:55 -0000 I did not realize this, but there is an update utility on our public site, this will update your hardware to the latest released version of FW provided its an OEM generic product, if you have another OEM specific adapter (say HP or Dell...), then you will need to get the update from them. https://downloadcenter.intel.com/download/24769/NVM-Update-Utility-for-Intel-Ethernet-Converged-Network-Adapter-XL710-X710-Series For right now this utility is only available for EFI or Linux, later in the Fall there will be a FreeBSD specific version. Hope this helps, Jack On Fri, Jun 5, 2015 at 4:07 PM, Adrian Chadd wrote: > Hi! > > Is there any public information / firmware on this? Or do we have to > have some commercial arrangement with Intel to get the updated > firmware? > > My support channel is "whoever gave me the two ixv 40g nics to test > netmap on soon" and I don't think they have firmware. :) > > Thanks, > > > > -adrian > > > On 5 June 2015 at 15:52, Jack F Vogel wrote: > > Author: jfv > > Date: Fri Jun 5 22:52:42 2015 > > New Revision: 284049 > > URL: https://svnweb.freebsd.org/changeset/base/284049 > > > > Log: > > Update SW4 to the Intel ixl/ixlv drivers. This is primarily a shared > > code update, with supporting changes in the CORE. Changes for the > extended > > media types, VF driver has virtual channel protocol changes, and some > > register use corrections. This software change should be coordinated > with > > Firmware updates to your hardware, contact your support channels for > that. > > > > MFC after: 1 week > > > > Added: > > head/sys/dev/ixl/i40e_devids.h (contents, props changed) > > Modified: > > head/sys/dev/ixl/i40e_adminq.c > > head/sys/dev/ixl/i40e_adminq.h > > head/sys/dev/ixl/i40e_adminq_cmd.h > > head/sys/dev/ixl/i40e_common.c > > head/sys/dev/ixl/i40e_hmc.c > > head/sys/dev/ixl/i40e_hmc.h > > head/sys/dev/ixl/i40e_lan_hmc.c > > head/sys/dev/ixl/i40e_nvm.c > > head/sys/dev/ixl/i40e_osdep.h > > head/sys/dev/ixl/i40e_prototype.h > > head/sys/dev/ixl/i40e_register.h > > head/sys/dev/ixl/i40e_type.h > > head/sys/dev/ixl/i40e_virtchnl.h > > head/sys/dev/ixl/if_ixl.c > > head/sys/dev/ixl/if_ixlv.c > > head/sys/dev/ixl/ixlv.h > > head/sys/dev/ixl/ixlvc.c > > head/sys/modules/ixl/Makefile > > head/sys/modules/ixlv/Makefile > > > > Modified: head/sys/dev/ixl/i40e_adminq.c > > > ============================================================================== > > --- head/sys/dev/ixl/i40e_adminq.c Fri Jun 5 21:45:35 2015 > (r284048) > > +++ head/sys/dev/ixl/i40e_adminq.c Fri Jun 5 22:52:42 2015 > (r284049) > > @@ -315,8 +315,12 @@ static enum i40e_status_code i40e_config > > wr32(hw, hw->aq.asq.tail, 0); > > > > /* set starting point */ > > - wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | > > - I40E_PF_ATQLEN_ATQENABLE_MASK)); > > + if (!i40e_is_vf(hw)) > > + wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | > > + > I40E_PF_ATQLEN_ATQENABLE_MASK)); > > + if (i40e_is_vf(hw)) > > + wr32(hw, hw->aq.asq.len, (hw->aq.num_asq_entries | > > + > I40E_VF_ATQLEN1_ATQENABLE_MASK)); > > wr32(hw, hw->aq.asq.bal, I40E_LO_DWORD(hw->aq.asq.desc_buf.pa)); > > wr32(hw, hw->aq.asq.bah, I40E_HI_DWORD(hw->aq.asq.desc_buf.pa)); > > > > @@ -344,8 +348,12 @@ static enum i40e_status_code i40e_config > > wr32(hw, hw->aq.arq.tail, 0); > > > > /* set starting point */ > > - wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | > > - I40E_PF_ARQLEN_ARQENABLE_MASK)); > > + if (!i40e_is_vf(hw)) > > + wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | > > + > I40E_PF_ARQLEN_ARQENABLE_MASK)); > > + if (i40e_is_vf(hw)) > > + wr32(hw, hw->aq.arq.len, (hw->aq.num_arq_entries | > > + > I40E_VF_ARQLEN1_ARQENABLE_MASK)); > > wr32(hw, hw->aq.arq.bal, I40E_LO_DWORD(hw->aq.arq.desc_buf.pa)); > > wr32(hw, hw->aq.arq.bah, I40E_HI_DWORD(hw->aq.arq.desc_buf.pa)); > > > > @@ -559,6 +567,7 @@ enum i40e_status_code i40e_init_adminq(s > > { > > enum i40e_status_code ret_code; > > u16 eetrack_lo, eetrack_hi; > > + u16 cfg_ptr, oem_hi, oem_lo; > > int retry = 0; > > /* verify input for valid configuration */ > > if ((hw->aq.num_arq_entries == 0) || > > @@ -619,6 +628,12 @@ enum i40e_status_code i40e_init_adminq(s > > i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo); > > i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi); > > hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo; > > + i40e_read_nvm_word(hw, I40E_SR_BOOT_CONFIG_PTR, &cfg_ptr); > > + i40e_read_nvm_word(hw, (cfg_ptr + I40E_NVM_OEM_VER_OFF), > > + &oem_hi); > > + i40e_read_nvm_word(hw, (cfg_ptr + (I40E_NVM_OEM_VER_OFF + 1)), > > + &oem_lo); > > + hw->nvm.oem_ver = ((u32)oem_hi << 16) | oem_lo; > > > > if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) { > > ret_code = I40E_ERR_FIRMWARE_API_VERSION; > > @@ -669,6 +684,9 @@ enum i40e_status_code i40e_shutdown_admi > > i40e_destroy_spinlock(&hw->aq.asq_spinlock); > > i40e_destroy_spinlock(&hw->aq.arq_spinlock); > > > > + if (hw->nvm_buff.va) > > + i40e_free_virt_mem(hw, &hw->nvm_buff); > > + > > return ret_code; > > } > > > > @@ -688,16 +706,16 @@ u16 i40e_clean_asq(struct i40e_hw *hw) > > > > desc = I40E_ADMINQ_DESC(*asq, ntc); > > details = I40E_ADMINQ_DETAILS(*asq, ntc); > > + > > while (rd32(hw, hw->aq.asq.head) != ntc) { > > i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, > > - "%s: ntc %d head %d.\n", __FUNCTION__, ntc, > > - rd32(hw, hw->aq.asq.head)); > > + "ntc %d head %d.\n", ntc, rd32(hw, > hw->aq.asq.head)); > > > > if (details->callback) { > > I40E_ADMINQ_CALLBACK cb_func = > > > (I40E_ADMINQ_CALLBACK)details->callback; > > - i40e_memcpy(&desc_cb, desc, > > - sizeof(struct i40e_aq_desc), > I40E_DMA_TO_DMA); > > + i40e_memcpy(&desc_cb, desc, sizeof(struct > i40e_aq_desc), > > + I40E_DMA_TO_DMA); > > cb_func(hw, &desc_cb); > > } > > i40e_memset(desc, 0, sizeof(*desc), I40E_DMA_MEM); > > @@ -755,6 +773,8 @@ enum i40e_status_code i40e_asq_send_comm > > u16 retval = 0; > > u32 val = 0; > > > > + hw->aq.asq_last_status = I40E_AQ_RC_OK; > > + > > val = rd32(hw, hw->aq.asq.head); > > if (val >= hw->aq.num_asq_entries) { > > i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, > > @@ -912,6 +932,11 @@ enum i40e_status_code i40e_asq_send_comm > > "AQTX: desc and buffer writeback:\n"); > > i40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, buff, > buff_size); > > > > + /* save writeback aq if requested */ > > + if (details->wb_desc) > > + i40e_memcpy(details->wb_desc, desc_on_ring, > > + sizeof(struct i40e_aq_desc), > I40E_DMA_TO_NONDMA); > > + > > /* update the error if time out occurred */ > > if ((!cmd_completed) && > > (!details->async && !details->postpone)) { > > @@ -971,7 +996,10 @@ enum i40e_status_code i40e_clean_arq_ele > > i40e_acquire_spinlock(&hw->aq.arq_spinlock); > > > > /* set next_to_use to head */ > > - ntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK); > > + if (!i40e_is_vf(hw)) > > + ntu = (rd32(hw, hw->aq.arq.head) & > I40E_PF_ARQH_ARQH_MASK); > > + if (i40e_is_vf(hw)) > > + ntu = (rd32(hw, hw->aq.arq.head) & > I40E_VF_ARQH1_ARQH_MASK); > > if (ntu == ntc) { > > /* nothing to do - shouldn't need to update ring's > values */ > > ret_code = I40E_ERR_ADMIN_QUEUE_NO_WORK; > > @@ -1040,6 +1068,19 @@ clean_arq_element_out: > > i40e_release_nvm(hw); > > hw->aq.nvm_release_on_done = FALSE; > > } > > + > > + switch (hw->nvmupd_state) { > > + case I40E_NVMUPD_STATE_INIT_WAIT: > > + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; > > + break; > > + > > + case I40E_NVMUPD_STATE_WRITE_WAIT: > > + hw->nvmupd_state = I40E_NVMUPD_STATE_WRITING; > > + break; > > + > > + default: > > + break; > > + } > > } > > > > return ret_code; > > @@ -1051,9 +1092,6 @@ void i40e_resume_aq(struct i40e_hw *hw) > > hw->aq.asq.next_to_use = 0; > > hw->aq.asq.next_to_clean = 0; > > > > -#if (I40E_VF_ATQLEN_ATQENABLE_MASK != I40E_PF_ATQLEN_ATQENABLE_MASK) > > -#error I40E_VF_ATQLEN_ATQENABLE_MASK != I40E_PF_ATQLEN_ATQENABLE_MASK > > -#endif > > i40e_config_asq_regs(hw); > > > > hw->aq.arq.next_to_use = 0; > > > > Modified: head/sys/dev/ixl/i40e_adminq.h > > > ============================================================================== > > --- head/sys/dev/ixl/i40e_adminq.h Fri Jun 5 21:45:35 2015 > (r284048) > > +++ head/sys/dev/ixl/i40e_adminq.h Fri Jun 5 22:52:42 2015 > (r284049) > > @@ -1,6 +1,6 @@ > > > /****************************************************************************** > > > > - Copyright (c) 2013-2014, Intel Corporation > > + Copyright (c) 2013-2015, Intel Corporation > > All rights reserved. > > > > Redistribution and use in source and binary forms, with or without > > @@ -77,6 +77,7 @@ struct i40e_asq_cmd_details { > > u16 flags_dis; > > bool async; > > bool postpone; > > + struct i40e_aq_desc *wb_desc; > > }; > > > > #define I40E_ADMINQ_DETAILS(R, i) \ > > > > Modified: head/sys/dev/ixl/i40e_adminq_cmd.h > > > ============================================================================== > > --- head/sys/dev/ixl/i40e_adminq_cmd.h Fri Jun 5 21:45:35 2015 > (r284048) > > +++ head/sys/dev/ixl/i40e_adminq_cmd.h Fri Jun 5 22:52:42 2015 > (r284049) > > @@ -42,7 +42,11 @@ > > */ > > > > #define I40E_FW_API_VERSION_MAJOR 0x0001 > > -#define I40E_FW_API_VERSION_MINOR 0x0002 > > +#ifdef X722_SUPPORT > > +#define I40E_FW_API_VERSION_MINOR 0x0003 > > +#else > > +#define I40E_FW_API_VERSION_MINOR 0x0004 > > +#endif > > > > struct i40e_aq_desc { > > __le16 flags; > > @@ -140,12 +144,7 @@ enum i40e_admin_queue_opc { > > i40e_aqc_opc_list_func_capabilities = 0x000A, > > i40e_aqc_opc_list_dev_capabilities = 0x000B, > > > > - i40e_aqc_opc_set_cppm_configuration = 0x0103, > > - i40e_aqc_opc_set_arp_proxy_entry = 0x0104, > > - i40e_aqc_opc_set_ns_proxy_entry = 0x0105, > > - > > /* LAA */ > > - i40e_aqc_opc_mng_laa = 0x0106, /* AQ obsolete */ > > i40e_aqc_opc_mac_address_read = 0x0107, > > i40e_aqc_opc_mac_address_write = 0x0108, > > > > @@ -240,6 +239,7 @@ enum i40e_admin_queue_opc { > > i40e_aqc_opc_nvm_update = 0x0703, > > i40e_aqc_opc_nvm_config_read = 0x0704, > > i40e_aqc_opc_nvm_config_write = 0x0705, > > + i40e_aqc_opc_oem_post_update = 0x0720, > > > > /* virtualization commands */ > > i40e_aqc_opc_send_msg_to_pf = 0x0801, > > @@ -270,7 +270,12 @@ enum i40e_admin_queue_opc { > > /* Tunnel commands */ > > i40e_aqc_opc_add_udp_tunnel = 0x0B00, > > i40e_aqc_opc_del_udp_tunnel = 0x0B01, > > - i40e_aqc_opc_tunnel_key_structure = 0x0B10, > > +#ifdef X722_SUPPORT > > + i40e_aqc_opc_set_rss_key = 0x0B02, > > + i40e_aqc_opc_set_rss_lut = 0x0B03, > > + i40e_aqc_opc_get_rss_key = 0x0B04, > > + i40e_aqc_opc_get_rss_lut = 0x0B05, > > +#endif > > > > /* Async Events */ > > i40e_aqc_opc_event_lan_overflow = 0x1001, > > @@ -282,8 +287,6 @@ enum i40e_admin_queue_opc { > > i40e_aqc_opc_oem_ocbb_initialize = 0xFE03, > > > > /* debug commands */ > > - i40e_aqc_opc_debug_get_deviceid = 0xFF00, > > - i40e_aqc_opc_debug_set_mode = 0xFF01, > > i40e_aqc_opc_debug_read_reg = 0xFF03, > > i40e_aqc_opc_debug_write_reg = 0xFF04, > > i40e_aqc_opc_debug_modify_reg = 0xFF07, > > @@ -517,7 +520,8 @@ struct i40e_aqc_mac_address_read { > > #define I40E_AQC_SAN_ADDR_VALID 0x20 > > #define I40E_AQC_PORT_ADDR_VALID 0x40 > > #define I40E_AQC_WOL_ADDR_VALID 0x80 > > -#define I40E_AQC_ADDR_VALID_MASK 0xf0 > > +#define I40E_AQC_MC_MAG_EN_VALID 0x100 > > +#define I40E_AQC_ADDR_VALID_MASK 0x1F0 > > u8 reserved[6]; > > __le32 addr_high; > > __le32 addr_low; > > @@ -540,7 +544,9 @@ struct i40e_aqc_mac_address_write { > > #define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x0000 > > #define I40E_AQC_WRITE_TYPE_LAA_WOL 0x4000 > > #define I40E_AQC_WRITE_TYPE_PORT 0x8000 > > -#define I40E_AQC_WRITE_TYPE_MASK 0xc000 > > +#define I40E_AQC_WRITE_TYPE_UPDATE_MC_MAG 0xC000 > > +#define I40E_AQC_WRITE_TYPE_MASK 0xC000 > > + > > __le16 mac_sah; > > __le32 mac_sal; > > u8 reserved[8]; > > @@ -834,8 +840,16 @@ struct i40e_aqc_vsi_properties_data { > > I40E_AQ_VSI_TC_QUE_NUMBER_SHIFT) > > /* queueing option section */ > > u8 queueing_opt_flags; > > +#ifdef X722_SUPPORT > > +#define I40E_AQ_VSI_QUE_OPT_MULTICAST_UDP_ENA 0x04 > > +#define I40E_AQ_VSI_QUE_OPT_UNICAST_UDP_ENA 0x08 > > +#endif > > #define I40E_AQ_VSI_QUE_OPT_TCP_ENA 0x10 > > #define I40E_AQ_VSI_QUE_OPT_FCOE_ENA 0x20 > > +#ifdef X722_SUPPORT > > +#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_PF 0x00 > > +#define I40E_AQ_VSI_QUE_OPT_RSS_LUT_VSI 0x40 > > +#endif > > u8 queueing_opt_reserved[3]; > > /* scheduler section */ > > u8 up_enable_bits; > > @@ -1076,6 +1090,7 @@ struct i40e_aqc_set_vsi_promiscuous_mode > > __le16 seid; > > #define I40E_AQC_VSI_PROM_CMD_SEID_MASK 0x3FF > > __le16 vlan_tag; > > +#define I40E_AQC_SET_VSI_VLAN_MASK 0x0FFF > > #define I40E_AQC_SET_VSI_VLAN_VALID 0x8000 > > u8 reserved[8]; > > }; > > @@ -1725,11 +1740,13 @@ struct i40e_aqc_get_link_status { > > u8 phy_type; /* i40e_aq_phy_type */ > > u8 link_speed; /* i40e_aq_link_speed */ > > u8 link_info; > > -#define I40E_AQ_LINK_UP 0x01 > > +#define I40E_AQ_LINK_UP 0x01 /* obsolete */ > > +#define I40E_AQ_LINK_UP_FUNCTION 0x01 > > #define I40E_AQ_LINK_FAULT 0x02 > > #define I40E_AQ_LINK_FAULT_TX 0x04 > > #define I40E_AQ_LINK_FAULT_RX 0x08 > > #define I40E_AQ_LINK_FAULT_REMOTE 0x10 > > +#define I40E_AQ_LINK_UP_PORT 0x20 > > #define I40E_AQ_MEDIA_AVAILABLE 0x40 > > #define I40E_AQ_SIGNAL_DETECT 0x80 > > u8 an_info; > > @@ -1891,6 +1908,26 @@ struct i40e_aqc_nvm_config_data_immediat > > > > I40E_CHECK_STRUCT_LEN(0xc, i40e_aqc_nvm_config_data_immediate_field); > > > > +/* OEM Post Update (indirect 0x0720) > > + * no command data struct used > > + */ > > + struct i40e_aqc_nvm_oem_post_update { > > +#define I40E_AQ_NVM_OEM_POST_UPDATE_EXTERNAL_DATA 0x01 > > + u8 sel_data; > > + u8 reserved[7]; > > +}; > > + > > +I40E_CHECK_STRUCT_LEN(0x8, i40e_aqc_nvm_oem_post_update); > > + > > +struct i40e_aqc_nvm_oem_post_update_buffer { > > + u8 str_len; > > + u8 dev_addr; > > + __le16 eeprom_addr; > > + u8 data[36]; > > +}; > > + > > +I40E_CHECK_STRUCT_LEN(0x28, i40e_aqc_nvm_oem_post_update_buffer); > > + > > /* Send to PF command (indirect 0x0801) id is only used by PF > > * Send to VF command (indirect 0x0802) id is only used by PF > > * Send to Peer PF command (indirect 0x0803) > > @@ -2064,12 +2101,28 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_star > > #define I40E_AQC_CEE_APP_ISCSI_MASK (0x7 << > I40E_AQC_CEE_APP_ISCSI_SHIFT) > > #define I40E_AQC_CEE_APP_FIP_SHIFT 0x8 > > #define I40E_AQC_CEE_APP_FIP_MASK (0x7 << > I40E_AQC_CEE_APP_FIP_SHIFT) > > + > > #define I40E_AQC_CEE_PG_STATUS_SHIFT 0x0 > > #define I40E_AQC_CEE_PG_STATUS_MASK (0x7 << > I40E_AQC_CEE_PG_STATUS_SHIFT) > > #define I40E_AQC_CEE_PFC_STATUS_SHIFT 0x3 > > #define I40E_AQC_CEE_PFC_STATUS_MASK (0x7 << > I40E_AQC_CEE_PFC_STATUS_SHIFT) > > #define I40E_AQC_CEE_APP_STATUS_SHIFT 0x8 > > #define I40E_AQC_CEE_APP_STATUS_MASK (0x7 << > I40E_AQC_CEE_APP_STATUS_SHIFT) > > +#define I40E_AQC_CEE_FCOE_STATUS_SHIFT 0x8 > > +#define I40E_AQC_CEE_FCOE_STATUS_MASK (0x7 << > I40E_AQC_CEE_FCOE_STATUS_SHIFT) > > +#define I40E_AQC_CEE_ISCSI_STATUS_SHIFT 0xB > > +#define I40E_AQC_CEE_ISCSI_STATUS_MASK (0x7 << > I40E_AQC_CEE_ISCSI_STATUS_SHIFT) > > +#define I40E_AQC_CEE_FIP_STATUS_SHIFT 0x10 > > +#define I40E_AQC_CEE_FIP_STATUS_MASK (0x7 << > I40E_AQC_CEE_FIP_STATUS_SHIFT) > > + > > +/* struct i40e_aqc_get_cee_dcb_cfg_v1_resp was originally defined with > > + * word boundary layout issues, which the Linux compilers silently deal > > + * with by adding padding, making the actual struct larger than > designed. > > + * However, the FW compiler for the NIC is less lenient and complains > > + * about the struct. Hence, the struct defined here has an extra byte > in > > + * fields reserved3 and reserved4 to directly acknowledge that padding, > > + * and the new length is used in the length check macro. > > + */ > > struct i40e_aqc_get_cee_dcb_cfg_v1_resp { > > u8 reserved1; > > u8 oper_num_tc; > > @@ -2077,9 +2130,9 @@ struct i40e_aqc_get_cee_dcb_cfg_v1_resp > > u8 reserved2; > > u8 oper_tc_bw[8]; > > u8 oper_pfc_en; > > - u8 reserved3; > > + u8 reserved3[2]; > > __le16 oper_app_prio; > > - u8 reserved4; > > + u8 reserved4[2]; > > __le16 tlv_status; > > }; > > > > @@ -2168,6 +2221,48 @@ struct i40e_aqc_del_udp_tunnel_completio > > }; > > > > I40E_CHECK_CMD_LENGTH(i40e_aqc_del_udp_tunnel_completion); > > +#ifdef X722_SUPPORT > > + > > +struct i40e_aqc_get_set_rss_key { > > +#define I40E_AQC_SET_RSS_KEY_VSI_VALID (0x1 << 15) > > +#define I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT 0 > > +#define I40E_AQC_SET_RSS_KEY_VSI_ID_MASK (0x3FF << \ > > + > I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT) > > + __le16 vsi_id; > > + u8 reserved[6]; > > + __le32 addr_high; > > + __le32 addr_low; > > +}; > > + > > +I40E_CHECK_CMD_LENGTH(i40e_aqc_get_set_rss_key); > > + > > +struct i40e_aqc_get_set_rss_key_data { > > + u8 standard_rss_key[0x28]; > > + u8 extended_hash_key[0xc]; > > +}; > > + > > +I40E_CHECK_STRUCT_LEN(0x34, i40e_aqc_get_set_rss_key_data); > > + > > +struct i40e_aqc_get_set_rss_lut { > > +#define I40E_AQC_SET_RSS_LUT_VSI_VALID (0x1 << 15) > > +#define I40E_AQC_SET_RSS_LUT_VSI_ID_SHIFT 0 > > +#define I40E_AQC_SET_RSS_LUT_VSI_ID_MASK (0x3FF << \ > > + > I40E_AQC_SET_RSS_LUT_VSI_ID_SHIFT) > > + __le16 vsi_id; > > +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT 0 > > +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK (0x1 << \ > > + > I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) > > + > > +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_VSI 0 > > +#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_PF 1 > > + __le16 flags; > > + u8 reserved[4]; > > + __le32 addr_high; > > + __le32 addr_low; > > +}; > > + > > +I40E_CHECK_CMD_LENGTH(i40e_aqc_get_set_rss_lut); > > +#endif > > > > /* tunnel key structure 0x0B10 */ > > > > > > Modified: head/sys/dev/ixl/i40e_common.c > > > ============================================================================== > > --- head/sys/dev/ixl/i40e_common.c Fri Jun 5 21:45:35 2015 > (r284048) > > +++ head/sys/dev/ixl/i40e_common.c Fri Jun 5 22:52:42 2015 > (r284049) > > @@ -62,9 +62,24 @@ enum i40e_status_code i40e_set_mac_type( > > case I40E_DEV_ID_QSFP_B: > > case I40E_DEV_ID_QSFP_C: > > case I40E_DEV_ID_10G_BASE_T: > > + case I40E_DEV_ID_10G_BASE_T4: > > case I40E_DEV_ID_20G_KR2: > > + case I40E_DEV_ID_20G_KR2_A: > > hw->mac.type = I40E_MAC_XL710; > > break; > > +#ifdef X722_SUPPORT > > + case I40E_DEV_ID_SFP_X722: > > + case I40E_DEV_ID_1G_BASE_T_X722: > > + case I40E_DEV_ID_10G_BASE_T_X722: > > + hw->mac.type = I40E_MAC_X722; > > + break; > > +#endif > > +#ifdef X722_SUPPORT > > + case I40E_DEV_ID_X722_VF: > > + case I40E_DEV_ID_X722_VF_HV: > > + hw->mac.type = I40E_MAC_X722_VF; > > + break; > > +#endif > > case I40E_DEV_ID_VF: > > case I40E_DEV_ID_VF_HV: > > hw->mac.type = I40E_MAC_VF; > > @@ -83,6 +98,212 @@ enum i40e_status_code i40e_set_mac_type( > > } > > > > /** > > + * i40e_aq_str - convert AQ err code to a string > > + * @hw: pointer to the HW structure > > + * @aq_err: the AQ error code to convert > > + **/ > > +char *i40e_aq_str(struct i40e_hw *hw, enum i40e_admin_queue_err aq_err) > > +{ > > + switch (aq_err) { > > + case I40E_AQ_RC_OK: > > + return "OK"; > > + case I40E_AQ_RC_EPERM: > > + return "I40E_AQ_RC_EPERM"; > > + case I40E_AQ_RC_ENOENT: > > + return "I40E_AQ_RC_ENOENT"; > > + case I40E_AQ_RC_ESRCH: > > + return "I40E_AQ_RC_ESRCH"; > > + case I40E_AQ_RC_EINTR: > > + return "I40E_AQ_RC_EINTR"; > > + case I40E_AQ_RC_EIO: > > + return "I40E_AQ_RC_EIO"; > > + case I40E_AQ_RC_ENXIO: > > + return "I40E_AQ_RC_ENXIO"; > > + case I40E_AQ_RC_E2BIG: > > + return "I40E_AQ_RC_E2BIG"; > > + case I40E_AQ_RC_EAGAIN: > > + return "I40E_AQ_RC_EAGAIN"; > > + case I40E_AQ_RC_ENOMEM: > > + return "I40E_AQ_RC_ENOMEM"; > > + case I40E_AQ_RC_EACCES: > > + return "I40E_AQ_RC_EACCES"; > > + case I40E_AQ_RC_EFAULT: > > + return "I40E_AQ_RC_EFAULT"; > > + case I40E_AQ_RC_EBUSY: > > + return "I40E_AQ_RC_EBUSY"; > > + case I40E_AQ_RC_EEXIST: > > + return "I40E_AQ_RC_EEXIST"; > > + case I40E_AQ_RC_EINVAL: > > + return "I40E_AQ_RC_EINVAL"; > > + case I40E_AQ_RC_ENOTTY: > > + return "I40E_AQ_RC_ENOTTY"; > > + case I40E_AQ_RC_ENOSPC: > > + return "I40E_AQ_RC_ENOSPC"; > > + case I40E_AQ_RC_ENOSYS: > > + return "I40E_AQ_RC_ENOSYS"; > > + case I40E_AQ_RC_ERANGE: > > + return "I40E_AQ_RC_ERANGE"; > > + case I40E_AQ_RC_EFLUSHED: > > + return "I40E_AQ_RC_EFLUSHED"; > > + case I40E_AQ_RC_BAD_ADDR: > > + return "I40E_AQ_RC_BAD_ADDR"; > > + case I40E_AQ_RC_EMODE: > > + return "I40E_AQ_RC_EMODE"; > > + case I40E_AQ_RC_EFBIG: > > + return "I40E_AQ_RC_EFBIG"; > > + } > > + > > + snprintf(hw->err_str, sizeof(hw->err_str), "%d", aq_err); > > + return hw->err_str; > > +} > > + > > +/** > > + * i40e_stat_str - convert status err code to a string > > + * @hw: pointer to the HW structure > > + * @stat_err: the status error code to convert > > + **/ > > +char *i40e_stat_str(struct i40e_hw *hw, enum i40e_status_code stat_err) > > +{ > > + switch (stat_err) { > > + case I40E_SUCCESS: > > + return "OK"; > > + case I40E_ERR_NVM: > > + return "I40E_ERR_NVM"; > > + case I40E_ERR_NVM_CHECKSUM: > > + return "I40E_ERR_NVM_CHECKSUM"; > > + case I40E_ERR_PHY: > > + return "I40E_ERR_PHY"; > > + case I40E_ERR_CONFIG: > > + return "I40E_ERR_CONFIG"; > > + case I40E_ERR_PARAM: > > + return "I40E_ERR_PARAM"; > > + case I40E_ERR_MAC_TYPE: > > + return "I40E_ERR_MAC_TYPE"; > > + case I40E_ERR_UNKNOWN_PHY: > > + return "I40E_ERR_UNKNOWN_PHY"; > > + case I40E_ERR_LINK_SETUP: > > + return "I40E_ERR_LINK_SETUP"; > > + case I40E_ERR_ADAPTER_STOPPED: > > + return "I40E_ERR_ADAPTER_STOPPED"; > > + case I40E_ERR_INVALID_MAC_ADDR: > > + return "I40E_ERR_INVALID_MAC_ADDR"; > > + case I40E_ERR_DEVICE_NOT_SUPPORTED: > > + return "I40E_ERR_DEVICE_NOT_SUPPORTED"; > > + case I40E_ERR_MASTER_REQUESTS_PENDING: > > + return "I40E_ERR_MASTER_REQUESTS_PENDING"; > > + case I40E_ERR_INVALID_LINK_SETTINGS: > > + return "I40E_ERR_INVALID_LINK_SETTINGS"; > > + case I40E_ERR_AUTONEG_NOT_COMPLETE: > > + return "I40E_ERR_AUTONEG_NOT_COMPLETE"; > > + case I40E_ERR_RESET_FAILED: > > + return "I40E_ERR_RESET_FAILED"; > > + case I40E_ERR_SWFW_SYNC: > > + return "I40E_ERR_SWFW_SYNC"; > > + case I40E_ERR_NO_AVAILABLE_VSI: > > + return "I40E_ERR_NO_AVAILABLE_VSI"; > > + case I40E_ERR_NO_MEMORY: > > + return "I40E_ERR_NO_MEMORY"; > > + case I40E_ERR_BAD_PTR: > > + return "I40E_ERR_BAD_PTR"; > > + case I40E_ERR_RING_FULL: > > + return "I40E_ERR_RING_FULL"; > > + case I40E_ERR_INVALID_PD_ID: > > + return "I40E_ERR_INVALID_PD_ID"; > > + case I40E_ERR_INVALID_QP_ID: > > + return "I40E_ERR_INVALID_QP_ID"; > > + case I40E_ERR_INVALID_CQ_ID: > > + return "I40E_ERR_INVALID_CQ_ID"; > > + case I40E_ERR_INVALID_CEQ_ID: > > + return "I40E_ERR_INVALID_CEQ_ID"; > > + case I40E_ERR_INVALID_AEQ_ID: > > + return "I40E_ERR_INVALID_AEQ_ID"; > > + case I40E_ERR_INVALID_SIZE: > > + return "I40E_ERR_INVALID_SIZE"; > > + case I40E_ERR_INVALID_ARP_INDEX: > > + return "I40E_ERR_INVALID_ARP_INDEX"; > > + case I40E_ERR_INVALID_FPM_FUNC_ID: > > + return "I40E_ERR_INVALID_FPM_FUNC_ID"; > > + case I40E_ERR_QP_INVALID_MSG_SIZE: > > + return "I40E_ERR_QP_INVALID_MSG_SIZE"; > > + case I40E_ERR_QP_TOOMANY_WRS_POSTED: > > + return "I40E_ERR_QP_TOOMANY_WRS_POSTED"; > > + case I40E_ERR_INVALID_FRAG_COUNT: > > + return "I40E_ERR_INVALID_FRAG_COUNT"; > > + case I40E_ERR_QUEUE_EMPTY: > > + return "I40E_ERR_QUEUE_EMPTY"; > > + case I40E_ERR_INVALID_ALIGNMENT: > > + return "I40E_ERR_INVALID_ALIGNMENT"; > > + case I40E_ERR_FLUSHED_QUEUE: > > + return "I40E_ERR_FLUSHED_QUEUE"; > > + case I40E_ERR_INVALID_PUSH_PAGE_INDEX: > > + return "I40E_ERR_INVALID_PUSH_PAGE_INDEX"; > > + case I40E_ERR_INVALID_IMM_DATA_SIZE: > > + return "I40E_ERR_INVALID_IMM_DATA_SIZE"; > > + case I40E_ERR_TIMEOUT: > > + return "I40E_ERR_TIMEOUT"; > > + case I40E_ERR_OPCODE_MISMATCH: > > + return "I40E_ERR_OPCODE_MISMATCH"; > > + case I40E_ERR_CQP_COMPL_ERROR: > > + return "I40E_ERR_CQP_COMPL_ERROR"; > > + case I40E_ERR_INVALID_VF_ID: > > + return "I40E_ERR_INVALID_VF_ID"; > > + case I40E_ERR_INVALID_HMCFN_ID: > > + return "I40E_ERR_INVALID_HMCFN_ID"; > > + case I40E_ERR_BACKING_PAGE_ERROR: > > + return "I40E_ERR_BACKING_PAGE_ERROR"; > > + case I40E_ERR_NO_PBLCHUNKS_AVAILABLE: > > + return "I40E_ERR_NO_PBLCHUNKS_AVAILABLE"; > > + case I40E_ERR_INVALID_PBLE_INDEX: > > + return "I40E_ERR_INVALID_PBLE_INDEX"; > > + case I40E_ERR_INVALID_SD_INDEX: > > + return "I40E_ERR_INVALID_SD_INDEX"; > > + case I40E_ERR_INVALID_PAGE_DESC_INDEX: > > + return "I40E_ERR_INVALID_PAGE_DESC_INDEX"; > > + case I40E_ERR_INVALID_SD_TYPE: > > + return "I40E_ERR_INVALID_SD_TYPE"; > > + case I40E_ERR_MEMCPY_FAILED: > > + return "I40E_ERR_MEMCPY_FAILED"; > > + case I40E_ERR_INVALID_HMC_OBJ_INDEX: > > + return "I40E_ERR_INVALID_HMC_OBJ_INDEX"; > > + case I40E_ERR_INVALID_HMC_OBJ_COUNT: > > + return "I40E_ERR_INVALID_HMC_OBJ_COUNT"; > > + case I40E_ERR_INVALID_SRQ_ARM_LIMIT: > > + return "I40E_ERR_INVALID_SRQ_ARM_LIMIT"; > > + case I40E_ERR_SRQ_ENABLED: > > + return "I40E_ERR_SRQ_ENABLED"; > > + case I40E_ERR_ADMIN_QUEUE_ERROR: > > + return "I40E_ERR_ADMIN_QUEUE_ERROR"; > > + case I40E_ERR_ADMIN_QUEUE_TIMEOUT: > > + return "I40E_ERR_ADMIN_QUEUE_TIMEOUT"; > > + case I40E_ERR_BUF_TOO_SHORT: > > + return "I40E_ERR_BUF_TOO_SHORT"; > > + case I40E_ERR_ADMIN_QUEUE_FULL: > > + return "I40E_ERR_ADMIN_QUEUE_FULL"; > > + case I40E_ERR_ADMIN_QUEUE_NO_WORK: > > + return "I40E_ERR_ADMIN_QUEUE_NO_WORK"; > > + case I40E_ERR_BAD_IWARP_CQE: > > + return "I40E_ERR_BAD_IWARP_CQE"; > > + case I40E_ERR_NVM_BLANK_MODE: > > + return "I40E_ERR_NVM_BLANK_MODE"; > > + case I40E_ERR_NOT_IMPLEMENTED: > > + return "I40E_ERR_NOT_IMPLEMENTED"; > > + case I40E_ERR_PE_DOORBELL_NOT_ENABLED: > > + return "I40E_ERR_PE_DOORBELL_NOT_ENABLED"; > > + case I40E_ERR_DIAG_TEST_FAILED: > > + return "I40E_ERR_DIAG_TEST_FAILED"; > > + case I40E_ERR_NOT_READY: > > + return "I40E_ERR_NOT_READY"; > > + case I40E_NOT_SUPPORTED: > > + return "I40E_NOT_SUPPORTED"; > > + case I40E_ERR_FIRMWARE_API_VERSION: > > + return "I40E_ERR_FIRMWARE_API_VERSION"; > > + } > > + > > + snprintf(hw->err_str, sizeof(hw->err_str), "%d", stat_err); > > + return hw->err_str; > > +} > > + > > +/** > > * i40e_debug_aq > > * @hw: debug mask related to admin queue > > * @mask: debug mask > > @@ -154,9 +375,13 @@ void i40e_debug_aq(struct i40e_hw *hw, e > > bool i40e_check_asq_alive(struct i40e_hw *hw) > > { > > if (hw->aq.asq.len) > > - return !!(rd32(hw, hw->aq.asq.len) & > I40E_PF_ATQLEN_ATQENABLE_MASK); > > - else > > - return FALSE; > > + if (!i40e_is_vf(hw)) > > + return !!(rd32(hw, hw->aq.asq.len) & > > + I40E_PF_ATQLEN_ATQENABLE_MASK); > > + if (i40e_is_vf(hw)) > > + return !!(rd32(hw, hw->aq.asq.len) & > > + I40E_VF_ATQLEN1_ATQENABLE_MASK); > > + return FALSE; > > } > > > > /** > > @@ -184,6 +409,171 @@ enum i40e_status_code i40e_aq_queue_shut > > > > return status; > > } > > +#ifdef X722_SUPPORT > > + > > +/** > > + * i40e_aq_get_set_rss_lut > > + * @hw: pointer to the hardware structure > > + * @vsi_id: vsi fw index > > + * @pf_lut: for PF table set TRUE, for VSI table set FALSE > > + * @lut: pointer to the lut buffer provided by the caller > > + * @lut_size: size of the lut buffer > > + * @set: set TRUE to set the table, FALSE to get the table > > + * > > + * Internal function to get or set RSS look up table > > + **/ > > +static enum i40e_status_code i40e_aq_get_set_rss_lut(struct i40e_hw *hw, > > + u16 vsi_id, bool > pf_lut, > > + u8 *lut, u16 > lut_size, > > + bool set) > > +{ > > + enum i40e_status_code status; > > + struct i40e_aq_desc desc; > > + struct i40e_aqc_get_set_rss_lut *cmd_resp = > > + (struct i40e_aqc_get_set_rss_lut *)&desc.params.raw; > > + > > + if (set) > > + i40e_fill_default_direct_cmd_desc(&desc, > > + > i40e_aqc_opc_set_rss_lut); > > + else > > + i40e_fill_default_direct_cmd_desc(&desc, > > + > i40e_aqc_opc_get_rss_lut); > > + > > + /* Indirect command */ > > + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); > > + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); > > + > > + cmd_resp->vsi_id = > > + CPU_TO_LE16((u16)((vsi_id << > > + > I40E_AQC_SET_RSS_LUT_VSI_ID_SHIFT) & > > + > I40E_AQC_SET_RSS_LUT_VSI_ID_MASK)); > > + cmd_resp->vsi_id |= > CPU_TO_LE16((u16)I40E_AQC_SET_RSS_LUT_VSI_VALID); > > + > > + if (pf_lut) > > + cmd_resp->flags |= CPU_TO_LE16((u16) > > + > ((I40E_AQC_SET_RSS_LUT_TABLE_TYPE_PF << > > + > I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) & > > + > I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK)); > > + else > > + cmd_resp->flags |= CPU_TO_LE16((u16) > > + > ((I40E_AQC_SET_RSS_LUT_TABLE_TYPE_VSI << > > + > I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) & > > + > I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK)); > > + > > + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)lut)); > > + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)lut)); > > + > > + status = i40e_asq_send_command(hw, &desc, lut, lut_size, NULL); > > + > > + return status; > > +} > > + > > +/** > > + * i40e_aq_get_rss_lut > > + * @hw: pointer to the hardware structure > > + * @vsi_id: vsi fw index > > + * @pf_lut: for PF table set TRUE, for VSI table set FALSE > > + * @lut: pointer to the lut buffer provided by the caller > > + * @lut_size: size of the lut buffer > > + * > > + * get the RSS lookup table, PF or VSI type > > + **/ > > +enum i40e_status_code i40e_aq_get_rss_lut(struct i40e_hw *hw, u16 > vsi_id, > > + bool pf_lut, u8 *lut, u16 > lut_size) > > +{ > > + return i40e_aq_get_set_rss_lut(hw, vsi_id, pf_lut, lut, lut_size, > > + FALSE); > > +} > > + > > +/** > > + * i40e_aq_set_rss_lut > > + * @hw: pointer to the hardware structure > > + * @vsi_id: vsi fw index > > + * @pf_lut: for PF table set TRUE, for VSI table set FALSE > > + * @lut: pointer to the lut buffer provided by the caller > > + * @lut_size: size of the lut buffer > > + * > > + * set the RSS lookup table, PF or VSI type > > + **/ > > +enum i40e_status_code i40e_aq_set_rss_lut(struct i40e_hw *hw, u16 > vsi_id, > > + bool pf_lut, u8 *lut, u16 > lut_size) > > +{ > > + return i40e_aq_get_set_rss_lut(hw, vsi_id, pf_lut, lut, > lut_size, TRUE); > > +} > > + > > +/** > > + * i40e_aq_get_set_rss_key > > + * @hw: pointer to the hw struct > > + * @vsi_id: vsi fw index > > + * @key: pointer to key info struct > > + * @set: set TRUE to set the key, FALSE to get the key > > + * > > + * get the RSS key per VSI > > + **/ > > +static enum i40e_status_code i40e_aq_get_set_rss_key(struct i40e_hw *hw, > > + u16 vsi_id, > > + struct > i40e_aqc_get_set_rss_key_data *key, > > + bool set) > > +{ > > + enum i40e_status_code status; > > + struct i40e_aq_desc desc; > > + struct i40e_aqc_get_set_rss_key *cmd_resp = > > + (struct i40e_aqc_get_set_rss_key > *)&desc.params.raw; > > + u16 key_size = sizeof(struct i40e_aqc_get_set_rss_key_data); > > + > > + if (set) > > + i40e_fill_default_direct_cmd_desc(&desc, > > + > i40e_aqc_opc_set_rss_key); > > + else > > + i40e_fill_default_direct_cmd_desc(&desc, > > + > i40e_aqc_opc_get_rss_key); > > + > > + /* Indirect command */ > > + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); > > + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); > > + > > + cmd_resp->vsi_id = > > + CPU_TO_LE16((u16)((vsi_id << > > + > I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT) & > > + > I40E_AQC_SET_RSS_KEY_VSI_ID_MASK)); > > + cmd_resp->vsi_id |= > CPU_TO_LE16((u16)I40E_AQC_SET_RSS_KEY_VSI_VALID); > > + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)key)); > > + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)key)); > > + > > + status = i40e_asq_send_command(hw, &desc, key, key_size, NULL); > > + > > + return status; > > +} > > + > > +/** > > + * i40e_aq_get_rss_key > > + * @hw: pointer to the hw struct > > + * @vsi_id: vsi fw index > > + * @key: pointer to key info struct > > + * > > + **/ > > +enum i40e_status_code i40e_aq_get_rss_key(struct i40e_hw *hw, > > + u16 vsi_id, > > + struct > i40e_aqc_get_set_rss_key_data *key) > > +{ > > + return i40e_aq_get_set_rss_key(hw, vsi_id, key, FALSE); > > +} > > + > > +/** > > + * i40e_aq_set_rss_key > > + * @hw: pointer to the hw struct > > + * @vsi_id: vsi fw index > > + * @key: pointer to key info struct > > + * > > + * set the RSS key per VSI > > + **/ > > +enum i40e_status_code i40e_aq_set_rss_key(struct i40e_hw *hw, > > + u16 vsi_id, > > + struct > i40e_aqc_get_set_rss_key_data *key) > > +{ > > + return i40e_aq_get_set_rss_key(hw, vsi_id, key, TRUE); > > +} > > +#endif /* X722_SUPPORT */ > > > > /* The i40e_ptype_lookup table is used to convert from the 8-bit ptype > in the > > * hardware to a bit-field that can be used by SW to more easily > determine the > > @@ -598,6 +988,9 @@ enum i40e_status_code i40e_init_shared_c > > > > switch (hw->mac.type) { > > case I40E_MAC_XL710: > > +#ifdef X722_SUPPORT > > + case I40E_MAC_X722: > > +#endif > > break; > > default: > > return I40E_ERR_DEVICE_NOT_SUPPORTED; > > @@ -888,7 +1281,7 @@ enum i40e_status_code i40e_pf_reset(stru > > grst_del = (rd32(hw, I40E_GLGEN_RSTCTL) & > > I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >> > > I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; > > - for (cnt = 0; cnt < grst_del + 2; cnt++) { > > + for (cnt = 0; cnt < grst_del + 10; cnt++) { > > reg = rd32(hw, I40E_GLGEN_RSTAT); > > if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK)) > > break; > > @@ -1108,9 +1501,11 @@ u32 i40e_led_get(struct i40e_hw *hw) > > if (!gpio_val) > > continue; > > > > - /* ignore gpio LED src mode entries related to the > activity LEDs */ > > - current_mode = ((gpio_val & > I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >> > > - I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); > > + /* ignore gpio LED src mode entries related to the > activity > > + * LEDs > > + */ > > + current_mode = ((gpio_val & > I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) > > + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); > > switch (current_mode) { > > case I40E_COMBINED_ACTIVITY: > > case I40E_FILTER_ACTIVITY: > > @@ -1154,9 +1549,11 @@ void i40e_led_set(struct i40e_hw *hw, u3 > > if (!gpio_val) > > continue; > > > > - /* ignore gpio LED src mode entries related to the > activity LEDs */ > > - current_mode = ((gpio_val & > I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >> > > - I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); > > + /* ignore gpio LED src mode entries related to the > activity > > + * LEDs > > + */ > > + current_mode = ((gpio_val & > I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) > > + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); > > switch (current_mode) { > > case I40E_COMBINED_ACTIVITY: > > case I40E_FILTER_ACTIVITY: > > @@ -1175,9 +1572,9 @@ void i40e_led_set(struct i40e_hw *hw, u3 > > blink = FALSE; > > > > if (blink) > > - gpio_val |= (1 << > I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); > > + gpio_val |= > BIT(I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); > > else > > - gpio_val &= ~(1 << > I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); > > + gpio_val &= > ~BIT(I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); > > > > wr32(hw, I40E_GLGEN_GPIO_CTL(i), gpio_val); > > break; > > @@ -1329,14 +1726,14 @@ enum i40e_status_code i40e_set_fc(struct > > *aq_failures |= I40E_SET_FC_AQ_FAIL_SET; > > } > > /* Update the link info */ > > - status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); > > + status = i40e_update_link_info(hw); > > if (status) { > > /* Wait a little bit (on 40G cards it sometimes takes a > really > > * long time for link to come back from the atomic reset) > > * and try once more > > */ > > i40e_msec_delay(1000); > > - status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); > > + status = i40e_update_link_info(hw); > > } > > if (status) > > *aq_failures |= I40E_SET_FC_AQ_FAIL_UPDATE; > > @@ -1525,7 +1922,6 @@ aq_get_link_info_exit: > > return status; > > } > > > > - > > /** > > * i40e_aq_set_phy_int_mask > > * @hw: pointer to the hw struct > > @@ -1837,6 +2233,74 @@ enum i40e_status_code i40e_aq_set_vsi_mu > > } > > > > /** > > + * i40e_aq_set_vsi_mc_promisc_on_vlan > > + * @hw: pointer to the hw struct > > + * @seid: vsi number > > + * @enable: set MAC L2 layer unicast promiscuous enable/disable for a > given VLAN > > + * @vid: The VLAN tag filter - capture any multicast packet with this > VLAN tag > > + * @cmd_details: pointer to command details structure or NULL > > + **/ > > +enum i40e_status_code i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw > *hw, > > + u16 seid, bool enable, u16 vid, > > + struct i40e_asq_cmd_details *cmd_details) > > +{ > > + struct i40e_aq_desc desc; > > + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = > > + (struct i40e_aqc_set_vsi_promiscuous_modes > *)&desc.params.raw; > > + enum i40e_status_code status; > > + u16 flags = 0; > > + > > + i40e_fill_default_direct_cmd_desc(&desc, > > + > i40e_aqc_opc_set_vsi_promiscuous_modes); > > + > > + if (enable) > > + flags |= I40E_AQC_SET_VSI_PROMISC_MULTICAST; > > + > > + cmd->promiscuous_flags = CPU_TO_LE16(flags); > > + cmd->valid_flags = > CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_MULTICAST); > > + cmd->seid = CPU_TO_LE16(seid); > > + cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID); > > + > > + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); > > + > > + return status; > > +} > > + > > +/** > > + * i40e_aq_set_vsi_uc_promisc_on_vlan > > + * @hw: pointer to the hw struct > > + * @seid: vsi number > > + * @enable: set MAC L2 layer unicast promiscuous enable/disable for a > given VLAN > > + * @vid: The VLAN tag filter - capture any unicast packet with this > VLAN tag > > + * @cmd_details: pointer to command details structure or NULL > > + **/ > > +enum i40e_status_code i40e_aq_set_vsi_uc_promisc_on_vlan(struct i40e_hw > *hw, > > + u16 seid, bool enable, u16 vid, > > + struct i40e_asq_cmd_details *cmd_details) > > +{ > > + struct i40e_aq_desc desc; > > + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = > > + (struct i40e_aqc_set_vsi_promiscuous_modes > *)&desc.params.raw; > > + enum i40e_status_code status; > > + u16 flags = 0; > > + > > + i40e_fill_default_direct_cmd_desc(&desc, > > + > i40e_aqc_opc_set_vsi_promiscuous_modes); > > + > > + if (enable) > > + flags |= I40E_AQC_SET_VSI_PROMISC_UNICAST; > > + > > + cmd->promiscuous_flags = CPU_TO_LE16(flags); > > + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST); > > + cmd->seid = CPU_TO_LE16(seid); > > + cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID); > > + > > + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); > > + > > + return status; > > +} > > + > > +/** > > * i40e_aq_set_vsi_broadcast > > * @hw: pointer to the hw struct > > * @seid: vsi number > > @@ -2067,30 +2531,56 @@ enum i40e_status_code i40e_aq_send_drive > > /** > > * i40e_get_link_status - get status of the HW network link > > * @hw: pointer to the hw struct > > + * @link_up: pointer to bool (TRUE/FALSE = linkup/linkdown) > > * > > - * Returns TRUE if link is up, FALSE if link is down. > > + * Variable link_up TRUE if link is up, FALSE if link is down. > > > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > > From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 00:14:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E2117A1; Tue, 9 Jun 2015 00:14:49 +0000 (UTC) (envelope-from tychon@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D10D10C2; Tue, 9 Jun 2015 00:14:49 +0000 (UTC) (envelope-from tychon@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t590Empq070905; Tue, 9 Jun 2015 00:14:48 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t590Emmw070900; Tue, 9 Jun 2015 00:14:48 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201506090014.t590Emmw070900@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Tue, 9 Jun 2015 00:14:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284174 - head/sys/amd64/vmm/intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 00:14:49 -0000 Author: tychon Date: Tue Jun 9 00:14:47 2015 New Revision: 284174 URL: https://svnweb.freebsd.org/changeset/base/284174 Log: Support guest writes to the TSC by enabling the "use TSC offsetting" execution control and writing the difference between the host TSC and the guest TSC into the TSC offset in the VMCS upon encountering a write. Reviewed by: neel Modified: head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/intel/vmx.h head/sys/amd64/vmm/intel/vmx_msr.c Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Mon Jun 8 23:37:17 2015 (r284173) +++ head/sys/amd64/vmm/intel/vmx.c Tue Jun 9 00:14:47 2015 (r284174) @@ -856,10 +856,11 @@ vmx_vminit(struct vm *vm, pmap_t pmap) * VM exit and entry respectively. It is also restored from the * host VMCS area on a VM exit. * - * The TSC MSR is exposed read-only. Writes are disallowed as that - * will impact the host TSC. - * XXX Writes would be implemented with a wrmsr trap, and - * then modifying the TSC offset in the VMCS. + * The TSC MSR is exposed read-only. Writes are disallowed as + * that will impact the host TSC. If the guest does a write + * the "use TSC offsetting" execution control is enabled and the + * difference between the host TSC and the guest TSC is written + * into the TSC offset in the VMCS. */ if (guest_msr_rw(vmx, MSR_GSBASE) || guest_msr_rw(vmx, MSR_FSBASE) || @@ -1130,6 +1131,22 @@ vmx_clear_nmi_window_exiting(struct vmx VCPU_CTR0(vmx->vm, vcpu, "Disabling NMI window exiting"); } +int +vmx_set_tsc_offset(struct vmx *vmx, int vcpu, uint64_t offset) +{ + int error; + + if ((vmx->cap[vcpu].proc_ctls & PROCBASED_TSC_OFFSET) == 0) { + vmx->cap[vcpu].proc_ctls |= PROCBASED_TSC_OFFSET; + vmcs_write(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls); + VCPU_CTR0(vmx->vm, vcpu, "Enabling TSC offsetting"); + } + + error = vmwrite(VMCS_TSC_OFFSET, offset); + + return (error); +} + #define NMI_BLOCKING (VMCS_INTERRUPTIBILITY_NMI_BLOCKING | \ VMCS_INTERRUPTIBILITY_MOVSS_BLOCKING) #define HWINTR_BLOCKING (VMCS_INTERRUPTIBILITY_STI_BLOCKING | \ Modified: head/sys/amd64/vmm/intel/vmx.h ============================================================================== --- head/sys/amd64/vmm/intel/vmx.h Mon Jun 8 23:37:17 2015 (r284173) +++ head/sys/amd64/vmm/intel/vmx.h Tue Jun 9 00:14:47 2015 (r284174) @@ -135,6 +135,8 @@ void vmx_call_isr(uintptr_t entry); u_long vmx_fix_cr0(u_long cr0); u_long vmx_fix_cr4(u_long cr4); +int vmx_set_tsc_offset(struct vmx *vmx, int vcpu, uint64_t offset); + extern char vmx_exit_guest[]; #endif Modified: head/sys/amd64/vmm/intel/vmx_msr.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx_msr.c Mon Jun 8 23:37:17 2015 (r284173) +++ head/sys/amd64/vmm/intel/vmx_msr.c Tue Jun 9 00:14:47 2015 (r284174) @@ -474,6 +474,9 @@ vmx_wrmsr(struct vmx *vmx, int vcpuid, u else vm_inject_gp(vmx->vm, vcpuid); break; + case MSR_TSC: + error = vmx_set_tsc_offset(vmx, vcpuid, val - rdtsc()); + break; default: error = EINVAL; break; From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 05:29:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 602C57D; Tue, 9 Jun 2015 05:29:39 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 269021934; Tue, 9 Jun 2015 05:29:38 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 063FA1045B8D; Tue, 9 Jun 2015 15:29:34 +1000 (AEST) Date: Tue, 9 Jun 2015 15:29:33 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ed Maste cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284157 - head/sys/kern In-Reply-To: <201506081607.t58G78EF092855@svn.freebsd.org> Message-ID: <20150609151112.F935@besplex.bde.org> References: <201506081607.t58G78EF092855@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=XMDNMlVE c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=2NAtd3wyzpZ6avZ3ys4A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 05:29:39 -0000 On Mon, 8 Jun 2015, Ed Maste wrote: > Log: > Add user facing errors for exceeding process memory limits > > Previously the process terminating with SIGABRT at startup was the > only notification. I don't like this. Errrors in syscalls should be reported by returning an error code, not by spamming the user's terminal. > Modified: head/sys/kern/imgact_elf.c > ============================================================================== > --- head/sys/kern/imgact_elf.c Mon Jun 8 15:24:24 2015 (r284156) > +++ head/sys/kern/imgact_elf.c Mon Jun 8 16:07:07 2015 (r284157) > ... > @@ -755,11 +755,14 @@ __CONCAT(exec_, __elfN(imgact))(struct i > if ((hdr->e_phoff > PAGE_SIZE) || > (u_int)hdr->e_phentsize * hdr->e_phnum > PAGE_SIZE - hdr->e_phoff) { > /* Only support headers in first page for now */ > + uprintf("Program headers not in the first page\n"); > return (ENOEXEC); > } > - phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); > - if (!aligned(phdr, Elf_Addr)) > + phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); > + if (!aligned(phdr, Elf_Addr)) { > + uprintf("Unaligned program headers\n"); > return (ENOEXEC); > + } > n = 0; > baddr = 0; > for (i = 0; i < hdr->e_phnum; i++) { Also, the spam doesn't even include much useful info, like the program or interpreter name. It can be difficult to tell where the error was for nested interpreters. Most of the old uprintf()s for exec failures are similarly deficient. In this file: X uprintf("elf_load_section: truncated ELF file\n"); X uprintf("ELF binary type \"%u\" not known.\n", This one also has style bugs (bogus quoting of a number, and termination with a period). X uprintf("ELF interpreter %s not found\n", interp); This one at least prints the interpreter name. I use the following partial fixes: X diff -u2 imgact_elf.c~ imgact_elf.c X --- imgact_elf.c~ Sat Jun 5 16:50:05 2004 X +++ imgact_elf.c Sat Jun 5 16:51:25 2004 X @@ -694,6 +693,6 @@ X brand_info = __elfN(get_brandinfo)(hdr, interp); X if (brand_info == NULL) { X - uprintf("ELF binary type \"%u\" not known.\n", X - hdr->e_ident[EI_OSABI]); X + uprintf("%s: ELF binary type \"%u\" not known.\n", X + imgp->stringbase, hdr->e_ident[EI_OSABI]); X error = ENOEXEC; X goto fail; X @@ -828,5 +827,6 @@ X &imgp->entry_addr, sv->sv_pagesize); X if (error != 0) { X - uprintf("ELF interpreter %s not found\n", interp); X + uprintf("%s: ELF interpreter %s not found\n", X + imgp->stringbase, interp); X goto fail; X } The message should be printed by the application, but there is a problem getting enough details for interpreters. Most applications learned to use the err() family for printing error messages long ago, so they don't forget to print the program name like these uprintfs, but the interpreter name is hard to print outside of the kernel. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 06:28:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FDCA5E6; Tue, 9 Jun 2015 06:28:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id C6F0816DC; Tue, 9 Jun 2015 06:28:24 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id CCECD1A5214; Tue, 9 Jun 2015 16:28:13 +1000 (AEST) Date: Tue, 9 Jun 2015 16:28:11 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bryan Drewery cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284163 - head/bin/cp In-Reply-To: <201506081924.t58JOJQw095752@svn.freebsd.org> Message-ID: <20150609152946.Y935@besplex.bde.org> References: <201506081924.t58JOJQw095752@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=XMDNMlVE c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=A00xL3lN5oUccGlISP0A:9 a=ls_OnOAZJed0EOI7:21 a=qbsBNEDFmU8e0_h8:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 06:28:25 -0000 On Mon, 8 Jun 2015, Bryan Drewery wrote: > Log: > Cleanup some style(9) issues. > > - Whitespace. > - Comments. > - Wrap long lines. cp's style had a remarlable amount of bitrot. This change unimproves it in some places. "Clean up" is 2 words. > Modified: head/bin/cp/cp.c > ============================================================================== > --- head/bin/cp/cp.c Mon Jun 8 19:13:04 2015 (r284162) > +++ head/bin/cp/cp.c Mon Jun 8 19:24:18 2015 (r284163) > @@ -75,8 +75,8 @@ __FBSDID("$FreeBSD$"); > #include "extern.h" > > #define STRIP_TRAILING_SLASH(p) { \ > - while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \ > - *--(p).p_end = 0; \ > + while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \ > + *--(p).p_end = 0; \ This loses the indentation of the statement in the while loop. > @@ -245,10 +245,10 @@ main(int argc, char *argv[]) > type = FILE_TO_FILE; > > if (have_trailing_slash && type == FILE_TO_FILE) { > - if (r == -1) > + if (r == -1) { This adds excessive braces. > errx(1, "directory %s does not exist", > - to.p_path); > - else > + to.p_path); > + } else > errx(1, "%s is not a directory", to.p_path); > } > } else > ... > @@ -379,7 +379,8 @@ copy(char *argv[], enum op type, int fts > mode = curr->fts_statp->st_mode; > if ((mode & (S_ISUID | S_ISGID | S_ISTXT)) || > ((mode | S_IRWXU) & mask) != (mode & mask)) > - if (chmod(to.p_path, mode & mask) != 0){ > + if (chmod(to.p_path, mode & mask) != > + 0) { > warn("chmod: %s", to.p_path); > rval = 1; > } This changes from a minor misformatting to avoid a long line to even uglier formatting with a split line. It is necessary to make such changes if you use indent(1) to generate and check the changes -- otherwise, indent keeps reporting the misformatting -- but since cp rarely went near indent it may be better to keep its minor misformattings. > Modified: head/bin/cp/utils.c > ============================================================================== > --- head/bin/cp/utils.c Mon Jun 8 19:13:04 2015 (r284162) > +++ head/bin/cp/utils.c Mon Jun 8 19:24:18 2015 (r284163) > ... > -/* Small (default) buffer size in bytes. It's inefficient for this to be > - * smaller than MAXPHYS */ > +/* > + * Small (default) buffer size in bytes. It's inefficient for this to be > + * smaller than MAXPHYS. > + */ Still has unusual sentence break of 1 space. cp uses normal sentence breaks of 2 spaces in 28 lines, and only uses the 1-space misformatting in this and in 2 other lines. Standard copyrights use normal 2-space formatting, so switching to 1-space almost always gives inconsistent formatting even if it is done consistently outside of the copyrights. > @@ -119,24 +123,27 @@ copy_file(const FTSENT *entp, int dne) > goto done; > } > } > - > + > if (fflag) { > - /* remove existing destination file name, > - * create a new file */ > - (void)unlink(to.p_path); > - if (!lflag && !sflag) { > - to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, > - fs->st_mode & ~(S_ISUID | S_ISGID)); > - } > + /* > + * Remove existing destination file name create a new > + * file. > + */ This fixes most of the grammar errors, but completely removing the comma splice gives a larger error. > ... > @@ -345,7 +352,7 @@ setfile(struct stat *fs, int fd) > fdval = fd != -1; > islink = !fdval && S_ISLNK(fs->st_mode); > fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX | > - S_IRWXU | S_IRWXG | S_IRWXO; > + S_IRWXU | S_IRWXG | S_IRWXO; Here the formatting was reasonable, but it was in gnu style and was hard to maintain since it is not supported by indent(1). It is still hard to maintain, since it has fancy splitting earlier than necessary to put the S_IS* and S_IR* parts of the expressions on separate lines. indent(1) cannot reproduce this splitting. Also, with the normal indentation of the condinuation line, the fancy splitting is not so readable. > @@ -543,8 +550,10 @@ usage(void) > { > > (void)fprintf(stderr, "%s\n%s\n", > -"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file target_file", > -" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file ... " > -"target_directory"); > + "usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] " > + "source_file target_file", > + " cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] " > + "source_file ... " > + "target_directory"); > exit(EX_USAGE); > } This breaks the careful outdentation and obfuscates the strings. The outdentation doesn't quite work, since the double quotes and comma make the one of the lines too long, although the length of this line in the output is only 78. Actually, 78 is also too long, and indicates further bugs. The message should be formatted the same as in the synopsis in the man page. But the man page formatting has a 5-space left margin, so the maximum length of a matching string is 75 or 74... Oops, the usage string has to be longer to include "usage: " That is 7 longer, so matching the man page is impossible in general unless the man page formatting has a large right margin (2-3 spaces), but I think it has at most 1 space. Comparison shows that the above is broken for the second line but not the first: man page, FreeBSD-11: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... target_directory man page, FreeBSD-10: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... target_directory usage: usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... target_directory The following bugs are evident: - the man page is misformatted in FreeBSD-11 -- the second line is split at a bad place. - the usage message is misformatted -- the second line is not split. This bug was already implemented using the string concatenation obfuscation, but in the old version it was a little easier to see that the string was too long -- the outdented line obviously has nearly maximal length, so any concatenation to it makes the string too long. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 06:44:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FF7B8D0; Tue, 9 Jun 2015 06:44:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 254181B14; Tue, 9 Jun 2015 06:44:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 6068610414E8; Tue, 9 Jun 2015 16:44:31 +1000 (AEST) Date: Tue, 9 Jun 2015 16:44:31 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284167 - head/sys/i386/i386 In-Reply-To: <201506082012.t58KCjZX023061@svn.freebsd.org> Message-ID: <20150609162836.C935@besplex.bde.org> References: <201506082012.t58KCjZX023061@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ItbjC+Lg c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=iSANVGSYhD-gETNt8c4A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 06:44:41 -0000 On Mon, 8 Jun 2015, Dimitry Andric wrote: > Log: > Merge r283870 from amd64: > > Remove unneeded NULL checks in trap_fatal(). > > Since td_name is an array member of struct thread, it can never be NULL, > so the check can be removed. In addition, curproc can never be NULL, > so remove the if statement, and splice the two printfs() together. > > While here, remove the u_long cast, and use the correct printf format > specifier for curproc->p_pid. > > Requested by: jhb Er. I gave a longer review which implicity requested not doing all of this. The format was correct (it matched the cast), and the cast was less wrong than not casting. Both amd64/trap.c i386/trap.c still print pids portably (by casting to long) in one place. They each had 2 unportable printings of pids; now they each have 3 unportable printings of pids. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 10:23:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91DA6FF5; Tue, 9 Jun 2015 10:23:35 +0000 (UTC) (envelope-from br@bsdpad.com) Received: from bsdpad.com (xc1.bsdpad.com [195.154.136.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56B251F9A; Tue, 9 Jun 2015 10:23:34 +0000 (UTC) (envelope-from br@bsdpad.com) Received: from localhost ([127.0.0.1] helo=bsdpad.com) by bsdpad.com with smtp (Exim 4.83 (FreeBSD)) (envelope-from ) id 1Z2GZm-000CG9-6R; Tue, 09 Jun 2015 11:16:10 +0100 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Tue, 9 Jun 2015 11:16:10 +0100 (BST) Date: Tue, 9 Jun 2015 11:16:10 +0100 From: Ruslan Bukin To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284153 - head/sys/kern Message-ID: <20150609101610.GA47083@bsdpad.com> References: <201506081406.t58E6mvA033492@svn.freebsd.org> <20150608144629.GA37834@bsdpad.com> <1554833.IUNnl2bGYK@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1554833.IUNnl2bGYK@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 10:23:35 -0000 On Mon, Jun 08, 2015 at 02:04:45PM -0400, John Baldwin wrote: > On Monday, June 08, 2015 03:46:29 PM Ruslan Bukin wrote: > > For some reason it hangs for me after 'random' lines on arm64 > > Are you using dtrace? It looks like sdt was using the public symbol before > but in a context where the caller held the lock. I will revert this for now. > I think I can perhaps make it 'automatic' by having it acquire a read lock > (possibly recursing) if it doesn't already hold a write lock. > Yes, I'm using DTrace. And you right: if I remove dtrace_sdt from kernel, then the same revision works fine for me. Ruslan From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 10:32:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5945E404 for ; Tue, 9 Jun 2015 10:32:06 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from vfemail.net (ninezero.vfemail.net [96.30.253.190]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 116711244 for ; Tue, 9 Jun 2015 10:32:05 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: (qmail 17900 invoked by uid 89); 9 Jun 2015 10:31:59 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 9 Jun 2015 10:31:59 -0000 Received: (qmail 17870 invoked by uid 89); 9 Jun 2015 10:31:41 -0000 Received: by simscan 1.3.1 ppid: 17862, pid: 17866, t: 0.1008s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 9 Jun 2015 10:31:41 -0000 Received: (qmail 20382 invoked by uid 89); 9 Jun 2015 10:31:41 -0000 Received: by simscan 1.4.0 ppid: 20354, pid: 20376, t: 0.8997s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by 172.16.100.62 with ESMTPA; 9 Jun 2015 10:31:40 -0000 From: Jan Beich To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284107 - head/sys/cddl/compat/opensolaris/sys References: <201506070854.t578sPdR012092@svn.freebsd.org> Date: Tue, 09 Jun 2015 12:31:31 +0200 In-Reply-To: <201506070854.t578sPdR012092@svn.freebsd.org> (Andriy Gapon's message of "Sun, 7 Jun 2015 08:54:25 +0000 (UTC)") Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 10:32:06 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Andriy Gapon writes: > Author: avg > Date: Sun Jun 7 08:54:25 2015 > New Revision: 284107 > URL: https://svnweb.freebsd.org/changeset/base/284107 > > Log: > compat nvpair.h: make sure that the names are mangled only for kernel >=20=20=20 > Currently there is no good reason to mangle the userland API. > The change was introduced in eac1d566b46edef765754203bef22c75c1699966, > r279437. Also see https://reviews.freebsd.org/D1881. Can you bump __FreeBSD_version? At least sysutils/geomWatch requires it. https://svnweb.freebsd.org/changeset/ports/388906 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJVdsCDXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3bhvgIAIP7gvi1HxnVX9mvcevhcN6u oQ3Wzzvf1E1qtKWUFbd65wK2hynsxRlWJ1g9mMGDq+87sJ6WBSx7ZMPVpgmH3M90 jxOA2fxJE0oDCUnUDu6aBr8kqIRQZvNuAEXRRUyUDWQJFlzsjHNYuJbHZl/SvyIp L1YYxX2UtwYbHsTJYgYWhKD9LSOOvY93fTnffCoKhsjqYyolZTg8yid5AdHx0+Mp ebdM7sgJNlqNwe3VV0IPRReQxbuEG5IrsFU+BcAtDEV0ItRtcnnA+E9y/YMjG5PF SRcMbsGrZRrEQ8ms3VJarJFfOrqfrTtgRLSblOuBrw1HXKhCypcFoWbMeusp0Io= =7voe -----END PGP SIGNATURE----- --=-=-=-- From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 10:49:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B9F3B35; Tue, 9 Jun 2015 10:49:41 +0000 (UTC) (envelope-from jhb@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D2B8161B; Tue, 9 Jun 2015 10:49:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t59Anfbr005193; Tue, 9 Jun 2015 10:49:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t59AnfiM005192; Tue, 9 Jun 2015 10:49:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506091049.t59AnfiM005192@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 9 Jun 2015 10:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284175 - head/sys/x86/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 10:49:41 -0000 Author: jhb Date: Tue Jun 9 10:49:40 2015 New Revision: 284175 URL: https://svnweb.freebsd.org/changeset/base/284175 Log: Handle X2APIC entries in the MADT for APICs with an ID < 255. At least one BIOS has been seen to include such entries even though the relevant specs require that X2APIC entries only be used for CPUs with an APIC ID >= 255. This was tested on a system with "plain" local APIC entries in the MADT to ensure no regressions, but it has not yet been tested on a system with X2APIC entries in the MADT. Currently such systems do not boot at all, and with this change they might now boot correctly. Differential Revision: https://reviews.freebsd.org/D2521 Reviewed by: kib MFC after: 2 weeks Modified: head/sys/x86/acpica/madt.c Modified: head/sys/x86/acpica/madt.c ============================================================================== --- head/sys/x86/acpica/madt.c Tue Jun 9 00:14:47 2015 (r284174) +++ head/sys/x86/acpica/madt.c Tue Jun 9 10:49:40 2015 (r284175) @@ -56,8 +56,8 @@ static struct { } *ioapics; static struct lapic_info { - u_int la_enabled:1; - u_int la_acpi_id:8; + u_int la_enabled; + u_int la_acpi_id; } lapics[MAX_APIC_ID + 1]; int madt_found_sci_override; @@ -255,34 +255,48 @@ madt_walk_table(acpi_subtable_handler *h } static void +madt_add_cpu(u_int acpi_id, u_int apic_id, u_int flags) +{ + struct lapic_info *la; + + /* + * The MADT does not include a BSP flag, so we have to let the + * MP code figure out which CPU is the BSP on its own. + */ + if (bootverbose) + printf("MADT: Found CPU APIC ID %u ACPI ID %u: %s\n", + apic_id, acpi_id, flags & ACPI_MADT_ENABLED ? + "enabled" : "disabled"); + if (!(flags & ACPI_MADT_ENABLED)) + return; + if (apic_id > MAX_APIC_ID) { + printf("MADT: Ignoring local APIC ID %u (too high)\n", + apic_id); + return; + } + + la = &lapics[apic_id]; + KASSERT(la->la_enabled == 0, ("Duplicate local APIC ID %u", apic_id)); + la->la_enabled = 1; + la->la_acpi_id = acpi_id; + lapic_create(apic_id, 0); +} + +static void madt_probe_cpus_handler(ACPI_SUBTABLE_HEADER *entry, void *arg) { ACPI_MADT_LOCAL_APIC *proc; - struct lapic_info *la; + ACPI_MADT_LOCAL_X2APIC *x2apic; switch (entry->Type) { case ACPI_MADT_TYPE_LOCAL_APIC: - /* - * The MADT does not include a BSP flag, so we have to - * let the MP code figure out which CPU is the BSP on - * its own. - */ proc = (ACPI_MADT_LOCAL_APIC *)entry; - if (bootverbose) - printf("MADT: Found CPU APIC ID %u ACPI ID %u: %s\n", - proc->Id, proc->ProcessorId, - (proc->LapicFlags & ACPI_MADT_ENABLED) ? - "enabled" : "disabled"); - if (!(proc->LapicFlags & ACPI_MADT_ENABLED)) - break; - if (proc->Id > MAX_APIC_ID) - panic("%s: CPU ID %u too high", __func__, proc->Id); - la = &lapics[proc->Id]; - KASSERT(la->la_enabled == 0, - ("Duplicate local APIC ID %u", proc->Id)); - la->la_enabled = 1; - la->la_acpi_id = proc->ProcessorId; - lapic_create(proc->Id, 0); + madt_add_cpu(proc->ProcessorId, proc->Id, proc->LapicFlags); + break; + case ACPI_MADT_TYPE_LOCAL_X2APIC: + x2apic = (ACPI_MADT_LOCAL_X2APIC *)entry; + madt_add_cpu(x2apic->Uid, x2apic->LocalApicId, + x2apic->LapicFlags); break; } } @@ -551,29 +565,44 @@ madt_parse_nmi(ACPI_MADT_NMI_SOURCE *nmi * Parse an entry for an NMI routed to a local APIC LVT pin. */ static void -madt_parse_local_nmi(ACPI_MADT_LOCAL_APIC_NMI *nmi) +madt_handle_local_nmi(u_int acpi_id, UINT8 Lint, UINT16 IntiFlags) { u_int apic_id, pin; - if (nmi->ProcessorId == 0xff) + if (acpi_id == 0xffffffff) apic_id = APIC_ID_ALL; - else if (madt_find_cpu(nmi->ProcessorId, &apic_id) != 0) { + else if (madt_find_cpu(acpi_id, &apic_id) != 0) { if (bootverbose) printf("MADT: Ignoring local NMI routed to " - "ACPI CPU %u\n", nmi->ProcessorId); + "ACPI CPU %u\n", acpi_id); return; } - if (nmi->Lint == 0) + if (Lint == 0) pin = APIC_LVT_LINT0; else pin = APIC_LVT_LINT1; lapic_set_lvt_mode(apic_id, pin, APIC_LVT_DM_NMI); - if (!(nmi->IntiFlags & ACPI_MADT_TRIGGER_CONFORMS)) + if (!(IntiFlags & ACPI_MADT_TRIGGER_CONFORMS)) lapic_set_lvt_triggermode(apic_id, pin, - interrupt_trigger(nmi->IntiFlags, 0)); - if (!(nmi->IntiFlags & ACPI_MADT_POLARITY_CONFORMS)) + interrupt_trigger(IntiFlags, 0)); + if (!(IntiFlags & ACPI_MADT_POLARITY_CONFORMS)) lapic_set_lvt_polarity(apic_id, pin, - interrupt_polarity(nmi->IntiFlags, 0)); + interrupt_polarity(IntiFlags, 0)); +} + +static void +madt_parse_local_nmi(ACPI_MADT_LOCAL_APIC_NMI *nmi) +{ + + madt_handle_local_nmi(nmi->ProcessorId == 0xff ? 0xffffffff : + nmi->ProcessorId, nmi->Lint, nmi->IntiFlags); +} + +static void +madt_parse_local_x2apic_nmi(ACPI_MADT_LOCAL_X2APIC_NMI *nmi) +{ + + madt_handle_local_nmi(nmi->Uid, nmi->Lint, nmi->IntiFlags); } /* @@ -594,6 +623,10 @@ madt_parse_ints(ACPI_SUBTABLE_HEADER *en case ACPI_MADT_TYPE_LOCAL_APIC_NMI: madt_parse_local_nmi((ACPI_MADT_LOCAL_APIC_NMI *)entry); break; + case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI: + madt_parse_local_x2apic_nmi( + (ACPI_MADT_LOCAL_X2APIC_NMI *)entry); + break; } } From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 11:13:54 2015 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 888E3283; Tue, 9 Jun 2015 11:13:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 355211D40; Tue, 9 Jun 2015 11:13:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA23581; Tue, 09 Jun 2015 14:13:50 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Z2HTa-0009be-I0; Tue, 09 Jun 2015 14:13:50 +0300 Message-ID: <5576CA36.8060403@FreeBSD.org> Date: Tue, 09 Jun 2015 14:12:54 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Jan Beich CC: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r284107 - head/sys/cddl/compat/opensolaris/sys References: <201506070854.t578sPdR012092@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 11:13:54 -0000 On 09/06/2015 13:31, Jan Beich wrote: > Andriy Gapon writes: > >> Author: avg Date: Sun Jun 7 08:54:25 2015 New Revision: 284107 URL: >> https://svnweb.freebsd.org/changeset/base/284107 >> >> Log: compat nvpair.h: make sure that the names are mangled only for >> kernel >> >> Currently there is no good reason to mangle the userland API. The change >> was introduced in eac1d566b46edef765754203bef22c75c1699966, r279437. >> Also see https://reviews.freebsd.org/D1881. > > Can you bump __FreeBSD_version? At least sysutils/geomWatch requires it. > > https://svnweb.freebsd.org/changeset/ports/388906 > There should have been a bug report and an src fix instead of (parts of) https://svnweb.freebsd.org/ports?view=revision&revision=386870 I wonder why the libnvpair ABI breakage was silently accepted but the ABI fix requires some special magic... -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 11:49:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26A79F84; Tue, 9 Jun 2015 11:49:57 +0000 (UTC) (envelope-from kib@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 088301530; Tue, 9 Jun 2015 11:49:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t59BnuUk034735; Tue, 9 Jun 2015 11:49:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t59BnulP034734; Tue, 9 Jun 2015 11:49:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506091149.t59BnulP034734@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 9 Jun 2015 11:49:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284178 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 11:49:57 -0000 Author: kib Date: Tue Jun 9 11:49:56 2015 New Revision: 284178 URL: https://svnweb.freebsd.org/changeset/base/284178 Log: When updating/accessing the timehands, barriers are needed to ensure that: - th_generation update is visible after the parameters update is visible; - the read of parameters is not reordered before initial read of th_generation. On UP kernels, compiler barriers are enough. For SMP machines, CPU barriers must be used too, as was confirmed by submitter by testing on the Freescale T4240 platform with 24 PowerPC processors. Submitted by: Sebastian Huber MFC after: 1 week Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Tue Jun 9 11:41:37 2015 (r284177) +++ head/sys/kern/kern_tc.c Tue Jun 9 11:49:56 2015 (r284178) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* * A large step happens on boot. This constant detects such steps. @@ -71,7 +72,7 @@ struct timehands { struct timeval th_microtime; struct timespec th_nanotime; /* Fields not to be copied in tc_windup start with th_generation. */ - volatile u_int th_generation; + u_int th_generation; struct timehands *th_next; }; @@ -189,6 +190,33 @@ tc_delta(struct timehands *th) tc->tc_counter_mask); } +static u_int +tc_getgen(struct timehands *th) +{ + +#ifdef SMP + return (atomic_load_acq_int(&th->th_generation)); +#else + u_int gen; + + gen = th->th_generation; + __compiler_membar(); + return (gen); +#endif +} + +static void +tc_setgen(struct timehands *th, u_int newgen) +{ + +#ifdef SMP + atomic_store_rel_int(&th->th_generation, newgen); +#else + __compiler_membar(); + th->th_generation = newgen; +#endif +} + /* * Functions for reading the time. We have to loop until we are sure that * the timehands that we operated on was not updated under our feet. See @@ -204,10 +232,10 @@ fbclock_binuptime(struct bintime *bt) do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); *bt = th->th_offset; bintime_addx(bt, th->th_scale * tc_delta(th)); - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); } void @@ -262,9 +290,9 @@ fbclock_getbinuptime(struct bintime *bt) do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); *bt = th->th_offset; - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); } void @@ -275,9 +303,9 @@ fbclock_getnanouptime(struct timespec *t do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); bintime2timespec(&th->th_offset, tsp); - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); } void @@ -288,9 +316,9 @@ fbclock_getmicrouptime(struct timeval *t do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); bintime2timeval(&th->th_offset, tvp); - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); } void @@ -301,9 +329,9 @@ fbclock_getbintime(struct bintime *bt) do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); *bt = th->th_offset; - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); bintime_add(bt, &boottimebin); } @@ -315,9 +343,9 @@ fbclock_getnanotime(struct timespec *tsp do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); *tsp = th->th_nanotime; - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); } void @@ -328,9 +356,9 @@ fbclock_getmicrotime(struct timeval *tvp do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); *tvp = th->th_microtime; - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); } #else /* !FFCLOCK */ void @@ -341,10 +369,10 @@ binuptime(struct bintime *bt) do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); *bt = th->th_offset; bintime_addx(bt, th->th_scale * tc_delta(th)); - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); } void @@ -399,9 +427,9 @@ getbinuptime(struct bintime *bt) do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); *bt = th->th_offset; - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); } void @@ -412,9 +440,9 @@ getnanouptime(struct timespec *tsp) do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); bintime2timespec(&th->th_offset, tsp); - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); } void @@ -425,9 +453,9 @@ getmicrouptime(struct timeval *tvp) do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); bintime2timeval(&th->th_offset, tvp); - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); } void @@ -438,9 +466,9 @@ getbintime(struct bintime *bt) do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); *bt = th->th_offset; - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); bintime_add(bt, &boottimebin); } @@ -452,9 +480,9 @@ getnanotime(struct timespec *tsp) do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); *tsp = th->th_nanotime; - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); } void @@ -465,9 +493,9 @@ getmicrotime(struct timeval *tvp) do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); *tvp = th->th_microtime; - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); } #endif /* FFCLOCK */ @@ -880,11 +908,11 @@ ffclock_read_counter(ffcounter *ffcount) */ do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); ffth = fftimehands; delta = tc_delta(th); *ffcount = ffth->tick_ffcount; - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); *ffcount += delta; } @@ -988,9 +1016,9 @@ dtrace_getnanotime(struct timespec *tsp) do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); *tsp = th->th_nanotime; - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); } /* @@ -1028,7 +1056,7 @@ sysclock_getsnapshot(struct sysclock_sna do { th = timehands; - gen = th->th_generation; + gen = tc_getgen(th); fbi->th_scale = th->th_scale; fbi->tick_time = th->th_offset; #ifdef FFCLOCK @@ -1042,7 +1070,7 @@ sysclock_getsnapshot(struct sysclock_sna #endif if (!fast) delta = tc_delta(th); - } while (gen == 0 || gen != th->th_generation); + } while (gen == 0 || gen != tc_getgen(th)); clock_snap->delta = delta; clock_snap->sysclock_active = sysclock_active; @@ -1260,7 +1288,7 @@ tc_windup(void) tho = timehands; th = tho->th_next; ogen = th->th_generation; - th->th_generation = 0; + tc_setgen(th, 0); bcopy(tho, th, offsetof(struct timehands, th_generation)); /* @@ -1377,7 +1405,7 @@ tc_windup(void) */ if (++ogen == 0) ogen = 1; - th->th_generation = ogen; + tc_setgen(th, ogen); /* Go live with the new struct timehands. */ #ifdef FFCLOCK @@ -1651,13 +1679,13 @@ pps_capture(struct pps_state *pps) KASSERT(pps != NULL, ("NULL pps pointer in pps_capture")); th = timehands; - pps->capgen = th->th_generation; + pps->capgen = tc_getgen(th); pps->capth = th; #ifdef FFCLOCK pps->capffth = fftimehands; #endif pps->capcount = th->th_counter->tc_get_timecount(th->th_counter); - if (pps->capgen != th->th_generation) + if (pps->capgen != tc_getgen(th)) pps->capgen = 0; } @@ -1677,7 +1705,7 @@ pps_event(struct pps_state *pps, int eve KASSERT(pps != NULL, ("NULL pps pointer in pps_event")); /* If the timecounter was wound up underneath us, bail out. */ - if (pps->capgen == 0 || pps->capgen != pps->capth->th_generation) + if (pps->capgen == 0 || pps->capgen != tc_getgen(pps->capth)) return; /* Things would be easier with arrays. */ @@ -1727,7 +1755,7 @@ pps_event(struct pps_state *pps, int eve bintime2timespec(&bt, &ts); /* If the timecounter was wound up underneath us, bail out. */ - if (pps->capgen != pps->capth->th_generation) + if (pps->capgen != tc_getgen(pps->capth)) return; *pcount = pps->capcount; From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 13:41:50 2015 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79E8AB11 for ; Tue, 9 Jun 2015 13:41:50 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from vfemail.net (ninezero.vfemail.net [96.30.253.190]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3C941334 for ; Tue, 9 Jun 2015 13:41:49 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: (qmail 84361 invoked by uid 89); 9 Jun 2015 13:41:47 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 9 Jun 2015 13:41:47 -0000 Received: (qmail 84265 invoked by uid 89); 9 Jun 2015 13:41:30 -0000 Received: by simscan 1.3.1 ppid: 84257, pid: 84261, t: 0.0049s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 9 Jun 2015 13:41:30 -0000 Received: (qmail 23850 invoked by uid 89); 9 Jun 2015 13:41:30 -0000 Received: by simscan 1.4.0 ppid: 23833, pid: 23847, t: 0.7519s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by 172.16.100.62 with ESMTPA; 9 Jun 2015 13:41:29 -0000 From: Jan Beich To: Andriy Gapon Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r284107 - head/sys/cddl/compat/opensolaris/sys In-Reply-To: <5576CA36.8060403@FreeBSD.org> (Andriy Gapon's message of "Tue, 09 Jun 2015 14:12:54 +0300") References: <201506070854.t578sPdR012092@svn.freebsd.org> <5576CA36.8060403@FreeBSD.org> Date: Tue, 09 Jun 2015 15:41:20 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 13:41:50 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Andriy Gapon writes: > On 09/06/2015 13:31, Jan Beich wrote: > >> Andriy Gapon writes: >>=20 >>> Author: avg Date: Sun Jun 7 08:54:25 2015 New Revision: 284107 URL: >>> https://svnweb.freebsd.org/changeset/base/284107 >>>=20 >>> Log: compat nvpair.h: make sure that the names are mangled only for >>> kernel >>>=20 >>> Currently there is no good reason to mangle the userland API. The change >>> was introduced in eac1d566b46edef765754203bef22c75c1699966, r279437. >>> Also see https://reviews.freebsd.org/D1881. >>=20 >> Can you bump __FreeBSD_version? At least sysutils/geomWatch requires it. >>=20 >> https://svnweb.freebsd.org/changeset/ports/388906 > > There should have been a bug report and an src fix instead of (parts of) > https://svnweb.freebsd.org/ports?view=3Drevision&revision=3D386870 Good point. However, opensolaris libs have unclear ABI guarantees. Their API is not exposed but the libs aren't marked PRIVATELIB. Some symbols are removed on updates *without* corresponding SHLIB_MAJOR bumps. libnvpair is mostly unchanged between 8.4R and 11.0C, though. # shouldn't be possible without libzfs.so.2 in libmap.conf /poudriere/jails/84amd64/sbin/zfs: Undefined symbol "zpool_set_history_st= r" > I wonder why the libnvpair ABI breakage was silently accepted but the ABI= fix > requires some special magic... I'll probably back out ports@386870 and ports@388906 after a while. libnvpair with bogus ABI existed on 11.0C for 3 months, enough to end up in the binary snapshots a few times. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJVdu0BXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3bfxUH/2kCi9/CAIjb90ezNIc4a5Bh HmOJAzs0Md+8mTVkSbuTHnsHDlbL8qmh+2QwahyNHAmesNVEFYcjZEbyKyi4yDJR +6/VDTIwKgQcUg0BGPfJGSU7q5sIZv6lvpizYR81uWE4YNkP5j1yCOCIPlfBuiR3 ymhbVipyMdev3tlAh0nhwsXHiQjNJ50C41a9Gl0J4ZWhn50EO1mATGeJ3W9MqfWd PUyH39YZDE+IWpPOfgXYwHyzCbrcAt9EHN7tk/pFKgLdd5vs0ggsh5cYDrIlzpDU l5QjCghc6zBSqDWeFimLkOM/zGN60/Y6VyE9QFIPceLUSfg3tuT1oC30gOzolYU= =ny3y -----END PGP SIGNATURE----- --=-=-=-- From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 13:56:12 2015 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B80CE7A; Tue, 9 Jun 2015 13:56:12 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3DF551630; Tue, 9 Jun 2015 13:56:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA25767; Tue, 09 Jun 2015 16:56:08 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Z2K0e-0009iG-9m; Tue, 09 Jun 2015 16:56:08 +0300 Message-ID: <5576F054.2010207@FreeBSD.org> Date: Tue, 09 Jun 2015 16:55:32 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Jan Beich CC: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r284107 - head/sys/cddl/compat/opensolaris/sys References: <201506070854.t578sPdR012092@svn.freebsd.org> <5576CA36.8060403@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 13:56:12 -0000 On 09/06/2015 16:41, Jan Beich wrote: > Andriy Gapon writes: > >> On 09/06/2015 13:31, Jan Beich wrote: >> >>> Andriy Gapon writes: >>> >>>> Author: avg Date: Sun Jun 7 08:54:25 2015 New Revision: 284107 URL: >>>> https://svnweb.freebsd.org/changeset/base/284107 >>>> >>>> Log: compat nvpair.h: make sure that the names are mangled only for >>>> kernel >>>> >>>> Currently there is no good reason to mangle the userland API. The change >>>> was introduced in eac1d566b46edef765754203bef22c75c1699966, r279437. >>>> Also see https://reviews.freebsd.org/D1881. >>> >>> Can you bump __FreeBSD_version? At least sysutils/geomWatch requires it. >>> >>> https://svnweb.freebsd.org/changeset/ports/388906 >> >> There should have been a bug report and an src fix instead of (parts of) >> https://svnweb.freebsd.org/ports?view=revision&revision=386870 > > Good point. However, opensolaris libs have unclear ABI guarantees. Indeed. > Their > API is not exposed but the libs aren't marked PRIVATELIB. Some symbols > are removed on updates *without* corresponding SHLIB_MAJOR bumps. > libnvpair is mostly unchanged between 8.4R and 11.0C, though. I think that we should treat ABI breakages for ZFS-related libs same as for other libs. Symbol versioning could be a hassle, but at least a library version bump is warranted. > # shouldn't be possible without libzfs.so.2 in libmap.conf > /poudriere/jails/84amd64/sbin/zfs: Undefined symbol "zpool_set_history_str" > >> I wonder why the libnvpair ABI breakage was silently accepted but the ABI fix >> requires some special magic... > > I'll probably back out ports@386870 and ports@388906 after a while. > libnvpair with bogus ABI existed on 11.0C for 3 months, enough to end up > in the binary snapshots a few times. In either case please let me know if the __FreeBSD_version bump would be of help to you, I certainly can do it. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 14:31:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 265D1C88; Tue, 9 Jun 2015 14:31:19 +0000 (UTC) (envelope-from sbruno@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 149EC1E9A; Tue, 9 Jun 2015 14:31:19 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t59EVIKG021231; Tue, 9 Jun 2015 14:31:18 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t59EVIxM021230; Tue, 9 Jun 2015 14:31:18 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201506091431.t59EVIxM021230@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 9 Jun 2015 14:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284179 - head/sys/modules/em X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 14:31:19 -0000 Author: sbruno Date: Tue Jun 9 14:31:18 2015 New Revision: 284179 URL: https://svnweb.freebsd.org/changeset/base/284179 Log: Include opt_em.h now that there are actual kernel compile options for em(4). Submitted by: jfv MFC after: 2 week Sponsored by: Limelight Networks Modified: head/sys/modules/em/Makefile Modified: head/sys/modules/em/Makefile ============================================================================== --- head/sys/modules/em/Makefile Tue Jun 9 11:49:56 2015 (r284178) +++ head/sys/modules/em/Makefile Tue Jun 9 14:31:18 2015 (r284179) @@ -2,7 +2,8 @@ .PATH: ${.CURDIR}/../../dev/e1000 KMOD = if_em -SRCS = device_if.h bus_if.h pci_if.h opt_ddb.h opt_inet.h opt_inet6.h +SRCS = device_if.h bus_if.h pci_if.h opt_ddb.h opt_em.h opt_inet.h \ + opt_inet6.h SRCS += $(CORE_SRC) $(LEGACY_SRC) SRCS += $(COMMON_SHARED) $(LEGACY_SHARED) $(PCIE_SHARED) CORE_SRC = if_em.c e1000_osdep.c From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 15:51:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EAB223E; Tue, 9 Jun 2015 15:51:12 +0000 (UTC) (envelope-from ambrisko@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4DF1336; Tue, 9 Jun 2015 15:51:12 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t59FpCsC060734; Tue, 9 Jun 2015 15:51:12 GMT (envelope-from ambrisko@FreeBSD.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t59FpCgg060733; Tue, 9 Jun 2015 15:51:12 GMT (envelope-from ambrisko@FreeBSD.org) Message-Id: <201506091551.t59FpCgg060733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ambrisko set sender to ambrisko@FreeBSD.org using -f From: Doug Ambrisko Date: Tue, 9 Jun 2015 15:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284180 - head/sys/dev/mfi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 15:51:12 -0000 Author: ambrisko Date: Tue Jun 9 15:51:11 2015 New Revision: 284180 URL: https://svnweb.freebsd.org/changeset/base/284180 Log: Switch from make_dev_alias to make_dev_alias_p since make_dev_alias_p can gracefully fail if the /dev/megaraid_sas_ioctl_node symlink already exists. This can happen if mfi(4) and mrsas(4) are both attached to cards and providing Linux emulation support. Let the first one win. An equivalent change needs to be done to mrsas(4). Extra credit would be to pass the Linux emulation call to the other driver when appropriate. This will probably be a rare case and the user can manually change where the symlink points to. MFC after: 3 days Modified: head/sys/dev/mfi/mfi.c Modified: head/sys/dev/mfi/mfi.c ============================================================================== --- head/sys/dev/mfi/mfi.c Tue Jun 9 14:31:18 2015 (r284179) +++ head/sys/dev/mfi/mfi.c Tue Jun 9 15:51:11 2015 (r284180) @@ -369,6 +369,7 @@ mfi_attach(struct mfi_softc *sc) int error, commsz, framessz, sensesz; int frames, unit, max_fw_sge, max_fw_cmds; uint32_t tb_mem_size = 0; + struct cdev *dev_t; if (sc == NULL) return EINVAL; @@ -763,7 +764,8 @@ mfi_attach(struct mfi_softc *sc) sc->mfi_cdev = make_dev(&mfi_cdevsw, unit, UID_ROOT, GID_OPERATOR, 0640, "mfi%d", unit); if (unit == 0) - make_dev_alias(sc->mfi_cdev, "megaraid_sas_ioctl_node"); + make_dev_alias_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, &dev_t, + sc->mfi_cdev, "%s", "megaraid_sas_ioctl_node"); if (sc->mfi_cdev != NULL) sc->mfi_cdev->si_drv1 = sc; SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->mfi_dev), From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 15:53:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED44E3F2; Tue, 9 Jun 2015 15:53:09 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id B3FD814B2; Tue, 9 Jun 2015 15:53:09 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id D1A69423102; Wed, 10 Jun 2015 01:53:05 +1000 (AEST) Date: Wed, 10 Jun 2015 01:53:04 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284178 - head/sys/kern In-Reply-To: <201506091149.t59BnulP034734@svn.freebsd.org> Message-ID: <20150609233811.L2610@besplex.bde.org> References: <201506091149.t59BnulP034734@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=XMDNMlVE c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6b5Id2gS-V_mUQD32VIA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 15:53:10 -0000 On Tue, 9 Jun 2015, Konstantin Belousov wrote: > Log: > When updating/accessing the timehands, barriers are needed to ensure > that: > - th_generation update is visible after the parameters update is > visible; > - the read of parameters is not reordered before initial read of > th_generation. This adds pessimizations that were intentionally left out. > On UP kernels, compiler barriers are enough. For SMP machines, CPU > barriers must be used too, as was confirmed by submitter by testing on > the Freescale T4240 platform with 24 PowerPC processors. Some SMP machines need something. Hopefully not most, and never as heavyweight as this. > Modified: head/sys/kern/kern_tc.c > ============================================================================== > --- head/sys/kern/kern_tc.c Tue Jun 9 11:41:37 2015 (r284177) > +++ head/sys/kern/kern_tc.c Tue Jun 9 11:49:56 2015 (r284178) > @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include Style bug. is standard pollution in . and this is relied on in some of the headers already included, e.g., in . Timecounters have much larger races than this. E.g., kern_ntptime.c is supposed to be locked by splhigh(), but is actually locked by Giant in its less critical parts and by nothing except the null splhigh() in its most critical parts. It is called from fast interrupt handers with whatever thre locking is. Ntptime knows nothing of this locking, so it doesn't work. The must usual call is ntp_update_second from the hardclock fast interrupt handler. There are also calls from arbitrary drivers with pps support. These call into kern_tc.c with whatever locking the driver has. These have broken locking using the generation could to protect the timecounter parts (see below), and null locking to protect the ntptime parts (mainly hardpps()). > @@ -189,6 +190,33 @@ tc_delta(struct timehands *th) > tc->tc_counter_mask); > } > > +static u_int > +tc_getgen(struct timehands *th) > +{ > + > +#ifdef SMP > + return (atomic_load_acq_int(&th->th_generation)); > +#else > + u_int gen; > + > + gen = th->th_generation; > + __compiler_membar(); > + return (gen); > +#endif > +} This is an enormous pessimization unless it is automatically inlined. Since it is called more than once, only clang and gcc -O3 automatically inlines it. A simple load operation from a pointer becomes a function call and sometimes more. > + > +static void > +tc_setgen(struct timehands *th, u_int newgen) > +{ > + > +#ifdef SMP > + atomic_store_rel_int(&th->th_generation, newgen); > +#else > + __compiler_membar(); > + th->th_generation = newgen; > +#endif > +} Same pessimization for simple stores. These pessimizations are especially good since the functions are called in loops (though usually just twice). Calling them in loops is an excuse for clang to inline them. But clang's inlining makes little difference except to break debugging in most places in the kernel. I avoid it and other misoptimizations using gcc -O1 -fno-inline-functions-called once. > @@ -1651,13 +1679,13 @@ pps_capture(struct pps_state *pps) > > KASSERT(pps != NULL, ("NULL pps pointer in pps_capture")); > th = timehands; > - pps->capgen = th->th_generation; > + pps->capgen = tc_getgen(th); This is part of the broken locking for pps. The generation count is fragile and only works if you check it before committing to a change and retry if it changed. But the pps API doesn't support retrying. > pps->capth = th; > #ifdef FFCLOCK > pps->capffth = fftimehands; > #endif > pps->capcount = th->th_counter->tc_get_timecount(th->th_counter); > - if (pps->capgen != th->th_generation) > + if (pps->capgen != tc_getgen(th)) > pps->capgen = 0; This check is in the middle of pps activity. Looping to retrying would be easy enough, but isn't done. Anyway, the race window is much larger later. > } > > @@ -1677,7 +1705,7 @@ pps_event(struct pps_state *pps, int eve > > KASSERT(pps != NULL, ("NULL pps pointer in pps_event")); > /* If the timecounter was wound up underneath us, bail out. */ > - if (pps->capgen == 0 || pps->capgen != pps->capth->th_generation) > + if (pps->capgen == 0 || pps->capgen != tc_getgen(pps->capth)) > return; Normal use of pps is pps_capture() followed by pps_event(). The above is broken locking for the latter... > > /* Things would be easier with arrays. */ > @@ -1727,7 +1755,7 @@ pps_event(struct pps_state *pps, int eve > bintime2timespec(&bt, &ts); > > /* If the timecounter was wound up underneath us, bail out. */ > - if (pps->capgen != pps->capth->th_generation) > + if (pps->capgen != tc_getgen(pps->capth)) > return; We also check in the middle, and give up instead of retrying. Not too bad (I think ntp can handle rare missed pps's). > > *pcount = pps->capcount; But then we continue without further locking. Perhaps we did enough to stabilize the timecounter while accessing it, but we don't do anything extra to stabilize *pps. pps stuff is basically locked by the generation count. This locking (except for the ntptime parts) is more complicated and less broken than might first appear. Note the comment: /* If the timecounter was wound up underneath us, bail out. */ I think this is correct and it takes a full timecounter windup for the generation cound to change. That is, cycling through all 10 timehands. With HZ = 100, than is 100 msec, and with HZ = 1000 it is 10 msec which is still a long time. It takes weird scheduling or stopping in a debugger (which is a type of weird scheduling) for the timehands to change more than once under the thread that has "captured" a generation using the generation count. For pps_capture(), the thread doing the capturing should be at least a slow interrupt handler, so it shouldn't be delayed for long. Hmm, actually it is easy to think of a not very weird configurataion where it is delayed for that long: - a slow UP system - misconfigured with HZ = 1000 so the windup occurs in only 10 msec - pps capture called from a slow interrupt handler (like mine for the RTC) - then the pps interrupt handler can be preempted by other interrupts, and it is easy for them to sometimes take more than 10 msec to complete. Reading of the timecounter uses essentially a passive form of capture, Since it is usually done in syscalls, the caller can easily be preempted for 1 full timecounter windup time. They handle this by retrying. The large interval of 10 timehands cycles is supposed to make atomic ops unnecessary, and even memory ordering unnecessary in practice. It is only necessary for changes to the generation to not become visible before changes to the data and not too many generations after changes to the data (even 8 or 9 generations late would work, but reduces the effective number of generations to 2 or 1). The latter happens automatically with locking on return from hardclock() if not before. Perhaps this is intentional. But tc_windup() makes no attempt to make the data visible before the generation count changes. It basically does: th = oldest timehands // normally nothing using this th->th_generation = 0 // missing ordering start hacking on th // missing ordering This loses if something is using th, AND the memory ordering is not program order, AND something keeps sees the changed parts of th before seeing the th_generation change. ... finish hacking on th th->th_generation = next generation // missing ordering This loses in the opposite way if the change to the generation becomes visible before the data, AND something is using the oldest th, etc. timehands = th // missing ordering This loses for the new current generation, if the change to timehands becomes visible before the changes to *th (except if the visible change to the generation is to 0 but not to the new generation). This race is more likely to be lost than the others, since it doesn't take the unlikely setup with the oldest timehands till active. If there is a race window at all (due to out of order memory visibility for critical parts of the changed timehands), then any thread that starts and finishes reading the timecounter while its memory is disordered will lose the race. This race window is just fairly short, since tc_windup() soon returns and the interrupt handler does some atomic ops which sync the order on most or all arches. Without that, the order would probably be synced by unrelated memory activity before 10 timehands cycles, but the current timehands is supposed to be synced already. The change in this commit is sort of backwards. It pessimizes all timecounter reads to work around the missing ordering in timecounter windups. It should be arranged that even if a timecounter read sees a stale timehands, the timehands remains for long enough. Surely this is possible. Timecounter windups of course sync everything. Then when a timecounter read checks the generation count, I think that on some arches the sync in windup means that the reader sees the up to date value. Otherwise, the sync just has to occur within before 10 cycles of timehands updates. At worse, this can be done by an ordered read of all timecounter memory once every 9 cycles of timehands updates. Except, there would be problems if this read were delayed. So tc_windup() should tell other CPUs to sync, and wait for them. The other gross bugs in timecounter locking are mainly calls to tc_windup() from clock_settime(CLOCK_REALTIME) and sysctl kern.timecounter.hardware. These race with calls from hardclock(). hardclock()'s locking defends against interference from hardclock() only (except in UP when hardclock() is a fast interrupt handler). It isn't clear what happens, but at best tc_windup() will cycle through the timehands at an unsuported rate. This is not a large problem since it takes foot-shooting to activate. Ntp prefers to do micro-adjustments and almost never calls clock_settime(). clock_settime() is rate-limited to once per second at securelevel >= 2, but we now know that securelevel was a mistake and there are better methods so this configuration is probably rarer now than ever. Bruce From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 18:04:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68A9C2EB; Tue, 9 Jun 2015 18:04:30 +0000 (UTC) (envelope-from alc@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56F7B152B; Tue, 9 Jun 2015 18:04:30 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t59I4UMQ025545; Tue, 9 Jun 2015 18:04:30 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t59I4TZB025542; Tue, 9 Jun 2015 18:04:29 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201506091804.t59I4TZB025542@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Tue, 9 Jun 2015 18:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284181 - in head/sys: amd64/amd64 arm/arm i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 18:04:30 -0000 Author: alc Date: Tue Jun 9 18:04:28 2015 New Revision: 284181 URL: https://svnweb.freebsd.org/changeset/base/284181 Log: Account for superpage mappings that are created by pmap_copy(). Modified: head/sys/amd64/amd64/pmap.c head/sys/arm/arm/pmap-v6-new.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Jun 9 15:51:11 2015 (r284180) +++ head/sys/amd64/amd64/pmap.c Tue Jun 9 18:04:28 2015 (r284181) @@ -4844,6 +4844,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm PG_PS_FRAME, &lock))) { *pde = srcptepaddr & ~PG_W; pmap_resident_count_inc(dst_pmap, NBPDR / PAGE_SIZE); + atomic_add_long(&pmap_pde_mappings, 1); } else dstmpde->wire_count--; continue; Modified: head/sys/arm/arm/pmap-v6-new.c ============================================================================== --- head/sys/arm/arm/pmap-v6-new.c Tue Jun 9 15:51:11 2015 (r284180) +++ head/sys/arm/arm/pmap-v6-new.c Tue Jun 9 18:04:28 2015 (r284181) @@ -5768,6 +5768,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm ~PTE1_W; dst_pmap->pm_stats.resident_count += PTE1_SIZE / PAGE_SIZE; + pmap_pte1_mappings++; } continue; } else if (!pte1_is_link(src_pte1)) Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Tue Jun 9 15:51:11 2015 (r284180) +++ head/sys/i386/i386/pmap.c Tue Jun 9 18:04:28 2015 (r284181) @@ -4035,6 +4035,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm ~PG_W; dst_pmap->pm_stats.resident_count += NBPDR / PAGE_SIZE; + pmap_pde_mappings++; } continue; } From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 18:06:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47590448; Tue, 9 Jun 2015 18:06:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:0:20e:cff:fea0:e4a2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74EB31547; Tue, 9 Jun 2015 18:06:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::e55a:cb77:5eab:3bb0] (unknown [IPv6:2001:7b8:3a7:0:e55a:cb77:5eab:3bb0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 664552115A; Tue, 9 Jun 2015 20:06:07 +0200 (CEST) Subject: Re: svn commit: r284167 - head/sys/i386/i386 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_F0EFAA0E-FAE0-4F0D-A1A6-109D8BF54FD9"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5 From: Dimitry Andric In-Reply-To: <20150609162836.C935@besplex.bde.org> Date: Tue, 9 Jun 2015 20:05:55 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <14AE3E08-5D5D-437F-A2D3-C89A8CF4B0C1@FreeBSD.org> References: <201506082012.t58KCjZX023061@svn.freebsd.org> <20150609162836.C935@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 18:06:14 -0000 --Apple-Mail=_F0EFAA0E-FAE0-4F0D-A1A6-109D8BF54FD9 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 09 Jun 2015, at 08:44, Bruce Evans wrote: > > On Mon, 8 Jun 2015, Dimitry Andric wrote: > >> Log: >> Merge r283870 from amd64: >> >> Remove unneeded NULL checks in trap_fatal(). >> >> Since td_name is an array member of struct thread, it can never be NULL, >> so the check can be removed. In addition, curproc can never be NULL, >> so remove the if statement, and splice the two printfs() together. >> >> While here, remove the u_long cast, and use the correct printf format >> specifier for curproc->p_pid. >> >> Requested by: jhb > > Er. I gave a longer review which implicity requested not doing all of > this. The format was correct (it matched the cast), and the cast was > less wrong than not casting. Please read https://reviews.freebsd.org/D2695, where Kostik argued "pid_t is int32_t on all arches", and I agreed with that. The previous obfuscation is unnecessary now. > Both amd64/trap.c i386/trap.c still print pids portably (by casting > to long) in one place. They each had 2 unportable printings of pids; > now they each have 3 unportable printings of pids. I wasn't updating the other parts of the code, so I stayed out of there for now. Feel free to put a review in Phabricator to make everything consistent. -Dimitry --Apple-Mail=_F0EFAA0E-FAE0-4F0D-A1A6-109D8BF54FD9 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.27 iEYEARECAAYFAlV3Kw4ACgkQsF6jCi4glqN3yQCgvk6xfYmX+RtDRGUePIorZfBO xWAAoMUJsnZoVcztyLSBW2bnaeyOgvA4 =XhHI -----END PGP SIGNATURE----- --Apple-Mail=_F0EFAA0E-FAE0-4F0D-A1A6-109D8BF54FD9-- From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 18:46:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 014CA1A2; Tue, 9 Jun 2015 18:46:32 +0000 (UTC) (envelope-from sobomax@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D70621EDB; Tue, 9 Jun 2015 18:46:32 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t59IkWBa048145; Tue, 9 Jun 2015 18:46:32 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t59IkW23048143; Tue, 9 Jun 2015 18:46:32 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201506091846.t59IkW23048143@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Tue, 9 Jun 2015 18:46:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284182 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 18:46:33 -0000 Author: sobomax Date: Tue Jun 9 18:46:31 2015 New Revision: 284182 URL: https://svnweb.freebsd.org/changeset/base/284182 Log: Extend TPS65217 support to be able to pull and decode battery charger configuration and provide some basic control knobs to set charger voltage and dump config on boot. Two loader tunables have been added: o hw.am335x_pmic.bootverbose set to 1 to get more info on the boot; o hw.am335x_pmic.vo: set to charger voltage to be applied on kernel initialization time, supported values are "4.10V", "4.15V", "4.20V" and "4.25V". Cleanup code a bit in general, move TPS65217 register definitions into a separate header, convert bit-banging defines into bitmap structures. Also threat the case when power source is neither "AC" nor "USB" as "Battery", not "Unknown". Added: head/sys/arm/ti/am335x/tps65217x.h (contents, props changed) Modified: head/sys/arm/ti/am335x/am335x_pmic.c Modified: head/sys/arm/ti/am335x/am335x_pmic.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_pmic.c Tue Jun 9 18:04:28 2015 (r284181) +++ head/sys/arm/ti/am335x/am335x_pmic.c Tue Jun 9 18:46:31 2015 (r284182) @@ -27,7 +27,7 @@ #include __FBSDID("$FreeBSD$"); /* -* TPS65217 PMIC companion chip for AM335x SoC sitting on I2C bus +* TI TPS65217 PMIC companion chip for AM335x SoC sitting on I2C bus */ #include #include @@ -50,30 +50,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "iicbus_if.h" -#define TPS65217A 0x7 -#define TPS65217B 0xF -#define TPS65217C 0xE -#define TPS65217D 0x6 - -/* TPS65217 Reisters */ -#define TPS65217_CHIPID_REG 0x00 -#define TPS65217_INT_REG 0x02 -#define TPS65217_INT_PBM (1U << 6) -#define TPS65217_INT_ACM (1U << 5) -#define TPS65217_INT_USBM (1U << 4) -#define TPS65217_INT_PBI (1U << 2) -#define TPS65217_INT_ACI (1U << 1) -#define TPS65217_INT_USBI (1U << 0) - -#define TPS65217_STATUS_REG 0x0A -#define TPS65217_STATUS_OFF (1U << 7) -#define TPS65217_STATUS_ACPWR (1U << 3) -#define TPS65217_STATUS_USBPWR (1U << 2) -#define TPS65217_STATUS_BT (1U << 0) - #define MAX_IIC_DATA_SIZE 2 @@ -85,6 +65,13 @@ struct am335x_pmic_softc { void *sc_intrhand; }; +static const char *tps65217_voreg_c[4] = {"4.10V", "4.15V", "4.20V", "4.25V"}; + +static int am335x_pmic_bootverbose = 0; +TUNABLE_INT("hw.am335x_pmic.bootverbose", &am335x_pmic_bootverbose); +static char am335x_pmic_vo[6]; +TUNABLE_STR("hw.am335x_pmic.vo", am335x_pmic_vo, sizeof(am335x_pmic_vo)); + static void am335x_pmic_shutdown(void *, int); static int @@ -120,18 +107,19 @@ static void am335x_pmic_intr(void *arg) { struct am335x_pmic_softc *sc = (struct am335x_pmic_softc *)arg; - uint8_t int_reg, status_reg; + struct tps65217_status_reg status_reg; + struct tps65217_int_reg int_reg; int rv; char notify_buf[16]; THREAD_SLEEPING_OK(); - rv = am335x_pmic_read(sc->sc_dev, TPS65217_INT_REG, &int_reg, 1); + rv = am335x_pmic_read(sc->sc_dev, TPS65217_INT_REG, (uint8_t *)&int_reg, 1); if (rv != 0) { device_printf(sc->sc_dev, "Cannot read interrupt register\n"); THREAD_NO_SLEEPING(); return; } - rv = am335x_pmic_read(sc->sc_dev, TPS65217_STATUS_REG, &status_reg, 1); + rv = am335x_pmic_read(sc->sc_dev, TPS65217_STATUS_REG, (uint8_t *)&status_reg, 1); if (rv != 0) { device_printf(sc->sc_dev, "Cannot read status register\n"); THREAD_NO_SLEEPING(); @@ -139,11 +127,11 @@ am335x_pmic_intr(void *arg) } THREAD_NO_SLEEPING(); - if ((int_reg & TPS65217_INT_PBI) && (status_reg & TPS65217_STATUS_BT)) + if (int_reg.pbi && status_reg.pb) shutdown_nice(RB_POWEROFF); - if (int_reg & TPS65217_INT_ACI) { + if (int_reg.aci) { snprintf(notify_buf, sizeof(notify_buf), "notify=0x%02x", - (status_reg & TPS65217_STATUS_ACPWR) ? 1 : 0); + status_reg.acpwr ? 1 : 0); devctl_notify_f("ACPI", "ACAD", "power", notify_buf, M_NOWAIT); } } @@ -167,37 +155,120 @@ am335x_pmic_probe(device_t dev) } static void +am335x_pmic_dump_chgconfig(device_t dev) +{ + struct tps65217_chgconfig0_reg reg0; + struct tps65217_chgconfig1_reg reg1; + struct tps65217_chgconfig2_reg reg2; + struct tps65217_chgconfig3_reg reg3; + const char *e_d[] = {"enabled", "disabled"}; + const char *d_e[] = {"disabled", "enabled"}; + const char *i_a[] = {"inactive", "active"}; + const char *f_t[] = {"false", "true"}; + const char *timer_c[] = {"4h", "5h", "6h", "8h"}; + const char *ntc_type_c[] = {"100k", "10k"}; + const char *vprechg_c[] = {"2.9V", "2.5V"}; + const char *trange_c[] = {"0-45 C", "0-60 C"}; + const char *termif_c[] = {"2.5%", "7.5%", "15%", "18%"}; + const char *pchrgt_c[] = {"30 min", "60 min"}; + const char *dppmth_c[] = {"3.50V", "3.75V", "4.00V", "4.25V"}; + const char *ichrg_c[] = {"300mA", "400mA", "500mA", "700mA"}; + + am335x_pmic_read(dev, TPS65217_CHGCONFIG0_REG, (uint8_t *)®0, 1); + device_printf(dev, " BAT TEMP/NTC ERROR: %s\n", f_t[reg0.battemp]); + device_printf(dev, " Pre-charge timer time-out: %s\n", f_t[reg0.pchgtout]); + device_printf(dev, " Charge timer time-out: %s\n", f_t[reg0.chgtout]); + device_printf(dev, " Charger active: %s\n", f_t[reg0.active]); + device_printf(dev, " Termination current detected: %s\n", f_t[reg0.termi]); + device_printf(dev, " Thermal suspend: %s\n", f_t[reg0.tsusp]); + device_printf(dev, " DPPM active: %s\n", f_t[reg0.dppm]); + device_printf(dev, " Thermal regulation: %s\n", i_a[reg0.treg]); + + am335x_pmic_read(dev, TPS65217_CHGCONFIG1_REG, (uint8_t *)®1, 1); + device_printf(dev, " Charger: %s\n", d_e[reg1.chg_en]); + device_printf(dev, " Suspend charge: %s\n", i_a[reg1.susp]); + device_printf(dev, " Charge termination: %s\n", e_d[reg1.term]); + device_printf(dev, " Charger reset: %s\n", i_a[reg1.reset]); + device_printf(dev, " NTC TYPE: %s\n", ntc_type_c[reg1.ntc_type]); + device_printf(dev, " Safety timer: %s\n", d_e[reg1.tmr_en]); + device_printf(dev, " Charge safety timer: %s\n", timer_c[reg1.timer]); + + am335x_pmic_read(dev, TPS65217_CHGCONFIG2_REG, (uint8_t *)®2, 1); + device_printf(dev, " Charge voltage: %s\n", tps65217_voreg_c[reg2.voreg]); + device_printf(dev, " Pre-charge to fast charge transition voltage: %s\n", + vprechg_c[reg2.vprechg]); + device_printf(dev, " Dynamic timer function: %s\n", d_e[reg2.dyntmr]); + + am335x_pmic_read(dev, TPS65217_CHGCONFIG3_REG, (uint8_t *)®3, 1); + device_printf(dev, " Temperature range for charging: %s\n", trange_c[reg3.trange]); + device_printf(dev, " Termination current factor: %s\n", termif_c[reg3.termif]); + device_printf(dev, " Pre-charge time: %s\n", pchrgt_c[reg3.pchrgt]); + device_printf(dev, " Power path DPPM threshold: %s\n", dppmth_c[reg3.dppmth]); + device_printf(dev, " Charge current: %s\n", ichrg_c[reg3.ichrg]); +} + +static void +am335x_pmic_setvo(device_t dev, uint8_t vo) +{ + struct tps65217_chgconfig2_reg reg2; + + am335x_pmic_read(dev, TPS65217_CHGCONFIG2_REG, (uint8_t *)®2, 1); + reg2.voreg = vo; + am335x_pmic_write(dev, TPS65217_CHGCONFIG2_REG, (uint8_t *)®2, 1); +} + +static void am335x_pmic_start(void *xdev) { struct am335x_pmic_softc *sc; device_t dev = (device_t)xdev; - uint8_t reg; + struct tps65217_status_reg status_reg; + struct tps65217_chipid_reg chipid_reg; + uint8_t reg, vo; char name[20]; - char pwr[4][11] = {"Unknown", "USB", "AC", "USB and AC"}; + char pwr[4][11] = {"Battery", "USB", "AC", "USB and AC"}; int rv; sc = device_get_softc(dev); - am335x_pmic_read(dev, TPS65217_CHIPID_REG, ®, 1); - switch (reg>>4) { + am335x_pmic_read(dev, TPS65217_CHIPID_REG, (uint8_t *)&chipid_reg, 1); + switch (chipid_reg.chip) { case TPS65217A: - sprintf(name, "TPS65217A ver 1.%u", reg & 0xF); + sprintf(name, "TPS65217A ver 1.%u", chipid_reg.rev); break; case TPS65217B: - sprintf(name, "TPS65217B ver 1.%u", reg & 0xF); + sprintf(name, "TPS65217B ver 1.%u", chipid_reg.rev); break; case TPS65217C: - sprintf(name, "TPS65217C ver 1.%u", reg & 0xF); + sprintf(name, "TPS65217C ver 1.%u", chipid_reg.rev); break; case TPS65217D: - sprintf(name, "TPS65217D ver 1.%u", reg & 0xF); + sprintf(name, "TPS65217D ver 1.%u", chipid_reg.rev); break; default: sprintf(name, "Unknown PMIC"); } - am335x_pmic_read(dev, TPS65217_STATUS_REG, ®, 1); - device_printf(dev, "%s powered by %s\n", name, pwr[(reg>>2)&0x03]); + am335x_pmic_read(dev, TPS65217_STATUS_REG, (uint8_t *)&status_reg, 1); + device_printf(dev, "%s powered by %s\n", name, + pwr[status_reg.usbpwr | (status_reg.acpwr << 1)]); + + if (am335x_pmic_vo[0] != '\0') { + for (vo = 0; vo < 4; vo++) { + if (strcmp(tps65217_voreg_c[vo], am335x_pmic_vo) == 0) + break; + } + if (vo == 4) { + device_printf(dev, "WARNING: hw.am335x_pmic.vo=\"%s\"" + ": unsupported value\n", am335x_pmic_vo); + } else { + am335x_pmic_setvo(dev, vo); + } + } + + if (bootverbose || am335x_pmic_bootverbose) { + am335x_pmic_dump_chgconfig(dev); + } EVENTHANDLER_REGISTER(shutdown_final, am335x_pmic_shutdown, dev, SHUTDOWN_PRI_LAST); @@ -248,14 +319,15 @@ static void am335x_pmic_shutdown(void *xdev, int howto) { device_t dev; - uint8_t reg; + struct tps65217_status_reg reg; if (!(howto & RB_POWEROFF)) return; dev = (device_t)xdev; + am335x_pmic_read(dev, TPS65217_STATUS_REG, (uint8_t *)®, 1); /* Set the OFF bit on status register to start the shutdown sequence. */ - reg = TPS65217_STATUS_OFF; - am335x_pmic_write(dev, TPS65217_STATUS_REG, ®, 1); + reg.off = 1; + am335x_pmic_write(dev, TPS65217_STATUS_REG, (uint8_t *)®, 1); /* Toggle pmic_pwr_enable to shutdown the PMIC. */ am335x_rtc_pmic_pwr_toggle(); } Added: head/sys/arm/ti/am335x/tps65217x.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/am335x/tps65217x.h Tue Jun 9 18:46:31 2015 (r284182) @@ -0,0 +1,114 @@ +/*- + * Copyright (c) 2012 Damjan Marion + * Copyright (c) 2015 Maksym Sobolyev + * 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 AUTHOR 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. + * + * $FreeBSD$ + */ + +#ifndef __TPS65217X_H__ +#define __TPS65217X_H__ + +/* + * TPS65217 PMIC is a companion chip for AM335x SoC sitting on I2C bus + */ + +/* TPS65217 Reisters */ +#define TPS65217_CHIPID_REG 0x00 +struct tps65217_chipid_reg { + unsigned int rev:4; + unsigned int chip:4; +#define TPS65217A 0x7 +#define TPS65217B 0xF +#define TPS65217C 0xE +#define TPS65217D 0x6 +} __attribute__((__packed__)); + +#define TPS65217_INT_REG 0x02 +struct tps65217_int_reg { + unsigned int usbi:1; + unsigned int aci:1; + unsigned int pbi:1; + unsigned int reserved3:1; + unsigned int usbm:1; + unsigned int acm:1; + unsigned int pbm:1; + unsigned int reserved7:1; +} __attribute__((__packed__)); + +#define TPS65217_STATUS_REG 0x0A +struct tps65217_status_reg { + unsigned int pb:1; + unsigned int reserved1:1; + unsigned int usbpwr:1; + unsigned int acpwr:1; + unsigned int reserved4:3; + unsigned int off:1; +} __attribute__((__packed__)); + +#define TPS65217_CHGCONFIG0_REG 0x03 +struct tps65217_chgconfig0_reg { + unsigned int battemp:1; + unsigned int pchgtout:1; + unsigned int chgtout:1; + unsigned int active:1; + unsigned int termi:1; + unsigned int tsusp:1; + unsigned int dppm:1; + unsigned int treg:1; +} __attribute__((__packed__)); + +#define TPS65217_CHGCONFIG1_REG 0x04 +struct tps65217_chgconfig1_reg { + unsigned int chg_en:1; + unsigned int susp:1; + unsigned int term:1; + unsigned int reset:1; + unsigned int ntc_type:1; + unsigned int tmr_en:1; + unsigned int timer:2; +} __attribute__((__packed__)); + +#define TPS65217_CHGCONFIG2_REG 0x05 +struct tps65217_chgconfig2_reg { + unsigned int reserved:4; + unsigned int voreg:2; +#define TPS65217_VO_410V 0b00 +#define TPS65217_VO_415V 0b01 +#define TPS65217_VO_420V 0b10 +#define TPS65217_VO_425V 0b11 + unsigned int vprechg:1; + unsigned int dyntmr:1; +} __attribute__((__packed__)); + +#define TPS65217_CHGCONFIG3_REG 0x06 +struct tps65217_chgconfig3_reg { + unsigned int trange:1; + unsigned int termif:2; + unsigned int pchrgt:1; + unsigned int dppmth:2; + unsigned int ichrg:2; +} __attribute__((__packed__)); + +#endif /* __TPS65217X_H__ */ From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 19:04:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67F71BE8; Tue, 9 Jun 2015 19:04:56 +0000 (UTC) (envelope-from sobomax@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55DDA1475; Tue, 9 Jun 2015 19:04:56 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t59J4uGq058418; Tue, 9 Jun 2015 19:04:56 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t59J4uow058417; Tue, 9 Jun 2015 19:04:56 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201506091904.t59J4uow058417@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Tue, 9 Jun 2015 19:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284183 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 19:04:56 -0000 Author: sobomax Date: Tue Jun 9 19:04:55 2015 New Revision: 284183 URL: https://svnweb.freebsd.org/changeset/base/284183 Log: Use tab to do identation consistently. Modified: head/sys/arm/ti/am335x/am335x_pmic.c Modified: head/sys/arm/ti/am335x/am335x_pmic.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_pmic.c Tue Jun 9 18:46:31 2015 (r284182) +++ head/sys/arm/ti/am335x/am335x_pmic.c Tue Jun 9 19:04:55 2015 (r284183) @@ -165,7 +165,7 @@ am335x_pmic_dump_chgconfig(device_t dev) const char *d_e[] = {"disabled", "enabled"}; const char *i_a[] = {"inactive", "active"}; const char *f_t[] = {"false", "true"}; - const char *timer_c[] = {"4h", "5h", "6h", "8h"}; + const char *timer_c[] = {"4h", "5h", "6h", "8h"}; const char *ntc_type_c[] = {"100k", "10k"}; const char *vprechg_c[] = {"2.9V", "2.5V"}; const char *trange_c[] = {"0-45 C", "0-60 C"}; From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 19:17:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAEE3825; Tue, 9 Jun 2015 19:17:33 +0000 (UTC) (envelope-from sobomax@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98D221752; Tue, 9 Jun 2015 19:17:33 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t59JHXNK064844; Tue, 9 Jun 2015 19:17:33 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t59JHXu7064843; Tue, 9 Jun 2015 19:17:33 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201506091917.t59JHXu7064843@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Tue, 9 Jun 2015 19:17:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284189 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 19:17:33 -0000 Author: sobomax Date: Tue Jun 9 19:17:33 2015 New Revision: 284189 URL: https://svnweb.freebsd.org/changeset/base/284189 Log: Fix a typo in a comment that has been carried over from am335x_pmic.c. Modified: head/sys/arm/ti/am335x/tps65217x.h Modified: head/sys/arm/ti/am335x/tps65217x.h ============================================================================== --- head/sys/arm/ti/am335x/tps65217x.h Tue Jun 9 19:14:27 2015 (r284188) +++ head/sys/arm/ti/am335x/tps65217x.h Tue Jun 9 19:17:33 2015 (r284189) @@ -34,7 +34,7 @@ * TPS65217 PMIC is a companion chip for AM335x SoC sitting on I2C bus */ -/* TPS65217 Reisters */ +/* TPS65217 Registers */ #define TPS65217_CHIPID_REG 0x00 struct tps65217_chipid_reg { unsigned int rev:4; From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 19:22:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EB989B5; Tue, 9 Jun 2015 19:22:14 +0000 (UTC) (envelope-from sobomax@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CA6F1957; Tue, 9 Jun 2015 19:22:14 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t59JMDEe069091; Tue, 9 Jun 2015 19:22:13 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t59JMDPV069090; Tue, 9 Jun 2015 19:22:13 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201506091922.t59JMDPV069090@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Tue, 9 Jun 2015 19:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284190 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 19:22:14 -0000 Author: sobomax Date: Tue Jun 9 19:22:13 2015 New Revision: 284190 URL: https://svnweb.freebsd.org/changeset/base/284190 Log: "status_reg.acpwr ? 1 : 0" is now the same as just "status_reg.acpwr". Modified: head/sys/arm/ti/am335x/am335x_pmic.c Modified: head/sys/arm/ti/am335x/am335x_pmic.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_pmic.c Tue Jun 9 19:17:33 2015 (r284189) +++ head/sys/arm/ti/am335x/am335x_pmic.c Tue Jun 9 19:22:13 2015 (r284190) @@ -131,7 +131,7 @@ am335x_pmic_intr(void *arg) shutdown_nice(RB_POWEROFF); if (int_reg.aci) { snprintf(notify_buf, sizeof(notify_buf), "notify=0x%02x", - status_reg.acpwr ? 1 : 0); + status_reg.acpwr); devctl_notify_f("ACPI", "ACAD", "power", notify_buf, M_NOWAIT); } } From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 21:39:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69FA24CF; Tue, 9 Jun 2015 21:39:42 +0000 (UTC) (envelope-from ken@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54D6418D7; Tue, 9 Jun 2015 21:39:42 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t59Ldg1L036391; Tue, 9 Jun 2015 21:39:42 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t59Ldcdp036361; Tue, 9 Jun 2015 21:39:38 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201506092139.t59Ldcdp036361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Tue, 9 Jun 2015 21:39:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284192 - in head: lib/libsbuf lib/libutil sbin/camcontrol share/man/man9 sys/cam sys/cam/scsi sys/kern sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 21:39:42 -0000 Author: ken Date: Tue Jun 9 21:39:38 2015 New Revision: 284192 URL: https://svnweb.freebsd.org/changeset/base/284192 Log: Add support for reading MAM attributes to camcontrol(8) and libcam(3). MAM is Medium Auxiliary Memory and is most commonly found as flash chips on tapes. This includes support for reading attributes and decoding most known attributes, but does not yet include support for writing attributes or reporting attributes in XML format. libsbuf/Makefile: Add subr_prf.c for the new sbuf_hexdump() function. This function is essentially the same function. libsbuf/Symbol.map: Add a new shared library minor version, and include the sbuf_hexdump() function. libsbuf/Version.def: Add version 1.4 of the libsbuf library. libutil/hexdump.3: Document sbuf_hexdump() alongside hexdump(3), since it is essentially the same function. camcontrol/Makefile: Add attrib.c. camcontrol/attrib.c: Implementation of READ ATTRIBUTE support for camcontrol(8). camcontrol/camcontrol.8: Document the new 'camcontrol attrib' subcommand. camcontrol/camcontrol.c: Add the new 'camcontrol attrib' subcommand. camcontrol/camcontrol.h: Add a function prototype for scsiattrib(). share/man/man9/sbuf.9: Document the existence of sbuf_hexdump() and point users to the hexdump(3) man page for more details. sys/cam/scsi/scsi_all.c: Add a table of known attributes, text descriptions and handler functions. Add a new scsi_attrib_sbuf() function along with a number of other related functions that help decode attributes. scsi_attrib_ascii_sbuf() decodes ASCII format attributes. scsi_attrib_int_sbuf() decodes binary format attributes, and will pass them off to scsi_attrib_hexdump_sbuf() if they're bigger than 8 bytes. scsi_attrib_vendser_sbuf() decodes the vendor and drive serial number attribute. scsi_attrib_volcoh_sbuf() decodes the Volume Coherency Information attribute that LTFS writes out. sys/cam/scsi/scsi_all.h: Add a number of attribute-related structure definitions and other defines. Add function prototypes for all of the functions added in scsi_all.c. sys/kern/subr_prf.c: Add a new function, sbuf_hexdump(). This is the same as the existing hexdump(9) function, except that it puts the result in an sbuf. This also changes subr_prf.c so that it can be compiled in userland for includsion in libsbuf. We should work to change this so that the kernel hexdump implementation is a wrapper around sbuf_hexdump() with a statically allocated sbuf with a drain. That will require a drain function that goes to the kernel printf() buffer that can take a non-NUL terminated string as input. That is because an sbuf isn't NUL-terminated until it is finished, and we don't want to finish it while we're still using it. We should also work to consolidate the userland hexdump and kernel hexdump implemenatations, which are currently separate. This would also mean making applications that currently link in libutil link in libsbuf. sys/sys/sbuf.h: Add the prototype for sbuf_hexdump(), and add another copy of the hexdump flag values if they aren't already defined. Ideally the flags should be defined in one place but the implemenation makes it difficult to do properly. (See above.) Sponsored by: Spectra Logic Corporation MFC after: 1 week Added: head/sbin/camcontrol/attrib.c (contents, props changed) Modified: head/lib/libsbuf/Makefile head/lib/libsbuf/Symbol.map head/lib/libsbuf/Version.def head/lib/libutil/hexdump.3 head/sbin/camcontrol/Makefile head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c head/sbin/camcontrol/camcontrol.h head/share/man/man9/sbuf.9 head/sys/cam/cam.c head/sys/cam/cam.h head/sys/cam/scsi/scsi_all.c head/sys/cam/scsi/scsi_all.h head/sys/kern/subr_prf.c head/sys/sys/sbuf.h Modified: head/lib/libsbuf/Makefile ============================================================================== --- head/lib/libsbuf/Makefile Tue Jun 9 19:41:16 2015 (r284191) +++ head/lib/libsbuf/Makefile Tue Jun 9 21:39:38 2015 (r284192) @@ -2,7 +2,7 @@ LIB= sbuf SHLIBDIR?= /lib -SRCS= subr_sbuf.c +SRCS= subr_prf.c subr_sbuf.c SHLIB_MAJOR = 6 Modified: head/lib/libsbuf/Symbol.map ============================================================================== --- head/lib/libsbuf/Symbol.map Tue Jun 9 19:41:16 2015 (r284191) +++ head/lib/libsbuf/Symbol.map Tue Jun 9 21:39:38 2015 (r284192) @@ -27,3 +27,7 @@ FBSD_1.3 { sbuf_start_section; sbuf_end_section; }; + +FBSD_1.4 { + sbuf_hexdump; +}; Modified: head/lib/libsbuf/Version.def ============================================================================== --- head/lib/libsbuf/Version.def Tue Jun 9 19:41:16 2015 (r284191) +++ head/lib/libsbuf/Version.def Tue Jun 9 21:39:38 2015 (r284192) @@ -5,3 +5,6 @@ FBSD_1.2 { FBSD_1.3 { } FBSD_1.2; + +FBSD_1.4 { +} FBSD_1.3; Modified: head/lib/libutil/hexdump.3 ============================================================================== --- head/lib/libutil/hexdump.3 Tue Jun 9 19:41:16 2015 (r284191) +++ head/lib/libutil/hexdump.3 Tue Jun 9 21:39:38 2015 (r284192) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2008 +.Dd May 8, 2014 .Dt HEXDUMP 3 .Os .Sh NAME @@ -36,8 +36,17 @@ .Nd "dump a block of bytes to standard out in hexadecimal form" .Sh SYNOPSIS .In libutil.h +.In sys/sbuf.h .Ft void .Fn hexdump "void *ptr" "int length" "const char *hdr" "int flags" +.Ft void +.Fo sbuf_hexdump +.Fa "struct sbuf *sb" +.Fa "void *ptr" +.Fa "int length" +.Fa "const char *hdr" +.Fa "int flags" +.Fc .Sh DESCRIPTION The .Fn hexdump @@ -50,6 +59,11 @@ output will start with an offset count, followed by 16 .Tn ASCII characters. +.Pp +The +.Fn sbuf_hexdump +function prints the hexdump to the supplied +.Xr sbuf 9 . .Bl -tag -width indent .It Fa ptr Pointer to the array of bytes to print. @@ -88,7 +102,8 @@ Do not print the character values on eac .El .El .Sh SEE ALSO -.Xr ascii 7 +.Xr ascii 7 , +.Xr sbuf 9 .Sh AUTHORS This manual page was written by .An Scott Long . Modified: head/sbin/camcontrol/Makefile ============================================================================== --- head/sbin/camcontrol/Makefile Tue Jun 9 19:41:16 2015 (r284191) +++ head/sbin/camcontrol/Makefile Tue Jun 9 21:39:38 2015 (r284192) @@ -3,7 +3,7 @@ PROG= camcontrol SRCS= camcontrol.c util.c .if !defined(RELEASE_CRUNCH) -SRCS+= fwdownload.c modeedit.c persist.c progress.c +SRCS+= attrib.c fwdownload.c modeedit.c persist.c progress.c .else CFLAGS+= -DMINIMALISTIC .endif Added: head/sbin/camcontrol/attrib.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/camcontrol/attrib.c Tue Jun 9 21:39:38 2015 (r284192) @@ -0,0 +1,509 @@ +/*- + * Copyright (c) 2014 Spectra Logic Corporation + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + * + * Authors: Ken Merry (Spectra Logic Corporation) + */ +/* + * SCSI Read and Write Attribute support for camcontrol(8). + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include "camcontrol.h" + +#if 0 +struct scsi_attr_desc { + int attr_id; + + STAILQ_ENTRY(scsi_attr_desc) links; +}; +#endif + +static struct scsi_nv elem_type_map[] = { + { "all", ELEMENT_TYPE_ALL }, + { "picker", ELEMENT_TYPE_MT }, + { "slot", ELEMENT_TYPE_ST }, + { "portal", ELEMENT_TYPE_IE }, + { "drive", ELEMENT_TYPE_DT }, +}; + +static struct scsi_nv sa_map[] = { + { "attr_values", SRA_SA_ATTR_VALUES }, + { "attr_list", SRA_SA_ATTR_LIST }, + { "lv_list", SRA_SA_LOG_VOL_LIST }, + { "part_list", SRA_SA_PART_LIST }, + { "supp_attr", SRA_SA_SUPPORTED_ATTRS } +}; + +static struct scsi_nv output_format_map[] = { + { "text_esc", SCSI_ATTR_OUTPUT_TEXT_ESC }, + { "text_raw", SCSI_ATTR_OUTPUT_TEXT_RAW }, + { "nonascii_esc", SCSI_ATTR_OUTPUT_NONASCII_ESC }, + { "nonascii_trim", SCSI_ATTR_OUTPUT_NONASCII_TRIM }, + { "nonascii_raw", SCSI_ATTR_OUTPUT_NONASCII_RAW }, + { "field_all", SCSI_ATTR_OUTPUT_FIELD_ALL }, + { "field_none", SCSI_ATTR_OUTPUT_FIELD_NONE }, + { "field_desc", SCSI_ATTR_OUTPUT_FIELD_DESC }, + { "field_num", SCSI_ATTR_OUTPUT_FIELD_NUM }, + { "field_size", SCSI_ATTR_OUTPUT_FIELD_SIZE }, + { "field_rw", SCSI_ATTR_OUTPUT_FIELD_RW }, +}; + +int +scsiattrib(struct cam_device *device, int argc, char **argv, char *combinedopt, + int retry_count, int timeout, int verbosemode, int err_recover) +{ + union ccb *ccb = NULL; + int attr_num = -1; +#if 0 + int num_attrs = 0; +#endif + int start_attr = 0; + int cached_attr = 0; + int read_service_action = -1; + int read_attr = 0, write_attr = 0; + int element_address = 0; + int element_type = ELEMENT_TYPE_ALL; + int partition = 0; + int logical_volume = 0; + char *endptr; + uint8_t *data_buf = NULL; + uint32_t dxfer_len = UINT16_MAX - 1; + uint32_t valid_len; + uint32_t output_format; + STAILQ_HEAD(, scsi_attr_desc) write_attr_list; + int error = 0; + int c; + + ccb = cam_getccb(device); + if (ccb == NULL) { + warnx("%s: error allocating CCB", __func__); + error = 1; + goto bailout; + } + + bzero(&(&ccb->ccb_h)[1], + sizeof(union ccb) - sizeof(struct ccb_hdr)); + + STAILQ_INIT(&write_attr_list); + + /* + * By default, when displaying attribute values, we trim out + * non-ASCII characters in ASCII fields. We display all fields + * (description, attribute number, attribute size, and readonly + * status). We default to displaying raw text. + * + * XXX KDM need to port this to stable/10 and newer FreeBSD + * versions that have iconv built in and can convert codesets. + */ + output_format = SCSI_ATTR_OUTPUT_NONASCII_TRIM | + SCSI_ATTR_OUTPUT_FIELD_ALL | + SCSI_ATTR_OUTPUT_TEXT_RAW; + + data_buf = malloc(dxfer_len); + if (data_buf == NULL) { + warn("%s: error allocating %u bytes", __func__, dxfer_len); + error = 1; + goto bailout; + } + + while ((c = getopt(argc, argv, combinedopt)) != -1) { + switch (c) { + case 'a': + attr_num = strtol(optarg, &endptr, 0); + if (*endptr != '\0') { + warnx("%s: invalid attribute number %s", + __func__, optarg); + error = 1; + goto bailout; + } + start_attr = attr_num; + break; + case 'c': + cached_attr = 1; + break; + case 'e': + element_address = strtol(optarg, &endptr, 0); + if (*endptr != '\0') { + warnx("%s: invalid element address %s", + __func__, optarg); + error = 1; + goto bailout; + } + break; + case 'F': { + scsi_nv_status status; + scsi_attrib_output_flags new_outflags; + int entry_num = 0; + char *tmpstr; + + if (isdigit(optarg[0])) { + output_format = strtoul(optarg, &endptr, 0); + if (*endptr != '\0') { + warnx("%s: invalid numeric output " + "format argument %s", __func__, + optarg); + error = 1; + goto bailout; + } + break; + } + new_outflags = SCSI_ATTR_OUTPUT_NONE; + + while ((tmpstr = strsep(&optarg, ",")) != NULL) { + status = scsi_get_nv(output_format_map, + sizeof(output_format_map) / + sizeof(output_format_map[0]), tmpstr, + &entry_num, SCSI_NV_FLAG_IG_CASE); + + if (status == SCSI_NV_FOUND) + new_outflags |= + output_format_map[entry_num].value; + else { + warnx("%s: %s format option %s", + __func__, + (status == SCSI_NV_AMBIGUOUS) ? + "ambiguous" : "invalid", tmpstr); + error = 1; + goto bailout; + } + } + output_format = new_outflags; + break; + } + case 'p': + partition = strtol(optarg, &endptr, 0); + if (*endptr != '\0') { + warnx("%s: invalid partition number %s", + __func__, optarg); + error = 1; + goto bailout; + } + break; + case 'r': { + scsi_nv_status status; + int entry_num = 0; + + status = scsi_get_nv(sa_map, sizeof(sa_map) / + sizeof(sa_map[0]), optarg, &entry_num, + SCSI_NV_FLAG_IG_CASE); + if (status == SCSI_NV_FOUND) + read_service_action = sa_map[entry_num].value; + else { + warnx("%s: %s %s option %s", __func__, + (status == SCSI_NV_AMBIGUOUS) ? + "ambiguous" : "invalid", "service action", + optarg); + error = 1; + goto bailout; + } + read_attr = 1; + break; + } + case 's': + start_attr = strtol(optarg, &endptr, 0); + if (*endptr != '\0') { + warnx("%s: invalid starting attr argument %s", + __func__, optarg); + error = 1; + goto bailout; + } + break; + case 'T': { + scsi_nv_status status; + int entry_num = 0; + + status = scsi_get_nv(elem_type_map, + sizeof(elem_type_map) / sizeof(elem_type_map[0]), + optarg, &entry_num, SCSI_NV_FLAG_IG_CASE); + if (status == SCSI_NV_FOUND) + element_type = elem_type_map[entry_num].value; + else { + warnx("%s: %s %s option %s", __func__, + (status == SCSI_NV_AMBIGUOUS) ? + "ambiguous" : "invalid", "element type", + optarg); + error = 1; + goto bailout; + } + break; + } + case 'w': + warnx("%s: writing attributes is not implemented yet", + __func__); + error = 1; + goto bailout; + break; + case 'V': + logical_volume = strtol(optarg, &endptr, 0); + + if (*endptr != '\0') { + warnx("%s: invalid logical volume argument %s", + __func__, optarg); + error = 1; + goto bailout; + } + break; + default: + break; + } + } + + /* + * Default to reading attributes + */ + if (((read_attr == 0) && (write_attr == 0)) + || ((read_attr != 0) && (write_attr != 0))) { + warnx("%s: Must specify either -r or -w", __func__); + error = 1; + goto bailout; + } + + if (read_attr != 0) { + scsi_read_attribute(&ccb->csio, + /*retries*/ retry_count, + /*cbfcnp*/ NULL, + /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*service_action*/ read_service_action, + /*element*/ element_address, + /*elem_type*/ element_type, + /*logical_volume*/ logical_volume, + /*partition*/ partition, + /*first_attribute*/ start_attr, + /*cache*/ cached_attr, + /*data_ptr*/ data_buf, + /*length*/ dxfer_len, + /*sense_len*/ SSD_FULL_SIZE, + /*timeout*/ timeout ? timeout : 60000); +#if 0 + } else { +#endif + + } + + ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; + + if (err_recover != 0) + ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; + + if (cam_send_ccb(device, ccb) < 0) { + warn("error sending %s ATTRIBUTE", (read_attr != 0) ? + "READ" : "WRITE"); + + if (verbosemode != 0) { + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + } + + error = 1; + goto bailout; + } + + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + if (verbosemode != 0) { + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + } + error = 1; + goto bailout; + } + + if (read_attr == 0) + goto bailout; + + valid_len = dxfer_len - ccb->csio.resid; + + switch (read_service_action) { + case SRA_SA_ATTR_VALUES: { + uint32_t len_left, hdr_len, cur_len; + struct scsi_read_attribute_values *hdr; + struct scsi_mam_attribute_header *cur_id; + char error_str[512]; + uint8_t *cur_pos; + struct sbuf *sb; + + hdr = (struct scsi_read_attribute_values *)data_buf; + + if (valid_len < sizeof(*hdr)) { + fprintf(stdout, "No attributes returned.\n"); + error = 0; + goto bailout; + } + + sb = sbuf_new_auto(); + if (sb == NULL) { + warn("%s: Unable to allocate sbuf", __func__); + error = 1; + goto bailout; + } + /* + * XXX KDM grab more data if it is available. + */ + hdr_len = scsi_4btoul(hdr->length); + + for (len_left = MIN(valid_len, hdr_len), + cur_pos = &hdr->attribute_0[0]; len_left > sizeof(*cur_id); + len_left -= cur_len, cur_pos += cur_len) { + int cur_attr_num; + cur_id = (struct scsi_mam_attribute_header *)cur_pos; + cur_len = scsi_2btoul(cur_id->length) + sizeof(*cur_id); + cur_attr_num = scsi_2btoul(cur_id->id); + + if ((attr_num != -1) + && (cur_attr_num != attr_num)) + continue; + + error = scsi_attrib_sbuf(sb, cur_id, len_left, + /*user_table*/ NULL, /*num_user_entries*/ 0, + /*prefer_user_table*/ 0, output_format, error_str, + sizeof(error_str)); + if (error != 0) { + warnx("%s: %s", __func__, error_str); + sbuf_delete(sb); + error = 1; + goto bailout; + } + if (attr_num != -1) + break; + } + + sbuf_finish(sb); + fprintf(stdout, "%s", sbuf_data(sb)); + sbuf_delete(sb); + break; + } + case SRA_SA_SUPPORTED_ATTRS: + case SRA_SA_ATTR_LIST: { + uint32_t len_left, hdr_len; + struct scsi_attrib_list_header *hdr; + struct scsi_attrib_table_entry *entry = NULL; + const char *sa_name = "Supported Attributes"; + const char *at_name = "Available Attributes"; + int attr_id; + uint8_t *cur_id; + + hdr = (struct scsi_attrib_list_header *)data_buf; + if (valid_len < sizeof(*hdr)) { + fprintf(stdout, "No %s\n", + (read_service_action == SRA_SA_SUPPORTED_ATTRS)? + sa_name : at_name); + error = 0; + goto bailout; + } + fprintf(stdout, "%s:\n", + (read_service_action == SRA_SA_SUPPORTED_ATTRS) ? + sa_name : at_name); + hdr_len = scsi_4btoul(hdr->length); + for (len_left = MIN(valid_len, hdr_len), + cur_id = &hdr->first_attr_0[0]; len_left > 1; + len_left -= sizeof(uint16_t), cur_id += sizeof(uint16_t)) { + attr_id = scsi_2btoul(cur_id); + + if ((attr_num != -1) + && (attr_id != attr_num)) + continue; + + entry = scsi_get_attrib_entry(attr_id); + fprintf(stdout, "0x%.4x", attr_id); + if (entry == NULL) + fprintf(stdout, "\n"); + else + fprintf(stdout, ": %s\n", entry->desc); + + if (attr_num != -1) + break; + } + break; + } + case SRA_SA_PART_LIST: + case SRA_SA_LOG_VOL_LIST: { + struct scsi_attrib_lv_list *lv_list; + const char *partition_name = "Partition"; + const char *lv_name = "Logical Volume"; + + if (valid_len < sizeof(*lv_list)) { + fprintf(stdout, "No %s list returned\n", + (read_service_action == SRA_SA_PART_LIST) ? + partition_name : lv_name); + error = 0; + goto bailout; + } + + lv_list = (struct scsi_attrib_lv_list *)data_buf; + + fprintf(stdout, "First %s: %d\n", + (read_service_action == SRA_SA_PART_LIST) ? + partition_name : lv_name, + lv_list->first_lv_number); + fprintf(stdout, "Number of %ss: %d\n", + (read_service_action == SRA_SA_PART_LIST) ? + partition_name : lv_name, + lv_list->num_logical_volumes); + break; + } + default: + break; + } +bailout: + if (ccb != NULL) + cam_freeccb(ccb); + + free(data_buf); + + return (error); +} Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Tue Jun 9 19:41:16 2015 (r284191) +++ head/sbin/camcontrol/camcontrol.8 Tue Jun 9 21:39:38 2015 (r284192) @@ -298,6 +298,19 @@ .Op Fl T Ar res_type .Op Fl U .Nm +.Ic attrib +.Op device id +.Op generic args +.Aq Fl r Ar action | Fl w Ar attrib +.Op Fl a Ar attr_num +.Op Fl c +.Op Fl e Ar elem_addr +.Op Fl F Ar form1,form2 +.Op Fl p Ar part +.Op Fl s Ar start_addr +.Op Fl T Ar elem_type +.Op Fl V Ar lv_num +.Nm .Ic help .Sh DESCRIPTION The @@ -1822,6 +1835,129 @@ Register and Move request. This option only applies to the Register and Move service action of the Persistent Reserve Out command. .El +.It Ic attrib +Issue the +.Tn SCSI +READ or WRITE ATTRIBUTE commands. +These commands are used to read and write attributes in Medium Auxiliary +Memory (MAM). +The most common place Medium Auxiliary Memory is found is small flash chips +included tape cartriges. +For instance, +.Tn LTO +tapes have MAM. +Either the +.Fl r +option or the +.Fl w +option must be specified. +.Bl -tag -width 14n +.It Fl r Ar action +Specify the READ ATTRIBUTE service action. +.Bl -tag -width 11n +.It attr_values +Issue the ATTRIBUTE VALUES service action. +Read and decode the available attributes and their values. +.It attr_list +Issue the ATTRIBUTE LIST service action. +List the attributes that are available to read and write. +.It lv_list +Issue the LOGICAL VOLUME LIST service action. +List the available logical volumes in the MAM. +.It part_list +Issue the PARTITION LIST service action. +List the available partitions in the MAM. +.It supp_attr +Issue the SUPPORTED ATTRIBUTES service action. +List attributes that are supported for reading or writing. +These attributes may or may not be currently present in the MAM. +.El +.It Fl w Ar attr +Specify an attribute to write to the MAM. +This option is not yet implemented. +.It Fl a Ar num +Specify the attribute number to display. +This option only works with the attr_values, attr_list and supp_attr +arguments to +.Fl r . +.It Fl c +Display cached attributes. +If the device supports this flag, it allows displaying attributes for the +last piece of media loaded in the drive. +.It Fl e Ar num +Specify the element address. +This is used for specifying which element number in a medium changer to +access when reading attributes. +The element number could be for a picker, portal, slot or drive. +.It Fl F Ar form1,form2 +Specify the output format for the attribute values (attr_val) display as a +comma separated list of options. +The default output is currently set to field_all,nonascii_trim,text_raw. +Once this code is ported to FreeBSD 10, any text fields will be converted +from their codeset to the user's native codeset with +.Xr iconv 3 . +.Pp +The text options are mutually exclusive; if you specify more than one, you +will get unpredictable results. +The nonascii options are also mutually exclusive. +Most of the field options may be logically ORed together. +.Bl -tag -width 12n +.It text_esc +Print text fields with non-ASCII characters escaped. +.It text_raw +Print text fields natively, with no codeset conversion. +.It nonascii_esc +If any non-ASCII characters occur in fields that are supposed to be ASCII, +escape the non-ASCII characters. +.It nonascii_trim +If any non-ASCII characters occur in fields that are supposed to be ASCII, +omit the non-ASCII characters. +.It nonascii_raw +If any non-ASCII characters occur in fields that are supposed to be ASCII, +print them as they are. +.It field_all +Print all of the prefix fields: description, attribute number, attribute +size, and the attribute's readonly status. +If field_all is specified, specifying any other field options will not have +an effect. +.It field_none +Print none of the prefix fields, and only print out the attribute value. +If field_none is specified, specifying any other field options will result +in those fields being printed. +.It field_desc +Print out the attribute description. +.It field_num +Print out the attribute number. +.It field_size +Print out the attribute size. +.It field_rw +Print out the attribute's readonly status. +.El +.It Fl p Ar part +Specify the partition. +When the media has multiple partitions, specifying different partition +numbers allows seeing the values for each individual partition. +.It Fl s Ar start_num +Specify the starting attribute number. +This requests that the target device return attribute information starting +at the given number. +.It Fl T Ar elem_type +Specify the element type. +For medium changer devices, this allows specifying the type the element +referenced in the element address ( +.Fl e ) . +Valid types are: +.Dq all , +.Dq picker , +.Dq slot , +.Dq portal , +and +.Dq drive . +.El +.It Fl V Ar vol_num +Specify the number of the logical volume to operate on. +If the media has multiple logical volumes, this will allow displaying +or writing attributes on the given logical volume. .It Ic help Print out verbose usage information. .El @@ -2047,6 +2183,15 @@ current initiator will be unregistered f The reservation will be moved to relative target port 2 on the target device. The registration will persist across power losses. +.Pp +.Bd -literal -offset indent +camcontrol attrib sa0 -v -i attr_values -p 1 +.Ed +.Pp +This will read and decode the attribute values from partition 1 on the tape +in tape drive sa0, and will display any +.Tn SCSI +errors that result. .Sh SEE ALSO .Xr cam 3 , .Xr cam_cdbparse 3 , Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Tue Jun 9 19:41:16 2015 (r284191) +++ head/sbin/camcontrol/camcontrol.c Tue Jun 9 21:39:38 2015 (r284192) @@ -98,7 +98,8 @@ typedef enum { CAM_CMD_SANITIZE = 0x0000001f, CAM_CMD_PERSIST = 0x00000020, CAM_CMD_APM = 0x00000021, - CAM_CMD_AAM = 0x00000022 + CAM_CMD_AAM = 0x00000022, + CAM_CMD_ATTRIB = 0x00000023 } cam_cmdmask; typedef enum { @@ -224,6 +225,7 @@ static struct camcontrol_opts option_tab {"security", CAM_CMD_SECURITY, CAM_ARG_NONE, "d:e:fh:k:l:qs:T:U:y"}, {"hpa", CAM_CMD_HPA, CAM_ARG_NONE, "Pflp:qs:U:y"}, {"persist", CAM_CMD_PERSIST, CAM_ARG_NONE, "ai:I:k:K:o:ps:ST:U"}, + {"attrib", CAM_CMD_ATTRIB, CAM_ARG_NONE, "a:ce:F:p:r:s:T:w:V:"}, #endif /* MINIMALISTIC */ {"help", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, {"-?", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, @@ -8117,6 +8119,9 @@ usage(int printlong) " camcontrol persist [dev_id][generic args] <-i action|-o action>\n" " [-a][-I tid][-k key][-K sa_key][-p][-R rtp]\n" " [-s scope][-S][-T type][-U]\n" +" camcontrol attrib [dev_id][generic args] <-r action|-w attr>\n" +" [-a attr_num][-c][-e elem][-F form1,form1]\n" +" [-p part][-s start][-T type][-V vol]\n" #endif /* MINIMALISTIC */ " camcontrol help\n"); if (!printlong) @@ -8156,6 +8161,7 @@ usage(int printlong) "fwdownload program firmware of the named device with the given image\n" "security report or send ATA security commands to the named device\n" "persist send the SCSI PERSISTENT RESERVE IN or OUT commands\n" +"attrib send the SCSI READ or WRITE ATTRIBUTE commands\n" "help this message\n" "Device Identifiers:\n" "bus:target specify the bus and target, lun defaults to 0\n" @@ -8306,6 +8312,20 @@ usage(int printlong) "-T res_type specify the reservation type: read_shared, wr_ex, rd_ex,\n" " ex_ac, wr_ex_ro, ex_ac_ro, wr_ex_ar, ex_ac_ar\n" "-U unregister the current initiator for register_move\n" +"attrib arguments:\n" +"-r action specify attr_values, attr_list, lv_list, part_list, or\n" +" supp_attr\n" +"-w attr specify an attribute to write, one -w argument per attr\n" +"-a attr_num only display this attribute number\n" +"-c get cached attributes\n" +"-e elem_addr request attributes for the given element in a changer\n" +"-F form1,form2 output format, comma separated list: text_esc, text_raw,\n" +" nonascii_esc, nonascii_trim, nonascii_raw, field_all,\n" +" field_none, field_desc, field_num, field_size, field_rw\n" +"-p partition request attributes for the given partition\n" +"-s start_attr request attributes starting at the given number\n" +"-T elem_type specify the element type (used with -e)\n" +"-V logical_vol specify the logical volume ID\n" ); #endif /* MINIMALISTIC */ } @@ -8650,6 +8670,11 @@ main(int argc, char **argv) retry_count, timeout, arglist & CAM_ARG_VERBOSE, arglist & CAM_ARG_ERR_RECOVER); break; + case CAM_CMD_ATTRIB: + error = scsiattrib(cam_dev, argc, argv, combinedopt, + retry_count, timeout, arglist & CAM_ARG_VERBOSE, + arglist & CAM_ARG_ERR_RECOVER); + break; #endif /* MINIMALISTIC */ case CAM_CMD_USAGE: usage(1); Modified: head/sbin/camcontrol/camcontrol.h ============================================================================== --- head/sbin/camcontrol/camcontrol.h Tue Jun 9 19:41:16 2015 (r284191) +++ head/sbin/camcontrol/camcontrol.h Tue Jun 9 21:39:38 2015 (r284192) @@ -66,6 +66,9 @@ int scsidoinquiry(struct cam_device *dev int scsipersist(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout, int verbose, int err_recover); +int scsiattrib(struct cam_device *device, int argc, char **argv, + char *combinedopt, int retry_count, int timeout, int verbose, + int err_recover); char *cget(void *hook, char *name); int iget(void *hook, char *name); void arg_put(void *hook, int letter, void *arg, int count, char *name); Modified: head/share/man/man9/sbuf.9 ============================================================================== --- head/share/man/man9/sbuf.9 Tue Jun 9 19:41:16 2015 (r284191) +++ head/share/man/man9/sbuf.9 Tue Jun 9 21:39:38 2015 (r284192) @@ -56,7 +56,8 @@ .Nm sbuf_done , .Nm sbuf_delete , .Nm sbuf_start_section , -.Nm sbuf_end_section +.Nm sbuf_end_section , +.Nm sbuf_hexdump .Nd safe string composition .Sh SYNOPSIS .In sys/types.h @@ -115,6 +116,14 @@ .Fn sbuf_start_section "struct sbuf *s" "ssize_t *old_lenp" .Ft ssize_t .Fn sbuf_end_section "struct sbuf *s" "ssize_t old_len" "size_t pad" "int c" +.Ft void +.Fo sbuf_hexdump +.Fa "struct sbuf *sb" +.Fa "void *ptr" +.Fa "int length" +.Fa "const char *hdr" +.Fa "int flags" +.Fc .In sys/sysctl.h .Ft struct sbuf * .Fn sbuf_new_for_sysctl "struct sbuf *s" "char *buf" "int length" "struct sysctl_req *req" @@ -455,6 +464,14 @@ and \-1 can be specified for and .Fa old_len respectively. +.Pp +The +.Fn sbuf_hexdump +function prints an array of bytes to the supplied sbuf, along with an ASCII +representation of the bytes if possible. +See the +.Xr hexdump 3 +man page for more details on the interface. .Sh NOTES If an operation caused an .Fa sbuf @@ -558,6 +575,7 @@ transmit_msg(sbuf_data(sb), sbuf_len(sb) sbuf_delete(sb); .Ed .Sh SEE ALSO +.Xr hexdump 3 , .Xr printf 3 , .Xr strcat 3 , .Xr strcpy 3 , Modified: head/sys/cam/cam.c ============================================================================== --- head/sys/cam/cam.c Tue Jun 9 19:41:16 2015 (r284191) +++ head/sys/cam/cam.c Tue Jun 9 21:39:38 2015 (r284192) @@ -157,6 +157,56 @@ cam_strvis(u_int8_t *dst, const u_int8_t *dst = '\0'; } +void +cam_strvis_sbuf(struct sbuf *sb, const u_int8_t *src, int srclen, + uint32_t flags) +{ + + /* Trim leading/trailing spaces, nulls. */ + while (srclen > 0 && src[0] == ' ') + src++, srclen--; + while (srclen > 0 + && (src[srclen-1] == ' ' || src[srclen-1] == '\0')) + srclen--; + + while (srclen > 0) { + if (*src < 0x20 || *src >= 0x80) { + /* SCSI-II Specifies that these should never occur. */ + /* non-printable character */ + switch (flags & CAM_STRVIS_FLAG_NONASCII_MASK) { + case CAM_STRVIS_FLAG_NONASCII_ESC: + sbuf_printf(sb, "\\%c%c%c", + ((*src & 0300) >> 6) + '0', + ((*src & 0070) >> 3) + '0', + ((*src & 0007) >> 0) + '0'); + break; + case CAM_STRVIS_FLAG_NONASCII_RAW: + /* + * If we run into a NUL, just transform it + * into a space. + */ + if (*src != 0x00) + sbuf_putc(sb, *src); + else + sbuf_putc(sb, ' '); + break; + case CAM_STRVIS_FLAG_NONASCII_SPC: + sbuf_putc(sb, ' '); + break; + case CAM_STRVIS_FLAG_NONASCII_TRIM: + default: + break; + } + } else { + /* normal character */ + sbuf_putc(sb, *src); + } + src++; + srclen--; + } +} + + /* * Compare string with pattern, returning 0 on match. * Short pattern matches trailing blanks in name, Modified: head/sys/cam/cam.h ============================================================================== --- head/sys/cam/cam.h Tue Jun 9 19:41:16 2015 (r284191) +++ head/sys/cam/cam.h Tue Jun 9 21:39:38 2015 (r284192) @@ -342,6 +342,15 @@ typedef enum { CAM_EAF_PRINT_RESULT = 0x20 } cam_error_ata_flags; +typedef enum { + CAM_STRVIS_FLAG_NONE = 0x00, + CAM_STRVIS_FLAG_NONASCII_MASK = 0x03, + CAM_STRVIS_FLAG_NONASCII_TRIM = 0x00, + CAM_STRVIS_FLAG_NONASCII_RAW = 0x01, + CAM_STRVIS_FLAG_NONASCII_SPC = 0x02, + CAM_STRVIS_FLAG_NONASCII_ESC = 0x03 +} cam_strvis_flags; + struct cam_status_entry { cam_status status_code; @@ -354,6 +363,7 @@ extern const int num_cam_status_entries; extern int cam_sort_io_queues; #endif union ccb; +struct sbuf; #ifdef SYSCTL_DECL /* from sysctl.h */ SYSCTL_DECL(_kern_cam); @@ -366,6 +376,8 @@ caddr_t cam_quirkmatch(caddr_t target, c int entry_size, cam_quirkmatch_t *comp_func); void cam_strvis(u_int8_t *dst, const u_int8_t *src, int srclen, int dstlen); +void cam_strvis_sbuf(struct sbuf *sb, const u_int8_t *src, int srclen, + uint32_t flags); int cam_strmatch(const u_int8_t *str, const u_int8_t *pattern, int str_len); const struct cam_status_entry* Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Tue Jun 9 19:41:16 2015 (r284191) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 23:13:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBA4CBFD; Tue, 9 Jun 2015 23:13:37 +0000 (UTC) (envelope-from jkim@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9B7413B0; Tue, 9 Jun 2015 23:13:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t59NDbJ3085261; Tue, 9 Jun 2015 23:13:37 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t59NDb3o085260; Tue, 9 Jun 2015 23:13:37 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201506092313.t59NDb3o085260@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 9 Jun 2015 23:13:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284195 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 23:13:38 -0000 Author: jkim Date: Tue Jun 9 23:13:37 2015 New Revision: 284195 URL: https://svnweb.freebsd.org/changeset/base/284195 Log: Check status of AcpiReadBitRegister() calls. Reported by: Coverity CID: 1306132 Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Tue Jun 9 22:13:53 2015 (r284194) +++ head/sys/dev/acpica/acpi_cpu.c Tue Jun 9 23:13:37 2015 (r284195) @@ -1074,6 +1074,7 @@ acpi_cpu_idle(sbintime_t sbt) struct acpi_cx *cx_next; uint64_t cputicks; uint32_t start_time, end_time; + ACPI_STATUS status; int bm_active, cx_next_idx, i, us; /* @@ -1119,8 +1120,8 @@ acpi_cpu_idle(sbintime_t sbt) */ if ((cpu_quirks & CPU_QUIRK_NO_BM_CTRL) == 0 && cx_next_idx > sc->cpu_non_c3) { - AcpiReadBitRegister(ACPI_BITREG_BUS_MASTER_STATUS, &bm_active); - if (bm_active != 0) { + status = AcpiReadBitRegister(ACPI_BITREG_BUS_MASTER_STATUS, &bm_active); + if (ACPI_SUCCESS(status) && bm_active != 0) { AcpiWriteBitRegister(ACPI_BITREG_BUS_MASTER_STATUS, 1); cx_next_idx = sc->cpu_non_c3; } @@ -1285,6 +1286,7 @@ acpi_cpu_quirks_piix4(void) #ifdef __i386__ device_t acpi_dev; uint32_t val; + ACPI_STATUS status; acpi_dev = pci_find_device(PCI_VENDOR_INTEL, PCI_DEVICE_82371AB_3); if (acpi_dev != NULL) { @@ -1323,8 +1325,8 @@ acpi_cpu_quirks_piix4(void) val |= PIIX4_STOP_BREAK_MASK; pci_write_config(acpi_dev, PIIX4_DEVACTB_REG, val, 4); } - AcpiReadBitRegister(ACPI_BITREG_BUS_MASTER_RLD, &val); - if (val) { + status = AcpiReadBitRegister(ACPI_BITREG_BUS_MASTER_RLD, &val); + if (ACPI_SUCCESS(status) && val != 0) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "acpi_cpu: PIIX4: reset BRLD_EN_BM\n")); AcpiWriteBitRegister(ACPI_BITREG_BUS_MASTER_RLD, 0); From owner-svn-src-head@FreeBSD.ORG Tue Jun 9 23:54:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35A9BA08; Tue, 9 Jun 2015 23:54:22 +0000 (UTC) (envelope-from zbb@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1724B1D25; Tue, 9 Jun 2015 23:54:22 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t59NsL0f006117; Tue, 9 Jun 2015 23:54:21 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t59NsLto006114; Tue, 9 Jun 2015 23:54:21 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201506092354.t59NsLto006114@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 9 Jun 2015 23:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284196 - in head/sys/arm64: arm64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 23:54:22 -0000 Author: zbb Date: Tue Jun 9 23:54:20 2015 New Revision: 284196 URL: https://svnweb.freebsd.org/changeset/base/284196 Log: Add options to dmb() and dsb() macros on ARM64 Using plain dsb()/dmb() as full system barriers is usually to much. Adding proper options to those barriers (instead of full system - sy) will most likely reduce the cost of the instructions and will benefit in performance improvement. This commit adds options to barrier macro definitions. Obtained from: Semihalf Reviewed by: andrew, ian Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/db_interface.c head/sys/arm64/arm64/vfp.c head/sys/arm64/include/atomic.h Modified: head/sys/arm64/arm64/db_interface.c ============================================================================== --- head/sys/arm64/arm64/db_interface.c Tue Jun 9 23:13:37 2015 (r284195) +++ head/sys/arm64/arm64/db_interface.c Tue Jun 9 23:54:20 2015 (r284196) @@ -156,13 +156,11 @@ db_write_bytes(vm_offset_t addr, size_t } *dst++ = *data++; } + dsb(ish); - dsb(); /* Clean D-cache and invalidate I-cache */ cpu_dcache_wb_range(addr, (vm_size_t)size); cpu_icache_sync_range(addr, (vm_size_t)size); - dsb(); - isb(); return (0); } Modified: head/sys/arm64/arm64/vfp.c ============================================================================== --- head/sys/arm64/arm64/vfp.c Tue Jun 9 23:13:37 2015 (r284195) +++ head/sys/arm64/arm64/vfp.c Tue Jun 9 23:54:20 2015 (r284196) @@ -120,7 +120,7 @@ vfp_save_state(struct thread *td) td->td_pcb->pcb_fpcr = fpcr; td->td_pcb->pcb_fpsr = fpsr; - dsb(); + dsb(ish); vfp_disable(); } critical_exit(); Modified: head/sys/arm64/include/atomic.h ============================================================================== --- head/sys/arm64/include/atomic.h Tue Jun 9 23:13:37 2015 (r284195) +++ head/sys/arm64/include/atomic.h Tue Jun 9 23:54:20 2015 (r284196) @@ -29,13 +29,29 @@ #ifndef _MACHINE_ATOMIC_H_ #define _MACHINE_ATOMIC_H_ -#define isb() __asm __volatile("isb" : : : "memory") -#define dsb() __asm __volatile("dsb sy" : : : "memory") -#define dmb() __asm __volatile("dmb sy" : : : "memory") - -#define mb() dmb() -#define wmb() dmb() -#define rmb() dmb() +#define isb() __asm __volatile("isb" : : : "memory") + +/* + * Options for DMB and DSB: + * oshld Outer Shareable, load + * oshst Outer Shareable, store + * osh Outer Shareable, all + * nshld Non-shareable, load + * nshst Non-shareable, store + * nsh Non-shareable, all + * ishld Inner Shareable, load + * ishst Inner Shareable, store + * ish Inner Shareable, all + * ld Full system, load + * st Full system, store + * sy Full system, all + */ +#define dsb(opt) __asm __volatile("dsb " __STRING(opt) : : : "memory") +#define dmb(opt) __asm __volatile("dmb " __STRING(opt) : : : "memory") + +#define mb() dmb(sy) /* Full system memory barrier all */ +#define wmb() dmb(st) /* Full system memory barrier store */ +#define rmb() dmb(ld) /* Full system memory barrier load */ static __inline void atomic_add_32(volatile uint32_t *p, uint32_t val) From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 01:27:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8C63F47; Wed, 10 Jun 2015 01:27:40 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9652E1227; Wed, 10 Jun 2015 01:27:40 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5A1RehG051972; Wed, 10 Jun 2015 01:27:40 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5A1RdX6051959; Wed, 10 Jun 2015 01:27:39 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506100127.t5A1RdX6051959@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Wed, 10 Jun 2015 01:27:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284198 - head/bin/ls X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 01:27:40 -0000 Author: marcel Date: Wed Jun 10 01:27:38 2015 New Revision: 284198 URL: https://svnweb.freebsd.org/changeset/base/284198 Log: Convert ls(1) to use libxo(3). Obtained from: Phil Shafer Sponsored by: Juniper Networks, Inc. Modified: head/bin/ls/Makefile head/bin/ls/extern.h head/bin/ls/ls.1 head/bin/ls/ls.c head/bin/ls/print.c head/bin/ls/util.c Modified: head/bin/ls/Makefile ============================================================================== --- head/bin/ls/Makefile Wed Jun 10 01:17:14 2015 (r284197) +++ head/bin/ls/Makefile Wed Jun 10 01:27:38 2015 (r284198) @@ -10,7 +10,7 @@ LIBADD= util .if !defined(RELEASE_CRUNCH) && \ ${MK_LS_COLORS} != no CFLAGS+= -DCOLORLS -LIBADD+= termcapw +LIBADD+= termcapw xo .endif .include Modified: head/bin/ls/extern.h ============================================================================== --- head/bin/ls/extern.h Wed Jun 10 01:17:14 2015 (r284197) +++ head/bin/ls/extern.h Wed Jun 10 01:27:38 2015 (r284198) @@ -45,14 +45,17 @@ int revsizecmp(const FTSENT *, const FT void printcol(const DISPLAY *); void printlong(const DISPLAY *); -int printname(const char *); +int printname(const char *, const char *); void printscol(const DISPLAY *); void printstream(const DISPLAY *); void usage(void); -int prn_normal(const char *); +int prn_normal(const char *, const char *); +char * getname(const char *); size_t len_octal(const char *, int); -int prn_octal(const char *); -int prn_printable(const char *); +int prn_octal(const char *, const char *); +char * get_octal(const char *); +int prn_printable(const char *, const char *); +char * get_printable(const char *); #ifdef COLORLS void parsecolors(const char *cs); void colorquit(int); Modified: head/bin/ls/ls.1 ============================================================================== --- head/bin/ls/ls.1 Wed Jun 10 01:17:14 2015 (r284197) +++ head/bin/ls/ls.1 Wed Jun 10 01:27:38 2015 (r284198) @@ -32,7 +32,7 @@ .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 .\" $FreeBSD$ .\" -.Dd April 4, 2014 +.Dd June 8, 2015 .Dt LS 1 .Os .Sh NAME @@ -40,6 +40,7 @@ .Nd list directory contents .Sh SYNOPSIS .Nm +.Op Fl -libxo .Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1, .Op Fl D Ar format .Op Ar @@ -797,9 +798,11 @@ specification. .Xr getfacl 1 , .Xr sort 1 , .Xr xterm 1 , +.Xr libxo 3 , .Xr localeconv 3 , .Xr strftime 3 , .Xr strmode 3 , +.Xr xo_parse_args 3 , .Xr termcap 5 , .Xr maclabel 7 , .Xr sticky 7 , Modified: head/bin/ls/ls.c ============================================================================== --- head/bin/ls/ls.c Wed Jun 10 01:17:14 2015 (r284197) +++ head/bin/ls/ls.c Wed Jun 10 01:27:38 2015 (r284198) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #endif +#include #include "ls.h" #include "extern.h" @@ -185,6 +186,12 @@ main(int argc, char *argv[]) fts_options = FTS_PHYSICAL; if (getenv("LS_SAMESORT")) f_samesort = 1; + + argc = xo_parse_args(argc, argv); + if (argc < 0) + return (1); + xo_set_flags(NULL, XOF_COLUMNS); + while ((ch = getopt(argc, argv, "1ABCD:FGHILPRSTUWXZabcdfghiklmnopqrstuwxy,")) != -1) { switch (ch) { @@ -381,7 +388,7 @@ main(int argc, char *argv[]) f_color = 1; } #else - warnx("color support not compiled in"); + xo_warnx("color support not compiled in"); #endif /*COLORLS*/ #ifdef COLORLS @@ -479,10 +486,13 @@ main(int argc, char *argv[]) else printfcn = printcol; + xo_open_container("file-information"); if (argc) traverse(argc, argv, fts_options); else traverse(1, dotav, fts_options); + xo_close_container("file-information"); + xo_finish(); exit(rval); } @@ -500,10 +510,11 @@ traverse(int argc, char *argv[], int opt FTS *ftsp; FTSENT *p, *chp; int ch_options; + int first = 1; if ((ftsp = fts_open(argv, options, f_nosort ? NULL : mastercmp)) == NULL) - err(1, "fts_open"); + xo_err(1, "fts_open"); /* * We ignore errors from fts_children here since they will be @@ -525,11 +536,11 @@ traverse(int argc, char *argv[], int opt while ((p = fts_read(ftsp)) != NULL) switch (p->fts_info) { case FTS_DC: - warnx("%s: directory causes a cycle", p->fts_name); + xo_warnx("%s: directory causes a cycle", p->fts_name); break; case FTS_DNR: case FTS_ERR: - warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); + xo_warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; break; case FTS_D: @@ -537,31 +548,40 @@ traverse(int argc, char *argv[], int opt p->fts_name[0] == '.' && !f_listdot) break; + if (first) { + first = 0; + xo_open_list("directory"); + } + xo_open_instance("directory"); + /* * If already output something, put out a newline as * a separator. If multiple arguments, precede each * directory with its name. */ if (output) { - putchar('\n'); - (void)printname(p->fts_path); - puts(":"); + xo_emit("\n"); + (void)printname("path", p->fts_path); + xo_emit(":\n"); } else if (argc > 1) { - (void)printname(p->fts_path); - puts(":"); + (void)printname("path", p->fts_path); + xo_emit(":\n"); output = 1; } chp = fts_children(ftsp, ch_options); display(p, chp, options); + xo_close_instance("directory"); if (!f_recursive && chp != NULL) (void)fts_set(ftsp, p, FTS_SKIP); break; default: break; } + if (!first) + xo_close_list("directory"); if (errno) - err(1, "fts_read"); + xo_err(1, "fts_read"); } /* @@ -608,7 +628,7 @@ display(const FTSENT *p, FTSENT *list, i /* Fill-in "::" as "0:0:0" for the sake of scanf. */ jinitmax = malloc(strlen(initmax) * 2 + 2); if (jinitmax == NULL) - err(1, "malloc"); + xo_err(1, "malloc"); initmax2 = jinitmax; if (*initmax == ':') strcpy(initmax2, "0:"), initmax2 += 2; @@ -679,7 +699,7 @@ display(const FTSENT *p, FTSENT *list, i flags = NULL; for (cur = list, entries = 0; cur; cur = cur->fts_link) { if (cur->fts_info == FTS_ERR || cur->fts_info == FTS_NS) { - warnx("%s: %s", + xo_warnx("%s: %s", cur->fts_name, strerror(cur->fts_errno)); cur->fts_number = NO_PRINT; rval = 1; @@ -745,7 +765,7 @@ display(const FTSENT *p, FTSENT *list, i flags = strdup("-"); } if (flags == NULL) - err(1, "fflagstostr"); + xo_err(1, "fflagstostr"); flen = strlen(flags); if (flen > (size_t)maxflags) maxflags = flen; @@ -759,7 +779,7 @@ display(const FTSENT *p, FTSENT *list, i error = mac_prepare_file_label(&label); if (error == -1) { - warn("MAC label for %s/%s", + xo_warn("MAC label for %s/%s", cur->fts_parent->fts_path, cur->fts_name); goto label_out; @@ -780,7 +800,7 @@ display(const FTSENT *p, FTSENT *list, i error = mac_get_link(name, label); if (error == -1) { - warn("MAC label for %s/%s", + xo_warn("MAC label for %s/%s", cur->fts_parent->fts_path, cur->fts_name); mac_free(label); @@ -790,7 +810,7 @@ display(const FTSENT *p, FTSENT *list, i error = mac_to_text(label, &labelstr); if (error == -1) { - warn("MAC label for %s/%s", + xo_warn("MAC label for %s/%s", cur->fts_parent->fts_path, cur->fts_name); mac_free(label); @@ -808,7 +828,7 @@ label_out: if ((np = malloc(sizeof(NAMES) + labelstrlen + ulen + glen + flen + 4)) == NULL) - err(1, "malloc"); + xo_err(1, "malloc"); np->user = &np->data[0]; (void)strcpy(np->user, user); Modified: head/bin/ls/print.c ============================================================================== --- head/bin/ls/print.c Wed Jun 10 01:17:14 2015 (r284197) +++ head/bin/ls/print.c Wed Jun 10 01:27:38 2015 (r284198) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #endif +#include #include "ls.h" #include "extern.h" @@ -65,9 +66,9 @@ __FBSDID("$FreeBSD$"); static int printaname(const FTSENT *, u_long, u_long); static void printdev(size_t, dev_t); static void printlink(const FTSENT *); -static void printtime(time_t); +static void printtime(const char *, time_t); static int printtype(u_int); -static void printsize(size_t, off_t); +static void printsize(const char *, size_t, off_t); #ifdef COLORLS static void endcolor(int); static int colortype(mode_t); @@ -109,26 +110,46 @@ printscol(const DISPLAY *dp) { FTSENT *p; + xo_open_list("entry"); for (p = dp->list; p; p = p->fts_link) { if (IS_NOPRINT(p)) continue; + xo_open_instance("entry"); (void)printaname(p, dp->s_inode, dp->s_block); - (void)putchar('\n'); + xo_close_instance("entry"); + xo_emit("\n"); } + xo_close_list("entry"); } /* * print name in current style */ int -printname(const char *name) +printname(const char *field, const char *name) +{ + char fmt[BUFSIZ]; + char *s = getname(name); + int rc; + + snprintf(fmt, sizeof(fmt), "{:%s/%%hs}", field); + rc = xo_emit(fmt, s); + free(s); + return rc; +} + +/* + * print name in current style + */ +char * +getname(const char *name) { if (f_octal || f_octal_escape) - return prn_octal(name); + return get_octal(name); else if (f_nonprint) - return prn_printable(name); + return get_printable(name); else - return prn_normal(name); + return strdup(name); } void @@ -144,46 +165,59 @@ printlong(const DISPLAY *dp) if ((dp->list == NULL || dp->list->fts_level != FTS_ROOTLEVEL) && (f_longform || f_size)) { - (void)printf("total %lu\n", howmany(dp->btotal, blocksize)); + xo_emit("{L:total} {:total-blocks/%lu}\n", + howmany(dp->btotal, blocksize)); } + xo_open_list("entry"); for (p = dp->list; p; p = p->fts_link) { + char *name; if (IS_NOPRINT(p)) continue; + xo_open_instance("entry"); sp = p->fts_statp; + name = getname(p->fts_name); + if (name) + xo_emit("{ke:name}", name); if (f_inode) - (void)printf("%*ju ", + xo_emit("{:inode/%*ju} ", dp->s_inode, (uintmax_t)sp->st_ino); if (f_size) - (void)printf("%*jd ", + xo_emit("{:blocks/%*jd} ", dp->s_block, howmany(sp->st_blocks, blocksize)); strmode(sp->st_mode, buf); aclmode(buf, p); np = p->fts_pointer; - (void)printf("%s %*u %-*s %-*s ", buf, dp->s_nlink, - sp->st_nlink, dp->s_user, np->user, dp->s_group, - np->group); + xo_attr("value", "%03o", (int) sp->st_mode & ALLPERMS); + xo_emit("{t:mode/%s} {:links/%*u} {:user/%-*s} {:group/%-*s} ", + buf, dp->s_nlink, sp->st_nlink, + dp->s_user, np->user, dp->s_group, np->group); if (f_flags) - (void)printf("%-*s ", dp->s_flags, np->flags); + xo_emit("{:flags/%-*s} ", dp->s_flags, np->flags); if (f_label) - (void)printf("%-*s ", dp->s_label, np->label); + xo_emit("{:label/%-*s} ", dp->s_label, np->label); if (S_ISCHR(sp->st_mode) || S_ISBLK(sp->st_mode)) printdev(dp->s_size, sp->st_rdev); else - printsize(dp->s_size, sp->st_size); + printsize("size", dp->s_size, sp->st_size); if (f_accesstime) - printtime(sp->st_atime); + printtime("access-time", sp->st_atime); else if (f_birthtime) - printtime(sp->st_birthtime); + printtime("birth-time", sp->st_birthtime); else if (f_statustime) - printtime(sp->st_ctime); + printtime("change-time", sp->st_ctime); else - printtime(sp->st_mtime); + printtime("modify-time", sp->st_mtime); #ifdef COLORLS if (f_color) color_printed = colortype(sp->st_mode); #endif - (void)printname(p->fts_name); + + if (name) { + xo_emit("{dk:name}", name); + free(name); + } + #ifdef COLORLS if (f_color && color_printed) endcolor(0); @@ -192,8 +226,10 @@ printlong(const DISPLAY *dp) (void)printtype(sp->st_mode); if (S_ISLNK(sp->st_mode)) printlink(p); - (void)putchar('\n'); + xo_close_instance("entry"); + xo_emit("\n"); } + xo_close_list("entry"); } void @@ -208,17 +244,17 @@ printstream(const DISPLAY *dp) /* XXX strlen does not take octal escapes into account. */ if (strlen(p->fts_name) + chcnt + (p->fts_link ? 2 : 0) >= (unsigned)termwidth) { - putchar('\n'); + xo_emit("\n"); chcnt = 0; } chcnt += printaname(p, dp->s_inode, dp->s_block); if (p->fts_link) { - printf(", "); + xo_emit(", "); chcnt += 2; } } if (chcnt) - putchar('\n'); + xo_emit("\n"); } void @@ -252,7 +288,7 @@ printcol(const DISPLAY *dp) if (dp->entries > lastentries) { if ((narray = realloc(array, dp->entries * sizeof(FTSENT *))) == NULL) { - warn(NULL); + xo_warn(NULL); printscol(dp); return; } @@ -283,17 +319,21 @@ printcol(const DISPLAY *dp) if ((dp->list == NULL || dp->list->fts_level != FTS_ROOTLEVEL) && (f_longform || f_size)) { - (void)printf("total %lu\n", howmany(dp->btotal, blocksize)); + xo_emit("{L:total} {:total-blocks/%lu}\n", + howmany(dp->btotal, blocksize)); } + xo_open_list("entry"); base = 0; for (row = 0; row < numrows; ++row) { endcol = colwidth; if (!f_sortacross) base = row; for (col = 0, chcnt = 0; col < numcols; ++col) { + xo_open_instance("entry"); chcnt += printaname(array[base], dp->s_inode, dp->s_block); + xo_close_instance("entry"); if (f_sortacross) base++; else @@ -304,13 +344,14 @@ printcol(const DISPLAY *dp) <= endcol) { if (f_sortacross && col + 1 >= numcols) break; - (void)putchar(f_notabs ? ' ' : '\t'); + xo_emit(f_notabs ? " " : "\t"); chcnt = cnt; } endcol += colwidth; } - (void)putchar('\n'); + xo_emit("\n"); } + xo_close_list("entry"); } /* @@ -329,16 +370,16 @@ printaname(const FTSENT *p, u_long inode sp = p->fts_statp; chcnt = 0; if (f_inode) - chcnt += printf("%*ju ", + chcnt += xo_emit("{:inode/%*ju} ", (int)inodefield, (uintmax_t)sp->st_ino); if (f_size) - chcnt += printf("%*jd ", + chcnt += xo_emit("{:size/%*jd} ", (int)sizefield, howmany(sp->st_blocks, blocksize)); #ifdef COLORLS if (f_color) color_printed = colortype(sp->st_mode); #endif - chcnt += printname(p->fts_name); + chcnt += printname("name", p->fts_name); #ifdef COLORLS if (f_color && color_printed) endcolor(0); @@ -354,14 +395,14 @@ printaname(const FTSENT *p, u_long inode static void printdev(size_t width, dev_t dev) { - - (void)printf("%#*jx ", (u_int)width, (uintmax_t)dev); + xo_emit("{:device/%#*jx} ", (u_int)width, (uintmax_t)dev); } static void -printtime(time_t ftime) +printtime(const char *field, time_t ftime) { char longstring[80]; + char fmt[BUFSIZ]; static time_t now = 0; const char *format; static int d_first = -1; @@ -384,8 +425,10 @@ printtime(time_t ftime) /* mmm dd yyyy || dd mmm yyyy */ format = d_first ? "%e %b %Y" : "%b %e %Y"; strftime(longstring, sizeof(longstring), format, localtime(&ftime)); - fputs(longstring, stdout); - fputc(' ', stdout); + + snprintf(fmt, sizeof(fmt), "{:%s/%%s} ", field); + xo_attr("value", "%ld", (long) ftime); + xo_emit(fmt, longstring); } static int @@ -394,7 +437,7 @@ printtype(u_int mode) if (f_slash) { if ((mode & S_IFMT) == S_IFDIR) { - (void)putchar('/'); + xo_emit("{D:\\/}{e:type/directory}"); return (1); } return (0); @@ -402,25 +445,25 @@ printtype(u_int mode) switch (mode & S_IFMT) { case S_IFDIR: - (void)putchar('/'); + xo_emit("{D:/\\/}{e:type/directory}"); return (1); case S_IFIFO: - (void)putchar('|'); + xo_emit("{D:|}{e:type/fifo}"); return (1); case S_IFLNK: - (void)putchar('@'); + xo_emit("{D:@}{e:type/link}"); return (1); case S_IFSOCK: - (void)putchar('='); + xo_emit("{D:=}{e:type/socket}"); return (1); case S_IFWHT: - (void)putchar('%'); + xo_emit("{D:%}{e:type/whiteout}"); return (1); default: break; } if (mode & (S_IXUSR | S_IXGRP | S_IXOTH)) { - (void)putchar('*'); + xo_emit("{D:*}{e:executable/}"); return (1); } return (0); @@ -430,7 +473,7 @@ printtype(u_int mode) static int putch(int c) { - (void)putchar(c); + xo_emit("{D:/%c}", c); return 0; } @@ -539,7 +582,7 @@ parsecolors(const char *cs) if (c[j] >= '0' && c[j] <= '7') { colors[i].num[j] = c[j] - '0'; if (!legacy_warn) { - warnx("LSCOLORS should use " + xo_warnx("LSCOLORS should use " "characters a-h instead of 0-9 (" "see the manual page)"); } @@ -552,7 +595,7 @@ parsecolors(const char *cs) } else if (tolower((unsigned char)c[j]) == 'x') colors[i].num[j] = -1; else { - warnx("invalid character '%c' in LSCOLORS" + xo_warnx("invalid character '%c' in LSCOLORS" " env var", c[j]); colors[i].num[j] = -1; } @@ -584,18 +627,19 @@ printlink(const FTSENT *p) (void)snprintf(name, sizeof(name), "%s/%s", p->fts_parent->fts_accpath, p->fts_name); if ((lnklen = readlink(name, path, sizeof(path) - 1)) == -1) { - (void)fprintf(stderr, "\nls: %s: %s\n", name, strerror(errno)); + xo_error("\nls: %s: %s\n", name, strerror(errno)); return; } path[lnklen] = '\0'; - (void)printf(" -> "); - (void)printname(path); + xo_emit(" -> "); + (void)printname("target", path); } static void -printsize(size_t width, off_t bytes) +printsize(const char *field, size_t width, off_t bytes) { - + char fmt[BUFSIZ]; + if (f_humanval) { /* * Reserve one space before the size and allocate room for @@ -605,13 +649,15 @@ printsize(size_t width, off_t bytes) humanize_number(buf, sizeof(buf), (int64_t)bytes, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); - (void)printf("%*s ", (u_int)width, buf); - } else if (f_thousands) { /* with commas */ + snprintf(fmt, sizeof(fmt), "{:%s/%%%ds} ", field, (int) width); + xo_attr("value", "%jd", (intmax_t) bytes); + xo_emit(fmt, buf); + } else { /* with commas */ /* This format assignment needed to work round gcc bug. */ - const char *format = "%*j'd "; - (void)printf(format, (u_int)width, bytes); - } else - (void)printf("%*jd ", (u_int)width, bytes); + snprintf(fmt, sizeof(fmt), "{:%s/%%%dj%sd} ", + field, (int) width, f_thousands ? "'" : ""); + xo_emit(fmt, (intmax_t) bytes); + } } /* @@ -654,7 +700,7 @@ aclmode(char *buf, const FTSENT *p) type = ACL_TYPE_NFS4; supports_acls = 1; } else if (ret < 0 && errno != EINVAL) { - warn("%s", name); + xo_warn("%s", name); return; } if (supports_acls == 0) { @@ -663,7 +709,7 @@ aclmode(char *buf, const FTSENT *p) type = ACL_TYPE_ACCESS; supports_acls = 1; } else if (ret < 0 && errno != EINVAL) { - warn("%s", name); + xo_warn("%s", name); return; } } @@ -672,12 +718,12 @@ aclmode(char *buf, const FTSENT *p) return; facl = acl_get_link_np(name, type); if (facl == NULL) { - warn("%s", name); + xo_warn("%s", name); return; } if (acl_is_trivial_np(facl, &trivial)) { acl_free(facl); - warn("%s", name); + xo_warn("%s", name); return; } if (!trivial) Modified: head/bin/ls/util.c ============================================================================== --- head/bin/ls/util.c Wed Jun 10 01:17:14 2015 (r284197) +++ head/bin/ls/util.c Wed Jun 10 01:27:38 2015 (r284198) @@ -50,13 +50,19 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "ls.h" #include "extern.h" int -prn_normal(const char *s) +prn_normal(const char *field, const char *s) { + char fmt[_POSIX2_LINE_MAX]; + + snprintf(fmt, sizeof(fmt), "{:%s/%%hs}", field); + return xo_emit(fmt, s); +#if 0 mbstate_t mbs; wchar_t wc; int i, n; @@ -83,43 +89,47 @@ prn_normal(const char *s) n += wcwidth(wc); } return (n); +#endif } -int -prn_printable(const char *s) +char * +get_printable(const char *s) { mbstate_t mbs; wchar_t wc; int i, n; size_t clen; + int slen = strlen(s); + char *buf = alloca(slen + 1), *bp = buf; memset(&mbs, 0, sizeof(mbs)); n = 0; while ((clen = mbrtowc(&wc, s, MB_LEN_MAX, &mbs)) != 0) { if (clen == (size_t)-1) { - putchar('?'); + *bp++ = '?'; s++; n++; memset(&mbs, 0, sizeof(mbs)); continue; } if (clen == (size_t)-2) { - putchar('?'); + *bp++ = '?'; n++; break; } if (!iswprint(wc)) { - putchar('?'); + *bp++ = '?'; s += clen; n++; continue; } for (i = 0; i < (int)clen; i++) - putchar((unsigned char)s[i]); + *bp++ = (unsigned char)s[i]; s += clen; n += wcwidth(wc); } - return (n); + *bp = '\0'; + return strdup(buf); } /* @@ -165,8 +175,8 @@ len_octal(const char *s, int len) return (r); } -int -prn_octal(const char *s) +char * +get_octal(const char *s) { static const char esc[] = "\\\\\"\"\aa\bb\ff\nn\rr\tt\vv"; const char *p; @@ -175,6 +185,8 @@ prn_octal(const char *s) size_t clen; unsigned char ch; int goodchar, i, len, prtlen; + int slen = strlen(s); + char *buf = alloca(slen * 4 + 1), *bp = buf; memset(&mbs, 0, sizeof(mbs)); len = 0; @@ -182,7 +194,7 @@ prn_octal(const char *s) goodchar = clen != (size_t)-1 && clen != (size_t)-2; if (goodchar && iswprint(wc) && wc != L'\"' && wc != L'\\') { for (i = 0; i < (int)clen; i++) - putchar((unsigned char)s[i]); + *bp++ = (unsigned char)s[i]; len += wcwidth(wc); } else if (goodchar && f_octal_escape && #if WCHAR_MIN < 0 @@ -190,8 +202,8 @@ prn_octal(const char *s) #endif wc <= (wchar_t)UCHAR_MAX && (p = strchr(esc, (char)wc)) != NULL) { - putchar('\\'); - putchar(p[1]); + *bp ++ = '\\'; + *bp++ = p[1]; len += 2; } else { if (goodchar) @@ -202,10 +214,10 @@ prn_octal(const char *s) prtlen = strlen(s); for (i = 0; i < prtlen; i++) { ch = (unsigned char)s[i]; - putchar('\\'); - putchar('0' + (ch >> 6)); - putchar('0' + ((ch >> 3) & 7)); - putchar('0' + (ch & 7)); + *bp++ = '\\'; + *bp++ = '0' + (ch >> 6); + *bp++ = '0' + ((ch >> 3) & 7); + *bp++ = '0' + (ch & 7); len += 4; } } @@ -217,13 +229,15 @@ prn_octal(const char *s) } else s += clen; } - return (len); + + *bp = '\0'; + return strdup(buf); } void usage(void) { - (void)fprintf(stderr, + xo_error( #ifdef COLORLS "usage: ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1,] [-D format]" #else From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 05:17:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA9D66F6; Wed, 10 Jun 2015 05:17:15 +0000 (UTC) (envelope-from alc@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8E41175A; Wed, 10 Jun 2015 05:17:15 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5A5HF3c065478; Wed, 10 Jun 2015 05:17:15 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5A5HFI3065477; Wed, 10 Jun 2015 05:17:15 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201506100517.t5A5HFI3065477@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 10 Jun 2015 05:17:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284207 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 05:17:15 -0000 Author: alc Date: Wed Jun 10 05:17:14 2015 New Revision: 284207 URL: https://svnweb.freebsd.org/changeset/base/284207 Log: Correct a type error in kmem_unback(). Previously, kmem_unback() did not correctly handle deallocation requests of two or more gigabytes in size. Eventually, this would lead to a panic elsewhere in the kernel, such as "vm_radix_insert: key is already present". Reported by: Ilias Marinos MFC after: 1 week Modified: head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Wed Jun 10 04:57:09 2015 (r284206) +++ head/sys/vm/vm_kern.c Wed Jun 10 05:17:14 2015 (r284207) @@ -391,8 +391,7 @@ void kmem_unback(vm_object_t object, vm_offset_t addr, vm_size_t size) { vm_page_t m; - vm_offset_t offset; - int i; + vm_offset_t i, offset; KASSERT(object == kmem_object || object == kernel_object, ("kmem_unback: only supports kernel objects.")); From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 08:14:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EE037A0; Wed, 10 Jun 2015 08:14:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pd0-x236.google.com (mail-pd0-x236.google.com [IPv6:2607:f8b0:400e:c02::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3E011FF; Wed, 10 Jun 2015 08:14:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pdbki1 with SMTP id ki1so32719596pdb.1; Wed, 10 Jun 2015 01:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=7uCbk8jXN9Wh0tm3QfdarD6/kQ92G+sQQdLNrHfNVds=; b=vj0G3Y9Zo/jgRyqTDpErTlkm3wfd/EjJrItmdZkMpLzlxJU5J4a+bswjfzU5bvDugu DDsU9xDChL93LYfUL/XLtvE6an9Ciyw0Lglshamk1UsLvCJ/6CbsmfdIj7uSqMvcm2VU /apEs7mTmLHgJmISJdn7Wbv4+0VgqUGA6adgZ0w04Ezu2IRDcHHIIMTpVGj7DSBkgVKg Lpl12N/jMgfVPQQut/yjPsW+rB+10vI0AO8f60vuuF9G9cybHFi6WaAMEZ8zIqTfqcNV hZ4wotn6O7WliQzJ4l/z5PaRN20ER9thOhOwR6pTZRGRmu8W5ajBYKgRYXEgImM7JZe5 ey8Q== X-Received: by 10.66.101.33 with SMTP id fd1mr3561424pab.111.1433924087776; Wed, 10 Jun 2015 01:14:47 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:98a1:3720:d94d:2c1c? ([2601:8:ab80:7d6:98a1:3720:d94d:2c1c]) by mx.google.com with ESMTPSA id qt4sm7750633pbc.86.2015.06.10.01.14.46 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Jun 2015 01:14:46 -0700 (PDT) Subject: Re: svn commit: r284198 - head/bin/ls Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_CF974147-14DE-4A32-9E25-BF9D629F45F2"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <201506100127.t5A1RdX6051959@svn.freebsd.org> Date: Wed, 10 Jun 2015 01:14:45 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <4A3E8A0F-8D3B-4B3C-AA13-37C2C0889064@gmail.com> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> To: Marcel Moolenaar X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 08:14:48 -0000 --Apple-Mail=_CF974147-14DE-4A32-9E25-BF9D629F45F2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jun 9, 2015, at 18:27, Marcel Moolenaar wrote: > Author: marcel > Date: Wed Jun 10 01:27:38 2015 > New Revision: 284198 > URL: https://svnweb.freebsd.org/changeset/base/284198 >=20 > Log: > Convert ls(1) to use libxo(3). >=20 > Obtained from: Phil Shafer > Sponsored by: Juniper Networks, Inc. >=20 > Modified: > head/bin/ls/Makefile > head/bin/ls/extern.h > head/bin/ls/ls.1 > head/bin/ls/ls.c > head/bin/ls/print.c > head/bin/ls/util.c Hi, This broke the build with libexec/ftpd because the Makefile = doesn=92t reference libxo: = https://jenkins.freebsd.org/job/FreeBSD_HEAD/2847/console . Thanks, -NGie --Apple-Mail=_CF974147-14DE-4A32-9E25-BF9D629F45F2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVd/H1AAoJEMZr5QU6S73eMx8H/R1CQXUtwqGG24DJ66RW3/8w p9bvXsXdABY6IIAP6WadVU+iPmx3ilyPJg2ijTGwGeH+2EQLTtgDmieV9XFb5Iqp oqEc9lxYYGMhLatei7qMdhl1oahjkHhMvLS9Wd/wlP5/b3TyIt6ue1K1jBoayQXb dymdakX7XUFh7sPss3wflv4qV/o5zFuBqtzgNCtI4F2of3frveNgCtCrnFQNn7zJ SwWUkqie6P8obhYvOjkPdu2sH6gsJpfFlb24JJEL/8etkjfFawAL3o9U/QmNNFHr 7wqUhw1Ar8xrWcA0zKJ1yTd6Gy3LfLxME5uMGYr1ATiiQZ4k5ZFhiR9Ar3DpuzA= =Gg6P -----END PGP SIGNATURE----- --Apple-Mail=_CF974147-14DE-4A32-9E25-BF9D629F45F2-- From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 09:34:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0E03A3B; Wed, 10 Jun 2015 09:34:51 +0000 (UTC) (envelope-from mjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF1C4163C; Wed, 10 Jun 2015 09:34:51 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5A9YpGZ093929; Wed, 10 Jun 2015 09:34:51 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5A9YpoN093925; Wed, 10 Jun 2015 09:34:51 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201506100934.t5A9YpoN093925@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 10 Jun 2015 09:34:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284211 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 09:34:52 -0000 Author: mjg Date: Wed Jun 10 09:34:50 2015 New Revision: 284211 URL: https://svnweb.freebsd.org/changeset/base/284211 Log: fd: use atomics to manage fd_refcnt and fd_holcnt This gets rid of fdesc_mtx. Modified: head/sys/kern/kern_descrip.c head/sys/sys/filedesc.h Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Jun 10 05:39:48 2015 (r284210) +++ head/sys/kern/kern_descrip.c Wed Jun 10 09:34:50 2015 (r284211) @@ -1809,8 +1809,8 @@ fdinit(struct filedesc *fdp, bool prepfi /* Create the file descriptor table. */ FILEDESC_LOCK_INIT(newfdp); - newfdp->fd_refcnt = 1; - newfdp->fd_holdcnt = 1; + refcount_init(&newfdp->fd_refcnt, 1); + refcount_init(&newfdp->fd_holdcnt, 1); newfdp->fd_cmask = CMASK; newfdp->fd_map = newfdp0->fd_dmap; newfdp->fd_lastfile = -1; @@ -1852,24 +1852,19 @@ fdhold(struct proc *p) { struct filedesc *fdp; - mtx_lock(&fdesc_mtx); + PROC_LOCK_ASSERT(p, MA_OWNED); fdp = p->p_fd; if (fdp != NULL) - fdp->fd_holdcnt++; - mtx_unlock(&fdesc_mtx); + refcount_acquire(&fdp->fd_holdcnt); return (fdp); } static void fddrop(struct filedesc *fdp) { - int i; if (fdp->fd_holdcnt > 1) { - mtx_lock(&fdesc_mtx); - i = --fdp->fd_holdcnt; - mtx_unlock(&fdesc_mtx); - if (i > 0) + if (refcount_release(&fdp->fd_holdcnt) == 0) return; } @@ -1884,9 +1879,7 @@ struct filedesc * fdshare(struct filedesc *fdp) { - FILEDESC_XLOCK(fdp); - fdp->fd_refcnt++; - FILEDESC_XUNLOCK(fdp); + refcount_acquire(&fdp->fd_refcnt); return (fdp); } @@ -2032,6 +2025,7 @@ retry: void fdescfree(struct thread *td) { + struct proc *p; struct filedesc0 *fdp0; struct filedesc *fdp; struct freetable *ft, *tft; @@ -2040,31 +2034,29 @@ fdescfree(struct thread *td) struct vnode *cdir, *jdir, *rdir; int i; - fdp = td->td_proc->p_fd; + p = td->td_proc; + fdp = p->p_fd; MPASS(fdp != NULL); #ifdef RACCT if (racct_enable) { - PROC_LOCK(td->td_proc); - racct_set(td->td_proc, RACCT_NOFILE, 0); - PROC_UNLOCK(td->td_proc); + PROC_LOCK(p); + racct_set(p, RACCT_NOFILE, 0); + PROC_UNLOCK(p); } #endif if (td->td_proc->p_fdtol != NULL) fdclearlocks(td); - mtx_lock(&fdesc_mtx); - td->td_proc->p_fd = NULL; - mtx_unlock(&fdesc_mtx); + PROC_LOCK(p); + p->p_fd = NULL; + PROC_UNLOCK(p); - FILEDESC_XLOCK(fdp); - i = --fdp->fd_refcnt; - if (i > 0) { - FILEDESC_XUNLOCK(fdp); + if (refcount_release(&fdp->fd_refcnt) == 0) return; - } + FILEDESC_XLOCK(fdp); cdir = fdp->fd_cdir; fdp->fd_cdir = NULL; rdir = fdp->fd_rdir; @@ -2884,7 +2876,9 @@ mountcheckdirs(struct vnode *olddp, stru nrele = 0; sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); fdp = fdhold(p); + PROC_UNLOCK(p); if (fdp == NULL) continue; FILEDESC_XLOCK(fdp); @@ -2979,9 +2973,13 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) n = 0; sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { - if (p->p_state == PRS_NEW) + PROC_LOCK(p); + if (p->p_state == PRS_NEW) { + PROC_UNLOCK(p); continue; + } fdp = fdhold(p); + PROC_UNLOCK(p); if (fdp == NULL) continue; /* overestimates sparse tables. */ @@ -3008,8 +3006,8 @@ sysctl_kern_file(SYSCTL_HANDLER_ARGS) } xf.xf_pid = p->p_pid; xf.xf_uid = p->p_ucred->cr_uid; - PROC_UNLOCK(p); fdp = fdhold(p); + PROC_UNLOCK(p); if (fdp == NULL) continue; FILEDESC_SLOCK(fdp); Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Wed Jun 10 05:39:48 2015 (r284210) +++ head/sys/sys/filedesc.h Wed Jun 10 09:34:50 2015 (r284211) @@ -83,8 +83,8 @@ struct filedesc { int fd_lastfile; /* high-water mark of fd_ofiles */ int fd_freefile; /* approx. next free file */ u_short fd_cmask; /* mask for file creation */ - u_short fd_refcnt; /* thread reference count */ - u_short fd_holdcnt; /* hold count on structure + mutex */ + int fd_refcnt; /* thread reference count */ + int fd_holdcnt; /* hold count on structure + mutex */ struct sx fd_sx; /* protects members of this struct */ struct kqlist fd_kqlist; /* list of kqueues on this filedesc */ int fd_holdleaderscount; /* block fdfree() for shared close() */ From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 09:40:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66A5FCC1; Wed, 10 Jun 2015 09:40:08 +0000 (UTC) (envelope-from mjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 551961726; Wed, 10 Jun 2015 09:40:08 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5A9e8Jl094729; Wed, 10 Jun 2015 09:40:08 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5A9e8BX094728; Wed, 10 Jun 2015 09:40:08 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201506100940.t5A9e8BX094728@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 10 Jun 2015 09:40:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284212 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 09:40:08 -0000 Author: mjg Date: Wed Jun 10 09:40:07 2015 New Revision: 284212 URL: https://svnweb.freebsd.org/changeset/base/284212 Log: fd: remove fdesc_mtx Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Jun 10 09:34:50 2015 (r284211) +++ head/sys/kern/kern_descrip.c Wed Jun 10 09:40:07 2015 (r284212) @@ -178,9 +178,6 @@ volatile int openfiles; /* actual numb struct mtx sigio_lock; /* mtx to protect pointers to sigio */ void (*mq_fdclose)(struct thread *td, int fd, struct file *fp); -/* A mutex to protect the association between a proc and filedesc. */ -static struct mtx fdesc_mtx; - /* * If low >= size, just return low. Otherwise find the first zero bit in the * given bitmap, starting at low and not exceeding size - 1. Return size if @@ -3642,7 +3639,6 @@ filelistinit(void *dummy) filedesc0_zone = uma_zcreate("filedesc0", sizeof(struct filedesc0), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); mtx_init(&sigio_lock, "sigio lock", NULL, MTX_DEF); - mtx_init(&fdesc_mtx, "fdesc", NULL, MTX_DEF); } SYSINIT(select, SI_SUB_LOCK, SI_ORDER_FIRST, filelistinit, NULL); From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 09:59:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD4B8302; Wed, 10 Jun 2015 09:59:27 +0000 (UTC) (envelope-from br@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBCC31B0E; Wed, 10 Jun 2015 09:59:27 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5A9xRvl004902; Wed, 10 Jun 2015 09:59:27 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5A9xR2L004901; Wed, 10 Jun 2015 09:59:27 GMT (envelope-from br@FreeBSD.org) Message-Id: <201506100959.t5A9xR2L004901@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 10 Jun 2015 09:59:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284213 - head/sys/cddl/dev/dtrace/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 09:59:27 -0000 Author: br Date: Wed Jun 10 09:59:26 2015 New Revision: 284213 URL: https://svnweb.freebsd.org/changeset/base/284213 Log: Don't re-define LOCORE when dtrace is built-in to the kernel. Modified: head/sys/cddl/dev/dtrace/arm/dtrace_asm.S Modified: head/sys/cddl/dev/dtrace/arm/dtrace_asm.S ============================================================================== --- head/sys/cddl/dev/dtrace/arm/dtrace_asm.S Wed Jun 10 09:40:07 2015 (r284212) +++ head/sys/cddl/dev/dtrace/arm/dtrace_asm.S Wed Jun 10 09:59:26 2015 (r284213) @@ -28,7 +28,6 @@ #define _ASM #define _LOCORE -#define LOCORE #include #include From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 10:44:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BE0EE0; Wed, 10 Jun 2015 10:44:05 +0000 (UTC) (envelope-from mjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3857A170A; Wed, 10 Jun 2015 10:44:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AAi5w3028809; Wed, 10 Jun 2015 10:44:05 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AAi0fn028782; Wed, 10 Jun 2015 10:44:00 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201506101044.t5AAi0fn028782@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 10 Jun 2015 10:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284214 - in head/sys: amd64/amd64 arm/arm i386/i386 kern powerpc/powerpc sparc64/sparc64 sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 10:44:05 -0000 Author: mjg Date: Wed Jun 10 10:43:59 2015 New Revision: 284214 URL: https://svnweb.freebsd.org/changeset/base/284214 Log: Generalised support for copy-on-write structures shared by threads. Thread credentials are maintained as follows: each thread has a pointer to creds and a reference on them. The pointer is compared with proc's creds on userspace<->kernel boundary and updated if needed. This patch introduces a counter which can be compared instead, so that more structures can use this scheme without adding more comparisons on the boundary. Modified: head/sys/amd64/amd64/trap.c head/sys/arm/arm/trap-v6.c head/sys/arm/arm/trap.c head/sys/i386/i386/trap.c head/sys/kern/init_main.c head/sys/kern/kern_fork.c head/sys/kern/kern_kthread.c head/sys/kern/kern_prot.c head/sys/kern/kern_syscalls.c head/sys/kern/kern_thr.c head/sys/kern/kern_thread.c head/sys/kern/subr_syscall.c head/sys/kern/subr_trap.c head/sys/powerpc/powerpc/trap.c head/sys/sparc64/sparc64/trap.c head/sys/sys/proc.h Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/amd64/amd64/trap.c Wed Jun 10 10:43:59 2015 (r284214) @@ -257,8 +257,8 @@ trap(struct trapframe *frame) td->td_pticks = 0; td->td_frame = frame; addr = frame->tf_rip; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); + if (td->td_cowgen != p->p_cowgen) + thread_cow_update(td); switch (type) { case T_PRIVINFLT: /* privileged instruction fault */ Modified: head/sys/arm/arm/trap-v6.c ============================================================================== --- head/sys/arm/arm/trap-v6.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/arm/arm/trap-v6.c Wed Jun 10 10:43:59 2015 (r284214) @@ -395,8 +395,8 @@ abort_handler(struct trapframe *tf, int p = td->td_proc; if (usermode) { td->td_pticks = 0; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); + if (td->td_cowgen != p->p_cowgen) + thread_cow_update(td); } /* Invoke the appropriate handler, if necessary. */ Modified: head/sys/arm/arm/trap.c ============================================================================== --- head/sys/arm/arm/trap.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/arm/arm/trap.c Wed Jun 10 10:43:59 2015 (r284214) @@ -214,8 +214,8 @@ abort_handler(struct trapframe *tf, int if (user) { td->td_pticks = 0; td->td_frame = tf; - if (td->td_ucred != td->td_proc->p_ucred) - cred_update_thread(td); + if (td->td_cowgen != td->td_proc->p_cowgen) + thread_cow_update(td); } /* Grab the current pcb */ @@ -644,8 +644,8 @@ prefetch_abort_handler(struct trapframe if (TRAP_USERMODE(tf)) { td->td_frame = tf; - if (td->td_ucred != td->td_proc->p_ucred) - cred_update_thread(td); + if (td->td_cowgen != td->td_proc->p_cowgen) + thread_cow_update(td); } fault_pc = tf->tf_pc; if (td->td_md.md_spinlock_count == 0) { Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/i386/i386/trap.c Wed Jun 10 10:43:59 2015 (r284214) @@ -306,8 +306,8 @@ trap(struct trapframe *frame) td->td_pticks = 0; td->td_frame = frame; addr = frame->tf_eip; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); + if (td->td_cowgen != p->p_cowgen) + thread_cow_update(td); switch (type) { case T_PRIVINFLT: /* privileged instruction fault */ Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/kern/init_main.c Wed Jun 10 10:43:59 2015 (r284214) @@ -523,8 +523,6 @@ proc0_init(void *dummy __unused) #ifdef MAC mac_cred_create_swapper(newcred); #endif - td->td_ucred = crhold(newcred); - /* Create sigacts. */ p->p_sigacts = sigacts_alloc(); @@ -556,6 +554,10 @@ proc0_init(void *dummy __unused) p->p_limit->pl_rlimit[RLIMIT_MEMLOCK].rlim_max = pageablemem; p->p_cpulimit = RLIM_INFINITY; + PROC_LOCK(p); + thread_cow_get_proc(td, p); + PROC_UNLOCK(p); + /* Initialize resource accounting structures. */ racct_create(&p->p_racct); @@ -843,10 +845,10 @@ create_init(const void *udata __unused) audit_cred_proc1(newcred); #endif proc_set_cred(initproc, newcred); + cred_update_thread(FIRST_THREAD_IN_PROC(initproc)); PROC_UNLOCK(initproc); sx_xunlock(&proctree_lock); crfree(oldcred); - cred_update_thread(FIRST_THREAD_IN_PROC(initproc)); cpu_set_fork_handler(FIRST_THREAD_IN_PROC(initproc), start_init, NULL); } SYSINIT(init, SI_SUB_CREATE_INIT, SI_ORDER_FIRST, create_init, NULL); Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/kern/kern_fork.c Wed Jun 10 10:43:59 2015 (r284214) @@ -496,7 +496,6 @@ do_fork(struct thread *td, int flags, st p2->p_swtick = ticks; if (p1->p_flag & P_PROFIL) startprofclock(p2); - td2->td_ucred = crhold(p2->p_ucred); if (flags & RFSIGSHARE) { p2->p_sigacts = sigacts_hold(p1->p_sigacts); @@ -526,6 +525,8 @@ do_fork(struct thread *td, int flags, st */ lim_fork(p1, p2); + thread_cow_get_proc(td2, p2); + pstats_fork(p1->p_stats, p2->p_stats); PROC_UNLOCK(p1); Modified: head/sys/kern/kern_kthread.c ============================================================================== --- head/sys/kern/kern_kthread.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/kern/kern_kthread.c Wed Jun 10 10:43:59 2015 (r284214) @@ -289,7 +289,7 @@ kthread_add(void (*func)(void *), void * cpu_set_fork_handler(newtd, func, arg); newtd->td_pflags |= TDP_KTHREAD; - newtd->td_ucred = crhold(p->p_ucred); + thread_cow_get_proc(newtd, p); /* this code almost the same as create_thread() in kern_thr.c */ p->p_flag |= P_HADTHREADS; Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/kern/kern_prot.c Wed Jun 10 10:43:59 2015 (r284214) @@ -1946,9 +1946,8 @@ cred_update_thread(struct thread *td) p = td->td_proc; cred = td->td_ucred; - PROC_LOCK(p); + PROC_LOCK_ASSERT(p, MA_OWNED); td->td_ucred = crhold(p->p_ucred); - PROC_UNLOCK(p); if (cred != NULL) crfree(cred); } @@ -1987,6 +1986,8 @@ proc_set_cred(struct proc *p, struct ucr oldcred = p->p_ucred; p->p_ucred = newcred; + if (newcred != NULL) + PROC_UPDATE_COW(p); return (oldcred); } Modified: head/sys/kern/kern_syscalls.c ============================================================================== --- head/sys/kern/kern_syscalls.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/kern/kern_syscalls.c Wed Jun 10 10:43:59 2015 (r284214) @@ -31,6 +31,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/kern/kern_thr.c Wed Jun 10 10:43:59 2015 (r284214) @@ -220,13 +220,13 @@ create_thread(struct thread *td, mcontex bcopy(&td->td_startcopy, &newtd->td_startcopy, __rangeof(struct thread, td_startcopy, td_endcopy)); newtd->td_proc = td->td_proc; - newtd->td_ucred = crhold(td->td_ucred); + thread_cow_get(newtd, td); if (ctx != NULL) { /* old way to set user context */ error = set_mcontext(newtd, ctx); if (error != 0) { + thread_cow_free(newtd); thread_free(newtd); - crfree(td->td_ucred); goto fail; } } else { @@ -238,8 +238,8 @@ create_thread(struct thread *td, mcontex /* Setup user TLS address and TLS pointer register. */ error = cpu_set_user_tls(newtd, tls_base); if (error != 0) { + thread_cow_free(newtd); thread_free(newtd); - crfree(td->td_ucred); goto fail; } } Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/kern/kern_thread.c Wed Jun 10 10:43:59 2015 (r284214) @@ -327,8 +327,7 @@ thread_reap(void) mtx_unlock_spin(&zombie_lock); while (td_first) { td_next = TAILQ_NEXT(td_first, td_slpq); - if (td_first->td_ucred) - crfree(td_first->td_ucred); + thread_cow_free(td_first); thread_free(td_first); td_first = td_next; } @@ -384,6 +383,44 @@ thread_free(struct thread *td) uma_zfree(thread_zone, td); } +void +thread_cow_get_proc(struct thread *newtd, struct proc *p) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + newtd->td_ucred = crhold(p->p_ucred); + newtd->td_cowgen = p->p_cowgen; +} + +void +thread_cow_get(struct thread *newtd, struct thread *td) +{ + + newtd->td_ucred = crhold(td->td_ucred); + newtd->td_cowgen = td->td_cowgen; +} + +void +thread_cow_free(struct thread *td) +{ + + if (td->td_ucred) + crfree(td->td_ucred); +} + +void +thread_cow_update(struct thread *td) +{ + struct proc *p; + + p = td->td_proc; + PROC_LOCK(p); + if (td->td_ucred != p->p_ucred) + cred_update_thread(td); + td->td_cowgen = p->p_cowgen; + PROC_UNLOCK(p); +} + /* * Discard the current thread and exit from its context. * Always called with scheduler locked. @@ -521,7 +558,7 @@ thread_wait(struct proc *p) cpuset_rel(td->td_cpuset); td->td_cpuset = NULL; cpu_thread_clean(td); - crfree(td->td_ucred); + thread_cow_free(td); thread_reap(); /* check for zombie threads etc. */ } Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/kern/subr_syscall.c Wed Jun 10 10:43:59 2015 (r284214) @@ -61,8 +61,8 @@ syscallenter(struct thread *td, struct s p = td->td_proc; td->td_pticks = 0; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); + if (td->td_cowgen != p->p_cowgen) + thread_cow_update(td); if (p->p_flag & P_TRACED) { traced = 1; PROC_LOCK(p); Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/kern/subr_trap.c Wed Jun 10 10:43:59 2015 (r284214) @@ -220,8 +220,8 @@ ast(struct trapframe *framep) thread_unlock(td); PCPU_INC(cnt.v_trap); - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); + if (td->td_cowgen != p->p_cowgen) + thread_cow_update(td); if (td->td_pflags & TDP_OWEUPC && p->p_flag & P_PROFIL) { addupc_task(td, td->td_profil_addr, td->td_profil_ticks); td->td_profil_ticks = 0; Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/powerpc/powerpc/trap.c Wed Jun 10 10:43:59 2015 (r284214) @@ -196,8 +196,8 @@ trap(struct trapframe *frame) if (user) { td->td_pticks = 0; td->td_frame = frame; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); + if (td->td_cowgen != p->p_cowgen) + thread_cow_update(td); /* User Mode Traps */ switch (type) { Modified: head/sys/sparc64/sparc64/trap.c ============================================================================== --- head/sys/sparc64/sparc64/trap.c Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/sparc64/sparc64/trap.c Wed Jun 10 10:43:59 2015 (r284214) @@ -277,8 +277,8 @@ trap(struct trapframe *tf) td->td_pticks = 0; td->td_frame = tf; addr = tf->tf_tpc; - if (td->td_ucred != p->p_ucred) - cred_update_thread(td); + if (td->td_cowgen != p->p_cowgen) + thread_cow_update(td); switch (tf->tf_type) { case T_DATA_MISS: Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed Jun 10 09:59:26 2015 (r284213) +++ head/sys/sys/proc.h Wed Jun 10 10:43:59 2015 (r284214) @@ -308,6 +308,7 @@ struct thread { off_t tdu_off; } td_uretoff; /* (k) Syscall aux returns. */ #define td_retval td_uretoff.tdu_retval + u_int td_cowgen; /* (k) Generation of COW pointers. */ struct callout td_slpcallout; /* (h) Callout for sleep. */ struct trapframe *td_frame; /* (k) */ struct vm_object *td_kstack_obj;/* (a) Kstack object. */ @@ -533,6 +534,7 @@ struct proc { pid_t p_oppid; /* (c + e) Save ppid in ptrace. XXX */ struct vmspace *p_vmspace; /* (b) Address space. */ u_int p_swtick; /* (c) Tick when swapped in or out. */ + u_int p_cowgen; /* (c) Generation of COW pointers. */ struct itimerval p_realtimer; /* (c) Alarm timer. */ struct rusage p_ru; /* (a) Exit information. */ struct rusage_ext p_rux; /* (cu) Internal resource usage. */ @@ -833,6 +835,11 @@ extern pid_t pid_max; KASSERT((p)->p_lock == 0, ("process held")); \ } while (0) +#define PROC_UPDATE_COW(p) do { \ + PROC_LOCK_ASSERT((p), MA_OWNED); \ + (p)->p_cowgen++; \ +} while (0) + /* Check whether a thread is safe to be swapped out. */ #define thread_safetoswapout(td) ((td)->td_flags & TDF_CANSWAP) @@ -977,6 +984,10 @@ void cpu_thread_swapin(struct thread *); void cpu_thread_swapout(struct thread *); struct thread *thread_alloc(int pages); int thread_alloc_stack(struct thread *, int pages); +void thread_cow_get_proc(struct thread *newtd, struct proc *p); +void thread_cow_get(struct thread *newtd, struct thread *td); +void thread_cow_free(struct thread *td); +void thread_cow_update(struct thread *td); void thread_exit(void) __dead2; void thread_free(struct thread *td); void thread_link(struct thread *td, struct proc *p); From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 10:48:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 069AC298; Wed, 10 Jun 2015 10:48:24 +0000 (UTC) (envelope-from mjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5AC11751; Wed, 10 Jun 2015 10:48:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AAmNQJ029453; Wed, 10 Jun 2015 10:48:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AAmD1O029382; Wed, 10 Jun 2015 10:48:13 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201506101048.t5AAmD1O029382@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 10 Jun 2015 10:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 10:48:24 -0000 Author: mjg Date: Wed Jun 10 10:48:12 2015 New Revision: 284215 URL: https://svnweb.freebsd.org/changeset/base/284215 Log: Implement lockless resource limits. Use the same scheme implemented to manage credentials. Code needing to look at process's credentials (as opposed to thred's) is provided with *_proc variants of relevant functions. Places which possibly had to take the proc lock anyway still use the proc pointer to access limits. Modified: head/sys/amd64/linux32/linux32_machdep.c head/sys/compat/linux/linux_misc.c head/sys/compat/svr4/imgact_svr4.c head/sys/compat/svr4/svr4_misc.c head/sys/compat/svr4/svr4_resource.c head/sys/dev/drm2/i915/i915_gem.c head/sys/fs/fdescfs/fdesc_vfsops.c head/sys/i386/ibcs2/ibcs2_misc.c head/sys/i386/linux/imgact_linux.c head/sys/i386/linux/linux_machdep.c head/sys/kern/imgact_aout.c head/sys/kern/imgact_elf.c head/sys/kern/imgact_gzip.c head/sys/kern/kern_descrip.c head/sys/kern/kern_event.c head/sys/kern/kern_exec.c head/sys/kern/kern_fork.c head/sys/kern/kern_proc.c head/sys/kern/kern_resource.c head/sys/kern/kern_sig.c head/sys/kern/kern_syscalls.c head/sys/kern/kern_thread.c head/sys/kern/subr_uio.c head/sys/kern/sysv_shm.c head/sys/kern/tty_pts.c head/sys/kern/uipc_sockbuf.c head/sys/kern/vfs_vnops.c head/sys/ofed/drivers/infiniband/core/umem.c head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c head/sys/sys/proc.h head/sys/sys/resourcevar.h head/sys/sys/vnode.h head/sys/vm/swap_pager.c head/sys/vm/vm_map.c head/sys/vm/vm_mmap.c head/sys/vm/vm_pageout.c head/sys/vm/vm_unix.c Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/amd64/linux32/linux32_machdep.c Wed Jun 10 10:48:12 2015 (r284215) @@ -615,7 +615,7 @@ linux_mmap_common(struct thread *td, l_u */ PROC_LOCK(p); p->p_vmspace->vm_maxsaddr = (char *)LINUX32_USRSTACK - - lim_cur(p, RLIMIT_STACK); + lim_cur_proc(p, RLIMIT_STACK); PROC_UNLOCK(p); } Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/compat/linux/linux_misc.c Wed Jun 10 10:48:12 2015 (r284215) @@ -383,7 +383,7 @@ linux_uselib(struct thread *td, struct l */ PROC_LOCK(td->td_proc); if (a_out->a_text > maxtsiz || - a_out->a_data + bss_size > lim_cur(td->td_proc, RLIMIT_DATA) || + a_out->a_data + bss_size > lim_cur_proc(td->td_proc, RLIMIT_DATA) || racct_set(td->td_proc, RACCT_DATA, a_out->a_data + bss_size) != 0) { PROC_UNLOCK(td->td_proc); @@ -1420,7 +1420,6 @@ int linux_old_getrlimit(struct thread *td, struct linux_old_getrlimit_args *args) { struct l_rlimit rlim; - struct proc *p = td->td_proc; struct rlimit bsd_rlim; u_int which; @@ -1437,9 +1436,7 @@ linux_old_getrlimit(struct thread *td, s if (which == -1) return (EINVAL); - PROC_LOCK(p); - lim_rlimit(p, which, &bsd_rlim); - PROC_UNLOCK(p); + lim_rlimit(td, which, &bsd_rlim); #ifdef COMPAT_LINUX32 rlim.rlim_cur = (unsigned int)bsd_rlim.rlim_cur; @@ -1464,7 +1461,6 @@ int linux_getrlimit(struct thread *td, struct linux_getrlimit_args *args) { struct l_rlimit rlim; - struct proc *p = td->td_proc; struct rlimit bsd_rlim; u_int which; @@ -1481,9 +1477,7 @@ linux_getrlimit(struct thread *td, struc if (which == -1) return (EINVAL); - PROC_LOCK(p); - lim_rlimit(p, which, &bsd_rlim); - PROC_UNLOCK(p); + lim_rlimit(td, which, &bsd_rlim); rlim.rlim_cur = (l_ulong)bsd_rlim.rlim_cur; rlim.rlim_max = (l_ulong)bsd_rlim.rlim_max; @@ -2204,7 +2198,7 @@ linux_prlimit64(struct thread *td, struc if (args->old != NULL) { PROC_LOCK(p); - lim_rlimit(p, which, &rlim); + lim_rlimit_proc(p, which, &rlim); PROC_UNLOCK(p); if (rlim.rlim_cur == RLIM_INFINITY) lrlim.rlim_cur = LINUX_RLIM_INFINITY; Modified: head/sys/compat/svr4/imgact_svr4.c ============================================================================== --- head/sys/compat/svr4/imgact_svr4.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/compat/svr4/imgact_svr4.c Wed Jun 10 10:48:12 2015 (r284215) @@ -109,7 +109,7 @@ exec_svr4_imgact(imgp) */ PROC_LOCK(imgp->proc); if (a_out->a_text > maxtsiz || - a_out->a_data + bss_size > lim_cur(imgp->proc, RLIMIT_DATA) || + a_out->a_data + bss_size > lim_cur_proc(imgp->proc, RLIMIT_DATA) || racct_set(imgp->proc, RACCT_DATA, a_out->a_data + bss_size) != 0) { PROC_UNLOCK(imgp->proc); return (ENOMEM); Modified: head/sys/compat/svr4/svr4_misc.c ============================================================================== --- head/sys/compat/svr4/svr4_misc.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/compat/svr4/svr4_misc.c Wed Jun 10 10:48:12 2015 (r284215) @@ -910,9 +910,7 @@ svr4_sys_ulimit(td, uap) switch (uap->cmd) { case SVR4_GFILLIM: - PROC_LOCK(td->td_proc); - *retval = lim_cur(td->td_proc, RLIMIT_FSIZE) / 512; - PROC_UNLOCK(td->td_proc); + *retval = lim_cur(td, RLIMIT_FSIZE) / 512; if (*retval == -1) *retval = 0x7fffffff; return 0; @@ -922,17 +920,13 @@ svr4_sys_ulimit(td, uap) struct rlimit krl; krl.rlim_cur = uap->newlimit * 512; - PROC_LOCK(td->td_proc); - krl.rlim_max = lim_max(td->td_proc, RLIMIT_FSIZE); - PROC_UNLOCK(td->td_proc); + krl.rlim_max = lim_max(td, RLIMIT_FSIZE); error = kern_setrlimit(td, RLIMIT_FSIZE, &krl); if (error) return error; - PROC_LOCK(td->td_proc); - *retval = lim_cur(td->td_proc, RLIMIT_FSIZE); - PROC_UNLOCK(td->td_proc); + *retval = lim_cur(td, RLIMIT_FSIZE); if (*retval == -1) *retval = 0x7fffffff; return 0; @@ -943,9 +937,7 @@ svr4_sys_ulimit(td, uap) struct vmspace *vm = td->td_proc->p_vmspace; register_t r; - PROC_LOCK(td->td_proc); - r = lim_cur(td->td_proc, RLIMIT_DATA); - PROC_UNLOCK(td->td_proc); + r = lim_cur(td, RLIMIT_DATA); if (r == -1) r = 0x7fffffff; @@ -957,9 +949,7 @@ svr4_sys_ulimit(td, uap) } case SVR4_GDESLIM: - PROC_LOCK(td->td_proc); - *retval = lim_cur(td->td_proc, RLIMIT_NOFILE); - PROC_UNLOCK(td->td_proc); + *retval = lim_cur(td, RLIMIT_NOFILE); if (*retval == -1) *retval = 0x7fffffff; return 0; Modified: head/sys/compat/svr4/svr4_resource.c ============================================================================== --- head/sys/compat/svr4/svr4_resource.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/compat/svr4/svr4_resource.c Wed Jun 10 10:48:12 2015 (r284215) @@ -130,9 +130,7 @@ svr4_sys_getrlimit(td, uap) if (rl == -1) return EINVAL; - PROC_LOCK(td->td_proc); - lim_rlimit(td->td_proc, rl, &blim); - PROC_UNLOCK(td->td_proc); + lim_rlimit(td, rl, &blim); /* * Our infinity, is their maxfiles. @@ -181,9 +179,7 @@ svr4_sys_setrlimit(td, uap) if ((error = copyin(uap->rlp, &slim, sizeof(slim))) != 0) return error; - PROC_LOCK(td->td_proc); - lim_rlimit(td->td_proc, rl, &curlim); - PROC_UNLOCK(td->td_proc); + lim_rlimit(td, rl, &curlim); /* * if the limit is SVR4_RLIM_INFINITY, then we set it to our @@ -228,9 +224,7 @@ svr4_sys_getrlimit64(td, uap) if (rl == -1) return EINVAL; - PROC_LOCK(td->td_proc); - lim_rlimit(td->td_proc, rl, &blim); - PROC_UNLOCK(td->td_proc); + lim_rlimit(td, rl, &blim); /* * Our infinity, is their maxfiles. @@ -279,9 +273,7 @@ svr4_sys_setrlimit64(td, uap) if ((error = copyin(uap->rlp, &slim, sizeof(slim))) != 0) return error; - PROC_LOCK(td->td_proc); - lim_rlimit(td->td_proc, rl, &curlim); - PROC_UNLOCK(td->td_proc); + lim_rlimit(td, rl, &curlim); /* * if the limit is SVR4_RLIM64_INFINITY, then we set it to our Modified: head/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- head/sys/dev/drm2/i915/i915_gem.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/dev/drm2/i915/i915_gem.c Wed Jun 10 10:48:12 2015 (r284215) @@ -1874,7 +1874,7 @@ i915_gem_mmap_ioctl(struct drm_device *d map = &p->p_vmspace->vm_map; size = round_page(args->size); PROC_LOCK(p); - if (map->size + size > lim_cur(p, RLIMIT_VMEM)) { + if (map->size + size > lim_cur_proc(p, RLIMIT_VMEM)) { PROC_UNLOCK(p); error = -ENOMEM; goto out; Modified: head/sys/fs/fdescfs/fdesc_vfsops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vfsops.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Wed Jun 10 10:48:12 2015 (r284215) @@ -199,9 +199,7 @@ fdesc_statfs(mp, sbp) * limit is ever reduced below the current number * of open files... ] */ - PROC_LOCK(td->td_proc); - lim = lim_cur(td->td_proc, RLIMIT_NOFILE); - PROC_UNLOCK(td->td_proc); + lim = lim_cur(td, RLIMIT_NOFILE); fdp = td->td_proc->p_fd; FILEDESC_SLOCK(fdp); limit = racct_get_limit(td->td_proc, RACCT_NOFILE); Modified: head/sys/i386/ibcs2/ibcs2_misc.c ============================================================================== --- head/sys/i386/ibcs2/ibcs2_misc.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/i386/ibcs2/ibcs2_misc.c Wed Jun 10 10:48:12 2015 (r284215) @@ -98,40 +98,30 @@ ibcs2_ulimit(td, uap) struct ibcs2_ulimit_args *uap; { struct rlimit rl; - struct proc *p; int error; #define IBCS2_GETFSIZE 1 #define IBCS2_SETFSIZE 2 #define IBCS2_GETPSIZE 3 #define IBCS2_GETDTABLESIZE 4 - p = td->td_proc; switch (uap->cmd) { case IBCS2_GETFSIZE: - PROC_LOCK(p); - td->td_retval[0] = lim_cur(p, RLIMIT_FSIZE); - PROC_UNLOCK(p); + td->td_retval[0] = lim_cur(td, RLIMIT_FSIZE); if (td->td_retval[0] == -1) td->td_retval[0] = 0x7fffffff; return 0; case IBCS2_SETFSIZE: - PROC_LOCK(p); - rl.rlim_max = lim_max(p, RLIMIT_FSIZE); - PROC_UNLOCK(p); + rl.rlim_max = lim_max(td, RLIMIT_FSIZE); rl.rlim_cur = uap->newlimit; error = kern_setrlimit(td, RLIMIT_FSIZE, &rl); if (!error) { - PROC_LOCK(p); - td->td_retval[0] = lim_cur(p, RLIMIT_FSIZE); - PROC_UNLOCK(p); + td->td_retval[0] = lim_cur(td, RLIMIT_FSIZE); } else { DPRINTF(("failed ")); } return error; case IBCS2_GETPSIZE: - PROC_LOCK(p); - td->td_retval[0] = lim_cur(p, RLIMIT_RSS); /* XXX */ - PROC_UNLOCK(p); + td->td_retval[0] = lim_cur(td, RLIMIT_RSS); /* XXX */ return 0; case IBCS2_GETDTABLESIZE: uap->cmd = IBCS2_SC_OPEN_MAX; @@ -801,18 +791,14 @@ ibcs2_sysconf(td, uap) struct ibcs2_sysconf_args *uap; { int mib[2], value, len, error; - struct proc *p; - p = td->td_proc; switch(uap->name) { case IBCS2_SC_ARG_MAX: mib[1] = KERN_ARGMAX; break; case IBCS2_SC_CHILD_MAX: - PROC_LOCK(p); - td->td_retval[0] = lim_cur(td->td_proc, RLIMIT_NPROC); - PROC_UNLOCK(p); + td->td_retval[0] = lim_cur(td, RLIMIT_NPROC); return 0; case IBCS2_SC_CLK_TCK: @@ -824,9 +810,7 @@ ibcs2_sysconf(td, uap) break; case IBCS2_SC_OPEN_MAX: - PROC_LOCK(p); - td->td_retval[0] = lim_cur(td->td_proc, RLIMIT_NOFILE); - PROC_UNLOCK(p); + td->td_retval[0] = lim_cur(td, RLIMIT_NOFILE); return 0; case IBCS2_SC_JOB_CONTROL: Modified: head/sys/i386/linux/imgact_linux.c ============================================================================== --- head/sys/i386/linux/imgact_linux.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/i386/linux/imgact_linux.c Wed Jun 10 10:48:12 2015 (r284215) @@ -108,7 +108,7 @@ exec_linux_imgact(struct image_params *i */ PROC_LOCK(imgp->proc); if (a_out->a_text > maxtsiz || - a_out->a_data + bss_size > lim_cur(imgp->proc, RLIMIT_DATA) || + a_out->a_data + bss_size > lim_cur_proc(imgp->proc, RLIMIT_DATA) || racct_set(imgp->proc, RACCT_DATA, a_out->a_data + bss_size) != 0) { PROC_UNLOCK(imgp->proc); return (ENOMEM); Modified: head/sys/i386/linux/linux_machdep.c ============================================================================== --- head/sys/i386/linux/linux_machdep.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/i386/linux/linux_machdep.c Wed Jun 10 10:48:12 2015 (r284215) @@ -509,7 +509,7 @@ linux_mmap_common(struct thread *td, l_u */ PROC_LOCK(p); p->p_vmspace->vm_maxsaddr = (char *)USRSTACK - - lim_cur(p, RLIMIT_STACK); + lim_cur_proc(p, RLIMIT_STACK); PROC_UNLOCK(p); } Modified: head/sys/kern/imgact_aout.c ============================================================================== --- head/sys/kern/imgact_aout.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/imgact_aout.c Wed Jun 10 10:48:12 2015 (r284215) @@ -248,7 +248,7 @@ exec_aout_imgact(struct image_params *im a_out->a_text > maxtsiz || /* data + bss can't exceed rlimit */ - a_out->a_data + bss_size > lim_cur(imgp->proc, RLIMIT_DATA) || + a_out->a_data + bss_size > lim_cur_proc(imgp->proc, RLIMIT_DATA) || racct_set(imgp->proc, RACCT_DATA, a_out->a_data + bss_size) != 0) { PROC_UNLOCK(imgp->proc); return (ENOMEM); Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/imgact_elf.c Wed Jun 10 10:48:12 2015 (r284215) @@ -908,11 +908,11 @@ __CONCAT(exec_, __elfN(imgact))(struct i * not actually fault in all the segments pages. */ PROC_LOCK(imgp->proc); - if (data_size > lim_cur(imgp->proc, RLIMIT_DATA)) + if (data_size > lim_cur_proc(imgp->proc, RLIMIT_DATA)) err_str = "Data segment size exceeds process limit"; else if (text_size > maxtsiz) err_str = "Text segment size exceeds system limit"; - else if (total_size > lim_cur(imgp->proc, RLIMIT_VMEM)) + else if (total_size > lim_cur_proc(imgp->proc, RLIMIT_VMEM)) err_str = "Total segment size exceeds process limit"; else if (racct_set(imgp->proc, RACCT_DATA, data_size) != 0) err_str = "Data segment size exceeds resource limit"; @@ -936,7 +936,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i * calculation is that it leaves room for the heap to grow to * its maximum allowed size. */ - addr = round_page((vm_offset_t)vmspace->vm_daddr + lim_max(imgp->proc, + addr = round_page((vm_offset_t)vmspace->vm_daddr + lim_max(curthread, RLIMIT_DATA)); PROC_UNLOCK(imgp->proc); @@ -1983,7 +1983,7 @@ note_procstat_rlimit(void *arg, struct s sbuf_bcat(sb, &structsize, sizeof(structsize)); PROC_LOCK(p); for (i = 0; i < RLIM_NLIMITS; i++) - lim_rlimit(p, i, &rlim[i]); + lim_rlimit_proc(p, i, &rlim[i]); PROC_UNLOCK(p); sbuf_bcat(sb, rlim, sizeof(rlim)); } Modified: head/sys/kern/imgact_gzip.c ============================================================================== --- head/sys/kern/imgact_gzip.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/imgact_gzip.c Wed Jun 10 10:48:12 2015 (r284215) @@ -212,7 +212,7 @@ do_aout_hdr(struct imgact_gzip * gz) /* data + bss can't exceed rlimit */ gz->a_out.a_data + gz->bss_size > - lim_cur(gz->ip->proc, RLIMIT_DATA) || + lim_cur_proc(gz->ip->proc, RLIMIT_DATA) || racct_set(gz->ip->proc, RACCT_DATA, gz->a_out.a_data + gz->bss_size) != 0) { PROC_UNLOCK(gz->ip->proc); Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/kern_descrip.c Wed Jun 10 10:48:12 2015 (r284215) @@ -109,7 +109,7 @@ static void fdgrowtable(struct filedesc static void fdgrowtable_exp(struct filedesc *fdp, int nfd); static void fdunused(struct filedesc *fdp, int fd); static void fdused(struct filedesc *fdp, int fd); -static int getmaxfd(struct proc *p); +static int getmaxfd(struct thread *td); /* Flags for do_dup() */ #define DUP_FIXED 0x1 /* Force fixed allocation. */ @@ -328,16 +328,19 @@ struct getdtablesize_args { int sys_getdtablesize(struct thread *td, struct getdtablesize_args *uap) { - struct proc *p = td->td_proc; +#ifdef RACCT uint64_t lim; +#endif - PROC_LOCK(p); td->td_retval[0] = - min((int)lim_cur(p, RLIMIT_NOFILE), maxfilesperproc); + min((int)lim_cur(td, RLIMIT_NOFILE), maxfilesperproc); +#ifdef RACCT + PROC_LOCK(p); lim = racct_get_limit(td->td_proc, RACCT_NOFILE); PROC_UNLOCK(p); if (lim < td->td_retval[0]) td->td_retval[0] = lim; +#endif return (0); } @@ -780,15 +783,10 @@ kern_fcntl(struct thread *td, int fd, in } static int -getmaxfd(struct proc *p) +getmaxfd(struct thread *td) { - int maxfd; - - PROC_LOCK(p); - maxfd = min((int)lim_cur(p, RLIMIT_NOFILE), maxfilesperproc); - PROC_UNLOCK(p); - return (maxfd); + return (min((int)lim_cur(td, RLIMIT_NOFILE), maxfilesperproc)); } /* @@ -816,7 +814,7 @@ do_dup(struct thread *td, int flags, int return (EBADF); if (new < 0) return (flags & DUP_FCNTL ? EINVAL : EBADF); - maxfd = getmaxfd(p); + maxfd = getmaxfd(td); if (new >= maxfd) return (flags & DUP_FCNTL ? EINVAL : EBADF); @@ -1616,7 +1614,7 @@ fdalloc(struct thread *td, int minfd, in if (fdp->fd_freefile > minfd) minfd = fdp->fd_freefile; - maxfd = getmaxfd(p); + maxfd = getmaxfd(td); /* * Search the bitmap for a free descriptor starting at minfd. Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/kern_event.c Wed Jun 10 10:48:12 2015 (r284215) @@ -754,14 +754,10 @@ kern_kqueue(struct thread *td, int flags p = td->td_proc; cred = td->td_ucred; crhold(cred); - PROC_LOCK(p); - if (!chgkqcnt(cred->cr_ruidinfo, 1, lim_cur(td->td_proc, - RLIMIT_KQUEUES))) { - PROC_UNLOCK(p); + if (!chgkqcnt(cred->cr_ruidinfo, 1, lim_cur(td, RLIMIT_KQUEUES))) { crfree(cred); return (ENOMEM); } - PROC_UNLOCK(p); fdp = p->p_fd; error = falloc(td, &fp, &fd, flags); Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/kern_exec.c Wed Jun 10 10:48:12 2015 (r284215) @@ -1073,7 +1073,7 @@ exec_new_vmspace(imgp, sv) if (imgp->stack_sz != 0) { ssiz = trunc_page(imgp->stack_sz); PROC_LOCK(p); - lim_rlimit(p, RLIMIT_STACK, &rlim_stack); + lim_rlimit_proc(p, RLIMIT_STACK, &rlim_stack); PROC_UNLOCK(p); if (ssiz > rlim_stack.rlim_max) ssiz = rlim_stack.rlim_max; Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/kern_fork.c Wed Jun 10 10:48:12 2015 (r284215) @@ -912,10 +912,8 @@ fork1(struct thread *td, int flags, int if (error == 0) ok = chgproccnt(td->td_ucred->cr_ruidinfo, 1, 0); else { - PROC_LOCK(p1); ok = chgproccnt(td->td_ucred->cr_ruidinfo, 1, - lim_cur(p1, RLIMIT_NPROC)); - PROC_UNLOCK(p1); + lim_cur(td, RLIMIT_NPROC)); } if (ok) { do_fork(td, flags, newproc, td2, vm2, pdflags); Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/kern_proc.c Wed Jun 10 10:48:12 2015 (r284215) @@ -2615,7 +2615,7 @@ sysctl_kern_proc_rlimit(SYSCTL_HANDLER_A */ if (req->oldptr != NULL) { PROC_LOCK(p); - lim_rlimit(p, which, &rlim); + lim_rlimit_proc(p, which, &rlim); PROC_UNLOCK(p); } error = SYSCTL_OUT(req, &rlim, sizeof(rlim)); Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/kern_resource.c Wed Jun 10 10:48:12 2015 (r284215) @@ -560,15 +560,11 @@ ogetrlimit(struct thread *td, register s { struct orlimit olim; struct rlimit rl; - struct proc *p; int error; if (uap->which >= RLIM_NLIMITS) return (EINVAL); - p = td->td_proc; - PROC_LOCK(p); - lim_rlimit(p, uap->which, &rl); - PROC_UNLOCK(p); + lim_rlimit(td, uap->which, &rl); /* * XXX would be more correct to convert only RLIM_INFINITY to the @@ -625,7 +621,7 @@ lim_cb(void *arg) } PROC_STATUNLOCK(p); if (p->p_rux.rux_runtime > p->p_cpulimit * cpu_tickrate()) { - lim_rlimit(p, RLIMIT_CPU, &rlim); + lim_rlimit_proc(p, RLIMIT_CPU, &rlim); if (p->p_rux.rux_runtime >= rlim.rlim_max * cpu_tickrate()) { killproc(p, "exceeded maximum CPU limit"); } else { @@ -667,29 +663,21 @@ kern_proc_setrlimit(struct thread *td, s limp->rlim_max = RLIM_INFINITY; oldssiz.rlim_cur = 0; - newlim = NULL; + newlim = lim_alloc(); PROC_LOCK(p); - if (lim_shared(p->p_limit)) { - PROC_UNLOCK(p); - newlim = lim_alloc(); - PROC_LOCK(p); - } oldlim = p->p_limit; alimp = &oldlim->pl_rlimit[which]; if (limp->rlim_cur > alimp->rlim_max || limp->rlim_max > alimp->rlim_max) if ((error = priv_check(td, PRIV_PROC_SETRLIMIT))) { PROC_UNLOCK(p); - if (newlim != NULL) - lim_free(newlim); + lim_free(newlim); return (error); } if (limp->rlim_cur > limp->rlim_max) limp->rlim_cur = limp->rlim_max; - if (newlim != NULL) { - lim_copy(newlim, oldlim); - alimp = &newlim->pl_rlimit[which]; - } + lim_copy(newlim, oldlim); + alimp = &newlim->pl_rlimit[which]; switch (which) { @@ -739,11 +727,10 @@ kern_proc_setrlimit(struct thread *td, s if (p->p_sysent->sv_fixlimit != NULL) p->p_sysent->sv_fixlimit(limp, which); *alimp = *limp; - if (newlim != NULL) - p->p_limit = newlim; + p->p_limit = newlim; + PROC_UPDATE_COW(p); PROC_UNLOCK(p); - if (newlim != NULL) - lim_free(oldlim); + lim_free(oldlim); if (which == RLIMIT_STACK && /* @@ -793,15 +780,11 @@ int sys_getrlimit(struct thread *td, register struct __getrlimit_args *uap) { struct rlimit rlim; - struct proc *p; int error; if (uap->which >= RLIM_NLIMITS) return (EINVAL); - p = td->td_proc; - PROC_LOCK(p); - lim_rlimit(p, uap->which, &rlim); - PROC_UNLOCK(p); + lim_rlimit(td, uap->which, &rlim); error = copyout(&rlim, uap->rlp, sizeof(struct rlimit)); return (error); } @@ -1172,11 +1155,20 @@ lim_copy(struct plimit *dst, struct plim * which parameter specifies the index into the rlimit array. */ rlim_t -lim_max(struct proc *p, int which) +lim_max(struct thread *td, int which) { struct rlimit rl; - lim_rlimit(p, which, &rl); + lim_rlimit(td, which, &rl); + return (rl.rlim_max); +} + +rlim_t +lim_max_proc(struct proc *p, int which) +{ + struct rlimit rl; + + lim_rlimit_proc(p, which, &rl); return (rl.rlim_max); } @@ -1185,11 +1177,20 @@ lim_max(struct proc *p, int which) * The which parameter which specifies the index into the rlimit array */ rlim_t -lim_cur(struct proc *p, int which) +lim_cur(struct thread *td, int which) { struct rlimit rl; - lim_rlimit(p, which, &rl); + lim_rlimit(td, which, &rl); + return (rl.rlim_cur); +} + +rlim_t +lim_cur_proc(struct proc *p, int which) +{ + struct rlimit rl; + + lim_rlimit_proc(p, which, &rl); return (rl.rlim_cur); } @@ -1198,7 +1199,20 @@ lim_cur(struct proc *p, int which) * specified by 'which' in the rlimit structure pointed to by 'rlp'. */ void -lim_rlimit(struct proc *p, int which, struct rlimit *rlp) +lim_rlimit(struct thread *td, int which, struct rlimit *rlp) +{ + struct proc *p = td->td_proc; + + MPASS(td == curthread); + KASSERT(which >= 0 && which < RLIM_NLIMITS, + ("request for invalid resource limit")); + *rlp = td->td_limit->pl_rlimit[which]; + if (p->p_sysent->sv_fixlimit != NULL) + p->p_sysent->sv_fixlimit(rlp, which); +} + +void +lim_rlimit_proc(struct proc *p, int which, struct rlimit *rlp) { PROC_LOCK_ASSERT(p, MA_OWNED); @@ -1441,3 +1455,17 @@ chgkqcnt(struct uidinfo *uip, int diff, } return (1); } + +void +lim_update_thread(struct thread *td) +{ + struct proc *p; + struct plimit *lim; + + p = td->td_proc; + lim = td->td_limit; + PROC_LOCK_ASSERT(p, MA_OWNED); + td->td_limit = lim_hold(p->p_limit); + if (lim != NULL) + lim_free(lim); +} Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/kern_sig.c Wed Jun 10 10:48:12 2015 (r284215) @@ -3309,7 +3309,7 @@ coredump(struct thread *td) * a corefile is truncated instead of not being created, * if it is larger than the limit. */ - limit = (off_t)lim_cur(p, RLIMIT_CORE); + limit = (off_t)lim_cur(td, RLIMIT_CORE); if (limit == 0 || racct_get_available(p, RACCT_CORE) == 0) { PROC_UNLOCK(p); return (EFBIG); Modified: head/sys/kern/kern_syscalls.c ============================================================================== --- head/sys/kern/kern_syscalls.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/kern_syscalls.c Wed Jun 10 10:48:12 2015 (r284215) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/kern_thread.c Wed Jun 10 10:48:12 2015 (r284215) @@ -389,6 +389,7 @@ thread_cow_get_proc(struct thread *newtd PROC_LOCK_ASSERT(p, MA_OWNED); newtd->td_ucred = crhold(p->p_ucred); + newtd->td_limit = lim_hold(p->p_limit); newtd->td_cowgen = p->p_cowgen; } @@ -397,6 +398,7 @@ thread_cow_get(struct thread *newtd, str { newtd->td_ucred = crhold(td->td_ucred); + newtd->td_limit = lim_hold(td->td_limit); newtd->td_cowgen = td->td_cowgen; } @@ -406,6 +408,8 @@ thread_cow_free(struct thread *td) if (td->td_ucred) crfree(td->td_ucred); + if (td->td_limit) + lim_free(td->td_limit); } void @@ -417,6 +421,8 @@ thread_cow_update(struct thread *td) PROC_LOCK(p); if (td->td_ucred != p->p_ucred) cred_update_thread(td); + if (td->td_limit != p->p_limit) + lim_update_thread(td); td->td_cowgen = p->p_cowgen; PROC_UNLOCK(p); } Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/subr_uio.c Wed Jun 10 10:48:12 2015 (r284215) @@ -409,10 +409,8 @@ copyout_map(struct thread *td, vm_offset /* * Map somewhere after heap in process memory. */ - PROC_LOCK(td->td_proc); *addr = round_page((vm_offset_t)vms->vm_daddr + - lim_max(td->td_proc, RLIMIT_DATA)); - PROC_UNLOCK(td->td_proc); + lim_max(td, RLIMIT_DATA)); /* round size up to page boundry */ size = (vm_size_t)round_page(sz); Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/sysv_shm.c Wed Jun 10 10:48:12 2015 (r284215) @@ -382,7 +382,7 @@ kern_shmat_locked(struct thread *td, int */ PROC_LOCK(p); attach_va = round_page((vm_offset_t)p->p_vmspace->vm_daddr + - lim_max(p, RLIMIT_DATA)); + lim_max_proc(p, RLIMIT_DATA)); PROC_UNLOCK(p); } Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/tty_pts.c Wed Jun 10 10:48:12 2015 (r284215) @@ -741,7 +741,7 @@ pts_alloc(int fflags, struct thread *td, PROC_UNLOCK(p); return (EAGAIN); } - ok = chgptscnt(cred->cr_ruidinfo, 1, lim_cur(p, RLIMIT_NPTS)); + ok = chgptscnt(cred->cr_ruidinfo, 1, lim_cur(td, RLIMIT_NPTS)); if (!ok) { racct_sub(p, RACCT_NPTS, 1); PROC_UNLOCK(p); @@ -795,7 +795,7 @@ pts_alloc_external(int fflags, struct th PROC_UNLOCK(p); return (EAGAIN); } - ok = chgptscnt(cred->cr_ruidinfo, 1, lim_cur(p, RLIMIT_NPTS)); + ok = chgptscnt(cred->cr_ruidinfo, 1, lim_cur(td, RLIMIT_NPTS)); if (!ok) { racct_sub(p, RACCT_NPTS, 1); PROC_UNLOCK(p); Modified: head/sys/kern/uipc_sockbuf.c ============================================================================== --- head/sys/kern/uipc_sockbuf.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/uipc_sockbuf.c Wed Jun 10 10:48:12 2015 (r284215) @@ -420,9 +420,7 @@ sbreserve_locked(struct sockbuf *sb, u_l if (cc > sb_max_adj) return (0); if (td != NULL) { - PROC_LOCK(td->td_proc); - sbsize_limit = lim_cur(td->td_proc, RLIMIT_SBSIZE); - PROC_UNLOCK(td->td_proc); + sbsize_limit = lim_cur(td, RLIMIT_SBSIZE); } else sbsize_limit = RLIM_INFINITY; if (!chgsbsize(so->so_cred->cr_uidinfo, &sb->sb_hiwat, cc, Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/kern/vfs_vnops.c Wed Jun 10 10:48:12 2015 (r284215) @@ -2106,19 +2106,18 @@ vn_vget_ino_gen(struct vnode *vp, vn_get int vn_rlimit_fsize(const struct vnode *vp, const struct uio *uio, - const struct thread *td) + struct thread *td) { if (vp->v_type != VREG || td == NULL) return (0); - PROC_LOCK(td->td_proc); if ((uoff_t)uio->uio_offset + uio->uio_resid > - lim_cur(td->td_proc, RLIMIT_FSIZE)) { + lim_cur(td, RLIMIT_FSIZE)) { + PROC_LOCK(td->td_proc); kern_psignal(td->td_proc, SIGXFSZ); PROC_UNLOCK(td->td_proc); return (EFBIG); } - PROC_UNLOCK(td->td_proc); return (0); } Modified: head/sys/ofed/drivers/infiniband/core/umem.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/umem.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/ofed/drivers/infiniband/core/umem.c Wed Jun 10 10:48:12 2015 (r284215) @@ -272,7 +272,7 @@ struct ib_umem *ib_umem_get_ex(struct ib PROC_LOCK(proc); if (ptoa(npages + pmap_wired_count(vm_map_pmap(&proc->p_vmspace->vm_map))) > - lim_cur(proc, RLIMIT_MEMLOCK)) { + lim_cur_proc(proc, RLIMIT_MEMLOCK)) { PROC_UNLOCK(proc); kfree(umem); return ERR_PTR(-ENOMEM); Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c Wed Jun 10 10:48:12 2015 (r284215) @@ -553,7 +553,8 @@ out: proc = curproc; pmap = vm_map_pmap(&proc->p_vmspace->vm_map); PROC_LOCK(proc); - if (ptoa(pmap_wired_count(pmap) + 1) > lim_cur(proc, RLIMIT_MEMLOCK)) { + if (ptoa(pmap_wired_count(pmap) + 1) > + lim_cur_proc(proc, RLIMIT_MEMLOCK)) { PROC_UNLOCK(proc); ret = -ENOMEM; goto out; Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/sys/proc.h Wed Jun 10 10:48:12 2015 (r284215) @@ -246,6 +246,7 @@ struct thread { int td_intr_nesting_level; /* (k) Interrupt recursion. */ int td_pinned; /* (k) Temporary cpu pin count. */ struct ucred *td_ucred; /* (k) Reference to credentials. */ + struct plimit *td_limit; /* (k) Resource limits. */ u_int td_estcpu; /* (t) estimated cpu utilization */ int td_slptick; /* (t) Time at sleep. */ int td_blktick; /* (t) Time spent blocked. */ @@ -499,7 +500,7 @@ struct proc { struct filedesc *p_fd; /* (b) Open files. */ struct filedesc_to_leader *p_fdtol; /* (b) Tracking node */ struct pstats *p_stats; /* (b) Accounting/statistics (CPU). */ - struct plimit *p_limit; /* (c) Process limits. */ + struct plimit *p_limit; /* (c) Resource limits. */ struct callout p_limco; /* (c) Limit callout handle */ struct sigacts *p_sigacts; /* (x) Signal actions, state (CPU). */ Modified: head/sys/sys/resourcevar.h ============================================================================== --- head/sys/sys/resourcevar.h Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/sys/resourcevar.h Wed Jun 10 10:48:12 2015 (r284215) @@ -130,13 +130,16 @@ int kern_proc_setrlimit(struct thread * struct plimit *lim_alloc(void); void lim_copy(struct plimit *dst, struct plimit *src); -rlim_t lim_cur(struct proc *p, int which); +rlim_t lim_cur(struct thread *td, int which); +rlim_t lim_cur_proc(struct proc *p, int which); void lim_fork(struct proc *p1, struct proc *p2); void lim_free(struct plimit *limp); struct plimit *lim_hold(struct plimit *limp); -rlim_t lim_max(struct proc *p, int which); -void lim_rlimit(struct proc *p, int which, struct rlimit *rlp); +rlim_t lim_max(struct thread *td, int which); +rlim_t lim_max_proc(struct proc *p, int which); +void lim_rlimit(struct thread *td, int which, struct rlimit *rlp); +void lim_rlimit_proc(struct proc *p, int which, struct rlimit *rlp); void ruadd(struct rusage *ru, struct rusage_ext *rux, struct rusage *ru2, struct rusage_ext *rux2); void rucollect(struct rusage *ru, struct rusage *ru2); @@ -156,5 +159,7 @@ void ui_racct_foreach(void (*callback)( void *arg2, void *arg3), void *arg2, void *arg3); #endif +void lim_update_thread(struct thread *td); + #endif /* _KERNEL */ #endif /* !_SYS_RESOURCEVAR_H_ */ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/sys/vnode.h Wed Jun 10 10:48:12 2015 (r284215) @@ -692,7 +692,7 @@ int vn_rdwr_inchunks(enum uio_rw rw, str struct ucred *active_cred, struct ucred *file_cred, size_t *aresid, struct thread *td); int vn_rlimit_fsize(const struct vnode *vn, const struct uio *uio, - const struct thread *td); + struct thread *td); int vn_stat(struct vnode *vp, struct stat *sb, struct ucred *active_cred, struct ucred *file_cred, struct thread *td); int vn_start_write(struct vnode *vp, struct mount **mpp, int flags); Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/vm/swap_pager.c Wed Jun 10 10:48:12 2015 (r284215) @@ -224,16 +224,14 @@ swap_reserve_by_cred(vm_ooffset_t incr, mtx_unlock(&sw_dev_mtx); if (res) { - PROC_LOCK(curproc); UIDINFO_VMSIZE_LOCK(uip); if ((overcommit & SWAP_RESERVE_RLIMIT_ON) != 0 && - uip->ui_vmsize + incr > lim_cur(curproc, RLIMIT_SWAP) && + uip->ui_vmsize + incr > lim_cur(curthread, RLIMIT_SWAP) && priv_check(curthread, PRIV_VM_SWAP_NORLIMIT)) res = 0; else uip->ui_vmsize += incr; UIDINFO_VMSIZE_UNLOCK(uip); - PROC_UNLOCK(curproc); if (!res) { mtx_lock(&sw_dev_mtx); swap_reserved -= incr; Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/vm/vm_map.c Wed Jun 10 10:48:12 2015 (r284215) @@ -3424,10 +3424,8 @@ vm_map_stack(vm_map_t map, vm_offset_t a growsize = sgrowsiz; init_ssize = (max_ssize < growsize) ? max_ssize : growsize; vm_map_lock(map); - PROC_LOCK(curproc); - lmemlim = lim_cur(curproc, RLIMIT_MEMLOCK); - vmemlim = lim_cur(curproc, RLIMIT_VMEM); - PROC_UNLOCK(curproc); + lmemlim = lim_cur(curthread, RLIMIT_MEMLOCK); + vmemlim = lim_cur(curthread, RLIMIT_VMEM); if (!old_mlock && map->flags & MAP_WIREFUTURE) { if (ptoa(pmap_wired_count(map->pmap)) + init_ssize > lmemlim) { rv = KERN_NO_SPACE; @@ -3556,12 +3554,10 @@ vm_map_growstack(struct proc *p, vm_offs int error; #endif + lmemlim = lim_cur(curthread, RLIMIT_MEMLOCK); + stacklim = lim_cur(curthread, RLIMIT_STACK); + vmemlim = lim_cur(curthread, RLIMIT_VMEM); Retry: - PROC_LOCK(p); - lmemlim = lim_cur(p, RLIMIT_MEMLOCK); - stacklim = lim_cur(p, RLIMIT_STACK); - vmemlim = lim_cur(p, RLIMIT_VMEM); - PROC_UNLOCK(p); vm_map_lock_read(map); Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/vm/vm_mmap.c Wed Jun 10 10:48:12 2015 (r284215) @@ -316,9 +316,9 @@ sys_mmap(td, uap) if (addr == 0 || (addr >= round_page((vm_offset_t)vms->vm_taddr) && addr < round_page((vm_offset_t)vms->vm_daddr + - lim_max(td->td_proc, RLIMIT_DATA)))) + lim_max_proc(td->td_proc, RLIMIT_DATA)))) addr = round_page((vm_offset_t)vms->vm_daddr + - lim_max(td->td_proc, RLIMIT_DATA)); + lim_max_proc(td->td_proc, RLIMIT_DATA)); PROC_UNLOCK(td->td_proc); } if (size == 0) { @@ -1028,7 +1028,7 @@ vm_mlock(struct proc *proc, struct ucred map = &proc->p_vmspace->vm_map; PROC_LOCK(proc); nsize = ptoa(npages + pmap_wired_count(map->pmap)); - if (nsize > lim_cur(proc, RLIMIT_MEMLOCK)) { + if (nsize > lim_cur_proc(proc, RLIMIT_MEMLOCK)) { PROC_UNLOCK(proc); return (ENOMEM); } @@ -1088,7 +1088,7 @@ sys_mlockall(td, uap) */ if (!old_mlock && uap->how & MCL_CURRENT) { PROC_LOCK(td->td_proc); - if (map->size > lim_cur(td->td_proc, RLIMIT_MEMLOCK)) { + if (map->size > lim_cur(td, RLIMIT_MEMLOCK)) { PROC_UNLOCK(td->td_proc); return (ENOMEM); } @@ -1481,7 +1481,7 @@ vm_mmap_object(vm_map_t map, vm_offset_t if (map == &td->td_proc->p_vmspace->vm_map) { PROC_LOCK(td->td_proc); - if (map->size + size > lim_cur(td->td_proc, RLIMIT_VMEM)) { + if (map->size + size > lim_cur_proc(td->td_proc, RLIMIT_VMEM)) { PROC_UNLOCK(td->td_proc); return (ENOMEM); } @@ -1491,7 +1491,7 @@ vm_mmap_object(vm_map_t map, vm_offset_t } if (!old_mlock && map->flags & MAP_WIREFUTURE) { if (ptoa(pmap_wired_count(map->pmap)) + size > - lim_cur(td->td_proc, RLIMIT_MEMLOCK)) { + lim_cur_proc(td->td_proc, RLIMIT_MEMLOCK)) { racct_set_force(td->td_proc, RACCT_VMEM, map->size); PROC_UNLOCK(td->td_proc); Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Wed Jun 10 10:43:59 2015 (r284214) +++ head/sys/vm/vm_pageout.c Wed Jun 10 10:48:12 2015 (r284215) @@ -1851,7 +1851,7 @@ again: /* * get a limit */ - lim_rlimit(p, RLIMIT_RSS, &rsslim); + lim_rlimit_proc(p, RLIMIT_RSS, &rsslim); limit = OFF_TO_IDX( qmin(rsslim.rlim_cur, rsslim.rlim_max)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 12:16:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EA5B57B; Wed, 10 Jun 2015 12:16:18 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv158.fwdcdn.com (frv158.fwdcdn.com [212.42.77.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1E9B1DCD; Wed, 10 Jun 2015 12:16:17 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=8LYFy5Ak+P/YyEsaGV4Jk8/qy4izFQh5f3FA/t2i0Sw=; b=SUf8Fpr05beqf23ZrK9z/RvXLKUmB3ASKWCybk0Xm+xHWyzk2ly6uC9WDzsEfBeFCqlxJaNZ/o0/GMD3952tqhXmqYsbH26cntvKZyvpfB9CJFCMsRuODj+UuMP4x0mdWFsJuiwrxAbLamXv/nF/KAEdj3SEYfBbYreVwdzc9Xk=; Received: from [134.249.91.180] (helo=nonamehost.local) by frv158.fwdcdn.com with esmtpsa ID 1Z2evW-000HfR-El ; Wed, 10 Jun 2015 15:16:14 +0300 Date: Wed, 10 Jun 2015 15:16:13 +0300 From: Ivan Klymenko To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm Message-ID: <20150610151613.1176c1e3@nonamehost.local> In-Reply-To: <201506101048.t5AAmD1O029382@svn.freebsd.org> References: <201506101048.t5AAmD1O029382@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Result: IP=134.249.91.180; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 12:16:18 -0000 Wed, 10 Jun 2015 10:48:13 +0000 (UTC) Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=B2: > Author: mjg > Date: Wed Jun 10 10:48:12 2015 > New Revision: 284215 > URL: https://svnweb.freebsd.org/changeset/base/284215 >=20 > Log: > Implement lockless resource limits. > =20 > Use the same scheme implemented to manage credentials. > =20 > Code needing to look at process's credentials (as opposed to > thred's) is provided with *_proc variants of relevant functions. > =20 > Places which possibly had to take the proc lock anyway still use > the proc pointer to access limits. >=20 > Modified: > head/sys/amd64/linux32/linux32_machdep.c > head/sys/compat/linux/linux_misc.c > head/sys/compat/svr4/imgact_svr4.c > head/sys/compat/svr4/svr4_misc.c > head/sys/compat/svr4/svr4_resource.c > head/sys/dev/drm2/i915/i915_gem.c > head/sys/fs/fdescfs/fdesc_vfsops.c > head/sys/i386/ibcs2/ibcs2_misc.c > head/sys/i386/linux/imgact_linux.c > head/sys/i386/linux/linux_machdep.c > head/sys/kern/imgact_aout.c > head/sys/kern/imgact_elf.c > head/sys/kern/imgact_gzip.c > head/sys/kern/kern_descrip.c > head/sys/kern/kern_event.c > head/sys/kern/kern_exec.c > head/sys/kern/kern_fork.c > head/sys/kern/kern_proc.c > head/sys/kern/kern_resource.c > head/sys/kern/kern_sig.c > head/sys/kern/kern_syscalls.c > head/sys/kern/kern_thread.c > head/sys/kern/subr_uio.c > head/sys/kern/sysv_shm.c > head/sys/kern/tty_pts.c > head/sys/kern/uipc_sockbuf.c > head/sys/kern/vfs_vnops.c > head/sys/ofed/drivers/infiniband/core/umem.c > head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c > head/sys/sys/proc.h > head/sys/sys/resourcevar.h > head/sys/sys/vnode.h > head/sys/vm/swap_pager.c > head/sys/vm/vm_map.c > head/sys/vm/vm_mmap.c > head/sys/vm/vm_pageout.c > head/sys/vm/vm_unix.c >=20 > ... /head/sys/amd64/linux/linux_machdep.c --- linux_machdep.c.orig 2015-06-10 14:57:12.171984000 +0300 +++ linux_machdep.c 2015-06-10 14:57:22.662331000 +0300 @@ -251,7 +251,7 @@ */ PROC_LOCK(p); p->p_vmspace->vm_maxsaddr =3D (char *)USRSTACK - - lim_cur(p, RLIMIT_STACK); + lim_cur_proc(p, RLIMIT_STACK); PROC_UNLOCK(p); } must also change because: ... --- linux_stats.o --- /usr/local/libexec/ccache/world/cc -target x86_64-unknown-freebsd11.0 --sys= root=3D/media/da0s1/obj/usr/src/tmp -B/media/da0s1/obj/usr/src/tmp/usr/bin = -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc = -DHAVE_KERNEL_OPTION_HEADERS -include /media/da0s1/obj/usr/src/sys/mk11/opt= _global.h -I. -I/usr/src/sys -fno-common -g -fno-omit-frame-pointer -mno-om= it-leaf-frame-pointer -I/media/da0s1/obj/usr/src/sys/mk11 -mcmodel=3Dkerne= l -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-ta= bles -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-d= ecls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-a= rith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=3D__freeb= sd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknow= n-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-erro= r-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign = -mno-aes -mno-avx -std=3Diso9899:1999 -c /usr/src/sys/modules/linux64/../= ../compat/linux/linux_stats.c -o linux_stats.o --- linux_machdep.o --- distcc[26181] ERROR: compile /usr/src/sys/modules/linux64/../../amd64/linux= /linux_machdep.c on localhost failed /usr/src/sys/modules/linux64/../../amd64/linux/linux_machdep.c:254:16: erro= r: incompatible pointer types passing 'struct proc *' to parameter of type = 'struct thread *' [-Werror,-Wincompatible-pointer-types] lim_cur(p, RLIMIT_STACK); ^ /usr/src/sys/sys/resourcevar.h:133:32: note: passing argument to parameter = 'td' here rlim_t lim_cur(struct thread *td, int which); ^ 1 error generated. *** [linux_machdep.o] Error code 1 make[4]: stopped in /usr/src/sys/modules/linux64 --- linux_stats.o --- ctfconvert -L VERSION -g linux_stats.o --- linux_file.o --- ctfconvert -L VERSION -g linux_file.o --- linux_misc.o --- ctfconvert -L VERSION -g linux_misc.o 1 error make[4]: stopped in /usr/src/sys/modules/linux64 *** [all_subdir_linux64] Error code 2 make[3]: stopped in /usr/src/sys/modules --- all_subdir_mac_lomac --- ctfconvert -L VERSION -g mac_lomac.o A failure has been detected in another branch of the parallel make make[4]: stopped in /usr/src/sys/modules/mac_lomac *** [all_subdir_mac_lomac] Error code 2 make[3]: stopped in /usr/src/sys/modules 2 errors make[3]: stopped in /usr/src/sys/modules *** [modules-all] Error code 2 make[2]: stopped in /media/da0s1/obj/usr/src/sys/mk11 1 error make[2]: stopped in /media/da0s1/obj/usr/src/sys/mk11 *** [buildkernel] Error code 2 make[1]: stopped in /usr/src 1 error make[1]: stopped in /usr/src *** [buildkernel] Error code 2 make: stopped in /usr/src 1 error make: stopped in /usr/src and something must be changed /usr/local/libexec/ccache/world/cc -target x86_64-unknown-freebsd11.0 --sys= root=3D/media/da0s1/obj/usr/src/tmp -B/media/da0s1/obj/usr/src/tmp/usr/bin = -c -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. -I/usr/src/sys -I/usr/= src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_= global.h -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mcmodel=3Dk= ernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwin= d-tables -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredunda= nt-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpoint= er-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=3D__f= reebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-un= known-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-= error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-s= ign -mno-aes -mno-avx -std=3Diso9899:1999 -Werror /usr/src/sys/kern/kern= _fork.c --- kern_cons.o --- ctfconvert -L VERSION -g kern_cons.o --- kern_descrip.o --- distcc[27122] ERROR: compile /usr/src/sys/kern/kern_descrip.c on localhost = failed /usr/src/sys/kern/kern_descrip.c:338:12: error: use of undeclared identifie= r 'p' PROC_LOCK(p); ^ /usr/src/sys/sys/proc.h:778:33: note: expanded from macro 'PROC_LOCK' #define PROC_LOCK(p) mtx_lock(&(p)->p_mtx) ^ /usr/src/sys/sys/mutex.h:305:38: note: expanded from macro 'mtx_lock' #define mtx_lock(m) mtx_lock_flags((m), 0) ^ /usr/src/sys/sys/mutex.h:366:19: note: expanded from macro 'mtx_lock_flags' mtx_lock_flags_((m), (opts), LOCK_FILE, LOCK_LINE) ^ /usr/src/sys/sys/mutex.h:345:14: note: expanded from macro 'mtx_lock_flags_' __mtx_lock((m), curthread, (opts), (file), (line)) ^ /usr/src/sys/sys/mutex.h:188:25: note: expanded from macro '__mtx_lock' if (!_mtx_obtain_lock((mp), _tid)) \ ^ /usr/src/sys/sys/mutex.h:168:26: note: expanded from macro '_mtx_obtain_loc= k' atomic_cmpset_acq_ptr(&(mp)->mtx_lock, MTX_UNOWNED, (tid)) ^ /usr/src/sys/kern/kern_descrip.c:338:12: error: use of undeclared identifie= r 'p' /usr/src/sys/sys/proc.h:778:33: note: expanded from macro 'PROC_LOCK' #define PROC_LOCK(p) mtx_lock(&(p)->p_mtx) ^ /usr/src/sys/sys/mutex.h:305:38: note: expanded from macro 'mtx_lock' #define mtx_lock(m) mtx_lock_flags((m), 0) ^ /usr/src/sys/sys/mutex.h:366:19: note: expanded from macro 'mtx_lock_flags' mtx_lock_flags_((m), (opts), LOCK_FILE, LOCK_LINE) ^ /usr/src/sys/sys/mutex.h:345:14: note: expanded from macro 'mtx_lock_flags_' __mtx_lock((m), curthread, (opts), (file), (line)) ^ /usr/src/sys/sys/mutex.h:189:20: note: expanded from macro '__mtx_lock' _mtx_lock_sleep((mp), _tid, (opts), (file), (line)); \ ^ /usr/src/sys/sys/mutex.h:142:21: note: expanded from macro '_mtx_lock_sleep' __mtx_lock_sleep(&(m)->mtx_lock, t, o, f, l) ^ /usr/src/sys/kern/kern_descrip.c:338:12: error: use of undeclared identifie= r 'p' /usr/src/sys/sys/proc.h:778:33: note: expanded from macro 'PROC_LOCK' #define PROC_LOCK(p) mtx_lock(&(p)->p_mtx) ^ /usr/src/sys/sys/mutex.h:305:38: note: expanded from macro 'mtx_lock' #define mtx_lock(m) mtx_lock_flags((m), 0) ^ /usr/src/sys/sys/mutex.h:366:19: note: expanded from macro 'mtx_lock_flags' mtx_lock_flags_((m), (opts), LOCK_FILE, LOCK_LINE) ^ /usr/src/sys/sys/mutex.h:345:14: note: expanded from macro 'mtx_lock_flags_' __mtx_lock((m), curthread, (opts), (file), (line)) ^ /usr/src/sys/sys/mutex.h:192:7: note: expanded from macro '__mtx_lock' mp, 0, 0, (file), (line)); \ ^ /usr/src/sys/sys/lockstat.h:190:42: note: expanded from macro 'LOCKSTAT_PRO= FILE_OBTAIN_LOCK_SUCCESS' (*lockstat_probe_func)(id, (uintptr_t)(lp), 0, 0, 0, 0); = \ ^ /usr/src/sys/kern/kern_descrip.c:340:14: error: use of undeclared identifie= r 'p' PROC_UNLOCK(p); ^ /usr/src/sys/sys/proc.h:780:37: note: expanded from macro 'PROC_UNLOCK' #define PROC_UNLOCK(p) mtx_unlock(&(p)->p_mtx) ^ /usr/src/sys/sys/mutex.h:308:42: note: expanded from macro 'mtx_unlock' #define mtx_unlock(m) mtx_unlock_flags((m), 0) ^ /usr/src/sys/sys/mutex.h:368:21: note: expanded from macro 'mtx_unlock_flag= s' mtx_unlock_flags_((m), (opts), LOCK_FILE, LOCK_LINE) ^ /usr/src/sys/sys/mutex.h:347:16: note: expanded from macro 'mtx_unlock_flag= s_' __mtx_unlock((m), curthread, (opts), (file), (line)) ^ /usr/src/sys/sys/mutex.h:233:7: note: expanded from macro '__mtx_unlock' if ((mp)->mtx_recurse =3D=3D 0) = \ ^ /usr/src/sys/kern/kern_descrip.c:340:14: error: use of undeclared identifie= r 'p' /usr/src/sys/sys/proc.h:780:37: note: expanded from macro 'PROC_UNLOCK' #define PROC_UNLOCK(p) mtx_unlock(&(p)->p_mtx) ^ /usr/src/sys/sys/mutex.h:308:42: note: expanded from macro 'mtx_unlock' #define mtx_unlock(m) mtx_unlock_flags((m), 0) ^ /usr/src/sys/sys/mutex.h:368:21: note: expanded from macro 'mtx_unlock_flag= s' mtx_unlock_flags_((m), (opts), LOCK_FILE, LOCK_LINE) ^ /usr/src/sys/sys/mutex.h:347:16: note: expanded from macro 'mtx_unlock_flag= s_' __mtx_unlock((m), curthread, (opts), (file), (line)) ^ /usr/src/sys/sys/mutex.h:235:8: note: expanded from macro '__mtx_unlock' (mp)); \ ^ /usr/src/sys/sys/lockstat.h:198:42: note: expanded from macro 'LOCKSTAT_PRO= FILE_RELEASE_LOCK' (*lockstat_probe_func)(id, (uintptr_t)(lp), 0, 0, 0, 0); = \ ^ /usr/src/sys/kern/kern_descrip.c:340:14: error: use of undeclared identifie= r 'p' /usr/src/sys/sys/proc.h:780:37: note: expanded from macro 'PROC_UNLOCK' #define PROC_UNLOCK(p) mtx_unlock(&(p)->p_mtx) ^ /usr/src/sys/sys/mutex.h:308:42: note: expanded from macro 'mtx_unlock' #define mtx_unlock(m) mtx_unlock_flags((m), 0) ^ /usr/src/sys/sys/mutex.h:368:21: note: expanded from macro 'mtx_unlock_flag= s' mtx_unlock_flags_((m), (opts), LOCK_FILE, LOCK_LINE) ^ /usr/src/sys/sys/mutex.h:347:16: note: expanded from macro 'mtx_unlock_flag= s_' __mtx_unlock((m), curthread, (opts), (file), (line)) ^ /usr/src/sys/sys/mutex.h:236:26: note: expanded from macro '__mtx_unlock' if (!_mtx_release_lock((mp), _tid)) \ ^ /usr/src/sys/sys/mutex.h:172:26: note: expanded from macro '_mtx_release_lo= ck' atomic_cmpset_rel_ptr(&(mp)->mtx_lock, (tid), MTX_UNOWNED) ^ /usr/src/sys/kern/kern_descrip.c:340:14: error: use of undeclared identifie= r 'p' /usr/src/sys/sys/proc.h:780:37: note: expanded from macro 'PROC_UNLOCK' #define PROC_UNLOCK(p) mtx_unlock(&(p)->p_mtx) ^ /usr/src/sys/sys/mutex.h:308:42: note: expanded from macro 'mtx_unlock' #define mtx_unlock(m) mtx_unlock_flags((m), 0) ^ /usr/src/sys/sys/mutex.h:368:21: note: expanded from macro 'mtx_unlock_flag= s' mtx_unlock_flags_((m), (opts), LOCK_FILE, LOCK_LINE) ^ /usr/src/sys/sys/mutex.h:347:16: note: expanded from macro 'mtx_unlock_flag= s_' __mtx_unlock((m), curthread, (opts), (file), (line)) ^ /usr/src/sys/sys/mutex.h:237:22: note: expanded from macro '__mtx_unlock' _mtx_unlock_sleep((mp), (opts), (file), (line)); \ ^ /usr/src/sys/sys/mutex.h:144:23: note: expanded from macro '_mtx_unlock_sle= ep' __mtx_unlock_sleep(&(m)->mtx_lock, o, f, l) ^ 7 errors generated. *** [kern_descrip.o] Error code 1 make[2]: stopped in /media/da0s1/obj/usr/src/sys/mk11 --- kern_exec.o --- ctfconvert -L VERSION -g kern_exec.o --- kern_exit.o --- ctfconvert -L VERSION -g kern_exit.o --- kern_fork.o --- ctfconvert -L VERSION -g kern_fork.o 1 error make[2]: stopped in /media/da0s1/obj/usr/src/sys/mk11 *** [buildkernel] Error code 2 make[1]: stopped in /usr/src 1 error make[1]: stopped in /usr/src *** [buildkernel] Error code 2 make: stopped in /usr/src 1 error make: stopped in /usr/src From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 12:28:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDFC0A4C; Wed, 10 Jun 2015 12:28:07 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv158.fwdcdn.com (frv158.fwdcdn.com [212.42.77.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1606910CA; Wed, 10 Jun 2015 12:28:07 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=v7K7V2nfGNmEcOBv6OeFWVGjOHwEGyuhwPCk1PatgH4=; b=QC5pesDseGibPLDmoCdDLGipKOW9F3BR01EnyWrLUHu+3gg0xJINagH/WPGDfbLz4DuTmTPZtX0/ftEd8Ft9H7WsqMTAKbE/vO73QOIMBv5Zi/F1opPtXIFmviBPtpzrMftsbbNdpu51dMM4xYmTi9LtQcRPLfNdXcp4BBSea2s=; Received: from [134.249.91.180] (helo=nonamehost.local) by frv158.fwdcdn.com with esmtpsa ID 1Z2f6y-0003G7-MX ; Wed, 10 Jun 2015 15:28:04 +0300 Date: Wed, 10 Jun 2015 15:28:03 +0300 From: Ivan Klymenko To: Mateusz Guzik Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm Message-ID: <20150610152803.2f9e4276@nonamehost.local> In-Reply-To: <20150610151613.1176c1e3@nonamehost.local> References: <201506101048.t5AAmD1O029382@svn.freebsd.org> <20150610151613.1176c1e3@nonamehost.local> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Result: IP=134.249.91.180; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 12:28:08 -0000 Wed, 10 Jun 2015 15:16:13 +0300 Ivan Klymenko =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=B2: > Wed, 10 Jun 2015 10:48:13 +0000 (UTC) > Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0= =B2: >=20 > > Author: mjg > > Date: Wed Jun 10 10:48:12 2015 > > New Revision: 284215 > > URL: https://svnweb.freebsd.org/changeset/base/284215 > >=20 > > Log: > > Implement lockless resource limits. > > =20 > > Use the same scheme implemented to manage credentials. > > =20 > > Code needing to look at process's credentials (as opposed to > > thred's) is provided with *_proc variants of relevant functions. > > =20 > > Places which possibly had to take the proc lock anyway still use > > the proc pointer to access limits. > >=20 > > Modified: > > head/sys/amd64/linux32/linux32_machdep.c > > head/sys/compat/linux/linux_misc.c > > head/sys/compat/svr4/imgact_svr4.c > > head/sys/compat/svr4/svr4_misc.c > > head/sys/compat/svr4/svr4_resource.c > > head/sys/dev/drm2/i915/i915_gem.c > > head/sys/fs/fdescfs/fdesc_vfsops.c > > head/sys/i386/ibcs2/ibcs2_misc.c > > head/sys/i386/linux/imgact_linux.c > > head/sys/i386/linux/linux_machdep.c > > head/sys/kern/imgact_aout.c > > head/sys/kern/imgact_elf.c > > head/sys/kern/imgact_gzip.c > > head/sys/kern/kern_descrip.c > > head/sys/kern/kern_event.c > > head/sys/kern/kern_exec.c > > head/sys/kern/kern_fork.c > > head/sys/kern/kern_proc.c > > head/sys/kern/kern_resource.c > > head/sys/kern/kern_sig.c > > head/sys/kern/kern_syscalls.c > > head/sys/kern/kern_thread.c > > head/sys/kern/subr_uio.c > > head/sys/kern/sysv_shm.c > > head/sys/kern/tty_pts.c > > head/sys/kern/uipc_sockbuf.c > > head/sys/kern/vfs_vnops.c > > head/sys/ofed/drivers/infiniband/core/umem.c > > head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c > > head/sys/sys/proc.h > > head/sys/sys/resourcevar.h > > head/sys/sys/vnode.h > > head/sys/vm/swap_pager.c > > head/sys/vm/vm_map.c > > head/sys/vm/vm_mmap.c > > head/sys/vm/vm_pageout.c > > head/sys/vm/vm_unix.c > >=20 > > ... >=20 > /head/sys/amd64/linux/linux_machdep.c > --- linux_machdep.c.orig 2015-06-10 14:57:12.171984000 +0300 > +++ linux_machdep.c 2015-06-10 14:57:22.662331000 +0300 > @@ -251,7 +251,7 @@ > */ > PROC_LOCK(p); > p->p_vmspace->vm_maxsaddr =3D (char *)USRSTACK - > - lim_cur(p, RLIMIT_STACK); > + lim_cur_proc(p, RLIMIT_STACK); > PROC_UNLOCK(p); > } >=20 > must also change because: > ... > --- linux_stats.o --- > /usr/local/libexec/ccache/world/cc -target x86_64-unknown-freebsd11.0 > --sysroot=3D/media/da0s1/obj/usr/src/tmp > -B/media/da0s1/obj/usr/src/tmp/usr/bin -O2 -pipe > -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc > -DHAVE_KERNEL_OPTION_HEADERS > -include /media/da0s1/obj/usr/src/sys/mk11/opt_global.h -I. > -I/usr/src/sys -fno-common -g -fno-omit-frame-pointer > -mno-omit-leaf-frame-pointer -I/media/da0s1/obj/usr/src/sys/mk11 > -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float > -fno-asynchronous-unwind-tables -ffreestanding -fwrapv > -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs > -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline > -Wcast-qual -Wundef -Wno-pointer-sign > -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs > -fdiagnostics-show-option -Wno-unknown-pragmas > -Wno-error-tautological-compare -Wno-error-empty-body > -Wno-error-parentheses-equality -Wno-error-unused-function > -Wno-error-pointer-sign -mno-aes -mno-avx -std=3Diso9899:1999 > -c /usr/src/sys/modules/linux64/../../compat/linux/linux_stats.c -o > linux_stats.o --- linux_machdep.o --- distcc[26181] ERROR: > compile /usr/src/sys/modules/linux64/../../amd64/linux/linux_machdep.c > on localhost > failed /usr/src/sys/modules/linux64/../../amd64/linux/linux_machdep.c:254= :16: > error: incompatible pointer types passing 'struct proc *' to > parameter of type 'struct thread > *' [-Werror,-Wincompatible-pointer-types] lim_cur(p, RLIMIT_STACK); > ^ /usr/src/sys/sys/resourcevar.h:133:32: note: passing argument to > parameter 'td' here rlim_t lim_cur(struct thread *td, int which); ^ > 1 error generated. *** [linux_machdep.o] Error code 1 >=20 > make[4]: stopped in /usr/src/sys/modules/linux64 > --- linux_stats.o --- > ctfconvert -L VERSION -g linux_stats.o > --- linux_file.o --- > ctfconvert -L VERSION -g linux_file.o > --- linux_misc.o --- > ctfconvert -L VERSION -g linux_misc.o > 1 error >=20 > make[4]: stopped in /usr/src/sys/modules/linux64 > *** [all_subdir_linux64] Error code 2 >=20 > make[3]: stopped in /usr/src/sys/modules > --- all_subdir_mac_lomac --- > ctfconvert -L VERSION -g mac_lomac.o > A failure has been detected in another branch of the parallel make >=20 > make[4]: stopped in /usr/src/sys/modules/mac_lomac > *** [all_subdir_mac_lomac] Error code 2 >=20 > make[3]: stopped in /usr/src/sys/modules > 2 errors >=20 > make[3]: stopped in /usr/src/sys/modules > *** [modules-all] Error code 2 >=20 > make[2]: stopped in /media/da0s1/obj/usr/src/sys/mk11 > 1 error >=20 > make[2]: stopped in /media/da0s1/obj/usr/src/sys/mk11 > *** [buildkernel] Error code 2 >=20 > make[1]: stopped in /usr/src > 1 error >=20 > make[1]: stopped in /usr/src > *** [buildkernel] Error code 2 >=20 > make: stopped in /usr/src > 1 error >=20 > make: stopped in /usr/src >=20 >=20 >=20 >=20 > and something must be changed >=20 >=20 > /usr/local/libexec/ccache/world/cc -target x86_64-unknown-freebsd11.0 > --sysroot=3D/media/da0s1/obj/usr/src/tmp > -B/media/da0s1/obj/usr/src/tmp/usr/bin -c -O2 -pipe > -fno-strict-aliasing -g -nostdinc -I. -I/usr/src/sys > -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS > -include opt_global.h -fno-omit-frame-pointer > -mno-omit-leaf-frame-pointer -mcmodel=3Dkernel -mno-red-zone -mno-mmx > -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding > -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes > -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign > -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs > -fdiagnostics-show-option -Wno-unknown-pragmas > -Wno-error-tautological-compare -Wno-error-empty-body > -Wno-error-parentheses-equality -Wno-error-unused-function > -Wno-error-pointer-sign -mno-aes -mno-avx -std=3Diso9899:1999 > -Werror /usr/src/sys/kern/kern_fork.c --- kern_cons.o --- ctfconvert > -L VERSION -g kern_cons.o --- kern_descrip.o --- distcc[27122] ERROR: > compile /usr/src/sys/kern/kern_descrip.c on localhost > failed /usr/src/sys/kern/kern_descrip.c:338:12: error: use of > undeclared identifier 'p' PROC_LOCK(p); > ^ /usr/src/sys/sys/proc.h:778:33: note: expanded from macro > 'PROC_LOCK' #define PROC_LOCK(p) mtx_lock(&(p)->p_mtx) > ^ /usr/src/sys/sys/mutex.h:305:38: note: expanded from macro > 'mtx_lock' #define mtx_lock(m) mtx_lock_flags((m), 0) > ^ /usr/src/sys/sys/mutex.h:366:19: note: expanded from macro > 'mtx_lock_flags' mtx_lock_flags_((m), (opts), LOCK_FILE, LOCK_LINE) > ^ /usr/src/sys/sys/mutex.h:345:14: note: expanded from macro > 'mtx_lock_flags_' __mtx_lock((m), curthread, (opts), (file), (line)) > ^ /usr/src/sys/sys/mutex.h:188:25: note: expanded from macro > '__mtx_lock' if (!_mtx_obtain_lock((mp), > _tid)) \ > ^ /usr/src/sys/sys/mutex.h:168:26: note: expanded from macro > '_mtx_obtain_lock' atomic_cmpset_acq_ptr(&(mp)->mtx_lock, > MTX_UNOWNED, (tid)) ^ /usr/src/sys/kern/kern_descrip.c:338:12: error: > use of undeclared identifier 'p' /usr/src/sys/sys/proc.h:778:33: > note: expanded from macro 'PROC_LOCK' #define PROC_LOCK(p) > mtx_lock(&(p)->p_mtx) ^ /usr/src/sys/sys/mutex.h:305:38: note: > expanded from macro 'mtx_lock' #define mtx_lock(m) > mtx_lock_flags((m), 0) ^ /usr/src/sys/sys/mutex.h:366:19: note: > expanded from macro 'mtx_lock_flags' mtx_lock_flags_((m), (opts), > LOCK_FILE, LOCK_LINE) ^ /usr/src/sys/sys/mutex.h:345:14: note: > expanded from macro 'mtx_lock_flags_' __mtx_lock((m), curthread, > (opts), (file), (line)) ^ /usr/src/sys/sys/mutex.h:189:20: note: > expanded from macro '__mtx_lock' _mtx_lock_sleep((mp), _tid, (opts), > (file), (line)); \ ^ /usr/src/sys/sys/mutex.h:142:21: note: > expanded from macro '_mtx_lock_sleep' > __mtx_lock_sleep(&(m)->mtx_lock, t, o, f, l) > ^ /usr/src/sys/kern/kern_descrip.c:338:12: error: use of undeclared > identifier 'p' /usr/src/sys/sys/proc.h:778:33: note: expanded from > macro 'PROC_LOCK' #define PROC_LOCK(p) mtx_lock(&(p)->p_mtx) > ^ /usr/src/sys/sys/mutex.h:305:38: note: expanded from macro > 'mtx_lock' #define mtx_lock(m) mtx_lock_flags((m), 0) > ^ /usr/src/sys/sys/mutex.h:366:19: note: expanded from macro > 'mtx_lock_flags' mtx_lock_flags_((m), (opts), LOCK_FILE, LOCK_LINE) ^ > /usr/src/sys/sys/mutex.h:345:14: note: expanded from macro > 'mtx_lock_flags_' __mtx_lock((m), curthread, (opts), (file), (line)) > ^ > /usr/src/sys/sys/mutex.h:192:7: note: expanded from macro '__mtx_lock' > mp, 0, 0, (file), > (line)); \ ^ > /usr/src/sys/sys/lockstat.h:190:42: note: expanded from macro > 'LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS' (*lockstat_probe_func)(id, > (uintptr_t)(lp), 0, 0, 0, 0); \ ^ > /usr/src/sys/kern/kern_descrip.c:340:14: error: use of undeclared > identifier 'p' PROC_UNLOCK(p); > ^ > /usr/src/sys/sys/proc.h:780:37: note: expanded from macro > 'PROC_UNLOCK' #define PROC_UNLOCK(p) mtx_unlock(&(p)->p_mtx) > ^ > /usr/src/sys/sys/mutex.h:308:42: note: expanded from macro > 'mtx_unlock' #define mtx_unlock(m) mtx_unlock_flags((m), 0) > ^ > /usr/src/sys/sys/mutex.h:368:21: note: expanded from macro > 'mtx_unlock_flags' mtx_unlock_flags_((m), (opts), LOCK_FILE, > LOCK_LINE) ^ > /usr/src/sys/sys/mutex.h:347:16: note: expanded from macro > 'mtx_unlock_flags_' __mtx_unlock((m), curthread, (opts), (file), > (line)) ^ > /usr/src/sys/sys/mutex.h:233:7: note: expanded from macro > '__mtx_unlock' if ((mp)->mtx_recurse =3D=3D > 0) \ ^ > /usr/src/sys/kern/kern_descrip.c:340:14: error: use of undeclared > identifier 'p' /usr/src/sys/sys/proc.h:780:37: note: expanded from > macro 'PROC_UNLOCK' #define PROC_UNLOCK(p) mtx_unlock(&(p)->p_mtx) > ^ > /usr/src/sys/sys/mutex.h:308:42: note: expanded from macro > 'mtx_unlock' #define mtx_unlock(m) mtx_unlock_flags((m), 0) > ^ > /usr/src/sys/sys/mutex.h:368:21: note: expanded from macro > 'mtx_unlock_flags' mtx_unlock_flags_((m), (opts), LOCK_FILE, > LOCK_LINE) ^ > /usr/src/sys/sys/mutex.h:347:16: note: expanded from macro > 'mtx_unlock_flags_' __mtx_unlock((m), curthread, (opts), (file), > (line)) ^ > /usr/src/sys/sys/mutex.h:235:8: note: expanded from macro > '__mtx_unlock' (mp)); \ > ^ > /usr/src/sys/sys/lockstat.h:198:42: note: expanded from macro > 'LOCKSTAT_PROFILE_RELEASE_LOCK' (*lockstat_probe_func)(id, > (uintptr_t)(lp), 0, 0, 0, 0); \ ^ > /usr/src/sys/kern/kern_descrip.c:340:14: error: use of undeclared > identifier 'p' /usr/src/sys/sys/proc.h:780:37: note: expanded from > macro 'PROC_UNLOCK' #define PROC_UNLOCK(p) mtx_unlock(&(p)->p_mtx) > ^ > /usr/src/sys/sys/mutex.h:308:42: note: expanded from macro > 'mtx_unlock' #define mtx_unlock(m) mtx_unlock_flags((m), 0) > ^ > /usr/src/sys/sys/mutex.h:368:21: note: expanded from macro > 'mtx_unlock_flags' mtx_unlock_flags_((m), (opts), LOCK_FILE, > LOCK_LINE) ^ > /usr/src/sys/sys/mutex.h:347:16: note: expanded from macro > 'mtx_unlock_flags_' __mtx_unlock((m), curthread, (opts), (file), > (line)) ^ > /usr/src/sys/sys/mutex.h:236:26: note: expanded from macro > '__mtx_unlock' if (!_mtx_release_lock((mp), > _tid)) \ ^ > /usr/src/sys/sys/mutex.h:172:26: note: expanded from macro > '_mtx_release_lock' atomic_cmpset_rel_ptr(&(mp)->mtx_lock, (tid), > MTX_UNOWNED) ^ > /usr/src/sys/kern/kern_descrip.c:340:14: error: use of undeclared > identifier 'p' /usr/src/sys/sys/proc.h:780:37: note: expanded from > macro 'PROC_UNLOCK' #define PROC_UNLOCK(p) mtx_unlock(&(p)->p_mtx) > ^ > /usr/src/sys/sys/mutex.h:308:42: note: expanded from macro > 'mtx_unlock' #define mtx_unlock(m) mtx_unlock_flags((m), 0) > ^ > /usr/src/sys/sys/mutex.h:368:21: note: expanded from macro > 'mtx_unlock_flags' mtx_unlock_flags_((m), (opts), LOCK_FILE, > LOCK_LINE) ^ > /usr/src/sys/sys/mutex.h:347:16: note: expanded from macro > 'mtx_unlock_flags_' __mtx_unlock((m), curthread, (opts), (file), > (line)) ^ > /usr/src/sys/sys/mutex.h:237:22: note: expanded from macro > '__mtx_unlock' _mtx_unlock_sleep((mp), (opts), (file), > (line)); \ ^ > /usr/src/sys/sys/mutex.h:144:23: note: expanded from macro > '_mtx_unlock_sleep' __mtx_unlock_sleep(&(m)->mtx_lock, o, f, l) > ^ > 7 errors generated. > *** [kern_descrip.o] Error code 1 >=20 > make[2]: stopped in /media/da0s1/obj/usr/src/sys/mk11 > --- kern_exec.o --- > ctfconvert -L VERSION -g kern_exec.o > --- kern_exit.o --- > ctfconvert -L VERSION -g kern_exit.o > --- kern_fork.o --- > ctfconvert -L VERSION -g kern_fork.o > 1 error >=20 > make[2]: stopped in /media/da0s1/obj/usr/src/sys/mk11 > *** [buildkernel] Error code 2 >=20 > make[1]: stopped in /usr/src > 1 error >=20 > make[1]: stopped in /usr/src > *** [buildkernel] Error code 2 >=20 > make: stopped in /usr/src > 1 error >=20 > make: stopped in /usr/src --- kern_descrip.c.orig 2015-06-10 15:26:41.858458000 +0300 +++ kern_descrip.c 2015-06-10 15:26:50.484285000 +0300 @@ -329,6 +329,7 @@ sys_getdtablesize(struct thread *td, struct getdtablesize_args *uap) { #ifdef RACCT + struct proc *p =3D td->td_proc; uint64_t lim; #endif From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 12:39:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A749EB6; Wed, 10 Jun 2015 12:39:02 +0000 (UTC) (envelope-from mjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 185B413D9; Wed, 10 Jun 2015 12:39:02 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5ACd1nL084519; Wed, 10 Jun 2015 12:39:01 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5ACd1mf084513; Wed, 10 Jun 2015 12:39:01 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201506101239.t5ACd1mf084513@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 10 Jun 2015 12:39:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284217 - in head/sys: amd64/linux kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 12:39:02 -0000 Author: mjg Date: Wed Jun 10 12:39:01 2015 New Revision: 284217 URL: https://svnweb.freebsd.org/changeset/base/284217 Log: Fixup the build after r284215. Submitted by: Ivan Klymenko [slighly modified] Modified: head/sys/amd64/linux/linux_machdep.c head/sys/kern/kern_descrip.c Modified: head/sys/amd64/linux/linux_machdep.c ============================================================================== --- head/sys/amd64/linux/linux_machdep.c Wed Jun 10 12:17:19 2015 (r284216) +++ head/sys/amd64/linux/linux_machdep.c Wed Jun 10 12:39:01 2015 (r284217) @@ -251,7 +251,7 @@ linux_mmap2(struct thread *td, struct li */ PROC_LOCK(p); p->p_vmspace->vm_maxsaddr = (char *)USRSTACK - - lim_cur(p, RLIMIT_STACK); + lim_cur_proc(p, RLIMIT_STACK); PROC_UNLOCK(p); } Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Jun 10 12:17:19 2015 (r284216) +++ head/sys/kern/kern_descrip.c Wed Jun 10 12:39:01 2015 (r284217) @@ -335,9 +335,9 @@ sys_getdtablesize(struct thread *td, str td->td_retval[0] = min((int)lim_cur(td, RLIMIT_NOFILE), maxfilesperproc); #ifdef RACCT - PROC_LOCK(p); + PROC_LOCK(td->td_proc); lim = racct_get_limit(td->td_proc, RACCT_NOFILE); - PROC_UNLOCK(p); + PROC_UNLOCK(td->td_proc); if (lim < td->td_retval[0]) td->td_retval[0] = lim; #endif From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 12:40:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB672E1; Wed, 10 Jun 2015 12:40:00 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BD1E143F; Wed, 10 Jun 2015 12:40:00 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wiga1 with SMTP id a1so47008128wig.0; Wed, 10 Jun 2015 05:39:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=bgYxR//ul1/tOqgmXdRnFPaH29MUFp3j9vGMD0BNA4I=; b=p2++jogjKIlnxPrZ+hIIUmSPSotz25IwuwyAQtMEvXIVh4l51gCcdM9JJS5dxMzVo2 A+huH39CDYE7l1+3VkuASfkF/eng5has+5DofV3r2d8dGdfBWoLL9bmqFhyhAwP6hkhk gfRopujowedPlynkpoxZdDcnGGUPIgamOIfirfYc84MInu1/YS1g13w3hyqVsUrrcJB/ 7m3hWynVSk/A8NCkBLSds0LWCQ+4MnV3nmy4UcIxLUINKI04hWvJRvu/S+9ZAOGZagpg qpNwlcl9/XKXxHpFcxHaZye1Y3JbL3o0gMju5rPu8lg+H7jrwqzkUTEzDw/5CjBeSIqA C8bA== X-Received: by 10.181.13.5 with SMTP id eu5mr18121462wid.37.1433939998502; Wed, 10 Jun 2015 05:39:58 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id gj7sm7798289wib.4.2015.06.10.05.39.55 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 10 Jun 2015 05:39:56 -0700 (PDT) Date: Wed, 10 Jun 2015 14:39:53 +0200 From: Mateusz Guzik To: Ivan Klymenko Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm Message-ID: <20150610123953.GB23380@dft-labs.eu> References: <201506101048.t5AAmD1O029382@svn.freebsd.org> <20150610151613.1176c1e3@nonamehost.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150610151613.1176c1e3@nonamehost.local> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 12:40:00 -0000 On Wed, Jun 10, 2015 at 03:16:13PM +0300, Ivan Klymenko wrote: > Wed, 10 Jun 2015 10:48:13 +0000 (UTC) > Mateusz Guzik напиÑав: > > > Author: mjg > > Date: Wed Jun 10 10:48:12 2015 > > New Revision: 284215 > > URL: https://svnweb.freebsd.org/changeset/base/284215 > > > > Log: > > Implement lockless resource limits. > > > > Use the same scheme implemented to manage credentials. > > > > Code needing to look at process's credentials (as opposed to > > thred's) is provided with *_proc variants of relevant functions. > > > > Places which possibly had to take the proc lock anyway still use > > the proc pointer to access limits. > > > /usr/src/sys/modules/linux64/../../amd64/linux/linux_machdep.c:254:16: error: incompatible pointer types passing 'struct proc *' to parameter of type 'struct thread *' [-Werror,-Wincompatible-pointer-types] > lim_cur(p, RLIMIT_STACK); > ^ > /usr/src/sys/sys/resourcevar.h:133:32: note: passing argument to parameter 'td' here > rlim_t lim_cur(struct thread *td, int which); > ^ Oops, thanks. Fixed in r284217. -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 12:42:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AA71345; Wed, 10 Jun 2015 12:42:32 +0000 (UTC) (envelope-from br@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1820C167E; Wed, 10 Jun 2015 12:42:32 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5ACgWZD088898; Wed, 10 Jun 2015 12:42:32 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5ACgUTV088893; Wed, 10 Jun 2015 12:42:30 GMT (envelope-from br@FreeBSD.org) Message-Id: <201506101242.t5ACgUTV088893@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 10 Jun 2015 12:42:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284218 - in head: lib/libpmc sys/dev/hwpmc sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 12:42:32 -0000 Author: br Date: Wed Jun 10 12:42:30 2015 New Revision: 284218 URL: https://svnweb.freebsd.org/changeset/base/284218 Log: o Rework ARMv7 events list using aliases - same way as we have for arm64. o Extend it with Cortex A9-specific events. Modified: head/lib/libpmc/libpmc.c head/sys/dev/hwpmc/hwpmc_armv7.c head/sys/dev/hwpmc/hwpmc_armv7.h head/sys/dev/hwpmc/pmc_events.h head/sys/sys/pmc.h Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Wed Jun 10 12:39:01 2015 (r284217) +++ head/lib/libpmc/libpmc.c Wed Jun 10 12:42:30 2015 (r284218) @@ -268,6 +268,16 @@ static const struct pmc_event_descr west __PMC_EV_ALIAS_WESTMEREUC() }; +static const struct pmc_event_descr cortex_a8_event_table[] = +{ + __PMC_EV_ALIAS_ARMV7_CORTEX_A8() +}; + +static const struct pmc_event_descr cortex_a9_event_table[] = +{ + __PMC_EV_ALIAS_ARMV7_CORTEX_A9() +}; + static const struct pmc_event_descr cortex_a53_event_table[] = { __PMC_EV_ALIAS_ARMV8_CORTEX_A53() @@ -308,7 +318,8 @@ PMC_MDEP_TABLE(p4, P4, PMC_CLASS_SOFT, P PMC_MDEP_TABLE(p5, P5, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(p6, P6, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_SOFT, PMC_CLASS_XSCALE); -PMC_MDEP_TABLE(armv7, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7); +PMC_MDEP_TABLE(cortex_a8, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7); +PMC_MDEP_TABLE(cortex_a9, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7); PMC_MDEP_TABLE(cortex_a53, ARMV8, PMC_CLASS_SOFT, PMC_CLASS_ARMV8); PMC_MDEP_TABLE(cortex_a57, ARMV8, PMC_CLASS_SOFT, PMC_CLASS_ARMV8); PMC_MDEP_TABLE(mips24k, MIPS24K, PMC_CLASS_SOFT, PMC_CLASS_MIPS24K); @@ -377,7 +388,8 @@ PMC_CLASS_TABLE_DESC(tsc, TSC, tsc, tsc) #if defined(__XSCALE__) PMC_CLASS_TABLE_DESC(xscale, XSCALE, xscale, xscale); #endif -PMC_CLASS_TABLE_DESC(armv7, ARMV7, armv7, armv7); +PMC_CLASS_TABLE_DESC(cortex_a8, ARMV7, cortex_a9, armv7); +PMC_CLASS_TABLE_DESC(cortex_a9, ARMV7, cortex_a9, armv7); #endif #if defined(__aarch64__) PMC_CLASS_TABLE_DESC(cortex_a53, ARMV8, cortex_a53, arm64); @@ -2436,12 +2448,20 @@ xscale_allocate_pmc(enum pmc_event pe, c } #endif -static struct pmc_event_alias armv7_aliases[] = { +static struct pmc_event_alias cortex_a8_aliases[] = { + EV_ALIAS("dc-misses", "L1_DCACHE_REFILL"), + EV_ALIAS("ic-misses", "L1_ICACHE_REFILL"), + EV_ALIAS("instructions", "INSTR_EXECUTED"), + EV_ALIAS(NULL, NULL) +}; + +static struct pmc_event_alias cortex_a9_aliases[] = { EV_ALIAS("dc-misses", "L1_DCACHE_REFILL"), EV_ALIAS("ic-misses", "L1_ICACHE_REFILL"), EV_ALIAS("instructions", "INSTR_EXECUTED"), EV_ALIAS(NULL, NULL) }; + static int armv7_allocate_pmc(enum pmc_event pe, char *ctrspec __unused, struct pmc_op_pmcallocate *pmc_config __unused) @@ -2981,8 +3001,17 @@ pmc_event_names_of_class(enum pmc_class count = PMC_EVENT_TABLE_SIZE(xscale); break; case PMC_CLASS_ARMV7: - ev = armv7_event_table; - count = PMC_EVENT_TABLE_SIZE(armv7); + switch (cpu_info.pm_cputype) { + default: + case PMC_CPU_ARMV7_CORTEX_A8: + ev = cortex_a8_event_table; + count = PMC_EVENT_TABLE_SIZE(cortex_a8); + break; + case PMC_CPU_ARMV7_CORTEX_A9: + ev = cortex_a9_event_table; + count = PMC_EVENT_TABLE_SIZE(cortex_a9); + break; + } break; case PMC_CLASS_ARMV8: switch (cpu_info.pm_cputype) { @@ -3289,9 +3318,13 @@ pmc_init(void) pmc_class_table[n] = &xscale_class_table_descr; break; #endif - case PMC_CPU_ARMV7: - PMC_MDEP_INIT(armv7); - pmc_class_table[n] = &armv7_class_table_descr; + case PMC_CPU_ARMV7_CORTEX_A8: + PMC_MDEP_INIT(cortex_a8); + pmc_class_table[n] = &cortex_a8_class_table_descr; + break; + case PMC_CPU_ARMV7_CORTEX_A9: + PMC_MDEP_INIT(cortex_a9); + pmc_class_table[n] = &cortex_a9_class_table_descr; break; #endif #if defined(__aarch64__) @@ -3515,8 +3548,18 @@ _pmc_name_of_event(enum pmc_event pe, en ev = xscale_event_table; evfence = xscale_event_table + PMC_EVENT_TABLE_SIZE(xscale); } else if (pe >= PMC_EV_ARMV7_FIRST && pe <= PMC_EV_ARMV7_LAST) { - ev = armv7_event_table; - evfence = armv7_event_table + PMC_EVENT_TABLE_SIZE(armv7); + switch (cpu) { + case PMC_CPU_ARMV7_CORTEX_A8: + ev = cortex_a8_event_table; + evfence = cortex_a8_event_table + PMC_EVENT_TABLE_SIZE(cortex_a8); + break; + case PMC_CPU_ARMV7_CORTEX_A9: + ev = cortex_a9_event_table; + evfence = cortex_a9_event_table + PMC_EVENT_TABLE_SIZE(cortex_a9); + break; + default: /* Unknown CPU type. */ + break; + } } else if (pe >= PMC_EV_ARMV8_FIRST && pe <= PMC_EV_ARMV8_LAST) { switch (cpu) { case PMC_CPU_ARMV8_CORTEX_A53: Modified: head/sys/dev/hwpmc/hwpmc_armv7.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_armv7.c Wed Jun 10 12:39:01 2015 (r284217) +++ head/sys/dev/hwpmc/hwpmc_armv7.c Wed Jun 10 12:42:30 2015 (r284218) @@ -39,9 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define CPU_ID_CORTEX_VER_MASK 0xff -#define CPU_ID_CORTEX_VER_SHIFT 4 - static int armv7_npmcs; struct armv7_event_code_map { @@ -49,49 +46,11 @@ struct armv7_event_code_map { uint8_t pe_code; }; -const struct armv7_event_code_map armv7_event_codes[] = { - { PMC_EV_ARMV7_PMNC_SW_INCR, 0x00 }, - { PMC_EV_ARMV7_L1_ICACHE_REFILL, 0x01 }, - { PMC_EV_ARMV7_ITLB_REFILL, 0x02 }, - { PMC_EV_ARMV7_L1_DCACHE_REFILL, 0x03 }, - { PMC_EV_ARMV7_L1_DCACHE_ACCESS, 0x04 }, - { PMC_EV_ARMV7_DTLB_REFILL, 0x05 }, - { PMC_EV_ARMV7_MEM_READ, 0x06 }, - { PMC_EV_ARMV7_MEM_WRITE, 0x07 }, - { PMC_EV_ARMV7_INSTR_EXECUTED, 0x08 }, - { PMC_EV_ARMV7_EXC_TAKEN, 0x09 }, - { PMC_EV_ARMV7_EXC_EXECUTED, 0x0A }, - { PMC_EV_ARMV7_CID_WRITE, 0x0B }, - { PMC_EV_ARMV7_PC_WRITE, 0x0C }, - { PMC_EV_ARMV7_PC_IMM_BRANCH, 0x0D }, - { PMC_EV_ARMV7_PC_PROC_RETURN, 0x0E }, - { PMC_EV_ARMV7_MEM_UNALIGNED_ACCESS, 0x0F }, - { PMC_EV_ARMV7_PC_BRANCH_MIS_PRED, 0x10 }, - { PMC_EV_ARMV7_CLOCK_CYCLES, 0x11 }, - { PMC_EV_ARMV7_PC_BRANCH_PRED, 0x12 }, - { PMC_EV_ARMV7_MEM_ACCESS, 0x13 }, - { PMC_EV_ARMV7_L1_ICACHE_ACCESS, 0x14 }, - { PMC_EV_ARMV7_L1_DCACHE_WB, 0x15 }, - { PMC_EV_ARMV7_L2_CACHE_ACCESS, 0x16 }, - { PMC_EV_ARMV7_L2_CACHE_REFILL, 0x17 }, - { PMC_EV_ARMV7_L2_CACHE_WB, 0x18 }, - { PMC_EV_ARMV7_BUS_ACCESS, 0x19 }, - { PMC_EV_ARMV7_MEM_ERROR, 0x1A }, - { PMC_EV_ARMV7_INSTR_SPEC, 0x1B }, - { PMC_EV_ARMV7_TTBR_WRITE, 0x1C }, - { PMC_EV_ARMV7_BUS_CYCLES, 0x1D }, - { PMC_EV_ARMV7_CPU_CYCLES, 0xFF }, -}; - -const int armv7_event_codes_size = - sizeof(armv7_event_codes) / sizeof(armv7_event_codes[0]); - /* * Per-processor information. */ struct armv7_cpu { struct pmc_hw *pc_armv7pmcs; - int cortex_ver; }; static struct armv7_cpu **armv7_pcpu; @@ -173,10 +132,10 @@ static int armv7_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a) { - uint32_t caps, config; struct armv7_cpu *pac; enum pmc_event pe; - int i; + uint32_t config; + uint32_t caps; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[armv7,%d] illegal CPU value %d", __LINE__, cpu)); @@ -190,18 +149,10 @@ armv7_allocate_pmc(int cpu, int ri, stru return (EINVAL); pe = a->pm_ev; - for (i = 0; i < armv7_event_codes_size; i++) { - if (armv7_event_codes[i].pe_ev == pe) { - config = armv7_event_codes[i].pe_code; - break; - } - } - if (i == armv7_event_codes_size) - return EINVAL; - + config = (pe & EVENT_ID_MASK); pm->pm_md.pm_armv7.pm_armv7_evsel = config; - PMCDBG2(MDP,ALL,2,"armv7-allocate ri=%d -> config=0x%x", ri, config); + PMCDBG2(MDP, ALL, 2, "armv7-allocate ri=%d -> config=0x%x", ri, config); return 0; } @@ -225,7 +176,7 @@ armv7_read_pmc(int cpu, int ri, pmc_valu else tmp = armv7_pmcn_read(ri); - PMCDBG2(MDP,REA,2,"armv7-read id=%d -> %jd", ri, tmp); + PMCDBG2(MDP, REA, 2, "armv7-read id=%d -> %jd", ri, tmp); if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) *v = ARMV7_PERFCTR_VALUE_TO_RELOAD_COUNT(tmp); else @@ -249,7 +200,7 @@ armv7_write_pmc(int cpu, int ri, pmc_val if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = ARMV7_RELOAD_COUNT_TO_PERFCTR_VALUE(v); - PMCDBG3(MDP,WRI,1,"armv7-write cpu=%d ri=%d v=%jx", cpu, ri, v); + PMCDBG3(MDP, WRI, 1, "armv7-write cpu=%d ri=%d v=%jx", cpu, ri, v); if (pm->pm_md.pm_armv7.pm_armv7_evsel == 0xFF) cp15_pmccntr_set(v); @@ -264,7 +215,7 @@ armv7_config_pmc(int cpu, int ri, struct { struct pmc_hw *phw; - PMCDBG3(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); + PMCDBG3(MDP, CFG, 1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[armv7,%d] illegal CPU value %d", __LINE__, cpu)); @@ -457,20 +408,15 @@ armv7_pcpu_init(struct pmc_mdep *md, int struct pmc_cpu *pc; uint32_t pmnc; int first_ri; - int cpuid; int i; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[armv7,%d] wrong cpu number %d", __LINE__, cpu)); - PMCDBG1(MDP,INI,1,"armv7-init cpu=%d", cpu); + PMCDBG1(MDP, INI, 1, "armv7-init cpu=%d", cpu); armv7_pcpu[cpu] = pac = malloc(sizeof(struct armv7_cpu), M_PMC, M_WAITOK|M_ZERO); - cpuid = cpu_ident(); - pac->cortex_ver = (cpuid >> CPU_ID_CORTEX_VER_SHIFT) & \ - CPU_ID_CORTEX_VER_MASK; - pac->pc_armv7pmcs = malloc(sizeof(struct pmc_hw) * armv7_npmcs, M_PMC, M_WAITOK|M_ZERO); pc = pmc_pcpu[cpu]; @@ -509,14 +455,15 @@ pmc_armv7_initialize() { struct pmc_mdep *pmc_mdep; struct pmc_classdep *pcd; + int idcode; int reg; reg = cp15_pmcr_get(); - armv7_npmcs = (reg >> ARMV7_PMNC_N_SHIFT) & \ ARMV7_PMNC_N_MASK; + idcode = (reg & ARMV7_IDCODE_MASK) >> ARMV7_IDCODE_SHIFT; - PMCDBG1(MDP,INI,1,"armv7-init npmcs=%d", armv7_npmcs); + PMCDBG1(MDP, INI, 1, "armv7-init npmcs=%d", armv7_npmcs); /* * Allocate space for pointers to PMC HW descriptors and for @@ -527,7 +474,20 @@ pmc_armv7_initialize() /* Just one class */ pmc_mdep = pmc_mdep_alloc(1); - pmc_mdep->pmd_cputype = PMC_CPU_ARMV7; + + switch (idcode) { + case ARMV7_IDCODE_CORTEX_A9: + pmc_mdep->pmd_cputype = PMC_CPU_ARMV7_CORTEX_A9; + break; + default: + case ARMV7_IDCODE_CORTEX_A8: + /* + * On A8 we implemented common events only, + * so use it for the rest of machines. + */ + pmc_mdep->pmd_cputype = PMC_CPU_ARMV7_CORTEX_A8; + break; + } pcd = &pmc_mdep->pmd_classdep[PMC_MDEP_CLASS_INDEX_ARMV7]; pcd->pcd_caps = ARMV7_PMC_CAPS; Modified: head/sys/dev/hwpmc/hwpmc_armv7.h ============================================================================== --- head/sys/dev/hwpmc/hwpmc_armv7.h Wed Jun 10 12:39:01 2015 (r284217) +++ head/sys/dev/hwpmc/hwpmc_armv7.h Wed Jun 10 12:42:30 2015 (r284218) @@ -48,9 +48,14 @@ #define ARMV7_PMNC_N_SHIFT 11 /* Number of counters implemented */ #define ARMV7_PMNC_N_MASK 0x1f #define ARMV7_PMNC_MASK 0x3f /* Writable bits */ +#define ARMV7_IDCODE_SHIFT 16 /* Identification code */ +#define ARMV7_IDCODE_MASK (0xff << ARMV7_IDCODE_SHIFT) +#define ARMV7_IDCODE_CORTEX_A9 9 +#define ARMV7_IDCODE_CORTEX_A8 8 #define ARMV7_RELOAD_COUNT_TO_PERFCTR_VALUE(R) (-(R)) #define ARMV7_PERFCTR_VALUE_TO_RELOAD_COUNT(P) (-(P)) +#define EVENT_ID_MASK 0xFF #ifdef _KERNEL /* MD extension for 'struct pmc' */ Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Wed Jun 10 12:39:01 2015 (r284217) +++ head/sys/dev/hwpmc/pmc_events.h Wed Jun 10 12:42:30 2015 (r284218) @@ -4766,41 +4766,342 @@ __PMC_EV_ALIAS("IMPC_C0H_TRK_REQUEST.ALL * ARMv7 Events */ -#define __PMC_EV_ARMV7() \ - __PMC_EV(ARMV7, PMNC_SW_INCR) \ - __PMC_EV(ARMV7, L1_ICACHE_REFILL) \ - __PMC_EV(ARMV7, ITLB_REFILL) \ - __PMC_EV(ARMV7, L1_DCACHE_REFILL) \ - __PMC_EV(ARMV7, L1_DCACHE_ACCESS) \ - __PMC_EV(ARMV7, DTLB_REFILL) \ - __PMC_EV(ARMV7, MEM_READ) \ - __PMC_EV(ARMV7, MEM_WRITE) \ - __PMC_EV(ARMV7, INSTR_EXECUTED) \ - __PMC_EV(ARMV7, EXC_TAKEN) \ - __PMC_EV(ARMV7, EXC_EXECUTED) \ - __PMC_EV(ARMV7, CID_WRITE) \ - __PMC_EV(ARMV7, PC_WRITE) \ - __PMC_EV(ARMV7, PC_IMM_BRANCH) \ - __PMC_EV(ARMV7, PC_PROC_RETURN) \ - __PMC_EV(ARMV7, MEM_UNALIGNED_ACCESS) \ - __PMC_EV(ARMV7, PC_BRANCH_MIS_PRED) \ - __PMC_EV(ARMV7, CLOCK_CYCLES) \ - __PMC_EV(ARMV7, PC_BRANCH_PRED) \ - __PMC_EV(ARMV7, MEM_ACCESS) \ - __PMC_EV(ARMV7, L1_ICACHE_ACCESS) \ - __PMC_EV(ARMV7, L1_DCACHE_WB) \ - __PMC_EV(ARMV7, L2_CACHE_ACCESS) \ - __PMC_EV(ARMV7, L2_CACHE_REFILL) \ - __PMC_EV(ARMV7, L2_CACHE_WB) \ - __PMC_EV(ARMV7, BUS_ACCESS) \ - __PMC_EV(ARMV7, MEM_ERROR) \ - __PMC_EV(ARMV7, INSTR_SPEC) \ - __PMC_EV(ARMV7, TTBR_WRITE) \ - __PMC_EV(ARMV7, BUS_CYCLES) \ - __PMC_EV(ARMV7, CPU_CYCLES) - -#define PMC_EV_ARMV7_FIRST PMC_EV_ARMV7_PMNC_SW_INCR -#define PMC_EV_ARMV7_LAST PMC_EV_ARMV7_CPU_CYCLES +#define __PMC_EV_ARMV7() \ + __PMC_EV(ARMV7, EVENT_00H) \ + __PMC_EV(ARMV7, EVENT_01H) \ + __PMC_EV(ARMV7, EVENT_02H) \ + __PMC_EV(ARMV7, EVENT_03H) \ + __PMC_EV(ARMV7, EVENT_04H) \ + __PMC_EV(ARMV7, EVENT_05H) \ + __PMC_EV(ARMV7, EVENT_06H) \ + __PMC_EV(ARMV7, EVENT_07H) \ + __PMC_EV(ARMV7, EVENT_08H) \ + __PMC_EV(ARMV7, EVENT_09H) \ + __PMC_EV(ARMV7, EVENT_0AH) \ + __PMC_EV(ARMV7, EVENT_0BH) \ + __PMC_EV(ARMV7, EVENT_0CH) \ + __PMC_EV(ARMV7, EVENT_0DH) \ + __PMC_EV(ARMV7, EVENT_0EH) \ + __PMC_EV(ARMV7, EVENT_0FH) \ + __PMC_EV(ARMV7, EVENT_10H) \ + __PMC_EV(ARMV7, EVENT_11H) \ + __PMC_EV(ARMV7, EVENT_12H) \ + __PMC_EV(ARMV7, EVENT_13H) \ + __PMC_EV(ARMV7, EVENT_14H) \ + __PMC_EV(ARMV7, EVENT_15H) \ + __PMC_EV(ARMV7, EVENT_16H) \ + __PMC_EV(ARMV7, EVENT_17H) \ + __PMC_EV(ARMV7, EVENT_18H) \ + __PMC_EV(ARMV7, EVENT_19H) \ + __PMC_EV(ARMV7, EVENT_1AH) \ + __PMC_EV(ARMV7, EVENT_1BH) \ + __PMC_EV(ARMV7, EVENT_1CH) \ + __PMC_EV(ARMV7, EVENT_1DH) \ + __PMC_EV(ARMV7, EVENT_1EH) \ + __PMC_EV(ARMV7, EVENT_1FH) \ + __PMC_EV(ARMV7, EVENT_20H) \ + __PMC_EV(ARMV7, EVENT_21H) \ + __PMC_EV(ARMV7, EVENT_22H) \ + __PMC_EV(ARMV7, EVENT_23H) \ + __PMC_EV(ARMV7, EVENT_24H) \ + __PMC_EV(ARMV7, EVENT_25H) \ + __PMC_EV(ARMV7, EVENT_26H) \ + __PMC_EV(ARMV7, EVENT_27H) \ + __PMC_EV(ARMV7, EVENT_28H) \ + __PMC_EV(ARMV7, EVENT_29H) \ + __PMC_EV(ARMV7, EVENT_2AH) \ + __PMC_EV(ARMV7, EVENT_2BH) \ + __PMC_EV(ARMV7, EVENT_2CH) \ + __PMC_EV(ARMV7, EVENT_2DH) \ + __PMC_EV(ARMV7, EVENT_2EH) \ + __PMC_EV(ARMV7, EVENT_2FH) \ + __PMC_EV(ARMV7, EVENT_30H) \ + __PMC_EV(ARMV7, EVENT_31H) \ + __PMC_EV(ARMV7, EVENT_32H) \ + __PMC_EV(ARMV7, EVENT_33H) \ + __PMC_EV(ARMV7, EVENT_34H) \ + __PMC_EV(ARMV7, EVENT_35H) \ + __PMC_EV(ARMV7, EVENT_36H) \ + __PMC_EV(ARMV7, EVENT_37H) \ + __PMC_EV(ARMV7, EVENT_38H) \ + __PMC_EV(ARMV7, EVENT_39H) \ + __PMC_EV(ARMV7, EVENT_3AH) \ + __PMC_EV(ARMV7, EVENT_3BH) \ + __PMC_EV(ARMV7, EVENT_3CH) \ + __PMC_EV(ARMV7, EVENT_3DH) \ + __PMC_EV(ARMV7, EVENT_3EH) \ + __PMC_EV(ARMV7, EVENT_3FH) \ + __PMC_EV(ARMV7, EVENT_40H) \ + __PMC_EV(ARMV7, EVENT_41H) \ + __PMC_EV(ARMV7, EVENT_42H) \ + __PMC_EV(ARMV7, EVENT_43H) \ + __PMC_EV(ARMV7, EVENT_44H) \ + __PMC_EV(ARMV7, EVENT_45H) \ + __PMC_EV(ARMV7, EVENT_46H) \ + __PMC_EV(ARMV7, EVENT_47H) \ + __PMC_EV(ARMV7, EVENT_48H) \ + __PMC_EV(ARMV7, EVENT_49H) \ + __PMC_EV(ARMV7, EVENT_4AH) \ + __PMC_EV(ARMV7, EVENT_4BH) \ + __PMC_EV(ARMV7, EVENT_4CH) \ + __PMC_EV(ARMV7, EVENT_4DH) \ + __PMC_EV(ARMV7, EVENT_4EH) \ + __PMC_EV(ARMV7, EVENT_4FH) \ + __PMC_EV(ARMV7, EVENT_50H) \ + __PMC_EV(ARMV7, EVENT_51H) \ + __PMC_EV(ARMV7, EVENT_52H) \ + __PMC_EV(ARMV7, EVENT_53H) \ + __PMC_EV(ARMV7, EVENT_54H) \ + __PMC_EV(ARMV7, EVENT_55H) \ + __PMC_EV(ARMV7, EVENT_56H) \ + __PMC_EV(ARMV7, EVENT_57H) \ + __PMC_EV(ARMV7, EVENT_58H) \ + __PMC_EV(ARMV7, EVENT_59H) \ + __PMC_EV(ARMV7, EVENT_5AH) \ + __PMC_EV(ARMV7, EVENT_5BH) \ + __PMC_EV(ARMV7, EVENT_5CH) \ + __PMC_EV(ARMV7, EVENT_5DH) \ + __PMC_EV(ARMV7, EVENT_5EH) \ + __PMC_EV(ARMV7, EVENT_5FH) \ + __PMC_EV(ARMV7, EVENT_60H) \ + __PMC_EV(ARMV7, EVENT_61H) \ + __PMC_EV(ARMV7, EVENT_62H) \ + __PMC_EV(ARMV7, EVENT_63H) \ + __PMC_EV(ARMV7, EVENT_64H) \ + __PMC_EV(ARMV7, EVENT_65H) \ + __PMC_EV(ARMV7, EVENT_66H) \ + __PMC_EV(ARMV7, EVENT_67H) \ + __PMC_EV(ARMV7, EVENT_68H) \ + __PMC_EV(ARMV7, EVENT_69H) \ + __PMC_EV(ARMV7, EVENT_6AH) \ + __PMC_EV(ARMV7, EVENT_6BH) \ + __PMC_EV(ARMV7, EVENT_6CH) \ + __PMC_EV(ARMV7, EVENT_6DH) \ + __PMC_EV(ARMV7, EVENT_6EH) \ + __PMC_EV(ARMV7, EVENT_6FH) \ + __PMC_EV(ARMV7, EVENT_70H) \ + __PMC_EV(ARMV7, EVENT_71H) \ + __PMC_EV(ARMV7, EVENT_72H) \ + __PMC_EV(ARMV7, EVENT_73H) \ + __PMC_EV(ARMV7, EVENT_74H) \ + __PMC_EV(ARMV7, EVENT_75H) \ + __PMC_EV(ARMV7, EVENT_76H) \ + __PMC_EV(ARMV7, EVENT_77H) \ + __PMC_EV(ARMV7, EVENT_78H) \ + __PMC_EV(ARMV7, EVENT_79H) \ + __PMC_EV(ARMV7, EVENT_7AH) \ + __PMC_EV(ARMV7, EVENT_7BH) \ + __PMC_EV(ARMV7, EVENT_7CH) \ + __PMC_EV(ARMV7, EVENT_7DH) \ + __PMC_EV(ARMV7, EVENT_7EH) \ + __PMC_EV(ARMV7, EVENT_7FH) \ + __PMC_EV(ARMV7, EVENT_80H) \ + __PMC_EV(ARMV7, EVENT_81H) \ + __PMC_EV(ARMV7, EVENT_82H) \ + __PMC_EV(ARMV7, EVENT_83H) \ + __PMC_EV(ARMV7, EVENT_84H) \ + __PMC_EV(ARMV7, EVENT_85H) \ + __PMC_EV(ARMV7, EVENT_86H) \ + __PMC_EV(ARMV7, EVENT_87H) \ + __PMC_EV(ARMV7, EVENT_88H) \ + __PMC_EV(ARMV7, EVENT_89H) \ + __PMC_EV(ARMV7, EVENT_8AH) \ + __PMC_EV(ARMV7, EVENT_8BH) \ + __PMC_EV(ARMV7, EVENT_8CH) \ + __PMC_EV(ARMV7, EVENT_8DH) \ + __PMC_EV(ARMV7, EVENT_8EH) \ + __PMC_EV(ARMV7, EVENT_8FH) \ + __PMC_EV(ARMV7, EVENT_90H) \ + __PMC_EV(ARMV7, EVENT_91H) \ + __PMC_EV(ARMV7, EVENT_92H) \ + __PMC_EV(ARMV7, EVENT_93H) \ + __PMC_EV(ARMV7, EVENT_94H) \ + __PMC_EV(ARMV7, EVENT_95H) \ + __PMC_EV(ARMV7, EVENT_96H) \ + __PMC_EV(ARMV7, EVENT_97H) \ + __PMC_EV(ARMV7, EVENT_98H) \ + __PMC_EV(ARMV7, EVENT_99H) \ + __PMC_EV(ARMV7, EVENT_9AH) \ + __PMC_EV(ARMV7, EVENT_9BH) \ + __PMC_EV(ARMV7, EVENT_9CH) \ + __PMC_EV(ARMV7, EVENT_9DH) \ + __PMC_EV(ARMV7, EVENT_9EH) \ + __PMC_EV(ARMV7, EVENT_9FH) \ + __PMC_EV(ARMV7, EVENT_A0H) \ + __PMC_EV(ARMV7, EVENT_A1H) \ + __PMC_EV(ARMV7, EVENT_A2H) \ + __PMC_EV(ARMV7, EVENT_A3H) \ + __PMC_EV(ARMV7, EVENT_A4H) \ + __PMC_EV(ARMV7, EVENT_A5H) \ + __PMC_EV(ARMV7, EVENT_A6H) \ + __PMC_EV(ARMV7, EVENT_A7H) \ + __PMC_EV(ARMV7, EVENT_A8H) \ + __PMC_EV(ARMV7, EVENT_A9H) \ + __PMC_EV(ARMV7, EVENT_AAH) \ + __PMC_EV(ARMV7, EVENT_ABH) \ + __PMC_EV(ARMV7, EVENT_ACH) \ + __PMC_EV(ARMV7, EVENT_ADH) \ + __PMC_EV(ARMV7, EVENT_AEH) \ + __PMC_EV(ARMV7, EVENT_AFH) \ + __PMC_EV(ARMV7, EVENT_B0H) \ + __PMC_EV(ARMV7, EVENT_B1H) \ + __PMC_EV(ARMV7, EVENT_B2H) \ + __PMC_EV(ARMV7, EVENT_B3H) \ + __PMC_EV(ARMV7, EVENT_B4H) \ + __PMC_EV(ARMV7, EVENT_B5H) \ + __PMC_EV(ARMV7, EVENT_B6H) \ + __PMC_EV(ARMV7, EVENT_B7H) \ + __PMC_EV(ARMV7, EVENT_B8H) \ + __PMC_EV(ARMV7, EVENT_B9H) \ + __PMC_EV(ARMV7, EVENT_BAH) \ + __PMC_EV(ARMV7, EVENT_BBH) \ + __PMC_EV(ARMV7, EVENT_BCH) \ + __PMC_EV(ARMV7, EVENT_BDH) \ + __PMC_EV(ARMV7, EVENT_BEH) \ + __PMC_EV(ARMV7, EVENT_BFH) \ + __PMC_EV(ARMV7, EVENT_C0H) \ + __PMC_EV(ARMV7, EVENT_C1H) \ + __PMC_EV(ARMV7, EVENT_C2H) \ + __PMC_EV(ARMV7, EVENT_C3H) \ + __PMC_EV(ARMV7, EVENT_C4H) \ + __PMC_EV(ARMV7, EVENT_C5H) \ + __PMC_EV(ARMV7, EVENT_C6H) \ + __PMC_EV(ARMV7, EVENT_C7H) \ + __PMC_EV(ARMV7, EVENT_C8H) \ + __PMC_EV(ARMV7, EVENT_C9H) \ + __PMC_EV(ARMV7, EVENT_CAH) \ + __PMC_EV(ARMV7, EVENT_CBH) \ + __PMC_EV(ARMV7, EVENT_CCH) \ + __PMC_EV(ARMV7, EVENT_CDH) \ + __PMC_EV(ARMV7, EVENT_CEH) \ + __PMC_EV(ARMV7, EVENT_CFH) \ + __PMC_EV(ARMV7, EVENT_D0H) \ + __PMC_EV(ARMV7, EVENT_D1H) \ + __PMC_EV(ARMV7, EVENT_D2H) \ + __PMC_EV(ARMV7, EVENT_D3H) \ + __PMC_EV(ARMV7, EVENT_D4H) \ + __PMC_EV(ARMV7, EVENT_D5H) \ + __PMC_EV(ARMV7, EVENT_D6H) \ + __PMC_EV(ARMV7, EVENT_D7H) \ + __PMC_EV(ARMV7, EVENT_D8H) \ + __PMC_EV(ARMV7, EVENT_D9H) \ + __PMC_EV(ARMV7, EVENT_DAH) \ + __PMC_EV(ARMV7, EVENT_DBH) \ + __PMC_EV(ARMV7, EVENT_DCH) \ + __PMC_EV(ARMV7, EVENT_DDH) \ + __PMC_EV(ARMV7, EVENT_DEH) \ + __PMC_EV(ARMV7, EVENT_DFH) \ + __PMC_EV(ARMV7, EVENT_E0H) \ + __PMC_EV(ARMV7, EVENT_E1H) \ + __PMC_EV(ARMV7, EVENT_E2H) \ + __PMC_EV(ARMV7, EVENT_E3H) \ + __PMC_EV(ARMV7, EVENT_E4H) \ + __PMC_EV(ARMV7, EVENT_E5H) \ + __PMC_EV(ARMV7, EVENT_E6H) \ + __PMC_EV(ARMV7, EVENT_E7H) \ + __PMC_EV(ARMV7, EVENT_E8H) \ + __PMC_EV(ARMV7, EVENT_E9H) \ + __PMC_EV(ARMV7, EVENT_EAH) \ + __PMC_EV(ARMV7, EVENT_EBH) \ + __PMC_EV(ARMV7, EVENT_ECH) \ + __PMC_EV(ARMV7, EVENT_EDH) \ + __PMC_EV(ARMV7, EVENT_EEH) \ + __PMC_EV(ARMV7, EVENT_EFH) \ + __PMC_EV(ARMV7, EVENT_F0H) \ + __PMC_EV(ARMV7, EVENT_F1H) \ + __PMC_EV(ARMV7, EVENT_F2H) \ + __PMC_EV(ARMV7, EVENT_F3H) \ + __PMC_EV(ARMV7, EVENT_F4H) \ + __PMC_EV(ARMV7, EVENT_F5H) \ + __PMC_EV(ARMV7, EVENT_F6H) \ + __PMC_EV(ARMV7, EVENT_F7H) \ + __PMC_EV(ARMV7, EVENT_F8H) \ + __PMC_EV(ARMV7, EVENT_F9H) \ + __PMC_EV(ARMV7, EVENT_FAH) \ + __PMC_EV(ARMV7, EVENT_FBH) \ + __PMC_EV(ARMV7, EVENT_FCH) \ + __PMC_EV(ARMV7, EVENT_FDH) \ + __PMC_EV(ARMV7, EVENT_FEH) \ + __PMC_EV(ARMV7, EVENT_FFH) + +#define PMC_EV_ARMV7_FIRST PMC_EV_ARMV7_EVENT_00H +#define PMC_EV_ARMV7_LAST PMC_EV_ARMV7_EVENT_FFH + +#define __PMC_EV_ALIAS_ARMV7_COMMON() \ + __PMC_EV_ALIAS("PMNC_SW_INCR", ARMV7_EVENT_00H) \ + __PMC_EV_ALIAS("L1_ICACHE_REFILL", ARMV7_EVENT_01H) \ + __PMC_EV_ALIAS("ITLB_REFILL", ARMV7_EVENT_02H) \ + __PMC_EV_ALIAS("L1_DCACHE_REFILL", ARMV7_EVENT_03H) \ + __PMC_EV_ALIAS("L1_DCACHE_ACCESS", ARMV7_EVENT_04H) \ + __PMC_EV_ALIAS("DTLB_REFILL", ARMV7_EVENT_05H) \ + __PMC_EV_ALIAS("MEM_READ", ARMV7_EVENT_06H) \ + __PMC_EV_ALIAS("MEM_WRITE", ARMV7_EVENT_07H) \ + __PMC_EV_ALIAS("INSTR_EXECUTED", ARMV7_EVENT_08H) \ + __PMC_EV_ALIAS("EXC_TAKEN", ARMV7_EVENT_09H) \ + __PMC_EV_ALIAS("EXC_EXECUTED", ARMV7_EVENT_0AH) \ + __PMC_EV_ALIAS("CID_WRITE", ARMV7_EVENT_0BH) \ + __PMC_EV_ALIAS("PC_WRITE", ARMV7_EVENT_0CH) \ + __PMC_EV_ALIAS("PC_IMM_BRANCH", ARMV7_EVENT_0DH) \ + __PMC_EV_ALIAS("PC_PROC_RETURN", ARMV7_EVENT_0EH) \ + __PMC_EV_ALIAS("MEM_UNALIGNED_ACCESS", ARMV7_EVENT_0FH) \ + __PMC_EV_ALIAS("PC_BRANCH_MIS_PRED", ARMV7_EVENT_10H) \ + __PMC_EV_ALIAS("CLOCK_CYCLES", ARMV7_EVENT_11H) \ + __PMC_EV_ALIAS("PC_BRANCH_PRED", ARMV7_EVENT_12H) \ + __PMC_EV_ALIAS("MEM_ACCESS", ARMV7_EVENT_13H) \ + __PMC_EV_ALIAS("L1_ICACHE_ACCESS", ARMV7_EVENT_14H) \ + __PMC_EV_ALIAS("L1_DCACHE_WB", ARMV7_EVENT_15H) \ + __PMC_EV_ALIAS("L2_CACHE_ACCESS", ARMV7_EVENT_16H) \ + __PMC_EV_ALIAS("L2_CACHE_REFILL", ARMV7_EVENT_17H) \ + __PMC_EV_ALIAS("L2_CACHE_WB", ARMV7_EVENT_18H) \ + __PMC_EV_ALIAS("BUS_ACCESS", ARMV7_EVENT_19H) \ + __PMC_EV_ALIAS("MEM_ERROR", ARMV7_EVENT_1AH) \ + __PMC_EV_ALIAS("INSTR_SPEC", ARMV7_EVENT_1BH) \ + __PMC_EV_ALIAS("TTBR_WRITE", ARMV7_EVENT_1CH) \ + __PMC_EV_ALIAS("BUS_CYCLES", ARMV7_EVENT_1DH) \ + __PMC_EV_ALIAS("CPU_CYCLES", ARMV7_EVENT_FFH) + +#define __PMC_EV_ALIAS_ARMV7_CORTEX_A8() \ + __PMC_EV_ALIAS_ARMV7_COMMON() + +#define __PMC_EV_ALIAS_ARMV7_CORTEX_A9() \ + __PMC_EV_ALIAS_ARMV7_COMMON() \ + __PMC_EV_ALIAS("JAVA_BYTECODE", ARMV7_EVENT_40H) \ + __PMC_EV_ALIAS("SOFTWARE_JAVA_BYTECODE", ARMV7_EVENT_41H) \ + __PMC_EV_ALIAS("JAZELLE_BACKWARD_BRANCH", ARMV7_EVENT_42H) \ + __PMC_EV_ALIAS("COHERENT_LINEFILL_MISSC", ARMV7_EVENT_50H) \ + __PMC_EV_ALIAS("COHERENT_LINEFILL_HITC", ARMV7_EVENT_51H) \ + __PMC_EV_ALIAS("INSTR_CACHE_DEPENDENT_STALL", ARMV7_EVENT_60H) \ + __PMC_EV_ALIAS("DATA_CACHE_DEPENDENT_STALL", ARMV7_EVENT_61H) \ + __PMC_EV_ALIAS("MAIN_TLB_MISS_STALL", ARMV7_EVENT_62H) \ + __PMC_EV_ALIAS("STREX_PASSED", ARMV7_EVENT_63H) \ + __PMC_EV_ALIAS("STREX_FAILED", ARMV7_EVENT_64H) \ + __PMC_EV_ALIAS("DATA_EVICTION", ARMV7_EVENT_65H) \ + __PMC_EV_ALIAS("ISSUE_DNOT_DISPATCH_ANY_INSTR", ARMV7_EVENT_66H) \ + __PMC_EV_ALIAS("ISSUE_IS_EMPTY", ARMV7_EVENT_67H) \ + __PMC_EV_ALIAS("MAIN_EXECUTION_UNIT_PIPE", ARMV7_EVENT_70H) \ + __PMC_EV_ALIAS("SECOND_EXECUTION_UNIT_PIPE", ARMV7_EVENT_71H) \ + __PMC_EV_ALIAS("LOAD_STORE_PIPE", ARMV7_EVENT_72H) \ + __PMC_EV_ALIAS("FLOATING_POINT_INSTR_RENAMED", ARMV7_EVENT_73H) \ + __PMC_EV_ALIAS("NEON_INSTRS_RENAMED", ARMV7_EVENT_74H) \ + __PMC_EV_ALIAS("PLD_STALL", ARMV7_EVENT_80H) \ + __PMC_EV_ALIAS("WRITE_STALL", ARMV7_EVENT_81H) \ + __PMC_EV_ALIAS("INSTR_MAIN_TLB_MISS_STALL", ARMV7_EVENT_82H) \ + __PMC_EV_ALIAS("DATA_MAIN_TLB_MISS_STALL", ARMV7_EVENT_83H) \ + __PMC_EV_ALIAS("INSTR_MICRO_TLB_MISS_STALL", ARMV7_EVENT_84H) \ + __PMC_EV_ALIAS("DATA_MICRO_TLB_MISS_STALL", ARMV7_EVENT_85H) \ + __PMC_EV_ALIAS("DMB_STALL", ARMV7_EVENT_86H) \ + __PMC_EV_ALIAS("INTEGER_CORE_CLOCK_ENABLED", ARMV7_EVENT_8AH) \ + __PMC_EV_ALIAS("DATA_ENGINE_CLOCK_ENABLED", ARMV7_EVENT_8BH) \ + __PMC_EV_ALIAS("ISB", ARMV7_EVENT_90H) \ + __PMC_EV_ALIAS("DSB", ARMV7_EVENT_91H) \ + __PMC_EV_ALIAS("DMB", ARMV7_EVENT_92H) \ + __PMC_EV_ALIAS("EXTERNAL_INTERRUPT", ARMV7_EVENT_93H) \ + __PMC_EV_ALIAS("PLE_CACHE_LINE_REQ_COMPLETED", ARMV7_EVENT_A0H) \ + __PMC_EV_ALIAS("PLE_CACHE_LINE_REQ_SKIPPED", ARMV7_EVENT_A1H) \ + __PMC_EV_ALIAS("PLE_FIFO_FLUSH", ARMV7_EVENT_A2H) \ + __PMC_EV_ALIAS("PLE_REQUEST_COMPLETED", ARMV7_EVENT_A3H) \ + __PMC_EV_ALIAS("PLE_FIFO_OVERFLOW", ARMV7_EVENT_A4H) \ + __PMC_EV_ALIAS("PLE_REQUEST_PROGRAMMED", ARMV7_EVENT_A5H) /* * ARMv8 Events Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Wed Jun 10 12:39:01 2015 (r284217) +++ head/sys/sys/pmc.h Wed Jun 10 12:42:30 2015 (r284218) @@ -105,7 +105,12 @@ __PMC_CPU(PPC_MPC85XX, 0x340, "Freescale PowerPC MPC85XX") \ __PMC_CPU(PPC_970, 0x380, "IBM PowerPC 970") \ __PMC_CPU(GENERIC, 0x400, "Generic") \ - __PMC_CPU(ARMV7, 0x500, "ARMv7") \ + __PMC_CPU(ARMV7_CORTEX_A5, 0x500, "ARMv7 Cortex A5") \ + __PMC_CPU(ARMV7_CORTEX_A7, 0x501, "ARMv7 Cortex A7") \ + __PMC_CPU(ARMV7_CORTEX_A8, 0x502, "ARMv7 Cortex A8") \ + __PMC_CPU(ARMV7_CORTEX_A9, 0x503, "ARMv7 Cortex A9") \ + __PMC_CPU(ARMV7_CORTEX_A15, 0x504, "ARMv7 Cortex A15") \ + __PMC_CPU(ARMV7_CORTEX_A17, 0x505, "ARMv7 Cortex A17") \ __PMC_CPU(ARMV8_CORTEX_A53, 0x600, "ARMv8 Cortex A53") \ __PMC_CPU(ARMV8_CORTEX_A57, 0x601, "ARMv8 Cortex A57") From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 13:17:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D48BBE47; Wed, 10 Jun 2015 13:17:41 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C271F1F5D; Wed, 10 Jun 2015 13:17:41 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5ADHf21007145; Wed, 10 Jun 2015 13:17:41 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5ADHfF9007144; Wed, 10 Jun 2015 13:17:41 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506101317.t5ADHfF9007144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Wed, 10 Jun 2015 13:17:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284221 - head/libexec/ftpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 13:17:41 -0000 Author: marcel Date: Wed Jun 10 13:17:41 2015 New Revision: 284221 URL: https://svnweb.freebsd.org/changeset/base/284221 Log: Fix build after converting ls(1) to use libxo(3). Modified: head/libexec/ftpd/Makefile Modified: head/libexec/ftpd/Makefile ============================================================================== --- head/libexec/ftpd/Makefile Wed Jun 10 13:14:24 2015 (r284220) +++ head/libexec/ftpd/Makefile Wed Jun 10 13:17:41 2015 (r284221) @@ -13,7 +13,7 @@ YFLAGS= WARNS?= 2 WFORMAT=0 -LIBADD= util crypt +LIBADD= util crypt xo # XXX Kluge! Conversation mechanism needs to be fixed. LIBADD+= opie md From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 13:33:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE2CF285; Wed, 10 Jun 2015 13:33:30 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv158.fwdcdn.com (frv158.fwdcdn.com [212.42.77.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C09416A2; Wed, 10 Jun 2015 13:33:30 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=69BoBb5rJf9MMFLah+KlQyOKDD6qwL50X326OEB2cZQ=; b=h5MdlsHY0FCWuvrdEEhcSqrCQfQcmtLgAy3NGuRoRvTT2AJ33a3DV70h26CtoqoVIrifEMFyO5n/RqyHKdeu+VB8TkoP07PQG+jeOUYajAqTO6EunIdYzHJBGK/cETT2raUyTbGeRdJGIVS+9etUQiNKXchPNqACDU2bLSzFY6Q=; Received: from [134.249.91.180] (helo=nonamehost.local) by frv158.fwdcdn.com with esmtpsa ID 1Z2g8F-000FF7-1b ; Wed, 10 Jun 2015 16:33:27 +0300 Date: Wed, 10 Jun 2015 16:33:26 +0300 From: Ivan Klymenko To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm Message-ID: <20150610163326.20ab3e0c@nonamehost.local> In-Reply-To: <201506101048.t5AAmD1O029382@svn.freebsd.org> References: <201506101048.t5AAmD1O029382@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Result: IP=134.249.91.180; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 13:33:31 -0000 Wed, 10 Jun 2015 10:48:13 +0000 (UTC) Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=B2: > Author: mjg > Date: Wed Jun 10 10:48:12 2015 > New Revision: 284215 > URL: https://svnweb.freebsd.org/changeset/base/284215 >=20 > Log: > Implement lockless resource limits. > =20 > Use the same scheme implemented to manage credentials. > =20 > Code needing to look at process's credentials (as opposed to > thred's) is provided with *_proc variants of relevant functions. > =20 > Places which possibly had to take the proc lock anyway still use > the proc pointer to access limits. >=20 > Modified: > head/sys/amd64/linux32/linux32_machdep.c > head/sys/compat/linux/linux_misc.c > head/sys/compat/svr4/imgact_svr4.c > head/sys/compat/svr4/svr4_misc.c > head/sys/compat/svr4/svr4_resource.c > head/sys/dev/drm2/i915/i915_gem.c > head/sys/fs/fdescfs/fdesc_vfsops.c > head/sys/i386/ibcs2/ibcs2_misc.c > head/sys/i386/linux/imgact_linux.c > head/sys/i386/linux/linux_machdep.c > head/sys/kern/imgact_aout.c > head/sys/kern/imgact_elf.c > head/sys/kern/imgact_gzip.c > head/sys/kern/kern_descrip.c > head/sys/kern/kern_event.c > head/sys/kern/kern_exec.c > head/sys/kern/kern_fork.c > head/sys/kern/kern_proc.c > head/sys/kern/kern_resource.c > head/sys/kern/kern_sig.c > head/sys/kern/kern_syscalls.c > head/sys/kern/kern_thread.c > head/sys/kern/subr_uio.c > head/sys/kern/sysv_shm.c > head/sys/kern/tty_pts.c > head/sys/kern/uipc_sockbuf.c > head/sys/kern/vfs_vnops.c > head/sys/ofed/drivers/infiniband/core/umem.c > head/sys/ofed/drivers/infiniband/hw/mthca/mthca_memfree.c > head/sys/sys/proc.h > head/sys/sys/resourcevar.h > head/sys/sys/vnode.h > head/sys/vm/swap_pager.c > head/sys/vm/vm_map.c > head/sys/vm/vm_mmap.c > head/sys/vm/vm_pageout.c > head/sys/vm/vm_unix.c >=20 I have panic. I not sure that it refers to a specific commit. FreeBSD nonamehost.local 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r284215M: Wed= Jun 10 15:38:11 EEST 2015 ivan@nonamehost.local:/media/da0s1/obj/usr/s= rc/sys/mk11 amd64 panic: page fault GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... Unread portion of the kernel message buffer: Fatal trap 12: page fault while in kernel mode cpuid =3D 0; apic id =3D 00 fault virtual address =3D 0x80 fault code =3D supervisor read data, page not present instruction pointer =3D 0x20:0xffffffff809cfbfa stack pointer =3D 0x28:0xfffffe01aa4906c0 frame pointer =3D 0x28:0xfffffe01aa4906e0 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 4091 (npviewer.bin) trap number =3D 12 panic: page fault cpuid =3D 0 KDB: stack backtrace: #0 0xffffffff80a17c27 at kdb_backtrace+0x67 #1 0xffffffff809d3f79 at vpanic+0x189 #2 0xffffffff809d3de3 at panic+0x43 #3 0xffffffff80e73b35 at trap_fatal+0x355 #4 0xffffffff80e73e6e at trap_pfault+0x31e #5 0xffffffff80e734d4 at trap+0x464 #6 0xffffffff80e57422 at calltrap+0x8 #7 0xffffffff8097c942 at fdalloc+0x32 #8 0xffffffff8097cf95 at finstall+0x95 #9 0xffffffff80a99844 at kern_openat+0x3c4 #10 0xffffffff8229fe93 at linux_common_open+0xc3 #11 0xffffffff822a0068 at linux_open+0x58 #12 0xffffffff80f7408b at ia32_syscall+0x41b #13 0xffffffff80e57a05 at Xint0x80_syscall+0x95 Uptime: 29m1s Dumping 854 out of 6047 MB:..2%..12%..21%..32%..42%..51%..62%..72%..81%..92% Reading symbols from /bootpool/boot/kernel/fdescfs.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/fdescfs.ko.symbols Reading symbols from /bootpool/boot/kernel/linprocfs.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/linprocfs.ko.symbols Reading symbols from /bootpool/boot/kernel/linux_common.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/linux_common.ko.symbols Reading symbols from /bootpool/boot/kernel/linsysfs.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/linsysfs.ko.symbols Reading symbols from /bootpool/boot/kernel/zfs.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/zfs.ko.symbols Reading symbols from /bootpool/boot/kernel/opensolaris.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/opensolaris.ko.symbols Reading symbols from /bootpool/boot/kernel/coretemp.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/coretemp.ko.symbols Reading symbols from /bootpool/boot/kernel/ichwd.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ichwd.ko.symbols Reading symbols from /bootpool/boot/kernel/cpuctl.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cpuctl.ko.symbols Reading symbols from /bootpool/boot/kernel/aesni.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/aesni.ko.symbols Reading symbols from /bootpool/boot/kernel/crypto.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/crypto.ko.symbols Reading symbols from /bootpool/boot/kernel/cryptodev.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cryptodev.ko.symbols Reading symbols from /bootpool/boot/kernel/sem.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/sem.ko.symbols Reading symbols from /bootpool/boot/kernel/accf_data.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/accf_data.ko.symbols Reading symbols from /bootpool/boot/kernel/accf_http.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/accf_http.ko.symbols Reading symbols from /bootpool/boot/kernel/accf_dns.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/accf_dns.ko.symbols Reading symbols from /bootpool/boot/kernel/h_ertt.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/h_ertt.ko.symbols Reading symbols from /bootpool/boot/kernel/cc_cdg.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cc_cdg.ko.symbols Reading symbols from /bootpool/boot/kernel/cc_chd.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cc_chd.ko.symbols Reading symbols from /bootpool/boot/kernel/cc_cubic.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cc_cubic.ko.symbols Reading symbols from /bootpool/boot/kernel/cc_hd.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cc_hd.ko.symbols Reading symbols from /bootpool/boot/kernel/cc_htcp.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cc_htcp.ko.symbols Reading symbols from /bootpool/boot/kernel/cc_vegas.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cc_vegas.ko.symbols Reading symbols from /bootpool/boot/kernel/aio.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/aio.ko.symbols Reading symbols from /bootpool/boot/kernel/tmpfs.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/tmpfs.ko.symbols Reading symbols from /bootpool/boot/kernel/fuse.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/fuse.ko.symbols Reading symbols from /bootpool/boot/kernel/acpi_hp.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/acpi_hp.ko.symbols Reading symbols from /bootpool/boot/kernel/acpi_wmi.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/acpi_wmi.ko.symbols Reading symbols from /bootpool/boot/kernel/acpi_video.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/acpi_video.ko.symbols Reading symbols from /bootpool/boot/kernel/linux.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/linux.ko.symbols Reading symbols from /bootpool/boot/kernel/i915.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/i915.ko.symbols Reading symbols from /bootpool/boot/kernel/drm.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/drm.ko.symbols Reading symbols from /bootpool/boot/kernel/i915kms.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/i915kms.ko.symbols Reading symbols from /bootpool/boot/kernel/drm2.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/drm2.ko.symbols Reading symbols from /bootpool/boot/kernel/iicbus.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/iicbus.ko.symbols Reading symbols from /bootpool/boot/kernel/iic.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/iic.ko.symbols Reading symbols from /bootpool/boot/kernel/iicbb.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/iicbb.ko.symbols Reading symbols from /bootpool/boot/kernel/smbus.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/smbus.ko.symbols Reading symbols from /bootpool/boot/kernel/smb.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/smb.ko.symbols Reading symbols from /bootpool/boot/kernel/ichsmb.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ichsmb.ko.symbols Reading symbols from /bootpool/boot/kernel/snd_uaudio.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/snd_uaudio.ko.symbols Reading symbols from /boot/modules/cuse4bsd.ko...done. Loaded symbols for /boot/modules/cuse4bsd.ko Reading symbols from /bootpool/boot/kernel/ng_bt3c.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ng_bt3c.ko.symbols Reading symbols from /bootpool/boot/kernel/netgraph.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/netgraph.ko.symbols Reading symbols from /bootpool/boot/kernel/ng_ubt.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ng_ubt.ko.symbols Reading symbols from /bootpool/boot/kernel/ng_hci.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ng_hci.ko.symbols Reading symbols from /bootpool/boot/kernel/ng_bluetooth.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ng_bluetooth.ko.symbols Reading symbols from /bootpool/boot/kernel/ubtbcmfw.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ubtbcmfw.ko.symbols Reading symbols from /bootpool/boot/kernel/cd9660_iconv.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cd9660_iconv.ko.symbols Reading symbols from /bootpool/boot/kernel/libiconv.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/libiconv.ko.symbols Reading symbols from /bootpool/boot/kernel/wlan_xauth.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/wlan_xauth.ko.symbols Reading symbols from /bootpool/boot/kernel/wlan_acl.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/wlan_acl.ko.symbols Reading symbols from /bootpool/boot/kernel/libmchain.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/libmchain.ko.symbols Reading symbols from /bootpool/boot/kernel/ums.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ums.ko.symbols Reading symbols from /boot/modules/vboxnetflt.ko...done. Loaded symbols for /boot/modules/vboxnetflt.ko Reading symbols from /boot/modules/vboxdrv.ko...done. Loaded symbols for /boot/modules/vboxdrv.ko Reading symbols from /bootpool/boot/kernel/ng_ether.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ng_ether.ko.symbols Reading symbols from /boot/modules/vboxnetadp.ko...done. Loaded symbols for /boot/modules/vboxnetadp.ko Reading symbols from /bootpool/boot/kernel/ng_btsocket.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ng_btsocket.ko.symbols Reading symbols from /usr/local/modules/rtc.ko...done. Loaded symbols for /usr/local/modules/rtc.ko #0 doadump (textdump=3D) at pcpu.h:221 221 pcpu.h: No such file or directory. in pcpu.h (kgdb) #0 doadump (textdump=3D) at pcpu.h:221 #1 0xffffffff809d3a7d in kern_reboot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:447 #2 0xffffffff809d3fb8 in vpanic (fmt=3D,=20 ap=3D) at /usr/src/sys/kern/kern_shutdown.c:744 #3 0xffffffff809d3de3 in panic (fmt=3D0x0) at /usr/src/sys/kern/kern_shutdown.c:675 #4 0xffffffff80e73b35 in trap_fatal (frame=3D,=20 eva=3D) at /usr/src/sys/amd64/amd64/trap.c:853 #5 0xffffffff80e73e6e in trap_pfault (frame=3D0xfffffe01aa490610,=20 usermode=3D) at /usr/src/sys/amd64/amd64/trap.c:676 #6 0xffffffff80e734d4 in trap (frame=3D0xfffffe01aa490610) at /usr/src/sys/amd64/amd64/trap.c:426 #7 0xffffffff80e57422 in calltrap () at /usr/src/sys/amd64/amd64/exception.S:235 #8 0xffffffff809cfbfa in lim_cur (td=3D0xfffff8010185e4c0, which=3D8) at /usr/src/sys/kern/kern_resource.c:1209 #9 0xffffffff8097c942 in fdalloc (td=3D0xfffff8010185e4c0,=20 minfd=3D, result=3D0xfffffe01aa4907dc) at /usr/src/sys/kern/kern_descrip.c:790 #10 0xffffffff8097cf95 in finstall (td=3D0xfffff8010185e4c0,=20 fp=3D0xfffff80139e89870, fd=3D0xfffffe01aa4907dc, flags=3D1, fcaps=3D0x= 0) at /usr/src/sys/kern/kern_descrip.c:1768 #11 0xffffffff80a99844 in kern_openat (td=3D0xfffff8010185e4c0, fd=3D-100,= =20 path=3D0xfffff80016832400 "/compat/linux/proc/stat", pathseg=3DUIO_SYSS= PACE,=20 flags=3D, mode=3D) at /usr/src/sys/kern/vfs_syscalls.c:1158 #12 0xffffffff8229fe93 in linux_common_open (td=3D0xfffff8010185e4c0, dirfd= =3D8,=20 path=3D0xfffff80016832400 "/compat/linux/proc/stat",=20 l_flags=3D, mode=3D51) at /usr/src/sys/modules/linux/../../compat/linux/linux_file.c:134 #13 0xffffffff822a0068 in linux_open (td=3D,=20 args=3D) at /usr/src/sys/modules/linux/../../compat/linux/linux_file.c:211 #14 0xffffffff80f7408b in ia32_syscall (frame=3D0xfffffe01aa490ac0) at subr_syscall.c:133 #15 0xffffffff80e57a05 in Xint0x80_syscall () at ia32_exception.S:73 #16 0x00000000ffffe452 in ?? () Previous frame inner to this frame (corrupt stack?) Current language: auto; currently minimal (kgdb)=20 From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 13:44:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9F4C8ED; Wed, 10 Jun 2015 13:44:04 +0000 (UTC) (envelope-from kp@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D86BB193A; Wed, 10 Jun 2015 13:44:04 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5ADi4xn023662; Wed, 10 Jun 2015 13:44:04 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5ADi4fk023661; Wed, 10 Jun 2015 13:44:04 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201506101344.t5ADi4fk023661@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 10 Jun 2015 13:44:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284222 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 13:44:05 -0000 Author: kp Date: Wed Jun 10 13:44:04 2015 New Revision: 284222 URL: https://svnweb.freebsd.org/changeset/base/284222 Log: pf: address family must be set when creating a pf_fragment Fix a panic when handling fragmented ip4 packets with 'drop-ovl' set. In that scenario we take a different branch in pf_normalize_ip(), taking us to pf_fragcache() (rather than pf_reassemble()). In pf_fragcache() we create a pf_fragment, but do not set the address family. This leads to a panic when we try to insert that into pf_frag_tree because pf_addr_cmp(), which is used to compare the pf_fragments doesn't know what to do if the address family is not set. Simply ensure that the address family is set correctly (always AF_INET in this path). PR: 200330 Differential Revision: https://reviews.freebsd.org/D2769 Approved by: philip (mentor), gnn (mentor) Modified: head/sys/netpfil/pf/pf_norm.c Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Wed Jun 10 13:17:41 2015 (r284221) +++ head/sys/netpfil/pf/pf_norm.c Wed Jun 10 13:44:04 2015 (r284222) @@ -823,6 +823,7 @@ pf_fragcache(struct mbuf **m0, struct ip (*frag)->fr_max = 0; (*frag)->fr_src.v4 = h->ip_src; (*frag)->fr_dst.v4 = h->ip_dst; + (*frag)->fr_af = AF_INET; (*frag)->fr_id = h->ip_id; (*frag)->fr_timeout = time_uptime; From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 13:53:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBCC7CE9; Wed, 10 Jun 2015 13:53:44 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48B711BEB; Wed, 10 Jun 2015 13:53:44 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wiga1 with SMTP id a1so49301789wig.0; Wed, 10 Jun 2015 06:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=/AL510lTEptpL1N7bEPF8Plq2TyFBEmclSd4flA3sQQ=; b=xLLhfWlKMYIhW8p7pDIz9ggVFIP2VyBVDl9rzh5XkYMuLp6aCkq4A3Q7EWI1snHTNe QuuKkCyCTlUJmzVfqS/eEfwEwiErxflSyXOd6PGkrh1nu3Hi4iSsL7sadntJpeJ7Mkv5 6Ka0Z4O2rusVOpFFo67xa6wTxYiWL8wJG0A5HA9qz1rbHh1c2+lPYNHVc4PqWEAuxwn5 UgzC8Ymd4PCaSXeekdjG8Th06N63zWDGlRW0SqCYwHbjLMfxRvRwrjDxsEQ7Hbmbju8g 6gdUD7dRQJm/MfxC3yo094e9/ek7J+ZEO5cZ86kS50PjbZcdSbNgFje20uGAos6GyWsz qSjg== X-Received: by 10.180.14.193 with SMTP id r1mr19149232wic.47.1433944422735; Wed, 10 Jun 2015 06:53:42 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id w11sm14699919wjr.48.2015.06.10.06.53.39 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 10 Jun 2015 06:53:40 -0700 (PDT) Date: Wed, 10 Jun 2015 15:53:37 +0200 From: Mateusz Guzik To: Ivan Klymenko Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm Message-ID: <20150610135337.GC23380@dft-labs.eu> References: <201506101048.t5AAmD1O029382@svn.freebsd.org> <20150610163326.20ab3e0c@nonamehost.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150610163326.20ab3e0c@nonamehost.local> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 13:53:45 -0000 On Wed, Jun 10, 2015 at 04:33:26PM +0300, Ivan Klymenko wrote: > Wed, 10 Jun 2015 10:48:13 +0000 (UTC) > Mateusz Guzik напиÑав: > > > Author: mjg > > Date: Wed Jun 10 10:48:12 2015 > > New Revision: 284215 > > URL: https://svnweb.freebsd.org/changeset/base/284215 > > > > Log: > > Implement lockless resource limits. > > > > Use the same scheme implemented to manage credentials. > > > > Code needing to look at process's credentials (as opposed to > > thred's) is provided with *_proc variants of relevant functions. > > > > Places which possibly had to take the proc lock anyway still use > > the proc pointer to access limits. > > > > > > I have panic. > I not sure that it refers to a specific commit. > > Fatal trap 12: page fault while in kernel mode > cpuid = 0; apic id = 00 > fault virtual address = 0x80 > fault code = supervisor read data, page not present > instruction pointer = 0x20:0xffffffff809cfbfa > stack pointer = 0x28:0xfffffe01aa4906c0 > frame pointer = 0x28:0xfffffe01aa4906e0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 4091 (npviewer.bin) > trap number = 12 > panic: page fault > cpuid = 0 > KDB: stack backtrace: > #0 0xffffffff80a17c27 at kdb_backtrace+0x67 > #1 0xffffffff809d3f79 at vpanic+0x189 > #2 0xffffffff809d3de3 at panic+0x43 > #3 0xffffffff80e73b35 at trap_fatal+0x355 > #4 0xffffffff80e73e6e at trap_pfault+0x31e > #5 0xffffffff80e734d4 at trap+0x464 > #6 0xffffffff80e57422 at calltrap+0x8 > #7 0xffffffff8097c942 at fdalloc+0x32 > #8 0xffffffff8097cf95 at finstall+0x95 > #9 0xffffffff80a99844 at kern_openat+0x3c4 > #10 0xffffffff8229fe93 at linux_common_open+0xc3 > #11 0xffffffff822a0068 at linux_open+0x58 > #12 0xffffffff80f7408b at ia32_syscall+0x41b > #13 0xffffffff80e57a05 at Xint0x80_syscall+0x95 > Uptime: 29m1s > Dumping 854 out of 6047 MB:..2%..12%..21%..32%..42%..51%..62%..72%..81%..92% > > 221 pcpu.h: No such file or directory. > in pcpu.h > (kgdb) #0 doadump (textdump=) at pcpu.h:221 > #1 0xffffffff809d3a7d in kern_reboot (howto=260) > at /usr/src/sys/kern/kern_shutdown.c:447 > #2 0xffffffff809d3fb8 in vpanic (fmt=, > ap=) at /usr/src/sys/kern/kern_shutdown.c:744 > #3 0xffffffff809d3de3 in panic (fmt=0x0) > at /usr/src/sys/kern/kern_shutdown.c:675 > #4 0xffffffff80e73b35 in trap_fatal (frame=, > eva=) at /usr/src/sys/amd64/amd64/trap.c:853 > #5 0xffffffff80e73e6e in trap_pfault (frame=0xfffffe01aa490610, > usermode=) at /usr/src/sys/amd64/amd64/trap.c:676 > #6 0xffffffff80e734d4 in trap (frame=0xfffffe01aa490610) > at /usr/src/sys/amd64/amd64/trap.c:426 > #7 0xffffffff80e57422 in calltrap () > at /usr/src/sys/amd64/amd64/exception.S:235 > #8 0xffffffff809cfbfa in lim_cur (td=0xfffff8010185e4c0, which=8) > at /usr/src/sys/kern/kern_resource.c:1209 > #9 0xffffffff8097c942 in fdalloc (td=0xfffff8010185e4c0, > minfd=, result=0xfffffe01aa4907dc) > at /usr/src/sys/kern/kern_descrip.c:790 > #10 0xffffffff8097cf95 in finstall (td=0xfffff8010185e4c0, > fp=0xfffff80139e89870, fd=0xfffffe01aa4907dc, flags=1, fcaps=0x0) > at /usr/src/sys/kern/kern_descrip.c:1768 > #11 0xffffffff80a99844 in kern_openat (td=0xfffff8010185e4c0, fd=-100, > path=0xfffff80016832400 "/compat/linux/proc/stat", pathseg=UIO_SYSSPACE, > flags=, mode=) > at /usr/src/sys/kern/vfs_syscalls.c:1158 > #12 0xffffffff8229fe93 in linux_common_open (td=0xfffff8010185e4c0, dirfd=8, > path=0xfffff80016832400 "/compat/linux/proc/stat", > l_flags=, mode=51) > at /usr/src/sys/modules/linux/../../compat/linux/linux_file.c:134 > #13 0xffffffff822a0068 in linux_open (td=, > args=) > at /usr/src/sys/modules/linux/../../compat/linux/linux_file.c:211 > #14 0xffffffff80f7408b in ia32_syscall (frame=0xfffffe01aa490ac0) > at subr_syscall.c:133 > #15 0xffffffff80e57a05 in Xint0x80_syscall () at ia32_exception.S:73 > #16 0x00000000ffffe452 in ?? () > Previous frame inner to this frame (corrupt stack?) > Current language: auto; currently minimal > (kgdb) > The following should fix it: diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c index 0fd47fd..394c26f 100644 --- a/sys/compat/linux/linux_fork.c +++ b/sys/compat/linux/linux_fork.c @@ -298,7 +298,7 @@ linux_clone_thread(struct thread *td, struct linux_clone_args *args) __rangeof(struct thread, td_startcopy, td_endcopy)); newtd->td_proc = p; - newtd->td_ucred = crhold(td->td_ucred); + thread_cow_get(newtd, td); /* create the emuldata */ linux_proc_init(td, newtd, args->flags); Still, it seems a bug that linux_clone_thread replicates so much of create_thread. -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 14:53:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0ECBB246 for ; Wed, 10 Jun 2015 14:53:42 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A35A11C2F for ; Wed, 10 Jun 2015 14:53:41 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by wiwd19 with SMTP id d19so51154064wiw.0 for ; Wed, 10 Jun 2015 07:53:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=4tUAkqzL962HxMbtk4+s6/85VLLnK/98cDYSHjaZTr4=; b=CQv3ynJ2rvarIyhvA5sp4xP1cVtYz2ivJKogXMIRvXQGM2e2iwI1/mbCAN/8ihjI3q xhQH63OVRyFAYHORu7EQ53UruAD1zeaayEuRD0raaHyHNQVUPsZWHXz+AjWvbyTmY2Ag vYijhGMjASuMHIJKA+ypi+JZn2qlkS/oeurXNS1S7cRBscglfI3ksxxy+e+N5OOQjLjO Ym0zGa2XhrPiSaHZ7smTgJVuwTv6DQA5TjroYsypeajBwqcLoqs+hTE/OqB9YJXd5DYB DrcT3TjUcUjGP7qJWeUez+urtfhv8ixAsXAs6+WRK929wXIZ5z6CV9SMBQriRVDxfbZb aTOA== X-Gm-Message-State: ALoCoQlt+UGPZ1fK3+AXr/yLB2KyAvBMa4XruX4kUj969m0hWsIa3XIavYYUM7Etw/1ATsf+p87a MIME-Version: 1.0 X-Received: by 10.180.7.199 with SMTP id l7mr9480694wia.28.1433948013662; Wed, 10 Jun 2015 07:53:33 -0700 (PDT) Received: by 10.194.162.225 with HTTP; Wed, 10 Jun 2015 07:53:33 -0700 (PDT) In-Reply-To: <201506101344.t5ADi4fk023661@svn.freebsd.org> References: <201506101344.t5ADi4fk023661@svn.freebsd.org> Date: Wed, 10 Jun 2015 16:53:33 +0200 Message-ID: Subject: Re: svn commit: r284222 - head/sys/netpfil/pf From: Oliver Pinter To: Kristof Provost Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 14:53:42 -0000 On 6/10/15, Kristof Provost wrote: > Author: kp > Date: Wed Jun 10 13:44:04 2015 > New Revision: 284222 > URL: https://svnweb.freebsd.org/changeset/base/284222 > > Log: > pf: address family must be set when creating a pf_fragment > > Fix a panic when handling fragmented ip4 packets with 'drop-ovl' set. > In that scenario we take a different branch in pf_normalize_ip(), taking > us to > pf_fragcache() (rather than pf_reassemble()). In pf_fragcache() we create > a > pf_fragment, but do not set the address family. This leads to a panic when > we > try to insert that into pf_frag_tree because pf_addr_cmp(), which is used > to > compare the pf_fragments doesn't know what to do if the address family is > not > set. > > Simply ensure that the address family is set correctly (always AF_INET in > this > path). > > PR: 200330 > Differential Revision: https://reviews.freebsd.org/D2769 > Approved by: philip (mentor), gnn (mentor) > > Modified: > head/sys/netpfil/pf/pf_norm.c This commit required to 10-STABLE too or this bug exists only in 11-CURRENT? If the former, you have any plan to MFC the patch? > > Modified: head/sys/netpfil/pf/pf_norm.c > ============================================================================== > --- head/sys/netpfil/pf/pf_norm.c Wed Jun 10 13:17:41 2015 (r284221) > +++ head/sys/netpfil/pf/pf_norm.c Wed Jun 10 13:44:04 2015 (r284222) > @@ -823,6 +823,7 @@ pf_fragcache(struct mbuf **m0, struct ip > (*frag)->fr_max = 0; > (*frag)->fr_src.v4 = h->ip_src; > (*frag)->fr_dst.v4 = h->ip_dst; > + (*frag)->fr_af = AF_INET; > (*frag)->fr_id = h->ip_id; > (*frag)->fr_timeout = time_uptime; > > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 14:58:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DA2B304; Wed, 10 Jun 2015 14:58:37 +0000 (UTC) (envelope-from kp@vega.codepro.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D4AE21C9D; Wed, 10 Jun 2015 14:58:36 +0000 (UTC) (envelope-from kp@vega.codepro.be) Received: from vega.codepro.be (unknown [172.16.1.3]) by venus.codepro.be (Postfix) with ESMTP id 792DC132A5; Wed, 10 Jun 2015 16:58:33 +0200 (CEST) Received: by vega.codepro.be (Postfix, from userid 1001) id 595B8F0A8; Wed, 10 Jun 2015 16:58:32 +0200 (CEST) Date: Wed, 10 Jun 2015 16:58:32 +0200 From: Kristof Provost To: Oliver Pinter Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284222 - head/sys/netpfil/pf Message-ID: <20150610145832.GA2301@vega.codepro.be> References: <201506101344.t5ADi4fk023661@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Checked-By-NSA: Probably User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 14:58:37 -0000 On 2015-06-10 16:53:33 (+0200), Oliver Pinter wrote: > On 6/10/15, Kristof Provost wrote: > > Author: kp > > Date: Wed Jun 10 13:44:04 2015 > > New Revision: 284222 > > URL: https://svnweb.freebsd.org/changeset/base/284222 > > > > Log: > > pf: address family must be set when creating a pf_fragment > > > > This commit required to 10-STABLE too or this bug exists only in > 11-CURRENT? If the former, you have any plan to MFC the patch? > This is current-only. It's a result of the work done to make pf understand v6 fragmentation. That hasn't been merged back to 10-STABLE yet (although I have a vague plan to do this). Until then this isn't required in 10-STABLE. Regards, Kristof From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 15:07:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 917C65F9; Wed, 10 Jun 2015 15:07:14 +0000 (UTC) (envelope-from brooks@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FB9A1EE6; Wed, 10 Jun 2015 15:07:14 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AF7E0k071557; Wed, 10 Jun 2015 15:07:14 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AF7E5u071556; Wed, 10 Jun 2015 15:07:14 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201506101507.t5AF7E5u071556@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 10 Jun 2015 15:07:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284225 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 15:07:14 -0000 Author: brooks Date: Wed Jun 10 15:07:13 2015 New Revision: 284225 URL: https://svnweb.freebsd.org/changeset/base/284225 Log: List kinfo_getfile.c only once. MFC after: 3 days Sponsored by: DARPA, AFRL Modified: head/lib/libutil/Makefile Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Wed Jun 10 14:08:36 2015 (r284224) +++ head/lib/libutil/Makefile Wed Jun 10 15:07:13 2015 (r284225) @@ -9,7 +9,7 @@ LIB= util SHLIB_MAJOR= 9 SRCS= _secure_path.c auth.c expand_number.c flopen.c fparseln.c gr_util.c \ - hexdump.c humanize_number.c kinfo_getfile.c kinfo_getfile.c \ + hexdump.c humanize_number.c kinfo_getfile.c \ kinfo_getallproc.c kinfo_getproc.c kinfo_getvmmap.c \ kinfo_getvmobject.c kld.c \ login_auth.c login_cap.c \ From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 15:24:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3874943; Wed, 10 Jun 2015 15:24:08 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv158.fwdcdn.com (frv158.fwdcdn.com [212.42.77.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A17601536; Wed, 10 Jun 2015 15:24:08 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=XYNSdmv6/wFmYH65i5N2UUtKbM01KI8BLVXQbxYLB8c=; b=clo2q242cArymAf/hPgnLWvm4M16tvK1xH3ILLn0pjDTKiA4BsgfZzPOEJM2fK3qdb7nspbmJBLFZuaL3Yv2flkrqWYqUMaLBZ/Gw4RJgfR/ZNoZR9Ihhdz8Prmj8hpyB16gxMETMrIJA07ChjU25bab+Bhz8lN2Sb9frL7LYV8=; Received: from [134.249.91.180] (helo=nonamehost.local) by frv158.fwdcdn.com with esmtpsa ID 1Z2hrH-00035b-0F ; Wed, 10 Jun 2015 18:24:03 +0300 Date: Wed, 10 Jun 2015 18:24:01 +0300 From: Ivan Klymenko To: Mateusz Guzik Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm Message-ID: <20150610182401.685fb7b6@nonamehost.local> In-Reply-To: <20150610135337.GC23380@dft-labs.eu> References: <201506101048.t5AAmD1O029382@svn.freebsd.org> <20150610163326.20ab3e0c@nonamehost.local> <20150610135337.GC23380@dft-labs.eu> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Result: IP=134.249.91.180; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 15:24:09 -0000 Wed, 10 Jun 2015 15:53:37 +0200 Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0= =B2: > On Wed, Jun 10, 2015 at 04:33:26PM +0300, Ivan Klymenko wrote: > > Wed, 10 Jun 2015 10:48:13 +0000 (UTC) > > Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0= =B2: > >=20 > > > Author: mjg > > > Date: Wed Jun 10 10:48:12 2015 > > > New Revision: 284215 > > > URL: https://svnweb.freebsd.org/changeset/base/284215 > > >=20 > > > Log: > > > Implement lockless resource limits. > > > =20 > > > Use the same scheme implemented to manage credentials. > > > =20 > > > Code needing to look at process's credentials (as opposed to > > > thred's) is provided with *_proc variants of relevant functions. > > > =20 > > > Places which possibly had to take the proc lock anyway still use > > > the proc pointer to access limits. > > >=20 > > >=20 > >=20 > > I have panic. > > I not sure that it refers to a specific commit. > >=20 > > Fatal trap 12: page fault while in kernel mode > > cpuid =3D 0; apic id =3D 00 > > fault virtual address =3D 0x80 > > fault code =3D supervisor read data, page not present > > instruction pointer =3D 0x20:0xffffffff809cfbfa > > stack pointer =3D 0x28:0xfffffe01aa4906c0 > > frame pointer =3D 0x28:0xfffffe01aa4906e0 > > code segment =3D base 0x0, limit 0xfffff, type 0x1b > > =3D DPL 0, pres 1, long 1, def32 0, gran 1 > > processor eflags =3D interrupt enabled, resume, IOPL =3D 0 > > current process =3D 4091 (npviewer.bin) > > trap number =3D 12 > > panic: page fault > > cpuid =3D 0 > > KDB: stack backtrace: > > #0 0xffffffff80a17c27 at kdb_backtrace+0x67 > > #1 0xffffffff809d3f79 at vpanic+0x189 > > #2 0xffffffff809d3de3 at panic+0x43 > > #3 0xffffffff80e73b35 at trap_fatal+0x355 > > #4 0xffffffff80e73e6e at trap_pfault+0x31e > > #5 0xffffffff80e734d4 at trap+0x464 > > #6 0xffffffff80e57422 at calltrap+0x8 > > #7 0xffffffff8097c942 at fdalloc+0x32 > > #8 0xffffffff8097cf95 at finstall+0x95 > > #9 0xffffffff80a99844 at kern_openat+0x3c4 > > #10 0xffffffff8229fe93 at linux_common_open+0xc3 > > #11 0xffffffff822a0068 at linux_open+0x58 > > #12 0xffffffff80f7408b at ia32_syscall+0x41b > > #13 0xffffffff80e57a05 at Xint0x80_syscall+0x95 > > Uptime: 29m1s > > Dumping 854 out of 6047 > > MB:..2%..12%..21%..32%..42%..51%..62%..72%..81%..92% > >=20 > > 221 pcpu.h: No such file or directory. > > in pcpu.h > > (kgdb) #0 doadump (textdump=3D) at pcpu.h:221 > > #1 0xffffffff809d3a7d in kern_reboot (howto=3D260) > > at /usr/src/sys/kern/kern_shutdown.c:447 > > #2 0xffffffff809d3fb8 in vpanic (fmt=3D,=20 > > ap=3D) > > at /usr/src/sys/kern/kern_shutdown.c:744 #3 0xffffffff809d3de3 in > > panic (fmt=3D0x0) at /usr/src/sys/kern/kern_shutdown.c:675 > > #4 0xffffffff80e73b35 in trap_fatal (frame=3D,=20 > > eva=3D) > > at /usr/src/sys/amd64/amd64/trap.c:853 #5 0xffffffff80e73e6e in > > trap_pfault (frame=3D0xfffffe01aa490610, usermode=3D > out>) at /usr/src/sys/amd64/amd64/trap.c:676 #6 0xffffffff80e734d4 > > out>in trap (frame=3D0xfffffe01aa490610) > > at /usr/src/sys/amd64/amd64/trap.c:426 > > #7 0xffffffff80e57422 in calltrap () > > at /usr/src/sys/amd64/amd64/exception.S:235 > > #8 0xffffffff809cfbfa in lim_cur (td=3D0xfffff8010185e4c0, which=3D8) > > at /usr/src/sys/kern/kern_resource.c:1209 > > #9 0xffffffff8097c942 in fdalloc (td=3D0xfffff8010185e4c0,=20 > > minfd=3D, result=3D0xfffffe01aa4907dc) > > at /usr/src/sys/kern/kern_descrip.c:790 > > #10 0xffffffff8097cf95 in finstall (td=3D0xfffff8010185e4c0,=20 > > fp=3D0xfffff80139e89870, fd=3D0xfffffe01aa4907dc, flags=3D1, > > fcaps=3D0x0) at /usr/src/sys/kern/kern_descrip.c:1768 > > #11 0xffffffff80a99844 in kern_openat (td=3D0xfffff8010185e4c0, > > fd=3D-100, path=3D0xfffff80016832400 "/compat/linux/proc/stat", > > pathseg=3DUIO_SYSSPACE, flags=3D, mode=3D > optimized out>) at /usr/src/sys/kern/vfs_syscalls.c:1158 > > #12 0xffffffff8229fe93 in linux_common_open (td=3D0xfffff8010185e4c0, > > dirfd=3D8, path=3D0xfffff80016832400 "/compat/linux/proc/stat",=20 > > l_flags=3D, mode=3D51) > > at /usr/src/sys/modules/linux/../../compat/linux/linux_file.c:134 > > #13 0xffffffff822a0068 in linux_open (td=3D,=20 > > args=3D) > > at /usr/src/sys/modules/linux/../../compat/linux/linux_file.c:211 > > #14 0xffffffff80f7408b in ia32_syscall (frame=3D0xfffffe01aa490ac0) > > at subr_syscall.c:133 > > #15 0xffffffff80e57a05 in Xint0x80_syscall () at ia32_exception.S:73 > > #16 0x00000000ffffe452 in ?? () > > Previous frame inner to this frame (corrupt stack?) > > Current language: auto; currently minimal > > (kgdb)=20 > >=20 >=20 > The following should fix it: > diff --git a/sys/compat/linux/linux_fork.c > b/sys/compat/linux/linux_fork.c index 0fd47fd..394c26f 100644 > --- a/sys/compat/linux/linux_fork.c > +++ b/sys/compat/linux/linux_fork.c > @@ -298,7 +298,7 @@ linux_clone_thread(struct thread *td, struct > linux_clone_args *args) __rangeof(struct thread, td_startcopy, > td_endcopy));=20 > newtd->td_proc =3D p; > - newtd->td_ucred =3D crhold(td->td_ucred); > + thread_cow_get(newtd, td); > =20 > /* create the emuldata */ > linux_proc_init(td, newtd, args->flags); >=20 > Still, it seems a bug that linux_clone_thread replicates so much of > create_thread. >=20 Seems it helps to solve this problem. Panic more not reproduced. Thank you. From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 15:27:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14E1AC11 for ; Wed, 10 Jun 2015 15:27:00 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA0071593 for ; Wed, 10 Jun 2015 15:26:59 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by wgv5 with SMTP id 5so38593846wgv.1 for ; Wed, 10 Jun 2015 08:26:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=SpgZ8edF5F+rtdTNOiHAhqzmiaaRFVxYwml9dK2a7v8=; b=LmXJPPQyteciZ2A3r89paB9t9bygpwGt8WeKjFZET5woHJmORHpDZm9ADpqEHgkLdu 2ZeBc92e4toNdyFoSXKH8AyuocvbXDoBsR3h9st2gC1x4hpF7QpH+z9JMW4+/rC+LWzG zZLt/X4ux+WtKLuIaiP5zmX4SBSHaWjtB5yLD0XJ+3mRIZ4+UApKkCccw/ewDRYQCeF3 7IF8cfMYoohv2lRxRR4JVGOaGe+fbpyIX8cHppf/5xQP5esjEdLvrYhK6PGDfFlpWoY7 RbZLKCoP4pubqS56fQn6yJHpaAV+TyKAYjpntF4baZr+O7THtq1FgE2ICQ70UoPtyaht 9Zeg== X-Gm-Message-State: ALoCoQnShPMZOJ+HLKcbksStTbI8R5VNLVKFa8xgJKnepeY0VsBUOPbivX1xZXjitOeXZTO21Mgz MIME-Version: 1.0 X-Received: by 10.194.90.100 with SMTP id bv4mr6923550wjb.143.1433950012218; Wed, 10 Jun 2015 08:26:52 -0700 (PDT) Received: by 10.194.162.225 with HTTP; Wed, 10 Jun 2015 08:26:52 -0700 (PDT) In-Reply-To: <20150610145832.GA2301@vega.codepro.be> References: <201506101344.t5ADi4fk023661@svn.freebsd.org> <20150610145832.GA2301@vega.codepro.be> Date: Wed, 10 Jun 2015 17:26:52 +0200 Message-ID: Subject: Re: svn commit: r284222 - head/sys/netpfil/pf From: Oliver Pinter To: Kristof Provost Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 15:27:00 -0000 On 6/10/15, Kristof Provost wrote: > On 2015-06-10 16:53:33 (+0200), Oliver Pinter > wrote: >> On 6/10/15, Kristof Provost wrote: >> > Author: kp >> > Date: Wed Jun 10 13:44:04 2015 >> > New Revision: 284222 >> > URL: https://svnweb.freebsd.org/changeset/base/284222 >> > >> > Log: >> > pf: address family must be set when creating a pf_fragment >> > >> >> This commit required to 10-STABLE too or this bug exists only in >> 11-CURRENT? If the former, you have any plan to MFC the patch? >> > This is current-only. It's a result of the work done to make pf > understand v6 fragmentation. That hasn't been merged back to 10-STABLE > yet (although I have a vague plan to do this). > Until then this isn't required in 10-STABLE. Okay! Thank you Kristof! > > Regards, > Kristof > From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 15:34:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF16BE3D; Wed, 10 Jun 2015 15:34:43 +0000 (UTC) (envelope-from mjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD6D51804; Wed, 10 Jun 2015 15:34:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AFYhgv086468; Wed, 10 Jun 2015 15:34:43 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AFYhxX086467; Wed, 10 Jun 2015 15:34:43 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201506101534.t5AFYhxX086467@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 10 Jun 2015 15:34:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284226 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 15:34:43 -0000 Author: mjg Date: Wed Jun 10 15:34:43 2015 New Revision: 284226 URL: https://svnweb.freebsd.org/changeset/base/284226 Log: linux: make sure to grab all cow structs when creating a thread This is a fixup for r284214. Reported and tested by: Ivan Klymenko Modified: head/sys/compat/linux/linux_fork.c Modified: head/sys/compat/linux/linux_fork.c ============================================================================== --- head/sys/compat/linux/linux_fork.c Wed Jun 10 15:07:13 2015 (r284225) +++ head/sys/compat/linux/linux_fork.c Wed Jun 10 15:34:43 2015 (r284226) @@ -298,7 +298,7 @@ linux_clone_thread(struct thread *td, st __rangeof(struct thread, td_startcopy, td_endcopy)); newtd->td_proc = p; - newtd->td_ucred = crhold(td->td_ucred); + thread_cow_get(newtd, td); /* create the emuldata */ linux_proc_init(td, newtd, args->flags); From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 15:44:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B5BB360; Wed, 10 Jun 2015 15:44:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 021E11AB0; Wed, 10 Jun 2015 15:44:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t5AFijF3042127 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 10 Jun 2015 18:44:45 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t5AFijQB042126; Wed, 10 Jun 2015 18:44:45 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 10 Jun 2015 18:44:45 +0300 From: Gleb Smirnoff To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284211 - in head/sys: kern sys Message-ID: <20150610154445.GJ73119@FreeBSD.org> References: <201506100934.t5A9YpoN093925@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201506100934.t5A9YpoN093925@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 15:44:56 -0000 On Wed, Jun 10, 2015 at 09:34:51AM +0000, Mateusz Guzik wrote: M> Author: mjg M> Date: Wed Jun 10 09:34:50 2015 M> New Revision: 284211 M> URL: https://svnweb.freebsd.org/changeset/base/284211 M> M> Log: M> fd: use atomics to manage fd_refcnt and fd_holcnt M> M> This gets rid of fdesc_mtx. .. M> Modified: head/sys/sys/filedesc.h M> ============================================================================== M> --- head/sys/sys/filedesc.h Wed Jun 10 05:39:48 2015 (r284210) M> +++ head/sys/sys/filedesc.h Wed Jun 10 09:34:50 2015 (r284211) M> @@ -83,8 +83,8 @@ struct filedesc { M> int fd_lastfile; /* high-water mark of fd_ofiles */ M> int fd_freefile; /* approx. next free file */ M> u_short fd_cmask; /* mask for file creation */ M> - u_short fd_refcnt; /* thread reference count */ M> - u_short fd_holdcnt; /* hold count on structure + mutex */ M> + int fd_refcnt; /* thread reference count */ M> + int fd_holdcnt; /* hold count on structure + mutex */ M> struct sx fd_sx; /* protects members of this struct */ M> struct kqlist fd_kqlist; /* list of kqueues on this filedesc */ M> int fd_holdleaderscount; /* block fdfree() for shared close() */ Shouldn't they be volatile u_int? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 15:46:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8CFB65B; Wed, 10 Jun 2015 15:46:41 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 168EA1AD7; Wed, 10 Jun 2015 15:46:40 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t5AFkcam042149 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 10 Jun 2015 18:46:38 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t5AFkcjh042148; Wed, 10 Jun 2015 18:46:38 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 10 Jun 2015 18:46:38 +0300 From: Gleb Smirnoff To: Adrian Chadd Cc: Andrew Turner , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r283986 - head/sys/net80211 Message-ID: <20150610154638.GK73119@FreeBSD.org> References: <201506041055.t54AtaUD097445@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 15:46:41 -0000 Adrian, The patch was quite conservative, just to fix build. I think bigger part of ieee80211_freebsd.h should be hidden under _KERNEL? It could be that the entire file should. On Thu, Jun 04, 2015 at 08:04:38AM -0700, Adrian Chadd wrote: A> oops, sorry! Thanks Andrew! A> A> A> A> -a A> A> A> On 4 June 2015 at 03:55, Andrew Turner wrote: A> > Author: andrew A> > Date: Thu Jun 4 10:55:36 2015 A> > New Revision: 283986 A> > URL: https://svnweb.freebsd.org/changeset/base/283986 A> > A> > Log: A> > Fix the build by hiding ieee80211_add_xmit_params and A> > ieee80211_get_xmit_params from userspace. A> > A> > Modified: A> > head/sys/net80211/ieee80211_freebsd.h A> > A> > Modified: head/sys/net80211/ieee80211_freebsd.h A> > ============================================================================== A> > --- head/sys/net80211/ieee80211_freebsd.h Thu Jun 4 08:05:44 2015 (r283985) A> > +++ head/sys/net80211/ieee80211_freebsd.h Thu Jun 4 10:55:36 2015 (r283986) A> > @@ -610,6 +610,7 @@ struct ieee80211_bpf_params { A> > uint8_t ibp_rate3; /* series 4 IEEE tx rate */ A> > }; A> > A> > +#ifdef _KERNEL A> > struct ieee80211_tx_params { A> > struct ieee80211_bpf_params params; A> > }; A> > @@ -617,6 +618,7 @@ int ieee80211_add_xmit_params(struct mbu A> > const struct ieee80211_bpf_params *); A> > int ieee80211_get_xmit_params(struct mbuf *m, A> > struct ieee80211_bpf_params *); A> > +#endif /* _KERNEL */ A> > A> > /* A> > * Malloc API. Other BSD operating systems have slightly A> > A> -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 15:53:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B701792A; Wed, 10 Jun 2015 15:53:43 +0000 (UTC) (envelope-from br@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A32FF1D4B; Wed, 10 Jun 2015 15:53:43 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AFrh18096514; Wed, 10 Jun 2015 15:53:43 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AFreaV096497; Wed, 10 Jun 2015 15:53:40 GMT (envelope-from br@FreeBSD.org) Message-Id: <201506101553.t5AFreaV096497@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 10 Jun 2015 15:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284227 - in head/sys: amd64/conf arm/conf conf i386/conf powerpc/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 15:53:43 -0000 Author: br Date: Wed Jun 10 15:53:39 2015 New Revision: 284227 URL: https://svnweb.freebsd.org/changeset/base/284227 Log: Allow DTrace to be compiled-in to the kernel. This will require for AArch64 as we dont have modules yet. Sponsored by: HEIF5 Sponsored by: ARM Ltd. Differential Revision: https://reviews.freebsd.org/D1997 Modified: head/sys/amd64/conf/NOTES head/sys/arm/conf/NOTES head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.arm head/sys/conf/files.i386 head/sys/conf/files.powerpc head/sys/conf/kern.post.mk head/sys/conf/kern.pre.mk head/sys/i386/conf/NOTES head/sys/powerpc/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Wed Jun 10 15:34:43 2015 (r284226) +++ head/sys/amd64/conf/NOTES Wed Jun 10 15:53:39 2015 (r284227) @@ -17,6 +17,23 @@ profile 2 # options KDTRACE_HOOKS +# DTrace core +# NOTE: introduces CDDL-licensed components into the kernel +#device dtrace + +# DTrace modules +#device dtrace_lockstat +#device dtrace_profile +#device dtrace_sdt +#device dtrace_fbt +#device dtrace_systrace +#device dtrace_prototype +#device dtnfscl +#device dtmalloc + +# Alternatively include all the DTrace modules +#device dtraceall + ##################################################################### # SMP OPTIONS: Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Wed Jun 10 15:34:43 2015 (r284226) +++ head/sys/arm/conf/NOTES Wed Jun 10 15:53:39 2015 (r284227) @@ -86,3 +86,26 @@ nodevice cxgbe nodevice pcii nodevice snd_cmi nodevice tnt4882 + +# +# Enable the kernel DTrace hooks which are required to load the DTrace +# kernel modules. +# +options KDTRACE_HOOKS + +# DTrace core +# NOTE: introduces CDDL-licensed components into the kernel +#device dtrace + +# DTrace modules +#device dtrace_lockstat +#device dtrace_profile +#device dtrace_sdt +#device dtrace_fbt +#device dtrace_systrace +#device dtrace_prototype +#device dtnfscl +#device dtmalloc + +# Alternatively include all the DTrace modules +#device dtraceall Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Jun 10 15:34:43 2015 (r284226) +++ head/sys/conf/files Wed Jun 10 15:53:39 2015 (r284227) @@ -104,11 +104,12 @@ cam/scsi/scsi_targ_bh.c optional targbh cam/scsi/scsi_target.c optional targ cam/scsi/smp_all.c optional scbus # shared between zfs and dtrace -cddl/compat/opensolaris/kern/opensolaris.c optional zfs compile-with "${ZFS_C}" -cddl/compat/opensolaris/kern/opensolaris_cmn_err.c optional zfs compile-with "${ZFS_C}" -cddl/compat/opensolaris/kern/opensolaris_kmem.c optional zfs compile-with "${ZFS_C}" -cddl/compat/opensolaris/kern/opensolaris_misc.c optional zfs compile-with "${ZFS_C}" -cddl/compat/opensolaris/kern/opensolaris_sunddi.c optional zfs compile-with "${ZFS_C}" +cddl/compat/opensolaris/kern/opensolaris.c optional zfs | dtrace compile-with "${CDDL_C}" +cddl/compat/opensolaris/kern/opensolaris_cmn_err.c optional zfs | dtrace compile-with "${CDDL_C}" +cddl/compat/opensolaris/kern/opensolaris_kmem.c optional zfs | dtrace compile-with "${CDDL_C}" +cddl/compat/opensolaris/kern/opensolaris_misc.c optional zfs | dtrace compile-with "${CDDL_C}" +cddl/compat/opensolaris/kern/opensolaris_sunddi.c optional zfs | dtrace compile-with "${CDDL_C}" +cddl/compat/opensolaris/kern/opensolaris_taskq.c optional zfs | dtrace compile-with "${CDDL_C}" # zfs specific cddl/compat/opensolaris/kern/opensolaris_acl.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_dtrace.c optional zfs compile-with "${ZFS_C}" @@ -118,7 +119,6 @@ cddl/compat/opensolaris/kern/opensolaris cddl/compat/opensolaris/kern/opensolaris_policy.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_string.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_sysevent.c optional zfs compile-with "${ZFS_C}" -cddl/compat/opensolaris/kern/opensolaris_taskq.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_uio.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_vfs.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_vm.c optional zfs compile-with "${ZFS_C}" @@ -242,6 +242,17 @@ cddl/contrib/opensolaris/uts/common/zmod cddl/contrib/opensolaris/uts/common/zmod/zmod.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zmod_subr.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zutil.c optional zfs compile-with "${ZFS_C}" +# dtrace specific +cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c optional dtrace compile-with "${DTRACE_C}" \ + warning "kernel contains CDDL licensed DTRACE" +cddl/dev/dtmalloc/dtmalloc.c optional dtmalloc | dtraceall compile-with "${CDDL_C}" +cddl/dev/lockstat/lockstat.c optional dtrace_lockstat | dtraceall compile-with "${CDDL_C}" +cddl/dev/profile/profile.c optional dtrace_profile | dtraceall compile-with "${CDDL_C}" +cddl/dev/sdt/sdt.c optional dtrace_sdt | dtraceall compile-with "${CDDL_C}" +cddl/dev/fbt/fbt.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" +cddl/dev/systrace/systrace.c optional dtrace_systrace | dtraceall compile-with "${CDDL_C}" +cddl/dev/prototype.c optional dtrace_prototype | dtraceall compile-with "${CDDL_C}" +fs/nfsclient/nfs_clkdtrace.c optional dtnfscl nfscl | dtraceall nfscl compile-with "${CDDL_C}" compat/freebsd32/freebsd32_capability.c optional compat_freebsd32 compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Jun 10 15:34:43 2015 (r284226) +++ head/sys/conf/files.amd64 Wed Jun 10 15:53:39 2015 (r284227) @@ -138,7 +138,12 @@ amd64/amd64/uio_machdep.c standard amd64/amd64/uma_machdep.c standard amd64/amd64/vm_machdep.c standard amd64/pci/pci_cfgreg.c optional pci -cddl/contrib/opensolaris/common/atomic/amd64/opensolaris_atomic.S optional zfs compile-with "${ZFS_S}" +cddl/contrib/opensolaris/common/atomic/amd64/opensolaris_atomic.S optional zfs | dtrace compile-with "${ZFS_S}" +cddl/dev/dtrace/amd64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" +cddl/dev/dtrace/amd64/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" +cddl/dev/fbt/x86/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" +cddl/dev/dtrace/x86/dis_tables.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" +cddl/dev/dtrace/amd64/instr_size.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" crypto/aesni/aeskeys_amd64.S optional aesni crypto/aesni/aesni.c optional aesni aesni_ghash.o optional aesni \ Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Wed Jun 10 15:34:43 2015 (r284226) +++ head/sys/conf/files.arm Wed Jun 10 15:53:39 2015 (r284227) @@ -78,7 +78,10 @@ board_id.h standard \ compile-with "${AWK} -f $S/arm/conf/genboardid.awk $S/arm/conf/mach-types > board_id.h" \ no-obj no-implicit-rule before-depend \ clean "board_id.h" -cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs compile-with "${ZFS_C}" +cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs | dtrace compile-with "${CDDL_C}" +cddl/dev/dtrace/arm/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" +cddl/dev/dtrace/arm/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" +cddl/dev/fbt/arm/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/fb/fb.c optional sc Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Jun 10 15:34:43 2015 (r284226) +++ head/sys/conf/files.i386 Wed Jun 10 15:53:39 2015 (r284227) @@ -78,7 +78,12 @@ hptrr_lib.o optional hptrr \ compile-with "uudecode < $S/dev/hptrr/i386-elf.hptrr_lib.o.uu" \ no-implicit-rule # -cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomic.S optional zfs compile-with "${ZFS_S}" +cddl/contrib/opensolaris/common/atomic/i386/opensolaris_atomic.S optional zfs | dtrace compile-with "${ZFS_S}" +cddl/dev/dtrace/i386/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" +cddl/dev/dtrace/i386/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" +cddl/dev/fbt/x86/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" +cddl/dev/dtrace/x86/dis_tables.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" +cddl/dev/dtrace/i386/instr_size.c optional dtrace_fbt | dtraceall compile-with "${DTRACE_C}" compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs compat/linux/linux_event.c optional compat_linux Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Wed Jun 10 15:34:43 2015 (r284226) +++ head/sys/conf/files.powerpc Wed Jun 10 15:53:39 2015 (r284227) @@ -15,8 +15,11 @@ font.h optional sc \ clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" # # There is only an asm version on ppc64. -cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs powerpc compile-with "${ZFS_C}" -cddl/contrib/opensolaris/common/atomic/powerpc64/opensolaris_atomic.S optional zfs powerpc64 compile-with "${ZFS_S}" +cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs powerpc | dtrace powerpc compile-with "${ZFS_C}" +cddl/contrib/opensolaris/common/atomic/powerpc64/opensolaris_atomic.S optional zfs powerpc64 | dtrace powerpc64 compile-with "${ZFS_S}" +cddl/dev/dtrace/powerpc/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" +cddl/dev/dtrace/powerpc/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" +cddl/dev/fbt/powerpc/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/bm/if_bm.c optional bm powermac Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Wed Jun 10 15:34:43 2015 (r284226) +++ head/sys/conf/kern.post.mk Wed Jun 10 15:53:39 2015 (r284227) @@ -184,11 +184,11 @@ genassym.o: $S/$M/$M/genassym.c ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h -# We have "special" -I include paths for opensolaris/zfs files in 'depend'. -CFILES_NOZFS= ${CFILES:N*/opensolaris/*} -SFILES_NOZFS= ${SFILES:N*/opensolaris/*} -CFILES_ZFS= ${CFILES:M*/opensolaris/*} -SFILES_ZFS= ${SFILES:M*/opensolaris/*} +# We have "special" -I include paths for zfs/dtrace files in 'depend'. +CFILES_NOCDDL= ${CFILES:N*/cddl/*:N*fs/nfsclient/nfs_clkdtrace*} +SFILES_NOCDDL= ${SFILES:N*/cddl/*} +CFILES_CDDL= ${CFILES:M*/cddl/*} +SFILES_CDDL= ${SFILES:M*/cddl/*} kernel-depend: .depend # The argument list can be very long, so use make -V and xargs to @@ -198,13 +198,13 @@ SRCS= assym.s vnode_if.h ${BEFORE_DEPEND ${MFILES:T:S/.m$/.h/} .depend: .PRECIOUS ${SRCS} rm -f .newdep - ${MAKE} -V CFILES_NOZFS -V SYSTEM_CFILES -V GEN_CFILES | \ + ${MAKE} -V CFILES_NOCDDL -V SYSTEM_CFILES -V GEN_CFILES | \ MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${CFLAGS} - ${MAKE} -V CFILES_ZFS | \ - MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${ZFS_CFLAGS} - ${MAKE} -V SFILES_NOZFS | \ + ${MAKE} -V CFILES_CDDL | \ + MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${ZFS_CFLAGS} ${FBT_CFLAGS} ${DTRACE_CFLAGS} + ${MAKE} -V SFILES_NOCDDL | \ MKDEP_CPP="${CC} -E" xargs mkdep -a -f .newdep ${ASM_CFLAGS} - ${MAKE} -V SFILES_ZFS | \ + ${MAKE} -V SFILES_CDDL | \ MKDEP_CPP="${CC} -E" xargs mkdep -a -f .newdep ${ZFS_ASM_CFLAGS} rm -f .depend mv .newdep .depend Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Wed Jun 10 15:34:43 2015 (r284226) +++ head/sys/conf/kern.pre.mk Wed Jun 10 15:53:39 2015 (r284227) @@ -139,13 +139,34 @@ NORMAL_FW= uudecode -o ${.TARGET} ${.ALL NORMAL_FWO= ${LD} -b binary --no-warn-mismatch -d -warn-common -r \ -o ${.TARGET} ${.ALLSRC:M*.fw} +# Common for dtrace / zfs +CDDL_CFLAGS= -DFREEBSD_NAMECACHE -nostdinc -I$S/cddl/compat/opensolaris -I$S/cddl/contrib/opensolaris/uts/common -I$S -I$S/cddl/contrib/opensolaris/common ${CFLAGS} -Wno-unknown-pragmas -Wno-missing-prototypes -Wno-undef -Wno-strict-prototypes -Wno-cast-qual -Wno-parentheses -Wno-redundant-decls -Wno-missing-braces -Wno-uninitialized -Wno-unused -Wno-inline -Wno-switch -Wno-pointer-arith -Wno-unknown-pragmas +CDDL_CFLAGS+= -include $S/cddl/compat/opensolaris/sys/debug_compat.h +CDDL_C= ${CC} -c ${CDDL_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} + # Special flags for managing the compat compiles for ZFS -ZFS_CFLAGS= -DFREEBSD_NAMECACHE -DBUILDING_ZFS -nostdinc -I$S/cddl/compat/opensolaris -I$S/cddl/contrib/opensolaris/uts/common/fs/zfs -I$S/cddl/contrib/opensolaris/uts/common/zmod -I$S/cddl/contrib/opensolaris/uts/common -I$S -I$S/cddl/contrib/opensolaris/common/zfs -I$S/cddl/contrib/opensolaris/common ${CFLAGS} -Wno-unknown-pragmas -Wno-missing-prototypes -Wno-undef -Wno-strict-prototypes -Wno-cast-qual -Wno-parentheses -Wno-redundant-decls -Wno-missing-braces -Wno-uninitialized -Wno-unused -Wno-inline -Wno-switch -Wno-pointer-arith -Wno-unknown-pragmas -ZFS_CFLAGS+= -include $S/cddl/compat/opensolaris/sys/debug_compat.h +ZFS_CFLAGS= -DBUILDING_ZFS -I$S/cddl/contrib/opensolaris/uts/common/fs/zfs -I$S/cddl/contrib/opensolaris/uts/common/zmod -I$S/cddl/contrib/opensolaris/common/zfs ${CDDL_CFLAGS} ZFS_ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${ZFS_CFLAGS} ZFS_C= ${CC} -c ${ZFS_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} ZFS_S= ${CC} -c ${ZFS_ASM_CFLAGS} ${WERROR} ${.IMPSRC} +# Special flags for managing the compat compiles for DTrace +DTRACE_CFLAGS= -DBUILDING_DTRACE ${CDDL_CFLAGS} -I$S/cddl/dev/dtrace -I$S/cddl/dev/dtrace/${MACHINE_CPUARCH} +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +DTRACE_CFLAGS+= -I$S/cddl/contrib/opensolaris/uts/intel -I$S/cddl/dev/dtrace/x86 +.endif +DTRACE_CFLAGS+= -I$S/cddl/contrib/opensolaris/common/util -I$S -DDIS_MEM -DSMP +DTRACE_ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${DTRACE_CFLAGS} +DTRACE_C= ${CC} -c ${DTRACE_CFLAGS} ${CDDL_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} +DTRACE_S= ${CC} -c ${DTRACE_ASM_CFLAGS} ${CDDL_CFLAGS} ${WERROR} ${.IMPSRC} + +# Special flags for managing the compat compiles for DTrace/FBT +FBT_CFLAGS= -DBUILDING_DTRACE -nostdinc -I$S/cddl/dev/fbt/${MACHINE_CPUARCH} -I$S/cddl/dev/fbt -I$S/cddl/compat/opensolaris -I$S/cddl/contrib/opensolaris/uts/common -I$S ${CDDL_CFLAGS} +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +FBT_CFLAGS+= -I$S/cddl/dev/fbt/x86 +.endif +FBT_C= ${CC} -c ${FBT_CFLAGS} ${CDDL_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} + .if ${MK_CTF} != "no" NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .elif ${MAKE_VERSION} >= 5201111300 Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Wed Jun 10 15:34:43 2015 (r284226) +++ head/sys/i386/conf/NOTES Wed Jun 10 15:53:39 2015 (r284227) @@ -17,6 +17,23 @@ profile 2 # options KDTRACE_HOOKS +# DTrace core +# NOTE: introduces CDDL-licensed components into the kernel +#device dtrace + +# DTrace modules +#device dtrace_lockstat +#device dtrace_profile +#device dtrace_sdt +#device dtrace_fbt +#device dtrace_systrace +#device dtrace_prototype +#device dtnfscl +#device dtmalloc + +# Alternatively include all the DTrace modules +#device dtraceall + ##################################################################### # SMP OPTIONS: Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Wed Jun 10 15:34:43 2015 (r284226) +++ head/sys/powerpc/conf/NOTES Wed Jun 10 15:53:39 2015 (r284227) @@ -3,6 +3,28 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. +# +# Enable the kernel DTrace hooks which are required to load the DTrace +# kernel modules. +# +options KDTRACE_HOOKS + +# DTrace core +# NOTE: introduces CDDL-licensed components into the kernel +#device dtrace + +# DTrace modules +#device dtrace_lockstat +#device dtrace_profile +#device dtrace_sdt +#device dtrace_fbt +#device dtrace_systrace +#device dtrace_prototype +#device dtnfscl +#device dtmalloc + +# Alternatively include all the DTrace modules +#device dtraceall ##################################################################### From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 16:00:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 245A9B42; Wed, 10 Jun 2015 16:00:12 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 113961DCE; Wed, 10 Jun 2015 16:00:12 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AG0BjL097595; Wed, 10 Jun 2015 16:00:11 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AG09Rw097572; Wed, 10 Jun 2015 16:00:09 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506101600.t5AG09Rw097572@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Wed, 10 Jun 2015 16:00:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284228 - in head/tools/bus_space: . C Python X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 16:00:12 -0000 Author: marcel Date: Wed Jun 10 16:00:09 2015 New Revision: 284228 URL: https://svnweb.freebsd.org/changeset/base/284228 Log: Rename bus_space to bus (i.e. drop _space). This makes the API match the convenience macros in . Bus space can now reference both bus and busdma. Added: head/tools/bus_space/C/libbus.h - copied, changed from r284227, head/tools/bus_space/C/libbus_space.h head/tools/bus_space/bus.c - copied, changed from r284226, head/tools/bus_space/bus_space.c head/tools/bus_space/bus.h - copied unchanged from r284226, head/tools/bus_space/bus_space.h Deleted: head/tools/bus_space/C/libbus_space.h head/tools/bus_space/bus_space.c head/tools/bus_space/bus_space.h Modified: head/tools/bus_space/C/Makefile head/tools/bus_space/C/lang.c head/tools/bus_space/Makefile.inc head/tools/bus_space/Python/Makefile head/tools/bus_space/Python/lang.c Modified: head/tools/bus_space/C/Makefile ============================================================================== --- head/tools/bus_space/C/Makefile Wed Jun 10 15:53:39 2015 (r284227) +++ head/tools/bus_space/C/Makefile Wed Jun 10 16:00:09 2015 (r284228) @@ -1,9 +1,9 @@ # $FreeBSD$ -LIB= bus_space +LIB= bus SHLIB_MAJOR= 0 SRCS= lang.c -INCS= libbus_space.h +INCS= libbus.h CFLAGS+= -I${.CURDIR}/.. Modified: head/tools/bus_space/C/lang.c ============================================================================== --- head/tools/bus_space/C/lang.c Wed Jun 10 15:53:39 2015 (r284227) +++ head/tools/bus_space/C/lang.c Wed Jun 10 16:00:09 2015 (r284228) @@ -30,12 +30,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include "bus_space.h" +#include "bus.h" #include "busdma.h" -#include "libbus_space.h" +#include "libbus.h" int16_t -bus_space_read_1(int rid, long ofs) +bus_read_1(int rid, long ofs) { uint8_t val; @@ -43,7 +43,7 @@ bus_space_read_1(int rid, long ofs) } int32_t -bus_space_read_2(int rid, long ofs) +bus_read_2(int rid, long ofs) { uint16_t val; @@ -51,7 +51,7 @@ bus_space_read_2(int rid, long ofs) } int64_t -bus_space_read_4(int rid, long ofs) +bus_read_4(int rid, long ofs) { uint32_t val; @@ -59,42 +59,42 @@ bus_space_read_4(int rid, long ofs) } int -bus_space_write_1(int rid, long ofs, uint8_t val) +bus_write_1(int rid, long ofs, uint8_t val) { return ((!bs_write(rid, ofs, &val, sizeof(val))) ? errno : 0); } int -bus_space_write_2(int rid, long ofs, uint16_t val) +bus_write_2(int rid, long ofs, uint16_t val) { return ((!bs_write(rid, ofs, &val, sizeof(val))) ? errno : 0); } int -bus_space_write_4(int rid, long ofs, uint32_t val) +bus_write_4(int rid, long ofs, uint32_t val) { return ((!bs_write(rid, ofs, &val, sizeof(val))) ? errno : 0); } int -bus_space_map(const char *dev) +bus_map(const char *dev) { return (bs_map(dev)); } int -bus_space_unmap(int rid) +bus_unmap(int rid) { return ((!bs_unmap(rid)) ? errno : 0); } int -bus_space_subregion(int rid, long ofs, long sz) +bus_subregion(int rid, long ofs, long sz) { return (bs_subregion(rid, ofs, sz)); Copied and modified: head/tools/bus_space/C/libbus.h (from r284227, head/tools/bus_space/C/libbus_space.h) ============================================================================== --- head/tools/bus_space/C/libbus_space.h Wed Jun 10 15:53:39 2015 (r284227, copy source) +++ head/tools/bus_space/C/libbus.h Wed Jun 10 16:00:09 2015 (r284228) @@ -29,15 +29,15 @@ #ifndef _LIBBUS_SPACE_H_ #define _LIBBUS_SPACE_H_ -int bus_space_map(const char *dev); -int16_t bus_space_read_1(int rid, long ofs); -int32_t bus_space_read_2(int rid, long ofs); -int64_t bus_space_read_4(int rid, long ofs); -int bus_space_subregion(int rid, long ofs, long sz); -int bus_space_unmap(int rid); -int bus_space_write_1(int rid, long ofs, uint8_t val); -int bus_space_write_2(int rid, long ofs, uint16_t val); -int bus_space_write_4(int rid, long ofs, uint32_t val); +int bus_map(const char *dev); +int16_t bus_read_1(int rid, long ofs); +int32_t bus_read_2(int rid, long ofs); +int64_t bus_read_4(int rid, long ofs); +int bus_subregion(int rid, long ofs, long sz); +int bus_unmap(int rid); +int bus_write_1(int rid, long ofs, uint8_t val); +int bus_write_2(int rid, long ofs, uint16_t val); +int bus_write_4(int rid, long ofs, uint32_t val); typedef unsigned long bus_addr_t; typedef unsigned long bus_size_t; Modified: head/tools/bus_space/Makefile.inc ============================================================================== --- head/tools/bus_space/Makefile.inc Wed Jun 10 15:53:39 2015 (r284227) +++ head/tools/bus_space/Makefile.inc Wed Jun 10 16:00:09 2015 (r284228) @@ -1,4 +1,4 @@ # $FreeBSD$ .PATH: ${.CURDIR}/.. -SRCS+= bus_space.c busdma.c +SRCS+= bus.c busdma.c Modified: head/tools/bus_space/Python/Makefile ============================================================================== --- head/tools/bus_space/Python/Makefile Wed Jun 10 15:53:39 2015 (r284227) +++ head/tools/bus_space/Python/Makefile Wed Jun 10 16:00:09 2015 (r284228) @@ -1,6 +1,6 @@ # $FreeBSD$ -SHLIB_NAME= bus_space.so +SHLIB_NAME= bus.so SRCS= lang.c CFLAGS+= -I${.CURDIR}/.. -I/usr/local/include/python2.7 Modified: head/tools/bus_space/Python/lang.c ============================================================================== --- head/tools/bus_space/Python/lang.c Wed Jun 10 15:53:39 2015 (r284227) +++ head/tools/bus_space/Python/lang.c Wed Jun 10 16:00:09 2015 (r284228) @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD$"); #include -#include "bus_space.h" +#include "bus.h" #include "busdma.h" static PyObject * @@ -259,7 +259,7 @@ busdma_mem_free(PyObject *self, PyObject Py_RETURN_NONE; } -static PyMethodDef bus_space_methods[] = { +static PyMethodDef bus_methods[] = { { "read_1", bus_read_1, METH_VARARGS, "Read a 1-byte data item." }, { "read_2", bus_read_2, METH_VARARGS, "Read a 2-byte data item." }, { "read_4", bus_read_4, METH_VARARGS, "Read a 4-byte data item." }, @@ -293,9 +293,9 @@ static PyMethodDef busdma_methods[] = { }; PyMODINIT_FUNC -initbus_space(void) +initbus(void) { - Py_InitModule("bus_space", bus_space_methods); + Py_InitModule("bus", bus_methods); Py_InitModule("busdma", busdma_methods); } Copied and modified: head/tools/bus_space/bus.c (from r284226, head/tools/bus_space/bus_space.c) ============================================================================== --- head/tools/bus_space/bus_space.c Wed Jun 10 15:34:43 2015 (r284226, copy source) +++ head/tools/bus_space/bus.c Wed Jun 10 16:00:09 2015 (r284228) @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "bus_space.h" +#include "bus.h" #include "../../sys/dev/proto/proto_dev.h" Copied: head/tools/bus_space/bus.h (from r284226, head/tools/bus_space/bus_space.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/bus_space/bus.h Wed Jun 10 16:00:09 2015 (r284228, copy of r284226, head/tools/bus_space/bus_space.h) @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2014 Marcel Moolenaar + * 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 AUTHOR ``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 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 _TOOLS_BUS_SPACE_H_ +#define _TOOLS_BUS_SPACE_H_ + +int bs_map(const char *dev); +int bs_read(int rid, off_t ofs, void *buf, ssize_t bufsz); +int bs_subregion(int rid0, long ofs, long sz); +int bs_unmap(int rid); +int bs_write(int rid, off_t ofs, void *buf, ssize_t bufsz); + +#endif /* _TOOLS_BUS_SPACE_H_ */ From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 16:15:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 731CEED4; Wed, 10 Jun 2015 16:15:23 +0000 (UTC) (envelope-from ume@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 619FD1200; Wed, 10 Jun 2015 16:15:23 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AGFNq0007093; Wed, 10 Jun 2015 16:15:23 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AGFNFS007092; Wed, 10 Jun 2015 16:15:23 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201506101615.t5AGFNFS007092@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Wed, 10 Jun 2015 16:15:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284229 - head/lib/libc/resolv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 16:15:23 -0000 Author: ume Date: Wed Jun 10 16:15:22 2015 New Revision: 284229 URL: https://svnweb.freebsd.org/changeset/base/284229 Log: Add support for '_' occurring at the beginning or end of a name component. PR: 176093 Submitted by: landonf__at__bikemonkey.org MFC after: 1 week Modified: head/lib/libc/resolv/res_comp.c Modified: head/lib/libc/resolv/res_comp.c ============================================================================== --- head/lib/libc/resolv/res_comp.c Wed Jun 10 16:00:09 2015 (r284228) +++ head/lib/libc/resolv/res_comp.c Wed Jun 10 16:15:22 2015 (r284229) @@ -147,12 +147,12 @@ dn_skipname(const u_char *ptr, const u_c || ((c) >= 0x61 && (c) <= 0x7a)) #define digitchar(c) ((c) >= 0x30 && (c) <= 0x39) -#define borderchar(c) (alphachar(c) || digitchar(c)) #ifdef RES_ENFORCE_RFC1034 -#define middlechar(c) (borderchar(c) || hyphenchar(c)) +#define borderchar(c) (alphachar(c) || digitchar(c)) #else -#define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c)) +#define borderchar(c) (alphachar(c) || digitchar(c) || underscorechar(c)) #endif +#define middlechar(c) (borderchar(c) || hyphenchar(c)) #define domainchar(c) ((c) > 0x20 && (c) < 0x7f) int From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 18:03:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 721B0373; Wed, 10 Jun 2015 18:03:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [IPv6:2607:f8b0:4001:c03::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B6411048; Wed, 10 Jun 2015 18:03:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iebps5 with SMTP id ps5so1224350ieb.3; Wed, 10 Jun 2015 11:03:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=KOBVFicV/elyQLQWjUYI23fF6hsGxFBK7gNDa+3aYhc=; b=amPiUt7ADz+FXqg35QWt+CdRHsx/pQaLnmum3Cb4kTXc3KpMP6gdOrgv0kNlXZYpJF CjekB7OFcgerGzvGjmu42GerP7chr45OKGE6RqlODYRw8TqrZc0PcNm/u6XmgAAk61CA QTGg0MLh1lMBDhGsAmjPNjG81JBT/KVe1su9hIedz8g0KPmwP7KRP7YW3Grk9cXyFrLm 9u3LW/7JzEMrf67FpyO++2r2v6sQiJUWEpzMEAbJqjmh5Uz5ZuqGUC5NTRrAKtRA9Q6Q SxWG7KD8j7D45oKl2W9IwVPadNSdKqYLVBFTZ/LmaW90i7R2HNTKP2kzLXNOKDqu/eD6 xSqw== MIME-Version: 1.0 X-Received: by 10.107.155.74 with SMTP id d71mr5928780ioe.29.1433959401667; Wed, 10 Jun 2015 11:03:21 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Wed, 10 Jun 2015 11:03:21 -0700 (PDT) In-Reply-To: <20150610154638.GK73119@FreeBSD.org> References: <201506041055.t54AtaUD097445@svn.freebsd.org> <20150610154638.GK73119@FreeBSD.org> Date: Wed, 10 Jun 2015 11:03:21 -0700 X-Google-Sender-Auth: 8Zlyv2_D13qrky-o_vpnfWeUsnk Message-ID: Subject: Re: svn commit: r283986 - head/sys/net80211 From: Adrian Chadd To: Gleb Smirnoff Cc: Andrew Turner , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 18:03:22 -0000 I'd rather eventually split the file up into kernel and non-kernel bits. -a From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 18:48:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 57292605; Wed, 10 Jun 2015 18:48:02 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv158.fwdcdn.com (frv158.fwdcdn.com [212.42.77.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 993BD1C5D; Wed, 10 Jun 2015 18:48:01 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=JuxHfgUKRz+CStxk6IEr44phtUPL3y8N4v0HwOWVRSw=; b=UeucEhULl/SGDoWVYT/PagBJmT0QdTHX2DfTdEMjziL21xW9A0Dg1/ZYHq8Ocv+sJu3UB1UVq/i+YtV1Eg50bPPKxx8jO1khyDuUQRU0/Rxytmtv7UQz93asc1bcCJaIcuKFIbPTcQgrhzxzlFak6GTC43XSMnDdqXxEBStCT6Y=; Received: from [134.249.91.180] (helo=nonamehost.local) by frv158.fwdcdn.com with esmtpsa ID 1Z2l2c-000Jij-1b ; Wed, 10 Jun 2015 21:47:58 +0300 Date: Wed, 10 Jun 2015 21:47:57 +0300 From: Ivan Klymenko To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm Message-ID: <20150610214757.59a4b2d0@nonamehost.local> In-Reply-To: <201506101048.t5AAmD1O029382@svn.freebsd.org> References: <201506101048.t5AAmD1O029382@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Result: IP=134.249.91.180; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 18:48:02 -0000 Wed, 10 Jun 2015 10:48:13 +0000 (UTC) Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=B2: > kern_resource.c I get another panic - this time with VirtualBox: nonamehost.local dumped core - see /var/crash/vmcore.0 Wed Jun 10 21:38:13 EEST 2015 FreeBSD nonamehost.local 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r284222M: Wed= Jun 10 17:58:54 EEST 2015 ivan@nonamehost.local:/media/da0s1/obj/usr/s= rc/sys/mk11 amd64 panic: page fault GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain condition= s. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... Unread portion of the kernel message buffer: Fatal trap 12: page fault while in kernel mode cpuid =3D 3; apic id =3D 03 fault virtual address =3D 0x20030020 fault code =3D supervisor read data, page not present instruction pointer =3D 0x20:0xffffffff809cfb1a stack pointer =3D 0x28:0xfffffe01aa0f95c0 frame pointer =3D 0x28:0xfffffe01aa0f95e0 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 8647 (VirtualBox) trap number =3D 12 panic: page fault cpuid =3D 3 KDB: stack backtrace: #0 0xffffffff80a17c27 at kdb_backtrace+0x67 #1 0xffffffff809d3f79 at vpanic+0x189 #2 0xffffffff809d3de3 at panic+0x43 #3 0xffffffff80e73b35 at trap_fatal+0x355 #4 0xffffffff80e73e6e at trap_pfault+0x31e #5 0xffffffff80e734d4 at trap+0x464 #6 0xffffffff80e57422 at calltrap+0x8 #7 0xffffffff8244eb94 at rtR0MemObjNativeMapUser+0xa4 #8 0xffffffff8244d935 at RTR0MemObjMapUserTag+0x135 #9 0xffffffff82435382 at SUPR0GipMap+0x152 #10 0xffffffff82431311 at supdrvIOCtlInnerUnrestricted+0xa11 #11 0xffffffff8243b515 at VBoxDrvFreeBSDIOCtl+0x1b5 #12 0xffffffff80897dab at devfs_ioctl_f+0x13b #13 0xffffffff80a35ee1 at kern_ioctl+0x401 #14 0xffffffff80a35a33 at sys_ioctl+0x153 #15 0xffffffff80e74579 at amd64_syscall+0x3e9 #16 0xffffffff80e5770b at Xfast_syscall+0xfb Uptime: 3h23m47s Dumping 998 out of 6047 MB:..2%..12%..21%..31%..41%..52%..61%..71%..81%..92% Reading symbols from /bootpool/boot/kernel/fdescfs.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/fdescfs.ko.symbols Reading symbols from /bootpool/boot/kernel/linprocfs.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/linprocfs.ko.symbols Reading symbols from /bootpool/boot/kernel/linux_common.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/linux_common.ko.symbols Reading symbols from /bootpool/boot/kernel/linsysfs.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/linsysfs.ko.symbols Reading symbols from /bootpool/boot/kernel/zfs.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/zfs.ko.symbols Reading symbols from /bootpool/boot/kernel/opensolaris.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/opensolaris.ko.symbols Reading symbols from /bootpool/boot/kernel/coretemp.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/coretemp.ko.symbols Reading symbols from /bootpool/boot/kernel/ichwd.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ichwd.ko.symbols Reading symbols from /bootpool/boot/kernel/cpuctl.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cpuctl.ko.symbols Reading symbols from /bootpool/boot/kernel/aesni.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/aesni.ko.symbols Reading symbols from /bootpool/boot/kernel/crypto.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/crypto.ko.symbols Reading symbols from /bootpool/boot/kernel/cryptodev.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cryptodev.ko.symbols Reading symbols from /bootpool/boot/kernel/sem.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/sem.ko.symbols Reading symbols from /bootpool/boot/kernel/accf_data.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/accf_data.ko.symbols Reading symbols from /bootpool/boot/kernel/accf_http.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/accf_http.ko.symbols Reading symbols from /bootpool/boot/kernel/accf_dns.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/accf_dns.ko.symbols Reading symbols from /bootpool/boot/kernel/h_ertt.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/h_ertt.ko.symbols Reading symbols from /bootpool/boot/kernel/cc_cdg.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cc_cdg.ko.symbols Reading symbols from /bootpool/boot/kernel/cc_chd.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cc_chd.ko.symbols Reading symbols from /bootpool/boot/kernel/cc_cubic.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cc_cubic.ko.symbols Reading symbols from /bootpool/boot/kernel/cc_hd.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cc_hd.ko.symbols Reading symbols from /bootpool/boot/kernel/cc_htcp.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cc_htcp.ko.symbols Reading symbols from /bootpool/boot/kernel/cc_vegas.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cc_vegas.ko.symbols Reading symbols from /bootpool/boot/kernel/aio.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/aio.ko.symbols Reading symbols from /bootpool/boot/kernel/tmpfs.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/tmpfs.ko.symbols Reading symbols from /bootpool/boot/kernel/fuse.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/fuse.ko.symbols Reading symbols from /bootpool/boot/kernel/acpi_hp.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/acpi_hp.ko.symbols Reading symbols from /bootpool/boot/kernel/acpi_wmi.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/acpi_wmi.ko.symbols Reading symbols from /bootpool/boot/kernel/acpi_video.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/acpi_video.ko.symbols Reading symbols from /bootpool/boot/kernel/linux.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/linux.ko.symbols Reading symbols from /bootpool/boot/kernel/i915.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/i915.ko.symbols Reading symbols from /bootpool/boot/kernel/drm.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/drm.ko.symbols Reading symbols from /bootpool/boot/kernel/i915kms.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/i915kms.ko.symbols Reading symbols from /bootpool/boot/kernel/drm2.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/drm2.ko.symbols Reading symbols from /bootpool/boot/kernel/iicbus.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/iicbus.ko.symbols Reading symbols from /bootpool/boot/kernel/iic.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/iic.ko.symbols Reading symbols from /bootpool/boot/kernel/iicbb.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/iicbb.ko.symbols Reading symbols from /bootpool/boot/kernel/smbus.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/smbus.ko.symbols Reading symbols from /bootpool/boot/kernel/smb.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/smb.ko.symbols Reading symbols from /bootpool/boot/kernel/ichsmb.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ichsmb.ko.symbols Reading symbols from /bootpool/boot/kernel/snd_uaudio.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/snd_uaudio.ko.symbols Reading symbols from /boot/modules/cuse4bsd.ko...done. Loaded symbols for /boot/modules/cuse4bsd.ko Reading symbols from /bootpool/boot/kernel/ng_bt3c.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ng_bt3c.ko.symbols Reading symbols from /bootpool/boot/kernel/netgraph.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/netgraph.ko.symbols Reading symbols from /bootpool/boot/kernel/ng_ubt.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ng_ubt.ko.symbols Reading symbols from /bootpool/boot/kernel/ng_hci.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ng_hci.ko.symbols Reading symbols from /bootpool/boot/kernel/ng_bluetooth.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ng_bluetooth.ko.symbols Reading symbols from /bootpool/boot/kernel/ubtbcmfw.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ubtbcmfw.ko.symbols Reading symbols from /bootpool/boot/kernel/cd9660_iconv.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/cd9660_iconv.ko.symbols Reading symbols from /bootpool/boot/kernel/libiconv.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/libiconv.ko.symbols Reading symbols from /bootpool/boot/kernel/wlan_xauth.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/wlan_xauth.ko.symbols Reading symbols from /bootpool/boot/kernel/wlan_acl.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/wlan_acl.ko.symbols Reading symbols from /bootpool/boot/kernel/libmchain.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/libmchain.ko.symbols Reading symbols from /bootpool/boot/kernel/ums.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ums.ko.symbols Reading symbols from /bootpool/boot/kernel/ng_ether.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ng_ether.ko.symbols Reading symbols from /bootpool/boot/kernel/ng_btsocket.ko.symbols...done. Loaded symbols for /bootpool/boot/kernel/ng_btsocket.ko.symbols Reading symbols from /usr/local/modules/rtc.ko...done. Loaded symbols for /usr/local/modules/rtc.ko Reading symbols from /boot/modules/vboxnetflt.ko...done. Loaded symbols for /boot/modules/vboxnetflt.ko Reading symbols from /boot/modules/vboxdrv.ko...done. Loaded symbols for /boot/modules/vboxdrv.ko Reading symbols from /boot/modules/vboxnetadp.ko...done. Loaded symbols for /boot/modules/vboxnetadp.ko #0 doadump (textdump=3D) at pcpu.h:221 221 pcpu.h: No such file or directory. in pcpu.h (kgdb) #0 doadump (textdump=3D) at pcpu.h:221 #1 0xffffffff809d3a7d in kern_reboot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:447 #2 0xffffffff809d3fb8 in vpanic (fmt=3D,=20 ap=3D) at /usr/src/sys/kern/kern_shutdown.c:744 #3 0xffffffff809d3de3 in panic (fmt=3D0x0) at /usr/src/sys/kern/kern_shutdown.c:675 #4 0xffffffff80e73b35 in trap_fatal (frame=3D,=20 eva=3D) at /usr/src/sys/amd64/amd64/trap.c:853 #5 0xffffffff80e73e6e in trap_pfault (frame=3D0xfffffe01aa0f9510,=20 usermode=3D) at /usr/src/sys/amd64/amd64/trap.c:676 #6 0xffffffff80e734d4 in trap (frame=3D0xfffffe01aa0f9510) at /usr/src/sys/amd64/amd64/trap.c:426 #7 0xffffffff80e57422 in calltrap () at /usr/src/sys/amd64/amd64/exception.S:235 #8 0xffffffff809cfb1a in lim_max (td=3D0xfffff8008e3b4a70, which=3D2) at /usr/src/sys/kern/kern_resource.c:1209 #9 0xffffffff8244eb94 in rtR0MemObjNativeMapUser () from /boot/modules/vboxdrv.ko #10 0xffffffff8244d935 in RTR0MemObjMapUserTag () from /boot/modules/vboxdrv.ko #11 0xffffffff82435382 in SUPR0GipMap () from /boot/modules/vboxdrv.ko #12 0xffffffff82431311 in supdrvIOCtlInnerUnrestricted () from /boot/modules/vboxdrv.ko #13 0xffffffff8243b515 in VBoxDrvFreeBSDIOCtl () from /boot/modules/vboxdrv= .ko #14 0xffffffff80897dab in devfs_ioctl_f (fp=3D0xfffff8008e3b4a70,=20 com=3D18446744073709551615, data=3D0x1, cred=3D,=20 td=3D0xfffff80027d64000) at /usr/src/sys/fs/devfs/devfs_vnops.c:806 #15 0xffffffff80a35ee1 in kern_ioctl (td=3D0xfffff8005dedc980,=20 fd=3D, com=3D2, data=3D) at f= ile.h:326 #16 0xffffffff80a35a33 in sys_ioctl (td=3D0xfffff8005dedc980,=20 uap=3D0xfffffe01aa0f9a40) at /usr/src/sys/kern/sys_generic.c:722 #17 0xffffffff80e74579 in amd64_syscall (td=3D0xfffff8005dedc980, traced=3D= 0) at subr_syscall.c:133 #18 0xffffffff80e5770b in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:395 #19 0x000000080129b6ca in ?? () Previous frame inner to this frame (corrupt stack?) Current language: auto; currently minimal (kgdb)=20 From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 19:00:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75390833; Wed, 10 Jun 2015 19:00:55 +0000 (UTC) (envelope-from mjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63D6C1F32; Wed, 10 Jun 2015 19:00:55 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AJ0tTM001045; Wed, 10 Jun 2015 19:00:55 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AJ0tD5001044; Wed, 10 Jun 2015 19:00:55 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201506101900.t5AJ0tD5001044@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 10 Jun 2015 19:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284233 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 19:00:55 -0000 Author: mjg Date: Wed Jun 10 19:00:54 2015 New Revision: 284233 URL: https://svnweb.freebsd.org/changeset/base/284233 Log: Bump FreeBSD_version due to lim_* API changes in r284215 Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Jun 10 18:14:38 2015 (r284232) +++ head/sys/sys/param.h Wed Jun 10 19:00:54 2015 (r284233) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100076 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100077 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 19:09:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F3F2F82; Wed, 10 Jun 2015 19:09:32 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 96FDC10DC; Wed, 10 Jun 2015 19:09:31 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wibut5 with SMTP id ut5so57565563wib.1; Wed, 10 Jun 2015 12:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=1DicaDYEpa0uP6YvuNy76ZU3Ki9xBrAghb4+Sr86poM=; b=E/50iKTqaiU+WQrIYU6RtVB3vc0VxfOifIQWXCe9hNsiviN942D6t8GNAW1iL6I7WM xwEOxANnGomnlJ8Ggxef4x52oFbZtK1z59H0kmJyhuqfRlDryjCAnJ9ijUYYd7wWvMWD yz9ydRVoEY435YeHjMIh4ONEN6VMH7SPzXvMAIHATIdKw/bEtSVgkuam1SqNPYZbhpmM 38XyU4XFMR2UWQEjQqlhODa5OE9zTuLSYoOhixrFeChFVxT6SveXPnTWGohIufKqqR4G utBWbrLv4nZxG6IAisvB9LFBPm6b+uhVSR1nAcuz/NQWd9wlzynBtl9AbJdjtmGQswlB sVaw== X-Received: by 10.194.177.133 with SMTP id cq5mr8590770wjc.145.1433963370067; Wed, 10 Jun 2015 12:09:30 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id r6sm9298522wiy.13.2015.06.10.12.09.27 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 10 Jun 2015 12:09:28 -0700 (PDT) Date: Wed, 10 Jun 2015 21:09:25 +0200 From: Mateusz Guzik To: Ivan Klymenko Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm Message-ID: <20150610190925.GD23380@dft-labs.eu> References: <201506101048.t5AAmD1O029382@svn.freebsd.org> <20150610214757.59a4b2d0@nonamehost.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150610214757.59a4b2d0@nonamehost.local> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 19:09:32 -0000 On Wed, Jun 10, 2015 at 09:47:57PM +0300, Ivan Klymenko wrote: > Wed, 10 Jun 2015 10:48:13 +0000 (UTC) > Mateusz Guzik напиÑав: > > > kern_resource.c > > I get another panic - this time with VirtualBox: > > nonamehost.local dumped core - see /var/crash/vmcore.0 > > Wed Jun 10 21:38:13 EEST 2015 > > FreeBSD nonamehost.local 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r284222M: Wed Jun 10 17:58:54 EEST 2015 ivan@nonamehost.local:/media/da0s1/obj/usr/src/sys/mk11 amd64 > > panic: page fault > > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "amd64-marcel-freebsd"... > > Unread portion of the kernel message buffer: > > > Fatal trap 12: page fault while in kernel mode > cpuid = 3; apic id = 03 > fault virtual address = 0x20030020 > fault code = supervisor read data, page not present > instruction pointer = 0x20:0xffffffff809cfb1a > stack pointer = 0x28:0xfffffe01aa0f95c0 > frame pointer = 0x28:0xfffffe01aa0f95e0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 8647 (VirtualBox) > trap number = 12 > panic: page fault > cpuid = 3 > KDB: stack backtrace: > #0 0xffffffff80a17c27 at kdb_backtrace+0x67 > #1 0xffffffff809d3f79 at vpanic+0x189 > #2 0xffffffff809d3de3 at panic+0x43 > #3 0xffffffff80e73b35 at trap_fatal+0x355 > #4 0xffffffff80e73e6e at trap_pfault+0x31e > #5 0xffffffff80e734d4 at trap+0x464 > #6 0xffffffff80e57422 at calltrap+0x8 > #7 0xffffffff8244eb94 at rtR0MemObjNativeMapUser+0xa4 > #8 0xffffffff8244d935 at RTR0MemObjMapUserTag+0x135 > #9 0xffffffff82435382 at SUPR0GipMap+0x152 > #10 0xffffffff82431311 at supdrvIOCtlInnerUnrestricted+0xa11 > #11 0xffffffff8243b515 at VBoxDrvFreeBSDIOCtl+0x1b5 > #12 0xffffffff80897dab at devfs_ioctl_f+0x13b > #13 0xffffffff80a35ee1 at kern_ioctl+0x401 > #14 0xffffffff80a35a33 at sys_ioctl+0x153 > #15 0xffffffff80e74579 at amd64_syscall+0x3e9 > #16 0xffffffff80e5770b at Xfast_syscall+0xfb > Uptime: 3h23m47s > Dumping 998 out of 6047 MB:..2%..12%..21%..31%..41%..52%..61%..71%..81%..92% > > 221 pcpu.h: No such file or directory. > in pcpu.h > (kgdb) #0 doadump (textdump=) at pcpu.h:221 > #1 0xffffffff809d3a7d in kern_reboot (howto=260) > at /usr/src/sys/kern/kern_shutdown.c:447 > #2 0xffffffff809d3fb8 in vpanic (fmt=, > ap=) at /usr/src/sys/kern/kern_shutdown.c:744 > #3 0xffffffff809d3de3 in panic (fmt=0x0) > at /usr/src/sys/kern/kern_shutdown.c:675 > #4 0xffffffff80e73b35 in trap_fatal (frame=, > eva=) at /usr/src/sys/amd64/amd64/trap.c:853 > #5 0xffffffff80e73e6e in trap_pfault (frame=0xfffffe01aa0f9510, > usermode=) at /usr/src/sys/amd64/amd64/trap.c:676 > #6 0xffffffff80e734d4 in trap (frame=0xfffffe01aa0f9510) > at /usr/src/sys/amd64/amd64/trap.c:426 > #7 0xffffffff80e57422 in calltrap () > at /usr/src/sys/amd64/amd64/exception.S:235 > #8 0xffffffff809cfb1a in lim_max (td=0xfffff8008e3b4a70, which=2) > at /usr/src/sys/kern/kern_resource.c:1209 > #9 0xffffffff8244eb94 in rtR0MemObjNativeMapUser () > from /boot/modules/vboxdrv.ko > #10 0xffffffff8244d935 in RTR0MemObjMapUserTag () > from /boot/modules/vboxdrv.ko > #11 0xffffffff82435382 in SUPR0GipMap () from /boot/modules/vboxdrv.ko > #12 0xffffffff82431311 in supdrvIOCtlInnerUnrestricted () > from /boot/modules/vboxdrv.ko > #13 0xffffffff8243b515 in VBoxDrvFreeBSDIOCtl () from /boot/modules/vboxdrv.ko > #14 0xffffffff80897dab in devfs_ioctl_f (fp=0xfffff8008e3b4a70, > com=18446744073709551615, data=0x1, cred=, > td=0xfffff80027d64000) at /usr/src/sys/fs/devfs/devfs_vnops.c:806 > #15 0xffffffff80a35ee1 in kern_ioctl (td=0xfffff8005dedc980, > fd=, com=2, data=) at file.h:326 > #16 0xffffffff80a35a33 in sys_ioctl (td=0xfffff8005dedc980, > uap=0xfffffe01aa0f9a40) at /usr/src/sys/kern/sys_generic.c:722 > #17 0xffffffff80e74579 in amd64_syscall (td=0xfffff8005dedc980, traced=0) > at subr_syscall.c:133 > #18 0xffffffff80e5770b in Xfast_syscall () > at /usr/src/sys/amd64/amd64/exception.S:395 > #19 0x000000080129b6ca in ?? () > Previous frame inner to this frame (corrupt stack?) > Current language: auto; currently minimal > (kgdb) Have you recompiled the module after you updated the kernel? Quick guess suggests that the passed pointer is to struct proc, while the function in question now expects struct thread. lim_max_proc can be used instead if thread pointer is not suitable. -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 19:13:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED298458; Wed, 10 Jun 2015 19:13:21 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv158.fwdcdn.com (frv158.fwdcdn.com [212.42.77.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB9CF1483; Wed, 10 Jun 2015 19:13:21 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=bWXAcZbdc06SnsQV56Sgwr4fIVKbJXRIIxbIam4FL6Q=; b=phv4qPM6XLGP/s6nwqH2k2a0I1EeDxBtUeDoBIHzcX5k81apSj8qCgnjv9AUXUXv9dqvUesqNYnmsh4Albx7UhlFpvUMMTPUL//BpyTO+1PGLeJraXL3zWDcoMnEfEHNo/zYtLBhtqzdfAhJizs1SXlNwz9+LqY6z7jNDueYet8=; Received: from [134.249.91.180] (helo=nonamehost.local) by frv158.fwdcdn.com with esmtpsa ID 1Z2lR8-0006s4-9c ; Wed, 10 Jun 2015 22:13:18 +0300 Date: Wed, 10 Jun 2015 22:13:17 +0300 From: Ivan Klymenko To: Mateusz Guzik Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm Message-ID: <20150610221317.4b104fbc@nonamehost.local> In-Reply-To: <20150610190925.GD23380@dft-labs.eu> References: <201506101048.t5AAmD1O029382@svn.freebsd.org> <20150610214757.59a4b2d0@nonamehost.local> <20150610190925.GD23380@dft-labs.eu> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Result: IP=134.249.91.180; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 19:13:22 -0000 Wed, 10 Jun 2015 21:09:25 +0200 Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0= =B2: > On Wed, Jun 10, 2015 at 09:47:57PM +0300, Ivan Klymenko wrote: > > Wed, 10 Jun 2015 10:48:13 +0000 (UTC) > > Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0= =B2: > >=20 > > > kern_resource.c > >=20 > > I get another panic - this time with VirtualBox: > >=20 >=20 > Have you recompiled the module after you updated the kernel? >=20 Of course. > Quick guess suggests that the passed pointer is to struct proc, while > the function in question now expects struct thread. >=20 > lim_max_proc can be used instead if thread pointer is not suitable. >=20 From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 19:22:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DBF6923; Wed, 10 Jun 2015 19:22:46 +0000 (UTC) (envelope-from delphij@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88F3F16F7; Wed, 10 Jun 2015 19:22:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AJMk5K015456; Wed, 10 Jun 2015 19:22:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AJMf27015406; Wed, 10 Jun 2015 19:22:41 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201506101922.t5AJMf27015406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 10 Jun 2015 19:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284237 - in head: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 19:22:46 -0000 Author: delphij Date: Wed Jun 10 19:22:41 2015 New Revision: 284237 URL: https://svnweb.freebsd.org/changeset/base/284237 Log: MFV r284234: Update file to 5.23. MFC after: 2 weeks Added: head/contrib/file/magic/Magdir/cbor - copied unchanged from r284235, vendor/file/dist/magic/Magdir/cbor head/contrib/file/magic/Magdir/nasa - copied unchanged from r284235, vendor/file/dist/magic/Magdir/nasa head/contrib/file/src/gmtime_r.c - copied unchanged from r284235, vendor/file/dist/src/gmtime_r.c head/contrib/file/src/localtime_r.c - copied unchanged from r284235, vendor/file/dist/src/localtime_r.c Modified: head/contrib/file/ChangeLog head/contrib/file/Makefile.in head/contrib/file/TODO head/contrib/file/aclocal.m4 head/contrib/file/compile head/contrib/file/config.h.in head/contrib/file/configure head/contrib/file/configure.ac head/contrib/file/depcomp head/contrib/file/doc/Makefile.in head/contrib/file/doc/file.man head/contrib/file/doc/libmagic.man head/contrib/file/ltmain.sh head/contrib/file/magic/Magdir/android head/contrib/file/magic/Magdir/apple head/contrib/file/magic/Magdir/archive head/contrib/file/magic/Magdir/audio head/contrib/file/magic/Magdir/cafebabe head/contrib/file/magic/Magdir/commands head/contrib/file/magic/Magdir/compress head/contrib/file/magic/Magdir/console head/contrib/file/magic/Magdir/dyadic head/contrib/file/magic/Magdir/filesystems head/contrib/file/magic/Magdir/gnu head/contrib/file/magic/Magdir/images head/contrib/file/magic/Magdir/jpeg head/contrib/file/magic/Magdir/linux head/contrib/file/magic/Magdir/mach head/contrib/file/magic/Magdir/mathematica head/contrib/file/magic/Magdir/misctools head/contrib/file/magic/Magdir/modem head/contrib/file/magic/Magdir/mozilla head/contrib/file/magic/Magdir/os2 head/contrib/file/magic/Magdir/pdf head/contrib/file/magic/Magdir/perl head/contrib/file/magic/Magdir/riff head/contrib/file/magic/Magdir/sereal head/contrib/file/magic/Magdir/sgml head/contrib/file/magic/Magdir/varied.script head/contrib/file/magic/Magdir/vorbis head/contrib/file/magic/Makefile.am head/contrib/file/magic/Makefile.in head/contrib/file/missing head/contrib/file/python/Makefile.in head/contrib/file/src/Makefile.in head/contrib/file/src/apprentice.c head/contrib/file/src/ascmagic.c head/contrib/file/src/cdf.c head/contrib/file/src/cdf.h head/contrib/file/src/compress.c head/contrib/file/src/encoding.c head/contrib/file/src/file.c head/contrib/file/src/file.h head/contrib/file/src/file_opts.h head/contrib/file/src/fsmagic.c head/contrib/file/src/funcs.c head/contrib/file/src/is_tar.c head/contrib/file/src/magic.c head/contrib/file/src/magic.h head/contrib/file/src/magic.h.in head/contrib/file/src/print.c head/contrib/file/src/readcdf.c head/contrib/file/src/readelf.c head/contrib/file/src/softmagic.c head/contrib/file/tests/Makefile.in head/lib/libmagic/config.h Directory Properties: head/contrib/file/ (props changed) Modified: head/contrib/file/ChangeLog ============================================================================== --- head/contrib/file/ChangeLog Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/ChangeLog Wed Jun 10 19:22:41 2015 (r284237) @@ -1,3 +1,53 @@ + +2015-06-10 13:50 Christos Zoulas + + * release 5.23 + +2015-06-09 16:10 Christos Zoulas + + * Fix issue with regex range for magic with offset + * Always return true from mget with USE (success to mget not match + indication). Fixes mime evaluation after USE magic + * PR/459: Don't insert magic entries to the list if there are parsing + errors for them. + +2015-06-03 16:00 Christos Zoulas + + * PR/455: Add utf-7 encoding + +2015-06-03 14:30 Christos Zoulas + + * PR/455: Implement -Z, look inside, but don't report on compression + * PR/454: Fix allocation error on bad magic. + +2015-05-29 10:30 Christos Zoulas + + * handle MAGIC_CONTINUE everywhere, not just in softmagic + +2015-05-21 14:30 Christos Zoulas + + * don't print descriptions for NAME types when mime. + +2015-04-09 15:59 Christos Zoulas + + * Add --extension to list the known extensions for this file type + Idea by Andrew J Roazen + +2015-02-14 12:23 Christos Zoulas + + * Bump file search buffer size to 1M. + +2015-01-09 14:35 Christos Zoulas + + * Fix multiple issues with date formats reported by Christoph Biedl: + - T_LOCAL meaning was reversed + - Arithmetic did not work + Also stop adjusting daylight savings for gmt printing. + +2015-01-05 13:00 Christos Zoulas + + * PR/411: Fix memory corruption from corrupt cdf file. + 2015-01-02 15:15 Christos Zoulas * release 5.22 Modified: head/contrib/file/Makefile.in ============================================================================== --- head/contrib/file/Makefile.in Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/Makefile.in Wed Jun 10 19:22:41 2015 (r284237) @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -77,11 +87,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in AUTHORS COPYING ChangeLog INSTALL NEWS \ - README TODO compile config.guess config.sub depcomp install-sh \ - missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -89,6 +94,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/l $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -152,6 +159,9 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ + COPYING ChangeLog INSTALL NEWS README TODO compile \ + config.guess config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -336,7 +346,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -567,15 +576,15 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -611,16 +620,17 @@ distcheck: dist esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -797,6 +807,8 @@ uninstall-am: mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Modified: head/contrib/file/TODO ============================================================================== --- head/contrib/file/TODO Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/TODO Wed Jun 10 19:22:41 2015 (r284237) @@ -17,3 +17,6 @@ hard-wired routines). In this regard, no BSD-licensed, has a magic reimplementation in Python. Read the kerberos magic entry for more ideas. + +Write a string merger to make magic entry sizes dynamic. +Strings will be converted to offsets from the string table. Modified: head/contrib/file/aclocal.m4 ============================================================================== --- head/contrib/file/aclocal.m4 Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/aclocal.m4 Wed Jun 10 19:22:41 2015 (r284237) @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -21,7 +21,7 @@ If you have problems, you may need to re To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # visibility.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2005, 2008, 2010-2013 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2008, 2010-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -98,7 +98,7 @@ AC_DEFUN([gl_VISIBILITY], [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) ]) -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,10 +110,10 @@ AC_DEFUN([gl_VISIBILITY], # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.14' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.14], [], +m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -129,14 +129,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.14])dnl +[AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -181,15 +181,14 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCON # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -220,7 +219,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -411,7 +410,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -487,7 +486,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS] # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -577,8 +576,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -651,7 +650,11 @@ to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi -fi]) +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further @@ -680,7 +683,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -691,7 +694,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNA # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -701,7 +704,7 @@ if test x"${install_sh}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -722,7 +725,7 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -772,7 +775,7 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -811,7 +814,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -840,7 +843,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -887,7 +890,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -906,7 +909,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -987,7 +990,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1047,7 +1050,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1075,7 +1078,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1094,7 +1097,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, Modified: head/contrib/file/compile ============================================================================== --- head/contrib/file/compile Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/compile Wed Jun 10 19:22:41 2015 (r284237) @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify Modified: head/contrib/file/config.h.in ============================================================================== --- head/contrib/file/config.h.in Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/config.h.in Wed Jun 10 19:22:41 2015 (r284237) @@ -62,6 +62,9 @@ /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE +/* Define to 1 if you have the `gmtime_r' function. */ +#undef HAVE_GMTIME_R + /* Define to 1 if the system has the type `intptr_t'. */ #undef HAVE_INTPTR_T @@ -80,6 +83,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H +/* Define to 1 if you have the `localtime_r' function. */ +#undef HAVE_LOCALTIME_R + /* Define to 1 if mbrtowc and mbstate_t are properly declared. */ #undef HAVE_MBRTOWC @@ -107,6 +113,12 @@ /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE +/* Define to 1 if you have the header file. */ +#undef HAVE_SIGNAL_H + +/* Have sig_t type */ +#undef HAVE_SIG_T + /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H Modified: head/contrib/file/configure ============================================================================== --- head/contrib/file/configure Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/configure Wed Jun 10 19:22:41 2015 (r284237) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.22. +# Generated by GNU Autoconf 2.69 for file 5.23. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.22' -PACKAGE_STRING='file 5.22' +PACKAGE_VERSION='5.23' +PACKAGE_STRING='file 5.23' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -1327,7 +1327,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.22 to adapt to many kinds of systems. +\`configure' configures file 5.23 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1397,7 +1397,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.22:";; + short | recursive ) echo "Configuration of file 5.23:";; esac cat <<\_ACEOF @@ -1507,7 +1507,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.22 +file configure 5.23 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2163,7 +2163,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.22, which was +It was created by file $as_me 5.23, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2514,7 +2514,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLA ac_compiler_gnu=$ac_cv_c_compiler_gnu -am__api_version='1.14' +am__api_version='1.15' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2715,8 +2715,8 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -2735,7 +2735,7 @@ else $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -3029,7 +3029,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.22' + VERSION='5.23' cat >>confdefs.h <<_ACEOF @@ -3063,8 +3063,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}ma # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -3121,6 +3121,7 @@ END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi + # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; @@ -12785,7 +12786,7 @@ fi done -for ac_header in getopt.h err.h xlocale.h +for ac_header in getopt.h err.h xlocale.h signal.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -12823,6 +12824,17 @@ fi done +ac_fn_c_check_type "$LINENO" "sig_t" "ac_cv_type_sig_t" " +#ifdef HAVE_SIGNAL_H +#include +#endif +" +if test "x$ac_cv_type_sig_t" = xyes; then : + +$as_echo "#define HAVE_SIG_T 1" >>confdefs.h + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } @@ -14308,6 +14320,32 @@ esac fi +ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r" +if test "x$ac_cv_func_localtime_r" = xyes; then : + $as_echo "#define HAVE_LOCALTIME_R 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" localtime_r.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS localtime_r.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r" +if test "x$ac_cv_func_gmtime_r" = xyes; then : + $as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" gmtime_r.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS gmtime_r.$ac_objext" + ;; +esac + +fi + ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread" if test "x$ac_cv_func_pread" = xyes; then : $as_echo "#define HAVE_PREAD 1" >>confdefs.h @@ -14998,7 +15036,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.22, which was +This file was extended by file $as_me 5.23, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15064,7 +15102,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.22 +file config.status 5.23 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/file/configure.ac ============================================================================== --- head/contrib/file/configure.ac Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/configure.ac Wed Jun 10 19:22:41 2015 (r284237) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.22],[christos@astron.com]) +AC_INIT([file],[5.23],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -82,9 +82,13 @@ AC_HEADER_MAJOR AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h) AC_CHECK_HEADERS(stddef.h utime.h wchar.h wctype.h limits.h) -AC_CHECK_HEADERS(getopt.h err.h xlocale.h) +AC_CHECK_HEADERS(getopt.h err.h xlocale.h signal.h) AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h) AC_CHECK_HEADERS(zlib.h) +AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[ +#ifdef HAVE_SIGNAL_H +#include +#endif]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -141,7 +145,7 @@ dnl Checks for functions AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale) dnl Provide implementation of some required functions if necessary -AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r pread strcasestr fmtcheck) +AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r localtime_r gmtime_r pread strcasestr fmtcheck) dnl Checks for libraries AC_CHECK_LIB(z,gzopen) Modified: head/contrib/file/depcomp ============================================================================== --- head/contrib/file/depcomp Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/depcomp Wed Jun 10 19:22:41 2015 (r284237) @@ -3,7 +3,7 @@ scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by Modified: head/contrib/file/doc/Makefile.in ============================================================================== --- head/contrib/file/doc/Makefile.in Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/doc/Makefile.in Wed Jun 10 19:22:41 2015 (r284237) @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -77,7 +87,6 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -85,6 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/l $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -144,6 +154,7 @@ man5dir = $(mandir)/man5 NROFF = nroff MANS = $(man_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkgdatadir = @pkgdatadir@ ACLOCAL = @ACLOCAL@ @@ -286,7 +297,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -642,6 +652,8 @@ uninstall-man: uninstall-man1 uninstall- tags-am uninstall uninstall-am uninstall-man uninstall-man1 \ uninstall-man3 uninstall-man4 uninstall-man5 +.PRECIOUS: Makefile + file.1: Makefile file.man @rm -f $@ Modified: head/contrib/file/doc/file.man ============================================================================== --- head/contrib/file/doc/file.man Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/doc/file.man Wed Jun 10 19:22:41 2015 (r284237) @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.111 2014/12/16 23:18:40 christos Exp $ -.Dd December 16, 2014 +.\" $File: file.man,v 1.117 2015/06/03 19:51:27 christos Exp $ +.Dd June 3, 2015 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -8,8 +8,9 @@ .Sh SYNOPSIS .Nm .Bk -words -.Op Fl bcEhiklLNnprsvz0 +.Op Fl bcEhiklLNnprsvzZ0 .Op Fl Fl apple +.Op Fl Fl extension .Op Fl Fl mime-encoding .Op Fl Fl mime-type .Op Fl e Ar testname @@ -213,6 +214,8 @@ Consults magic files. .It tar Examines tar files. .El +.It Fl Fl extension +Print a slash-separated list of valid extensions for the file type found. .It Fl F , Fl Fl separator Ar separator Use the specified string as the separator between the filename and the file result returned. @@ -343,6 +346,9 @@ since on some systems it reports a zero Print the version of the program and exit. .It Fl z , Fl Fl uncompress Try to look inside compressed files. +.It Fl Z , Fl Fl uncompress-noreport +Try to look inside compressed files, but report information about the contents +only not the compression. .It Fl 0 , Fl Fl print0 Output a null character .Sq \e0 @@ -587,20 +593,30 @@ last-pushed (most specific, one hopes) v use a default if the list is empty. This should not slow down evaluation. .Pp +The handling of +.Dv MAGIC_CONTINUE +and printing \e012- between entries is clumsy and complicated; refactor +and centralize. +.Pp +Some of the encoding logic is hard-coded in encoding.c and can be moved +to the magic files if we had a !:charset annotation +.Pp Continue to squash all magic bugs. See Debian BTS for a good source. .Pp Store arbitrarily long strings, for example for %s patterns, so that they can be printed out. Fixes Debian bug #271672. -Would require more complex store/load code in apprentice. +This can be done by allocating strings in a string pool, storing the +string pool at the end of the magic file and converting all the string +pointers to relative offsets from the string pool. .Pp Add syntax for relative offsets after current level (Debian bug #466037). .Pp Make file -ki work, i.e. give multiple MIME types. .Pp Add a zip library so we can peek inside Office2007 documents to -figure out what they are. +print more details about their contents. .Pp Add an option to print URLs for the sources of the file descriptions. .Pp @@ -610,6 +626,9 @@ string to be looked up in a table). This would avoid adding the same magic repeatedly for each new hash-bang interpreter. .Pp +When a file descriptor is available, we can skip and adjust the buffer +instead of the hacky buffer management we do now. +.Pp Fix .Dq name and @@ -627,6 +646,15 @@ Make more efficient by keeping a sorted list of names. Special-case ^ to flip endianness in the parser so that it does not have to be escaped, and document it. +.Pp +If the offsets specified internally in the file exceed the buffer size +( +.Dv HOWMANY +variable in file.h), then we don't seek to that offset, but we give up. +It would be better if buffer managements was done when the file descriptor +is available so move around the file. +One must be careful though because this has performance (and thus security +considerations). .Sh AVAILABILITY You can obtain the original author's latest version by anonymous FTP on Modified: head/contrib/file/doc/libmagic.man ============================================================================== --- head/contrib/file/doc/libmagic.man Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/doc/libmagic.man Wed Jun 10 19:22:41 2015 (r284237) @@ -1,4 +1,4 @@ -.\" $File: libmagic.man,v 1.34 2014/12/16 23:18:40 christos Exp $ +.\" $File: libmagic.man,v 1.37 2015/06/03 18:21:24 christos Exp $ .\" .\" Copyright (c) Christos Zoulas 2003. .\" All Rights Reserved. @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 16, 2014 +.Dd June 3, 2015 .Dt LIBMAGIC 3 .Os .Sh NAME @@ -132,6 +132,10 @@ Treat operating system errors while tryi as real errors, instead of printing them in the magic buffer. .It Dv MAGIC_APPLE Return the Apple creator and type. +.It Dv MAGIC_EXTENSION +Return a slash-separated list of extensions for this file type. +.It Dv MAGIC_COMPRESS_TRANSP +Don't report on compression, only report about the uncompressed data. .It Dv MAGIC_NO_CHECK_APPTYPE Don't check for .Dv EMX Modified: head/contrib/file/ltmain.sh ============================================================================== --- head/contrib/file/ltmain.sh Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/ltmain.sh Wed Jun 10 19:22:41 2015 (r284237) @@ -6900,7 +6900,11 @@ func_mode_link () # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" + if test -f "$inst_prefix_dir$libdir/$linklib"; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" Modified: head/contrib/file/magic/Magdir/android ============================================================================== --- head/contrib/file/magic/Magdir/android Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/magic/Magdir/android Wed Jun 10 19:22:41 2015 (r284237) @@ -1,6 +1,6 @@ #------------------------------------------------------------ -# $File: android,v 1.7 2014/11/10 05:08:23 christos Exp $ +# $File: android,v 1.8 2015/03/19 18:04:37 christos Exp $ # Various android related magic entries #------------------------------------------------------------ @@ -137,3 +137,9 @@ >16 lelong x \b, Total of %d >12 lelong x \b %d-byte output blocks in >20 lelong x \b %d input chunks. + +# Android binary XML magic +# In include/androidfw/ResourceTypes.h: +# RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header), +# which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size). +0 lelong 0x00080003 Android binary XML Modified: head/contrib/file/magic/Magdir/apple ============================================================================== --- head/contrib/file/magic/Magdir/apple Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/magic/Magdir/apple Wed Jun 10 19:22:41 2015 (r284237) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: apple,v 1.29 2014/04/30 21:41:02 christos Exp $ +# $File: apple,v 1.30 2015/04/13 13:09:06 christos Exp $ # apple: file(1) magic for Apple file formats # 0 search/1/t FiLeStArTfIlEsTaRt binscii (apple ][) text @@ -300,3 +300,12 @@ #http://wiki.mozilla.org/DS_Store_File_Format` #http://en.wikipedia.org/wiki/.DS_Store 0 string \0\0\0\1Bud1\0 Apple Desktop Services Store + +# HFS/HFS+ Resource fork files (andrew.roazen@nau.edu Apr 13 2015) +# Usually not in separate files, but have either filename rsrc with +# no extension, or a filename corresponding to another file, with +# extensions rsr/rsrc +0 string \000\000\001\000 +>4 leshort 0 +>>16 lelong 0 Apple HFS/HFS+ resource fork + Modified: head/contrib/file/magic/Magdir/archive ============================================================================== --- head/contrib/file/magic/Magdir/archive Wed Jun 10 19:12:52 2015 (r284236) +++ head/contrib/file/magic/Magdir/archive Wed Jun 10 19:22:41 2015 (r284237) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: archive,v 1.88 2014/08/16 10:42:17 christos Exp $ +# $File: archive,v 1.90 2015/04/24 15:44:12 christos Exp $ # archive: file(1) magic for archive formats (see also "msdos" for self- # extracting compressed archives) # @@ -714,7 +714,7 @@ >>>4 byte 0x0a \b, at least v1.0 to extract >>>4 byte 0x0b \b, at least v1.1 to extract >>>4 byte 0x14 \b, at least v2.0 to extract ->>>4 byte 0x2d \b, at least v3.0 to extract +>>>4 byte 0x2d \b, at least v4.5 to extract >>>0x161 string WINZIP \b, WinZIP self-extracting # StarView Metafile @@ -911,6 +911,9 @@ # ZPAQ: http://mattmahoney.net/dc/zpaq.html 0 string zPQ ZPAQ stream >3 byte x \b, level %d +# From: Barry Carter +# http://encode.ru/threads/456-zpaq-updates/page32 +0 string 7kSt ZPAQ file # BBeB ebook, unencrypted (LRF format) # URL: http://www.sven.de/librie/Librie/LrfFormat Modified: head/contrib/file/magic/Magdir/audio ============================================================================== --- head/contrib/file/magic/Magdir/audio Wed Jun 10 19:12:52 2015 (r284236) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 19:29:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0436D8D; Wed, 10 Jun 2015 19:29:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A63A1754; Wed, 10 Jun 2015 19:29:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wgez8 with SMTP id z8so42813238wge.0; Wed, 10 Jun 2015 12:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=AFwqE8sgzFpyMs418IAPwt9Az9LY+AVaACKtM6wOniI=; b=bPmbTaGUpkXTTN/rEpsGKW+Te1V+NAA3xJrH04JEZd+a46jUDDxNxBHrrWgCY/suYT GKjbWdkCSt3xRB7VR4Sr2LAoTVgiU0ZiAIDsycnnIApyWYAPfRWMrNUGrVbYvh5ptxln Vod1CeUclzA7m9MSvrsqg3DmYnb2DJ9INqXJ69y5cdIjks0kv8ZuPR7ahxw2tl3UxloB 2u2oVURHc43Si39ukOElGtEA+DHJgqm0y06/avVMEcm2huiCY073znXp+CJmf/xHaJwB CKLnGBcs81QGoR7K7pdvt9+qF1QoDjqdxtvfeQZt5OyaUOxknAsHezrehzqtHeYrfxS4 /1Xw== X-Received: by 10.180.82.100 with SMTP id h4mr11267041wiy.61.1433964581671; Wed, 10 Jun 2015 12:29:41 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id wi1sm15961155wjb.41.2015.06.10.12.29.40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 10 Jun 2015 12:29:40 -0700 (PDT) Date: Wed, 10 Jun 2015 21:29:38 +0200 From: Mateusz Guzik To: Ivan Klymenko Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm Message-ID: <20150610192937.GE23380@dft-labs.eu> References: <201506101048.t5AAmD1O029382@svn.freebsd.org> <20150610214757.59a4b2d0@nonamehost.local> <20150610190925.GD23380@dft-labs.eu> <20150610221317.4b104fbc@nonamehost.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150610221317.4b104fbc@nonamehost.local> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 19:29:43 -0000 On Wed, Jun 10, 2015 at 10:13:17PM +0300, Ivan Klymenko wrote: > Wed, 10 Jun 2015 21:09:25 +0200 > Mateusz Guzik напиÑав: > > > On Wed, Jun 10, 2015 at 09:47:57PM +0300, Ivan Klymenko wrote: > > > Wed, 10 Jun 2015 10:48:13 +0000 (UTC) > > > Mateusz Guzik напиÑав: > > > > > > > kern_resource.c > > > > > > I get another panic - this time with VirtualBox: > > > > > > > > Have you recompiled the module after you updated the kernel? > > > > Of course. > So how have you patched the source? If you have updated headers in place, the compilation should fail due to parameter type mismatch. Can you go to the frame with the thread and dump it's content? -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 20:08:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D428F7A; Wed, 10 Jun 2015 20:08:19 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv158.fwdcdn.com (frv158.fwdcdn.com [212.42.77.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B0DC10AA; Wed, 10 Jun 2015 20:08:19 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=tE77+tBgkFlAz6eE1dnNEm8hWlQ7ZiU4tMKzmI840HU=; b=EmPvN3+6JhQWoHfONHG0uxIyvI8ljpujVX/+Ls8qJ3K/x2U1KQqRttJ92PqafIM3Mo4Z4IEneUVcoMc9+JT1uLn2VawKjiYKUKsoUDo7WqEFeYL6bpk4LWfMX7EoW/YBt1Ex0vlBCwFLolHGizWS76vff4s6WDVfYtck4wv+UKo=; Received: from [134.249.91.180] (helo=nonamehost.local) by frv158.fwdcdn.com with esmtpsa ID 1Z2mIJ-000HON-FD ; Wed, 10 Jun 2015 23:08:15 +0300 Date: Wed, 10 Jun 2015 23:08:14 +0300 From: Ivan Klymenko To: Mateusz Guzik Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm Message-ID: <20150610230814.3852116f@nonamehost.local> In-Reply-To: <20150610192937.GE23380@dft-labs.eu> References: <201506101048.t5AAmD1O029382@svn.freebsd.org> <20150610214757.59a4b2d0@nonamehost.local> <20150610190925.GD23380@dft-labs.eu> <20150610221317.4b104fbc@nonamehost.local> <20150610192937.GE23380@dft-labs.eu> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Result: IP=134.249.91.180; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 20:08:19 -0000 Wed, 10 Jun 2015 21:29:38 +0200 Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0= =B2: > On Wed, Jun 10, 2015 at 10:13:17PM +0300, Ivan Klymenko wrote: > > Wed, 10 Jun 2015 21:09:25 +0200 > > Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0= =D0=B2: > >=20 > > > On Wed, Jun 10, 2015 at 09:47:57PM +0300, Ivan Klymenko wrote: > > > > Wed, 10 Jun 2015 10:48:13 +0000 (UTC) > > > > Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0= =B0=D0=B2: > > > >=20 > > > > > kern_resource.c > > > >=20 > > > > I get another panic - this time with VirtualBox: > > > >=20 > >=20 > > >=20 > > > Have you recompiled the module after you updated the kernel? > > >=20 > >=20 > > Of course. > >=20 >=20 > So how have you patched the source? If you have updated headers in > place, the compilation should fail due to parameter type mismatch. >=20 Unfortunately no patches I have, except that r284222 + patch from r284226 > Can you go to the frame with the thread and dump it's content? if I understood correctly http://pastebin.com/wim7jM7i From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 20:29:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D8D6E23; Wed, 10 Jun 2015 20:29:17 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C5BB81722; Wed, 10 Jun 2015 20:29:16 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wigg3 with SMTP id g3so59363672wig.1; Wed, 10 Jun 2015 13:29:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Qjc+PR2h+61EBR8/O0VSvS1/K888U6JTp0/SyXE4OOk=; b=SNFCh7Ks2B8BsyHKs7+aWqx1o5ZpggKQJbXZ5U88DUFPPIjOHYSDyTO/dgo1A50J+8 9mw5gbpT9sRw+wVQFRHDY1Yn8r2SF4s7EbUn4Qvcf03DgdCZJeR+CxiflNAeu4M2PpsD KoemiyVwgQG1/FTVM7wz34N6FmDk3S6csJuKm4ZfxfLrgocfxZzxuyb+ZJOdwK6pFv2J EV5MIcbHGEg90KVRRvZdzwIOIVRTAJO7rBGqQnuJ6cMfIb6v7ZqcgyV6pBl4qqCRO2KK XA2D38HN99Q0dcauDHoItbZ458aAi205WzdnKd+ZZGioBri0/3dWWjcDC31TyOqWOzaL V02A== X-Received: by 10.180.74.132 with SMTP id t4mr23132179wiv.55.1433968155079; Wed, 10 Jun 2015 13:29:15 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id ha4sm9578326wib.0.2015.06.10.13.29.13 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 10 Jun 2015 13:29:13 -0700 (PDT) Date: Wed, 10 Jun 2015 22:29:11 +0200 From: Mateusz Guzik To: Ivan Klymenko Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm Message-ID: <20150610202911.GG23380@dft-labs.eu> References: <201506101048.t5AAmD1O029382@svn.freebsd.org> <20150610214757.59a4b2d0@nonamehost.local> <20150610190925.GD23380@dft-labs.eu> <20150610221317.4b104fbc@nonamehost.local> <20150610192937.GE23380@dft-labs.eu> <20150610230814.3852116f@nonamehost.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150610230814.3852116f@nonamehost.local> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 20:29:17 -0000 On Wed, Jun 10, 2015 at 11:08:14PM +0300, Ivan Klymenko wrote: > Wed, 10 Jun 2015 21:29:38 +0200 > Mateusz Guzik напиÑав: > > > On Wed, Jun 10, 2015 at 10:13:17PM +0300, Ivan Klymenko wrote: > > > Wed, 10 Jun 2015 21:09:25 +0200 > > > Mateusz Guzik напиÑав: > > > > > > > On Wed, Jun 10, 2015 at 09:47:57PM +0300, Ivan Klymenko wrote: > > > > > Wed, 10 Jun 2015 10:48:13 +0000 (UTC) > > > > > Mateusz Guzik напиÑав: > > > > > > > > > > > kern_resource.c > > > > > > > > > > I get another panic - this time with VirtualBox: > > > > > > > > > > > > > > > > Have you recompiled the module after you updated the kernel? > > > > > > > > > > Of course. > > > > > > > So how have you patched the source? If you have updated headers in > > place, the compilation should fail due to parameter type mismatch. > > > > Unfortunately no patches I have, except that r284222 + patch from > r284226 > > > Can you go to the frame with the thread and dump it's content? > > > if I understood correctly > http://pastebin.com/wim7jM7i Well this does not look like a valid thread and that's expected. Apparently virtualbox is compiled with '-w', which disables warnings and then they enable only a small subset. Information about pointer mismatch is amongst suppressed warnings. As noted earlier the issue can be trivially fixed: --- ./src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2015-06-10 19:30:28.355276494 +0000 +++ ./src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2015-06-10 19:30:41.280304985 +0000 @@ -747,7 +747,7 @@ { /** @todo: is this needed?. */ PROC_LOCK(pProc); - AddrR3 = round_page((vm_offset_t)pProc->p_vmspace->vm_daddr + lim_max(pProc, RLIMIT_DATA)); + AddrR3 = round_page((vm_offset_t)pProc->p_vmspace->vm_daddr + lim_max_proc(pProc, RLIMIT_DATA)); PROC_UNLOCK(pProc); } else -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 20:42:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7DA244DA; Wed, 10 Jun 2015 20:42:43 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv158.fwdcdn.com (frv158.fwdcdn.com [212.42.77.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39BDB1BC8; Wed, 10 Jun 2015 20:42:42 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=x/Vm9Ax62aAA8ihM/vsCRun4v5WZKvgJqhiq4NfMNCE=; b=RjRqZ6Qwa7rZE/yQOnt6uH7ulz7NyMY1F5Hr6X/YIlFSVqWnwxa+qJA30a97CCTwEejgIzRkUkPW4TryPsG5VZlpZHNZBSwn1PaMNlWD7R284+g2EmrxDo8HeBzUTOAGQG9tlXS3cZSR10j0LbB9E9WapQ/hmdHRoMUT5N8tf7U=; Received: from [134.249.91.180] (helo=nonamehost.local) by frv158.fwdcdn.com with esmtpsa ID 1Z2mpb-000K5g-8N ; Wed, 10 Jun 2015 23:42:39 +0300 Date: Wed, 10 Jun 2015 23:42:37 +0300 From: Ivan Klymenko To: Mateusz Guzik Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , ports@FreeBSD.org Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm Message-ID: <20150610234237.383e4fc1@nonamehost.local> In-Reply-To: <20150610202911.GG23380@dft-labs.eu> References: <201506101048.t5AAmD1O029382@svn.freebsd.org> <20150610214757.59a4b2d0@nonamehost.local> <20150610190925.GD23380@dft-labs.eu> <20150610221317.4b104fbc@nonamehost.local> <20150610192937.GE23380@dft-labs.eu> <20150610230814.3852116f@nonamehost.local> <20150610202911.GG23380@dft-labs.eu> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Result: IP=134.249.91.180; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 20:42:43 -0000 Wed, 10 Jun 2015 22:29:11 +0200 Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0= =B2: > On Wed, Jun 10, 2015 at 11:08:14PM +0300, Ivan Klymenko wrote: > > Wed, 10 Jun 2015 21:29:38 +0200 > > Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0= =D0=B2: > >=20 > > > On Wed, Jun 10, 2015 at 10:13:17PM +0300, Ivan Klymenko wrote: > > > > Wed, 10 Jun 2015 21:09:25 +0200 > > > > Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0= =B0=D0=B2: > > > >=20 > > > > > On Wed, Jun 10, 2015 at 09:47:57PM +0300, Ivan Klymenko wrote: > > > > > > Wed, 10 Jun 2015 10:48:13 +0000 (UTC) > > > > > > Mateusz Guzik =D0=BD=D0=B0=D0=BF=D0=B8=D1=81= =D0=B0=D0=B2: > > > > > >=20 > > > > > > > kern_resource.c > > > > > >=20 > > > > > > I get another panic - this time with VirtualBox: > > > > > >=20 > > > >=20 > > > > >=20 > > > > > Have you recompiled the module after you updated the kernel? > > > > >=20 > > > >=20 > > > > Of course. > > > >=20 > > >=20 > > > So how have you patched the source? If you have updated headers in > > > place, the compilation should fail due to parameter type mismatch. > > >=20 > >=20 > > Unfortunately no patches I have, except that r284222 + patch from > > r284226 > >=20 > > > Can you go to the frame with the thread and dump it's content? > >=20 > >=20 > > if I understood correctly > > http://pastebin.com/wim7jM7i >=20 > Well this does not look like a valid thread and that's expected. >=20 > Apparently virtualbox is compiled with '-w', which disables warnings > and then they enable only a small subset. Information about pointer > mismatch is amongst suppressed warnings. >=20 > As noted earlier the issue can be trivially fixed: > --- ./src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig > 2015-06-10 19:30:28.355276494 +0000 > +++ ./src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c > 2015-06-10 19:30:41.280304985 +0000 @@ -747,7 +747,7 @@ { > /** @todo: is this needed?. */ > PROC_LOCK(pProc); > - AddrR3 =3D round_page((vm_offset_t)pProc->p_vmspace->vm_daddr > + lim_max(pProc, RLIMIT_DATA)); > + AddrR3 =3D round_page((vm_offset_t)pProc->p_vmspace->vm_daddr > + lim_max_proc(pProc, RLIMIT_DATA)); PROC_UNLOCK(pProc); > } > else >=20 Cool! It works. Thank you very much. From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 20:43:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17CAF6A2; Wed, 10 Jun 2015 20:43:09 +0000 (UTC) (envelope-from jch@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED01E1BD2; Wed, 10 Jun 2015 20:43:08 +0000 (UTC) (envelope-from jch@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AKh8Me058827; Wed, 10 Jun 2015 20:43:08 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AKh8YB058825; Wed, 10 Jun 2015 20:43:08 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201506102043.t5AKh8YB058825@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Wed, 10 Jun 2015 20:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284245 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 20:43:09 -0000 Author: jch Date: Wed Jun 10 20:43:07 2015 New Revision: 284245 URL: https://svnweb.freebsd.org/changeset/base/284245 Log: Fix a callout race condition introduced in TCP timers callouts with r281599. In TCP timer context, it is not enough to check callout_stop() return value to decide if a callout is still running or not, previous callout_reset() return values have also to be checked. Differential Revision: https://reviews.freebsd.org/D2763 Reviewed by: hiren Approved by: hiren MFC after: 1 day Sponsored by: Verisign, Inc. Modified: head/sys/netinet/tcp_timer.c head/sys/netinet/tcp_timer.h Modified: head/sys/netinet/tcp_timer.c ============================================================================== --- head/sys/netinet/tcp_timer.c Wed Jun 10 20:11:28 2015 (r284244) +++ head/sys/netinet/tcp_timer.c Wed Jun 10 20:43:07 2015 (r284245) @@ -347,11 +347,12 @@ tcp_timer_2msl(void *xtp) tp = tcp_close(tp); } else { if (tp->t_state != TCPS_TIME_WAIT && - ticks - tp->t_rcvtime <= TP_MAXIDLE(tp)) - callout_reset_on(&tp->t_timers->tt_2msl, - TP_KEEPINTVL(tp), tcp_timer_2msl, tp, - inp_to_cpuid(inp)); - else + ticks - tp->t_rcvtime <= TP_MAXIDLE(tp)) { + if (!callout_reset(&tp->t_timers->tt_2msl, + TP_KEEPINTVL(tp), tcp_timer_2msl, tp)) { + tp->t_timers->tt_flags &= ~TT_2MSL_RST; + } + } else tp = tcp_close(tp); } @@ -431,11 +432,14 @@ tcp_timer_keep(void *xtp) tp->rcv_nxt, tp->snd_una - 1, 0); free(t_template, M_TEMP); } - callout_reset_on(&tp->t_timers->tt_keep, TP_KEEPINTVL(tp), - tcp_timer_keep, tp, inp_to_cpuid(inp)); - } else - callout_reset_on(&tp->t_timers->tt_keep, TP_KEEPIDLE(tp), - tcp_timer_keep, tp, inp_to_cpuid(inp)); + if (!callout_reset(&tp->t_timers->tt_keep, TP_KEEPINTVL(tp), + tcp_timer_keep, tp)) { + tp->t_timers->tt_flags &= ~TT_KEEP_RST; + } + } else if (!callout_reset(&tp->t_timers->tt_keep, TP_KEEPIDLE(tp), + tcp_timer_keep, tp)) { + tp->t_timers->tt_flags &= ~TT_KEEP_RST; + } #ifdef TCPDEBUG if (inp->inp_socket->so_options & SO_DEBUG) @@ -810,6 +814,7 @@ tcp_timer_activate(struct tcpcb *tp, uin timeout_t *f_callout; struct inpcb *inp = tp->t_inpcb; int cpu = inp_to_cpuid(inp); + uint32_t f_reset; #ifdef TCP_OFFLOAD if (tp->t_flags & TF_TOE) @@ -823,38 +828,49 @@ tcp_timer_activate(struct tcpcb *tp, uin case TT_DELACK: t_callout = &tp->t_timers->tt_delack; f_callout = tcp_timer_delack; + f_reset = TT_DELACK_RST; break; case TT_REXMT: t_callout = &tp->t_timers->tt_rexmt; f_callout = tcp_timer_rexmt; + f_reset = TT_REXMT_RST; break; case TT_PERSIST: t_callout = &tp->t_timers->tt_persist; f_callout = tcp_timer_persist; + f_reset = TT_PERSIST_RST; break; case TT_KEEP: t_callout = &tp->t_timers->tt_keep; f_callout = tcp_timer_keep; + f_reset = TT_KEEP_RST; break; case TT_2MSL: t_callout = &tp->t_timers->tt_2msl; f_callout = tcp_timer_2msl; + f_reset = TT_2MSL_RST; break; default: panic("tp %p bad timer_type %#x", tp, timer_type); } if (delta == 0) { if ((tp->t_timers->tt_flags & timer_type) && - callout_stop(t_callout)) { - tp->t_timers->tt_flags &= ~timer_type; + callout_stop(t_callout) && + (tp->t_timers->tt_flags & f_reset)) { + tp->t_timers->tt_flags &= ~(timer_type | f_reset); } } else { if ((tp->t_timers->tt_flags & timer_type) == 0) { - tp->t_timers->tt_flags |= timer_type; + tp->t_timers->tt_flags |= (timer_type | f_reset); callout_reset_on(t_callout, delta, f_callout, tp, cpu); } else { /* Reset already running callout on the same CPU. */ - callout_reset(t_callout, delta, f_callout, tp); + if (!callout_reset(t_callout, delta, f_callout, tp)) { + /* + * Callout not cancelled, consider it as not + * properly restarted. */ + tp->t_timers->tt_flags &= ~f_reset; + } } } } @@ -891,6 +907,7 @@ tcp_timer_stop(struct tcpcb *tp, uint32_ { struct callout *t_callout; timeout_t *f_callout; + uint32_t f_reset; tp->t_timers->tt_flags |= TT_STOPPED; @@ -898,30 +915,36 @@ tcp_timer_stop(struct tcpcb *tp, uint32_ case TT_DELACK: t_callout = &tp->t_timers->tt_delack; f_callout = tcp_timer_delack_discard; + f_reset = TT_DELACK_RST; break; case TT_REXMT: t_callout = &tp->t_timers->tt_rexmt; f_callout = tcp_timer_rexmt_discard; + f_reset = TT_REXMT_RST; break; case TT_PERSIST: t_callout = &tp->t_timers->tt_persist; f_callout = tcp_timer_persist_discard; + f_reset = TT_PERSIST_RST; break; case TT_KEEP: t_callout = &tp->t_timers->tt_keep; f_callout = tcp_timer_keep_discard; + f_reset = TT_KEEP_RST; break; case TT_2MSL: t_callout = &tp->t_timers->tt_2msl; f_callout = tcp_timer_2msl_discard; + f_reset = TT_2MSL_RST; break; default: panic("tp %p bad timer_type %#x", tp, timer_type); } if (tp->t_timers->tt_flags & timer_type) { - if (callout_stop(t_callout)) { - tp->t_timers->tt_flags &= ~timer_type; + if (callout_stop(t_callout) && + (tp->t_timers->tt_flags & f_reset)) { + tp->t_timers->tt_flags &= ~(timer_type | f_reset); } else { /* * Can't stop the callout, defer tcpcb actual deletion Modified: head/sys/netinet/tcp_timer.h ============================================================================== --- head/sys/netinet/tcp_timer.h Wed Jun 10 20:11:28 2015 (r284244) +++ head/sys/netinet/tcp_timer.h Wed Jun 10 20:43:07 2015 (r284245) @@ -160,6 +160,12 @@ struct tcp_timer { #define TT_2MSL 0x0010 #define TT_MASK (TT_DELACK|TT_REXMT|TT_PERSIST|TT_KEEP|TT_2MSL) +#define TT_DELACK_RST 0x0100 +#define TT_REXMT_RST 0x0200 +#define TT_PERSIST_RST 0x0400 +#define TT_KEEP_RST 0x0800 +#define TT_2MSL_RST 0x1000 + #define TT_STOPPED 0x00010000 #define TP_KEEPINIT(tp) ((tp)->t_keepinit ? (tp)->t_keepinit : tcp_keepinit) From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 21:05:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 900C6D87; Wed, 10 Jun 2015 21:05:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id EA14818E5; Wed, 10 Jun 2015 21:05:26 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Message-ID: <5578A696.7050307@FreeBSD.org> Date: Wed, 10 Jun 2015 17:05:26 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Ivan Klymenko , Mateusz Guzik CC: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , ports@FreeBSD.org Subject: Re: svn commit: r284215 - in head/sys: amd64/linux32 compat/linux compat/svr4 dev/drm2/i915 fs/fdescfs i386/ibcs2 i386/linux kern ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mthca sys vm References: <201506101048.t5AAmD1O029382@svn.freebsd.org> <20150610214757.59a4b2d0@nonamehost.local> <20150610190925.GD23380@dft-labs.eu> <20150610221317.4b104fbc@nonamehost.local> <20150610192937.GE23380@dft-labs.eu> <20150610230814.3852116f@nonamehost.local> <20150610202911.GG23380@dft-labs.eu> <20150610234237.383e4fc1@nonamehost.local> In-Reply-To: <20150610234237.383e4fc1@nonamehost.local> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 21:05:27 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 06/10/2015 16:42, Ivan Klymenko wrote: > Wed, 10 Jun 2015 22:29:11 +0200 Mateusz Guzik > напиÑав: > >> On Wed, Jun 10, 2015 at 11:08:14PM +0300, Ivan Klymenko wrote: >>> Wed, 10 Jun 2015 21:29:38 +0200 Mateusz Guzik >>> напиÑав: >>> >>>> On Wed, Jun 10, 2015 at 10:13:17PM +0300, Ivan Klymenko >>>> wrote: >>>>> Wed, 10 Jun 2015 21:09:25 +0200 Mateusz Guzik >>>>> напиÑав: >>>>> >>>>>> On Wed, Jun 10, 2015 at 09:47:57PM +0300, Ivan Klymenko >>>>>> wrote: >>>>>>> Wed, 10 Jun 2015 10:48:13 +0000 (UTC) Mateusz Guzik >>>>>>> напиÑав: >>>>>>> >>>>>>>> kern_resource.c >>>>>>> >>>>>>> I get another panic - this time with VirtualBox: >>>>>>> >>>>> >>>>>> >>>>>> Have you recompiled the module after you updated the >>>>>> kernel? >>>>>> >>>>> >>>>> Of course. >>>>> >>>> >>>> So how have you patched the source? If you have updated >>>> headers in place, the compilation should fail due to >>>> parameter type mismatch. >>>> >>> >>> Unfortunately no patches I have, except that r284222 + patch >>> from r284226 >>> >>>> Can you go to the frame with the thread and dump it's >>>> content? >>> >>> >>> if I understood correctly http://pastebin.com/wim7jM7i >> >> Well this does not look like a valid thread and that's expected. >> >> Apparently virtualbox is compiled with '-w', which disables >> warnings and then they enable only a small subset. Information >> about pointer mismatch is amongst suppressed warnings. >> >> As noted earlier the issue can be trivially fixed: --- >> ./src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig >> 2015-06-10 19:30:28.355276494 +0000 +++ >> ./src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c >> 2015-06-10 19:30:41.280304985 +0000 @@ -747,7 +747,7 @@ { /** >> @todo: is this needed?. */ PROC_LOCK(pProc); - AddrR3 = >> round_page((vm_offset_t)pProc->p_vmspace->vm_daddr + >> lim_max(pProc, RLIMIT_DATA)); + AddrR3 = >> round_page((vm_offset_t)pProc->p_vmspace->vm_daddr + >> lim_max_proc(pProc, RLIMIT_DATA)); PROC_UNLOCK(pProc); } else >> > > Cool! It works. Thank you very much. Committed. https://svnweb.freebsd.org/changeset/ports/389147 Thanks! Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVeKaWAAoJEHyflib82/FGHs4H/1ltpV+nAC7LDGZUXWps6+Gm ERuHCkgdA4E9AiZoOKxCOFy514bkqdQAm+upTiVAFaegiCHJrLxWMR2kfqQsUoO2 C/hJ8600S0XTo879zppghJ6wk4EB2YJDc3GD8ftzM9i5ihGu1iDzxb543i7CJD70 F0f5A54SyZ1TNtuU1dF9yC6XrOHhEpNdCqLvT95mdHee/yncohrPtOVj7U/02jnc JomlvwRUoJmFcaVK7oDZyZ3jV9QvWtg2s4tktjwgVB2E59DfaiQI72bYVUFPRPwh /q5zy7asZOYKa0e0O9TYCm+3ob45wBv/cP5824R1fjFTZoQmGWyZQKur1gFdO/0= =QJte -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 21:32:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CAD7473; Wed, 10 Jun 2015 21:32:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67B121964; Wed, 10 Jun 2015 21:32:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (unknown [137.122.64.24]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B0965B979; Wed, 10 Jun 2015 17:32:30 -0400 (EDT) Message-ID: <5578ACEC.2070209@FreeBSD.org> Date: Wed, 10 Jun 2015 17:32:28 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Julien Charbon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284245 - head/sys/netinet References: <201506102043.t5AKh8YB058825@svn.freebsd.org> In-Reply-To: <201506102043.t5AKh8YB058825@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 10 Jun 2015 17:32:31 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 21:32:32 -0000 On 6/10/15 4:43 PM, Julien Charbon wrote: > Author: jch > Date: Wed Jun 10 20:43:07 2015 > New Revision: 284245 > URL: https://svnweb.freebsd.org/changeset/base/284245 > > Log: > Fix a callout race condition introduced in TCP timers callouts with r281599. > In TCP timer context, it is not enough to check callout_stop() return value > to decide if a callout is still running or not, previous callout_reset() > return values have also to be checked. > > Differential Revision: https://reviews.freebsd.org/D2763 > Reviewed by: hiren > Approved by: hiren > MFC after: 1 day > Sponsored by: Verisign, Inc. > > Modified: > head/sys/netinet/tcp_timer.c > head/sys/netinet/tcp_timer.h > > Modified: head/sys/netinet/tcp_timer.c > ============================================================================== > --- head/sys/netinet/tcp_timer.c Wed Jun 10 20:11:28 2015 (r284244) > +++ head/sys/netinet/tcp_timer.c Wed Jun 10 20:43:07 2015 (r284245) > @@ -347,11 +347,12 @@ tcp_timer_2msl(void *xtp) > tp = tcp_close(tp); > } else { > if (tp->t_state != TCPS_TIME_WAIT && > - ticks - tp->t_rcvtime <= TP_MAXIDLE(tp)) > - callout_reset_on(&tp->t_timers->tt_2msl, > - TP_KEEPINTVL(tp), tcp_timer_2msl, tp, > - inp_to_cpuid(inp)); > - else > + ticks - tp->t_rcvtime <= TP_MAXIDLE(tp)) { > + if (!callout_reset(&tp->t_timers->tt_2msl, > + TP_KEEPINTVL(tp), tcp_timer_2msl, tp)) { > + tp->t_timers->tt_flags &= ~TT_2MSL_RST; > + } > + } else > tp = tcp_close(tp); Did you mean to use callout_reset() instead of callout_reset_on() here and elsewhere in this change? -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 21:55:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4B217DD for ; Wed, 10 Jun 2015 21:55:09 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E4FB1E08 for ; Wed, 10 Jun 2015 21:55:09 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by wigg3 with SMTP id g3so60656016wig.1 for ; Wed, 10 Jun 2015 14:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=mcrDg25JRyi2WRPKf1DrqokDpjZO/rNbQ4dJMc6gB9Q=; b=Ni+RFpLV8hd7S02sHm1jqmN61cX8fA0anRs9y6NvxYhThsGcZYHpA/UUT9MXXGuZ89 n0VLi6+ZtDBJ0iyDaVxg0FzArteXk+uu/vg6fE/N1gv3g5bbZQ5yWP2nnNMz68/K13md kBEFRYxdI2WUjpKgy8cerEHmGmk9zuQqEzHQM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=mcrDg25JRyi2WRPKf1DrqokDpjZO/rNbQ4dJMc6gB9Q=; b=cV0hNgYkmR2XP3J9+e17cC8MaZRVuuAbOsiinLu5VdriwN/4YN6ROwaxPD5SYsm0Mz JzW9TZlYhGYH6QFIs/XOrjuaGzTVectGIRwyf7IeoSqF9MHbV28G19da8mg17qp9kaww JjQ3ttnFYrg1Vw5/8muFIxDRu6JwYlCOv2YN8jzfL5Lc7Ha31uKyad1QMcay1dCP4iwf dHGLej4jM5dBrTR6NOEMldlZSzs+0JV+zAfbZCPdd8RGIUDcst2k6wt/g59TC30eIH1e a9qFlE/56QqDY8ee/zfcu49ljsOiJjo6+hyRPdsR1MAP1MXZhynpgjWYN6wI4RHkoY8k uUWw== X-Gm-Message-State: ALoCoQnX6/7dk4V+TuIe355JDbi8o3PQE4rjJIcOoo5r5VUjPkAXKWY3ul5Zi4xskMTAxsRpDtDf X-Received: by 10.194.200.228 with SMTP id jv4mr9807242wjc.157.1433973306992; Wed, 10 Jun 2015 14:55:06 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.65.85 with HTTP; Wed, 10 Jun 2015 14:54:36 -0700 (PDT) In-Reply-To: <20150610154445.GJ73119@FreeBSD.org> References: <201506100934.t5A9YpoN093925@svn.freebsd.org> <20150610154445.GJ73119@FreeBSD.org> From: Eitan Adler Date: Wed, 10 Jun 2015 14:54:36 -0700 X-Google-Sender-Auth: 1RRzdQWKWEfWiR_hiHRBvSJTr44 Message-ID: Subject: Re: svn commit: r284211 - in head/sys: kern sys To: Gleb Smirnoff Cc: Mateusz Guzik , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 21:55:09 -0000 On 10 June 2015 at 08:44, Gleb Smirnoff wrote: > On Wed, Jun 10, 2015 at 09:34:51AM +0000, Mateusz Guzik wrote: > M> This gets rid of fdesc_mtx. > M> int fd_holdleaderscount; /* block fdfree() for shared close() */ > > Shouldn't they be volatile u_int? why? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 22:33:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82C33EC6; Wed, 10 Jun 2015 22:33:57 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 571D4188F; Wed, 10 Jun 2015 22:33:57 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AMXv0m017121; Wed, 10 Jun 2015 22:33:57 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AMXucv017119; Wed, 10 Jun 2015 22:33:56 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506102233.t5AMXucv017119@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Wed, 10 Jun 2015 22:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284246 - head/sys/dev/proto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 22:33:57 -0000 Author: marcel Date: Wed Jun 10 22:33:56 2015 New Revision: 284246 URL: https://svnweb.freebsd.org/changeset/base/284246 Log: Load the allocated memory and return both the physical address and the bus address to the application. Modified: head/sys/dev/proto/proto_busdma.c head/sys/dev/proto/proto_dev.h Modified: head/sys/dev/proto/proto_busdma.c ============================================================================== --- head/sys/dev/proto/proto_busdma.c Wed Jun 10 20:43:07 2015 (r284245) +++ head/sys/dev/proto/proto_busdma.c Wed Jun 10 22:33:56 2015 (r284246) @@ -129,6 +129,16 @@ proto_busdma_tag_lookup(struct proto_bus return (NULL); } +static void +proto_busdma_mem_alloc_callback(void *arg, bus_dma_segment_t *segs, int nseg, + int error) +{ + struct proto_ioc_busdma *ioc = arg; + + ioc->u.mem.bus_nsegs = nseg; + ioc->u.mem.bus_addr = segs[0].ds_addr; +} + static int proto_busdma_mem_alloc(struct proto_busdma *busdma, struct proto_tag *tag, struct proto_ioc_busdma *ioc) @@ -153,10 +163,18 @@ proto_busdma_mem_alloc(struct proto_busd return (error); } md->physaddr = pmap_kextract((uintptr_t)(md->virtaddr)); + error = bus_dmamap_load(md->bd_tag, md->bd_map, md->virtaddr, + tag->maxsz, proto_busdma_mem_alloc_callback, ioc, BUS_DMA_NOWAIT); + if (error) { + bus_dmamem_free(md->bd_tag, md->virtaddr, md->bd_map); + bus_dma_tag_destroy(md->bd_tag); + free(md, M_PROTO_BUSDMA); + return (error); + } LIST_INSERT_HEAD(&tag->mds, md, peers); LIST_INSERT_HEAD(&busdma->mds, md, mds); - ioc->u.mem.nsegs = 1; - ioc->u.mem.physaddr = md->physaddr; + ioc->u.mem.phys_nsegs = 1; + ioc->u.mem.phys_addr = md->physaddr; ioc->result = (uintptr_t)(void *)md; return (0); } Modified: head/sys/dev/proto/proto_dev.h ============================================================================== --- head/sys/dev/proto/proto_dev.h Wed Jun 10 20:43:07 2015 (r284245) +++ head/sys/dev/proto/proto_dev.h Wed Jun 10 22:33:56 2015 (r284246) @@ -62,8 +62,10 @@ struct proto_ioc_busdma { struct { unsigned long tag; unsigned int flags; - unsigned int nsegs; - unsigned long physaddr; + unsigned int phys_nsegs; + unsigned long phys_addr; + unsigned long bus_addr; + unsigned int bus_nsegs; } mem; } u; unsigned long result; From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 22:37:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5365DAF; Wed, 10 Jun 2015 22:37:10 +0000 (UTC) (envelope-from rpaulo@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4197718AB; Wed, 10 Jun 2015 22:37:10 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AMbA2O017669; Wed, 10 Jun 2015 22:37:10 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AMbAcn017668; Wed, 10 Jun 2015 22:37:10 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201506102237.t5AMbAcn017668@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Wed, 10 Jun 2015 22:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284247 - head/sys/dev/ichsmb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 22:37:10 -0000 Author: rpaulo Date: Wed Jun 10 22:37:09 2015 New Revision: 284247 URL: https://svnweb.freebsd.org/changeset/base/284247 Log: ichsmb: remove whitespace. Modified: head/sys/dev/ichsmb/ichsmb_pci.c Modified: head/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- head/sys/dev/ichsmb/ichsmb_pci.c Wed Jun 10 22:33:56 2015 (r284246) +++ head/sys/dev/ichsmb/ichsmb_pci.c Wed Jun 10 22:37:09 2015 (r284247) @@ -5,7 +5,7 @@ * Copyright (c) 2000 Whistle Communications, Inc. * All rights reserved. * Author: Archie Cobbs - * + * * Subject to the following obligations and disclaimer of warranty, use and * redistribution of this software, in source or object code forms, with or * without modifications are expressly permitted by Whistle Communications; @@ -16,7 +16,7 @@ * Communications, Inc. trademarks, including the mark "WHISTLE * COMMUNICATIONS" on advertising, endorsements, or otherwise except as * such appears in the above copyright notice or in the software. - * + * * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 22:39:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EDAA253; Wed, 10 Jun 2015 22:39:11 +0000 (UTC) (envelope-from rpaulo@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D1F418B8; Wed, 10 Jun 2015 22:39:11 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5AMdBdg017995; Wed, 10 Jun 2015 22:39:11 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5AMdBNm017994; Wed, 10 Jun 2015 22:39:11 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201506102239.t5AMdBNm017994@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Wed, 10 Jun 2015 22:39:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284248 - head/sys/dev/ichsmb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 22:39:11 -0000 Author: rpaulo Date: Wed Jun 10 22:39:10 2015 New Revision: 284248 URL: https://svnweb.freebsd.org/changeset/base/284248 Log: ichsmb: add Intel Wellsburg device ID. Submitted by: Michael Allen MFC after: 1 week Sponsored by: Pi-Coral, Inc. Modified: head/sys/dev/ichsmb/ichsmb_pci.c Modified: head/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- head/sys/dev/ichsmb/ichsmb_pci.c Wed Jun 10 22:37:09 2015 (r284247) +++ head/sys/dev/ichsmb/ichsmb_pci.c Wed Jun 10 22:39:10 2015 (r284248) @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); #define ID_LPTLP 0x9c228086 #define ID_WCPT 0x8ca28086 #define ID_WCPTLP 0x9ca28086 +#define ID_WELLSBURG 0x8d228086 #define PCIS_SERIALBUS_SMBUS_PROGIF 0x00 @@ -212,6 +213,9 @@ ichsmb_pci_probe(device_t dev) case ID_COLETOCRK: device_set_desc(dev, "Intel Coleto Creek SMBus controller"); break; + case ID_WELLSBURG: + device_set_desc(dev, "Intel Wellsburg SMBus controller"); + break; default: return (ENXIO); } From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 23:46:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA3C11A5; Wed, 10 Jun 2015 23:46:25 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 917AB19A5; Wed, 10 Jun 2015 23:46:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t5ANkK0I055645 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 11 Jun 2015 02:46:20 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t5ANkK5p055644; Thu, 11 Jun 2015 02:46:20 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 11 Jun 2015 02:46:20 +0300 From: Gleb Smirnoff To: Eitan Adler Cc: Mateusz Guzik , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r284211 - in head/sys: kern sys Message-ID: <20150610234620.GS73119@FreeBSD.org> References: <201506100934.t5A9YpoN093925@svn.freebsd.org> <20150610154445.GJ73119@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 23:46:25 -0000 On Wed, Jun 10, 2015 at 02:54:36PM -0700, Eitan Adler wrote: E> On 10 June 2015 at 08:44, Gleb Smirnoff wrote: E> > On Wed, Jun 10, 2015 at 09:34:51AM +0000, Mateusz Guzik wrote: E> > M> This gets rid of fdesc_mtx. E> > M> int fd_holdleaderscount; /* block fdfree() for shared close() */ E> > E> > Shouldn't they be volatile u_int? E> E> why? Since that's the type that refcount(9) works on. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 00:12:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBEEA795; Thu, 11 Jun 2015 00:12:33 +0000 (UTC) (envelope-from brueffer@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9F2A100B; Thu, 11 Jun 2015 00:12:33 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5B0CX8V069012; Thu, 11 Jun 2015 00:12:33 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5B0CXZI069011; Thu, 11 Jun 2015 00:12:33 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201506110012.t5B0CXZI069011@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Thu, 11 Jun 2015 00:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284249 - head/usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 00:12:34 -0000 Author: brueffer Date: Thu Jun 11 00:12:33 2015 New Revision: 284249 URL: https://svnweb.freebsd.org/changeset/base/284249 Log: Correct Hawaii's admission day. PR: 192651 MFC after: 1 week Modified: head/usr.bin/calendar/calendars/calendar.holiday Modified: head/usr.bin/calendar/calendars/calendar.holiday ============================================================================== --- head/usr.bin/calendar/calendars/calendar.holiday Wed Jun 10 22:39:10 2015 (r284248) +++ head/usr.bin/calendar/calendars/calendar.holiday Thu Jun 11 00:12:33 2015 (r284249) @@ -357,7 +357,7 @@ 08/31 Independence Day (Merdeka) in Malaysia 08/31 Independence Day in Trinidad and Tobago 08/31 Pashtoonian Day in Afghanistan -08/FriThird Admission Day in Hawaii, 1984 (3rd Friday) +08/FriThird Admission Day in Hawaii, 1959 (3rd Friday) 09/01 Army Day in Chile 09/03 Independence Day in Qatar 09/03 Memorial Day in Tunisia From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 00:24:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58173A31; Thu, 11 Jun 2015 00:24:34 +0000 (UTC) (envelope-from brueffer@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46403124F; Thu, 11 Jun 2015 00:24:34 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5B0OYXf074209; Thu, 11 Jun 2015 00:24:34 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5B0OYEX074208; Thu, 11 Jun 2015 00:24:34 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201506110024.t5B0OYEX074208@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Thu, 11 Jun 2015 00:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284250 - head/sbin/geom/class/eli X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 00:24:34 -0000 Author: brueffer Date: Thu Jun 11 00:24:33 2015 New Revision: 284250 URL: https://svnweb.freebsd.org/changeset/base/284250 Log: Consistently use trailing whitespace in passphrase prompts. PR: 193496 Submitted by: Fabian Keil MFC after: 1 week Modified: head/sbin/geom/class/eli/geom_eli.c Modified: head/sbin/geom/class/eli/geom_eli.c ============================================================================== --- head/sbin/geom/class/eli/geom_eli.c Thu Jun 11 00:12:33 2015 (r284249) +++ head/sbin/geom/class/eli/geom_eli.c Thu Jun 11 00:24:33 2015 (r284250) @@ -423,7 +423,7 @@ eli_genkey_passphrase_prompt(struct gctl for (;;) { p = readpassphrase( - new ? "Enter new passphrase:" : "Enter passphrase:", + new ? "Enter new passphrase: " : "Enter passphrase: ", passbuf, passbufsize, RPP_ECHO_OFF | RPP_REQUIRE_TTY); if (p == NULL) { bzero(passbuf, passbufsize); From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 01:22:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82F6461D; Thu, 11 Jun 2015 01:22:28 +0000 (UTC) (envelope-from araujo@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5714C116D; Thu, 11 Jun 2015 01:22:28 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5B1MS9T003819; Thu, 11 Jun 2015 01:22:28 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5B1MSJL003818; Thu, 11 Jun 2015 01:22:28 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201506110122.t5B1MSJL003818@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Thu, 11 Jun 2015 01:22:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284251 - head/lib/libugidfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 01:22:28 -0000 Author: araujo (ports committer) Date: Thu Jun 11 01:22:27 2015 New Revision: 284251 URL: https://svnweb.freebsd.org/changeset/base/284251 Log: Remove unnecessary variable and fix the usage of sysctl(3). Differential Revision: D2733 Reviewed by: ngie, kib Modified: head/lib/libugidfw/ugidfw.c Modified: head/lib/libugidfw/ugidfw.c ============================================================================== --- head/lib/libugidfw/ugidfw.c Thu Jun 11 00:24:33 2015 (r284250) +++ head/lib/libugidfw/ugidfw.c Thu Jun 11 01:22:27 2015 (r284251) @@ -1232,7 +1232,7 @@ bsde_delete_rule(int rulenum, size_t buf name[len] = rulenum; len++; - error = sysctl(name, len, NULL, NULL, &rule, 0); + error = sysctl(name, len, NULL, NULL, &rule, sizeof(rule)); if (error) { len = snprintf(errstr, buflen, "%s.%d: %s", MIB ".rules", rulenum, strerror(errno)); @@ -1247,7 +1247,7 @@ bsde_set_rule(int rulenum, struct mac_bs char *errstr) { int name[10]; - size_t len, size; + size_t len; int error; if (bsde_check_version(buflen, errstr) != 0) @@ -1264,8 +1264,7 @@ bsde_set_rule(int rulenum, struct mac_bs name[len] = rulenum; len++; - size = sizeof(*rule); - error = sysctl(name, len, NULL, NULL, rule, size); + error = sysctl(name, len, NULL, NULL, rule, sizeof(*rule)); if (error) { len = snprintf(errstr, buflen, "%s.%d: %s", MIB ".rules", rulenum, strerror(errno)); @@ -1281,7 +1280,7 @@ bsde_add_rule(int *rulenum, struct mac_b { char charstr[BUFSIZ]; int name[10]; - size_t len, size; + size_t len; int error, rule_slots; if (bsde_check_version(buflen, errstr) != 0) @@ -1305,8 +1304,7 @@ bsde_add_rule(int *rulenum, struct mac_b name[len] = rule_slots; len++; - size = sizeof(*rule); - error = sysctl(name, len, NULL, NULL, rule, size); + error = sysctl(name, len, NULL, NULL, rule, sizeof(*rule)); if (error) { len = snprintf(errstr, buflen, "%s.%d: %s", MIB ".rules", rule_slots, strerror(errno)); From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 02:29:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9130BDBE; Thu, 11 Jun 2015 02:29:40 +0000 (UTC) (envelope-from sbruno@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F6881055; Thu, 11 Jun 2015 02:29:40 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5B2Teuh034192; Thu, 11 Jun 2015 02:29:40 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5B2TeDp034191; Thu, 11 Jun 2015 02:29:40 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201506110229.t5B2TeDp034191@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 11 Jun 2015 02:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284252 - head/bin/ls X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 02:29:40 -0000 Author: sbruno Date: Thu Jun 11 02:29:39 2015 New Revision: 284252 URL: https://svnweb.freebsd.org/changeset/base/284252 Log: r284198 seems to have left a null format string printf that gcc does *not* like breaking mips builds. Submitted by: Shawn Webb Obtained from: HardenedBSD Modified: head/bin/ls/print.c Modified: head/bin/ls/print.c ============================================================================== --- head/bin/ls/print.c Thu Jun 11 01:22:27 2015 (r284251) +++ head/bin/ls/print.c Thu Jun 11 02:29:39 2015 (r284252) @@ -288,7 +288,6 @@ printcol(const DISPLAY *dp) if (dp->entries > lastentries) { if ((narray = realloc(array, dp->entries * sizeof(FTSENT *))) == NULL) { - xo_warn(NULL); printscol(dp); return; } From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 02:37:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EEDBF91; Thu, 11 Jun 2015 02:37:43 +0000 (UTC) (envelope-from kp@vega.codepro.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C543B126B; Thu, 11 Jun 2015 02:37:42 +0000 (UTC) (envelope-from kp@vega.codepro.be) Received: from vega.codepro.be (unknown [172.16.1.3]) by venus.codepro.be (Postfix) with ESMTP id 17A9913B53; Thu, 11 Jun 2015 04:37:39 +0200 (CEST) Received: by vega.codepro.be (Postfix, from userid 1001) id EF40BF351; Thu, 11 Jun 2015 04:37:38 +0200 (CEST) Date: Thu, 11 Jun 2015 04:37:38 +0200 From: Kristof Provost To: Sean Bruno Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284252 - head/bin/ls Message-ID: <20150611023738.GB2301@vega.codepro.be> References: <201506110229.t5B2TeDp034191@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201506110229.t5B2TeDp034191@svn.freebsd.org> X-Checked-By-NSA: Probably User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 02:37:43 -0000 On 2015-06-11 02:29:40 (+0000), Sean Bruno wrote: > Author: sbruno > Date: Thu Jun 11 02:29:39 2015 > New Revision: 284252 > URL: https://svnweb.freebsd.org/changeset/base/284252 > > Log: > r284198 seems to have left a null format string printf that gcc does *not* > like breaking mips builds. > Thanks, I just ran into that one trying to make a build for my TP thinghy. Regards, Kristof From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 03:02:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1C3C766; Thu, 11 Jun 2015 03:02:42 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1B581BB4; Thu, 11 Jun 2015 03:02:42 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5B32ghe053974; Thu, 11 Jun 2015 03:02:42 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5B32fV2053966; Thu, 11 Jun 2015 03:02:41 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506110302.t5B32fV2053966@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Thu, 11 Jun 2015 03:02:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284253 - in head/tools/bus_space: . C Python X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 03:02:42 -0000 Author: marcel Date: Thu Jun 11 03:02:40 2015 New Revision: 284253 URL: https://svnweb.freebsd.org/changeset/base/284253 Log: Add accessor functions for iterating over segments. A segment can be in bus address space, physical memory space or virtual memory space. Modified: head/tools/bus_space/C/lang.c head/tools/bus_space/C/libbus.h head/tools/bus_space/Python/lang.c head/tools/bus_space/busdma.c head/tools/bus_space/busdma.h Modified: head/tools/bus_space/C/lang.c ============================================================================== --- head/tools/bus_space/C/lang.c Thu Jun 11 02:29:39 2015 (r284252) +++ head/tools/bus_space/C/lang.c Thu Jun 11 03:02:40 2015 (r284253) @@ -155,3 +155,40 @@ busdma_mem_free(busdma_md_t md) return (bd_mem_free(md)); } + +busdma_seg_t +busdma_md_first_seg(busdma_md_t md, int space) +{ + busdma_seg_t seg; + + seg = bd_md_first_seg(md, space); + return (seg); +} + +busdma_seg_t +busdma_md_next_seg(busdma_md_t md, busdma_seg_t seg) +{ + + seg = bd_md_next_seg(md, seg); + return (seg); +} + +bus_addr_t +busdma_seg_get_addr(busdma_seg_t seg) +{ + u_long addr; + int error; + + error = bd_seg_get_addr(seg, &addr); + return ((error) ? ~0UL : addr); +} + +bus_size_t +busdma_seg_get_size(busdma_seg_t seg) +{ + u_long size; + int error; + + error = bd_seg_get_size(seg, &size); + return ((error) ? ~0UL : size); +} Modified: head/tools/bus_space/C/libbus.h ============================================================================== --- head/tools/bus_space/C/libbus.h Thu Jun 11 02:29:39 2015 (r284252) +++ head/tools/bus_space/C/libbus.h Thu Jun 11 03:02:40 2015 (r284253) @@ -43,6 +43,7 @@ typedef unsigned long bus_addr_t; typedef unsigned long bus_size_t; typedef int busdma_tag_t; typedef int busdma_md_t; +typedef int busdma_seg_t; int busdma_tag_create(const char *dev, bus_addr_t align, bus_addr_t bndry, bus_addr_t maxaddr, bus_size_t maxsz, u_int nsegs, @@ -57,4 +58,14 @@ int busdma_tag_destroy(busdma_tag_t tag) int busdma_mem_alloc(busdma_tag_t tag, u_int flags, busdma_md_t *out_p); int busdma_mem_free(busdma_md_t md); +#define BUSDMA_MD_BUS_SPACE 0 +#define BUSDMA_MD_PHYS_SPACE 1 +#define BUSDMA_MD_VIRT_SPACE 2 + +int busdma_md_first_seg(busdma_md_t, int space); +int busdma_md_next_seg(busdma_md_t, busdma_seg_t seg); + +bus_addr_t busdma_seg_get_addr(busdma_seg_t seg); +bus_size_t busdma_seg_get_size(busdma_seg_t seg); + #endif /* _LIBBUS_SPACE_H_ */ Modified: head/tools/bus_space/Python/lang.c ============================================================================== --- head/tools/bus_space/Python/lang.c Thu Jun 11 02:29:39 2015 (r284252) +++ head/tools/bus_space/Python/lang.c Thu Jun 11 03:02:40 2015 (r284253) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Marcel Moolenaar + * Copyright (c) 2014, 2015 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -259,6 +259,68 @@ busdma_mem_free(PyObject *self, PyObject Py_RETURN_NONE; } +static PyObject * +busdma_md_first_seg(PyObject *self, PyObject *args) +{ + int error, mdid, sid, what; + + if (!PyArg_ParseTuple(args, "ii", &mdid, &what)) + return (NULL); + sid = bd_md_first_seg(mdid, what); + if (sid == -1) { + PyErr_SetString(PyExc_IOError, strerror(errno)); + return (NULL); + } + return (Py_BuildValue("i", sid)); +} + +static PyObject * +busdma_md_next_seg(PyObject *self, PyObject *args) +{ + int error, mdid, sid; + + if (!PyArg_ParseTuple(args, "ii", &mdid, &sid)) + return (NULL); + sid = bd_md_next_seg(mdid, sid); + if (sid == -1) { + PyErr_SetString(PyExc_IOError, strerror(errno)); + return (NULL); + } + return (Py_BuildValue("i", sid)); +} + +static PyObject * +busdma_seg_get_addr(PyObject *self, PyObject *args) +{ + u_long addr; + int error, sid; + + if (!PyArg_ParseTuple(args, "i", &sid)) + return (NULL); + error = bd_seg_get_addr(sid, &addr); + if (error) { + PyErr_SetString(PyExc_IOError, strerror(error)); + return (NULL); + } + return (Py_BuildValue("k", addr)); +} + +static PyObject * +busdma_seg_get_size(PyObject *self, PyObject *args) +{ + u_long size; + int error, sid; + + if (!PyArg_ParseTuple(args, "i", &sid)) + return (NULL); + error = bd_seg_get_size(sid, &size); + if (error) { + PyErr_SetString(PyExc_IOError, strerror(error)); + return (NULL); + } + return (Py_BuildValue("k", size)); +} + static PyMethodDef bus_methods[] = { { "read_1", bus_read_1, METH_VARARGS, "Read a 1-byte data item." }, { "read_2", bus_read_2, METH_VARARGS, "Read a 2-byte data item." }, @@ -289,6 +351,15 @@ static PyMethodDef busdma_methods[] = { "Allocate memory according to the DMA constraints." }, { "mem_free", busdma_mem_free, METH_VARARGS, "Free allocated memory." }, + + { "md_first_seg", busdma_md_first_seg, METH_VARARGS, + "Return first segment in one of the segment lists." }, + { "md_next_seg", busdma_md_next_seg, METH_VARARGS, + "Return next segment in the segment list." }, + { "seg_get_addr", busdma_seg_get_addr, METH_VARARGS, + "Return the address of the segment." }, + { "seg_get_size", busdma_seg_get_size, METH_VARARGS, + "Return the size of the segment." }, { NULL, NULL, 0, NULL } }; Modified: head/tools/bus_space/busdma.c ============================================================================== --- head/tools/bus_space/busdma.c Thu Jun 11 02:29:39 2015 (r284252) +++ head/tools/bus_space/busdma.c Thu Jun 11 03:02:40 2015 (r284253) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -46,6 +47,7 @@ struct obj { #define OBJ_TYPE_NONE 0 #define OBJ_TYPE_TAG 1 #define OBJ_TYPE_MD 2 +#define OBJ_TYPE_SEG 3 u_int refcnt; int fd; struct obj *parent; @@ -61,9 +63,17 @@ struct obj { unsigned long datarate; } tag; struct { - unsigned long physaddr; - void *virtaddr; - } mem; + struct obj *seg[3]; + int nsegs[3]; +#define BUSDMA_MD_BUS 0 +#define BUSDMA_MD_PHYS 1 +#define BUSDMA_MD_VIRT 2 + } md; + struct { + struct obj *next; + unsigned long address; + unsigned long size; + } seg; } u; }; @@ -76,9 +86,8 @@ obj_alloc(u_int type) struct obj **newtbl, *obj; int oid; - obj = malloc(sizeof(struct obj)); + obj = calloc(1, sizeof(struct obj)); obj->type = type; - obj->refcnt = 0; for (oid = 0; oid < noids; oid++) { if (oidtbl[oid] == 0) @@ -239,6 +248,7 @@ bd_mem_alloc(int tid, u_int flags) { struct proto_ioc_busdma ioc; struct obj *md, *tag; + struct obj *bseg, *pseg, *vseg; tag = obj_lookup(tid, OBJ_TYPE_TAG); if (tag == NULL) @@ -262,10 +272,35 @@ bd_mem_alloc(int tid, u_int flags) md->parent = tag; tag->refcnt++; md->key = ioc.result; - md->u.mem.physaddr = ioc.u.mem.physaddr; - md->u.mem.virtaddr = mmap(NULL, tag->u.tag.maxsz, + + assert(ioc.u.mem.phys_nsegs == 1); + pseg = obj_alloc(OBJ_TYPE_SEG); + pseg->refcnt = 1; + pseg->parent = md; + pseg->u.seg.address = ioc.u.mem.phys_addr; + pseg->u.seg.size = tag->u.tag.maxsz; + md->u.md.seg[BUSDMA_MD_PHYS] = pseg; + md->u.md.nsegs[BUSDMA_MD_PHYS] = ioc.u.mem.phys_nsegs; + + assert(ioc.u.mem.bus_nsegs == 1); + bseg = obj_alloc(OBJ_TYPE_SEG); + bseg->refcnt = 1; + bseg->parent = md; + bseg->u.seg.address = ioc.u.mem.bus_addr; + bseg->u.seg.size = tag->u.tag.maxsz; + md->u.md.seg[BUSDMA_MD_BUS] = bseg; + md->u.md.nsegs[BUSDMA_MD_BUS] = ioc.u.mem.bus_nsegs; + + vseg = obj_alloc(OBJ_TYPE_SEG); + vseg->refcnt = 1; + vseg->parent = md; + vseg->u.seg.address = (uintptr_t)mmap(NULL, pseg->u.seg.size, PROT_READ | PROT_WRITE, MAP_NOCORE | MAP_SHARED, md->fd, - md->u.mem.physaddr); + pseg->u.seg.address); + vseg->u.seg.size = pseg->u.seg.size; + md->u.md.seg[BUSDMA_MD_VIRT] = vseg; + md->u.md.nsegs[BUSDMA_MD_VIRT] = 1; + return (md->oid); } @@ -273,14 +308,16 @@ int bd_mem_free(int mdid) { struct proto_ioc_busdma ioc; - struct obj *md; + struct obj *md, *seg; md = obj_lookup(mdid, OBJ_TYPE_MD); if (md == NULL) return (errno); - if (md->u.mem.virtaddr != MAP_FAILED) - munmap(md->u.mem.virtaddr, md->parent->u.tag.maxsz); + for (seg = md->u.md.seg[BUSDMA_MD_VIRT]; + seg != NULL; + seg = seg->u.seg.next) + munmap((void *)seg->u.seg.address, seg->u.seg.size); memset(&ioc, 0, sizeof(ioc)); ioc.request = PROTO_IOC_BUSDMA_MEM_FREE; ioc.key = md->key; @@ -291,3 +328,74 @@ bd_mem_free(int mdid) obj_free(md); return (0); } + +int +bd_md_first_seg(int mdid, int space) +{ + struct obj *md, *seg; + + md = obj_lookup(mdid, OBJ_TYPE_MD); + if (md == NULL) + return (-1); + + if (space != BUSDMA_MD_BUS && space != BUSDMA_MD_PHYS && + space != BUSDMA_MD_VIRT) { + errno = EINVAL; + return (-1); + } + seg = md->u.md.seg[space]; + if (seg == NULL) { + errno = ENXIO; + return (-1); + } + return (seg->oid); +} + +int +bd_md_next_seg(int mdid, int sid) +{ + struct obj *seg; + + seg = obj_lookup(sid, OBJ_TYPE_SEG); + if (seg == NULL) + return (-1); + + seg = seg->u.seg.next; + if (seg == NULL) { + errno = ENXIO; + return (-1); + } + return (seg->oid); +} + +int +bd_seg_get_addr(int sid, u_long *addr_p) +{ + struct obj *seg; + + if (addr_p == NULL) + return (EINVAL); + + seg = obj_lookup(sid, OBJ_TYPE_SEG); + if (seg == NULL) + return (errno); + + *addr_p = seg->u.seg.address; + return (0); +} + +int +bd_seg_get_size(int sid, u_long *size_p) +{ + struct obj *seg; + + if (size_p == NULL) + return (EINVAL); + + seg = obj_lookup(sid, OBJ_TYPE_SEG); + if (seg == NULL) + return (errno); + + *size_p = seg->u.seg.size; + return (0); +} Modified: head/tools/bus_space/busdma.h ============================================================================== --- head/tools/bus_space/busdma.h Thu Jun 11 02:29:39 2015 (r284252) +++ head/tools/bus_space/busdma.h Thu Jun 11 03:02:40 2015 (r284253) @@ -40,4 +40,10 @@ int bd_tag_destroy(int tid); int bd_mem_alloc(int tid, u_int flags); int bd_mem_free(int mdid); +int bd_md_first_seg(int mdid, int what); +int bd_md_next_seg(int mdid, int sid); + +int bd_seg_get_addr(int sid, u_long *); +int bd_seg_get_size(int sid, u_long *); + #endif /* _TOOLS_BUS_DMA_H_ */ From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 04:00:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5AB3F5A7; Thu, 11 Jun 2015 04:00:27 +0000 (UTC) (envelope-from sjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46F1518C9; Thu, 11 Jun 2015 04:00:27 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5B40R7Z079885; Thu, 11 Jun 2015 04:00:27 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5B40N34079861; Thu, 11 Jun 2015 04:00:23 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201506110400.t5B40N34079861@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 11 Jun 2015 04:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284254 - in head: contrib/bmake contrib/bmake/mk usr.bin/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 04:00:27 -0000 Author: sjg Date: Thu Jun 11 04:00:22 2015 New Revision: 284254 URL: https://svnweb.freebsd.org/changeset/base/284254 Log: Merge bmake-20150606 Only change to bmake is man page - document .OBJDIR target. We also get latest dirdeps.mk and friends. > Description of fields to fill in above: 76 columns --| > PR: If a GNATS PR is affected by the change. > Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed). > Submitted by: If someone else sent in the change. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > MFH: Ports tree branch name. Request approval for merge. > Relnotes: Set to 'yes' for mention in release notes. > Security: Vulnerability reference (one per line) or description. > Sponsored by: If the change was sponsored by an organization. > Empty fields above will be automatically removed. _M contrib/bmake M contrib/bmake/ChangeLog M contrib/bmake/Makefile M contrib/bmake/bmake.1 M contrib/bmake/bmake.cat1 M contrib/bmake/make.1 M contrib/bmake/mk/ChangeLog M contrib/bmake/mk/dirdeps.mk M contrib/bmake/mk/gendirdeps.mk M contrib/bmake/mk/install-mk M contrib/bmake/mk/meta.stage.mk M contrib/bmake/mk/meta.sys.mk M contrib/bmake/mk/mkopt.sh M contrib/bmake/targ.c M usr.bin/bmake/Makefile Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/Makefile head/contrib/bmake/bmake.1 head/contrib/bmake/bmake.cat1 head/contrib/bmake/make.1 head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/dirdeps.mk head/contrib/bmake/mk/gendirdeps.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/meta.stage.mk head/contrib/bmake/mk/meta.sys.mk head/contrib/bmake/mk/mkopt.sh head/contrib/bmake/targ.c head/usr.bin/bmake/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Thu Jun 11 03:02:40 2015 (r284253) +++ head/contrib/bmake/ChangeLog Thu Jun 11 04:00:22 2015 (r284254) @@ -1,3 +1,9 @@ +2015-06-06 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150606 + Merge with NetBSD make, pick up + o make.1: document .OBJDIR target + 2015-05-05 Simon J. Gerraty * Makefile (MAKE_VERSION): 20150505 Modified: head/contrib/bmake/Makefile ============================================================================== --- head/contrib/bmake/Makefile Thu Jun 11 03:02:40 2015 (r284253) +++ head/contrib/bmake/Makefile Thu Jun 11 04:00:22 2015 (r284254) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.38 2015/05/05 21:58:05 sjg Exp $ +# $Id: Makefile,v 1.39 2015/06/07 15:54:37 sjg Exp $ # Base version on src date -MAKE_VERSION= 20150505 +MAKE_VERSION= 20150606 PROG= bmake Modified: head/contrib/bmake/bmake.1 ============================================================================== --- head/contrib/bmake/bmake.1 Thu Jun 11 03:02:40 2015 (r284253) +++ head/contrib/bmake/bmake.1 Thu Jun 11 04:00:22 2015 (r284254) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.247 2015/04/10 08:43:32 wiz Exp $ +.\" $NetBSD: make.1,v 1.249 2015/06/05 07:33:40 wiz Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd April 9, 2015 +.Dd June 4, 2015 .Dt MAKE 1 .Os .Sh NAME @@ -993,14 +993,15 @@ This is especially useful with .Ql Ev MAKEOBJDIR . .Pp .Ql Va .OBJDIR -may be modified in the makefile as a global variable. +may be modified in the makefile via the special target +.Ql Ic .OBJDIR . In all cases, .Nm will .Xr chdir 2 -to +to the specified directory if it exists, and set .Ql Va .OBJDIR -and set +and .Ql Ev PWD to that directory before executing any targets. . @@ -2001,6 +2002,15 @@ Disable parallel mode. Synonym for .Ic .NOTPARALLEL , for compatibility with other pmake variants. +.It Ic .OBJDIR +The source is a new value for +.Ql Va .OBJDIR . +If it exists, +.Nm +will +.Xr chdir 2 +to it and update the value of +.Ql Va .OBJDIR . .It Ic .ORDER The named targets are made in sequence. This ordering does not add targets to the list of targets to be made. Modified: head/contrib/bmake/bmake.cat1 ============================================================================== --- head/contrib/bmake/bmake.cat1 Thu Jun 11 03:02:40 2015 (r284253) +++ head/contrib/bmake/bmake.cat1 Thu Jun 11 04:00:22 2015 (r284254) @@ -647,10 +647,10 @@ VVAARRIIAABBLLEE AASSSSIIGG may be used. This is especially useful with `MAKEOBJDIR'. - `_._O_B_J_D_I_R' may be modified in the makefile as a global - variable. In all cases, bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' - and set `PWD' to that directory before executing any tar- - gets. + `_._O_B_J_D_I_R' may be modified in the makefile via the special + target `..OOBBJJDDIIRR'. In all cases, bbmmaakkee will chdir(2) to + the specified directory if it exists, and set `_._O_B_J_D_I_R' + and `PWD' to that directory before executing any targets. _._P_A_R_S_E_D_I_R A path to the directory of the current `_M_a_k_e_f_i_l_e' being parsed. @@ -1271,6 +1271,9 @@ SSPPEECCIIAALL TTAARRGGEETT Synonym for ..NNOOTTPPAARRAALLLLEELL, for compatibility with other pmake variants. + ..OOBBJJDDIIRR The source is a new value for `_._O_B_J_D_I_R'. If it exists, bbmmaakkee + will chdir(2) to it and update the value of `_._O_B_J_D_I_R'. + ..OORRDDEERR The named targets are made in sequence. This ordering does not add targets to the list of targets to be made. Since the depen- dents of a target do not get built until the target itself could @@ -1449,4 +1452,4 @@ BBUUGGSS There is no way of escaping a space character in a filename. -NetBSD 5.1 April 9, 2015 NetBSD 5.1 +NetBSD 5.1 June 4, 2015 NetBSD 5.1 Modified: head/contrib/bmake/make.1 ============================================================================== --- head/contrib/bmake/make.1 Thu Jun 11 03:02:40 2015 (r284253) +++ head/contrib/bmake/make.1 Thu Jun 11 04:00:22 2015 (r284254) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.247 2015/04/10 08:43:32 wiz Exp $ +.\" $NetBSD: make.1,v 1.249 2015/06/05 07:33:40 wiz Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd April 9, 2015 +.Dd June 4, 2015 .Dt MAKE 1 .Os .Sh NAME @@ -1004,14 +1004,15 @@ This is especially useful with .Ql Ev MAKEOBJDIR . .Pp .Ql Va .OBJDIR -may be modified in the makefile as a global variable. +may be modified in the makefile via the special target +.Ql Ic .OBJDIR . In all cases, .Nm will .Xr chdir 2 -to +to the specified directory if it exists, and set .Ql Va .OBJDIR -and set +and .Ql Ev PWD to that directory before executing any targets. . @@ -2012,6 +2013,15 @@ Disable parallel mode. Synonym for .Ic .NOTPARALLEL , for compatibility with other pmake variants. +.It Ic .OBJDIR +The source is a new value for +.Ql Va .OBJDIR . +If it exists, +.Nm +will +.Xr chdir 2 +to it and update the value of +.Ql Va .OBJDIR . .It Ic .ORDER The named targets are made in sequence. This ordering does not add targets to the list of targets to be made. Modified: head/contrib/bmake/mk/ChangeLog ============================================================================== --- head/contrib/bmake/mk/ChangeLog Thu Jun 11 03:02:40 2015 (r284253) +++ head/contrib/bmake/mk/ChangeLog Thu Jun 11 04:00:22 2015 (r284254) @@ -1,3 +1,29 @@ +2015-06-06 Simon J. Gerraty + + * install-mk (MK_VERSION): 20150606 + + * dirdeps.mk: don't rely on manually maintained Makefile.depend + to set DEP_RELDIR and reset DIRDEPS. + By setting DEP_RELDIR ourselves we can skip :tA + + * gendirdeps.mk: skip setting DEP_RELDIR. + +2015-05-24 Simon J. Gerraty + + * dirdeps.mk: avoid wildcards like make(bootstrap*) + +2015-05-20 Simon J. Gerraty + + * install-mk (MK_VERSION): 20150520 + + * dirdeps.mk: when we are building dirdeps cache file we *want* + meta_oodate to look at all the Makefile.depend files, so + set .MAKE.DEPENDFILE to something that won't match. + + * meta.stage.mk: for STAGE_AS_* basename of file may not be unique + so first use absolute path as key. + Also skip staging at level 0. + 2015-04-30 Simon J. Gerraty * install-mk (MK_VERSION): 20150430 Modified: head/contrib/bmake/mk/dirdeps.mk ============================================================================== --- head/contrib/bmake/mk/dirdeps.mk Thu Jun 11 03:02:40 2015 (r284253) +++ head/contrib/bmake/mk/dirdeps.mk Thu Jun 11 04:00:22 2015 (r284254) @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.51 2015/05/06 06:07:30 sjg Exp $ +# $Id: dirdeps.mk,v 1.54 2015/06/08 20:55:11 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -383,6 +383,7 @@ ${DIRDEPS_CACHE}: .META .NOMETA_CMP DIRDEPS="${DIRDEPS}" \ MAKEFLAGS= ${.MAKE} -C ${_CURDIR} -f ${BUILD_DIRDEPS_MAKEFILE} \ ${BUILD_DIRDEPS_TARGETS} BUILD_DIRDEPS_CACHE=yes \ + .MAKE.DEPENDFILE=.none \ 3>&1 1>&2 | sed 's,${SRCTOP},$${SRCTOP},g' >> ${.TARGET}.new && \ mv ${.TARGET}.new ${.TARGET} @@ -587,6 +588,11 @@ _qm := ${_m:C;(\.depend)$;\1.${d:E};:${M _DEP_TARGET_SPEC := ${d:E} # some makefiles may still look at this _DEP_MACHINE := ${d:E:C/,.*//} +# set this "just in case" +# we can skip :tA since we computed the path above +DEP_RELDIR := ${_m:H:S,${SRCTOP}/,,} +# and reset this +DIRDEPS = .if ${_debug_reldir} && ${_qm} != ${_m} .info loading ${_m} for ${d:E} .endif @@ -602,13 +608,15 @@ _DEP_MACHINE := ${d:E:C/,.*//} .elif ${.MAKE.LEVEL} > 42 .error You should have stopped recursing by now. .else -_DEP_RELDIR := ${DEP_RELDIR} +# we are building something +DEP_RELDIR := ${RELDIR} +_DEP_RELDIR := ${RELDIR} # pickup local dependencies .-include <.depend> .endif # bootstrapping new dependencies made easy? -.if make(bootstrap*) && !target(bootstrap) +.if (make(bootstrap) || make(bootstrap-recurse)) && !target(bootstrap) .if exists(${.CURDIR}/${.MAKE.DEPENDFILE:T}) # stop here Modified: head/contrib/bmake/mk/gendirdeps.mk ============================================================================== --- head/contrib/bmake/mk/gendirdeps.mk Thu Jun 11 03:02:40 2015 (r284253) +++ head/contrib/bmake/mk/gendirdeps.mk Thu Jun 11 04:00:22 2015 (r284254) @@ -1,4 +1,4 @@ -# $Id: gendirdeps.mk,v 1.26 2014/09/05 04:40:52 sjg Exp $ +# $Id: gendirdeps.mk,v 1.27 2015/06/08 20:55:11 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -311,7 +311,6 @@ CAT_DEPEND ?= .depend # to output _{VAR} tokens which we will turn into proper ${VAR} references. ${_DEPENDFILE}: ${CAT_DEPEND:M.depend} ${META_FILES:O:u:@m@${exists($m):?$m:}@} ${_this} ${META2DEPS} @(echo '# Autogenerated - do NOT edit!'; echo; \ - echo 'DEP_RELDIR := $${_PARSEDIR:S,$${SRCTOP}/,,}'; echo; \ echo 'DIRDEPS = \'; \ echo '${DIRDEPS:@d@ $d \\${.newline}@}'; echo; \ ${_include_src_dirdeps} \ @@ -332,7 +331,6 @@ all: ${_DEPENDFILE} ${_DEPENDFILE}: ${MAKEFILE} ${_this} @(echo '# Autogenerated - do NOT edit!'; echo; \ - echo 'DEP_RELDIR := $${_PARSEDIR:S,$${SRCTOP}/,,}'; echo; \ echo 'DIRDEPS = \'; \ echo '${DIRDEPS:@d@ $d \\${.newline}@}'; echo; \ echo '.include '; \ Modified: head/contrib/bmake/mk/install-mk ============================================================================== --- head/contrib/bmake/mk/install-mk Thu Jun 11 03:02:40 2015 (r284253) +++ head/contrib/bmake/mk/install-mk Thu Jun 11 04:00:22 2015 (r284254) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.110 2015/05/01 06:37:49 sjg Exp $ +# $Id: install-mk,v 1.112 2015/06/08 20:55:11 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20150430 +MK_VERSION=20150606 OWNER= GROUP= MODE=444 Modified: head/contrib/bmake/mk/meta.stage.mk ============================================================================== --- head/contrib/bmake/mk/meta.stage.mk Thu Jun 11 03:02:40 2015 (r284253) +++ head/contrib/bmake/mk/meta.stage.mk Thu Jun 11 04:00:22 2015 (r284254) @@ -1,4 +1,4 @@ -# $Id: meta.stage.mk,v 1.34 2014/11/20 22:40:08 sjg Exp $ +# $Id: meta.stage.mk,v 1.35 2015/05/20 06:40:33 sjg Exp $ # # @(#) Copyright (c) 2011, Simon J. Gerraty # @@ -218,7 +218,7 @@ STAGE_AS.$s ?= ${.ALLSRC:N.dirdep} stage_as: stage_as.$s stage_as.$s: .dirdep - @${STAGE_AS_SCRIPT}; StageAs ${FLAGS.$@} ${STAGE_FILES_DIR.$s:U${STAGE_DIR.$s}:${STAGE_DIR_FILTER}} ${STAGE_AS.$s:@f@$f ${STAGE_AS_${f:T}:U${f:T}}@} + @${STAGE_AS_SCRIPT}; StageAs ${FLAGS.$@} ${STAGE_FILES_DIR.$s:U${STAGE_DIR.$s}:${STAGE_DIR_FILTER}} ${STAGE_AS.$s:@f@$f ${STAGE_AS_${f:tA}:U${STAGE_AS_${f:T}:U${f:T}}}@} @touch $@ .endfor @@ -238,7 +238,9 @@ staging: # generally we want staging to wait until everything else is done STAGING_WAIT ?= .WAIT +.if ${.MAKE.LEVEL} > 0 all: ${STAGING_WAIT} staging +.endif .if exists(${.PARSEDIR}/stage-install.sh) && !defined(STAGE_INSTALL) # this will run install(1) and then followup with .dirdep files. Modified: head/contrib/bmake/mk/meta.sys.mk ============================================================================== --- head/contrib/bmake/mk/meta.sys.mk Thu Jun 11 03:02:40 2015 (r284253) +++ head/contrib/bmake/mk/meta.sys.mk Thu Jun 11 04:00:22 2015 (r284254) @@ -1,4 +1,4 @@ -# $Id: meta.sys.mk,v 1.20 2014/08/04 05:12:27 sjg Exp $ +# $Id: meta.sys.mk,v 1.21 2015/06/01 22:43:49 sjg Exp $ # # @(#) Copyright (c) 2010, Simon J. Gerraty @@ -108,11 +108,16 @@ _metaError: .NOMETA .NOTMAIN .if ${.MAKE.MODE:Mmeta*} != "" MKDEP_MK = meta.autodep.mk -# if we think we are updating dependencies, -# then filemon had better be present -.if ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !exists(/dev/filemon) +.if ${UPDATE_DEPENDFILE:Uyes:tl} != "no" +.if ${.MAKEFLAGS:Uno:M-k} != "" +# make this more obvious +.warning Setting UPDATE_DEPENDFILE=NO due to -k +UPDATE_DEPENDFILE= NO +.export UPDATE_DEPENDFILE +.elif !exists(/dev/filemon) .error ${.newline}ERROR: The filemon module (/dev/filemon) is not loaded. .endif +.endif .if ${.MAKE.LEVEL} == 0 # make sure dirdeps target exists and do it first Modified: head/contrib/bmake/mk/mkopt.sh ============================================================================== --- head/contrib/bmake/mk/mkopt.sh Thu Jun 11 03:02:40 2015 (r284253) +++ head/contrib/bmake/mk/mkopt.sh Thu Jun 11 04:00:22 2015 (r284254) @@ -1,5 +1,5 @@ : -# $Id: mkopt.sh,v 1.8 2014/11/15 07:07:18 sjg Exp $ +# $Id: mkopt.sh,v 1.10 2015/06/07 17:29:08 sjg Exp $ # # @(#) Copyright (c) 2014, Simon J. Gerraty # @@ -19,9 +19,10 @@ # no need to be included more than once _MKOPT_SH=: +_MKOPT_PREFIX=${_MKOPT_PREFIX:-MK_} # -# _mk_opt OPT default +# _mk_opt default OPT # # Set MK_$OPT # @@ -35,7 +36,7 @@ _MKOPT_SH=: # _mk_opt() { _d=$1 - _mo=MK_$2 _wo=WITHOUT_$2 _wi=WITH_$2 + _mo=${_MKOPT_PREFIX}$2 _wo=WITHOUT_$2 _wi=WITH_$2 eval "_mov=\$$_mo _wov=\$$_wo _wiv=\$$_wi" case "$_wiv" in @@ -63,15 +64,23 @@ _mk_opts() { _d=no for _o in "$@" do - case "$_o" in + case "$_o" in + */*) # option is dirname default comes from basename + eval "_d=\$${_MKOPT_PREFIX}${_o#*/}" + _o=${_o%/*} + ;; yes|no) _d=$_o; continue;; esac _mk_opt $_d $_o done } +# handle either options.mk style OPTIONS_DEFAULT_* +# or FreeBSD's new bsd.mkopt.mk style __DEFAULT_*_OPTIONS _mk_opts_defaults() { - _mk_opts no $__DEFAULT_NO_OPTIONS yes $__DEFAULT_YES_OPTIONS + _mk_opts no $OPTIONS_DEFAULT_NO $__DEFAULT_NO_OPTIONS \ + yes $OPTIONS_DEFAULT_YES $__DEFAULT_YES_OPTIONS \ + $OPTIONS_DEFAULT_DEPENDENT $__DEFAULT_DEPENDENT_OPTIONS } case "/$0" in Modified: head/contrib/bmake/targ.c ============================================================================== --- head/contrib/bmake/targ.c Thu Jun 11 03:02:40 2015 (r284253) +++ head/contrib/bmake/targ.c Thu Jun 11 04:00:22 2015 (r284254) @@ -1,4 +1,4 @@ -/* $NetBSD: targ.c,v 1.59 2014/09/07 20:55:34 joerg Exp $ */ +/* $NetBSD: targ.c,v 1.60 2015/05/25 09:01:06 manu Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: targ.c,v 1.59 2014/09/07 20:55:34 joerg Exp $"; +static char rcsid[] = "$NetBSD: targ.c,v 1.60 2015/05/25 09:01:06 manu Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: targ.c,v 1.59 2014/09/07 20:55:34 joerg Exp $"); +__RCSID("$NetBSD: targ.c,v 1.60 2015/05/25 09:01:06 manu Exp $"); #endif #endif /* not lint */ #endif Modified: head/usr.bin/bmake/Makefile ============================================================================== --- head/usr.bin/bmake/Makefile Thu Jun 11 03:02:40 2015 (r284253) +++ head/usr.bin/bmake/Makefile Thu Jun 11 04:00:22 2015 (r284254) @@ -14,10 +14,10 @@ CFLAGS+= -I${.CURDIR} CLEANDIRS+= FreeBSD CLEANFILES+= bootstrap -# $Id: Makefile,v 1.38 2015/05/05 21:58:05 sjg Exp $ +# $Id: Makefile,v 1.39 2015/06/07 15:54:37 sjg Exp $ # Base version on src date -MAKE_VERSION= 20150505 +MAKE_VERSION= 20150606 PROG?= ${.CURDIR:T} From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 04:22:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87F7D8F0; Thu, 11 Jun 2015 04:22:24 +0000 (UTC) (envelope-from sjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73E6F1EB2; Thu, 11 Jun 2015 04:22:24 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5B4MOOx093532; Thu, 11 Jun 2015 04:22:24 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5B4MI7R093478; Thu, 11 Jun 2015 04:22:18 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201506110422.t5B4MI7R093478@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 11 Jun 2015 04:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284255 - in head: include/arpa include/gssapi include/protocols include/xlocale libexec/save-entropy share/dict share/dtrace/toolkit share/examples/pf share/misc share/sendmail share/s... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 04:22:24 -0000 Author: sjg Date: Thu Jun 11 04:22:17 2015 New Revision: 284255 URL: https://svnweb.freebsd.org/changeset/base/284255 Log: Remove NO_OBJ For meta mode we will want objdirs. Differential Revision: D2748 Reviewed by: brooks imp Modified: head/include/arpa/Makefile head/include/gssapi/Makefile head/include/protocols/Makefile head/include/xlocale/Makefile head/libexec/save-entropy/Makefile head/share/dict/Makefile head/share/dtrace/toolkit/Makefile head/share/examples/pf/Makefile head/share/misc/Makefile head/share/sendmail/Makefile head/share/skel/Makefile head/share/snmp/mibs/Makefile head/share/syscons/fonts/Makefile head/share/syscons/keymaps/Makefile head/usr.bin/alias/Makefile head/usr.sbin/pc-sysinstall/backend-partmanager/Makefile head/usr.sbin/pc-sysinstall/backend-query/Makefile head/usr.sbin/pc-sysinstall/backend/Makefile head/usr.sbin/pc-sysinstall/conf/Makefile head/usr.sbin/pc-sysinstall/examples/Makefile Modified: head/include/arpa/Makefile ============================================================================== --- head/include/arpa/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/include/arpa/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -2,7 +2,6 @@ .include -NO_OBJ= INCS= ftp.h inet.h nameser.h nameser_compat.h tftp.h .if ${MK_TELNET} == "no" INCS+= telnet.h Modified: head/include/gssapi/Makefile ============================================================================== --- head/include/gssapi/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/include/gssapi/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -1,6 +1,5 @@ # $FreeBSD$ -NO_OBJ= INCS= gssapi.h INCSDIR= ${INCLUDEDIR}/gssapi Modified: head/include/protocols/Makefile ============================================================================== --- head/include/protocols/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/include/protocols/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -1,6 +1,5 @@ # $FreeBSD$ -NO_OBJ= INCS= dumprestore.h routed.h rwhod.h talkd.h timed.h INCSDIR=${INCLUDEDIR}/protocols Modified: head/include/xlocale/Makefile ============================================================================== --- head/include/xlocale/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/include/xlocale/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -1,6 +1,5 @@ # $FreeBSD$ -NO_OBJ= INCS= _ctype.h _inttypes.h _langinfo.h _locale.h _monetary.h _stdio.h\ _stdlib.h _string.h _strings.h _time.h _uchar.h _wchar.h INCSDIR=${INCLUDEDIR}/xlocale Modified: head/libexec/save-entropy/Makefile ============================================================================== --- head/libexec/save-entropy/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/libexec/save-entropy/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -1,6 +1,5 @@ # $FreeBSD$ SCRIPTS= save-entropy.sh -NO_OBJ= .include Modified: head/share/dict/Makefile ============================================================================== --- head/share/dict/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/share/dict/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -1,8 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ -NO_OBJ= - # XXX MISSING: connectives words FILES= README propernames web2 web2a freebsd FILESDIR= ${BINDIR}/dict Modified: head/share/dtrace/toolkit/Makefile ============================================================================== --- head/share/dtrace/toolkit/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/share/dtrace/toolkit/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -12,6 +12,4 @@ SCRIPTS= ${DTRACETOOLKIT}/execsnoop \ SCRIPTSDIR= ${SHAREDIR}/dtrace/toolkit -NO_OBJ= - .include Modified: head/share/examples/pf/Makefile ============================================================================== --- head/share/examples/pf/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/share/examples/pf/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILES= faq-example1 faq-example2 faq-example3 \ ackpri queue1 queue2 queue3 queue4 \ pf.conf \ Modified: head/share/misc/Makefile ============================================================================== --- head/share/misc/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/share/misc/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -11,7 +11,6 @@ FILES= ascii birthtoken bsd-family-tree scsi_modes \ organization.dot -NO_OBJ= FILESDIR= ${BINDIR}/misc .if ${MK_USB} != "no" Modified: head/share/sendmail/Makefile ============================================================================== --- head/share/sendmail/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/share/sendmail/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -9,8 +9,6 @@ CFFILES!= (cd ${SENDMAIL_DIR}; find -L $ DDIR= ${DESTDIR}/usr/share/sendmail -NO_OBJ= - # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies'') SHARED?= copies Modified: head/share/skel/Makefile ============================================================================== --- head/share/skel/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/share/skel/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -9,6 +9,5 @@ FILES1DIR= /usr/share/skel FILES2DIR= /usr/share/skel FILES1MODE= 0644 FILES2MODE= 0600 -NO_OBJ= .include Modified: head/share/snmp/mibs/Makefile ============================================================================== --- head/share/snmp/mibs/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/share/snmp/mibs/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -1,7 +1,6 @@ # $FreeBSD$ FILES= FREEBSD-MIB.txt -NO_OBJ= FILESDIR= ${SHAREDIR}/snmp/mibs .include Modified: head/share/syscons/fonts/Makefile ============================================================================== --- head/share/syscons/fonts/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/share/syscons/fonts/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -32,6 +32,4 @@ FILES= armscii8-8x8.fnt armscii8-8x14.fn FILESDIR= ${SHAREDIR}/syscons/fonts -NO_OBJ= - .include Modified: head/share/syscons/keymaps/Makefile ============================================================================== --- head/share/syscons/keymaps/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/share/syscons/keymaps/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -52,6 +52,4 @@ FILES= INDEX.keymaps \ FILESDIR= ${SHAREDIR}/syscons/keymaps -NO_OBJ= - .include Modified: head/usr.bin/alias/Makefile ============================================================================== --- head/usr.bin/alias/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/usr.bin/alias/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -2,7 +2,6 @@ SCRIPTS=generic.sh SCRIPTSNAME=alias -NO_OBJ= LINKS= ${BINDIR}/alias ${BINDIR}/bg \ ${BINDIR}/alias ${BINDIR}/cd \ Modified: head/usr.sbin/pc-sysinstall/backend-partmanager/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-partmanager/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/usr.sbin/pc-sysinstall/backend-partmanager/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -3,6 +3,5 @@ FILES= create-part.sh delete-part.sh FILESMODE= ${BINMODE} FILESDIR=${SHAREDIR}/pc-sysinstall/backend-partmanager -NO_OBJ= .include Modified: head/usr.sbin/pc-sysinstall/backend-query/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/usr.sbin/pc-sysinstall/backend-query/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -8,6 +8,5 @@ FILES= detect-laptop.sh detect-nics.sh d xkeyboard-models.sh xkeyboard-variants.sh FILESMODE= ${BINMODE} FILESDIR=${SHAREDIR}/pc-sysinstall/backend-query -NO_OBJ= .include Modified: head/usr.sbin/pc-sysinstall/backend/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/usr.sbin/pc-sysinstall/backend/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -10,6 +10,5 @@ FILES= functions-bsdlabel.sh functions-c functions.sh parseconfig.sh startautoinstall.sh installimage.sh FILESMODE= ${BINMODE} FILESDIR=${SHAREDIR}/pc-sysinstall/backend -NO_OBJ= .include Modified: head/usr.sbin/pc-sysinstall/conf/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/conf/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/usr.sbin/pc-sysinstall/conf/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESGROUPS= CONF LICENSE CONF= exclude-from-upgrade pc-sysinstall.conf avail-langs CONFDIR= ${SHAREDIR}/pc-sysinstall/conf Modified: head/usr.sbin/pc-sysinstall/examples/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/examples/Makefile Thu Jun 11 04:00:22 2015 (r284254) +++ head/usr.sbin/pc-sysinstall/examples/Makefile Thu Jun 11 04:22:17 2015 (r284255) @@ -6,6 +6,5 @@ FILES= README pc-autoinstall.conf pcinst pcinstall.cfg.zfs FILESDIR=${SHAREDIR}/examples/pc-sysinstall -NO_OBJ= .include From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 04:37:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 844ACD10; Thu, 11 Jun 2015 04:37:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBD7910E5; Thu, 11 Jun 2015 04:37:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t5B4bhGu074134 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 11 Jun 2015 07:37:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t5B4bhGu074134 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t5B4bhte074133; Thu, 11 Jun 2015 07:37:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 11 Jun 2015 07:37:43 +0300 From: Konstantin Belousov To: Dimitry Andric Cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284167 - head/sys/i386/i386 Message-ID: <20150611043743.GZ2499@kib.kiev.ua> References: <201506082012.t58KCjZX023061@svn.freebsd.org> <20150609162836.C935@besplex.bde.org> <14AE3E08-5D5D-437F-A2D3-C89A8CF4B0C1@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14AE3E08-5D5D-437F-A2D3-C89A8CF4B0C1@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 04:37:49 -0000 On Tue, Jun 09, 2015 at 08:05:55PM +0200, Dimitry Andric wrote: > On 09 Jun 2015, at 08:44, Bruce Evans wrote: > > > > On Mon, 8 Jun 2015, Dimitry Andric wrote: > > > >> Log: > >> Merge r283870 from amd64: > >> > >> Remove unneeded NULL checks in trap_fatal(). > >> > >> Since td_name is an array member of struct thread, it can never be NULL, > >> so the check can be removed. In addition, curproc can never be NULL, > >> so remove the if statement, and splice the two printfs() together. > >> > >> While here, remove the u_long cast, and use the correct printf format > >> specifier for curproc->p_pid. > >> > >> Requested by: jhb > > > > Er. I gave a longer review which implicity requested not doing all of > > this. The format was correct (it matched the cast), and the cast was > > less wrong than not casting. > > Please read https://reviews.freebsd.org/D2695, where Kostik argued > "pid_t is int32_t on all arches", and I agreed with that. The previous > obfuscation is unnecessary now. > > > > Both amd64/trap.c i386/trap.c still print pids portably (by casting > > to long) in one place. They each had 2 unportable printings of pids; > > now they each have 3 unportable printings of pids. Please note that arguing about portability of the {i386,amd64}/trap.c is not very useful due to the nature of the code. > > I wasn't updating the other parts of the code, so I stayed out of there > for now. Feel free to put a review in Phabricator to make everything > consistent. > > -Dimitry > From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 04:41:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 000C5F84; Thu, 11 Jun 2015 04:41:54 +0000 (UTC) (envelope-from kib@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E296F1456; Thu, 11 Jun 2015 04:41:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5B4fsFP003760; Thu, 11 Jun 2015 04:41:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5B4fsK5003759; Thu, 11 Jun 2015 04:41:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506110441.t5B4fsK5003759@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 11 Jun 2015 04:41:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284256 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 04:41:55 -0000 Author: kib Date: Thu Jun 11 04:41:54 2015 New Revision: 284256 URL: https://svnweb.freebsd.org/changeset/base/284256 Log: Tweaks for r284178: Do not include machine/atomic.h explicitely, the header is already included by sys/systm.h. Force inlining of tc_getgen() and tc_setgen(). The functions are used more than once, which causes compilers with non-aggressive inlining policies to generate calls. Suggested by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Thu Jun 11 04:22:17 2015 (r284255) +++ head/sys/kern/kern_tc.c Thu Jun 11 04:41:54 2015 (r284256) @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include /* * A large step happens on boot. This constant detects such steps. @@ -190,7 +189,7 @@ tc_delta(struct timehands *th) tc->tc_counter_mask); } -static u_int +static inline u_int tc_getgen(struct timehands *th) { @@ -205,7 +204,7 @@ tc_getgen(struct timehands *th) #endif } -static void +static inline void tc_setgen(struct timehands *th, u_int newgen) { From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 06:12:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C438C76; Thu, 11 Jun 2015 06:12:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id C089C1CB4; Thu, 11 Jun 2015 06:12:44 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Message-ID: <557926DC.9090008@FreeBSD.org> Date: Thu, 11 Jun 2015 02:12:44 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284237 - in head: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic References: <201506101922.t5AJMf27015406@svn.freebsd.org> In-Reply-To: <201506101922.t5AJMf27015406@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 06:12:45 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 06/10/2015 15:22, Xin LI wrote: > Author: delphij Date: Wed Jun 10 19:22:41 2015 New Revision: > 284237 URL: https://svnweb.freebsd.org/changeset/base/284237 > > Log: MFV r284234: > > Update file to 5.23. ... I found a serious regression with this version, i.e., some long options does not work as intended. --extension works like - --mime-type, --mime-type works like --mime-encoding, etc. When the author added -Z/--uncompress-noreport, forgot to update those offsets, it seems. My patch is available from here: https://github.com/file/file/commit/bda61b688a#commitcomment-11626945 In fact, this is very critical for us because LIB_DEPENDS for ports does not work any more because it uses --mime-type to verify its type. https://svnweb.freebsd.org/ports/head/Mk/Scripts/find-lib.sh?revision=383711&view=markup#l20 Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVeSbcAAoJEHyflib82/FGIGsH/2ihkkDpyyLYxQvK4GhyJJBq Jk5t9v/KEQfrmTdpRAjgjiwjEDdvnNZMKH50rsYutUKVC2qWwq+x7qAUVRzTndqt +H7L+BVPCtTuwzgwDycIHXpwZi/Xzj8Cw32kKCrTvua0/7uL6yoqwpYGkWt8iuk1 pFsJIG08JDQYA8gQWkUyrVidXVw+zf8T5oxljuQXxnH/wrDooHtGTUaXQ3MLPChf Z1DuW+DPVcLqKfiMmelkynYrZEZGIOjlo0cxYOLMdjx7JCpJkIwqckBoPEuxWfsN OzJFVB7YsCJ35dlmgTgbYCVEzJ3DW+/ojj2bqf/mV6Xj+X/l3gud1EZriNq99Ss= =BEky -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 06:42:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 778362B8; Thu, 11 Jun 2015 06:42:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pd0-x244.google.com (mail-pd0-x244.google.com [IPv6:2607:f8b0:400e:c02::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 419B910A9; Thu, 11 Jun 2015 06:42:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pdbht2 with SMTP id ht2so13569251pdb.2; Wed, 10 Jun 2015 23:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=fIuog/M3ePKz45VbtYFJ/6A9XKefvgdSBPr8VhBt7Ww=; b=NiMXGVRutY4bPmB5siPLc6Nw455fwZRjra2aG7BvjQsp6umDaMqepAyncjzvNhT0zN 460iDud2OvPDt2SDbFGaA1dobdQuSd6htht5xNaArOBOJleLpsKBVVqmVVgRHSW4jRE6 FbX16W785cpNSXznhYWDv7yWjFSuhMHMi9WGdMAkGVwcb2Jd+ZYpggG9BLdNaikt4b9v mTLaMbPwM59j2JlFX3AYWlLsFF2coAJb0rYZJlBg9085fO+KUcUJ9Rt9EvqWqe6+Hn+W GACf8NcIQTEATssgEe3ayKAUtg5K2nRL8ZAPsbJWAMQIW07Fzasa0GlrxUVJNUf1aOTh ikQA== X-Received: by 10.66.251.67 with SMTP id zi3mr12379469pac.42.1434004941774; Wed, 10 Jun 2015 23:42:21 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:99d4:e155:4cfb:c95a? ([2601:8:ab80:7d6:99d4:e155:4cfb:c95a]) by mx.google.com with ESMTPSA id ld1sm10406891pbc.26.2015.06.10.23.42.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Jun 2015 23:42:20 -0700 (PDT) Subject: Re: svn commit: r284255 - in head: include/arpa include/gssapi include/protocols include/xlocale libexec/save-entropy share/dict share/dtrace/toolkit share/examples/pf share/misc share/sendmail share/s... Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_74FDEDF8-C8B9-4083-B59C-162072FFD842"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <201506110422.t5B4MI7R093478@svn.freebsd.org> Date: Wed, 10 Jun 2015 23:42:19 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201506110422.t5B4MI7R093478@svn.freebsd.org> To: "Simon J. Gerraty" X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 06:42:22 -0000 --Apple-Mail=_74FDEDF8-C8B9-4083-B59C-162072FFD842 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jun 10, 2015, at 21:22, Simon J. Gerraty wrote: > Author: sjg > Date: Thu Jun 11 04:22:17 2015 > New Revision: 284255 > URL: https://svnweb.freebsd.org/changeset/base/284255 >=20 > Log: > Remove NO_OBJ >=20 > For meta mode we will want objdirs. >=20 > Differential Revision: D2748 > Reviewed by: brooks imp Silly question =97 how will items that cannot build/install with = ${.OBJDIR} !=3D ${.CURDIR} build in meta mode? Thanks! --Apple-Mail=_74FDEDF8-C8B9-4083-B59C-162072FFD842 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVeS3LAAoJEMZr5QU6S73ek30H/ijnwP/0u/ct3y6pEEDzQ3x/ cCWRU+pD0Bfyp0lkQ3dlDb+wEWOVvcAjGMuAPA4aWkBgvKw/1RzfFgqjJE2QtiN1 YxPNlHH+KeGudhKI8UD5+LfRrlcYd3iEfUX6VNmCZQrNf+XVQLOCITZJpKNc+VVC /meAicc0dmG9/rUtWDBX4knnPo0ThPa2eUJcpUjXxibbcwO8SxIs/FA625vCbah5 D8NbP+DhckqxpldqjNmzF70G185rMdGrqf6Lj29WjKIsTPEkRWxjPo07fMgfDLTG ZZIUlI+NptugAAPhdJ3muLUcfJsNpC/cp9EUNFcVIxeTiJ2jOFn9s6OgJePdKxY= =VkoV -----END PGP SIGNATURE----- --Apple-Mail=_74FDEDF8-C8B9-4083-B59C-162072FFD842-- From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 11:38:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C2A2872 for ; Thu, 11 Jun 2015 11:38:44 +0000 (UTC) (envelope-from flora@digitalsolutionleader.com) Received: from smtp102.biz.mail.sg3.yahoo.com (smtp102.biz.mail.sg3.yahoo.com [106.10.167.245]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85EEF1D63 for ; Thu, 11 Jun 2015 11:38:42 +0000 (UTC) (envelope-from flora@digitalsolutionleader.com) Received: (qmail 41274 invoked from network); 11 Jun 2015 11:38:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1434022714; bh=EJIzkDV3vPwtYJxp1hkJk7VwXdhgpomPsvS0CKO3ZYI=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=SLtYSLtMmD1hG55sSvODCyaUAL7CZnNQLnpbCrp2VITG0gzCJB4xHmuzIYCc6bRe96+u6v/a96JSxtjd9wudDSTN6GqVJA1ck6fsPk6iq4mMkWO/9Aj53m9nfKe71F5nj7FN7HC7PR5KAYnABKUjB/UkLJDjlryFi/QjwVG5eGY= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: NEHYDvUVM1lYYqO6O.JBNBcEeB3q2QavTdSfKGq31NcZdwi uhMU51ts9aHnnD5mAI8ZwrhdDY6w8KtvFAZSRDTUP5J1_6W6MAqzJzu36pie FASc4ZL2sDuHaBF3lLj5haHHNM2x.zPwNwqYLcWpUlzHH4htfNbJkFKAvI7C WaJ2c1i3_qSDgKSN6JTa8_4GB1W6RZGdVfKMD0MDa_Expyl6LrWdC.q2NE8P MKz26f0nvWDSICfxZffhD8DHsmeRtNgY1WOo3pLDXOIVbGBc3LFi3iTFilgY omP7QhTaciZlEFbUTKa.TwJ.3clH1zfd6aDpiM_B6hikkfS3ouYBJlojmOQ2 GC97H2Ryi4_qDIPXA8FuWtoLauTQTJzD4zJfshwlY_ydVXFOHvHUUdX7OEvb 5U66qlFlcMFJ9N2QmoDzdZCmywQ3f9DzYhPAGkon3LRvZf.lefFmpZof9e1f _oHlqAEOFKuMTQK6VPOqygy0N.F0cAWpqpHEDABPwLDcyUyo8v8DQjR2aGXR FUcx4pqRwD4gxbHUVOQ_xD00CuCIra0kuOg-- X-Yahoo-SMTP: .NXGoHeswBCmEL9N3U589YaJLJNUb3mPTQcqSegZLNG5lknXNg8xTfcuBzd2 From: "Flora Mckinney" To: Subject: Google Ranking Date: Thu, 11 Jun 2015 17:07:43 +0530 Message-ID: <307501d0a43b$22d2f220$6878d660$@com> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdCkKFjcG4chtYBjQUqhVAXsmjI+Gw== Content-Language: en-us Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 11:38:44 -0000 Hi, Hope this email finds you well. I am Flora Mckinney, an Online Marketing Consultant. I went through your website Freebsd.Org and checked it for a few keywords on Google. Unfortunately, it was not ranking on any of those. It was not ranking on any of the search engines as per the keywords pertaining to your domain. As per the trends in your industry - over 80% of people search for your products/services online and buy the same. These rankings also influence other channels of sales as well. It is simple maths-the more people who come to your website, the more potential customers you attract. Don't wait another moment to drive more traffic, increase sales, and improve your visual appearance. - If you are willing to have more business online and more Return on Investment (ROI) we are just an Email /Phone away. - We can increase the number of visitors to your website, and get you on the top searches of all the search engines. - Affordable way to market website and get online business. I shall look forward to hear from you soon. I'd be happy to send you our package, pricing and past work details, if you'd like to assess our work. Feel free to discuss any other any queries. Best Regards, Flora Mckinney Online Marketing Consultant Disclaimer: Thank you for reading this. In the event that you do not wish me to contact you again, simply send an email with unsubscribe as a subject line. From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 12:47:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD334A23; Thu, 11 Jun 2015 12:47:15 +0000 (UTC) (envelope-from br@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EDFF1FDA; Thu, 11 Jun 2015 12:47:15 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BClFC0043085; Thu, 11 Jun 2015 12:47:15 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BClEe6043080; Thu, 11 Jun 2015 12:47:14 GMT (envelope-from br@FreeBSD.org) Message-Id: <201506111247.t5BClEe6043080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 11 Jun 2015 12:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284257 - in head/sys: arm64/arm64 arm64/include conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 12:47:15 -0000 Author: br Date: Thu Jun 11 12:47:13 2015 New Revision: 284257 URL: https://svnweb.freebsd.org/changeset/base/284257 Log: Split out db_unwind_frame() so it can be used by DTrace. Sponsored by: ARM Ltd. Differential Revision: https://reviews.freebsd.org/D2741 Added: head/sys/arm64/arm64/unwind.c (contents, props changed) Modified: head/sys/arm64/arm64/db_trace.c head/sys/arm64/include/stack.h head/sys/conf/files.arm64 Modified: head/sys/arm64/arm64/db_trace.c ============================================================================== --- head/sys/arm64/arm64/db_trace.c Thu Jun 11 04:41:54 2015 (r284256) +++ head/sys/arm64/arm64/db_trace.c Thu Jun 11 12:47:13 2015 (r284257) @@ -38,12 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include - -struct unwind_state { - uint64_t fp; - uint64_t sp; - uint64_t pc; -}; +#include void db_md_list_watchpoints() @@ -67,22 +62,6 @@ db_md_set_watchpoint(db_expr_t addr, db_ HW_BREAKPOINT_RW)); } -static int -db_unwind_frame(struct unwind_state *frame) -{ - uint64_t fp = frame->fp; - - if (fp == 0) - return -1; - - frame->sp = fp + 0x10; - /* FP to previous frame (X29) */ - frame->fp = *(uint64_t *)(fp); - /* LR (X30) */ - frame->pc = *(uint64_t *)(fp + 8) - 4; - return (0); -} - static void db_stack_trace_cmd(struct unwind_state *frame) { @@ -95,7 +74,7 @@ db_stack_trace_cmd(struct unwind_state * uint64_t pc = frame->pc; int ret; - ret = db_unwind_frame(frame); + ret = unwind_frame(frame); if (ret < 0) break; Added: head/sys/arm64/arm64/unwind.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/unwind.c Thu Jun 11 12:47:13 2015 (r284257) @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * 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 AUTHOR 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 + +int +unwind_frame(struct unwind_state *frame) +{ + uint64_t fp; + + fp = frame->fp; + if (fp == 0) + return (-1); + + frame->sp = fp + 0x10; + /* FP to previous frame (X29) */ + frame->fp = *(uint64_t *)(fp); + /* LR (X30) */ + frame->pc = *(uint64_t *)(fp + 8) - 4; + + return (0); +} Modified: head/sys/arm64/include/stack.h ============================================================================== --- head/sys/arm64/include/stack.h Thu Jun 11 04:41:54 2015 (r284256) +++ head/sys/arm64/include/stack.h Thu Jun 11 12:47:13 2015 (r284257) @@ -32,4 +32,12 @@ #define INKERNEL(va) \ ((va) >= VM_MIN_KERNEL_ADDRESS && (va) <= VM_MAX_KERNEL_ADDRESS) +struct unwind_state { + uint64_t fp; + uint64_t sp; + uint64_t pc; +}; + +int unwind_frame(struct unwind_state *); + #endif /* !_MACHINE_STACK_H_ */ Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Thu Jun 11 04:41:54 2015 (r284256) +++ head/sys/conf/files.arm64 Thu Jun 11 12:47:13 2015 (r284257) @@ -2,6 +2,7 @@ arm/arm/devmap.c standard arm/arm/generic_timer.c standard arm/arm/pmu.c standard +arm64/arm64/unwind.c optional ddb | kdtrace_hooks arm64/arm64/autoconf.c standard arm64/arm64/bcopy.c standard arm64/arm64/bus_machdep.c standard From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 13:00:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 819B6EAB; Thu, 11 Jun 2015 13:00:16 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bn0103.outbound.protection.outlook.com [157.56.110.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA3FA1299; Thu, 11 Jun 2015 13:00:14 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from SN1PR05CA0003.namprd05.prod.outlook.com (25.163.68.141) by CO2PR05MB714.namprd05.prod.outlook.com (10.141.228.148) with Microsoft SMTP Server (TLS) id 15.1.184.17; Thu, 11 Jun 2015 12:26:34 +0000 Received: from BN1AFFO11FD028.protection.gbl (2a01:111:f400:7c10::109) by SN1PR05CA0003.outlook.office365.com (2a01:111:e400:5197::13) with Microsoft SMTP Server (TLS) id 15.1.190.14 via Frontend Transport; Thu, 11 Jun 2015 12:26:33 +0000 Authentication-Results: spf=softfail (sender IP is 66.129.239.16) smtp.mailfrom=juniper.net; freebsd.org; dkim=none (message not signed) header.d=none; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.16 as permitted sender) Received: from P-EMF02-SAC.jnpr.net (66.129.239.16) by BN1AFFO11FD028.mail.protection.outlook.com (10.58.52.88) with Microsoft SMTP Server (TLS) id 15.1.190.9 via Frontend Transport; Thu, 11 Jun 2015 12:26:33 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF02-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Thu, 11 Jun 2015 05:26:32 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.21.16.28]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id t5BCQVD36049; Thu, 11 Jun 2015 05:26:31 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id EE917580A3; Thu, 11 Jun 2015 05:26:30 -0700 (PDT) To: Garrett Cooper CC: src-committers , , Subject: Re: svn commit: r284255 - in head: include/arpa include/gssapi include/protocols include/xlocale libexec/save-entropy share/dict share/dtrace/toolkit share/examples/pf share/misc share/sendmail share/s... In-Reply-To: References: <201506110422.t5B4MI7R093478@svn.freebsd.org> Comments: In-reply-to: Garrett Cooper message dated "Wed, 10 Jun 2015 23:42:19 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.0.3; nmh 1.3; GNU Emacs 22.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 11 Jun 2015 05:26:30 -0700 Message-ID: <28678.1434025590@chaos> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD028; 1:GK9aQUJHBnhEp8I1XOFFx2zMPOVlGhYTDPwYtNeOIHxcGTXhioKt9oO9P4xp92aJ70yAp4k4rDnbGFcXHPnql3GmHOTFk6r4sgTXZraDfxeB//stodnLt5KyoZ37/i0hV5MFOdS8ZjnQKM89nAhuVmjgkYmX16F8XAjs1CdBuNScfrbFckbkkjkalkmCXL3qv9YrPXdv/tXWle4K6TViGHCkjgX/30BhdKIPND7zpQGOcFbVjFU/OJgBj2FQR4NUkrykd9OC7Xo3oEbZ8lhTWEoPgkZOdNt3nUXp6+ghQt10IhPiElb+zsmFUfekFAyqbVv4vSqnD72q5Fcm5oRlnQ== X-Forefront-Antispam-Report: CIP:66.129.239.16; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(24454002)(199003)(189002)(50466002)(105596002)(76176999)(92566002)(19580395003)(6806004)(86362001)(46102003)(76506005)(87936001)(106466001)(57986006)(117636001)(47776003)(77096005)(50226001)(1411001)(2950100001)(33716001)(50986999)(558084003)(5001960100002)(189998001)(110136002)(19580405001)(77156002)(62966003)(23676002)(62816006)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:CO2PR05MB714; H:P-EMF02-SAC.jnpr.net; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR05MB714; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(520003)(3002001); SRVR:CO2PR05MB714; BCL:0; PCL:0; RULEID:; SRVR:CO2PR05MB714; X-Forefront-PRVS: 0604AFA86B X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2015 12:26:33.4914 (UTC) X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.16]; Helo=[P-EMF02-SAC.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR05MB714 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 13:00:16 -0000 Garrett Cooper wrote: > Silly question =E2=80=94 how will items that cannot build/install with ${= .OBJDIR} !=3D ${.CURDIR} build in meta mode? As they always did. If .OBJDIR =3D=3D .CURDIR, then you simply won't get meta files, and hence no auto dependency collection. From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 13:00:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D01E2EC6; Thu, 11 Jun 2015 13:00:20 +0000 (UTC) (envelope-from br@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE81012DD; Thu, 11 Jun 2015 13:00:20 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BD0Kq4048585; Thu, 11 Jun 2015 13:00:20 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BD0KmF048584; Thu, 11 Jun 2015 13:00:20 GMT (envelope-from br@FreeBSD.org) Message-Id: <201506111300.t5BD0KmF048584@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 11 Jun 2015 13:00:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284258 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 13:00:20 -0000 Author: br Date: Thu Jun 11 13:00:20 2015 New Revision: 284258 URL: https://svnweb.freebsd.org/changeset/base/284258 Log: Consider sorting. Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Thu Jun 11 12:47:13 2015 (r284257) +++ head/sys/conf/files.arm64 Thu Jun 11 13:00:20 2015 (r284258) @@ -2,7 +2,6 @@ arm/arm/devmap.c standard arm/arm/generic_timer.c standard arm/arm/pmu.c standard -arm64/arm64/unwind.c optional ddb | kdtrace_hooks arm64/arm64/autoconf.c standard arm64/arm64/bcopy.c standard arm64/arm64/bus_machdep.c standard @@ -39,6 +38,7 @@ arm64/arm64/swtch.S standard arm64/arm64/sys_machdep.c standard arm64/arm64/trap.c standard arm64/arm64/uio_machdep.c standard +arm64/arm64/unwind.c optional ddb | kdtrace_hooks arm64/arm64/vfp.c standard arm64/arm64/vm_machdep.c standard dev/fdt/fdt_arm64.c optional fdt From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 13:05:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05B7924E; Thu, 11 Jun 2015 13:05:39 +0000 (UTC) (envelope-from jmg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7B901652; Thu, 11 Jun 2015 13:05:38 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BD5cgv052941; Thu, 11 Jun 2015 13:05:38 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BD5cqY052936; Thu, 11 Jun 2015 13:05:38 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201506111305.t5BD5cqY052936@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Thu, 11 Jun 2015 13:05:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284259 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 13:05:39 -0000 Author: jmg Date: Thu Jun 11 13:05:37 2015 New Revision: 284259 URL: https://svnweb.freebsd.org/changeset/base/284259 Log: drop key_sa_stir_iv as it isn't used... Reviewed by: eri, ae Modified: head/sys/netipsec/key.c head/sys/netipsec/key.h Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Thu Jun 11 13:00:20 2015 (r284258) +++ head/sys/netipsec/key.c Thu Jun 11 13:05:37 2015 (r284259) @@ -7714,14 +7714,6 @@ key_sa_chgstate(struct secasvar *sav, u_ } } -void -key_sa_stir_iv(struct secasvar *sav) -{ - - IPSEC_ASSERT(sav->iv != NULL, ("null IV")); - key_randomfill(sav->iv, sav->ivlen); -} - /* * Take one of the kernel's security keys and convert it into a PF_KEY * structure within an mbuf, suitable for sending up to a waiting Modified: head/sys/netipsec/key.h ============================================================================== --- head/sys/netipsec/key.h Thu Jun 11 13:00:20 2015 (r284258) +++ head/sys/netipsec/key.h Thu Jun 11 13:05:37 2015 (r284259) @@ -105,7 +105,6 @@ extern void key_init(void); extern void key_destroy(void); #endif extern void key_sa_recordxfer(struct secasvar *, struct mbuf *); -extern void key_sa_stir_iv(struct secasvar *); #ifdef IPSEC_NAT_T u_int16_t key_portfromsaddr(struct sockaddr *); #define KEY_PORTFROMSADDR(saddr) \ From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 13:21:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93DA9CE3 for ; Thu, 11 Jun 2015 13:21:31 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 017551A5C for ; Thu, 11 Jun 2015 13:21:30 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by wigg3 with SMTP id g3so75352580wig.1 for ; Thu, 11 Jun 2015 06:21:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to:cc:content-type; bh=8QliVnmURByCSAMLoyf3qSrfaDblIgUcL03+gpTRxX0=; b=aDTQORTxl7rVMGuMAt/g1WRclcJVTQawAIIaSXIEIOQPOhtGTjqFjlL2THSEfu4SYk 30CjTG3AmDdgIVYiHEG4F7fX8PL1V+PyOmVMP8Fc5JlhZ1LKH1SaFa7AJcSpKyPU0HNb FPsudFsxnb8KBwD+LflAMIG+Lc4PgWPSgaFUczcs7ahtg477oI9giUHax6k1IlpSTtmM aiHKefZ/i1t3bEvzdfvrhn37Z0nN22IFei2z0fRBTmal4v1e3L0gARnv/hGHVxEemmgR kQVDwLEujZEgB/EAjkTZ39/U7j76Lg6C13nTfYeyuWolayTrbWR17PI8J0mDOZDYJ/l4 KL2A== X-Gm-Message-State: ALoCoQl/AQZ5zV+tgq7l33OTqvqku7ziePb/jZjv4pj2CRvSCZevDKc4jDgggdkzmYyXl5iEVTyf MIME-Version: 1.0 X-Received: by 10.180.72.176 with SMTP id e16mr19937694wiv.12.1434028888709; Thu, 11 Jun 2015 06:21:28 -0700 (PDT) Sender: sobomax@sippysoft.com Received: by 10.27.205.66 with HTTP; Thu, 11 Jun 2015 06:21:28 -0700 (PDT) Date: Thu, 11 Jun 2015 06:21:28 -0700 X-Google-Sender-Auth: EZ6-m-IRLAw-zMEdXXAGGXiN3sk Message-ID: Subject: Re: svn: head/sys/boot: common uboot/common uboot/lib From: Maxim Sobolev To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 13:21:31 -0000 Hi Ian, there is some issues with that commit that I've run into when trying to get FreeBSD booting on my Xilinx Zinq 7010-based board. Basically, the instructions we have on Wiki suggests that the ubldr loading address to be 0x100000. That makes ubldr panic with "not enough DRAM" error. I've added some debug code into the for loop, you can find the output below. As you can see the code is not handling the case when ubldr is below 2MB and as such sblock == eubldr. On top of that, this_block and this_size may be left uninitialized causing loading at some random address and panicing then, instead of DRAM is too small panic. kernel_addr=0x100000 ubldr_addr=0x100000 dtb_addr=0x1000 dtb_name=system.dtb uenvcmd=echo Booting FreeBSD from SD...; mmcinfo && fatload mmc 0 ${ubldr_addr} ubldr && fatload mmc 0 ${dtb_addr} ${dtb_name} && fdt addr ${dtb_addr} && bootelf ${ubldr_addr} ## Starting application at 0x00080094 ... Consoles: U-Boot console Compatible U-Boot API signature found @1f35d338 FreeBSD/armv6 U-Boot loader, Revision 1.2 (root@van01.sippysoft.com, Wed Jun 10 19:19:05 PDT 2015) DRAM: 512MB Number of U-Boot devices: 1 U-Boot env: loaderdev not set, will probe all devices. Found U-Boot device: disk Probing all disk devices... Checking unit=0 slice= partition=... good. / subldr=0, eubldr=2097152 si->mr[0]: .flags=2, .start=0, .size=536870912 sblock=2097152, eblock=536870912 this_block=16, this_size=723100 si->mr[1]: .flags=0, .start=0, .size=0 si->mr[2]: .flags=0, .start=0, .size=0 si->mr[3]: .flags=0, .start=0, .size=0 si->mr[4]: .flags=0, .start=0, .size=0 si->mr[5]: .flags=0, .start=0, .size=0 si->mr[6]: .flags=0, .start=0, .size=0 si->mr[7]: .flags=0, .start=0, .size=0 si->mr[8]: .flags=0, .start=0, .size=0 si->mr[9]: .flags=0, .start=0, .size=0 si->mr[10]: .flags=0, .start=0, .size=0 si->mr[11]: .flags=0, .start=0, .size=0 si->mr[12]: .flags=0, .start=0, .size=0 si->mr[13]: .flags=0, .start=0, .size=0 si->mr[14]: .flags=0, .start=0, .size=0 si->mr[15]: .flags=0, .start=0, .size=0 /boot/kernel/kernel data=0x589e5c+0x3e1a4 data abort pc : [<00080108>] lr : [] sp : 1f35c488 ip : 1a000033 fp : 1f35c490 r10: 000cbfd0 r9 : 00000000 r8 : 00000000 r7 : 00030360 r6 : 00000010 r5 : 000af048 r4 : 0000002d r3 : 00000000 r2 : 1f35c48f r1 : 00000000 r0 : 00000002 Flags: nzCv IRQs off FIQs off Mode SVC_32 Resetting CPU ... On Sun, May 17, 2015 at 12:59 PM, Ian Lepore wrote: > Author: ian > Date: Sun May 17 19:59:05 2015 > New Revision: 283035 > URL: https://svnweb.freebsd.org/changeset/base/283035 > > Log: > An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of > that. > > Previously, ubldr would use the virtual addresses in the elf headers by > masking off the high bits and assuming the result was a physical address > where the kernel should be loaded. That would sometimes discard > significant bits of the physical address, but the effects of that were > undone by archsw copy code that would find a large block of memory and > apply an offset to the source/dest copy addresses. The result was that > things were loaded at a different physical address than requested by the > higher code layers, but that worked because other adjustments were > applied > later (such as when jumping to the entry point). Very confusing, and > somewhat fragile. > > Now the archsw copy routines are just simple copies, and instead > archsw.arch_loadaddr is implemented to choose a load address. The new > routine uses some of the code from the old offset-translation routine to > find the largest block of ram, but it excludes ubldr itself from that > range, and also excludes If ubldr splits the largest block of ram in > two, the kernel is loaded into the bottom of whichever resulting block is > larger. > > As part of eliminating ubldr itself from the ram ranges, export the heap > start/end addresses in a pair of new global variables. > > This change means that the virtual addresses in the arm kernel elf > headers > now have no meaning at all, except for the entry point address. There is > an implicit assumption that the entry point is in the first text page, > and > that the address in the the header can be turned into an offset by > masking > it with PAGE_MASK. In the future we can link all arm kernels at a > virtual > address of 0xC0000000 with no need to use any low-order part of the > address to influence where in ram the kernel gets loaded. > > Modified: > head/sys/boot/common/load_elf.c > head/sys/boot/uboot/common/main.c > head/sys/boot/uboot/lib/copy.c > head/sys/boot/uboot/lib/elf_freebsd.c > head/sys/boot/uboot/lib/libuboot.h > > Modified: head/sys/boot/common/load_elf.c > > ============================================================================== > --- head/sys/boot/common/load_elf.c Sun May 17 18:35:58 2015 > (r283034) > +++ head/sys/boot/common/load_elf.c Sun May 17 19:59:05 2015 > (r283035) > @@ -191,10 +191,17 @@ __elfN(loadfile_raw)(char *filename, u_i > goto oerr; > } > /* > - * Calculate destination address based on kernel entrypoint > + * Calculate destination address based on kernel entrypoint. > + * > + * For ARM, the destination address is independent of any values > in the > + * elf header (an ARM kernel can be loaded at any 2MB boundary), > so we > + * leave dest set to the value calculated by > archsw.arch_loadaddr() and > + * passed in to this function. > */ > +#ifndef __arm__ > if (ehdr->e_type == ET_EXEC) > dest = (ehdr->e_entry & ~PAGE_MASK); > +#endif > if ((ehdr->e_entry & ~PAGE_MASK) == 0) { > printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: not a > kernel (maybe static binary?)\n"); > err = EPERM; > @@ -348,22 +355,18 @@ __elfN(loadimage)(struct preloaded_file > off = 0; > #elif defined(__arm__) > /* > - * The elf headers in some kernels specify virtual addresses in all > - * header fields. More recently, the e_entry and p_paddr fields > are the > - * proper physical addresses. Even when the p_paddr fields are > correct, > - * the MI code below uses the p_vaddr fields with an offset added > for > - * loading (doing so is arguably wrong). To make loading work, we > need > - * an offset that represents the difference between physical and > virtual > - * addressing. ARM kernels are always linked at 0xCnnnnnnn. > Depending > - * on the headers, the offset value passed in may be physical or > virtual > - * (because it typically comes from e_entry), but we always replace > - * whatever is passed in with the va<->pa offset. On the other > hand, we > - * always remove the high-order part of the entry address whether > it's > - * physical or virtual, because it will be adjusted later for the > actual > - * physical entry point based on where the image gets loaded. > + * The elf headers in arm kernels specify virtual addresses in all > + * header fields, even the ones that should be physical addresses. > + * We assume the entry point is in the first page, and masking the > page > + * offset will leave us with the virtual address the kernel was > linked > + * at. We subtract that from the load offset, making 'off' into > the > + * value which, when added to a virtual address in an elf header, > + * translates it to a physical address. We do the va->pa > conversion on > + * the entry point address in the header now, so that later we can > + * launch the kernel by just jumping to that address. > */ > - off = -0xc0000000; > - ehdr->e_entry &= ~0xf0000000; > + off -= ehdr->e_entry & ~PAGE_MASK; > + ehdr->e_entry += off; > #ifdef ELF_VERBOSE > printf("ehdr->e_entry 0x%08x, va<->pa off %llx\n", ehdr->e_entry, > off); > #endif > > Modified: head/sys/boot/uboot/common/main.c > > ============================================================================== > --- head/sys/boot/uboot/common/main.c Sun May 17 18:35:58 2015 > (r283034) > +++ head/sys/boot/uboot/common/main.c Sun May 17 19:59:05 2015 > (r283035) > @@ -28,6 +28,7 @@ > > #include > __FBSDID("$FreeBSD$"); > +#include > > #include > > @@ -44,6 +45,9 @@ struct uboot_devdesc currdev; > struct arch_switch archsw; /* MI/MD interface boundary */ > int devs_no; > > +uintptr_t uboot_heap_start; > +uintptr_t uboot_heap_end; > + > struct device_type { > const char *name; > int type; > @@ -414,7 +418,9 @@ main(void) > * Initialise the heap as early as possible. Once this is done, > * alloc() is usable. The stack is buried inside us, so this is > safe. > */ > - setheap((void *)end, (void *)(end + 512 * 1024)); > + uboot_heap_start = round_page((uintptr_t)end); > + uboot_heap_end = uboot_heap_start + 512 * 1024; > + setheap((void *)uboot_heap_start, (void *)uboot_heap_end); > > /* > * Set up console. > @@ -487,6 +493,7 @@ main(void) > setenv("LINES", "24", 1); /* optional */ > setenv("prompt", "loader>", 1); > > + archsw.arch_loadaddr = uboot_loadaddr; > archsw.arch_getdev = uboot_getdev; > archsw.arch_copyin = uboot_copyin; > archsw.arch_copyout = uboot_copyout; > > Modified: head/sys/boot/uboot/lib/copy.c > > ============================================================================== > --- head/sys/boot/uboot/lib/copy.c Sun May 17 18:35:58 2015 > (r283034) > +++ head/sys/boot/uboot/lib/copy.c Sun May 17 19:59:05 2015 > (r283035) > @@ -27,66 +27,131 @@ > > #include > __FBSDID("$FreeBSD$"); > +#include > > #include > #include > > #include "api_public.h" > #include "glue.h" > +#include "libuboot.h" > > /* > * MD primitives supporting placement of module data > */ > > -void * > -uboot_vm_translate(vm_offset_t o) { > +#ifdef __arm__ > +#define KERN_ALIGN (2 * 1024 * 1024) > +#else > +#define KERN_ALIGN PAGE_SIZE > +#endif > + > +/* > + * Avoid low memory, u-boot puts things like args and dtb blobs there. > + */ > +#define KERN_MINADDR max(KERN_ALIGN, (1024 * 1024)) > + > +extern void _start(void); /* ubldr entry point address. */ > + > +/* > + * This is called for every object loaded (kernel, module, dtb file, > etc). The > + * expected return value is the next address at or after the given addr > which is > + * appropriate for loading the given object described by type and data. > On each > + * call the addr is the next address following the previously loaded > object. > + * > + * The first call is for loading the kernel, and the addr argument will > be zero, > + * and we search for a big block of ram to load the kernel and modules. > + * > + * On subsequent calls the addr will be non-zero, and we just round it up > so > + * that each object begins on a page boundary. > + */ > +uint64_t > +uboot_loadaddr(u_int type, void *data, uint64_t addr) > +{ > struct sys_info *si; > - static uintptr_t start = 0; > - static size_t size = 0; > + uintptr_t sblock, eblock, subldr, eubldr; > + uintptr_t biggest_block, this_block; > + size_t biggest_size, this_size; > int i; > + char * envstr; > + > + if (addr == 0) { > + /* > + * If the loader_kernaddr environment variable is set, > blindly > + * honor it. It had better be right. We force > interpretation > + * of the value in base-16 regardless of any leading 0x > prefix, > + * because that's the U-Boot convention. > + */ > + envstr = ub_env_get("loader_kernaddr"); > + if (envstr != NULL) > + return (strtoul(envstr, NULL, 16)); > > - if (size == 0) { > + /* > + * Find addr/size of largest DRAM block. Carve our own > address > + * range out of the block, because loading the kernel > over the > + * top ourself is a poor memory-conservation strategy. > Avoid > + * memory at beginning of the first block of physical ram, > + * since u-boot likes to pass args and data there. > Assume that > + * u-boot has moved itself to the very top of ram and > + * optimistically assume that we won't run into it up > there. > + */ > if ((si = ub_get_sys_info()) == NULL) > panic("could not retrieve system info"); > > - /* Find start/size of largest DRAM block. */ > + biggest_block = 0; > + biggest_size = 0; > + subldr = rounddown2((uintptr_t)_start, KERN_ALIGN); > + eubldr = roundup2(uboot_heap_end, KERN_ALIGN); > for (i = 0; i < si->mr_no; i++) { > - if (si->mr[i].flags == MR_ATTR_DRAM > - && si->mr[i].size > size) { > - start = si->mr[i].start; > - size = si->mr[i].size; > + if (si->mr[i].flags != MR_ATTR_DRAM) > + continue; > + sblock = roundup2(si->mr[i].start, KERN_ALIGN); > + eblock = rounddown2(si->mr[i].start + > si->mr[i].size, > + KERN_ALIGN); > + if (biggest_size == 0) > + sblock += KERN_MINADDR; > + if (subldr >= sblock && subldr < eblock) { > + if (subldr - sblock > eblock - eubldr) { > + this_block = sblock; > + this_size = subldr - sblock; > + } else { > + this_block = eubldr; > + this_size = eblock - eubldr; > + } > + } > + if (biggest_size < this_size) { > + biggest_block = this_block; > + biggest_size = this_size; > } > } > - > - if (size <= 0) > - panic("No suitable DRAM?\n"); > - /* > - printf("Loading into memory region 0x%08X-0x%08X (%d > MiB)\n", > - start, start + size, size / 1024 / 1024); > - */ > + if (biggest_size == 0) > + panic("Not enough DRAM to load kernel\n"); > +#if 0 > + printf("Loading kernel into region 0x%08x-0x%08x (%u > MiB)\n", > + biggest_block, biggest_block + biggest_size - 1, > + biggest_size / 1024 / 1024); > +#endif > + return (biggest_block); > } > - if (o > size) > - panic("Address offset 0x%08jX bigger than size 0x%08X\n", > - (intmax_t)o, size); > - return (void *)(start + o); > + return roundup2(addr, PAGE_SIZE); > } > > ssize_t > uboot_copyin(const void *src, vm_offset_t dest, const size_t len) > { > - bcopy(src, uboot_vm_translate(dest), len); > + bcopy(src, (void *)dest, len); > return (len); > } > > ssize_t > uboot_copyout(const vm_offset_t src, void *dest, const size_t len) > { > - bcopy(uboot_vm_translate(src), dest, len); > + bcopy((void *)src, dest, len); > return (len); > } > > ssize_t > uboot_readin(const int fd, vm_offset_t dest, const size_t len) > { > - return (read(fd, uboot_vm_translate(dest), len)); > + return (read(fd, (void *)dest, len)); > } > > Modified: head/sys/boot/uboot/lib/elf_freebsd.c > > ============================================================================== > --- head/sys/boot/uboot/lib/elf_freebsd.c Sun May 17 18:35:58 2015 > (r283034) > +++ head/sys/boot/uboot/lib/elf_freebsd.c Sun May 17 19:59:05 2015 > (r283035) > @@ -80,7 +80,7 @@ __elfN(uboot_exec)(struct preloaded_file > if ((error = md_load(fp->f_args, &mdp)) != 0) > return (error); > > - entry = uboot_vm_translate(e->e_entry); > + entry = (void *)e->e_entry; > printf("Kernel entry at 0x%x...\n", (unsigned)entry); > > dev_cleanup(); > > Modified: head/sys/boot/uboot/lib/libuboot.h > > ============================================================================== > --- head/sys/boot/uboot/lib/libuboot.h Sun May 17 18:35:58 2015 > (r283034) > +++ head/sys/boot/uboot/lib/libuboot.h Sun May 17 19:59:05 2015 > (r283035) > @@ -57,7 +57,10 @@ extern int devs_no; > extern struct netif_driver uboot_net; > extern struct devsw uboot_storage; > > -void *uboot_vm_translate(vm_offset_t); > +extern uintptr_t uboot_heap_start; > +extern uintptr_t uboot_heap_end; > + > +uint64_t uboot_loadaddr(u_int type, void *data, uint64_t addr); > ssize_t uboot_copyin(const void *src, vm_offset_t dest, const > size_t len); > ssize_t uboot_copyout(const vm_offset_t src, void *dest, const > size_t len); > ssize_t uboot_readin(const int fd, vm_offset_t dest, const size_t > len); > From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 13:23:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB31CF91 for ; Thu, 11 Jun 2015 13:23:50 +0000 (UTC) (envelope-from julien@jch.io) Received: from mail-qk0-f176.google.com (mail-qk0-f176.google.com [209.85.220.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79A021B9A for ; Thu, 11 Jun 2015 13:23:50 +0000 (UTC) (envelope-from julien@jch.io) Received: by qkhq76 with SMTP id q76so2934380qkh.2 for ; Thu, 11 Jun 2015 06:23:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type; bh=ueoUyRDaTj8N9BbD0SRdP6MJothQeLL2buAC5r8iXu8=; b=h2IGwsjGvSf8/ZvL61VykdTIIBZNhERdiAsqs6dcyrtvdyRWLeuZ8dhsh9LncOFIx7 kv7R/LTnixVaAuw2gnwqzIoVxJKsvaHrRd64BDSAXy0JIrakFPU60awEdNOdW8jbNXA7 AhImF6QdEMeYG4c0W/5eK+JetbpB6z71oweSZcb2dgqt4c02U81RYGCH1Yz2qkjkGrLW kXFB4vWVXaXeNEipvh8fPid0oXprBDS/69ExiNgzpM+47UdPdX4dg9s9c/+VXAufNImb TxEcEzoGpbqJ9+GGFXLfIpkCmpPlXslilKVPXRu19Ea40DIBIKME0foUu8F0xtrLJ2O3 eFHg== X-Gm-Message-State: ALoCoQmu4zE33sJGgiaCKFsDT3ekPzO3TPiFh1U//O4rvw1ltoT2LkRqBzAY4SZsIce2uCfKxT4B X-Received: by 10.140.94.116 with SMTP id f107mr11082528qge.101.1434028698333; Thu, 11 Jun 2015 06:18:18 -0700 (PDT) Received: from FRI2JCHARBON-M1.local (h87.s239.verisign.com. [216.168.239.87]) by mx.google.com with ESMTPSA id j143sm233224qhc.32.2015.06.11.06.18.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jun 2015 06:18:17 -0700 (PDT) Message-ID: <55798A8F.3080308@freebsd.org> Date: Thu, 11 Jun 2015 09:18:07 -0400 From: Julien Charbon User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284245 - head/sys/netinet References: <201506102043.t5AKh8YB058825@svn.freebsd.org> <5578ACEC.2070209@FreeBSD.org> In-Reply-To: <5578ACEC.2070209@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WHPKl0evAFXGXOSuORv2QMg5aobn7U5eH" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 13:23:50 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WHPKl0evAFXGXOSuORv2QMg5aobn7U5eH Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi John, On 10/06/15 17:32, John Baldwin wrote: > On 6/10/15 4:43 PM, Julien Charbon wrote: >> Author: jch >> Date: Wed Jun 10 20:43:07 2015 >> New Revision: 284245 >> URL: https://svnweb.freebsd.org/changeset/base/284245 >> >> Log: >> Fix a callout race condition introduced in TCP timers callouts with = r281599. >> In TCP timer context, it is not enough to check callout_stop() retur= n value >> to decide if a callout is still running or not, previous callout_res= et() >> return values have also to be checked. >> =20 >> Differential Revision: https://reviews.freebsd.org/D2763 >> Reviewed by: hiren >> Approved by: hiren >> MFC after: 1 day >> Sponsored by: Verisign, Inc. >> >> Modified: >> head/sys/netinet/tcp_timer.c >> head/sys/netinet/tcp_timer.h >> >> Modified: head/sys/netinet/tcp_timer.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/netinet/tcp_timer.c Wed Jun 10 20:11:28 2015 (r284244) >> +++ head/sys/netinet/tcp_timer.c Wed Jun 10 20:43:07 2015 (r284245) >> @@ -347,11 +347,12 @@ tcp_timer_2msl(void *xtp) >> tp =3D tcp_close(tp); =20 >> } else { >> if (tp->t_state !=3D TCPS_TIME_WAIT && >> - ticks - tp->t_rcvtime <=3D TP_MAXIDLE(tp)) >> - callout_reset_on(&tp->t_timers->tt_2msl, >> - TP_KEEPINTVL(tp), tcp_timer_2msl, tp, >> - inp_to_cpuid(inp)); >> - else >> + ticks - tp->t_rcvtime <=3D TP_MAXIDLE(tp)) { >> + if (!callout_reset(&tp->t_timers->tt_2msl, >> + TP_KEEPINTVL(tp), tcp_timer_2msl, tp)) { >> + tp->t_timers->tt_flags &=3D ~TT_2MSL_RST; >> + } >> + } else >> tp =3D tcp_close(tp); >=20 > Did you mean to use callout_reset() instead of callout_reset_on() here = and > elsewhere in this change? Thanks for this question. Exactly, the goal here is to make clear that once a TCP timer callout is scheduled on a core, we always reset this callout on the same core. It was already the case before, but having only one callout_reset_on() call in tcp_timer_activate() when we start callout the first time, and callout_reset() calls everywhere else make it (hopefully) clearer. My 2 cents. -- Julien --WHPKl0evAFXGXOSuORv2QMg5aobn7U5eH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVeYqYAAoJEKVlQ5Je6dhx400H/20EQhfM69CwW5ZmhYHGhCTg cfubDWC9tfm5ipd6nzPw1Fp0ILp0Lk/BGvp0q7dFbY35kt5aRBbiY6sV7W6GJrge Vf0g5zA06M37vHGZ8MK5GXcynWfX4GaXfvIvd99WLg4Hwj77YZLyMFSBfBFYA7be IvDJ956k3fc9w7wve5RUgkXgAXCiedsJQYDxZlUMb9FgUq23qQpTup+Gnc36t4qa X8YWrQuMJhbP59/hCcp3jRfqy8dEpbLSO44SiKQlcSCPZ7OYiODKgK2lobO9YXqA EklPVNiWVEPiIPmoKUYayrNSGoGKvcB8CwFPzZ3XM5IzluG1W5n+O6Xl0jT9UBQ= =L5Rs -----END PGP SIGNATURE----- --WHPKl0evAFXGXOSuORv2QMg5aobn7U5eH-- From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 13:26:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB73C21A; Thu, 11 Jun 2015 13:26:16 +0000 (UTC) (envelope-from kp@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9D1A1BBE; Thu, 11 Jun 2015 13:26:16 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BDQG8f063838; Thu, 11 Jun 2015 13:26:16 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BDQGIh063837; Thu, 11 Jun 2015 13:26:16 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201506111326.t5BDQGIh063837@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 11 Jun 2015 13:26:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284260 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 13:26:17 -0000 Author: kp Date: Thu Jun 11 13:26:16 2015 New Revision: 284260 URL: https://svnweb.freebsd.org/changeset/base/284260 Log: pf: Save the protocol number in the pf_fragment When we try to look up a pf_fragment with pf_find_fragment() we compare (see pf_frag_compare()) addresses (and family), id but also protocol. We failed to save the protocol to the pf_fragment in pf_fragcache(), resulting in failing reassembly. Differential Revision: https://reviews.freebsd.org/D2772 Modified: head/sys/netpfil/pf/pf_norm.c Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Thu Jun 11 13:05:37 2015 (r284259) +++ head/sys/netpfil/pf/pf_norm.c Thu Jun 11 13:26:16 2015 (r284260) @@ -824,6 +824,7 @@ pf_fragcache(struct mbuf **m0, struct ip (*frag)->fr_src.v4 = h->ip_src; (*frag)->fr_dst.v4 = h->ip_dst; (*frag)->fr_af = AF_INET; + (*frag)->fr_proto = h->ip_p; (*frag)->fr_id = h->ip_id; (*frag)->fr_timeout = time_uptime; From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 13:30:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B5454A0; Thu, 11 Jun 2015 13:30:14 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 355621C20; Thu, 11 Jun 2015 13:30:14 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wibut5 with SMTP id ut5so74728023wib.1; Thu, 11 Jun 2015 06:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=gzWI2j5AvbKrvO9a1Hh7p/xJ3rx1HhD5KwQSLxP+xxM=; b=fWrkV+9nZZbprcVnt+gC34KFiBe9xRT2vpjor4rdwVtnamjxC+nTb3zBNkY8JtOoRC IIHyaExzvZ45g0hfJ2I1iwxnoSwIVudoipIiX68+xo3Hd6t281mKKIt3v3S74VxkQam2 FGrr1m7FfFH/pVDIKR87/WykdiaEo/1FWge/JYBnIfK4eMPGDzZem/ConeGkMXtIJeKu zXITeEkykzcGx2OhACWu8v/DAhKWIQvo9IBH2H4v89rFoT5B9tXMP9lov19dYt0qFCIN CtVXZI4PPWMEBdpnuA+oYQGI6qNI86ybLMs2TKNkePlv1P4/7t1MBeinabPt99w9aqIE 0Gug== X-Received: by 10.180.106.195 with SMTP id gw3mr5971337wib.25.1434029412644; Thu, 11 Jun 2015 06:30:12 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id g15sm1667452wiv.22.2015.06.11.06.30.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jun 2015 06:30:11 -0700 (PDT) Sender: Baptiste Daroussin Date: Thu, 11 Jun 2015 15:30:09 +0200 From: Baptiste Daroussin To: Jung-uk Kim Cc: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284237 - in head: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic Message-ID: <20150611133009.GB7560@ivaldir.etoilebsd.net> References: <201506101922.t5AJMf27015406@svn.freebsd.org> <557926DC.9090008@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="A6N2fC+uXW/VQSAv" Content-Disposition: inline In-Reply-To: <557926DC.9090008@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 13:30:14 -0000 --A6N2fC+uXW/VQSAv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 11, 2015 at 02:12:44AM -0400, Jung-uk Kim wrote: > On 06/10/2015 15:22, Xin LI wrote: > > Author: delphij Date: Wed Jun 10 19:22:41 2015 New Revision: > > 284237 URL: https://svnweb.freebsd.org/changeset/base/284237 > >=20 > > Log: MFV r284234: > >=20 > > Update file to 5.23. > ... >=20 > I found a serious regression with this version, i.e., some long > options does not work as intended. --extension works like > --mime-type, --mime-type works like --mime-encoding, etc. When the > author added -Z/--uncompress-noreport, forgot to update those offsets, > it seems. My patch is available from here: >=20 > https://github.com/file/file/commit/bda61b688a#commitcomment-11626945 >=20 > In fact, this is very critical for us because LIB_DEPENDS for ports > does not work any more because it uses --mime-type to verify its type. >=20 > https://svnweb.freebsd.org/ports/head/Mk/Scripts/find-lib.sh?revision=3D3= 83711&view=3Dmarkup#l20 >=20 Can you just commit your patch asap directly in the contrib directory so the next build of packages on head will not be broken? Best regards, Bapt --A6N2fC+uXW/VQSAv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlV5jWEACgkQ8kTtMUmk6EyfJQCggD3irdxxwRUsmXbK1EmC6dbU LBUAni8PwIV/uxcaSCB5ic7u0UCVMUs5 =Rq5H -----END PGP SIGNATURE----- --A6N2fC+uXW/VQSAv-- From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 13:54:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7460F27; Thu, 11 Jun 2015 13:54:20 +0000 (UTC) (envelope-from andrew@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 951E512EF; Thu, 11 Jun 2015 13:54:20 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BDsKFG079116; Thu, 11 Jun 2015 13:54:20 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BDsIWn079107; Thu, 11 Jun 2015 13:54:18 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201506111354.t5BDsIWn079107@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 11 Jun 2015 13:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284264 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 13:54:20 -0000 Author: andrew Date: Thu Jun 11 13:54:18 2015 New Revision: 284264 URL: https://svnweb.freebsd.org/changeset/base/284264 Log: Fix the spelling of __ARM_ARCH >= 6 in sys/arm/arm. Modified: head/sys/arm/arm/bcopyinout.S head/sys/arm/arm/bcopyinout_xscale.S head/sys/arm/arm/copystr.S head/sys/arm/arm/locore-v4.S head/sys/arm/arm/machdep.c head/sys/arm/arm/trap.c Modified: head/sys/arm/arm/bcopyinout.S ============================================================================== --- head/sys/arm/arm/bcopyinout.S Thu Jun 11 13:53:15 2015 (r284263) +++ head/sys/arm/arm/bcopyinout.S Thu Jun 11 13:54:18 2015 (r284264) @@ -38,6 +38,7 @@ #include "assym.s" +#include #include #include @@ -54,7 +55,7 @@ __FBSDID("$FreeBSD$"); .text .align 2 -#ifdef _ARM_ARCH_6 +#if __ARM_ARCH >= 6 #define GET_PCB(tmp) \ mrc p15, 0, tmp, c13, c0, 4; \ add tmp, tmp, #(TD_PCB) Modified: head/sys/arm/arm/bcopyinout_xscale.S ============================================================================== --- head/sys/arm/arm/bcopyinout_xscale.S Thu Jun 11 13:53:15 2015 (r284263) +++ head/sys/arm/arm/bcopyinout_xscale.S Thu Jun 11 13:54:18 2015 (r284264) @@ -38,11 +38,13 @@ #include __FBSDID("$FreeBSD$"); +#include + .syntax unified .text .align 2 -#ifdef _ARM_ARCH_6 +#if __ARM_ARCH >= 6 #define GET_PCB(tmp) \ mrc p15, 0, tmp, c13, c0, 4; \ add tmp, tmp, #(TD_PCB) Modified: head/sys/arm/arm/copystr.S ============================================================================== --- head/sys/arm/arm/copystr.S Thu Jun 11 13:53:15 2015 (r284263) +++ head/sys/arm/arm/copystr.S Thu Jun 11 13:54:18 2015 (r284264) @@ -39,6 +39,7 @@ */ #include "assym.s" +#include #include #include __FBSDID("$FreeBSD$"); @@ -48,7 +49,7 @@ __FBSDID("$FreeBSD$"); .text .align 2 -#ifdef _ARM_ARCH_6 +#if __ARM_ARCH >= 6 #define GET_PCB(tmp) \ mrc p15, 0, tmp, c13, c0, 4; \ add tmp, tmp, #(TD_PCB) Modified: head/sys/arm/arm/locore-v4.S ============================================================================== --- head/sys/arm/arm/locore-v4.S Thu Jun 11 13:53:15 2015 (r284263) +++ head/sys/arm/arm/locore-v4.S Thu Jun 11 13:54:18 2015 (r284264) @@ -49,8 +49,7 @@ __FBSDID("$FreeBSD$"); * * TODO: Fix the ARMv4/v5 case. */ -#if (defined(FLASHADDR) || defined(LOADERRAMADDR) || !defined(_ARM_ARCH_6)) && \ - !defined(PHYSADDR) +#ifndef PHYSADDR #error PHYSADDR must be defined for this configuration #endif Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Thu Jun 11 13:53:15 2015 (r284263) +++ head/sys/arm/arm/machdep.c Thu Jun 11 13:54:18 2015 (r284264) @@ -911,7 +911,7 @@ fake_preload_metadata(struct arm_boot_pa void pcpu0_init(void) { -#if ARM_ARCH_6 || ARM_ARCH_7A || defined(CPU_MV_PJ4B) +#if __ARM_ARCH >= 6 set_curthread(&thread0); #endif pcpu_init(pcpup, 0, sizeof(struct pcpu)); Modified: head/sys/arm/arm/trap.c ============================================================================== --- head/sys/arm/arm/trap.c Thu Jun 11 13:53:15 2015 (r284263) +++ head/sys/arm/arm/trap.c Thu Jun 11 13:54:18 2015 (r284264) @@ -98,6 +98,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -325,7 +326,7 @@ abort_handler(struct trapframe *tf, int * location, so we can deal with those quickly. Otherwise we need to * disassemble the faulting instruction to determine if it was a write. */ -#if ARM_ARCH_6 || ARM_ARCH_7A +#if __ARM_ARCH >= 6 ftype = (fsr & FAULT_WNR) ? VM_PROT_READ | VM_PROT_WRITE : VM_PROT_READ; #else if (IS_PERMISSION_FAULT(fsr)) From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 13:58:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C245314; Thu, 11 Jun 2015 13:58:41 +0000 (UTC) (envelope-from andrew@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A8B31474; Thu, 11 Jun 2015 13:58:41 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BDwfMD080023; Thu, 11 Jun 2015 13:58:41 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BDwfsD080022; Thu, 11 Jun 2015 13:58:41 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201506111358.t5BDwfsD080022@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 11 Jun 2015 13:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284265 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 13:58:41 -0000 Author: andrew Date: Thu Jun 11 13:58:40 2015 New Revision: 284265 URL: https://svnweb.freebsd.org/changeset/base/284265 Log: Stop using VFP in pcpu.h when we mean ARMv6 and later. Modified: head/sys/arm/include/pcpu.h Modified: head/sys/arm/include/pcpu.h ============================================================================== --- head/sys/arm/include/pcpu.h Thu Jun 11 13:54:18 2015 (r284264) +++ head/sys/arm/include/pcpu.h Thu Jun 11 13:58:40 2015 (r284265) @@ -32,6 +32,7 @@ #ifdef _KERNEL +#include #include #define ALT_STACK_SIZE 128 @@ -40,7 +41,7 @@ struct vmspace; #endif /* _KERNEL */ -#ifdef VFP +#if __ARM_ARCH >= 6 #define PCPU_MD_FIELDS \ unsigned int pc_vfpsid; \ unsigned int pc_vfpmvfr0; \ @@ -58,9 +59,8 @@ struct pcb; struct pcpu; extern struct pcpu *pcpup; -#if ARM_ARCH_6 || ARM_ARCH_7A -/* or ARM_TP_ADDRESS mark REMOVE ME NOTE */ +#if __ARM_ARCH >= 6 #define CPU_MASK (0xf) #ifndef SMP From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 14:02:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63D0B62F; Thu, 11 Jun 2015 14:02:24 +0000 (UTC) (envelope-from andrew@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37D4116C1; Thu, 11 Jun 2015 14:02:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BE2Ovr084292; Thu, 11 Jun 2015 14:02:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BE2OZA084291; Thu, 11 Jun 2015 14:02:24 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201506111402.t5BE2OZA084291@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 11 Jun 2015 14:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284266 - head/sys/boot/efi/loader/arch/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 14:02:24 -0000 Author: andrew Date: Thu Jun 11 14:02:23 2015 New Revision: 284266 URL: https://svnweb.freebsd.org/changeset/base/284266 Log: Pass the ACPI table pointer to the arm64 kernel from loader.efi. Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/efi/loader/arch/arm64/exec.c Modified: head/sys/boot/efi/loader/arch/arm64/exec.c ============================================================================== --- head/sys/boot/efi/loader/arch/arm64/exec.c Thu Jun 11 13:58:40 2015 (r284265) +++ head/sys/boot/efi/loader/arch/arm64/exec.c Thu Jun 11 14:02:23 2015 (r284266) @@ -42,6 +42,15 @@ __FBSDID("$FreeBSD$"); #include "loader_efi.h" #include "cache.h" +#include "platform/acfreebsd.h" +#include "acconfig.h" +#define ACPI_SYSTEM_XFACE +#include "actypes.h" +#include "actbl.h" + +static EFI_GUID acpi_guid = ACPI_TABLE_GUID; +static EFI_GUID acpi20_guid = ACPI_20_TABLE_GUID; + static int elf64_exec(struct preloaded_file *amp); static int elf64_obj_exec(struct preloaded_file *amp); @@ -64,12 +73,41 @@ elf64_exec(struct preloaded_file *fp) vm_offset_t clean_addr; size_t clean_size; struct file_metadata *md; + ACPI_TABLE_RSDP *rsdp; EFI_STATUS status; EFI_PHYSICAL_ADDRESS addr; Elf_Ehdr *ehdr; - int err; + char buf[24]; + int err, revision; void (*entry)(vm_offset_t); + rsdp = efi_get_table(&acpi20_guid); + if (rsdp == NULL) { + rsdp = efi_get_table(&acpi_guid); + } + if (rsdp != NULL) { + sprintf(buf, "0x%016llx", (unsigned long long)rsdp); + setenv("hint.acpi.0.rsdp", buf, 1); + revision = rsdp->Revision; + if (revision == 0) + revision = 1; + sprintf(buf, "%d", revision); + setenv("hint.acpi.0.revision", buf, 1); + strncpy(buf, rsdp->OemId, sizeof(rsdp->OemId)); + buf[sizeof(rsdp->OemId)] = '\0'; + setenv("hint.acpi.0.oem", buf, 1); + sprintf(buf, "0x%016x", rsdp->RsdtPhysicalAddress); + setenv("hint.acpi.0.rsdt", buf, 1); + if (revision >= 2) { + /* XXX extended checksum? */ + sprintf(buf, "0x%016llx", + (unsigned long long)rsdp->XsdtPhysicalAddress); + setenv("hint.acpi.0.xsdt", buf, 1); + sprintf(buf, "%d", rsdp->Length); + setenv("hint.acpi.0.xsdt_length", buf, 1); + } + } + if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) return(EFTYPE); From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 14:25:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1583A92B; Thu, 11 Jun 2015 14:25:55 +0000 (UTC) (envelope-from sjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDE521CA6; Thu, 11 Jun 2015 14:25:54 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BEPsdQ096617; Thu, 11 Jun 2015 14:25:54 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BEPsiZ096609; Thu, 11 Jun 2015 14:25:54 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201506111425.t5BEPsiZ096609@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 11 Jun 2015 14:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284268 - in head/usr.bin: kdump truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 14:25:55 -0000 Author: sjg Date: Thu Jun 11 14:25:53 2015 New Revision: 284268 URL: https://svnweb.freebsd.org/changeset/base/284268 Log: Use INCLUDEDIR rather than hard coded /usr/include Differential Revision: D2748 Reviewed by: brooks imp Modified: head/usr.bin/kdump/Makefile head/usr.bin/truss/Makefile Modified: head/usr.bin/kdump/Makefile ============================================================================== --- head/usr.bin/kdump/Makefile Thu Jun 11 14:11:41 2015 (r284267) +++ head/usr.bin/kdump/Makefile Thu Jun 11 14:25:53 2015 (r284268) @@ -32,14 +32,14 @@ CLEANFILES+= linux32_syscalls.c ioctl.c: mkioctls env MACHINE=${MACHINE} CPP="${CPP}" \ - sh ${.CURDIR}/mkioctls print ${DESTDIR}/usr/include > ${.TARGET} + sh ${.CURDIR}/mkioctls print ${DESTDIR}${INCLUDEDIR} > ${.TARGET} kdump_subr.h: mksubr - sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \ + sh ${.CURDIR}/mksubr ${DESTDIR}${INCLUDEDIR} | \ sed -n 's/^\([a-z].*)\)$$/void \1;/p' >${.TARGET} kdump_subr.c: mksubr kdump_subr.h - sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include >${.TARGET} + sh ${.CURDIR}/mksubr ${DESTDIR}${INCLUDEDIR} >${.TARGET} .if (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386") sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ ${.CURDIR}/../../sys/${MACHINE_ARCH}/linux/syscalls.master ${.CURDIR}/linux_syscalls.conf Modified: head/usr.bin/truss/Makefile ============================================================================== --- head/usr.bin/truss/Makefile Thu Jun 11 14:11:41 2015 (r284267) +++ head/usr.bin/truss/Makefile Thu Jun 11 14:25:53 2015 (r284268) @@ -24,7 +24,7 @@ syscalls.h: syscalls.master ioctl.c: ${.CURDIR}/../kdump/mkioctls env MACHINE=${MACHINE} CPP="${CPP}" \ - /bin/sh ${.CURDIR}/../kdump/mkioctls return ${DESTDIR}/usr/include > ${.TARGET} + /bin/sh ${.CURDIR}/../kdump/mkioctls return ${DESTDIR}${INCLUDEDIR} > ${.TARGET} .if ${MACHINE_CPUARCH} == "i386" SRCS+= i386-linux.c linux_syscalls.h From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 14:30:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A290C7E; Thu, 11 Jun 2015 14:30:32 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F11301D30; Thu, 11 Jun 2015 14:30:31 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BEUVqj097558; Thu, 11 Jun 2015 14:30:31 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BEUVuS097557; Thu, 11 Jun 2015 14:30:31 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506111430.t5BEUVuS097557@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Thu, 11 Jun 2015 14:30:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284269 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 14:30:32 -0000 Author: marcel Date: Thu Jun 11 14:30:31 2015 New Revision: 284269 URL: https://svnweb.freebsd.org/changeset/base/284269 Log: For the fixed VHD format, round the raw image size to the next multiple of the cylinder size. This is what qemu-img seems to be doing. Make sure to handle boundary cases where increasing the image size by 1 cyclinder's worth would also result in a change of geometry. Modified: head/usr.bin/mkimg/vhd.c Modified: head/usr.bin/mkimg/vhd.c ============================================================================== --- head/usr.bin/mkimg/vhd.c Thu Jun 11 14:25:53 2015 (r284268) +++ head/usr.bin/mkimg/vhd.c Thu Jun 11 14:30:31 2015 (r284269) @@ -62,6 +62,12 @@ __FBSDID("$FreeBSD$"); #define VHD_SECTOR_SIZE 512 #define VHD_BLOCK_SIZE (4096 * VHD_SECTOR_SIZE) /* 2MB blocks */ +struct vhd_geom { + uint16_t cylinders; + uint8_t heads; + uint8_t sectors; +}; + struct vhd_footer { uint64_t cookie; #define VHD_FOOTER_COOKIE 0x636f6e6563746978ULL @@ -80,9 +86,7 @@ struct vhd_footer { #define VHD_CREATOR_OS 0x46425344 uint64_t original_size; uint64_t current_size; - uint16_t cylinders; - uint8_t heads; - uint8_t sectors; + struct vhd_geom geometry; uint32_t disk_type; #define VHD_DISK_TYPE_FIXED 2 #define VHD_DISK_TYPE_DYNAMIC 3 @@ -111,7 +115,7 @@ vhd_checksum(void *buf, size_t sz) } static void -vhd_geometry(struct vhd_footer *footer, uint64_t image_size) +vhd_geometry(uint64_t image_size, struct vhd_geom *geom) { lba_t imgsz; long cth; @@ -120,9 +124,9 @@ vhd_geometry(struct vhd_footer *footer, if (nheads > 1 && nheads < 256 && nsecs > 1 && nsecs < 256 && ncyls < 65536) { - be16enc(&footer->cylinders, ncyls); - footer->heads = nheads; - footer->sectors = nsecs; + geom->cylinders = ncyls; + geom->heads = nheads; + geom->sectors = nsecs; return; } @@ -130,27 +134,27 @@ vhd_geometry(struct vhd_footer *footer, if (imgsz > 65536 * 16 * 255) imgsz = 65536 * 16 * 255; if (imgsz >= 65535 * 16 * 63) { - be16enc(&footer->cylinders, imgsz / (16 * 255)); - footer->heads = 16; - footer->sectors = 255; + geom->cylinders = imgsz / (16 * 255); + geom->heads = 16; + geom->sectors = 255; return; } - footer->sectors = 17; + geom->sectors = 17; cth = imgsz / 17; - footer->heads = (cth + 1023) / 1024; - if (footer->heads < 4) - footer->heads = 4; - if (cth >= (footer->heads * 1024) || footer->heads > 16) { - footer->heads = 16; - footer->sectors = 31; + geom->heads = (cth + 1023) / 1024; + if (geom->heads < 4) + geom->heads = 4; + if (cth >= (geom->heads * 1024) || geom->heads > 16) { + geom->heads = 16; + geom->sectors = 31; cth = imgsz / 31; } - if (cth >= (footer->heads * 1024)) { - footer->heads = 16; - footer->sectors = 63; + if (cth >= (geom->heads * 1024)) { + geom->heads = 16; + geom->sectors = 63; cth = imgsz / 63; } - be16enc(&footer->cylinders, cth / footer->heads); + geom->cylinders = cth / geom->heads; } static uint32_t @@ -198,7 +202,8 @@ vhd_make_footer(struct vhd_footer *foote be32enc(&footer->creator_os, VHD_CREATOR_OS); be64enc(&footer->original_size, image_size); be64enc(&footer->current_size, image_size); - vhd_geometry(footer, image_size); + vhd_geometry(image_size, &footer->geometry); + be16enc(&footer->geometry.cylinders, footer->geometry.cylinders); be32enc(&footer->disk_type, disk_type); mkimg_uuid(&id); vhd_uuid_enc(&footer->id, &id); @@ -206,23 +211,6 @@ vhd_make_footer(struct vhd_footer *foote } /* - * We round the image size to 2MB for both the dynamic and - * fixed VHD formats. For dynamic VHD, this is needed to - * have the image size be a multiple of the grain size. For - * fixed VHD this is not really needed, but makes sure that - * it's easy to convert from fixed VHD to dynamic VHD. - */ -static int -vhd_resize(lba_t imgsz) -{ - uint64_t imagesz; - - imagesz = imgsz * secsz; - imagesz = (imagesz + VHD_BLOCK_SIZE - 1) & ~(VHD_BLOCK_SIZE - 1); - return (image_set_size(imagesz / secsz)); -} - -/* * PART 2: Dynamic VHD support * * Notes: @@ -262,6 +250,16 @@ _Static_assert(sizeof(struct vhd_dyn_hea #endif static int +vhd_dyn_resize(lba_t imgsz) +{ + uint64_t imagesz; + + imagesz = imgsz * secsz; + imagesz = (imagesz + VHD_BLOCK_SIZE - 1) & ~(VHD_BLOCK_SIZE - 1); + return (image_set_size(imagesz / secsz)); +} + +static int vhd_dyn_write(int fd) { struct vhd_footer footer; @@ -349,17 +347,36 @@ vhd_dyn_write(int fd) static struct mkimg_format vhd_dyn_format = { .name = "vhd", .description = "Virtual Hard Disk", - .resize = vhd_resize, + .resize = vhd_dyn_resize, .write = vhd_dyn_write, }; FORMAT_DEFINE(vhd_dyn_format); /* - * PART 2: Fixed VHD + * PART 3: Fixed VHD */ static int +vhd_fix_resize(lba_t imgsz) +{ + struct vhd_geom geom; + int64_t imagesz; + + imgsz *= secsz; + imagesz = imgsz; + while (1) { + vhd_geometry(imagesz, &geom); + imagesz = (int64_t)geom.cylinders * geom.heads * + geom.sectors * VHD_SECTOR_SIZE; + if (imagesz >= imgsz) + break; + imagesz += geom.heads * geom.sectors * VHD_SECTOR_SIZE; + } + return (image_set_size(imagesz / secsz)); +} + +static int vhd_fix_write(int fd) { struct vhd_footer footer; @@ -379,7 +396,7 @@ vhd_fix_write(int fd) static struct mkimg_format vhd_fix_format = { .name = "vhdf", .description = "Fixed Virtual Hard Disk", - .resize = vhd_resize, + .resize = vhd_fix_resize, .write = vhd_fix_write, }; From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 15:18:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CB44F8; Thu, 11 Jun 2015 15:18:55 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AF8F1A81; Thu, 11 Jun 2015 15:18:55 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BFIsCE023320; Thu, 11 Jun 2015 15:18:54 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BFIstC023319; Thu, 11 Jun 2015 15:18:54 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506111518.t5BFIstC023319@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Thu, 11 Jun 2015 15:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284270 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 15:18:55 -0000 Author: marcel Date: Thu Jun 11 15:18:54 2015 New Revision: 284270 URL: https://svnweb.freebsd.org/changeset/base/284270 Log: Handle the case in which ncyls is 0. While here, update copyright. Modified: head/usr.bin/mkimg/vhd.c Modified: head/usr.bin/mkimg/vhd.c ============================================================================== --- head/usr.bin/mkimg/vhd.c Thu Jun 11 14:30:31 2015 (r284269) +++ head/usr.bin/mkimg/vhd.c Thu Jun 11 15:18:54 2015 (r284270) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Marcel Moolenaar + * Copyright (c) 2014, 2015 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -120,17 +120,19 @@ vhd_geometry(uint64_t image_size, struct lba_t imgsz; long cth; + imgsz = image_size / VHD_SECTOR_SIZE; + /* Respect command line options if possible. */ if (nheads > 1 && nheads < 256 && nsecs > 1 && nsecs < 256 && ncyls < 65536) { - geom->cylinders = ncyls; + geom->cylinders = (ncyls != 0) ? ncyls : + imgsz / (nheads * nsecs); geom->heads = nheads; geom->sectors = nsecs; return; } - imgsz = image_size / VHD_SECTOR_SIZE; if (imgsz > 65536 * 16 * 255) imgsz = 65536 * 16 * 255; if (imgsz >= 65535 * 16 * 63) { From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 15:20:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C019128F; Thu, 11 Jun 2015 15:20:07 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABE401AA4; Thu, 11 Jun 2015 15:20:07 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BFK7HQ023644; Thu, 11 Jun 2015 15:20:07 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BFJxHx023509; Thu, 11 Jun 2015 15:19:59 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506111519.t5BFJxHx023509@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Thu, 11 Jun 2015 15:19:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284271 - head/usr.bin/mkimg/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 15:20:07 -0000 Author: marcel Date: Thu Jun 11 15:19:59 2015 New Revision: 284271 URL: https://svnweb.freebsd.org/changeset/base/284271 Log: Update tests after sizing changes to the fixed VHD format. Modified: head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-pc98.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-pc98.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.gz.uu Modified: head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,15 +1,15 @@ # $FreeBSD$ begin 644 img-1x1-4096-apm.vhdf.gz -M'XL(".W%'50``VEM9RTQ>#$M-#`Y-BUA<&TN=FAD9BYO=70`K571:L(P%'WW -M*R[L35A)DYM;][@Q?1O(9,]:;2N%J<4)VT,_?DF3V-16<2/I)23,NXEZ_G8):.`T/XPA83IH`R3OXO=<59_Y`!P/M5T#)_KL9-&,8X"$0X)` -M3[:G`BC7:G/R%W2ZM!MG)P-[BG=Y.[(!;P*ZW -MX/AAZ+.'C1VDA5=&J$`.4@`B\$P1ESJGYCW`V3'/7Q:OCQ^SA:\?8F!^=(=^ -MW-//7!)?/_#Y46C]Z*9^B8`D&3B;K7Y?W^8@.GZ!]8N9U8^E`_WU1#V/NH\! -M1`L8C"'9ZDS"WG4MHG`U8.(#\M;>!G!SV.>;4_GCWV"RU;DHAD.OYT+_"R@! -MGC8E)M-CC]_#=#LN=UL'YZJ?^[#R^FSQY2ZIN]V9,KB!7+7L1%\D\M5;(S"$ -M..YLW+);^>H9.#QO-B]@+1N:+CJ33F*P-FNXIOKY+__76P-'@8^*^E&.?@&@ -'6R\`T@<````` +M'XL("+F;>54``VEM9RTQ>#$M-#`Y-BUA<&TN=FAD9BYO=70`K57+:L,P$+SG +M*[;T%JC18R6YQX8FMT)H*/163&RGAB8Q::`]N/]>R9)B^9&0%LL;8['6>'9F +MI1!B!P`*$`R(#N*"4>`(S;P34,V?(SUN,'*CFE@P2BZL.@\7=48UF5I`9M*" +M`*:]=3P$I.U$M7SJ`EHXPP\I*&)"KD&*J_@]E.5'-@#'QBK7PO$^.Y'7SQ1` +M,5`(\M[=90XR,VG'[JU,#L?B6.QW;QX.-9Q,S6+U%W;;I!QD)T;V%J_T-O9- +MZ0#;WH+GAV/W'M9V2".\-D(',A`<$(&EFK@P.3WO`2X.639;/=Z]+%:A?H@C +M\Y-7Z,<"_>PF"?6#D)\<6S]Y43_%0:F!WFST^_RRC>CYC:P?)4X_D@SJ +M9=2^+"`ZP-$8(I.Q24ON]KH1D?LS(`X!66-O#;C>[[+UL?@.=["!,P[G^7"8 +M]8R;_P*I@"7U$9.:YX#?[7PS+;8;#^=//_]A[?7)XFZ5.B'CIMR%-KB&G+V? +MV/&^2,TJ_5.ZSQ$H;17NV&F8Z*==+)Z*S7(0<4W31VO22ABXU[89%JX^_<*7 +4_^NMA9,CMTI"R.076*/W'M('```` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,13 +1,14 @@ # $FreeBSD$ begin 644 img-1x1-4096-bsd.vhdf.gz -M'XL("._%'50``VEM9RTQ>#$M-#`Y-BUBJW6G2=-VJX%"E4/W2X[[)`?OQ@"Q'RUFPA1!'+\\-I.+$0[ -M`+0"D<^LRP9[B/ECHUW4T!0!30K:@$'(W'8Q3/;!#/;C^!Z'PWJ<7/-:QL6C -MT>'4/5PO6#Z"2\A+,DHRX)8,+4YXEAAP>DV=RX2H_A2LV2IW76VSD5]89Y`U -MR#.(S-L4!_;UA4'??BI#L7!7],$TW)QP*=\O`YRZ$RYP7+%:VW5U8JJNW+@8 -MR?AF/'AS"<)O;HM3VS8"U706=P+=KNFZ;+"O,7]:H/;`S3*(OO=A`E@#5H"& -MWE,-N('MND*=!73)-$H;9*S0(#5*RP+VZ$S_. -IA--]L%4-A6ED=I-],,-LJR*<$2.O_]:VQ>'&1\4=ON@7D=A:0S`'```` +M'XL("+R;>54``VEM9RTQ>#$M-#`Y-BUB6A74/ZL6#!WQW.T"A`PN[&DJ!DNE\_#/35HBV +M`2@$D9]YSAOJ+.97'6VBAH8$U"DH#=J`==/%T-D',]0ON^\[AX +MU#P.+^%ZP?(:7$)>P-V=H<.JF1=';X]22.I<)4?XI6+U6[GQM[<@O +MK#/@'D0!PG8VY$"J[QT-8-"WG^O5)=,D#5[N +M3@\@%$C)`N_4.4S\PX-5?;!E!=HV,GUG'\Q`N-?Q444X+49>_ZUMBS,K+Y5< ++B.@7"Y_:'#`'```` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,14 +1,15 @@ # $FreeBSD$ begin 644 img-1x1-4096-ebr.vhdf.gz -M'XL("/#%'50``VEM9RTQ>#$M-#`Y-BUE8G(N=FAD9BYO=70`K96Q;H,P$(;W -M/,5%W3)$MK$/LD9-YTI5VS5`(,J0=NG0@8>OC3'Q82"D,A@P.M_'?[ZS8

-M`/H:;=.&9CLXFM5FU=)X\3"PKD>!%E=J+SU`MUQU'=T8]W"<@>#3^M8^[A0[ -MW/HQH%*0YP'PW>D3QDL*8/G(?=K0[+?T[/5)`U0I2`4*(1-+`_X\?(RE0_)8 -M\V=QXAZN%\R7X!+CY8WT*V/:T-S*Q#X=3LZITPA6/12LBEQ[,AOX^7D&IE=) -M"2SK;(("^_S"3=\NE"%(N#/Z(`PW-[B4CN<>3MP)%RBNF,WMO+IUJ*Z,G`PU -M7!D+5ZZ!T)5K<2+N1B#:G457H!X5WJ<-S>N6GA8H.V"T&<3N5X0)8`U8`2K3 -M3R7@#M+,!PI:24WY_565/Y=?/\,&Q_L_1]B,OTC,:L$41&X^@B?3]_0]'54``VEM9RTQ>#$M-#`Y-BUE8G(N=FAD9BYO=70`K94]6;!BS +M!X"Y)MN\H4Y&1[W:K!H:/]P,K*I)H,45QLL,,"V7;<I?X9Z]/$%!F("1(!1JO#?AU_S*5#L%C +MS9_%X25<+YA?@TO)RQGI5L:\H1[*Q#X[G%A29Q"LO"E8&;GVA![YN7D&9E9) +M`4RW-O2!?7YAT+<-9:`7[H(^",/-"9?YX[F#PPOA@H\[+.9V6=TZ5%=$3H8< +MKXPK5RY!_)5K<1AW(\!F9S$5:$:%]WE#_9CXIP6*%AAM!@4J36:5@JI`E:`D +M]3,!:@N9=H'H5U)=?'V6Q??YQ\TPX7C_YP@;^6-*JT5E@#E]1!VI[^B[VY\V +MYX]3A^NVJN[#0M&D2P,10;C&H/00[L/NZ;Y![MY[=6DX28.7N;(C,`&<>X&W +MZ@PF^?6#%7VP9052-S*[YKUX!L*]C;#$M-#`Y-BUG<'0N=FAD9BYO=70`K9<[;]PP#(#W -M^Q4LNJ6HH_?IE@`-F@#=TD>V#O%#"C+DBJ(=.OC'5Y3LL^23C%XAFS!TH/F9 -MI$G11T@X``0#TF:N9<5XVZ3GN+O:>1KM+@.ZYZ,+*V#C@`'7.R5A>(\Q8.TD -MA'JK8.R$DV7M<=CEWWLW]W])WCX\.4;PKXOX3+JE`,#W4-_`-NMO*/_'F[` -M.8QQ$W;.!R4L:)+:M00Y<$*TEJI6,K;J#C8%MHAP+N9H53 -ME2M/H+I3L.]!&9`4>HN+00&E`-JUB?80!LRY>(`]!=8A<#Q^;HX!]K[Y^6[R -M3]"I(G)25I2R)[!4B"Z%N\?:W@P74AROG3V-V9/5LG>8BB4G944Q>VW(7CY) -MF+UP'*M92.@6RI&0_L?QQ-__OE3YP]Y7=F6#Z25X+VC&-A*MN33XEUFFU)Q]CH!1.`6 -M$P<^>?>4EHKR7T!SL,:"EFA[DN1'HL@6,N)\J<0W_^^[#;C:I>+^&NS^`N3M -&#A:S#0`` +M'XL(",*;>54``VEM9RTQ>#$M-#`Y-BUG<'0N=FAD9BYO=70`K98[;]M`#,=W +M?PH:78H4%>ZMTQ(@1F.@6_K:NDBRE&2(@P`=.JC?O>2=7B?KA+HX^2S(H/@3 +M_SQ2-&/^`%`"6+ERCANZ0Q9^NMW-SM%X=1T0GT\A+(`9`CVN1B,3=$_30-OV +MBW'GY9VE`L'[ZP&7C8?:9S/<:?2Z7''##.>/26Y['5!K*,L+X(\A/N&V0X,R +MH`H0>#\#Q4$+T&K$.:VZGL=W?_P,#W=?OQ/LYR17<#36`NH<"@&\6$3'_UVN +MQV%`(.4RVP-.QG!ROXZ3A.,;N+4%'8_@U):7KZ%KQ&H6>MFYEVR@DM"64)XB +MN-L%SB2N/$7FRD!>@VE`]C' +M[.U#'Y_B?46LK;@AECU%I<)L3&Y.M;TI%T*<3)T]2]G3R;)7],6RMN*&:/9* +MG[WU)%'V5ENF&[*6[4-XX;N(0L_'JAZ8+((E3`INX-P +M";N#<`F[@W!)NX.`";N#<`F[@W`)NX-P2;L#@8:E&^*$(K=$?'^*1S3`)ASCA-H>X%!MBW2$68A,.<<(E'>((M&0V$HSK +M+Z/I.E=@L*7L'"BFFG'`^O7?R^R9ZE4QC_)BT7^0E)A&FR1DAYB3G0] +MB^_=_>/-\\OC@!.]JN'!5-%8Q0A1%W+18.PD]WCX]LDA#T]C="NOJ#$M-#`Y-BUM8G(N=FAD9BYO=70`K96Q;H,P$(;W -M/,5%W3(@^[`/LD9-YTI5VS5`(,J0=NG0@8>OC3'8.)"D,AQ@=/;'?[ZS85J<6%*G$*Q^*%@9 -MN?9$/AGGYAF86B45L+SWH0\<\@NCOFTH`[UP%_1!&&ZA<9G?GSLXO!$N^+AR -M,;?+ZM:ANBIR,N1T9=RYTKXE_&J#H@=%F -MD/I?$:5`#5`-)'4[$T!;R'(7B'XEM=7W5UW]G'_=#&L<'_XGQF.K50AE@ -MH3]"1]UV]#WM3YOSY61Q=JNR'Q:D)UTJB`C")3_54``VEM9RTQ>#$M-#`Y-BUM8G(N=FAD9BYO=70`K94]<\,@#(;W +M_`KUNF7P`09,UES3N7>]?JS$L=,,;9<.'=S_7LGX`TSM)#UBV2$G]/@5$H0Q +M]P&0`IC]XSGO:+99>#6K]:JE\?UU0,.@KB-@AD"'*Q&'$]"LZ@9HC`,)QQN- +M,Q"\&SN#)AL_-YF'.PQ1LX]:29Q?IV!X2XI@9G.)T+@4%\8]6UB&2)(=T$?Q.E:PA7A?.[AQ)ET(<3M +M%VN[K.XF5EZX/KT?>UQ_5/4OEIH672%$1NFB0YLQW?OMXUV+W+X-ZO)X +MD<8HO(L#,`FIT<5X12;1/VWM@ZG +/$[>*96SU"XRD3B>_"``` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,14 +1,14 @@ # $FreeBSD$ begin 644 img-1x1-4096-pc98.vhdf.gz -M'XL("//%'50``VEM9RTQ>#$M-#`Y-BUP8SDX+G9H9&8N;W5T`*V5L6Z#,!"& -M]SS%1=TR1/BP#UBCIG.EJNT:0B'*T';IT(&'KVU,\&$@266PD-'AC__WV>,DO#/J*4`8RNPOZ(+1;&ES&OQ<>#J_8!8X[+N9V6=TZ5%=%3D8ZWADW[EP# -MX3NWPV'<0B!M9=8KT-3(X#D?:)^W_.Z`T@&CS2"YLX-2H`:H!E*FGTF@`K+< -M!R)?26WU_557/^=?/\,&)T85W6]F/*9FMU`&6)J?T(?I>_H>]J?-^?/4X_I2 -MU?]8DIETI2$RL$O<[M/NY=$B#X.Z-)PD\F?OJ$\H"4(PXT[=@2]GLOGMS=8- -D')65V3?VP@*3I54``VEM9RTQ>#$M-#`Y-BUP8SDX+G9H9&8N;W5T`*V4/4_#,!"& +M]_Z*J]@Z1/;E[+AK19F1$!]K"$GI`"P,#.&_X\NG'3=IBYRXD:O+/7E?GWU" +MM!<`(8C\Q',^4.\2_ZY7FU5#D]5U0*4@#X&/%MC@D/5M"0H".YL,J*IQ>($Z +MF5P]3MI@".JR9@,G<)U=BKQ^V!A6&9`"I<'@I0J?]T\G#&,\PRT.S^$&P?(2 +M7,I9SIM6+N.M1YQM*3.(D1YE5D5=[,@FDF>6V<0=@\7($P70Q\X +MU!=&?=M0!GIV%_1!:#=G7.:_+QT/Z#>>._IN]H?-\>/0X_I6 +MU7^8-"^ZLA`*[-J`-J/=N]W#;8/_464SRZYNE +IP6Q9@3*-S'YX?[P`XUZFK8IQ2DRR_EO;%J#$M-#`Y-BUV=&]C."YV:&1F+F]U=`"ME,MN@S`0 -M1??YBBMUEP7RJC"#!1KF>*X] -M#&-A`(I0"Y#VI@2TA%*0Y!P]G']NL-MO8Q[?GNBE"L.N`HP[9S&$77/8*AMV -MM8[`31+'KP,W8`V8*`(#KCE'-3=QU_(+N'8IN0'7W8LC-_?H#8S)<+L);K_P -M8?"97`-WX/(^(,OE -MXPVQK)B=6;14^'`OKF_1&4@)J6K]\R2_A^?#^OWC,.)$5#4N[%KJJ9/F*BF5NW5]=/QU1YR<;Q)-=Z]38`J< -M)\)C=KNT6#Q.G<2:`9T^ICE:\I(XBK7G<9IE4?\O98^CA4O%U=[J#P!,R,C= -#!@`` +M'XL(",R;>54``VEM9RTQ>#$M-#`Y-BUV=&]C."YV:&1F+F]U=`"ME$]/A#`0 +MQ>_[*9YZVP-IAU+@NM&]F9AX\2@+9=V#FA@/'O"[.Z6PT,+^B:$4`GG,K_/: +MR0CA!J`T4H).[%2$)(92B!4+%5B?3C3;+V,VS_?J,7*C63F89'$V1)P3FB@8 +MS6K=`3,O3IX'9A`Y!,T"'2X?HO*+N'/Y.5RQE%V'VUV+T_RL4!D8$^!>1[AR +MX<.0$[L&?.`DVV*Y!+Q1@5UI[;K@\(3E*1P+S0#R<8-=&H60AY-SV2%RMX^K +M!ER0XX7=\_/K<6;14I'UM;BJP,Z`""*>X&Y['-FHA/\O9IZGA>8I\B]7*JH# +M+E9[BG1F91U#U]"F[54Q4@6=(\W&0/*.&4WY^6'*[\//>/\LSC:JNIZ?-IZX +M"?(B*:BPB^C*OH_RNWO8KP_O^QY'G:M^86ZIQTX:NF1!9X/=+??1%KEY.V87 +M3S=IB.([Y<:L(*5GO,N.,=&O;U8=S9H:2=:FV4_OPQ,L[B6L/8M+1!#U_U*V +1.+UPJ11"K/X`5,-&%]T&```` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,15 +1,15 @@ # $FreeBSD$ begin 644 img-1x1-512-apm.vhdf.gz -M'XL(".7%'50``VEM9RTQ>#$M-3$R+6%P;2YV:&1F+F]U=`"M54UOPC`,O?,K -M+.V&M*I-'(<=-PUND]#0SE!HBRH-J!C2=NB/7SYI2@MB4U,K2N3F]?G9<>/8 -M#@`4(!C$RF)GW,S-_L*@GKY':L21'_7(@B6W3EV'BRY&/1I;0*;=(@;,.N=X -M")BT'?7\[1+0PFE^F(",M=$&2-S%[[FJ/O,>.#94N!:.=]F)PJP3`,E`(M"3 -MFZD`RK7;L5M6Z?%4GLK#?NGA4,%1I@_+O[#;I54O.S%P;O'.W*);,`?8SBUX -M?CAT[:%)!VGA52*4(0/!`1%8IH@+[5/[#N#LF.DE`_"/G1T/K13?TD!RE[:K/1[^O;%J+G-[1^$Z=?G/;,UQWU/&H_%A`= -MX&`,R75GXNZN:Q&Y[P&3$)`UZ36`F\,^WYS*G_`&D^O.1=%O^CSC^E]`$EAJ -M6DRFUP&_A^EV7.ZV'LYW/_]AE>MSBB^CI':X,Y5@`[EJV/&N2!2JMT9=RTG2 -M"MRQ6X7J63@\!YL7L!:&IK?6IN7H[54``VEM9RTQ>#$M-3$R+6%P;2YV:&1F+F]U=`"ME5UKPC`4AN_] +M%6?L3EA)DY.DNYQ,[P8R&>QN%-NZPM3BA.VB^^_+ITT_%#<:CZ7E-(]OWG,2 +M";$#`#EP"D0%<4%C8`C-@GC]':MQ@Y$8]L;"87)AU'A=U1CV96B#5:4X` +ML]X\%@+C=J)>/G6!%J?U80R2Z!!K$/PJ?0]5]9$/X.A8R[4XUE?'"W,?`T@* +M$D'GA6![+_>[-XU#A1*8GR[^HVZ;5H#H^`USO=_GZ6'Z'.UCC=(6+8CCT?,KT +M?X&00%-SQ&3Z/M!W.]],R^W&X_SIYW]8U?I4XNXJ54(DS7(7JL`&.7L_J6-] +MDYI9ZBLSWV +1%B=&;I64D,DOU%=49]('```` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,13 +1,14 @@ # $FreeBSD$ begin 644 img-1x1-512-bsd.vhdf.gz -M'XL(".;%'50``VEM9RTQ>#$M-3$R+6)S9"YV:&1F+F]U=`"ME$UO@S`,AN_\ -M"DN[]8"2D!AZK=:=)TW:K@4*50_=+COLD!^_&`+$?+6;"%$$IQ<\UK&Q:/1 -MX=0]7"]8/H)+R$LR2C+@E@PM3GB6&'!Z39W+A*C^%*S9*G==;;.17UAGD#7( -M,XC,VQ0']O6%0=]^*D.Q<%?TP33',)PF]NBU/;-@+5=!9W`MVNZ;ILL*\Q?UJ@]L#-,HB^]V$"6`-6@(;> -M4PVXAS0+@8J?)%M^?5;E]_4GK##AJ"!U/3_)7R5T6S`%E=-/\$SO@;ZGXV5W -MO5TZ7->JNA]KI*0;!]&3<)&'^W)X>VZ0IT%=,DT2AMDK-`@-4K+`O;H3/\Z$ -HTWVP50V%:61VDWTPPVRK(IP1(Z__UK;%X<9'Q1V^Z!>1V%I#,`<````` +M'XL("*>;>54``VEM9RTQ>#$M-3$R+6)S9"YV:&1F+F]U=`"ME,%.A#`0AN\\ +MQ1AO:T+:H2W=*W$]FYBH5Y:%=0_JQ8,'?'<[0*$#"[L:2H&2Z7S\,]-6B+8! +M*`21GWG.&^HLYE<=;:*&A@34*2@-VH!UT\70V032U[SN'C4 +M/`XOX7K!\AI<0E[!S$0!RAXW9VAPZJ9%T=OCU)(ZEPE1_BE8O5;N?&WMR"^L +M,^`>1`'"=C;D0*KO'0U@T+>=RD`6[H(^F(:;$R[E\V6`PPOA`L?M%VN[J,[7 +M-L05*Q^,*W#$M-3$R+65B0:F5TD) -M+.ML@@+[_,)-WRZ4(4BX,_H@##V\NG6HKHR<##5< -M&0M7KH'0E6MQ(NY&(-J=15>@'A7>IPW-ZY:>%B@[8+09Q.Y7A`E@#5@!*M-/ -M)>`.TLP'"EI)3?G]594_EU\_PP;'^S]'V(R_2,QJP11$;CZ")]/W]#T=SIO+ -M]>QP;JMR'Y9H)EUIB`S"11KNR_[MN44>;^J2<)+0G[U"`I/`.0F\4W>DY8SM -H/N^"K6HH5"O3-?)"#*-;E<$I-O#Z;VXM#B.7BJZ]U1_9@4$XOP@````` +M'XL("*J;>54``VEM9RTQ>#$M-3$R+65B!L81MGS36=>]?KQTH(I!G:+ATZT/]>"_-A8R!)SV#`G*R'5Y9L&+,' +M@+DFV[RA3D9'O=JL&AH_W`RLJDF@Q17&RPPP+9=MQS3&'1QG@'Q>W]K%'6.' +M6]T&E!+R/``^=_J0O`0"RR?N\X9ZE_AGKT\04&8@)$@%&J\-^'7_,I4.P6/- +MG\7A)5POF%^#2\G+&>E6QKRA'LK$/CN<6%)G$*R\*5@9N?:$'OFY>09F5DD! +M3+4/]F/BG!8H6&&T&!2I-9I6"JD"5H"3U +M,P%J"YEV@>A74EU\?9;%]_G'S3#A>/_G"!OY8TJK166`.7U$':GOZ+O;GS;G +MCU.'Z[:J[L-"T:1+`Q%!N,:@]!#NP^[IOD'NWGMU:3A)@Y>YLB,P`9Q[@;?J +M#";Y]8,5?;!E!5(W,KOFO7@&PKV-MRK"23;R^F]N+4Y%+I6#$M-3$R+6=P="YV:&1F+F]U=`"METMOU#`0@._[ -M*P;U5D2P'=O)'EO12MS*Z]9#\["KE6`1$@<.^?%X_"!VU@X4.1E%64W\99X9 -M+R'N`.`,R)"YEA7+;9.>R^'Z8&ET?!G0O!]-V``;`W2XR2@)PV>4`JV]$&I7 -MN<5&6K+>6URS'J2)<'.\:B-E18QK'"ZXJU\&%`*&X0+X)=C';#H$<`G\",P\ -M3X!3$`P$_X.SOHLIMN_N_CT\W'S\C+#'U5U&C5+-0%J01]#SQCI:=O>T<=?A -MC$$8?::SSK9%W-MM]!RN1=R\@\M)&:A -MB/N:X&3ERN.H'B5T$T@%@L*D\6:60*FQS[1);R$,F,G[$3H*;$3@/4U\1.2DK2M'C;*\BT*B_N`LIKJT=O1ZC)ZI%[^B+)2=E13%Z@XM> -M/DAH5*YU#6C2TP&Y!U:S4&@]5>P.Q%7L -M#L15[`[$5>T.!%;L#L15[`[$5>P.Q%7M#@-4I-X01YRMOX5D5GP[%QMN(01US5(2[]]EN:W9GM+RGP -MON.X6>OZ&,C6FK'`Z?M933]/O^+H(8ZZBL@*KFG;<\`Q[U5X,5:TJ6(#X1?NRM3=^]M/[RSR:;4N\YF254``VEM9RTQ>#$M-3$R+6=P="YV:&1F+F]U=`"ME4N/U#`,@._S +M*SS:"UI$E3B/9FXP8E=P6V"Y<>ES60D&(7'@4/X[<9(^TFD&=I4T4V7D^*OM +MV#%C?@!(!%9MO-."X5C$S["[WCD:KY\&M-\G$U;`P@(]KK%"AK2GZZ#OPV3< +M:7EE(0%Y6(^X8AIR7RQP[:1U/M."!$^P+[.[R*VP;T$:$`B\7UG'D^Z^PY6[ +M'F<-`B'6T1YQ(H43^W7T/$X0CE_`;4T8>`(G+VGY'/J_L_4XQ6(ML]0R"@R" +M;J"MDKAO$4YGSCQ)XEI#V8#N0'%H>EJT&CBW]MDR,0Z"@"VP`Y0VT#4!A].' +MXN1AKXJ?+X-]DH>,V)II02IZ$B]E!!GU#WH>0+%LS+4A& +MK_+1VPX2&;59,L,8M6(?X^K,T=,DMO5A[^_S=UHPW!7QXX$R`+-9*%'GK`[" +M9:P.PF6L#L)EK0X"9JP.PF6L#L)EK`["9:T."W3)G*F)$\XU\9[B7`N0*S.2 +M[9CL>TTH$;NK\5+K3S?QQ&'HC$V<;N$B?;1BX>:N%6@SNWM[_/36(8]?)^LVKJE9R_Y*>YE( +MNF*6C@?K+*;X$SLK)V>['M"0[C2C/Y&`<"\V,L^X5%EN?N[9>ESN5*D8V_T% +(**T"\+,-```` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,15 +1,15 @@ # $FreeBSD$ begin 644 img-1x1-512-mbr.vhdf.gz -M'XL(".K%'50``VEM9RTQ>#$M-3$R+6UB[VJPZ&B\?`^8,FB8`)@IH<)7"J0[*"MDWE#$.6KBZE'$& -MR/NV,6B3\5@G#NXXC`IMWN'B$H.SX3:/`:6$H@B`[U8?QDZ'T$"9@9`@"7*\ -M-^#/_<;/X/`6;A#,[\&E>I33TZV,>4<[EHEY6IQ84J<0K'XH6!FY -M]D0^&>?F&9A:)16PO/>A#QSR"Z.^;2@#O7`7]$$8;J%QF=^?.SB\$2[XN'(Q -MM\OJUJ&Z*G(RY'1EW+ER-<1?N0:'<3<"['8658&J5WB?=[2OB7\:H.B!T6:0 -M^E\1I4`-4`TD=3L30%O((?B6UU?=77?VU/F_/E9'%VJ[(?%J0G72J(",(E/]R7W=MSASR,ZM)PDLB=O5(` -M$\"Y%WBO[N"7,W7[O`VV;J"4G4QKWHOGN+I5:9QDDU'_S:W!4>124;6W^@.> -'9*U,OP@````` +M'XL("+";>54``VEM9RTQ>#$M-3$R+6UBR?@#3.TD/6+9(2?T^!42A#'W +M`9`"F/WC.>]HMEEX-:OUJJ7Q_75`PZ"N(V"&0(*KU]HQC9QWSU.+JE#!*NN2E8E +M[CUI)G%^G8'A+BF!F%\[N'$F70AQ.T7 +M:[NL[B965R8NAIKNC`MW+D'"G>MP(NU!(-J3!3L09\7/>4?SD(67`\H.F&P% +MI="&W#H'78.N0"L:%Q+T!@KC`T7824WY^5&57Z=OO\*$X\,_1VP4+W+:+;H` +M8>DE^D!C3]_M[K@^O1][7']4]2^6FA9=(41&Z:)#FS'=^^WC78OV#J<3 +.MXIE;/4+C*1.)[\(```` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-512-pc98.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-512-pc98.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-1x1-512-pc98.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,14 +1,14 @@ # $FreeBSD$ begin 644 img-1x1-512-pc98.vhdf.gz -M'XL(".O%'50``VEM9RTQ>#$M-3$R+7!C.3@N=FAD9BYO=70`K96Q;H,P$(;W -M/,5%W3)$^+`/6*.FO;4SP82!)9;"0T>&/__?9YR3I -M+@")D)03S_E`N]ORNUUM5I8FFON`2D$9`E\UT.+0Z"LD5!)T;]2@:8;&`NUV -M=/4XH8,AR(V:#4S@G%T9>?[0&E892`6*(,=;%;[OWR8,8SS#'0ZOX2Z"Q2VX -MU(SROM1J45QP@U7D.0NAAQX -MR2\,^HI0!C*["_H@M%L:7,:_%QX.K]@%CCLNYG99W3I45T5.1CK>&3?N7`/A -M.[?#8=Q"(&UEUBO0U,C@.1]HG[?\[H#2`:/-(+FS@U*@!J@&4J:?2:`"LMP' -M(E]);?7]55<_YU\_PP8G1A7=;V8\IF:W4`98FI_0A^E[^A[VI\WY\]3C^E+5 -M_UB2F72E(3*P2]SNT^[ET2(/@[HTG"3R9^^H3R@)0C#C3MV!+V>R^>W-U@T< -CE979-_;"`I.ERN!4,AKUW]QV.(J\5/2IMOH#34'Y,G`(```` +M'XL("+2;>54``VEM9RTQ>#$M-3$R+7!C.3@N=FAD9BYO=70`K90]3\,P$(;W +M_HJKV#I$]N7LN&M%F9$0'VL(2>D`+`P,X;_CRZ<=-VF+G+B1J\L]>5^??4*T +M%P`AB/S$;54.3U75`I2`/@8\6V."0]6T)"@([FPRHJG%X@3J9 +M7#U.VF`(ZK)F`R=PG5V*O'[8&%89D`*EP>"E"I_W3R<,8SS#+0[/X0;!\A)< +MREG.FU8MR@$W%VAQZXZU'G&TI,XB1'F5615WLR":29Y;9Q!V#Q<@3!=#'SC4 +M%T9]VU`&>G87]$%H-V=L0L^[G6QMLOJUJ&Z(G(QTNG)N/#D,L0_ +MN2T.XS8":CJSW8'<(X/G?*"^3_R[!5('C+:"A-IP6*>@*]`E:,7SC$!O(3,N +M$/V=5!=?GV7Q??QQ*\PX.>GH[N!\3/FTZ`PPYX_H-YX[^F[VA\WQX]#C^E;5 +M?Y@T+[JR$`KLVH`VH]V[W<-M@]R]#^K2<)'&+/O+WD`02.D9[]193/+KFZ7! +H;%F!,HW,?GA_O`#C7J:MBG%*3++^6]L6IR-OE5R(U1]?@1I9<`@````` ` end Modified: head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,14 +1,14 @@ # $FreeBSD$ begin 644 img-1x1-512-vtoc8.vhdf.gz -M'XL(".S%'50``VEM9RTQ>#$M-3$R+79T;V,X+G9H9&8N;W5T`*V4RVZ#,!!% -M]_F**W67!?)S"-NJS:Y2I?Y`()BHB[92U447_OC:L4FP<1ZJ,(,%&N9XKCT, -M8V$`BE`+D/:F!+2$4I#D'#VZ*4*PZX"C#MG,81=<]@J&W:U -MCL!-$L>O`S=@#9@H`@.N.4Q40U#V7R\<$W0+5)#M'X1 -MZOWS)+^'Y\/Z_>,PXD14-2[L6NJID^8J*96[=7UT_'5'G)QO$DUWKU-@"IPG -MPF-VN[18/$Z=Q)H!G3ZF.5KRDCB*M>=QFF51_R]ECZ.%2\75WNH/`$S(R-T& -"```` +M'XL("+>;>54``VEM9RTQ>#$M-3$R+79T;V,X+G9H9&8N;W5T`*V43T^$,!#% +M[_LIGGK;`VF'4N"ZT;V9F'CQ*`MEW8.:&`\>\+L[I;#0POZ)H10">%YBGR+U]BO#^_['D>=JWYA;JG'3AJZ9$%G@]TM]]$6N7D[9A=/ +M-VF(XCOEQJP@I6>\RXXQT:]O5AW-FAI)UJ;93^_#$RSN):P]BTM$$/7_4K8X +0O7"I%$*L_@!4PT87W08````` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,15 +1,15 @@ # $FreeBSD$ begin 644 img-63x255-4096-apm.vhdf.gz -M'XL("/_%'50``VEM9RTV,W@R-34M-#`Y-BUA<&TN=FAD9BYO=70`K57);L(P -M$+WS%2/UAM3(\3*FIRXJW"JAHIXA(@F*5""B2.TA'U^OX"P@6MF,+$<3/]Z\ -M9T\(L0.`"Q`4B`KB@IGY_-P):*;OB1HD\:,96;#TVJ[+<$EG-*.Q!:0Z+0CP -MO+>/A8!I.]',W[J`%D[SXRE(H@/7@.(F?L]U_5D,P-%8Y5HXUF4W>CMQ"^H` -MV]Z"Y\=CGSUN[$`MO#)"!:<@&'`.-%?$AR@?ERHIDG -M[9\%Y`XP&D-TW1F9N^M:1.9[P"0$I&=[#>!ZORO6Q^HGO,'HNG-9#H?>3YG^ -M%J`$FID6D^MUP.]NNAE7VXV'\]W/_['R^F1QMTILESM3!AO(U9D=ZXN$'?44 -M3U:V"G?L5F9^#(OEIV*+$KBEZ:/UT$IHN*>V&1;.=+_PY?]Z:^$P\E%1'\K1 -)+TV"K"_2!P`` +M'XL("&NF>54``VEM9RTV,W@R-34M-#`Y-BUA<&TN=FAD9BYO=70`K55=:\(P +M%'WW5US8F["2YM.];&Q,WP8RV;.4-I7"U.*$[:'^]^73IA^*&XF7D'*;TW// +M2:X(V0%`&3`,2`5R023D*;3/O8!F_IZH\9CXT4PL6(JN[+H,E_1&,YE:0*S3 +M#`$M!OM(")AV$\WRK0]HX30_FH)`.G@.G-W$[[FN/^4('(Y5KH4C0W:L-&ME +MAL`@*/`'-_,2N-1IQVY=9X=C=:SVN[6'HPJ.%WJS^`N[;5:/LF.1O:4W>CMS +M"^P`N]Z"YT=CGSUJ[.!:>&6$"HJ!$:`4<*&(,YU3SP/`Q4'*E]7K_<=B%>I' +M:61^_`;]<*"?O22A?A#RX['UXU?U$P2$&#F;K7Y?W_8@>GZ1]4N1TP]E(_/E +M1+-,NC\+2!U@-(:BF)GNQXF[ZUI$XGO`+`3$K;T&,-_O9'ZL?L(;K.&TPV4Y +M'GH_)OJ_@`O`F6DQA5X'_.[FFVFUW7@XW_W\AY779XO[58H"9K@M=Z$,-I"G +MEAT9BM3NLM]1/$G9*=RQ.YGY*2R6GHN5TG`,HO_<)D9[LX8SW2]\^;_>6C@> +/^:BH9CKY!5KF!832!P`` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,14 +1,14 @@ # $FreeBSD$ begin 644 img-63x255-4096-bsd.vhdf.gz -M'XL("`#&'50``VEM9RTV,W@R-34M-#`Y-BUB3I\A^-+5O.X -M?#`B3JSAHL.RGL,=$IP,PCK19#RQJCA(U^_5!.X^/,<>IY:\"YE@;DHP&ZS> -M*G>QMG9@E]89N`,N@=E.)BCP5E_H_=N/W1`DW`7_8!QNB;B"ZO,$)U;"!8I[ -M0QPGRGT)5[)W''M7;5P,.;P9?[RY"*$WM\6);1N!:#I+.(%!:_R>%_BGG,X6 -MJ#K@9AFT7>\S$DP-QH'1^%TH,'LH;`H4]"3YZNO35=_7G[3"B.-M,YA<:"\D -MWA93@"CQ)^8=OQ/_[LZ7W?7C$G&Q5<4?*X-)UP&B1N%:&N[CZ?EAZ)T<)\F2 -M[''T,VU[(7"2O4.*4[=@G6M:(.\7V1#!9*M"G&8#J__6ML69C8]*.'S9+_P) -&SWLP!P`` +M'XL("&VF>54``VEM9RTV,W@R-34M-#`Y-BUB.,LB10UG2M5:F?7QE&&MDN'#LY_+Q@3'\:/JC+&"'3?RUV2[K:,P!I08A02HH['8R]&@1"=JW\VN.6]OCZ)+6 +M/"X?M8!C:[A@,&_F<$>$XU;8H)V$(JV*`C?]`L\1[N#_@!-+UME($#,EF'56 +M;A6[D-MBI(?S#-0`Y4"*7L9BX#V_,-BW3\U@D;L+]D'J;NEP.MY/$8ZMN`LQ +M[MWA4#ZC%*Y$[Y!:5VV<##Y^&7]\N0X2OUR/8]L6`M95%GL#[:YTG!>TSWG\ +M>:#H@9M%4-=%5ZH4!]6`,J"DFVL!:@^ZP$`6WZ2V^OHTU??U!V?8X:@O!I/= +MZ3/N7HO2P$IWB*K='-GW<+[LKA^7@`NE*APLE`NZM!"1N*OKOM1ZW-/IY;%# +MW@;K>!JD0=*5=O9<7&4H>W2H8-_?#EC',[&>508C$`'G^_% -MF3'_`+@WV><%[6KTM(OEHJ/QP_U`G@1Z7(VG.&ZK%(Y%@TLNX8+"/H-2N&V$*YRPB7;Z3.Q/Q7D7SR/YNI=G7F8/#QS;CQYB*$WER/$WD+P;JK+"X#W:[I -M."]HGU>T>:#L@=D\:/I_FRY`-Z`M:(7S4H)>0VEBH*"9U-;?7[;^.?W&$48< -M]\4@V?&\*/"VZ!)$A1_1'SB/]'O8'Y>GSV/`A5(5/BPU.ETYB)R8:ZBY3[N7 -MQ[%VQ=1)AGB/HYYQV7.&$^]M8YPIS.G -.BOOO+OX`/$*Q[A`)```` +M'XL("'&F>54``VEM9RTV,W@R-34M-#`Y-BUE8G(N=FAD9BYO=70`K90];\,@ +M$(;W_(J3NF6(``-VED2*FLZ5JK:S[>`H0]JE0P?_^-Z%X(#!^:@`&]D^>/P> +M=QQCM@'@G;RF#?UBU/K9?':B\>9Q($\"+:ZE59RFU8K&HJ-7&@=0U +M=;@3S*0,D\ZJO,E280_7^7$&;H`7P*JS383`(;YPT;>,98C`W2OZ(':W)EP9 +MSN<>3MQP%T)<,U261`AO[-XJ5M=F#@8?GXP[3RY!PI-K<2)O(5B>*@MF(,Z* +MQVE#_[H(NP7*,S#;#G8-,M&L"]`=:`-:T7,I02^AK'R@"#.I;[^_3/MS^/4C +M3#ANBT'RHO6BH-.B2Q`U_43OZ-G3][3=SP_'O<.Y4N5^+#5MND*(C-SM&F#R +MXN[+YNUYK*Z(-^FRRKJ).OVRAU^"W5O[.#DX:XR3Z:[@)3`D2Q7A%!NM^F]L +1+4YG3A7-V.P/(8K+DQ`)```` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,19 +1,19 @@ # $FreeBSD$ begin 644 img-63x255-4096-gpt.vhdf.gz -M'XL("`/&'50``VEM9RTV,W@R-34M-#`Y-BUG<'0N=FAD9BYO=70`K9<[;]PP -M#,?W^Q0LLJ6HHK=]2XL&38!NZ6OK$#^D($.O*-JA@S]\1]\S367P9T]\<05D#B@`$W."?E>(TQ -M8.ULE/E58;$S09=SCR/+1DF$&^-5*RL[8AP)N*-<>QE0*>BZ,^"W8WS>O"/N^R.7,.4<.[0##'FR_BH[] -MO]R`)Q`W;N!R5L;)K56AABX1JVBZJHU7"0.]`-M!-Q9P -M;UZA8U,NI#A1.WLM9D]5R]Y^+I:_DD8?9RK>MP<];(JQ37U\T>\U/#]8=[?Y\?RX[I@:1[`,H96"U"9>U0L3L0 -M5[$[$%>Q.Q!7M3L06+$[$%>Q.Q!7L3L05[4['-#0>D,<<5A[H@7#H!'0IU53 -M'L=32WZ'P&X2N89OC?Z-(9Y_&*;B$$?]F]F6#Z25X;KN<#"U*Y%.KR) -M'O$\BN_J[NGZ^297IW+O;[]\\,C');K,:TJOLN?B -M%#81/D?WZ(_O8K'R)-98<,JI7"SYD3BRA8PX7RKQQ2]]M@%7NU3<7X/=/VC0 -&,#.S#0`` +M'XL("'2F>54``VEM9RTV,W@R-34M-#`Y-BUG<'0N=FAD9BYO=70`K99-;]P@ +M$(;O^RNFZBU5$6#`[&6K1$VDWM*O6R^VL:,37FX9UAQ@/GX0>@)/!FY9XWG.Y8>IUV-SM/$^UU0%R?)"R`#($!UZ&12WJG +M[V$8QL&%GQ4F=P*J?GR><&S^'5B$<^=9ER-OB'$LX"9WA^N`6D/37`"_3_JD +MWPX-RH#:@\3W.2@!6H)69YSW77>QOON'3_!X^^4;P7[,[DI!(AS8!CH#M5NH +M$QONOJ;N!AP*`MR01;0G7)7%'9;1"[@*C6V_@5L;>9S:FA5RZ-_V-N`T3V?9 +M>!9J;BL8&FAH@$B1+W4`N0 +M+0%/Q\_L&&#OV:]WHSXEQHQ8&WE#+GJ*4H7;G+LUY?:FNY#BJM+1LQ0]72QZ +M^S%9UD;>D(U>$Z*W'B2*WEKI(FZ,&GN3XMJRT1.^:V!]X/?[\IXWG!Y9>@6@ +M&H'%%-:N[@M6!^$*5@?A"E8'X8I6!P$+5@?A"E8'X0I6!^&*5D?M;#A3E6GB +MA*/<$WL0"H::6GDB(]N.9WV'V%W+Y5;KWVCBJYMA><$F3KC-)MX.USI;L(D3 +MKF@31Z`_[YD*C*\OH^FY5F"PI&P,E'/.>&#W\]AWOY__+*+GSWOG0_)BT'Q9 +M46(:+)&&%C&.GB-];^^?;IY?GB:<'+V:%J:,QBQ&B+IP%T^75L[N/MQ]_>B1 +MK[.ZE<_4/"NL@SJK(7%\5!?.HQ]B9]79V=Z!0XUJ'LF?Q)!+Y'#>BU_^W[T- +0N-*I@N>]W5^),'=*5=O9<7"4(>W2H8-_?.^,[8"Q\U%A",(Z>/(> -M=YP9T&RSL#6+Y:*E\?UC0,.`\0B8(=#A*L3A`I19*AKSFEYI -M)`.C7N&[[>:N0X.$;(,-GW7FX0[#KKC/&UJ<_USWWBJHS' -M]14V<7Q-FS"J`*E`:3#B7H6?NX^10H?CJ1QV.'$+UPMV&32%VWBX'(VUM])E -M8K?+SSM_[N'6[M?CY#5U>!+,3AEFG55ID\5@"_?Y<09N@>?`3&<3(7"(+UST -MK6(9(G#WBCZ(W2T)5X3KN8<3-]R%$+:>OJ?=<7DZ'WM<7ZKZ -M/Y::#ETA1$;NFM#=E^W;\UA='A^2"4Z/DTZ_[*'CP>EM?)P54``VEM9RTV,W@R-34M-#`Y-BUM8G(N=FAD9BYO=70`K90];\,@ +M$(;W_(J3NF6P``-VED2*FLZ5JK:S[>`H0]JE0P?_^-X98X.Q\U'9$(1S\/@] +M[CC&[`,@!;!B8IPW-/LD;,UJO6IIO'P,F#-@/`(F"+2X"G&X`&46BL:TIE<: +MR<"H5_ANNKGMT"`AV6'#9YMXN&._*^[SAA;G/X.[]6-`I:`H(N"[TR>NRGA< +M7V86CF_>)HS*0"I0&G)QK\+/P\=(H<7QI1RV.'$+YP3;#)K"[3Q4T=G@0S4X999]6RR9)C"_?Y<09N@*?`\LXF0F`?7QCT +M;6(9(G#WBCZ(W2T(EX7KN8<3-]R%$%?VE64BA#=.;QNKJQ8.!A_?C#MO+D'" +MFVMQ8ME"L&DK"V8@KHK'>4/SFH3-`F4'7.P$ZQ*9:-8IZ!JT`:UHGDG0&\AR +M'RC"3&JJ[R]3_9Q__0@3CMMB,-EIOTCIMN@,1$$?T4>:>_J>#J?U^7)R.%>J +MW(>EID-7")&1NW4)3`[NONS?GL?JTOB0AEW63=3IESW\)SB]G8^3O;/&.)FN +?!R^!8;)4$4ZQT:[_QM;B],*IHAE;_0'0:Q,V$`D````` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,15 +1,15 @@ # $FreeBSD$ begin 644 img-63x255-4096-pc98.vhdf.gz -M'XL("&3N+50``VEM9RTV,W@R-34M-#`Y-BUP8SDX+G9H9&8N;W5T`*V5.V^# -M,!#']WR*D[IE0'YCED2*FLZ5JK8SI2;*D';IT($/7QL;XL.01V5,B-'A'_][ -M^"#$'P""`:EGKLN&;E?@T:W6JYY&V_N`4D*=`E\ML,@!B@'HH.-8>"87SCKJU(9#+E[01^D[M8.5^+G -M:81C5]P%C/MPN"B?*(57HK=)U369DT&G.^/&G>L@>.=Z',O;"*J^L]@*=%T\ -MN2X;NN<"#P\4`9@M@CI\W10'U8(RH*2;EP)4!:6.@0Q74M=\?YGFY_@;9]CA -MJ&\&LZ=;S[C;+:H$5KN7J$\WC_0][`_KX^DPX(96-;Q8*!=T:2$B<5=C=Y]V -M+X]3=3P-DD;1HTYGW/:LXRAZVQ@G1F>-Z5L@/9_H!AEF6Y7#23)9]=_<>IS* -/7"KVP[OZ`WO*69D2"0`` +M'XL("'RF>54``VEM9RTV,W@R-34M-#`Y-BUP8SDX+G9H9&8N;W5T`*V4.V^# +M,!#']WR*D[IE0'X#2R)%3>=*5=N94!-E:+MTZ,"'KP_;Q,:01V5,B.'PC_\] +M?(38`T`P(,W,==G0[XIX]*OU:J#1[CZ@E-"DP%<#''`,]=4"6@%F-CF!=\., +M)H:^<,?6_7L<-<84Y%8M&D9<,>*\&18;M!2X=C?A/,!M[,_CQ"5U +M)A)$SQD6G95YBZ4R(UX7YAFH!LJ!5,[&8N"87SCKJU,9+'+W@CY(W6T05\;O +MTP#'KK@+,>Z`N""?40JO1&^3JFLS)X-.=\:-.Q:#O87]>1)%;QOBQ.BLUEZF/Z.;R##;JA`GR635?W-K +0<2ISJ2A"5G]F`B/D$@D````` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,14 +1,14 @@ # $FreeBSD$ begin 644 img-63x255-4096-vtoc8.vhdf.gz -M'XL("`?&'50``VEM9RTV,W@R-34M-#`Y-BUV=&]C."YV:&1F+F]U=`"ME+UN -MPR`4A?<\Q9&Z98C,C[$]1>I/MDJ5^@*U#409VDI5APY^^&*P8R#832-CA(C@ -M?)Q++C?+7`.X0$$A\KYSBIR!#%M=7 -M/I.]R=[KJ:FEYI`"M.X/$;*?>_[NGH[;T_MQQ-$AJO%@4Z//I3E^$F48[L$4 -MYM@=BR_)5[DW:'PR'3X:__;V/HZ?@S4%2#?6YMB#'\%"*OLL+L\BU54``VEM9RTV,W@R-34M-#`Y-BUV=&]C."YV:&1F+F]U=`"ME,EN +MPR`0AN]YBI%ZRR%B,\:G2EURJU2I+U#;0)1#6ZGJ(0<>OBQV,`2[:62,$-8P +M'__8,X-0&`",0TV`5VXR`A4%QH`2`&IW$NR1;(+9?ROU\/9$Z,O.#[,),&R- +ME^<'KUF#V67#;+8#4"1^>!DH`#6`2!$8<$WT:O[$+>D+N':M<`.NNQ;'[2I! +M*E`JP[U/9UESX!V`W`M13B6@CNS)P"U\"5;WX4:@:\@5I,@23)&S#]UZ?J?XZGR1?T +M.-?Y;/86I_,GMI?:2VH@K;N$2[>?Z+M[/FR/'X<11X:HQHMMCSZWYKPDK&#! +M8[A[VY@]\A35T?PC3;U"#5J=5*=%8T;,6&XCCIV#5=+7+(XS>4D,I>SSN`IE +57C?7AL?QE5-%(+3Y!5F3,44N!P`` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,15 +1,15 @@ # $FreeBSD$ begin 644 img-63x255-512-apm.vhdf.gz -M'XL("/;%'50``VEM9RTV,W@R-34M-3$R+6%P;2YV:&1F+F]U=`"M54UKPD`0 -MO?LK!GH3&I+=R<2>^D'U5I!*SQI,(H&JP0KM(3^^^ZF[211;=AV6#9-]OGEO -M=Q+'>@!@"BF#6$1L@JOY_-P):*?OD1AQ9$<[TF#)M5V7X:+.:$=C#T!$Q>0G>U5@.O]KEP?ZQ_W!I/ISE4U''(_X_); -M0!FP7+680JX=?G?3S;C>;BR<[7[VCX77)XN[59)?[DP8K"!79W:\+Q)UU!,\ -M>>45;MBMU/SH%HNG8LL*4-.TX3UX"0GWY)NAX53WE>54``VEM9RTV,W@R-34M-3$R+6%P;2YV:&1F+F]U=`"M55UKPC`4 +M??=77-B;L)+FT[UL;$S?!C+9LY0VE<+4XH3MH?[WY=.F'XH;B9>0`ZC"HX7>K/X"[MM5H^R8Y&]I3=Z2]T" +M.\"NM^#YT=AGCQH[N!9>&:&"8F`$*`5<*.),Y]3S`'!QD/)E]7K_L5B%^E$: +MF1^_03\W/8B>7VS]9DX_E(W,EQ/- +M,NG^+"!U@-$8BF)FNA\G[JYK$8GO`;,0$+?V&L!\OY/YL?H);["&TPZ7Y7CH +M_9CH_P(N`&>FQ11Z'?"[FV^FU7;CX7SW\Q]67I\M[EP6'HN5DK#,8C^FOA>.2C +-HH[?Y!?6$J;]T@<````` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,14 +1,14 @@ # $FreeBSD$ begin 644 img-63x255-512-bsd.vhdf.gz -M'XL("/?%'50``VEM9RTV,W@R-34M-3$R+6)S9"YV:&1F+F]U=`"ME#M/PS`0 -M@/?\BI/8.D1^QUUH55%F)"280W"J#L#"P.`?CR^)&U^>",5VHEAW]^4>]C'6 -M#@`E@)43[WF!/^5T^FR7-32!0%V`TJ`-V*#.^D4V1.!?SR]Y.GR'XTM6\[A\ -M,").K.&BP[*>PQT2G`S".M%D/+&J.$C7[]4$[CX\QQZGEKP+F6!N2C`;K-XJ -M=[&V=F"7UAFX`RZ!V4XF*/!67^C]VX_=$"3U=M7`PYO!E_O+D(H3>WQ8EM&X%H.DLX@4%K_)X7^*>RAL"A3T)/GJZ]-5W]>?M,*(XVTSF%QH+R3> -M%E.`*/$GYAV_$__NSI?=]>,2<;%5Q1\K@TG7`:)&X5H:[N/I^6'HG1PGR9+L -MS`'```` +M'XL("%JE>54``VEM9RTV,W@R-34M-3$R+6)S9"YV:&1F+F]U=`"ME#MOPR`0 +M@'?_BI.Z9;!XXRR)%#6=*U5J9]?&48:V2X<.SG\O&!,?QH^J,L8(=-S'/>`( +M\0U`,"#EQ#@O:$]Y_+79+NMHS`&E!B%!*BCL=C+T:!$)VK?S:XY;V^/HDM8\ +M+A^U@&-KN&`P;^9P1X3C5MB@G80BK8H"-_T"SQ'NX/^`$TO6V4@0,R68=59N +M%;N0VV*DA_,,U`#E0(I>QF+@/;\PV+=/S6"1NPOV0>INZ7`ZWD\1CJVX"S'N +MW>%0/J,4KD3OD%I7;9P,/GX9?WRY#A*_7(]CVQ8"UE46>P/MKG2<%[3/>?QY +MH.B!FT50UT57JA0'U8`RH*2;:P%J#[K`0!;?I+;Z^C35]_4'9]CAJ"\&D]WI +M,^Y>B]+`2G>(JMT`"Z4J'"R4"[JT$)&XJ^N^U'K +M!NMX&J1!RY]C[<1ESSK>6W?KQB-V5MR=-::S$?7Q>A!,EBJ'DV2D]=_<>IS: +.^*H(0K)?SG[[SC`'```` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,15 +1,15 @@ # $FreeBSD$ begin 644 img-63x255-512-ebr.vhdf.gz -M'XL("%/N+50``VEM9RTV,W@R-34M-3$R+65B?[\69 -M,?\`N#?9YP7M:O2TB^6BH_'#_4">!'I)Z[A@L(^@U*X;80KG+")=OI,[$_%>1?/(]S&OP$G+VGG -M/,%L2C!KK,J;+,8U>BZ.,W`+O`!F>IF@P"&^<-9O/55#$',OZ`=3ALB1">,5[FZEV=>9@\/'-N/'F(H3>7(\3>0O!NJLL+@/=KNDX -M+VB?5[1YH.R!V3QH^G^;+D`WH"UHA?-2@EY#:6*@H)G4UM]?MOXY_<811ASW -MQ2#9\;PH\+;H$D2%']$?.(_T>]@?EZ?/8\"%4A4^+#4Z73F(G)AKJ+E/NY?' -ML7;%U$F&>(^CGG'9* --^^\N_@`\0K'N$`D````` +M'XL("%JF>54``VEM9RTV,W@R-34M-3$R+65B"=O*8-_6+4^ME\=J+QYG$@3P(MKJ55G*;5BL:BHU<:!UR+[R:A;XT= +MV\K'[7*[VST&5`KJ.@*^.WTB]P[E2Y7XL-6VZ0HB,W.T:8/+B +M[LOF[7FLKH@WZ;+*NHDZ_;*'7X+=6_LX.3AKC)/IKN`E,"1+%>$4&ZWZ;VPM +03F=.%XY@W3=16?T^'JX&B\?QX0GT\N;(`5`CUN0",3=(\Q -M8.T\&'>K_&(<-5OG#E>M!ZL"W!BNVHR\(<15'K?(M<\#*@5==P&\7_P3;CL4 -M2`WR"`+O9R`Y*`%*/N&<=C6$_MW,?S -M5Q-N'$'EQIYG-Q;Y7/HW_;6XQ2+5[7AJE9! -M*T`/,'99W+<(IPMGGB1SKZ$90!M0'`9+DU$#Y^@?EDGK(`($[OL1&@ZB)^!T -M_EB=/>QU]?/5[)_DQE!3OU%+L2XNG3T6HJ>*A:]XYPLJ9$W -M9*/7^>BE@T1.I4H7<7/4JA\X;IKHI/#Y0SL)B'RMJA -M8'40KF!U$*Y@=1"N:'40L&!U$*Y@=1"N8'40KFAU(-"P#$7NO?:>+IS3`%FSCA=INX-5FQR[$16[")$ZYH$]?SY[?& -MKS-77UK1O)'TL=:T(5"L.>.`PX^S&7Z=?H?1(QSW&9$/5Z?OCPM.S*J6!U-&8Q8C1%[(U;'/;CKVU"L?!)K+*!R)M<1_8@,R40FG$N5\.;_W5N/*YTJ^-?@\`>4./-P -$LPT````` +M'XL("%VF>54``VEM9RTV,W@R-34M-3$R+6=P="YV:&1F+F]U=`"MEDUOU#`0 +MAN_[*P8A<2BJ93NVX[TLHJ*5N!4HXL(EB9.J$BQ"XH#$]K\S8^?+V3C0RALK +MRFKBQ^^,9S+F//P`E`1>K=S3AM,5BZ_3[F+G::)^&A#7)PD+($-@P#5HY)+> +M:5OHNGYPX6>%R8V`HNV?!QR;?@R[D_L;L"A(,`-641[P!7)Z!V6T0NX`HUUNX%;&VFOL^6=9&VI",7A6BMQXD$K56NHCKH\9>Q+@Z<_0,F;$^\/M]?D\;3K] +M\9"\?%I28I@19T2+&T?-,W\OK^XN'[_<#3O9>#0M31F,6(T2=N5LZ"N;H +M[LW5IW<>^3BI6_E,3;/".JBSZ"+'>W6/_OYF[JP:G6T=.-2HIA']B0RI1`[G +7O?G+S]W;@,N=*M@E=W\!E(LU`;,-```` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,15 +1,15 @@ # $FreeBSD$ begin 644 img-63x255-512-mbr.vhdf.gz -M'XL("%;N+50``VEM9RTV,W@R-34M-3$R+6UBX;OMYJY#@X1L@PV?=>;A#L.NN,\;6IS_7-RM'P,J!649`=][?>*JC,?U -M%39Q?$V;,*H`J4!I,.)>A9^[CY%"A^.I''8X<0O7"W89-(7;>+@*/HC=+0E7A.NYAQ,WW(40MQ\JRT0(;YS>.E97)0X&']^,.V\N0<*; -MZW`B;2%8M94%,Q!7Q>.\H7G-PN:`L@,F.T'3?=MT#KH&;4$KFA<2]`H*XP-% -MF$E-]?UEJY_3KQ]APG%7#"8[[13H?>UQ?JOH_ -MEIH.72%$1NZ:T-V7[=OS6%T>'Y()3H^33K_LH>/!Z6U\G!R54``VEM9RTV,W@R-34M-3$R+6UBW0("'98<-GFWBX8[\K[O.&%N<_@[OU8T"EH"@BX+O3)Z[*>%Q? +M9A:.;]XFC,I`*E`:!#-3AEEGU;+)DF,+]_EQ!FZ`I\#RSB9"8!]?&/1M +M8ADB*/HC=+0B7A>NYAQ,WW(405_:592*$-TYO&ZNK%@X&']^,.V\N0<*; +M:W%BV4*P:2L+9B"NBL=Y0_.:A,T"90=<[`3K$IEHUBGH&K0!K6B>2=`;R'(? +M*,),:JKO+U/]G'_]"!..VV(PV6F_2.FVZ`Q$01_11YI[^IX.I_7YQ^K2^)"&7=9-U.F7/?PG.+V=CY.]L\8XF:X' +>+X%ALE013K'1KO_&UN+TPJFB&5O]`=!K$S80"0`` ` end Modified: head/usr.bin/mkimg/tests/img-63x255-512-pc98.vhdf.gz.uu ============================================================================== --- head/usr.bin/mkimg/tests/img-63x255-512-pc98.vhdf.gz.uu Thu Jun 11 15:18:54 2015 (r284270) +++ head/usr.bin/mkimg/tests/img-63x255-512-pc98.vhdf.gz.uu Thu Jun 11 15:19:59 2015 (r284271) @@ -1,15 +1,15 @@ # $FreeBSD$ begin 644 img-63x255-512-pc98.vhdf.gz -M'XL("%CN+50``VEM9RTV,W@R-34M-3$R+7!C.3@N=FAD9BYO=70`K94[;X,P -M$,?W?(J3NF5`?F.61(J:SI6JMC.E)LJ0=NG0@0]?&QOBPY!'94R(T>$?_WOX -M(,0?`((!J6>NRX9N5^#1K=:KGD;;^X!20IT"7RVPQS&GKQ+0"+"SR0F\[6-<-P:V^C)N-B@H%V<9Z`&*`>B@XUAX)A?..NK4AD,N7M!'Z3NU@Y7XN=I -MA&-7W`6,^W"X*)\HA5>BMTG5-9F30:<[X\:=ZR!XYWH;G^!MGV.&H -M;P:SIUO/N-LMJ@16NY>H3S>/]#WL#^OCZ3#@AE8UO%@H%W1I(2)Q5V-WGW8O -MCU-U/`V21M&C3F?<]JSC*'K;&"=&9XWI6R`]G^@&&69;E<-),EGUW]QZG,I< -.*O;#N_H#>\I9F1()```` +M'XL("&6F>54``VEM9RTV,W@R-34M-3$R+7!C.3@N=FAD9BYO=70`K90[;X,P +M$,?W?(J3NF5`?@-+(D5-YTI5VYE0$V5HNW3HP(>O#]O$QI!'94R(X?"/_SU\ +MA-@#0#`@SQPUQA3D5BT:1EPQXIR[(G/\&+DHY'Z%I"/DC=;1!7QN_3 +M`,>NN`LQ[H"X()]1"J]$;Y.J:S,G@TYWQHT[%R'QSK4XEK<1U$-G,16(73RY +M+AOZYR(>%B@<,%L$NX/MSHJ#ZD!I4!+GI0!50UF%0!974M]^?^GVY_0;9AAQ +MU#:#V1/7,XZ[197`&OR(^L!YH.]A?UR?/H\>YUN5_[!0&'1I(")QMSL`$6=W +MGW8OCU-U/`W2>95UT^@,VYYY$D5O&^+$Z*S67J8_HYO(,-NJ$"?)9-5_CMO3^W'$T2&J\6!3H\^E.7X291CNP13F -MV!V++\E7N3=H?#(=/AK_]O8^CI^#-05(-];FV(,?P4(J^RPNSR+5S6_#XL3* -.J6)R;_,+FZ-::BX'```` +M'XL("&BF>54``VEM9RTV,W@R-34M-3$R+79T;V,X+G9H9&8N;W5T`*V4R6[# +M(!"&[WF*D7K+(6(SQJ=*77*K5*DO4-M`E$-;J>HA!QZ^+'8P!+MI9(P0UC`? +M_]@S@U`8`(Q#38!7;C("%07&@!(`:G<2[)%L@ME_*_7P]D3HR\X/LPDP;(V7 +MYP>O68/99<-LM@-0)'YX&2@`-8!($1AP3?1J_L0MZ0NX=JUP`ZZ[%L?M*D$J +M4"K#O4]P_VE]I+:B"MNX1+MY_HNWL^;(\?AQ%'AJC&BVV//K?FO"2L8,%C +MN'O;F#WR%-71_"--O4(-6IU4IT5C1LQ8;B..G8-5TM +4-]>&Q_&54T4@M/D%69,Q12X'```` ` end From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 15:23:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 290D6498; Thu, 11 Jun 2015 15:23:49 +0000 (UTC) (envelope-from hselasky@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09DE81CCF; Thu, 11 Jun 2015 15:23:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BFNma0027714; Thu, 11 Jun 2015 15:23:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BFNmkw027709; Thu, 11 Jun 2015 15:23:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201506111523.t5BFNmkw027709@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 11 Jun 2015 15:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284272 - in head/sys: dev/usb dev/usb/misc modules/usb/ugold X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 15:23:49 -0000 Author: hselasky Date: Thu Jun 11 15:23:47 2015 New Revision: 284272 URL: https://svnweb.freebsd.org/changeset/base/284272 Log: Import ugold driver from OpenBSD supporting digital USB temperature meters. The driver is currently not part of the default kernel build. Obtained from: OpenBSD MFC after: 2 weeks Added: head/sys/dev/usb/misc/ugold.c (contents, props changed) head/sys/modules/usb/ugold/ head/sys/modules/usb/ugold/Makefile (contents, props changed) Modified: head/sys/dev/usb/usbdevs Added: head/sys/dev/usb/misc/ugold.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/misc/ugold.c Thu Jun 11 15:23:47 2015 (r284272) @@ -0,0 +1,405 @@ +/* $OpenBSD: ugold.c,v 1.7 2014/12/11 18:39:27 mpi Exp $ */ + +/* + * Copyright (c) 2013 Takayoshi SASANO + * Copyright (c) 2013 Martin Pieuchot + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* Driver for Microdia's HID based TEMPer Temperature sensor */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include "usbdevs.h" + +#define USB_DEBUG_VAR usb_debug +#include + +#define UGOLD_INNER 0 +#define UGOLD_OUTER 1 +#define UGOLD_MAX_SENSORS 2 + +#define UGOLD_CMD_DATA 0x80 +#define UGOLD_CMD_INIT 0x82 + +enum { + UGOLD_INTR_DT, + UGOLD_N_TRANSFER, +}; + +/* + * This driver only uses two of the three known commands for the + * TEMPerV1.2 device. + * + * The first byte of the answer corresponds to the command and the + * second one seems to be the size (in bytes) of the answer. + * + * The device always sends 8 bytes and if the length of the answer + * is less than that, it just leaves the last bytes untouched. That + * is why most of the time the last n bytes of the answers are the + * same. + * + * The third command below seems to generate two answers with a + * string corresponding to the device, for example: + * 'TEMPer1F' and '1.1Per1F' (here Per1F is repeated). + */ +static uint8_t cmd_data[8] = {0x01, 0x80, 0x33, 0x01, 0x00, 0x00, 0x00, 0x00}; +static uint8_t cmd_init[8] = {0x01, 0x82, 0x77, 0x01, 0x00, 0x00, 0x00, 0x00}; + +#if 0 +static uint8_t cmd_type[8] = {0x01, 0x86, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00}; + +#endif + +struct ugold_softc; +struct ugold_readout_msg { + struct usb_proc_msg hdr; + struct ugold_softc *sc; +}; + +struct ugold_softc { + struct usb_device *sc_udev; + struct usb_xfer *sc_xfer[UGOLD_N_TRANSFER]; + + struct callout sc_callout; + struct mtx sc_mtx; + struct ugold_readout_msg sc_readout_msg[2]; + + int sc_num_sensors; + int sc_sensor[UGOLD_MAX_SENSORS]; + int sc_calib[UGOLD_MAX_SENSORS]; + int sc_valid[UGOLD_MAX_SENSORS]; + uint8_t sc_report_id; + uint8_t sc_iface_index[2]; +}; + +/* prototypes */ + +static device_probe_t ugold_probe; +static device_attach_t ugold_attach; +static device_detach_t ugold_detach; + +static usb_proc_callback_t ugold_readout_msg; + +static usb_callback_t ugold_intr_callback; + +static devclass_t ugold_devclass; + +static device_method_t ugold_methods[] = { + DEVMETHOD(device_probe, ugold_probe), + DEVMETHOD(device_attach, ugold_attach), + DEVMETHOD(device_detach, ugold_detach), + + DEVMETHOD_END +}; + +static driver_t ugold_driver = { + .name = "ugold", + .methods = ugold_methods, + .size = sizeof(struct ugold_softc), +}; + +DRIVER_MODULE(ugold, uhub, ugold_driver, ugold_devclass, NULL, NULL); +MODULE_DEPEND(ugold, usb, 1, 1, 1); +MODULE_VERSION(ugold, 1); + +static const struct usb_config ugold_config[UGOLD_N_TRANSFER] = { + + [UGOLD_INTR_DT] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = &ugold_intr_callback, + .if_index = 1, + }, +}; + +static const STRUCT_USB_HOST_ID ugold_devs[] = { + {USB_VPI(USB_VENDOR_CHICONY2, USB_PRODUCT_CHICONY2_TEMPER, 0)}, +}; + +static void +ugold_timeout(void *arg) +{ + struct ugold_softc *sc = arg; + + usb_proc_explore_lock(sc->sc_udev); + (void)usb_proc_explore_msignal(sc->sc_udev, + &sc->sc_readout_msg[0], &sc->sc_readout_msg[1]); + usb_proc_explore_unlock(sc->sc_udev); + + callout_reset(&sc->sc_callout, 6 * hz, &ugold_timeout, sc); +} + +static int +ugold_probe(device_t dev) +{ + struct usb_attach_arg *uaa; + + uaa = device_get_ivars(dev); + if (uaa->usb_mode != USB_MODE_HOST) + return (ENXIO); + if (uaa->info.bInterfaceClass != UICLASS_HID) + return (ENXIO); + if (uaa->info.bIfaceIndex != 0) + return (ENXIO); + + return (usbd_lookup_id_by_uaa(ugold_devs, sizeof(ugold_devs), uaa)); +} + +static int +ugold_attach(device_t dev) +{ + struct ugold_softc *sc = device_get_softc(dev); + struct usb_attach_arg *uaa = device_get_ivars(dev); + struct sysctl_oid *sensor_tree; + uint16_t d_len; + void *d_ptr; + int error; + int i; + + sc->sc_udev = uaa->device; + sc->sc_readout_msg[0].hdr.pm_callback = &ugold_readout_msg; + sc->sc_readout_msg[0].sc = sc; + sc->sc_readout_msg[1].hdr.pm_callback = &ugold_readout_msg; + sc->sc_readout_msg[1].sc = sc; + sc->sc_iface_index[0] = uaa->info.bIfaceIndex; + sc->sc_iface_index[1] = uaa->info.bIfaceIndex + 1; + + device_set_usb_desc(dev); + mtx_init(&sc->sc_mtx, "ugold lock", NULL, MTX_DEF | MTX_RECURSE); + callout_init_mtx(&sc->sc_callout, &sc->sc_mtx, 0); + + /* grab all interfaces from other drivers */ + for (i = 0;; i++) { + if (i == uaa->info.bIfaceIndex) + continue; + if (usbd_get_iface(uaa->device, i) == NULL) + break; + + usbd_set_parent_iface(uaa->device, i, uaa->info.bIfaceIndex); + } + + /* figure out report ID */ + error = usbd_req_get_hid_desc(uaa->device, NULL, + &d_ptr, &d_len, M_TEMP, uaa->info.bIfaceIndex); + + if (error) + goto detach; + + (void)hid_report_size(d_ptr, d_len, hid_input, &sc->sc_report_id); + + free(d_ptr, M_TEMP); + + error = usbd_transfer_setup(uaa->device, + sc->sc_iface_index, sc->sc_xfer, ugold_config, + UGOLD_N_TRANSFER, sc, &sc->sc_mtx); + if (error) + goto detach; + + sensor_tree = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "sensors", + CTLFLAG_RD, NULL, ""); + + if (sensor_tree == NULL) { + error = ENOMEM; + goto detach; + } + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(sensor_tree), + OID_AUTO, "inner", CTLFLAG_RD, &sc->sc_sensor[UGOLD_INNER], 0, + "Inner temperature in microCelcius"); + + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(sensor_tree), + OID_AUTO, "inner_valid", CTLFLAG_RD, &sc->sc_valid[UGOLD_INNER], 0, + "Inner temperature is valid"); + + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(sensor_tree), + OID_AUTO, "inner_calib", CTLFLAG_RWTUN, &sc->sc_calib[UGOLD_INNER], 0, + "Inner calibration temperature in microCelcius"); + + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(sensor_tree), + OID_AUTO, "outer", CTLFLAG_RD, &sc->sc_sensor[UGOLD_OUTER], 0, + "Outer temperature in microCelcius"); + + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(sensor_tree), + OID_AUTO, "outer_calib", CTLFLAG_RWTUN, &sc->sc_calib[UGOLD_OUTER], 0, + "Outer calibration temperature in microCelcius"); + + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(sensor_tree), + OID_AUTO, "outer_valid", CTLFLAG_RD, &sc->sc_valid[UGOLD_OUTER], 0, + "Outer temperature is valid"); + + mtx_lock(&sc->sc_mtx); + usbd_transfer_start(sc->sc_xfer[UGOLD_INTR_DT]); + ugold_timeout(sc); + mtx_unlock(&sc->sc_mtx); + + return (0); + +detach: + DPRINTF("error=%s\n", usbd_errstr(error)); + ugold_detach(dev); + return (error); +} + +static int +ugold_detach(device_t dev) +{ + struct ugold_softc *sc = device_get_softc(dev); + + callout_drain(&sc->sc_callout); + + usb_proc_explore_lock(sc->sc_udev); + usb_proc_explore_mwait(sc->sc_udev, + &sc->sc_readout_msg[0], &sc->sc_readout_msg[1]); + usb_proc_explore_unlock(sc->sc_udev); + + usbd_transfer_unsetup(sc->sc_xfer, UGOLD_N_TRANSFER); + + mtx_destroy(&sc->sc_mtx); + + return (0); +} + +static int +ugold_ds75_temp(uint8_t msb, uint8_t lsb) +{ + /* DS75: 12bit precision mode : 0.0625 degrees Celsius ticks */ + /* NOTE: MSB has a sign bit for negative temperatures */ + int32_t temp = (msb << 24) | ((lsb & 0xF0) << 16); + return (((int64_t)temp * (int64_t)1000000LL) >> 24); +} + + +static void +ugold_intr_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct ugold_softc *sc = usbd_xfer_softc(xfer); + struct usb_page_cache *pc; + uint8_t buf[8]; + int temp; + int len; + + usbd_xfer_status(xfer, &len, NULL, NULL, NULL); + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + memset(buf, 0, sizeof(buf)); + + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_out(pc, 0, buf, MIN(len, sizeof(buf))); + + switch (buf[0]) { + case UGOLD_CMD_INIT: + if (sc->sc_num_sensors) + break; + + sc->sc_num_sensors = MIN(buf[1], UGOLD_MAX_SENSORS) /* XXX */ ; + + DPRINTF("%d sensor%s type ds75/12bit (temperature)\n", + sc->sc_num_sensors, (sc->sc_num_sensors == 1) ? "" : "s"); + break; + case UGOLD_CMD_DATA: + switch (buf[1]) { + case 4: + temp = ugold_ds75_temp(buf[4], buf[5]); + sc->sc_sensor[UGOLD_OUTER] = temp + sc->sc_calib[UGOLD_OUTER]; + sc->sc_valid[UGOLD_OUTER] = 1; + /* FALLTHROUGH */ + case 2: + temp = ugold_ds75_temp(buf[2], buf[3]); + sc->sc_sensor[UGOLD_INNER] = temp + sc->sc_calib[UGOLD_INNER]; + sc->sc_valid[UGOLD_INNER] = 1; + break; + default: + DPRINTF("invalid data length (%d bytes)\n", buf[1]); + } + break; + default: + DPRINTF("unknown command 0x%02x\n", buf[0]); + break; + } + /* FALLTHROUGH */ + case USB_ST_SETUP: +tr_setup: + usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); + usbd_transfer_submit(xfer); + break; + default: /* Error */ + if (error != USB_ERR_CANCELLED) { + /* try clear stall first */ + usbd_xfer_set_stall(xfer); + goto tr_setup; + } + break; + } +} + +static int +ugold_issue_cmd(struct ugold_softc *sc, uint8_t *cmd, int len) +{ + return (usbd_req_set_report(sc->sc_udev, &sc->sc_mtx, cmd, len, + sc->sc_iface_index[1], UHID_OUTPUT_REPORT, sc->sc_report_id)); +} + +static void +ugold_readout_msg(struct usb_proc_msg *pm) +{ + struct ugold_softc *sc = ((struct ugold_readout_msg *)pm)->sc; + + usb_proc_explore_unlock(sc->sc_udev); + + mtx_lock(&sc->sc_mtx); + if (sc->sc_num_sensors == 0) + ugold_issue_cmd(sc, cmd_init, sizeof(cmd_init)); + + ugold_issue_cmd(sc, cmd_data, sizeof(cmd_data)); + mtx_unlock(&sc->sc_mtx); + + usb_proc_explore_lock(sc->sc_udev); +} Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu Jun 11 15:19:59 2015 (r284271) +++ head/sys/dev/usb/usbdevs Thu Jun 11 15:23:47 2015 (r284272) @@ -525,7 +525,7 @@ vendor DMI 0x0c0b DMI vendor CANYON 0x0c10 Canyon vendor ICOM 0x0c26 Icom Inc. vendor GNOTOMETRICS 0x0c33 GN Otometrics -vendor CHICONY2 0x0c45 Chicony +vendor CHICONY2 0x0c45 Chicony / Microdia / Sonix Technology Co., Ltd. vendor REINERSCT 0x0c4b Reiner-SCT vendor SEALEVEL 0x0c52 Sealevel System vendor JETI 0x0c6c Jeti @@ -3050,6 +3050,11 @@ product MGE UPS2 0xffff MGE UPS SYSTEMS product MEI CASHFLOW_SC 0x1100 Cashflow-SC Cash Acceptor product MEI S2000 0x1101 Series 2000 Combo Acceptor +/* Microdia / Sonix Techonology Co., Ltd. products */ +product CHICONY2 YUREX 0x1010 YUREX +product CHICONY2 CAM_1 0x62c0 CAM_1 +product CHICONY2 TEMPER 0x7401 TEMPer sensor + /* Micro Star International products */ product MSI BT_DONGLE 0x1967 Bluetooth USB dongle product MSI RT3070_1 0x3820 RT3070 Added: head/sys/modules/usb/ugold/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/usb/ugold/Makefile Thu Jun 11 15:23:47 2015 (r284272) @@ -0,0 +1,13 @@ +# +# $FreeBSD$ +# + +S= ${.CURDIR}/../../.. + +.PATH: $S/dev/usb/misc + +KMOD= ugold +SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h vnode_if.h \ + usbdevs.h ugold.c + +.include From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 15:45:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7895F9FB; Thu, 11 Jun 2015 15:45:36 +0000 (UTC) (envelope-from andrew@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6475211C7; Thu, 11 Jun 2015 15:45:36 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BFjaLY038143; Thu, 11 Jun 2015 15:45:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BFjX0L038127; Thu, 11 Jun 2015 15:45:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201506111545.t5BFjX0L038127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 11 Jun 2015 15:45:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284273 - in head/sys: arm/arm arm64/acpica arm64/arm64 arm64/conf arm64/include conf dev/acpica dev/acpica/Osd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 15:45:36 -0000 Author: andrew Date: Thu Jun 11 15:45:33 2015 New Revision: 284273 URL: https://svnweb.freebsd.org/changeset/base/284273 Log: Add basic support for ACPI. It splits out the nexus driver to two new drivers, one for fdt, one for acpi. It then uses this to decide if it will use fdt or acpi. The GICv2 (interrupt controller) and Generic Timer drivers have been updated to handle both cases. As this is early code we still need FDT to find the kernel console, and some parts are still missing, including PCI support. Differential Revision: https://reviews.freebsd.org/D2463 Reviewed by: jhb, jkim, emaste Obtained from: ABT Systems Ltd Relnotes: Yes Sponsored by: The FreeBSD Foundation Added: head/sys/arm64/acpica/ head/sys/arm64/acpica/OsdEnvironment.c (contents, props changed) head/sys/arm64/acpica/acpi_machdep.c (contents, props changed) head/sys/arm64/acpica/acpi_wakeup.c (contents, props changed) head/sys/arm64/arm64/gic.h (contents, props changed) head/sys/arm64/arm64/gic_acpi.c (contents, props changed) head/sys/arm64/arm64/gic_fdt.c (contents, props changed) head/sys/arm64/include/acpica_machdep.h (contents, props changed) head/sys/arm64/include/iodev.h (contents, props changed) head/sys/arm64/include/pci_cfgreg.h (contents, props changed) Modified: head/sys/arm/arm/generic_timer.c head/sys/arm64/arm64/gic.c head/sys/arm64/arm64/machdep.c head/sys/arm64/arm64/nexus.c head/sys/arm64/conf/GENERIC head/sys/arm64/include/pcpu.h head/sys/conf/files.arm64 head/sys/dev/acpica/Osd/OsdHardware.c head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Thu Jun 11 15:23:47 2015 (r284272) +++ head/sys/arm/arm/generic_timer.c Thu Jun 11 15:45:33 2015 (r284273) @@ -34,6 +34,9 @@ * Cortex-A7, Cortex-A15, ARMv8 and later Generic Timer */ +#include "opt_acpi.h" +#include "opt_platform.h" + #include __FBSDID("$FreeBSD$"); @@ -51,12 +54,17 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT #include #include #include #include +#endif -#include +#ifdef DEV_ACPI +#include +#include +#endif #define GT_CTRL_ENABLE (1 << 0) #define GT_CTRL_INT_MASK (1 << 1) @@ -247,8 +255,9 @@ arm_tmr_intr(void *arg) return (FILTER_HANDLED); } +#ifdef FDT static int -arm_tmr_probe(device_t dev) +arm_tmr_fdt_probe(device_t dev) { if (!ofw_bus_status_okay(dev)) @@ -264,14 +273,62 @@ arm_tmr_probe(device_t dev) return (ENXIO); } +#endif + +#ifdef DEV_ACPI +static void +arm_tmr_acpi_identify(driver_t *driver, device_t parent) +{ + ACPI_TABLE_GTDT *gtdt; + vm_paddr_t physaddr; + device_t dev; + + physaddr = acpi_find_table(ACPI_SIG_GTDT); + if (physaddr == 0) + return; + + gtdt = acpi_map_table(physaddr, ACPI_SIG_GTDT); + if (gtdt == NULL) { + device_printf(parent, "gic: Unable to map the GTDT\n"); + return; + } + + dev = BUS_ADD_CHILD(parent, BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE, + "generic_timer", -1); + if (dev == NULL) { + device_printf(parent, "add gic child failed\n"); + goto out; + } + + BUS_SET_RESOURCE(parent, dev, SYS_RES_IRQ, 0, + gtdt->SecureEl1Interrupt, 1); + BUS_SET_RESOURCE(parent, dev, SYS_RES_IRQ, 1, + gtdt->NonSecureEl1Interrupt, 1); + BUS_SET_RESOURCE(parent, dev, SYS_RES_IRQ, 2, + gtdt->VirtualTimerInterrupt, 1); + +out: + acpi_unmap_table(gtdt); +} + +static int +arm_tmr_acpi_probe(device_t dev) +{ + + device_set_desc(dev, "ARM Generic Timer"); + return (BUS_PROBE_NOWILDCARD); +} +#endif static int arm_tmr_attach(device_t dev) { struct arm_tmr_softc *sc; +#ifdef FDT phandle_t node; pcell_t clock; +#endif int error; int i; @@ -279,12 +336,17 @@ arm_tmr_attach(device_t dev) if (arm_tmr_sc) return (ENXIO); +#ifdef FDT /* Get the base clock frequency */ node = ofw_bus_get_node(dev); - error = OF_getprop(node, "clock-frequency", &clock, sizeof(clock)); - if (error > 0) { - sc->clkfreq = fdt32_to_cpu(clock); + if (node > 0) { + error = OF_getprop(node, "clock-frequency", &clock, + sizeof(clock)); + if (error > 0) { + sc->clkfreq = fdt32_to_cpu(clock); + } } +#endif if (sc->clkfreq == 0) { /* Try to get clock frequency from timer */ @@ -339,24 +401,46 @@ arm_tmr_attach(device_t dev) return (0); } -static device_method_t arm_tmr_methods[] = { - DEVMETHOD(device_probe, arm_tmr_probe), +#ifdef FDT +static device_method_t arm_tmr_fdt_methods[] = { + DEVMETHOD(device_probe, arm_tmr_fdt_probe), DEVMETHOD(device_attach, arm_tmr_attach), { 0, 0 } }; -static driver_t arm_tmr_driver = { +static driver_t arm_tmr_fdt_driver = { "generic_timer", - arm_tmr_methods, + arm_tmr_fdt_methods, sizeof(struct arm_tmr_softc), }; -static devclass_t arm_tmr_devclass; +static devclass_t arm_tmr_fdt_devclass; -EARLY_DRIVER_MODULE(timer, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0, - BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); -EARLY_DRIVER_MODULE(timer, ofwbus, arm_tmr_driver, arm_tmr_devclass, 0, 0, - BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); +EARLY_DRIVER_MODULE(timer, simplebus, arm_tmr_fdt_driver, arm_tmr_fdt_devclass, + 0, 0, BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); +EARLY_DRIVER_MODULE(timer, ofwbus, arm_tmr_fdt_driver, arm_tmr_fdt_devclass, + 0, 0, BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); +#endif + +#ifdef DEV_ACPI +static device_method_t arm_tmr_acpi_methods[] = { + DEVMETHOD(device_identify, arm_tmr_acpi_identify), + DEVMETHOD(device_probe, arm_tmr_acpi_probe), + DEVMETHOD(device_attach, arm_tmr_attach), + { 0, 0 } +}; + +static driver_t arm_tmr_acpi_driver = { + "generic_timer", + arm_tmr_acpi_methods, + sizeof(struct arm_tmr_softc), +}; + +static devclass_t arm_tmr_acpi_devclass; + +EARLY_DRIVER_MODULE(timer, acpi, arm_tmr_acpi_driver, arm_tmr_acpi_devclass, + 0, 0, BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); +#endif void DELAY(int usec) Added: head/sys/arm64/acpica/OsdEnvironment.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/acpica/OsdEnvironment.c Thu Jun 11 15:45:33 2015 (r284273) @@ -0,0 +1,76 @@ +/*- + * Copyright (c) 2000,2001 Michael Smith + * Copyright (c) 2000 BSDi + * 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 AUTHOR 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 +#include + +static u_long acpi_root_phys; + +SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &acpi_root_phys, 0, + "The physical address of the RSDP"); + +ACPI_STATUS +AcpiOsInitialize(void) +{ + + return (AE_OK); +} + +ACPI_STATUS +AcpiOsTerminate(void) +{ + + return (AE_OK); +} + +static u_long +acpi_get_root_from_loader(void) +{ + long acpi_root; + + if (resource_long_value("acpi", 0, "rsdp", &acpi_root) == 0) + return (acpi_root); + + return (0); +} + +ACPI_PHYSICAL_ADDRESS +AcpiOsGetRootPointer(void) +{ + + if (acpi_root_phys == 0) + acpi_root_phys = acpi_get_root_from_loader(); + + return (acpi_root_phys); +} Added: head/sys/arm64/acpica/acpi_machdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/acpica/acpi_machdep.c Thu Jun 11 15:45:33 2015 (r284273) @@ -0,0 +1,217 @@ +/*- + * Copyright (c) 2001 Mitsuru IWASAKI + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * 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 AUTHOR 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 +#include + +#include +#include +#include + +#include + +int +acpi_machdep_init(device_t dev) +{ + + return (0); +} + +int +acpi_machdep_quirks(int *quirks) +{ + + return (0); +} + +static void * +map_table(vm_paddr_t pa, int offset, const char *sig) +{ + ACPI_TABLE_HEADER *header; + vm_offset_t length; + void *table; + + header = pmap_mapbios(pa, sizeof(ACPI_TABLE_HEADER)); + if (strncmp(header->Signature, sig, ACPI_NAME_SIZE) != 0) { + pmap_unmapbios((vm_offset_t)header, sizeof(ACPI_TABLE_HEADER)); + return (NULL); + } + length = header->Length; + pmap_unmapbios((vm_offset_t)header, sizeof(ACPI_TABLE_HEADER)); + + table = pmap_mapbios(pa, length); + if (ACPI_FAILURE(AcpiTbChecksum(table, length))) { + if (bootverbose) + printf("ACPI: Failed checksum for table %s\n", sig); +#if (ACPI_CHECKSUM_ABORT) + pmap_unmapbios(table, length); + return (NULL); +#endif + } + return (table); +} + +/* + * See if a given ACPI table is the requested table. Returns the + * length of the able if it matches or zero on failure. + */ +static int +probe_table(vm_paddr_t address, const char *sig) +{ + ACPI_TABLE_HEADER *table; + + table = pmap_mapbios(address, sizeof(ACPI_TABLE_HEADER)); + if (table == NULL) { + if (bootverbose) + printf("ACPI: Failed to map table at 0x%jx\n", + (uintmax_t)address); + return (0); + } + if (bootverbose) + printf("Table '%.4s' at 0x%jx\n", table->Signature, + (uintmax_t)address); + + if (strncmp(table->Signature, sig, ACPI_NAME_SIZE) != 0) { + pmap_unmapbios((vm_offset_t)table, sizeof(ACPI_TABLE_HEADER)); + return (0); + } + pmap_unmapbios((vm_offset_t)table, sizeof(ACPI_TABLE_HEADER)); + return (1); +} + +/* Unmap a table previously mapped via acpi_map_table(). */ +void +acpi_unmap_table(void *table) +{ + ACPI_TABLE_HEADER *header; + + header = (ACPI_TABLE_HEADER *)table; + pmap_unmapbios((vm_offset_t)table, header->Length); +} + +/* + * Try to map a table at a given physical address previously returned + * by acpi_find_table(). + */ +void * +acpi_map_table(vm_paddr_t pa, const char *sig) +{ + + return (map_table(pa, 0, sig)); +} + +/* + * Return the physical address of the requested table or zero if one + * is not found. + */ +vm_paddr_t +acpi_find_table(const char *sig) +{ + ACPI_PHYSICAL_ADDRESS rsdp_ptr; + ACPI_TABLE_RSDP *rsdp; + ACPI_TABLE_XSDT *xsdt; + ACPI_TABLE_HEADER *table; + vm_paddr_t addr; + int i, count; + + if (resource_disabled("acpi", 0)) + return (0); + + /* + * Map in the RSDP. Since ACPI uses AcpiOsMapMemory() which in turn + * calls pmap_mapbios() to find the RSDP, we assume that we can use + * pmap_mapbios() to map the RSDP. + */ + if ((rsdp_ptr = AcpiOsGetRootPointer()) == 0) + return (0); + rsdp = pmap_mapbios(rsdp_ptr, sizeof(ACPI_TABLE_RSDP)); + if (rsdp == NULL) { + if (bootverbose) + printf("ACPI: Failed to map RSDP\n"); + return (0); + } + + addr = 0; + if (rsdp->Revision >= 2 && rsdp->XsdtPhysicalAddress != 0) { + /* + * AcpiOsGetRootPointer only verifies the checksum for + * the version 1.0 portion of the RSDP. Version 2.0 has + * an additional checksum that we verify first. + */ + if (AcpiTbChecksum((UINT8 *)rsdp, ACPI_RSDP_XCHECKSUM_LENGTH)) { + if (bootverbose) + printf("ACPI: RSDP failed extended checksum\n"); + return (0); + } + xsdt = map_table(rsdp->XsdtPhysicalAddress, 2, ACPI_SIG_XSDT); + if (xsdt == NULL) { + if (bootverbose) + printf("ACPI: Failed to map XSDT\n"); + pmap_unmapbios((vm_offset_t)rsdp, + sizeof(ACPI_TABLE_RSDP)); + return (0); + } + count = (xsdt->Header.Length - sizeof(ACPI_TABLE_HEADER)) / + sizeof(UINT64); + for (i = 0; i < count; i++) + if (probe_table(xsdt->TableOffsetEntry[i], sig)) { + addr = xsdt->TableOffsetEntry[i]; + break; + } + acpi_unmap_table(xsdt); + } + pmap_unmapbios((vm_offset_t)rsdp, sizeof(ACPI_TABLE_RSDP)); + + if (addr == 0) { + if (bootverbose) + printf("ACPI: No %s table found\n", sig); + return (0); + } + if (bootverbose) + printf("%s: Found table at 0x%jx\n", sig, (uintmax_t)addr); + + /* + * Verify that we can map the full table and that its checksum is + * correct, etc. + */ + table = map_table(addr, 0, sig); + if (table == NULL) + return (0); + acpi_unmap_table(table); + + return (addr); +} Added: head/sys/arm64/acpica/acpi_wakeup.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/acpica/acpi_wakeup.c Thu Jun 11 15:45:33 2015 (r284273) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * 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 AUTHOR 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 + +#include + +/* + * ARM64TODO: Implement this. + */ +int +acpi_sleep_machdep(struct acpi_softc *sc, int state) +{ + + return (-1); +} + +int +acpi_wakeup_machdep(struct acpi_softc *sc, int state, int sleep_result, + int intr_enabled) +{ + + /* ARM64TODO: We will need this with acpi_sleep_machdep */ + KASSERT(sleep_result == -1, + ("acpi_wakeup_machdep: Invalid sleep result")); + + return (sleep_result); +} Modified: head/sys/arm64/arm64/gic.c ============================================================================== --- head/sys/arm64/arm64/gic.c Thu Jun 11 15:23:47 2015 (r284272) +++ head/sys/arm64/arm64/gic.c Thu Jun 11 15:45:33 2015 (r284273) @@ -51,11 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include - +#include #include "pic_if.h" @@ -102,18 +98,6 @@ __FBSDID("$FreeBSD$"); #define GICD_ICFGR_TRIG_EDGE (1 << 1) #define GICD_ICFGR_TRIG_MASK 0x2 -struct arm_gic_softc { - device_t gic_dev; - struct resource * gic_res[3]; - bus_space_tag_t gic_c_bst; - bus_space_tag_t gic_d_bst; - bus_space_handle_t gic_c_bsh; - bus_space_handle_t gic_d_bsh; - uint8_t ver; - struct mtx mutex; - uint32_t nirqs; -}; - static struct resource_spec arm_gic_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, /* Distributor registers */ { SYS_RES_MEMORY, 1, RF_ACTIVE }, /* CPU Interrupt Intf. registers */ @@ -136,31 +120,6 @@ static pic_eoi_t gic_eoi; static pic_mask_t gic_mask_irq; static pic_unmask_t gic_unmask_irq; -static struct ofw_compat_data compat_data[] = { - {"arm,gic", true}, /* Non-standard, used in FreeBSD dts. */ - {"arm,gic-400", true}, - {"arm,cortex-a15-gic", true}, - {"arm,cortex-a9-gic", true}, - {"arm,cortex-a7-gic", true}, - {"arm,arm11mp-gic", true}, - {"brcm,brahma-b15-gic", true}, - {NULL, false} -}; - -static int -arm_gic_probe(device_t dev) -{ - - if (!ofw_bus_status_okay(dev)) - return (ENXIO); - - if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) - return (ENXIO); - - device_set_desc(dev, "ARM Generic Interrupt Controller"); - return (BUS_PROBE_DEFAULT); -} - #ifdef SMP static void gic_init_secondary(device_t dev) @@ -367,7 +326,6 @@ arm_gic_ipi_clear(device_t dev, int ipi) static device_method_t arm_gic_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, arm_gic_probe), DEVMETHOD(device_attach, arm_gic_attach), /* pic_if */ @@ -384,15 +342,5 @@ static device_method_t arm_gic_methods[] { 0, 0 } }; -static driver_t arm_gic_driver = { - "gic", - arm_gic_methods, - sizeof(struct arm_gic_softc), -}; - -static devclass_t arm_gic_devclass; - -EARLY_DRIVER_MODULE(gic, simplebus, arm_gic_driver, arm_gic_devclass, 0, 0, - BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); -EARLY_DRIVER_MODULE(gic, ofwbus, arm_gic_driver, arm_gic_devclass, 0, 0, - BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); +DEFINE_CLASS_0(gic, arm_gic_driver, arm_gic_methods, + sizeof(struct arm_gic_softc)); Added: head/sys/arm64/arm64/gic.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/gic.h Thu Jun 11 15:45:33 2015 (r284273) @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2011 The FreeBSD Foundation + * Copyright (c) 2014 Andrew Turner + * All rights reserved. + * + * Developed by Damjan Marion + * + * Based on OMAP4 GIC code by Ben Gray + * + * 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. + * 3. The name of the company nor the name of the author may be used to + * endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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. + * + * $FreeBSD$ + */ + +#ifndef _ARM64_GIC_H_ +#define _ARM64_GIC_H_ + +DECLARE_CLASS(arm_gic_driver); + +struct arm_gic_softc { + device_t gic_dev; + struct resource * gic_res[3]; + bus_space_tag_t gic_c_bst; + bus_space_tag_t gic_d_bst; + bus_space_handle_t gic_c_bsh; + bus_space_handle_t gic_d_bsh; + uint8_t ver; + struct mtx mutex; + uint32_t nirqs; +}; + +#endif Added: head/sys/arm64/arm64/gic_acpi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/gic_acpi.c Thu Jun 11 15:45:33 2015 (r284273) @@ -0,0 +1,161 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * 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 AUTHOR 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 + +#include + +#include + +#include + +#include + +struct arm_gic_acpi_softc { + struct arm_gic_softc gic_sc; + struct resource_list res; +}; + +struct madt_table_data { + device_t parent; + ACPI_MADT_GENERIC_DISTRIBUTOR *dist; + ACPI_MADT_GENERIC_INTERRUPT *intr; +}; + +static void +madt_handler(ACPI_SUBTABLE_HEADER *entry, void *arg) +{ + struct madt_table_data *madt_data; + + madt_data = (struct madt_table_data *)arg; + + switch(entry->Type) { + case ACPI_MADT_TYPE_GENERIC_INTERRUPT: + if (madt_data->intr != NULL) { + if (bootverbose) + device_printf(madt_data->parent, + "gic: Already have an interrupt table"); + break; + } + + madt_data->intr = (ACPI_MADT_GENERIC_INTERRUPT *)entry; + break; + + case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR: + if (madt_data->dist != NULL) { + if (bootverbose) + device_printf(madt_data->parent, + "gic: Already have a distributor table"); + break; + } + + madt_data->dist = (ACPI_MADT_GENERIC_DISTRIBUTOR *)entry; + break; + + default: + break; + } +} + +static void +arm_gic_acpi_identify(driver_t *driver, device_t parent) +{ + struct madt_table_data madt_data; + ACPI_TABLE_MADT *madt; + vm_paddr_t physaddr; + device_t dev; + + physaddr = acpi_find_table(ACPI_SIG_MADT); + if (physaddr == 0) + return; + + madt = acpi_map_table(physaddr, ACPI_SIG_MADT); + if (madt == NULL) { + device_printf(parent, "gic: Unable to map the MADT\n"); + return; + } + + madt_data.parent = parent; + madt_data.dist = NULL; + madt_data.intr = NULL; + + acpi_walk_subtables(madt + 1, (char *)madt + madt->Header.Length, + madt_handler, &madt_data); + if (madt_data.intr == NULL || madt_data.dist == NULL) { + device_printf(parent, + "No gic interrupt or distributor table\n"); + goto out; + } + + dev = BUS_ADD_CHILD(parent, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE, + "gic", -1); + if (dev == NULL) { + device_printf(parent, "add gic child failed\n"); + goto out; + } + + /* Add the MADT data */ + BUS_SET_RESOURCE(parent, dev, SYS_RES_MEMORY, 0, + madt_data.dist->BaseAddress, PAGE_SIZE); + BUS_SET_RESOURCE(parent, dev, SYS_RES_MEMORY, 1, + madt_data.intr->BaseAddress, PAGE_SIZE); + +out: + acpi_unmap_table(madt); +} + +static int +arm_gic_acpi_probe(device_t dev) +{ + + device_set_desc(dev, "ARM Generic Interrupt Controller"); + return (BUS_PROBE_NOWILDCARD); +} + +static device_method_t arm_gic_acpi_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, arm_gic_acpi_identify), + DEVMETHOD(device_probe, arm_gic_acpi_probe), + + DEVMETHOD_END +}; + +DEFINE_CLASS_1(gic, arm_gic_acpi_driver, arm_gic_acpi_methods, + sizeof(struct arm_gic_acpi_softc), arm_gic_driver); + +static devclass_t arm_gic_acpi_devclass; + +EARLY_DRIVER_MODULE(gic, acpi, arm_gic_acpi_driver, + arm_gic_acpi_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); Added: head/sys/arm64/arm64/gic_fdt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/gic_fdt.c Thu Jun 11 15:45:33 2015 (r284273) @@ -0,0 +1,87 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * 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 AUTHOR 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 + +#include + +#include +#include +#include +#include + +#include + +static struct ofw_compat_data compat_data[] = { + {"arm,gic", true}, /* Non-standard, used in FreeBSD dts. */ + {"arm,gic-400", true}, + {"arm,cortex-a15-gic", true}, + {"arm,cortex-a9-gic", true}, + {"arm,cortex-a7-gic", true}, + {"arm,arm11mp-gic", true}, + {"brcm,brahma-b15-gic", true}, + {NULL, false} +}; + +static int +arm_gic_fdt_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "ARM Generic Interrupt Controller"); + return (BUS_PROBE_DEFAULT); +} + +static device_method_t arm_gic_fdt_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, arm_gic_fdt_probe), + + DEVMETHOD_END +}; + +DEFINE_CLASS_1(gic, arm_gic_fdt_driver, arm_gic_fdt_methods, + sizeof(struct arm_gic_softc), arm_gic_driver); + +static devclass_t arm_gic_fdt_devclass; + +EARLY_DRIVER_MODULE(gic, simplebus, arm_gic_fdt_driver, + arm_gic_fdt_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); +EARLY_DRIVER_MODULE(gic, ofwbus, arm_gic_fdt_driver, arm_gic_fdt_devclass, + 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Thu Jun 11 15:23:47 2015 (r284272) +++ head/sys/arm64/arm64/machdep.c Thu Jun 11 15:45:33 2015 (r284273) @@ -392,6 +392,8 @@ cpu_est_clockrate(int cpu_id, uint64_t * void cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size) { + + pcpu->pc_acpi_id = 0xffffffff; } void Modified: head/sys/arm64/arm64/nexus.c ============================================================================== --- head/sys/arm64/arm64/nexus.c Thu Jun 11 15:23:47 2015 (r284272) +++ head/sys/arm64/arm64/nexus.c Thu Jun 11 15:45:33 2015 (r284273) @@ -60,12 +60,17 @@ __FBSDID("$FreeBSD$"); #include #include +#include "opt_acpi.h" #include "opt_platform.h" #ifdef FDT #include #include "ofw_bus_if.h" #endif +#ifdef DEV_ACPI +#include +#include +#endif extern struct bus_space memmap_bus; @@ -78,9 +83,19 @@ struct nexus_device { #define DEVTONX(dev) ((struct nexus_device *)device_get_ivars(dev)) static struct rman mem_rman; +static struct rman irq_rman; -static int nexus_probe(device_t); static int nexus_attach(device_t); + +#ifdef FDT +static device_probe_t nexus_fdt_probe; +static device_attach_t nexus_fdt_attach; +#endif +#ifdef DEV_ACPI +static device_probe_t nexus_acpi_probe; +static device_attach_t nexus_acpi_attach; +#endif + static int nexus_print_child(device_t, device_t); static device_t nexus_add_child(device_t, u_int, const char *, int); static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 16:49:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1611A729; Thu, 11 Jun 2015 16:49:15 +0000 (UTC) (envelope-from andrew@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04503121E; Thu, 11 Jun 2015 16:49:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BGnEXX068592; Thu, 11 Jun 2015 16:49:14 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BGnEVm068591; Thu, 11 Jun 2015 16:49:14 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201506111649.t5BGnEVm068591@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 11 Jun 2015 16:49:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284274 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 16:49:15 -0000 Author: andrew Date: Thu Jun 11 16:49:14 2015 New Revision: 284274 URL: https://svnweb.freebsd.org/changeset/base/284274 Log: Enable clang on armeb, it is now able to build targeting armeb. This is the last arm platform to move away from gcc. Tested by: jmg Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Thu Jun 11 15:45:33 2015 (r284273) +++ head/share/mk/src.opts.mk Thu Jun 11 16:49:14 2015 (r284274) @@ -219,9 +219,9 @@ __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTST # On x86 and arm64, clang is enabled, and will be installed as the default cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX -.elif ${__TT} == "arm" && ${__T:Marm*eb*} == "" -# On little-endian arm, clang is enabled, and it is installed as the default -# cc, but since gcc is unable to build the full clang, disable it by default. +.elif ${__TT} == "arm" +# On arm, clang is enabled, and it is installed as the default cc, but +# since gcc is unable to build the full clang, disable it by default. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC __DEFAULT_NO_OPTIONS+=CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX .elif ${__T:Mpowerpc*} From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 17:21:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F957E4F; Thu, 11 Jun 2015 17:21:28 +0000 (UTC) (envelope-from jkim@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C9B01C86; Thu, 11 Jun 2015 17:21:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BHLSVt085616; Thu, 11 Jun 2015 17:21:28 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BHLSuQ085615; Thu, 11 Jun 2015 17:21:28 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201506111721.t5BHLSuQ085615@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 11 Jun 2015 17:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284275 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 17:21:28 -0000 Author: jkim Date: Thu Jun 11 17:21:27 2015 New Revision: 284275 URL: https://svnweb.freebsd.org/changeset/base/284275 Log: Regen for r284274. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Jun 11 16:49:14 2015 (r284274) +++ head/share/man/man5/src.conf.5 Thu Jun 11 17:21:27 2015 (r284275) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd May 30, 2015 +.Dd June 11, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -226,7 +226,7 @@ When set, it also enforces the following Set to not build the Clang C/C++ compiler during the regular phase of the build. .Pp It is a default setting on -arm/armeb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32 and sparc64/sparc64. When set, it also enforces the following options: .Pp .Bl -item -compact @@ -240,7 +240,7 @@ When set, it also enforces the following Set to build the Clang C/C++ compiler during the normal phase of the build. .Pp It is a default setting on -amd64/amd64, arm/arm, arm/armv6, arm/armv6hf, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv6hf, i386/i386, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_CLANG_BOOTSTRAP .\" from FreeBSD: head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP 273177 2014-10-16 18:28:11Z skreuzer Set to not build the Clang C/C++ compiler during the bootstrap phase of the build. @@ -249,13 +249,13 @@ unless an alternative compiler is provid XCC. .Pp It is a default setting on -arm/armeb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_CLANG_BOOTSTRAP .\" from FreeBSD: head/tools/build/options/WITH_CLANG_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp Set to build the Clang C/C++ compiler during the bootstrap phase of the build. .Pp It is a default setting on -amd64/amd64, arm/arm, arm/armv6, arm/armv6hf, i386/i386 and pc98/i386. +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv6hf, i386/i386 and pc98/i386. .It Va WITH_CLANG_EXTRAS .\" from FreeBSD: head/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim Set to build additional clang and llvm tools, such as bugpoint. @@ -282,7 +282,7 @@ and .Pa /usr/bin/cpp . .Pp It is a default setting on -arm/armeb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_CLANG_IS_CC .\" from FreeBSD: head/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 16:12:36Z gjb Set to install the Clang C/C++ compiler as @@ -292,7 +292,7 @@ and .Pa /usr/bin/cpp . .Pp It is a default setting on -amd64/amd64, arm/arm, arm/armv6, arm/armv6hf, i386/i386 and pc98/i386. +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv6hf, i386/i386 and pc98/i386. .It Va WITHOUT_CPP .\" from FreeBSD: head/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru Set to not build @@ -494,13 +494,13 @@ Set to not build games. Set to not build and install gcc and g++ as part of the normal build process. .Pp It is a default setting on -amd64/amd64, arm/arm, arm/armv6, arm/armv6hf, i386/i386 and pc98/i386. +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv6hf, i386/i386 and pc98/i386. .It Va WITH_GCC .\" from FreeBSD: head/tools/build/options/WITH_GCC 255326 2013-09-06 20:49:48Z zeising Set to build and install gcc and g++. .Pp It is a default setting on -arm/armeb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCC_BOOTSTRAP .\" from FreeBSD: head/tools/build/options/WITHOUT_GCC_BOOTSTRAP 273177 2014-10-16 18:28:11Z skreuzer Set to not build gcc and g++ as part of the bootstrap process. @@ -509,13 +509,13 @@ unless an alternative compiler is provid XCC. .Pp It is a default setting on -amd64/amd64, arm/arm, arm/armv6, arm/armv6hf, i386/i386 and pc98/i386. +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv6hf, i386/i386 and pc98/i386. .It Va WITH_GCC_BOOTSTRAP .\" from FreeBSD: head/tools/build/options/WITH_GCC_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp Set to build gcc and g++ as part of the bootstrap process. .Pp It is a default setting on -arm/armeb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCOV .\" from FreeBSD: head/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru Set to not build the @@ -545,14 +545,14 @@ Do not build the GNU C++ stack (g++, lib This is the default on platforms where clang is the system compiler. .Pp It is a default setting on -amd64/amd64, arm/arm, arm/armv6, arm/armv6hf, i386/i386 and pc98/i386. +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv6hf, i386/i386 and pc98/i386. .It Va WITH_GNUCXX .\" from FreeBSD: head/tools/build/options/WITH_GNUCXX 255321 2013-09-06 20:08:03Z theraven Build the GNU C++ stack (g++, libstdc++). This is the default on platforms where gcc is the system compiler. .Pp It is a default setting on -arm/armeb, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU_GREP_COMPAT .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP_COMPAT 273421 2014-10-21 20:44:33Z emaste Set this option to omit the gnu extensions to grep from being included in From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 17:27:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 515C3C5; Thu, 11 Jun 2015 17:27:49 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 34D951D39; Thu, 11 Jun 2015 17:27:49 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id B09DC188E4; Thu, 11 Jun 2015 10:27:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1434043668; x=1434058068; bh=MUCxWRRQ3e7EShl+3iGVvZ10snQuuOAOcxRIGWO8IC0=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=AYNGybE9soBlbKIRweQKaFTxWugzPP1isuwlAQH9fmuusBuTLD3BBY8U93IgaCI6H GK+S1O6vYqxVLlXVLa+uvuwocInQeHE32zvla6/gxtFw1zew0mZ8hULf3tuB+WWrrC HJCazintU7uVmuru3/23L6TMOeIZQqIqm62O6dVs= Message-ID: <5579C514.7070009@delphij.net> Date: Thu, 11 Jun 2015 10:27:48 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Baptiste Daroussin , Jung-uk Kim CC: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284237 - in head: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic References: <201506101922.t5AJMf27015406@svn.freebsd.org> <557926DC.9090008@FreeBSD.org> <20150611133009.GB7560@ivaldir.etoilebsd.net> In-Reply-To: <20150611133009.GB7560@ivaldir.etoilebsd.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 17:27:49 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 06/11/15 06:30, Baptiste Daroussin wrote: > On Thu, Jun 11, 2015 at 02:12:44AM -0400, Jung-uk Kim wrote: >> On 06/10/2015 15:22, Xin LI wrote: >>> Author: delphij Date: Wed Jun 10 19:22:41 2015 New Revision: >>> 284237 URL: https://svnweb.freebsd.org/changeset/base/284237 >>> >>> Log: MFV r284234: >>> >>> Update file to 5.23. >> ... >> >> I found a serious regression with this version, i.e., some long >> options does not work as intended. --extension works like >> --mime-type, --mime-type works like --mime-encoding, etc. When >> the author added -Z/--uncompress-noreport, forgot to update those >> offsets, it seems. My patch is available from here: >> >> https://github.com/file/file/commit/bda61b688a#commitcomment-11626945 >> >> >> In fact, this is very critical for us because LIB_DEPENDS for ports >> does not work any more because it uses --mime-type to verify its >> type. >> >> https://svnweb.freebsd.org/ports/head/Mk/Scripts/find-lib.sh?revision =383711&view=markup#l20 >> > >> Can you just commit your patch asap directly in the contrib directory so the > next build of packages on head will not be broken? I'll apply a vendor fix for this asap. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.4 (FreeBSD) iQIcBAEBCgAGBQJVecURAAoJEJW2GBstM+nsO0EP/1z2Fyp/gjKhKWt8rBpbP0Be GIh4oWLvbEqihxoOOXywbszx12vuo2e5XQGcJT+KGgyeRaU8fWeeLRhtNRPE3nqb LN52m6SfZAlyjXgK+zvD7ZWdimLn4R5G/ckZPM5CGcsFobV4Ui+RDqsCDisQT0F0 QOgnzilUXTMZHER8VMb3cXh/q60goNiyt5Vpcb2fFeSZy56Hrwtj4T/2KtPguh3v jS1eyDPch3oExgOVz5YmraNExcH3ftjE6V3+XWVGde7TccHAmhamJTJbKIOPT7iU lIhxsu+s6jaQoDBNiHLz9fGfe8S7LBQkbpxsC1sfmZcUU9pfIy24aK8+eOqTprFx 8AEvbxUPm7dqqdPo8S3jUCSqS2/ZqZTB3P4iBP5omqcXRo06OFrMG3Xsf9dgHD6/ XqwpYhpriih3CfO228NGVwef7sDjyAJFSDu0C5p+Zteu1RXAmM0FmXFB2kf9PHNa +P8TSmwy5RbvB5I4n9Yjw2344gI08zWDG9elIYaUOroZ9cTpQukFMKdDMoV+8Qzz 0Aag+vCIO7368S3Rxsv/Y33U+awIeROXGXugQpH0jEHADKs/bDRXbULBDnpOv1cl GfPSERFOV6LTuCEeQex70MemIXsbw6bPSrfmeYFm0Vw2t12KO25k7XRqUBWZy7yc eoSxc6P+XkAaht2Vjyog =xb4E -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 17:32:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0179A3B3; Thu, 11 Jun 2015 17:32:37 +0000 (UTC) (envelope-from delphij@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E397E1F31; Thu, 11 Jun 2015 17:32:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BHWblx092738; Thu, 11 Jun 2015 17:32:37 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BHWbbo092735; Thu, 11 Jun 2015 17:32:37 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201506111732.t5BHWbbo092735@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 11 Jun 2015 17:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284277 - in head/contrib/file: . src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 17:32:38 -0000 Author: delphij Date: Thu Jun 11 17:32:36 2015 New Revision: 284277 URL: https://svnweb.freebsd.org/changeset/base/284277 Log: MFV r284276: Fix long options. Reported by: jkim MFC after: 13 days Modified: head/contrib/file/ChangeLog head/contrib/file/src/file.c head/contrib/file/src/file_opts.h Directory Properties: head/contrib/file/ (props changed) Modified: head/contrib/file/ChangeLog ============================================================================== --- head/contrib/file/ChangeLog Thu Jun 11 17:30:31 2015 (r284276) +++ head/contrib/file/ChangeLog Thu Jun 11 17:32:36 2015 (r284277) @@ -1,3 +1,6 @@ +2015-06-11 8:52 Christos Zoulas + + * redo long option encoding to fix off-by-one in 5.23 2015-06-10 13:50 Christos Zoulas Modified: head/contrib/file/src/file.c ============================================================================== --- head/contrib/file/src/file.c Thu Jun 11 17:30:31 2015 (r284276) +++ head/contrib/file/src/file.c Thu Jun 11 17:32:36 2015 (r284277) @@ -89,10 +89,15 @@ private int /* Global command-line opt private const char *separator = ":"; /* Default field separator */ private const struct option long_options[] = { +#define OPT_HELP 1 +#define OPT_APPLE 2 +#define OPT_EXTENSIONS 3 +#define OPT_MIME_TYPE 4 +#define OPT_MIME_ENCODING 5 #define OPT(shortname, longname, opt, doc) \ {longname, opt, NULL, shortname}, -#define OPT_LONGONLY(longname, opt, doc) \ - {longname, opt, NULL, 0}, +#define OPT_LONGONLY(longname, opt, doc, id) \ + {longname, opt, NULL, id}, #include "file_opts.h" #undef OPT #undef OPT_LONGONLY @@ -182,24 +187,20 @@ main(int argc, char *argv[]) while ((c = getopt_long(argc, argv, OPTSTRING, long_options, &longindex)) != -1) switch (c) { - case 0 : - switch (longindex) { - case 0: - help(); - break; - case 10: - flags |= MAGIC_APPLE; - break; - case 11: - flags |= MAGIC_EXTENSION; - break; - case 12: - flags |= MAGIC_MIME_TYPE; - break; - case 13: - flags |= MAGIC_MIME_ENCODING; - break; - } + case OPT_HELP: + help(); + break; + case OPT_APPLE: + flags |= MAGIC_APPLE; + break; + case OPT_EXTENSIONS: + flags |= MAGIC_EXTENSION; + break; + case OPT_MIME_TYPE: + flags |= MAGIC_MIME_TYPE; + break; + case OPT_MIME_ENCODING: + flags |= MAGIC_MIME_ENCODING; break; case '0': nulsep = 1; @@ -595,7 +596,7 @@ help(void) #define OPT(shortname, longname, opt, doc) \ fprintf(stdout, " -%c, --" longname, shortname), \ docprint(doc); -#define OPT_LONGONLY(longname, opt, doc) \ +#define OPT_LONGONLY(longname, opt, doc, id) \ fprintf(stdout, " --" longname), \ docprint(doc); #include "file_opts.h" Modified: head/contrib/file/src/file_opts.h ============================================================================== --- head/contrib/file/src/file_opts.h Thu Jun 11 17:30:31 2015 (r284276) +++ head/contrib/file/src/file_opts.h Thu Jun 11 17:32:36 2015 (r284277) @@ -12,7 +12,7 @@ * switch statement! */ -OPT_LONGONLY("help", 0, " display this help and exit\n") +OPT_LONGONLY("help", 0, " display this help and exit\n", OPT_HELP) OPT('v', "version", 0, " output version information and exit\n") OPT('m', "magic-file", 1, " LIST use LIST as a colon-separated list of magic\n" " number files\n") @@ -29,10 +29,10 @@ OPT('f', "files-from", 1, " FILE re OPT('F', "separator", 1, " STRING use string as separator instead of `:'\n") OPT('i', "mime", 0, " output MIME type strings (--mime-type and\n" " --mime-encoding)\n") -OPT_LONGONLY("apple", 0, " output the Apple CREATOR/TYPE\n") -OPT_LONGONLY("extension", 0, " output a slash-separated list of extnsions\n") -OPT_LONGONLY("mime-type", 0, " output the MIME type\n") -OPT_LONGONLY("mime-encoding", 0, " output the MIME encoding\n") +OPT_LONGONLY("apple", 0, " output the Apple CREATOR/TYPE\n", OPT_APPLE) +OPT_LONGONLY("extension", 0, " output a slash-separated list of extensions\n", OPT_EXTENSIONS) +OPT_LONGONLY("mime-type", 0, " output the MIME type\n", OPT_MIME_TYPE) +OPT_LONGONLY("mime-encoding", 0, " output the MIME encoding\n", OPT_MIME_ENCODING) OPT('k', "keep-going", 0, " don't stop at the first match\n") OPT('l', "list", 0, " list magic strength\n") #ifdef S_IFLNK From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 17:57:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49821BD0; Thu, 11 Jun 2015 17:57:48 +0000 (UTC) (envelope-from kp@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C2741605; Thu, 11 Jun 2015 17:57:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BHvlB7003972; Thu, 11 Jun 2015 17:57:47 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BHvleK003971; Thu, 11 Jun 2015 17:57:47 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201506111757.t5BHvleK003971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 11 Jun 2015 17:57:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284280 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 17:57:48 -0000 Author: kp Date: Thu Jun 11 17:57:47 2015 New Revision: 284280 URL: https://svnweb.freebsd.org/changeset/base/284280 Log: pf: Remove frc_direction We don't use the direction of the fragments for anything. The frc_direction field is assigned, but never read. Just remove it. Differential Revision: https://reviews.freebsd.org/D2773 Approved by: philip (mentor) Modified: head/sys/netpfil/pf/pf_norm.c Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Thu Jun 11 17:57:09 2015 (r284279) +++ head/sys/netpfil/pf/pf_norm.c Thu Jun 11 17:57:47 2015 (r284280) @@ -76,7 +76,6 @@ struct pf_fragment_cmp { uint32_t frc_id; sa_family_t frc_af; uint8_t frc_proto; - uint8_t frc_direction; }; struct pf_fragment { @@ -86,7 +85,6 @@ struct pf_fragment { #define fr_id fr_key.frc_id #define fr_af fr_key.frc_af #define fr_proto fr_key.frc_proto -#define fr_direction fr_key.frc_direction RB_ENTRY(pf_fragment) fr_entry; TAILQ_ENTRY(pf_fragment) frag_next; @@ -157,7 +155,7 @@ static struct mbuf *pf_fragcache(struct #endif /* INET */ #ifdef INET6 static int pf_reassemble6(struct mbuf **, struct ip6_hdr *, - struct ip6_frag *, uint16_t, uint16_t, int, u_short *); + struct ip6_frag *, uint16_t, uint16_t, u_short *); static void pf_scrub_ip6(struct mbuf **, uint8_t); #endif /* INET6 */ @@ -178,7 +176,6 @@ pf_ip2key(struct ip *ip, int dir, struct key->frc_af = AF_INET; key->frc_proto = ip->ip_p; key->frc_id = ip->ip_id; - key->frc_direction = dir; } #endif /* INET */ @@ -663,7 +660,7 @@ pf_reassemble(struct mbuf **m0, struct i #ifdef INET6 static int pf_reassemble6(struct mbuf **m0, struct ip6_hdr *ip6, struct ip6_frag *fraghdr, - uint16_t hdrlen, uint16_t extoff, int dir, u_short *reason) + uint16_t hdrlen, uint16_t extoff, u_short *reason) { struct mbuf *m = *m0; struct pf_frent *frent; @@ -697,7 +694,6 @@ pf_reassemble6(struct mbuf **m0, struct /* Only the first fragment's protocol is relevant. */ key.frc_proto = 0; key.frc_id = fraghdr->ip6f_ident; - key.frc_direction = dir; if ((frag = pf_fillup_fragment(&key, frent, reason)) == NULL) { PF_FRAG_UNLOCK(); @@ -1555,7 +1551,7 @@ pf_normalize_ip6(struct mbuf **m0, int d off += sizeof(frag); /* Returns PF_DROP or *m0 is NULL or completely reassembled mbuf. */ - if (pf_reassemble6(m0, h, &frag, off, extoff, dir, reason) != PF_PASS) + if (pf_reassemble6(m0, h, &frag, off, extoff, reason) != PF_PASS) return (PF_DROP); m = *m0; if (m == NULL) From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 19:41:16 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 045C4E80; Thu, 11 Jun 2015 19:41:16 +0000 (UTC) (envelope-from brueffer@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC9161F9E; Thu, 11 Jun 2015 19:41:15 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BJ6xJo041345; Thu, 11 Jun 2015 19:06:59 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BJ6wKQ041343; Thu, 11 Jun 2015 19:06:58 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201506111906.t5BJ6wKQ041343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Thu, 11 Jun 2015 19:06:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284284 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 19:41:16 -0000 Author: brueffer Date: Thu Jun 11 19:06:58 2015 New Revision: 284284 URL: https://svnweb.freebsd.org/changeset/base/284284 Log: Add a ugold(4) manpage, adapted from the OpenBSD one. Added: head/share/man/man4/ugold.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Jun 11 19:00:55 2015 (r284283) +++ head/share/man/man4/Makefile Thu Jun 11 19:06:58 2015 (r284284) @@ -869,6 +869,7 @@ MAN+= \ ufoma.4 \ uftdi.4 \ ugen.4 \ + ugold.4 \ uhci.4 \ uhid.4 \ uhso.4 \ Added: head/share/man/man4/ugold.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ugold.4 Thu Jun 11 19:06:58 2015 (r284284) @@ -0,0 +1,60 @@ +.\" $OpenBSD: ugold.4,v 1.1 2013/09/06 08:39:39 mpi Exp $ +.\" +.\" Copyright (c) 2013 Takayoshi SASANO +.\" Copyright (c) 2013 Martin Pieuchot +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 11, 2015 +.Dt UGOLD 4 +.Os +.Sh NAME +.Nm ugold +.Nd TEMPer gold HID thermometer +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines into +your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ugold" +.Ed +.Pp +Alternatively, to load the driver as a module at boot time, +place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +ugold_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for pcsensors TEMPer gold devices. +.Pp +The driver possesses a collection of sensor values which are +made available through the +.Xr sysctl 8 +interface. +.Sh HARDWARE +The following devices are supported by the +.Nm +driver: +.Pp +.Bl -bullet -compact +.It +RDing TEMPer1V1.2 +.El +.Sh SEE ALSO +.Xr usb 4 , +.Xr sysctl 8 From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 19:41:16 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15711E81; Thu, 11 Jun 2015 19:41:16 +0000 (UTC) (envelope-from jkim@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00C541FA0; Thu, 11 Jun 2015 19:41:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BJ16nd038660; Thu, 11 Jun 2015 19:01:06 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BJ0ukU038588; Thu, 11 Jun 2015 19:00:56 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201506111900.t5BJ0ukU038588@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 11 Jun 2015 19:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284283 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes crypto/openssl/crypto/asn1 crypto/openssl/crypto/bf crypto/openssl/crypto/bio crypt... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 19:41:16 -0000 Author: jkim Date: Thu Jun 11 19:00:55 2015 New Revision: 284283 URL: https://svnweb.freebsd.org/changeset/base/284283 Log: Merge OpenSSL 1.0.1n. Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Configure head/crypto/openssl/Makefile head/crypto/openssl/Makefile.org head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/Makefile head/crypto/openssl/apps/apps.c head/crypto/openssl/apps/asn1pars.c head/crypto/openssl/apps/ca.c head/crypto/openssl/apps/cms.c head/crypto/openssl/apps/dhparam.c head/crypto/openssl/apps/enc.c head/crypto/openssl/apps/gendh.c head/crypto/openssl/apps/ocsp.c head/crypto/openssl/apps/s_cb.c head/crypto/openssl/apps/s_client.c head/crypto/openssl/apps/s_server.c head/crypto/openssl/apps/s_time.c head/crypto/openssl/apps/smime.c head/crypto/openssl/apps/srp.c head/crypto/openssl/apps/verify.c head/crypto/openssl/crypto/Makefile head/crypto/openssl/crypto/aes/Makefile head/crypto/openssl/crypto/asn1/Makefile head/crypto/openssl/crypto/asn1/a_int.c head/crypto/openssl/crypto/asn1/asn1_gen.c head/crypto/openssl/crypto/asn1/asn_mime.c head/crypto/openssl/crypto/asn1/bio_ndef.c head/crypto/openssl/crypto/asn1/tasn_new.c head/crypto/openssl/crypto/asn1/tasn_prn.c head/crypto/openssl/crypto/asn1/x_x509.c head/crypto/openssl/crypto/bf/Makefile head/crypto/openssl/crypto/bio/Makefile head/crypto/openssl/crypto/bio/b_print.c head/crypto/openssl/crypto/bio/bf_nbio.c head/crypto/openssl/crypto/bio/bio_lib.c head/crypto/openssl/crypto/bio/bss_dgram.c head/crypto/openssl/crypto/bn/Makefile head/crypto/openssl/crypto/bn/bn.h head/crypto/openssl/crypto/bn/bn_err.c head/crypto/openssl/crypto/bn/bn_gf2m.c head/crypto/openssl/crypto/bn/bn_lcl.h head/crypto/openssl/crypto/bn/bn_print.c head/crypto/openssl/crypto/bn/bn_rand.c head/crypto/openssl/crypto/bn/bn_shift.c head/crypto/openssl/crypto/buffer/Makefile head/crypto/openssl/crypto/buffer/buffer.c head/crypto/openssl/crypto/camellia/Makefile head/crypto/openssl/crypto/cast/Makefile head/crypto/openssl/crypto/cmac/Makefile head/crypto/openssl/crypto/cmac/cmac.c head/crypto/openssl/crypto/cms/Makefile head/crypto/openssl/crypto/cms/cms_pwri.c head/crypto/openssl/crypto/cms/cms_smime.c head/crypto/openssl/crypto/comp/Makefile head/crypto/openssl/crypto/conf/Makefile head/crypto/openssl/crypto/cryptlib.c head/crypto/openssl/crypto/des/Makefile head/crypto/openssl/crypto/des/des.c head/crypto/openssl/crypto/des/enc_writ.c head/crypto/openssl/crypto/dh/Makefile head/crypto/openssl/crypto/dh/dh_ameth.c head/crypto/openssl/crypto/dsa/Makefile head/crypto/openssl/crypto/dsa/dsa_gen.c head/crypto/openssl/crypto/dsa/dsa_ossl.c head/crypto/openssl/crypto/dso/Makefile head/crypto/openssl/crypto/dso/dso_lib.c head/crypto/openssl/crypto/ec/Makefile head/crypto/openssl/crypto/ec/ec2_oct.c head/crypto/openssl/crypto/ec/ec_asn1.c head/crypto/openssl/crypto/ec/ec_check.c head/crypto/openssl/crypto/ec/ec_key.c head/crypto/openssl/crypto/ec/ec_lcl.h head/crypto/openssl/crypto/ec/ec_lib.c head/crypto/openssl/crypto/ec/eck_prn.c head/crypto/openssl/crypto/ec/ecp_oct.c head/crypto/openssl/crypto/ec/ectest.c head/crypto/openssl/crypto/ecdh/Makefile head/crypto/openssl/crypto/ecdsa/Makefile head/crypto/openssl/crypto/ecdsa/ecdsatest.c head/crypto/openssl/crypto/engine/Makefile head/crypto/openssl/crypto/engine/eng_table.c head/crypto/openssl/crypto/err/Makefile head/crypto/openssl/crypto/evp/Makefile head/crypto/openssl/crypto/evp/bio_ok.c head/crypto/openssl/crypto/evp/e_aes.c head/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c head/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c head/crypto/openssl/crypto/evp/encode.c head/crypto/openssl/crypto/evp/evp.h head/crypto/openssl/crypto/evp/p_seal.c head/crypto/openssl/crypto/hmac/Makefile head/crypto/openssl/crypto/hmac/hmac.c head/crypto/openssl/crypto/hmac/hmac.h head/crypto/openssl/crypto/hmac/hmactest.c head/crypto/openssl/crypto/idea/Makefile head/crypto/openssl/crypto/jpake/Makefile head/crypto/openssl/crypto/krb5/Makefile head/crypto/openssl/crypto/lhash/Makefile head/crypto/openssl/crypto/md2/Makefile head/crypto/openssl/crypto/md32_common.h head/crypto/openssl/crypto/md4/Makefile head/crypto/openssl/crypto/md5/Makefile head/crypto/openssl/crypto/mdc2/Makefile head/crypto/openssl/crypto/mem.c head/crypto/openssl/crypto/modes/Makefile head/crypto/openssl/crypto/modes/gcm128.c head/crypto/openssl/crypto/objects/Makefile head/crypto/openssl/crypto/objects/o_names.c head/crypto/openssl/crypto/objects/obj_dat.c head/crypto/openssl/crypto/objects/objects.README head/crypto/openssl/crypto/objects/objects.pl head/crypto/openssl/crypto/ocsp/Makefile head/crypto/openssl/crypto/ocsp/ocsp_ext.c head/crypto/openssl/crypto/ocsp/ocsp_vfy.c head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/pem/Makefile head/crypto/openssl/crypto/pem/pem_lib.c head/crypto/openssl/crypto/pem/pem_pk8.c head/crypto/openssl/crypto/pkcs12/Makefile head/crypto/openssl/crypto/pkcs12/p12_mutl.c head/crypto/openssl/crypto/pkcs7/Makefile head/crypto/openssl/crypto/pkcs7/pk7_doit.c head/crypto/openssl/crypto/pqueue/Makefile head/crypto/openssl/crypto/rand/Makefile head/crypto/openssl/crypto/rc2/Makefile head/crypto/openssl/crypto/rc4/Makefile head/crypto/openssl/crypto/rc5/Makefile head/crypto/openssl/crypto/ripemd/Makefile head/crypto/openssl/crypto/rsa/Makefile head/crypto/openssl/crypto/rsa/rsa_pmeth.c head/crypto/openssl/crypto/seed/Makefile head/crypto/openssl/crypto/sha/Makefile head/crypto/openssl/crypto/srp/Makefile head/crypto/openssl/crypto/srp/srp_vfy.c head/crypto/openssl/crypto/stack/Makefile head/crypto/openssl/crypto/store/Makefile head/crypto/openssl/crypto/threads/th-lock.c head/crypto/openssl/crypto/ts/Makefile head/crypto/openssl/crypto/txt_db/Makefile head/crypto/openssl/crypto/ui/Makefile head/crypto/openssl/crypto/whrlpool/Makefile head/crypto/openssl/crypto/x509/Makefile head/crypto/openssl/crypto/x509/x509_lu.c head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/crypto/x509/x509_vfy.h head/crypto/openssl/crypto/x509/x509_vpm.c head/crypto/openssl/crypto/x509/x509type.c head/crypto/openssl/crypto/x509v3/Makefile head/crypto/openssl/crypto/x509v3/v3_alt.c head/crypto/openssl/crypto/x509v3/v3_cpols.c head/crypto/openssl/crypto/x509v3/v3_utl.c head/crypto/openssl/doc/apps/cms.pod head/crypto/openssl/doc/apps/config.pod head/crypto/openssl/doc/apps/dhparam.pod head/crypto/openssl/doc/apps/ocsp.pod head/crypto/openssl/doc/apps/s_client.pod head/crypto/openssl/doc/apps/s_server.pod head/crypto/openssl/doc/apps/smime.pod head/crypto/openssl/doc/apps/verify.pod head/crypto/openssl/doc/crypto/BN_rand.pod head/crypto/openssl/doc/crypto/BN_set_bit.pod head/crypto/openssl/doc/crypto/X509_VERIFY_PARAM_set_flags.pod head/crypto/openssl/doc/crypto/pem.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod head/crypto/openssl/e_os2.h head/crypto/openssl/engines/Makefile head/crypto/openssl/engines/ccgost/Makefile head/crypto/openssl/engines/ccgost/e_gost_err.c head/crypto/openssl/engines/ccgost/e_gost_err.h head/crypto/openssl/engines/ccgost/gost2001.c head/crypto/openssl/engines/ccgost/gost94_keyx.c head/crypto/openssl/engines/ccgost/gost_ameth.c head/crypto/openssl/engines/ccgost/gost_pmeth.c head/crypto/openssl/engines/ccgost/gost_sign.c head/crypto/openssl/engines/e_sureware.c head/crypto/openssl/ssl/Makefile head/crypto/openssl/ssl/d1_both.c head/crypto/openssl/ssl/d1_clnt.c head/crypto/openssl/ssl/d1_lib.c head/crypto/openssl/ssl/d1_pkt.c head/crypto/openssl/ssl/d1_srvr.c head/crypto/openssl/ssl/s2_pkt.c head/crypto/openssl/ssl/s2_srvr.c head/crypto/openssl/ssl/s3_both.c head/crypto/openssl/ssl/s3_cbc.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_pkt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssl.h head/crypto/openssl/ssl/ssl_err.c head/crypto/openssl/ssl/ssl_lib.c head/crypto/openssl/ssl/ssl_locl.h head/crypto/openssl/ssl/ssl_sess.c head/crypto/openssl/ssl/ssl_stat.c head/crypto/openssl/ssl/ssltest.c head/crypto/openssl/ssl/t1_enc.c head/crypto/openssl/ssl/t1_lib.c head/crypto/openssl/ssl/tls_srp.c head/crypto/openssl/util/mk1mf.pl head/crypto/openssl/util/mkerr.pl head/crypto/openssl/util/pl/BC-32.pl head/crypto/openssl/util/pl/VC-32.pl head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/c_rehash.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/CHANGES Thu Jun 11 19:00:55 2015 (r284283) @@ -2,6 +2,77 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1m and 1.0.1n [11 Jun 2015] + + *) Malformed ECParameters causes infinite loop + + When processing an ECParameters structure OpenSSL enters an infinite loop + if the curve specified is over a specially malformed binary polynomial + field. + + This can be used to perform denial of service against any + system which processes public keys, certificate requests or + certificates. This includes TLS clients and TLS servers with + client authentication enabled. + + This issue was reported to OpenSSL by Joseph Barr-Pixton. + (CVE-2015-1788) + [Andy Polyakov] + + *) Exploitable out-of-bounds read in X509_cmp_time + + X509_cmp_time does not properly check the length of the ASN1_TIME + string and can read a few bytes out of bounds. In addition, + X509_cmp_time accepts an arbitrary number of fractional seconds in the + time string. + + An attacker can use this to craft malformed certificates and CRLs of + various sizes and potentially cause a segmentation fault, resulting in + a DoS on applications that verify certificates or CRLs. TLS clients + that verify CRLs are affected. TLS clients and servers with client + authentication enabled may be affected if they use custom verification + callbacks. + + This issue was reported to OpenSSL by Robert Swiecki (Google), and + independently by Hanno Böck. + (CVE-2015-1789) + [Emilia Käsper] + + *) PKCS7 crash with missing EnvelopedContent + + The PKCS#7 parsing code does not handle missing inner EncryptedContent + correctly. An attacker can craft malformed ASN.1-encoded PKCS#7 blobs + with missing content and trigger a NULL pointer dereference on parsing. + + Applications that decrypt PKCS#7 data or otherwise parse PKCS#7 + structures from untrusted sources are affected. OpenSSL clients and + servers are not affected. + + This issue was reported to OpenSSL by Michal Zalewski (Google). + (CVE-2015-1790) + [Emilia Käsper] + + *) CMS verify infinite loop with unknown hash function + + When verifying a signedData message the CMS code can enter an infinite loop + if presented with an unknown hash function OID. This can be used to perform + denial of service against any system which verifies signedData messages using + the CMS code. + This issue was reported to OpenSSL by Johannes Bauer. + (CVE-2015-1792) + [Stephen Henson] + + *) Race condition handling NewSessionTicket + + If a NewSessionTicket is received by a multi-threaded client when attempting to + reuse a previous ticket then a race condition can occur potentially leading to + a double free of the ticket data. + (CVE-2015-1791) + [Matt Caswell] + + *) Reject DH handshakes with parameters shorter than 768 bits. + [Kurt Roeckx and Emilia Kasper] + Changes between 1.0.1l and 1.0.1m [19 Mar 2015] *) Segmentation fault in ASN1_TYPE_cmp fix Modified: head/crypto/openssl/Configure ============================================================================== --- head/crypto/openssl/Configure Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/Configure Thu Jun 11 19:00:55 2015 (r284283) @@ -230,12 +230,12 @@ my %table=( #### SPARC Solaris with GNU C setups "solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"solaris-sparcv8-gcc","gcc:-mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"solaris-sparcv8-gcc","gcc:-mcpu=v8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # -m32 should be safe to add as long as driver recognizes -mcpu=ultrasparc "solaris-sparcv9-gcc","gcc:-m32 -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "solaris64-sparcv9-gcc","gcc:-m64 -mcpu=ultrasparc -O3 -Wall -DB_ENDIAN::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-fPIC:-m64 -shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/64", #### -"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-solaris-sparcv8-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=v8 -Wall -DB_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-solaris-sparcv9-gcc","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DPEDANTIC -O -g -mcpu=ultrasparc -pedantic -ansi -Wall -Wshadow -Wno-long-long -D__EXTENSIONS__ -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", #### SPARC Solaris with Sun C setups @@ -252,7 +252,7 @@ my %table=( #### SunOS configs, assuming sparc for the gcc one. #"sunos-cc", "cc:-O4 -DNOPROTO -DNOCONST::(unknown):SUNOS::DES_UNROLL:${no_asm}::", -"sunos-gcc","gcc:-O3 -mv8 -Dssize_t=int::(unknown):SUNOS::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:${no_asm}::", +"sunos-gcc","gcc:-O3 -mcpu=v8 -Dssize_t=int::(unknown):SUNOS::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1:${no_asm}::", #### IRIX 5.x configs # -mips2 flag is added by ./config when appropriate. @@ -379,7 +379,7 @@ my %table=( #### SPARC Linux setups # Ray Miller has patiently # assisted with debugging of following two configs. -"linux-sparcv8","gcc:-mv8 -DB_ENDIAN -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"linux-sparcv8","gcc:-mcpu=v8 -DB_ENDIAN -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # it's a real mess with -mcpu=ultrasparc option under Linux, but # -Wa,-Av8plus should do the trick no matter what. "linux-sparcv9","gcc:-m32 -mcpu=ultrasparc -DB_ENDIAN -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -413,7 +413,7 @@ my %table=( "BSD-x86", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "BSD-x86-elf", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-BSD-x86-elf", "gcc:-DL_ENDIAN -O3 -Wall -g::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"BSD-sparcv8", "gcc:-DB_ENDIAN -O3 -mv8 -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${sparcv8_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"BSD-sparcv8", "gcc:-DB_ENDIAN -O3 -mcpu=v8 -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${sparcv8_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "BSD-generic64","gcc:-O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", # -DMD32_REG_T=int doesn't actually belong in sparc64 target, it Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/Makefile Thu Jun 11 19:00:55 2015 (r284283) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1m +VERSION=1.0.1n MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 @@ -186,7 +186,7 @@ WTARFILE= $(NAME)-win.tar EXHEADER= e_os2.h HEADER= e_os.h -all: Makefile build_all openssl.pc libssl.pc libcrypto.pc +all: Makefile build_all # as we stick to -e, CLEARENV ensures that local variables in lower # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn @@ -272,7 +272,10 @@ reflect: sub_all: build_all build_all: build_libs build_apps build_tests build_tools -build_libs: build_crypto build_ssl build_engines +build_libs: build_libcrypto build_libssl openssl.pc + +build_libcrypto: build_crypto build_engines libcrypto.pc +build_libssl: build_ssl libssl.pc build_crypto: @dir=crypto; target=all; $(BUILD_ONE_CMD) @@ -461,6 +464,9 @@ tests: rehash report: @$(PERL) util/selftest.pl +update: errors stacks util/libeay.num util/ssleay.num TABLE + @set -e; target=update; $(RECURSIVE_BUILD_CMD) + depend: @set -e; target=depend; $(RECURSIVE_BUILD_CMD) @@ -485,26 +491,10 @@ util/libeay.num:: util/ssleay.num:: $(PERL) util/mkdef.pl ssl update -crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h - $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h -crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num - $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h -crypto/objects/obj_xref.h: crypto/objects/objxref.pl crypto/objects/obj_xref.txt crypto/objects/obj_mac.num - $(PERL) crypto/objects/objxref.pl crypto/objects/obj_mac.num crypto/objects/obj_xref.txt >crypto/objects/obj_xref.h - -apps/openssl-vms.cnf: apps/openssl.cnf - $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf - -crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl - $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h - - TABLE: Configure (echo 'Output of `Configure TABLE'"':"; \ $(PERL) Configure TABLE) > TABLE -update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h crypto/objects/obj_xref.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend - # Build distribution tar-file. As the list of files returned by "find" is # pretty long, on several platforms a "too many arguments" error or similar # would occur. Therefore the list of files is temporarily stored into a file Modified: head/crypto/openssl/Makefile.org ============================================================================== --- head/crypto/openssl/Makefile.org Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/Makefile.org Thu Jun 11 19:00:55 2015 (r284283) @@ -184,7 +184,7 @@ WTARFILE= $(NAME)-win.tar EXHEADER= e_os2.h HEADER= e_os.h -all: Makefile build_all openssl.pc libssl.pc libcrypto.pc +all: Makefile build_all # as we stick to -e, CLEARENV ensures that local variables in lower # Makefiles remain local and variable. $${VAR+VAR} is tribute to Korn @@ -270,7 +270,10 @@ reflect: sub_all: build_all build_all: build_libs build_apps build_tests build_tools -build_libs: build_crypto build_ssl build_engines +build_libs: build_libcrypto build_libssl openssl.pc + +build_libcrypto: build_crypto build_engines libcrypto.pc +build_libssl: build_ssl libssl.pc build_crypto: @dir=crypto; target=all; $(BUILD_ONE_CMD) @@ -459,6 +462,9 @@ tests: rehash report: @$(PERL) util/selftest.pl +update: errors stacks util/libeay.num util/ssleay.num TABLE + @set -e; target=update; $(RECURSIVE_BUILD_CMD) + depend: @set -e; target=depend; $(RECURSIVE_BUILD_CMD) @@ -483,26 +489,10 @@ util/libeay.num:: util/ssleay.num:: $(PERL) util/mkdef.pl ssl update -crypto/objects/obj_dat.h: crypto/objects/obj_dat.pl crypto/objects/obj_mac.h - $(PERL) crypto/objects/obj_dat.pl crypto/objects/obj_mac.h crypto/objects/obj_dat.h -crypto/objects/obj_mac.h: crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num - $(PERL) crypto/objects/objects.pl crypto/objects/objects.txt crypto/objects/obj_mac.num crypto/objects/obj_mac.h -crypto/objects/obj_xref.h: crypto/objects/objxref.pl crypto/objects/obj_xref.txt crypto/objects/obj_mac.num - $(PERL) crypto/objects/objxref.pl crypto/objects/obj_mac.num crypto/objects/obj_xref.txt >crypto/objects/obj_xref.h - -apps/openssl-vms.cnf: apps/openssl.cnf - $(PERL) VMS/VMSify-conf.pl < apps/openssl.cnf > apps/openssl-vms.cnf - -crypto/bn/bn_prime.h: crypto/bn/bn_prime.pl - $(PERL) crypto/bn/bn_prime.pl >crypto/bn/bn_prime.h - - TABLE: Configure (echo 'Output of `Configure TABLE'"':"; \ $(PERL) Configure TABLE) > TABLE -update: errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h crypto/objects/obj_xref.h apps/openssl-vms.cnf crypto/bn/bn_prime.h TABLE depend - # Build distribution tar-file. As the list of files returned by "find" is # pretty long, on several platforms a "too many arguments" error or similar # would occur. Therefore the list of files is temporarily stored into a file Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/NEWS Thu Jun 11 19:00:55 2015 (r284283) @@ -5,6 +5,14 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1m and OpenSSL 1.0.1n [11 Jun 2015] + + o Malformed ECParameters causes infinite loop (CVE-2015-1788) + o Exploitable out-of-bounds read in X509_cmp_time (CVE-2015-1789) + o PKCS7 crash with missing EnvelopedContent (CVE-2015-1790) + o CMS verify infinite loop with unknown hash function (CVE-2015-1792) + o Race condition handling NewSessionTicket (CVE-2015-1791) + Major changes between OpenSSL 1.0.1l and OpenSSL 1.0.1m [19 Mar 2015] o Segmentation fault in ASN1_TYPE_cmp fix (CVE-2015-0286) Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/README Thu Jun 11 19:00:55 2015 (r284283) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1m 19 Mar 2015 + OpenSSL 1.0.1n 11 Jun 2015 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/apps/Makefile ============================================================================== --- head/crypto/openssl/apps/Makefile Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/Makefile Thu Jun 11 19:00:55 2015 (r284283) @@ -94,6 +94,9 @@ req: sreq.o $(A_OBJ) $(DLIBCRYPTO) sreq.o: req.c $(CC) -c $(INCLUDES) $(CFLAG) -o sreq.o req.c +openssl-vms.cnf: openssl.cnf + $(PERL) $(TOP)/VMS/VMSify-conf.pl < openssl.cnf > openssl-vms.cnf + files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO @@ -127,12 +130,12 @@ links: lint: lint -DLINT $(INCLUDES) $(SRC)>fluff -depend: - @if [ -z "$(THIS)" ]; then \ - $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; \ - else \ - $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(SRC); \ - fi +update: openssl-vms.cnf local_depend + +depend: local_depend + @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi +local_depend: + @[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(SRC); \ dclean: $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new @@ -144,10 +147,10 @@ clean: rm -f req $(DLIBSSL): - (cd ..; $(MAKE) DIRS=ssl all) + (cd ..; $(MAKE) build_libssl) $(DLIBCRYPTO): - (cd ..; $(MAKE) DIRS=crypto all) + (cd ..; $(MAKE) build_libcrypto) $(EXE): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL) $(RM) $(EXE) Modified: head/crypto/openssl/apps/apps.c ============================================================================== --- head/crypto/openssl/apps/apps.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/apps.c Thu Jun 11 19:00:55 2015 (r284283) @@ -572,7 +572,7 @@ int password_callback(char *buf, int buf char *prompt = NULL; prompt = UI_construct_prompt(ui, "pass phrase", prompt_info); - if(!prompt) { + if (!prompt) { BIO_printf(bio_err, "Out of memory\n"); UI_free(ui); return 0; @@ -586,7 +586,7 @@ int password_callback(char *buf, int buf PW_MIN_LENGTH, bufsiz - 1); if (ok >= 0 && verify) { buff = (char *)OPENSSL_malloc(bufsiz); - if(!buff) { + if (!buff) { BIO_printf(bio_err, "Out of memory\n"); UI_free(ui); OPENSSL_free(prompt); @@ -2238,6 +2238,8 @@ int args_verify(char ***pargs, int *parg flags |= X509_V_FLAG_NOTIFY_POLICY; else if (!strcmp(arg, "-check_ss_sig")) flags |= X509_V_FLAG_CHECK_SS_SIGNATURE; + else if (!strcmp(arg, "-no_alt_chains")) + flags |= X509_V_FLAG_NO_ALT_CHAINS; else return 0; Modified: head/crypto/openssl/apps/asn1pars.c ============================================================================== --- head/crypto/openssl/apps/asn1pars.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/asn1pars.c Thu Jun 11 19:00:55 2015 (r284283) @@ -375,7 +375,7 @@ static int do_generate(BIO *bio, char *g { CONF *cnf = NULL; int len; - long errline; + long errline = 0; unsigned char *p; ASN1_TYPE *atyp = NULL; Modified: head/crypto/openssl/apps/ca.c ============================================================================== --- head/crypto/openssl/apps/ca.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/ca.c Thu Jun 11 19:00:55 2015 (r284283) @@ -558,7 +558,7 @@ int MAIN(int argc, char **argv) #ifdef OPENSSL_SYS_VMS len = strlen(s) + sizeof(CONFIG_FILE); tofree = OPENSSL_malloc(len); - if(!tofree) { + if (!tofree) { BIO_printf(bio_err, "Out of memory\n"); goto err; } @@ -566,7 +566,7 @@ int MAIN(int argc, char **argv) #else len = strlen(s) + sizeof(CONFIG_FILE) + 1; tofree = OPENSSL_malloc(len); - if(!tofree) { + if (!tofree) { BIO_printf(bio_err, "Out of memory\n"); goto err; } @@ -2803,7 +2803,7 @@ int unpack_revinfo(ASN1_TIME **prevtm, i ASN1_GENERALIZEDTIME *comp_time = NULL; tmp = BUF_strdup(str); - if(!tmp) { + if (!tmp) { BIO_printf(bio_err, "memory allocation failure\n"); goto err; } @@ -2825,7 +2825,7 @@ int unpack_revinfo(ASN1_TIME **prevtm, i if (prevtm) { *prevtm = ASN1_UTCTIME_new(); - if(!*prevtm) { + if (!*prevtm) { BIO_printf(bio_err, "memory allocation failure\n"); goto err; } @@ -2869,7 +2869,7 @@ int unpack_revinfo(ASN1_TIME **prevtm, i goto err; } comp_time = ASN1_GENERALIZEDTIME_new(); - if(!comp_time) { + if (!comp_time) { BIO_printf(bio_err, "memory allocation failure\n"); goto err; } Modified: head/crypto/openssl/apps/cms.c ============================================================================== --- head/crypto/openssl/apps/cms.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/cms.c Thu Jun 11 19:00:55 2015 (r284283) @@ -581,6 +581,8 @@ int MAIN(int argc, char **argv) "-CApath dir trusted certificates directory\n"); BIO_printf(bio_err, "-CAfile file trusted certificates file\n"); BIO_printf(bio_err, + "-no_alt_chains only ever use the first certificate chain found\n"); + BIO_printf(bio_err, "-crl_check check revocation status of signer's certificate using CRLs\n"); BIO_printf(bio_err, "-crl_check_all check revocation status of signer's certificate chain using CRLs\n"); Modified: head/crypto/openssl/apps/dhparam.c ============================================================================== --- head/crypto/openssl/apps/dhparam.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/dhparam.c Thu Jun 11 19:00:55 2015 (r284283) @@ -130,7 +130,7 @@ # undef PROG # define PROG dhparam_main -# define DEFBITS 512 +# define DEFBITS 2048 /*- * -inform arg - input format - default PEM (DER or PEM) @@ -254,7 +254,7 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, " -5 generate parameters using 5 as the generator value\n"); BIO_printf(bio_err, - " numbits number of bits in to generate (default 512)\n"); + " numbits number of bits in to generate (default 2048)\n"); # ifndef OPENSSL_NO_ENGINE BIO_printf(bio_err, " -engine e use engine e, possibly a hardware device.\n"); Modified: head/crypto/openssl/apps/enc.c ============================================================================== --- head/crypto/openssl/apps/enc.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/enc.c Thu Jun 11 19:00:55 2015 (r284283) @@ -548,9 +548,14 @@ int MAIN(int argc, char **argv) else OPENSSL_cleanse(str, strlen(str)); } - if ((hiv != NULL) && !set_hex(hiv, iv, sizeof iv)) { - BIO_printf(bio_err, "invalid hex iv value\n"); - goto end; + if (hiv != NULL) { + int siz = EVP_CIPHER_iv_length(cipher); + if (siz == 0) { + BIO_printf(bio_err, "warning: iv not use by this cipher\n"); + } else if (!set_hex(hiv, iv, sizeof iv)) { + BIO_printf(bio_err, "invalid hex iv value\n"); + goto end; + } } if ((hiv == NULL) && (str == NULL) && EVP_CIPHER_iv_length(cipher) != 0) { @@ -562,7 +567,7 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "iv undefined\n"); goto end; } - if ((hkey != NULL) && !set_hex(hkey, key, sizeof key)) { + if ((hkey != NULL) && !set_hex(hkey, key, EVP_CIPHER_key_length(cipher))) { BIO_printf(bio_err, "invalid hex key value\n"); goto end; } Modified: head/crypto/openssl/apps/gendh.c ============================================================================== --- head/crypto/openssl/apps/gendh.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/gendh.c Thu Jun 11 19:00:55 2015 (r284283) @@ -80,7 +80,7 @@ # include # include -# define DEFBITS 512 +# define DEFBITS 2048 # undef PROG # define PROG gendh_main Modified: head/crypto/openssl/apps/ocsp.c ============================================================================== --- head/crypto/openssl/apps/ocsp.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/ocsp.c Thu Jun 11 19:00:55 2015 (r284283) @@ -519,6 +519,8 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err, "-CAfile file trusted certificates file\n"); BIO_printf(bio_err, + "-no_alt_chains only ever use the first certificate chain found\n"); + BIO_printf(bio_err, "-VAfile file validator certificates file\n"); BIO_printf(bio_err, "-validity_period n maximum validity discrepancy in seconds\n"); Modified: head/crypto/openssl/apps/s_cb.c ============================================================================== --- head/crypto/openssl/apps/s_cb.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/s_cb.c Thu Jun 11 19:00:55 2015 (r284283) @@ -111,6 +111,7 @@ #include #include +#include /* for memcpy() */ #define USE_SOCKETS #define NON_MAIN #include "apps.h" @@ -747,7 +748,7 @@ int MS_CALLBACK generate_cookie_callback /* Initialize a random secret */ if (!cookie_initialized) { - if (!RAND_bytes(cookie_secret, COOKIE_SECRET_LENGTH)) { + if (RAND_bytes(cookie_secret, COOKIE_SECRET_LENGTH) <= 0) { BIO_printf(bio_err, "error setting random cookie secret\n"); return 0; } Modified: head/crypto/openssl/apps/s_client.c ============================================================================== --- head/crypto/openssl/apps/s_client.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/s_client.c Thu Jun 11 19:00:55 2015 (r284283) @@ -323,6 +323,8 @@ static void sc_usage(void) BIO_printf(bio_err, " -CApath arg - PEM format directory of CA's\n"); BIO_printf(bio_err, " -CAfile arg - PEM format file of CA's\n"); BIO_printf(bio_err, + " -no_alt_chains - only ever use the first certificate chain found\n"); + BIO_printf(bio_err, " -reconnect - Drop and re-make the connection with the same Session-ID\n"); BIO_printf(bio_err, " -pause - sleep(1) after each read(2) and write(2) system call\n"); @@ -547,7 +549,7 @@ static char *MS_CALLBACK ssl_give_srp_cl PW_CB_DATA cb_tmp; int l; - if(!pass) { + if (!pass) { BIO_printf(bio_err, "Malloc failure\n"); return NULL; } @@ -1177,13 +1179,12 @@ int MAIN(int argc, char **argv) if (!set_cert_key_stuff(ctx, cert, key)) goto end; - if ((!SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) || - (!SSL_CTX_set_default_verify_paths(ctx))) { - /* - * BIO_printf(bio_err,"error setting default verify locations\n"); - */ + if ((CAfile || CApath) + && !SSL_CTX_load_verify_locations(ctx, CAfile, CApath)) { + ERR_print_errors(bio_err); + } + if (!SSL_CTX_set_default_verify_paths(ctx)) { ERR_print_errors(bio_err); - /* goto end; */ } #ifndef OPENSSL_NO_TLSEXT if (servername != NULL) { Modified: head/crypto/openssl/apps/s_server.c ============================================================================== --- head/crypto/openssl/apps/s_server.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/s_server.c Thu Jun 11 19:00:55 2015 (r284283) @@ -219,7 +219,7 @@ static int generate_session_id(const SSL unsigned int *id_len); #ifndef OPENSSL_NO_DH static DH *load_dh_param(const char *dhfile); -static DH *get_dh512(void); +static DH *get_dh2048(void); #endif #ifdef MONOLITH @@ -227,30 +227,48 @@ static void s_server_init(void); #endif #ifndef OPENSSL_NO_DH -static unsigned char dh512_p[] = { - 0xDA, 0x58, 0x3C, 0x16, 0xD9, 0x85, 0x22, 0x89, 0xD0, 0xE4, 0xAF, 0x75, - 0x6F, 0x4C, 0xCA, 0x92, 0xDD, 0x4B, 0xE5, 0x33, 0xB8, 0x04, 0xFB, 0x0F, - 0xED, 0x94, 0xEF, 0x9C, 0x8A, 0x44, 0x03, 0xED, 0x57, 0x46, 0x50, 0xD3, - 0x69, 0x99, 0xDB, 0x29, 0xD7, 0x76, 0x27, 0x6B, 0xA2, 0xD3, 0xD4, 0x12, - 0xE2, 0x18, 0xF4, 0xDD, 0x1E, 0x08, 0x4C, 0xF6, 0xD8, 0x00, 0x3E, 0x7C, - 0x47, 0x74, 0xE8, 0x33, +static unsigned char dh2048_p[] = { + 0xF6,0x42,0x57,0xB7,0x08,0x7F,0x08,0x17,0x72,0xA2,0xBA,0xD6, + 0xA9,0x42,0xF3,0x05,0xE8,0xF9,0x53,0x11,0x39,0x4F,0xB6,0xF1, + 0x6E,0xB9,0x4B,0x38,0x20,0xDA,0x01,0xA7,0x56,0xA3,0x14,0xE9, + 0x8F,0x40,0x55,0xF3,0xD0,0x07,0xC6,0xCB,0x43,0xA9,0x94,0xAD, + 0xF7,0x4C,0x64,0x86,0x49,0xF8,0x0C,0x83,0xBD,0x65,0xE9,0x17, + 0xD4,0xA1,0xD3,0x50,0xF8,0xF5,0x59,0x5F,0xDC,0x76,0x52,0x4F, + 0x3D,0x3D,0x8D,0xDB,0xCE,0x99,0xE1,0x57,0x92,0x59,0xCD,0xFD, + 0xB8,0xAE,0x74,0x4F,0xC5,0xFC,0x76,0xBC,0x83,0xC5,0x47,0x30, + 0x61,0xCE,0x7C,0xC9,0x66,0xFF,0x15,0xF9,0xBB,0xFD,0x91,0x5E, + 0xC7,0x01,0xAA,0xD3,0x5B,0x9E,0x8D,0xA0,0xA5,0x72,0x3A,0xD4, + 0x1A,0xF0,0xBF,0x46,0x00,0x58,0x2B,0xE5,0xF4,0x88,0xFD,0x58, + 0x4E,0x49,0xDB,0xCD,0x20,0xB4,0x9D,0xE4,0x91,0x07,0x36,0x6B, + 0x33,0x6C,0x38,0x0D,0x45,0x1D,0x0F,0x7C,0x88,0xB3,0x1C,0x7C, + 0x5B,0x2D,0x8E,0xF6,0xF3,0xC9,0x23,0xC0,0x43,0xF0,0xA5,0x5B, + 0x18,0x8D,0x8E,0xBB,0x55,0x8C,0xB8,0x5D,0x38,0xD3,0x34,0xFD, + 0x7C,0x17,0x57,0x43,0xA3,0x1D,0x18,0x6C,0xDE,0x33,0x21,0x2C, + 0xB5,0x2A,0xFF,0x3C,0xE1,0xB1,0x29,0x40,0x18,0x11,0x8D,0x7C, + 0x84,0xA7,0x0A,0x72,0xD6,0x86,0xC4,0x03,0x19,0xC8,0x07,0x29, + 0x7A,0xCA,0x95,0x0C,0xD9,0x96,0x9F,0xAB,0xD0,0x0A,0x50,0x9B, + 0x02,0x46,0xD3,0x08,0x3D,0x66,0xA4,0x5D,0x41,0x9F,0x9C,0x7C, + 0xBD,0x89,0x4B,0x22,0x19,0x26,0xBA,0xAB,0xA2,0x5E,0xC3,0x55, + 0xE9,0x32,0x0B,0x3B, }; -static unsigned char dh512_g[] = { +static unsigned char dh2048_g[] = { 0x02, }; -static DH *get_dh512(void) +DH *get_dh2048() { - DH *dh = NULL; + DH *dh; if ((dh = DH_new()) == NULL) - return (NULL); - dh->p = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL); - dh->g = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL); - if ((dh->p == NULL) || (dh->g == NULL)) - return (NULL); - return (dh); + return NULL; + dh->p=BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL); + dh->g=BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL); + if (dh->p == NULL || dh->g == NULL) { + DH_free(dh); + return NULL; + } + return dh; } #endif @@ -523,6 +541,8 @@ static void sv_usage(void) BIO_printf(bio_err, " -CApath arg - PEM format directory of CA's\n"); BIO_printf(bio_err, " -CAfile arg - PEM format file of CA's\n"); BIO_printf(bio_err, + " -no_alt_chains - only ever use the first certificate chain found\n"); + BIO_printf(bio_err, " -nocert - Don't use any certificates (Anon-DH)\n"); BIO_printf(bio_err, " -cipher arg - play with 'openssl ciphers' to see what goes here\n"); @@ -720,7 +740,7 @@ static int ebcdic_write(BIO *b, const ch num = inl; wbuf = (EBCDIC_OUTBUFF *) OPENSSL_malloc(sizeof(EBCDIC_OUTBUFF) + num); - if(!wbuf) + if (!wbuf) return 0; OPENSSL_free(b->ptr); @@ -998,7 +1018,7 @@ int MAIN(int argc, char *argv[]) int off = 0; int no_tmp_rsa = 0, no_dhe = 0, nocert = 0; #ifndef OPENSSL_NO_ECDH - int no_ecdhe; + int no_ecdhe = 0; #endif int state = 0; const SSL_METHOD *meth = NULL; @@ -1654,7 +1674,11 @@ int MAIN(int argc, char *argv[]) BIO_printf(bio_s_out, "Setting temp DH parameters\n"); } else { BIO_printf(bio_s_out, "Using default temp DH parameters\n"); - dh = get_dh512(); + dh = get_dh2048(); + if (dh == NULL) { + ERR_print_errors(bio_err); + goto end; + } } (void)BIO_flush(bio_s_out); @@ -2251,8 +2275,10 @@ static int sv_body(char *hostname, int s ret = 1; goto err; } - l += k; - i -= k; + if (k > 0) { + l += k; + i -= k; + } if (i <= 0) break; } @@ -2916,7 +2942,8 @@ static int generate_session_id(const SSL { unsigned int count = 0; do { - RAND_pseudo_bytes(id, *id_len); + if (RAND_pseudo_bytes(id, *id_len) < 0) + return 0; /* * Prefix the session_id with the required prefix. NB: If our prefix * is too long, clip it - but there will be worse effects anyway, eg. Modified: head/crypto/openssl/apps/s_time.c ============================================================================== --- head/crypto/openssl/apps/s_time.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/s_time.c Thu Jun 11 19:00:55 2015 (r284283) @@ -302,7 +302,7 @@ static int parseArgs(int argc, char **ar if (--argc < 1) goto bad; maxTime = atoi(*(++argv)); - if(maxTime <= 0) { + if (maxTime <= 0) { BIO_printf(bio_err, "time must be > 0\n"); badop = 1; } Modified: head/crypto/openssl/apps/smime.c ============================================================================== --- head/crypto/openssl/apps/smime.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/smime.c Thu Jun 11 19:00:55 2015 (r284283) @@ -442,6 +442,8 @@ int MAIN(int argc, char **argv) "-CApath dir trusted certificates directory\n"); BIO_printf(bio_err, "-CAfile file trusted certificates file\n"); BIO_printf(bio_err, + "-no_alt_chains only ever use the first certificate chain found\n"); + BIO_printf(bio_err, "-crl_check check revocation status of signer's certificate using CRLs\n"); BIO_printf(bio_err, "-crl_check_all check revocation status of signer's certificate chain using CRLs\n"); Modified: head/crypto/openssl/apps/srp.c ============================================================================== --- head/crypto/openssl/apps/srp.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/srp.c Thu Jun 11 19:00:55 2015 (r284283) @@ -435,7 +435,7 @@ int MAIN(int argc, char **argv) # ifdef OPENSSL_SYS_VMS len = strlen(s) + sizeof(CONFIG_FILE); tofree = OPENSSL_malloc(len); - if(!tofree) { + if (!tofree) { BIO_printf(bio_err, "Out of memory\n"); goto err; } @@ -443,7 +443,7 @@ int MAIN(int argc, char **argv) # else len = strlen(s) + sizeof(CONFIG_FILE) + 1; tofree = OPENSSL_malloc(len); - if(!tofree) { + if (!tofree) { BIO_printf(bio_err, "Out of memory\n"); goto err; } Modified: head/crypto/openssl/apps/verify.c ============================================================================== --- head/crypto/openssl/apps/verify.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/apps/verify.c Thu Jun 11 19:00:55 2015 (r284283) @@ -227,7 +227,7 @@ int MAIN(int argc, char **argv) if (ret == 1) { BIO_printf(bio_err, "usage: verify [-verbose] [-CApath path] [-CAfile file] [-purpose purpose] [-crl_check]"); - BIO_printf(bio_err, " [-attime timestamp]"); + BIO_printf(bio_err, " [-no_alt_chains] [-attime timestamp]"); #ifndef OPENSSL_NO_ENGINE BIO_printf(bio_err, " [-engine e]"); #endif Modified: head/crypto/openssl/crypto/Makefile ============================================================================== --- head/crypto/openssl/crypto/Makefile Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/crypto/Makefile Thu Jun 11 19:00:55 2015 (r284283) @@ -126,12 +126,17 @@ install: lint: @target=lint; $(RECURSIVE_MAKE) -depend: +update: local_depend + @[ -z "$(THIS)" ] || (set -e; target=update; $(RECURSIVE_MAKE) ) + @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi + +depend: local_depend + @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) ) + @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi +local_depend: @[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist @[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC) @[ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h - @[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) ) - @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi clean: rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff Modified: head/crypto/openssl/crypto/aes/Makefile ============================================================================== --- head/crypto/openssl/crypto/aes/Makefile Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/crypto/aes/Makefile Thu Jun 11 19:00:55 2015 (r284283) @@ -106,6 +106,8 @@ tests: lint: lint -DLINT $(INCLUDES) $(SRC)>fluff +update: depend + depend: @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile... $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) Modified: head/crypto/openssl/crypto/asn1/Makefile ============================================================================== --- head/crypto/openssl/crypto/asn1/Makefile Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/crypto/asn1/Makefile Thu Jun 11 19:00:55 2015 (r284283) @@ -93,6 +93,8 @@ tests: lint: lint -DLINT $(INCLUDES) $(SRC)>fluff +update: depend + depend: @[ -n "$(MAKEDEPEND)" ] # should be set by top Makefile... $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) Modified: head/crypto/openssl/crypto/asn1/a_int.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_int.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/crypto/asn1/a_int.c Thu Jun 11 19:00:55 2015 (r284283) @@ -124,6 +124,8 @@ int i2c_ASN1_INTEGER(ASN1_INTEGER *a, un else { ret = a->length; i = a->data[0]; + if (ret == 1 && i == 0) + neg = 0; if (!neg && (i > 127)) { pad = 1; pb = 0; @@ -162,7 +164,7 @@ int i2c_ASN1_INTEGER(ASN1_INTEGER *a, un p += a->length - 1; i = a->length; /* Copy zeros to destination as long as source is zero */ - while (!*n) { + while (!*n && i > 1) { *(p--) = 0; n--; i--; @@ -419,7 +421,7 @@ ASN1_INTEGER *BN_to_ASN1_INTEGER(const B ASN1err(ASN1_F_BN_TO_ASN1_INTEGER, ERR_R_NESTED_ASN1_ERROR); goto err; } - if (BN_is_negative(bn)) + if (BN_is_negative(bn) && !BN_is_zero(bn)) ret->type = V_ASN1_NEG_INTEGER; else ret->type = V_ASN1_INTEGER; Modified: head/crypto/openssl/crypto/asn1/asn1_gen.c ============================================================================== --- head/crypto/openssl/crypto/asn1/asn1_gen.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/crypto/asn1/asn1_gen.c Thu Jun 11 19:00:55 2015 (r284283) @@ -74,6 +74,8 @@ #define ASN1_GEN_STR(str,val) {str, sizeof(str) - 1, val} #define ASN1_FLAG_EXP_MAX 20 +/* Maximum number of nested sequences */ +#define ASN1_GEN_SEQ_MAX_DEPTH 50 /* Input formats */ @@ -110,13 +112,16 @@ typedef struct { int exp_count; } tag_exp_arg; +static ASN1_TYPE *generate_v3(char *str, X509V3_CTX *cnf, int depth, + int *perr); static int bitstr_cb(const char *elem, int len, void *bitstr); static int asn1_cb(const char *elem, int len, void *bitstr); static int append_exp(tag_exp_arg *arg, int exp_tag, int exp_class, int exp_constructed, int exp_pad, int imp_ok); static int parse_tagging(const char *vstart, int vlen, int *ptag, int *pclass); -static ASN1_TYPE *asn1_multi(int utype, const char *section, X509V3_CTX *cnf); +static ASN1_TYPE *asn1_multi(int utype, const char *section, X509V3_CTX *cnf, + int depth, int *perr); static ASN1_TYPE *asn1_str2type(const char *str, int format, int utype); static int asn1_str2tag(const char *tagstr, int len); @@ -133,6 +138,16 @@ ASN1_TYPE *ASN1_generate_nconf(char *str ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf) { + int err = 0; + ASN1_TYPE *ret = generate_v3(str, cnf, 0, &err); + if (err) + ASN1err(ASN1_F_ASN1_GENERATE_V3, err); + return ret; +} + +static ASN1_TYPE *generate_v3(char *str, X509V3_CTX *cnf, int depth, + int *perr) +{ ASN1_TYPE *ret; tag_exp_arg asn1_tags; tag_exp_type *etmp; @@ -152,17 +167,22 @@ ASN1_TYPE *ASN1_generate_v3(char *str, X asn1_tags.imp_class = -1; asn1_tags.format = ASN1_GEN_FORMAT_ASCII; asn1_tags.exp_count = 0; - if (CONF_parse_list(str, ',', 1, asn1_cb, &asn1_tags) != 0) + if (CONF_parse_list(str, ',', 1, asn1_cb, &asn1_tags) != 0) { + *perr = ASN1_R_UNKNOWN_TAG; return NULL; + } if ((asn1_tags.utype == V_ASN1_SEQUENCE) || (asn1_tags.utype == V_ASN1_SET)) { if (!cnf) { - ASN1err(ASN1_F_ASN1_GENERATE_V3, - ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG); + *perr = ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG; return NULL; } - ret = asn1_multi(asn1_tags.utype, asn1_tags.str, cnf); + if (depth >= ASN1_GEN_SEQ_MAX_DEPTH) { + *perr = ASN1_R_ILLEGAL_NESTED_TAGGING; + return NULL; + } + ret = asn1_multi(asn1_tags.utype, asn1_tags.str, cnf, depth, perr); } else ret = asn1_str2type(asn1_tags.str, asn1_tags.format, asn1_tags.utype); @@ -280,7 +300,7 @@ static int asn1_cb(const char *elem, int int tmp_tag, tmp_class; if (elem == NULL) - return 0; + return -1; for (i = 0, p = elem; i < len; p++, i++) { /* Look for the ':' in name value pairs */ @@ -353,7 +373,7 @@ static int asn1_cb(const char *elem, int break; case ASN1_GEN_FLAG_FORMAT: - if(!vstart) { + if (!vstart) { ASN1err(ASN1_F_ASN1_CB, ASN1_R_UNKNOWN_FORMAT); return -1; } @@ -435,7 +455,8 @@ static int parse_tagging(const char *vst /* Handle multiple types: SET and SEQUENCE */ -static ASN1_TYPE *asn1_multi(int utype, const char *section, X509V3_CTX *cnf) +static ASN1_TYPE *asn1_multi(int utype, const char *section, X509V3_CTX *cnf, + int depth, int *perr) { ASN1_TYPE *ret = NULL; STACK_OF(ASN1_TYPE) *sk = NULL; @@ -454,7 +475,8 @@ static ASN1_TYPE *asn1_multi(int utype, goto bad; for (i = 0; i < sk_CONF_VALUE_num(sect); i++) { ASN1_TYPE *typ = - ASN1_generate_v3(sk_CONF_VALUE_value(sect, i)->value, cnf); + generate_v3(sk_CONF_VALUE_value(sect, i)->value, cnf, + depth + 1, perr); if (!typ) goto bad; if (!sk_ASN1_TYPE_push(sk, typ)) Modified: head/crypto/openssl/crypto/asn1/asn_mime.c ============================================================================== --- head/crypto/openssl/crypto/asn1/asn_mime.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/crypto/asn1/asn_mime.c Thu Jun 11 19:00:55 2015 (r284283) @@ -289,7 +289,8 @@ int SMIME_write_ASN1(BIO *bio, ASN1_VALU if ((flags & SMIME_DETACHED) && data) { /* We want multipart/signed */ /* Generate a random boundary */ - RAND_pseudo_bytes((unsigned char *)bound, 32); + if (RAND_pseudo_bytes((unsigned char *)bound, 32) < 0) + return 0; for (i = 0; i < 32; i++) { c = bound[i] & 0xf; if (c < 10) Modified: head/crypto/openssl/crypto/asn1/bio_ndef.c ============================================================================== --- head/crypto/openssl/crypto/asn1/bio_ndef.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/crypto/asn1/bio_ndef.c Thu Jun 11 19:00:55 2015 (r284283) @@ -162,7 +162,7 @@ static int ndef_prefix(BIO *b, unsigned derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it); p = OPENSSL_malloc(derlen); - if(!p) + if (!p) return 0; ndef_aux->derbuf = p; @@ -232,7 +232,7 @@ static int ndef_suffix(BIO *b, unsigned derlen = ASN1_item_ndef_i2d(ndef_aux->val, NULL, ndef_aux->it); p = OPENSSL_malloc(derlen); - if(!p) + if (!p) return 0; ndef_aux->derbuf = p; Modified: head/crypto/openssl/crypto/asn1/tasn_new.c ============================================================================== --- head/crypto/openssl/crypto/asn1/tasn_new.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/crypto/asn1/tasn_new.c Thu Jun 11 19:00:55 2015 (r284283) @@ -100,9 +100,6 @@ static int asn1_item_ex_combine_new(ASN1 else asn1_cb = 0; - if (!combine) - *pval = NULL; - #ifdef CRYPTO_MDEBUG if (it->sname) CRYPTO_push_info(it->sname); Modified: head/crypto/openssl/crypto/asn1/tasn_prn.c ============================================================================== --- head/crypto/openssl/crypto/asn1/tasn_prn.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/crypto/asn1/tasn_prn.c Thu Jun 11 19:00:55 2015 (r284283) @@ -290,7 +290,7 @@ static int asn1_item_print_ctx(BIO *out, for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) { const ASN1_TEMPLATE *seqtt; seqtt = asn1_do_adb(fld, tt, 1); - if(!seqtt) + if (!seqtt) return 0; tmpfld = asn1_get_field_ptr(fld, seqtt); if (!asn1_template_print_ctx(out, tmpfld, Modified: head/crypto/openssl/crypto/asn1/x_x509.c ============================================================================== --- head/crypto/openssl/crypto/asn1/x_x509.c Thu Jun 11 18:04:49 2015 (r284282) +++ head/crypto/openssl/crypto/asn1/x_x509.c Thu Jun 11 19:00:55 2015 (r284283) @@ -177,7 +177,7 @@ X509 *d2i_X509_AUX(X509 **a, const unsig /* Save start position */ q = *pp; - if(!a || *a == NULL) { + if (!a || *a == NULL) { freeret = 1; } ret = d2i_X509(a, pp, length); @@ -192,7 +192,7 @@ X509 *d2i_X509_AUX(X509 **a, const unsig goto err; return ret; err: - if(freeret) { + if (freeret) { X509_free(ret); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 21:09:06 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EB45DFE; Thu, 11 Jun 2015 21:09:06 +0000 (UTC) (envelope-from sjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C1A2199B; Thu, 11 Jun 2015 21:09:06 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BL956g002833; Thu, 11 Jun 2015 21:09:05 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BL94iH002824; Thu, 11 Jun 2015 21:09:04 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201506112109.t5BL94iH002824@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 11 Jun 2015 21:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284287 - in head/share: colldef mklocale monetdef msgdef numericdef timedef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 21:09:06 -0000 Author: sjg Date: Thu Jun 11 21:09:03 2015 New Revision: 284287 URL: https://svnweb.freebsd.org/changeset/base/284287 Log: Ensure SYMLINKS fully specified Differential Revision: D2748 Reviewed by: brooks Modified: head/share/colldef/Makefile head/share/mklocale/Makefile head/share/monetdef/Makefile head/share/msgdef/Makefile head/share/numericdef/Makefile head/share/timedef/Makefile Modified: head/share/colldef/Makefile ============================================================================== --- head/share/colldef/Makefile Thu Jun 11 19:39:27 2015 (r284286) +++ head/share/colldef/Makefile Thu Jun 11 21:09:03 2015 (r284287) @@ -109,7 +109,7 @@ SYMLINKS= .for enc2 in ${ENCODINGS} .for lang_terr in ${${enc1}_${enc2}} SYMLINKS+= ../${lang_terr:C/:.*$//}.${enc1}/${FILESNAME} \ - ${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2} + ${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2}/${FILESNAME} .endfor .endfor .endfor Modified: head/share/mklocale/Makefile ============================================================================== --- head/share/mklocale/Makefile Thu Jun 11 19:39:27 2015 (r284286) +++ head/share/mklocale/Makefile Thu Jun 11 21:09:03 2015 (r284287) @@ -94,7 +94,7 @@ SYMLINKS= .for enc2 in ${ENCODINGS} .for lang_terr in ${${enc1}_${enc2}} SYMLINKS+= ../${lang_terr:C/:.*$//:C/.+$/&./}${enc1}/${FILESNAME} \ - ${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2} + ${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2}/${FILESNAME} .endfor .endfor .endfor Modified: head/share/monetdef/Makefile ============================================================================== --- head/share/monetdef/Makefile Thu Jun 11 19:39:27 2015 (r284286) +++ head/share/monetdef/Makefile Thu Jun 11 21:09:03 2015 (r284287) @@ -138,7 +138,7 @@ SYMLINKS= .for enc2 in ${ENCODINGS} .for lang_terr in ${${enc1}_${enc2}} SYMLINKS+= ../${lang_terr:C/:.*$//}.${enc1}/${FILESNAME} \ - ${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2} + ${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2}/${FILESNAME} .endfor .endfor .endfor Modified: head/share/msgdef/Makefile ============================================================================== --- head/share/msgdef/Makefile Thu Jun 11 19:39:27 2015 (r284286) +++ head/share/msgdef/Makefile Thu Jun 11 21:09:03 2015 (r284287) @@ -129,7 +129,7 @@ SYMLINKS= .for enc2 in ${ENCODINGS} .for lang_terr in ${${enc1}_${enc2}} SYMLINKS+= ../${lang_terr:C/:.*$//}.${enc1}/${FILESNAME} \ - ${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2} + ${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2}/${FILESNAME} .endfor .endfor .endfor Modified: head/share/numericdef/Makefile ============================================================================== --- head/share/numericdef/Makefile Thu Jun 11 19:39:27 2015 (r284286) +++ head/share/numericdef/Makefile Thu Jun 11 21:09:03 2015 (r284287) @@ -124,7 +124,7 @@ SYMLINKS= .for enc2 in ${ENCODINGS} .for lang_terr in ${${enc1}_${enc2}} SYMLINKS+= ../${lang_terr:C/:.*$//}.${enc1}/${FILESNAME} \ - ${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2} + ${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2}/${FILESNAME} .endfor .endfor .endfor Modified: head/share/timedef/Makefile ============================================================================== --- head/share/timedef/Makefile Thu Jun 11 19:39:27 2015 (r284286) +++ head/share/timedef/Makefile Thu Jun 11 21:09:03 2015 (r284287) @@ -148,7 +148,7 @@ SYMLINKS= .for enc2 in ${ENCODINGS} .for lang_terr in ${${enc1}_${enc2}} SYMLINKS+= ../${lang_terr:C/:.*$//}.${enc1}/${FILESNAME} \ - ${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2} + ${LOCALEDIR}/${lang_terr:C/^.*://}.${enc2}/${FILESNAME} .endfor .endfor .endfor From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 21:11:34 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D33D0F7C; Thu, 11 Jun 2015 21:11:34 +0000 (UTC) (envelope-from sjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A77A31B52; Thu, 11 Jun 2015 21:11:34 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BLBYLR006858; Thu, 11 Jun 2015 21:11:34 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BLBYMx006857; Thu, 11 Jun 2015 21:11:34 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201506112111.t5BLBYMx006857@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 11 Jun 2015 21:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284288 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 21:11:34 -0000 Author: sjg Date: Thu Jun 11 21:11:33 2015 New Revision: 284288 URL: https://svnweb.freebsd.org/changeset/base/284288 Log: Do not override variables on command line that build needs to change. It is sufficient to explicitly set DEPENDFILE in env for each sub-make. Modified: head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.progs.mk ============================================================================== --- head/share/mk/bsd.progs.mk Thu Jun 11 21:09:03 2015 (r284287) +++ head/share/mk/bsd.progs.mk Thu Jun 11 21:11:33 2015 (r284288) @@ -22,14 +22,10 @@ PROGS += ${PROGS_CXX} # In meta mode, we can capture dependenices for _one_ of the progs. # if makefile doesn't nominate one, we use the first. -.if defined(.PARSEDIR) .ifndef UPDATE_DEPENDFILE_PROG UPDATE_DEPENDFILE_PROG = ${PROGS:[1]} .export UPDATE_DEPENDFILE_PROG .endif -.else -UPDATE_DEPENDFILE_PROG?= no -.endif .ifndef PROG # They may have asked us to build just one @@ -62,8 +58,6 @@ UPDATE_DEPENDFILE ?= yes .endif UPDATE_DEPENDFILE ?= NO -# ensure that we don't clobber each other's dependencies -DEPENDFILE?= .depend.${PROG} # prog.mk will do the rest .else all: ${FILES} ${PROGS} ${SCRIPTS} @@ -95,17 +89,17 @@ x.$p= PROG_CXX=$p .endif $p ${p}_p: .PHONY .MAKE - (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p \ - DEPENDFILE=.depend.$p .MAKE.DEPENDFILE=.depend.$p \ - ${x.$p}) + (cd ${.CURDIR} && \ + DEPENDFILE=.depend.$p \ + ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + SUBDIR= PROG=$p ${x.$p}) .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE - (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p \ - DEPENDFILE=.depend.$p .MAKE.DEPENDFILE=.depend.$p \ - ${x.$p} ${@:E}) + (cd ${.CURDIR} && \ + DEPENDFILE=.depend.$p \ + ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + SUBDIR= PROG=$p ${x.$p} ${@:E}) .endfor .endfor From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 21:13:09 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BC3E28C; Thu, 11 Jun 2015 21:13:09 +0000 (UTC) (envelope-from sjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CAAD1BBE; Thu, 11 Jun 2015 21:13:09 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BLD98M007136; Thu, 11 Jun 2015 21:13:09 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BLD6aT007122; Thu, 11 Jun 2015 21:13:06 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201506112113.t5BLD6aT007122@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 11 Jun 2015 21:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284289 - in head: gnu/lib/libreadline/readline gnu/usr.bin/cc/cc_tools gnu/usr.bin/groff include kerberos5 kerberos5/lib/libheimipcc lib/msun tests/sys/pjdfstest/pjdfstest usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 21:13:09 -0000 Author: sjg Date: Thu Jun 11 21:13:05 2015 New Revision: 284289 URL: https://svnweb.freebsd.org/changeset/base/284289 Log: Misc fixes from projects/bmake Differential Revision: D2748 Reviewed by: brooks imp Modified: head/gnu/lib/libreadline/readline/Makefile head/gnu/usr.bin/cc/cc_tools/Makefile head/gnu/usr.bin/groff/Makefile.inc head/include/mk-osreldate.sh head/kerberos5/Makefile.inc head/kerberos5/lib/libheimipcc/Makefile head/lib/msun/Makefile head/tests/sys/pjdfstest/pjdfstest/Makefile head/usr.bin/kdump/mkioctls Modified: head/gnu/lib/libreadline/readline/Makefile ============================================================================== --- head/gnu/lib/libreadline/readline/Makefile Thu Jun 11 21:11:33 2015 (r284288) +++ head/gnu/lib/libreadline/readline/Makefile Thu Jun 11 21:13:05 2015 (r284289) @@ -16,11 +16,15 @@ INSTALLED_HEADERS= readline.h chardefs.h CFLAGS+= -I${.OBJDIR}/.. SRCDIR= ${.CURDIR}/../../../../contrib/libreadline +.NOPATH: ${INSTALLED_HEADERS} + +beforebuild: ${INSTALLED_HEADERS} +CLEANFILES+= ${INSTALLED_HEADERS} +DPSRCS+= ${INSTALLED_HEADERS} + .for _h in ${INSTALLED_HEADERS} -CLEANFILES+= ${_h} -DPSRCS+= ${.OBJDIR}/${_h} -${.OBJDIR}/${_h}: ${SRCDIR}/${_h} - ${INSTALL} ${.ALLSRC} ${.TARGET} +${_h}: ${SRCDIR}/${_h} + ln -sf ${.ALLSRC} ${.TARGET} .endfor LIBADD= ncursesw Modified: head/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/Makefile Thu Jun 11 21:11:33 2015 (r284288) +++ head/gnu/usr.bin/cc/cc_tools/Makefile Thu Jun 11 21:13:05 2015 (r284289) @@ -215,6 +215,9 @@ tconfig.h: GENSRCS+= tconfig.h CLEANFILES+= cs-tconfig.h + +.NOPATH: ${GENSRCS} ${CLEANFILES} + # Options optionlist: ${OPT_FILES} LC_ALL=C awk -f ${GCCDIR}/opt-gather.awk ${.ALLSRC} > ${.TARGET} Modified: head/gnu/usr.bin/groff/Makefile.inc ============================================================================== --- head/gnu/usr.bin/groff/Makefile.inc Thu Jun 11 21:11:33 2015 (r284288) +++ head/gnu/usr.bin/groff/Makefile.inc Thu Jun 11 21:13:05 2015 (r284289) @@ -127,6 +127,7 @@ revision=`sed -e 's/^0$$//' -e 's/^[1-9] .sh .pl: @${ECHO} Making ${.TARGET} from ${.IMPSRC} + @rm -f ${.TARGET} @sed -e "s|@BINDIR@|${BINDIR}|g" \ -e 's|@GROFF_BIN_PATH_SETUP@|GROFF_RUNTIME="$${GROFF_BIN_PATH=${BINDIR}}:"|g' \ -e "s;@FONTDIR@;$(fontdir);g" \ Modified: head/include/mk-osreldate.sh ============================================================================== --- head/include/mk-osreldate.sh Thu Jun 11 21:11:33 2015 (r284288) +++ head/include/mk-osreldate.sh Thu Jun 11 21:13:05 2015 (r284289) @@ -49,4 +49,4 @@ $COPYRIGHT #endif EOF chmod 644 $tmpfile -mv $tmpfile osreldate.h +mv -f $tmpfile osreldate.h Modified: head/kerberos5/Makefile.inc ============================================================================== --- head/kerberos5/Makefile.inc Thu Jun 11 21:11:33 2015 (r284288) +++ head/kerberos5/Makefile.inc Thu Jun 11 21:13:05 2015 (r284289) @@ -34,7 +34,7 @@ ETSRCS= \ .for ET in ${ETSRCS} .for _ET in ${ET:T:R} .if ${SRCS:M${_ET}.[ch]} != "" -.ORDER: ${_ET}.c ${_ET}.h +.ORDER: ${_ET}.h ${_ET}.c ${_ET}.c ${_ET}.h: ${ET} compile_et ${.ALLSRC} CLEANFILES+= ${_ET}.h ${_ET}.c Modified: head/kerberos5/lib/libheimipcc/Makefile ============================================================================== --- head/kerberos5/lib/libheimipcc/Makefile Thu Jun 11 21:11:33 2015 (r284288) +++ head/kerberos5/lib/libheimipcc/Makefile Thu Jun 11 21:13:05 2015 (r284289) @@ -10,7 +10,8 @@ SRCS= \ CFLAGS+= -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/base \ - -I${KRB5DIR}/lib/ipc + -I${KRB5DIR}/lib/ipc \ + -I${KRB5DIR}/include .include Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Thu Jun 11 21:11:33 2015 (r284288) +++ head/lib/msun/Makefile Thu Jun 11 21:13:05 2015 (r284289) @@ -35,6 +35,8 @@ CFLAGS+= -I${.CURDIR}/ld80 CFLAGS+= -I${.CURDIR}/ld128 .endif +CFLAGS+= -I${.CURDIR}/${ARCH_SUBDIR} + .PATH: ${.CURDIR}/bsdsrc .PATH: ${.CURDIR}/src .PATH: ${.CURDIR}/man Modified: head/tests/sys/pjdfstest/pjdfstest/Makefile ============================================================================== --- head/tests/sys/pjdfstest/pjdfstest/Makefile Thu Jun 11 21:11:33 2015 (r284288) +++ head/tests/sys/pjdfstest/pjdfstest/Makefile Thu Jun 11 21:13:05 2015 (r284289) @@ -8,7 +8,7 @@ BINDIR= ${TESTSBASE}/sys/pjdfstest PROG= pjdfstest MAN= -CFLAGS= -D__OS_FreeBSD__ -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_FCHFLAGS +CFLAGS+= -D__OS_FreeBSD__ -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_FCHFLAGS CFLAGS+= -DHAS_CHFLAGSAT -DHAS_LCHFLAGS -DHAS_FREEBSD_ACL -DHAS_BINDAT CFLAGS+= -DHAS_CONNECTAT Modified: head/usr.bin/kdump/mkioctls ============================================================================== --- head/usr.bin/kdump/mkioctls Thu Jun 11 21:11:33 2015 (r284288) +++ head/usr.bin/kdump/mkioctls Thu Jun 11 21:13:05 2015 (r284289) @@ -39,7 +39,7 @@ case "${MACHINE}" in esac awk -v x="$ioctl_includes" 'BEGIN {print x}' | - $CPP -I$1 -dM -DCOMPAT_43TTY - | + $CPP -nostdinc -I$1 -dM -DCOMPAT_43TTY - | awk -v ioctl_includes="$ioctl_includes" -v style="$style" ' BEGIN { print "/* XXX obnoxious prerequisites. */" From owner-svn-src-head@FreeBSD.ORG Thu Jun 11 23:05:50 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76D32C64; Thu, 11 Jun 2015 23:05:50 +0000 (UTC) (envelope-from brueffer@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AA6D17B1; Thu, 11 Jun 2015 23:05:50 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5BN5olQ064457; Thu, 11 Jun 2015 23:05:50 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5BN5ohn064456; Thu, 11 Jun 2015 23:05:50 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201506112305.t5BN5ohn064456@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Thu, 11 Jun 2015 23:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284290 - head/sbin/geom/class/multipath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 23:05:50 -0000 Author: brueffer Date: Thu Jun 11 23:05:49 2015 New Revision: 284290 URL: https://svnweb.freebsd.org/changeset/base/284290 Log: Improve grammar. PR: 200673 Submitted by: Fabian Keil Obtained from: ElectroBSD Modified: head/sbin/geom/class/multipath/gmultipath.8 Modified: head/sbin/geom/class/multipath/gmultipath.8 ============================================================================== --- head/sbin/geom/class/multipath/gmultipath.8 Thu Jun 11 21:13:05 2015 (r284289) +++ head/sbin/geom/class/multipath/gmultipath.8 Thu Jun 11 23:05:49 2015 (r284290) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 18, 2012 +.Dd June 11, 2015 .Dt GMULTIPATH 8 .Os .Sh NAME @@ -253,13 +253,13 @@ This I/O continues until an I/O is retur a generic I/O error or a "Nonexistent Device" error. When this occurs, that path is marked FAIL, the next path in a list is selected as active and the failed I/O reissued. -In Active/Active mode all paths not marked FAIL may handle I/O same time. +In Active/Active mode all paths not marked FAIL may handle I/O at the same time. Requests are distributed between paths to equalize load. -For capable devices it allows to utilize bandwidth of all paths. -In Active/Read mode all paths not marked FAIL may handle reads same time, -but unlike Active/Active only one path handles write requests at any +For capable devices it allows to utilize the bandwidth of all paths. +In Active/Read mode all paths not marked FAIL may handle reads at the same time, +but unlike in Active/Active mode only one path handles write requests at any point in time. -It allows to closer follow original write request order if above layer +It allows to closer follow the original write request order if the layer above needs it for data consistency (not waiting for requisite write completion before sending dependent write). .Pp @@ -269,9 +269,9 @@ GEOM class is given an opportunity to ta If a new device has a .Nm MULTIPATH -on-disk metadata label, the device is used to either create a new +on-disk metadata label, the device is either used to create a new .Nm MULTIPATH -GEOM, or been added the list of paths for an existing +GEOM, or added the list of paths for an existing .Nm MULTIPATH GEOM. .Pp @@ -281,7 +281,7 @@ and .Xr mpt 4 based Fibre Channel disk devices. For these devices, when a device disappears -(due e.g., to a cable pull or power failure to a switch), the device is +(due to e.g., a cable pull or power failure to a switch), the device is proactively marked as gone and I/O to it failed. This causes the .Nm MULTIPATH From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 00:02:32 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43E05554; Fri, 12 Jun 2015 00:02:32 +0000 (UTC) (envelope-from brueffer@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3223E166A; Fri, 12 Jun 2015 00:02:32 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5C02Wui094050; Fri, 12 Jun 2015 00:02:32 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5C02WWx094049; Fri, 12 Jun 2015 00:02:32 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201506120002.t5C02WWx094049@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Fri, 12 Jun 2015 00:02:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284291 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 00:02:32 -0000 Author: brueffer Date: Fri Jun 12 00:02:31 2015 New Revision: 284291 URL: https://svnweb.freebsd.org/changeset/base/284291 Log: Language cleanup. Noticed during wblock's manpage walkthrough at BSDCan 2015. Modified: head/share/man/man4/bwn.4 Modified: head/share/man/man4/bwn.4 ============================================================================== --- head/share/man/man4/bwn.4 Thu Jun 11 23:05:49 2015 (r284290) +++ head/share/man/man4/bwn.4 Fri Jun 12 00:02:31 2015 (r284291) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2011 +.Dd June 11, 2015 .Dt BWN 4 .Os .Sh NAME @@ -69,8 +69,12 @@ The port needs to be installed before .Xr ifconfig 8 will work. -Most cases you need to use bwn_v4_ucode module but if you are a -LP (low power) PHY user please uses bwn_v4_lp_ucode module. +In most cases the +.Pa bwn_v4_ucode +kernel module from the port should be used. +However, if an LP (low power) PHY is being used, the +.Pa bwn_v4_lp_ucode +module should be used. .Sh HARDWARE The .Nm From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 02:16:15 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D39C685; Fri, 12 Jun 2015 02:16:15 +0000 (UTC) (envelope-from araujo@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A9D416B4; Fri, 12 Jun 2015 02:16:15 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5C2GFTm059995; Fri, 12 Jun 2015 02:16:15 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5C2GF1E059994; Fri, 12 Jun 2015 02:16:15 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201506120216.t5C2GF1E059994@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 12 Jun 2015 02:16:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284292 - head/cddl/contrib/opensolaris/cmd/zdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 02:16:15 -0000 Author: araujo (ports committer) Date: Fri Jun 12 02:16:14 2015 New Revision: 284292 URL: https://svnweb.freebsd.org/changeset/base/284292 Log: At revision r247852 accidentally was removed from print the variable obj. While here, declare some global variables as static to silence clang warnings. Differential Revision: D2722 Reviewed by: delphij, mahrens Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri Jun 12 00:02:31 2015 (r284291) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri Jun 12 02:16:14 2015 (r284292) @@ -90,10 +90,10 @@ uint8_t dump_opt[256]; typedef void object_viewer_t(objset_t *, uint64_t, void *data, size_t size); extern void dump_intent_log(zilog_t *); -uint64_t *zopt_object = NULL; -int zopt_objects = 0; -libzfs_handle_t *g_zfs; -uint64_t max_inflight = 1000; +static uint64_t *zopt_object = NULL; +static int zopt_objects = 0; +static libzfs_handle_t *g_zfs; +static uint64_t max_inflight = 1000; /* * These libumem hooks provide a reasonable set of defaults for the allocator's @@ -1488,16 +1488,14 @@ dump_deadlist(dsl_deadlist_t *dl) dle = AVL_NEXT(&dl->dl_tree, dle)) { if (dump_opt['d'] >= 5) { char buf[128]; - (void) snprintf(buf, sizeof (buf), "mintxg %llu -> ", - (longlong_t)dle->dle_mintxg, + (void) snprintf(buf, sizeof (buf), "mintxg %llu -> " + "obj %llu", (longlong_t)dle->dle_mintxg, (longlong_t)dle->dle_bpobj.bpo_object); - dump_bpobj(&dle->dle_bpobj, buf, 0); } else { (void) printf("mintxg %llu -> obj %llu\n", (longlong_t)dle->dle_mintxg, (longlong_t)dle->dle_bpobj.bpo_object); - } } } From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 06:28:23 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7743D42C; Fri, 12 Jun 2015 06:28:23 +0000 (UTC) (envelope-from mjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65E72154A; Fri, 12 Jun 2015 06:28:23 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5C6SNtH084979; Fri, 12 Jun 2015 06:28:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5C6SN5X084978; Fri, 12 Jun 2015 06:28:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201506120628.t5C6SN5X084978@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 12 Jun 2015 06:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284294 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 06:28:23 -0000 Author: mjg Date: Fri Jun 12 06:28:22 2015 New Revision: 284294 URL: https://svnweb.freebsd.org/changeset/base/284294 Log: ussreq: use saved fdp pointer insted of td->td_proc->p_fd No functional changes. Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Fri Jun 12 03:26:05 2015 (r284293) +++ head/sys/kern/uipc_usrreq.c Fri Jun 12 06:28:22 2015 (r284294) @@ -1787,7 +1787,7 @@ unp_externalize(struct mbuf *control, st fdp = (int *) CMSG_DATA(mtod(*controlp, struct cmsghdr *)); if (fdallocn(td, 0, fdp, newfds) != 0) { - FILEDESC_XUNLOCK(td->td_proc->p_fd); + FILEDESC_XUNLOCK(fdesc); error = EMSGSIZE; unp_freerights(fdep, newfds); m_freem(*controlp); From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 07:50:36 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D51F668B; Fri, 12 Jun 2015 07:50:36 +0000 (UTC) (envelope-from royger@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1D0C1AD4; Fri, 12 Jun 2015 07:50:36 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5C7oanx025436; Fri, 12 Jun 2015 07:50:36 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5C7oZ92025431; Fri, 12 Jun 2015 07:50:35 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201506120750.t5C7oZ92025431@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Fri, 12 Jun 2015 07:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284296 - in head/sys: dev/xen/blkback dev/xen/blkfront xen xen/interface/io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 07:50:37 -0000 Author: royger Date: Fri Jun 12 07:50:34 2015 New Revision: 284296 URL: https://svnweb.freebsd.org/changeset/base/284296 Log: xen-blk{front/back}: remove broken FreeBSD extensions The FreeBSD extension adds a new request type, called blkif_segment_block which has a size of 112bytes for both i386 and amd64. This is fine on amd64, since requests have a size of 112B there also. But this is not true for i386, where requests have a size of 108B. So on i386 we basically overrun the ring slot when queuing a request of type blkif_segment_block_t, which is very bad. Remove this extension (including a cleanup of the public blkif.h header file) from blkfront and blkback. Sponsored by: Citrix Systems R&D Tested-by: cperciva Modified: head/sys/dev/xen/blkback/blkback.c head/sys/dev/xen/blkfront/blkfront.c head/sys/dev/xen/blkfront/block.h head/sys/xen/blkif.h head/sys/xen/interface/io/blkif.h Modified: head/sys/dev/xen/blkback/blkback.c ============================================================================== --- head/sys/dev/xen/blkback/blkback.c Fri Jun 12 07:23:55 2015 (r284295) +++ head/sys/dev/xen/blkback/blkback.c Fri Jun 12 07:50:34 2015 (r284296) @@ -85,11 +85,19 @@ __FBSDID("$FreeBSD$"); /*--------------------------- Compile-time Tunables --------------------------*/ /** + * The maximum number of shared memory ring pages we will allow in a + * negotiated block-front/back communication channel. Allow enough + * ring space for all requests to be XBB_MAX_REQUEST_SIZE'd. + */ +#define XBB_MAX_RING_PAGES 32 + +/** * The maximum number of outstanding request blocks (request headers plus * additional segment blocks) we will allow in a negotiated block-front/back * communication channel. */ -#define XBB_MAX_REQUESTS 256 +#define XBB_MAX_REQUESTS \ + __CONST_RING_SIZE(blkif, PAGE_SIZE * XBB_MAX_RING_PAGES) /** * \brief Define to force all I/O to be performed on memory owned by the @@ -148,14 +156,6 @@ static MALLOC_DEFINE(M_XENBLOCKBACK, "xb (XBB_MAX_REQUEST_SIZE / PAGE_SIZE) + 1))) /** - * The maximum number of shared memory ring pages we will allow in a - * negotiated block-front/back communication channel. Allow enough - * ring space for all requests to be XBB_MAX_REQUEST_SIZE'd. - */ -#define XBB_MAX_RING_PAGES \ - BLKIF_RING_PAGES(BLKIF_SEGS_TO_BLOCKS(XBB_MAX_SEGMENTS_PER_REQUEST) \ - * XBB_MAX_REQUESTS) -/** * The maximum number of ring pages that we can allow per request list. * We limit this to the maximum number of segments per request, because * that is already a reasonable number of segments to aggregate. This @@ -1328,7 +1328,7 @@ xbb_queue_response(struct xbb_softc *xbb if (status != BLKIF_RSP_OKAY) xbb->reqs_completed_with_error++; - xbb->rings.common.rsp_prod_pvt += BLKIF_SEGS_TO_BLOCKS(req->nr_pages); + xbb->rings.common.rsp_prod_pvt++; xbb->reqs_queued_for_completion++; @@ -1666,87 +1666,49 @@ xbb_dispatch_io(struct xbb_softc *xbb, s goto send_response; } - block_segs = MIN(nreq->nr_pages, - BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK); + block_segs = nseg; sg = ring_req->seg; last_block_sg = sg + block_segs; - while (1) { - while (sg < last_block_sg) { - KASSERT(seg_idx < - XBB_MAX_SEGMENTS_PER_REQLIST, - ("seg_idx %d is too large, max " - "segs %d\n", seg_idx, - XBB_MAX_SEGMENTS_PER_REQLIST)); - - xbb_sg->first_sect = sg->first_sect; - xbb_sg->last_sect = sg->last_sect; - xbb_sg->nsect = - (int8_t)(sg->last_sect - - sg->first_sect + 1); - - if ((sg->last_sect >= (PAGE_SIZE >> 9)) - || (xbb_sg->nsect <= 0)) { - reqlist->status = BLKIF_RSP_ERROR; - goto send_response; - } - - nr_sects += xbb_sg->nsect; - map->host_addr = xbb_get_gntaddr(reqlist, - seg_idx, /*sector*/0); - KASSERT(map->host_addr + PAGE_SIZE <= - xbb->ring_config.gnt_addr, - ("Host address %#jx len %d overlaps " - "ring address %#jx\n", - (uintmax_t)map->host_addr, PAGE_SIZE, - (uintmax_t)xbb->ring_config.gnt_addr)); - - map->flags = GNTMAP_host_map; - map->ref = sg->gref; - map->dom = xbb->otherend_id; - if (operation == BIO_WRITE) - map->flags |= GNTMAP_readonly; - sg++; - map++; - xbb_sg++; - seg_idx++; - req_seg_idx++; + while (sg < last_block_sg) { + KASSERT(seg_idx < + XBB_MAX_SEGMENTS_PER_REQLIST, + ("seg_idx %d is too large, max " + "segs %d\n", seg_idx, + XBB_MAX_SEGMENTS_PER_REQLIST)); + + xbb_sg->first_sect = sg->first_sect; + xbb_sg->last_sect = sg->last_sect; + xbb_sg->nsect = + (int8_t)(sg->last_sect - + sg->first_sect + 1); + + if ((sg->last_sect >= (PAGE_SIZE >> 9)) + || (xbb_sg->nsect <= 0)) { + reqlist->status = BLKIF_RSP_ERROR; + goto send_response; } - block_segs = MIN(nseg - req_seg_idx, - BLKIF_MAX_SEGMENTS_PER_SEGMENT_BLOCK); - if (block_segs == 0) - break; - - /* - * Fetch the next request block full of SG elements. - * For now, only the spacing between entries is - * different in the different ABIs, not the sg entry - * layout. - */ - req_ring_idx++; - switch (xbb->abi) { - case BLKIF_PROTOCOL_NATIVE: - sg = BLKRING_GET_SEG_BLOCK(&xbb->rings.native, - req_ring_idx); - break; - case BLKIF_PROTOCOL_X86_32: - { - sg = BLKRING_GET_SEG_BLOCK(&xbb->rings.x86_32, - req_ring_idx); - break; - } - case BLKIF_PROTOCOL_X86_64: - { - sg = BLKRING_GET_SEG_BLOCK(&xbb->rings.x86_64, - req_ring_idx); - break; - } - default: - panic("Unexpected blkif protocol ABI."); - /* NOTREACHED */ - } - last_block_sg = sg + block_segs; + nr_sects += xbb_sg->nsect; + map->host_addr = xbb_get_gntaddr(reqlist, + seg_idx, /*sector*/0); + KASSERT(map->host_addr + PAGE_SIZE <= + xbb->ring_config.gnt_addr, + ("Host address %#jx len %d overlaps " + "ring address %#jx\n", + (uintmax_t)map->host_addr, PAGE_SIZE, + (uintmax_t)xbb->ring_config.gnt_addr)); + + map->flags = GNTMAP_host_map; + map->ref = sg->gref; + map->dom = xbb->otherend_id; + if (operation == BIO_WRITE) + map->flags |= GNTMAP_readonly; + sg++; + map++; + xbb_sg++; + seg_idx++; + req_seg_idx++; } /* Convert to the disk's sector size */ @@ -2000,8 +1962,7 @@ xbb_run_queue(void *context, int pending * response be generated before we make room in * the queue for that response. */ - xbb->rings.common.req_cons += - BLKIF_SEGS_TO_BLOCKS(ring_req->nr_segments); + xbb->rings.common.req_cons++; xbb->reqs_received++; cur_size = xbb_count_sects(ring_req); @@ -3091,7 +3052,7 @@ xbb_collect_frontend_info(struct xbb_sof * Protocol defaults valid even if all negotiation fails. */ xbb->ring_config.ring_pages = 1; - xbb->max_request_segments = BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK; + xbb->max_request_segments = BLKIF_MAX_SEGMENTS_PER_REQUEST; xbb->max_request_size = xbb->max_request_segments * PAGE_SIZE; /* @@ -3122,60 +3083,23 @@ xbb_collect_frontend_info(struct xbb_sof * fields. */ ring_page_order = 0; + xbb->max_requests = 32; + (void)xs_scanf(XST_NIL, otherend_path, "ring-page-order", NULL, "%u", &ring_page_order); xbb->ring_config.ring_pages = 1 << ring_page_order; - (void)xs_scanf(XST_NIL, otherend_path, - "num-ring-pages", NULL, "%u", - &xbb->ring_config.ring_pages); ring_size = PAGE_SIZE * xbb->ring_config.ring_pages; xbb->max_requests = BLKIF_MAX_RING_REQUESTS(ring_size); - (void)xs_scanf(XST_NIL, otherend_path, - "max-requests", NULL, "%u", - &xbb->max_requests); - - (void)xs_scanf(XST_NIL, otherend_path, - "max-request-segments", NULL, "%u", - &xbb->max_request_segments); - - (void)xs_scanf(XST_NIL, otherend_path, - "max-request-size", NULL, "%u", - &xbb->max_request_size); - if (xbb->ring_config.ring_pages > XBB_MAX_RING_PAGES) { xenbus_dev_fatal(xbb->dev, EINVAL, "Front-end specified ring-pages of %u " - "exceeds backend limit of %zu. " + "exceeds backend limit of %u. " "Unable to connect.", xbb->ring_config.ring_pages, XBB_MAX_RING_PAGES); return (EINVAL); - } else if (xbb->max_requests > XBB_MAX_REQUESTS) { - xenbus_dev_fatal(xbb->dev, EINVAL, - "Front-end specified max_requests of %u " - "exceeds backend limit of %u. " - "Unable to connect.", - xbb->max_requests, - XBB_MAX_REQUESTS); - return (EINVAL); - } else if (xbb->max_request_segments > XBB_MAX_SEGMENTS_PER_REQUEST) { - xenbus_dev_fatal(xbb->dev, EINVAL, - "Front-end specified max_requests_segments " - "of %u exceeds backend limit of %u. " - "Unable to connect.", - xbb->max_request_segments, - XBB_MAX_SEGMENTS_PER_REQUEST); - return (EINVAL); - } else if (xbb->max_request_size > XBB_MAX_REQUEST_SIZE) { - xenbus_dev_fatal(xbb->dev, EINVAL, - "Front-end specified max_request_size " - "of %u exceeds backend limit of %u. " - "Unable to connect.", - xbb->max_request_size, - XBB_MAX_REQUEST_SIZE); - return (EINVAL); } if (xbb->ring_config.ring_pages == 1) { @@ -3723,18 +3647,6 @@ xbb_attach(device_t dev) return (error); } - /* - * Amazon EC2 client compatility. They refer to max-ring-pages - * instead of to max-ring-page-order. - */ - error = xs_printf(XST_NIL, xenbus_get_node(xbb->dev), - "max-ring-pages", "%zu", XBB_MAX_RING_PAGES); - if (error) { - xbb_attach_failed(xbb, error, "writing %s/max-ring-pages", - xenbus_get_node(xbb->dev)); - return (error); - } - max_ring_page_order = flsl(XBB_MAX_RING_PAGES) - 1; error = xs_printf(XST_NIL, xenbus_get_node(xbb->dev), "max-ring-page-order", "%u", max_ring_page_order); @@ -3744,32 +3656,6 @@ xbb_attach(device_t dev) return (error); } - error = xs_printf(XST_NIL, xenbus_get_node(xbb->dev), - "max-requests", "%u", XBB_MAX_REQUESTS); - if (error) { - xbb_attach_failed(xbb, error, "writing %s/max-requests", - xenbus_get_node(xbb->dev)); - return (error); - } - - error = xs_printf(XST_NIL, xenbus_get_node(xbb->dev), - "max-request-segments", "%u", - XBB_MAX_SEGMENTS_PER_REQUEST); - if (error) { - xbb_attach_failed(xbb, error, "writing %s/max-request-segments", - xenbus_get_node(xbb->dev)); - return (error); - } - - error = xs_printf(XST_NIL, xenbus_get_node(xbb->dev), - "max-request-size", "%u", - XBB_MAX_REQUEST_SIZE); - if (error) { - xbb_attach_failed(xbb, error, "writing %s/max-request-size", - xenbus_get_node(xbb->dev)); - return (error); - } - /* Collect physical device information. */ error = xs_gather(XST_NIL, xenbus_get_otherend_path(xbb->dev), "device-type", NULL, &xbb->dev_type, Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Fri Jun 12 07:23:55 2015 (r284295) +++ head/sys/dev/xen/blkfront/blkfront.c Fri Jun 12 07:50:34 2015 (r284296) @@ -174,7 +174,6 @@ xbd_queue_cb(void *arg, bus_dma_segment_ sc = cm->cm_sc; if (error) { - printf("error %d in xbd_queue_cb\n", error); cm->cm_bp->bio_error = EIO; biodone(cm->cm_bp); xbd_free_command(cm); @@ -191,55 +190,44 @@ xbd_queue_cb(void *arg, bus_dma_segment_ ring_req->nr_segments = nsegs; cm->cm_nseg = nsegs; - block_segs = MIN(nsegs, BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK); + block_segs = MIN(nsegs, BLKIF_MAX_SEGMENTS_PER_REQUEST); sg = ring_req->seg; last_block_sg = sg + block_segs; sg_ref = cm->cm_sg_refs; - while (1) { + while (sg < last_block_sg) { + buffer_ma = segs->ds_addr; + fsect = (buffer_ma & PAGE_MASK) >> XBD_SECTOR_SHFT; + lsect = fsect + (segs->ds_len >> XBD_SECTOR_SHFT) - 1; - while (sg < last_block_sg) { - buffer_ma = segs->ds_addr; - fsect = (buffer_ma & PAGE_MASK) >> XBD_SECTOR_SHFT; - lsect = fsect + (segs->ds_len >> XBD_SECTOR_SHFT) - 1; + KASSERT(lsect <= 7, ("XEN disk driver data cannot " + "cross a page boundary")); - KASSERT(lsect <= 7, ("XEN disk driver data cannot " - "cross a page boundary")); + /* install a grant reference. */ + ref = gnttab_claim_grant_reference(&cm->cm_gref_head); - /* install a grant reference. */ - ref = gnttab_claim_grant_reference(&cm->cm_gref_head); - - /* - * GNTTAB_LIST_END == 0xffffffff, but it is private - * to gnttab.c. - */ - KASSERT(ref != ~0, ("grant_reference failed")); - - gnttab_grant_foreign_access_ref( - ref, - xenbus_get_otherend_id(sc->xbd_dev), - buffer_ma >> PAGE_SHIFT, - ring_req->operation == BLKIF_OP_WRITE); - - *sg_ref = ref; - *sg = (struct blkif_request_segment) { - .gref = ref, - .first_sect = fsect, - .last_sect = lsect - }; - sg++; - sg_ref++; - segs++; - nsegs--; - } - block_segs = MIN(nsegs, BLKIF_MAX_SEGMENTS_PER_SEGMENT_BLOCK); - if (block_segs == 0) - break; + /* + * GNTTAB_LIST_END == 0xffffffff, but it is private + * to gnttab.c. + */ + KASSERT(ref != ~0, ("grant_reference failed")); - sg = BLKRING_GET_SEG_BLOCK(&sc->xbd_ring, - sc->xbd_ring.req_prod_pvt); - sc->xbd_ring.req_prod_pvt++; - last_block_sg = sg + block_segs; + gnttab_grant_foreign_access_ref( + ref, + xenbus_get_otherend_id(sc->xbd_dev), + buffer_ma >> PAGE_SHIFT, + ring_req->operation == BLKIF_OP_WRITE); + + *sg_ref = ref; + *sg = (struct blkif_request_segment) { + .gref = ref, + .first_sect = fsect, + .last_sect = lsect + }; + sg++; + sg_ref++; + segs++; + nsegs--; } if (cm->cm_operation == BLKIF_OP_READ) @@ -396,8 +384,8 @@ xbd_startio(struct xbd_softc *sc) if (sc->xbd_state != XBD_STATE_CONNECTED) return; - while (RING_FREE_REQUESTS(&sc->xbd_ring) >= - sc->xbd_max_request_blocks) { + while (!RING_FULL(&sc->xbd_ring)) { + if (sc->xbd_qfrozen_cnt != 0) break; @@ -450,13 +438,6 @@ xbd_bio_complete(struct xbd_softc *sc, s biodone(bp); } -static int -xbd_completion(struct xbd_command *cm) -{ - gnttab_end_foreign_access_references(cm->cm_nseg, cm->cm_sg_refs); - return (BLKIF_SEGS_TO_BLOCKS(cm->cm_nseg)); -} - static void xbd_int(void *xsc) { @@ -482,7 +463,9 @@ xbd_int(void *xsc) cm = &sc->xbd_shadow[bret->id]; xbd_remove_cm(cm, XBD_Q_BUSY); - i += xbd_completion(cm); + gnttab_end_foreign_access_references(cm->cm_nseg, + cm->cm_sg_refs); + i++; if (cm->cm_operation == BLKIF_OP_READ) op = BUS_DMASYNC_POSTREAD; @@ -1064,11 +1047,9 @@ xbd_initialize(struct xbd_softc *sc) */ max_ring_page_order = 0; sc->xbd_ring_pages = 1; - sc->xbd_max_request_segments = BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK; + sc->xbd_max_request_segments = BLKIF_MAX_SEGMENTS_PER_REQUEST; sc->xbd_max_request_size = XBD_SEGS_TO_SIZE(sc->xbd_max_request_segments); - sc->xbd_max_request_blocks = - BLKIF_SEGS_TO_BLOCKS(sc->xbd_max_request_segments); /* * Protocol negotiation. @@ -1095,24 +1076,10 @@ xbd_initialize(struct xbd_softc *sc) if (sc->xbd_ring_pages < 1) sc->xbd_ring_pages = 1; - sc->xbd_max_requests = - BLKIF_MAX_RING_REQUESTS(sc->xbd_ring_pages * PAGE_SIZE); - (void)xs_scanf(XST_NIL, otherend_path, - "max-requests", NULL, "%" PRIu32, - &sc->xbd_max_requests); - - (void)xs_scanf(XST_NIL, otherend_path, - "max-request-segments", NULL, "%" PRIu32, - &sc->xbd_max_request_segments); - - (void)xs_scanf(XST_NIL, otherend_path, - "max-request-size", NULL, "%" PRIu32, - &sc->xbd_max_request_size); - if (sc->xbd_ring_pages > XBD_MAX_RING_PAGES) { device_printf(sc->xbd_dev, "Back-end specified ring-pages of %u " - "limited to front-end limit of %zu.\n", + "limited to front-end limit of %u.\n", sc->xbd_ring_pages, XBD_MAX_RING_PAGES); sc->xbd_ring_pages = XBD_MAX_RING_PAGES; } @@ -1128,46 +1095,16 @@ xbd_initialize(struct xbd_softc *sc) sc->xbd_ring_pages = new_page_limit; } + sc->xbd_max_requests = + BLKIF_MAX_RING_REQUESTS(sc->xbd_ring_pages * PAGE_SIZE); if (sc->xbd_max_requests > XBD_MAX_REQUESTS) { device_printf(sc->xbd_dev, "Back-end specified max_requests of %u " - "limited to front-end limit of %u.\n", + "limited to front-end limit of %zu.\n", sc->xbd_max_requests, XBD_MAX_REQUESTS); sc->xbd_max_requests = XBD_MAX_REQUESTS; } - if (sc->xbd_max_request_segments > XBD_MAX_SEGMENTS_PER_REQUEST) { - device_printf(sc->xbd_dev, - "Back-end specified max_request_segments of %u " - "limited to front-end limit of %u.\n", - sc->xbd_max_request_segments, - XBD_MAX_SEGMENTS_PER_REQUEST); - sc->xbd_max_request_segments = XBD_MAX_SEGMENTS_PER_REQUEST; - } - - if (sc->xbd_max_request_size > XBD_MAX_REQUEST_SIZE) { - device_printf(sc->xbd_dev, - "Back-end specified max_request_size of %u " - "limited to front-end limit of %u.\n", - sc->xbd_max_request_size, - XBD_MAX_REQUEST_SIZE); - sc->xbd_max_request_size = XBD_MAX_REQUEST_SIZE; - } - - if (sc->xbd_max_request_size > - XBD_SEGS_TO_SIZE(sc->xbd_max_request_segments)) { - device_printf(sc->xbd_dev, - "Back-end specified max_request_size of %u " - "limited to front-end limit of %u. (Too few segments.)\n", - sc->xbd_max_request_size, - XBD_SEGS_TO_SIZE(sc->xbd_max_request_segments)); - sc->xbd_max_request_size = - XBD_SEGS_TO_SIZE(sc->xbd_max_request_segments); - } - - sc->xbd_max_request_blocks = - BLKIF_SEGS_TO_BLOCKS(sc->xbd_max_request_segments); - /* Allocate datastructures based on negotiated values. */ error = bus_dma_tag_create( bus_get_dma_tag(sc->xbd_dev), /* parent */ @@ -1241,36 +1178,6 @@ xbd_initialize(struct xbd_softc *sc) } } - error = xs_printf(XST_NIL, node_path, - "max-requests","%u", - sc->xbd_max_requests); - if (error) { - xenbus_dev_fatal(sc->xbd_dev, error, - "writing %s/max-requests", - node_path); - return; - } - - error = xs_printf(XST_NIL, node_path, - "max-request-segments","%u", - sc->xbd_max_request_segments); - if (error) { - xenbus_dev_fatal(sc->xbd_dev, error, - "writing %s/max-request-segments", - node_path); - return; - } - - error = xs_printf(XST_NIL, node_path, - "max-request-size","%u", - sc->xbd_max_request_size); - if (error) { - xenbus_dev_fatal(sc->xbd_dev, error, - "writing %s/max-request-size", - node_path); - return; - } - error = xs_printf(XST_NIL, node_path, "event-channel", "%u", xen_intr_port(sc->xen_intr_handle)); if (error) { Modified: head/sys/dev/xen/blkfront/block.h ============================================================================== --- head/sys/dev/xen/blkfront/block.h Fri Jun 12 07:23:55 2015 (r284295) +++ head/sys/dev/xen/blkfront/block.h Fri Jun 12 07:50:34 2015 (r284296) @@ -61,11 +61,19 @@ ((size / PAGE_SIZE) + 1) /** + * The maximum number of shared memory ring pages we will allow in a + * negotiated block-front/back communication channel. Allow enough + * ring space for all requests to be XBD_MAX_REQUEST_SIZE'd. + */ +#define XBD_MAX_RING_PAGES 32 + +/** * The maximum number of outstanding requests blocks (request headers plus * additional segment blocks) we will allow in a negotiated block-front/back * communication channel. */ -#define XBD_MAX_REQUESTS 256 +#define XBD_MAX_REQUESTS \ + __CONST_RING_SIZE(blkif, PAGE_SIZE * XBD_MAX_RING_PAGES) /** * The maximum mapped region size per request we will allow in a negotiated @@ -83,15 +91,6 @@ (MIN(BLKIF_MAX_SEGMENTS_PER_REQUEST, \ XBD_SIZE_TO_SEGS(XBD_MAX_REQUEST_SIZE))) -/** - * The maximum number of shared memory ring pages we will allow in a - * negotiated block-front/back communication channel. Allow enough - * ring space for all requests to be XBD_MAX_REQUEST_SIZE'd. - */ -#define XBD_MAX_RING_PAGES \ - BLKIF_RING_PAGES(BLKIF_SEGS_TO_BLOCKS(XBD_MAX_SEGMENTS_PER_REQUEST) \ - * XBD_MAX_REQUESTS) - typedef enum { XBDCF_Q_MASK = 0xFF, /* This command has contributed to xbd_qfrozen_cnt. */ @@ -175,7 +174,6 @@ struct xbd_softc { u_int xbd_ring_pages; uint32_t xbd_max_requests; uint32_t xbd_max_request_segments; - uint32_t xbd_max_request_blocks; uint32_t xbd_max_request_size; grant_ref_t xbd_ring_ref[XBD_MAX_RING_PAGES]; blkif_front_ring_t xbd_ring; Modified: head/sys/xen/blkif.h ============================================================================== --- head/sys/xen/blkif.h Fri Jun 12 07:23:55 2015 (r284295) +++ head/sys/xen/blkif.h Fri Jun 12 07:50:34 2015 (r284296) @@ -46,7 +46,7 @@ struct blkif_x86_32_request { blkif_vdev_t handle; /* only for read/write requests */ uint64_t id; /* private guest value, echoed in resp */ blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ - struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK]; + struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; }; struct blkif_x86_32_response { uint64_t id; /* copied from request */ @@ -64,7 +64,7 @@ struct blkif_x86_64_request { blkif_vdev_t handle; /* only for read/write requests */ uint64_t __attribute__((__aligned__(8))) id; blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ - struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK]; + struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; }; struct blkif_x86_64_response { uint64_t __attribute__((__aligned__(8))) id; @@ -114,7 +114,7 @@ enum blkif_protocol { static void inline blkif_get_x86_32_req(blkif_request_t *dst, blkif_x86_32_request_t *src) { - int i, n = BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK; + int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST; dst->operation = src->operation; dst->nr_segments = src->nr_segments; dst->handle = src->handle; @@ -129,7 +129,7 @@ static void inline blkif_get_x86_32_req( static void inline blkif_get_x86_64_req(blkif_request_t *dst, blkif_x86_64_request_t *src) { - int i, n = BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK; + int i, n = BLKIF_MAX_SEGMENTS_PER_REQUEST; dst->operation = src->operation; dst->nr_segments = src->nr_segments; dst->handle = src->handle; Modified: head/sys/xen/interface/io/blkif.h ============================================================================== --- head/sys/xen/interface/io/blkif.h Fri Jun 12 07:23:55 2015 (r284295) +++ head/sys/xen/interface/io/blkif.h Fri Jun 12 07:50:34 2015 (r284296) @@ -457,21 +457,9 @@ #define BLKIF_OP_DISCARD 5 /* - * Maximum scatter/gather segments associated with a request header block. - * This is carefully chosen so that sizeof(blkif_ring_t) <= PAGE_SIZE. - * NB. This could be 12 if the ring indexes weren't stored in the same page. - */ -#define BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK 11 - -/* - * Maximum scatter/gather segments associated with a segment block. - */ -#define BLKIF_MAX_SEGMENTS_PER_SEGMENT_BLOCK 14 - -/* * Maximum scatter/gather segments per request (header + segment blocks). */ -#define BLKIF_MAX_SEGMENTS_PER_REQUEST 255 +#define BLKIF_MAX_SEGMENTS_PER_REQUEST 11 /* * NB. first_sect and last_sect in blkif_request_segment, as well as @@ -512,22 +500,11 @@ struct blkif_request { blkif_vdev_t handle; /* only for read/write requests */ uint64_t id; /* private guest value, echoed in resp */ blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ - blkif_request_segment_t seg[BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK]; + blkif_request_segment_t seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; }; typedef struct blkif_request blkif_request_t; /* - * A segment block is a ring request structure that contains only - * segment data. - * - * sizeof(struct blkif_segment_block) <= sizeof(struct blkif_request) - */ -struct blkif_segment_block { - blkif_request_segment_t seg[BLKIF_MAX_SEGMENTS_PER_SEGMENT_BLOCK]; -}; -typedef struct blkif_segment_block blkif_segment_block_t; - -/* * Cast to this structure when blkif_request.operation == BLKIF_OP_DISCARD * sizeof(struct blkif_request_discard) <= sizeof(struct blkif_request) */ @@ -564,21 +541,6 @@ typedef struct blkif_response blkif_resp */ DEFINE_RING_TYPES(blkif, struct blkif_request, struct blkif_response); -/* - * Index to, and treat as a segment block, an entry in the ring. - */ -#define BLKRING_GET_SEG_BLOCK(_r, _idx) \ - (((blkif_segment_block_t *)RING_GET_REQUEST(_r, _idx))->seg) - -/* - * The number of ring request blocks required to handle an I/O - * request containing _segs segments. - */ -#define BLKIF_SEGS_TO_BLOCKS(_segs) \ - ((((_segs - BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK) \ - + (BLKIF_MAX_SEGMENTS_PER_SEGMENT_BLOCK - 1)) \ - / BLKIF_MAX_SEGMENTS_PER_SEGMENT_BLOCK) + /*header_block*/1) - #define VDISK_CDROM 0x1 #define VDISK_REMOVABLE 0x2 #define VDISK_READONLY 0x4 From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 10:01:26 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6654A78; Fri, 12 Jun 2015 10:01:26 +0000 (UTC) (envelope-from avg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92E7F1CF2; Fri, 12 Jun 2015 10:01:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CA1Qlp089728; Fri, 12 Jun 2015 10:01:26 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CA1PTm089721; Fri, 12 Jun 2015 10:01:25 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506121001.t5CA1PTm089721@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 12 Jun 2015 10:01:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284297 - in head: cddl/contrib/opensolaris/cmd/lockstat sys/kern sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 10:01:26 -0000 Author: avg Date: Fri Jun 12 10:01:24 2015 New Revision: 284297 URL: https://svnweb.freebsd.org/changeset/base/284297 Log: several lockstat improvements 0. For spin events report time spent spinning, not a loop count. While loop count is much easier and cheaper to obtain it is hard to reason about the reported numbers, espcially for adaptive locks where both spinning and sleeping can happen. So, it's better to compare apples and apples. 1. Teach lockstat about FreeBSD rw locks. This is done in part by changing the corresponding probes and in part by changing what probes lockstat should expect. 2. Teach lockstat that rw locks are adaptive and can spin on FreeBSD. 3. Report lock acquisition events for successful rw try-lock operations. 4. Teach lockstat about FreeBSD sx locks. Reporting of events for those locks completely mirrors rw locks. 5. Report spin and block events before acquisition event. This is behavior documented for the upstream, so it makes sense to stick to it. Note that because of FreeBSD adaptive lock implementations both the spin and block events may be reported for the same acquisition while the upstream reports only one of them. Differential Revision: https://reviews.freebsd.org/D2727 Reviewed by: markj MFC after: 17 days Relnotes: yes Sponsored by: ClusterHQ Modified: head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c head/sys/kern/kern_mutex.c head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c head/sys/sys/lockstat.h Modified: head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c Fri Jun 12 07:50:34 2015 (r284296) +++ head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c Fri Jun 12 10:01:24 2015 (r284297) @@ -157,14 +157,22 @@ static ls_event_info_t g_event_info[LS_M "lockstat:::rw-block", "arg2 != 0 && arg3 == 1" }, { 'C', "Lock", "R/W reader blocked by write wanted", "nsec", "lockstat:::rw-block", "arg2 != 0 && arg3 == 0 && arg4" }, - { 'C', "Lock", "Unknown event (type 8)", "units" }, - { 'C', "Lock", "Unknown event (type 9)", "units" }, - { 'C', "Lock", "Unknown event (type 10)", "units" }, - { 'C', "Lock", "Unknown event (type 11)", "units" }, - { 'C', "Lock", "Unknown event (type 12)", "units" }, - { 'C', "Lock", "Unknown event (type 13)", "units" }, - { 'C', "Lock", "Unknown event (type 14)", "units" }, - { 'C', "Lock", "Unknown event (type 15)", "units" }, + { 'C', "Lock", "R/W writer spin on writer", "nsec", + "lockstat:::rw-spin", "arg2 == 0 && arg3 == 1" }, + { 'C', "Lock", "R/W writer spin on readers", "nsec", + "lockstat:::rw-spin", "arg2 == 0 && arg3 == 0 && arg4" }, + { 'C', "Lock", "R/W reader spin on writer", "nsec", + "lockstat:::rw-spin", "arg2 != 0 && arg3 == 1" }, + { 'C', "Lock", "R/W reader spin on write wanted", "nsec", + "lockstat:::rw-spin", "arg2 != 0 && arg3 == 0 && arg4" }, + { 'C', "Lock", "SX exclusive block", "nsec", + "lockstat:::sx-block", "arg2 == 0" }, + { 'C', "Lock", "SX shared block", "nsec", + "lockstat:::sx-block", "arg2 != 0" }, + { 'C', "Lock", "SX exclusive spin", "nsec", + "lockstat:::sx-spin", "arg2 == 0" }, + { 'C', "Lock", "SX shared spin", "nsec", + "lockstat:::sx-spin", "arg2 != 0" }, { 'C', "Lock", "Unknown event (type 16)", "units" }, { 'C', "Lock", "Unknown event (type 17)", "units" }, { 'C', "Lock", "Unknown event (type 18)", "units" }, @@ -188,13 +196,17 @@ static ls_event_info_t g_event_info[LS_M "lockstat:::spin-release", NULL, "lockstat:::spin-acquire" }, { 'H', "Lock", "R/W writer hold", "nsec", - "lockstat:::rw-release", "arg1 == 0", - "lockstat:::rw-acquire" }, + "lockstat::rw_wunlock:rw-release", NULL, + "lockstat::rw_wlock:rw-acquire" }, { 'H', "Lock", "R/W reader hold", "nsec", - "lockstat:::rw-release", "arg1 != 0", - "lockstat:::rw-acquire" }, - { 'H', "Lock", "Unknown event (type 36)", "units" }, - { 'H', "Lock", "Unknown event (type 37)", "units" }, + "lockstat::rw_runlock:rw-release", NULL, + "lockstat::rw_rlock:rw-acquire" }, + { 'H', "Lock", "SX shared hold", "nsec", + "lockstat::sx_sunlock:sx-release", NULL, + "lockstat::sx_slock:sx-acquire" }, + { 'H', "Lock", "SX exclusive hold", "nsec", + "lockstat::sx_xunlock:sx-release", NULL, + "lockstat::sx_xlock:sx-acquire" }, { 'H', "Lock", "Unknown event (type 38)", "units" }, { 'H', "Lock", "Unknown event (type 39)", "units" }, { 'H', "Lock", "Unknown event (type 40)", "units" }, Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Fri Jun 12 07:50:34 2015 (r284296) +++ head/sys/kern/kern_mutex.c Fri Jun 12 10:01:24 2015 (r284297) @@ -384,6 +384,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, uint64_t spin_cnt = 0; uint64_t sleep_cnt = 0; int64_t sleep_time = 0; + int64_t all_time = 0; #endif if (SCHEDULER_STOPPED()) @@ -414,6 +415,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, CTR4(KTR_LOCK, "_mtx_lock_sleep: %s contested (lock=%p) at %s:%d", m->lock_object.lo_name, (void *)m->mtx_lock, file, line); +#ifdef KDTRACE_HOOKS + all_time -= lockstat_nsecs(); +#endif while (!_mtx_obtain_lock(m, tid)) { #ifdef KDTRACE_HOOKS @@ -517,6 +521,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, sleep_cnt++; #endif } +#ifdef KDTRACE_HOOKS + all_time += lockstat_nsecs(); +#endif #ifdef KTR if (cont_logged) { CTR4(KTR_CONTENTION, @@ -534,7 +541,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, * Only record the loops spinning and not sleeping. */ if (spin_cnt > sleep_cnt) - LOCKSTAT_RECORD1(LS_MTX_LOCK_SPIN, m, (spin_cnt - sleep_cnt)); + LOCKSTAT_RECORD1(LS_MTX_LOCK_SPIN, m, (all_time - sleep_time)); #endif } @@ -574,6 +581,9 @@ _mtx_lock_spin_cookie(volatile uintptr_t int contested = 0; uint64_t waittime = 0; #endif +#ifdef KDTRACE_HOOKS + int64_t spin_time = 0; +#endif if (SCHEDULER_STOPPED()) return; @@ -589,6 +599,9 @@ _mtx_lock_spin_cookie(volatile uintptr_t PMC_SOFT_CALL( , , lock, failed); #endif lock_profile_obtain_lock_failed(&m->lock_object, &contested, &waittime); +#ifdef KDTRACE_HOOKS + spin_time -= lockstat_nsecs(); +#endif while (!_mtx_obtain_lock(m, tid)) { /* Give interrupts a chance while we spin. */ @@ -606,6 +619,9 @@ _mtx_lock_spin_cookie(volatile uintptr_t } spinlock_enter(); } +#ifdef KDTRACE_HOOKS + spin_time += lockstat_nsecs(); +#endif if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spin done", m); @@ -614,7 +630,7 @@ _mtx_lock_spin_cookie(volatile uintptr_t LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_MTX_SPIN_LOCK_ACQUIRE, m, contested, waittime, (file), (line)); - LOCKSTAT_RECORD1(LS_MTX_SPIN_LOCK_SPIN, m, i); + LOCKSTAT_RECORD1(LS_MTX_SPIN_LOCK_SPIN, m, spin_time); } #endif /* SMP */ @@ -629,7 +645,7 @@ thread_lock_flags_(struct thread *td, in uint64_t waittime = 0; #endif #ifdef KDTRACE_HOOKS - uint64_t spin_cnt = 0; + int64_t spin_time = 0; #endif i = 0; @@ -638,6 +654,9 @@ thread_lock_flags_(struct thread *td, in if (SCHEDULER_STOPPED()) return; +#ifdef KDTRACE_HOOKS + spin_time -= lockstat_nsecs(); +#endif for (;;) { retry: spinlock_enter(); @@ -654,9 +673,6 @@ retry: WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); while (!_mtx_obtain_lock(m, tid)) { -#ifdef KDTRACE_HOOKS - spin_cnt++; -#endif if (m->mtx_lock == tid) { m->mtx_recurse++; break; @@ -685,17 +701,17 @@ retry: if (m == td->td_lock) break; __mtx_unlock_spin(m); /* does spinlock_exit() */ + } #ifdef KDTRACE_HOOKS - spin_cnt++; + spin_time += lockstat_nsecs(); #endif - } if (m->mtx_recurse == 0) LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_MTX_SPIN_LOCK_ACQUIRE, m, contested, waittime, (file), (line)); LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, line); WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); - LOCKSTAT_RECORD1(LS_THREAD_LOCK_SPIN, m, spin_cnt); + LOCKSTAT_RECORD1(LS_THREAD_LOCK_SPIN, m, spin_time); } struct mtx * Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Fri Jun 12 07:50:34 2015 (r284296) +++ head/sys/kern/kern_rwlock.c Fri Jun 12 10:01:24 2015 (r284297) @@ -300,6 +300,9 @@ __rw_try_wlock(volatile uintptr_t *c, co if (rval) { WITNESS_LOCK(&rw->lock_object, LOP_EXCLUSIVE | LOP_TRYLOCK, file, line); + if (!rw_recursed(rw)) + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_RW_WLOCK_ACQUIRE, + rw, 0, 0, file, line); curthread->td_locks++; } return (rval); @@ -352,9 +355,11 @@ __rw_rlock(volatile uintptr_t *c, const #endif uintptr_t v; #ifdef KDTRACE_HOOKS + uintptr_t state; uint64_t spin_cnt = 0; uint64_t sleep_cnt = 0; int64_t sleep_time = 0; + int64_t all_time = 0; #endif if (SCHEDULER_STOPPED()) @@ -372,6 +377,10 @@ __rw_rlock(volatile uintptr_t *c, const rw->lock_object.lo_name, file, line)); WITNESS_CHECKORDER(&rw->lock_object, LOP_NEWORDER, file, line, NULL); +#ifdef KDTRACE_HOOKS + all_time -= lockstat_nsecs(); + state = rw->rw_lock; +#endif for (;;) { #ifdef KDTRACE_HOOKS spin_cnt++; @@ -534,7 +543,19 @@ __rw_rlock(volatile uintptr_t *c, const CTR2(KTR_LOCK, "%s: %p resuming from turnstile", __func__, rw); } +#ifdef KDTRACE_HOOKS + all_time += lockstat_nsecs(); + if (sleep_time) + LOCKSTAT_RECORD4(LS_RW_RLOCK_BLOCK, rw, sleep_time, + LOCKSTAT_READER, (state & RW_LOCK_READ) == 0, + (state & RW_LOCK_READ) == 0 ? 0 : RW_READERS(state)); + /* Record only the loops spinning and not sleeping. */ + if (spin_cnt > sleep_cnt) + LOCKSTAT_RECORD4(LS_RW_RLOCK_SPIN, rw, all_time - sleep_time, + LOCKSTAT_READER, (state & RW_LOCK_READ) == 0, + (state & RW_LOCK_READ) == 0 ? 0 : RW_READERS(state)); +#endif /* * TODO: acquire "owner of record" here. Here be turnstile dragons * however. turnstiles don't like owners changing between calls to @@ -546,16 +567,6 @@ __rw_rlock(volatile uintptr_t *c, const WITNESS_LOCK(&rw->lock_object, 0, file, line); curthread->td_locks++; curthread->td_rw_rlocks++; -#ifdef KDTRACE_HOOKS - if (sleep_time) - LOCKSTAT_RECORD1(LS_RW_RLOCK_BLOCK, rw, sleep_time); - - /* - * Record only the loops spinning and not sleeping. - */ - if (spin_cnt > sleep_cnt) - LOCKSTAT_RECORD1(LS_RW_RLOCK_SPIN, rw, (spin_cnt - sleep_cnt)); -#endif } int @@ -583,6 +594,8 @@ __rw_try_rlock(volatile uintptr_t *c, co LOCK_LOG_TRY("RLOCK", &rw->lock_object, 0, 1, file, line); WITNESS_LOCK(&rw->lock_object, LOP_TRYLOCK, file, line); + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_RW_RLOCK_ACQUIRE, + rw, 0, 0, file, line); curthread->td_locks++; curthread->td_rw_rlocks++; return (1); @@ -727,9 +740,11 @@ __rw_wlock_hard(volatile uintptr_t *c, u int contested = 0; #endif #ifdef KDTRACE_HOOKS + uintptr_t state; uint64_t spin_cnt = 0; uint64_t sleep_cnt = 0; int64_t sleep_time = 0; + int64_t all_time = 0; #endif if (SCHEDULER_STOPPED()) @@ -751,6 +766,10 @@ __rw_wlock_hard(volatile uintptr_t *c, u CTR5(KTR_LOCK, "%s: %s contested (lock=%p) at %s:%d", __func__, rw->lock_object.lo_name, (void *)rw->rw_lock, file, line); +#ifdef KDTRACE_HOOKS + all_time -= lockstat_nsecs(); + state = rw->rw_lock; +#endif while (!_rw_write_lock(rw, tid)) { #ifdef KDTRACE_HOOKS spin_cnt++; @@ -888,18 +907,21 @@ __rw_wlock_hard(volatile uintptr_t *c, u spintries = 0; #endif } - LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_RW_WLOCK_ACQUIRE, rw, contested, - waittime, file, line); #ifdef KDTRACE_HOOKS + all_time += lockstat_nsecs(); if (sleep_time) - LOCKSTAT_RECORD1(LS_RW_WLOCK_BLOCK, rw, sleep_time); + LOCKSTAT_RECORD4(LS_RW_WLOCK_BLOCK, rw, sleep_time, + LOCKSTAT_WRITER, (state & RW_LOCK_READ) == 0, + (state & RW_LOCK_READ) == 0 ? 0 : RW_READERS(state)); - /* - * Record only the loops spinning and not sleeping. - */ + /* Record only the loops spinning and not sleeping. */ if (spin_cnt > sleep_cnt) - LOCKSTAT_RECORD1(LS_RW_WLOCK_SPIN, rw, (spin_cnt - sleep_cnt)); + LOCKSTAT_RECORD4(LS_RW_WLOCK_SPIN, rw, all_time - sleep_time, + LOCKSTAT_READER, (state & RW_LOCK_READ) == 0, + (state & RW_LOCK_READ) == 0 ? 0 : RW_READERS(state)); #endif + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_RW_WLOCK_ACQUIRE, rw, contested, + waittime, file, line); } /* Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Fri Jun 12 07:50:34 2015 (r284296) +++ head/sys/kern/kern_sx.c Fri Jun 12 10:01:24 2015 (r284297) @@ -288,6 +288,8 @@ sx_try_slock_(struct sx *sx, const char if (atomic_cmpset_acq_ptr(&sx->sx_lock, x, x + SX_ONE_SHARER)) { LOCK_LOG_TRY("SLOCK", &sx->lock_object, 0, 1, file, line); WITNESS_LOCK(&sx->lock_object, LOP_TRYLOCK, file, line); + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_SX_SLOCK_ACQUIRE, + sx, 0, 0, file, line); curthread->td_locks++; return (1); } @@ -348,6 +350,9 @@ sx_try_xlock_(struct sx *sx, const char if (rval) { WITNESS_LOCK(&sx->lock_object, LOP_EXCLUSIVE | LOP_TRYLOCK, file, line); + if (!sx_recursed(sx)) + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_SX_XLOCK_ACQUIRE, + sx, 0, 0, file, line); curthread->td_locks++; } @@ -509,9 +514,11 @@ _sx_xlock_hard(struct sx *sx, uintptr_t #endif int error = 0; #ifdef KDTRACE_HOOKS + uintptr_t state; uint64_t spin_cnt = 0; uint64_t sleep_cnt = 0; int64_t sleep_time = 0; + int64_t all_time = 0; #endif if (SCHEDULER_STOPPED()) @@ -533,6 +540,10 @@ _sx_xlock_hard(struct sx *sx, uintptr_t CTR5(KTR_LOCK, "%s: %s contested (lock=%p) at %s:%d", __func__, sx->lock_object.lo_name, (void *)sx->sx_lock, file, line); +#ifdef KDTRACE_HOOKS + all_time -= lockstat_nsecs(); + state = sx->sx_lock; +#endif while (!atomic_cmpset_acq_ptr(&sx->sx_lock, SX_LOCK_UNLOCKED, tid)) { #ifdef KDTRACE_HOOKS spin_cnt++; @@ -705,17 +716,21 @@ _sx_xlock_hard(struct sx *sx, uintptr_t CTR2(KTR_LOCK, "%s: %p resuming from sleep queue", __func__, sx); } - - GIANT_RESTORE(); - if (!error) - LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_SX_XLOCK_ACQUIRE, sx, - contested, waittime, file, line); #ifdef KDTRACE_HOOKS + all_time += lockstat_nsecs(); if (sleep_time) - LOCKSTAT_RECORD1(LS_SX_XLOCK_BLOCK, sx, sleep_time); + LOCKSTAT_RECORD4(LS_SX_XLOCK_BLOCK, sx, sleep_time, + LOCKSTAT_WRITER, (state & SX_LOCK_SHARED) == 0, + (state & SX_LOCK_SHARED) == 0 ? 0 : SX_SHARERS(state)); if (spin_cnt > sleep_cnt) - LOCKSTAT_RECORD1(LS_SX_XLOCK_SPIN, sx, (spin_cnt - sleep_cnt)); + LOCKSTAT_RECORD4(LS_SX_XLOCK_SPIN, sx, all_time - sleep_time, + LOCKSTAT_WRITER, (state & SX_LOCK_SHARED) == 0, + (state & SX_LOCK_SHARED) == 0 ? 0 : SX_SHARERS(state)); #endif + if (!error) + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_SX_XLOCK_ACQUIRE, sx, + contested, waittime, file, line); + GIANT_RESTORE(); return (error); } @@ -801,14 +816,21 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x; int error = 0; #ifdef KDTRACE_HOOKS + uintptr_t state; uint64_t spin_cnt = 0; uint64_t sleep_cnt = 0; int64_t sleep_time = 0; + int64_t all_time = 0; #endif if (SCHEDULER_STOPPED()) return (0); +#ifdef KDTRACE_HOOKS + state = sx->sx_lock; + all_time -= lockstat_nsecs(); +#endif + /* * As with rwlocks, we don't make any attempt to try to block * shared locks once there is an exclusive waiter. @@ -958,15 +980,20 @@ _sx_slock_hard(struct sx *sx, int opts, CTR2(KTR_LOCK, "%s: %p resuming from sleep queue", __func__, sx); } - if (error == 0) - LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_SX_SLOCK_ACQUIRE, sx, - contested, waittime, file, line); #ifdef KDTRACE_HOOKS + all_time += lockstat_nsecs(); if (sleep_time) - LOCKSTAT_RECORD1(LS_SX_XLOCK_BLOCK, sx, sleep_time); + LOCKSTAT_RECORD4(LS_SX_SLOCK_BLOCK, sx, sleep_time, + LOCKSTAT_READER, (state & SX_LOCK_SHARED) == 0, + (state & SX_LOCK_SHARED) == 0 ? 0 : SX_SHARERS(state)); if (spin_cnt > sleep_cnt) - LOCKSTAT_RECORD1(LS_SX_XLOCK_SPIN, sx, (spin_cnt - sleep_cnt)); + LOCKSTAT_RECORD4(LS_SX_SLOCK_SPIN, sx, all_time - sleep_time, + LOCKSTAT_READER, (state & SX_LOCK_SHARED) == 0, + (state & SX_LOCK_SHARED) == 0 ? 0 : SX_SHARERS(state)); #endif + if (error == 0) + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_SX_SLOCK_ACQUIRE, sx, + contested, waittime, file, line); GIANT_RESTORE(); return (error); } Modified: head/sys/sys/lockstat.h ============================================================================== --- head/sys/sys/lockstat.h Fri Jun 12 07:50:34 2015 (r284296) +++ head/sys/sys/lockstat.h Fri Jun 12 10:01:24 2015 (r284297) @@ -198,6 +198,9 @@ extern uint64_t lockstat_nsecs(void); (*lockstat_probe_func)(id, (uintptr_t)(lp), 0, 0, 0, 0); \ } while (0) +#define LOCKSTAT_WRITER 0 +#define LOCKSTAT_READER 1 + #else /* !KDTRACE_HOOKS */ #define LOCKSTAT_RECORD(probe, lp, arg1) From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 10:08:29 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC1ADD36; Fri, 12 Jun 2015 10:08:29 +0000 (UTC) (envelope-from avg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0BC71E46; Fri, 12 Jun 2015 10:08:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CA8TcC093069; Fri, 12 Jun 2015 10:08:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CA8TmU093068; Fri, 12 Jun 2015 10:08:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506121008.t5CA8TmU093068@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 12 Jun 2015 10:08:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284298 - head/sys/cddl/contrib/opensolaris X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 10:08:30 -0000 Author: avg Date: Fri Jun 12 10:08:29 2015 New Revision: 284298 URL: https://svnweb.freebsd.org/changeset/base/284298 Log: MFV r284037: 5912 full stream can not be force-received into a dataset if it has a snapshot illumos/illumos-gate@5bae108fe2364722de3aa86e04966a0d33fd027a This is a record only commit, the change is already in FreeBSD: r283525 Modified: Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 10:11:26 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8167EB7; Fri, 12 Jun 2015 10:11:26 +0000 (UTC) (envelope-from avg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DF991F34; Fri, 12 Jun 2015 10:11:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CABQ8W096138; Fri, 12 Jun 2015 10:11:26 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CABQQh096136; Fri, 12 Jun 2015 10:11:26 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506121011.t5CABQQh096136@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 12 Jun 2015 10:11:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284299 - head/sys/cddl/contrib/opensolaris X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 10:11:26 -0000 Author: avg Date: Fri Jun 12 10:11:25 2015 New Revision: 284299 URL: https://svnweb.freebsd.org/changeset/base/284299 Log: MFV r284038: 5870 dmu_recv_end_check() leaks origin_head hold if error happens in drc_force branch illumos/illumos-gate@beddaa9ce797b9deaafc22b4f156d23f9b45c32d This is a record-only commit, the change is already in FreeBSD: r282473 Modified: Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 10:25:36 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2947B1D5; Fri, 12 Jun 2015 10:25:36 +0000 (UTC) (envelope-from avg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F193112DE; Fri, 12 Jun 2015 10:25:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CAPZK7002685; Fri, 12 Jun 2015 10:25:35 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CAPZOA002684; Fri, 12 Jun 2015 10:25:35 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506121025.t5CAPZOA002684@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 12 Jun 2015 10:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284300 - head/sys/cddl/contrib/opensolaris X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 10:25:36 -0000 Author: avg Date: Fri Jun 12 10:25:35 2015 New Revision: 284300 URL: https://svnweb.freebsd.org/changeset/base/284300 Log: MFV r284039: 5909 ensure that shared snap names don't become too long after promotion illumos/illumos-gate@cb5842f8b0caaad0ed53535bd77042e933fdbafe This is a record-only commit, the change is already in FreeBSD: r283524 Modified: Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 10:41:25 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7904AA91; Fri, 12 Jun 2015 10:41:25 +0000 (UTC) (envelope-from avg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CC8C1805; Fri, 12 Jun 2015 10:41:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CAfPTH012079; Fri, 12 Jun 2015 10:41:25 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CAfOr3012077; Fri, 12 Jun 2015 10:41:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506121041.t5CAfOr3012077@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 12 Jun 2015 10:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284301 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 10:41:25 -0000 Author: avg Date: Fri Jun 12 10:41:24 2015 New Revision: 284301 URL: https://svnweb.freebsd.org/changeset/base/284301 Log: MFV r284040: check that datasets are snapshots 5946 zfs_ioc_space_snaps must check that firstsnap and lastsnap refer to snapshots 5945 zfs_ioc_send_space must ensure that fromsnap refers to a snapshot Reviewed by: Steven Hartland Reviewed by: Matthew Ahrens Approved by: Gordon Ross illumos/illumos-gate@24218bebb460e4015fac2c9f2cec1902eddbcd7b Note that the upstream commit is modified during MFV: in the upstream the check is done by inspecting ds_is_snapshot field while in FreeBSD we call dsl_dataset_is_snapshot(). This is because illumos/illumos-gate@bc9014e6a81272073b9854d9f65dd59e18d18c35 (r277428 in vendor-sys/illumos) is not MFV-ed yet. MFC after: 10 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Fri Jun 12 10:25:35 2015 (r284300) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Fri Jun 12 10:41:24 2015 (r284301) @@ -855,6 +855,10 @@ dmu_send_estimate(dsl_dataset_t *ds, dsl if (!dsl_dataset_is_snapshot(ds)) return (SET_ERROR(EINVAL)); + /* fromsnap, if provided, must be a snapshot */ + if (fromds != NULL && !dsl_dataset_is_snapshot(fromds)) + return (SET_ERROR(EINVAL)); + /* * fromsnap must be an earlier snapshot from the same fs as tosnap, * or the origin's fs. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 12 10:25:35 2015 (r284300) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 12 10:41:24 2015 (r284301) @@ -5362,11 +5362,19 @@ zfs_ioc_space_snaps(const char *lastsnap return (error); error = dsl_dataset_hold(dp, lastsnap, FTAG, &new); + if (error == 0 && !dsl_dataset_is_snapshot(new)) { + dsl_dataset_rele(new, FTAG); + error = SET_ERROR(EINVAL); + } if (error != 0) { dsl_pool_rele(dp, FTAG); return (error); } error = dsl_dataset_hold(dp, firstsnap, FTAG, &old); + if (error == 0 && !dsl_dataset_is_snapshot(old)) { + dsl_dataset_rele(old, FTAG); + error = SET_ERROR(EINVAL); + } if (error != 0) { dsl_dataset_rele(new, FTAG); dsl_pool_rele(dp, FTAG); From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 10:52:54 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 290A7F34; Fri, 12 Jun 2015 10:52:54 +0000 (UTC) (envelope-from avg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F28E51C30; Fri, 12 Jun 2015 10:52:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CAqrGL017355; Fri, 12 Jun 2015 10:52:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CAqrmX017354; Fri, 12 Jun 2015 10:52:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506121052.t5CAqrmX017354@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 12 Jun 2015 10:52:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284303 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 10:52:54 -0000 Author: avg Date: Fri Jun 12 10:52:53 2015 New Revision: 284303 URL: https://svnweb.freebsd.org/changeset/base/284303 Log: MFV r283534: 5515 dataset user hold doesn't reject empty tags illumos/illumos-gate@752fd8dabccac68d6d09f82f3bf3561e055e400b Author: Josef 'Jeff' Sipek MFC after: 10 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 12 10:50:31 2015 (r284302) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Jun 12 10:52:53 2015 (r284303) @@ -25,12 +25,11 @@ * All rights reserved. * Copyright 2013 Martin Matuska . All rights reserved. * Copyright 2014 Xin Li . All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. - * Copyright (c) 2014, Nexenta Systems, Inc. All rights reserved. */ /* @@ -5240,6 +5239,7 @@ zfs_ioc_smb_acl(zfs_cmd_t *zc) static int zfs_ioc_hold(const char *pool, nvlist_t *args, nvlist_t *errlist) { + nvpair_t *pair; nvlist_t *holds; int cleanup_fd = -1; int error; @@ -5249,6 +5249,19 @@ zfs_ioc_hold(const char *pool, nvlist_t if (error != 0) return (SET_ERROR(EINVAL)); + /* make sure the user didn't pass us any invalid (empty) tags */ + for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL; + pair = nvlist_next_nvpair(holds, pair)) { + char *htag; + + error = nvpair_value_string(pair, &htag); + if (error != 0) + return (SET_ERROR(error)); + + if (strlen(htag) == 0) + return (SET_ERROR(EINVAL)); + } + if (nvlist_lookup_int32(args, "cleanup_fd", &cleanup_fd) == 0) { error = zfs_onexit_fd_hold(cleanup_fd, &minor); if (error != 0) From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 10:57:07 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C77FF1C5; Fri, 12 Jun 2015 10:57:07 +0000 (UTC) (envelope-from avg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B34801CAC; Fri, 12 Jun 2015 10:57:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CAv7MD018021; Fri, 12 Jun 2015 10:57:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CAv5f3018007; Fri, 12 Jun 2015 10:57:05 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506121057.t5CAv5f3018007@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 12 Jun 2015 10:57:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284304 - in head: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 10:57:07 -0000 Author: avg Date: Fri Jun 12 10:57:05 2015 New Revision: 284304 URL: https://svnweb.freebsd.org/changeset/base/284304 Log: MFV r284030: 5818 zfs {ref}compressratio is incorrect with 4k sector size illumos/illumos-gate@81cd5c555f505484180a62ca5a2fbb00d70c57d6 Author: Matthew Ahrens MFC after: 17 days Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Fri Jun 12 10:52:53 2015 (r284303) +++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c Fri Jun 12 10:57:05 2015 (r284304) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -969,21 +969,6 @@ ztest_random_spa_version(uint64_t initia return (version); } -/* - * Find the largest ashift used - */ -static uint64_t -ztest_spa_get_ashift() { - uint64_t i; - uint64_t ashift = SPA_MINBLOCKSHIFT; - vdev_t *rvd = ztest_spa->spa_root_vdev; - - for (i = 0; i < rvd->vdev_children; i++) { - ashift = MAX(ashift, rvd->vdev_child[i]->vdev_ashift); - } - return (ashift); -} - static int ztest_random_blocksize(void) { @@ -995,7 +980,7 @@ ztest_random_blocksize(void) int maxbs = SPA_OLD_MAXBLOCKSHIFT; if (spa_maxblocksize(ztest_spa) == SPA_MAXBLOCKSIZE) maxbs = 20; - block_shift = ztest_random(maxbs - ztest_spa_get_ashift() + 1); + block_shift = ztest_random(maxbs - ztest_spa->spa_max_ashift + 1); return (1 << (SPA_MINBLOCKSHIFT + block_shift)); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri Jun 12 10:52:53 2015 (r284303) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri Jun 12 10:57:05 2015 (r284304) @@ -2256,6 +2256,8 @@ spa_load_impl(spa_t *spa, uint64_t pool_ return (error); ASSERT(spa->spa_root_vdev == rvd); + ASSERT3U(spa->spa_min_ashift, >=, SPA_MINBLOCKSHIFT); + ASSERT3U(spa->spa_max_ashift, <=, SPA_MAXBLOCKSHIFT); if (type != SPA_IMPORT_ASSEMBLE) { ASSERT(spa_guid(spa) == pool_guid); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Jun 12 10:52:53 2015 (r284303) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Fri Jun 12 10:57:05 2015 (r284304) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright 2013 Martin Matuska . All rights reserved. */ @@ -719,6 +719,9 @@ spa_add(const char *name, nvlist_t *conf spa->spa_debug = ((zfs_flags & ZFS_DEBUG_SPA) != 0); + spa->spa_min_ashift = INT_MAX; + spa->spa_max_ashift = 0; + /* * As a pool is being created, treat all features as disabled by * setting SPA_FEATURE_DISABLED for all entries in the feature Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Fri Jun 12 10:52:53 2015 (r284303) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h Fri Jun 12 10:57:05 2015 (r284304) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright 2013 Martin Matuska . All rights reserved. */ @@ -147,6 +147,8 @@ struct spa { objset_t *spa_meta_objset; /* copy of dp->dp_meta_objset */ txg_list_t spa_vdev_txg_list; /* per-txg dirty vdev list */ vdev_t *spa_root_vdev; /* top-level vdev container */ + int spa_min_ashift; /* of vdevs in normal class */ + int spa_max_ashift; /* of vdevs in normal class */ uint64_t spa_config_guid; /* config pool guid */ uint64_t spa_load_guid; /* spa_load initialized guid */ uint64_t spa_last_synced_guid; /* last synced guid */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Fri Jun 12 10:52:53 2015 (r284303) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Fri Jun 12 10:57:05 2015 (r284304) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. */ #ifndef _SYS_VDEV_IMPL_H @@ -225,7 +225,7 @@ struct vdev { boolean_t vdev_isl2cache; /* was a l2cache device */ vdev_queue_t vdev_queue; /* I/O deadline schedule queue */ vdev_cache_t vdev_cache; /* physical block cache */ - spa_aux_vdev_t *vdev_aux; /* for l2cache vdevs */ + spa_aux_vdev_t *vdev_aux; /* for l2cache and spares vdevs */ zio_t *vdev_probe_zio; /* root of current probe */ vdev_aux_t vdev_label_aux; /* on-disk aux state */ struct trim_map *vdev_trimmap; /* map on outstanding trims */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri Jun 12 10:52:53 2015 (r284303) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri Jun 12 10:57:05 2015 (r284304) @@ -21,8 +21,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright 2013 Martin Matuska . All rights reserved. */ @@ -278,8 +278,9 @@ vdev_add_child(vdev_t *pvd, vdev_t *cvd) size_t oldsize, newsize; uint64_t id = cvd->vdev_id; vdev_t **newchild; + spa_t *spa = cvd->vdev_spa; - ASSERT(spa_config_held(cvd->vdev_spa, SCL_ALL, RW_WRITER) == SCL_ALL); + ASSERT(spa_config_held(spa, SCL_ALL, RW_WRITER) == SCL_ALL); ASSERT(cvd->vdev_parent == NULL); cvd->vdev_parent = pvd; @@ -1398,6 +1399,17 @@ vdev_open(vdev_t *vd) } /* + * Track the min and max ashift values for normal data devices. + */ + if (vd->vdev_top == vd && vd->vdev_ashift != 0 && + !vd->vdev_islog && vd->vdev_aux == NULL) { + if (vd->vdev_ashift > spa->spa_max_ashift) + spa->spa_max_ashift = vd->vdev_ashift; + if (vd->vdev_ashift < spa->spa_min_ashift) + spa->spa_min_ashift = vd->vdev_ashift; + } + + /* * If a leaf vdev has a DTL, and seems healthy, then kick off a * resilver. But don't do this if we are doing a reopen for a scrub, * since this would just restart the scrub we are already doing. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Jun 12 10:52:53 2015 (r284303) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Jun 12 10:57:05 2015 (r284304) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2014 by Delphix. All rights reserved. + * Copyright (c) 2011, 2015 by Delphix. All rights reserved. * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved. */ @@ -1264,19 +1264,23 @@ zio_write_bp_init(zio_t *zio) return (ZIO_PIPELINE_CONTINUE); } else { /* - * Round up compressed size to MINBLOCKSIZE and - * zero the tail. + * Round up compressed size up to the ashift + * of the smallest-ashift device, and zero the tail. + * This ensures that the compressed size of the BP + * (and thus compressratio property) are correct, + * in that we charge for the padding used to fill out + * the last sector. */ - size_t rounded = - P2ROUNDUP(psize, (size_t)SPA_MINBLOCKSIZE); - if (rounded > psize) { - bzero((char *)cbuf + psize, rounded - psize); - psize = rounded; - } - if (psize == lsize) { + ASSERT3U(spa->spa_min_ashift, >=, SPA_MINBLOCKSHIFT); + size_t rounded = (size_t)P2ROUNDUP(psize, + 1ULL << spa->spa_min_ashift); + if (rounded >= lsize) { compress = ZIO_COMPRESS_OFF; zio_buf_free(cbuf, lsize); + psize = lsize; } else { + bzero((char *)cbuf + psize, rounded - psize); + psize = rounded; zio_push_transform(zio, cbuf, psize, lsize, NULL); } From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 10:59:51 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10E783AE; Fri, 12 Jun 2015 10:59:51 +0000 (UTC) (envelope-from avg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D93A51CD8; Fri, 12 Jun 2015 10:59:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CAxogx018475; Fri, 12 Jun 2015 10:59:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CAxoBB018474; Fri, 12 Jun 2015 10:59:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506121059.t5CAxoBB018474@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 12 Jun 2015 10:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284305 - head/sys/cddl/contrib/opensolaris X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 10:59:51 -0000 Author: avg Date: Fri Jun 12 10:59:50 2015 New Revision: 284305 URL: https://svnweb.freebsd.org/changeset/base/284305 Log: MFV r284033: 5438 zfs_blkptr_verify should continue after zfs_panic_recover illumos/illumos-gate@5897eb49ccde82d19214b71984f57935e7e313d1 This is a record-only commit, the change is in r275923. Modified: Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 11:10:50 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 433CE6CA; Fri, 12 Jun 2015 11:10:50 +0000 (UTC) (envelope-from avg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DF281050; Fri, 12 Jun 2015 11:10:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CBAomc026055; Fri, 12 Jun 2015 11:10:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CBAoXK026054; Fri, 12 Jun 2015 11:10:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506121110.t5CBAoXK026054@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 12 Jun 2015 11:10:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284306 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 11:10:50 -0000 Author: avg Date: Fri Jun 12 11:10:49 2015 New Revision: 284306 URL: https://svnweb.freebsd.org/changeset/base/284306 Log: MFV r284036: 5961 Fix stack overflow in zfs_create_fs illumos/illumos-gate@c701fde6911c957e71b37aac4daf672bd828f4d7 Author: glebius MFC after: 11 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Jun 12 10:59:50 2015 (r284305) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Fri Jun 12 11:10:49 2015 (r284306) @@ -1797,7 +1797,6 @@ log: void zfs_create_fs(objset_t *os, cred_t *cr, nvlist_t *zplprops, dmu_tx_t *tx) { - zfsvfs_t zfsvfs; uint64_t moid, obj, sa_obj, version; uint64_t sense = ZFS_CASE_SENSITIVE; uint64_t norm = 0; @@ -1805,6 +1804,7 @@ zfs_create_fs(objset_t *os, cred_t *cr, int error; int i; znode_t *rootzp = NULL; + zfsvfs_t *zfsvfs; vattr_t vattr; znode_t *zp; zfs_acl_ids_t acl_ids; @@ -1880,7 +1880,7 @@ zfs_create_fs(objset_t *os, cred_t *cr, vattr.va_uid = crgetuid(cr); vattr.va_gid = crgetgid(cr); - bzero(&zfsvfs, sizeof (zfsvfs_t)); + zfsvfs = kmem_zalloc(sizeof (zfsvfs_t), KM_SLEEP); rootzp = kmem_cache_alloc(znode_cache, KM_SLEEP); ASSERT(!POINTER_IS_VALID(rootzp->z_zfsvfs)); @@ -1889,15 +1889,15 @@ zfs_create_fs(objset_t *os, cred_t *cr, rootzp->z_atime_dirty = 0; rootzp->z_is_sa = USE_SA(version, os); - zfsvfs.z_os = os; - zfsvfs.z_parent = &zfsvfs; - zfsvfs.z_version = version; - zfsvfs.z_use_fuids = USE_FUIDS(version, os); - zfsvfs.z_use_sa = USE_SA(version, os); - zfsvfs.z_norm = norm; + zfsvfs->z_os = os; + zfsvfs->z_parent = zfsvfs; + zfsvfs->z_version = version; + zfsvfs->z_use_fuids = USE_FUIDS(version, os); + zfsvfs->z_use_sa = USE_SA(version, os); + zfsvfs->z_norm = norm; error = sa_setup(os, sa_obj, zfs_attr_table, ZPL_END, - &zfsvfs.z_attr_table); + &zfsvfs->z_attr_table); ASSERT(error == 0); @@ -1906,16 +1906,16 @@ zfs_create_fs(objset_t *os, cred_t *cr, * insensitive. */ if (sense == ZFS_CASE_INSENSITIVE || sense == ZFS_CASE_MIXED) - zfsvfs.z_norm |= U8_TEXTPREP_TOUPPER; + zfsvfs->z_norm |= U8_TEXTPREP_TOUPPER; - mutex_init(&zfsvfs.z_znodes_lock, NULL, MUTEX_DEFAULT, NULL); - list_create(&zfsvfs.z_all_znodes, sizeof (znode_t), + mutex_init(&zfsvfs->z_znodes_lock, NULL, MUTEX_DEFAULT, NULL); + list_create(&zfsvfs->z_all_znodes, sizeof (znode_t), offsetof(znode_t, z_link_node)); for (i = 0; i != ZFS_OBJ_MTX_SZ; i++) - mutex_init(&zfsvfs.z_hold_mtx[i], NULL, MUTEX_DEFAULT, NULL); + mutex_init(&zfsvfs->z_hold_mtx[i], NULL, MUTEX_DEFAULT, NULL); - rootzp->z_zfsvfs = &zfsvfs; + rootzp->z_zfsvfs = zfsvfs; VERIFY(0 == zfs_acl_ids_create(rootzp, IS_ROOT_NODE, &vattr, cr, NULL, &acl_ids)); zfs_mknode(rootzp, &vattr, tx, cr, IS_ROOT_NODE, &zp, &acl_ids); @@ -1932,12 +1932,13 @@ zfs_create_fs(objset_t *os, cred_t *cr, * Create shares directory */ - error = zfs_create_share_dir(&zfsvfs, tx); + error = zfs_create_share_dir(zfsvfs, tx); ASSERT(error == 0); for (i = 0; i != ZFS_OBJ_MTX_SZ; i++) - mutex_destroy(&zfsvfs.z_hold_mtx[i]); + mutex_destroy(&zfsvfs->z_hold_mtx[i]); + kmem_free(zfsvfs, sizeof (zfsvfs_t)); } #endif /* _KERNEL */ From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 11:14:08 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6E73A37; Fri, 12 Jun 2015 11:14:08 +0000 (UTC) (envelope-from avg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBB651167; Fri, 12 Jun 2015 11:14:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CBE83n027936; Fri, 12 Jun 2015 11:14:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CBE8GX027935; Fri, 12 Jun 2015 11:14:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506121114.t5CBE8GX027935@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 12 Jun 2015 11:14:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284307 - head/cddl/contrib/opensolaris X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 11:14:09 -0000 Author: avg Date: Fri Jun 12 11:14:08 2015 New Revision: 284307 URL: https://svnweb.freebsd.org/changeset/base/284307 Log: MFV r284035: 5669 altroot not set in zpool create when specified with -o illumos/illumos-gate@c423721f9bcd45c2409ef7b73fc103ac2889f9e9 This is a record-only commit, the change is: r279366 Modified: Directory Properties: head/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 11:16:44 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B814BB9C; Fri, 12 Jun 2015 11:16:44 +0000 (UTC) (envelope-from avg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5F591183; Fri, 12 Jun 2015 11:16:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CBGiZt028363; Fri, 12 Jun 2015 11:16:44 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CBGifV028362; Fri, 12 Jun 2015 11:16:44 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506121116.t5CBGifV028362@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 12 Jun 2015 11:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284308 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 11:16:44 -0000 Author: avg Date: Fri Jun 12 11:16:43 2015 New Revision: 284308 URL: https://svnweb.freebsd.org/changeset/base/284308 Log: MFV r284042: 1778 Assertion failed: rn->rn_nozpool == B_FALSE, file ../common/libzfs_import.c, line 1077, function zpool_open_func illumos/illumos-gate@bd0f709169e67f4bd34526e186a7c34f595f0d9b Author: Andrew Stormont MFC after: 13 days Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Fri Jun 12 11:14:08 2015 (r284307) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Fri Jun 12 11:16:43 2015 (r284308) @@ -23,6 +23,7 @@ * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright 2015 RackTop Systems. */ /* @@ -1094,11 +1095,7 @@ zpool_open_func(void *arg) } (void) close(fd); - rn->rn_config = config; - if (config != NULL) { - assert(rn->rn_nozpool == B_FALSE); - } } /* From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 11:21:36 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D425F7D; Fri, 12 Jun 2015 11:21:36 +0000 (UTC) (envelope-from avg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B71214CD; Fri, 12 Jun 2015 11:21:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CBLaf6032612; Fri, 12 Jun 2015 11:21:36 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CBLa7n032611; Fri, 12 Jun 2015 11:21:36 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201506121121.t5CBLa7n032611@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 12 Jun 2015 11:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284309 - head/cddl/contrib/opensolaris/cmd/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 11:21:36 -0000 Author: avg Date: Fri Jun 12 11:21:35 2015 New Revision: 284309 URL: https://svnweb.freebsd.org/changeset/base/284309 Log: zfs clone should not mount the clone if canmount == noauto Creation of a new filesystem does not imply an intent to mount it. Since canmount property is not inherited and its default value is 'on', the only scenario where this matters is zfs clone -o canmount=noauto. zfs create -o canmount=noauto already does not mount the new filesystem. Also see: https://www.illumos.org/issues/5984 https://reviews.csiden.org/r/228/ https://github.com/FransUrbo/zfs/commit/dd0e0e69f5b1c83bf2895ac00a0b83af77473175 https://github.com/zfsonlinux/zfs/issues/2241 Reviewed by: mahrens MFC after: 8 days Sponsored by: ClusterHQ Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Fri Jun 12 11:16:43 2015 (r284308) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Fri Jun 12 11:21:35 2015 (r284309) @@ -593,6 +593,17 @@ finish_progress(char *done) } /* + * Check if the dataset is mountable and should be automatically mounted. + */ +static boolean_t +should_auto_mount(zfs_handle_t *zhp) +{ + if (!zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, zfs_get_type(zhp))) + return (B_FALSE); + return (zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT) == ZFS_CANMOUNT_ON); +} + +/* * zfs clone [-p] [-o prop=value] ... * * Given an existing dataset, create a writable copy whose initial contents @@ -677,9 +688,22 @@ zfs_do_clone(int argc, char **argv) clone = zfs_open(g_zfs, argv[1], ZFS_TYPE_DATASET); if (clone != NULL) { - if (zfs_get_type(clone) != ZFS_TYPE_VOLUME) - if ((ret = zfs_mount(clone, NULL, 0)) == 0) - ret = zfs_share(clone); + /* + * If the user doesn't want the dataset + * automatically mounted, then skip the mount/share + * step. + */ + if (should_auto_mount(clone)) { + if ((ret = zfs_mount(clone, NULL, 0)) != 0) { + (void) fprintf(stderr, gettext("clone " + "successfully created, " + "but not mounted\n")); + } else if ((ret = zfs_share(clone)) != 0) { + (void) fprintf(stderr, gettext("clone " + "successfully created, " + "but not shared\n")); + } + } zfs_close(clone); } } @@ -728,7 +752,6 @@ zfs_do_create(int argc, char **argv) int ret = 1; nvlist_t *props; uint64_t intval; - int canmount = ZFS_CANMOUNT_OFF; if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) nomem(); @@ -868,19 +891,15 @@ zfs_do_create(int argc, char **argv) goto error; ret = 0; - /* - * if the user doesn't want the dataset automatically mounted, - * then skip the mount/share step - */ - if (zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, type)) - canmount = zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT); /* * Mount and/or share the new filesystem as appropriate. We provide a * verbose error message to let the user know that their filesystem was * in fact created, even if we failed to mount or share it. + * If the user doesn't want the dataset automatically mounted, + * then skip the mount/share step altogether. */ - if (!nomount && canmount == ZFS_CANMOUNT_ON) { + if (!nomount && should_auto_mount(zhp)) { if (zfs_mount(zhp, NULL, 0) != 0) { (void) fprintf(stderr, gettext("filesystem " "successfully created, but not mounted\n")); From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 11:32:23 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35290419; Fri, 12 Jun 2015 11:32:23 +0000 (UTC) (envelope-from glebius@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15D741804; Fri, 12 Jun 2015 11:32:23 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CBWMmp037893; Fri, 12 Jun 2015 11:32:22 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CBWLOX037877; Fri, 12 Jun 2015 11:32:21 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201506121132.t5CBWLOX037877@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 12 Jun 2015 11:32:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284310 - in head/sys: fs/tmpfs kern vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 11:32:23 -0000 Author: glebius Date: Fri Jun 12 11:32:20 2015 New Revision: 284310 URL: https://svnweb.freebsd.org/changeset/base/284310 Log: Make KPI of vm_pager_get_pages() more strict: if a pager changes a page in the requested array, then it is responsible for disposition of previous page and is responsible for updating the entry in the requested array. Now consumers of KPI do not need to re-lookup the pages after call to vm_pager_get_pages(). Reviewed by: kib Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/fs/tmpfs/tmpfs_subr.c head/sys/kern/kern_exec.c head/sys/kern/uipc_shm.c head/sys/kern/uipc_syscalls.c head/sys/vm/vm_fault.c head/sys/vm/vm_glue.c head/sys/vm/vm_object.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Fri Jun 12 11:21:35 2015 (r284309) +++ head/sys/fs/tmpfs/tmpfs_subr.c Fri Jun 12 11:32:20 2015 (r284310) @@ -1320,7 +1320,7 @@ tmpfs_reg_resize(struct vnode *vp, off_t struct tmpfs_mount *tmp; struct tmpfs_node *node; vm_object_t uobj; - vm_page_t m, ma[1]; + vm_page_t m; vm_pindex_t idx, newpages, oldpages; off_t oldsize; int base, rv; @@ -1367,11 +1367,9 @@ retry: VM_WAIT; VM_OBJECT_WLOCK(uobj); goto retry; - } else if (m->valid != VM_PAGE_BITS_ALL) { - ma[0] = m; - rv = vm_pager_get_pages(uobj, ma, 1, 0); - m = vm_page_lookup(uobj, idx); - } else + } else if (m->valid != VM_PAGE_BITS_ALL) + rv = vm_pager_get_pages(uobj, &m, 1, 0); + else /* A cached page was reactivated. */ rv = VM_PAGER_OK; vm_page_lock(m); Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Fri Jun 12 11:21:35 2015 (r284309) +++ head/sys/kern/kern_exec.c Fri Jun 12 11:32:20 2015 (r284310) @@ -966,13 +966,10 @@ exec_map_first_page(imgp) } initial_pagein = i; rv = vm_pager_get_pages(object, ma, initial_pagein, 0); - ma[0] = vm_page_lookup(object, 0); - if ((rv != VM_PAGER_OK) || (ma[0] == NULL)) { - if (ma[0] != NULL) { - vm_page_lock(ma[0]); - vm_page_free(ma[0]); - vm_page_unlock(ma[0]); - } + if (rv != VM_PAGER_OK) { + vm_page_lock(ma[0]); + vm_page_free(ma[0]); + vm_page_unlock(ma[0]); VM_OBJECT_WUNLOCK(object); return (EIO); } Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Fri Jun 12 11:21:35 2015 (r284309) +++ head/sys/kern/uipc_shm.c Fri Jun 12 11:32:20 2015 (r284310) @@ -189,14 +189,6 @@ uiomove_object_page(vm_object_t obj, siz if (m->valid != VM_PAGE_BITS_ALL) { if (vm_pager_has_page(obj, idx, NULL, NULL)) { rv = vm_pager_get_pages(obj, &m, 1, 0); - m = vm_page_lookup(obj, idx); - if (m == NULL) { - printf( - "uiomove_object: vm_obj %p idx %jd null lookup rv %d\n", - obj, idx, rv); - VM_OBJECT_WUNLOCK(obj); - return (EIO); - } if (rv != VM_PAGER_OK) { printf( "uiomove_object: vm_obj %p idx %jd valid %x pager error %d\n", @@ -423,7 +415,7 @@ static int shm_dotruncate(struct shmfd *shmfd, off_t length) { vm_object_t object; - vm_page_t m, ma[1]; + vm_page_t m; vm_pindex_t idx, nobjsize; vm_ooffset_t delta; int base, rv; @@ -465,12 +457,10 @@ retry: VM_WAIT; VM_OBJECT_WLOCK(object); goto retry; - } else if (m->valid != VM_PAGE_BITS_ALL) { - ma[0] = m; - rv = vm_pager_get_pages(object, ma, 1, + } else if (m->valid != VM_PAGE_BITS_ALL) + rv = vm_pager_get_pages(object, &m, 1, 0); - m = vm_page_lookup(object, idx); - } else + else /* A cached page was reactivated. */ rv = VM_PAGER_OK; vm_page_lock(m); Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Fri Jun 12 11:21:35 2015 (r284309) +++ head/sys/kern/uipc_syscalls.c Fri Jun 12 11:32:20 2015 (r284310) @@ -2026,10 +2026,7 @@ sendfile_readpage(vm_object_t obj, struc if (vm_pager_has_page(obj, pindex, NULL, NULL)) { rv = vm_pager_get_pages(obj, &m, 1, 0); SFSTAT_INC(sf_iocnt); - m = vm_page_lookup(obj, pindex); - if (m == NULL) - error = EIO; - else if (rv != VM_PAGER_OK) { + if (rv != VM_PAGER_OK) { vm_page_lock(m); vm_page_free(m); vm_page_unlock(m); Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Fri Jun 12 11:21:35 2015 (r284309) +++ head/sys/vm/vm_fault.c Fri Jun 12 11:32:20 2015 (r284310) @@ -679,19 +679,12 @@ vnode_locked: /* * Found the page. Leave it busy while we play * with it. - */ - - /* - * Relookup in case pager changed page. Pager + * + * Pager could have changed the page. Pager * is responsible for disposition of old page * if moved. */ - fs.m = vm_page_lookup(fs.object, fs.pindex); - if (!fs.m) { - unlock_and_deallocate(&fs); - goto RetryFault; - } - + fs.m = marray[reqpage]; hardfault++; break; /* break to PAGE HAS BEEN FOUND */ } Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Fri Jun 12 11:21:35 2015 (r284309) +++ head/sys/vm/vm_glue.c Fri Jun 12 11:32:20 2015 (r284310) @@ -230,7 +230,7 @@ vsunlock(void *addr, size_t len) static vm_page_t vm_imgact_hold_page(vm_object_t object, vm_ooffset_t offset) { - vm_page_t m, ma[1]; + vm_page_t m; vm_pindex_t pindex; int rv; @@ -238,11 +238,7 @@ vm_imgact_hold_page(vm_object_t object, pindex = OFF_TO_IDX(offset); m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL); if (m->valid != VM_PAGE_BITS_ALL) { - ma[0] = m; - rv = vm_pager_get_pages(object, ma, 1, 0); - m = vm_page_lookup(object, pindex); - if (m == NULL) - goto out; + rv = vm_pager_get_pages(object, &m, 1, 0); if (rv != VM_PAGER_OK) { vm_page_lock(m); vm_page_free(m); @@ -571,7 +567,7 @@ vm_thread_swapin(struct thread *td) { vm_object_t ksobj; vm_page_t ma[KSTACK_MAX_PAGES]; - int i, j, k, pages, rv; + int i, j, pages, rv; pages = td->td_kstack_pages; ksobj = td->td_kstack_obj; @@ -593,9 +589,12 @@ vm_thread_swapin(struct thread *td) if (rv != VM_PAGER_OK) panic("vm_thread_swapin: cannot get kstack for proc: %d", td->td_proc->p_pid); + /* + * All pages in the array are in place, due to the + * pager is always the swap pager, which doesn't + * free or remove wired non-req pages from object. + */ vm_object_pip_wakeup(ksobj); - for (k = i; k < j; k++) - ma[k] = vm_page_lookup(ksobj, k); vm_page_xunbusy(ma[i]); } else if (vm_page_xbusied(ma[i])) vm_page_xunbusy(ma[i]); Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Fri Jun 12 11:21:35 2015 (r284309) +++ head/sys/vm/vm_object.c Fri Jun 12 11:32:20 2015 (r284310) @@ -2046,7 +2046,7 @@ vm_object_page_cache(vm_object_t object, boolean_t vm_object_populate(vm_object_t object, vm_pindex_t start, vm_pindex_t end) { - vm_page_t m, ma[1]; + vm_page_t m; vm_pindex_t pindex; int rv; @@ -2054,11 +2054,7 @@ vm_object_populate(vm_object_t object, v for (pindex = start; pindex < end; pindex++) { m = vm_page_grab(object, pindex, VM_ALLOC_NORMAL); if (m->valid != VM_PAGE_BITS_ALL) { - ma[0] = m; - rv = vm_pager_get_pages(object, ma, 1, 0); - m = vm_page_lookup(object, pindex); - if (m == NULL) - break; + rv = vm_pager_get_pages(object, &m, 1, 0); if (rv != VM_PAGER_OK) { vm_page_lock(m); vm_page_free(m); From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 12:22:42 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B542A3FB for ; Fri, 12 Jun 2015 12:22:42 +0000 (UTC) (envelope-from t-jjesse@bryanstudents.net) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0101.outbound.protection.outlook.com [65.55.169.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34B281642 for ; Fri, 12 Jun 2015 12:22:41 +0000 (UTC) (envelope-from t-jjesse@bryanstudents.net) Received: from CY1PR0201MB0825.namprd02.prod.outlook.com (25.160.141.26) by CY1PR0201MB0889.namprd02.prod.outlook.com (25.160.163.143) with Microsoft SMTP Server (TLS) id 15.1.184.17; Fri, 12 Jun 2015 12:22:33 +0000 Received: from CY1PR0201MB0827.namprd02.prod.outlook.com (25.160.141.28) by CY1PR0201MB0825.namprd02.prod.outlook.com (25.160.141.26) with Microsoft SMTP Server (TLS) id 15.1.184.17; Fri, 12 Jun 2015 12:22:31 +0000 Received: from CY1PR0201MB0827.namprd02.prod.outlook.com ([10.160.141.28]) by CY1PR0201MB0827.namprd02.prod.outlook.com ([10.160.141.28]) with mapi id 15.01.0190.013; Fri, 12 Jun 2015 12:22:31 +0000 From: Justin Jesse To: "svn-src-head@freebsd.org" Subject: Re: svn-src-head Digest, Vol 137, Issue 12 Thread-Topic: svn-src-head Digest, Vol 137, Issue 12 Thread-Index: AQHQpQdt3zcGhlQ4x0SUuafbFHGCkp2oytjt Date: Fri, 12 Jun 2015 12:22:30 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: freebsd.org; dkim=none (message not signed) header.d=none; x-originating-ip: [54.148.30.122] x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(42134001)(42139001); SRVR:CY1PR0201MB0825; UriScan:; BCL:0; PCL:0; RULEID:(42134001)(42139001); SRVR:CY1PR0201MB0889; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(5005006)(520003)(3002001); SRVR:CY1PR0201MB0825; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0201MB0825; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(5403001)(18543002)(13624006)(377454003)(24454002)(10533003)(122556002)(15395725005)(62966003)(16236675004)(40100003)(87936001)(99286002)(86362001)(77156002)(450100001)(575784001)(19617315012)(19625215002)(54356999)(50986999)(76176999)(5002640100001)(106116001)(189998001)(19580395003)(107886002)(2656002)(5001960100002)(110136002)(46102003)(230783001)(15975445007)(102836002)(2900100001)(5001920100001)(2950100001)(2501003)(66066001)(19580405001)(2351001)(92566002)(15198665003)(77096005)(579004); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0201MB0825; H:CY1PR0201MB0827.namprd02.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jun 2015 12:22:30.1946 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5bd2d98c-31e8-4951-87b7-cacf8d40887a X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0201MB0825 X-OriginatorOrg: bryanstudents.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 12:22:42 -0000 In English what exactly this all in reference too? Sent by Outlook for Android On Fri, Jun 12, 2015 at 5:00 AM -0700, "svn-src-head-request@freebsd.org" <= svn-src-head-request@freebsd.org> = wrote: Send svn-src-head mailing list submissions to svn-src-head@freebsd.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.freebsd.org/mailman/listinfo/svn-src-head or, via email, send a message with subject or body 'help' to svn-src-head-request@freebsd.org You can reach the person managing the list at svn-src-head-owner@freebsd.org When replying, please edit your Subject line so it is more specific than "Re: Contents of svn-src-head digest..." Today's Topics: 1. svn commit: r284309 - head/cddl/contrib/opensolaris/cmd/zfs (Andriy Gapon) 2. svn commit: r284310 - in head/sys: fs/tmpfs kern vm (Gleb Smirnoff) ---------------------------------------------------------------------- Message: 1 Date: Fri, 12 Jun 2015 11:21:36 +0000 (UTC) From: Andriy Gapon To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284309 - head/cddl/contrib/opensolaris/cmd/zfs Message-ID: <201506121121.t5CBLa7n032611@svn.freebsd.org> Content-Type: text/plain; charset=3DUTF-8 Author: avg Date: Fri Jun 12 11:21:35 2015 New Revision: 284309 URL: https://svnweb.freebsd.org/changeset/base/284309 Log: zfs clone should not mount the clone if canmount =3D=3D noauto Creation of a new filesystem does not imply an intent to mount it. Since canmount property is not inherited and its default value is 'on', the only scenario where this matters is zfs clone -o canmount=3Dnoauto. zfs create -o canmount=3Dnoauto already does not mount the new filesystem= . Also see: https://www.illumos.org/issues/5984 https://reviews.csiden.org/r/228/ https://github.com/FransUrbo/zfs/commit/dd0e0e69f5b1c83bf2895ac00a0b83af7= 7473175 https://github.com/zfsonlinux/zfs/issues/2241 Reviewed by: mahrens MFC after: 8 days Sponsored by: ClusterHQ Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Fri Jun 12 11:16:43= 2015 (r284308) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Fri Jun 12 11:21:35= 2015 (r284309) @@ -593,6 +593,17 @@ finish_progress(char *done) } /* + * Check if the dataset is mountable and should be automatically mounted. + */ +static boolean_t +should_auto_mount(zfs_handle_t *zhp) +{ + if (!zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, zfs_get_type(zhp))) + return (B_FALSE); + return (zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT) =3D=3D ZFS_CANMOUN= T_ON); +} + +/* * zfs clone [-p] [-o prop=3Dvalue] ... * * Given an existing dataset, create a writable copy whose initial content= s @@ -677,9 +688,22 @@ zfs_do_clone(int argc, char **argv) clone =3D zfs_open(g_zfs, argv[1], ZFS_TYPE_DATASET); if (clone !=3D NULL) { - if (zfs_get_type(clone) !=3D ZFS_TYPE_VOLUME) - if ((ret =3D zfs_mount(clone, NULL, 0)) =3D= =3D 0) - ret =3D zfs_share(clone); + /* + * If the user doesn't want the dataset + * automatically mounted, then skip the mount/share + * step. + */ + if (should_auto_mount(clone)) { + if ((ret =3D zfs_mount(clone, NULL, 0)) != =3D 0) { + (void) fprintf(stderr, gettext("clo= ne " + "successfully created, " + "but not mounted\n")); + } else if ((ret =3D zfs_share(clone)) !=3D = 0) { + (void) fprintf(stderr, gettext("clo= ne " + "successfully created, " + "but not shared\n")); + } + } zfs_close(clone); } } @@ -728,7 +752,6 @@ zfs_do_create(int argc, char **argv) int ret =3D 1; nvlist_t *props; uint64_t intval; - int canmount =3D ZFS_CANMOUNT_OFF; if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) !=3D 0) nomem(); @@ -868,19 +891,15 @@ zfs_do_create(int argc, char **argv) goto error; ret =3D 0; - /* - * if the user doesn't want the dataset automatically mounted, - * then skip the mount/share step - */ - if (zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, type)) - canmount =3D zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT); /* * Mount and/or share the new filesystem as appropriate. We provi= de a * verbose error message to let the user know that their filesyste= m was * in fact created, even if we failed to mount or share it. + * If the user doesn't want the dataset automatically mounted, + * then skip the mount/share step altogether. */ - if (!nomount && canmount =3D=3D ZFS_CANMOUNT_ON) { + if (!nomount && should_auto_mount(zhp)) { if (zfs_mount(zhp, NULL, 0) !=3D 0) { (void) fprintf(stderr, gettext("filesystem " "successfully created, but not mounted\n")); ------------------------------ Message: 2 Date: Fri, 12 Jun 2015 11:32:21 +0000 (UTC) From: Gleb Smirnoff To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284310 - in head/sys: fs/tmpfs kern vm Message-ID: <201506121132.t5CBWLOX037877@svn.freebsd.org> Content-Type: text/plain; charset=3DUTF-8 Author: glebius Date: Fri Jun 12 11:32:20 2015 New Revision: 284310 URL: https://svnweb.freebsd.org/changeset/base/284310 Log: Make KPI of vm_pager_get_pages() more strict: if a pager changes a page in the requested array, then it is responsible for disposition of previou= s page and is responsible for updating the entry in the requested array. Now consumers of KPI do not need to re-lookup the pages after call to vm_pager_get_pages(). Reviewed by: kib Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/fs/tmpfs/tmpfs_subr.c head/sys/kern/kern_exec.c head/sys/kern/uipc_shm.c head/sys/kern/uipc_syscalls.c head/sys/vm/vm_fault.c head/sys/vm/vm_glue.c head/sys/vm/vm_object.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/fs/tmpfs/tmpfs_subr.c Fri Jun 12 11:21:35 2015 (r2= 84309) +++ head/sys/fs/tmpfs/tmpfs_subr.c Fri Jun 12 11:32:20 2015 (r2= 84310) @@ -1320,7 +1320,7 @@ tmpfs_reg_resize(struct vnode *vp, off_t struct tmpfs_mount *tmp; struct tmpfs_node *node; vm_object_t uobj; - vm_page_t m, ma[1]; + vm_page_t m; vm_pindex_t idx, newpages, oldpages; off_t oldsize; int base, rv; @@ -1367,11 +1367,9 @@ retry: VM_WAIT; VM_OBJECT_WLOCK(uobj); goto retry; - } else if (m->valid !=3D VM_PAGE_BITS_ALL) = { - ma[0] =3D m; - rv =3D vm_pager_get_pages(uobj, ma,= 1, 0); - m =3D vm_page_lookup(uobj, idx); - } else + } else if (m->valid !=3D VM_PAGE_BITS_ALL) + rv =3D vm_pager_get_pages(uobj, &m,= 1, 0); + else /* A cached page was reactivated. = */ rv =3D VM_PAGER_OK; vm_page_lock(m); Modified: head/sys/kern/kern_exec.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/kern/kern_exec.c Fri Jun 12 11:21:35 2015 (r284309) +++ head/sys/kern/kern_exec.c Fri Jun 12 11:32:20 2015 (r284310) @@ -966,13 +966,10 @@ exec_map_first_page(imgp) } initial_pagein =3D i; rv =3D vm_pager_get_pages(object, ma, initial_pagein, 0); - ma[0] =3D vm_page_lookup(object, 0); - if ((rv !=3D VM_PAGER_OK) || (ma[0] =3D=3D NULL)) { - if (ma[0] !=3D NULL) { - vm_page_lock(ma[0]); - vm_page_free(ma[0]); - vm_page_unlock(ma[0]); - } + if (rv !=3D VM_PAGER_OK) { + vm_page_lock(ma[0]); + vm_page_free(ma[0]); + vm_page_unlock(ma[0]); VM_OBJECT_WUNLOCK(object); return (EIO); } Modified: head/sys/kern/uipc_shm.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/kern/uipc_shm.c Fri Jun 12 11:21:35 2015 (r284309) +++ head/sys/kern/uipc_shm.c Fri Jun 12 11:32:20 2015 (r284310) @@ -189,14 +189,6 @@ uiomove_object_page(vm_object_t obj, siz if (m->valid !=3D VM_PAGE_BITS_ALL) { if (vm_pager_has_page(obj, idx, NULL, NULL)) { rv =3D vm_pager_get_pages(obj, &m, 1, 0); - m =3D vm_page_lookup(obj, idx); - if (m =3D=3D NULL) { - printf( - "uiomove_object: vm_obj %p idx %jd null lookup rv %d\n"= , - obj, idx, rv); - VM_OBJECT_WUNLOCK(obj); - return (EIO); - } if (rv !=3D VM_PAGER_OK) { printf( "uiomove_object: vm_obj %p idx %jd valid %x pager error %d\n", @@ -423,7 +415,7 @@ static int shm_dotruncate(struct shmfd *shmfd, off_t length) { vm_object_t object; - vm_page_t m, ma[1]; + vm_page_t m; vm_pindex_t idx, nobjsize; vm_ooffset_t delta; int base, rv; @@ -465,12 +457,10 @@ retry: VM_WAIT; VM_OBJECT_WLOCK(object); goto retry; - } else if (m->valid !=3D VM_PAGE_BITS_ALL) = { - ma[0] =3D m; - rv =3D vm_pager_get_pages(object, m= a, 1, + } else if (m->valid !=3D VM_PAGE_BITS_ALL) + rv =3D vm_pager_get_pages(object, &= m, 1, 0); - m =3D vm_page_lookup(object, idx); - } else + else /* A cached page was reactivated. = */ rv =3D VM_PAGER_OK; vm_page_lock(m); Modified: head/sys/kern/uipc_syscalls.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/kern/uipc_syscalls.c Fri Jun 12 11:21:35 2015 (r2= 84309) +++ head/sys/kern/uipc_syscalls.c Fri Jun 12 11:32:20 2015 (r2= 84310) @@ -2026,10 +2026,7 @@ sendfile_readpage(vm_object_t obj, struc if (vm_pager_has_page(obj, pindex, NULL, NULL)) { rv =3D vm_pager_get_pages(obj, &m, 1, 0); SFSTAT_INC(sf_iocnt); - m =3D vm_page_lookup(obj, pindex); - if (m =3D=3D NULL) - error =3D EIO; - else if (rv !=3D VM_PAGER_OK) { + if (rv !=3D VM_PAGER_OK) { vm_page_lock(m); vm_page_free(m); vm_page_unlock(m); Modified: head/sys/vm/vm_fault.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/vm/vm_fault.c Fri Jun 12 11:21:35 2015 (r284309) +++ head/sys/vm/vm_fault.c Fri Jun 12 11:32:20 2015 (r284310) @@ -679,19 +679,12 @@ vnode_locked: /* * Found the page. Leave it busy while we = play * with it. - */ - - /* - * Relookup in case pager changed page. Pag= er + * + * Pager could have changed the page. Page= r * is responsible for disposition of old p= age * if moved. */ - fs.m =3D vm_page_lookup(fs.object, fs.pinde= x); - if (!fs.m) { - unlock_and_deallocate(&fs); - goto RetryFault; - } - + fs.m =3D marray[reqpage]; hardfault++; break; /* break to PAGE HAS BEEN FOUND */ } Modified: head/sys/vm/vm_glue.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/vm/vm_glue.c Fri Jun 12 11:21:35 2015 (r284309) +++ head/sys/vm/vm_glue.c Fri Jun 12 11:32:20 2015 (r284310) @@ -230,7 +230,7 @@ vsunlock(void *addr, size_t len) static vm_page_t vm_imgact_hold_page(vm_object_t object, vm_ooffset_t offset) { - vm_page_t m, ma[1]; + vm_page_t m; vm_pindex_t pindex; int rv; @@ -238,11 +238,7 @@ vm_imgact_hold_page(vm_object_t object, pindex =3D OFF_TO_IDX(offset); m =3D vm_page_grab(object, pindex, VM_ALLOC_NORMAL); if (m->valid !=3D VM_PAGE_BITS_ALL) { - ma[0] =3D m; - rv =3D vm_pager_get_pages(object, ma, 1, 0); - m =3D vm_page_lookup(object, pindex); - if (m =3D=3D NULL) - goto out; + rv =3D vm_pager_get_pages(object, &m, 1, 0); if (rv !=3D VM_PAGER_OK) { vm_page_lock(m); vm_page_free(m); @@ -571,7 +567,7 @@ vm_thread_swapin(struct thread *td) { vm_object_t ksobj; vm_page_t ma[KSTACK_MAX_PAGES]; - int i, j, k, pages, rv; + int i, j, pages, rv; pages =3D td->td_kstack_pages; ksobj =3D td->td_kstack_obj; @@ -593,9 +589,12 @@ vm_thread_swapin(struct thread *td) if (rv !=3D VM_PAGER_OK) panic("vm_thread_swapin: cannot get kstack for proc: %d", td->td_proc->p_pid); + /* + * All pages in the array are in place, due to the + * pager is always the swap pager, which doesn't + * free or remove wired non-req pages from object. + */ vm_object_pip_wakeup(ksobj); - for (k =3D i; k < j; k++) - ma[k] =3D vm_page_lookup(ksobj, k); vm_page_xunbusy(ma[i]); } else if (vm_page_xbusied(ma[i])) vm_page_xunbusy(ma[i]); Modified: head/sys/vm/vm_object.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- head/sys/vm/vm_object.c Fri Jun 12 11:21:35 2015 (r284309) +++ head/sys/vm/vm_object.c Fri Jun 12 11:32:20 2015 (r284310) @@ -2046,7 +2046,7 @@ vm_object_page_cache(vm_object_t object, boolean_t vm_object_populate(vm_object_t object, vm_pindex_t start, vm_pindex_t end) { - vm_page_t m, ma[1]; + vm_page_t m; vm_pindex_t pindex; int rv; @@ -2054,11 +2054,7 @@ vm_object_populate(vm_object_t object, v for (pindex =3D start; pindex < end; pindex++) { m =3D vm_page_grab(object, pindex, VM_ALLOC_NORMAL); if (m->valid !=3D VM_PAGE_BITS_ALL) { - ma[0] =3D m; - rv =3D vm_pager_get_pages(object, ma, 1, 0); - m =3D vm_page_lookup(object, pindex); - if (m =3D=3D NULL) - break; + rv =3D vm_pager_get_pages(object, &m, 1, 0); if (rv !=3D VM_PAGER_OK) { vm_page_lock(m); vm_page_free(m); ------------------------------ Subject: Digest Footer _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" ------------------------------ End of svn-src-head Digest, Vol 137, Issue 12 ********************************************* From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 12:27:11 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08FA74BC; Fri, 12 Jun 2015 12:27:11 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB568167E; Fri, 12 Jun 2015 12:27:10 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CCRAwr063793; Fri, 12 Jun 2015 12:27:10 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CCRAGI063792; Fri, 12 Jun 2015 12:27:10 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506121227.t5CCRAGI063792@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Fri, 12 Jun 2015 12:27:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284315 - head/sys/dev/proto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 12:27:11 -0000 Author: marcel Date: Fri Jun 12 12:27:10 2015 New Revision: 284315 URL: https://svnweb.freebsd.org/changeset/base/284315 Log: We need to handle 64-bit BARs ourselves to avoid that the PCI infrastructure instantiates a non-existent resource. This has BARs suddenly show up with pciconf(8) under VMware as well. Now that we read the BAR ourselves, ask for the correct resource type. Modified: head/sys/dev/proto/proto_bus_pci.c Modified: head/sys/dev/proto/proto_bus_pci.c ============================================================================== --- head/sys/dev/proto/proto_bus_pci.c Fri Jun 12 11:52:32 2015 (r284314) +++ head/sys/dev/proto/proto_bus_pci.c Fri Jun 12 12:27:10 2015 (r284315) @@ -82,6 +82,7 @@ proto_pci_attach(device_t dev) { struct proto_softc *sc; struct resource *res; + uint32_t val; int bar, rid, type; sc = device_get_softc(dev); @@ -91,15 +92,17 @@ proto_pci_attach(device_t dev) for (bar = 0; bar < PCIR_MAX_BAR_0; bar++) { rid = PCIR_BAR(bar); - type = SYS_RES_MEMORY; + val = pci_read_config(dev, rid, 4); + type = (PCI_BAR_IO(val)) ? SYS_RES_IOPORT : SYS_RES_MEMORY; res = bus_alloc_resource_any(dev, type, &rid, RF_ACTIVE); - if (res == NULL) { - type = SYS_RES_IOPORT; - res = bus_alloc_resource_any(dev, type, &rid, - RF_ACTIVE); - } - if (res != NULL) - proto_add_resource(sc, type, rid, res); + if (res == NULL) + continue; + proto_add_resource(sc, type, rid, res); + if (type == SYS_RES_IOPORT) + continue; + /* Skip over adjacent BAR for 64-bit memory BARs. */ + if ((val & PCIM_BAR_MEM_TYPE) == PCIM_BAR_MEM_64) + bar++; } rid = 0; From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 13:15:15 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3CC2205; Fri, 12 Jun 2015 13:15:15 +0000 (UTC) (envelope-from glebius@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9219B12EA; Fri, 12 Jun 2015 13:15:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CDFFBY088869; Fri, 12 Jun 2015 13:15:15 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CDFFjD088868; Fri, 12 Jun 2015 13:15:15 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201506121315.t5CDFFjD088868@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 12 Jun 2015 13:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284316 - head/sys/dev/drm2/i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 13:15:15 -0000 Author: glebius Date: Fri Jun 12 13:15:14 2015 New Revision: 284316 URL: https://svnweb.freebsd.org/changeset/base/284316 Log: A miss from r284310. vm_pager_get_pages() updates the array, so there is no need for vm_page_lookup(). Modified: head/sys/dev/drm2/i915/i915_gem.c Modified: head/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- head/sys/dev/drm2/i915/i915_gem.c Fri Jun 12 12:27:10 2015 (r284315) +++ head/sys/dev/drm2/i915/i915_gem.c Fri Jun 12 13:15:14 2015 (r284316) @@ -3175,9 +3175,6 @@ i915_gem_wire_page(vm_object_t object, v if (m->valid != VM_PAGE_BITS_ALL) { if (vm_pager_has_page(object, pindex, NULL, NULL)) { rv = vm_pager_get_pages(object, &m, 1, 0); - m = vm_page_lookup(object, pindex); - if (m == NULL) - return (NULL); if (rv != VM_PAGER_OK) { vm_page_lock(m); vm_page_free(m); From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 13:16:51 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4543D3A5; Fri, 12 Jun 2015 13:16:51 +0000 (UTC) (envelope-from br@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32E6713DC; Fri, 12 Jun 2015 13:16:51 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CDGpl4089138; Fri, 12 Jun 2015 13:16:51 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CDGo6Z089136; Fri, 12 Jun 2015 13:16:50 GMT (envelope-from br@FreeBSD.org) Message-Id: <201506121316.t5CDGo6Z089136@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 12 Jun 2015 13:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284317 - in head/sys: conf dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 13:16:51 -0000 Author: br Date: Fri Jun 12 13:16:50 2015 New Revision: 284317 URL: https://svnweb.freebsd.org/changeset/base/284317 Log: Add generic ECAM PCI device driver found in Gem5 simulator. Work based on Cavium Thunder PCIe driver by Semihalf. Reviewed by: andrew, jhb Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D2386 Added: head/sys/dev/pci/pci-host-generic.c (contents, props changed) Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Fri Jun 12 13:15:14 2015 (r284316) +++ head/sys/conf/files.arm64 Fri Jun 12 13:16:50 2015 (r284317) @@ -51,6 +51,7 @@ dev/fdt/fdt_arm64.c optional fdt dev/hwpmc/hwpmc_arm64.c optional hwpmc dev/hwpmc/hwpmc_arm64_md.c optional hwpmc dev/ofw/ofw_cpu.c optional fdt +dev/pci/pci-host-generic.c optional pci fdt dev/psci/psci.c optional psci dev/psci/psci_arm64.S optional psci dev/uart/uart_cpu_fdt.c optional uart fdt Added: head/sys/dev/pci/pci-host-generic.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/pci/pci-host-generic.c Fri Jun 12 13:16:50 2015 (r284317) @@ -0,0 +1,626 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * 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 AUTHOR 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. + */ + +/* Generic ECAM PCIe driver */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "pcib_if.h" + +/* Assembling ECAM Configuration Address */ +#define PCIE_BUS_SHIFT 20 +#define PCIE_SLOT_SHIFT 15 +#define PCIE_FUNC_SHIFT 12 +#define PCIE_BUS_MASK 0xFF +#define PCIE_SLOT_MASK 0x1F +#define PCIE_FUNC_MASK 0x07 +#define PCIE_REG_MASK 0xFFF + +#define PCIE_ADDR_OFFSET(bus, slot, func, reg) \ + ((((bus) & PCIE_BUS_MASK) << PCIE_BUS_SHIFT) | \ + (((slot) & PCIE_SLOT_MASK) << PCIE_SLOT_SHIFT) | \ + (((func) & PCIE_FUNC_MASK) << PCIE_FUNC_SHIFT) | \ + ((reg) & PCIE_REG_MASK)) + +#define MAX_RANGES_TUPLES 5 +#define MIN_RANGES_TUPLES 2 + +#define PCI_IO_WINDOW_OFFSET 0x1000 +#define PCI_IRQ_START 32 +#define PCI_IRQ_END (PCI_IRQ_START + 4) + +#define SPACE_CODE_SHIFT 24 +#define SPACE_CODE_MASK 0x3 +#define SPACE_CODE_IO_SPACE 0x1 +#define PROPS_CELL_SIZE 1 +#define PCI_ADDR_CELL_SIZE 2 + +struct pcie_range { + uint64_t pci_base; + uint64_t phys_base; + uint64_t size; + uint64_t flags; +#define FLAG_IO (1 << 0) +#define FLAG_MEM (1 << 1) +}; + +struct generic_pcie_softc { + struct pcie_range ranges[MAX_RANGES_TUPLES]; + int nranges; + struct rman mem_rman; + struct rman io_rman; + struct rman irq_rman; + struct resource *res; + struct resource *res1; + int ecam; + bus_space_tag_t bst; + bus_space_handle_t bsh; + device_t dev; + bus_space_handle_t ioh; +}; + +/* Forward prototypes */ + +static int generic_pcie_probe(device_t dev); +static int generic_pcie_attach(device_t dev); +static int parse_pci_mem_ranges(struct generic_pcie_softc *sc); +static uint32_t generic_pcie_read_config(device_t dev, u_int bus, u_int slot, + u_int func, u_int reg, int bytes); +static void generic_pcie_write_config(device_t dev, u_int bus, u_int slot, + u_int func, u_int reg, uint32_t val, int bytes); +static int generic_pcie_maxslots(device_t dev); +static int generic_pcie_read_ivar(device_t dev, device_t child, int index, + uintptr_t *result); +static int generic_pcie_write_ivar(device_t dev, device_t child, int index, + uintptr_t value); +static struct resource *generic_pcie_alloc_resource(device_t dev, + device_t child, int type, int *rid, u_long start, u_long end, + u_long count, u_int flags); +static int generic_pcie_release_resource(device_t dev, device_t child, + int type, int rid, struct resource *res); + +static int +generic_pcie_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_is_compatible(dev, "pci-host-ecam-generic")) { + device_set_desc(dev, "Generic PCI host controller"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static int +generic_pcie_attach(device_t dev) +{ + struct generic_pcie_softc *sc; + uint64_t phys_base; + uint64_t pci_base; + uint64_t size; + int error; + int tuple; + int rid; + + sc = device_get_softc(dev); + sc->dev = dev; + + rid = 0; + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (sc->res == NULL) { + device_printf(dev, "could not map memory.\n"); + return (ENXIO); + } + + sc->bst = rman_get_bustag(sc->res); + sc->bsh = rman_get_bushandle(sc->res); + + sc->mem_rman.rm_type = RMAN_ARRAY; + sc->mem_rman.rm_descr = "PCIe Memory"; + sc->io_rman.rm_type = RMAN_ARRAY; + sc->io_rman.rm_descr = "PCIe IO window"; + + /* Retrieve 'ranges' property from FDT */ + if (bootverbose) + device_printf(dev, "parsing FDT for ECAM%d:\n", + sc->ecam); + if (parse_pci_mem_ranges(sc)) + return (ENXIO); + + /* Initialize rman and allocate memory regions */ + error = rman_init(&sc->mem_rman); + if (error) { + device_printf(dev, "rman_init() failed. error = %d\n", error); + return (error); + } + + error = rman_init(&sc->io_rman); + if (error) { + device_printf(dev, "rman_init() failed. error = %d\n", error); + return (error); + } + + for (tuple = 0; tuple < MAX_RANGES_TUPLES; tuple++) { + phys_base = sc->ranges[tuple].phys_base; + pci_base = sc->ranges[tuple].pci_base; + size = sc->ranges[tuple].size; + if (phys_base == 0 || size == 0) + continue; /* empty range element */ + if (sc->ranges[tuple].flags & FLAG_MEM) { + error = rman_manage_region(&sc->mem_rman, + phys_base, + phys_base + size); + } else if (sc->ranges[tuple].flags & FLAG_IO) { + error = rman_manage_region(&sc->io_rman, + pci_base + PCI_IO_WINDOW_OFFSET, + pci_base + PCI_IO_WINDOW_OFFSET + size); + } else + continue; + if (error) { + device_printf(dev, "rman_manage_region() failed." + "error = %d\n", error); + rman_fini(&sc->mem_rman); + return (error); + } + } + + /* TODO: get IRQ numbers from FDT */ + sc->irq_rman.rm_type = RMAN_ARRAY; + sc->irq_rman.rm_descr = "Generic PCIe IRQs"; + if (rman_init(&sc->irq_rman) != 0 || + rman_manage_region(&sc->irq_rman, PCI_IRQ_START, + PCI_IRQ_END) != 0) { + panic("Generic PCI: failed to set up IRQ rman"); + } + + device_add_child(dev, "pci", -1); + return (bus_generic_attach(dev)); +} + +static int +parse_pci_mem_ranges(struct generic_pcie_softc *sc) +{ + pcell_t pci_addr_cells, parent_addr_cells; + pcell_t attributes, size_cells; + cell_t *base_ranges; + int nbase_ranges; + phandle_t node; + int i, j, k; + int tuple; + + node = ofw_bus_get_node(sc->dev); + + OF_getencprop(node, "#address-cells", &pci_addr_cells, + sizeof(pci_addr_cells)); + OF_getencprop(node, "#size-cells", &size_cells, + sizeof(size_cells)); + OF_getencprop(OF_parent(node), "#address-cells", &parent_addr_cells, + sizeof(parent_addr_cells)); + + if (parent_addr_cells != 2 || pci_addr_cells != 3 || size_cells != 2) { + device_printf(sc->dev, + "Unexpected number of address or size cells in FDT\n"); + return (ENXIO); + } + + nbase_ranges = OF_getproplen(node, "ranges"); + sc->nranges = nbase_ranges / sizeof(cell_t) / + (parent_addr_cells + pci_addr_cells + size_cells); + base_ranges = malloc(nbase_ranges, M_DEVBUF, M_WAITOK); + OF_getencprop(node, "ranges", base_ranges, nbase_ranges); + + for (i = 0, j = 0; i < sc->nranges; i++) { + attributes = (base_ranges[j++] >> SPACE_CODE_SHIFT) & \ + SPACE_CODE_MASK; + if (attributes == SPACE_CODE_IO_SPACE) { + sc->ranges[i].flags |= FLAG_IO; + } else { + sc->ranges[i].flags |= FLAG_MEM; + } + + sc->ranges[i].pci_base = 0; + for (k = 0; k < (pci_addr_cells - 1); k++) { + sc->ranges[i].pci_base <<= 32; + sc->ranges[i].pci_base |= base_ranges[j++]; + } + sc->ranges[i].phys_base = 0; + for (k = 0; k < parent_addr_cells; k++) { + sc->ranges[i].phys_base <<= 32; + sc->ranges[i].phys_base |= base_ranges[j++]; + } + sc->ranges[i].size = 0; + for (k = 0; k < size_cells; k++) { + sc->ranges[i].size <<= 32; + sc->ranges[i].size |= base_ranges[j++]; + } + } + + for (; i < MAX_RANGES_TUPLES; i++) { + /* zero-fill remaining tuples to mark empty elements in array */ + sc->ranges[i].pci_base = 0; + sc->ranges[i].phys_base = 0; + sc->ranges[i].size = 0; + } + + if (bootverbose) { + for (tuple = 0; tuple < MAX_RANGES_TUPLES; tuple++) { + device_printf(sc->dev, + "\tPCI addr: 0x%jx, CPU addr: 0x%jx, Size: 0x%jx\n", + sc->ranges[tuple].pci_base, + sc->ranges[tuple].phys_base, + sc->ranges[tuple].size); + } + } + + free(base_ranges, M_DEVBUF); + return (0); +} + +static uint32_t +generic_pcie_read_config(device_t dev, u_int bus, u_int slot, + u_int func, u_int reg, int bytes) +{ + struct generic_pcie_softc *sc; + bus_space_handle_t h; + bus_space_tag_t t; + uint64_t offset; + uint32_t data; + + if (bus > 255 || slot > 31 || func > 7 || reg > 4095) + return (~0U); + + sc = device_get_softc(dev); + + offset = PCIE_ADDR_OFFSET(bus, slot, func, reg); + t = sc->bst; + h = sc->bsh; + + switch (bytes) { + case 1: + data = bus_space_read_1(t, h, offset); + break; + case 2: + data = le16toh(bus_space_read_2(t, h, offset)); + break; + case 4: + data = le32toh(bus_space_read_4(t, h, offset)); + break; + default: + return (~0U); + } + + if (reg == PCIR_INTLINE) { + data += PCI_IRQ_START; + } + + return (data); +} + +static void +generic_pcie_write_config(device_t dev, u_int bus, u_int slot, + u_int func, u_int reg, uint32_t val, int bytes) +{ + struct generic_pcie_softc *sc; + bus_space_handle_t h; + bus_space_tag_t t; + uint64_t offset; + + if (bus > 255 || slot > 31 || func > 7 || reg > 4095) + return; + + sc = device_get_softc(dev); + + offset = PCIE_ADDR_OFFSET(bus, slot, func, reg); + + t = sc->bst; + h = sc->bsh; + + switch (bytes) { + case 1: + bus_space_write_1(t, h, offset, val); + break; + case 2: + bus_space_write_2(t, h, offset, htole16(val)); + break; + case 4: + bus_space_write_4(t, h, offset, htole32(val)); + break; + default: + return; + } +} + +static int +generic_pcie_maxslots(device_t dev) +{ + + return (31); /* max slots per bus acc. to standard */ +} + +static int +generic_pcie_read_ivar(device_t dev, device_t child, int index, + uintptr_t *result) +{ + struct generic_pcie_softc *sc; + int secondary_bus; + + sc = device_get_softc(dev); + + if (index == PCIB_IVAR_BUS) { + /* this pcib adds only pci bus 0 as child */ + secondary_bus = 0; + *result = secondary_bus; + return (0); + + } + + if (index == PCIB_IVAR_DOMAIN) { + *result = sc->ecam; + return (0); + } + + device_printf(dev, "ERROR: Unknown index.\n"); + return (ENOENT); +} + +static int +generic_pcie_write_ivar(device_t dev, device_t child, int index, + uintptr_t value) +{ + + return (ENOENT); +} + +static struct rman * +generic_pcie_rman(struct generic_pcie_softc *sc, int type) +{ + + switch (type) { + case SYS_RES_IOPORT: + return (&sc->io_rman); + case SYS_RES_MEMORY: + return (&sc->mem_rman); + case SYS_RES_IRQ: + return (&sc->irq_rman); + default: + break; + } + + return (NULL); +} + +static int +generic_pcie_release_resource(device_t dev, device_t child, int type, + int rid, struct resource *res) +{ + struct generic_pcie_softc *sc; + struct rman *rm; + + sc = device_get_softc(dev); + + rm = generic_pcie_rman(sc, type); + if (rm != NULL) { + KASSERT(rman_is_region_manager(res, rm), ("rman mismatch")); + rman_release_resource(res); + } + + return (bus_generic_release_resource(dev, child, type, rid, res)); +} + +static struct resource * +generic_pcie_alloc_resource(device_t dev, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct generic_pcie_softc *sc; + struct resource *res; + struct rman *rm; + + sc = device_get_softc(dev); + + rm = generic_pcie_rman(sc, type); + if (rm == NULL) + return (BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, + type, rid, start, end, count, flags)); + + if (bootverbose) { + device_printf(dev, + "rman_reserve_resource: start=%#lx, end=%#lx, count=%#lx\n", + start, end, count); + } + + res = rman_reserve_resource(rm, start, end, count, flags, child); + if (res == NULL) + goto fail; + + rman_set_rid(res, *rid); + + if (flags & RF_ACTIVE) + if (bus_activate_resource(child, type, *rid, res)) { + rman_release_resource(res); + goto fail; + } + + return (res); + +fail: + if (bootverbose) { + device_printf(dev, "%s FAIL: type=%d, rid=%d, " + "start=%016lx, end=%016lx, count=%016lx, flags=%x\n", + __func__, type, *rid, start, end, count, flags); + } + + return (NULL); +} + +static int +generic_pcie_adjust_resource(device_t dev, device_t child, int type, + struct resource *res, u_long start, u_long end) +{ + struct generic_pcie_softc *sc; + struct rman *rm; + + sc = device_get_softc(dev); + + rm = generic_pcie_rman(sc, type); + if (rm != NULL) + return (rman_adjust_resource(res, start, end)); + return (bus_generic_adjust_resource(dev, child, type, res, start, end)); +} + +static int +generic_pcie_activate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct generic_pcie_softc *sc; + uint64_t phys_base; + uint64_t pci_base; + uint64_t size; + int found; + int res; + int i; + + sc = device_get_softc(dev); + + if ((res = rman_activate_resource(r)) != 0) + return (res); + + switch(type) { + case SYS_RES_IOPORT: + found = 0; + for (i = 0; i < MAX_RANGES_TUPLES; i++) { + pci_base = sc->ranges[i].pci_base; + phys_base = sc->ranges[i].phys_base; + size = sc->ranges[i].size; + + if ((rid > pci_base) && (rid < (pci_base + size))) { + found = 1; + break; + } + } + if (found) { + rman_set_start(r, rman_get_start(r) + phys_base); + BUS_ACTIVATE_RESOURCE(device_get_parent(dev), child, + type, rid, r); + } else { + device_printf(dev, "Failed to activate IOPORT resource\n"); + res = 0; + } + break; + case SYS_RES_MEMORY: + BUS_ACTIVATE_RESOURCE(device_get_parent(dev), child, type, rid, r); + break; + default: + break; + } + + return (res); +} + +static int +generic_pcie_deactivate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct generic_pcie_softc *sc; + vm_offset_t vaddr; + int res; + + sc = device_get_softc(dev); + + if ((res = rman_deactivate_resource(r)) != 0) + return (res); + + switch(type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + vaddr = (vm_offset_t)rman_get_virtual(r); + pmap_unmapdev(vaddr, rman_get_size(r)); + break; + default: + break; + } + + return (res); +} + +static device_method_t generic_pcie_methods[] = { + DEVMETHOD(device_probe, generic_pcie_probe), + DEVMETHOD(device_attach, generic_pcie_attach), + DEVMETHOD(bus_read_ivar, generic_pcie_read_ivar), + DEVMETHOD(bus_write_ivar, generic_pcie_write_ivar), + DEVMETHOD(bus_alloc_resource, generic_pcie_alloc_resource), + DEVMETHOD(bus_adjust_resource, generic_pcie_adjust_resource), + DEVMETHOD(bus_release_resource, generic_pcie_release_resource), + DEVMETHOD(bus_activate_resource, generic_pcie_activate_resource), + DEVMETHOD(bus_deactivate_resource, generic_pcie_deactivate_resource), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(pcib_maxslots, generic_pcie_maxslots), + DEVMETHOD(pcib_read_config, generic_pcie_read_config), + DEVMETHOD(pcib_write_config, generic_pcie_write_config), + DEVMETHOD_END +}; + +static driver_t generic_pcie_driver = { + "pcib", + generic_pcie_methods, + sizeof(struct generic_pcie_softc), +}; + +static devclass_t generic_pcie_devclass; + +DRIVER_MODULE(pcib, simplebus, generic_pcie_driver, +generic_pcie_devclass, 0, 0); +DRIVER_MODULE(pcib, ofwbus, generic_pcie_driver, +generic_pcie_devclass, 0, 0); From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 13:54:25 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E88BEBA7; Fri, 12 Jun 2015 13:54:25 +0000 (UTC) (envelope-from br@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D63B81FF4; Fri, 12 Jun 2015 13:54:25 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CDsPSt008658; Fri, 12 Jun 2015 13:54:25 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CDsPVh008652; Fri, 12 Jun 2015 13:54:25 GMT (envelope-from br@FreeBSD.org) Message-Id: <201506121354.t5CDsPVh008652@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 12 Jun 2015 13:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284319 - in head/sys: conf dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 13:54:26 -0000 Author: br Date: Fri Jun 12 13:54:25 2015 New Revision: 284319 URL: https://svnweb.freebsd.org/changeset/base/284319 Log: Rename ECAM PCI driver file. Requested by: imp Added: head/sys/dev/pci/pci_host_generic.c - copied unchanged from r284318, head/sys/dev/pci/pci-host-generic.c Deleted: head/sys/dev/pci/pci-host-generic.c Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Fri Jun 12 13:42:53 2015 (r284318) +++ head/sys/conf/files.arm64 Fri Jun 12 13:54:25 2015 (r284319) @@ -51,7 +51,7 @@ dev/fdt/fdt_arm64.c optional fdt dev/hwpmc/hwpmc_arm64.c optional hwpmc dev/hwpmc/hwpmc_arm64_md.c optional hwpmc dev/ofw/ofw_cpu.c optional fdt -dev/pci/pci-host-generic.c optional pci fdt +dev/pci/pci_host_generic.c optional pci fdt dev/psci/psci.c optional psci dev/psci/psci_arm64.S optional psci dev/uart/uart_cpu_fdt.c optional uart fdt Copied: head/sys/dev/pci/pci_host_generic.c (from r284318, head/sys/dev/pci/pci-host-generic.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/pci/pci_host_generic.c Fri Jun 12 13:54:25 2015 (r284319, copy of r284318, head/sys/dev/pci/pci-host-generic.c) @@ -0,0 +1,626 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * 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 AUTHOR 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. + */ + +/* Generic ECAM PCIe driver */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "pcib_if.h" + +/* Assembling ECAM Configuration Address */ +#define PCIE_BUS_SHIFT 20 +#define PCIE_SLOT_SHIFT 15 +#define PCIE_FUNC_SHIFT 12 +#define PCIE_BUS_MASK 0xFF +#define PCIE_SLOT_MASK 0x1F +#define PCIE_FUNC_MASK 0x07 +#define PCIE_REG_MASK 0xFFF + +#define PCIE_ADDR_OFFSET(bus, slot, func, reg) \ + ((((bus) & PCIE_BUS_MASK) << PCIE_BUS_SHIFT) | \ + (((slot) & PCIE_SLOT_MASK) << PCIE_SLOT_SHIFT) | \ + (((func) & PCIE_FUNC_MASK) << PCIE_FUNC_SHIFT) | \ + ((reg) & PCIE_REG_MASK)) + +#define MAX_RANGES_TUPLES 5 +#define MIN_RANGES_TUPLES 2 + +#define PCI_IO_WINDOW_OFFSET 0x1000 +#define PCI_IRQ_START 32 +#define PCI_IRQ_END (PCI_IRQ_START + 4) + +#define SPACE_CODE_SHIFT 24 +#define SPACE_CODE_MASK 0x3 +#define SPACE_CODE_IO_SPACE 0x1 +#define PROPS_CELL_SIZE 1 +#define PCI_ADDR_CELL_SIZE 2 + +struct pcie_range { + uint64_t pci_base; + uint64_t phys_base; + uint64_t size; + uint64_t flags; +#define FLAG_IO (1 << 0) +#define FLAG_MEM (1 << 1) +}; + +struct generic_pcie_softc { + struct pcie_range ranges[MAX_RANGES_TUPLES]; + int nranges; + struct rman mem_rman; + struct rman io_rman; + struct rman irq_rman; + struct resource *res; + struct resource *res1; + int ecam; + bus_space_tag_t bst; + bus_space_handle_t bsh; + device_t dev; + bus_space_handle_t ioh; +}; + +/* Forward prototypes */ + +static int generic_pcie_probe(device_t dev); +static int generic_pcie_attach(device_t dev); +static int parse_pci_mem_ranges(struct generic_pcie_softc *sc); +static uint32_t generic_pcie_read_config(device_t dev, u_int bus, u_int slot, + u_int func, u_int reg, int bytes); +static void generic_pcie_write_config(device_t dev, u_int bus, u_int slot, + u_int func, u_int reg, uint32_t val, int bytes); +static int generic_pcie_maxslots(device_t dev); +static int generic_pcie_read_ivar(device_t dev, device_t child, int index, + uintptr_t *result); +static int generic_pcie_write_ivar(device_t dev, device_t child, int index, + uintptr_t value); +static struct resource *generic_pcie_alloc_resource(device_t dev, + device_t child, int type, int *rid, u_long start, u_long end, + u_long count, u_int flags); +static int generic_pcie_release_resource(device_t dev, device_t child, + int type, int rid, struct resource *res); + +static int +generic_pcie_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_is_compatible(dev, "pci-host-ecam-generic")) { + device_set_desc(dev, "Generic PCI host controller"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static int +generic_pcie_attach(device_t dev) +{ + struct generic_pcie_softc *sc; + uint64_t phys_base; + uint64_t pci_base; + uint64_t size; + int error; + int tuple; + int rid; + + sc = device_get_softc(dev); + sc->dev = dev; + + rid = 0; + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (sc->res == NULL) { + device_printf(dev, "could not map memory.\n"); + return (ENXIO); + } + + sc->bst = rman_get_bustag(sc->res); + sc->bsh = rman_get_bushandle(sc->res); + + sc->mem_rman.rm_type = RMAN_ARRAY; + sc->mem_rman.rm_descr = "PCIe Memory"; + sc->io_rman.rm_type = RMAN_ARRAY; + sc->io_rman.rm_descr = "PCIe IO window"; + + /* Retrieve 'ranges' property from FDT */ + if (bootverbose) + device_printf(dev, "parsing FDT for ECAM%d:\n", + sc->ecam); + if (parse_pci_mem_ranges(sc)) + return (ENXIO); + + /* Initialize rman and allocate memory regions */ + error = rman_init(&sc->mem_rman); + if (error) { + device_printf(dev, "rman_init() failed. error = %d\n", error); + return (error); + } + + error = rman_init(&sc->io_rman); + if (error) { + device_printf(dev, "rman_init() failed. error = %d\n", error); + return (error); + } + + for (tuple = 0; tuple < MAX_RANGES_TUPLES; tuple++) { + phys_base = sc->ranges[tuple].phys_base; + pci_base = sc->ranges[tuple].pci_base; + size = sc->ranges[tuple].size; + if (phys_base == 0 || size == 0) + continue; /* empty range element */ + if (sc->ranges[tuple].flags & FLAG_MEM) { + error = rman_manage_region(&sc->mem_rman, + phys_base, + phys_base + size); + } else if (sc->ranges[tuple].flags & FLAG_IO) { + error = rman_manage_region(&sc->io_rman, + pci_base + PCI_IO_WINDOW_OFFSET, + pci_base + PCI_IO_WINDOW_OFFSET + size); + } else + continue; + if (error) { + device_printf(dev, "rman_manage_region() failed." + "error = %d\n", error); + rman_fini(&sc->mem_rman); + return (error); + } + } + + /* TODO: get IRQ numbers from FDT */ + sc->irq_rman.rm_type = RMAN_ARRAY; + sc->irq_rman.rm_descr = "Generic PCIe IRQs"; + if (rman_init(&sc->irq_rman) != 0 || + rman_manage_region(&sc->irq_rman, PCI_IRQ_START, + PCI_IRQ_END) != 0) { + panic("Generic PCI: failed to set up IRQ rman"); + } + + device_add_child(dev, "pci", -1); + return (bus_generic_attach(dev)); +} + +static int +parse_pci_mem_ranges(struct generic_pcie_softc *sc) +{ + pcell_t pci_addr_cells, parent_addr_cells; + pcell_t attributes, size_cells; + cell_t *base_ranges; + int nbase_ranges; + phandle_t node; + int i, j, k; + int tuple; + + node = ofw_bus_get_node(sc->dev); + + OF_getencprop(node, "#address-cells", &pci_addr_cells, + sizeof(pci_addr_cells)); + OF_getencprop(node, "#size-cells", &size_cells, + sizeof(size_cells)); + OF_getencprop(OF_parent(node), "#address-cells", &parent_addr_cells, + sizeof(parent_addr_cells)); + + if (parent_addr_cells != 2 || pci_addr_cells != 3 || size_cells != 2) { + device_printf(sc->dev, + "Unexpected number of address or size cells in FDT\n"); + return (ENXIO); + } + + nbase_ranges = OF_getproplen(node, "ranges"); + sc->nranges = nbase_ranges / sizeof(cell_t) / + (parent_addr_cells + pci_addr_cells + size_cells); + base_ranges = malloc(nbase_ranges, M_DEVBUF, M_WAITOK); + OF_getencprop(node, "ranges", base_ranges, nbase_ranges); + + for (i = 0, j = 0; i < sc->nranges; i++) { + attributes = (base_ranges[j++] >> SPACE_CODE_SHIFT) & \ + SPACE_CODE_MASK; + if (attributes == SPACE_CODE_IO_SPACE) { + sc->ranges[i].flags |= FLAG_IO; + } else { + sc->ranges[i].flags |= FLAG_MEM; + } + + sc->ranges[i].pci_base = 0; + for (k = 0; k < (pci_addr_cells - 1); k++) { + sc->ranges[i].pci_base <<= 32; + sc->ranges[i].pci_base |= base_ranges[j++]; + } + sc->ranges[i].phys_base = 0; + for (k = 0; k < parent_addr_cells; k++) { + sc->ranges[i].phys_base <<= 32; + sc->ranges[i].phys_base |= base_ranges[j++]; + } + sc->ranges[i].size = 0; + for (k = 0; k < size_cells; k++) { + sc->ranges[i].size <<= 32; + sc->ranges[i].size |= base_ranges[j++]; + } + } + + for (; i < MAX_RANGES_TUPLES; i++) { + /* zero-fill remaining tuples to mark empty elements in array */ + sc->ranges[i].pci_base = 0; + sc->ranges[i].phys_base = 0; + sc->ranges[i].size = 0; + } + + if (bootverbose) { + for (tuple = 0; tuple < MAX_RANGES_TUPLES; tuple++) { + device_printf(sc->dev, + "\tPCI addr: 0x%jx, CPU addr: 0x%jx, Size: 0x%jx\n", + sc->ranges[tuple].pci_base, + sc->ranges[tuple].phys_base, + sc->ranges[tuple].size); + } + } + + free(base_ranges, M_DEVBUF); + return (0); +} + +static uint32_t +generic_pcie_read_config(device_t dev, u_int bus, u_int slot, + u_int func, u_int reg, int bytes) +{ + struct generic_pcie_softc *sc; + bus_space_handle_t h; + bus_space_tag_t t; + uint64_t offset; + uint32_t data; + + if (bus > 255 || slot > 31 || func > 7 || reg > 4095) + return (~0U); + + sc = device_get_softc(dev); + + offset = PCIE_ADDR_OFFSET(bus, slot, func, reg); + t = sc->bst; + h = sc->bsh; + + switch (bytes) { + case 1: + data = bus_space_read_1(t, h, offset); + break; + case 2: + data = le16toh(bus_space_read_2(t, h, offset)); + break; + case 4: + data = le32toh(bus_space_read_4(t, h, offset)); + break; + default: + return (~0U); + } + + if (reg == PCIR_INTLINE) { + data += PCI_IRQ_START; + } + + return (data); +} + +static void +generic_pcie_write_config(device_t dev, u_int bus, u_int slot, + u_int func, u_int reg, uint32_t val, int bytes) +{ + struct generic_pcie_softc *sc; + bus_space_handle_t h; + bus_space_tag_t t; + uint64_t offset; + + if (bus > 255 || slot > 31 || func > 7 || reg > 4095) + return; + + sc = device_get_softc(dev); + + offset = PCIE_ADDR_OFFSET(bus, slot, func, reg); + + t = sc->bst; + h = sc->bsh; + + switch (bytes) { + case 1: + bus_space_write_1(t, h, offset, val); + break; + case 2: + bus_space_write_2(t, h, offset, htole16(val)); + break; + case 4: + bus_space_write_4(t, h, offset, htole32(val)); + break; + default: + return; + } +} + +static int +generic_pcie_maxslots(device_t dev) +{ + + return (31); /* max slots per bus acc. to standard */ +} + +static int +generic_pcie_read_ivar(device_t dev, device_t child, int index, + uintptr_t *result) +{ + struct generic_pcie_softc *sc; + int secondary_bus; + + sc = device_get_softc(dev); + + if (index == PCIB_IVAR_BUS) { + /* this pcib adds only pci bus 0 as child */ + secondary_bus = 0; + *result = secondary_bus; + return (0); + + } + + if (index == PCIB_IVAR_DOMAIN) { + *result = sc->ecam; + return (0); + } + + device_printf(dev, "ERROR: Unknown index.\n"); + return (ENOENT); +} + +static int +generic_pcie_write_ivar(device_t dev, device_t child, int index, + uintptr_t value) +{ + + return (ENOENT); +} + +static struct rman * +generic_pcie_rman(struct generic_pcie_softc *sc, int type) +{ + + switch (type) { + case SYS_RES_IOPORT: + return (&sc->io_rman); + case SYS_RES_MEMORY: + return (&sc->mem_rman); + case SYS_RES_IRQ: + return (&sc->irq_rman); + default: + break; + } + + return (NULL); +} + +static int +generic_pcie_release_resource(device_t dev, device_t child, int type, + int rid, struct resource *res) +{ + struct generic_pcie_softc *sc; + struct rman *rm; + + sc = device_get_softc(dev); + + rm = generic_pcie_rman(sc, type); + if (rm != NULL) { + KASSERT(rman_is_region_manager(res, rm), ("rman mismatch")); + rman_release_resource(res); + } + + return (bus_generic_release_resource(dev, child, type, rid, res)); +} + +static struct resource * +generic_pcie_alloc_resource(device_t dev, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct generic_pcie_softc *sc; + struct resource *res; + struct rman *rm; + + sc = device_get_softc(dev); + + rm = generic_pcie_rman(sc, type); + if (rm == NULL) + return (BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, + type, rid, start, end, count, flags)); + + if (bootverbose) { + device_printf(dev, + "rman_reserve_resource: start=%#lx, end=%#lx, count=%#lx\n", + start, end, count); + } + + res = rman_reserve_resource(rm, start, end, count, flags, child); + if (res == NULL) + goto fail; + + rman_set_rid(res, *rid); + + if (flags & RF_ACTIVE) + if (bus_activate_resource(child, type, *rid, res)) { + rman_release_resource(res); + goto fail; + } + + return (res); + +fail: + if (bootverbose) { + device_printf(dev, "%s FAIL: type=%d, rid=%d, " + "start=%016lx, end=%016lx, count=%016lx, flags=%x\n", + __func__, type, *rid, start, end, count, flags); + } + + return (NULL); +} + +static int +generic_pcie_adjust_resource(device_t dev, device_t child, int type, + struct resource *res, u_long start, u_long end) +{ + struct generic_pcie_softc *sc; + struct rman *rm; + + sc = device_get_softc(dev); + + rm = generic_pcie_rman(sc, type); + if (rm != NULL) + return (rman_adjust_resource(res, start, end)); + return (bus_generic_adjust_resource(dev, child, type, res, start, end)); +} + +static int +generic_pcie_activate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct generic_pcie_softc *sc; + uint64_t phys_base; + uint64_t pci_base; + uint64_t size; + int found; + int res; + int i; + + sc = device_get_softc(dev); + + if ((res = rman_activate_resource(r)) != 0) + return (res); + + switch(type) { + case SYS_RES_IOPORT: + found = 0; + for (i = 0; i < MAX_RANGES_TUPLES; i++) { + pci_base = sc->ranges[i].pci_base; + phys_base = sc->ranges[i].phys_base; + size = sc->ranges[i].size; + + if ((rid > pci_base) && (rid < (pci_base + size))) { + found = 1; + break; + } + } + if (found) { + rman_set_start(r, rman_get_start(r) + phys_base); + BUS_ACTIVATE_RESOURCE(device_get_parent(dev), child, + type, rid, r); + } else { + device_printf(dev, "Failed to activate IOPORT resource\n"); + res = 0; + } + break; + case SYS_RES_MEMORY: + BUS_ACTIVATE_RESOURCE(device_get_parent(dev), child, type, rid, r); + break; + default: + break; + } + + return (res); +} + +static int +generic_pcie_deactivate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct generic_pcie_softc *sc; + vm_offset_t vaddr; + int res; + + sc = device_get_softc(dev); + + if ((res = rman_deactivate_resource(r)) != 0) + return (res); + + switch(type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + vaddr = (vm_offset_t)rman_get_virtual(r); + pmap_unmapdev(vaddr, rman_get_size(r)); + break; + default: + break; + } + + return (res); +} + +static device_method_t generic_pcie_methods[] = { + DEVMETHOD(device_probe, generic_pcie_probe), + DEVMETHOD(device_attach, generic_pcie_attach), + DEVMETHOD(bus_read_ivar, generic_pcie_read_ivar), + DEVMETHOD(bus_write_ivar, generic_pcie_write_ivar), + DEVMETHOD(bus_alloc_resource, generic_pcie_alloc_resource), + DEVMETHOD(bus_adjust_resource, generic_pcie_adjust_resource), + DEVMETHOD(bus_release_resource, generic_pcie_release_resource), + DEVMETHOD(bus_activate_resource, generic_pcie_activate_resource), + DEVMETHOD(bus_deactivate_resource, generic_pcie_deactivate_resource), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(pcib_maxslots, generic_pcie_maxslots), + DEVMETHOD(pcib_read_config, generic_pcie_read_config), + DEVMETHOD(pcib_write_config, generic_pcie_write_config), + DEVMETHOD_END +}; + +static driver_t generic_pcie_driver = { + "pcib", + generic_pcie_methods, + sizeof(struct generic_pcie_softc), +}; + +static devclass_t generic_pcie_devclass; + +DRIVER_MODULE(pcib, simplebus, generic_pcie_driver, +generic_pcie_devclass, 0, 0); +DRIVER_MODULE(pcib, ofwbus, generic_pcie_driver, +generic_pcie_devclass, 0, 0); From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 13:57:05 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C45CBD12; Fri, 12 Jun 2015 13:57:05 +0000 (UTC) (envelope-from glebius@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A60AE60; Fri, 12 Jun 2015 13:57:05 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CDv5kC009109; Fri, 12 Jun 2015 13:57:05 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CDv5eK009107; Fri, 12 Jun 2015 13:57:05 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201506121357.t5CDv5eK009107@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 12 Jun 2015 13:57:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284320 - head/sys/dev/atkbdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 13:57:05 -0000 Author: glebius Date: Fri Jun 12 13:57:04 2015 New Revision: 284320 URL: https://svnweb.freebsd.org/changeset/base/284320 Log: Unbreak mouse on resume on Thinkpads when hw.psm.trackpoint_support=0, which is default. It was broken in r281441. It appears that set_trackpoint_parameters() call on resume disables the mouse. So, we need not call it on resume if hw.psm.trackpoint_support=0. The problem is that the probe functions are used both for probing and for reiniting on resume. And the absense of the softc parameter is used as a mark to distinguish reinit and probe, which is quite ugly. At the same time the softc parameter is needed to call set_trackpoint_parameters(). o Change the arguments of probefunc_t to always supply the softc, and use additional enum argument to tell probing from initing. o Don't call set_trackpoint_parameters() from global doinitialize(), instead call it from the enable_trackpoint() only. o In enable_synaptics() call enable_trackpoint() in both probe and reinit cases. Together with: Jan Kokemüller Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Fri Jun 12 13:54:25 2015 (r284319) +++ head/sys/dev/atkbdc/psm.c Fri Jun 12 13:57:04 2015 (r284320) @@ -462,7 +462,8 @@ static int tame_mouse(struct psm_softc * u_char *); /* vendor specific features */ -typedef int probefunc_t(KBDC, struct psm_softc *); +enum probearg { PROBE, REINIT }; +typedef int probefunc_t(struct psm_softc *, enum probearg); static int mouse_id_proc1(KBDC, int, int, int *); static int mouse_ext_command(KBDC, int); @@ -882,7 +883,7 @@ doinitialize(struct psm_softc *sc, mouse /* Re-enable the mouse. */ for (i = 0; vendortype[i].probefunc != NULL; ++i) if (vendortype[i].model == sc->hw.model) - (*vendortype[i].probefunc)(sc->kbdc, NULL); + (*vendortype[i].probefunc)(sc, REINIT); /* set mouse parameters */ if (mode != (mousemode_t *)NULL) { @@ -893,13 +894,6 @@ doinitialize(struct psm_softc *sc, mouse set_mouse_resolution(kbdc, mode->resolution); set_mouse_scaling(kbdc, 1); set_mouse_mode(kbdc); - - /* - * Trackpoint settings are lost on resume. - * Restore them here. - */ - if (sc->tphw > 0) - set_trackpoint_parameters(sc); } /* Record sync on the next data packet we see. */ @@ -1388,7 +1382,7 @@ psmprobe(device_t dev) /* other parameters */ for (i = 0; vendortype[i].probefunc != NULL; ++i) - if ((*vendortype[i].probefunc)(sc->kbdc, sc)) { + if ((*vendortype[i].probefunc)(sc, PROBE)) { if (verbose >= 2) printf("psm%d: found %s\n", unit, model_name(vendortype[i].model)); @@ -3731,8 +3725,9 @@ mouse_ext_command(KBDC kbdc, int command #ifdef notyet /* Logitech MouseMan Cordless II */ static int -enable_lcordless(KDBC kbdc, struct psm_softc *sc) +enable_lcordless(struct psm_softc *sc, enum probearg arg) { + KBDC kbdc = sc->kbdc; int status[3]; int ch; @@ -3753,8 +3748,9 @@ enable_lcordless(KDBC kbdc, struct psm_s /* Genius NetScroll Mouse, MouseSystems SmartScroll Mouse */ static int -enable_groller(KBDC kbdc, struct psm_softc *sc) +enable_groller(struct psm_softc *sc, enum probearg arg) { + KBDC kbdc = sc->kbdc; int status[3]; /* @@ -3783,15 +3779,16 @@ enable_groller(KBDC kbdc, struct psm_sof if ((status[1] != '3') || (status[2] != 'D')) return (FALSE); /* FIXME: SmartScroll Mouse has 5 buttons! XXX */ - if (sc != NULL) + if (arg == PROBE) sc->hw.buttons = 4; return (TRUE); } /* Genius NetMouse/NetMouse Pro, ASCII Mie Mouse, NetScroll Optical */ static int -enable_gmouse(KBDC kbdc, struct psm_softc *sc) +enable_gmouse(struct psm_softc *sc, enum probearg arg) { + KBDC kbdc = sc->kbdc; int status[3]; /* @@ -3813,8 +3810,9 @@ enable_gmouse(KBDC kbdc, struct psm_soft /* ALPS GlidePoint */ static int -enable_aglide(KBDC kbdc, struct psm_softc *sc) +enable_aglide(struct psm_softc *sc, enum probearg arg) { + KBDC kbdc = sc->kbdc; int status[3]; /* @@ -3835,9 +3833,10 @@ enable_aglide(KBDC kbdc, struct psm_soft /* Kensington ThinkingMouse/Trackball */ static int -enable_kmouse(KBDC kbdc, struct psm_softc *sc) +enable_kmouse(struct psm_softc *sc, enum probearg arg) { static u_char rate[] = { 20, 60, 40, 20, 20, 60, 40, 20, 20 }; + KBDC kbdc = sc->kbdc; int status[3]; int id1; int id2; @@ -3888,8 +3887,9 @@ enable_kmouse(KBDC kbdc, struct psm_soft /* Logitech MouseMan+/FirstMouse+, IBM ScrollPoint Mouse */ static int -enable_mmanplus(KBDC kbdc, struct psm_softc *sc) +enable_mmanplus(struct psm_softc *sc, enum probearg arg) { + KBDC kbdc = sc->kbdc; int data[3]; /* the special sequence to enable the fourth button and the roller. */ @@ -3930,7 +3930,7 @@ enable_mmanplus(KBDC kbdc, struct psm_so if (MOUSE_PS2PLUS_PACKET_TYPE(data) != 0) return (FALSE); - if (sc != NULL) { + if (arg == PROBE) { sc->hw.hwid &= 0x00ff; sc->hw.hwid |= data[2] << 8; /* save model ID */ } @@ -3946,8 +3946,9 @@ enable_mmanplus(KBDC kbdc, struct psm_so /* MS IntelliMouse Explorer */ static int -enable_msexplorer(KBDC kbdc, struct psm_softc *sc) +enable_msexplorer(struct psm_softc *sc, enum probearg arg) { + KBDC kbdc = sc->kbdc; static u_char rate0[] = { 200, 100, 80, }; static u_char rate1[] = { 200, 200, 80, }; int id; @@ -3958,7 +3959,7 @@ enable_msexplorer(KBDC kbdc, struct psm_ * straight to Explorer mode, but need to be set to Intelli mode * first. */ - enable_msintelli(kbdc, sc); + enable_msintelli(sc, arg); /* the special sequence to enable the extra buttons and the roller. */ for (i = 0; i < sizeof(rate1)/sizeof(rate1[0]); ++i) @@ -3969,7 +3970,7 @@ enable_msexplorer(KBDC kbdc, struct psm_ if (id != PSM_EXPLORER_ID) return (FALSE); - if (sc != NULL) { + if (arg == PROBE) { sc->hw.buttons = 5; /* IntelliMouse Explorer XXX */ sc->hw.hwid = id; } @@ -3992,15 +3993,15 @@ enable_msexplorer(KBDC kbdc, struct psm_ return (TRUE); } -/* MS IntelliMouse */ +/* + * MS IntelliMouse + * Logitech MouseMan+ and FirstMouse+ will also respond to this + * probe routine and act like IntelliMouse. + */ static int -enable_msintelli(KBDC kbdc, struct psm_softc *sc) +enable_msintelli(struct psm_softc *sc, enum probearg arg) { - /* - * Logitech MouseMan+ and FirstMouse+ will also respond to this - * probe routine and act like IntelliMouse. - */ - + KBDC kbdc = sc->kbdc; static u_char rate[] = { 200, 100, 80, }; int id; int i; @@ -4014,7 +4015,7 @@ enable_msintelli(KBDC kbdc, struct psm_s if (id != PSM_INTELLI_ID) return (FALSE); - if (sc != NULL) { + if (arg == PROBE) { sc->hw.buttons = 3; sc->hw.hwid = id; } @@ -4022,15 +4023,15 @@ enable_msintelli(KBDC kbdc, struct psm_s return (TRUE); } -/* A4 Tech 4D Mouse */ +/* + * A4 Tech 4D Mouse + * Newer wheel mice from A4 Tech may use the 4D+ protocol. + */ static int -enable_4dmouse(KBDC kbdc, struct psm_softc *sc) +enable_4dmouse(struct psm_softc *sc, enum probearg arg) { - /* - * Newer wheel mice from A4 Tech may use the 4D+ protocol. - */ - static u_char rate[] = { 200, 100, 80, 60, 40, 20 }; + KBDC kbdc = sc->kbdc; int id; int i; @@ -4046,7 +4047,7 @@ enable_4dmouse(KBDC kbdc, struct psm_sof if (id != PSM_4DMOUSE_ID) return (FALSE); - if (sc != NULL) { + if (arg == PROBE) { sc->hw.buttons = 3; /* XXX some 4D mice have 4? */ sc->hw.hwid = id; } @@ -4054,14 +4055,15 @@ enable_4dmouse(KBDC kbdc, struct psm_sof return (TRUE); } -/* A4 Tech 4D+ Mouse */ +/* + * A4 Tech 4D+ Mouse + * Newer wheel mice from A4 Tech seem to use this protocol. + * Older models are recognized as either 4D Mouse or IntelliMouse. + */ static int -enable_4dplus(KBDC kbdc, struct psm_softc *sc) +enable_4dplus(struct psm_softc *sc, enum probearg arg) { - /* - * Newer wheel mice from A4 Tech seem to use this protocol. - * Older models are recognized as either 4D Mouse or IntelliMouse. - */ + KBDC kbdc = sc->kbdc; int id; /* @@ -4084,7 +4086,7 @@ enable_4dplus(KBDC kbdc, struct psm_soft return (FALSE); } - if (sc != NULL) { + if (arg == PROBE) { sc->hw.buttons = (id == PSM_4DPLUS_ID) ? 4 : 3; sc->hw.hwid = id; } @@ -4543,8 +4545,9 @@ synaptics_set_mode(struct psm_softc *sc, } static int -enable_synaptics(KBDC kbdc, struct psm_softc *sc) +enable_synaptics(struct psm_softc *sc, enum probearg arg) { + KBDC kbdc = sc->kbdc; synapticshw_t synhw; int status[3]; int buttons; @@ -4828,20 +4831,22 @@ enable_synaptics(KBDC kbdc, struct psm_s return (FALSE); } - if (sc != NULL) + if (arg == PROBE) sc->synhw = synhw; if (!synaptics_support) return (FALSE); + synaptics_set_mode(sc, synaptics_preferred_mode(sc)); + + if (trackpoint_support && synhw.capPassthrough) { + synaptics_passthrough_on(sc); + enable_trackpoint(sc, arg); + synaptics_passthrough_off(sc); + } + VLOG(3, (LOG_DEBUG, "synaptics: END init (%d buttons)\n", buttons)); - if (sc != NULL) { - synaptics_set_mode(sc, synaptics_preferred_mode(sc)); - if (trackpoint_support && synhw.capPassthrough) { - synaptics_passthrough_on(sc); - enable_trackpoint(kbdc, sc); - synaptics_passthrough_off(sc); - } + if (arg == PROBE) { /* Create sysctl tree. */ synaptics_sysctl_create_tree(sc); sc->hw.buttons = buttons; @@ -5086,8 +5091,9 @@ set_trackpoint_parameters(struct psm_sof } static int -enable_trackpoint(KBDC kbdc, struct psm_softc *sc) +enable_trackpoint(struct psm_softc *sc, enum probearg arg) { + KBDC kbdc = sc->kbdc; int id; if (send_aux_command(kbdc, 0xe1) != PSM_ACK || @@ -5101,10 +5107,8 @@ enable_trackpoint(KBDC kbdc, struct psm_ if (!trackpoint_support) return (FALSE); - if (sc != NULL) { - /* Create sysctl tree. */ + if (arg == PROBE) { trackpoint_sysctl_create_tree(sc); - /* * Don't overwrite hwid and buttons when we are * a guest device. @@ -5115,13 +5119,16 @@ enable_trackpoint(KBDC kbdc, struct psm_ } } + set_trackpoint_parameters(sc); + return (TRUE); } /* Interlink electronics VersaPad */ static int -enable_versapad(KBDC kbdc, struct psm_softc *sc) +enable_versapad(struct psm_softc *sc, enum probearg arg) { + KBDC kbdc = sc->kbdc; int data[3]; set_mouse_resolution(kbdc, PSMD_RES_MEDIUM_HIGH); /* set res. 2 */ From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 14:30:32 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACE1672F; Fri, 12 Jun 2015 14:30:32 +0000 (UTC) (envelope-from sjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 994E6A7B; Fri, 12 Jun 2015 14:30:32 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CEUWWL025834; Fri, 12 Jun 2015 14:30:32 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CEUSDk025811; Fri, 12 Jun 2015 14:30:28 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201506121430.t5CEUSDk025811@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Fri, 12 Jun 2015 14:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284321 - in head: gnu/usr.bin/groff/font/devX100 gnu/usr.bin/groff/font/devX100-12 gnu/usr.bin/groff/font/devX75 gnu/usr.bin/groff/font/devX75-12 share/doc/IPv6 share/doc/atf share/doc... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 14:30:32 -0000 Author: sjg Date: Fri Jun 12 14:30:27 2015 New Revision: 284321 URL: https://svnweb.freebsd.org/changeset/base/284321 Log: Get rid of some more NO_OBJs Differential Revision: D2748 Modified: head/gnu/usr.bin/groff/font/devX100-12/Makefile head/gnu/usr.bin/groff/font/devX100/Makefile head/gnu/usr.bin/groff/font/devX75-12/Makefile head/gnu/usr.bin/groff/font/devX75/Makefile head/share/doc/IPv6/Makefile head/share/doc/atf/Makefile head/share/doc/legal/intel_ipw/Makefile head/share/doc/legal/intel_iwi/Makefile head/share/doc/legal/intel_iwn/Makefile head/share/doc/legal/intel_wpi/Makefile head/share/doc/legal/realtek/Makefile head/share/doc/llvm/Makefile head/share/doc/llvm/clang/Makefile head/share/doc/pjdfstest/Makefile head/usr.sbin/pc-sysinstall/doc/Makefile Modified: head/gnu/usr.bin/groff/font/devX100-12/Makefile ============================================================================== --- head/gnu/usr.bin/groff/font/devX100-12/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/gnu/usr.bin/groff/font/devX100-12/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - .include "../Makefile.inc" .include "${DIST_DIR}/Makefile.sub" .include "../Makefile.dev" Modified: head/gnu/usr.bin/groff/font/devX100/Makefile ============================================================================== --- head/gnu/usr.bin/groff/font/devX100/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/gnu/usr.bin/groff/font/devX100/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - .include "../Makefile.inc" .include "${DIST_DIR}/Makefile.sub" .include "../Makefile.dev" Modified: head/gnu/usr.bin/groff/font/devX75-12/Makefile ============================================================================== --- head/gnu/usr.bin/groff/font/devX75-12/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/gnu/usr.bin/groff/font/devX75-12/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - .include "../Makefile.inc" .include "${DIST_DIR}/Makefile.sub" .include "../Makefile.dev" Modified: head/gnu/usr.bin/groff/font/devX75/Makefile ============================================================================== --- head/gnu/usr.bin/groff/font/devX75/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/gnu/usr.bin/groff/font/devX75/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - .include "../Makefile.inc" .include "${DIST_DIR}/Makefile.sub" .include "../Makefile.dev" Modified: head/share/doc/IPv6/Makefile ============================================================================== --- head/share/doc/IPv6/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/share/doc/IPv6/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -1,6 +1,5 @@ # $FreeBSD$ -NO_OBJ= FILES= IMPLEMENTATION FILESDIR= ${SHAREDIR}/doc/IPv6 Modified: head/share/doc/atf/Makefile ============================================================================== --- head/share/doc/atf/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/share/doc/atf/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -29,8 +29,6 @@ ATF= ${.CURDIR}/../../../contrib/atf .PATH: ${ATF} .PATH: ${ATF}/doc -NO_OBJ= - FILESGROUPS= TOP TOPDIR= ${SHAREDIR}/doc/atf Modified: head/share/doc/legal/intel_ipw/Makefile ============================================================================== --- head/share/doc/legal/intel_ipw/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/share/doc/legal/intel_ipw/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -1,6 +1,5 @@ # $FreeBSD$ -NO_OBJ= FILES= ${.CURDIR}/../../../../sys/contrib/dev/ipw/LICENSE FILESDIR= ${SHAREDIR}/doc/legal/intel_ipw Modified: head/share/doc/legal/intel_iwi/Makefile ============================================================================== --- head/share/doc/legal/intel_iwi/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/share/doc/legal/intel_iwi/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -1,6 +1,5 @@ # $FreeBSD$ -NO_OBJ= FILES= ${.CURDIR}/../../../../sys/contrib/dev/iwi/LICENSE FILESDIR= ${SHAREDIR}/doc/legal/intel_iwi Modified: head/share/doc/legal/intel_iwn/Makefile ============================================================================== --- head/share/doc/legal/intel_iwn/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/share/doc/legal/intel_iwn/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -1,6 +1,5 @@ # $FreeBSD$ -NO_OBJ= FILES= ${.CURDIR}/../../../../sys/contrib/dev/iwn/LICENSE FILESDIR= ${SHAREDIR}/doc/legal/intel_iwn Modified: head/share/doc/legal/intel_wpi/Makefile ============================================================================== --- head/share/doc/legal/intel_wpi/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/share/doc/legal/intel_wpi/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -1,6 +1,5 @@ # $FreeBSD$ -NO_OBJ= FILES= ${.CURDIR}/../../../../sys/contrib/dev/wpi/LICENSE FILESDIR= ${SHAREDIR}/doc/legal/intel_wpi Modified: head/share/doc/legal/realtek/Makefile ============================================================================== --- head/share/doc/legal/realtek/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/share/doc/legal/realtek/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -1,6 +1,5 @@ # $FreeBSD$ -NO_OBJ= FILES= ${.CURDIR}/../../../../sys/contrib/dev/urtwn/LICENSE FILESDIR= ${SHAREDIR}/doc/legal/realtek Modified: head/share/doc/llvm/Makefile ============================================================================== --- head/share/doc/llvm/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/share/doc/llvm/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -6,8 +6,6 @@ SRCDIR= ${.CURDIR}/../../../contrib/llv .PATH: ${SRCDIR} ${SRCDIR}/lib/Support -NO_OBJ= - FILESGROUPS= TOP TOP= LICENSE.TXT COPYRIGHT.regex TOPDIR= ${DOCDIR}/llvm Modified: head/share/doc/llvm/clang/Makefile ============================================================================== --- head/share/doc/llvm/clang/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/share/doc/llvm/clang/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -4,8 +4,6 @@ SRCDIR= ${.CURDIR}/../../../../contrib/ .PATH: ${SRCDIR} -NO_OBJ= - FILESGROUPS= TOP TOP= LICENSE.TXT TOPDIR= ${DOCDIR}/llvm/clang Modified: head/share/doc/pjdfstest/Makefile ============================================================================== --- head/share/doc/pjdfstest/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/share/doc/pjdfstest/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -1,7 +1,5 @@ # $FreeBSD$ -NO_OBJ= - FILESDIR= ${SHAREDIR}/doc/pjdfstest FILES= README Modified: head/usr.sbin/pc-sysinstall/doc/Makefile ============================================================================== --- head/usr.sbin/pc-sysinstall/doc/Makefile Fri Jun 12 13:57:04 2015 (r284320) +++ head/usr.sbin/pc-sysinstall/doc/Makefile Fri Jun 12 14:30:27 2015 (r284321) @@ -3,6 +3,5 @@ FILES= help-disk-list help-disk-size help-index help-start-autoinstall FILESDIR=${SHAREDIR}/pc-sysinstall/doc -NO_OBJ= .include From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 14:53:57 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1E48D49; Fri, 12 Jun 2015 14:53:56 +0000 (UTC) (envelope-from marcel@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D34BD12C; Fri, 12 Jun 2015 14:53:56 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CEruER039309; Fri, 12 Jun 2015 14:53:56 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CEruuA039308; Fri, 12 Jun 2015 14:53:56 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201506121453.t5CEruuA039308@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Fri, 12 Jun 2015 14:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284322 - head/tools/bus_space X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 14:53:57 -0000 Author: marcel Date: Fri Jun 12 14:53:56 2015 New Revision: 284322 URL: https://svnweb.freebsd.org/changeset/base/284322 Log: Free the segment objects properly. Modified: head/tools/bus_space/busdma.c Modified: head/tools/bus_space/busdma.c ============================================================================== --- head/tools/bus_space/busdma.c Fri Jun 12 14:30:27 2015 (r284321) +++ head/tools/bus_space/busdma.c Fri Jun 12 14:53:56 2015 (r284322) @@ -273,17 +273,15 @@ bd_mem_alloc(int tid, u_int flags) tag->refcnt++; md->key = ioc.result; + /* XXX we need to support multiple segments */ assert(ioc.u.mem.phys_nsegs == 1); - pseg = obj_alloc(OBJ_TYPE_SEG); - pseg->refcnt = 1; - pseg->parent = md; - pseg->u.seg.address = ioc.u.mem.phys_addr; - pseg->u.seg.size = tag->u.tag.maxsz; - md->u.md.seg[BUSDMA_MD_PHYS] = pseg; - md->u.md.nsegs[BUSDMA_MD_PHYS] = ioc.u.mem.phys_nsegs; - assert(ioc.u.mem.bus_nsegs == 1); + + bseg = pseg = vseg = NULL; + bseg = obj_alloc(OBJ_TYPE_SEG); + if (bseg == NULL) + goto fail; bseg->refcnt = 1; bseg->parent = md; bseg->u.seg.address = ioc.u.mem.bus_addr; @@ -291,33 +289,71 @@ bd_mem_alloc(int tid, u_int flags) md->u.md.seg[BUSDMA_MD_BUS] = bseg; md->u.md.nsegs[BUSDMA_MD_BUS] = ioc.u.mem.bus_nsegs; + pseg = obj_alloc(OBJ_TYPE_SEG); + if (pseg == NULL) + goto fail; + pseg->refcnt = 1; + pseg->parent = md; + pseg->u.seg.address = ioc.u.mem.phys_addr; + pseg->u.seg.size = tag->u.tag.maxsz; + md->u.md.seg[BUSDMA_MD_PHYS] = pseg; + md->u.md.nsegs[BUSDMA_MD_PHYS] = ioc.u.mem.phys_nsegs; + vseg = obj_alloc(OBJ_TYPE_SEG); + if (vseg == NULL) + goto fail; vseg->refcnt = 1; vseg->parent = md; vseg->u.seg.address = (uintptr_t)mmap(NULL, pseg->u.seg.size, PROT_READ | PROT_WRITE, MAP_NOCORE | MAP_SHARED, md->fd, pseg->u.seg.address); + if (vseg->u.seg.address == (uintptr_t)MAP_FAILED) + goto fail; vseg->u.seg.size = pseg->u.seg.size; md->u.md.seg[BUSDMA_MD_VIRT] = vseg; md->u.md.nsegs[BUSDMA_MD_VIRT] = 1; return (md->oid); + + fail: + if (vseg != NULL) + obj_free(vseg); + if (pseg != NULL) + obj_free(pseg); + if (bseg != NULL) + obj_free(bseg); + memset(&ioc, 0, sizeof(ioc)); + ioc.request = PROTO_IOC_BUSDMA_MEM_FREE; + ioc.key = md->key; + ioctl(md->fd, PROTO_IOC_BUSDMA, &ioc); + md->parent->refcnt--; + obj_free(md); + return (-1); } int bd_mem_free(int mdid) { struct proto_ioc_busdma ioc; - struct obj *md, *seg; + struct obj *md, *seg, *seg0; md = obj_lookup(mdid, OBJ_TYPE_MD); if (md == NULL) return (errno); - for (seg = md->u.md.seg[BUSDMA_MD_VIRT]; - seg != NULL; - seg = seg->u.seg.next) + for (seg = md->u.md.seg[BUSDMA_MD_VIRT]; seg != NULL; seg = seg0) { munmap((void *)seg->u.seg.address, seg->u.seg.size); + seg0 = seg->u.seg.next; + obj_free(seg); + } + for (seg = md->u.md.seg[BUSDMA_MD_PHYS]; seg != NULL; seg = seg0) { + seg0 = seg->u.seg.next; + obj_free(seg); + } + for (seg = md->u.md.seg[BUSDMA_MD_BUS]; seg != NULL; seg = seg0) { + seg0 = seg->u.seg.next; + obj_free(seg); + } memset(&ioc, 0, sizeof(ioc)); ioc.request = PROTO_IOC_BUSDMA_MEM_FREE; ioc.key = md->key; From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 15:03:59 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE1A29E; Fri, 12 Jun 2015 15:03:59 +0000 (UTC) (envelope-from brueffer@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC24C40E; Fri, 12 Jun 2015 15:03:59 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CF3xfo044395; Fri, 12 Jun 2015 15:03:59 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CF3xsE044394; Fri, 12 Jun 2015 15:03:59 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201506121503.t5CF3xsE044394@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Fri, 12 Jun 2015 15:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284323 - head/sbin/geom/class/multipath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 15:03:59 -0000 Author: brueffer Date: Fri Jun 12 15:03:59 2015 New Revision: 284323 URL: https://svnweb.freebsd.org/changeset/base/284323 Log: Add a missing word, should have been in r284290. Submitted by: Fabian Keil Modified: head/sbin/geom/class/multipath/gmultipath.8 Modified: head/sbin/geom/class/multipath/gmultipath.8 ============================================================================== --- head/sbin/geom/class/multipath/gmultipath.8 Fri Jun 12 14:53:56 2015 (r284322) +++ head/sbin/geom/class/multipath/gmultipath.8 Fri Jun 12 15:03:59 2015 (r284323) @@ -271,7 +271,7 @@ device has a .Nm MULTIPATH on-disk metadata label, the device is either used to create a new .Nm MULTIPATH -GEOM, or added the list of paths for an existing +GEOM, or added to the list of paths for an existing .Nm MULTIPATH GEOM. .Pp From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 15:06:18 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D566E220; Fri, 12 Jun 2015 15:06:18 +0000 (UTC) (envelope-from jhb@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7B595FD; Fri, 12 Jun 2015 15:06:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CF6I0m044798; Fri, 12 Jun 2015 15:06:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CF6ICs044796; Fri, 12 Jun 2015 15:06:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506121506.t5CF6ICs044796@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 12 Jun 2015 15:06:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284324 - in head/sys/i386: i386 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 15:06:19 -0000 Author: jhb Date: Fri Jun 12 15:06:17 2015 New Revision: 284324 URL: https://svnweb.freebsd.org/changeset/base/284324 Log: Ensure that the upper 16 bits of segment registers manually saved in trapframes are cleared by explicitly pushing a zero and then moving the segment register into the low 16 bits. Certain Intel processors treat a push of a segment register as a move of the segment register into the low 16 bits leaving the upper 16 bits of the word in the stack unchanged. Reviewed by: kib MFC after: 1 month Modified: head/sys/i386/i386/exception.s head/sys/i386/include/asmacros.h Modified: head/sys/i386/i386/exception.s ============================================================================== --- head/sys/i386/i386/exception.s Fri Jun 12 15:03:59 2015 (r284323) +++ head/sys/i386/i386/exception.s Fri Jun 12 15:06:17 2015 (r284324) @@ -157,9 +157,12 @@ IDTVEC(xmm) .type alltraps,@function alltraps: pushal - pushl %ds - pushl %es - pushl %fs + pushl $0 + movl %ds,(%esp) + pushl $0 + movl %es,(%esp) + pushl $0 + movl %fs,(%esp) alltraps_with_regs_pushed: SET_KERNEL_SREGS cld @@ -233,9 +236,12 @@ IDTVEC(lcall_syscall) pushl $7 /* sizeof "lcall 7,0" */ subl $4,%esp /* skip over tf_trapno */ pushal - pushl %ds - pushl %es - pushl %fs + pushl $0 + movl %ds,(%esp) + pushl $0 + movl %es,(%esp) + pushl $0 + movl %fs,(%esp) SET_KERNEL_SREGS cld FAKE_MCOUNT(TF_EIP(%esp)) @@ -259,9 +265,12 @@ IDTVEC(int0x80_syscall) pushl $2 /* sizeof "int 0x80" */ subl $4,%esp /* skip over tf_trapno */ pushal - pushl %ds - pushl %es - pushl %fs + pushl $0 + movl %ds,(%esp) + pushl $0 + movl %es,(%esp) + pushl $0 + movl %fs,(%esp) SET_KERNEL_SREGS cld FAKE_MCOUNT(TF_EIP(%esp)) @@ -416,13 +425,16 @@ doreti_iret: doreti_iret_fault: subl $8,%esp pushal - pushl %ds + pushl $0 + movl %ds,(%esp) .globl doreti_popl_ds_fault doreti_popl_ds_fault: - pushl %es + pushl $0 + movl %es,(%esp) .globl doreti_popl_es_fault doreti_popl_es_fault: - pushl %fs + pushl $0 + movl %fs,(%esp) .globl doreti_popl_fs_fault doreti_popl_fs_fault: sti Modified: head/sys/i386/include/asmacros.h ============================================================================== --- head/sys/i386/include/asmacros.h Fri Jun 12 15:03:59 2015 (r284323) +++ head/sys/i386/include/asmacros.h Fri Jun 12 15:06:17 2015 (r284324) @@ -146,9 +146,12 @@ pushl $0 ; /* dummy error code */ \ pushl $0 ; /* dummy trap type */ \ pushal ; /* 8 ints */ \ - pushl %ds ; /* save data and extra segments ... */ \ - pushl %es ; \ - pushl %fs + pushl $0 ; /* save data and extra segments ... */ \ + mov %ds,(%esp) ; \ + pushl $0 ; \ + mov %es,(%esp) ; \ + pushl $0 ; \ + mov %fs,(%esp) #define POP_FRAME \ popl %fs ; \ From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 15:14:10 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E47856C; Fri, 12 Jun 2015 15:14:10 +0000 (UTC) (envelope-from jhb@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C4E8898; Fri, 12 Jun 2015 15:14:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CFE9Ds049789; Fri, 12 Jun 2015 15:14:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CFE9Fu049784; Fri, 12 Jun 2015 15:14:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201506121514.t5CFE9Fu049784@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 12 Jun 2015 15:14:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284325 - in head/sys: amd64/amd64 i386/i386 i386/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 15:14:10 -0000 Author: jhb Date: Fri Jun 12 15:14:08 2015 New Revision: 284325 URL: https://svnweb.freebsd.org/changeset/base/284325 Log: Report the values of x86 segment registers to remote debuggers. While here, also report %eflags from the i386 trapframe. Differential Revision: https://reviews.freebsd.org/D2743 Reviewed by: kib Obtained from: 1 month Modified: head/sys/amd64/amd64/gdb_machdep.c head/sys/i386/i386/gdb_machdep.c head/sys/i386/i386/machdep.c head/sys/i386/include/gdb_machdep.h Modified: head/sys/amd64/amd64/gdb_machdep.c ============================================================================== --- head/sys/amd64/amd64/gdb_machdep.c Fri Jun 12 15:06:17 2015 (r284324) +++ head/sys/amd64/amd64/gdb_machdep.c Fri Jun 12 15:14:08 2015 (r284325) @@ -48,6 +48,8 @@ __FBSDID("$FreeBSD$"); void * gdb_cpu_getreg(int regnum, size_t *regsz) { + static uint32_t _kcodesel = GSEL(GCODE_SEL, SEL_KPL); + static uint32_t _kdatasel = GSEL(GDATA_SEL, SEL_KPL); *regsz = gdb_cpu_regsz(regnum); @@ -76,6 +78,8 @@ gdb_cpu_getreg(int regnum, size_t *regsz case 14: return (&kdb_thrctx->pcb_r14); case 15: return (&kdb_thrctx->pcb_r15); case 16: return (&kdb_thrctx->pcb_rip); + case 18: return (&_kcodesel); + case 19: return (&_kdatasel); } return (NULL); } Modified: head/sys/i386/i386/gdb_machdep.c ============================================================================== --- head/sys/i386/i386/gdb_machdep.c Fri Jun 12 15:06:17 2015 (r284324) +++ head/sys/i386/i386/gdb_machdep.c Fri Jun 12 15:14:08 2015 (r284325) @@ -45,14 +45,22 @@ __FBSDID("$FreeBSD$"); void * gdb_cpu_getreg(int regnum, size_t *regsz) { + static uint32_t _kcodesel = GSEL(GCODE_SEL, SEL_KPL); + static uint32_t _kdatasel = GSEL(GDATA_SEL, SEL_KPL); + static uint32_t _kprivsel = GSEL(GPRIV_SEL, SEL_KPL); *regsz = gdb_cpu_regsz(regnum); - if (kdb_thread == curthread) { + if (kdb_thread == curthread) { switch (regnum) { case 0: return (&kdb_frame->tf_eax); case 1: return (&kdb_frame->tf_ecx); case 2: return (&kdb_frame->tf_edx); + case 9: return (&kdb_frame->tf_eflags); + case 10: return (&kdb_frame->tf_cs); + case 12: return (&kdb_frame->tf_ds); + case 13: return (&kdb_frame->tf_es); + case 14: return (&kdb_frame->tf_fs); } } switch (regnum) { @@ -62,6 +70,12 @@ gdb_cpu_getreg(int regnum, size_t *regsz case 6: return (&kdb_thrctx->pcb_esi); case 7: return (&kdb_thrctx->pcb_edi); case 8: return (&kdb_thrctx->pcb_eip); + case 10: return (&_kcodesel); + case 11: return (&_kdatasel); + case 12: return (&_kdatasel); + case 13: return (&_kdatasel); + case 14: return (&_kprivsel); + case 15: return (&kdb_thrctx->pcb_gs); } return (NULL); } Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Fri Jun 12 15:06:17 2015 (r284324) +++ head/sys/i386/i386/machdep.c Fri Jun 12 15:14:08 2015 (r284325) @@ -2867,6 +2867,7 @@ makectx(struct trapframe *tf, struct pcb pcb->pcb_ebx = tf->tf_ebx; pcb->pcb_eip = tf->tf_eip; pcb->pcb_esp = (ISPL(tf->tf_cs)) ? tf->tf_esp : (int)(tf + 1) - 8; + pcb->pcb_gs = rgs(); } int Modified: head/sys/i386/include/gdb_machdep.h ============================================================================== --- head/sys/i386/include/gdb_machdep.h Fri Jun 12 15:06:17 2015 (r284324) +++ head/sys/i386/include/gdb_machdep.h Fri Jun 12 15:14:08 2015 (r284325) @@ -30,7 +30,7 @@ #define _MACHINE_GDB_MACHDEP_H_ #define GDB_BUFSZ 400 -#define GDB_NREGS 14 +#define GDB_NREGS 16 #define GDB_REG_PC 8 static __inline size_t From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 16:01:42 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79B76343; Fri, 12 Jun 2015 16:01:42 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EE7D659; Fri, 12 Jun 2015 16:01:42 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CG1goW074870; Fri, 12 Jun 2015 16:01:42 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CG1gqU074869; Fri, 12 Jun 2015 16:01:42 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201506121601.t5CG1gqU074869@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 12 Jun 2015 16:01:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284326 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 16:01:42 -0000 Author: tuexen Date: Fri Jun 12 16:01:41 2015 New Revision: 284326 URL: https://svnweb.freebsd.org/changeset/base/284326 Log: In case of an output error, continue with the next net, don't try to continue sending on the same net. This fixes a bug where an invalid mbuf chain was constructed, if a full size frame of control chunks should be sent and there is a output error. Based on a discussion with rrs@, change move to the next net. This fixes the bug and improves the behaviour. Thanks to Irene Ruengeler for spending a lot of time in narrowing this problem down. MFC after: 3 days Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Fri Jun 12 15:14:08 2015 (r284325) +++ head/sys/netinet/sctp_output.c Fri Jun 12 16:01:41 2015 (r284326) @@ -7985,6 +7985,7 @@ again_one_more_time: } else { r_mtu = mtu; } + error = 0; /************************/ /* ASCONF transmission */ /************************/ @@ -8143,7 +8144,7 @@ again_one_more_time: sctp_move_chunks_from_net(stcb, net); } *reason_code = 7; - continue; + break; } else asoc->ifp_had_enobuf = 0; if (*now_filled == 0) { @@ -8186,6 +8187,10 @@ again_one_more_time: } } } + if (error != 0) { + /* try next net */ + continue; + } /************************/ /* Control transmission */ /************************/ @@ -8420,7 +8425,7 @@ again_one_more_time: sctp_move_chunks_from_net(stcb, net); } *reason_code = 7; - continue; + break; } else asoc->ifp_had_enobuf = 0; /* Only HB or ASCONF advances time */ @@ -8466,6 +8471,10 @@ again_one_more_time: } } } + if (error != 0) { + /* try next net */ + continue; + } /* JRI: if dest is in PF state, do not send data to it */ if ((asoc->sctp_cmt_on_off > 0) && (net != stcb->asoc.alternate) && From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 16:48:52 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C6386A9; Fri, 12 Jun 2015 16:48:52 +0000 (UTC) (envelope-from jkim@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5655D127; Fri, 12 Jun 2015 16:48:52 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CGmqWq097221; Fri, 12 Jun 2015 16:48:52 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CGmRWg097068; Fri, 12 Jun 2015 16:48:27 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201506121648.t5CGmRWg097068@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 12 Jun 2015 16:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284329 - in head: crypto/openssl crypto/openssl/crypto crypto/openssl/crypto/hmac crypto/openssl/ssl secure/lib/libcrypto secure/lib/libcrypto/man secure/lib/libssl/man secure/usr.bin/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 16:48:52 -0000 Author: jkim Date: Fri Jun 12 16:48:26 2015 New Revision: 284329 URL: https://svnweb.freebsd.org/changeset/base/284329 Log: Merge OpenSSL 1.0.1o. Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Makefile head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/crypto/hmac/hmac.c head/crypto/openssl/crypto/hmac/hmac.h head/crypto/openssl/crypto/hmac/hmactest.c head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/ssl/t1_lib.c head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/c_rehash.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Fri Jun 12 16:36:05 2015 (r284328) +++ head/crypto/openssl/CHANGES Fri Jun 12 16:48:26 2015 (r284329) @@ -2,6 +2,12 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1n and 1.0.1o [12 Jun 2015] + + *) Fix HMAC ABI incompatibility. The previous version introduced an ABI + incompatibility in the handling of HMAC. The previous ABI has now been + restored. + Changes between 1.0.1m and 1.0.1n [11 Jun 2015] *) Malformed ECParameters causes infinite loop Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Fri Jun 12 16:36:05 2015 (r284328) +++ head/crypto/openssl/Makefile Fri Jun 12 16:48:26 2015 (r284329) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1n +VERSION=1.0.1o MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Fri Jun 12 16:36:05 2015 (r284328) +++ head/crypto/openssl/NEWS Fri Jun 12 16:48:26 2015 (r284329) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1n and OpenSSL 1.0.1o [12 Jun 2015] + + o Fix HMAC ABI incompatibility + Major changes between OpenSSL 1.0.1m and OpenSSL 1.0.1n [11 Jun 2015] o Malformed ECParameters causes infinite loop (CVE-2015-1788) Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Fri Jun 12 16:36:05 2015 (r284328) +++ head/crypto/openssl/README Fri Jun 12 16:48:26 2015 (r284329) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1n 11 Jun 2015 + OpenSSL 1.0.1o 12 Jun 2015 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/crypto/hmac/hmac.c ============================================================================== --- head/crypto/openssl/crypto/hmac/hmac.c Fri Jun 12 16:36:05 2015 (r284328) +++ head/crypto/openssl/crypto/hmac/hmac.c Fri Jun 12 16:48:26 2015 (r284329) @@ -87,6 +87,9 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const vo return FIPS_hmac_init_ex(ctx, key, len, md, NULL); } #endif + /* If we are changing MD then we must have a key */ + if (md != NULL && md != ctx->md && (key == NULL || len < 0)) + return 0; if (md != NULL) { reset = 1; @@ -97,9 +100,6 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const vo return 0; } - if (!ctx->key_init && key == NULL) - return 0; - if (key != NULL) { reset = 1; j = EVP_MD_block_size(md); @@ -121,7 +121,6 @@ int HMAC_Init_ex(HMAC_CTX *ctx, const vo if (ctx->key_length != HMAC_MAX_MD_CBLOCK) memset(&ctx->key[ctx->key_length], 0, HMAC_MAX_MD_CBLOCK - ctx->key_length); - ctx->key_init = 1; } if (reset) { @@ -159,7 +158,7 @@ int HMAC_Update(HMAC_CTX *ctx, const uns if (FIPS_mode() && !ctx->i_ctx.engine) return FIPS_hmac_update(ctx, data, len); #endif - if (!ctx->key_init) + if (!ctx->md) return 0; return EVP_DigestUpdate(&ctx->md_ctx, data, len); @@ -174,7 +173,7 @@ int HMAC_Final(HMAC_CTX *ctx, unsigned c return FIPS_hmac_final(ctx, md, len); #endif - if (!ctx->key_init) + if (!ctx->md) goto err; if (!EVP_DigestFinal_ex(&ctx->md_ctx, buf, &i)) @@ -195,7 +194,6 @@ void HMAC_CTX_init(HMAC_CTX *ctx) EVP_MD_CTX_init(&ctx->i_ctx); EVP_MD_CTX_init(&ctx->o_ctx); EVP_MD_CTX_init(&ctx->md_ctx); - ctx->key_init = 0; ctx->md = NULL; } @@ -207,11 +205,8 @@ int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_C goto err; if (!EVP_MD_CTX_copy(&dctx->md_ctx, &sctx->md_ctx)) goto err; - dctx->key_init = sctx->key_init; - if (sctx->key_init) { - memcpy(dctx->key, sctx->key, HMAC_MAX_MD_CBLOCK); - dctx->key_length = sctx->key_length; - } + memcpy(dctx->key, sctx->key, HMAC_MAX_MD_CBLOCK); + dctx->key_length = sctx->key_length; dctx->md = sctx->md; return 1; err: Modified: head/crypto/openssl/crypto/hmac/hmac.h ============================================================================== --- head/crypto/openssl/crypto/hmac/hmac.h Fri Jun 12 16:36:05 2015 (r284328) +++ head/crypto/openssl/crypto/hmac/hmac.h Fri Jun 12 16:48:26 2015 (r284329) @@ -79,7 +79,6 @@ typedef struct hmac_ctx_st { EVP_MD_CTX o_ctx; unsigned int key_length; unsigned char key[HMAC_MAX_MD_CBLOCK]; - int key_init; } HMAC_CTX; # define HMAC_size(e) (EVP_MD_size((e)->md)) Modified: head/crypto/openssl/crypto/hmac/hmactest.c ============================================================================== --- head/crypto/openssl/crypto/hmac/hmactest.c Fri Jun 12 16:36:05 2015 (r284328) +++ head/crypto/openssl/crypto/hmac/hmactest.c Fri Jun 12 16:48:26 2015 (r284329) @@ -233,7 +233,12 @@ test5: err++; goto test6; } - if (!HMAC_Init_ex(&ctx, NULL, 0, EVP_sha256(), NULL)) { + if (HMAC_Init_ex(&ctx, NULL, 0, EVP_sha256(), NULL)) { + printf("Should disallow changing MD without a new key (test 5)\n"); + err++; + goto test6; + } + if (!HMAC_Init_ex(&ctx, test[4].key, test[4].key_len, EVP_sha256(), NULL)) { printf("Failed to reinitialise HMAC (test 5)\n"); err++; goto test6; Modified: head/crypto/openssl/crypto/opensslv.h ============================================================================== --- head/crypto/openssl/crypto/opensslv.h Fri Jun 12 16:36:05 2015 (r284328) +++ head/crypto/openssl/crypto/opensslv.h Fri Jun 12 16:48:26 2015 (r284329) @@ -30,11 +30,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -# define OPENSSL_VERSION_NUMBER 0x100010efL +# define OPENSSL_VERSION_NUMBER 0x100010ffL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1n-fips 11 Jun 2015" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1o-fips 12 Jun 2015" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1n-freebsd 11 Jun 2015" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1o-freebsd 12 Jun 2015" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: head/crypto/openssl/ssl/t1_lib.c ============================================================================== --- head/crypto/openssl/ssl/t1_lib.c Fri Jun 12 16:36:05 2015 (r284328) +++ head/crypto/openssl/ssl/t1_lib.c Fri Jun 12 16:48:26 2015 (r284329) @@ -1016,12 +1016,12 @@ int ssl_parse_clienthello_tlsext(SSL *s, s->srtp_profile = NULL; - if (data >= (d + n - 2)) { - if (data != d + n) - goto err; - else - goto ri_check; - } + if (data == d + n) + goto ri_check; + + if (data > (d + n - 2)) + goto err; + n2s(data, len); if (data > (d + n - len)) Modified: head/secure/lib/libcrypto/Makefile.inc ============================================================================== --- head/secure/lib/libcrypto/Makefile.inc Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/Makefile.inc Fri Jun 12 16:48:26 2015 (r284329) @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.0.1n -OPENSSL_DATE= 2015-06-11 +OPENSSL_VER= 1.0.1o +OPENSSL_DATE= 2015-06-12 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc Modified: head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_length.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_length 3" -.TH ASN1_STRING_length 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH ASN1_STRING_length 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_new 3" -.TH ASN1_STRING_new 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH ASN1_STRING_new 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_print_ex 3" -.TH ASN1_STRING_print_ex 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH ASN1_STRING_print_ex 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_generate_nconf 3" -.TH ASN1_generate_nconf 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH ASN1_generate_nconf 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_ctrl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_ctrl.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_ctrl.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ctrl 3" -.TH BIO_ctrl 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_ctrl 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_base64.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_base64.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_f_base64.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_base64 3" -.TH BIO_f_base64 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_f_base64 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_buffer.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_buffer.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_f_buffer.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_buffer 3" -.TH BIO_f_buffer 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_f_buffer 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_cipher.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_cipher.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_f_cipher.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_cipher 3" -.TH BIO_f_cipher 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_f_cipher 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_md.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_md.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_f_md.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_md 3" -.TH BIO_f_md 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_f_md 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_null.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_f_null.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_null 3" -.TH BIO_f_null 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_f_null 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_ssl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_ssl.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_f_ssl.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_ssl 3" -.TH BIO_f_ssl 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_f_ssl 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_find_type.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_find_type.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_find_type.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_find_type 3" -.TH BIO_find_type 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_find_type 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_new.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_new.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new 3" -.TH BIO_new 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_new 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_new_CMS.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_new_CMS.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_new_CMS.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new_CMS 3" -.TH BIO_new_CMS 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_new_CMS 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_push.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_push.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_push.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_push 3" -.TH BIO_push 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_push 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_read.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_read.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_read.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_read 3" -.TH BIO_read 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_read 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_accept.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_accept.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_s_accept.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_accept 3" -.TH BIO_s_accept 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_s_accept 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_bio.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_bio.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_s_bio.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_bio 3" -.TH BIO_s_bio 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_s_bio 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_connect.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_connect.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_s_connect.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_connect 3" -.TH BIO_s_connect 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_s_connect 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_fd.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_fd.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_s_fd.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_fd 3" -.TH BIO_s_fd 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_s_fd 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_file.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_s_file.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_file 3" -.TH BIO_s_file 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_s_file 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_mem.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_mem.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_s_mem.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_mem 3" -.TH BIO_s_mem 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_s_mem 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_null.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_s_null.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_null 3" -.TH BIO_s_null 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_s_null 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_socket.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_socket.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_s_socket.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_socket 3" -.TH BIO_s_socket 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_s_socket 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_set_callback.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_set_callback.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_set_callback.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_set_callback 3" -.TH BIO_set_callback 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_set_callback 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_should_retry.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_should_retry.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BIO_should_retry.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_should_retry 3" -.TH BIO_should_retry 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BIO_should_retry 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_BLINDING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_BLINDING_new 3" -.TH BN_BLINDING_new 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_BLINDING_new 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_CTX_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_new.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_CTX_new.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_new 3" -.TH BN_CTX_new 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_CTX_new 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_CTX_start.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_start.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_CTX_start.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_start 3" -.TH BN_CTX_start 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_CTX_start 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_add.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_add.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add 3" -.TH BN_add 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_add 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_add_word.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add_word.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_add_word.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add_word 3" -.TH BN_add_word 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_add_word 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_bn2bin.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_bn2bin.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_bn2bin.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_bn2bin 3" -.TH BN_bn2bin 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_bn2bin 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_cmp.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_cmp.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_cmp.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_cmp 3" -.TH BN_cmp 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_cmp 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_copy.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_copy.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_copy.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_copy 3" -.TH BN_copy 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_copy 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_generate_prime.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_generate_prime.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_generate_prime.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_generate_prime 3" -.TH BN_generate_prime 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_generate_prime 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_inverse.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_inverse.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_mod_inverse.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_inverse 3" -.TH BN_mod_inverse 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_mod_inverse 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_montgomery 3" -.TH BN_mod_mul_montgomery 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_mod_mul_montgomery 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_reciprocal 3" -.TH BN_mod_mul_reciprocal 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_mod_mul_reciprocal 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_new.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_new.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_new 3" -.TH BN_new 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_new 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_num_bytes.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_num_bytes.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_num_bytes.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_num_bytes 3" -.TH BN_num_bytes 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_num_bytes 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_rand.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_rand.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_rand.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_rand 3" -.TH BN_rand 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_rand 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_set_bit.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_set_bit.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_set_bit.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_set_bit 3" -.TH BN_set_bit 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_set_bit 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_swap.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_swap.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_swap.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_swap 3" -.TH BN_swap 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_swap 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_zero.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_zero.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/BN_zero.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_zero 3" -.TH BN_zero 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH BN_zero 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add0_cert.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add0_cert.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_add0_cert.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add0_cert 3" -.TH CMS_add0_cert 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_add0_cert 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_recipient_cert 3" -.TH CMS_add1_recipient_cert 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_add1_recipient_cert 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add1_signer.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add1_signer.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_add1_signer.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_signer 3" -.TH CMS_add1_signer 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_add1_signer 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_compress.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_compress.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_compress.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_compress 3" -.TH CMS_compress 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_compress 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_decrypt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_decrypt.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_decrypt.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_decrypt 3" -.TH CMS_decrypt 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_decrypt 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_encrypt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_encrypt.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_encrypt.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_encrypt 3" -.TH CMS_encrypt 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_encrypt 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_final.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_final.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_final.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_final 3" -.TH CMS_final 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_final 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_RecipientInfos 3" -.TH CMS_get0_RecipientInfos 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_get0_RecipientInfos 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_SignerInfos 3" -.TH CMS_get0_SignerInfos 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_get0_SignerInfos 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_type.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_type.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_get0_type.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_type 3" -.TH CMS_get0_type 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_get0_type 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get1_ReceiptRequest 3" -.TH CMS_get1_ReceiptRequest 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_get1_ReceiptRequest 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_sign.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_sign.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign 3" -.TH CMS_sign 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_sign 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_sign_receipt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_sign_receipt.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_sign_receipt.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign_receipt 3" -.TH CMS_sign_receipt 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_sign_receipt 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_uncompress.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_uncompress.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_uncompress.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_uncompress 3" -.TH CMS_uncompress 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_uncompress 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_verify.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_verify.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_verify.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify 3" -.TH CMS_verify 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_verify 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_verify_receipt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_verify_receipt.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CMS_verify_receipt.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify_receipt 3" -.TH CMS_verify_receipt 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CMS_verify_receipt 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CONF_modules_free.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_free.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CONF_modules_free.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_free 3" -.TH CONF_modules_free 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CONF_modules_free 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CONF_modules_load_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_load_file 3" -.TH CONF_modules_load_file 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CONF_modules_load_file 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 ============================================================================== --- head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CRYPTO_set_ex_data 3" -.TH CRYPTO_set_ex_data 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH CRYPTO_set_ex_data 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_key.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/DH_generate_key.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_key 3" -.TH DH_generate_key 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH DH_generate_key 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_generate_parameters.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_parameters.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/DH_generate_parameters.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_parameters 3" -.TH DH_generate_parameters 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH DH_generate_parameters 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_get_ex_new_index 3" -.TH DH_get_ex_new_index 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH DH_get_ex_new_index 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_new.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/DH_new.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_new 3" -.TH DH_new 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH DH_new 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_set_method.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_set_method.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/DH_set_method.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_set_method 3" -.TH DH_set_method 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH DH_set_method 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_size.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_size.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/DH_size.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_size 3" -.TH DH_size 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH DH_size 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_SIG_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_SIG_new.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/DSA_SIG_new.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_SIG_new 3" -.TH DSA_SIG_new 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH DSA_SIG_new 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_do_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_do_sign.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/DSA_do_sign.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_do_sign 3" -.TH DSA_do_sign 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH DSA_do_sign 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_dup_DH.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_dup_DH.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/DSA_dup_DH.3 Fri Jun 12 16:48:26 2015 (r284329) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_dup_DH 3" -.TH DSA_dup_DH 3 "2015-06-11" "1.0.1n" "OpenSSL" +.TH DSA_dup_DH 3 "2015-06-12" "1.0.1o" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_generate_key.3 Fri Jun 12 16:36:05 2015 (r284328) +++ head/secure/lib/libcrypto/man/DSA_generate_key.3 Fri Jun 12 16:48:26 2015 (r284329) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 17:20:10 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E42DAEFD; Fri, 12 Jun 2015 17:20:09 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5A8AA7A; Fri, 12 Jun 2015 17:20:09 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CHK9d1013152; Fri, 12 Jun 2015 17:20:09 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CHK9Dr013121; Fri, 12 Jun 2015 17:20:09 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201506121720.t5CHK9Dr013121@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 12 Jun 2015 17:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284331 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 17:20:10 -0000 Author: tuexen Date: Fri Jun 12 17:20:09 2015 New Revision: 284331 URL: https://svnweb.freebsd.org/changeset/base/284331 Log: Code cleanup. MFC after: 3 days Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Fri Jun 12 17:10:19 2015 (r284330) +++ head/sys/netinet/sctp_output.c Fri Jun 12 17:20:09 2015 (r284331) @@ -8109,6 +8109,12 @@ again_one_more_time: * it is used to do appropriate * source address selection. */ + if (*now_filled == 0) { + (void)SCTP_GETTIME_TIMEVAL(now); + *now_filled = 1; + } + net->last_sent_time = *now; + hbflag = 0; if ((error = sctp_lowlevel_chunk_output(inp, stcb, net, (struct sockaddr *)&net->ro._l_addr, outchain, auth_offset, auth, @@ -8119,21 +8125,18 @@ again_one_more_time: net->port, NULL, 0, 0, so_locked))) { - if (error == ENOBUFS) { - asoc->ifp_had_enobuf = 1; - SCTP_STAT_INCR(sctps_lowlevelerr); - } + /* + * error, we could not + * output + */ + SCTPDBG(SCTP_DEBUG_OUTPUT3, "Gak send error %d\n", error); if (from_where == 0) { SCTP_STAT_INCR(sctps_lowlevelerrusr); } - if (*now_filled == 0) { - (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); - *now_filled = 1; - *now = net->last_sent_time; - } else { - net->last_sent_time = *now; + if (error == ENOBUFS) { + asoc->ifp_had_enobuf = 1; + SCTP_STAT_INCR(sctps_lowlevelerr); } - hbflag = 0; /* error, could not output */ if (error == EHOSTUNREACH) { /* @@ -8145,16 +8148,9 @@ again_one_more_time: } *reason_code = 7; break; - } else - asoc->ifp_had_enobuf = 0; - if (*now_filled == 0) { - (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); - *now_filled = 1; - *now = net->last_sent_time; } else { - net->last_sent_time = *now; + asoc->ifp_had_enobuf = 0; } - hbflag = 0; /* * increase the number we sent, if a * cookie is sent we don't tell them @@ -8387,6 +8383,15 @@ again_one_more_time: sctp_timer_start(SCTP_TIMER_TYPE_COOKIE, inp, stcb, net); cookie = 0; } + /* Only HB or ASCONF advances time */ + if (hbflag) { + if (*now_filled == 0) { + (void)SCTP_GETTIME_TIMEVAL(now); + *now_filled = 1; + } + net->last_sent_time = *now; + hbflag = 0; + } if ((error = sctp_lowlevel_chunk_output(inp, stcb, net, (struct sockaddr *)&net->ro._l_addr, outchain, @@ -8398,23 +8403,17 @@ again_one_more_time: net->port, NULL, 0, 0, so_locked))) { - if (error == ENOBUFS) { - asoc->ifp_had_enobuf = 1; - SCTP_STAT_INCR(sctps_lowlevelerr); - } + /* + * error, we could not + * output + */ + SCTPDBG(SCTP_DEBUG_OUTPUT3, "Gak send error %d\n", error); if (from_where == 0) { SCTP_STAT_INCR(sctps_lowlevelerrusr); } - /* error, could not output */ - if (hbflag) { - if (*now_filled == 0) { - (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); - *now_filled = 1; - *now = net->last_sent_time; - } else { - net->last_sent_time = *now; - } - hbflag = 0; + if (error == ENOBUFS) { + asoc->ifp_had_enobuf = 1; + SCTP_STAT_INCR(sctps_lowlevelerr); } if (error == EHOSTUNREACH) { /* @@ -8426,18 +8425,8 @@ again_one_more_time: } *reason_code = 7; break; - } else + } else { asoc->ifp_had_enobuf = 0; - /* Only HB or ASCONF advances time */ - if (hbflag) { - if (*now_filled == 0) { - (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); - *now_filled = 1; - *now = net->last_sent_time; - } else { - net->last_sent_time = *now; - } - hbflag = 0; } /* * increase the number we sent, if a @@ -8729,6 +8718,14 @@ no_data_fill: */ sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); } + if (bundle_at || hbflag) { + /* For data/asconf and hb set time */ + if (*now_filled == 0) { + (void)SCTP_GETTIME_TIMEVAL(now); + *now_filled = 1; + } + net->last_sent_time = *now; + } /* Now send it, if there is anything to send :> */ if ((error = sctp_lowlevel_chunk_output(inp, stcb, @@ -8747,23 +8744,13 @@ no_data_fill: 0, 0, so_locked))) { /* error, we could not output */ - if (error == ENOBUFS) { - SCTP_STAT_INCR(sctps_lowlevelerr); - asoc->ifp_had_enobuf = 1; - } + SCTPDBG(SCTP_DEBUG_OUTPUT3, "Gak send error %d\n", error); if (from_where == 0) { SCTP_STAT_INCR(sctps_lowlevelerrusr); } - SCTPDBG(SCTP_DEBUG_OUTPUT3, "Gak send error %d\n", error); - if (hbflag) { - if (*now_filled == 0) { - (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); - *now_filled = 1; - *now = net->last_sent_time; - } else { - net->last_sent_time = *now; - } - hbflag = 0; + if (error == ENOBUFS) { + SCTP_STAT_INCR(sctps_lowlevelerr); + asoc->ifp_had_enobuf = 1; } if (error == EHOSTUNREACH) { /* @@ -8788,16 +8775,6 @@ no_data_fill: endoutchain = NULL; auth = NULL; auth_offset = 0; - if (bundle_at || hbflag) { - /* For data/asconf and hb set time */ - if (*now_filled == 0) { - (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); - *now_filled = 1; - *now = net->last_sent_time; - } else { - net->last_sent_time = *now; - } - } if (!no_out_cnt) { *num_out += (ctl_cnt + bundle_at); } From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 18:59:30 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 746ADF04; Fri, 12 Jun 2015 18:59:30 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 626A135F; Fri, 12 Jun 2015 18:59:30 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CIxUrV062310; Fri, 12 Jun 2015 18:59:30 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CIxUKC062309; Fri, 12 Jun 2015 18:59:30 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201506121859.t5CIxUKC062309@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 12 Jun 2015 18:59:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284332 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 18:59:30 -0000 Author: tuexen Date: Fri Jun 12 18:59:29 2015 New Revision: 284332 URL: https://svnweb.freebsd.org/changeset/base/284332 Log: Fix the reporting of the PMTUD state for specific paths. MFC after: 3 days Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Fri Jun 12 17:20:09 2015 (r284331) +++ head/sys/netinet/sctp_usrreq.c Fri Jun 12 18:59:29 2015 (r284332) @@ -2464,9 +2464,9 @@ flags_out: } /* get flags for PMTU */ if (net->dest_state & SCTP_ADDR_NO_PMTUD) { - paddrp->spp_flags |= SPP_PMTUD_ENABLE; - } else { paddrp->spp_flags |= SPP_PMTUD_DISABLE; + } else { + paddrp->spp_flags |= SPP_PMTUD_ENABLE; } if (net->dscp & 0x01) { paddrp->spp_dscp = net->dscp & 0xfc; From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 19:42:30 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 678347B7; Fri, 12 Jun 2015 19:42:30 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 489F5B6; Fri, 12 Jun 2015 19:42:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5CJgU4X088122; Fri, 12 Jun 2015 19:42:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5CJgSkH088098; Fri, 12 Jun 2015 19:42:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201506121942.t5CJgSkH088098@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 Jun 2015 19:42:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284333 - head/release/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 19:42:30 -0000 Author: gjb Date: Fri Jun 12 19:42:27 2015 New Revision: 284333 URL: https://svnweb.freebsd.org/changeset/base/284333 Log: Reduce the arm/armv6 image size from 1G to 480M. Since the images are effectively mostly zeros at 1G, reduce the size to allow installation on smaller SD cards, such as 512Mb. While here, stop writing the /boot.txt file on the WANDBOARD, which isn't used anyway. Discussed with: imp MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/arm/BEAGLEBONE.conf head/release/arm/CUBOX-HUMMINGBOARD.conf head/release/arm/GUMSTIX.conf head/release/arm/PANDABOARD.conf head/release/arm/RPI-B.conf head/release/arm/RPI2.conf head/release/arm/WANDBOARD.conf Modified: head/release/arm/BEAGLEBONE.conf ============================================================================== --- head/release/arm/BEAGLEBONE.conf Fri Jun 12 18:59:29 2015 (r284332) +++ head/release/arm/BEAGLEBONE.conf Fri Jun 12 19:42:27 2015 (r284333) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-beaglebone" KERNEL="BEAGLEBONE" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" -IMAGE_SIZE="1G" +IMAGE_SIZE="480M" PART_SCHEME="MBR" FAT_SIZE="2m" FAT_TYPE="12" Modified: head/release/arm/CUBOX-HUMMINGBOARD.conf ============================================================================== --- head/release/arm/CUBOX-HUMMINGBOARD.conf Fri Jun 12 18:59:29 2015 (r284332) +++ head/release/arm/CUBOX-HUMMINGBOARD.conf Fri Jun 12 19:42:27 2015 (r284333) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-cubox-hummingboard" KERNEL="IMX6" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x12000000" -IMAGE_SIZE="1G" +IMAGE_SIZE="480M" PART_SCHEME="MBR" FAT_SIZE="50m -b 16384" FAT_TYPE="16" Modified: head/release/arm/GUMSTIX.conf ============================================================================== --- head/release/arm/GUMSTIX.conf Fri Jun 12 18:59:29 2015 (r284332) +++ head/release/arm/GUMSTIX.conf Fri Jun 12 19:42:27 2015 (r284333) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-duovero" KERNEL="GUMSTIX" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" -IMAGE_SIZE="1G" +IMAGE_SIZE="480M" PART_SCHEME="MBR" FAT_SIZE="2m" FAT_TYPE="12" Modified: head/release/arm/PANDABOARD.conf ============================================================================== --- head/release/arm/PANDABOARD.conf Fri Jun 12 18:59:29 2015 (r284332) +++ head/release/arm/PANDABOARD.conf Fri Jun 12 19:42:27 2015 (r284333) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-pandaboard" KERNEL="PANDABOARD" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x88000000" -IMAGE_SIZE="1G" +IMAGE_SIZE="480M" PART_SCHEME="MBR" FAT_SIZE="2m" FAT_TYPE="12" Modified: head/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Fri Jun 12 18:59:29 2015 (r284332) +++ head/release/arm/RPI-B.conf Fri Jun 12 19:42:27 2015 (r284333) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-rpi" KERNEL="RPI-B" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x2000000" -IMAGE_SIZE="1G" +IMAGE_SIZE="480M" PART_SCHEME="MBR" FAT_SIZE="17m" FAT_TYPE="16" Modified: head/release/arm/RPI2.conf ============================================================================== --- head/release/arm/RPI2.conf Fri Jun 12 18:59:29 2015 (r284332) +++ head/release/arm/RPI2.conf Fri Jun 12 19:42:27 2015 (r284333) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-rpi2" KERNEL="RPI2" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x2000000" -IMAGE_SIZE="1G" +IMAGE_SIZE="480M" PART_SCHEME="MBR" FAT_SIZE="50m" FAT_TYPE="16" Modified: head/release/arm/WANDBOARD.conf ============================================================================== --- head/release/arm/WANDBOARD.conf Fri Jun 12 18:59:29 2015 (r284332) +++ head/release/arm/WANDBOARD.conf Fri Jun 12 19:42:27 2015 (r284333) @@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-wandboard" KERNEL="IMX6" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x12000000" -IMAGE_SIZE="1G" +IMAGE_SIZE="480M" PART_SCHEME="MBR" FAT_SIZE="50m -b 16384" FAT_TYPE="16" @@ -28,9 +28,6 @@ arm_install_uboot() { chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr ${FATMOUNT}/ubldr - chroot ${CHROOTDIR} /bin/sh -c 'echo \ - setenv fdt_file wandboard-quad.dtb\; fatload mmc 0:1 11000000 ubldr\; bootelf 11000000\; \ - > ${FATMOUNT}/boot.txt' chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync umount_loop ${CHROOTDIR}/${FATMOUNT} From owner-svn-src-head@FreeBSD.ORG Fri Jun 12 21:08:55 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7D96A5; Fri, 12 Jun 2015 21:08:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:0:20e:cff:fea0:e4a2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74D3D767; Fri, 12 Jun 2015 21:08:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::eca2:5919:f5fa:61a7] (unknown [IPv6:2001:7b8:3a7:0:eca2:5919:f5fa:61a7]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id D307C21B13; Fri, 12 Jun 2015 23:08:43 +0200 (CEST) Subject: Re: svn commit: r284274 - head/share/mk Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_414A6718-4D3E-409E-BB9C-11A672719AFA"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5 From: Dimitry Andric In-Reply-To: <201506111649.t5BGnEVm068591@svn.freebsd.org> Date: Fri, 12 Jun 2015 23:08:43 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <90F27D1B-C3C7-41D6-9F05-05FED17FD8F5@FreeBSD.org> References: <201506111649.t5BGnEVm068591@svn.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 21:08:55 -0000 --Apple-Mail=_414A6718-4D3E-409E-BB9C-11A672719AFA Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 11 Jun 2015, at 18:49, Andrew Turner wrote: > > Author: andrew > Date: Thu Jun 11 16:49:14 2015 > New Revision: 284274 > URL: https://svnweb.freebsd.org/changeset/base/284274 > > Log: > Enable clang on armeb, it is now able to build targeting armeb. This is > the last arm platform to move away from gcc. > > Tested by: jmg Woohoo! :-) --Apple-Mail=_414A6718-4D3E-409E-BB9C-11A672719AFA Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.27 iEYEARECAAYFAlV7SlsACgkQsF6jCi4glqPD5ACeIPSFZ2WTwWFRPMbq4u02kDJM hM4AoOUYjr/jJ1TU4uKT9137Wm5b8eaY =+64L -----END PGP SIGNATURE----- --Apple-Mail=_414A6718-4D3E-409E-BB9C-11A672719AFA-- From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 00:43:20 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D018454; Sat, 13 Jun 2015 00:43:20 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qk0-x229.google.com (mail-qk0-x229.google.com [IPv6:2607:f8b0:400d:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 463A5E93; Sat, 13 Jun 2015 00:43:20 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by qkx62 with SMTP id 62so24447898qkx.3; Fri, 12 Jun 2015 17:43:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=znmX3aXoY+LWXs1fdR0S2G3XwPZItdK6cNqL6C9ia2A=; b=KiUJoKoge3Grg1g9PIoI3VKRxeMX2bxbtK5UyiFdW4A/h4xLqfJMyzBJ/AuoTK4Nny ac6/u9+4rzJkugldZ20gCllq1jbXce8rDexsTNBMheXa8buHUAEzkJO6sACCGQXo1pHO 9ZLkLO8eT0FBDq5HqhqQmAhwNYvevZMe9KCg1qAcLPSG9pfrCfVp68H2oeRrtuTkNhjp 8fgErGeFMaKrdkTBRF8Rtu8eZmGX5nPyImbNthPi2gbYYkP66ye3q25k4dpYxantcQpy Mx6T3WNZyfZPXj/Z5UAcjADr7+nQ9+RuxB4wxsrE6jFLyKgdlA99LAik+fClGt5qRAwd YtQA== X-Received: by 10.140.98.206 with SMTP id o72mr21771339qge.38.1434156198183; Fri, 12 Jun 2015 17:43:18 -0700 (PDT) Received: from kan ([2601:18f:0:1570:226:18ff:fe00:232e]) by mx.google.com with ESMTPSA id 10sm2422335qkp.39.2015.06.12.17.43.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jun 2015 17:43:17 -0700 (PDT) Date: Fri, 12 Jun 2015 20:43:09 -0400 From: Alexander Kabaev To: Marcel Moolenaar Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284198 - head/bin/ls Message-ID: <20150612204309.11dd3391@kan> In-Reply-To: <201506100127.t5A1RdX6051959@svn.freebsd.org> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/a+VZTkFcKezKDaLKC7nasI5"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 00:43:20 -0000 --Sig_/a+VZTkFcKezKDaLKC7nasI5 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 10 Jun 2015 01:27:39 +0000 (UTC) Marcel Moolenaar wrote: > Author: marcel > Date: Wed Jun 10 01:27:38 2015 > New Revision: 284198 > URL: https://svnweb.freebsd.org/changeset/base/284198 >=20 > Log: > Convert ls(1) to use libxo(3). > =20 > Obtained from: Phil Shafer > Sponsored by: Juniper Networks, Inc. >=20 This broke all code that pipes output of the ls command to pipeline, such as 'ls | wc -l'. ls never exits and never output anything. Is there any purpose to libxo other than breaking stuff, which it achieves so splendidly? --=20 Alexander Kabaev --Sig_/a+VZTkFcKezKDaLKC7nasI5 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJVe3yeXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDNUY3RDk5NTk5QjY0MUUxM0M1MTU2OTEw NzEzMjI5OTkyNzkyRTdFAAoJEAcTIpmSeS5+JMsQAICNfACsnVXDSuw5XkimpXH8 nMGFkDg65AuFi/5VaV2Mi/5yimCsInfSd6d7OM7MW1SLnouBsBCMWHlhaU0l1DlW 2UqR1v3qKM2AnnI4BBnNKxDmzXDiic4lJuYdt7wrjnV34iI2n64Ys+WrA3XRvmPY S0TirZXBEaUzCt8WVOIFOkdNm8/A5LfPSoYfyofKBr7xCgBLR1R3X0EwpzuYKR1h CvgP9jDf/MC0mQGszeaG9tnp4Nu+oZ6ma4Ro8TEHQqup1ais0jcPoETxxqSeQfsJ eG2YJh5Er/JDuUBhblXPG4Zj2UrLPkemUIuN1nur+oh2qA5gpfg5QbYvD0kwsn0O XwQx7Nuvx91PCeLca79USd2piu++A9vMeByPOubZtXiNZUIBaeSmhu8C3z9AenBq hZTybJ0IdCW5hpZya9W3UUuu01KH8KDzhlIpH6qD5lCxirc4RcWZEdqPqRI3Ntx3 IUGRKDDZTZnibklbZmYCM3IEqM4WeaHyDDwokYHLkHS5unnuW99DasJcesgQS9po cIPEXrwNkaiByLWWY+vkZ7JofwPsxl9m3EOAaAXNppU64sKFnSs62vHsyQXol1aH p09wTQwWyvEWDkGacus/yhhBduxq27YXBU25oZL4ExCYR348iCs0j+F/XoRFUidH jkBZ2LUrX1nGZJCcWSSF =N+WO -----END PGP SIGNATURE----- --Sig_/a+VZTkFcKezKDaLKC7nasI5-- From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 01:13:43 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4252928; Sat, 13 Jun 2015 01:13:43 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qk0-x233.google.com (mail-qk0-x233.google.com [IPv6:2607:f8b0:400d:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CA3A76A; Sat, 13 Jun 2015 01:13:43 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by qkhq76 with SMTP id q76so24717830qkh.2; Fri, 12 Jun 2015 18:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=TPQnO2/ycX68uj+Yzs5vQk3jkBberemB4Ny3pftHbBY=; b=hB0XgcubeOUaqzsVO/82OXF+bxINLBpCbgCIVGV2QCYukg9vGi4JRpP6HjaQc0lY52 MvFTO0GPyb0VbLbAH2BfLy+FY5SbtfIjaXHtseI+ofyohSv+7b52fL2bnC4/pZ9t5DSS DS1wr+FyP5TFM1N76IEbxx2151Br02vkboE+5pjEIrHiEzRq5d2cJne74sGeTqP24HSz lIi66R8PO9qY1QqpGuBXiDXMzAU5Z9H/Z1seI5LtfTKI0FviYizHNfoC4FPIgt/qEAxH 0hOwzsoBjnA2zGVscvaP/qV5+GrmAqWIhkfP01TWmgy1Omrfu0rHBhoKgXrLnNXF6+5N 9W6Q== X-Received: by 10.55.19.99 with SMTP id d96mr8984929qkh.71.1434158022569; Fri, 12 Jun 2015 18:13:42 -0700 (PDT) Received: from kan ([2601:18f:0:1570:226:18ff:fe00:232e]) by mx.google.com with ESMTPSA id b191sm2452376qka.14.2015.06.12.18.13.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jun 2015 18:13:42 -0700 (PDT) Date: Fri, 12 Jun 2015 21:13:35 -0400 From: Alexander Kabaev To: Marcel Moolenaar Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284198 - head/bin/ls Message-ID: <20150612211335.2d522cef@kan> In-Reply-To: <20150612204309.11dd3391@kan> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/UbDxBEjN6nq2tucYQ3BhEDR"; protocol="application/pgp-signature" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 01:13:44 -0000 --Sig_/UbDxBEjN6nq2tucYQ3BhEDR Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 12 Jun 2015 20:43:09 -0400 Alexander Kabaev wrote: > On Wed, 10 Jun 2015 01:27:39 +0000 (UTC) > Marcel Moolenaar wrote: >=20 > > Author: marcel > > Date: Wed Jun 10 01:27:38 2015 > > New Revision: 284198 > > URL: https://svnweb.freebsd.org/changeset/base/284198 > >=20 > > Log: > > Convert ls(1) to use libxo(3). > > =20 > > Obtained from: Phil Shafer > > Sponsored by: Juniper Networks, Inc. > >=20 > >=20 > This broke all code that pipes output of the ls command to pipeline, > such as 'ls | wc -l'. ls never exits and never output anything. Is > there any purpose to libxo other than breaking stuff, which it > achieves so splendidly? >=20 Just to clarify, this happens because libxo cannot display file names in encodings current locate cannot handle. xo_format_string_direct function then spins indefinitely trying to call xo_failure(xop, "invalid mbs char: %02hhx", *cp) over and over, which, of course, produces nothing and does not advance the cp pointer either, resulting in apparent ls hang. --=20 Alexander Kabaev --Sig_/UbDxBEjN6nq2tucYQ3BhEDR Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJVe4O/XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDNUY3RDk5NTk5QjY0MUUxM0M1MTU2OTEw NzEzMjI5OTkyNzkyRTdFAAoJEAcTIpmSeS5+x48P/2HUQs/T5vIrCJNeybV7N3ub XHN1/Q9W2iQvOL2JbST9VZOva/D1Xlzm+Xl4RE/q5IbxyKcZOZrphY98QFEL7VGN WM9FydxBKqqKpo+bpl2/g1piHtIbMMQajAGV/l931bfvKu80Rmwes1z8gjyrmKeA btvYZldHpZFE1Z283KJP4ubhuobLWirV+fLY1mzcMzQ9ZtNHfSOII9oicbMcb/K1 pH1LmzlaLFwPq8VYpd+spKRyKDPsnM0An2xaou4PRowFkG/ibSVbZjScVbHp0eml c7qWFKe26bTNqJnZ+Qz4Ca9JYTb7yC+FRpwMEo0YG68tgDMZ9si+Pl+8LHmCjTtG LHQ1GxAuYVF/8aawJNM/d4zrQV7RrdI1aOxjZuNyS9JjOlFnsNDYNNDXlD/4HlMV bOhVA1KV0T45no9pukgyQKJZh2KNYjwgKnA+KNf5xobkOV5n1wkOUPRZBzD/zQod vnqaKWHRoQWtO+Gg08yxtfSU2zsFNBIWoODPCA9EbmIaMDFjS55NYGNu/on4Atzp ovVNBmg1i7fnY22ZSnR4cQcagjTvQZp/JNMipGtn4ekNInO8Aw0SEjQgoiiCMDR2 u7DwOtiJjRxg3Tr1kuSfCE+BjaSWKQ2N+w6d6MjEF3TVNUenABU83rKECEE4gGY7 dcFUDQBMchrTOCR/8Yjc =lIGd -----END PGP SIGNATURE----- --Sig_/UbDxBEjN6nq2tucYQ3BhEDR-- From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 01:28:20 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0B25BD9; Sat, 13 Jun 2015 01:28:20 +0000 (UTC) (envelope-from davidcs@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE2DA994; Sat, 13 Jun 2015 01:28:20 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5D1SKJh059753; Sat, 13 Jun 2015 01:28:20 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5D1SJvK059749; Sat, 13 Jun 2015 01:28:19 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201506130128.t5D1SJvK059749@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Sat, 13 Jun 2015 01:28:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284335 - head/sys/dev/bxe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 01:28:21 -0000 Author: davidcs Date: Sat Jun 13 01:28:19 2015 New Revision: 284335 URL: https://svnweb.freebsd.org/changeset/base/284335 Log: PHY LOCK acquires the hardware lock via bxe_acquire_phy_lock() and releases it via bxe_release_phy_lock(). It was simply acquiring a mutex earlier which can cause the PHY to use bogus values. Fixes intermittent link failures. bxe_ioctl() completes all functions within its context as opposed to a taskqueue earlier. bxe_handle_rx_mode_tq() no longer required. bxe_set_rx_mode() handles the functionality within its context Submitted by:gary.zambrano@qlogic.com MFC after:5 days Modified: head/sys/dev/bxe/bxe.c head/sys/dev/bxe/bxe.h head/sys/dev/bxe/ecore_reg.h Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Fri Jun 12 22:05:04 2015 (r284334) +++ head/sys/dev/bxe/bxe.c Sat Jun 13 01:28:19 2015 (r284335) @@ -726,7 +726,6 @@ static __noinline int bxe_nic_unload(str uint8_t keep_link); static void bxe_handle_sp_tq(void *context, int pending); -static void bxe_handle_rx_mode_tq(void *context, int pending); static void bxe_handle_fp_tq(void *context, int pending); @@ -1174,7 +1173,17 @@ bxe_release_hw_lock(struct bxe_softc *sc REG_WR(sc, hw_lock_control_reg, resource_bit); return (0); } +static void bxe_acquire_phy_lock(struct bxe_softc *sc) +{ + BXE_PHY_LOCK(sc); + bxe_acquire_hw_lock(sc,HW_LOCK_RESOURCE_MDIO); +} +static void bxe_release_phy_lock(struct bxe_softc *sc) +{ + bxe_release_hw_lock(sc,HW_LOCK_RESOURCE_MDIO); + BXE_PHY_UNLOCK(sc); +} /* * Per pf misc lock must be acquired before the per port mcp lock. Otherwise, * had we done things the other way around, if two pfs from the same port @@ -4764,28 +4773,6 @@ bxe_handle_chip_tq(void *context, switch (work) { - case CHIP_TQ_START: - if ((if_getflags(sc->ifp) & IFF_UP) && - !(if_getdrvflags(sc->ifp) & IFF_DRV_RUNNING)) { - /* start the interface */ - BLOGD(sc, DBG_LOAD, "Starting the interface...\n"); - BXE_CORE_LOCK(sc); - bxe_init_locked(sc); - BXE_CORE_UNLOCK(sc); - } - break; - - case CHIP_TQ_STOP: - if (!(if_getflags(sc->ifp) & IFF_UP) && - (if_getdrvflags(sc->ifp) & IFF_DRV_RUNNING)) { - /* bring down the interface */ - BLOGD(sc, DBG_LOAD, "Stopping the interface...\n"); - bxe_periodic_stop(sc); - BXE_CORE_LOCK(sc); - bxe_stop_locked(sc); - BXE_CORE_UNLOCK(sc); - } - break; case CHIP_TQ_REINIT: if (if_getdrvflags(sc->ifp) & IFF_DRV_RUNNING) { @@ -4859,21 +4846,22 @@ bxe_ioctl(if_t ifp, /* toggle the interface state up or down */ BLOGD(sc, DBG_IOCTL, "Received SIOCSIFFLAGS ioctl\n"); + BXE_CORE_LOCK(sc); /* check if the interface is up */ if (if_getflags(ifp) & IFF_UP) { if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { /* set the receive mode flags */ bxe_set_rx_mode(sc); } else { - atomic_store_rel_long(&sc->chip_tq_flags, CHIP_TQ_START); - taskqueue_enqueue(sc->chip_tq, &sc->chip_tq_task); + bxe_init_locked(sc); } } else { if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { - atomic_store_rel_long(&sc->chip_tq_flags, CHIP_TQ_STOP); - taskqueue_enqueue(sc->chip_tq, &sc->chip_tq_task); + bxe_periodic_stop(sc); + bxe_stop_locked(sc); } } + BXE_CORE_UNLOCK(sc); break; @@ -4885,7 +4873,9 @@ bxe_ioctl(if_t ifp, /* check if the interface is up */ if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) { /* set the receive mode flags */ + BXE_CORE_LOCK(sc); bxe_set_rx_mode(sc); + BXE_CORE_UNLOCK(sc); } break; @@ -5044,8 +5034,11 @@ bxe_ioctl(if_t ifp, if (reinit && (if_getdrvflags(sc->ifp) & IFF_DRV_RUNNING)) { BLOGD(sc, DBG_LOAD | DBG_IOCTL, "Re-initializing hardware from IOCTL change\n"); - atomic_store_rel_long(&sc->chip_tq_flags, CHIP_TQ_REINIT); - taskqueue_enqueue(sc->chip_tq, &sc->chip_tq_task); + bxe_periodic_stop(sc); + BXE_CORE_LOCK(sc); + bxe_stop_locked(sc); + bxe_init_locked(sc); + BXE_CORE_UNLOCK(sc); } return (error); @@ -7487,8 +7480,7 @@ bxe_attn_int_asserted(struct bxe_softc * if (asserted & ATTN_HARD_WIRED_MASK) { if (asserted & ATTN_NIG_FOR_FUNC) { - BXE_PHY_LOCK(sc); - + bxe_acquire_phy_lock(sc); /* save nig interrupt mask */ nig_mask = REG_RD(sc, nig_int_mask_addr); @@ -7581,7 +7573,7 @@ bxe_attn_int_asserted(struct bxe_softc * REG_WR(sc, nig_int_mask_addr, nig_mask); - BXE_PHY_UNLOCK(sc); + bxe_release_phy_lock(sc); } } @@ -8339,10 +8331,10 @@ bxe_attn_int_deasserted3(struct bxe_soft if (sc->link_vars.periodic_flags & ELINK_PERIODIC_FLAGS_LINK_EVENT) { /* sync with link */ - BXE_PHY_LOCK(sc); + bxe_acquire_phy_lock(sc); sc->link_vars.periodic_flags &= ~ELINK_PERIODIC_FLAGS_LINK_EVENT; - BXE_PHY_UNLOCK(sc); + bxe_release_phy_lock(sc); if (IS_MF(sc)) ; // XXX bxe_link_sync_notify(sc); bxe_link_report(sc); @@ -8535,9 +8527,9 @@ bxe_attn_int_deasserted0(struct bxe_soft } if ((attn & sc->link_vars.aeu_int_mask) && sc->port.pmf) { - BXE_PHY_LOCK(sc); + bxe_acquire_phy_lock(sc); elink_handle_module_detect_int(&sc->link_params); - BXE_PHY_UNLOCK(sc); + bxe_release_phy_lock(sc); } if (attn & HW_INTERRUT_ASSERT_SET_0) { @@ -9564,11 +9556,6 @@ bxe_interrupt_detach(struct bxe_softc *s } } - if (sc->rx_mode_tq) { - taskqueue_drain(sc->rx_mode_tq, &sc->rx_mode_tq_task); - taskqueue_free(sc->rx_mode_tq); - sc->rx_mode_tq = NULL; - } if (sc->sp_tq) { taskqueue_drain(sc->sp_tq, &sc->sp_tq_task); @@ -9602,14 +9589,6 @@ bxe_interrupt_attach(struct bxe_softc *s taskqueue_start_threads(&sc->sp_tq, 1, PWAIT, /* lower priority */ "%s", sc->sp_tq_name); - snprintf(sc->rx_mode_tq_name, sizeof(sc->rx_mode_tq_name), - "bxe%d_rx_mode_tq", sc->unit); - TASK_INIT(&sc->rx_mode_tq_task, 0, bxe_handle_rx_mode_tq, sc); - sc->rx_mode_tq = taskqueue_create_fast(sc->rx_mode_tq_name, M_NOWAIT, - taskqueue_thread_enqueue, - &sc->rx_mode_tq); - taskqueue_start_threads(&sc->rx_mode_tq, 1, PWAIT, /* lower priority */ - "%s", sc->rx_mode_tq_name); for (i = 0; i < sc->num_queues; i++) { fp = &sc->fp[i]; @@ -12363,9 +12342,9 @@ bxe_link_report_locked(struct bxe_softc static void bxe_link_report(struct bxe_softc *sc) { - BXE_PHY_LOCK(sc); + bxe_acquire_phy_lock(sc); bxe_link_report_locked(sc); - BXE_PHY_UNLOCK(sc); + bxe_release_phy_lock(sc); } static void @@ -12481,7 +12460,7 @@ bxe_initial_phy_init(struct bxe_softc *s sc->link_params.feature_config_flags |= feat; } - BXE_PHY_LOCK(sc); + bxe_acquire_phy_lock(sc); if (load_mode == LOAD_DIAG) { lp->loopback_mode = ELINK_LOOPBACK_XGXS; @@ -12502,7 +12481,7 @@ bxe_initial_phy_init(struct bxe_softc *s rc = elink_phy_init(&sc->link_params, &sc->link_vars); - BXE_PHY_UNLOCK(sc); + bxe_release_phy_lock(sc); bxe_calc_fc_adv(sc); @@ -12694,18 +12673,13 @@ bxe_set_uc_list(struct bxe_softc *sc) } static void -bxe_handle_rx_mode_tq(void *context, - int pending) +bxe_set_rx_mode(struct bxe_softc *sc) { - struct bxe_softc *sc = (struct bxe_softc *)context; if_t ifp = sc->ifp; uint32_t rx_mode = BXE_RX_MODE_NORMAL; - BXE_CORE_LOCK(sc); - if (sc->state != BXE_STATE_OPEN) { BLOGD(sc, DBG_SP, "state is %x, returning\n", sc->state); - BXE_CORE_UNLOCK(sc); return; } @@ -12747,7 +12721,6 @@ bxe_handle_rx_mode_tq(void *context, if (bxe_test_bit(ECORE_FILTER_RX_MODE_PENDING, &sc->sp_state)) { BLOGD(sc, DBG_LOAD, "Scheduled setting rx_mode with ECORE...\n"); bxe_set_bit(ECORE_FILTER_RX_MODE_SCHED, &sc->sp_state); - BXE_CORE_UNLOCK(sc); return; } @@ -12767,14 +12740,8 @@ bxe_handle_rx_mode_tq(void *context, } #endif - BXE_CORE_UNLOCK(sc); } -static void -bxe_set_rx_mode(struct bxe_softc *sc) -{ - taskqueue_enqueue(sc->rx_mode_tq, &sc->rx_mode_tq_task); -} /* update flags in shmem */ static void @@ -12845,13 +12812,13 @@ bxe_periodic_callout_func(void *xsc) */ mb(); if (sc->port.pmf) { - BXE_PHY_LOCK(sc); + bxe_acquire_phy_lock(sc); elink_period_func(&sc->link_params, &sc->link_vars); - BXE_PHY_UNLOCK(sc); + bxe_release_phy_lock(sc); } } - if (IS_PF(sc) && !BXE_NOMCP(sc)) { + if (IS_PF(sc) && !(sc->flags & BXE_NO_PULSE)) { int mb_idx = SC_FW_MB_IDX(sc); uint32_t drv_pulse; uint32_t mcp_pulse; @@ -12995,6 +12962,11 @@ bxe_nic_load(struct bxe_softc *sc, } } + /* set ALWAYS_ALIVE bit in shmem */ + sc->fw_drv_pulse_wr_seq |= DRV_PULSE_ALWAYS_ALIVE; + bxe_drv_pulse(sc); + sc->flags |= BXE_NO_PULSE; + /* attach interrupts */ if (bxe_interrupt_attach(sc) != 0) { sc->state = BXE_STATE_CLOSED; @@ -16750,10 +16722,10 @@ bxe_common_init_phy(struct bxe_softc *sc shmem2_base[1] = SHMEM2_RD(sc, other_shmem2_base_addr); } - BXE_PHY_LOCK(sc); + bxe_acquire_phy_lock(sc); elink_common_init_phy(sc, shmem_base, shmem2_base, sc->devinfo.chip_id, 0); - BXE_PHY_UNLOCK(sc); + bxe_release_phy_lock(sc); } static void @@ -18630,9 +18602,9 @@ static void bxe_link_reset(struct bxe_softc *sc) { if (!BXE_NOMCP(sc)) { - BXE_PHY_LOCK(sc); + bxe_acquire_phy_lock(sc); elink_lfa_reset(&sc->link_params, &sc->link_vars); - BXE_PHY_UNLOCK(sc); + bxe_release_phy_lock(sc); } else { if (!CHIP_REV_IS_SLOW(sc)) { BLOGW(sc, "Bootcode is missing - cannot reset link\n"); Modified: head/sys/dev/bxe/bxe.h ============================================================================== --- head/sys/dev/bxe/bxe.h Fri Jun 12 22:05:04 2015 (r284334) +++ head/sys/dev/bxe/bxe.h Sat Jun 13 01:28:19 2015 (r284335) @@ -1400,6 +1400,7 @@ struct bxe_softc { //#define BXE_SAFC_TX_FLAG 0x00000400 #define BXE_MF_FUNC_DIS 0x00000800 #define BXE_TX_SWITCHING 0x00001000 +#define BXE_NO_PULSE 0x00002000 unsigned long debug; /* per-instance debug logging config */ @@ -1429,11 +1430,6 @@ struct bxe_softc { struct taskqueue *sp_tq; char sp_tq_name[32]; - /* set rx_mode asynchronous taskqueue */ - struct task rx_mode_tq_task; - struct taskqueue *rx_mode_tq; - char rx_mode_tq_name[32]; - struct bxe_fastpath fp[MAX_RSS_CHAINS]; struct bxe_sp_objs sp_objs[MAX_RSS_CHAINS]; Modified: head/sys/dev/bxe/ecore_reg.h ============================================================================== --- head/sys/dev/bxe/ecore_reg.h Fri Jun 12 22:05:04 2015 (r284334) +++ head/sys/dev/bxe/ecore_reg.h Sat Jun 13 01:28:19 2015 (r284335) @@ -1965,6 +1965,7 @@ __FBSDID("$FreeBSD$"); #define MISC_SPIO_SPIO5 0x20 #define HW_LOCK_MAX_RESOURCE_VALUE 31 #define HW_LOCK_RESOURCE_DRV_FLAGS 10 +#define HW_LOCK_RESOURCE_MDIO 0 #define HW_LOCK_RESOURCE_GPIO 1 #define HW_LOCK_RESOURCE_NVRAM 12 #define HW_LOCK_RESOURCE_PORT0_ATT_MASK 3 From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 02:49:24 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7432FA96; Sat, 13 Jun 2015 02:49:24 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 54CBBD3E; Sat, 13 Jun 2015 02:49:24 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id t5D2nHmw098226 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 12 Jun 2015 19:49:17 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id t5D2nGVS098225; Fri, 12 Jun 2015 19:49:16 -0700 (PDT) (envelope-from sgk) Date: Fri, 12 Jun 2015 19:49:16 -0700 From: Steve Kargl To: Alexander Kabaev Cc: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284198 - head/bin/ls Message-ID: <20150613024916.GA98218@troutmask.apl.washington.edu> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150612204309.11dd3391@kan> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 02:49:24 -0000 On Fri, Jun 12, 2015 at 08:43:09PM -0400, Alexander Kabaev wrote: > On Wed, 10 Jun 2015 01:27:39 +0000 (UTC) > Marcel Moolenaar wrote: > > > Author: marcel > > Date: Wed Jun 10 01:27:38 2015 > > New Revision: 284198 > > URL: https://svnweb.freebsd.org/changeset/base/284198 > > > > Log: > > Convert ls(1) to use libxo(3). > > > > Obtained from: Phil Shafer > > Sponsored by: Juniper Networks, Inc. > > > > > This broke all code that pipes output of the ls command to pipeline, > such as 'ls | wc -l'. ls never exits and never output anything. Is > there any purpose to libxo other than breaking stuff, which it achieves > so splendidly? > -1 for libxo, which also makes code almost unreadable. -- Steve From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 05:55:27 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1303C60D; Sat, 13 Jun 2015 05:55:27 +0000 (UTC) (envelope-from allanjude@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00AABF0A; Sat, 13 Jun 2015 05:55:27 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5D5tQ7Y003840; Sat, 13 Jun 2015 05:55:26 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5D5tQij003839; Sat, 13 Jun 2015 05:55:26 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201506130555.t5D5tQij003839@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 13 Jun 2015 05:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284336 - head/sys/dev/acpi_support X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 05:55:27 -0000 Author: allanjude (doc committer) Date: Sat Jun 13 05:55:26 2015 New Revision: 284336 URL: https://svnweb.freebsd.org/changeset/base/284336 Log: acpi_ibm.ko panics if SMBIOS information is not available Add a check for NULL before strcmp on smbios information incase it is not populated Differential Revision: https://reviews.freebsd.org/D2750 Reviewed by: ngie, jhb Approved by: rpaulo Sponsored by: ScaleEngine Inc. Modified: head/sys/dev/acpi_support/acpi_ibm.c Modified: head/sys/dev/acpi_support/acpi_ibm.c ============================================================================== --- head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 01:28:19 2015 (r284335) +++ head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 05:55:26 2015 (r284336) @@ -485,6 +485,9 @@ acpi_ibm_attach(device_t dev) /* Enable per-model events. */ maker = kern_getenv("smbios.system.maker"); product = kern_getenv("smbios.system.product"); + if (maker != NULL && product != NULL) + goto nosmbios; + for (i = 0; i < nitems(acpi_ibm_models); i++) { if (strcmp(maker, acpi_ibm_models[i].maker) == 0 && strcmp(product, acpi_ibm_models[i].product) == 0) { @@ -494,6 +497,8 @@ acpi_ibm_attach(device_t dev) ACPI_SERIAL_END(ibm); } } + +nosmbios: freeenv(maker); freeenv(product); From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 06:09:01 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46CA5933; Sat, 13 Jun 2015 06:09:01 +0000 (UTC) (envelope-from allanjude@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35337182; Sat, 13 Jun 2015 06:09:01 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5D6912g010032; Sat, 13 Jun 2015 06:09:01 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5D69114010031; Sat, 13 Jun 2015 06:09:01 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201506130609.t5D69114010031@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 13 Jun 2015 06:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284337 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 06:09:01 -0000 Author: allanjude (doc committer) Date: Sat Jun 13 06:09:00 2015 New Revision: 284337 URL: https://svnweb.freebsd.org/changeset/base/284337 Log: Add if_vlan, ipfw{,_nat}.ko, and libalias to the AR934X kernel config This makes the TP-Link WDR3600 routers more useful Differential Revision: https://reviews.freebsd.org/D2780 Approved by: adrian Sponsored by: ScaleEngine Inc. Modified: head/sys/mips/conf/AR934X_BASE Modified: head/sys/mips/conf/AR934X_BASE ============================================================================== --- head/sys/mips/conf/AR934X_BASE Sat Jun 13 05:55:26 2015 (r284336) +++ head/sys/mips/conf/AR934X_BASE Sat Jun 13 06:09:00 2015 (r284337) @@ -20,7 +20,7 @@ files "../atheros/files.ar71xx" hints "AR934X_BASE.hints" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc" +makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_vlan if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_ahb hwpmc ipfw ipfw_nat libalias" # makeoptions MODULES_OVERRIDE="" options DDB From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 07:37:54 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26F2F51F; Sat, 13 Jun 2015 07:37:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EA92900; Sat, 13 Jun 2015 07:37:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t5D7bktP039161 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 13 Jun 2015 10:37:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t5D7bktP039161 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t5D7bkmP039160; Sat, 13 Jun 2015 10:37:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 13 Jun 2015 10:37:46 +0300 From: Konstantin Belousov To: Allan Jude Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284336 - head/sys/dev/acpi_support Message-ID: <20150613073746.GJ2080@kib.kiev.ua> References: <201506130555.t5D5tQij003839@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201506130555.t5D5tQij003839@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 07:37:54 -0000 On Sat, Jun 13, 2015 at 05:55:26AM +0000, Allan Jude wrote: > Author: allanjude (doc committer) > Date: Sat Jun 13 05:55:26 2015 > New Revision: 284336 > URL: https://svnweb.freebsd.org/changeset/base/284336 > > Log: > acpi_ibm.ko panics if SMBIOS information is not available > > Add a check for NULL before strcmp on smbios information incase it is not populated > > Differential Revision: https://reviews.freebsd.org/D2750 > Reviewed by: ngie, jhb > Approved by: rpaulo > Sponsored by: ScaleEngine Inc. > > Modified: > head/sys/dev/acpi_support/acpi_ibm.c > > Modified: head/sys/dev/acpi_support/acpi_ibm.c > ============================================================================== > --- head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 01:28:19 2015 (r284335) > +++ head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 05:55:26 2015 (r284336) > @@ -485,6 +485,9 @@ acpi_ibm_attach(device_t dev) > /* Enable per-model events. */ > maker = kern_getenv("smbios.system.maker"); > product = kern_getenv("smbios.system.product"); > + if (maker != NULL && product != NULL) > + goto nosmbios; This looks reversed. I would expect the condition to be if (maker == NULL || product == NULL) goto ...; > + > for (i = 0; i < nitems(acpi_ibm_models); i++) { > if (strcmp(maker, acpi_ibm_models[i].maker) == 0 && > strcmp(product, acpi_ibm_models[i].product) == 0) { > @@ -494,6 +497,8 @@ acpi_ibm_attach(device_t dev) > ACPI_SERIAL_END(ibm); > } > } > + > +nosmbios: > freeenv(maker); > freeenv(product); > From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 07:42:04 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5850068F; Sat, 13 Jun 2015 07:42:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x22b.google.com (mail-qk0-x22b.google.com [IPv6:2607:f8b0:400d:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17E66AE9; Sat, 13 Jun 2015 07:42:04 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkx62 with SMTP id 62so27722883qkx.3; Sat, 13 Jun 2015 00:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TMSJ6xkpq8RFEU8vIbIS5M5bVLwhPWqqJaJeipm+Afk=; b=MXuoos6VYT7vmDoYylWCz5mrWx9ucga80ss6dhaH3+p0pqM509AGmZqqWyYtwc0lqO mrqMNpw27CPtmJHjXfsfO9NnVMabZcJZXHrQZ4QDtYRpRWLOq94IDRzhxlB6u/Y+j0Nm 4PhE9bY06sJs4DeGqBSqWBy8L/56hrevZTU95jlKv25yYlFNmQ0cK/V6YFSS7/jSk7Re zCtHtgeqfCKbIfP4F/j67PDeRjxTiAcu9wxXFf7lR4p2dgNnb5fnrCyoj49S3Pj4zX3g UOawNNvzymxANRYnNgHCl7wtK7lOz5tMXAUR7Shkf0LskUo1cWmPqpsN2OYphrRrYcc2 wq/g== MIME-Version: 1.0 X-Received: by 10.55.52.12 with SMTP id b12mr37696615qka.22.1434181323137; Sat, 13 Jun 2015 00:42:03 -0700 (PDT) Received: by 10.140.98.73 with HTTP; Sat, 13 Jun 2015 00:42:03 -0700 (PDT) In-Reply-To: <20150613073746.GJ2080@kib.kiev.ua> References: <201506130555.t5D5tQij003839@svn.freebsd.org> <20150613073746.GJ2080@kib.kiev.ua> Date: Sat, 13 Jun 2015 00:42:03 -0700 Message-ID: Subject: Re: svn commit: r284336 - head/sys/dev/acpi_support From: NGie Cooper To: Konstantin Belousov Cc: Allan Jude , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 07:42:04 -0000 On Sat, Jun 13, 2015 at 12:37 AM, Konstantin Belousov wrote: > On Sat, Jun 13, 2015 at 05:55:26AM +0000, Allan Jude wrote: >> Author: allanjude (doc committer) >> Date: Sat Jun 13 05:55:26 2015 >> New Revision: 284336 >> URL: https://svnweb.freebsd.org/changeset/base/284336 >> >> Log: >> acpi_ibm.ko panics if SMBIOS information is not available >> >> Add a check for NULL before strcmp on smbios information incase it is not populated >> >> Differential Revision: https://reviews.freebsd.org/D2750 >> Reviewed by: ngie, jhb >> Approved by: rpaulo >> Sponsored by: ScaleEngine Inc. >> >> Modified: >> head/sys/dev/acpi_support/acpi_ibm.c >> >> Modified: head/sys/dev/acpi_support/acpi_ibm.c >> ============================================================================== >> --- head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 01:28:19 2015 (r284335) >> +++ head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 05:55:26 2015 (r284336) >> @@ -485,6 +485,9 @@ acpi_ibm_attach(device_t dev) >> /* Enable per-model events. */ >> maker = kern_getenv("smbios.system.maker"); >> product = kern_getenv("smbios.system.product"); >> + if (maker != NULL && product != NULL) >> + goto nosmbios; > This looks reversed. I would expect the condition to be > if (maker == NULL || product == NULL) > goto ...; +1 From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 11:30:38 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0D58FF; Sat, 13 Jun 2015 11:30:37 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-ob0-x230.google.com (mail-ob0-x230.google.com [IPv6:2607:f8b0:4003:c01::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1FD433B; Sat, 13 Jun 2015 11:30:37 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by obbgp2 with SMTP id gp2so37344391obb.2; Sat, 13 Jun 2015 04:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=N4dsurT1CijUq6GeVEIi4nA/tN94ZmTuNyFFtDLLTkg=; b=zptzvAnifnWJhLgsK84BIO0t950F7UdYWina2F+uWoTczDC/HBzUXIuECylB8oJQLY 3MTUXjtE5sZdqw6sg5SEIdNY4aztjxfdFnz7FrduH1KOjsAzVxP4TWvVlsCH7VU7zt7v E4nVVfMPu9Tn/LdrIK5v5PpI/s66WSz3fISrxBXe60eihzkKlAOFkFde6Nef1TP2BlOZ 1tgZZ7nvklOIYvYnbpiFqdSAF06hbL46ASOmvCD0j+K4iwiLKMwSPw9fqx5grpZxMPdt 8WxAGq+TjORHrqJxIDiADXVrz/E+v+a/pu9U7jRM+qDQzH6Pqhk4dCn6WWz6K5M53UEk Mv8Q== MIME-Version: 1.0 X-Received: by 10.182.240.135 with SMTP id wa7mr2050624obc.63.1434195037036; Sat, 13 Jun 2015 04:30:37 -0700 (PDT) Received: by 10.202.69.70 with HTTP; Sat, 13 Jun 2015 04:30:36 -0700 (PDT) Received: by 10.202.69.70 with HTTP; Sat, 13 Jun 2015 04:30:36 -0700 (PDT) Reply-To: araujo@FreeBSD.org In-Reply-To: References: <201506130555.t5D5tQij003839@svn.freebsd.org> <20150613073746.GJ2080@kib.kiev.ua> Date: Sat, 13 Jun 2015 19:30:36 +0800 Message-ID: Subject: Re: svn commit: r284336 - head/sys/dev/acpi_support From: Marcelo Araujo To: Garrett Cooper Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org, "src-committers@freebsd.org" , Allan Jude , Konstantin Belousov Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 11:30:38 -0000 +1. On Jun 13, 2015 3:42 PM, "NGie Cooper" wrote: > On Sat, Jun 13, 2015 at 12:37 AM, Konstantin Belousov > wrote: > > On Sat, Jun 13, 2015 at 05:55:26AM +0000, Allan Jude wrote: > >> Author: allanjude (doc committer) > >> Date: Sat Jun 13 05:55:26 2015 > >> New Revision: 284336 > >> URL: https://svnweb.freebsd.org/changeset/base/284336 > >> > >> Log: > >> acpi_ibm.ko panics if SMBIOS information is not available > >> > >> Add a check for NULL before strcmp on smbios information incase it is > not populated > >> > >> Differential Revision: https://reviews.freebsd.org/D2750 > >> Reviewed by: ngie, jhb > >> Approved by: rpaulo > >> Sponsored by: ScaleEngine Inc. > >> > >> Modified: > >> head/sys/dev/acpi_support/acpi_ibm.c > >> > >> Modified: head/sys/dev/acpi_support/acpi_ibm.c > >> > ============================================================================== > >> --- head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 01:28:19 2015 > (r284335) > >> +++ head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 05:55:26 2015 > (r284336) > >> @@ -485,6 +485,9 @@ acpi_ibm_attach(device_t dev) > >> /* Enable per-model events. */ > >> maker = kern_getenv("smbios.system.maker"); > >> product = kern_getenv("smbios.system.product"); > >> + if (maker != NULL && product != NULL) > >> + goto nosmbios; > > This looks reversed. I would expect the condition to be > > if (maker == NULL || product == NULL) > > goto ...; > > +1 > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 14:24:32 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D07139C; Sat, 13 Jun 2015 14:24:32 +0000 (UTC) (envelope-from emaste@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B2B4186; Sat, 13 Jun 2015 14:24:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DEOW2O075276; Sat, 13 Jun 2015 14:24:32 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DEOWW7075275; Sat, 13 Jun 2015 14:24:32 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201506131424.t5DEOWW7075275@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 13 Jun 2015 14:24:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284339 - head/contrib/elftoolchain/elfcopy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 14:24:32 -0000 Author: emaste Date: Sat Jun 13 14:24:31 2015 New Revision: 284339 URL: https://svnweb.freebsd.org/changeset/base/284339 Log: elfcopy: Handle objects without a ".shstrtab" section string table As of LLVM revision 238073, LLVM stores symbols and section names in the same string table. From the upstream commit mesage: With the scheme of naming sections like ".text.foo" where foo is a symbol, there is a big potential saving in using a single one. This is a cherry-pick of ELF Tool Chain revision 3225. Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/elfcopy/sections.c Modified: head/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/sections.c Sat Jun 13 07:31:50 2015 (r284338) +++ head/contrib/elftoolchain/elfcopy/sections.c Sat Jun 13 14:24:31 2015 (r284339) @@ -1349,6 +1349,14 @@ set_shstrtab(struct elfcopy *ecp) s = ecp->shstrtab; + if (s->os == NULL) { + /* Input object does not contain .shstrtab section */ + if ((s->os = elf_newscn(ecp->eout)) == NULL) + errx(EXIT_FAILURE, "elf_newscn failed: %s", + elf_errmsg(-1)); + insert_to_sec_list(ecp, s, 1); + } + if (gelf_getshdr(s->os, &sh) == NULL) errx(EXIT_FAILURE, "692 gelf_getshdr() failed: %s", elf_errmsg(-1)); From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 14:26:51 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54A1A5F4; Sat, 13 Jun 2015 14:26:51 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 29B3A1AA; Sat, 13 Jun 2015 14:26:50 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-248-228.lns20.per4.internode.on.net [121.45.248.228]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t5DEQhgV079836 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 13 Jun 2015 07:26:47 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <557C3D9D.5050905@freebsd.org> Date: Sat, 13 Jun 2015 22:26:37 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Steve Kargl , Alexander Kabaev CC: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284198 - head/bin/ls References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> In-Reply-To: <20150613024916.GA98218@troutmask.apl.washington.edu> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 14:26:51 -0000 On 6/13/15 10:49 AM, Steve Kargl wrote: > On Fri, Jun 12, 2015 at 08:43:09PM -0400, Alexander Kabaev wrote: >> On Wed, 10 Jun 2015 01:27:39 +0000 (UTC) >> Marcel Moolenaar wrote: >> >>> Author: marcel >>> Date: Wed Jun 10 01:27:38 2015 >>> New Revision: 284198 >>> URL: https://svnweb.freebsd.org/changeset/base/284198 >>> >>> Log: >>> Convert ls(1) to use libxo(3). >>> >>> Obtained from: Phil Shafer >>> Sponsored by: Juniper Networks, Inc. >>> >> >> >> This broke all code that pipes output of the ls command to pipeline, >> such as 'ls | wc -l'. ls never exits and never output anything. Is >> there any purpose to libxo other than breaking stuff, which it achieves >> so splendidly? >> > -1 for libxo, which also makes code almost unreadable. +1 of the -1 my personal vote is to revert all libxo changes and banish it from /usr/src. "not the way to solve the problem in question". > From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 14:48:58 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41783E12 for ; Sat, 13 Jun 2015 14:48:58 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f173.google.com (mail-ie0-f173.google.com [209.85.223.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 04E978D4 for ; Sat, 13 Jun 2015 14:48:57 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by iesa3 with SMTP id a3so39367988ies.2 for ; Sat, 13 Jun 2015 07:48:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=yj+39ajKhdIXTqfBanyi69I/ef0cE8u+MIivcQx0BSE=; b=fw14Y6ZYgHK5T146FcNOafjJoGGmhUcoDcfHIrbhB6At4qripRoJjHJ+9bL4My3/0t +lTPSpq0H/JXyOZy7bsaU6BibQlH6u8zVKW2i9G0h507XwlbKkNMkwqe5QOzRbeFkoJc /XytYe9I16wY69bVKXrdRovrqc+x/zfrV/g3T10ls/h70cRR0ecSImCjYV9/Ou7WDnKz 3S7v79pHIgHnjScMvFsacGslgsT94GX1FB3PYtzzYCB1eAXnPbWP/OWjYdveXc2u7PqL B6h5jj7+DU2HYNvn6++bPf/ogk6jwhHGPKk0yhqy6xv0KIhTF4qQf5wPdFXG1fT88eS0 3NHA== X-Gm-Message-State: ALoCoQk3OIYRCZ/UUL6zYR0fgkB61UwaYC0Bpq8Q6l2YFybEMC1Wt/eYAbX73IJbKkGqEc27Hptu X-Received: by 10.50.79.202 with SMTP id l10mr10837881igx.7.1434206931087; Sat, 13 Jun 2015 07:48:51 -0700 (PDT) Received: from [10.65.211.160] ([137.122.64.70]) by mx.google.com with ESMTPSA id o200sm4761682ioo.43.2015.06.13.07.48.49 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Jun 2015 07:48:49 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r284198 - head/bin/ls Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E3E519E8-B16C-4D16-A02D-7012F9FBB686"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: <557C3D9D.5050905@freebsd.org> Date: Sat, 13 Jun 2015 10:48:47 -0400 Cc: Steve Kargl , Alexander Kabaev , Marcel Moolenaar , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <5918EB58-8E32-4D03-87BB-90AF5DA97E36@bsdimp.com> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <557C3D9D.5050905@freebsd.org> To: Julian Elischer X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 14:48:58 -0000 --Apple-Mail=_E3E519E8-B16C-4D16-A02D-7012F9FBB686 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 > On Jun 13, 2015, at 10:26 AM, Julian Elischer = wrote: >=20 > On 6/13/15 10:49 AM, Steve Kargl wrote: >> On Fri, Jun 12, 2015 at 08:43:09PM -0400, Alexander Kabaev wrote: >>> On Wed, 10 Jun 2015 01:27:39 +0000 (UTC) >>> Marcel Moolenaar wrote: >>>=20 >>>> Author: marcel >>>> Date: Wed Jun 10 01:27:38 2015 >>>> New Revision: 284198 >>>> URL: https://svnweb.freebsd.org/changeset/base/284198 >>>>=20 >>>> Log: >>>> Convert ls(1) to use libxo(3). >>>> Obtained from: Phil Shafer >>>> Sponsored by: Juniper Networks, Inc. >>>>=20 >>> >>>=20 >>> This broke all code that pipes output of the ls command to pipeline, >>> such as 'ls | wc -l'. ls never exits and never output anything. Is >>> there any purpose to libxo other than breaking stuff, which it = achieves >>> so splendidly? >>>=20 >> -1 for libxo, which also makes code almost unreadable. > +1 of the -1 >=20 > my personal vote is to revert all libxo changes and banish it from = /usr/src. >=20 > "not the way to solve the problem in question". It isn=92t even wrong=85. I think that we shouldn=92t integrate any more libxo stuff until all the = known bugs in the stuff that=92s already been converted is fixed. For example, gstat=92s =91q=92 function now needs a carriage = return before it will quit. That=92s insane. And the twisty maze of = modifications has made it rather an uber-pita to figure out WTF I need to do to un-F this up. But back to the topic at hand. libxo for ls? Really? WTF were you thinking? I know the cat -v paper is a bit of an extreme viewpoint, but all the libxo integration can be used a poster child for Pike=92s worries=85 Warner --Apple-Mail=_E3E519E8-B16C-4D16-A02D-7012F9FBB686 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVfELQAAoJEGwc0Sh9sBEAOjUP/24BvZ9SJcpDS67Nun3RqpSH FBPLryJnEoMimCKbuEqMdyqeIJrUePGIunzCo0qdXn5wUlFcJN9aCnm0//Pt5w5D qGJY/KIvD1pPXCyOEoku+p7SE4dOZzQje5vFQ5BnThW+r5Ptz04OqvCnSO9BaQ5E nvB/hYajXrqKrz8fACkTQxrMpiELWItShIFqRUGNP5IehwwzPwo/4UHcNobhNYNq rjXl6oqzPtWhQpbLkQuDqCkCICuTFlkuF2sn2p3XwKU2p0xQpJu9AaWMvp73fObM TWr0kdl6NYkZOmqgjpDVwlUYQD4v2VVz/bmM70g17CvvwP/ZervxrkfbQhB8Nt69 cOby2XiqBX6QpYHtSh7cJSFobftApfjZBgRoKPqIVd+34mGu967tkgPZ2A04wXFp QIS+ncr5gCppwCEK6IYAM/xiBI5sNjI0V0GUk7WwX1a93bPmCoLNYwCrDDgHGNdd XsmMYpNZ5QRCIWGgTjj8MuhbL0Mbm8t6fowdlmh9RpxvqgRGixuRYtk695qETxGW rlBum2ni43heSnPR2j2zUDKQghFrEfleWldIxdVQHGiKBoJ2w9eT++xPrcVuEScz 6Rixc70JRS2NiETpEV4lfdRMi6hb/5bOOPY3v3mARvFsi3qbDV9pGhb2DEuz4gP+ dZ2Vn6/VSBdD7lF6wML+ =lxiN -----END PGP SIGNATURE----- --Apple-Mail=_E3E519E8-B16C-4D16-A02D-7012F9FBB686-- From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 15:14:40 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C9305F8; Sat, 13 Jun 2015 15:14:40 +0000 (UTC) (envelope-from kan@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AA84F31; Sat, 13 Jun 2015 15:14:40 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DFEegf003080; Sat, 13 Jun 2015 15:14:40 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DFEewh003079; Sat, 13 Jun 2015 15:14:40 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201506131514.t5DFEewh003079@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Sat, 13 Jun 2015 15:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284340 - head/contrib/libxo/libxo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 15:14:40 -0000 Author: kan Date: Sat Jun 13 15:14:39 2015 New Revision: 284340 URL: https://svnweb.freebsd.org/changeset/base/284340 Log: Unbreak libxo's handling of characters not representable in current locale The xo_format_string_direct function loops forever never advancing the processed string pointer when it encounters a character that makes mbrtowc fail. Make it emit '?' character instead, as it seems this is what the code intent was, sans bugs. Differential Revision: https://reviews.freebsd.org/D2802 Reviewed by: marcel Modified: head/contrib/libxo/libxo/libxo.c Modified: head/contrib/libxo/libxo/libxo.c ============================================================================== --- head/contrib/libxo/libxo/libxo.c Sat Jun 13 14:24:31 2015 (r284339) +++ head/contrib/libxo/libxo/libxo.c Sat Jun 13 15:14:39 2015 (r284340) @@ -2077,7 +2077,8 @@ xo_format_string_direct (xo_handle_t *xo ilen = mbrtowc(&wc, cp, ilen, &xop->xo_mbstate); if (ilen < 0) { /* Invalid data; skip */ xo_failure(xop, "invalid mbs char: %02hhx", *cp); - continue; + wc = L'?'; + ilen = 1; } if (ilen == 0) { /* Hit a wide NUL character */ len = 0; From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 15:17:11 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0157F77F for ; Sat, 13 Jun 2015 15:17:10 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery4.ore.mailhop.org (pmta2.delivery4.ore.mailhop.org [54.200.247.200]) by mx1.freebsd.org (Postfix) with SMTP id D064CF59 for ; Sat, 13 Jun 2015 15:17:10 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sat, 13 Jun 2015 15:17:01 +0000 (UTC) Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t5DFH2lg011420; Sat, 13 Jun 2015 09:17:02 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1434208622.1415.57.camel@freebsd.org> Subject: Re: svn commit: r284198 - head/bin/ls From: Ian Lepore To: Steve Kargl Cc: Alexander Kabaev , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 13 Jun 2015 09:17:02 -0600 In-Reply-To: <20150613024916.GA98218@troutmask.apl.washington.edu> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 15:17:11 -0000 On Fri, 2015-06-12 at 19:49 -0700, Steve Kargl wrote: > On Fri, Jun 12, 2015 at 08:43:09PM -0400, Alexander Kabaev wrote: > > On Wed, 10 Jun 2015 01:27:39 +0000 (UTC) > > Marcel Moolenaar wrote: > > > > > Author: marcel > > > Date: Wed Jun 10 01:27:38 2015 > > > New Revision: 284198 > > > URL: https://svnweb.freebsd.org/changeset/base/284198 > > > > > > Log: > > > Convert ls(1) to use libxo(3). > > > > > > Obtained from: Phil Shafer > > > Sponsored by: Juniper Networks, Inc. > > > > > > > > > This broke all code that pipes output of the ls command to pipeline, > > such as 'ls | wc -l'. ls never exits and never output anything. Is > > there any purpose to libxo other than breaking stuff, which it achieves > > so splendidly? > > > > -1 for libxo, which also makes code almost unreadable. > s/unreadable/unmaintainable/ If you would have told me a year ago that you had a simple scheme that could make 30 years of experience maintaining code for unix-like systems completely worthless I would have been skeptical, but it seems we're well on our way. -- Ian From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 15:20:31 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B32A8E5; Sat, 13 Jun 2015 15:20:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33712FBD; Sat, 13 Jun 2015 15:20:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbzc4 with SMTP id zc4so28711487igb.0; Sat, 13 Jun 2015 08:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=EcAgV9poBslL2yfkx1ar+GMh95jjPngen/f/GRrUs54=; b=m5aLcjar0J9iFU7mdAgr+XDX8jTrsC6MGPduPrRfQCcWWaAdsDX5G1j4DaZ+n4rKLB OfHzKryHqU7fqGJ8K6Pb1W4yvX/NaFASnqjIv0+qFylomylaaL4JCNjm3WEe0Pf+pOt4 +E0qsxdm3Ew2tx+E0Xpjsmd/k6EvThpD0trvOOKfwKXd6kdv0Q4hpvCeULmzMHpPUnQt yfhW2iF35Iet21z+LTIqzTXIOa+EB4ffFYz3ACE2yEJJqxhBnAri1waDsQxFeELaFk0Z Aagr+8Uu9NafaxaSW54zZlfiT+/8yRtk7v6fMt+GYLFWLgx43l2oYZRT/SkdB96scFUA otRQ== MIME-Version: 1.0 X-Received: by 10.50.97.105 with SMTP id dz9mr10785306igb.49.1434208830569; Sat, 13 Jun 2015 08:20:30 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Sat, 13 Jun 2015 08:20:30 -0700 (PDT) In-Reply-To: <1434208622.1415.57.camel@freebsd.org> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> Date: Sat, 13 Jun 2015 08:20:30 -0700 X-Google-Sender-Auth: AG2cTFAqZg-D6qR-aNyp3LB5PiY Message-ID: Subject: Re: svn commit: r284198 - head/bin/ls From: Adrian Chadd To: Ian Lepore Cc: Steve Kargl , Alexander Kabaev , Marcel Moolenaar , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 15:20:31 -0000 I think the experience so far has been "ok, this way isn't working well, maybe it's time we made all our statistics gathering binaries thin layers on top of .so 's that implement the variation in output." It's been valuable to (re)learn that, but .. -adrian From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 15:36:14 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62B83EC5; Sat, 13 Jun 2015 15:36:14 +0000 (UTC) (envelope-from sjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 513E9650; Sat, 13 Jun 2015 15:36:14 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DFaEax016286; Sat, 13 Jun 2015 15:36:14 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DFaET5016284; Sat, 13 Jun 2015 15:36:14 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201506131536.t5DFaET5016284@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sat, 13 Jun 2015 15:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284341 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 15:36:14 -0000 Author: sjg Date: Sat Jun 13 15:36:13 2015 New Revision: 284341 URL: https://svnweb.freebsd.org/changeset/base/284341 Log: Use ${CRUNCHGEN} rather than bare word. Reviewed by: brooks Modified: head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.crunchgen.mk ============================================================================== --- head/share/mk/bsd.crunchgen.mk Sat Jun 13 15:14:39 2015 (r284340) +++ head/share/mk/bsd.crunchgen.mk Sat Jun 13 15:36:13 2015 (r284341) @@ -106,11 +106,12 @@ $(CONF): Makefile .endfor .endfor +CRUNCHGEN?= crunchgen # XXX Make sure we don't pass -P to crunchgen(1). .MAKEFLAGS:= ${.MAKEFLAGS:N-P} .ORDER: $(OUTPUTS) objs -$(OUTPUTS): $(CONF) - MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) \ +$(OUTPUTS): $(CONF) .META + MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${CRUNCHGEN} -fq -m $(OUTMK) \ -c $(OUTC) $(CONF) $(PROG): $(OUTPUTS) objs From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 15:38:24 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C20ABB6; Sat, 13 Jun 2015 15:38:24 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A63A66E; Sat, 13 Jun 2015 15:38:23 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from user-109-13.vpn.cl.cam.ac.uk (user-109-13.vpn.cl.cam.ac.uk [128.232.109.13]) (authenticated bits=0) by theravensnest.org (8.15.1/8.15.1) with ESMTPSA id t5DFcCOA022503 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Jun 2015 15:38:14 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r284198 - head/bin/ls From: David Chisnall In-Reply-To: <1434208622.1415.57.camel@freebsd.org> Date: Sat, 13 Jun 2015 11:38:11 -0400 Cc: Steve Kargl , Alexander Kabaev , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 15:38:24 -0000 On 13 Jun 2015, at 11:17, Ian Lepore wrote: >=20 > If you would have told me a year ago that you had a simple scheme that > could make 30 years of experience maintaining code for unix-like = systems > completely worthless I would have been skeptical, but it seems we're > well on our way. There is a lot of heckling and unhelpful hyperbole in this thread. = Reading the xo_emit format strings takes a little bit of getting used = to, but the same is true of printf - it=E2=80=99s just that we=E2=80=99re = already used to printf. The structured parts (xo_open_container, = xo_close_container and friends) are clear and descriptive. The changes = are fairly invasive, but the benefits are also very large for anyone who = is wanting to automate administration of FreeBSD systems. If you have suggestions for how the libxo APIs could be improved, then = please let us know - Phil is very reception to suggestions but = objections along the lines of =E2=80=98it=E2=80=99s not what I=E2=80=99m = used to and changes sometimes break things so we should never have = changes=E2=80=99 are not helpful. David From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 15:45:38 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAB1A2AF for ; Sat, 13 Jun 2015 15:45:38 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B67068D4 for ; Sat, 13 Jun 2015 15:45:38 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id EB88621BDC for ; Sat, 13 Jun 2015 11:45:36 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sat, 13 Jun 2015 11:45:36 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=NMiYVju3LNKQbx3gIX3aBJbyw3w=; b=No7kT2 hpKcmAToBI8Yw//HttuY/Ejr2jvDwX2wxDpBLnVfCuB7CEpcUrq70tkvb5984lyx 4eo7iDmiJVyotpC8ids01g75KM617DL6Ec2cnaKS7DodcNbcmqhNZBWPleqRVF5f /pYWxpxvtrqlcpoziLTD/kl78SHDgCE03qnjk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=NMiYVju3LNKQbx3 gIX3aBJbyw3w=; b=SiP4BZvhXxSoVoe0qpBoMRG2FCx8SRMY2W9YHjXpUUw7K8+ T/Eek+4qLMOK0NFcJfxdJxsLFzexmGga3zrYU3FGM9HHnUrLfD+K0tg4sj7loVeI UU34PeZvar5NFtUFWXZbKz9yYd28IIHkXs+q/WMWma8F5i2PTRgZctdIAL0I= X-Sasl-enc: J3dpaydD4i5+ohsul/mHdti4whqPHby/5+3aK0iJ5Por 1434210336 Received: from [192.168.1.84] (unknown [94.194.112.103]) by mail.messagingengine.com (Postfix) with ESMTPA id 90C1CC00019; Sat, 13 Jun 2015 11:45:35 -0400 (EDT) Message-ID: <557C501E.8050903@fastmail.net> Date: Sat, 13 Jun 2015 16:45:34 +0100 From: Bruce Simpson User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: David Chisnall , Ian Lepore CC: Steve Kargl , Alexander Kabaev , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284198 - head/bin/ls References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 15:45:39 -0000 On 13/06/2015 16:38, David Chisnall wrote: > On 13 Jun 2015, at 11:17, Ian Lepore wrote: >> >> If you would have told me a year ago that you had a simple scheme that >> could make 30 years of experience maintaining code for unix-like systems >> completely worthless I would have been skeptical, but it seems we're >> well on our way. > > There is a lot of heckling and unhelpful hyperbole in this thread. Agree -- teething trouble. I am trying to push something out right now based on 8.x, and all the little "gotchas" (e.g. vmstat -z not using a uniform delimiter set) are like little landmines on the highway in front of my Pursuit Special. Personally I prefer the new formats, they're less ambiguous, and closer to the analytics where they actually get used. From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 15:47:17 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D668E403 for ; Sat, 13 Jun 2015 15:47:17 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) by mx1.freebsd.org (Postfix) with SMTP id 98E148E7 for ; Sat, 13 Jun 2015 15:47:17 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sat, 13 Jun 2015 15:47:19 +0000 (UTC) Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t5DFl94u011481; Sat, 13 Jun 2015 09:47:09 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1434210429.1415.65.camel@freebsd.org> Subject: Re: svn commit: r284198 - head/bin/ls From: Ian Lepore To: David Chisnall Cc: Steve Kargl , Alexander Kabaev , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sat, 13 Jun 2015 09:47:09 -0600 In-Reply-To: References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> Content-Type: text/plain; charset="iso-8859-7" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 15:47:17 -0000 On Sat, 2015-06-13 at 11:38 -0400, David Chisnall wrote: > On 13 Jun 2015, at 11:17, Ian Lepore wrote: > > > > If you would have told me a year ago that you had a simple scheme that > > could make 30 years of experience maintaining code for unix-like systems > > completely worthless I would have been skeptical, but it seems we're > > well on our way. > > There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it¢s just that we¢re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. > > If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ¡it¢s not what I¢m used to and changes sometimes break things so we should never have changes¢ are not helpful. > "This is a piece of crap that needs to be excised from the system and done a different way" is useful input whether you agree with it or not. The idea that someone does not have the right to point out a huge mistake simply because they don't have a patchset in hand is pure BS. But, this is what you get when a disagreement about design is "solved" by someone pointing out that project policy has always been "he who commits first wins the design discussion" and that's pretty much what happened when all of this was being discussed. -- Ian From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 16:13:32 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E89D78E; Sat, 13 Jun 2015 16:13:32 +0000 (UTC) (envelope-from bryanv@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1203F21; Sat, 13 Jun 2015 16:13:31 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DGDVVd037654; Sat, 13 Jun 2015 16:13:31 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DGDVZW037653; Sat, 13 Jun 2015 16:13:31 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201506131613.t5DGDVZW037653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Sat, 13 Jun 2015 16:13:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284342 - head/sys/dev/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 16:13:32 -0000 Author: bryanv Date: Sat Jun 13 16:13:31 2015 New Revision: 284342 URL: https://svnweb.freebsd.org/changeset/base/284342 Log: Fix typo when deregistering the VLAN unconfig event handler Submitted by: Masao Uebayashi MFC after: 3 days Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Sat Jun 13 15:36:13 2015 (r284341) +++ head/sys/dev/virtio/network/if_vtnet.c Sat Jun 13 16:13:31 2015 (r284342) @@ -443,7 +443,7 @@ vtnet_detach(device_t dev) sc->vtnet_vlan_attach = NULL; } if (sc->vtnet_vlan_detach != NULL) { - EVENTHANDLER_DEREGISTER(vlan_unconfg, sc->vtnet_vlan_detach); + EVENTHANDLER_DEREGISTER(vlan_unconfig, sc->vtnet_vlan_detach); sc->vtnet_vlan_detach = NULL; } From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 16:25:59 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA9A2DF0; Sat, 13 Jun 2015 16:25:58 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B96651E7; Sat, 13 Jun 2015 16:25:58 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from [10.65.208.216] ([137.122.64.59]) (authenticated bits=0) by mail.xcllnt.net (8.14.9/8.14.9) with ESMTP id t5DGPf2T096884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Jun 2015 09:25:44 -0700 (PDT) (envelope-from marcel@xcllnt.net) Subject: Re: svn commit: r284198 - head/bin/ls Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_094F4660-9354-4466-8BD0-3CA14A572348"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Marcel Moolenaar In-Reply-To: <1434210429.1415.65.camel@freebsd.org> Date: Sat, 13 Jun 2015 12:25:36 -0400 Cc: David Chisnall , Steve Kargl , Alexander Kabaev , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <656256CF-58BF-492B-BA66-49B095407E9A@xcllnt.net> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> <1434210429.1415.65.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 16:25:59 -0000 --Apple-Mail=_094F4660-9354-4466-8BD0-3CA14A572348 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 13, 2015, at 11:47 AM, Ian Lepore wrote: >=20 > On Sat, 2015-06-13 at 11:38 -0400, David Chisnall wrote: >> On 13 Jun 2015, at 11:17, Ian Lepore wrote: >>>=20 >>> If you would have told me a year ago that you had a simple scheme = that >>> could make 30 years of experience maintaining code for unix-like = systems >>> completely worthless I would have been skeptical, but it seems we're >>> well on our way. >>=20 >> There is a lot of heckling and unhelpful hyperbole in this thread. = Reading the xo_emit format strings takes a little bit of getting used = to, but the same is true of printf - it=E2=80=99s just that we=E2=80=99re = already used to printf. The structured parts (xo_open_container, = xo_close_container and friends) are clear and descriptive. The changes = are fairly invasive, but the benefits are also very large for anyone who = is wanting to automate administration of FreeBSD systems. >>=20 >> If you have suggestions for how the libxo APIs could be improved, = then please let us know - Phil is very reception to suggestions but = objections along the lines of =E2=80=98it=E2=80=99s not what I=E2=80=99m = used to and changes sometimes break things so we should never have = changes=E2=80=99 are not helpful. >>=20 >=20 > "This is a piece of crap that needs to be excised from the system and > done a different way" is useful input whether you agree with it or = not. Actually: no. Not only does one not demonstrate an understanding of the problem by calling it =E2=80=9Ccrap=E2=80=9D and thus leaving the recipient to = wonder whether it=E2=80=99s worth his or her time to even respond; the sentence also = lack a concrete suggestion and, last but not least, is utter after this was all discussed on arch@, making it very much one of =E2=80=9Ctoo little, = too late=E2=80=9D. So, not useful at all. -- Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_094F4660-9354-4466-8BD0-3CA14A572348 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVfFmAAAoJEIda8t8f0tjjZPgP/ivLbkit+reNxHWBghkbKscX rJhq1wUI8FLJ18KGQbNtuFMkhlSNDrDLbJiGmkheKzKh7MTJOWr3s8PwbUvy2qBR XcB/sUK5d8lU7YP2h7+1xxUgkdDLyH7aflwvwOmyW1N69wWY6ft8PpwbBmoAwNSi CvBERn+vQLUZ/H4eDSIs8/uNTkG1K+eexjGou6foNtMHAf3eQyZm+iwr3CX3g6l9 PKwfPX7GK28UjUKkX/TluZsCDGziybQep/Rw0ZhsR+wRaMImTy4FwgTkqxTpCG7Y IOtp1XYr2R2Il3aqfdjEQxL1z8HG+ZhT49p6EwCuqkkbc7aj/4CbFEoRaCNhifeR B/7tQDetzQQWUF9ceTQUrG1m2+lmaJoeO23DOTizQGDm/P0xHBCAVEyAgVssTy1E skNaL8NJ/C4JV9z1dJZlhljQ/sYaVM0Gq6kUE+ODyjgQym6GSYobp5FEpkbCCJM0 CIALvFPkFkl4ELciwZ3lcmXVafKtUMnuVn7z5EpoL5EgM4lHguGPIEU34OZ4gwJb LjBR3OWPSTAABEdJGvsskKy0xDy3PB9oD2cWa0QHPquzextQMHQw8blQwVWXyBbf mr5cI64T5KAsfEuYjdye2zJeHnIB4ETlkHlEwO14O5Wy2fA+i1BP5BBqkHcOeRNI RyCSFkiB1/CM7+FuYMIH =fVh4 -----END PGP SIGNATURE----- --Apple-Mail=_094F4660-9354-4466-8BD0-3CA14A572348-- From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 16:35:33 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A31A0D8; Sat, 13 Jun 2015 16:35:33 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E34E61B; Sat, 13 Jun 2015 16:35:33 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iecrd14 with SMTP id rd14so8832370iec.3; Sat, 13 Jun 2015 09:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=maEryGmH824VBUR4u/NSMR21NCvA0fWX2cpss3kYQUU=; b=x3DaBk3EuvVOcrkaLFs6UpslX87GmGCYvNASNxMp/WetQNbaa0UO++BmSHwwER2p73 jFc1Gh21b/KJ4AQuHPPbgVx60fpkLm4/jz+X5aE0SrIrRfT5U3EO/GbddocI7zNQabew FrSr+uTFP9/sKq5Aa1G+IU3Edb8erbpv3mHmnoqq80Y/k+4OjTQO5Q6C4xFFE5pGwG1K OaIgtPog0KfALEFMefwF/SJsOG1xrehzNYUapYf37l4sN2IjVIQCvA9jW+kkghNmM7es jO33F0K1Z4DLJB1X8Sg71KRtAO3mj/grDMG3y+v1pHlRU/8+G/cbT/IcpBT3WJ3MiFWm vBGg== MIME-Version: 1.0 X-Received: by 10.107.5.210 with SMTP id 201mr24398571iof.88.1434213332781; Sat, 13 Jun 2015 09:35:32 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Sat, 13 Jun 2015 09:35:32 -0700 (PDT) In-Reply-To: <656256CF-58BF-492B-BA66-49B095407E9A@xcllnt.net> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> <1434210429.1415.65.camel@freebsd.org> <656256CF-58BF-492B-BA66-49B095407E9A@xcllnt.net> Date: Sat, 13 Jun 2015 09:35:32 -0700 X-Google-Sender-Auth: mLZj_TFQKJt4k9lIasF-_cVg3Ew Message-ID: Subject: Re: svn commit: r284198 - head/bin/ls From: Adrian Chadd To: Marcel Moolenaar Cc: Ian Lepore , David Chisnall , Steve Kargl , Alexander Kabaev , Marcel Moolenaar , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 16:35:33 -0000 Hi, I think we're at the point now where it's worth doing that re-evaluation. I don't think it's worth backing everything out; just whether the current approach of overriding printing the way it's done is the right way. So, how about that happens nowish before more things are converted? -adrian From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 17:06:30 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 789F76B0; Sat, 13 Jun 2015 17:06:30 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28547CDB; Sat, 13 Jun 2015 17:06:29 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from [10.65.208.216] ([137.122.64.59]) (authenticated bits=0) by mail.xcllnt.net (8.14.9/8.14.9) with ESMTP id t5DH6K8T097107 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Jun 2015 10:06:22 -0700 (PDT) (envelope-from marcel@xcllnt.net) Subject: Re: svn commit: r284198 - head/bin/ls Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_34CAAE90-3ECB-4E89-9062-6F3D606F3234"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Marcel Moolenaar In-Reply-To: Date: Sat, 13 Jun 2015 13:06:15 -0400 Cc: Ian Lepore , David Chisnall , Steve Kargl , Alexander Kabaev , Marcel Moolenaar , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <5D5E9A5C-0B8D-4194-9DB3-DB73253DF943@xcllnt.net> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> <1434210429.1415.65.camel@freebsd.org> <656256CF-58BF-492B-BA66-49B095407E9A@xcllnt.net> To: Adrian Chadd X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 17:06:30 -0000 --Apple-Mail=_34CAAE90-3ECB-4E89-9062-6F3D606F3234 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jun 13, 2015, at 12:35 PM, Adrian Chadd wrote: > > Hi, > > I think we're at the point now where it's worth doing that > re-evaluation. I don't think it's worth backing everything out; just > whether the current approach of overriding printing the way it's done > is the right way. > > So, how about that happens nowish before more things are converted? What do you suggest we do instead? -- Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_34CAAE90-3ECB-4E89-9062-6F3D606F3234 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVfGMHAAoJEIda8t8f0tjjNXcQAKinAdJQ34fP/2AIIJxKx9eZ 0vDMW8gz5BX6QpWNvGtjSjBgkrHhg05s/KPx3Zi32J8FerdgxV0J06bhr3IdzdFo islU+AWCtyJBoAC03obYrpQ127nvoeq+rPfA2aWDYhdxueV9/C45UveHZQH37pzu svoAkY4djgUc0LLFIBwFeIsVLSaWCCn2iA56d5MTFOKH4cxD01hqTeL6hUs+UEkU 7bV2kCOYWfUbHKHl/xSYna1/4TKoeAqOkRTsRJaaTG2d/Bq0DXiU2epGv3J8E5AZ 2GHP/zB/dKdMhTJXqGgP+quEHDbPTV/GvUUSWVOZLqZtf50a3lfzp7FbsNTi/sIk WbpLEVHNu1etie2sS+J4lCaobSZ6znEEGGS9P5nXXWP80/AwiGC26P9ET/cGgd+n T+NLcUstCErRv0R35i+sSEoiHShtybRPYy3rxtR/Yegl18Yu5b9VxMwlM1upecFq yoNjfGWig1n+9muMgVyqukEKEW3aK6OuKpB1OAxHNR2SvTJHHKT9lS3ih2cTmRYz s7IKfgt2W5lhFbA10dhUNdOq3JtqCKCb5UoTiC22iHNDoBdHyXna/MXI9lD1vCQ7 EkGj1ye3Gix3khjcaFognu1UqI3eeWArSarg7GDEvKXjvEKvDNWmHupfKVHbbMfN waO8/ldtE1N/RhTR3jsx =2OfH -----END PGP SIGNATURE----- --Apple-Mail=_34CAAE90-3ECB-4E89-9062-6F3D606F3234-- From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 17:19:53 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC719978 for ; Sat, 13 Jun 2015 17:19:53 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 766E8EEA for ; Sat, 13 Jun 2015 17:19:53 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-248-228.lns20.per4.internode.on.net [121.45.248.228]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t5DHJXmh080380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 13 Jun 2015 10:19:36 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <557C661F.8080104@freebsd.org> Date: Sun, 14 Jun 2015 01:19:27 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: David Chisnall , Ian Lepore CC: Steve Kargl , Alexander Kabaev , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284198 - head/bin/ls References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 17:19:53 -0000 On 6/13/15 11:38 PM, David Chisnall wrote: > On 13 Jun 2015, at 11:17, Ian Lepore wrote: >> If you would have told me a year ago that you had a simple scheme that >> could make 30 years of experience maintaining code for unix-like systems >> completely worthless I would have been skeptical, but it seems we're >> well on our way. > There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it’s just that we’re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. > > If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ‘it’s not what I’m used to and changes sometimes break things so we should never have changes’ are not helpful. > > David > I made a suggestion for an alternate path in the previous thread. https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054855.html but I have a job and kids so I can't object if I'm not listened to.. (no time to actually follow my own advice and produce working code.) From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 17:57:47 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB52B7B7; Sat, 13 Jun 2015 17:57:46 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F7E8A15; Sat, 13 Jun 2015 17:57:46 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igboe5 with SMTP id oe5so4497691igb.1; Sat, 13 Jun 2015 10:57:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=HGzaqu3wsdFbHSa7WzLFYFREYLH232RgyD1SE175q1k=; b=OjdcrpNSR7a8x/h5EsqaLbSg3D8wq9Ru+vL99vb4lQSWQp1fUkuipBrO7fw5lyGhe1 crccSGgAA6xXhs5eng+5ISWhwhmhnQTcK1/7/I/HYDM0AxJxw+A1dS6dUJyKfglwWi83 ZvEOVXdbZN04zJTt61t5rGphEFHOfTf4zeBq7q9vBD63YkUmahrWmUBByU5bJvfSoVlI M4sVoz4aVVyI0sx1rwHk3K1GIyhZOAlje8PRfJRtLIuw2DxEvuaW6rHKUJlcl7S8RmxQ KHVCZB7blNziYkNWx7T0VusVaZSxpiqpe6paRCXtT4WcTyoEU6eDnIYBn5jmCM9IsrzZ flNg== MIME-Version: 1.0 X-Received: by 10.50.79.167 with SMTP id k7mr11436952igx.32.1434218266189; Sat, 13 Jun 2015 10:57:46 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Sat, 13 Jun 2015 10:57:46 -0700 (PDT) In-Reply-To: <5D5E9A5C-0B8D-4194-9DB3-DB73253DF943@xcllnt.net> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> <1434210429.1415.65.camel@freebsd.org> <656256CF-58BF-492B-BA66-49B095407E9A@xcllnt.net> <5D5E9A5C-0B8D-4194-9DB3-DB73253DF943@xcllnt.net> Date: Sat, 13 Jun 2015 10:57:46 -0700 X-Google-Sender-Auth: hQRRPu7AyxO57A44QSCNprv_7xM Message-ID: Subject: Re: svn commit: r284198 - head/bin/ls From: Adrian Chadd To: Marcel Moolenaar Cc: Ian Lepore , David Chisnall , Steve Kargl , Alexander Kabaev , Marcel Moolenaar , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 17:57:47 -0000 On 13 June 2015 at 10:06, Marcel Moolenaar wrote: > >> On Jun 13, 2015, at 12:35 PM, Adrian Chadd wrote: >> >> Hi, >> >> I think we're at the point now where it's worth doing that >> re-evaluation. I don't think it's worth backing everything out; just >> whether the current approach of overriding printing the way it's done >> is the right way. >> >> So, how about that happens nowish before more things are converted? > > What do you suggest we do instead? So a lot of these things are table driven. Having manual printing for tabular data is plain stupid. The libbsdstat library for doing basic statistics output with "now" and "time series" is what I'm playing with right now. It's only used by sam's wifi utilities, but I'm going to try and extend it for other utilities too (like netstat, vmstat, etc style output.) That way what's expressed in code is organised as such: * a bit of code fetches statistics * a bit of code sets up what the name of each field is, and what the units are * a bit of code handles any odd corner cases with data representations * libbsdstat takes care of recording the samples into the time-series or 'now' section, figuring out which fields need to be printed in which order, what the formatting is, etc. * .. I'm extending it to print out json for its table outputs versus just plain text. Having arbitrary formatting, arbitrary printing, random places where statistics are fetched, etc is actually the terrible problem that we could do better, without losing our minds by overcomplicating it with C++, templating, grammars, etc - and ending up with what look like five layers of nested java classes that do "Setter(ToString(Getter())" in layers. -adrian From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 17:58:35 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D54D58FC; Sat, 13 Jun 2015 17:58:35 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9883FA21; Sat, 13 Jun 2015 17:58:35 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igboe5 with SMTP id oe5so4504306igb.1; Sat, 13 Jun 2015 10:58:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=awaRWdO/qSgs0wXcKvEl6Vn6EHrxR4D4xrZvqJl+OfA=; b=kCO84JxChXiIZanX/xtiJckecpHgdV4MtxzjYrQGEj6+RyAbNCZCDikQ6UTrf/Kuqc oD00XB51KGoEgaaBpP7SZGX0lZM1U6xYiRNqTNha1YGOy+8WWCqUF1cNCZr7dASd0VRg f0zDoSxK0fnWkJsSyghctkumO7GSeP7P1SEcYHi3n5thvAAEI1HqSFXJC0ZhfrIbJlql HrR6eoXwTe9NNbIxZfpPZSmaqg8u6Tt2NSFHUmQn/t870ilbUYhEU5rBLKkbceMM18J2 gCnbB+1wVI/Meg6MPYHY6x7g1+tLWwn50YcT3NkHeHQPdMizmvXLbUQOrxoFRWZij437 tuIA== MIME-Version: 1.0 X-Received: by 10.50.111.167 with SMTP id ij7mr11375813igb.49.1434218315122; Sat, 13 Jun 2015 10:58:35 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Sat, 13 Jun 2015 10:58:35 -0700 (PDT) In-Reply-To: References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> <1434210429.1415.65.camel@freebsd.org> <656256CF-58BF-492B-BA66-49B095407E9A@xcllnt.net> <5D5E9A5C-0B8D-4194-9DB3-DB73253DF943@xcllnt.net> Date: Sat, 13 Jun 2015 10:58:35 -0700 X-Google-Sender-Auth: 0g4c08Bbyz9PMVYe3QwSrsjXY5g Message-ID: Subject: Re: svn commit: r284198 - head/bin/ls From: Adrian Chadd To: Marcel Moolenaar Cc: Ian Lepore , David Chisnall , Steve Kargl , Alexander Kabaev , Marcel Moolenaar , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 17:58:36 -0000 .. and, since libbsdstat is mostly in the small sandpit of wifi statistics tools, I'm going to do this /anyway/. Then people can evaluate if it's useful to convert other tools to use libbsdstat. -adrian From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 18:00:22 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B21BA5E; Sat, 13 Jun 2015 18:00:22 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DEFFA5E; Sat, 13 Jun 2015 18:00:22 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id t5DI0KhG001384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 13 Jun 2015 11:00:20 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id t5DI0KiT001383; Sat, 13 Jun 2015 11:00:20 -0700 (PDT) (envelope-from sgk) Date: Sat, 13 Jun 2015 11:00:20 -0700 From: Steve Kargl To: Julian Elischer Cc: David Chisnall , Ian Lepore , Alexander Kabaev , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284198 - head/bin/ls Message-ID: <20150613180020.GA1303@troutmask.apl.washington.edu> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> <557C661F.8080104@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <557C661F.8080104@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 18:00:22 -0000 On Sun, Jun 14, 2015 at 01:19:27AM +0800, Julian Elischer wrote: > On 6/13/15 11:38 PM, David Chisnall wrote: > > On 13 Jun 2015, at 11:17, Ian Lepore wrote: > >> If you would have told me a year ago that you had a simple scheme that > >> could make 30 years of experience maintaining code for unix-like systems > >> completely worthless I would have been skeptical, but it seems we're > >> well on our way. > > There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it???s just that we???re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. > > > > If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ???it???s not what I???m used to and changes sometimes break things so we should never have changes??? are not helpful. > > > > David > > > I made a suggestion for an alternate path in the previous thread. > > https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054855.html > > but I have a job and kids so I can't object if I'm not listened to.. > (no time to actually follow my own advice and produce working code.) > I also pointed out the bloat https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054917.html and the poor documentation https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054899.html -- Steve From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 18:08:17 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A46DC9F for ; Sat, 13 Jun 2015 18:08:17 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ig0-f180.google.com (mail-ig0-f180.google.com [209.85.213.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10E77C63 for ; Sat, 13 Jun 2015 18:08:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by igbsb11 with SMTP id sb11so28213105igb.0 for ; Sat, 13 Jun 2015 11:08:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=XI626VA834Ejwx0paj5C4tbaxfD72XajHST/D4i/ER8=; b=VgxN9Rg1I/xCITf3Irhm9bbOSLUz5uCPFj1EpF7+FsXx1XiBbocJhzJ7ZFcMT8o/oN QciHmX6Fx1YNvfC4G+t7LMHqGJ/kwIiRC5tOPuPmu1xRtAqm9XAqtzvhwjfMtui9DJa9 f8t+ViFcecPvQ/RsIxPIaMbhfJ7vJfz692PI6SRXzCrZVVt9Ulpp/kA70zI7DbWCApYi V4zXabpVKualT49UAYb28U5rCGtFeQ4oPuu3AMyMTzNrVq0gB6KTqIX99PZXhCFjqLsN eMUZWVc7ofUEYa4khNpNlixgblDPykL+H46PWm6y60pTcpQLF9KSo8Oi+LyFGnwXFBr+ 54hA== X-Gm-Message-State: ALoCoQkyAFb16n7nALZ/Vo+8UNxI7pDlNd/C8iLjYFYPyUmW6Mfj4N9HeG1G87ucQvvwqPlYIoW1 X-Received: by 10.107.155.74 with SMTP id d71mr24945565ioe.29.1434218890615; Sat, 13 Jun 2015 11:08:10 -0700 (PDT) Received: from [10.65.211.160] ([137.122.64.70]) by mx.google.com with ESMTPSA id k74sm5084704iok.30.2015.06.13.11.08.08 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Jun 2015 11:08:09 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r284198 - head/bin/ls Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_EE4EACF1-5C81-4B15-BE28-BBBB655AB8B0"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: <656256CF-58BF-492B-BA66-49B095407E9A@xcllnt.net> Date: Sat, 13 Jun 2015 14:08:06 -0400 Cc: Ian Lepore , David Chisnall , Steve Kargl , Alexander Kabaev , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <39E9FC16-B010-4B22-B0FF-C9E6C0447D57@bsdimp.com> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> <1434210429.1415.65.camel@freebsd.org> <656256CF-58BF-492B-BA66-49B095407E9A@xcllnt.net> To: Marcel Moolenaar X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 18:08:17 -0000 --Apple-Mail=_EE4EACF1-5C81-4B15-BE28-BBBB655AB8B0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 13, 2015, at 12:25 PM, Marcel Moolenaar = wrote: >=20 >=20 >> On Jun 13, 2015, at 11:47 AM, Ian Lepore wrote: >>=20 >> On Sat, 2015-06-13 at 11:38 -0400, David Chisnall wrote: >>> On 13 Jun 2015, at 11:17, Ian Lepore wrote: >>>>=20 >>>> If you would have told me a year ago that you had a simple scheme = that >>>> could make 30 years of experience maintaining code for unix-like = systems >>>> completely worthless I would have been skeptical, but it seems = we're >>>> well on our way. >>>=20 >>> There is a lot of heckling and unhelpful hyperbole in this thread. = Reading the xo_emit format strings takes a little bit of getting used = to, but the same is true of printf - it=E2=80=99s just that we=E2=80=99re = already used to printf. The structured parts (xo_open_container, = xo_close_container and friends) are clear and descriptive. The changes = are fairly invasive, but the benefits are also very large for anyone who = is wanting to automate administration of FreeBSD systems. >>>=20 >>> If you have suggestions for how the libxo APIs could be improved, = then please let us know - Phil is very reception to suggestions but = objections along the lines of =E2=80=98it=E2=80=99s not what I=E2=80=99m = used to and changes sometimes break things so we should never have = changes=E2=80=99 are not helpful. >>>=20 >>=20 >> "This is a piece of crap that needs to be excised from the system and >> done a different way" is useful input whether you agree with it or = not. >=20 > Actually: no. >=20 > Not only does one not demonstrate an understanding of the problem > by calling it =E2=80=9Ccrap=E2=80=9D and thus leaving the recipient to = wonder whether > it=E2=80=99s worth his or her time to even respond; the sentence also = lack a > concrete suggestion and, last but not least, is utter after this was > all discussed on arch@, making it very much one of =E2=80=9Ctoo = little, too > late=E2=80=9D. >=20 > So, not useful at all. My complaints have been specific: libxo conversion broke things, but didn=E2=80=99t fix them before going on to convert more things (which = broke more things). This suggests a lack of competent testing as a standard operating procedure and pointing it out is helpful. And specifically about ls: it was already way overloaded. Overloading it further seemed to be unwise: a new program would have been better since it is a thin interface to fts(3). I didn=E2=80=99t recall = seeing a specific discussion about ls, but the original thread in arch grew to be quite = large and maybe I missed something. While I dislike libxo in general, I do understand why it is being done. = I see the use in general, and the benefits. I have nothing better to = offer. I object to the execution in small aspects. Warner --Apple-Mail=_EE4EACF1-5C81-4B15-BE28-BBBB655AB8B0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVfHGHAAoJEGwc0Sh9sBEALH4P/RnUIHaoh5ui6wDGdCqXNBTR 7fVPs+d9wSlNz4HoZC/ErLYO6HN+RgCaHRyxpIfIUM1vAGmtfA1aEUTyaVyEk0Fy UBc4Wnwh6nImnnkuH55dzHZCqC/JQ6MvlfYiCZpZ9EDZyzQMhVSRi81Tz5ftbgqE 4dyHLLMVc/1ESXUQc563VxBIdCawB6ILj7JghETGLjjGLb6g7qliC4Lm6Hpd/S9i JfhBv+omO9ZUMQXXUVra99Qrqgh01Q+p6JBnwglEKx1IvLB/0+UmJ5v6q4QpsaIQ nc1vth29YjDZCLHmQhBxRJgZb8lAsrrnR4h4/cck5/3AwGhf2ljpNdPEhGNc0M8B ktyY3TNskSryVPK/BbODwNhNE0Vo1sZ/uc6mDmodVfk8F542jNnoDRRF4peCTCOF 9n9oHrW0VjVhgwtVShRbJq5SbrnDBab7BwaoZgwMYaJycs245dik1WWoeIXaH4CG H8KXzeLm5kyPWULAPZryLDh+RE++YXeCa0TV5y4Hjk3S4htZxhfYUCMezKBGg+Fu 460mUXyu1QNSxv+reysWyvnzQ6QNF0e4zNCG54SwSAfW60bcbfc2MmFyfQxluzan XeMXiK9QmGA47o7IDU9Gw28zdUkcv2XPrtJQ770/nJIYEa6L2thYu+oPT3CSBSqx K89QeLLlCls1RbPBlwAp =wOkc -----END PGP SIGNATURE----- --Apple-Mail=_EE4EACF1-5C81-4B15-BE28-BBBB655AB8B0-- From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 18:30:16 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0736E217 for ; Sat, 13 Jun 2015 18:30:16 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com [209.85.217.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AD14216D for ; Sat, 13 Jun 2015 18:30:15 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by lbbqq2 with SMTP id qq2so34033999lbb.3 for ; Sat, 13 Jun 2015 11:30:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=r5RKYqxB3GJ0k0LSm/4+IN8u8aNPF8JUtxAcUfUBwKM=; b=JYK+bx/oay/6uRcpY+2UeIZdrOt9o/3JNk/QompkVyUSNUFp3HAvjxVWic/2Vrvd4s G17Yl5BC3UDHothQ0SV8YVkVJjcks01RUhcelGJWkc7lhJMknGtATmEP2DHeGRFxrkUq iC3oHJeyv5bqgWuhgfN0XeskqncFOznJ1Xll9RdmaPuY88H3rjDFWxyqruzMJYWK5uCG 0YgKpouYtr9AdH3LfaIe47X5xJG65X8zFqKPdnrQN2tEQZit3BoHxSQSlECJCgiu15OL w2tDdoqvRm0/ncY0QioB2dEaOnKlJK1vYocctO3T4RuTciYIUxCABgG05Kc8TPl44UPv AFGw== X-Gm-Message-State: ALoCoQnkbQi9lpIr4PKq17W1Tp/jZnAc6YhzbLdz8Zlblr3iN2yUJ9Kt7hvqf1Z9GWG/BCKxWVhn X-Received: by 10.152.6.39 with SMTP id x7mr20103458lax.18.1434219877627; Sat, 13 Jun 2015 11:24:37 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id du2sm1547195lbc.44.2015.06.13.11.24.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Jun 2015 11:24:36 -0700 (PDT) From: Andrey Chernov Subject: Re: svn commit: r284198 - head/bin/ls To: Julian Elischer , Steve Kargl , Alexander Kabaev References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <557C3D9D.5050905@freebsd.org> Cc: Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <557C7562.4000809@freebsd.org> Date: Sat, 13 Jun 2015 21:24:34 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <557C3D9D.5050905@freebsd.org> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 18:30:16 -0000 On 13.06.2015 17:26, Julian Elischer wrote: > On 6/13/15 10:49 AM, Steve Kargl wrote: >> On Fri, Jun 12, 2015 at 08:43:09PM -0400, Alexander Kabaev wrote: >>> On Wed, 10 Jun 2015 01:27:39 +0000 (UTC) >>> Marcel Moolenaar wrote: >>> >>>> Author: marcel >>>> Date: Wed Jun 10 01:27:38 2015 >>>> New Revision: 284198 >>>> URL: https://svnweb.freebsd.org/changeset/base/284198 >>>> >>>> Log: >>>> Convert ls(1) to use libxo(3). >>>> Obtained from: Phil Shafer >>>> Sponsored by: Juniper Networks, Inc. >>>> >>> >>> >>> This broke all code that pipes output of the ls command to pipeline, >>> such as 'ls | wc -l'. ls never exits and never output anything. Is >>> there any purpose to libxo other than breaking stuff, which it achieves >>> so splendidly? >>> >> -1 for libxo, which also makes code almost unreadable. > +1 of the -1 > > my personal vote is to revert all libxo changes and banish it from > /usr/src. I already express my opinion in another thread, so just repeat it here. When libxo starts to break things at very early stage, I perceive the rest of the way to hell. "Proper way to do this thing is to back out all changes and write completely separate templates-based parser - xml/json/etc. writer." If somebody love libxo code, use it in that parser/writer. -- http://ache.vniz.net/ -- http://vniz.net/ From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 18:40:44 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A379D393; Sat, 13 Jun 2015 18:40:44 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FB49684; Sat, 13 Jun 2015 18:40:43 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from [10.65.208.216] ([137.122.64.59]) (authenticated bits=0) by mail.xcllnt.net (8.14.9/8.14.9) with ESMTP id t5DIeYf6097659 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Jun 2015 11:40:36 -0700 (PDT) (envelope-from marcel@xcllnt.net) Subject: Re: svn commit: r284198 - head/bin/ls Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_232E492D-1735-4CD6-BD11-521E20E6382F"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Marcel Moolenaar In-Reply-To: <557C661F.8080104@freebsd.org> Date: Sat, 13 Jun 2015 14:40:29 -0400 Cc: David Chisnall , Ian Lepore , Steve Kargl , Alexander Kabaev , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <860017ED-D754-450C-865D-2D81A30C2212@xcllnt.net> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> <557C661F.8080104@freebsd.org> To: Julian Elischer X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 18:40:44 -0000 --Apple-Mail=_232E492D-1735-4CD6-BD11-521E20E6382F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 13, 2015, at 1:19 PM, Julian Elischer = wrote: >=20 > On 6/13/15 11:38 PM, David Chisnall wrote: >> On 13 Jun 2015, at 11:17, Ian Lepore wrote: >>> If you would have told me a year ago that you had a simple scheme = that >>> could make 30 years of experience maintaining code for unix-like = systems >>> completely worthless I would have been skeptical, but it seems we're >>> well on our way. >> There is a lot of heckling and unhelpful hyperbole in this thread. = Reading the xo_emit format strings takes a little bit of getting used = to, but the same is true of printf - it=E2=80=99s just that we=E2=80=99re = already used to printf. The structured parts (xo_open_container, = xo_close_container and friends) are clear and descriptive. The changes = are fairly invasive, but the benefits are also very large for anyone who = is wanting to automate administration of FreeBSD systems. >>=20 >> If you have suggestions for how the libxo APIs could be improved, = then please let us know - Phil is very reception to suggestions but = objections along the lines of =E2=80=98it=E2=80=99s not what I=E2=80=99m = used to and changes sometimes break things so we should never have = changes=E2=80=99 are not helpful. >>=20 >> David >>=20 > I made a suggestion for an alternate path in the previous thread. >=20 > = https://lists.freebsd.org/pipermail/freebsd-current/2015-March/054855.html= >=20 > but I have a job and kids so I can't object if I'm not listened to.. > (no time to actually follow my own advice and produce working code.) Not wanting to change all programs and instead write grammars for all programs seems like a worse solution. The scope is the same (same number of programs), but since the grammars and programs are two distinct entities, it=E2=80=99s actually fairly hard to make sure both = are changed at the same time when so needed. It=E2=80=99s also not at all a given that screen scrubbing is always easy enough to do that it isn=E2=80=99t causing some sort of problems in specific situations. If one wants to output JSON, XML and HTML you find that screen scrubbing doesn=E2=80=99t even give you all the information you need. = It=E2=80=99s very natural to come to the conclusion that it=E2=80=99s easier to get = the data from the source and skip the entire non-lossless translation phase. -- Marcel Moolenaar marcel@xcllnt.net --Apple-Mail=_232E492D-1735-4CD6-BD11-521E20E6382F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVfHkdAAoJEIda8t8f0tjjhA4QAKZEczGxM2qewibBzMOGmQaU IuNQIMz7hUXhsoJ0AQ+Zw07Ad/Vg9EsbX+pYVqUPJrFIfDqEv2hC/u3qXEkm5QK5 wbN294IBaM31GZZfxXYhN1Ibh2TtUqHbRu0ODexupx6rdD1gEk8qQ8Vf/dhCWwHA yWauNBpxjoMl/1phgPPztfCjPNFqns9ZeQW0yZDXBHYRGQj1Dr7N5bUctiEAmb1a 3NOi/EV4gEkfXAw9tIBUu2IdZrhWKqwOib16fSrPE+qd+f8n5VzpoIr763EWLFkN RSakmjmWvHJQrdTKI5qOOiG1Eov8TQjgoS0fiq1ttbJcN08OZFCtDn4BItEwmKAk fKd72XJMmal4NqSH7kA2LzWYXjHqESJpwtO3l/nQheyPiGBCve32nkouZ+jF7Hg0 CHqL3w9VcrTt15w6vY/wyIurlQM1OOgJhrc6Y3pJgqt0Vbh8h4qsCQMN3rY9UDzD tae2Rc0GXaTE5ZmZvYPdzOPUSZQwE5TijiqRNB2GqyZz6jfW+0IHckapkiZbhjcZ v1r15xc2hLGsrhgUxbIqgVt/zwseJIdk/yyLMQsG9Ij2Xa4Pey8YjH0wpo2x2rmL KVulBcCG03jW8oZOWb0Lq1wRko4+v8WkUR9rp8lgxavLxJTRnzY7cr3oAAS51t21 milhmFvXUYq+VprVZwnY =+X5U -----END PGP SIGNATURE----- --Apple-Mail=_232E492D-1735-4CD6-BD11-521E20E6382F-- From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 19:16:47 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCA00C96; Sat, 13 Jun 2015 19:16:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B22CE41; Sat, 13 Jun 2015 19:16:46 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t5DJGdNO005201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 13 Jun 2015 22:16:39 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t5DJGdCr005200; Sat, 13 Jun 2015 22:16:39 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 13 Jun 2015 22:16:39 +0300 From: Gleb Smirnoff To: David Chisnall Cc: Ian Lepore , Steve Kargl , Alexander Kabaev , Marcel Moolenaar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r284198 - head/bin/ls Message-ID: <20150613191639.GO73119@FreeBSD.org> References: <201506100127.t5A1RdX6051959@svn.freebsd.org> <20150612204309.11dd3391@kan> <20150613024916.GA98218@troutmask.apl.washington.edu> <1434208622.1415.57.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 19:16:48 -0000 On Sat, Jun 13, 2015 at 11:38:11AM -0400, David Chisnall wrote: D> > If you would have told me a year ago that you had a simple scheme that D> > could make 30 years of experience maintaining code for unix-like systems D> > completely worthless I would have been skeptical, but it seems we're D> > well on our way. D> D> There is a lot of heckling and unhelpful hyperbole in this thread. Reading the xo_emit format strings takes a little bit of getting used to, but the same is true of printf - it’s just that we’re already used to printf. The structured parts (xo_open_container, xo_close_container and friends) are clear and descriptive. The changes are fairly invasive, but the benefits are also very large for anyone who is wanting to automate administration of FreeBSD systems. D> D> If you have suggestions for how the libxo APIs could be improved, then please let us know - Phil is very reception to suggestions but objections along the lines of ‘it’s not what I’m used to and changes sometimes break things so we should never have changes’ are not helpful. I would agree with David. After xo_emit format is learned, reading sources of converted programs isn't a big deal. All the problems with converted utilities are due to very bad quality of initial conversion commits. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 19:21:08 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E566D1A9; Sat, 13 Jun 2015 19:21:08 +0000 (UTC) (envelope-from sjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBE6CEF6; Sat, 13 Jun 2015 19:21:08 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DJL8sS033569; Sat, 13 Jun 2015 19:21:08 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DJKwMH033508; Sat, 13 Jun 2015 19:20:58 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201506131920.t5DJKwMH033508@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sat, 13 Jun 2015 19:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname bi... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 19:21:09 -0000 Author: sjg Date: Sat Jun 13 19:20:56 2015 New Revision: 284345 URL: https://svnweb.freebsd.org/changeset/base/284345 Log: Add META_MODE support. Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Added: head/bin/cat/Makefile.depend (contents, props changed) head/bin/chflags/Makefile.depend (contents, props changed) head/bin/chio/Makefile.depend (contents, props changed) head/bin/chmod/Makefile.depend (contents, props changed) head/bin/cp/Makefile.depend (contents, props changed) head/bin/csh/Makefile.depend (contents, props changed) head/bin/date/Makefile.depend (contents, props changed) head/bin/dd/Makefile.depend (contents, props changed) head/bin/df/Makefile.depend (contents, props changed) head/bin/domainname/Makefile.depend (contents, props changed) head/bin/echo/Makefile.depend (contents, props changed) head/bin/ed/Makefile.depend (contents, props changed) head/bin/expr/Makefile.depend (contents, props changed) head/bin/freebsd-version/Makefile.depend (contents, props changed) head/bin/getfacl/Makefile.depend (contents, props changed) head/bin/hostname/Makefile.depend (contents, props changed) head/bin/kenv/Makefile.depend (contents, props changed) head/bin/kill/Makefile.depend (contents, props changed) head/bin/ln/Makefile.depend (contents, props changed) head/bin/ls/Makefile.depend (contents, props changed) head/bin/mkdir/Makefile.depend (contents, props changed) head/bin/mv/Makefile.depend (contents, props changed) head/bin/pax/Makefile.depend (contents, props changed) head/bin/pkill/Makefile.depend (contents, props changed) head/bin/ps/Makefile.depend (contents, props changed) head/bin/pwait/Makefile.depend (contents, props changed) head/bin/pwd/Makefile.depend (contents, props changed) head/bin/rcp/Makefile.depend (contents, props changed) head/bin/realpath/Makefile.depend (contents, props changed) head/bin/rm/Makefile.depend (contents, props changed) head/bin/rmail/Makefile.depend (contents, props changed) head/bin/rmdir/Makefile.depend (contents, props changed) head/bin/setfacl/Makefile.depend (contents, props changed) head/bin/sh/Makefile.depend (contents, props changed) head/bin/sleep/Makefile.depend (contents, props changed) head/bin/stty/Makefile.depend (contents, props changed) head/bin/sync/Makefile.depend (contents, props changed) head/bin/test/Makefile.depend (contents, props changed) head/bin/uuidgen/Makefile.depend (contents, props changed) head/cddl/lib/drti/Makefile.depend (contents, props changed) head/cddl/lib/libavl/Makefile.depend (contents, props changed) head/cddl/lib/libctf/Makefile.depend (contents, props changed) head/cddl/lib/libdtrace/Makefile.depend (contents, props changed) head/cddl/lib/libnvpair/Makefile.depend (contents, props changed) head/cddl/lib/libumem/Makefile.depend (contents, props changed) head/cddl/lib/libuutil/Makefile.depend (contents, props changed) head/cddl/lib/libzfs/Makefile.depend (contents, props changed) head/cddl/lib/libzfs_core/Makefile.depend (contents, props changed) head/cddl/lib/libzpool/Makefile.depend (contents, props changed) head/cddl/sbin/zfs/Makefile.depend (contents, props changed) head/cddl/sbin/zpool/Makefile.depend (contents, props changed) head/cddl/usr.bin/ctfconvert/Makefile.depend (contents, props changed) head/cddl/usr.bin/ctfdump/Makefile.depend (contents, props changed) head/cddl/usr.bin/ctfmerge/Makefile.depend (contents, props changed) head/cddl/usr.bin/sgsmsg/Makefile.depend (contents, props changed) head/cddl/usr.bin/zinject/Makefile.depend (contents, props changed) head/cddl/usr.bin/zstreamdump/Makefile.depend (contents, props changed) head/cddl/usr.bin/ztest/Makefile.depend (contents, props changed) head/cddl/usr.sbin/dtrace/Makefile.depend (contents, props changed) head/cddl/usr.sbin/dtruss/Makefile.depend (contents, props changed) head/cddl/usr.sbin/lockstat/Makefile.depend (contents, props changed) head/cddl/usr.sbin/zdb/Makefile.depend (contents, props changed) head/cddl/usr.sbin/zhack/Makefile.depend (contents, props changed) head/etc/sendmail/Makefile.depend (contents, props changed) head/games/caesar/Makefile.depend (contents, props changed) head/games/factor/Makefile.depend (contents, props changed) head/games/fortune/datfiles/Makefile.depend (contents, props changed) head/games/fortune/fortune/Makefile.depend (contents, props changed) head/games/fortune/strfile/Makefile.depend (contents, props changed) head/games/fortune/unstr/Makefile.depend (contents, props changed) head/games/grdc/Makefile.depend (contents, props changed) head/games/morse/Makefile.depend (contents, props changed) head/games/number/Makefile.depend (contents, props changed) head/games/pom/Makefile.depend (contents, props changed) head/games/primes/Makefile.depend (contents, props changed) head/games/random/Makefile.depend (contents, props changed) head/gnu/lib/csu/Makefile.depend (contents, props changed) head/gnu/lib/libdialog/Makefile.depend (contents, props changed) head/gnu/lib/libgcc/Makefile.depend (contents, props changed) head/gnu/lib/libgcov/Makefile.depend (contents, props changed) head/gnu/lib/libgomp/Makefile.depend (contents, props changed) head/gnu/lib/libreadline/readline/Makefile.depend (contents, props changed) head/gnu/lib/libregex/Makefile.depend (contents, props changed) head/gnu/lib/libssp/Makefile.depend (contents, props changed) head/gnu/lib/libssp/libssp_nonshared/Makefile.depend (contents, props changed) head/gnu/lib/libstdc++/Makefile.depend (contents, props changed) head/gnu/lib/libsupc++/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/addr2line/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/ar/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/as/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/doc/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/ld/Makefile.depend.amd64 (contents, props changed) head/gnu/usr.bin/binutils/ld/Makefile.depend.host (contents, props changed) head/gnu/usr.bin/binutils/libbfd/Makefile.depend.amd64 (contents, props changed) head/gnu/usr.bin/binutils/libbfd/Makefile.depend.host (contents, props changed) head/gnu/usr.bin/binutils/libbinutils/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/libiberty/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/libopcodes/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/nm/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/objcopy/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/objdump/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/ranlib/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/readelf/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/size/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/strings/Makefile.depend (contents, props changed) head/gnu/usr.bin/binutils/strip/Makefile.depend (contents, props changed) head/gnu/usr.bin/cc/c++/Makefile.depend (contents, props changed) head/gnu/usr.bin/cc/c++filt/Makefile.depend (contents, props changed) head/gnu/usr.bin/cc/cc/Makefile.depend (contents, props changed) head/gnu/usr.bin/cc/cc1/Makefile.depend (contents, props changed) head/gnu/usr.bin/cc/cc1plus/Makefile.depend (contents, props changed) head/gnu/usr.bin/cc/cc_int/Makefile.depend (contents, props changed) head/gnu/usr.bin/cc/cc_tools/Makefile.depend (contents, props changed) head/gnu/usr.bin/cc/cpp/Makefile.depend (contents, props changed) head/gnu/usr.bin/cc/gcov/Makefile.depend (contents, props changed) head/gnu/usr.bin/cc/include/Makefile.depend (contents, props changed) head/gnu/usr.bin/cc/libcpp/Makefile.depend (contents, props changed) head/gnu/usr.bin/cc/libdecnumber/Makefile.depend (contents, props changed) head/gnu/usr.bin/cc/libiberty/Makefile.depend (contents, props changed) head/gnu/usr.bin/dialog/Makefile.depend (contents, props changed) head/gnu/usr.bin/diff/Makefile.depend (contents, props changed) head/gnu/usr.bin/diff3/Makefile.depend (contents, props changed) head/gnu/usr.bin/dtc/Makefile.depend (contents, props changed) head/gnu/usr.bin/gdb/gdb/Makefile.depend (contents, props changed) head/gnu/usr.bin/gdb/gdbserver/Makefile.depend (contents, props changed) head/gnu/usr.bin/gdb/gdbtui/Makefile.depend (contents, props changed) head/gnu/usr.bin/gdb/kgdb/Makefile.depend.amd64 (contents, props changed) head/gnu/usr.bin/gdb/libgdb/Makefile.depend.amd64 (contents, props changed) head/gnu/usr.bin/gperf/Makefile.depend (contents, props changed) head/gnu/usr.bin/grep/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/contrib/mm/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devX100-12/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devX100/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devX75-12/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devX75/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devascii/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devcp1047/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devdvi/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devhtml/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devkoi8-r/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devlatin1/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devlbp/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devlj4/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devps/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/font/devutf8/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/man/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/devices/grodvi/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/devices/grohtml/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/devices/grolbp/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/devices/grolj4/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/devices/grops/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/devices/grotty/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/libs/libbib/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/libs/libdriver/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/libs/libgroff/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/preproc/eqn/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/preproc/grn/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/preproc/html/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/preproc/pic/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/preproc/refer/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/preproc/tbl/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/roff/groff/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/roff/grog/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/roff/nroff/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/roff/psroff/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/roff/troff/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/utils/addftinfo/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/utils/afmtodit/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/utils/hpftodit/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/utils/indxbib/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/utils/lkbib/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/utils/lookbib/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/utils/pfbtops/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile.depend (contents, props changed) head/gnu/usr.bin/groff/tmac/Makefile.depend (contents, props changed) head/gnu/usr.bin/rcs/ci/Makefile.depend (contents, props changed) head/gnu/usr.bin/rcs/co/Makefile.depend (contents, props changed) head/gnu/usr.bin/rcs/ident/Makefile.depend (contents, props changed) head/gnu/usr.bin/rcs/lib/Makefile.depend (contents, props changed) head/gnu/usr.bin/rcs/merge/Makefile.depend (contents, props changed) head/gnu/usr.bin/rcs/rcs/Makefile.depend (contents, props changed) head/gnu/usr.bin/rcs/rcsclean/Makefile.depend (contents, props changed) head/gnu/usr.bin/rcs/rcsdiff/Makefile.depend (contents, props changed) head/gnu/usr.bin/rcs/rcsfreeze/Makefile.depend (contents, props changed) head/gnu/usr.bin/rcs/rcsmerge/Makefile.depend (contents, props changed) head/gnu/usr.bin/rcs/rlog/Makefile.depend (contents, props changed) head/gnu/usr.bin/sdiff/Makefile.depend (contents, props changed) head/include/Makefile.depend (contents, props changed) head/include/arpa/Makefile.depend (contents, props changed) head/include/gssapi/Makefile.depend (contents, props changed) head/include/protocols/Makefile.depend (contents, props changed) head/include/rpc/Makefile.depend (contents, props changed) head/include/rpcsvc/Makefile.depend (contents, props changed) head/include/xlocale/Makefile.depend (contents, props changed) head/kerberos5/lib/libasn1/Makefile.depend (contents, props changed) head/kerberos5/lib/libgssapi_krb5/Makefile.depend (contents, props changed) head/kerberos5/lib/libgssapi_ntlm/Makefile.depend (contents, props changed) head/kerberos5/lib/libgssapi_spnego/Makefile.depend (contents, props changed) head/kerberos5/lib/libhdb/Makefile.depend (contents, props changed) head/kerberos5/lib/libheimbase/Makefile.depend (contents, props changed) head/kerberos5/lib/libheimipcc/Makefile.depend (contents, props changed) head/kerberos5/lib/libheimipcs/Makefile.depend (contents, props changed) head/kerberos5/lib/libheimntlm/Makefile.depend (contents, props changed) head/kerberos5/lib/libhx509/Makefile.depend (contents, props changed) head/kerberos5/lib/libkadm5clnt/Makefile.depend (contents, props changed) head/kerberos5/lib/libkadm5srv/Makefile.depend (contents, props changed) head/kerberos5/lib/libkafs5/Makefile.depend (contents, props changed) head/kerberos5/lib/libkdc/Makefile.depend (contents, props changed) head/kerberos5/lib/libkrb5/Makefile.depend (contents, props changed) head/kerberos5/lib/libroken/Makefile.depend (contents, props changed) head/kerberos5/lib/libsl/Makefile.depend (contents, props changed) head/kerberos5/lib/libvers/Makefile.depend (contents, props changed) head/kerberos5/lib/libwind/Makefile.depend (contents, props changed) head/kerberos5/libexec/digest-service/Makefile.depend (contents, props changed) head/kerberos5/libexec/hprop/Makefile.depend (contents, props changed) head/kerberos5/libexec/hpropd/Makefile.depend (contents, props changed) head/kerberos5/libexec/ipropd-master/Makefile.depend (contents, props changed) head/kerberos5/libexec/ipropd-slave/Makefile.depend (contents, props changed) head/kerberos5/libexec/kadmind/Makefile.depend (contents, props changed) head/kerberos5/libexec/kcm/Makefile.depend (contents, props changed) head/kerberos5/libexec/kdc/Makefile.depend (contents, props changed) head/kerberos5/libexec/kdigest/Makefile.depend (contents, props changed) head/kerberos5/libexec/kfd/Makefile.depend (contents, props changed) head/kerberos5/libexec/kimpersonate/Makefile.depend (contents, props changed) head/kerberos5/libexec/kpasswdd/Makefile.depend (contents, props changed) head/kerberos5/tools/asn1_compile/Makefile.depend (contents, props changed) head/kerberos5/tools/make-roken/Makefile.depend (contents, props changed) head/kerberos5/tools/slc/Makefile.depend (contents, props changed) head/kerberos5/usr.bin/hxtool/Makefile.depend (contents, props changed) head/kerberos5/usr.bin/kadmin/Makefile.depend (contents, props changed) head/kerberos5/usr.bin/kcc/Makefile.depend (contents, props changed) head/kerberos5/usr.bin/kdestroy/Makefile.depend (contents, props changed) head/kerberos5/usr.bin/kf/Makefile.depend (contents, props changed) head/kerberos5/usr.bin/kgetcred/Makefile.depend (contents, props changed) head/kerberos5/usr.bin/kinit/Makefile.depend (contents, props changed) head/kerberos5/usr.bin/kpasswd/Makefile.depend (contents, props changed) head/kerberos5/usr.bin/krb5-config/Makefile.depend (contents, props changed) head/kerberos5/usr.bin/ksu/Makefile.depend (contents, props changed) head/kerberos5/usr.bin/string2key/Makefile.depend (contents, props changed) head/kerberos5/usr.bin/verify_krb5_conf/Makefile.depend (contents, props changed) head/kerberos5/usr.sbin/iprop-log/Makefile.depend (contents, props changed) head/kerberos5/usr.sbin/kstash/Makefile.depend (contents, props changed) head/kerberos5/usr.sbin/ktutil/Makefile.depend (contents, props changed) head/lib/atf/libatf-c++/Makefile.depend (contents, props changed) head/lib/atf/libatf-c/Makefile.depend (contents, props changed) head/lib/clang/include/Makefile.depend (contents, props changed) head/lib/clang/libclanganalysis/Makefile.depend (contents, props changed) head/lib/clang/libclangarcmigrate/Makefile.depend (contents, props changed) head/lib/clang/libclangast/Makefile.depend (contents, props changed) head/lib/clang/libclangbasic/Makefile.depend (contents, props changed) head/lib/clang/libclangcodegen/Makefile.depend (contents, props changed) head/lib/clang/libclangdriver/Makefile.depend (contents, props changed) head/lib/clang/libclangedit/Makefile.depend (contents, props changed) head/lib/clang/libclangfrontend/Makefile.depend (contents, props changed) head/lib/clang/libclangfrontendtool/Makefile.depend (contents, props changed) head/lib/clang/libclanglex/Makefile.depend (contents, props changed) head/lib/clang/libclangparse/Makefile.depend (contents, props changed) head/lib/clang/libclangrewrite/Makefile.depend (contents, props changed) head/lib/clang/libclangrewritefrontend/Makefile.depend (contents, props changed) head/lib/clang/libclangsema/Makefile.depend (contents, props changed) head/lib/clang/libclangserialization/Makefile.depend (contents, props changed) head/lib/clang/libclangstaticanalyzercheckers/Makefile.depend (contents, props changed) head/lib/clang/libclangstaticanalyzercore/Makefile.depend (contents, props changed) head/lib/clang/libclangstaticanalyzerfrontend/Makefile.depend (contents, props changed) head/lib/clang/libllvmaarch64asmparser/Makefile.depend (contents, props changed) head/lib/clang/libllvmaarch64codegen/Makefile.depend (contents, props changed) head/lib/clang/libllvmaarch64desc/Makefile.depend (contents, props changed) head/lib/clang/libllvmaarch64disassembler/Makefile.depend (contents, props changed) head/lib/clang/libllvmaarch64info/Makefile.depend (contents, props changed) head/lib/clang/libllvmaarch64instprinter/Makefile.depend (contents, props changed) head/lib/clang/libllvmaarch64utils/Makefile.depend (contents, props changed) head/lib/clang/libllvmanalysis/Makefile.depend (contents, props changed) head/lib/clang/libllvmarmasmparser/Makefile.depend (contents, props changed) head/lib/clang/libllvmarmcodegen/Makefile.depend (contents, props changed) head/lib/clang/libllvmarmdesc/Makefile.depend (contents, props changed) head/lib/clang/libllvmarmdisassembler/Makefile.depend (contents, props changed) head/lib/clang/libllvmarminfo/Makefile.depend (contents, props changed) head/lib/clang/libllvmarminstprinter/Makefile.depend (contents, props changed) head/lib/clang/libllvmasmparser/Makefile.depend (contents, props changed) head/lib/clang/libllvmasmprinter/Makefile.depend (contents, props changed) head/lib/clang/libllvmbitreader/Makefile.depend (contents, props changed) head/lib/clang/libllvmbitwriter/Makefile.depend (contents, props changed) head/lib/clang/libllvmcodegen/Makefile.depend (contents, props changed) head/lib/clang/libllvmcore/Makefile.depend (contents, props changed) head/lib/clang/libllvmdebuginfo/Makefile.depend (contents, props changed) head/lib/clang/libllvmexecutionengine/Makefile.depend (contents, props changed) head/lib/clang/libllvminstcombine/Makefile.depend (contents, props changed) head/lib/clang/libllvminstrumentation/Makefile.depend (contents, props changed) head/lib/clang/libllvminterpreter/Makefile.depend (contents, props changed) head/lib/clang/libllvmipa/Makefile.depend (contents, props changed) head/lib/clang/libllvmipo/Makefile.depend (contents, props changed) head/lib/clang/libllvmirreader/Makefile.depend (contents, props changed) head/lib/clang/libllvmlinker/Makefile.depend (contents, props changed) head/lib/clang/libllvmmc/Makefile.depend (contents, props changed) head/lib/clang/libllvmmcdisassembler/Makefile.depend (contents, props changed) head/lib/clang/libllvmmcjit/Makefile.depend (contents, props changed) head/lib/clang/libllvmmcparser/Makefile.depend (contents, props changed) head/lib/clang/libllvmmipsasmparser/Makefile.depend (contents, props changed) head/lib/clang/libllvmmipscodegen/Makefile.depend (contents, props changed) head/lib/clang/libllvmmipsdesc/Makefile.depend (contents, props changed) head/lib/clang/libllvmmipsdisassembler/Makefile.depend (contents, props changed) head/lib/clang/libllvmmipsinfo/Makefile.depend (contents, props changed) head/lib/clang/libllvmmipsinstprinter/Makefile.depend (contents, props changed) head/lib/clang/libllvmobjcarcopts/Makefile.depend (contents, props changed) head/lib/clang/libllvmobject/Makefile.depend (contents, props changed) head/lib/clang/libllvmoption/Makefile.depend (contents, props changed) head/lib/clang/libllvmpowerpcasmparser/Makefile.depend (contents, props changed) head/lib/clang/libllvmpowerpccodegen/Makefile.depend (contents, props changed) head/lib/clang/libllvmpowerpcdesc/Makefile.depend (contents, props changed) head/lib/clang/libllvmpowerpcdisassembler/Makefile.depend (contents, props changed) head/lib/clang/libllvmpowerpcinfo/Makefile.depend (contents, props changed) head/lib/clang/libllvmpowerpcinstprinter/Makefile.depend (contents, props changed) head/lib/clang/libllvmprofiledata/Makefile.depend (contents, props changed) head/lib/clang/libllvmruntimedyld/Makefile.depend (contents, props changed) head/lib/clang/libllvmscalaropts/Makefile.depend (contents, props changed) head/lib/clang/libllvmselectiondag/Makefile.depend (contents, props changed) head/lib/clang/libllvmsparcasmparser/Makefile.depend (contents, props changed) head/lib/clang/libllvmsparccodegen/Makefile.depend (contents, props changed) head/lib/clang/libllvmsparcdesc/Makefile.depend (contents, props changed) head/lib/clang/libllvmsparcdisassembler/Makefile.depend (contents, props changed) head/lib/clang/libllvmsparcinfo/Makefile.depend (contents, props changed) head/lib/clang/libllvmsparcinstprinter/Makefile.depend (contents, props changed) head/lib/clang/libllvmsupport/Makefile.depend (contents, props changed) head/lib/clang/libllvmtablegen/Makefile.depend (contents, props changed) head/lib/clang/libllvmtarget/Makefile.depend (contents, props changed) head/lib/clang/libllvmtransformutils/Makefile.depend (contents, props changed) head/lib/clang/libllvmvectorize/Makefile.depend (contents, props changed) head/lib/clang/libllvmx86asmparser/Makefile.depend (contents, props changed) head/lib/clang/libllvmx86codegen/Makefile.depend (contents, props changed) head/lib/clang/libllvmx86desc/Makefile.depend (contents, props changed) head/lib/clang/libllvmx86disassembler/Makefile.depend (contents, props changed) head/lib/clang/libllvmx86info/Makefile.depend (contents, props changed) head/lib/clang/libllvmx86instprinter/Makefile.depend (contents, props changed) head/lib/clang/libllvmx86utils/Makefile.depend (contents, props changed) head/lib/csu/amd64/Makefile.depend (contents, props changed) head/lib/csu/arm/Makefile.depend (contents, props changed) head/lib/csu/i386/Makefile.depend (contents, props changed) head/lib/csu/mips/Makefile.depend (contents, props changed) head/lib/csu/powerpc/Makefile.depend (contents, props changed) head/lib/csu/powerpc64/Makefile.depend (contents, props changed) head/lib/csu/sparc64/Makefile.depend (contents, props changed) head/lib/libalias/libalias/Makefile.depend (contents, props changed) head/lib/libalias/modules/cuseeme/Makefile.depend (contents, props changed) head/lib/libalias/modules/dummy/Makefile.depend (contents, props changed) head/lib/libalias/modules/ftp/Makefile.depend (contents, props changed) head/lib/libalias/modules/irc/Makefile.depend (contents, props changed) head/lib/libalias/modules/nbt/Makefile.depend (contents, props changed) head/lib/libalias/modules/pptp/Makefile.depend (contents, props changed) head/lib/libalias/modules/skinny/Makefile.depend (contents, props changed) head/lib/libalias/modules/smedia/Makefile.depend (contents, props changed) head/lib/libarchive/Makefile.depend (contents, props changed) head/lib/libauditd/Makefile.depend (contents, props changed) head/lib/libbegemot/Makefile.depend (contents, props changed) head/lib/libblocksruntime/Makefile.depend (contents, props changed) head/lib/libbluetooth/Makefile.depend (contents, props changed) head/lib/libbsm/Makefile.depend (contents, props changed) head/lib/libbsnmp/libbsnmp/Makefile.depend (contents, props changed) head/lib/libbz2/Makefile.depend (contents, props changed) head/lib/libc++/Makefile.depend (contents, props changed) head/lib/libc/Makefile.depend (contents, props changed) head/lib/libc_nonshared/Makefile.depend (contents, props changed) head/lib/libcalendar/Makefile.depend (contents, props changed) head/lib/libcam/Makefile.depend (contents, props changed) head/lib/libcapsicum/Makefile.depend (contents, props changed) head/lib/libcom_err/Makefile.depend (contents, props changed) head/lib/libcompat/Makefile.depend (contents, props changed) head/lib/libcompiler_rt/Makefile.depend (contents, props changed) head/lib/libcrypt/Makefile.depend (contents, props changed) head/lib/libcrypt/tests/Makefile.depend (contents, props changed) head/lib/libcuse/Makefile.depend (contents, props changed) head/lib/libcxxrt/Makefile.depend (contents, props changed) head/lib/libcxxrt/Makefile.depend.host (contents, props changed) head/lib/libdevinfo/Makefile.depend (contents, props changed) head/lib/libdevstat/Makefile.depend (contents, props changed) head/lib/libdpv/Makefile.depend (contents, props changed) head/lib/libdwarf/Makefile.depend (contents, props changed) head/lib/libedit/Makefile.depend (contents, props changed) head/lib/libedit/edit/readline/Makefile.depend (contents, props changed) head/lib/libelf/Makefile.depend (contents, props changed) head/lib/libevent/Makefile.depend (contents, props changed) head/lib/libexecinfo/Makefile.depend (contents, props changed) head/lib/libexpat/Makefile.depend (contents, props changed) head/lib/libfetch/Makefile.depend (contents, props changed) head/lib/libfigpar/Makefile.depend (contents, props changed) head/lib/libgeom/Makefile.depend (contents, props changed) head/lib/libgpib/Makefile.depend (contents, props changed) head/lib/libgpio/Makefile.depend (contents, props changed) head/lib/libgssapi/Makefile.depend (contents, props changed) head/lib/libiconv_modules/BIG5/Makefile.depend (contents, props changed) head/lib/libiconv_modules/DECHanyu/Makefile.depend (contents, props changed) head/lib/libiconv_modules/EUC/Makefile.depend (contents, props changed) head/lib/libiconv_modules/EUCTW/Makefile.depend (contents, props changed) head/lib/libiconv_modules/GBK2K/Makefile.depend (contents, props changed) head/lib/libiconv_modules/HZ/Makefile.depend (contents, props changed) head/lib/libiconv_modules/ISO2022/Makefile.depend (contents, props changed) head/lib/libiconv_modules/JOHAB/Makefile.depend (contents, props changed) head/lib/libiconv_modules/MSKanji/Makefile.depend (contents, props changed) head/lib/libiconv_modules/UES/Makefile.depend (contents, props changed) head/lib/libiconv_modules/UTF1632/Makefile.depend (contents, props changed) head/lib/libiconv_modules/UTF7/Makefile.depend (contents, props changed) head/lib/libiconv_modules/UTF8/Makefile.depend (contents, props changed) head/lib/libiconv_modules/VIQR/Makefile.depend (contents, props changed) head/lib/libiconv_modules/ZW/Makefile.depend (contents, props changed) head/lib/libiconv_modules/iconv_none/Makefile.depend (contents, props changed) head/lib/libiconv_modules/iconv_std/Makefile.depend (contents, props changed) head/lib/libiconv_modules/mapper_646/Makefile.depend (contents, props changed) head/lib/libiconv_modules/mapper_none/Makefile.depend (contents, props changed) head/lib/libiconv_modules/mapper_parallel/Makefile.depend (contents, props changed) head/lib/libiconv_modules/mapper_serial/Makefile.depend (contents, props changed) head/lib/libiconv_modules/mapper_std/Makefile.depend (contents, props changed) head/lib/libiconv_modules/mapper_zone/Makefile.depend (contents, props changed) head/lib/libipsec/Makefile.depend (contents, props changed) head/lib/libjail/Makefile.depend (contents, props changed) head/lib/libkiconv/Makefile.depend (contents, props changed) head/lib/libkvm/Makefile.depend (contents, props changed) head/lib/libldns/Makefile.depend (contents, props changed) head/lib/liblzma/Makefile.depend (contents, props changed) head/lib/libmagic/Makefile.depend (contents, props changed) head/lib/libmd/Makefile.depend (contents, props changed) head/lib/libmd/Makefile.depend.host (contents, props changed) head/lib/libmemstat/Makefile.depend (contents, props changed) head/lib/libmilter/Makefile.depend (contents, props changed) head/lib/libmp/Makefile.depend (contents, props changed) head/lib/libmt/Makefile.depend (contents, props changed) head/lib/libnetbsd/Makefile.depend (contents, props changed) head/lib/libnetgraph/Makefile.depend (contents, props changed) head/lib/libngatm/Makefile.depend (contents, props changed) head/lib/libnv/Makefile.depend (contents, props changed) head/lib/libohash/Makefile.depend (contents, props changed) head/lib/libopie/Makefile.depend (contents, props changed) head/lib/libpam/libpam/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_chroot/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_deny/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_echo/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_exec/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_ftpusers/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_group/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_guest/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_krb5/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_ksu/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_lastlog/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_login_access/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_nologin/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_opie/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_opieaccess/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_passwdqc/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_permit/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_radius/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_rhosts/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_rootok/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_securetty/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_self/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_ssh/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_tacplus/Makefile.depend (contents, props changed) head/lib/libpam/modules/pam_unix/Makefile.depend (contents, props changed) head/lib/libpam/static_modules/ head/lib/libpam/static_modules/Makefile - copied, changed from r284253, head/lib/libpam/libpam/Makefile head/lib/libpam/static_modules/Makefile.depend (contents, props changed) head/lib/libpcap/Makefile.depend (contents, props changed) head/lib/libpmc/Makefile.depend (contents, props changed) head/lib/libproc/Makefile.depend (contents, props changed) head/lib/libprocstat/Makefile.depend (contents, props changed) head/lib/libprocstat/zfs/Makefile.depend (contents, props changed) head/lib/libradius/Makefile.depend (contents, props changed) head/lib/librpcsec_gss/Makefile.depend (contents, props changed) head/lib/librpcsvc/Makefile.depend (contents, props changed) head/lib/librt/Makefile.depend (contents, props changed) head/lib/librtld_db/Makefile.depend (contents, props changed) head/lib/libsbuf/Makefile.depend (contents, props changed) head/lib/libsdp/Makefile.depend (contents, props changed) head/lib/libsm/Makefile.depend (contents, props changed) head/lib/libsmb/Makefile.depend (contents, props changed) head/lib/libsmdb/Makefile.depend (contents, props changed) head/lib/libsmutil/Makefile.depend (contents, props changed) head/lib/libsqlite3/Makefile.depend (contents, props changed) head/lib/libstand/Makefile.depend (contents, props changed) head/lib/libstdbuf/Makefile.depend (contents, props changed) head/lib/libstdthreads/Makefile.depend (contents, props changed) head/lib/libtacplus/Makefile.depend (contents, props changed) head/lib/libtelnet/Makefile.depend (contents, props changed) head/lib/libthr/Makefile.depend (contents, props changed) head/lib/libthread_db/Makefile.depend (contents, props changed) head/lib/libucl/Makefile.depend (contents, props changed) head/lib/libufs/Makefile.depend (contents, props changed) head/lib/libugidfw/Makefile.depend (contents, props changed) head/lib/libulog/Makefile.depend (contents, props changed) head/lib/libunbound/Makefile.depend (contents, props changed) head/lib/libusb/Makefile.depend (contents, props changed) head/lib/libusbhid/Makefile.depend (contents, props changed) head/lib/libutil/Makefile.depend (contents, props changed) head/lib/libvgl/Makefile.depend (contents, props changed) head/lib/libvmmapi/Makefile.depend (contents, props changed) head/lib/libwrap/Makefile.depend (contents, props changed) head/lib/libxo/Makefile.depend (contents, props changed) head/lib/liby/Makefile.depend (contents, props changed) head/lib/libypclnt/Makefile.depend (contents, props changed) head/lib/libz/Makefile.depend (contents, props changed) head/lib/msun/Makefile.depend (contents, props changed) head/lib/ncurses/form/Makefile.depend (contents, props changed) head/lib/ncurses/formw/Makefile.depend (contents, props changed) head/lib/ncurses/menu/Makefile.depend (contents, props changed) head/lib/ncurses/menuw/Makefile.depend (contents, props changed) head/lib/ncurses/ncurses/Makefile.depend (contents, props changed) head/lib/ncurses/ncursesw/Makefile.depend (contents, props changed) head/lib/ncurses/panel/Makefile.depend (contents, props changed) head/lib/ncurses/panelw/Makefile.depend (contents, props changed) head/libexec/atf/atf-check/Makefile.depend (contents, props changed) head/libexec/atf/atf-sh/Makefile.depend (contents, props changed) head/libexec/atrun/Makefile.depend (contents, props changed) head/libexec/bootpd/Makefile.depend (contents, props changed) head/libexec/bootpd/bootpgw/Makefile.depend (contents, props changed) head/libexec/bootpd/tools/bootpef/Makefile.depend (contents, props changed) head/libexec/bootpd/tools/bootptest/Makefile.depend (contents, props changed) head/libexec/comsat/Makefile.depend (contents, props changed) head/libexec/fingerd/Makefile.depend (contents, props changed) head/libexec/ftpd/Makefile.depend (contents, props changed) head/libexec/getty/Makefile.depend (contents, props changed) head/libexec/mail.local/Makefile.depend (contents, props changed) head/libexec/mknetid/Makefile.depend (contents, props changed) head/libexec/pppoed/Makefile.depend (contents, props changed) head/libexec/rbootd/Makefile.depend (contents, props changed) head/libexec/revnetgroup/Makefile.depend (contents, props changed) head/libexec/rlogind/Makefile.depend (contents, props changed) head/libexec/rpc.rquotad/Makefile.depend (contents, props changed) head/libexec/rpc.rstatd/Makefile.depend (contents, props changed) head/libexec/rpc.rusersd/Makefile.depend (contents, props changed) head/libexec/rpc.rwalld/Makefile.depend (contents, props changed) head/libexec/rpc.sprayd/Makefile.depend (contents, props changed) head/libexec/rshd/Makefile.depend (contents, props changed) head/libexec/rtld-elf/Makefile.depend (contents, props changed) head/libexec/save-entropy/Makefile.depend (contents, props changed) head/libexec/smrsh/Makefile.depend (contents, props changed) head/libexec/talkd/Makefile.depend (contents, props changed) head/libexec/tcpd/Makefile.depend (contents, props changed) head/libexec/telnetd/Makefile.depend (contents, props changed) head/libexec/tftp-proxy/Makefile.depend (contents, props changed) head/libexec/tftpd/Makefile.depend (contents, props changed) head/libexec/ulog-helper/Makefile.depend (contents, props changed) head/libexec/ypxfr/Makefile.depend (contents, props changed) head/rescue/librescue/Makefile.depend (contents, props changed) head/sbin/adjkerntz/Makefile.depend (contents, props changed) head/sbin/atm/atmconfig/Makefile.depend (contents, props changed) head/sbin/badsect/Makefile.depend (contents, props changed) head/sbin/bsdlabel/Makefile.depend (contents, props changed) head/sbin/camcontrol/Makefile.depend (contents, props changed) head/sbin/ccdconfig/Makefile.depend (contents, props changed) head/sbin/clri/Makefile.depend (contents, props changed) head/sbin/comcontrol/Makefile.depend (contents, props changed) head/sbin/conscontrol/Makefile.depend (contents, props changed) head/sbin/ddb/Makefile.depend (contents, props changed) head/sbin/devd/Makefile.depend (contents, props changed) head/sbin/devfs/Makefile.depend (contents, props changed) head/sbin/dhclient/Makefile.depend (contents, props changed) head/sbin/dmesg/Makefile.depend (contents, props changed) head/sbin/dump/Makefile.depend (contents, props changed) head/sbin/dumpfs/Makefile.depend (contents, props changed) head/sbin/dumpon/Makefile.depend (contents, props changed) head/sbin/etherswitchcfg/Makefile.depend (contents, props changed) head/sbin/fdisk/Makefile.depend (contents, props changed) head/sbin/fdisk_pc98/Makefile.depend (contents, props changed) head/sbin/ffsinfo/Makefile.depend (contents, props changed) head/sbin/fsck/Makefile.depend (contents, props changed) head/sbin/fsck_ffs/Makefile.depend (contents, props changed) head/sbin/fsck_msdosfs/Makefile.depend (contents, props changed) head/sbin/fsdb/Makefile.depend (contents, props changed) head/sbin/fsirand/Makefile.depend (contents, props changed) head/sbin/gbde/Makefile.depend (contents, props changed) head/sbin/geom/class/cache/Makefile.depend (contents, props changed) head/sbin/geom/class/concat/Makefile.depend (contents, props changed) head/sbin/geom/class/eli/Makefile.depend (contents, props changed) head/sbin/geom/class/journal/Makefile.depend (contents, props changed) head/sbin/geom/class/label/Makefile.depend (contents, props changed) head/sbin/geom/class/mirror/Makefile.depend (contents, props changed) head/sbin/geom/class/mountver/Makefile.depend (contents, props changed) head/sbin/geom/class/multipath/Makefile.depend (contents, props changed) head/sbin/geom/class/nop/Makefile.depend (contents, props changed) head/sbin/geom/class/part/Makefile.depend (contents, props changed) head/sbin/geom/class/raid/Makefile.depend (contents, props changed) head/sbin/geom/class/raid3/Makefile.depend (contents, props changed) head/sbin/geom/class/sched/Makefile.depend (contents, props changed) head/sbin/geom/class/shsec/Makefile.depend (contents, props changed) head/sbin/geom/class/stripe/Makefile.depend (contents, props changed) head/sbin/geom/class/virstor/Makefile.depend (contents, props changed) head/sbin/geom/core/Makefile.depend (contents, props changed) head/sbin/ggate/ggatec/Makefile.depend (contents, props changed) head/sbin/ggate/ggated/Makefile.depend (contents, props changed) head/sbin/ggate/ggatel/Makefile.depend (contents, props changed) head/sbin/growfs/Makefile.depend (contents, props changed) head/sbin/gvinum/Makefile.depend (contents, props changed) head/sbin/hastctl/Makefile.depend (contents, props changed) head/sbin/hastd/Makefile.depend (contents, props changed) head/sbin/ifconfig/Makefile.depend (contents, props changed) head/sbin/init/Makefile.depend (contents, props changed) head/sbin/ipf/ipf/Makefile.depend (contents, props changed) head/sbin/ipf/ipfs/Makefile.depend (contents, props changed) head/sbin/ipf/ipfstat/Makefile.depend (contents, props changed) head/sbin/ipf/ipftest/Makefile.depend (contents, props changed) head/sbin/ipf/ipmon/Makefile.depend (contents, props changed) head/sbin/ipf/ipnat/Makefile.depend (contents, props changed) head/sbin/ipf/ippool/Makefile.depend (contents, props changed) head/sbin/ipf/ipresend/Makefile.depend (contents, props changed) head/sbin/ipf/libipf/Makefile.depend (contents, props changed) head/sbin/ipfw/Makefile.depend (contents, props changed) head/sbin/iscontrol/Makefile.depend (contents, props changed) head/sbin/kldconfig/Makefile.depend (contents, props changed) head/sbin/kldload/Makefile.depend (contents, props changed) head/sbin/kldstat/Makefile.depend (contents, props changed) head/sbin/kldunload/Makefile.depend (contents, props changed) head/sbin/ldconfig/Makefile.depend (contents, props changed) head/sbin/md5/Makefile.depend (contents, props changed) head/sbin/mdconfig/Makefile.depend (contents, props changed) head/sbin/mdmfs/Makefile.depend (contents, props changed) head/sbin/mknod/Makefile.depend (contents, props changed) head/sbin/mksnap_ffs/Makefile.depend (contents, props changed) head/sbin/mount/Makefile.depend (contents, props changed) head/sbin/mount_cd9660/Makefile.depend (contents, props changed) head/sbin/mount_fusefs/Makefile.depend (contents, props changed) head/sbin/mount_msdosfs/Makefile.depend (contents, props changed) head/sbin/mount_nfs/Makefile.depend (contents, props changed) head/sbin/mount_nullfs/Makefile.depend (contents, props changed) head/sbin/mount_udf/Makefile.depend (contents, props changed) head/sbin/mount_unionfs/Makefile.depend (contents, props changed) head/sbin/natd/Makefile.depend (contents, props changed) head/sbin/newfs/Makefile.depend (contents, props changed) head/sbin/newfs_msdos/Makefile.depend (contents, props changed) head/sbin/nfsiod/Makefile.depend (contents, props changed) head/sbin/nos-tun/Makefile.depend (contents, props changed) head/sbin/nvmecontrol/Makefile.depend (contents, props changed) head/sbin/pfctl/Makefile.depend (contents, props changed) head/sbin/pflogd/Makefile.depend (contents, props changed) head/sbin/ping/Makefile.depend (contents, props changed) head/sbin/ping6/Makefile.depend (contents, props changed) head/sbin/quotacheck/Makefile.depend (contents, props changed) head/sbin/rcorder/Makefile.depend (contents, props changed) head/sbin/reboot/Makefile.depend (contents, props changed) head/sbin/recoverdisk/Makefile.depend (contents, props changed) head/sbin/resolvconf/Makefile.depend (contents, props changed) head/sbin/restore/Makefile.depend (contents, props changed) head/sbin/route/Makefile.depend (contents, props changed) head/sbin/routed/Makefile.depend (contents, props changed) head/sbin/routed/rtquery/Makefile.depend (contents, props changed) head/sbin/rtsol/Makefile.depend (contents, props changed) head/sbin/savecore/Makefile.depend (contents, props changed) head/sbin/sconfig/Makefile.depend (contents, props changed) head/sbin/setkey/Makefile.depend (contents, props changed) head/sbin/shutdown/Makefile.depend (contents, props changed) head/sbin/spppcontrol/Makefile.depend (contents, props changed) head/sbin/sunlabel/Makefile.depend (contents, props changed) head/sbin/swapon/Makefile.depend (contents, props changed) head/sbin/sysctl/Makefile.depend (contents, props changed) head/sbin/tunefs/Makefile.depend (contents, props changed) head/sbin/umount/Makefile.depend (contents, props changed) head/secure/lib/libcrypto/Makefile.depend (contents, props changed) head/secure/lib/libcrypto/engines/lib4758cca/Makefile.depend (contents, props changed) head/secure/lib/libcrypto/engines/libaep/Makefile.depend (contents, props changed) head/secure/lib/libcrypto/engines/libatalla/Makefile.depend (contents, props changed) head/secure/lib/libcrypto/engines/libchil/Makefile.depend (contents, props changed) head/secure/lib/libcrypto/engines/libcswift/Makefile.depend (contents, props changed) head/secure/lib/libcrypto/engines/libgost/Makefile.depend (contents, props changed) head/secure/lib/libcrypto/engines/libnuron/Makefile.depend (contents, props changed) head/secure/lib/libcrypto/engines/libsureware/Makefile.depend (contents, props changed) head/secure/lib/libcrypto/engines/libubsec/Makefile.depend (contents, props changed) head/secure/lib/libssh/Makefile.depend (contents, props changed) head/secure/lib/libssl/Makefile.depend (contents, props changed) head/secure/libexec/sftp-server/Makefile.depend (contents, props changed) head/secure/libexec/ssh-keysign/Makefile.depend (contents, props changed) head/secure/libexec/ssh-pkcs11-helper/Makefile.depend (contents, props changed) head/secure/usr.bin/bdes/Makefile.depend (contents, props changed) head/secure/usr.bin/openssl/Makefile.depend (contents, props changed) head/secure/usr.bin/scp/Makefile.depend (contents, props changed) head/secure/usr.bin/sftp/Makefile.depend (contents, props changed) head/secure/usr.bin/ssh-add/Makefile.depend (contents, props changed) head/secure/usr.bin/ssh-agent/Makefile.depend (contents, props changed) head/secure/usr.bin/ssh-keygen/Makefile.depend (contents, props changed) head/secure/usr.bin/ssh-keyscan/Makefile.depend (contents, props changed) head/secure/usr.bin/ssh/Makefile.depend (contents, props changed) head/secure/usr.sbin/sshd/Makefile.depend (contents, props changed) head/share/colldef/Makefile.depend (contents, props changed) head/share/dict/Makefile.depend (contents, props changed) head/share/doc/IPv6/Makefile.depend (contents, props changed) head/share/doc/atf/Makefile.depend (contents, props changed) head/share/doc/legal/intel_ipw/Makefile.depend (contents, props changed) head/share/doc/legal/intel_iwi/Makefile.depend (contents, props changed) head/share/doc/legal/intel_iwn/Makefile.depend (contents, props changed) head/share/doc/legal/intel_wpi/Makefile.depend (contents, props changed) head/share/doc/legal/realtek/Makefile.depend (contents, props changed) head/share/doc/llvm/Makefile.depend (contents, props changed) head/share/doc/llvm/clang/Makefile.depend (contents, props changed) head/share/dtrace/toolkit/Makefile.depend (contents, props changed) head/share/examples/ipfilter/Makefile.depend (contents, props changed) head/share/examples/libvgl/Makefile.depend (contents, props changed) head/share/examples/pf/Makefile.depend (contents, props changed) head/share/i18n/csmapper/APPLE/Makefile.depend (contents, props changed) head/share/i18n/csmapper/AST/Makefile.depend (contents, props changed) head/share/i18n/csmapper/BIG5/Makefile.depend (contents, props changed) head/share/i18n/csmapper/CNS/Makefile.depend (contents, props changed) head/share/i18n/csmapper/CP/Makefile.depend (contents, props changed) head/share/i18n/csmapper/EBCDIC/Makefile.depend (contents, props changed) head/share/i18n/csmapper/GB/Makefile.depend (contents, props changed) head/share/i18n/csmapper/GEORGIAN/Makefile.depend (contents, props changed) head/share/i18n/csmapper/ISO-8859/Makefile.depend (contents, props changed) head/share/i18n/csmapper/ISO646/Makefile.depend (contents, props changed) head/share/i18n/csmapper/JIS/Makefile.depend (contents, props changed) head/share/i18n/csmapper/KAZAKH/Makefile.depend (contents, props changed) head/share/i18n/csmapper/KOI/Makefile.depend (contents, props changed) head/share/i18n/csmapper/KS/Makefile.depend (contents, props changed) head/share/i18n/csmapper/MISC/Makefile.depend (contents, props changed) head/share/i18n/csmapper/Makefile.depend (contents, props changed) head/share/i18n/csmapper/TCVN/Makefile.depend (contents, props changed) head/share/i18n/esdb/APPLE/Makefile.depend (contents, props changed) head/share/i18n/esdb/AST/Makefile.depend (contents, props changed) head/share/i18n/esdb/BIG5/Makefile.depend (contents, props changed) head/share/i18n/esdb/CP/Makefile.depend (contents, props changed) head/share/i18n/esdb/DEC/Makefile.depend (contents, props changed) head/share/i18n/esdb/EBCDIC/Makefile.depend (contents, props changed) head/share/i18n/esdb/EUC/Makefile.depend (contents, props changed) head/share/i18n/esdb/GB/Makefile.depend (contents, props changed) head/share/i18n/esdb/GEORGIAN/Makefile.depend (contents, props changed) head/share/i18n/esdb/ISO-2022/Makefile.depend (contents, props changed) head/share/i18n/esdb/ISO-8859/Makefile.depend (contents, props changed) head/share/i18n/esdb/ISO646/Makefile.depend (contents, props changed) head/share/i18n/esdb/KAZAKH/Makefile.depend (contents, props changed) head/share/i18n/esdb/KOI/Makefile.depend (contents, props changed) head/share/i18n/esdb/MISC/Makefile.depend (contents, props changed) head/share/i18n/esdb/Makefile.depend (contents, props changed) head/share/i18n/esdb/TCVN/Makefile.depend (contents, props changed) head/share/i18n/esdb/UTF/Makefile.depend (contents, props changed) head/share/man/man1/Makefile.depend (contents, props changed) head/share/man/man3/Makefile.depend (contents, props changed) head/share/man/man4/Makefile.depend (contents, props changed) head/share/man/man4/man4.arm/Makefile.depend (contents, props changed) head/share/man/man4/man4.i386/Makefile.depend (contents, props changed) head/share/man/man4/man4.powerpc/Makefile.depend (contents, props changed) head/share/man/man4/man4.sparc64/Makefile.depend (contents, props changed) head/share/man/man5/Makefile.depend (contents, props changed) head/share/man/man6/Makefile.depend (contents, props changed) head/share/man/man7/Makefile.depend (contents, props changed) head/share/man/man8/Makefile.depend (contents, props changed) head/share/man/man9/Makefile.depend (contents, props changed) head/share/me/Makefile.depend (contents, props changed) head/share/misc/Makefile.depend (contents, props changed) head/share/mk/auto.obj.mk (contents, props changed) head/share/mk/dirdeps.mk (contents, props changed) head/share/mk/gendirdeps.mk (contents, props changed) head/share/mk/host-target.mk (contents, props changed) head/share/mk/install-new.mk (contents, props changed) head/share/mk/local.autodep.mk (contents, props changed) head/share/mk/local.dirdeps.mk (contents, props changed) head/share/mk/local.gendirdeps.mk (contents, props changed) head/share/mk/local.init.mk (contents, props changed) head/share/mk/local.meta.sys.mk (contents, props changed) head/share/mk/local.sys.mk (contents, props changed) head/share/mk/meta.autodep.mk (contents, props changed) head/share/mk/meta.stage.mk (contents, props changed) head/share/mk/meta.subdir.mk (contents, props changed) head/share/mk/meta.sys.mk (contents, props changed) head/share/mk/meta2deps.py (contents, props changed) head/share/mk/meta2deps.sh (contents, props changed) head/share/mk/stage-install.sh (contents, props changed) head/share/mk/sys.dependfile.mk (contents, props changed) head/share/mklocale/Makefile.depend (contents, props changed) head/share/monetdef/Makefile.depend (contents, props changed) head/share/msgdef/Makefile.depend (contents, props changed) head/share/numericdef/Makefile.depend (contents, props changed) head/share/security/Makefile.depend (contents, props changed) head/share/sendmail/Makefile.depend (contents, props changed) head/share/skel/Makefile.depend (contents, props changed) head/share/snmp/mibs/Makefile.depend (contents, props changed) head/share/syscons/fonts/Makefile.depend (contents, props changed) head/share/syscons/keymaps/Makefile.depend (contents, props changed) head/share/syscons/scrnmaps/Makefile.depend (contents, props changed) head/share/tabset/Makefile.depend (contents, props changed) head/share/termcap/Makefile.depend (contents, props changed) head/share/timedef/Makefile.depend (contents, props changed) head/share/zoneinfo/Makefile.depend (contents, props changed) head/sys/boot/efi/libefi/Makefile.depend (contents, props changed) head/sys/boot/ficl/Makefile.depend (contents, props changed) head/sys/boot/i386/boot0/Makefile.depend (contents, props changed) head/sys/boot/i386/boot0sio/Makefile.depend (contents, props changed) head/sys/boot/i386/boot2/Makefile.depend (contents, props changed) head/sys/boot/i386/loader/Makefile.depend (contents, props changed) head/sys/boot/i386/zfsloader/Makefile.depend (contents, props changed) - copied from r284343, projects/bmake/targets/ head/tools/build/Makefile.depend (contents, props changed) head/tools/regression/include/stdatomic/Makefile.depend (contents, props changed) head/tools/tools/ath/ath_ee_9300_print/Makefile.depend (contents, props changed) head/tools/tools/drm/radeon/mkregtable/Makefile.depend (contents, props changed) head/tools/tools/makeroot/Makefile.depend (contents, props changed) head/tools/tools/usbtest/Makefile.depend (contents, props changed) head/usr.bin/alias/Makefile.depend (contents, props changed) head/usr.bin/apply/Makefile.depend (contents, props changed) head/usr.bin/ar/Makefile.depend (contents, props changed) head/usr.bin/asa/Makefile.depend (contents, props changed) head/usr.bin/at/Makefile.depend (contents, props changed) head/usr.bin/atm/sscop/Makefile.depend (contents, props changed) head/usr.bin/awk/Makefile.depend (contents, props changed) head/usr.bin/banner/Makefile.depend (contents, props changed) head/usr.bin/basename/Makefile.depend (contents, props changed) head/usr.bin/bc/Makefile.depend (contents, props changed) head/usr.bin/biff/Makefile.depend (contents, props changed) head/usr.bin/bluetooth/bthost/Makefile.depend (contents, props changed) head/usr.bin/bluetooth/btsockstat/Makefile.depend (contents, props changed) head/usr.bin/bluetooth/rfcomm_sppd/Makefile.depend (contents, props changed) head/usr.bin/bmake/Makefile.depend (contents, props changed) head/usr.bin/brandelf/Makefile.depend (contents, props changed) head/usr.bin/bsdiff/bsdiff/Makefile.depend (contents, props changed) head/usr.bin/bsdiff/bspatch/Makefile.depend (contents, props changed) head/usr.bin/bzip2/Makefile.depend (contents, props changed) head/usr.bin/bzip2recover/Makefile.depend (contents, props changed) head/usr.bin/c89/Makefile.depend (contents, props changed) head/usr.bin/c99/Makefile.depend (contents, props changed) head/usr.bin/calendar/Makefile.depend (contents, props changed) head/usr.bin/cap_mkdb/Makefile.depend (contents, props changed) head/usr.bin/catman/Makefile.depend (contents, props changed) head/usr.bin/chat/Makefile.depend (contents, props changed) head/usr.bin/checknr/Makefile.depend (contents, props changed) head/usr.bin/chkey/Makefile.depend (contents, props changed) head/usr.bin/chpass/Makefile.depend (contents, props changed) head/usr.bin/cksum/Makefile.depend (contents, props changed) head/usr.bin/clang/clang-tblgen/Makefile.depend (contents, props changed) head/usr.bin/clang/clang/Makefile.depend (contents, props changed) head/usr.bin/clang/tblgen/Makefile.depend (contents, props changed) head/usr.bin/cmp/Makefile.depend (contents, props changed) head/usr.bin/col/Makefile.depend (contents, props changed) head/usr.bin/colcrt/Makefile.depend (contents, props changed) head/usr.bin/colldef/Makefile.depend (contents, props changed) head/usr.bin/colrm/Makefile.depend (contents, props changed) head/usr.bin/column/Makefile.depend (contents, props changed) head/usr.bin/comm/Makefile.depend (contents, props changed) head/usr.bin/compile_et/Makefile.depend (contents, props changed) head/usr.bin/compress/Makefile.depend (contents, props changed) head/usr.bin/cpio/Makefile.depend (contents, props changed) head/usr.bin/cpuset/Makefile.depend (contents, props changed) head/usr.bin/csplit/Makefile.depend (contents, props changed) head/usr.bin/ctags/Makefile.depend (contents, props changed) head/usr.bin/ctlstat/Makefile.depend (contents, props changed) head/usr.bin/cut/Makefile.depend (contents, props changed) head/usr.bin/dc/Makefile.depend (contents, props changed) head/usr.bin/dirname/Makefile.depend (contents, props changed) head/usr.bin/du/Makefile.depend (contents, props changed) head/usr.bin/ee/Makefile.depend (contents, props changed) head/usr.bin/elf2aout/Makefile.depend (contents, props changed) head/usr.bin/elfdump/Makefile.depend (contents, props changed) head/usr.bin/enigma/Makefile.depend (contents, props changed) head/usr.bin/env/Makefile.depend (contents, props changed) head/usr.bin/expand/Makefile.depend (contents, props changed) head/usr.bin/false/Makefile.depend (contents, props changed) head/usr.bin/fetch/Makefile.depend (contents, props changed) head/usr.bin/file/Makefile.depend (contents, props changed) head/usr.bin/file2c/Makefile.depend (contents, props changed) head/usr.bin/find/Makefile.depend (contents, props changed) head/usr.bin/finger/Makefile.depend (contents, props changed) head/usr.bin/fmt/Makefile.depend (contents, props changed) head/usr.bin/fold/Makefile.depend (contents, props changed) head/usr.bin/from/Makefile.depend (contents, props changed) head/usr.bin/fstat/Makefile.depend (contents, props changed) head/usr.bin/fsync/Makefile.depend (contents, props changed) head/usr.bin/ftp/Makefile.depend (contents, props changed) head/usr.bin/gcore/Makefile.depend (contents, props changed) head/usr.bin/gencat/Makefile.depend (contents, props changed) head/usr.bin/getconf/Makefile.depend (contents, props changed) head/usr.bin/getent/Makefile.depend (contents, props changed) head/usr.bin/getopt/Makefile.depend (contents, props changed) head/usr.bin/gprof/Makefile.depend (contents, props changed) head/usr.bin/grep/Makefile.depend (contents, props changed) head/usr.bin/gzip/Makefile.depend (contents, props changed) head/usr.bin/head/Makefile.depend (contents, props changed) head/usr.bin/hexdump/Makefile.depend (contents, props changed) head/usr.bin/host/Makefile.depend (contents, props changed) head/usr.bin/id/Makefile.depend (contents, props changed) head/usr.bin/indent/Makefile.depend (contents, props changed) head/usr.bin/ipcrm/Makefile.depend (contents, props changed) head/usr.bin/ipcs/Makefile.depend (contents, props changed) head/usr.bin/join/Makefile.depend (contents, props changed) head/usr.bin/jot/Makefile.depend (contents, props changed) head/usr.bin/kdump/Makefile.depend (contents, props changed) head/usr.bin/keylogin/Makefile.depend (contents, props changed) head/usr.bin/keylogout/Makefile.depend (contents, props changed) head/usr.bin/killall/Makefile.depend (contents, props changed) head/usr.bin/ktrace/Makefile.depend (contents, props changed) head/usr.bin/ktrdump/Makefile.depend (contents, props changed) head/usr.bin/lam/Makefile.depend (contents, props changed) head/usr.bin/last/Makefile.depend (contents, props changed) head/usr.bin/lastcomm/Makefile.depend (contents, props changed) head/usr.bin/ldd/Makefile.depend (contents, props changed) head/usr.bin/leave/Makefile.depend (contents, props changed) head/usr.bin/less/Makefile.depend (contents, props changed) head/usr.bin/lessecho/Makefile.depend (contents, props changed) head/usr.bin/lesskey/Makefile.depend (contents, props changed) head/usr.bin/lex/Makefile.depend (contents, props changed) head/usr.bin/lex/lib/Makefile.depend (contents, props changed) head/usr.bin/limits/Makefile.depend (contents, props changed) head/usr.bin/locale/Makefile.depend (contents, props changed) head/usr.bin/locate/bigram/Makefile.depend (contents, props changed) head/usr.bin/locate/code/Makefile.depend (contents, props changed) head/usr.bin/locate/locate/Makefile.depend (contents, props changed) head/usr.bin/lock/Makefile.depend (contents, props changed) head/usr.bin/lockf/Makefile.depend (contents, props changed) head/usr.bin/logger/Makefile.depend (contents, props changed) head/usr.bin/login/Makefile.depend (contents, props changed) head/usr.bin/logins/Makefile.depend (contents, props changed) head/usr.bin/logname/Makefile.depend (contents, props changed) head/usr.bin/look/Makefile.depend (contents, props changed) head/usr.bin/lorder/Makefile.depend (contents, props changed) head/usr.bin/lsvfs/Makefile.depend (contents, props changed) head/usr.bin/lzmainfo/Makefile.depend (contents, props changed) head/usr.bin/m4/Makefile.depend (contents, props changed) head/usr.bin/mail/Makefile.depend (contents, props changed) head/usr.bin/make/Makefile.depend (contents, props changed) head/usr.bin/makewhatis/Makefile.depend (contents, props changed) head/usr.bin/man/Makefile.depend (contents, props changed) head/usr.bin/mandoc/Makefile.depend (contents, props changed) head/usr.bin/mesg/Makefile.depend (contents, props changed) head/usr.bin/minigzip/Makefile.depend (contents, props changed) head/usr.bin/ministat/Makefile.depend (contents, props changed) head/usr.bin/mkcsmapper_static/Makefile.depend (contents, props changed) head/usr.bin/mkdep/Makefile.depend (contents, props changed) head/usr.bin/mkfifo/Makefile.depend (contents, props changed) head/usr.bin/mklocale/Makefile.depend (contents, props changed) head/usr.bin/mkstr/Makefile.depend (contents, props changed) head/usr.bin/mktemp/Makefile.depend (contents, props changed) head/usr.bin/mkulzma/Makefile.depend (contents, props changed) head/usr.bin/mkuzip/Makefile.depend (contents, props changed) head/usr.bin/msgs/Makefile.depend (contents, props changed) head/usr.bin/mt/Makefile.depend (contents, props changed) head/usr.bin/nc/Makefile.depend (contents, props changed) head/usr.bin/ncal/Makefile.depend (contents, props changed) head/usr.bin/netstat/Makefile.depend (contents, props changed) head/usr.bin/newgrp/Makefile.depend (contents, props changed) head/usr.bin/newkey/Makefile.depend (contents, props changed) head/usr.bin/nfsstat/Makefile.depend (contents, props changed) head/usr.bin/nice/Makefile.depend (contents, props changed) head/usr.bin/nl/Makefile.depend (contents, props changed) head/usr.bin/nohup/Makefile.depend (contents, props changed) head/usr.bin/opieinfo/Makefile.depend (contents, props changed) head/usr.bin/opiekey/Makefile.depend (contents, props changed) head/usr.bin/opiepasswd/Makefile.depend (contents, props changed) head/usr.bin/pagesize/Makefile.depend (contents, props changed) head/usr.bin/pamtest/Makefile.depend (contents, props changed) head/usr.bin/passwd/Makefile.depend (contents, props changed) head/usr.bin/paste/Makefile.depend (contents, props changed) head/usr.bin/pathchk/Makefile.depend (contents, props changed) head/usr.bin/perror/Makefile.depend (contents, props changed) head/usr.bin/pr/Makefile.depend (contents, props changed) head/usr.bin/printenv/Makefile.depend (contents, props changed) head/usr.bin/printf/Makefile.depend (contents, props changed) head/usr.bin/procstat/Makefile.depend (contents, props changed) head/usr.bin/quota/Makefile.depend (contents, props changed) head/usr.bin/rctl/Makefile.depend (contents, props changed) head/usr.bin/renice/Makefile.depend (contents, props changed) head/usr.bin/rev/Makefile.depend (contents, props changed) head/usr.bin/revoke/Makefile.depend (contents, props changed) head/usr.bin/rlogin/Makefile.depend (contents, props changed) head/usr.bin/rpcgen/Makefile.depend (contents, props changed) head/usr.bin/rpcinfo/Makefile.depend (contents, props changed) head/usr.bin/rs/Makefile.depend (contents, props changed) head/usr.bin/rsh/Makefile.depend (contents, props changed) head/usr.bin/rup/Makefile.depend (contents, props changed) head/usr.bin/ruptime/Makefile.depend (contents, props changed) head/usr.bin/rusers/Makefile.depend (contents, props changed) head/usr.bin/rwall/Makefile.depend (contents, props changed) head/usr.bin/rwho/Makefile.depend (contents, props changed) head/usr.bin/script/Makefile.depend (contents, props changed) head/usr.bin/sed/Makefile.depend (contents, props changed) head/usr.bin/seq/Makefile.depend (contents, props changed) head/usr.bin/setchannel/Makefile.depend (contents, props changed) head/usr.bin/shar/Makefile.depend (contents, props changed) head/usr.bin/showmount/Makefile.depend (contents, props changed) head/usr.bin/smbutil/Makefile.depend (contents, props changed) head/usr.bin/sockstat/Makefile.depend (contents, props changed) head/usr.bin/sort/Makefile.depend (contents, props changed) head/usr.bin/split/Makefile.depend (contents, props changed) head/usr.bin/ssh-copy-id/Makefile.depend (contents, props changed) head/usr.bin/stat/Makefile.depend (contents, props changed) head/usr.bin/stdbuf/Makefile.depend (contents, props changed) head/usr.bin/su/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libapr/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libapr_util/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libserf/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libsvn_client/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libsvn_delta/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libsvn_diff/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libsvn_fs/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libsvn_fs_fs/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libsvn_fs_util/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libsvn_ra/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libsvn_ra_local/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libsvn_ra_serf/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libsvn_ra_svn/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libsvn_repos/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libsvn_subr/Makefile.depend (contents, props changed) head/usr.bin/svn/lib/libsvn_wc/Makefile.depend (contents, props changed) head/usr.bin/svn/svn/Makefile.depend (contents, props changed) head/usr.bin/svn/svnadmin/Makefile.depend (contents, props changed) head/usr.bin/svn/svndumpfilter/Makefile.depend (contents, props changed) head/usr.bin/svn/svnlook/Makefile.depend (contents, props changed) head/usr.bin/svn/svnmucc/Makefile.depend (contents, props changed) head/usr.bin/svn/svnrdump/Makefile.depend (contents, props changed) head/usr.bin/svn/svnserve/Makefile.depend (contents, props changed) head/usr.bin/svn/svnsync/Makefile.depend (contents, props changed) head/usr.bin/svn/svnversion/Makefile.depend (contents, props changed) head/usr.bin/systat/Makefile.depend (contents, props changed) head/usr.bin/tabs/Makefile.depend (contents, props changed) head/usr.bin/tail/Makefile.depend (contents, props changed) head/usr.bin/talk/Makefile.depend (contents, props changed) head/usr.bin/tar/Makefile.depend (contents, props changed) head/usr.bin/tcopy/Makefile.depend (contents, props changed) head/usr.bin/tee/Makefile.depend (contents, props changed) head/usr.bin/telnet/Makefile.depend (contents, props changed) head/usr.bin/tftp/Makefile.depend (contents, props changed) head/usr.bin/time/Makefile.depend (contents, props changed) head/usr.bin/timeout/Makefile.depend (contents, props changed) head/usr.bin/tip/tip/Makefile.depend (contents, props changed) head/usr.bin/top/Makefile.depend (contents, props changed) head/usr.bin/touch/Makefile.depend (contents, props changed) head/usr.bin/tput/Makefile.depend (contents, props changed) head/usr.bin/tr/Makefile.depend (contents, props changed) head/usr.bin/true/Makefile.depend (contents, props changed) head/usr.bin/truncate/Makefile.depend (contents, props changed) head/usr.bin/truss/Makefile.depend.amd64 (contents, props changed) head/usr.bin/tset/Makefile.depend (contents, props changed) head/usr.bin/tsort/Makefile.depend (contents, props changed) head/usr.bin/tty/Makefile.depend (contents, props changed) head/usr.bin/ul/Makefile.depend (contents, props changed) head/usr.bin/uname/Makefile.depend (contents, props changed) head/usr.bin/unexpand/Makefile.depend (contents, props changed) head/usr.bin/unifdef/Makefile.depend (contents, props changed) head/usr.bin/uniq/Makefile.depend (contents, props changed) head/usr.bin/units/Makefile.depend (contents, props changed) head/usr.bin/unvis/Makefile.depend (contents, props changed) head/usr.bin/unzip/Makefile.depend (contents, props changed) head/usr.bin/usbhidaction/Makefile.depend (contents, props changed) head/usr.bin/usbhidctl/Makefile.depend (contents, props changed) head/usr.bin/users/Makefile.depend (contents, props changed) head/usr.bin/uudecode/Makefile.depend (contents, props changed) head/usr.bin/uuencode/Makefile.depend (contents, props changed) head/usr.bin/vacation/Makefile.depend (contents, props changed) head/usr.bin/vgrind/Makefile.depend (contents, props changed) head/usr.bin/vgrind/RETEST/Makefile.depend (contents, props changed) head/usr.bin/vi/Makefile.depend (contents, props changed) head/usr.bin/vis/Makefile.depend (contents, props changed) head/usr.bin/vmstat/Makefile.depend (contents, props changed) head/usr.bin/vtfontcvt/Makefile.depend (contents, props changed) head/usr.bin/w/Makefile.depend (contents, props changed) head/usr.bin/wall/Makefile.depend (contents, props changed) head/usr.bin/wc/Makefile.depend (contents, props changed) head/usr.bin/what/Makefile.depend (contents, props changed) head/usr.bin/whereis/Makefile.depend (contents, props changed) head/usr.bin/which/Makefile.depend (contents, props changed) head/usr.bin/who/Makefile.depend (contents, props changed) head/usr.bin/whois/Makefile.depend (contents, props changed) head/usr.bin/write/Makefile.depend (contents, props changed) head/usr.bin/xargs/Makefile.depend (contents, props changed) head/usr.bin/xinstall/Makefile.depend (contents, props changed) head/usr.bin/xinstall/Makefile.depend.host (contents, props changed) head/usr.bin/xlint/lint1/Makefile.depend (contents, props changed) head/usr.bin/xlint/lint2/Makefile.depend (contents, props changed) head/usr.bin/xlint/llib/Makefile.depend (contents, props changed) head/usr.bin/xlint/xlint/Makefile.depend (contents, props changed) head/usr.bin/xstr/Makefile.depend (contents, props changed) head/usr.bin/xz/Makefile.depend (contents, props changed) head/usr.bin/xzdec/Makefile.depend (contents, props changed) head/usr.bin/yacc/Makefile.depend (contents, props changed) head/usr.bin/yes/Makefile.depend (contents, props changed) head/usr.bin/ypcat/Makefile.depend (contents, props changed) head/usr.bin/ypmatch/Makefile.depend (contents, props changed) head/usr.bin/ypwhich/Makefile.depend (contents, props changed) head/usr.sbin/ac/Makefile.depend (contents, props changed) head/usr.sbin/accton/Makefile.depend (contents, props changed) head/usr.sbin/acpi/acpiconf/Makefile.depend (contents, props changed) head/usr.sbin/acpi/acpidb/Makefile.depend (contents, props changed) head/usr.sbin/acpi/acpidump/Makefile.depend (contents, props changed) head/usr.sbin/acpi/iasl/Makefile.depend (contents, props changed) head/usr.sbin/adduser/Makefile.depend (contents, props changed) head/usr.sbin/amd/amd/Makefile.depend (contents, props changed) head/usr.sbin/amd/amq/Makefile.depend (contents, props changed) head/usr.sbin/amd/fixmount/Makefile.depend (contents, props changed) head/usr.sbin/amd/fsinfo/Makefile.depend (contents, props changed) head/usr.sbin/amd/hlfsd/Makefile.depend (contents, props changed) head/usr.sbin/amd/include/Makefile.depend (contents, props changed) head/usr.sbin/amd/libamu/Makefile.depend (contents, props changed) head/usr.sbin/amd/mk-amd-map/Makefile.depend (contents, props changed) head/usr.sbin/amd/pawd/Makefile.depend (contents, props changed) head/usr.sbin/amd/scripts/Makefile.depend (contents, props changed) head/usr.sbin/amd/wire-test/Makefile.depend (contents, props changed) head/usr.sbin/ancontrol/Makefile.depend (contents, props changed) head/usr.sbin/apm/Makefile.depend (contents, props changed) head/usr.sbin/apmd/Makefile.depend (contents, props changed) head/usr.sbin/arp/Makefile.depend (contents, props changed) head/usr.sbin/asf/Makefile.depend (contents, props changed) head/usr.sbin/audit/Makefile.depend (contents, props changed) head/usr.sbin/auditd/Makefile.depend (contents, props changed) head/usr.sbin/auditreduce/Makefile.depend (contents, props changed) head/usr.sbin/authpf/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/ath3kfw/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/bcmfw/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/bt3cfw/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/bthidcontrol/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/bthidd/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/btpand/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/hccontrol/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/hcsecd/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/hcseriald/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/l2control/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/l2ping/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/rfcomm_pppd/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/sdpcontrol/Makefile.depend (contents, props changed) head/usr.sbin/bluetooth/sdpd/Makefile.depend (contents, props changed) head/usr.sbin/boot0cfg/Makefile.depend (contents, props changed) head/usr.sbin/boot98cfg/Makefile.depend (contents, props changed) head/usr.sbin/bootparamd/bootparamd/Makefile.depend (contents, props changed) head/usr.sbin/bootparamd/callbootd/Makefile.depend (contents, props changed) head/usr.sbin/bsdconfig/packages/Makefile.depend (contents, props changed) head/usr.sbin/bsdconfig/packages/include/Makefile.depend (contents, props changed) head/usr.sbin/bsdconfig/share/packages/Makefile.depend (contents, props changed) head/usr.sbin/bsdinstall/Makefile.depend (contents, props changed) head/usr.sbin/bsdinstall/distextract/Makefile.depend (contents, props changed) head/usr.sbin/bsdinstall/distfetch/Makefile.depend (contents, props changed) head/usr.sbin/bsdinstall/partedit/Makefile.depend (contents, props changed) head/usr.sbin/bsdinstall/scripts/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/bsnmpd/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/gensnmptree/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/modules/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_atm/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_bridge/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_lm75/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_pf/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_target/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_usm/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_vacm/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/modules/snmp_wlan/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile.depend (contents, props changed) head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile.depend (contents, props changed) head/usr.sbin/btxld/Makefile.depend (contents, props changed) head/usr.sbin/cdcontrol/Makefile.depend (contents, props changed) head/usr.sbin/chkgrp/Makefile.depend (contents, props changed) head/usr.sbin/chown/Makefile.depend (contents, props changed) head/usr.sbin/chroot/Makefile.depend (contents, props changed) head/usr.sbin/ckdist/Makefile.depend (contents, props changed) head/usr.sbin/clear_locks/Makefile.depend (contents, props changed) head/usr.sbin/config/Makefile.depend (contents, props changed) head/usr.sbin/cpucontrol/Makefile.depend (contents, props changed) head/usr.sbin/crashinfo/Makefile.depend (contents, props changed) head/usr.sbin/cron/cron/Makefile.depend (contents, props changed) head/usr.sbin/cron/crontab/Makefile.depend (contents, props changed) head/usr.sbin/cron/lib/Makefile.depend (contents, props changed) head/usr.sbin/crunch/crunchgen/Makefile.depend (contents, props changed) head/usr.sbin/crunch/crunchide/Makefile.depend (contents, props changed) head/usr.sbin/ctladm/Makefile.depend (contents, props changed) head/usr.sbin/ctm/ctm/Makefile.depend (contents, props changed) head/usr.sbin/ctm/ctm_dequeue/Makefile.depend (contents, props changed) head/usr.sbin/ctm/ctm_rmail/Makefile.depend (contents, props changed) head/usr.sbin/ctm/ctm_smail/Makefile.depend (contents, props changed) head/usr.sbin/daemon/Makefile.depend (contents, props changed) head/usr.sbin/dconschat/Makefile.depend (contents, props changed) head/usr.sbin/devinfo/Makefile.depend (contents, props changed) head/usr.sbin/digictl/Makefile.depend (contents, props changed) head/usr.sbin/diskinfo/Makefile.depend (contents, props changed) head/usr.sbin/dumpcis/Makefile.depend (contents, props changed) head/usr.sbin/editmap/Makefile.depend (contents, props changed) head/usr.sbin/edquota/Makefile.depend (contents, props changed) head/usr.sbin/eeprom/Makefile.depend (contents, props changed) head/usr.sbin/etcupdate/Makefile.depend (contents, props changed) head/usr.sbin/extattr/Makefile.depend (contents, props changed) head/usr.sbin/extattrctl/Makefile.depend (contents, props changed) head/usr.sbin/fdcontrol/Makefile.depend (contents, props changed) head/usr.sbin/fdformat/Makefile.depend (contents, props changed) head/usr.sbin/fdread/Makefile.depend (contents, props changed) head/usr.sbin/fdwrite/Makefile.depend (contents, props changed) head/usr.sbin/fifolog/fifolog_create/Makefile.depend (contents, props changed) head/usr.sbin/fifolog/fifolog_reader/Makefile.depend (contents, props changed) head/usr.sbin/fifolog/fifolog_writer/Makefile.depend (contents, props changed) head/usr.sbin/fifolog/lib/Makefile.depend (contents, props changed) head/usr.sbin/flowctl/Makefile.depend (contents, props changed) head/usr.sbin/freebsd-update/Makefile.depend (contents, props changed) head/usr.sbin/fwcontrol/Makefile.depend (contents, props changed) head/usr.sbin/getfmac/Makefile.depend (contents, props changed) head/usr.sbin/getpmac/Makefile.depend (contents, props changed) head/usr.sbin/gpioctl/Makefile.depend (contents, props changed) head/usr.sbin/gssd/Makefile.depend (contents, props changed) head/usr.sbin/gstat/Makefile.depend (contents, props changed) head/usr.sbin/i2c/Makefile.depend (contents, props changed) head/usr.sbin/ifmcstat/Makefile.depend (contents, props changed) head/usr.sbin/inetd/Makefile.depend (contents, props changed) head/usr.sbin/iostat/Makefile.depend (contents, props changed) head/usr.sbin/ip6addrctl/Makefile.depend (contents, props changed) head/usr.sbin/ipfwpcap/Makefile.depend (contents, props changed) head/usr.sbin/jail/Makefile.depend (contents, props changed) head/usr.sbin/jexec/Makefile.depend (contents, props changed) head/usr.sbin/jls/Makefile.depend (contents, props changed) head/usr.sbin/kbdcontrol/Makefile.depend (contents, props changed) head/usr.sbin/kbdmap/Makefile.depend (contents, props changed) head/usr.sbin/keyserv/Makefile.depend (contents, props changed) head/usr.sbin/kgmon/Makefile.depend (contents, props changed) head/usr.sbin/kgzip/Makefile.depend (contents, props changed) head/usr.sbin/kldxref/Makefile.depend (contents, props changed) head/usr.sbin/lastlogin/Makefile.depend (contents, props changed) head/usr.sbin/lmcconfig/Makefile.depend (contents, props changed) head/usr.sbin/lpr/chkprintcap/Makefile.depend (contents, props changed) head/usr.sbin/lpr/common_source/Makefile.depend (contents, props changed) head/usr.sbin/lpr/filters.ru/Makefile.depend (contents, props changed) head/usr.sbin/lpr/filters.ru/koi2855/Makefile.depend (contents, props changed) head/usr.sbin/lpr/filters.ru/koi2alt/Makefile.depend (contents, props changed) head/usr.sbin/lpr/filters/Makefile.depend (contents, props changed) head/usr.sbin/lpr/lp/Makefile.depend (contents, props changed) head/usr.sbin/lpr/lpc/Makefile.depend (contents, props changed) head/usr.sbin/lpr/lpd/Makefile.depend (contents, props changed) head/usr.sbin/lpr/lpq/Makefile.depend (contents, props changed) head/usr.sbin/lpr/lpr/Makefile.depend (contents, props changed) head/usr.sbin/lpr/lprm/Makefile.depend (contents, props changed) head/usr.sbin/lpr/lptest/Makefile.depend (contents, props changed) head/usr.sbin/lpr/pac/Makefile.depend (contents, props changed) head/usr.sbin/lptcontrol/Makefile.depend (contents, props changed) head/usr.sbin/mailstats/Makefile.depend (contents, props changed) head/usr.sbin/mailwrapper/Makefile.depend (contents, props changed) head/usr.sbin/makefs/Makefile.depend (contents, props changed) head/usr.sbin/makemap/Makefile.depend (contents, props changed) head/usr.sbin/manctl/Makefile.depend (contents, props changed) head/usr.sbin/memcontrol/Makefile.depend (contents, props changed) head/usr.sbin/mergemaster/Makefile.depend (contents, props changed) head/usr.sbin/mfiutil/Makefile.depend (contents, props changed) head/usr.sbin/mixer/Makefile.depend (contents, props changed) head/usr.sbin/mld6query/Makefile.depend (contents, props changed) head/usr.sbin/mlxcontrol/Makefile.depend (contents, props changed) head/usr.sbin/mount_smbfs/Makefile.depend (contents, props changed) head/usr.sbin/mountd/Makefile.depend (contents, props changed) head/usr.sbin/moused/Makefile.depend (contents, props changed) head/usr.sbin/mptable/Makefile.depend (contents, props changed) head/usr.sbin/mptutil/Makefile.depend (contents, props changed) head/usr.sbin/mtest/Makefile.depend (contents, props changed) head/usr.sbin/mtree/Makefile.depend (contents, props changed) head/usr.sbin/ndiscvt/Makefile.depend (contents, props changed) head/usr.sbin/ndp/Makefile.depend (contents, props changed) head/usr.sbin/newsyslog/Makefile.depend (contents, props changed) head/usr.sbin/nfscbd/Makefile.depend (contents, props changed) head/usr.sbin/nfsd/Makefile.depend (contents, props changed) head/usr.sbin/nfsdumpstate/Makefile.depend (contents, props changed) head/usr.sbin/nfsrevoke/Makefile.depend (contents, props changed) head/usr.sbin/nfsuserd/Makefile.depend (contents, props changed) head/usr.sbin/ngctl/Makefile.depend (contents, props changed) head/usr.sbin/nghook/Makefile.depend (contents, props changed) head/usr.sbin/nmtree/Makefile.depend (contents, props changed) head/usr.sbin/nologin/Makefile.depend (contents, props changed) head/usr.sbin/nscd/Makefile.depend (contents, props changed) head/usr.sbin/ntp/doc/Makefile.depend (contents, props changed) head/usr.sbin/ntp/libntp/Makefile.depend (contents, props changed) head/usr.sbin/ntp/libntpevent/Makefile.depend (contents, props changed) head/usr.sbin/ntp/libopts/Makefile.depend (contents, props changed) head/usr.sbin/ntp/libparse/Makefile.depend (contents, props changed) head/usr.sbin/ntp/ntp-keygen/Makefile.depend (contents, props changed) head/usr.sbin/ntp/ntpd/Makefile.depend (contents, props changed) head/usr.sbin/ntp/ntpdate/Makefile.depend (contents, props changed) head/usr.sbin/ntp/ntpdc/Makefile.depend (contents, props changed) head/usr.sbin/ntp/ntpq/Makefile.depend (contents, props changed) head/usr.sbin/ntp/ntptime/Makefile.depend (contents, props changed) head/usr.sbin/ntp/sntp/Makefile.depend (contents, props changed) head/usr.sbin/ofwdump/Makefile.depend (contents, props changed) head/usr.sbin/pc-sysinstall/backend-partmanager/Makefile.depend (contents, props changed) head/usr.sbin/pc-sysinstall/backend-query/Makefile.depend (contents, props changed) head/usr.sbin/pc-sysinstall/backend/Makefile.depend (contents, props changed) head/usr.sbin/pc-sysinstall/conf/Makefile.depend (contents, props changed) head/usr.sbin/pc-sysinstall/doc/Makefile.depend (contents, props changed) head/usr.sbin/pc-sysinstall/examples/Makefile.depend (contents, props changed) head/usr.sbin/pc-sysinstall/pc-sysinstall/Makefile.depend (contents, props changed) head/usr.sbin/pciconf/Makefile.depend (contents, props changed) head/usr.sbin/periodic/Makefile.depend (contents, props changed) head/usr.sbin/pkg/Makefile.depend (contents, props changed) head/usr.sbin/pmcannotate/Makefile.depend (contents, props changed) head/usr.sbin/pmccontrol/Makefile.depend (contents, props changed) head/usr.sbin/pmcstat/Makefile.depend (contents, props changed) head/usr.sbin/pnpinfo/Makefile.depend (contents, props changed) head/usr.sbin/portsnap/make_index/Makefile.depend (contents, props changed) head/usr.sbin/portsnap/phttpget/Makefile.depend (contents, props changed) head/usr.sbin/portsnap/portsnap/Makefile.depend (contents, props changed) head/usr.sbin/powerd/Makefile.depend (contents, props changed) head/usr.sbin/ppp/Makefile.depend (contents, props changed) head/usr.sbin/pppctl/Makefile.depend (contents, props changed) head/usr.sbin/praliases/Makefile.depend (contents, props changed) head/usr.sbin/praudit/Makefile.depend (contents, props changed) head/usr.sbin/procctl/Makefile.depend (contents, props changed) head/usr.sbin/pstat/Makefile.depend (contents, props changed) head/usr.sbin/pw/Makefile.depend (contents, props changed) head/usr.sbin/pwd_mkdb/Makefile.depend (contents, props changed) head/usr.sbin/quot/Makefile.depend (contents, props changed) head/usr.sbin/quotaon/Makefile.depend (contents, props changed) head/usr.sbin/rarpd/Makefile.depend (contents, props changed) head/usr.sbin/repquota/Makefile.depend (contents, props changed) head/usr.sbin/rip6query/Makefile.depend (contents, props changed) head/usr.sbin/rmt/Makefile.depend (contents, props changed) head/usr.sbin/route6d/Makefile.depend (contents, props changed) head/usr.sbin/rpc.lockd/Makefile.depend (contents, props changed) head/usr.sbin/rpc.statd/Makefile.depend (contents, props changed) head/usr.sbin/rpc.umntall/Makefile.depend (contents, props changed) head/usr.sbin/rpc.yppasswdd/Makefile.depend (contents, props changed) head/usr.sbin/rpc.ypupdated/Makefile.depend (contents, props changed) head/usr.sbin/rpc.ypxfrd/Makefile.depend (contents, props changed) head/usr.sbin/rpcbind/Makefile.depend (contents, props changed) head/usr.sbin/rrenumd/Makefile.depend (contents, props changed) head/usr.sbin/rtadvctl/Makefile.depend (contents, props changed) head/usr.sbin/rtadvd/Makefile.depend (contents, props changed) head/usr.sbin/rtprio/Makefile.depend (contents, props changed) head/usr.sbin/rtsold/Makefile.depend (contents, props changed) head/usr.sbin/rwhod/Makefile.depend (contents, props changed) head/usr.sbin/sa/Makefile.depend (contents, props changed) head/usr.sbin/sendmail/Makefile.depend (contents, props changed) head/usr.sbin/service/Makefile.depend (contents, props changed) head/usr.sbin/services_mkdb/Makefile.depend (contents, props changed) head/usr.sbin/setfib/Makefile.depend (contents, props changed) head/usr.sbin/setfmac/Makefile.depend (contents, props changed) head/usr.sbin/setpmac/Makefile.depend (contents, props changed) head/usr.sbin/sicontrol/Makefile.depend (contents, props changed) head/usr.sbin/smbmsg/Makefile.depend (contents, props changed) head/usr.sbin/snapinfo/Makefile.depend (contents, props changed) head/usr.sbin/spkrtest/Makefile.depend (contents, props changed) head/usr.sbin/spray/Makefile.depend (contents, props changed) head/usr.sbin/syslogd/Makefile.depend (contents, props changed) head/usr.sbin/tcpdchk/Makefile.depend (contents, props changed) head/usr.sbin/tcpdmatch/Makefile.depend (contents, props changed) head/usr.sbin/tcpdrop/Makefile.depend (contents, props changed) head/usr.sbin/tcpdump/tcpdump/Makefile.depend (contents, props changed) head/usr.sbin/timed/timed/Makefile.depend (contents, props changed) head/usr.sbin/timed/timedc/Makefile.depend (contents, props changed) head/usr.sbin/traceroute/Makefile.depend (contents, props changed) head/usr.sbin/traceroute6/Makefile.depend (contents, props changed) head/usr.sbin/trpt/Makefile.depend (contents, props changed) head/usr.sbin/tzsetup/Makefile.depend (contents, props changed) head/usr.sbin/uathload/Makefile.depend (contents, props changed) head/usr.sbin/ugidfw/Makefile.depend (contents, props changed) head/usr.sbin/uhsoctl/Makefile.depend (contents, props changed) head/usr.sbin/usbconfig/Makefile.depend (contents, props changed) head/usr.sbin/usbdump/Makefile.depend (contents, props changed) head/usr.sbin/utx/Makefile.depend (contents, props changed) head/usr.sbin/vidcontrol/Makefile.depend (contents, props changed) head/usr.sbin/vipw/Makefile.depend (contents, props changed) head/usr.sbin/wake/Makefile.depend (contents, props changed) head/usr.sbin/watch/Makefile.depend (contents, props changed) head/usr.sbin/watchdogd/Makefile.depend (contents, props changed) head/usr.sbin/wlandebug/Makefile.depend (contents, props changed) head/usr.sbin/wlconfig/Makefile.depend (contents, props changed) head/usr.sbin/wpa/hostapd/Makefile.depend (contents, props changed) head/usr.sbin/wpa/hostapd_cli/Makefile.depend (contents, props changed) head/usr.sbin/wpa/ndis_events/Makefile.depend (contents, props changed) head/usr.sbin/wpa/wpa_cli/Makefile.depend (contents, props changed) head/usr.sbin/wpa/wpa_passphrase/Makefile.depend (contents, props changed) head/usr.sbin/wpa/wpa_supplicant/Makefile.depend (contents, props changed) head/usr.sbin/yp_mkdb/Makefile.depend (contents, props changed) head/usr.sbin/ypbind/Makefile.depend (contents, props changed) head/usr.sbin/yppoll/Makefile.depend (contents, props changed) head/usr.sbin/yppush/Makefile.depend (contents, props changed) head/usr.sbin/ypserv/Makefile.depend (contents, props changed) head/usr.sbin/ypset/Makefile.depend (contents, props changed) head/usr.sbin/zic/zdump/Makefile.depend (contents, props changed) head/usr.sbin/zic/zic/Makefile.depend (contents, props changed) head/usr.sbin/zzz/Makefile.depend (contents, props changed) Directory Properties: head/targets/ (props changed) Modified: head/Makefile head/etc/Makefile head/gnu/lib/csu/Makefile head/gnu/usr.bin/binutils/ld/Makefile head/include/Makefile head/include/arpa/Makefile head/kerberos5/lib/libasn1/Makefile head/kerberos5/lib/libhdb/Makefile head/kerberos5/lib/libhx509/Makefile head/lib/clang/clang.build.mk head/lib/clang/include/Makefile head/lib/csu/Makefile.inc head/lib/libc++/Makefile head/lib/libc/Makefile head/lib/libpam/Makefile head/lib/libpam/libpam/Makefile head/lib/libproc/Makefile head/lib/libtelnet/Makefile head/lib/ncurses/ncurses/Makefile head/share/i18n/csmapper/Makefile.inc head/share/i18n/esdb/Makefile.inc head/share/mk/Makefile head/share/mk/bsd.compiler.mk head/share/mk/bsd.dep.mk head/share/mk/bsd.files.mk head/share/mk/bsd.incs.mk head/share/mk/bsd.init.mk head/share/mk/bsd.lib.mk head/share/mk/bsd.man.mk head/share/mk/bsd.nls.mk head/share/mk/bsd.obj.mk head/share/mk/bsd.opts.mk head/share/mk/bsd.own.mk head/share/mk/bsd.prog.mk head/share/mk/bsd.subdir.mk head/share/mk/bsd.sys.mk head/share/mk/bsd.test.mk head/share/mk/src.sys.mk head/share/mk/sys.mk head/sys/conf/kmod.mk head/tools/build/mk/Makefile.boot head/usr.bin/clang/clang.prog.mk head/usr.bin/grep/Makefile head/usr.bin/top/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Sat Jun 13 17:40:33 2015 (r284344) +++ head/Makefile Sat Jun 13 19:20:56 2015 (r284345) @@ -99,6 +99,11 @@ # # For more information, see the build(7) manual page. # +.if ${MK_META_MODE} == "yes" +# targets/Makefile plays the role of top-level +.include "targets/Makefile" +.else + TGTS= all all-man buildenv buildenvvars buildkernel buildworld \ check-old check-old-dirs check-old-files check-old-libs \ checkdpadd clean cleandepend cleandir \ @@ -516,10 +521,22 @@ universe_epilogue: buildLINT: ${MAKE} -C ${.CURDIR}/sys/${_TARGET}/conf LINT -.if defined(.PARSEDIR) +# This makefile does not run in meta mode +.MAKE.MODE= normal +# Normally the things we run from here don't either. +# Using -DWITH_META_FILES +# we can buildworld with meta files created which are useful +# for debugging, but without any of the rest of a meta mode build. +MK_META_MODE= no +MK_STAGING= no +# tell meta.autodep.mk to not even think about updating anything. +UPDATE_DEPENDFILE= NO +.export MK_META_MODE MK_STAGING UPDATE_DEPENDFILE + .if make(universe) # we do not want a failure of one branch abort all. MAKE_JOB_ERROR_TOKEN= no .export MAKE_JOB_ERROR_TOKEN .endif -.endif + +.endif # META_MODE Added: head/bin/cat/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/cat/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/chflags/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/chflags/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/chio/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/chio/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/chmod/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/chmod/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/cp/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/cp/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/csh/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/csh/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,243 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/arpa \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libcrypt \ + lib/ncurses/ncursesw \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +ed.chared.o: ed.defns.h +ed.chared.o: sh.err.h +ed.chared.o: tc.const.h +ed.chared.po: ed.defns.h +ed.chared.po: sh.err.h +ed.chared.po: tc.const.h +ed.defns.o: sh.err.h +ed.defns.o: tc.const.h +ed.defns.po: sh.err.h +ed.defns.po: tc.const.h +ed.init.o: ed.defns.h +ed.init.o: sh.err.h +ed.init.o: tc.const.h +ed.init.po: ed.defns.h +ed.init.po: sh.err.h +ed.init.po: tc.const.h +ed.inputl.o: ed.defns.h +ed.inputl.o: sh.err.h +ed.inputl.o: tc.const.h +ed.inputl.po: ed.defns.h +ed.inputl.po: sh.err.h +ed.inputl.po: tc.const.h +ed.refresh.o: sh.err.h +ed.refresh.o: tc.const.h +ed.refresh.po: sh.err.h +ed.refresh.po: tc.const.h +ed.screen.o: ed.defns.h +ed.screen.o: sh.err.h +ed.screen.o: tc.const.h +ed.screen.po: ed.defns.h +ed.screen.po: sh.err.h +ed.screen.po: tc.const.h +ed.term.o: sh.err.h +ed.term.o: tc.const.h +ed.term.po: sh.err.h +ed.term.po: tc.const.h +ed.xmap.o: ed.defns.h +ed.xmap.o: sh.err.h +ed.xmap.o: tc.const.h +ed.xmap.po: ed.defns.h +ed.xmap.po: sh.err.h +ed.xmap.po: tc.const.h +glob.o: sh.err.h +glob.o: tc.const.h +glob.po: sh.err.h +glob.po: tc.const.h +mi.termios.o: sh.err.h +mi.termios.o: tc.const.h +mi.termios.po: sh.err.h +mi.termios.po: tc.const.h +sh.char.o: sh.err.h +sh.char.o: tc.const.h +sh.char.po: sh.err.h +sh.char.po: tc.const.h +sh.dir.o: sh.err.h +sh.dir.o: tc.const.h +sh.dir.po: sh.err.h +sh.dir.po: tc.const.h +sh.dol.o: sh.err.h +sh.dol.o: tc.const.h +sh.dol.po: sh.err.h +sh.dol.po: tc.const.h +sh.err.o: sh.err.h +sh.err.o: tc.const.h +sh.err.po: sh.err.h +sh.err.po: tc.const.h +sh.exec.o: sh.err.h +sh.exec.o: tc.const.h +sh.exec.po: sh.err.h +sh.exec.po: tc.const.h +sh.exp.o: sh.err.h +sh.exp.o: tc.const.h +sh.exp.po: sh.err.h +sh.exp.po: tc.const.h +sh.file.o: sh.err.h +sh.file.o: tc.const.h +sh.file.po: sh.err.h +sh.file.po: tc.const.h +sh.func.o: sh.err.h +sh.func.o: tc.const.h +sh.func.po: sh.err.h +sh.func.po: tc.const.h +sh.glob.o: sh.err.h +sh.glob.o: tc.const.h +sh.glob.po: sh.err.h +sh.glob.po: tc.const.h +sh.hist.o: sh.err.h +sh.hist.o: tc.const.h +sh.hist.po: sh.err.h +sh.hist.po: tc.const.h +sh.init.o: sh.err.h +sh.init.o: tc.const.h +sh.init.po: sh.err.h +sh.init.po: tc.const.h +sh.lex.o: sh.err.h +sh.lex.o: tc.const.h +sh.lex.po: sh.err.h +sh.lex.po: tc.const.h +sh.misc.o: sh.err.h +sh.misc.o: tc.const.h +sh.misc.po: sh.err.h +sh.misc.po: tc.const.h +sh.o: sh.err.h +sh.o: tc.const.h +sh.parse.o: sh.err.h +sh.parse.o: tc.const.h +sh.parse.po: sh.err.h +sh.parse.po: tc.const.h +sh.po: sh.err.h +sh.po: tc.const.h +sh.print.o: sh.err.h +sh.print.o: tc.const.h +sh.print.po: sh.err.h +sh.print.po: tc.const.h +sh.proc.o: sh.err.h +sh.proc.o: tc.const.h +sh.proc.po: sh.err.h +sh.proc.po: tc.const.h +sh.sem.o: sh.err.h +sh.sem.o: tc.const.h +sh.sem.po: sh.err.h +sh.sem.po: tc.const.h +sh.set.o: sh.err.h +sh.set.o: tc.const.h +sh.set.po: sh.err.h +sh.set.po: tc.const.h +sh.time.o: sh.err.h +sh.time.o: tc.const.h +sh.time.po: sh.err.h +sh.time.po: tc.const.h +tc.alloc.o: sh.err.h +tc.alloc.o: tc.const.h +tc.alloc.po: sh.err.h +tc.alloc.po: tc.const.h +tc.bind.o: ed.defns.h +tc.bind.o: sh.err.h +tc.bind.o: tc.const.h +tc.bind.po: ed.defns.h +tc.bind.po: sh.err.h +tc.bind.po: tc.const.h +tc.const.o: sh.err.h +tc.const.o: tc.const.h +tc.const.po: sh.err.h +tc.const.po: tc.const.h +tc.defs.o: sh.err.h +tc.defs.o: tc.const.h +tc.defs.o: tc.defs.c +tc.defs.po: sh.err.h +tc.defs.po: tc.const.h +tc.defs.po: tc.defs.c +tc.disc.o: sh.err.h +tc.disc.o: tc.const.h +tc.disc.po: sh.err.h +tc.disc.po: tc.const.h +tc.func.o: ed.defns.h +tc.func.o: sh.err.h +tc.func.o: tc.const.h +tc.func.po: ed.defns.h +tc.func.po: sh.err.h +tc.func.po: tc.const.h +tc.nls.o: sh.err.h +tc.nls.o: tc.const.h +tc.nls.po: sh.err.h +tc.nls.po: tc.const.h +tc.os.o: ed.defns.h +tc.os.o: sh.err.h +tc.os.o: tc.const.h +tc.os.po: ed.defns.h +tc.os.po: sh.err.h +tc.os.po: tc.const.h +tc.printf.o: sh.err.h +tc.printf.o: tc.const.h +tc.printf.po: sh.err.h +tc.printf.po: tc.const.h +tc.prompt.o: sh.err.h +tc.prompt.o: tc.const.h +tc.prompt.po: sh.err.h +tc.prompt.po: tc.const.h +tc.sched.o: sh.err.h +tc.sched.o: tc.const.h +tc.sched.po: sh.err.h +tc.sched.po: tc.const.h +tc.sig.o: sh.err.h +tc.sig.o: tc.const.h +tc.sig.po: sh.err.h +tc.sig.po: tc.const.h +tc.str.o: sh.err.h +tc.str.o: tc.const.h +tc.str.po: sh.err.h +tc.str.po: tc.const.h +tc.vers.o: sh.err.h +tc.vers.o: tc.const.h +tc.vers.po: sh.err.h +tc.vers.po: tc.const.h +tc.who.o: sh.err.h +tc.who.o: tc.const.h +tc.who.po: sh.err.h +tc.who.po: tc.const.h +tw.color.o: sh.err.h +tw.color.o: tc.const.h +tw.color.po: sh.err.h +tw.color.po: tc.const.h +tw.comp.o: sh.err.h +tw.comp.o: tc.const.h +tw.comp.po: sh.err.h +tw.comp.po: tc.const.h +tw.help.o: sh.err.h +tw.help.o: tc.const.h +tw.help.po: sh.err.h +tw.help.po: tc.const.h +tw.init.o: sh.err.h +tw.init.o: tc.const.h +tw.init.po: sh.err.h +tw.init.po: tc.const.h +tw.parse.o: sh.err.h +tw.parse.o: tc.const.h +tw.parse.po: sh.err.h +tw.parse.po: tc.const.h +tw.spell.o: sh.err.h +tw.spell.o: tc.const.h +tw.spell.po: sh.err.h +tw.spell.po: tc.const.h +.endif Added: head/bin/date/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/date/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/protocols \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/dd/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/dd/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/df/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/df/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,20 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libutil \ + lib/libxo \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/domainname/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/domainname/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/echo/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/echo/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/ed/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/ed/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + secure/lib/libcrypto \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/expr/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/expr/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,21 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + usr.bin/yacc.host \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +expr.o: expr.c +expr.po: expr.c +.endif Added: head/bin/freebsd-version/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/freebsd-version/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/getfacl/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/getfacl/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/hostname/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/hostname/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/kenv/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/kenv/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/kill/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/kill/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/ln/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/ln/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/ls/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/ls/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,20 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libutil \ + lib/ncurses/ncursesw \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/mkdir/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/mkdir/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/mv/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/mv/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/pax/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/pax/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/pkill/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/pkill/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libkvm \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/ps/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/ps/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,22 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libjail \ + lib/libkvm \ + lib/libxo \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/pwait/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/pwait/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/pwd/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/pwd/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/rcp/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/rcp/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/realpath/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/realpath/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,17 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/rm/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/rm/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/rmail/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/rmail/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,22 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libsm \ + lib/libutil \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +rmail.o: sm_os.h +rmail.po: sm_os.h +.endif Added: head/bin/rmdir/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/rmdir/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/setfacl/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/setfacl/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/bin/sh/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/Makefile.depend Sat Jun 13 19:20:56 2015 (r284345) @@ -0,0 +1,114 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libedit \ + lib/ncurses/ncursesw \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +alias.o: builtins.h +alias.po: builtins.h +arith_yylex.o: syntax.h +arith_yylex.po: syntax.h +builtins.o: builtins.c +builtins.o: builtins.h +builtins.po: builtins.c +builtins.po: builtins.h +cd.o: builtins.h +cd.o: nodes.h *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 19:26:49 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0858C396; Sat, 13 Jun 2015 19:26:49 +0000 (UTC) (envelope-from dim@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAA47AE; Sat, 13 Jun 2015 19:26:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DJQmwV037296; Sat, 13 Jun 2015 19:26:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DJQmwx037295; Sat, 13 Jun 2015 19:26:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201506131926.t5DJQmwx037295@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 13 Jun 2015 19:26:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284346 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 19:26:49 -0000 Author: dim Date: Sat Jun 13 19:26:48 2015 New Revision: 284346 URL: https://svnweb.freebsd.org/changeset/base/284346 Log: Fix the following clang 3.7.0 warnings in lib/libfetch/http.c: lib/libfetch/http.c:1628:26: error: address of array 'purl->user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = purl->user ? ~~~~~~^~~~ ~ lib/libfetch/http.c:1630:30: error: address of array 'purl->pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = purl->pwd? ~~~~~~^~~~ lib/libfetch/http.c:1657:25: error: address of array 'url->user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = url->user ? ~~~~~^~~~ ~ lib/libfetch/http.c:1659:29: error: address of array 'url->pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = url->pwd ? ~~~~~^~~ ~ lib/libfetch/http.c:1669:25: error: address of array 'url->user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = url->user ? ~~~~~^~~~ ~ lib/libfetch/http.c:1671:29: error: address of array 'url->pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = url->pwd ? ~~~~~^~~ ~ Since url->user and url->pwd are arrays, they can never be NULL, so the checks can be removed. Reviewed by: bapt MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D2673 Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Sat Jun 13 19:20:56 2015 (r284345) +++ head/lib/libfetch/http.c Sat Jun 13 19:26:48 2015 (r284346) @@ -1625,10 +1625,8 @@ http_request_body(struct url *URL, const http_auth_params_t aparams; init_http_auth_params(&aparams); if (*purl->user || *purl->pwd) { - aparams.user = purl->user ? - strdup(purl->user) : strdup(""); - aparams.password = purl->pwd? - strdup(purl->pwd) : strdup(""); + aparams.user = strdup(purl->user); + aparams.password = strdup(purl->pwd); } else if ((p = getenv("HTTP_PROXY_AUTH")) != NULL && *p != '\0') { if (http_authfromenv(p, &aparams) < 0) { @@ -1654,10 +1652,8 @@ http_request_body(struct url *URL, const http_auth_params_t aparams; init_http_auth_params(&aparams); if (*url->user || *url->pwd) { - aparams.user = url->user ? - strdup(url->user) : strdup(""); - aparams.password = url->pwd ? - strdup(url->pwd) : strdup(""); + aparams.user = strdup(url->user); + aparams.password = strdup(url->pwd); } else if ((p = getenv("HTTP_AUTH")) != NULL && *p != '\0') { if (http_authfromenv(p, &aparams) < 0) { @@ -1666,10 +1662,8 @@ http_request_body(struct url *URL, const } } else if (fetchAuthMethod && fetchAuthMethod(url) == 0) { - aparams.user = url->user ? - strdup(url->user) : strdup(""); - aparams.password = url->pwd ? - strdup(url->pwd) : strdup(""); + aparams.user = strdup(url->user); + aparams.password = strdup(url->pwd); } else { http_seterr(HTTP_NEED_AUTH); goto ouch; From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 19:34:12 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 953ED7CA; Sat, 13 Jun 2015 19:34:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F38530E; Sat, 13 Jun 2015 19:34:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DJYCQE085435; Sat, 13 Jun 2015 19:34:12 GMT (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 097E29530; Sat, 13 Jun 2015 19:34:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id R5P0pUjOgt9b; Sat, 13 Jun 2015 19:34:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 5F914951F Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname bi... From: Bryan Drewery X-Mailer: iPhone Mail (12F70) In-Reply-To: <201506131920.t5DJKwMH033508@svn.freebsd.org> Date: Sat, 13 Jun 2015 15:34:03 -0400 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <16F9D7DF-A3D6-4675-9789-4F5AE1E3F940@FreeBSD.org> References: <201506131920.t5DJKwMH033508@svn.freebsd.org> To: "Simon J. Gerraty" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 19:34:12 -0000 > On Jun 13, 2015, at 15:20, Simon J. Gerraty wrote: > > Author: sjg > Date: Sat Jun 13 19:20:56 2015 > New Revision: 284345 > URL: https://svnweb.freebsd.org/changeset/base/284345 > > Log: > Add META_MODE support. Thanks!! Is anything remaining from the projects/bmake branch? From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 19:39:22 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B86F0AAB; Sat, 13 Jun 2015 19:39:22 +0000 (UTC) (envelope-from kp@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99DF033C; Sat, 13 Jun 2015 19:39:22 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DJdMbh043706; Sat, 13 Jun 2015 19:39:22 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DJdMUs043703; Sat, 13 Jun 2015 19:39:22 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201506131939.t5DJdMUs043703@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 13 Jun 2015 19:39:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284348 - in head/sys: dev/virtio/network net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 19:39:22 -0000 Author: kp Date: Sat Jun 13 19:39:21 2015 New Revision: 284348 URL: https://svnweb.freebsd.org/changeset/base/284348 Log: Fix panic when adding vtnet interfaces to a bridge vtnet interfaces are always in promiscuous mode (at least if the VIRTIO_NET_F_CTRL_RX feature is not negotiated with the host). if_promisc() on a vtnet interface returned ENOTSUP although it has IFF_PROMISC set. This confused the bridge code. Instead we now accept all enable/disable promiscuous commands (and always keep IFF_PROMISC set). There are also two issues with the if_bridge error handling. If if_promisc() fails it uses bridge_delete_member() to clean up. This tries to disable promiscuous mode on the interface. That runs into an assert, because promiscuous mode was never set in the first place. (That's the panic reported in PR 200210.) We can only unset promiscuous mode if the interface actually is promiscuous. This goes against the reference counting done by if_promisc(), but only the first/last if_promic() calls can actually fail, so this is safe. A second issue is a double free of bif. It's already freed by bridge_delete_member(). PR: 200210 Differential Revision: https://reviews.freebsd.org/D2804 Reviewed by: philip (mentor) Modified: head/sys/dev/virtio/network/if_vtnet.c head/sys/net/if_bridge.c Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Sat Jun 13 19:36:32 2015 (r284347) +++ head/sys/dev/virtio/network/if_vtnet.c Sat Jun 13 19:39:21 2015 (r284348) @@ -1080,8 +1080,12 @@ vtnet_ioctl(struct ifnet *ifp, u_long cm (IFF_PROMISC | IFF_ALLMULTI)) { if (sc->vtnet_flags & VTNET_FLAG_CTRL_RX) vtnet_rx_filter(sc); - else - error = ENOTSUP; + else { + ifp->if_flags |= IFF_PROMISC; + if ((ifp->if_flags ^ sc->vtnet_if_flags) + & IFF_ALLMULTI) + error = ENOTSUP; + } } } else vtnet_init_locked(sc); Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Sat Jun 13 19:36:32 2015 (r284347) +++ head/sys/net/if_bridge.c Sat Jun 13 19:39:21 2015 (r284348) @@ -1033,9 +1033,12 @@ bridge_delete_member(struct bridge_softc case IFT_ETHER: case IFT_L2VLAN: /* - * Take the interface out of promiscuous mode. + * Take the interface out of promiscuous mode, but only + * if it was promiscuous in the first place. It might + * not be if we're in the bridge_ioctl_add() error path. */ - (void) ifpromisc(ifs, 0); + if (ifs->if_flags & IFF_PROMISC) + (void) ifpromisc(ifs, 0); break; case IFT_GIF: @@ -1203,10 +1206,8 @@ bridge_ioctl_add(struct bridge_softc *sc break; } - if (error) { + if (error) bridge_delete_member(sc, bif, 0); - free(bif, M_DEVBUF); - } return (error); } From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 19:52:36 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EA9727F; Sat, 13 Jun 2015 19:52:36 +0000 (UTC) (envelope-from sjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CFC498B; Sat, 13 Jun 2015 19:52:36 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DJqagh052973; Sat, 13 Jun 2015 19:52:36 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DJqa30052972; Sat, 13 Jun 2015 19:52:36 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201506131952.t5DJqa30052972@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sat, 13 Jun 2015 19:52:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284349 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 19:52:36 -0000 Author: sjg Date: Sat Jun 13 19:52:35 2015 New Revision: 284349 URL: https://svnweb.freebsd.org/changeset/base/284349 Log: We no longer need CSU_DIR.i386 and until there is an alternative we need MK_INSTALL_AS_USER=yes Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Sat Jun 13 19:39:21 2015 (r284348) +++ head/share/mk/local.meta.sys.mk Sat Jun 13 19:52:35 2015 (r284349) @@ -4,6 +4,9 @@ # XXX some of this should be in meta.sys.mk # we assume that MK_META_MODE=yes +# we need this until there is an alternative +MK_INSTALL_AS_USER= yes + .if empty(OBJROOT) || ${.MAKE.LEVEL} == 0 .if !empty(SB) SB_OBJROOT ?= ${SB}/obj/ @@ -30,7 +33,6 @@ TARGET_ARCHES_powerpc?= powerpc powerpc6 TARGET_ARCHES_pc98?= i386 # some corner cases -CSU_DIR.i386 = csu/i386-elf BOOT_MACHINE_DIR.amd64 = boot/i386 MACHINE_ARCH.host = ${_HOST_ARCH} From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 19:53:25 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F0FA3DA; Sat, 13 Jun 2015 19:53:25 +0000 (UTC) (envelope-from sjg@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74D1C99B; Sat, 13 Jun 2015 19:53:25 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DJrPhh053138; Sat, 13 Jun 2015 19:53:25 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DJrP7v053137; Sat, 13 Jun 2015 19:53:25 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201506131953.t5DJrP7v053137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Sat, 13 Jun 2015 19:53:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284350 - head/bin/cat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 19:53:25 -0000 Author: sjg Date: Sat Jun 13 19:53:24 2015 New Revision: 284350 URL: https://svnweb.freebsd.org/changeset/base/284350 Log: removed extra keyword Modified: head/bin/cat/Makefile.depend Modified: head/bin/cat/Makefile.depend ============================================================================== --- head/bin/cat/Makefile.depend Sat Jun 13 19:52:35 2015 (r284349) +++ head/bin/cat/Makefile.depend Sat Jun 13 19:53:24 2015 (r284350) @@ -1,4 +1,3 @@ -# $FreeBSD$ # $FreeBSD$ # Autogenerated - do NOT edit! From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 19:56:05 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC0BC54F; Sat, 13 Jun 2015 19:56:05 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 903C79AF; Sat, 13 Jun 2015 19:56:05 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DJu5Ko053601; Sat, 13 Jun 2015 19:56:05 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DJu5sI053600; Sat, 13 Jun 2015 19:56:05 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201506131956.t5DJu5sI053600@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 13 Jun 2015 19:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284351 - head/usr.bin/sockstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 19:56:05 -0000 Author: tuexen Date: Sat Jun 13 19:56:04 2015 New Revision: 284351 URL: https://svnweb.freebsd.org/changeset/base/284351 Log: Simplify printaddr(). No functional change. MFC after: 3 days Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Sat Jun 13 19:53:24 2015 (r284350) +++ head/usr.bin/sockstat/sockstat.c Sat Jun 13 19:56:04 2015 (r284351) @@ -496,14 +496,14 @@ getfiles(void) } static int -printaddr(int af, struct sockaddr_storage *ss) +printaddr(struct sockaddr_storage *ss) { char addrstr[INET6_ADDRSTRLEN] = { '\0', '\0' }; struct sockaddr_un *sun; void *addr = NULL; /* Keep compiler happy. */ int off, port = 0; - switch (af) { + switch (ss->ss_family) { case AF_INET: addr = &((struct sockaddr_in *)ss)->sin_addr; if (inet_lnaof(*(struct in_addr *)addr) == INADDR_ANY) @@ -522,7 +522,7 @@ printaddr(int af, struct sockaddr_storag return (xprintf("%.*s", sun->sun_len - off, sun->sun_path)); } if (addrstr[0] == '\0') - inet_ntop(af, addr, addrstr, sizeof addrstr); + inet_ntop(ss->ss_family, addr, addrstr, sizeof addrstr); if (port == 0) return xprintf("%s:*", addrstr); else @@ -613,17 +613,17 @@ displaysock(struct sock *s, int pos) switch (s->family) { case AF_INET: case AF_INET6: - pos += printaddr(s->family, &s->laddr); + pos += printaddr(&s->laddr); if (s->family == AF_INET6 && pos >= 58) pos += xprintf(" "); while (pos < 58) pos += xprintf(" "); - pos += printaddr(s->family, &s->faddr); + pos += printaddr(&s->faddr); break; case AF_UNIX: /* server */ if (s->laddr.ss_len > 0) { - pos += printaddr(s->family, &s->laddr); + pos += printaddr(&s->laddr); break; } /* client */ @@ -643,7 +643,7 @@ displaysock(struct sock *s, int pos) if (s == NULL || s->laddr.ss_len == 0) pos += xprintf("??"); else - pos += printaddr(s->family, &s->laddr); + pos += printaddr(&s->laddr); break; default: abort(); From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 20:01:55 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD1D0394; Sat, 13 Jun 2015 20:01:55 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90AB6B06; Sat, 13 Jun 2015 20:01:55 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DK1t3G059939; Sat, 13 Jun 2015 20:01:55 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DK1tYf059937; Sat, 13 Jun 2015 20:01:55 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201506132001.t5DK1tYf059937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 13 Jun 2015 20:01:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284352 - head/usr.bin/sockstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 20:01:55 -0000 Author: tuexen Date: Sat Jun 13 20:01:54 2015 New Revision: 284352 URL: https://svnweb.freebsd.org/changeset/base/284352 Log: Allow more than one socket entry for a file descriptor. This is needed for supporting 1-to-many style SCTP sockets. For other sochets, there is no functional change. MFC after: 3 days Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Sat Jun 13 19:56:04 2015 (r284351) +++ head/usr.bin/sockstat/sockstat.c Sat Jun 13 20:01:54 2015 (r284352) @@ -669,29 +669,28 @@ display(void) if (opt_j >= 0 && opt_j != getprocjid(xf->xf_pid)) continue; hash = (int)((uintptr_t)xf->xf_data % HASHSIZE); - for (s = sockhash[hash]; s != NULL; s = s->next) - if ((void *)s->socket == xf->xf_data) - break; - if (s == NULL) - continue; - if (!check_ports(s)) - continue; - s->shown = 1; - pos = 0; - if ((pwd = getpwuid(xf->xf_uid)) == NULL) - pos += xprintf("%lu ", (u_long)xf->xf_uid); - else - pos += xprintf("%s ", pwd->pw_name); - while (pos < 9) - pos += xprintf(" "); - pos += xprintf("%.10s", getprocname(xf->xf_pid)); - while (pos < 20) - pos += xprintf(" "); - pos += xprintf("%lu ", (u_long)xf->xf_pid); - while (pos < 26) - pos += xprintf(" "); - pos += xprintf("%d ", xf->xf_fd); - displaysock(s, pos); + for (s = sockhash[hash]; s != NULL; s = s->next) { + if ((void *)s->socket != xf->xf_data) + continue; + if (!check_ports(s)) + continue; + s->shown = 1; + pos = 0; + if ((pwd = getpwuid(xf->xf_uid)) == NULL) + pos += xprintf("%lu ", (u_long)xf->xf_uid); + else + pos += xprintf("%s ", pwd->pw_name); + while (pos < 9) + pos += xprintf(" "); + pos += xprintf("%.10s", getprocname(xf->xf_pid)); + while (pos < 20) + pos += xprintf(" "); + pos += xprintf("%lu ", (u_long)xf->xf_pid); + while (pos < 26) + pos += xprintf(" "); + pos += xprintf("%d ", xf->xf_fd); + displaysock(s, pos); + } } if (opt_j >= 0) return; From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 20:05:21 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99A2554C; Sat, 13 Jun 2015 20:05:21 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CCDFC0D; Sat, 13 Jun 2015 20:05:21 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DK5LSh062253; Sat, 13 Jun 2015 20:05:21 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DK5L0a062252; Sat, 13 Jun 2015 20:05:21 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201506132005.t5DK5L0a062252@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 13 Jun 2015 20:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284353 - head/usr.bin/sockstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 20:05:21 -0000 Author: tuexen Date: Sat Jun 13 20:05:20 2015 New Revision: 284353 URL: https://svnweb.freebsd.org/changeset/base/284353 Log: Allow more than one local or remote address per socket. This is needed to support SCTP (and MPTCP in the future). No functional change for existing protocols. MFC after: 3 days Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Sat Jun 13 20:01:54 2015 (r284352) +++ head/usr.bin/sockstat/sockstat.c Sat Jun 13 20:05:20 2015 (r284353) @@ -84,6 +84,11 @@ static int *ports; #define SET_PORT(p) do { ports[p / INT_BIT] |= 1 << (p % INT_BIT); } while (0) #define CHK_PORT(p) (ports[p / INT_BIT] & (1 << (p % INT_BIT))) +struct addr { + struct sockaddr_storage address; + struct addr *next; +}; + struct sock { void *socket; void *pcb; @@ -92,8 +97,8 @@ struct sock { int family; int proto; const char *protoname; - struct sockaddr_storage laddr; - struct sockaddr_storage faddr; + struct addr *laddr; + struct addr *faddr; struct sock *next; }; @@ -257,6 +262,7 @@ gather_inet(int proto) struct inpcb *inp; struct xsocket *so; struct sock *sock; + struct addr *laddr, *faddr; const char *varname, *protoname; size_t len, bufsize; void *buf; @@ -368,21 +374,29 @@ gather_inet(int proto) } if ((sock = calloc(1, sizeof *sock)) == NULL) err(1, "malloc()"); + if ((laddr = calloc(1, sizeof *laddr)) == NULL) + err(1, "malloc()"); + if ((faddr = calloc(1, sizeof *faddr)) == NULL) + err(1, "malloc()"); sock->socket = so->xso_so; sock->proto = proto; if (inp->inp_vflag & INP_IPV4) { sock->family = AF_INET; - sockaddr(&sock->laddr, sock->family, + sockaddr(&laddr->address, sock->family, &inp->inp_laddr, inp->inp_lport); - sockaddr(&sock->faddr, sock->family, + sockaddr(&faddr->address, sock->family, &inp->inp_faddr, inp->inp_fport); } else if (inp->inp_vflag & INP_IPV6) { sock->family = AF_INET6; - sockaddr(&sock->laddr, sock->family, + sockaddr(&laddr->address, sock->family, &inp->in6p_laddr, inp->inp_lport); - sockaddr(&sock->faddr, sock->family, + sockaddr(&faddr->address, sock->family, &inp->in6p_faddr, inp->inp_fport); } + laddr->next = NULL; + faddr->next = NULL; + sock->laddr = laddr; + sock->faddr = faddr; sock->vflag = inp->inp_vflag; sock->protoname = protoname; hash = (int)((uintptr_t)sock->socket % HASHSIZE); @@ -399,6 +413,7 @@ gather_unix(int proto) struct xunpgen *xug, *exug; struct xunpcb *xup; struct sock *sock; + struct addr *laddr, *faddr; const char *varname, *protoname; size_t len, bufsize; void *buf; @@ -457,16 +472,24 @@ gather_unix(int proto) continue; if ((sock = calloc(1, sizeof *sock)) == NULL) err(1, "malloc()"); + if ((laddr = calloc(1, sizeof *laddr)) == NULL) + err(1, "malloc()"); + if ((faddr = calloc(1, sizeof *faddr)) == NULL) + err(1, "malloc()"); sock->socket = xup->xu_socket.xso_so; sock->pcb = xup->xu_unpp; sock->proto = proto; sock->family = AF_UNIX; sock->protoname = protoname; if (xup->xu_unp.unp_addr != NULL) - sock->laddr = + laddr->address = *(struct sockaddr_storage *)(void *)&xup->xu_addr; else if (xup->xu_unp.unp_conn != NULL) - *(void **)&sock->faddr = xup->xu_unp.unp_conn; + *(void **)&(faddr->address) = xup->xu_unp.unp_conn; + laddr->next = NULL; + faddr->next = NULL; + sock->laddr = laddr; + sock->faddr = faddr; hash = (int)((uintptr_t)sock->socket % HASHSIZE); sock->next = sockhash[hash]; sockhash[hash] = sock; @@ -575,23 +598,28 @@ static int check_ports(struct sock *s) { int port; + struct addr *addr; if (ports == NULL) return (1); if ((s->family != AF_INET) && (s->family != AF_INET6)) return (1); - if (s->family == AF_INET) - port = ntohs(((struct sockaddr_in *)(&s->laddr))->sin_port); - else - port = ntohs(((struct sockaddr_in6 *)(&s->laddr))->sin6_port); - if (CHK_PORT(port)) - return (1); - if (s->family == AF_INET) - port = ntohs(((struct sockaddr_in *)(&s->faddr))->sin_port); - else - port = ntohs(((struct sockaddr_in6 *)(&s->faddr))->sin6_port); - if (CHK_PORT(port)) - return (1); + for (addr = s->laddr; addr != NULL; addr = addr->next) { + if (addr->address.ss_family == AF_INET) + port = ntohs(((struct sockaddr_in *)(&addr->address))->sin_port); + else + port = ntohs(((struct sockaddr_in6 *)(&addr->address))->sin6_port); + if (CHK_PORT(port)) + return (1); + } + for (addr = s->faddr; addr != NULL; addr = addr->next) { + if (addr->address.ss_family == AF_INET) + port = ntohs(((struct sockaddr_in *)&(addr->address))->sin_port); + else + port = ntohs(((struct sockaddr_in6 *)&(addr->address))->sin6_port); + if (CHK_PORT(port)) + return (1); + } return (0); } @@ -600,6 +628,7 @@ displaysock(struct sock *s, int pos) { void *p; int hash; + struct addr *laddr, *faddr; while (pos < 29) pos += xprintf(" "); @@ -608,45 +637,65 @@ displaysock(struct sock *s, int pos) pos += xprintf("4 "); if (s->vflag & INP_IPV6) pos += xprintf("6 "); - while (pos < 36) - pos += xprintf(" "); - switch (s->family) { - case AF_INET: - case AF_INET6: - pos += printaddr(&s->laddr); - if (s->family == AF_INET6 && pos >= 58) - pos += xprintf(" "); - while (pos < 58) + laddr = s->laddr; + faddr = s->faddr; + while (laddr != NULL || faddr != NULL) { + while (pos < 36) pos += xprintf(" "); - pos += printaddr(&s->faddr); - break; - case AF_UNIX: - /* server */ - if (s->laddr.ss_len > 0) { - pos += printaddr(&s->laddr); + switch (s->family) { + case AF_INET: + case AF_INET6: + if (laddr != NULL) { + pos += printaddr(&laddr->address); + if (s->family == AF_INET6 && pos >= 58) + pos += xprintf(" "); + } + while (pos < 58) + pos += xprintf(" "); + if (faddr != NULL) + pos += printaddr(&faddr->address); break; - } - /* client */ - p = *(void **)&s->faddr; - if (p == NULL) { - pos += xprintf("(not connected)"); + case AF_UNIX: + if ((laddr == NULL) || (faddr == NULL)) + errx(1, "laddr = %p or faddr = %p is NULL", + (void *)laddr, (void *)faddr); + /* server */ + if (laddr->address.ss_len > 0) { + pos += printaddr(&laddr->address); + break; + } + /* client */ + p = *(void **)&(faddr->address); + if (p == NULL) { + pos += xprintf("(not connected)"); + break; + } + pos += xprintf("-> "); + for (hash = 0; hash < HASHSIZE; ++hash) { + for (s = sockhash[hash]; s != NULL; s = s->next) + if (s->pcb == p) + break; + if (s != NULL) + break; + } + if (s == NULL || + s->laddr == NULL || + s->laddr->address.ss_len == 0) + pos += xprintf("??"); + else + pos += printaddr(&s->laddr->address); break; + default: + abort(); } - pos += xprintf("-> "); - for (hash = 0; hash < HASHSIZE; ++hash) { - for (s = sockhash[hash]; s != NULL; s = s->next) - if (s->pcb == p) - break; - if (s != NULL) - break; + if (laddr != NULL) + laddr = laddr->next; + if (faddr != NULL) + faddr = faddr->next; + if ((laddr != NULL) || (faddr != NULL)) { + xprintf("\n"); + pos = 0; } - if (s == NULL || s->laddr.ss_len == 0) - pos += xprintf("??"); - else - pos += printaddr(&s->laddr); - break; - default: - abort(); } xprintf("\n"); } From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 20:11:03 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35B3B88A; Sat, 13 Jun 2015 20:11:03 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16D87D18; Sat, 13 Jun 2015 20:11:03 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DKB2i7064395; Sat, 13 Jun 2015 20:11:02 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DKB2DL064394; Sat, 13 Jun 2015 20:11:02 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201506132011.t5DKB2DL064394@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 13 Jun 2015 20:11:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284354 - head/usr.bin/sockstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 20:11:03 -0000 Author: tuexen Date: Sat Jun 13 20:11:02 2015 New Revision: 284354 URL: https://svnweb.freebsd.org/changeset/base/284354 Log: Add support for SCTP. MFC after: 3 days Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Sat Jun 13 20:05:20 2015 (r284353) +++ head/usr.bin/sockstat/sockstat.c Sat Jun 13 20:11:02 2015 (r284354) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -71,7 +72,7 @@ static int opt_v; /* Verbose mode */ /* * Default protocols to use if no -P was defined. */ -static const char *default_protos[] = {"tcp", "udp", "divert" }; +static const char *default_protos[] = {"sctp", "tcp", "udp", "divert" }; static size_t default_numprotos = sizeof(default_protos) / sizeof(default_protos[0]); @@ -254,6 +255,241 @@ sockaddr(struct sockaddr_storage *sa, in } static void +gather_sctp(void) +{ + struct sock *sock; + struct addr *laddr, *prev_laddr, *faddr, *prev_faddr; + struct xsctp_inpcb *xinpcb; + struct xsctp_tcb *xstcb; + struct xsctp_raddr *xraddr; + struct xsctp_laddr *xladdr; + const char *varname; + size_t len, offset; + char *buf; + int hash, vflag; + int no_stcb, local_all_loopback, foreign_all_loopback; + + vflag = 0; + if (opt_4) + vflag |= INP_IPV4; + if (opt_6) + vflag |= INP_IPV6; + + varname = "net.inet.sctp.assoclist"; + if (sysctlbyname(varname, 0, &len, 0, 0) < 0) { + if (errno != ENOENT) + err(1, "sysctlbyname()"); + return; + } + if ((buf = (char *)malloc(len)) == NULL) { + err(1, "malloc()"); + return; + } + if (sysctlbyname(varname, buf, &len, 0, 0) < 0) { + err(1, "sysctlbyname()"); + free(buf); + return; + } + xinpcb = (struct xsctp_inpcb *)(void *)buf; + offset = sizeof(struct xsctp_inpcb); + while ((offset < len) && (xinpcb->last == 0)) { + if ((sock = calloc(1, sizeof *sock)) == NULL) + err(1, "malloc()"); + sock->socket = xinpcb->socket; + sock->proto = IPPROTO_SCTP; + sock->protoname = "sctp"; + if (xinpcb->flags & SCTP_PCB_FLAGS_BOUND_V6) { + sock->family = AF_INET6; + sock->vflag = INP_IPV6; + } else { + sock->family = AF_INET; + sock->vflag = INP_IPV4; + } + prev_laddr = NULL; + local_all_loopback = 1; + while (offset < len) { + xladdr = (struct xsctp_laddr *)(void *)(buf + offset); + offset += sizeof(struct xsctp_laddr); + if (xladdr->last == 1) + break; + if ((laddr = calloc(1, sizeof(struct addr))) == NULL) + err(1, "malloc()"); + switch (xladdr->address.sa.sa_family) { + case AF_INET: +#define __IN_IS_ADDR_LOOPBACK(pina) \ + ((ntohl((pina)->s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) + if (!__IN_IS_ADDR_LOOPBACK(&xladdr->address.sin.sin_addr)) + local_all_loopback = 0; +#undef __IN_IS_ADDR_LOOPBACK + sockaddr(&laddr->address, + AF_INET, + &xladdr->address.sin.sin_addr, + htons(xinpcb->local_port)); + break; + case AF_INET6: + if (!IN6_IS_ADDR_LOOPBACK(&xladdr->address.sin6.sin6_addr)) + local_all_loopback = 0; + sockaddr(&laddr->address, + AF_INET6, + &xladdr->address.sin6.sin6_addr, + htons(xinpcb->local_port)); + break; + default: + errx(1, "adress family %d not supported", + xladdr->address.sa.sa_family); + } + laddr->next = NULL; + if (prev_laddr == NULL) + sock->laddr = laddr; + else + prev_laddr->next = laddr; + prev_laddr = laddr; + } + if (sock->laddr == NULL) { + if ((sock->laddr = calloc(1, sizeof(struct addr))) == NULL) + err(1, "malloc()"); + sock->laddr->address.ss_family = sock->family; + if (sock->family == AF_INET) + sock->laddr->address.ss_len = sizeof(struct sockaddr_in); + else + sock->laddr->address.ss_len = sizeof(struct sockaddr_in); + local_all_loopback = 0; + } + if ((sock->faddr = calloc(1, sizeof(struct addr))) == NULL) + err(1, "malloc()"); + sock->faddr->address.ss_family = sock->family; + if (sock->family == AF_INET) + sock->faddr->address.ss_len = sizeof(struct sockaddr_in); + else + sock->faddr->address.ss_len = sizeof(struct sockaddr_in); + no_stcb = 1; + while (offset < len) { + xstcb = (struct xsctp_tcb *)(void *)(buf + offset); + offset += sizeof(struct xsctp_tcb); + if (no_stcb && + opt_l && + (!opt_L || !local_all_loopback) && + ((xinpcb->flags & SCTP_PCB_FLAGS_UDPTYPE) || + (xstcb->last == 1))) { + hash = (int)((uintptr_t)sock->socket % HASHSIZE); + sock->next = sockhash[hash]; + sockhash[hash] = sock; + } + if (xstcb->last == 1) + break; + no_stcb = 0; + if (opt_c) { + if ((sock = calloc(1, sizeof *sock)) == NULL) + err(1, "malloc()"); + sock->socket = xinpcb->socket; + sock->proto = IPPROTO_SCTP; + sock->protoname = "sctp"; + if (xinpcb->flags & SCTP_PCB_FLAGS_BOUND_V6) { + sock->family = AF_INET6; + sock->vflag = INP_IPV6; + } else { + sock->family = AF_INET; + sock->vflag = INP_IPV4; + } + } + prev_laddr = NULL; + local_all_loopback = 1; + while (offset < len) { + xladdr = (struct xsctp_laddr *)(void *)(buf + offset); + offset += sizeof(struct xsctp_laddr); + if (xladdr->last == 1) + break; + if (!opt_c) + continue; + if ((laddr = calloc(1, sizeof(struct addr))) == NULL) + err(1, "malloc()"); + switch (xladdr->address.sa.sa_family) { + case AF_INET: +#define __IN_IS_ADDR_LOOPBACK(pina) \ + ((ntohl((pina)->s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) + if (!__IN_IS_ADDR_LOOPBACK(&xladdr->address.sin.sin_addr)) + local_all_loopback = 0; +#undef __IN_IS_ADDR_LOOPBACK + sockaddr(&laddr->address, + AF_INET, + &xladdr->address.sin.sin_addr, + htons(xstcb->local_port)); + break; + case AF_INET6: + if (!IN6_IS_ADDR_LOOPBACK(&xladdr->address.sin6.sin6_addr)) + local_all_loopback = 0; + sockaddr(&laddr->address, + AF_INET6, + &xladdr->address.sin6.sin6_addr, + htons(xstcb->local_port)); + break; + default: + errx(1, "adress family %d not supported", + xladdr->address.sa.sa_family); + } + laddr->next = NULL; + if (prev_laddr == NULL) + sock->laddr = laddr; + else + prev_laddr->next = laddr; + prev_laddr = laddr; + } + prev_faddr = NULL; + foreign_all_loopback = 1; + while (offset < len) { + xraddr = (struct xsctp_raddr *)(void *)(buf + offset); + offset += sizeof(struct xsctp_raddr); + if (xraddr->last == 1) + break; + if (!opt_c) + continue; + if ((faddr = calloc(1, sizeof(struct addr))) == NULL) + err(1, "malloc()"); + switch (xraddr->address.sa.sa_family) { + case AF_INET: +#define __IN_IS_ADDR_LOOPBACK(pina) \ + ((ntohl((pina)->s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) + if (!__IN_IS_ADDR_LOOPBACK(&xraddr->address.sin.sin_addr)) + foreign_all_loopback = 0; +#undef __IN_IS_ADDR_LOOPBACK + sockaddr(&faddr->address, + AF_INET, + &xraddr->address.sin.sin_addr, + htons(xstcb->remote_port)); + break; + case AF_INET6: + if (!IN6_IS_ADDR_LOOPBACK(&xraddr->address.sin6.sin6_addr)) + foreign_all_loopback = 0; + sockaddr(&faddr->address, + AF_INET6, + &xraddr->address.sin6.sin6_addr, + htons(xstcb->remote_port)); + break; + default: + errx(1, "adress family %d not supported", + xraddr->address.sa.sa_family); + } + faddr->next = NULL; + if (prev_faddr == NULL) + sock->faddr = faddr; + else + prev_faddr->next = faddr; + prev_faddr = faddr; + } + if (opt_c && + (!opt_L || !(local_all_loopback || foreign_all_loopback))) { + hash = (int)((uintptr_t)sock->socket % HASHSIZE); + sock->next = sockhash[hash]; + sockhash[hash] = sock; + } + } + xinpcb = (struct xsctp_inpcb *)(void *)(buf + offset); + offset += sizeof(struct xsctp_inpcb); + } + free(buf); +} + +static void gather_inet(int proto) { struct xinpgen *xig, *exig; @@ -845,7 +1081,10 @@ main(int argc, char *argv[]) if (opt_4 || opt_6) { for (i = 0; i < protos_defined; i++) - gather_inet(protos[i]); + if (protos[i] == IPPROTO_SCTP) + gather_sctp(); + else + gather_inet(protos[i]); } if (opt_u || (protos_defined == -1 && !opt_4 && !opt_6)) { From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 20:15:44 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD1D4E77; Sat, 13 Jun 2015 20:15:44 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBD29EAA; Sat, 13 Jun 2015 20:15:44 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DKFifF070001; Sat, 13 Jun 2015 20:15:44 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DKFick070000; Sat, 13 Jun 2015 20:15:44 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201506132015.t5DKFick070000@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 13 Jun 2015 20:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284355 - head/usr.bin/sockstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 20:15:45 -0000 Author: tuexen Date: Sat Jun 13 20:15:44 2015 New Revision: 284355 URL: https://svnweb.freebsd.org/changeset/base/284355 Log: When using -L the code skips a socket if the local or foreign address is loopback. So it is shown if both are not loopback. The man page says that it is shown if the local or foreign address is not loopback. Change the man page to reflect the code. MFC after: 3 days Modified: head/usr.bin/sockstat/sockstat.1 Modified: head/usr.bin/sockstat/sockstat.1 ============================================================================== --- head/usr.bin/sockstat/sockstat.1 Sat Jun 13 20:11:02 2015 (r284354) +++ head/usr.bin/sockstat/sockstat.1 Sat Jun 13 20:15:44 2015 (r284355) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 7, 2015 +.Dd June 13, 2015 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -61,7 +61,7 @@ Show connected sockets. .It Fl j Ar jid Show only sockets belonging to the specified jail ID. .It Fl L -Only show Internet sockets if the local or foreign addresses are not +Only show Internet sockets if the local and foreign addresses are not in the loopback network prefix .Li 127.0.0.0/8 , or do not contain the IPv6 loopback address From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 21:53:37 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED4F4B6A for ; Sat, 13 Jun 2015 21:53:37 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 592EC8FD for ; Sat, 13 Jun 2015 21:53:36 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by wiwd19 with SMTP id d19so44461097wiw.0 for ; Sat, 13 Jun 2015 14:53:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=jETqVd/ewMOW3fVcBQwDQ+ATFJKZK+7Wa1VkT8AoS/I=; b=ItaBg/dePfBCSx6CVV7FfV7nFUIRPqPnHSV4qrgNvqCSwEvglT7j1DUm8YPNLJWdaO OLnn5pDwtFD7SmaWHkT+qM0LW/soNk5vg/ZwTw1zQ3PYog3w7E2BglX2oQBEVgRB3v5k hOAoyH5twY41EyrzJljCcqZoj6am4DDZbHCtUiku5hOcZBtZwmqXA5y0Zw9s6jXytiCl yKf6+mNacHW0TGCFdP3baE0sm95vgdmOhKlZE7X4wE4mNG+dZFDE4q7cTtF2OG73nUFy Jua9uQpcQPzsZVwhlcS8OPCu9PoDvwRQ9O3r+o7U/7NqlKTuhGXMttUs9Nle2ljffc3N y5Dw== X-Gm-Message-State: ALoCoQltvcpParMOrpAKqLFt0P+fP2CVnjNMZWlaputXN4AOgVcWXeR53nAU+g5jnTpL3ZKEbnQs MIME-Version: 1.0 X-Received: by 10.180.109.136 with SMTP id hs8mr18256499wib.73.1434232415176; Sat, 13 Jun 2015 14:53:35 -0700 (PDT) Received: by 10.27.205.66 with HTTP; Sat, 13 Jun 2015 14:53:35 -0700 (PDT) In-Reply-To: References: Date: Sat, 13 Jun 2015 14:53:35 -0700 Message-ID: Subject: Re: svn: head/sys/boot: common uboot/common uboot/lib From: Maxim Sobolev To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 21:53:38 -0000 Just in case, my debug code and proposed fix can be found here: https://github.com/sobomax/FreeBSD.arm/commit/48509790f82352cb455d0f5029291b917afb985b Unless I hear from you I am going to push it into the repository in the next few days (modulo printf() debug stuff). Thanks! On Thu, Jun 11, 2015 at 6:21 AM, Maxim Sobolev wrote: > Hi Ian, there is some issues with that commit that I've run into when > trying to get FreeBSD booting on my Xilinx Zinq 7010-based board. > Basically, the instructions we have on Wiki suggests that the ubldr loading > address to be 0x100000. That makes ubldr panic with "not enough DRAM" > error. I've added some debug code into the for loop, you can find the > output below. As you can see the code is not handling the case when ubldr > is below 2MB and as such sblock == eubldr. On top of that, this_block and > this_size may be left uninitialized causing loading at some random address > and panicing then, instead of DRAM is too small panic. > > kernel_addr=0x100000 > ubldr_addr=0x100000 > dtb_addr=0x1000 > dtb_name=system.dtb > uenvcmd=echo Booting FreeBSD from SD...; mmcinfo && fatload mmc 0 > ${ubldr_addr} ubldr && fatload mmc 0 ${dtb_addr} ${dtb_name} && fdt addr > ${dtb_addr} && bootelf ${ubldr_addr} > > > ## Starting application at 0x00080094 ... > Consoles: U-Boot console > Compatible U-Boot API signature found @1f35d338 > > FreeBSD/armv6 U-Boot loader, Revision 1.2 > (root@van01.sippysoft.com, Wed Jun 10 19:19:05 PDT 2015) > > DRAM: 512MB > Number of U-Boot devices: 1 > U-Boot env: loaderdev not set, will probe all devices. > Found U-Boot device: disk > Probing all disk devices... > Checking unit=0 slice= partition=... good. > / > subldr=0, eubldr=2097152 > si->mr[0]: .flags=2, .start=0, .size=536870912 > sblock=2097152, eblock=536870912 > this_block=16, this_size=723100 > si->mr[1]: .flags=0, .start=0, .size=0 > si->mr[2]: .flags=0, .start=0, .size=0 > si->mr[3]: .flags=0, .start=0, .size=0 > si->mr[4]: .flags=0, .start=0, .size=0 > si->mr[5]: .flags=0, .start=0, .size=0 > si->mr[6]: .flags=0, .start=0, .size=0 > si->mr[7]: .flags=0, .start=0, .size=0 > si->mr[8]: .flags=0, .start=0, .size=0 > si->mr[9]: .flags=0, .start=0, .size=0 > si->mr[10]: .flags=0, .start=0, .size=0 > si->mr[11]: .flags=0, .start=0, .size=0 > si->mr[12]: .flags=0, .start=0, .size=0 > si->mr[13]: .flags=0, .start=0, .size=0 > si->mr[14]: .flags=0, .start=0, .size=0 > si->mr[15]: .flags=0, .start=0, .size=0 > /boot/kernel/kernel data=0x589e5c+0x3e1a4 data abort > pc : [<00080108>] lr : [] > sp : 1f35c488 ip : 1a000033 fp : 1f35c490 > r10: 000cbfd0 r9 : 00000000 r8 : 00000000 > r7 : 00030360 r6 : 00000010 r5 : 000af048 r4 : 0000002d > r3 : 00000000 r2 : 1f35c48f r1 : 00000000 r0 : 00000002 > Flags: nzCv IRQs off FIQs off Mode SVC_32 > Resetting CPU ... > > > > On Sun, May 17, 2015 at 12:59 PM, Ian Lepore wrote: > >> Author: ian >> Date: Sun May 17 19:59:05 2015 >> New Revision: 283035 >> URL: https://svnweb.freebsd.org/changeset/base/283035 >> >> Log: >> An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of >> that. >> >> Previously, ubldr would use the virtual addresses in the elf headers by >> masking off the high bits and assuming the result was a physical address >> where the kernel should be loaded. That would sometimes discard >> significant bits of the physical address, but the effects of that were >> undone by archsw copy code that would find a large block of memory and >> apply an offset to the source/dest copy addresses. The result was that >> things were loaded at a different physical address than requested by the >> higher code layers, but that worked because other adjustments were >> applied >> later (such as when jumping to the entry point). Very confusing, and >> somewhat fragile. >> >> Now the archsw copy routines are just simple copies, and instead >> archsw.arch_loadaddr is implemented to choose a load address. The new >> routine uses some of the code from the old offset-translation routine to >> find the largest block of ram, but it excludes ubldr itself from that >> range, and also excludes If ubldr splits the largest block of ram in >> two, the kernel is loaded into the bottom of whichever resulting block >> is >> larger. >> >> As part of eliminating ubldr itself from the ram ranges, export the heap >> start/end addresses in a pair of new global variables. >> >> This change means that the virtual addresses in the arm kernel elf >> headers >> now have no meaning at all, except for the entry point address. There >> is >> an implicit assumption that the entry point is in the first text page, >> and >> that the address in the the header can be turned into an offset by >> masking >> it with PAGE_MASK. In the future we can link all arm kernels at a >> virtual >> address of 0xC0000000 with no need to use any low-order part of the >> address to influence where in ram the kernel gets loaded. >> >> Modified: >> head/sys/boot/common/load_elf.c >> head/sys/boot/uboot/common/main.c >> head/sys/boot/uboot/lib/copy.c >> head/sys/boot/uboot/lib/elf_freebsd.c >> head/sys/boot/uboot/lib/libuboot.h >> >> Modified: head/sys/boot/common/load_elf.c >> >> ============================================================================== >> --- head/sys/boot/common/load_elf.c Sun May 17 18:35:58 2015 >> (r283034) >> +++ head/sys/boot/common/load_elf.c Sun May 17 19:59:05 2015 >> (r283035) >> @@ -191,10 +191,17 @@ __elfN(loadfile_raw)(char *filename, u_i >> goto oerr; >> } >> /* >> - * Calculate destination address based on kernel entrypoint >> + * Calculate destination address based on kernel entrypoint. >> + * >> + * For ARM, the destination address is independent of any values >> in the >> + * elf header (an ARM kernel can be loaded at any 2MB boundary), >> so we >> + * leave dest set to the value calculated by >> archsw.arch_loadaddr() and >> + * passed in to this function. >> */ >> +#ifndef __arm__ >> if (ehdr->e_type == ET_EXEC) >> dest = (ehdr->e_entry & ~PAGE_MASK); >> +#endif >> if ((ehdr->e_entry & ~PAGE_MASK) == 0) { >> printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: not a >> kernel (maybe static binary?)\n"); >> err = EPERM; >> @@ -348,22 +355,18 @@ __elfN(loadimage)(struct preloaded_file >> off = 0; >> #elif defined(__arm__) >> /* >> - * The elf headers in some kernels specify virtual addresses in >> all >> - * header fields. More recently, the e_entry and p_paddr fields >> are the >> - * proper physical addresses. Even when the p_paddr fields are >> correct, >> - * the MI code below uses the p_vaddr fields with an offset added >> for >> - * loading (doing so is arguably wrong). To make loading work, >> we need >> - * an offset that represents the difference between physical and >> virtual >> - * addressing. ARM kernels are always linked at 0xCnnnnnnn. >> Depending >> - * on the headers, the offset value passed in may be physical or >> virtual >> - * (because it typically comes from e_entry), but we always >> replace >> - * whatever is passed in with the va<->pa offset. On the other >> hand, we >> - * always remove the high-order part of the entry address whether >> it's >> - * physical or virtual, because it will be adjusted later for the >> actual >> - * physical entry point based on where the image gets loaded. >> + * The elf headers in arm kernels specify virtual addresses in all >> + * header fields, even the ones that should be physical addresses. >> + * We assume the entry point is in the first page, and masking >> the page >> + * offset will leave us with the virtual address the kernel was >> linked >> + * at. We subtract that from the load offset, making 'off' into >> the >> + * value which, when added to a virtual address in an elf header, >> + * translates it to a physical address. We do the va->pa >> conversion on >> + * the entry point address in the header now, so that later we can >> + * launch the kernel by just jumping to that address. >> */ >> - off = -0xc0000000; >> - ehdr->e_entry &= ~0xf0000000; >> + off -= ehdr->e_entry & ~PAGE_MASK; >> + ehdr->e_entry += off; >> #ifdef ELF_VERBOSE >> printf("ehdr->e_entry 0x%08x, va<->pa off %llx\n", ehdr->e_entry, >> off); >> #endif >> >> Modified: head/sys/boot/uboot/common/main.c >> >> ============================================================================== >> --- head/sys/boot/uboot/common/main.c Sun May 17 18:35:58 2015 >> (r283034) >> +++ head/sys/boot/uboot/common/main.c Sun May 17 19:59:05 2015 >> (r283035) >> @@ -28,6 +28,7 @@ >> >> #include >> __FBSDID("$FreeBSD$"); >> +#include >> >> #include >> >> @@ -44,6 +45,9 @@ struct uboot_devdesc currdev; >> struct arch_switch archsw; /* MI/MD interface boundary */ >> int devs_no; >> >> +uintptr_t uboot_heap_start; >> +uintptr_t uboot_heap_end; >> + >> struct device_type { >> const char *name; >> int type; >> @@ -414,7 +418,9 @@ main(void) >> * Initialise the heap as early as possible. Once this is done, >> * alloc() is usable. The stack is buried inside us, so this is >> safe. >> */ >> - setheap((void *)end, (void *)(end + 512 * 1024)); >> + uboot_heap_start = round_page((uintptr_t)end); >> + uboot_heap_end = uboot_heap_start + 512 * 1024; >> + setheap((void *)uboot_heap_start, (void *)uboot_heap_end); >> >> /* >> * Set up console. >> @@ -487,6 +493,7 @@ main(void) >> setenv("LINES", "24", 1); /* optional */ >> setenv("prompt", "loader>", 1); >> >> + archsw.arch_loadaddr = uboot_loadaddr; >> archsw.arch_getdev = uboot_getdev; >> archsw.arch_copyin = uboot_copyin; >> archsw.arch_copyout = uboot_copyout; >> >> Modified: head/sys/boot/uboot/lib/copy.c >> >> ============================================================================== >> --- head/sys/boot/uboot/lib/copy.c Sun May 17 18:35:58 2015 >> (r283034) >> +++ head/sys/boot/uboot/lib/copy.c Sun May 17 19:59:05 2015 >> (r283035) >> @@ -27,66 +27,131 @@ >> >> #include >> __FBSDID("$FreeBSD$"); >> +#include >> >> #include >> #include >> >> #include "api_public.h" >> #include "glue.h" >> +#include "libuboot.h" >> >> /* >> * MD primitives supporting placement of module data >> */ >> >> -void * >> -uboot_vm_translate(vm_offset_t o) { >> +#ifdef __arm__ >> +#define KERN_ALIGN (2 * 1024 * 1024) >> +#else >> +#define KERN_ALIGN PAGE_SIZE >> +#endif >> + >> +/* >> + * Avoid low memory, u-boot puts things like args and dtb blobs there. >> + */ >> +#define KERN_MINADDR max(KERN_ALIGN, (1024 * 1024)) >> + >> +extern void _start(void); /* ubldr entry point address. */ >> + >> +/* >> + * This is called for every object loaded (kernel, module, dtb file, >> etc). The >> + * expected return value is the next address at or after the given addr >> which is >> + * appropriate for loading the given object described by type and data. >> On each >> + * call the addr is the next address following the previously loaded >> object. >> + * >> + * The first call is for loading the kernel, and the addr argument will >> be zero, >> + * and we search for a big block of ram to load the kernel and modules. >> + * >> + * On subsequent calls the addr will be non-zero, and we just round it >> up so >> + * that each object begins on a page boundary. >> + */ >> +uint64_t >> +uboot_loadaddr(u_int type, void *data, uint64_t addr) >> +{ >> struct sys_info *si; >> - static uintptr_t start = 0; >> - static size_t size = 0; >> + uintptr_t sblock, eblock, subldr, eubldr; >> + uintptr_t biggest_block, this_block; >> + size_t biggest_size, this_size; >> int i; >> + char * envstr; >> + >> + if (addr == 0) { >> + /* >> + * If the loader_kernaddr environment variable is set, >> blindly >> + * honor it. It had better be right. We force >> interpretation >> + * of the value in base-16 regardless of any leading 0x >> prefix, >> + * because that's the U-Boot convention. >> + */ >> + envstr = ub_env_get("loader_kernaddr"); >> + if (envstr != NULL) >> + return (strtoul(envstr, NULL, 16)); >> >> - if (size == 0) { >> + /* >> + * Find addr/size of largest DRAM block. Carve our own >> address >> + * range out of the block, because loading the kernel >> over the >> + * top ourself is a poor memory-conservation strategy. >> Avoid >> + * memory at beginning of the first block of physical >> ram, >> + * since u-boot likes to pass args and data there. >> Assume that >> + * u-boot has moved itself to the very top of ram and >> + * optimistically assume that we won't run into it up >> there. >> + */ >> if ((si = ub_get_sys_info()) == NULL) >> panic("could not retrieve system info"); >> >> - /* Find start/size of largest DRAM block. */ >> + biggest_block = 0; >> + biggest_size = 0; >> + subldr = rounddown2((uintptr_t)_start, KERN_ALIGN); >> + eubldr = roundup2(uboot_heap_end, KERN_ALIGN); >> for (i = 0; i < si->mr_no; i++) { >> - if (si->mr[i].flags == MR_ATTR_DRAM >> - && si->mr[i].size > size) { >> - start = si->mr[i].start; >> - size = si->mr[i].size; >> + if (si->mr[i].flags != MR_ATTR_DRAM) >> + continue; >> + sblock = roundup2(si->mr[i].start, KERN_ALIGN); >> + eblock = rounddown2(si->mr[i].start + >> si->mr[i].size, >> + KERN_ALIGN); >> + if (biggest_size == 0) >> + sblock += KERN_MINADDR; >> + if (subldr >= sblock && subldr < eblock) { >> + if (subldr - sblock > eblock - eubldr) { >> + this_block = sblock; >> + this_size = subldr - sblock; >> + } else { >> + this_block = eubldr; >> + this_size = eblock - eubldr; >> + } >> + } >> + if (biggest_size < this_size) { >> + biggest_block = this_block; >> + biggest_size = this_size; >> } >> } >> - >> - if (size <= 0) >> - panic("No suitable DRAM?\n"); >> - /* >> - printf("Loading into memory region 0x%08X-0x%08X (%d >> MiB)\n", >> - start, start + size, size / 1024 / 1024); >> - */ >> + if (biggest_size == 0) >> + panic("Not enough DRAM to load kernel\n"); >> +#if 0 >> + printf("Loading kernel into region 0x%08x-0x%08x (%u >> MiB)\n", >> + biggest_block, biggest_block + biggest_size - 1, >> + biggest_size / 1024 / 1024); >> +#endif >> + return (biggest_block); >> } >> - if (o > size) >> - panic("Address offset 0x%08jX bigger than size 0x%08X\n", >> - (intmax_t)o, size); >> - return (void *)(start + o); >> + return roundup2(addr, PAGE_SIZE); >> } >> >> ssize_t >> uboot_copyin(const void *src, vm_offset_t dest, const size_t len) >> { >> - bcopy(src, uboot_vm_translate(dest), len); >> + bcopy(src, (void *)dest, len); >> return (len); >> } >> >> ssize_t >> uboot_copyout(const vm_offset_t src, void *dest, const size_t len) >> { >> - bcopy(uboot_vm_translate(src), dest, len); >> + bcopy((void *)src, dest, len); >> return (len); >> } >> >> ssize_t >> uboot_readin(const int fd, vm_offset_t dest, const size_t len) >> { >> - return (read(fd, uboot_vm_translate(dest), len)); >> + return (read(fd, (void *)dest, len)); >> } >> >> Modified: head/sys/boot/uboot/lib/elf_freebsd.c >> >> ============================================================================== >> --- head/sys/boot/uboot/lib/elf_freebsd.c Sun May 17 18:35:58 2015 >> (r283034) >> +++ head/sys/boot/uboot/lib/elf_freebsd.c Sun May 17 19:59:05 2015 >> (r283035) >> @@ -80,7 +80,7 @@ __elfN(uboot_exec)(struct preloaded_file >> if ((error = md_load(fp->f_args, &mdp)) != 0) >> return (error); >> >> - entry = uboot_vm_translate(e->e_entry); >> + entry = (void *)e->e_entry; >> printf("Kernel entry at 0x%x...\n", (unsigned)entry); >> >> dev_cleanup(); >> >> Modified: head/sys/boot/uboot/lib/libuboot.h >> >> ============================================================================== >> --- head/sys/boot/uboot/lib/libuboot.h Sun May 17 18:35:58 2015 >> (r283034) >> +++ head/sys/boot/uboot/lib/libuboot.h Sun May 17 19:59:05 2015 >> (r283035) >> @@ -57,7 +57,10 @@ extern int devs_no; >> extern struct netif_driver uboot_net; >> extern struct devsw uboot_storage; >> >> -void *uboot_vm_translate(vm_offset_t); >> +extern uintptr_t uboot_heap_start; >> +extern uintptr_t uboot_heap_end; >> + >> +uint64_t uboot_loadaddr(u_int type, void *data, uint64_t addr); >> ssize_t uboot_copyin(const void *src, vm_offset_t dest, const >> size_t len); >> ssize_t uboot_copyout(const vm_offset_t src, void *dest, const >> size_t len); >> ssize_t uboot_readin(const int fd, vm_offset_t dest, const size_t >> len); >> > -- Maksym Sobolyev Sippy Software, Inc. Internet Telephony (VoIP) Experts Tel (Canada): +1-778-783-0474 Tel (Toll-Free): +1-855-747-7779 Fax: +1-866-857-6942 Web: http://www.sippysoft.com MSN: sales@sippysoft.com Skype: SippySoft From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 22:01:22 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14516D04; Sat, 13 Jun 2015 22:01:22 +0000 (UTC) (envelope-from adrian@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 026579D8; Sat, 13 Jun 2015 22:01:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DM1L0T025600; Sat, 13 Jun 2015 22:01:21 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DM1LCV025599; Sat, 13 Jun 2015 22:01:21 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201506132201.t5DM1LCV025599@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 13 Jun 2015 22:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284356 - head/usr.sbin/crunch/crunchgen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 22:01:22 -0000 Author: adrian Date: Sat Jun 13 22:01:21 2015 New Revision: 284356 URL: https://svnweb.freebsd.org/changeset/base/284356 Log: Fix up crunchgen binary generation to work with external cross-build tools. * Allow STRIP to be overridden by the environment * Use CC to tie things together, not LD Tested: * i386, mips32 Submitted by: kan Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c ============================================================================== --- head/usr.sbin/crunch/crunchgen/crunchgen.c Sat Jun 13 20:15:44 2015 (r284355) +++ head/usr.sbin/crunch/crunchgen/crunchgen.c Sat Jun 13 22:01:21 2015 (r284356) @@ -980,6 +980,7 @@ top_makefile_rules(FILE *outmk) prog_t *p; fprintf(outmk, "LD?= ld\n"); + fprintf(outmk, "STRIP?= strip\n"); if ( subtract_strlst(&libs, &libs_so) ) fprintf(outmk, "# NOTE: Some LIBS declarations below overridden by LIBS_SO\n"); @@ -1027,7 +1028,7 @@ top_makefile_rules(FILE *outmk) fprintf(outmk, "\t$(CC) -static -o %s %s.o $(CRUNCHED_OBJS) $(LIBS)\n", execfname, execfname); fprintf(outmk, ".endif\n"); - fprintf(outmk, "\tstrip %s\n", execfname); + fprintf(outmk, "\t$(STRIP) %s\n", execfname); fprintf(outmk, "realclean: clean subclean\n"); fprintf(outmk, "clean:\n\trm -f %s *.lo *.o *_stub.c\n", execfname); fprintf(outmk, "subclean: $(SUBCLEAN_TARGETS)\n"); @@ -1109,7 +1110,7 @@ prog_makefile_rules(FILE *outmk, prog_t fprintf(outmk, " $(%s_LIBS)", p->ident); fprintf(outmk, "\n"); - fprintf(outmk, "\t$(LD) -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)", + fprintf(outmk, "\t$(CC) -nostdlibs -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)", p->name, p->name, p->ident); if (p->libs) fprintf(outmk, " $(%s_LIBS)", p->ident); From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 22:27:59 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4546E9; Sat, 13 Jun 2015 22:27:59 +0000 (UTC) (envelope-from ngie@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C285AF38; Sat, 13 Jun 2015 22:27:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DMRxqR037045; Sat, 13 Jun 2015 22:27:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DMRxgO037044; Sat, 13 Jun 2015 22:27:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201506132227.t5DMRxgO037044@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 13 Jun 2015 22:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284357 - head/sys/dev/acpi_support X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 22:27:59 -0000 Author: ngie Date: Sat Jun 13 22:27:59 2015 New Revision: 284357 URL: https://svnweb.freebsd.org/changeset/base/284357 Log: Fix inverted check by skipping over the model-specific checks if the maker or product is NULL, not if they are both not NULL Reported by: araujo, kib X-MFC with: r283678, r284336 Pointyhat to: allanjude Modified: head/sys/dev/acpi_support/acpi_ibm.c Modified: head/sys/dev/acpi_support/acpi_ibm.c ============================================================================== --- head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 22:01:21 2015 (r284356) +++ head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 22:27:59 2015 (r284357) @@ -485,7 +485,7 @@ acpi_ibm_attach(device_t dev) /* Enable per-model events. */ maker = kern_getenv("smbios.system.maker"); product = kern_getenv("smbios.system.product"); - if (maker != NULL && product != NULL) + if (maker == NULL && product == NULL) goto nosmbios; for (i = 0; i < nitems(acpi_ibm_models); i++) { From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 22:29:43 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC6F4249; Sat, 13 Jun 2015 22:29:43 +0000 (UTC) (envelope-from ngie@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA835F3F; Sat, 13 Jun 2015 22:29:43 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DMThIg037331; Sat, 13 Jun 2015 22:29:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DMThgn037330; Sat, 13 Jun 2015 22:29:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201506132229.t5DMThgn037330@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 13 Jun 2015 22:29:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284358 - head/sys/dev/acpi_support X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 22:29:44 -0000 Author: ngie Date: Sat Jun 13 22:29:43 2015 New Revision: 284358 URL: https://svnweb.freebsd.org/changeset/base/284358 Log: Fix previous commit (r284357) I forgot to convert the && to a || Pointyhat to: ngie X-MFC with: r283678, r284336, r284357 Modified: head/sys/dev/acpi_support/acpi_ibm.c Modified: head/sys/dev/acpi_support/acpi_ibm.c ============================================================================== --- head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 22:27:59 2015 (r284357) +++ head/sys/dev/acpi_support/acpi_ibm.c Sat Jun 13 22:29:43 2015 (r284358) @@ -485,7 +485,7 @@ acpi_ibm_attach(device_t dev) /* Enable per-model events. */ maker = kern_getenv("smbios.system.maker"); product = kern_getenv("smbios.system.product"); - if (maker == NULL && product == NULL) + if (maker == NULL || product == NULL) goto nosmbios; for (i = 0; i < nitems(acpi_ibm_models); i++) { From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 22:31:20 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79CEF3A0; Sat, 13 Jun 2015 22:31:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 42995103; Sat, 13 Jun 2015 22:31:20 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by padev16 with SMTP id ev16so42119041pad.0; Sat, 13 Jun 2015 15:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=CLsnGiPzJUdV/OznVVsuUMawOTaaaFB3Gyl6CV3fawU=; b=bY5+KSajWoEU64Q3bBuaavAXlsg66y05m0rO7D1EKqIu1bKpPJ84AK1qD0n9nJAxyt ySbKILHZB2To7Ta6Zse0fxt3oVQpGUHNjkfFBdf1S97iB1hIckR7CtgbwNYwUKrZDozX VC2WrLkYAkqk++il4bKxb0Xpnc/SaLJo6rYONvXE9xbDREUWvg1QoVnWzSYYXAOFf6v2 4T4qmhPTfGXvRX0HDQNNj1+ZyYh8TsCxgTvqCLhmqZtH9yv28zm9VRC9OZWbUxv8avNN ALly+ldWMjouMZAoElJmf47f66VvJZFYJnrxrnrX+pweDqOYWKULGMZA9jRNOKcNzrz0 z16g== X-Received: by 10.68.135.73 with SMTP id pq9mr34954519pbb.46.1434234679791; Sat, 13 Jun 2015 15:31:19 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:2434:29cc:2519:36ef? ([2601:8:ab80:7d6:2434:29cc:2519:36ef]) by mx.google.com with ESMTPSA id fs16sm7633731pdb.12.2015.06.13.15.31.18 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Jun 2015 15:31:18 -0700 (PDT) Subject: Re: svn commit: r284336 - head/sys/dev/acpi_support Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_42E5B28B-96DC-4E78-ACE4-B971F4AB584B"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: Date: Sat, 13 Jun 2015 15:31:16 -0700 Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org, "src-committers@freebsd.org" , Allan Jude , Konstantin Belousov Message-Id: <17D20218-2A87-4F1E-BF8C-563C38305C51@gmail.com> References: <201506130555.t5D5tQij003839@svn.freebsd.org> <20150613073746.GJ2080@kib.kiev.ua> To: araujo@FreeBSD.org X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 22:31:20 -0000 --Apple-Mail=_42E5B28B-96DC-4E78-ACE4-B971F4AB584B Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Jun 13, 2015, at 4:30, Marcelo Araujo wrote: > +1. Fixed (r284357/r284358). Thanks! --Apple-Mail=_42E5B28B-96DC-4E78-ACE4-B971F4AB584B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVfK81AAoJEMZr5QU6S73eOjQH/i+AK+lPS96Enn5q5+t0bLm+ fkYCRbhPm/9AMumgco8dQ68i7tfie+caB1am6eBXp8zsz63RhzUsc7//TYRsupxt XxadLhc/yT4WEZpIXHvQPWWbuAfdeIoQl4Ww/2u0NYHHiSKIn898rfxRW6Ky4OtY ElkeukM8e+NWL5pFYs3rPXHK8HJ3PEPDuzaXipcXmkJvMTR1fF42W0fmFOMTpkS8 95bRYr1IKVKJkbTM4iQ7DFX1ic9cfxLKAWHq1FeJ1g3LB06BfW4UH++W1KzwmC3H E18FLr9aNFZKaUcf95X4G9+fqpAz02lu+7e3mASbrp+xInLqezMCMxcVEfPD7sg= =BIQ0 -----END PGP SIGNATURE----- --Apple-Mail=_42E5B28B-96DC-4E78-ACE4-B971F4AB584B-- From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 22:34:27 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5C5250A; Sat, 13 Jun 2015 22:34:27 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-yh0-x234.google.com (mail-yh0-x234.google.com [IPv6:2607:f8b0:4002:c01::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 80DA1197; Sat, 13 Jun 2015 22:34:27 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: by yhpn97 with SMTP id n97so25105651yhp.0; Sat, 13 Jun 2015 15:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=r3mkDo6O60MeSWIyl88bDeoEMe1sFKepG72WsxVPW4U=; b=aTgkvCZKEyRz9dg/RdUTlZVMqeArUJRv/nFo74vylDl2RXC2WXCEr0xLQydeKzHt4Y jyR5h2lmlOShLLiPhjVQBtgGY4yC/wizsm0nn+41U9mKHtRVmZZVGNtF8w0O4igZL9Ge Rgmx5B7BN3U/aynrwGlTJtoQjMxQlAYu+iD/N60LN7p0011PdOiAErSmqPgzPX8DaQif QEeiTPE+1ks972Pig3Vj8mvENmieRBOYTKposl1UBuvUOjtAc7Hona7tWA5Kl+kkZMAz fSMuVyerkN8oJlYRRn0zKK3zTKQO0NS8H4FneWcitMggdUj1DAIL5Yj3vP5ioKFfXmN8 aTNg== MIME-Version: 1.0 X-Received: by 10.170.59.213 with SMTP id b204mr26017320ykb.10.1434234866597; Sat, 13 Jun 2015 15:34:26 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.37.39.130 with HTTP; Sat, 13 Jun 2015 15:34:26 -0700 (PDT) In-Reply-To: <201506131920.t5DJKwMH033508@svn.freebsd.org> References: <201506131920.t5DJKwMH033508@svn.freebsd.org> Date: Sat, 13 Jun 2015 15:34:26 -0700 X-Google-Sender-Auth: 1oUGAkc99m_NPQlM9IZShwwN2bk Message-ID: Subject: Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname bi... From: Craig Rodrigues To: "Simon J. Gerraty" Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 22:34:28 -0000 On Sat, Jun 13, 2015 at 12:20 PM, Simon J. Gerraty wrote: > Author: sjg > Date: Sat Jun 13 19:20:56 2015 > New Revision: 284345 > URL: https://svnweb.freebsd.org/changeset/base/284345 > > Log: > Add META_MODE support. > Simon, Can you take a look at this: https://jenkins.freebsd.org/job/FreeBSD_HEAD/2860/ The console output is showing this: + make -j 4 buildworld __MAKE_CONF=/builds/FreeBSD_HEAD/make.conf make: "/builds/FreeBSD_HEAD/Makefile" line 102: Malformed conditional (${MK_META_MODE} == "yes") make: Fatal errors encountered -- cannot continue make: stopped in /builds/FreeBSD_HEAD Build step 'Execute shell' marked build as failure This is using a FreeBSD 10.1 host to build HEAD. -- Craig From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 22:36:43 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62492671; Sat, 13 Jun 2015 22:36:43 +0000 (UTC) (envelope-from adrian@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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 509F61A5; Sat, 13 Jun 2015 22:36:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5DMah37042000; Sat, 13 Jun 2015 22:36:43 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5DMah5q041999; Sat, 13 Jun 2015 22:36:43 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201506132236.t5DMah5q041999@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 13 Jun 2015 22:36:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284359 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 22:36:43 -0000 Author: adrian Date: Sat Jun 13 22:36:42 2015 New Revision: 284359 URL: https://svnweb.freebsd.org/changeset/base/284359 Log: Fix incorrect library path. Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Sat Jun 13 22:29:43 2015 (r284358) +++ head/share/mk/src.libnames.mk Sat Jun 13 22:36:42 2015 (r284359) @@ -338,7 +338,7 @@ LIBIPFDIR= ${ROOTOBJDIR}/sbin/ipf/libipf LIBIPF?= ${LIBIPFDIR}/libipf.a LIBTELNETDIR= ${ROOTOBJDIR}/lib/libtelnet -LIBTELNET?= ${LIBIPFDIR}/libtelnet.a +LIBTELNET?= ${LIBTELNETDIR}/libtelnet.a LIBCRONDIR= ${ROOTOBJDIR}/usr.sbin/cron/lib LIBCRON?= ${LIBCRONDIR}/libcron.a From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 22:38:01 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2C068A7; Sat, 13 Jun 2015 22:38:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pd0-x22a.google.com (mail-pd0-x22a.google.com [IPv6:2607:f8b0:400e:c02::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA5B31B5; Sat, 13 Jun 2015 22:38:00 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pdbnf5 with SMTP id nf5so46215231pdb.2; Sat, 13 Jun 2015 15:38:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=L9s2/c8ppAtkDKbIaefTPu+Ak1S+c6ZMnXU/AGDyHTM=; b=x5IiMkXZUFsFRwYNvLXZALppKpkpyA0SV93NY6ndj3PDTedhegFh5M7ideSmXjDEuA r2wtXDL2BCVDGX2NmV/R3vgJDvJOcdshYEAOxKmAb+tU7Agriip3RHiYVMsmFj9d5cqq UW/qlke12gZBO24k2OWHSQEvoEduayTLi5yjTchwyNEl3KyAds0X85xD13hFROEx3432 3837SIuwW9RFNjtuui9mZ7g1wTv4f+7d7PGs3eoqs1nT731hWtRgi4yKpul6fcf2iHSm DxOOVC7eyi0k17mQCPKSS/o38Tv8/5y1xj5TKRfFbQCV+axokY7CT+oq59cqKrDlgK3B mFsg== X-Received: by 10.69.19.129 with SMTP id gu1mr35233975pbd.162.1434235080129; Sat, 13 Jun 2015 15:38:00 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:2434:29cc:2519:36ef? ([2601:8:ab80:7d6:2434:29cc:2519:36ef]) by mx.google.com with ESMTPSA id bs3sm7616612pbd.47.2015.06.13.15.37.58 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Jun 2015 15:37:59 -0700 (PDT) Subject: Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname bi... Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_F0DD7F06-0D1B-4E94-B479-B07F2896AD45"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: Date: Sat, 13 Jun 2015 15:37:56 -0700 Cc: "Simon J. Gerraty" , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <950C4B23-B625-4173-A7C4-A4F1B2C5771D@gmail.com> References: <201506131920.t5DJKwMH033508@svn.freebsd.org> To: Craig Rodrigues X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 22:38:01 -0000 --Apple-Mail=_F0DD7F06-0D1B-4E94-B479-B07F2896AD45 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Jun 13, 2015, at 15:34, Craig Rodrigues wrote: > On Sat, Jun 13, 2015 at 12:20 PM, Simon J. Gerraty = wrote: > Author: sjg > Date: Sat Jun 13 19:20:56 2015 > New Revision: 284345 > URL: https://svnweb.freebsd.org/changeset/base/284345 >=20 > Log: > Add META_MODE support. >=20 > Simon, >=20 > Can you take a look at this: > https://jenkins.freebsd.org/job/FreeBSD_HEAD/2860/ >=20 >=20 > The console output is showing this: > + make -j 4 buildworld __MAKE_CONF=3D/builds/FreeBSD_HEAD/make.conf > make: "/builds/FreeBSD_HEAD/Makefile" line 102: Malformed conditional = (${MK_META_MODE} =3D=3D "yes") > make: Fatal errors encountered -- cannot continue > make: stopped in /builds/FreeBSD_HEAD > Build step 'Execute shell' marked build as failure >=20 > This is using a FreeBSD 10.1 host to build HEAD. The problem is that the bootstrapping capability has been broken with = fmake. The quick fix would probably be to add MK_META_MODE?=3D yes to = the Makefile. We should probably keep the MK_ pollution in Makefile down to a minimum = because of bootstrapping issues like this though. --Apple-Mail=_F0DD7F06-0D1B-4E94-B479-B07F2896AD45 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVfLDEAAoJEMZr5QU6S73e/NoH/1SHnePF+OY9C7sMRzHhQvhI pzpVZe5MJ4X2hGoTOY2gXK1IyJDfbiA79HRqzkMvDnR7T2RlUX1bqZ/GZmAb1PRa 35ZIUSZifFjwWq/v9ijlpk9Mv9mVTiK+q56jyd5DTI+ADHrsgsxVsGwPJFJe33/S 7ZMeOVrOZ7lP/K46OJCw6opYBQqNSSC6ZW947bdDPZgDuBiT23QLwksD3EEoOet1 Qd/c1k/FYl8HeH3W4NC4mNM2++7znYPdNB84MG5wjRvtgnyjn0/BTaVhZCsc6ONU 24c74EQX6NEY3DhfjnbBytkEvvpBQ+FTVK/CNoQ7+yAv6B02KY8xsJ2k8Bla8Ko= =i0iI -----END PGP SIGNATURE----- --Apple-Mail=_F0DD7F06-0D1B-4E94-B479-B07F2896AD45-- From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 22:47:01 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9C8FDD8; Sat, 13 Jun 2015 22:47:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pd0-x231.google.com (mail-pd0-x231.google.com [IPv6:2607:f8b0:400e:c02::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0FA55FB; Sat, 13 Jun 2015 22:47:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pdjm12 with SMTP id m12so46092567pdj.3; Sat, 13 Jun 2015 15:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=poGwnTe2xt9Ni07AGXpPWQrBSdkCpN2+IZt/AhX8ztQ=; b=SCcCtubwZyZgOJHLJy1/6fNdE+eJvzEByTqvRxF5qnkCseQV6E0/untJIi2l6ekHf6 UO7nxqMbKuH+polSEkx3XZ3RU/HJrd4bhaXAIVinBQMyz2xcaf6ObU24JjiVyFzFuTPU a50Vb+1pJ9SD6PO5y8xmXaKYP06urg4eY7LOevFBkPAYNkBJx/+7ArUZTzIGkrg6EikQ UPode6RFqKKpR90N+6nCm2AbsLUgcSUsqE3kv7H+KQSR/dw13jjg3GUY1oSBOqTzv0kg Py28Xd/Qn4EwZ3P5S0hQl+ekpBKziGRBlE4Kt/EWDTVDFa3kwLvGZQrZVfjoiVCflARo PSQg== X-Received: by 10.68.136.169 with SMTP id qb9mr34781253pbb.47.1434235621282; Sat, 13 Jun 2015 15:47:01 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:2434:29cc:2519:36ef? ([2601:8:ab80:7d6:2434:29cc:2519:36ef]) by mx.google.com with ESMTPSA id da2sm7624287pbb.57.2015.06.13.15.46.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Jun 2015 15:47:00 -0700 (PDT) Subject: Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname bi... Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_ABBCF73E-23EC-44F1-BD96-11C6D81CC94A"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <950C4B23-B625-4173-A7C4-A4F1B2C5771D@gmail.com> Date: Sat, 13 Jun 2015 15:46:59 -0700 Cc: "Simon J. Gerraty" , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <306889B5-3417-467C-965F-B011866E6F15@gmail.com> References: <201506131920.t5DJKwMH033508@svn.freebsd.org> <950C4B23-B625-4173-A7C4-A4F1B2C5771D@gmail.com> To: Craig Rodrigues X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 22:47:02 -0000 --Apple-Mail=_ABBCF73E-23EC-44F1-BD96-11C6D81CC94A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Jun 13, 2015, at 15:37, Garrett Cooper wrote: > On Jun 13, 2015, at 15:34, Craig Rodrigues = wrote: >=20 >> On Sat, Jun 13, 2015 at 12:20 PM, Simon J. Gerraty = wrote: >> Author: sjg >> Date: Sat Jun 13 19:20:56 2015 >> New Revision: 284345 >> URL: https://svnweb.freebsd.org/changeset/base/284345 >>=20 >> Log: >> Add META_MODE support. >>=20 >> Simon, >>=20 >> Can you take a look at this: >> https://jenkins.freebsd.org/job/FreeBSD_HEAD/2860/ >>=20 >>=20 >> The console output is showing this: >> + make -j 4 buildworld __MAKE_CONF=3D/builds/FreeBSD_HEAD/make.conf >> make: "/builds/FreeBSD_HEAD/Makefile" line 102: Malformed conditional = (${MK_META_MODE} =3D=3D "yes") >> make: Fatal errors encountered -- cannot continue >> make: stopped in /builds/FreeBSD_HEAD >> Build step 'Execute shell' marked build as failure >>=20 >> This is using a FreeBSD 10.1 host to build HEAD. >=20 > The problem is that the bootstrapping capability has been broken with = fmake. The quick fix would probably be to add MK_META_MODE?=3D yes to = the Makefile. >=20 > We should probably keep the MK_ pollution in Makefile down to a = minimum because of bootstrapping issues like this though. Great. More breakage: $ fmake buildworld -------------------------------------------------------------- >>> Building an up-to-date bmake(1) -------------------------------------------------------------- "/usr/share/mk/bsd.links.mk", line 10: missing `in' in for t in ${LINKS} "/usr/share/mk/bsd.links.mk", line 13: for-less endfor "/usr/share/mk/bsd.links.mk", line 14: missing `in' in for t in ${SYMLINKS} "/usr/share/mk/bsd.links.mk", line 17: for-less endfor fmake: fatal errors encountered -- cannot continue *** [bmake] Error code 1 Stop in /usr/src.svn. *** [upgrade_checks] Error code 1 Stop in /usr/src.svn. --Apple-Mail=_ABBCF73E-23EC-44F1-BD96-11C6D81CC94A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVfLLjAAoJEMZr5QU6S73e6UMIAKL5psTPcu95hoRNuVQ60pKQ 3FwKp8XHBe+NtXTGFcoQ2jqi/k0u/jbOehHUzwHotMyN6DMpWKXXWUzkXAGGV/cO 6/hrQDBUKDZrv2Sda1R9kcTZs9ESd3PXVfAXPnCKDK7/Q5gCBY68xsk5oeQEH2zQ XP+/EEpcK7qrFMg8DDnnCQmDJlwTMgkX1Lc2i/xWH77FXVYxl5HqwOqVoBAihd8G MRsLA3OfSwyF7GIuZQ2Jy5tyMcKHxVbyut8M0AKelihMsEuSY93YoTWCJEL+b0sG vauZCU5l0Tb1qH6uv0+AAQfJCNmPRmoyb2f62u+9BdgoGMOPhsqBj3rgDeYy62s= =xhmX -----END PGP SIGNATURE----- --Apple-Mail=_ABBCF73E-23EC-44F1-BD96-11C6D81CC94A-- From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 23:06:28 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A811C3E5; Sat, 13 Jun 2015 23:06:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65E75A70; Sat, 13 Jun 2015 23:06:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by iecrd14 with SMTP id rd14so11463716iec.3; Sat, 13 Jun 2015 16:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=qNsFb/euQqjvve1xlknLCmZpXJ0wxmvqBkKr2c++90Q=; b=O7f2SOihnpqlWRMaWKK3inTEHyQEqqZjhR113cgp12wJd/WiQha4wRR6MZzPKtcll5 75h+8EzCACPbnwOh6VwbgPCKDJcKPs0Qwqd6mBvOShTZv0ecMBRh1jTZ1ybRTm1geOm9 QPsKAuu9OfCcauFRoIop78TTC8rrSNM4afqZh8BWZkz5FF8Rt2HerPnZAOBdX/FEfL8j yteVF77WLl0CFfW3+TuTO1DR3w7r7v11YCdCULeWyBSHe7z8GnokZunU/4C8ik+/S00z WcQt+GEsswR1QJJ9pgowgrUFK+97FabJ2BOvgGjp2eqdJwESCpxz0QTs1YPgIYGJnIKL 2lyw== X-Received: by 10.50.61.234 with SMTP id t10mr12432957igr.19.1434236787771; Sat, 13 Jun 2015 16:06:27 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:2434:29cc:2519:36ef? ([2601:8:ab80:7d6:2434:29cc:2519:36ef]) by mx.google.com with ESMTPSA id i185sm5547522ioi.24.2015.06.13.16.06.26 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Jun 2015 16:06:27 -0700 (PDT) Subject: Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname bi... Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_9194EFF1-7D74-4CBF-A687-D7E9F259969A"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <306889B5-3417-467C-965F-B011866E6F15@gmail.com> Date: Sat, 13 Jun 2015 16:06:24 -0700 Cc: "Simon J. Gerraty" , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Baptiste Daroussin Message-Id: <450D8D9A-CBF2-445A-8221-4CD353591549@gmail.com> References: <201506131920.t5DJKwMH033508@svn.freebsd.org> <950C4B23-B625-4173-A7C4-A4F1B2C5771D@gmail.com> <306889B5-3417-467C-965F-B011866E6F15@gmail.com> To: Craig Rodrigues X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 23:06:28 -0000 --Apple-Mail=_9194EFF1-7D74-4CBF-A687-D7E9F259969A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Jun 13, 2015, at 15:46, Garrett Cooper wrote: > On Jun 13, 2015, at 15:37, Garrett Cooper = wrote: >=20 >> On Jun 13, 2015, at 15:34, Craig Rodrigues = wrote: >>=20 >>> On Sat, Jun 13, 2015 at 12:20 PM, Simon J. Gerraty = wrote: >>> Author: sjg >>> Date: Sat Jun 13 19:20:56 2015 >>> New Revision: 284345 >>> URL: https://svnweb.freebsd.org/changeset/base/284345 >>>=20 >>> Log: >>> Add META_MODE support. >>>=20 >>> Simon, >>>=20 >>> Can you take a look at this: >>> https://jenkins.freebsd.org/job/FreeBSD_HEAD/2860/ >>>=20 >>>=20 >>> The console output is showing this: >>> + make -j 4 buildworld __MAKE_CONF=3D/builds/FreeBSD_HEAD/make.conf >>> make: "/builds/FreeBSD_HEAD/Makefile" line 102: Malformed = conditional (${MK_META_MODE} =3D=3D "yes") >>> make: Fatal errors encountered -- cannot continue >>> make: stopped in /builds/FreeBSD_HEAD >>> Build step 'Execute shell' marked build as failure >>>=20 >>> This is using a FreeBSD 10.1 host to build HEAD. >>=20 >> The problem is that the bootstrapping capability has been broken with = fmake. The quick fix would probably be to add MK_META_MODE?=3D yes to = the Makefile. >>=20 >> We should probably keep the MK_ pollution in Makefile down to a = minimum because of bootstrapping issues like this though. >=20 > Great. More breakage: >=20 > $ fmake buildworld >=20 > -------------------------------------------------------------- >>>> Building an up-to-date bmake(1) > -------------------------------------------------------------- > "/usr/share/mk/bsd.links.mk", line 10: missing `in' in for > t in ${LINKS} > "/usr/share/mk/bsd.links.mk", line 13: for-less endfor > "/usr/share/mk/bsd.links.mk", line 14: missing `in' in for > t in ${SYMLINKS} > "/usr/share/mk/bsd.links.mk", line 17: for-less endfor > fmake: fatal errors encountered -- cannot continue > *** [bmake] Error code 1 >=20 > Stop in /usr/src.svn. > *** [upgrade_checks] Error code 1 >=20 > Stop in /usr/src.svn. This has been broken for a while with fmake: ------------------------------------------------------------------------ r280122 | bapt | 2015-03-15 14:50:58 -0700 (Sun, 15 Mar 2015) | 8 lines Symplify links installation by using multi variable for loop Using multi variable for loop not only simplify the code, it also = ensures that the LINKS and SYMLINKS input have the right number of words Differential Revision: https://reviews.freebsd.org/D2069 Reviewed by: imp --Apple-Mail=_9194EFF1-7D74-4CBF-A687-D7E9F259969A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVfLdxAAoJEMZr5QU6S73e9eAIAJkgWwcxwwJK1OypGgRB816Q shPGZkOzsW84LJ7x7TgOYsjXzEiSD5DBOwe7vAam01wHqFvajprGK6mdu1XsdArA yCRUL+3nhbTQOdPjaTwLf6pnmjob7/h9psHHaBZET59rbcN+hIGx0hYsYNYFBn5G YTbC5OxfSlDSe22SqGEuyFOto2Z+9U2iWEKUesDsJcFw1FcLKnROVxJg36p2gt8p A7/63RLt3kBo1gXWxrOmbA6efcGu/R7RFQsOkvrniPIB9MXXveWXGsGn+Z2R8kGz ZmQaIF0jssUBKJnKoFgfbaXtmELaw9H/dkDmcusgjZ9tBfz+6WEJuG+2t4U04hw= =FE4L -----END PGP SIGNATURE----- --Apple-Mail=_9194EFF1-7D74-4CBF-A687-D7E9F259969A--