Date: Thu, 22 Aug 2013 04:07:15 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r254636 - in projects/bhyve_npt_pmap: bin/pkill cddl/contrib/opensolaris/cmd/ztest contrib/ofed/libsdp/src/linux contrib/ofed/management/infiniband-diags/src contrib/ofed/management/ope... Message-ID: <201308220407.r7M47Fad016729@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: neel Date: Thu Aug 22 04:07:15 2013 New Revision: 254636 URL: http://svnweb.freebsd.org/changeset/base/254636 Log: IFC @254138 Added: projects/bhyve_npt_pmap/share/man/man9/vm_page_busy.9 - copied unchanged from r254138, head/share/man/man9/vm_page_busy.9 Deleted: projects/bhyve_npt_pmap/share/man/man9/vm_page_io.9 projects/bhyve_npt_pmap/share/man/man9/vm_page_sleep_if_busy.9 projects/bhyve_npt_pmap/share/man/man9/vm_page_wakeup.9 Modified: projects/bhyve_npt_pmap/bin/pkill/pkill.1 projects/bhyve_npt_pmap/bin/pkill/pkill.c projects/bhyve_npt_pmap/cddl/contrib/opensolaris/cmd/ztest/ztest.c projects/bhyve_npt_pmap/contrib/ofed/libsdp/src/linux/sdp_inet.h projects/bhyve_npt_pmap/contrib/ofed/management/infiniband-diags/src/sminfo.c projects/bhyve_npt_pmap/contrib/ofed/management/opensm/opensm/osm_console.c projects/bhyve_npt_pmap/contrib/ofed/management/opensm/opensm/osm_subnet.c projects/bhyve_npt_pmap/crypto/openssl/ssl/s3_cbc.c projects/bhyve_npt_pmap/etc/namedb/named.conf projects/bhyve_npt_pmap/gnu/usr.bin/grep/grep.c projects/bhyve_npt_pmap/lib/libc/gen/fnmatch.c projects/bhyve_npt_pmap/share/man/man9/Makefile projects/bhyve_npt_pmap/share/man/man9/VOP_GETPAGES.9 projects/bhyve_npt_pmap/share/man/man9/vm_page_alloc.9 projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c projects/bhyve_npt_pmap/sys/amd64/conf/GENERIC projects/bhyve_npt_pmap/sys/arm/arm/pmap-v6.c projects/bhyve_npt_pmap/sys/arm/arm/pmap.c projects/bhyve_npt_pmap/sys/boot/common/part.c projects/bhyve_npt_pmap/sys/boot/forth/beastie.4th projects/bhyve_npt_pmap/sys/boot/forth/color.4th projects/bhyve_npt_pmap/sys/boot/forth/color.4th.8 projects/bhyve_npt_pmap/sys/boot/forth/loader.conf.5 projects/bhyve_npt_pmap/sys/boot/forth/menu.4th projects/bhyve_npt_pmap/sys/boot/forth/menu.4th.8 projects/bhyve_npt_pmap/sys/boot/forth/menu.rc projects/bhyve_npt_pmap/sys/boot/forth/version.4th.8 projects/bhyve_npt_pmap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c projects/bhyve_npt_pmap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c projects/bhyve_npt_pmap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c projects/bhyve_npt_pmap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h projects/bhyve_npt_pmap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h projects/bhyve_npt_pmap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h projects/bhyve_npt_pmap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c projects/bhyve_npt_pmap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c projects/bhyve_npt_pmap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c projects/bhyve_npt_pmap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c projects/bhyve_npt_pmap/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h projects/bhyve_npt_pmap/sys/conf/newvers.sh projects/bhyve_npt_pmap/sys/dev/agp/agp.c projects/bhyve_npt_pmap/sys/dev/bge/if_bge.c projects/bhyve_npt_pmap/sys/dev/bge/if_bgereg.h projects/bhyve_npt_pmap/sys/dev/drm2/i915/i915_gem.c projects/bhyve_npt_pmap/sys/dev/drm2/ttm/ttm_bo_vm.c projects/bhyve_npt_pmap/sys/dev/drm2/ttm/ttm_tt.c projects/bhyve_npt_pmap/sys/dev/iwn/if_iwn.c projects/bhyve_npt_pmap/sys/dev/md/md.c projects/bhyve_npt_pmap/sys/dev/mps/mps.c projects/bhyve_npt_pmap/sys/dev/mps/mps_sas.c projects/bhyve_npt_pmap/sys/dev/mps/mps_sas.h projects/bhyve_npt_pmap/sys/dev/mps/mps_sas_lsi.c projects/bhyve_npt_pmap/sys/dev/mps/mpsvar.h projects/bhyve_npt_pmap/sys/fs/ext2fs/ext2_hash.c projects/bhyve_npt_pmap/sys/fs/fuse/fuse_vnops.c projects/bhyve_npt_pmap/sys/fs/tmpfs/tmpfs_subr.c projects/bhyve_npt_pmap/sys/fs/tmpfs/tmpfs_vnops.c projects/bhyve_npt_pmap/sys/geom/part/g_part_gpt.c projects/bhyve_npt_pmap/sys/i386/conf/GENERIC projects/bhyve_npt_pmap/sys/i386/i386/pmap.c projects/bhyve_npt_pmap/sys/i386/xen/pmap.c projects/bhyve_npt_pmap/sys/ia64/conf/GENERIC projects/bhyve_npt_pmap/sys/ia64/ia64/pmap.c projects/bhyve_npt_pmap/sys/kern/kern_exec.c projects/bhyve_npt_pmap/sys/kern/kern_sysctl.c projects/bhyve_npt_pmap/sys/kern/subr_bus.c projects/bhyve_npt_pmap/sys/kern/subr_uio.c projects/bhyve_npt_pmap/sys/kern/uipc_shm.c projects/bhyve_npt_pmap/sys/kern/uipc_syscalls.c projects/bhyve_npt_pmap/sys/kern/vfs_acl.c projects/bhyve_npt_pmap/sys/kern/vfs_bio.c projects/bhyve_npt_pmap/sys/kern/vfs_cluster.c projects/bhyve_npt_pmap/sys/mips/mips/pmap.c projects/bhyve_npt_pmap/sys/net80211/ieee80211.c projects/bhyve_npt_pmap/sys/net80211/ieee80211_freebsd.c projects/bhyve_npt_pmap/sys/net80211/ieee80211_freebsd.h projects/bhyve_npt_pmap/sys/net80211/ieee80211_hostap.c projects/bhyve_npt_pmap/sys/net80211/ieee80211_hwmp.c projects/bhyve_npt_pmap/sys/net80211/ieee80211_mesh.c projects/bhyve_npt_pmap/sys/net80211/ieee80211_output.c projects/bhyve_npt_pmap/sys/net80211/ieee80211_power.c projects/bhyve_npt_pmap/sys/net80211/ieee80211_proto.c projects/bhyve_npt_pmap/sys/net80211/ieee80211_proto.h projects/bhyve_npt_pmap/sys/net80211/ieee80211_superg.c projects/bhyve_npt_pmap/sys/net80211/ieee80211_wds.c projects/bhyve_npt_pmap/sys/ofed/include/linux/bitops.h projects/bhyve_npt_pmap/sys/ofed/include/linux/sysfs.h projects/bhyve_npt_pmap/sys/ofed/include/rdma/sdp_socket.h projects/bhyve_npt_pmap/sys/powerpc/aim/mmu_oea.c projects/bhyve_npt_pmap/sys/powerpc/aim/mmu_oea64.c projects/bhyve_npt_pmap/sys/powerpc/booke/pmap.c projects/bhyve_npt_pmap/sys/powerpc/conf/GENERIC projects/bhyve_npt_pmap/sys/powerpc/conf/GENERIC64 projects/bhyve_npt_pmap/sys/sparc64/conf/GENERIC projects/bhyve_npt_pmap/sys/sparc64/sparc64/pmap.c projects/bhyve_npt_pmap/sys/sys/param.h projects/bhyve_npt_pmap/sys/sys/socket.h projects/bhyve_npt_pmap/sys/vm/phys_pager.c projects/bhyve_npt_pmap/sys/vm/swap_pager.c projects/bhyve_npt_pmap/sys/vm/vm_fault.c projects/bhyve_npt_pmap/sys/vm/vm_glue.c projects/bhyve_npt_pmap/sys/vm/vm_object.c projects/bhyve_npt_pmap/sys/vm/vm_page.c projects/bhyve_npt_pmap/sys/vm/vm_page.h projects/bhyve_npt_pmap/sys/vm/vm_pageout.c projects/bhyve_npt_pmap/sys/vm/vm_phys.c projects/bhyve_npt_pmap/sys/vm/vnode_pager.c Directory Properties: projects/bhyve_npt_pmap/ (props changed) projects/bhyve_npt_pmap/cddl/ (props changed) projects/bhyve_npt_pmap/cddl/contrib/opensolaris/ (props changed) projects/bhyve_npt_pmap/crypto/openssl/ (props changed) projects/bhyve_npt_pmap/lib/libc/ (props changed) projects/bhyve_npt_pmap/sys/ (props changed) projects/bhyve_npt_pmap/sys/boot/ (props changed) projects/bhyve_npt_pmap/sys/cddl/contrib/opensolaris/ (props changed) projects/bhyve_npt_pmap/sys/conf/ (props changed) Modified: projects/bhyve_npt_pmap/bin/pkill/pkill.1 ============================================================================== --- projects/bhyve_npt_pmap/bin/pkill/pkill.1 Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/bin/pkill/pkill.1 Thu Aug 22 04:07:15 2013 (r254636) @@ -29,7 +29,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 11, 2010 +.Dd August 9, 2013 .Dt PKILL 1 .Os .Sh NAME @@ -44,6 +44,7 @@ .Op Fl N Ar system .Op Fl P Ar ppid .Op Fl U Ar uid +.Op Fl c Ar class .Op Fl d Ar delim .Op Fl g Ar pgrp .Op Fl j Ar jid @@ -60,6 +61,7 @@ .Op Fl N Ar system .Op Fl P Ar ppid .Op Fl U Ar uid +.Op Fl c Ar class .Op Fl g Ar pgrp .Op Fl j Ar jid .Op Fl s Ar sid @@ -130,6 +132,9 @@ or process and all of its ancestors are excluded (unless .Fl v is used). +.It Fl c Ar class +Restrict matches to processes running with specified login class +.Ar class . .It Fl f Match against full argument lists. The default is to match against process names. Modified: projects/bhyve_npt_pmap/bin/pkill/pkill.c ============================================================================== --- projects/bhyve_npt_pmap/bin/pkill/pkill.c Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/bin/pkill/pkill.c Thu Aug 22 04:07:15 2013 (r254636) @@ -79,12 +79,14 @@ enum listtype { LT_TTY, LT_PGRP, LT_JID, - LT_SID + LT_SID, + LT_CLASS }; struct list { SLIST_ENTRY(list) li_chain; long li_number; + char *li_name; }; SLIST_HEAD(listhead, list); @@ -116,6 +118,7 @@ static struct listhead ppidlist = SLIST_ static struct listhead tdevlist = SLIST_HEAD_INITIALIZER(tdevlist); static struct listhead sidlist = SLIST_HEAD_INITIALIZER(sidlist); static struct listhead jidlist = SLIST_HEAD_INITIALIZER(jidlist); +static struct listhead classlist = SLIST_HEAD_INITIALIZER(classlist); static void usage(void) __attribute__((__noreturn__)); static int killact(const struct kinfo_proc *); @@ -179,7 +182,7 @@ main(int argc, char **argv) execf = NULL; coref = _PATH_DEVNULL; - while ((ch = getopt(argc, argv, "DF:G:ILM:N:P:SU:ad:fg:ij:lnoqs:t:u:vx")) != -1) + while ((ch = getopt(argc, argv, "DF:G:ILM:N:P:SU:ac:d:fg:ij:lnoqs:t:u:vx")) != -1) switch (ch) { case 'D': debug_opt++; @@ -222,6 +225,10 @@ main(int argc, char **argv) case 'a': ancestors++; break; + case 'c': + makelist(&classlist, LT_CLASS, optarg); + criteria = 1; + break; case 'd': if (!pgrep) usage(); @@ -469,6 +476,20 @@ main(int argc, char **argv) continue; } + SLIST_FOREACH(li, &classlist, li_chain) { + /* + * We skip P_SYSTEM processes to match ps(1) output. + */ + if ((kp->ki_flag & P_SYSTEM) == 0 && + kp->ki_loginclass != NULL && + strcmp(kp->ki_loginclass, li->li_name) == 0) + break; + } + if (SLIST_FIRST(&classlist) != NULL && li == NULL) { + selected[i] = 0; + continue; + } + if (argc == 0) selected[i] = 1; } @@ -562,9 +583,9 @@ usage(void) fprintf(stderr, "usage: %s %s [-F pidfile] [-G gid] [-M core] [-N system]\n" - " [-P ppid] [-U uid] [-g pgrp] [-j jid] [-s sid]\n" - " [-t tty] [-u euid] pattern ...\n", getprogname(), - ustr); + " [-P ppid] [-U uid] [-c class] [-g pgrp] [-j jid]\n" + " [-s sid] [-t tty] [-u euid] pattern ...\n", + getprogname(), ustr); exit(STATUS_BADUSAGE); } @@ -664,8 +685,10 @@ makelist(struct listhead *head, enum lis SLIST_INSERT_HEAD(head, li, li_chain); empty = 0; - li->li_number = (uid_t)strtol(sp, &ep, 0); - if (*ep == '\0') { + if (type != LT_CLASS) + li->li_number = (uid_t)strtol(sp, &ep, 0); + + if (type != LT_CLASS && *ep == '\0') { switch (type) { case LT_PGRP: if (li->li_number == 0) @@ -750,6 +773,12 @@ foundtty: if ((st.st_mode & S_IFCHR) == errx(STATUS_BADUSAGE, "Invalid jail ID `%s'", sp); break; + case LT_CLASS: + li->li_number = -1; + li->li_name = strdup(sp); + if (li->li_name == NULL) + err(STATUS_ERROR, "Cannot allocate memory"); + break; default: usage(); } Modified: projects/bhyve_npt_pmap/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- projects/bhyve_npt_pmap/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/cddl/contrib/opensolaris/cmd/ztest/ztest.c Thu Aug 22 04:07:15 2013 (r254636) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. @@ -769,6 +769,16 @@ ztest_kill(ztest_shared_t *zs) { zs->zs_alloc = metaslab_class_get_alloc(spa_normal_class(ztest_spa)); zs->zs_space = metaslab_class_get_space(spa_normal_class(ztest_spa)); + + /* + * Before we kill off ztest, make sure that the config is updated. + * See comment above spa_config_sync(). + */ + mutex_enter(&spa_namespace_lock); + spa_config_sync(ztest_spa, B_FALSE, B_FALSE); + mutex_exit(&spa_namespace_lock); + + zfs_dbgmsg_print(FTAG); (void) kill(getpid(), SIGKILL); } @@ -2733,7 +2743,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t leaf, top; uint64_t ashift = ztest_get_ashift(); uint64_t oldguid, pguid; - size_t oldsize, newsize; + uint64_t oldsize, newsize; char oldpath[MAXPATHLEN], newpath[MAXPATHLEN]; int replacing; int oldvd_has_siblings = B_FALSE; @@ -2892,8 +2902,8 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, if (error != expected_error && expected_error != EBUSY) { fatal(0, "attach (%s %llu, %s %llu, %d) " "returned %d, expected %d", - oldpath, (longlong_t)oldsize, newpath, - (longlong_t)newsize, replacing, error, expected_error); + oldpath, oldsize, newpath, + newsize, replacing, error, expected_error); } VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); @@ -4803,7 +4813,7 @@ ztest_fault_inject(ztest_ds_t *zd, uint6 */ if (vd0 != NULL && maxfaults != 1 && (!vdev_resilver_needed(vd0->vdev_top, NULL, NULL) || - vd0->vdev_resilvering)) { + vd0->vdev_resilver_txg != 0)) { /* * Make vd0 explicitly claim to be unreadable, * or unwriteable, or reach behind its back @@ -5654,6 +5664,7 @@ ztest_run(ztest_shared_t *zs) zs->zs_alloc = metaslab_class_get_alloc(spa_normal_class(spa)); zs->zs_space = metaslab_class_get_space(spa_normal_class(spa)); + zfs_dbgmsg_print(FTAG); umem_free(tid, ztest_opts.zo_threads * sizeof (thread_t)); Modified: projects/bhyve_npt_pmap/contrib/ofed/libsdp/src/linux/sdp_inet.h ============================================================================== --- projects/bhyve_npt_pmap/contrib/ofed/libsdp/src/linux/sdp_inet.h Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/contrib/ofed/libsdp/src/linux/sdp_inet.h Thu Aug 22 04:07:15 2013 (r254636) @@ -29,8 +29,12 @@ */ #ifndef SOLARIS_BUILD +#ifdef __FreeBSD__ +#include <sys/socket.h> +#else #define AF_INET_SDP 27 /* SDP socket protocol family */ #define AF_INET6_SDP 28 /* SDP socket protocol family */ +#endif #else #define AF_INET_SDP 31 /* This is an invalid family on native solaris * and will only work using QuickTransit */ Modified: projects/bhyve_npt_pmap/contrib/ofed/management/infiniband-diags/src/sminfo.c ============================================================================== --- projects/bhyve_npt_pmap/contrib/ofed/management/infiniband-diags/src/sminfo.c Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/contrib/ofed/management/infiniband-diags/src/sminfo.c Thu Aug 22 04:07:15 2013 (r254636) @@ -72,10 +72,10 @@ enum { }; char *statestr[] = { - [SMINFO_NOTACT] "SMINFO_NOTACT", - [SMINFO_DISCOVER] "SMINFO_DISCOVER", - [SMINFO_STANDBY] "SMINFO_STANDBY", - [SMINFO_MASTER] "SMINFO_MASTER", + [SMINFO_NOTACT] = "SMINFO_NOTACT", + [SMINFO_DISCOVER] = "SMINFO_DISCOVER", + [SMINFO_STANDBY] = "SMINFO_STANDBY", + [SMINFO_MASTER] = "SMINFO_MASTER", }; #define STATESTR(s) (((unsigned)(s)) < SMINFO_STATE_LAST ? statestr[s] : "???") Modified: projects/bhyve_npt_pmap/contrib/ofed/management/opensm/opensm/osm_console.c ============================================================================== --- projects/bhyve_npt_pmap/contrib/ofed/management/opensm/opensm/osm_console.c Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/contrib/ofed/management/opensm/opensm/osm_console.c Thu Aug 22 04:07:15 2013 (r254636) @@ -67,7 +67,10 @@ static struct { time_t previous; void (*loop_function) (osm_opensm_t * p_osm, FILE * out); } loop_command = { -on: 0, delay_s: 2, loop_function:NULL}; + .on = 0, + .delay_s = 2, + .loop_function = NULL, +}; static const struct command console_cmds[]; Modified: projects/bhyve_npt_pmap/contrib/ofed/management/opensm/opensm/osm_subnet.c ============================================================================== --- projects/bhyve_npt_pmap/contrib/ofed/management/opensm/opensm/osm_subnet.c Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/contrib/ofed/management/opensm/opensm/osm_subnet.c Thu Aug 22 04:07:15 2013 (r254636) @@ -482,7 +482,7 @@ static void log_report(const char *fmt, va_start(args, fmt); vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); - printf(buf); + printf("%s", buf); cl_log_event("OpenSM", CL_LOG_INFO, buf, NULL, 0); } @@ -500,7 +500,7 @@ static void log_config_value(char *name, n = sizeof(buf); snprintf(buf + n, sizeof(buf) - n, "\n"); va_end(args); - printf(buf); + printf("%s", buf); cl_log_event("OpenSM", CL_LOG_INFO, buf, NULL, 0); } Modified: projects/bhyve_npt_pmap/crypto/openssl/ssl/s3_cbc.c ============================================================================== --- projects/bhyve_npt_pmap/crypto/openssl/ssl/s3_cbc.c Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/crypto/openssl/ssl/s3_cbc.c Thu Aug 22 04:07:15 2013 (r254636) @@ -148,7 +148,7 @@ int tls1_cbc_remove_padding(const SSL* s unsigned padding_length, good, to_check, i; const unsigned overhead = 1 /* padding length byte */ + mac_size; /* Check if version requires explicit IV */ - if (s->version >= TLS1_1_VERSION || s->version == DTLS1_VERSION) + if (s->version >= TLS1_1_VERSION || s->version == DTLS1_BAD_VER) { /* These lengths are all public so we can test them in * non-constant time. Modified: projects/bhyve_npt_pmap/etc/namedb/named.conf ============================================================================== --- projects/bhyve_npt_pmap/etc/namedb/named.conf Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/etc/namedb/named.conf Thu Aug 22 04:07:15 2013 (r254636) @@ -153,6 +153,72 @@ zone "30.172.in-addr.arpa" { type master zone "31.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; zone "168.192.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +// Shared Address Space (RFC 6598) +zone "64.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "65.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "66.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "67.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "68.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "69.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "70.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "71.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "72.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "73.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "74.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "75.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "76.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "77.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "78.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "79.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "80.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "81.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "82.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "83.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "84.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "85.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "86.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "87.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "88.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "89.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "90.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "91.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "92.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "93.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "94.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "95.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "96.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "97.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "98.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "99.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "100.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "101.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "102.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "103.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "104.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "105.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "106.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "107.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "108.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "109.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "110.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "111.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "112.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "113.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "114.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "115.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "116.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "117.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "118.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "119.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "120.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "121.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "122.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "123.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "124.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "125.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "126.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "127.100.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; + // Link-local/APIPA (RFCs 3927, 5735 and 6303) zone "254.169.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; Modified: projects/bhyve_npt_pmap/gnu/usr.bin/grep/grep.c ============================================================================== --- projects/bhyve_npt_pmap/gnu/usr.bin/grep/grep.c Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/gnu/usr.bin/grep/grep.c Thu Aug 22 04:07:15 2013 (r254636) @@ -301,14 +301,16 @@ reset (int fd, char const *file, struct error (0, errno, "fstat"); return 0; } - if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode)) - return 0; + if (fd != STDIN_FILENO) { + if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode)) + return 0; #ifndef DJGPP - if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode) || S_ISFIFO(stats->stat.st_mode))) + if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode) || S_ISFIFO(stats->stat.st_mode))) #else - if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode))) + if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode))) #endif - return 0; + return 0; + } if ( BZflag || #if HAVE_LIBZ > 0 Modified: projects/bhyve_npt_pmap/lib/libc/gen/fnmatch.c ============================================================================== --- projects/bhyve_npt_pmap/lib/libc/gen/fnmatch.c Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/lib/libc/gen/fnmatch.c Thu Aug 22 04:07:15 2013 (r254636) @@ -194,8 +194,6 @@ fnmatch1(pattern, string, stringstart, f &patmbs); if (pclen == (size_t)-1 || pclen == (size_t)-2) return (FNM_NOMATCH); - if (pclen == 0) - pc = '\\'; pattern += pclen; } /* FALLTHROUGH */ Modified: projects/bhyve_npt_pmap/share/man/man9/Makefile ============================================================================== --- projects/bhyve_npt_pmap/share/man/man9/Makefile Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/share/man/man9/Makefile Thu Aug 22 04:07:15 2013 (r254636) @@ -332,11 +332,8 @@ MAN= accept_filter.9 \ vm_page_grab.9 \ vm_page_hold.9 \ vm_page_insert.9 \ - vm_page_io.9 \ vm_page_lookup.9 \ vm_page_rename.9 \ - vm_page_sleep_if_busy.9 \ - vm_page_wakeup.9 \ vm_page_wire.9 \ vm_set_page_size.9 \ vmem.9 \ @@ -1465,6 +1462,21 @@ MLINKS+=vm_page_bits.9 vm_page_clear_dir vm_page_bits.9 vm_page_test_dirty.9 \ vm_page_bits.9 vm_page_undirty.9 \ vm_page_bits.9 vm_page_zero_invalid.9 +MLINKS+=vm_page_busy.9 vm_page_busied.9 \ + vm_page_busy.9 vm_page_busy_downgrade.9 \ + vm_page_busy.9 vm_page_busy_sleep.9 \ + vm_page_busy.9 vm_page_sbusied.9 \ + vm_page_busy.9 vm_page_sbusy.9 \ + vm_page_busy.9 vm_page_sleep_if_busy.9 \ + vm_page_busy.9 vm_page_sunbusy.9 \ + vm_page_busy.9 vm_page_trysbusy.9 \ + vm_page_busy.9 vm_page_tryxbusy.9 \ + vm_page_busy.9 vm_page_xbusied.9 \ + vm_page_busy.9 vm_page_xbusy.9 \ + vm_page_busy.9 vm_page_xunbusy.9 \ + vm_page_busy.9 vm_page_assert_sbusied.9 \ + vm_page_busy.9 vm_page_assert_unbusied.9 \ + vm_page_busy.9 vm_page_assert_xbusied.9 MLINKS+=vm_page_aflag.9 vm_page_aflag_clear.9 \ vm_page_aflag.9 vm_page_aflag_set.9 \ vm_page_aflag.9 vm_page_reference.9 @@ -1473,10 +1485,6 @@ MLINKS+=vm_page_free.9 vm_page_free_toq. vm_page_free.9 vm_page_try_to_free.9 MLINKS+=vm_page_hold.9 vm_page_unhold.9 MLINKS+=vm_page_insert.9 vm_page_remove.9 -MLINKS+=vm_page_io.9 vm_page_io_finish.9 \ - vm_page_io.9 vm_page_io_start.9 -MLINKS+=vm_page_wakeup.9 vm_page_busy.9 \ - vm_page_wakeup.9 vm_page_flash.9 MLINKS+=vm_page_wire.9 vm_page_unwire.9 MLINKS+=VOP_ACCESS.9 VOP_ACCESSX.9 MLINKS+=VOP_ATTRIB.9 VOP_GETATTR.9 \ Modified: projects/bhyve_npt_pmap/share/man/man9/VOP_GETPAGES.9 ============================================================================== --- projects/bhyve_npt_pmap/share/man/man9/VOP_GETPAGES.9 Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/share/man/man9/VOP_GETPAGES.9 Thu Aug 22 04:07:15 2013 (r254636) @@ -102,7 +102,7 @@ When the write completes, the completion call .Xr vm_object_pip_wakeup 9 and -.Xr vm_page_io_finish 9 +.Xr vm_page_sunbusy 9 to clear the busy flag and awaken any other threads waiting for this page, in addition to calling .Xr vm_page_undirty 9 . @@ -139,7 +139,7 @@ For example, .Fn VOP_GETPAGES may either activate a page (if its wanted bit is set) or deactivate it (otherwise), and finally call -.Xr vm_page_wakeup 9 +.Xr vm_page_xunbusy 9 to arouse any threads currently waiting for the page to be faulted in. .Sh RETURN VALUES If it successfully reads @@ -156,9 +156,9 @@ is .Sh SEE ALSO .Xr vm_object_pip_wakeup 9 , .Xr vm_page_free 9 , -.Xr vm_page_io_finish 9 , +.Xr vm_pagge_sunbusy 9 , .Xr vm_page_undirty 9 , -.Xr vm_page_wakeup 9 , +.Xr vm_page_xunbusy 9 , .Xr vnode 9 .Sh AUTHORS This manual page was written by Modified: projects/bhyve_npt_pmap/share/man/man9/vm_page_alloc.9 ============================================================================== --- projects/bhyve_npt_pmap/share/man/man9/vm_page_alloc.9 Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/share/man/man9/vm_page_alloc.9 Thu Aug 22 04:07:15 2013 (r254636) @@ -91,9 +91,7 @@ than zero. The optional flags are: .Bl -tag -width ".Dv VM_ALLOC_IFNOTCACHED" .It Dv VM_ALLOC_NOBUSY -The returned page will not have the -.Dv VPO_BUSY -flag set. +The returned page will not be exclusive busy. .It Dv VM_ALLOC_NODUMP The returned page will not be included in any kernel core dumps regardless of whether or not it is mapped in to KVA. @@ -112,6 +110,8 @@ Only allocate the page if it is not cach If the page at the specified .Fa pindex is cached, NULL is returned instead. +.It Dv VM_ALLOC_SBUSY +The returned page will be shared busy. .It Dv VM_ALLOC_WIRED The returned page will be wired. .It Dv VM_ALLOC_ZERO Copied: projects/bhyve_npt_pmap/share/man/man9/vm_page_busy.9 (from r254138, head/share/man/man9/vm_page_busy.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/bhyve_npt_pmap/share/man/man9/vm_page_busy.9 Thu Aug 22 04:07:15 2013 (r254636, copy of r254138, head/share/man/man9/vm_page_busy.9) @@ -0,0 +1,216 @@ +.\" +.\" Copyright (c) 2013 EMC Corp. +.\" 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$ +.Dd August 07, 2013 +.Dt vm_page_busy 9 +.Os +.Sh NAME +.Nm vm_page_busied , +.Nm vm_page_busy_downgrade , +.Nm vm_page_busy_sleep , +.Nm vm_page_sbusied , +.Nm vm_page_sbusy , +.Nm vm_page_sleep_if_busy , +.Nm vm_page_sunbusy , +.Nm vm_page_trysbusy , +.Nm vm_page_tryxbusy , +.Nm vm_page_xbusied , +.Nm vm_page_xbusy , +.Nm vm_page_xunbusy , +.Nm vm_page_assert_sbusied , +.Nm vm_page_assert_unbusied , +.Nm vm_page_assert_xbusied +.Nd protect page identity changes and page content references +.Sh SYNOPSIS +.In sys/param.h +.In vm/vm.h +.In vm/vm_page.h +.Ft int +.Fn vm_page_busied "vm_page_t m" +.Ft void +.Fn vm_page_busy_downgrade "vm_page_t m" +.Ft void +.Fn vm_page_busy_sleep "vm_page_t m" "const char *msg" +.Ft int +.Fn vm_page_sbusied "vm_page_t m" +.Ft void +.Fn vm_page_sbusy "vm_page_t m" +.Ft int +.Fn vm_page_sleep_if_busy "vm_page_t m" "const char *msg" +.Ft void +.Fn vm_page_sunbusy "vm_page_t m" +.Ft int +.Fn vm_page_trysbusy "vm_page_t m" +.Ft int +.Fn vm_page_tryxbusy "vm_page_t m" +.Ft int +.Fn vm_page_xbusied "vm_page_t m" +.Ft void +.Fn vm_page_xbusy "vm_page_t m" +.Ft void +.Fn vm_page_xunbusy "vm_page_t m" +.Pp +.Cd "options INVARIANTS" +.Cd "options INVARIANT_SUPPORT" +.Ft void +.Fn vm_page_assert_sbusied "vm_page_t m" +.Ft void +.Fn vm_page_assert_unbusied "vm_page_t m" +.Ft void +.Fn vm_page_assert_xbusied "vm_page_t m" +.Sh DESCRIPTION +Page identity is usually protected by higher level locks like vm_object +locks and vm page locks. +However, sometimes it is not possible to hold such locks for the time +necessary to complete the identity change. +In such case the page can be exclusively busied by a thread which needs +to own the identity for a certain amount of time. +.Pp +In other situations, threads do not need to change the identity of the +page but they want to prevent other threads from changing the identity +themselves. +For example, when a thread wants to access or update page contents +without a lock held the page is shared busied. +.Pp +Before busing a page the vm_object lock must be held. +The same rule applies when a page is unbusied. +This makes the vm_object lock a real busy interlock. +.Pp +The +.Fn vm_page_busied +function returns non-zero if the current thread busied +.Fa m +in either exclusive or shared mode. +Returns zero otherwise. +.Pp +The +.Fn vm_page_busy_downgrade +function must be used to downgrade +.Fa m +from an exclusive busy state to a shared busy state. +.Pp +The +.Fn vm_page_busy_sleep +function puts the invoking thread to sleep using the appropriate +waitchannels for the busy mechanism. +The parameter +.Fa msg +is a string describing the sleep condition for userland tools. +.Pp +The +.Fn vm_page_busied +function returns non-zero if the current thread busied +.Fa m +in shared mode. +Returns zero otherwise. +.Pp +The +.Fn vm_page_sbusy +function shared busies +.Fa m . +.Pp +The +.Fn vm_page_sleep_if_busy +function puts the invoking thread to sleep, using the appropriate +waitchannels for the busy mechanism, if +.Fa m . +is busied in either exclusive or shared mode. +If the invoking thread slept a non-zero value is returned, otherwise +0 is returned. +The parameter +.Fa msg +is a string describing the sleep condition for userland tools. +.Pp +The +.Fn vm_page_sunbusy +function shared unbusies +.Fa m . +.Pp +The +.Fn vm_page_trysbusy +attempts to shared busy +.Fa m . +If the operation cannot immediately succeed +.Fn vm_page_trysbusy +returns 0, otherwise a non-zero value is returned. +.Pp +The +.Fn vm_page_tryxbusy +attempts to exclusive busy +.Fa m . +If the operation cannot immediately succeed +.Fn vm_page_tryxbusy +returns 0, otherwise a non-zero value is returned. +.Pp +The +.Fn vm_page_xbusied +function returns non-zero if the current thread busied +.Fa m +in exclusive mode. +Returns zero otherwise. +.Pp +The +.Fn vm_page_xbusy +function exclusive busies +.Fa m . +.Pp +The +.Fn vm_page_xunbusy +function exclusive unbusies +.Fa m . +Assertions on the busy state allow kernels compiled with +.Cd "options INVARIANTS" +and +.Cd "options INVARIANT_SUPPORT" +to panic if they are not respected. +.Pp +The +.Fn vm_page_assert_sbusied +function panics if +.Fa m +is not shared busied. +.Pp +The +.Fn vm_page_assert_unbusied +function panics if +.Fa m +is not unbusied. +.Pp +The +.Fn vm_page_assert_xbusied +function panics if +.Fa m +is not exclusive busied. +.Sh SEE ALSO +.Xr VOP_GETPAGES 9 , +.Xr vm_page_aflag 9 , +.Xr vm_page_alloc 9 , +.Xr vm_page_deactivate 9 , +.Xr vm_page_free 9 , +.Xr vm_page_grab 9 , +.Xr vm_page_insert 9 , +.Xr vm_page_lookup 9 , +.Xr vm_page_rename 9 Modified: projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c ============================================================================== --- projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/sys/amd64/amd64/pmap.c Thu Aug 22 04:07:15 2013 (r254636) @@ -3931,7 +3931,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, KASSERT((m->oflags & VPO_UNMANAGED) != 0 || va < kmi.clean_sva || va >= kmi.clean_eva, ("pmap_enter: managed mapping within the clean submap")); - if ((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) == 0) + if ((m->oflags & VPO_UNMANAGED) == 0 && !vm_page_xbusied(m)) VM_OBJECT_ASSERT_WLOCKED(m->object); pa = VM_PAGE_TO_PHYS(m); newpte = (pt_entry_t)(pa | PG_A | PG_V); @@ -5121,13 +5121,12 @@ pmap_is_modified(vm_page_t m) ("pmap_is_modified: page %p is not managed", m)); /* - * If the page is not VPO_BUSY, then PGA_WRITEABLE cannot be + * If the page is not exclusive busied, then PGA_WRITEABLE cannot be * concurrently set while the object is locked. Thus, if PGA_WRITEABLE * is clear, no PTEs can have PG_M set. */ VM_OBJECT_ASSERT_WLOCKED(m->object); - if ((m->oflags & VPO_BUSY) == 0 && - (m->aflags & PGA_WRITEABLE) == 0) + if (!vm_page_xbusied(m) && (m->aflags & PGA_WRITEABLE) == 0) return (FALSE); rw_wlock(&pvh_global_lock); rv = pmap_is_modified_pvh(&m->md) || @@ -5254,13 +5253,12 @@ pmap_remove_write(vm_page_t m) ("pmap_remove_write: page %p is not managed", m)); /* - * If the page is not VPO_BUSY, then PGA_WRITEABLE cannot be set by - * another thread while the object is locked. Thus, if PGA_WRITEABLE - * is clear, no page table entries need updating. + * If the page is not exclusive busied, then PGA_WRITEABLE cannot be + * set by another thread while the object is locked. Thus, + * if PGA_WRITEABLE is clear, no page table entries need updating. */ VM_OBJECT_ASSERT_WLOCKED(m->object); - if ((m->oflags & VPO_BUSY) == 0 && - (m->aflags & PGA_WRITEABLE) == 0) + if (!vm_page_xbusied(m) && (m->aflags & PGA_WRITEABLE) == 0) return; rw_wlock(&pvh_global_lock); if ((m->flags & PG_FICTITIOUS) != 0) @@ -5473,13 +5471,13 @@ pmap_clear_modify(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_clear_modify: page %p is not managed", m)); VM_OBJECT_ASSERT_WLOCKED(m->object); - KASSERT((m->oflags & VPO_BUSY) == 0, - ("pmap_clear_modify: page %p is busy", m)); + KASSERT(!vm_page_xbusied(m), + ("pmap_clear_modify: page %p is exclusive busied", m)); /* * If the page is not PGA_WRITEABLE, then no PTEs can have PG_M set. * If the object containing the page is locked and the page is not - * VPO_BUSY, then PGA_WRITEABLE cannot be concurrently set. + * exclusive busied, then PGA_WRITEABLE cannot be concurrently set. */ if ((m->aflags & PGA_WRITEABLE) == 0) return; Modified: projects/bhyve_npt_pmap/sys/amd64/conf/GENERIC ============================================================================== --- projects/bhyve_npt_pmap/sys/amd64/conf/GENERIC Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/sys/amd64/conf/GENERIC Thu Aug 22 04:07:15 2013 (r254636) @@ -74,9 +74,8 @@ options INCLUDE_CONFIG_FILE # Inclu # Debugging support. Always need this: options KDB # Enable kernel debugger support. -# For minimum debugger support (stable branch) use: options KDB_TRACE # Print a stack trace for a panic. -# For full debugger support use this instead: +# For full debugger support use (turn off in stable branch): options DDB # Support DDB. options GDB # Support remote GDB. options DEADLKRES # Enable the deadlock resolver Modified: projects/bhyve_npt_pmap/sys/arm/arm/pmap-v6.c ============================================================================== --- projects/bhyve_npt_pmap/sys/arm/arm/pmap-v6.c Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/sys/arm/arm/pmap-v6.c Thu Aug 22 04:07:15 2013 (r254636) @@ -2670,8 +2670,8 @@ pmap_enter_locked(pmap_t pmap, vm_offset pa = systempage.pv_pa; m = NULL; } else { - KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || - (flags & M_NOWAIT) != 0, + KASSERT((m->oflags & VPO_UNMANAGED) != 0 || + vm_page_xbusied(m) || (flags & M_NOWAIT) != 0, ("pmap_enter_locked: page %p is not busy", m)); pa = VM_PAGE_TO_PHYS(m); } @@ -3934,13 +3934,12 @@ pmap_is_modified(vm_page_t m) ("pmap_is_modified: page %p is not managed", m)); rv = FALSE; /* - * If the page is not VPO_BUSY, then PGA_WRITEABLE cannot be + * If the page is not exclusive busied, then PGA_WRITEABLE cannot be * concurrently set while the object is locked. Thus, if PGA_WRITEABLE * is clear, no PTEs can have PG_M set. */ VM_OBJECT_ASSERT_WLOCKED(m->object); - if ((m->oflags & VPO_BUSY) == 0 && - (m->aflags & PGA_WRITEABLE) == 0) + if (!vm_page_xbusied(m) && (m->aflags & PGA_WRITEABLE) == 0) return (rv); rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { @@ -3968,13 +3967,13 @@ pmap_clear_modify(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_clear_modify: page %p is not managed", m)); VM_OBJECT_ASSERT_WLOCKED(m->object); - KASSERT((m->oflags & VPO_BUSY) == 0, - ("pmap_clear_modify: page %p is busy", m)); + KASSERT(!vm_page_xbusied(m), + ("pmap_clear_modify: page %p is exclusive busied", m)); /* * If the page is not PGA_WRITEABLE, then no mappings can be modified. * If the object containing the page is locked and the page is not - * VPO_BUSY, then PGA_WRITEABLE cannot be concurrently set. + * exclusive busied, then PGA_WRITEABLE cannot be concurrently set. */ if ((m->aflags & PGA_WRITEABLE) == 0) return; @@ -4009,13 +4008,12 @@ pmap_remove_write(vm_page_t m) ("pmap_remove_write: page %p is not managed", m)); /* - * If the page is not VPO_BUSY, then PGA_WRITEABLE cannot be set by - * another thread while the object is locked. Thus, if PGA_WRITEABLE - * is clear, no page table entries need updating. + * If the page is not exclusive busied, then PGA_WRITEABLE cannot be + * set by another thread while the object is locked. Thus, + * if PGA_WRITEABLE is clear, no page table entries need updating. */ VM_OBJECT_ASSERT_WLOCKED(m->object); - if ((m->oflags & VPO_BUSY) != 0 || - (m->aflags & PGA_WRITEABLE) != 0) + if (vm_page_xbusied(m) || (m->aflags & PGA_WRITEABLE) != 0) pmap_clearbit(m, PVF_WRITE); } Modified: projects/bhyve_npt_pmap/sys/arm/arm/pmap.c ============================================================================== --- projects/bhyve_npt_pmap/sys/arm/arm/pmap.c Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/sys/arm/arm/pmap.c Thu Aug 22 04:07:15 2013 (r254636) @@ -3319,8 +3319,8 @@ pmap_enter_locked(pmap_t pmap, vm_offset pa = systempage.pv_pa; m = NULL; } else { - KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || - (flags & M_NOWAIT) != 0, + KASSERT((m->oflags & VPO_UNMANAGED) != 0 || + vm_page_xbusied(m) || (flags & M_NOWAIT) != 0, ("pmap_enter_locked: page %p is not busy", m)); pa = VM_PAGE_TO_PHYS(m); } @@ -4555,13 +4555,13 @@ pmap_clear_modify(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_clear_modify: page %p is not managed", m)); VM_OBJECT_ASSERT_WLOCKED(m->object); - KASSERT((m->oflags & VPO_BUSY) == 0, - ("pmap_clear_modify: page %p is busy", m)); + KASSERT(!vm_page_xbusied(m), + ("pmap_clear_modify: page %p is exclusive busied", m)); /* * If the page is not PGA_WRITEABLE, then no mappings can be modified. * If the object containing the page is locked and the page is not - * VPO_BUSY, then PGA_WRITEABLE cannot be concurrently set. + * exclusive busied, then PGA_WRITEABLE cannot be concurrently set. */ if ((m->aflags & PGA_WRITEABLE) == 0) return; @@ -4612,13 +4612,12 @@ pmap_remove_write(vm_page_t m) ("pmap_remove_write: page %p is not managed", m)); /* - * If the page is not VPO_BUSY, then PGA_WRITEABLE cannot be set by - * another thread while the object is locked. Thus, if PGA_WRITEABLE - * is clear, no page table entries need updating. + * If the page is not exclusive busied, then PGA_WRITEABLE cannot be + * set by another thread while the object is locked. Thus, + * if PGA_WRITEABLE is clear, no page table entries need updating. */ VM_OBJECT_ASSERT_WLOCKED(m->object); - if ((m->oflags & VPO_BUSY) != 0 || - (m->aflags & PGA_WRITEABLE) != 0) + if (vm_page_xbusied(m) || (m->aflags & PGA_WRITEABLE) != 0) pmap_clearbit(m, PVF_WRITE); } Modified: projects/bhyve_npt_pmap/sys/boot/common/part.c ============================================================================== --- projects/bhyve_npt_pmap/sys/boot/common/part.c Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/sys/boot/common/part.c Thu Aug 22 04:07:15 2013 (r254636) @@ -181,7 +181,7 @@ gpt_checkhdr(struct gpt_hdr *hdr, uint64 } hdr->hdr_entries = le32toh(hdr->hdr_entries); hdr->hdr_entsz = le32toh(hdr->hdr_entsz); - if (hdr->hdr_entries < 128 || + if (hdr->hdr_entries == 0 || hdr->hdr_entsz < sizeof(struct gpt_ent) || sectorsize % hdr->hdr_entsz != 0) { DEBUG("invalid entry size or number of entries"); @@ -203,11 +203,14 @@ gpt_checktbl(const struct gpt_hdr *hdr, int i, cnt; cnt = size / hdr->hdr_entsz; - /* Check CRC only when buffer size is enough for table. */ - if (hdr->hdr_entries <= cnt && - crc32(tbl, size) != hdr->hdr_crc_table) { - DEBUG("GPT table's CRC doesn't match"); - return (-1); + if (hdr->hdr_entries <= cnt) { + cnt = hdr->hdr_entries; + /* Check CRC only when buffer size is enough for table. */ + if (hdr->hdr_crc_table != + crc32(tbl, hdr->hdr_entries * hdr->hdr_entsz)) { + DEBUG("GPT table's CRC doesn't match"); + return (-1); + } } ent = (struct gpt_ent *)tbl; for (i = 0; i < cnt; i++, ent++) { Modified: projects/bhyve_npt_pmap/sys/boot/forth/beastie.4th ============================================================================== --- projects/bhyve_npt_pmap/sys/boot/forth/beastie.4th Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/sys/boot/forth/beastie.4th Thu Aug 22 04:07:15 2013 (r254636) @@ -1,6 +1,6 @@ \ Copyright (c) 2003 Scott Long <scottl@freebsd.org> \ Copyright (c) 2003 Aleksander Fafula <alex@fafula.com> -\ Copyright (c) 2006-2011 Devin Teske <dteske@FreeBSD.org> +\ Copyright (c) 2006-2013 Devin Teske <dteske@FreeBSD.org> \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -181,8 +181,8 @@ variable logoY \ beastie Color ``Helper Daemon'' mascot (19 rows x 34 columns) \ beastiebw B/W ``Helper Daemon'' mascot (19 rows x 34 columns) \ fbsdbw "FreeBSD" logo in B/W (13 rows x 21 columns) -\ orb Color ``Orb'' mascot (15 rows x 30 columns) -\ orbbw B/W ``Orb'' mascot (15 rows x 32 columns) (default) +\ orb Color ``Orb'' mascot (15 rows x 30 columns) (default) +\ orbbw B/W ``Orb'' mascot (15 rows x 32 columns) \ \ NOTE: Setting `loader_logo' to an undefined value (such as "none") will \ prevent beastie from being drawn. Modified: projects/bhyve_npt_pmap/sys/boot/forth/color.4th ============================================================================== --- projects/bhyve_npt_pmap/sys/boot/forth/color.4th Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/sys/boot/forth/color.4th Thu Aug 22 04:07:15 2013 (r254636) @@ -1,4 +1,4 @@ -\ Copyright (c) 2011 Devin Teske <dteske@FreeBSD.org> +\ Copyright (c) 2011-2013 Devin Teske <dteske@FreeBSD.org> \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -26,23 +26,24 @@ marker task-color.4th -\ This function returns TRUE if the `loader_color' environment variable is set -\ to YES, yes, or 1. Otherwise, FALSE is returned. +\ This function returns FALSE if the `loader_color' environment variable is set +\ to NO, no, or 0. Otherwise, TRUE is returned (unless booting serial). \ : loader_color? ( -- N ) s" loader_color" getenv dup -1 <> if - 2dup s" YES" compare-insensitive 0= if + 2dup s" NO" compare-insensitive 0= if 2drop - TRUE exit + FALSE exit then - 2dup s" 1" compare 0= if + 2dup s" 0" compare 0= if 2drop - TRUE exit + FALSE exit then drop then + drop - drop FALSE exit + boot_serial? if FALSE else TRUE then ; Modified: projects/bhyve_npt_pmap/sys/boot/forth/color.4th.8 ============================================================================== --- projects/bhyve_npt_pmap/sys/boot/forth/color.4th.8 Thu Aug 22 03:43:12 2013 (r254635) +++ projects/bhyve_npt_pmap/sys/boot/forth/color.4th.8 Thu Aug 22 04:07:15 2013 (r254636) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011 Devin Teske +.\" Copyright (c) 2011-2013 Devin Teske .\" All rights reserved. *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308220407.r7M47Fad016729>