From owner-svn-src-user@FreeBSD.ORG Sun Apr 19 10:47:56 2015 Return-Path: Delivered-To: svn-src-user@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 85A3F368; Sun, 19 Apr 2015 10:47:56 +0000 (UTC) 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 67387980; Sun, 19 Apr 2015 10:47:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JAluKN048456; Sun, 19 Apr 2015 10:47:56 GMT (envelope-from jceel@FreeBSD.org) Received: (from jceel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JAlu5Q048451; Sun, 19 Apr 2015 10:47:56 GMT (envelope-from jceel@FreeBSD.org) Message-Id: <201504191047.t3JAlu5Q048451@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jceel set sender to jceel@FreeBSD.org using -f From: Jakub Wojciech Klama Date: Sun, 19 Apr 2015 10:47:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281737 - user/jceel/soc2014_evdev/head/sys/dev/evdev X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 10:47:56 -0000 Author: jceel Date: Sun Apr 19 10:47:55 2015 New Revision: 281737 URL: https://svnweb.freebsd.org/changeset/base/281737 Log: Add event checks to evdev_push_event() to prevent overwriting event state arrays by potentially malicious uinput provider. Modified: user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.c user/jceel/soc2014_evdev/head/sys/dev/evdev/uinput.c Modified: user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.c ============================================================================== --- user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.c Sun Apr 19 09:35:46 2015 (r281736) +++ user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.c Sun Apr 19 10:47:55 2015 (r281737) @@ -60,6 +60,7 @@ static void evdev_assign_id(struct evdev static void evdev_start_repeat(struct evdev_dev *, int32_t); static void evdev_stop_repeat(struct evdev_dev *); #endif +static int evdev_check_event(struct evdev_dev *, uint16_t, uint16_t, int32_t); static void evdev_client_push(struct evdev_client *, uint16_t, uint16_t, int32_t); @@ -270,6 +271,37 @@ evdev_set_repeat_params(struct evdev_dev evdev->ev_rep[property] = value; } +static int +evdev_check_event(struct evdev_dev *evdev, uint16_t type, uint16_t code, + int32_t value) +{ + + if (type == EV_KEY) { + if (code >= KEY_CNT) + return (EINVAL); + } else if (type == EV_REL) { + if (code >= REL_CNT) + return (EINVAL); + } else if (type == EV_ABS) { + if (code >= ABS_CNT) + return (EINVAL); + } else if (type == EV_MSC) { + if (code >= MSC_CNT) + return (EINVAL); + } else if (type == EV_LED) { + if (code >= LED_CNT) + return (EINVAL); + } else if (type == EV_SND) { + if (code >= SND_CNT) + return (EINVAL); + } else if (type == EV_SW) { + if (code >= SW_CNT) + return (EINVAL); + } else + return (EINVAL); + + return (0); +} int evdev_push_event(struct evdev_dev *evdev, uint16_t type, uint16_t code, @@ -277,6 +309,9 @@ evdev_push_event(struct evdev_dev *evdev { struct evdev_client *client; + if (evdev_check_event(evdev, type, code, value) != 0) + return (EINVAL); + debugf("%s pushed event %d/%d/%d", evdev->ev_shortname, type, code, value); Modified: user/jceel/soc2014_evdev/head/sys/dev/evdev/uinput.c ============================================================================== --- user/jceel/soc2014_evdev/head/sys/dev/evdev/uinput.c Sun Apr 19 09:35:46 2015 (r281736) +++ user/jceel/soc2014_evdev/head/sys/dev/evdev/uinput.c Sun Apr 19 10:47:55 2015 (r281737) @@ -87,7 +87,6 @@ struct uinput_cdev_state { bool ucs_connected; struct evdev_dev * ucs_evdev; - struct evdev_dev ucs_state; struct mtx ucs_mtx; }; @@ -181,8 +180,11 @@ uinput_write(struct cdev *dev, struct ui while (uio->uio_resid > 0) { uiomove(&event, sizeof(struct input_event), uio); - evdev_push_event(state->ucs_evdev, event.type, event.code, + ret = evdev_push_event(state->ucs_evdev, event.type, event.code, event.value); + + if (ret != 0) + return (ret); } } From owner-svn-src-user@FreeBSD.ORG Sun Apr 19 12:11:08 2015 Return-Path: Delivered-To: svn-src-user@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 C27E555D; Sun, 19 Apr 2015 12:11:08 +0000 (UTC) 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 B15E8176; Sun, 19 Apr 2015 12:11:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JCB8CM017739; Sun, 19 Apr 2015 12:11:08 GMT (envelope-from jceel@FreeBSD.org) Received: (from jceel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JCB8or017735; Sun, 19 Apr 2015 12:11:08 GMT (envelope-from jceel@FreeBSD.org) Message-Id: <201504191211.t3JCB8or017735@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jceel set sender to jceel@FreeBSD.org using -f From: Jakub Wojciech Klama Date: Sun, 19 Apr 2015 12:11:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281739 - user/jceel/soc2014_evdev/head/sys/dev/evdev X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 12:11:08 -0000 Author: jceel Date: Sun Apr 19 12:11:07 2015 New Revision: 281739 URL: https://svnweb.freebsd.org/changeset/base/281739 Log: Add futher checks to ensure that supported event types array won't get overwritten by provider. Modified: user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.c user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.h Modified: user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.c ============================================================================== --- user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.c Sun Apr 19 11:34:41 2015 (r281738) +++ user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.c Sun Apr 19 12:11:07 2015 (r281739) @@ -186,65 +186,96 @@ evdev_set_softc(struct evdev_dev *evdev, evdev->ev_softc = softc; } -inline void +inline int evdev_support_event(struct evdev_dev *evdev, uint16_t type) { + if (type >= EV_CNT) + return (EINVAL); + set_bit(evdev->ev_type_flags, type); + return (0); } -inline void +inline int evdev_support_key(struct evdev_dev *evdev, uint16_t code) { + if (code >= KEY_CNT) + return (EINVAL); + set_bit(evdev->ev_key_flags, code); + return (0); } -inline void +inline int evdev_support_rel(struct evdev_dev *evdev, uint16_t code) { + if (code >= REL_CNT) + return (EINVAL); + set_bit(evdev->ev_rel_flags, code); + return (0); } -inline void +inline int evdev_support_abs(struct evdev_dev *evdev, uint16_t code) { + if (code >= ABS_CNT) + return (EINVAL); + set_bit(evdev->ev_abs_flags, code); + return (0); } -inline void +inline int evdev_support_msc(struct evdev_dev *evdev, uint16_t code) { + if (code >= MSC_CNT) + return (EINVAL); + set_bit(evdev->ev_msc_flags, code); + return (0); } -inline void +inline int evdev_support_led(struct evdev_dev *evdev, uint16_t code) { + if (code >= LED_CNT) + return (EINVAL); + set_bit(evdev->ev_led_flags, code); + return (0); } -inline void +inline int evdev_support_snd(struct evdev_dev *evdev, uint16_t code) { + if (code >= SND_CNT) + return (EINVAL); + set_bit(evdev->ev_snd_flags, code); + return (0); } -inline void +inline int evdev_support_sw(struct evdev_dev *evdev, uint16_t code) { + if (code >= SW_CNT) + return (EINVAL); set_bit(evdev->ev_sw_flags, code); + return (0); } -inline void +inline int evdev_support_repeat(struct evdev_dev *evdev, enum evdev_repeat_mode mode) { @@ -252,6 +283,7 @@ evdev_support_repeat(struct evdev_dev *e set_bit(evdev->ev_type_flags, EV_REP); evdev->ev_repeat_mode = mode; + return (0); } Modified: user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.h ============================================================================== --- user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.h Sun Apr 19 11:34:41 2015 (r281738) +++ user/jceel/soc2014_evdev/head/sys/dev/evdev/evdev.h Sun Apr 19 12:11:07 2015 (r281739) @@ -152,15 +152,15 @@ int evdev_sync(struct evdev_dev *); int evdev_mt_sync(struct evdev_dev *); int evdev_cdev_create(struct evdev_dev *); int evdev_cdev_destroy(struct evdev_dev *); -void evdev_support_event(struct evdev_dev *, uint16_t); -void evdev_support_key(struct evdev_dev *, uint16_t); -void evdev_support_rel(struct evdev_dev *, uint16_t); -void evdev_support_abs(struct evdev_dev *, uint16_t); -void evdev_support_msc(struct evdev_dev *, uint16_t); -void evdev_support_led(struct evdev_dev *, uint16_t); -void evdev_support_snd(struct evdev_dev *, uint16_t); -void evdev_support_sw(struct evdev_dev *, uint16_t); -void evdev_support_repeat(struct evdev_dev *, enum evdev_repeat_mode); +int evdev_support_event(struct evdev_dev *, uint16_t); +int evdev_support_key(struct evdev_dev *, uint16_t); +int evdev_support_rel(struct evdev_dev *, uint16_t); +int evdev_support_abs(struct evdev_dev *, uint16_t); +int evdev_support_msc(struct evdev_dev *, uint16_t); +int evdev_support_led(struct evdev_dev *, uint16_t); +int evdev_support_snd(struct evdev_dev *, uint16_t); +int evdev_support_sw(struct evdev_dev *, uint16_t); +int evdev_support_repeat(struct evdev_dev *, enum evdev_repeat_mode); void evdev_set_absinfo(struct evdev_dev *, uint16_t, struct input_absinfo *); void evdev_set_repeat_params(struct evdev_dev *, uint16_t, int); From owner-svn-src-user@FreeBSD.ORG Sun Apr 19 14:55:23 2015 Return-Path: Delivered-To: svn-src-user@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 8F24A297; Sun, 19 Apr 2015 14:55:23 +0000 (UTC) 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 63F3D400; Sun, 19 Apr 2015 14:55:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JEtN5L054099; Sun, 19 Apr 2015 14:55:23 GMT (envelope-from jceel@FreeBSD.org) Received: (from jceel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JEtNLj054098; Sun, 19 Apr 2015 14:55:23 GMT (envelope-from jceel@FreeBSD.org) Message-Id: <201504191455.t3JEtNLj054098@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jceel set sender to jceel@FreeBSD.org using -f From: Jakub Wojciech Klama Date: Sun, 19 Apr 2015 14:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281744 - user/jceel/soc2014_evdev/head/sys/dev/evdev X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 14:55:23 -0000 Author: jceel Date: Sun Apr 19 14:55:22 2015 New Revision: 281744 URL: https://svnweb.freebsd.org/changeset/base/281744 Log: To conform with Linux implementation, return ENOENT from EVIOCGPHYS and EVIOCGUNIQ ioctl if device is backed by uinput. Modified: user/jceel/soc2014_evdev/head/sys/dev/evdev/cdev.c Modified: user/jceel/soc2014_evdev/head/sys/dev/evdev/cdev.c ============================================================================== --- user/jceel/soc2014_evdev/head/sys/dev/evdev/cdev.c Sun Apr 19 13:51:25 2015 (r281743) +++ user/jceel/soc2014_evdev/head/sys/dev/evdev/cdev.c Sun Apr 19 14:55:22 2015 (r281744) @@ -367,7 +367,7 @@ evdev_ioctl(struct cdev *dev, u_long cmd case IOCBASECMD(EVIOCGREP): if (evdev->ev_repeat_mode == NO_REPEAT) - return ENOTSUP; + return (ENOTSUP); rep_params[0] = evdev->ev_rep[REP_DELAY]; rep_params[1] = evdev->ev_rep[REP_PERIOD]; @@ -376,7 +376,7 @@ evdev_ioctl(struct cdev *dev, u_long cmd case IOCBASECMD(EVIOCSREP): if (evdev->ev_repeat_mode == NO_REPEAT) - return ENOTSUP; + return (ENOTSUP); memcpy(rep_params, data, sizeof(rep_params)); evdev->ev_rep[REP_DELAY] = rep_params[0]; @@ -391,7 +391,7 @@ evdev_ioctl(struct cdev *dev, u_long cmd case IOCBASECMD(EVIOCGKEYCODE_V2): if (evdev->ev_methods->ev_get_keycode == NULL) - return ENOTSUP; + return (ENOTSUP); ke = (struct input_keymap_entry *)data; evdev->ev_methods->ev_get_keycode(evdev, evdev->ev_softc, ke); @@ -399,7 +399,7 @@ evdev_ioctl(struct cdev *dev, u_long cmd case IOCBASECMD(EVIOCSKEYCODE_V2): if (evdev->ev_methods->ev_set_keycode == NULL) - return ENOTSUP; + return (ENOTSUP); ke = (struct input_keymap_entry *)data; evdev->ev_methods->ev_set_keycode(evdev, evdev->ev_softc, ke); @@ -410,10 +410,16 @@ evdev_ioctl(struct cdev *dev, u_long cmd break; case EVIOCGPHYS(0): + if (evdev->ev_dev == NULL) + return (ENOENT); + strlcpy(data, evdev->ev_shortname, len); break; case EVIOCGUNIQ(0): + if (evdev->ev_dev == NULL) + return (ENOENT); + strlcpy(data, evdev->ev_serial, len); break; From owner-svn-src-user@FreeBSD.ORG Sun Apr 19 18:10:40 2015 Return-Path: Delivered-To: svn-src-user@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 880E9DFC; Sun, 19 Apr 2015 18:10:40 +0000 (UTC) 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 5BEBBA18; Sun, 19 Apr 2015 18:10:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JIAeda013223; Sun, 19 Apr 2015 18:10:40 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JIAdRR013220; Sun, 19 Apr 2015 18:10:39 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504191810.t3JIAdRR013220@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 19 Apr 2015 18:10:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281748 - in user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 18:10:40 -0000 Author: delphij Date: Sun Apr 19 18:10:39 2015 New Revision: 281748 URL: https://svnweb.freebsd.org/changeset/base/281748 Log: Add a separate tree for AVL for now before we implemented TRIM correctly. Modified: user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Modified: user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h ============================================================================== --- user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Sun Apr 19 17:15:55 2015 (r281747) +++ user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Sun Apr 19 18:10:39 2015 (r281748) @@ -115,6 +115,7 @@ struct vdev_queue { avl_tree_t vq_active_tree; avl_tree_t vq_read_offset_tree; avl_tree_t vq_write_offset_tree; + avl_tree_t vq_free_offset_tree; uint64_t vq_last_offset; hrtime_t vq_io_complete_ts; /* time last i/o completed */ kmutex_t vq_lock; Modified: user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sun Apr 19 17:15:55 2015 (r281747) +++ user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sun Apr 19 18:10:39 2015 (r281748) @@ -299,11 +299,13 @@ vdev_queue_class_tree(vdev_queue_t *vq, static inline avl_tree_t * vdev_queue_type_tree(vdev_queue_t *vq, zio_type_t t) { - ASSERT(t == ZIO_TYPE_READ || t == ZIO_TYPE_WRITE); + ASSERT(t == ZIO_TYPE_READ || t == ZIO_TYPE_WRITE || t == ZIO_TYPE_FREE); if (t == ZIO_TYPE_READ) return (&vq->vq_read_offset_tree); - else + else if (t == ZIO_TYPE_WRITE) return (&vq->vq_write_offset_tree); + else + return (&vq->vq_free_offset_tree); } int @@ -346,6 +348,9 @@ vdev_queue_init(vdev_t *vd) avl_create(vdev_queue_type_tree(vq, ZIO_TYPE_WRITE), vdev_queue_offset_compare, sizeof (zio_t), offsetof(struct zio, io_offset_node)); + avl_create(vdev_queue_type_tree(vq, ZIO_TYPE_FREE), + vdev_queue_offset_compare, sizeof (zio_t), + offsetof(struct zio, io_offset_node)); for (zio_priority_t p = 0; p < ZIO_PRIORITY_NUM_QUEUEABLE; p++) { int (*compfn) (const void *, const void *); @@ -377,6 +382,7 @@ vdev_queue_fini(vdev_t *vd) avl_destroy(&vq->vq_active_tree); avl_destroy(vdev_queue_type_tree(vq, ZIO_TYPE_READ)); avl_destroy(vdev_queue_type_tree(vq, ZIO_TYPE_WRITE)); + avl_destroy(vdev_queue_type_tree(vq, ZIO_TYPE_FREE)); mutex_destroy(&vq->vq_lock); } From owner-svn-src-user@FreeBSD.ORG Sun Apr 19 23:31:01 2015 Return-Path: Delivered-To: svn-src-user@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 57AEFFB2; Sun, 19 Apr 2015 23:31:01 +0000 (UTC) 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 2CF99E1E; Sun, 19 Apr 2015 23:31:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3JNV14g062591; Sun, 19 Apr 2015 23:31:01 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3JNV1pw062589; Sun, 19 Apr 2015 23:31:01 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504192331.t3JNV1pw062589@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 19 Apr 2015 23:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281754 - user/delphij/zfs-arc-rebase/sys/kern X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 23:31:01 -0000 Author: delphij Date: Sun Apr 19 23:31:00 2015 New Revision: 281754 URL: https://svnweb.freebsd.org/changeset/base/281754 Log: In r256613, taskqueue_enqueue_locked() have been modified to release the task queue lock before returning. In r276665, taskqueue_drain_all() will call taskqueue_enqueue_locked() to insert the barrier task into the queue, but did not reacquire the lock after it but later code expects the lock still being held (e.g. TQ_SLEEP()). The barrier task is special and if we release then reacquire the lock, there would be a small race window where a high priority task could sneak into the queue. Looking more closely, the race seems to be tolerable but is undesirable from semantics standpoint. To solve this, in taskqueue_drain_tq_queue(), instead of directly calling taskqueue_enqueue_locked(), insert the barrier task directly without releasing the lock. Modified: user/delphij/zfs-arc-rebase/sys/kern/subr_taskqueue.c Modified: user/delphij/zfs-arc-rebase/sys/kern/subr_taskqueue.c ============================================================================== --- user/delphij/zfs-arc-rebase/sys/kern/subr_taskqueue.c Sun Apr 19 22:33:24 2015 (r281753) +++ user/delphij/zfs-arc-rebase/sys/kern/subr_taskqueue.c Sun Apr 19 23:31:00 2015 (r281754) @@ -323,17 +323,16 @@ taskqueue_drain_tq_queue(struct taskqueu return; /* - * Enqueue our barrier with the lowest possible priority - * so we are inserted after all current tasks. + * Enqueue our barrier after all current tasks, but with + * the highest priority so that newly queued tasks cannot + * pass it. Because of the high priority, we can not use + * taskqueue_enqueue_locked directly (which drops the lock + * anyway) so just insert it at tail while we have the + * queue lock. */ - TASK_INIT(&t_barrier, 0, taskqueue_task_nop_fn, &t_barrier); - taskqueue_enqueue_locked(queue, &t_barrier); - - /* - * Raise the barrier's priority so newly queued tasks cannot - * pass it. - */ - t_barrier.ta_priority = USHRT_MAX; + TASK_INIT(&t_barrier, USHRT_MAX, taskqueue_task_nop_fn, &t_barrier); + STAILQ_INSERT_TAIL(&queue->tq_queue, &t_barrier, ta_link); + t_barrier.ta_pending = 1; /* * Once the barrier has executed, all previously queued tasks From owner-svn-src-user@FreeBSD.ORG Mon Apr 20 00:24:34 2015 Return-Path: Delivered-To: svn-src-user@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 6FB27816; Mon, 20 Apr 2015 00:24:34 +0000 (UTC) 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 5B53C31C; Mon, 20 Apr 2015 00:24:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3K0OY3T000739; Mon, 20 Apr 2015 00:24:34 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3K0OXhk000726; Mon, 20 Apr 2015 00:24:33 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504200024.t3K0OXhk000726@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 20 Apr 2015 00:24:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281757 - in user/delphij/zfs-arc-rebase: cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common sys/cddl/contrib/opens... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2015 00:24:34 -0000 Author: delphij Date: Mon Apr 20 00:24:32 2015 New Revision: 281757 URL: https://svnweb.freebsd.org/changeset/base/281757 Log: MFV r277431,281755: Reduce ARC lock contention by using finer grained locking in the ARC LRU lists by using separate lists and their own locks for each ARC state, and rework ARC reclaimation logic. Illumos issue: 5497 lock contention on arcs_mtx Added: user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c - copied unchanged from r277431, vendor-sys/illumos/dist/uts/common/fs/zfs/multilist.c user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/multilist.h - copied unchanged from r277431, vendor-sys/illumos/dist/uts/common/fs/zfs/sys/multilist.h Modified: user/delphij/zfs-arc-rebase/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h user/delphij/zfs-arc-rebase/sys/cddl/compat/opensolaris/sys/proc.h user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/Makefile.files user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c Directory Properties: user/delphij/zfs-arc-rebase/cddl/contrib/opensolaris/ (props changed) user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/ (props changed) Modified: user/delphij/zfs-arc-rebase/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- user/delphij/zfs-arc-rebase/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Sun Apr 19 23:55:59 2015 (r281756) +++ user/delphij/zfs-arc-rebase/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Mon Apr 20 00:24:32 2015 (r281757) @@ -545,6 +545,7 @@ extern void delay(clock_t ticks); } while (0); #define max_ncpus 64 +#define boot_ncpus (sysconf(_SC_NPROCESSORS_ONLN)) #define minclsyspri 60 #define maxclsyspri 99 Modified: user/delphij/zfs-arc-rebase/sys/cddl/compat/opensolaris/sys/proc.h ============================================================================== --- user/delphij/zfs-arc-rebase/sys/cddl/compat/opensolaris/sys/proc.h Sun Apr 19 23:55:59 2015 (r281756) +++ user/delphij/zfs-arc-rebase/sys/cddl/compat/opensolaris/sys/proc.h Mon Apr 20 00:24:32 2015 (r281757) @@ -47,6 +47,7 @@ #define maxclsyspri PVM #define max_ncpus mp_ncpus #define boot_max_ncpus mp_ncpus +#define boot_ncpus mp_ncpus #define TS_RUN 0 Modified: user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/Makefile.files ============================================================================== --- user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Sun Apr 19 23:55:59 2015 (r281756) +++ user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/Makefile.files Mon Apr 20 00:24:32 2015 (r281757) @@ -21,9 +21,9 @@ # # Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright (c) 2012 Nexenta Systems, Inc. All rights reserved. # Copyright (c) 2013 by Delphix. All rights reserved. # Copyright (c) 2013 by Saso Kiselkov. All rights reserved. +# Copyright 2014 Nexenta Systems, Inc. All rights reserved. # # # This Makefile defines all file modules for the directory uts/common @@ -32,6 +32,7 @@ ZFS_COMMON_OBJS += \ arc.o \ + blkptr.o \ bplist.o \ blkptr.o \ bpobj.o \ @@ -65,6 +66,7 @@ ZFS_COMMON_OBJS += \ lz4.o \ lzjb.o \ metaslab.o \ + multilist.o \ range_tree.o \ refcount.o \ rrwlock.o \ Modified: user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Apr 19 23:55:59 2015 (r281756) +++ user/delphij/zfs-arc-rebase/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Apr 20 00:24:32 2015 (r281757) @@ -129,6 +129,7 @@ #include #include #include +#include #ifdef _KERNEL #include #endif @@ -149,21 +150,39 @@ int arc_procfd; #endif #endif /* illumos */ -static kmutex_t arc_reclaim_thr_lock; -static kcondvar_t arc_reclaim_thr_cv; /* used to signal reclaim thr */ -static uint8_t arc_thread_exit; +static kmutex_t arc_reclaim_lock; +static kcondvar_t arc_reclaim_thread_cv; +static boolean_t arc_reclaim_thread_exit; +static kcondvar_t arc_reclaim_waiters_cv; + +static kmutex_t arc_user_evicts_lock; +static kcondvar_t arc_user_evicts_cv; +static boolean_t arc_user_evicts_thread_exit; uint_t arc_reduce_dnlc_percent = 3; /* - * The number of iterations through arc_evict_*() before we - * drop & reacquire the lock. + * The number of headers to evict in arc_evict_state_impl() before + * dropping the sublist lock and evicting from another sublist. A lower + * value means we're more likely to evict the "correct" header (i.e. the + * oldest header in the arc state), but comes with higher overhead + * (i.e. more invocations of arc_evict_state_impl()). */ -int arc_evict_iterations = 100; +int zfs_arc_evict_batch_limit = 10; + +/* + * The number of sublists used for each of the arc state lists. If this + * is not set to a suitable value by the user, it will be configured to + * the number of CPUs on the system in arc_init(). + */ +int zfs_arc_num_sublists_per_state = 0; /* number of seconds before growing cache again */ static int arc_grow_retry = 60; +/* shift of arc_c for calculating overflow limit in arc_get_data_buf */ +int zfs_arc_overflow_shift = 8; + /* shift of arc_c for calculating both min and max arc_p */ static int arc_p_min_shift = 4; @@ -316,10 +335,19 @@ SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_meta */ typedef struct arc_state { - list_t arcs_list[ARC_BUFC_NUMTYPES]; /* list of evictable buffers */ - uint64_t arcs_lsize[ARC_BUFC_NUMTYPES]; /* amount of evictable data */ - uint64_t arcs_size; /* total amount of data in this state */ - kmutex_t arcs_mtx; + /* + * list of evictable buffers + */ + multilist_t arcs_list[ARC_BUFC_NUMTYPES]; + /* + * total amount of evictable data in this state + */ + uint64_t arcs_lsize[ARC_BUFC_NUMTYPES]; + /* + * total amount of data in this state; this includes: evictable, + * non-evictable, ARC_BUFC_DATA, and ARC_BUFC_METADATA. + */ + uint64_t arcs_size; } arc_state_t; /* The 6 states: */ @@ -347,8 +375,6 @@ typedef struct arc_stats { kstat_named_t arcstat_mfu_ghost_hits; kstat_named_t arcstat_allocated; kstat_named_t arcstat_deleted; - kstat_named_t arcstat_stolen; - kstat_named_t arcstat_recycle_miss; /* * Number of buffers that could not be evicted because the hash lock * was held by another thread. The lock may not necessarily be held @@ -362,9 +388,15 @@ typedef struct arc_stats { * not from the spa we're trying to evict from. */ kstat_named_t arcstat_evict_skip; + /* + * Number of times arc_evict_state() was unable to evict enough + * buffers to reach it's target amount. + */ + kstat_named_t arcstat_evict_not_enough; kstat_named_t arcstat_evict_l2_cached; kstat_named_t arcstat_evict_l2_eligible; kstat_named_t arcstat_evict_l2_ineligible; + kstat_named_t arcstat_evict_l2_skip; kstat_named_t arcstat_hash_elements; kstat_named_t arcstat_hash_elements_max; kstat_named_t arcstat_hash_collisions; @@ -515,11 +547,12 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_writes_sent; kstat_named_t arcstat_l2_writes_done; kstat_named_t arcstat_l2_writes_error; - kstat_named_t arcstat_l2_writes_hdr_miss; + kstat_named_t arcstat_l2_writes_lock_retry; kstat_named_t arcstat_l2_evict_lock_retry; kstat_named_t arcstat_l2_evict_reading; kstat_named_t arcstat_l2_evict_l1cached; kstat_named_t arcstat_l2_free_on_write; + kstat_named_t arcstat_l2_cdata_free_on_write; kstat_named_t arcstat_l2_abort_lowmem; kstat_named_t arcstat_l2_cksum_bad; kstat_named_t arcstat_l2_io_error; @@ -535,7 +568,6 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_write_buffer_iter; kstat_named_t arcstat_l2_write_pios; kstat_named_t arcstat_l2_write_buffer_bytes_scanned; - kstat_named_t arcstat_l2_write_buffer_list_iter; kstat_named_t arcstat_l2_write_buffer_list_null_iter; kstat_named_t arcstat_memory_throttle_count; kstat_named_t arcstat_duplicate_buffers; @@ -564,13 +596,13 @@ static arc_stats_t arc_stats = { { "mfu_ghost_hits", KSTAT_DATA_UINT64 }, { "allocated", KSTAT_DATA_UINT64 }, { "deleted", KSTAT_DATA_UINT64 }, - { "stolen", KSTAT_DATA_UINT64 }, - { "recycle_miss", KSTAT_DATA_UINT64 }, { "mutex_miss", KSTAT_DATA_UINT64 }, { "evict_skip", KSTAT_DATA_UINT64 }, + { "evict_not_enough", KSTAT_DATA_UINT64 }, { "evict_l2_cached", KSTAT_DATA_UINT64 }, { "evict_l2_eligible", KSTAT_DATA_UINT64 }, { "evict_l2_ineligible", KSTAT_DATA_UINT64 }, + { "evict_l2_skip", KSTAT_DATA_UINT64 }, { "hash_elements", KSTAT_DATA_UINT64 }, { "hash_elements_max", KSTAT_DATA_UINT64 }, { "hash_collisions", KSTAT_DATA_UINT64 }, @@ -609,11 +641,12 @@ static arc_stats_t arc_stats = { { "l2_writes_sent", KSTAT_DATA_UINT64 }, { "l2_writes_done", KSTAT_DATA_UINT64 }, { "l2_writes_error", KSTAT_DATA_UINT64 }, - { "l2_writes_hdr_miss", KSTAT_DATA_UINT64 }, + { "l2_writes_lock_retry", KSTAT_DATA_UINT64 }, { "l2_evict_lock_retry", KSTAT_DATA_UINT64 }, { "l2_evict_reading", KSTAT_DATA_UINT64 }, { "l2_evict_l1cached", KSTAT_DATA_UINT64 }, { "l2_free_on_write", KSTAT_DATA_UINT64 }, + { "l2_cdata_free_on_write", KSTAT_DATA_UINT64 }, { "l2_abort_lowmem", KSTAT_DATA_UINT64 }, { "l2_cksum_bad", KSTAT_DATA_UINT64 }, { "l2_io_error", KSTAT_DATA_UINT64 }, @@ -629,7 +662,6 @@ static arc_stats_t arc_stats = { { "l2_write_buffer_iter", KSTAT_DATA_UINT64 }, { "l2_write_pios", KSTAT_DATA_UINT64 }, { "l2_write_buffer_bytes_scanned", KSTAT_DATA_UINT64 }, - { "l2_write_buffer_list_iter", KSTAT_DATA_UINT64 }, { "l2_write_buffer_list_null_iter", KSTAT_DATA_UINT64 }, { "memory_throttle_count", KSTAT_DATA_UINT64 }, { "duplicate_buffers", KSTAT_DATA_UINT64 }, @@ -781,7 +813,7 @@ typedef struct l1arc_buf_hdr { /* protected by arc state mutex */ arc_state_t *b_state; - list_node_t b_arc_node; + multilist_node_t b_arc_node; /* updated atomically */ clock_t b_arc_access; @@ -852,7 +884,6 @@ sysctl_vfs_zfs_arc_meta_limit(SYSCTL_HAN #endif static arc_buf_t *arc_eviction_list; -static kmutex_t arc_eviction_mtx; static arc_buf_hdr_t arc_eviction_hdr; #define GHOST_STATE(state) \ @@ -1071,8 +1102,7 @@ static uint8_t l2arc_thread_exit; static void arc_get_data_buf(arc_buf_t *); static void arc_access(arc_buf_hdr_t *, kmutex_t *); -static int arc_evict_needed(arc_buf_contents_t); -static void arc_evict_ghost(arc_state_t *, uint64_t, int64_t); +static boolean_t arc_is_overflowing(); static void arc_buf_watch(arc_buf_t *); static arc_buf_contents_t arc_buf_type(arc_buf_hdr_t *); @@ -1253,6 +1283,7 @@ hdr_full_cons(void *vbuf, void *unused, cv_init(&hdr->b_l1hdr.b_cv, NULL, CV_DEFAULT, NULL); refcount_create(&hdr->b_l1hdr.b_refcnt); mutex_init(&hdr->b_l1hdr.b_freeze_lock, NULL, MUTEX_DEFAULT, NULL); + multilist_link_init(&hdr->b_l1hdr.b_arc_node); arc_space_consume(HDR_FULL_SIZE, ARC_SPACE_HDRS); return (0); @@ -1297,6 +1328,7 @@ hdr_full_dest(void *vbuf, void *unused) cv_destroy(&hdr->b_l1hdr.b_cv); refcount_destroy(&hdr->b_l1hdr.b_refcnt); mutex_destroy(&hdr->b_l1hdr.b_freeze_lock); + ASSERT(!multilist_link_active(&hdr->b_l1hdr.b_arc_node)); arc_space_return(HDR_FULL_SIZE, ARC_SPACE_HDRS); } @@ -1333,7 +1365,7 @@ hdr_recl(void *unused) * which is after we do arc_fini(). */ if (!arc_dead) - cv_signal(&arc_reclaim_thr_cv); + cv_signal(&arc_reclaim_thread_cv); } static void @@ -1411,18 +1443,31 @@ arc_hdr_realloc(arc_buf_hdr_t *hdr, kmem * l2c_only even though it's about to change. */ nhdr->b_l1hdr.b_state = arc_l2c_only; + + /* Verify previous threads set to NULL before freeing */ + ASSERT3P(nhdr->b_l1hdr.b_tmp_cdata, ==, NULL); } else { ASSERT(hdr->b_l1hdr.b_buf == NULL); ASSERT0(hdr->b_l1hdr.b_datacnt); - ASSERT(!list_link_active(&hdr->b_l1hdr.b_arc_node)); + /* - * We might be removing the L1hdr of a buffer which was just - * written out to L2ARC. If such a buffer is compressed then we - * need to free its b_tmp_cdata before destroying the header. - */ - if (hdr->b_l1hdr.b_tmp_cdata != NULL && - HDR_GET_COMPRESS(hdr) != ZIO_COMPRESS_OFF) - l2arc_release_cdata_buf(hdr); + * If we've reached here, We must have been called from + * arc_evict_hdr(), as such we should have already been + * removed from any ghost list we were previously on + * (which protects us from racing with arc_evict_state), + * thus no locking is needed during this check. + */ + ASSERT(!multilist_link_active(&hdr->b_l1hdr.b_arc_node)); + + /* + * A buffer must not be moved into the arc_l2c_only + * state if it's not finished being written out to the + * l2arc device. Otherwise, the b_l1hdr.b_tmp_cdata field + * might try to be accessed, even though it was removed. + */ + VERIFY(!HDR_L2_WRITING(hdr)); + VERIFY3P(hdr->b_l1hdr.b_tmp_cdata, ==, NULL); + nhdr->b_flags &= ~ARC_FLAG_HAS_L1HDR; } /* @@ -1641,14 +1686,13 @@ add_reference(arc_buf_hdr_t *hdr, kmutex (state != arc_anon)) { /* We don't use the L2-only state list. */ if (state != arc_l2c_only) { + arc_buf_contents_t type = arc_buf_type(hdr); uint64_t delta = hdr->b_size * hdr->b_l1hdr.b_datacnt; - list_t *list = &state->arcs_list[arc_buf_type(hdr)]; - uint64_t *size = &state->arcs_lsize[arc_buf_type(hdr)]; + multilist_t *list = &state->arcs_list[type]; + uint64_t *size = &state->arcs_lsize[type]; + + multilist_remove(list, hdr); - ASSERT(!MUTEX_HELD(&state->arcs_mtx)); - mutex_enter(&state->arcs_mtx); - ASSERT(list_link_active(&hdr->b_l1hdr.b_arc_node)); - list_remove(list, hdr); if (GHOST_STATE(state)) { ASSERT0(hdr->b_l1hdr.b_datacnt); ASSERT3P(hdr->b_l1hdr.b_buf, ==, NULL); @@ -1657,7 +1701,6 @@ add_reference(arc_buf_hdr_t *hdr, kmutex ASSERT(delta > 0); ASSERT3U(*size, >=, delta); atomic_add_64(size, -delta); - mutex_exit(&state->arcs_mtx); } /* remove the prefetch flag if we get a reference */ hdr->b_flags &= ~ARC_FLAG_PREFETCH; @@ -1680,22 +1723,21 @@ remove_reference(arc_buf_hdr_t *hdr, kmu */ if (((cnt = refcount_remove(&hdr->b_l1hdr.b_refcnt, tag)) == 0) && (state != arc_anon)) { - uint64_t *size = &state->arcs_lsize[arc_buf_type(hdr)]; + arc_buf_contents_t type = arc_buf_type(hdr); + multilist_t *list = &state->arcs_list[type]; + uint64_t *size = &state->arcs_lsize[type]; + + multilist_insert(list, hdr); - ASSERT(!MUTEX_HELD(&state->arcs_mtx)); - mutex_enter(&state->arcs_mtx); - ASSERT(!list_link_active(&hdr->b_l1hdr.b_arc_node)); - list_insert_head(&state->arcs_list[arc_buf_type(hdr)], hdr); ASSERT(hdr->b_l1hdr.b_datacnt > 0); atomic_add_64(size, hdr->b_size * hdr->b_l1hdr.b_datacnt); - mutex_exit(&state->arcs_mtx); } return (cnt); } /* - * Move the supplied buffer to the indicated state. The mutex + * Move the supplied buffer to the indicated state. The hash lock * for the buffer must be held by the caller. */ static void @@ -1739,15 +1781,10 @@ arc_change_state(arc_state_t *new_state, */ if (refcnt == 0) { if (old_state != arc_anon && old_state != arc_l2c_only) { - int use_mutex = !MUTEX_HELD(&old_state->arcs_mtx); uint64_t *size = &old_state->arcs_lsize[buftype]; - if (use_mutex) - mutex_enter(&old_state->arcs_mtx); - ASSERT(HDR_HAS_L1HDR(hdr)); - ASSERT(list_link_active(&hdr->b_l1hdr.b_arc_node)); - list_remove(&old_state->arcs_list[buftype], hdr); + multilist_remove(&old_state->arcs_list[buftype], hdr); /* * If prefetching out of the ghost cache, @@ -1760,12 +1797,8 @@ arc_change_state(arc_state_t *new_state, } ASSERT3U(*size, >=, from_delta); atomic_add_64(size, -from_delta); - - if (use_mutex) - mutex_exit(&old_state->arcs_mtx); } if (new_state != arc_anon && new_state != arc_l2c_only) { - int use_mutex = !MUTEX_HELD(&new_state->arcs_mtx); uint64_t *size = &new_state->arcs_lsize[buftype]; /* @@ -1775,10 +1808,7 @@ arc_change_state(arc_state_t *new_state, * beforehand. */ ASSERT(HDR_HAS_L1HDR(hdr)); - if (use_mutex) - mutex_enter(&new_state->arcs_mtx); - - list_insert_head(&new_state->arcs_list[buftype], hdr); + multilist_insert(&new_state->arcs_list[buftype], hdr); /* ghost elements have a ghost size */ if (GHOST_STATE(new_state)) { @@ -1787,9 +1817,6 @@ arc_change_state(arc_state_t *new_state, to_delta = hdr->b_size; } atomic_add_64(size, to_delta); - - if (use_mutex) - mutex_exit(&new_state->arcs_mtx); } } @@ -1811,8 +1838,8 @@ arc_change_state(arc_state_t *new_state, * L2 headers should never be on the L2 state list since they don't * have L1 headers allocated. */ - ASSERT(list_is_empty(&arc_l2c_only->arcs_list[ARC_BUFC_DATA]) && - list_is_empty(&arc_l2c_only->arcs_list[ARC_BUFC_METADATA])); + ASSERT(multilist_is_empty(&arc_l2c_only->arcs_list[ARC_BUFC_DATA]) && + multilist_is_empty(&arc_l2c_only->arcs_list[ARC_BUFC_METADATA])); } void @@ -1905,6 +1932,7 @@ arc_buf_alloc(spa_t *spa, int32_t size, hdr->b_l1hdr.b_state = arc_anon; hdr->b_l1hdr.b_arc_access = 0; hdr->b_l1hdr.b_datacnt = 1; + hdr->b_l1hdr.b_tmp_cdata = NULL; arc_get_data_buf(buf); ASSERT(refcount_is_zero(&hdr->b_l1hdr.b_refcnt)); @@ -2034,6 +2062,21 @@ arc_buf_add_ref(arc_buf_t *buf, void* ta data, metadata, hits); } +static void +arc_buf_free_on_write(void *data, size_t size, + void (*free_func)(void *, size_t)) +{ + l2arc_data_free_t *df; + + df = kmem_alloc(sizeof (*df), KM_SLEEP); + df->l2df_data = data; + df->l2df_size = size; + df->l2df_func = free_func; + mutex_enter(&l2arc_free_on_write_mtx); + list_insert_head(l2arc_free_on_write, df); + mutex_exit(&l2arc_free_on_write_mtx); +} + /* * Free the arc data buffer. If it is an l2arc write in progress, * the buffer is placed on l2arc_free_on_write to be freed later. @@ -2044,26 +2087,74 @@ arc_buf_data_free(arc_buf_t *buf, void ( arc_buf_hdr_t *hdr = buf->b_hdr; if (HDR_L2_WRITING(hdr)) { - l2arc_data_free_t *df; - df = kmem_alloc(sizeof (l2arc_data_free_t), KM_SLEEP); - df->l2df_data = buf->b_data; - df->l2df_size = hdr->b_size; - df->l2df_func = free_func; - mutex_enter(&l2arc_free_on_write_mtx); - list_insert_head(l2arc_free_on_write, df); - mutex_exit(&l2arc_free_on_write_mtx); + arc_buf_free_on_write(buf->b_data, hdr->b_size, free_func); ARCSTAT_BUMP(arcstat_l2_free_on_write); } else { free_func(buf->b_data, hdr->b_size); } } +static void +arc_buf_l2_cdata_free(arc_buf_hdr_t *hdr) +{ + ASSERT(HDR_HAS_L2HDR(hdr)); + ASSERT(MUTEX_HELD(&hdr->b_l2hdr.b_dev->l2ad_mtx)); + + /* + * The b_tmp_cdata field is linked off of the b_l1hdr, so if + * that doesn't exist, the header is in the arc_l2c_only state, + * and there isn't anything to free (it's already been freed). + */ + if (!HDR_HAS_L1HDR(hdr)) + return; + + /* + * The header isn't being written to the l2arc device, thus it + * shouldn't have a b_tmp_cdata to free. + */ + if (!HDR_L2_WRITING(hdr)) { + ASSERT3P(hdr->b_l1hdr.b_tmp_cdata, ==, NULL); + return; + } + + /* + * The header does not have compression enabled. This can be due + * to the buffer not being compressible, or because we're + * freeing the buffer before the second phase of + * l2arc_write_buffer() has started (which does the compression + * step). In either case, b_tmp_cdata does not point to a + * separately compressed buffer, so there's nothing to free (it + * points to the same buffer as the arc_buf_t's b_data field). + */ + if (HDR_GET_COMPRESS(hdr) == ZIO_COMPRESS_OFF) { + hdr->b_l1hdr.b_tmp_cdata = NULL; + return; + } + + /* + * There's nothing to free since the buffer was all zero's and + * compressed to a zero length buffer. + */ + if (HDR_GET_COMPRESS(hdr) == ZIO_COMPRESS_EMPTY) { + ASSERT3P(hdr->b_l1hdr.b_tmp_cdata, ==, NULL); + return; + } + + ASSERT(L2ARC_IS_VALID_COMPRESS(HDR_GET_COMPRESS(hdr))); + + arc_buf_free_on_write(hdr->b_l1hdr.b_tmp_cdata, + hdr->b_size, zio_data_buf_free); + + ARCSTAT_BUMP(arcstat_l2_cdata_free_on_write); + hdr->b_l1hdr.b_tmp_cdata = NULL; +} + /* * Free up buf->b_data and if 'remove' is set, then pull the * arc_buf_t off of the the arc_buf_hdr_t's list and free it. */ static void -arc_buf_destroy(arc_buf_t *buf, boolean_t recycle, boolean_t remove) +arc_buf_destroy(arc_buf_t *buf, boolean_t remove) { arc_buf_t **bufp; @@ -2078,17 +2169,17 @@ arc_buf_destroy(arc_buf_t *buf, boolean_ arc_buf_unwatch(buf); #endif - if (!recycle) { - if (type == ARC_BUFC_METADATA) { - arc_buf_data_free(buf, zio_buf_free); - arc_space_return(size, ARC_SPACE_META); - } else { - ASSERT(type == ARC_BUFC_DATA); - arc_buf_data_free(buf, zio_data_buf_free); - arc_space_return(size, ARC_SPACE_DATA); - } + if (type == ARC_BUFC_METADATA) { + arc_buf_data_free(buf, zio_buf_free); + arc_space_return(size, ARC_SPACE_META); + } else { + ASSERT(type == ARC_BUFC_DATA); + arc_buf_data_free(buf, zio_data_buf_free); + arc_space_return(size, ARC_SPACE_DATA); } - if (list_link_active(&buf->b_hdr->b_l1hdr.b_arc_node)) { + + /* protected by hash lock, if in the hash table */ + if (multilist_link_active(&buf->b_hdr->b_l1hdr.b_arc_node)) { uint64_t *cnt = &state->arcs_lsize[type]; ASSERT(refcount_is_zero( @@ -2158,6 +2249,12 @@ arc_hdr_destroy(arc_buf_hdr_t *hdr) hdr->b_size, 0); list_remove(&l2hdr->b_dev->l2ad_buflist, hdr); + /* + * We don't want to leak the b_tmp_cdata buffer that was + * allocated in l2arc_write_buffers() + */ + arc_buf_l2_cdata_free(hdr); + ARCSTAT_INCR(arcstat_l2_size, -hdr->b_size); ARCSTAT_INCR(arcstat_l2_asize, -l2hdr->b_asize); @@ -2180,20 +2277,19 @@ arc_hdr_destroy(arc_buf_hdr_t *hdr) arc_buf_t *buf = hdr->b_l1hdr.b_buf; if (buf->b_efunc != NULL) { - mutex_enter(&arc_eviction_mtx); + mutex_enter(&arc_user_evicts_lock); mutex_enter(&buf->b_evict_lock); ASSERT(buf->b_hdr != NULL); - arc_buf_destroy(hdr->b_l1hdr.b_buf, FALSE, - FALSE); + arc_buf_destroy(hdr->b_l1hdr.b_buf, FALSE); hdr->b_l1hdr.b_buf = buf->b_next; buf->b_hdr = &arc_eviction_hdr; buf->b_next = arc_eviction_list; arc_eviction_list = buf; mutex_exit(&buf->b_evict_lock); - mutex_exit(&arc_eviction_mtx); + cv_signal(&arc_user_evicts_cv); + mutex_exit(&arc_user_evicts_lock); } else { - arc_buf_destroy(hdr->b_l1hdr.b_buf, FALSE, - TRUE); + arc_buf_destroy(hdr->b_l1hdr.b_buf, TRUE); } } #ifdef ZFS_DEBUG @@ -2206,7 +2302,7 @@ arc_hdr_destroy(arc_buf_hdr_t *hdr) ASSERT3P(hdr->b_hash_next, ==, NULL); if (HDR_HAS_L1HDR(hdr)) { - ASSERT(!list_link_active(&hdr->b_l1hdr.b_arc_node)); + ASSERT(!multilist_link_active(&hdr->b_l1hdr.b_arc_node)); ASSERT3P(hdr->b_l1hdr.b_acb, ==, NULL); kmem_cache_free(hdr_full_cache, hdr); } else { @@ -2232,7 +2328,7 @@ arc_buf_free(arc_buf_t *buf, void *tag) (void) remove_reference(hdr, hash_lock, tag); if (hdr->b_l1hdr.b_datacnt > 1) { - arc_buf_destroy(buf, FALSE, TRUE); + arc_buf_destroy(buf, TRUE); } else { ASSERT(buf == hdr->b_l1hdr.b_buf); ASSERT(buf->b_efunc == NULL); @@ -2246,16 +2342,16 @@ arc_buf_free(arc_buf_t *buf, void *tag) * this buffer unless the write completes before we finish * decrementing the reference count. */ - mutex_enter(&arc_eviction_mtx); + mutex_enter(&arc_user_evicts_lock); (void) remove_reference(hdr, NULL, tag); ASSERT(refcount_is_zero(&hdr->b_l1hdr.b_refcnt)); destroy_hdr = !HDR_IO_IN_PROGRESS(hdr); - mutex_exit(&arc_eviction_mtx); + mutex_exit(&arc_user_evicts_lock); if (destroy_hdr) arc_hdr_destroy(hdr); } else { if (remove_reference(hdr, NULL, tag) > 0) - arc_buf_destroy(buf, FALSE, TRUE); + arc_buf_destroy(buf, TRUE); else arc_hdr_destroy(hdr); } @@ -2284,7 +2380,7 @@ arc_buf_remove_ref(arc_buf_t *buf, void* (void) remove_reference(hdr, hash_lock, tag); if (hdr->b_l1hdr.b_datacnt > 1) { if (no_callback) - arc_buf_destroy(buf, FALSE, TRUE); + arc_buf_destroy(buf, TRUE); } else if (no_callback) { ASSERT(hdr->b_l1hdr.b_buf == buf && buf->b_next == NULL); ASSERT(buf->b_efunc == NULL); @@ -2345,429 +2441,675 @@ arc_buf_eviction_needed(arc_buf_t *buf) } /* - * Evict buffers from list until we've removed the specified number of - * bytes. Move the removed buffers to the appropriate evict state. - * If the recycle flag is set, then attempt to "recycle" a buffer: - * - look for a buffer to evict that is `bytes' long. - * - return the data block from this buffer rather than freeing it. - * This flag is used by callers that are trying to make space for a - * new buffer in a full arc cache. + * Evict the arc_buf_hdr that is provided as a parameter. The resultant + * state of the header is dependent on it's state prior to entering this + * function. The following transitions are possible: * - * This function makes a "best effort". It skips over any buffers - * it can't get a hash_lock on, and so may not catch all candidates. - * It may also return without evicting as much space as requested. + * - arc_mru -> arc_mru_ghost + * - arc_mfu -> arc_mfu_ghost + * - arc_mru_ghost -> arc_l2c_only + * - arc_mru_ghost -> deleted + * - arc_mfu_ghost -> arc_l2c_only + * - arc_mfu_ghost -> deleted */ -static void * -arc_evict(arc_state_t *state, uint64_t spa, int64_t bytes, boolean_t recycle, - arc_buf_contents_t type) +static int64_t +arc_evict_hdr(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) { - arc_state_t *evicted_state; - uint64_t bytes_evicted = 0, skipped = 0, missed = 0; - arc_buf_hdr_t *hdr, *hdr_prev = NULL; - kmutex_t *hash_lock; - boolean_t have_lock; - void *stolen = NULL; - arc_buf_hdr_t marker = { 0 }; - int count = 0; - - ASSERT(state == arc_mru || state == arc_mfu); + arc_state_t *evicted_state, *state; + int64_t bytes_evicted = 0; - evicted_state = (state == arc_mru) ? arc_mru_ghost : arc_mfu_ghost; + ASSERT(MUTEX_HELD(hash_lock)); + ASSERT(HDR_HAS_L1HDR(hdr)); - /* - * The ghost list lock must be acquired first in order to prevent - * a 3 party deadlock: - * - * - arc_evict_ghost acquires arc_*_ghost->arcs_mtx, followed by - * l2ad_mtx in arc_hdr_realloc - * - l2arc_write_buffers acquires l2ad_mtx, followed by arc_*->arcs_mtx - * - arc_evict acquires arc_*_ghost->arcs_mtx, followed by - * arc_*_ghost->arcs_mtx and forms a deadlock cycle. - * - * This situation is avoided by acquiring the ghost list lock first. - */ - mutex_enter(&evicted_state->arcs_mtx); - mutex_enter(&state->arcs_mtx); + state = hdr->b_l1hdr.b_state; + if (GHOST_STATE(state)) { + ASSERT(!HDR_IO_IN_PROGRESS(hdr)); + ASSERT(hdr->b_l1hdr.b_buf == NULL); - /* - * Decide which "type" (data vs metadata) to recycle from. - * - * If we are over the metadata limit, recycle from metadata. - * If we are under the metadata minimum, recycle from data. - * Otherwise, recycle from whichever type has the oldest (least - * recently accessed) header. - */ - if (recycle) { - arc_buf_hdr_t *data_hdr = - list_tail(&state->arcs_list[ARC_BUFC_DATA]); - arc_buf_hdr_t *metadata_hdr = - list_tail(&state->arcs_list[ARC_BUFC_METADATA]); - arc_buf_contents_t realtype; - - if (data_hdr == NULL) { - realtype = ARC_BUFC_METADATA; - } else if (metadata_hdr == NULL) { - realtype = ARC_BUFC_DATA; - } else if (arc_meta_used >= arc_meta_limit) { - realtype = ARC_BUFC_METADATA; - } else if (arc_meta_used <= arc_meta_min) { - realtype = ARC_BUFC_DATA; - } else if (HDR_HAS_L1HDR(data_hdr) && - HDR_HAS_L1HDR(metadata_hdr) && - data_hdr->b_l1hdr.b_arc_access < - metadata_hdr->b_l1hdr.b_arc_access) { - realtype = ARC_BUFC_DATA; - } else { - realtype = ARC_BUFC_METADATA; + /* + * l2arc_write_buffers() relies on a header's L1 portion + * (i.e. it's b_tmp_cdata field) during it's write phase. + * Thus, we cannot push a header onto the arc_l2c_only + * state (removing it's L1 piece) until the header is + * done being written to the l2arc. + */ + if (HDR_HAS_L2HDR(hdr) && HDR_L2_WRITING(hdr)) { + ARCSTAT_BUMP(arcstat_evict_l2_skip); + return (bytes_evicted); } - if (realtype != type) { + + ARCSTAT_BUMP(arcstat_deleted); + bytes_evicted += hdr->b_size; + + DTRACE_PROBE1(arc__delete, arc_buf_hdr_t *, hdr); + + if (HDR_HAS_L2HDR(hdr)) { /* - * If we want to evict from a different list, - * we can not recycle, because DATA vs METADATA - * buffers are segregated into different kmem - * caches (and vmem arenas). + * This buffer is cached on the 2nd Level ARC; + * don't destroy the header. */ - type = realtype; - recycle = B_FALSE; + arc_change_state(arc_l2c_only, hdr, hash_lock); + /* + * dropping from L1+L2 cached to L2-only, + * realloc to remove the L1 header. + */ + hdr = arc_hdr_realloc(hdr, hdr_full_cache, + hdr_l2only_cache); + } else { + arc_change_state(arc_anon, hdr, hash_lock); + arc_hdr_destroy(hdr); } + return (bytes_evicted); } - list_t *list = &state->arcs_list[type]; + ASSERT(state == arc_mru || state == arc_mfu); + evicted_state = (state == arc_mru) ? arc_mru_ghost : arc_mfu_ghost; - for (hdr = list_tail(list); hdr; hdr = hdr_prev) { - hdr_prev = list_prev(list, hdr); - /* prefetch buffers have a minimum lifespan */ - if (HDR_IO_IN_PROGRESS(hdr) || - (spa && hdr->b_spa != spa) || - ((hdr->b_flags & (ARC_FLAG_PREFETCH | ARC_FLAG_INDIRECT)) && - ddi_get_lbolt() - hdr->b_l1hdr.b_arc_access < - arc_min_prefetch_lifespan)) { - skipped++; - continue; + /* prefetch buffers have a minimum lifespan */ + if (HDR_IO_IN_PROGRESS(hdr) || + ((hdr->b_flags & (ARC_FLAG_PREFETCH | ARC_FLAG_INDIRECT)) && + ddi_get_lbolt() - hdr->b_l1hdr.b_arc_access < + arc_min_prefetch_lifespan)) { + ARCSTAT_BUMP(arcstat_evict_skip); + return (bytes_evicted); + } + + ASSERT0(refcount_count(&hdr->b_l1hdr.b_refcnt)); + ASSERT3U(hdr->b_l1hdr.b_datacnt, >, 0); + while (hdr->b_l1hdr.b_buf) { + arc_buf_t *buf = hdr->b_l1hdr.b_buf; + if (!mutex_tryenter(&buf->b_evict_lock)) { + ARCSTAT_BUMP(arcstat_mutex_miss); + break; } - /* "lookahead" for better eviction candidate */ - if (recycle && hdr->b_size != bytes && - hdr_prev && hdr_prev->b_size == bytes) - continue; + if (buf->b_data != NULL) + bytes_evicted += hdr->b_size; + if (buf->b_efunc != NULL) { + mutex_enter(&arc_user_evicts_lock); + arc_buf_destroy(buf, FALSE); + hdr->b_l1hdr.b_buf = buf->b_next; + buf->b_hdr = &arc_eviction_hdr; + buf->b_next = arc_eviction_list; + arc_eviction_list = buf; + cv_signal(&arc_user_evicts_cv); + mutex_exit(&arc_user_evicts_lock); + mutex_exit(&buf->b_evict_lock); + } else { + mutex_exit(&buf->b_evict_lock); + arc_buf_destroy(buf, TRUE); + } + } - /* ignore markers */ - if (hdr->b_spa == 0) - continue; + if (HDR_HAS_L2HDR(hdr)) { + ARCSTAT_INCR(arcstat_evict_l2_cached, hdr->b_size); + } else { + if (l2arc_write_eligible(hdr->b_spa, hdr)) + ARCSTAT_INCR(arcstat_evict_l2_eligible, hdr->b_size); + else + ARCSTAT_INCR(arcstat_evict_l2_ineligible, hdr->b_size); + } + + if (hdr->b_l1hdr.b_datacnt == 0) { + arc_change_state(evicted_state, hdr, hash_lock); + ASSERT(HDR_IN_HASH_TABLE(hdr)); + hdr->b_flags |= ARC_FLAG_IN_HASH_TABLE; + hdr->b_flags &= ~ARC_FLAG_BUF_AVAILABLE; + DTRACE_PROBE1(arc__evict, arc_buf_hdr_t *, hdr); + } + + return (bytes_evicted); +} + +static uint64_t +arc_evict_state_impl(multilist_t *ml, int idx, arc_buf_hdr_t *marker, + uint64_t spa, int64_t bytes) +{ + multilist_sublist_t *mls; + uint64_t bytes_evicted = 0; + arc_buf_hdr_t *hdr; + kmutex_t *hash_lock; + int evict_count = 0; + + ASSERT3P(marker, !=, NULL); + IMPLY(bytes < 0, bytes == ARC_EVICT_ALL); + + mls = multilist_sublist_lock(ml, idx); + + for (hdr = multilist_sublist_prev(mls, marker); hdr != NULL; + hdr = multilist_sublist_prev(mls, marker)) { + if ((bytes != ARC_EVICT_ALL && bytes_evicted >= bytes) || + (evict_count >= zfs_arc_evict_batch_limit)) + break; /* - * It may take a long time to evict all the bufs requested. - * To avoid blocking all arc activity, periodically drop - * the arcs_mtx and give other threads a chance to run - * before reacquiring the lock. - * - * If we are looking for a buffer to recycle, we are in - * the hot code path, so don't sleep. + * To keep our iteration location, move the marker + * forward. Since we're not holding hdr's hash lock, we + * must be very careful and not remove 'hdr' from the + * sublist. Otherwise, other consumers might mistake the + * 'hdr' as not being on a sublist when they call the + * multilist_link_active() function (they all rely on + * the hash lock protecting concurrent insertions and + * removals). multilist_sublist_move_forward() was + * specifically implemented to ensure this is the case + * (only 'marker' will be removed and re-inserted). + */ + multilist_sublist_move_forward(mls, marker); + + /* + * The only case where the b_spa field should ever be + * zero, is the marker headers inserted by + * arc_evict_state(). It's possible for multiple threads + * to be calling arc_evict_state() concurrently (e.g. + * dsl_pool_close() and zio_inject_fault()), so we must + * skip any markers we see from these other threads. */ - if (!recycle && count++ > arc_evict_iterations) { - list_insert_after(list, hdr, &marker); - mutex_exit(&state->arcs_mtx); - mutex_exit(&evicted_state->arcs_mtx); - kpreempt(KPREEMPT_SYNC); - mutex_enter(&evicted_state->arcs_mtx); - mutex_enter(&state->arcs_mtx); - hdr_prev = list_prev(list, &marker); - list_remove(list, &marker); - count = 0; + if (hdr->b_spa == 0) + continue; + + /* we're only interested in evicting buffers of a certain spa */ + if (spa != 0 && hdr->b_spa != spa) { + ARCSTAT_BUMP(arcstat_evict_skip); continue; } hash_lock = HDR_LOCK(hdr); - have_lock = MUTEX_HELD(hash_lock); - if (have_lock || mutex_tryenter(hash_lock)) { - ASSERT0(refcount_count(&hdr->b_l1hdr.b_refcnt)); - ASSERT3U(hdr->b_l1hdr.b_datacnt, >, 0); - while (hdr->b_l1hdr.b_buf) { - arc_buf_t *buf = hdr->b_l1hdr.b_buf; - if (!mutex_tryenter(&buf->b_evict_lock)) { - missed += 1; - break; - } - if (buf->b_data != NULL) { - bytes_evicted += hdr->b_size; - if (recycle && - arc_buf_type(hdr) == type && - hdr->b_size == bytes && - !HDR_L2_WRITING(hdr)) { - stolen = buf->b_data; - recycle = FALSE; - } - } - if (buf->b_efunc != NULL) { - mutex_enter(&arc_eviction_mtx); - arc_buf_destroy(buf, - buf->b_data == stolen, FALSE); - hdr->b_l1hdr.b_buf = buf->b_next; - buf->b_hdr = &arc_eviction_hdr; - buf->b_next = arc_eviction_list; - arc_eviction_list = buf; - mutex_exit(&arc_eviction_mtx); - mutex_exit(&buf->b_evict_lock); - } else { - mutex_exit(&buf->b_evict_lock); - arc_buf_destroy(buf, - buf->b_data == stolen, TRUE); - } - } - if (HDR_HAS_L2HDR(hdr)) { - ARCSTAT_INCR(arcstat_evict_l2_cached, - hdr->b_size); - } else { - if (l2arc_write_eligible(hdr->b_spa, hdr)) { - ARCSTAT_INCR(arcstat_evict_l2_eligible, - hdr->b_size); - } else { - ARCSTAT_INCR( - arcstat_evict_l2_ineligible, - hdr->b_size); - } - } + /* + * We aren't calling this function from any code path + * that would already be holding a hash lock, so we're + * asserting on this assumption to be defensive in case + * this ever changes. Without this check, it would be + * possible to incorrectly increment arcstat_mutex_miss + * below (e.g. if the code changed such that we called + * this function with a hash lock held). + */ + ASSERT(!MUTEX_HELD(hash_lock)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Apr 21 08:47:28 2015 Return-Path: Delivered-To: svn-src-user@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 97DBD606; Tue, 21 Apr 2015 08:47:28 +0000 (UTC) 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 86CAC1776; Tue, 21 Apr 2015 08:47:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3L8lSFv016942; Tue, 21 Apr 2015 08:47:28 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3L8lS0H016941; Tue, 21 Apr 2015 08:47:28 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201504210847.t3L8lS0H016941@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Tue, 21 Apr 2015 08:47:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281818 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 08:47:28 -0000 Author: pho Date: Tue Apr 21 08:47:27 2015 New Revision: 281818 URL: https://svnweb.freebsd.org/changeset/base/281818 Log: Updated scenario with problem seen and fix revision. Sponsored by: EMC / Isilon storage division Modified: user/pho/stress2/misc/mmap7.sh Modified: user/pho/stress2/misc/mmap7.sh ============================================================================== --- user/pho/stress2/misc/mmap7.sh Tue Apr 21 06:59:40 2015 (r281817) +++ user/pho/stress2/misc/mmap7.sh Tue Apr 21 08:47:27 2015 (r281818) @@ -31,6 +31,9 @@ # Test scenario inspired by alc@ # Threaded version in order to "use the same pmap", as pointed out by kib@ +# https://people.freebsd.org/~pho/stress/log/kostik601.txt +# Fixed by r255396 + . ../default.cfg dir=/tmp From owner-svn-src-user@FreeBSD.ORG Fri Apr 24 10:18:48 2015 Return-Path: Delivered-To: svn-src-user@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 BF30A6D8; Fri, 24 Apr 2015 10:18:48 +0000 (UTC) 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 A77C6143E; Fri, 24 Apr 2015 10:18:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OAImT7091212; Fri, 24 Apr 2015 10:18:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OAIhk4091180; Fri, 24 Apr 2015 10:18:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504241018.t3OAIhk4091180@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 24 Apr 2015 10:18:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281926 - in user/ngie/more-tests: . bin/ed bin/sh bin/sh/tests/builtins cddl/contrib/opensolaris/cmd/dtrace contrib/bmake contrib/bmake/PSD.doc contrib/bmake/lst.lib contrib/bmake/mk c... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 10:18:48 -0000 Author: ngie Date: Fri Apr 24 10:18:41 2015 New Revision: 281926 URL: https://svnweb.freebsd.org/changeset/base/281926 Log: MFhead @ r281924 Added: user/ngie/more-tests/bin/sh/tests/builtins/trap15.0 - copied unchanged from r281924, head/bin/sh/tests/builtins/trap15.0 user/ngie/more-tests/bin/sh/tests/builtins/trap16.0 - copied unchanged from r281924, head/bin/sh/tests/builtins/trap16.0 user/ngie/more-tests/contrib/bmake/mk/cython.mk - copied unchanged from r281924, head/contrib/bmake/mk/cython.mk user/ngie/more-tests/contrib/bmake/mk/manifest.mk - copied unchanged from r281924, head/contrib/bmake/mk/manifest.mk user/ngie/more-tests/contrib/bmake/mk/mkopt.sh - copied unchanged from r281924, head/contrib/bmake/mk/mkopt.sh user/ngie/more-tests/contrib/bmake/mk/whats.mk - copied unchanged from r281924, head/contrib/bmake/mk/whats.mk user/ngie/more-tests/contrib/bmake/unit-tests/comment.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/comment.exp user/ngie/more-tests/contrib/bmake/unit-tests/comment.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/comment.mk user/ngie/more-tests/contrib/bmake/unit-tests/cond1.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/cond1.exp user/ngie/more-tests/contrib/bmake/unit-tests/cond1.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/cond1.mk user/ngie/more-tests/contrib/bmake/unit-tests/doterror.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/doterror.exp user/ngie/more-tests/contrib/bmake/unit-tests/doterror.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/doterror.mk user/ngie/more-tests/contrib/bmake/unit-tests/dotwait.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/dotwait.exp user/ngie/more-tests/contrib/bmake/unit-tests/dotwait.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/dotwait.mk user/ngie/more-tests/contrib/bmake/unit-tests/error.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/error.exp user/ngie/more-tests/contrib/bmake/unit-tests/error.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/error.mk user/ngie/more-tests/contrib/bmake/unit-tests/escape.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/escape.exp user/ngie/more-tests/contrib/bmake/unit-tests/escape.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/escape.mk user/ngie/more-tests/contrib/bmake/unit-tests/export-all.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/export-all.exp user/ngie/more-tests/contrib/bmake/unit-tests/export-all.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/export-all.mk user/ngie/more-tests/contrib/bmake/unit-tests/export-env.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/export-env.exp user/ngie/more-tests/contrib/bmake/unit-tests/export-env.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/export-env.mk user/ngie/more-tests/contrib/bmake/unit-tests/export.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/export.exp user/ngie/more-tests/contrib/bmake/unit-tests/export.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/export.mk user/ngie/more-tests/contrib/bmake/unit-tests/forloop.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/forloop.exp user/ngie/more-tests/contrib/bmake/unit-tests/forloop.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/forloop.mk user/ngie/more-tests/contrib/bmake/unit-tests/forsubst.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/forsubst.exp user/ngie/more-tests/contrib/bmake/unit-tests/forsubst.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/forsubst.mk user/ngie/more-tests/contrib/bmake/unit-tests/hash.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/hash.exp user/ngie/more-tests/contrib/bmake/unit-tests/hash.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/hash.mk user/ngie/more-tests/contrib/bmake/unit-tests/impsrc.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/impsrc.exp user/ngie/more-tests/contrib/bmake/unit-tests/impsrc.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/impsrc.mk user/ngie/more-tests/contrib/bmake/unit-tests/misc.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/misc.exp user/ngie/more-tests/contrib/bmake/unit-tests/misc.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/misc.mk user/ngie/more-tests/contrib/bmake/unit-tests/moderrs.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/moderrs.exp user/ngie/more-tests/contrib/bmake/unit-tests/moderrs.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/moderrs.mk user/ngie/more-tests/contrib/bmake/unit-tests/modmatch.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/modmatch.exp user/ngie/more-tests/contrib/bmake/unit-tests/modmatch.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/modmatch.mk user/ngie/more-tests/contrib/bmake/unit-tests/modmisc.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/modmisc.exp user/ngie/more-tests/contrib/bmake/unit-tests/modmisc.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/modmisc.mk user/ngie/more-tests/contrib/bmake/unit-tests/modorder.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/modorder.exp user/ngie/more-tests/contrib/bmake/unit-tests/modorder.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/modorder.mk user/ngie/more-tests/contrib/bmake/unit-tests/modts.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/modts.exp user/ngie/more-tests/contrib/bmake/unit-tests/modts.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/modts.mk user/ngie/more-tests/contrib/bmake/unit-tests/modword.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/modword.exp user/ngie/more-tests/contrib/bmake/unit-tests/modword.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/modword.mk user/ngie/more-tests/contrib/bmake/unit-tests/order.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/order.exp user/ngie/more-tests/contrib/bmake/unit-tests/order.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/order.mk user/ngie/more-tests/contrib/bmake/unit-tests/phony-end.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/phony-end.exp user/ngie/more-tests/contrib/bmake/unit-tests/phony-end.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/phony-end.mk user/ngie/more-tests/contrib/bmake/unit-tests/posix.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/posix.exp user/ngie/more-tests/contrib/bmake/unit-tests/posix.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/posix.mk user/ngie/more-tests/contrib/bmake/unit-tests/posix1.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/posix1.exp user/ngie/more-tests/contrib/bmake/unit-tests/posix1.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/posix1.mk user/ngie/more-tests/contrib/bmake/unit-tests/qequals.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/qequals.exp user/ngie/more-tests/contrib/bmake/unit-tests/qequals.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/qequals.mk user/ngie/more-tests/contrib/bmake/unit-tests/suffixes.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/suffixes.exp user/ngie/more-tests/contrib/bmake/unit-tests/suffixes.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/suffixes.mk user/ngie/more-tests/contrib/bmake/unit-tests/sunshcmd.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/sunshcmd.exp user/ngie/more-tests/contrib/bmake/unit-tests/sunshcmd.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/sunshcmd.mk user/ngie/more-tests/contrib/bmake/unit-tests/sysv.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/sysv.exp user/ngie/more-tests/contrib/bmake/unit-tests/sysv.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/sysv.mk user/ngie/more-tests/contrib/bmake/unit-tests/ternary.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/ternary.exp user/ngie/more-tests/contrib/bmake/unit-tests/ternary.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/ternary.mk user/ngie/more-tests/contrib/bmake/unit-tests/unexport-env.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/unexport-env.exp user/ngie/more-tests/contrib/bmake/unit-tests/unexport-env.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/unexport-env.mk user/ngie/more-tests/contrib/bmake/unit-tests/unexport.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/unexport.exp user/ngie/more-tests/contrib/bmake/unit-tests/unexport.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/unexport.mk user/ngie/more-tests/contrib/bmake/unit-tests/varcmd.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/varcmd.exp user/ngie/more-tests/contrib/bmake/unit-tests/varcmd.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/varcmd.mk user/ngie/more-tests/contrib/bmake/unit-tests/varmisc.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/varmisc.exp user/ngie/more-tests/contrib/bmake/unit-tests/varmisc.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/varmisc.mk user/ngie/more-tests/contrib/bmake/unit-tests/varshell.exp - copied unchanged from r281924, head/contrib/bmake/unit-tests/varshell.exp user/ngie/more-tests/contrib/bmake/unit-tests/varshell.mk - copied unchanged from r281924, head/contrib/bmake/unit-tests/varshell.mk user/ngie/more-tests/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff - copied unchanged from r281924, head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff user/ngie/more-tests/contrib/wpa/CONTRIBUTIONS - copied unchanged from r281924, head/contrib/wpa/CONTRIBUTIONS user/ngie/more-tests/contrib/wpa/hostapd/hapd_module_tests.c - copied unchanged from r281924, head/contrib/wpa/hostapd/hapd_module_tests.c user/ngie/more-tests/contrib/wpa/hostapd/wps-ap-nfc.py - copied unchanged from r281924, head/contrib/wpa/hostapd/wps-ap-nfc.py user/ngie/more-tests/contrib/wpa/hs20/ - copied from r281924, head/contrib/wpa/hs20/ user/ngie/more-tests/contrib/wpa/patches/openssl-0.9.8za-tls-extensions.patch - copied unchanged from r281924, head/contrib/wpa/patches/openssl-0.9.8za-tls-extensions.patch user/ngie/more-tests/contrib/wpa/src/ap/acs.c - copied unchanged from r281924, head/contrib/wpa/src/ap/acs.c user/ngie/more-tests/contrib/wpa/src/ap/acs.h - copied unchanged from r281924, head/contrib/wpa/src/ap/acs.h user/ngie/more-tests/contrib/wpa/src/ap/bss_load.c - copied unchanged from r281924, head/contrib/wpa/src/ap/bss_load.c user/ngie/more-tests/contrib/wpa/src/ap/bss_load.h - copied unchanged from r281924, head/contrib/wpa/src/ap/bss_load.h user/ngie/more-tests/contrib/wpa/src/ap/dfs.c - copied unchanged from r281924, head/contrib/wpa/src/ap/dfs.c user/ngie/more-tests/contrib/wpa/src/ap/dfs.h - copied unchanged from r281924, head/contrib/wpa/src/ap/dfs.h user/ngie/more-tests/contrib/wpa/src/ap/dhcp_snoop.c - copied unchanged from r281924, head/contrib/wpa/src/ap/dhcp_snoop.c user/ngie/more-tests/contrib/wpa/src/ap/dhcp_snoop.h - copied unchanged from r281924, head/contrib/wpa/src/ap/dhcp_snoop.h user/ngie/more-tests/contrib/wpa/src/ap/ndisc_snoop.c - copied unchanged from r281924, head/contrib/wpa/src/ap/ndisc_snoop.c user/ngie/more-tests/contrib/wpa/src/ap/ndisc_snoop.h - copied unchanged from r281924, head/contrib/wpa/src/ap/ndisc_snoop.h user/ngie/more-tests/contrib/wpa/src/ap/x_snoop.c - copied unchanged from r281924, head/contrib/wpa/src/ap/x_snoop.c user/ngie/more-tests/contrib/wpa/src/ap/x_snoop.h - copied unchanged from r281924, head/contrib/wpa/src/ap/x_snoop.h user/ngie/more-tests/contrib/wpa/src/common/common_module_tests.c - copied unchanged from r281924, head/contrib/wpa/src/common/common_module_tests.c user/ngie/more-tests/contrib/wpa/src/common/hw_features_common.c - copied unchanged from r281924, head/contrib/wpa/src/common/hw_features_common.c user/ngie/more-tests/contrib/wpa/src/common/hw_features_common.h - copied unchanged from r281924, head/contrib/wpa/src/common/hw_features_common.h user/ngie/more-tests/contrib/wpa/src/common/ieee802_1x_defs.h - copied unchanged from r281924, head/contrib/wpa/src/common/ieee802_1x_defs.h user/ngie/more-tests/contrib/wpa/src/common/qca-vendor-attr.h - copied unchanged from r281924, head/contrib/wpa/src/common/qca-vendor-attr.h user/ngie/more-tests/contrib/wpa/src/common/qca-vendor.h - copied unchanged from r281924, head/contrib/wpa/src/common/qca-vendor.h user/ngie/more-tests/contrib/wpa/src/common/sae.c - copied unchanged from r281924, head/contrib/wpa/src/common/sae.c user/ngie/more-tests/contrib/wpa/src/common/sae.h - copied unchanged from r281924, head/contrib/wpa/src/common/sae.h user/ngie/more-tests/contrib/wpa/src/common/tnc.h - copied unchanged from r281924, head/contrib/wpa/src/common/tnc.h user/ngie/more-tests/contrib/wpa/src/common/wpa_helpers.c - copied unchanged from r281924, head/contrib/wpa/src/common/wpa_helpers.c user/ngie/more-tests/contrib/wpa/src/common/wpa_helpers.h - copied unchanged from r281924, head/contrib/wpa/src/common/wpa_helpers.h user/ngie/more-tests/contrib/wpa/src/crypto/aes-siv.c - copied unchanged from r281924, head/contrib/wpa/src/crypto/aes-siv.c user/ngie/more-tests/contrib/wpa/src/crypto/aes_siv.h - copied unchanged from r281924, head/contrib/wpa/src/crypto/aes_siv.h user/ngie/more-tests/contrib/wpa/src/crypto/crypto_module_tests.c - copied unchanged from r281924, head/contrib/wpa/src/crypto/crypto_module_tests.c user/ngie/more-tests/contrib/wpa/src/crypto/sha256-kdf.c - copied unchanged from r281924, head/contrib/wpa/src/crypto/sha256-kdf.c user/ngie/more-tests/contrib/wpa/src/crypto/sha384.h - copied unchanged from r281924, head/contrib/wpa/src/crypto/sha384.h user/ngie/more-tests/contrib/wpa/src/drivers/driver_macsec_qca.c - copied unchanged from r281924, head/contrib/wpa/src/drivers/driver_macsec_qca.c user/ngie/more-tests/contrib/wpa/src/drivers/driver_nl80211.h - copied unchanged from r281924, head/contrib/wpa/src/drivers/driver_nl80211.h user/ngie/more-tests/contrib/wpa/src/drivers/driver_nl80211_android.c - copied unchanged from r281924, head/contrib/wpa/src/drivers/driver_nl80211_android.c user/ngie/more-tests/contrib/wpa/src/drivers/driver_nl80211_capa.c - copied unchanged from r281924, head/contrib/wpa/src/drivers/driver_nl80211_capa.c user/ngie/more-tests/contrib/wpa/src/drivers/driver_nl80211_event.c - copied unchanged from r281924, head/contrib/wpa/src/drivers/driver_nl80211_event.c user/ngie/more-tests/contrib/wpa/src/drivers/driver_nl80211_monitor.c - copied unchanged from r281924, head/contrib/wpa/src/drivers/driver_nl80211_monitor.c user/ngie/more-tests/contrib/wpa/src/drivers/driver_nl80211_scan.c - copied unchanged from r281924, head/contrib/wpa/src/drivers/driver_nl80211_scan.c user/ngie/more-tests/contrib/wpa/src/drivers/driver_openbsd.c - copied unchanged from r281924, head/contrib/wpa/src/drivers/driver_openbsd.c user/ngie/more-tests/contrib/wpa/src/drivers/linux_defines.h - copied unchanged from r281924, head/contrib/wpa/src/drivers/linux_defines.h user/ngie/more-tests/contrib/wpa/src/eap_common/eap_eke_common.c - copied unchanged from r281924, head/contrib/wpa/src/eap_common/eap_eke_common.c user/ngie/more-tests/contrib/wpa/src/eap_common/eap_eke_common.h - copied unchanged from r281924, head/contrib/wpa/src/eap_common/eap_eke_common.h user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_eke.c - copied unchanged from r281924, head/contrib/wpa/src/eap_peer/eap_eke.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_proxy.h - copied unchanged from r281924, head/contrib/wpa/src/eap_peer/eap_proxy.h user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_proxy_dummy.c - copied unchanged from r281924, head/contrib/wpa/src/eap_peer/eap_proxy_dummy.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_eke.c - copied unchanged from r281924, head/contrib/wpa/src/eap_server/eap_server_eke.c user/ngie/more-tests/contrib/wpa/src/pae/ - copied from r281924, head/contrib/wpa/src/pae/ user/ngie/more-tests/contrib/wpa/src/utils/bitfield.c - copied unchanged from r281924, head/contrib/wpa/src/utils/bitfield.c user/ngie/more-tests/contrib/wpa/src/utils/bitfield.h - copied unchanged from r281924, head/contrib/wpa/src/utils/bitfield.h user/ngie/more-tests/contrib/wpa/src/utils/browser-android.c - copied unchanged from r281924, head/contrib/wpa/src/utils/browser-android.c user/ngie/more-tests/contrib/wpa/src/utils/browser-system.c - copied unchanged from r281924, head/contrib/wpa/src/utils/browser-system.c user/ngie/more-tests/contrib/wpa/src/utils/browser-wpadebug.c - copied unchanged from r281924, head/contrib/wpa/src/utils/browser-wpadebug.c user/ngie/more-tests/contrib/wpa/src/utils/browser.c - copied unchanged from r281924, head/contrib/wpa/src/utils/browser.c user/ngie/more-tests/contrib/wpa/src/utils/browser.h - copied unchanged from r281924, head/contrib/wpa/src/utils/browser.h user/ngie/more-tests/contrib/wpa/src/utils/http-utils.h - copied unchanged from r281924, head/contrib/wpa/src/utils/http-utils.h user/ngie/more-tests/contrib/wpa/src/utils/http_curl.c - copied unchanged from r281924, head/contrib/wpa/src/utils/http_curl.c user/ngie/more-tests/contrib/wpa/src/utils/platform.h - copied unchanged from r281924, head/contrib/wpa/src/utils/platform.h user/ngie/more-tests/contrib/wpa/src/utils/utils_module_tests.c - copied unchanged from r281924, head/contrib/wpa/src/utils/utils_module_tests.c user/ngie/more-tests/contrib/wpa/src/utils/xml-utils.c - copied unchanged from r281924, head/contrib/wpa/src/utils/xml-utils.c user/ngie/more-tests/contrib/wpa/src/utils/xml-utils.h - copied unchanged from r281924, head/contrib/wpa/src/utils/xml-utils.h user/ngie/more-tests/contrib/wpa/src/utils/xml_libxml2.c - copied unchanged from r281924, head/contrib/wpa/src/utils/xml_libxml2.c user/ngie/more-tests/contrib/wpa/src/wps/wps_module_tests.c - copied unchanged from r281924, head/contrib/wpa/src/wps/wps_module_tests.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/eap_proxy_dummy.mak - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/eap_proxy_dummy.mak user/ngie/more-tests/contrib/wpa/wpa_supplicant/eap_proxy_dummy.mk - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/eap_proxy_dummy.mk user/ngie/more-tests/contrib/wpa/wpa_supplicant/examples/p2p-nfc.py - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/examples/p2p-nfc.py user/ngie/more-tests/contrib/wpa/wpa_supplicant/mesh.c - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/mesh.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/mesh.h - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/mesh.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/mesh_mpm.c - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/mesh_mpm.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/mesh_mpm.h - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/mesh_mpm.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/mesh_rsn.c - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/mesh_rsn.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/mesh_rsn.h - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/mesh_rsn.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/wmm_ac.c - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/wmm_ac.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/wmm_ac.h - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/wmm_ac.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/wpas_kay.c - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/wpas_kay.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/wpas_kay.h - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/wpas_kay.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/wpas_module_tests.c - copied unchanged from r281924, head/contrib/wpa/wpa_supplicant/wpas_module_tests.c user/ngie/more-tests/lib/libc/sys/ppoll.c - copied unchanged from r281924, head/lib/libc/sys/ppoll.c user/ngie/more-tests/lib/libc/sys/wait6.c - copied unchanged from r281924, head/lib/libc/sys/wait6.c user/ngie/more-tests/release/arm64/ - copied from r281924, head/release/arm64/ user/ngie/more-tests/share/man/man4/dtrace-io.4 - copied unchanged from r281924, head/share/man/man4/dtrace-io.4 user/ngie/more-tests/share/man/man4/dtrace-ip.4 - copied unchanged from r281924, head/share/man/man4/dtrace-ip.4 user/ngie/more-tests/share/man/man4/dtrace-proc.4 - copied unchanged from r281924, head/share/man/man4/dtrace-proc.4 user/ngie/more-tests/share/man/man4/dtrace-sched.4 - copied unchanged from r281924, head/share/man/man4/dtrace-sched.4 user/ngie/more-tests/share/man/man4/dtrace-tcp.4 - copied unchanged from r281924, head/share/man/man4/dtrace-tcp.4 user/ngie/more-tests/share/man/man4/dtrace-udp.4 - copied unchanged from r281924, head/share/man/man4/dtrace-udp.4 user/ngie/more-tests/sys/arm/allwinner/files.allwinner - copied unchanged from r281924, head/sys/arm/allwinner/files.allwinner user/ngie/more-tests/sys/arm/conf/AML8726 - copied unchanged from r281924, head/sys/arm/conf/AML8726 user/ngie/more-tests/sys/arm/freescale/imx/files.imx5 - copied unchanged from r281924, head/sys/arm/freescale/imx/files.imx5 user/ngie/more-tests/sys/dev/hwpmc/hwpmc_e500.c - copied unchanged from r281924, head/sys/dev/hwpmc/hwpmc_e500.c user/ngie/more-tests/sys/libkern/zlib.c - copied unchanged from r281924, head/sys/libkern/zlib.c user/ngie/more-tests/sys/modules/dtb/allwinner/ - copied from r281924, head/sys/modules/dtb/allwinner/ user/ngie/more-tests/sys/sys/zlib.h - copied unchanged from r281924, head/sys/sys/zlib.h user/ngie/more-tests/sys/sys/zutil.h - copied unchanged from r281924, head/sys/sys/zutil.h user/ngie/more-tests/sys/x86/x86/cpu_machdep.c - copied unchanged from r281924, head/sys/x86/x86/cpu_machdep.c user/ngie/more-tests/usr.sbin/bluetooth/hccontrol/le.c - copied unchanged from r281924, head/usr.sbin/bluetooth/hccontrol/le.c Deleted: user/ngie/more-tests/contrib/bmake/unit-tests/comment user/ngie/more-tests/contrib/bmake/unit-tests/cond1 user/ngie/more-tests/contrib/bmake/unit-tests/doterror user/ngie/more-tests/contrib/bmake/unit-tests/dotwait user/ngie/more-tests/contrib/bmake/unit-tests/error user/ngie/more-tests/contrib/bmake/unit-tests/export user/ngie/more-tests/contrib/bmake/unit-tests/export-all user/ngie/more-tests/contrib/bmake/unit-tests/export-env user/ngie/more-tests/contrib/bmake/unit-tests/forloop user/ngie/more-tests/contrib/bmake/unit-tests/forsubst user/ngie/more-tests/contrib/bmake/unit-tests/hash user/ngie/more-tests/contrib/bmake/unit-tests/misc user/ngie/more-tests/contrib/bmake/unit-tests/moderrs user/ngie/more-tests/contrib/bmake/unit-tests/modmatch user/ngie/more-tests/contrib/bmake/unit-tests/modmisc user/ngie/more-tests/contrib/bmake/unit-tests/modorder user/ngie/more-tests/contrib/bmake/unit-tests/modts user/ngie/more-tests/contrib/bmake/unit-tests/modword user/ngie/more-tests/contrib/bmake/unit-tests/order user/ngie/more-tests/contrib/bmake/unit-tests/phony-end user/ngie/more-tests/contrib/bmake/unit-tests/posix user/ngie/more-tests/contrib/bmake/unit-tests/qequals user/ngie/more-tests/contrib/bmake/unit-tests/sunshcmd user/ngie/more-tests/contrib/bmake/unit-tests/sysv user/ngie/more-tests/contrib/bmake/unit-tests/ternary user/ngie/more-tests/contrib/bmake/unit-tests/test.exp user/ngie/more-tests/contrib/bmake/unit-tests/unexport user/ngie/more-tests/contrib/bmake/unit-tests/unexport-env user/ngie/more-tests/contrib/bmake/unit-tests/varcmd user/ngie/more-tests/contrib/wpa/hostapd/dump_state.c user/ngie/more-tests/contrib/wpa/hostapd/dump_state.h user/ngie/more-tests/contrib/wpa/patches/openssl-0.9.8-tls-extensions.patch user/ngie/more-tests/contrib/wpa/patches/openssl-0.9.8d-tls-extensions.patch user/ngie/more-tests/contrib/wpa/patches/openssl-0.9.8e-tls-extensions.patch user/ngie/more-tests/contrib/wpa/patches/openssl-0.9.8g-tls-extensions.patch user/ngie/more-tests/contrib/wpa/patches/openssl-0.9.8h-tls-extensions.patch user/ngie/more-tests/contrib/wpa/patches/openssl-0.9.8i-tls-extensions.patch user/ngie/more-tests/contrib/wpa/patches/openssl-0.9.8x-tls-extensions.patch user/ngie/more-tests/contrib/wpa/patches/openssl-0.9.9-session-ticket.patch user/ngie/more-tests/contrib/wpa/src/crypto/crypto_nss.c user/ngie/more-tests/contrib/wpa/src/crypto/fips_prf_cryptoapi.c user/ngie/more-tests/contrib/wpa/src/crypto/fips_prf_gnutls.c user/ngie/more-tests/contrib/wpa/src/crypto/fips_prf_nss.c user/ngie/more-tests/contrib/wpa/src/crypto/tls_nss.c user/ngie/more-tests/contrib/wpa/src/utils/eloop_none.c user/ngie/more-tests/lib/libc/sys/ftruncate.c user/ngie/more-tests/lib/libc/sys/lseek.c user/ngie/more-tests/lib/libc/sys/mmap.c user/ngie/more-tests/lib/libc/sys/pread.c user/ngie/more-tests/lib/libc/sys/pwrite.c user/ngie/more-tests/lib/libc/sys/truncate.c user/ngie/more-tests/sys/arm/amlogic/aml8726/files.smp user/ngie/more-tests/sys/arm/amlogic/aml8726/std.odroidc1 user/ngie/more-tests/sys/arm/amlogic/aml8726/std.vsatv102-m6 user/ngie/more-tests/sys/arm/freescale/imx/files.imx51 user/ngie/more-tests/sys/arm/freescale/imx/files.imx53 user/ngie/more-tests/sys/net/zlib.c user/ngie/more-tests/sys/net/zlib.h user/ngie/more-tests/sys/net/zutil.h user/ngie/more-tests/sys/netipsec/xform_ipip.c user/ngie/more-tests/tools/build/options/WITHOUT_SYSCALL_COMPAT Modified: user/ngie/more-tests/.arcconfig user/ngie/more-tests/.arclint user/ngie/more-tests/Makefile.inc1 user/ngie/more-tests/ObsoleteFiles.inc user/ngie/more-tests/README user/ngie/more-tests/bin/ed/glbl.c user/ngie/more-tests/bin/sh/sh.1 user/ngie/more-tests/bin/sh/tests/builtins/Makefile user/ngie/more-tests/bin/sh/trap.c user/ngie/more-tests/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 user/ngie/more-tests/contrib/bmake/ChangeLog user/ngie/more-tests/contrib/bmake/FILES user/ngie/more-tests/contrib/bmake/Makefile user/ngie/more-tests/contrib/bmake/PSD.doc/Makefile user/ngie/more-tests/contrib/bmake/PSD.doc/tutorial.ms user/ngie/more-tests/contrib/bmake/bmake.1 user/ngie/more-tests/contrib/bmake/bmake.cat1 user/ngie/more-tests/contrib/bmake/compat.c user/ngie/more-tests/contrib/bmake/configure user/ngie/more-tests/contrib/bmake/configure.in user/ngie/more-tests/contrib/bmake/job.c user/ngie/more-tests/contrib/bmake/lst.h user/ngie/more-tests/contrib/bmake/lst.lib/lstInt.h user/ngie/more-tests/contrib/bmake/lst.lib/lstRemove.c user/ngie/more-tests/contrib/bmake/main.c user/ngie/more-tests/contrib/bmake/make.1 user/ngie/more-tests/contrib/bmake/make.c user/ngie/more-tests/contrib/bmake/make.h user/ngie/more-tests/contrib/bmake/meta.c user/ngie/more-tests/contrib/bmake/mk/ChangeLog user/ngie/more-tests/contrib/bmake/mk/FILES user/ngie/more-tests/contrib/bmake/mk/auto.dep.mk user/ngie/more-tests/contrib/bmake/mk/auto.obj.mk user/ngie/more-tests/contrib/bmake/mk/autodep.mk user/ngie/more-tests/contrib/bmake/mk/dep.mk user/ngie/more-tests/contrib/bmake/mk/dirdeps.mk user/ngie/more-tests/contrib/bmake/mk/gendirdeps.mk user/ngie/more-tests/contrib/bmake/mk/install-mk user/ngie/more-tests/contrib/bmake/mk/links.mk user/ngie/more-tests/contrib/bmake/mk/meta.autodep.mk user/ngie/more-tests/contrib/bmake/mk/meta.stage.mk user/ngie/more-tests/contrib/bmake/mk/meta.sys.mk user/ngie/more-tests/contrib/bmake/mk/meta2deps.py user/ngie/more-tests/contrib/bmake/mk/meta2deps.sh user/ngie/more-tests/contrib/bmake/mk/mk-files.txt user/ngie/more-tests/contrib/bmake/mk/own.mk user/ngie/more-tests/contrib/bmake/mk/sys.dependfile.mk user/ngie/more-tests/contrib/bmake/nonints.h user/ngie/more-tests/contrib/bmake/parse.c user/ngie/more-tests/contrib/bmake/suff.c user/ngie/more-tests/contrib/bmake/targ.c user/ngie/more-tests/contrib/bmake/unit-tests/Makefile.in user/ngie/more-tests/contrib/bmake/var.c user/ngie/more-tests/contrib/llvm/lib/MC/MCParser/AsmParser.cpp user/ngie/more-tests/contrib/wpa/COPYING user/ngie/more-tests/contrib/wpa/README user/ngie/more-tests/contrib/wpa/hostapd/ChangeLog user/ngie/more-tests/contrib/wpa/hostapd/README user/ngie/more-tests/contrib/wpa/hostapd/README-WPS user/ngie/more-tests/contrib/wpa/hostapd/config_file.c user/ngie/more-tests/contrib/wpa/hostapd/ctrl_iface.c user/ngie/more-tests/contrib/wpa/hostapd/defconfig user/ngie/more-tests/contrib/wpa/hostapd/eap_register.c user/ngie/more-tests/contrib/wpa/hostapd/hlr_auc_gw.c user/ngie/more-tests/contrib/wpa/hostapd/hostapd.8 user/ngie/more-tests/contrib/wpa/hostapd/hostapd.conf user/ngie/more-tests/contrib/wpa/hostapd/hostapd.eap_user user/ngie/more-tests/contrib/wpa/hostapd/hostapd.eap_user_sqlite user/ngie/more-tests/contrib/wpa/hostapd/hostapd_cli.c user/ngie/more-tests/contrib/wpa/hostapd/main.c user/ngie/more-tests/contrib/wpa/src/ap/accounting.c user/ngie/more-tests/contrib/wpa/src/ap/ap_config.c user/ngie/more-tests/contrib/wpa/src/ap/ap_config.h user/ngie/more-tests/contrib/wpa/src/ap/ap_drv_ops.c user/ngie/more-tests/contrib/wpa/src/ap/ap_drv_ops.h user/ngie/more-tests/contrib/wpa/src/ap/ap_list.c user/ngie/more-tests/contrib/wpa/src/ap/ap_list.h user/ngie/more-tests/contrib/wpa/src/ap/ap_mlme.c user/ngie/more-tests/contrib/wpa/src/ap/authsrv.c user/ngie/more-tests/contrib/wpa/src/ap/beacon.c user/ngie/more-tests/contrib/wpa/src/ap/beacon.h user/ngie/more-tests/contrib/wpa/src/ap/ctrl_iface_ap.c user/ngie/more-tests/contrib/wpa/src/ap/ctrl_iface_ap.h user/ngie/more-tests/contrib/wpa/src/ap/drv_callbacks.c user/ngie/more-tests/contrib/wpa/src/ap/eap_user_db.c user/ngie/more-tests/contrib/wpa/src/ap/gas_serv.c user/ngie/more-tests/contrib/wpa/src/ap/gas_serv.h user/ngie/more-tests/contrib/wpa/src/ap/hostapd.c user/ngie/more-tests/contrib/wpa/src/ap/hostapd.h user/ngie/more-tests/contrib/wpa/src/ap/hs20.c user/ngie/more-tests/contrib/wpa/src/ap/hs20.h user/ngie/more-tests/contrib/wpa/src/ap/hw_features.c user/ngie/more-tests/contrib/wpa/src/ap/hw_features.h user/ngie/more-tests/contrib/wpa/src/ap/iapp.c user/ngie/more-tests/contrib/wpa/src/ap/ieee802_11.c user/ngie/more-tests/contrib/wpa/src/ap/ieee802_11.h user/ngie/more-tests/contrib/wpa/src/ap/ieee802_11_auth.c user/ngie/more-tests/contrib/wpa/src/ap/ieee802_11_ht.c user/ngie/more-tests/contrib/wpa/src/ap/ieee802_11_shared.c user/ngie/more-tests/contrib/wpa/src/ap/ieee802_11_vht.c user/ngie/more-tests/contrib/wpa/src/ap/ieee802_1x.c user/ngie/more-tests/contrib/wpa/src/ap/ieee802_1x.h user/ngie/more-tests/contrib/wpa/src/ap/p2p_hostapd.c user/ngie/more-tests/contrib/wpa/src/ap/peerkey_auth.c user/ngie/more-tests/contrib/wpa/src/ap/pmksa_cache_auth.c user/ngie/more-tests/contrib/wpa/src/ap/pmksa_cache_auth.h user/ngie/more-tests/contrib/wpa/src/ap/sta_info.c user/ngie/more-tests/contrib/wpa/src/ap/sta_info.h user/ngie/more-tests/contrib/wpa/src/ap/tkip_countermeasures.c user/ngie/more-tests/contrib/wpa/src/ap/vlan_init.c user/ngie/more-tests/contrib/wpa/src/ap/vlan_init.h user/ngie/more-tests/contrib/wpa/src/ap/wmm.c user/ngie/more-tests/contrib/wpa/src/ap/wmm.h user/ngie/more-tests/contrib/wpa/src/ap/wnm_ap.c user/ngie/more-tests/contrib/wpa/src/ap/wnm_ap.h user/ngie/more-tests/contrib/wpa/src/ap/wpa_auth.c user/ngie/more-tests/contrib/wpa/src/ap/wpa_auth.h user/ngie/more-tests/contrib/wpa/src/ap/wpa_auth_ft.c user/ngie/more-tests/contrib/wpa/src/ap/wpa_auth_glue.c user/ngie/more-tests/contrib/wpa/src/ap/wpa_auth_i.h user/ngie/more-tests/contrib/wpa/src/ap/wpa_auth_ie.c user/ngie/more-tests/contrib/wpa/src/ap/wpa_auth_ie.h user/ngie/more-tests/contrib/wpa/src/ap/wps_hostapd.c user/ngie/more-tests/contrib/wpa/src/ap/wps_hostapd.h user/ngie/more-tests/contrib/wpa/src/common/defs.h user/ngie/more-tests/contrib/wpa/src/common/eapol_common.h user/ngie/more-tests/contrib/wpa/src/common/ieee802_11_common.c user/ngie/more-tests/contrib/wpa/src/common/ieee802_11_common.h user/ngie/more-tests/contrib/wpa/src/common/ieee802_11_defs.h user/ngie/more-tests/contrib/wpa/src/common/privsep_commands.h user/ngie/more-tests/contrib/wpa/src/common/version.h user/ngie/more-tests/contrib/wpa/src/common/wpa_common.c user/ngie/more-tests/contrib/wpa/src/common/wpa_common.h user/ngie/more-tests/contrib/wpa/src/common/wpa_ctrl.c user/ngie/more-tests/contrib/wpa/src/common/wpa_ctrl.h user/ngie/more-tests/contrib/wpa/src/crypto/aes-ccm.c user/ngie/more-tests/contrib/wpa/src/crypto/aes-eax.c user/ngie/more-tests/contrib/wpa/src/crypto/aes-gcm.c user/ngie/more-tests/contrib/wpa/src/crypto/aes-omac1.c user/ngie/more-tests/contrib/wpa/src/crypto/aes-unwrap.c user/ngie/more-tests/contrib/wpa/src/crypto/aes-wrap.c user/ngie/more-tests/contrib/wpa/src/crypto/aes_wrap.h user/ngie/more-tests/contrib/wpa/src/crypto/crypto.h user/ngie/more-tests/contrib/wpa/src/crypto/crypto_internal-rsa.c user/ngie/more-tests/contrib/wpa/src/crypto/crypto_openssl.c user/ngie/more-tests/contrib/wpa/src/crypto/dh_groups.c user/ngie/more-tests/contrib/wpa/src/crypto/dh_groups.h user/ngie/more-tests/contrib/wpa/src/crypto/md5.c user/ngie/more-tests/contrib/wpa/src/crypto/milenage.c user/ngie/more-tests/contrib/wpa/src/crypto/ms_funcs.c user/ngie/more-tests/contrib/wpa/src/crypto/random.c user/ngie/more-tests/contrib/wpa/src/crypto/sha1-internal.c user/ngie/more-tests/contrib/wpa/src/crypto/sha1-prf.c user/ngie/more-tests/contrib/wpa/src/crypto/sha1.c user/ngie/more-tests/contrib/wpa/src/crypto/sha256-prf.c user/ngie/more-tests/contrib/wpa/src/crypto/sha256.h user/ngie/more-tests/contrib/wpa/src/crypto/tls.h user/ngie/more-tests/contrib/wpa/src/crypto/tls_gnutls.c user/ngie/more-tests/contrib/wpa/src/crypto/tls_internal.c user/ngie/more-tests/contrib/wpa/src/crypto/tls_none.c user/ngie/more-tests/contrib/wpa/src/crypto/tls_openssl.c user/ngie/more-tests/contrib/wpa/src/crypto/tls_schannel.c user/ngie/more-tests/contrib/wpa/src/drivers/driver.h user/ngie/more-tests/contrib/wpa/src/drivers/driver_bsd.c user/ngie/more-tests/contrib/wpa/src/drivers/driver_common.c user/ngie/more-tests/contrib/wpa/src/drivers/driver_ndis.c user/ngie/more-tests/contrib/wpa/src/drivers/driver_privsep.c user/ngie/more-tests/contrib/wpa/src/drivers/driver_wired.c user/ngie/more-tests/contrib/wpa/src/drivers/drivers.c user/ngie/more-tests/contrib/wpa/src/eap_common/eap_common.c user/ngie/more-tests/contrib/wpa/src/eap_common/eap_common.h user/ngie/more-tests/contrib/wpa/src/eap_common/eap_defs.h user/ngie/more-tests/contrib/wpa/src/eap_common/eap_fast_common.c user/ngie/more-tests/contrib/wpa/src/eap_common/eap_fast_common.h user/ngie/more-tests/contrib/wpa/src/eap_common/eap_gpsk_common.c user/ngie/more-tests/contrib/wpa/src/eap_common/eap_gpsk_common.h user/ngie/more-tests/contrib/wpa/src/eap_common/eap_ikev2_common.c user/ngie/more-tests/contrib/wpa/src/eap_common/eap_ikev2_common.h user/ngie/more-tests/contrib/wpa/src/eap_common/eap_pax_common.c user/ngie/more-tests/contrib/wpa/src/eap_common/eap_pax_common.h user/ngie/more-tests/contrib/wpa/src/eap_common/eap_pwd_common.c user/ngie/more-tests/contrib/wpa/src/eap_common/eap_pwd_common.h user/ngie/more-tests/contrib/wpa/src/eap_common/eap_sim_common.c user/ngie/more-tests/contrib/wpa/src/eap_common/eap_sim_common.h user/ngie/more-tests/contrib/wpa/src/eap_common/ikev2_common.c user/ngie/more-tests/contrib/wpa/src/eap_common/ikev2_common.h user/ngie/more-tests/contrib/wpa/src/eap_peer/eap.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap.h user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_aka.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_config.h user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_fast.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_fast_pac.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_gpsk.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_i.h user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_ikev2.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_leap.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_methods.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_methods.h user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_mschapv2.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_pax.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_peap.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_psk.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_pwd.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_sake.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_sim.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_tls.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_tls_common.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_tls_common.h user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_tnc.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_ttls.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_vendor_test.c user/ngie/more-tests/contrib/wpa/src/eap_peer/eap_wsc.c user/ngie/more-tests/contrib/wpa/src/eap_peer/ikev2.c user/ngie/more-tests/contrib/wpa/src/eap_peer/mschapv2.c user/ngie/more-tests/contrib/wpa/src/eap_peer/tncc.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap.h user/ngie/more-tests/contrib/wpa/src/eap_server/eap_i.h user/ngie/more-tests/contrib/wpa/src/eap_server/eap_methods.h user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_aka.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_fast.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_gpsk.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_gtc.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_identity.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_ikev2.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_md5.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_methods.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_mschapv2.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_pax.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_peap.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_psk.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_pwd.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_sake.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_sim.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_tls.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_tls_common.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_tnc.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_ttls.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_server_wsc.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_sim_db.c user/ngie/more-tests/contrib/wpa/src/eap_server/eap_tls_common.h user/ngie/more-tests/contrib/wpa/src/eap_server/ikev2.c user/ngie/more-tests/contrib/wpa/src/eap_server/tncs.c user/ngie/more-tests/contrib/wpa/src/eapol_auth/eapol_auth_dump.c user/ngie/more-tests/contrib/wpa/src/eapol_auth/eapol_auth_sm.c user/ngie/more-tests/contrib/wpa/src/eapol_auth/eapol_auth_sm.h user/ngie/more-tests/contrib/wpa/src/eapol_auth/eapol_auth_sm_i.h user/ngie/more-tests/contrib/wpa/src/eapol_supp/eapol_supp_sm.c user/ngie/more-tests/contrib/wpa/src/eapol_supp/eapol_supp_sm.h user/ngie/more-tests/contrib/wpa/src/l2_packet/l2_packet.h user/ngie/more-tests/contrib/wpa/src/l2_packet/l2_packet_freebsd.c user/ngie/more-tests/contrib/wpa/src/l2_packet/l2_packet_ndis.c user/ngie/more-tests/contrib/wpa/src/l2_packet/l2_packet_none.c user/ngie/more-tests/contrib/wpa/src/l2_packet/l2_packet_privsep.c user/ngie/more-tests/contrib/wpa/src/p2p/p2p.c user/ngie/more-tests/contrib/wpa/src/p2p/p2p.h user/ngie/more-tests/contrib/wpa/src/p2p/p2p_build.c user/ngie/more-tests/contrib/wpa/src/p2p/p2p_dev_disc.c user/ngie/more-tests/contrib/wpa/src/p2p/p2p_go_neg.c user/ngie/more-tests/contrib/wpa/src/p2p/p2p_group.c user/ngie/more-tests/contrib/wpa/src/p2p/p2p_i.h user/ngie/more-tests/contrib/wpa/src/p2p/p2p_invitation.c user/ngie/more-tests/contrib/wpa/src/p2p/p2p_parse.c user/ngie/more-tests/contrib/wpa/src/p2p/p2p_pd.c user/ngie/more-tests/contrib/wpa/src/p2p/p2p_sd.c user/ngie/more-tests/contrib/wpa/src/p2p/p2p_utils.c user/ngie/more-tests/contrib/wpa/src/radius/radius.c user/ngie/more-tests/contrib/wpa/src/radius/radius.h user/ngie/more-tests/contrib/wpa/src/radius/radius_client.c user/ngie/more-tests/contrib/wpa/src/radius/radius_das.c user/ngie/more-tests/contrib/wpa/src/radius/radius_das.h user/ngie/more-tests/contrib/wpa/src/radius/radius_server.c user/ngie/more-tests/contrib/wpa/src/radius/radius_server.h user/ngie/more-tests/contrib/wpa/src/rsn_supp/peerkey.c user/ngie/more-tests/contrib/wpa/src/rsn_supp/peerkey.h user/ngie/more-tests/contrib/wpa/src/rsn_supp/pmksa_cache.c user/ngie/more-tests/contrib/wpa/src/rsn_supp/pmksa_cache.h user/ngie/more-tests/contrib/wpa/src/rsn_supp/preauth.c user/ngie/more-tests/contrib/wpa/src/rsn_supp/preauth.h user/ngie/more-tests/contrib/wpa/src/rsn_supp/tdls.c user/ngie/more-tests/contrib/wpa/src/rsn_supp/wpa.c user/ngie/more-tests/contrib/wpa/src/rsn_supp/wpa.h user/ngie/more-tests/contrib/wpa/src/rsn_supp/wpa_ft.c user/ngie/more-tests/contrib/wpa/src/rsn_supp/wpa_i.h user/ngie/more-tests/contrib/wpa/src/rsn_supp/wpa_ie.c user/ngie/more-tests/contrib/wpa/src/rsn_supp/wpa_ie.h user/ngie/more-tests/contrib/wpa/src/tls/asn1.c user/ngie/more-tests/contrib/wpa/src/tls/asn1.h user/ngie/more-tests/contrib/wpa/src/tls/libtommath.c user/ngie/more-tests/contrib/wpa/src/tls/pkcs1.c user/ngie/more-tests/contrib/wpa/src/tls/pkcs1.h user/ngie/more-tests/contrib/wpa/src/tls/rsa.c user/ngie/more-tests/contrib/wpa/src/tls/rsa.h user/ngie/more-tests/contrib/wpa/src/tls/tlsv1_client.c user/ngie/more-tests/contrib/wpa/src/tls/tlsv1_client_read.c user/ngie/more-tests/contrib/wpa/src/tls/tlsv1_client_write.c user/ngie/more-tests/contrib/wpa/src/tls/tlsv1_common.c user/ngie/more-tests/contrib/wpa/src/tls/tlsv1_common.h user/ngie/more-tests/contrib/wpa/src/tls/tlsv1_record.c user/ngie/more-tests/contrib/wpa/src/tls/tlsv1_server.c user/ngie/more-tests/contrib/wpa/src/tls/tlsv1_server.h user/ngie/more-tests/contrib/wpa/src/tls/tlsv1_server_i.h user/ngie/more-tests/contrib/wpa/src/tls/tlsv1_server_read.c user/ngie/more-tests/contrib/wpa/src/tls/tlsv1_server_write.c user/ngie/more-tests/contrib/wpa/src/tls/x509v3.c user/ngie/more-tests/contrib/wpa/src/utils/base64.c user/ngie/more-tests/contrib/wpa/src/utils/build_config.h user/ngie/more-tests/contrib/wpa/src/utils/common.c user/ngie/more-tests/contrib/wpa/src/utils/common.h user/ngie/more-tests/contrib/wpa/src/utils/edit.c user/ngie/more-tests/contrib/wpa/src/utils/edit_readline.c user/ngie/more-tests/contrib/wpa/src/utils/edit_simple.c user/ngie/more-tests/contrib/wpa/src/utils/eloop.c user/ngie/more-tests/contrib/wpa/src/utils/eloop.h user/ngie/more-tests/contrib/wpa/src/utils/eloop_win.c user/ngie/more-tests/contrib/wpa/src/utils/ext_password_test.c user/ngie/more-tests/contrib/wpa/src/utils/ip_addr.c user/ngie/more-tests/contrib/wpa/src/utils/ip_addr.h user/ngie/more-tests/contrib/wpa/src/utils/list.h user/ngie/more-tests/contrib/wpa/src/utils/os.h user/ngie/more-tests/contrib/wpa/src/utils/os_internal.c user/ngie/more-tests/contrib/wpa/src/utils/os_none.c user/ngie/more-tests/contrib/wpa/src/utils/os_unix.c user/ngie/more-tests/contrib/wpa/src/utils/os_win32.c user/ngie/more-tests/contrib/wpa/src/utils/pcsc_funcs.c user/ngie/more-tests/contrib/wpa/src/utils/pcsc_funcs.h user/ngie/more-tests/contrib/wpa/src/utils/radiotap.c user/ngie/more-tests/contrib/wpa/src/utils/radiotap.h user/ngie/more-tests/contrib/wpa/src/utils/radiotap_iter.h user/ngie/more-tests/contrib/wpa/src/utils/trace.c user/ngie/more-tests/contrib/wpa/src/utils/trace.h user/ngie/more-tests/contrib/wpa/src/utils/uuid.c user/ngie/more-tests/contrib/wpa/src/utils/wpa_debug.c user/ngie/more-tests/contrib/wpa/src/utils/wpa_debug.h user/ngie/more-tests/contrib/wpa/src/utils/wpabuf.c user/ngie/more-tests/contrib/wpa/src/utils/wpabuf.h user/ngie/more-tests/contrib/wpa/src/wps/http_client.c user/ngie/more-tests/contrib/wpa/src/wps/http_server.c user/ngie/more-tests/contrib/wpa/src/wps/httpread.c user/ngie/more-tests/contrib/wpa/src/wps/ndef.c user/ngie/more-tests/contrib/wpa/src/wps/wps.c user/ngie/more-tests/contrib/wpa/src/wps/wps.h user/ngie/more-tests/contrib/wpa/src/wps/wps_attr_build.c user/ngie/more-tests/contrib/wpa/src/wps/wps_attr_parse.c user/ngie/more-tests/contrib/wpa/src/wps/wps_attr_parse.h user/ngie/more-tests/contrib/wpa/src/wps/wps_attr_process.c user/ngie/more-tests/contrib/wpa/src/wps/wps_common.c user/ngie/more-tests/contrib/wpa/src/wps/wps_defs.h user/ngie/more-tests/contrib/wpa/src/wps/wps_dev_attr.c user/ngie/more-tests/contrib/wpa/src/wps/wps_dev_attr.h user/ngie/more-tests/contrib/wpa/src/wps/wps_enrollee.c user/ngie/more-tests/contrib/wpa/src/wps/wps_er.c user/ngie/more-tests/contrib/wpa/src/wps/wps_er.h user/ngie/more-tests/contrib/wpa/src/wps/wps_er_ssdp.c user/ngie/more-tests/contrib/wpa/src/wps/wps_i.h user/ngie/more-tests/contrib/wpa/src/wps/wps_registrar.c user/ngie/more-tests/contrib/wpa/src/wps/wps_upnp.c user/ngie/more-tests/contrib/wpa/src/wps/wps_upnp_ap.c user/ngie/more-tests/contrib/wpa/src/wps/wps_upnp_i.h user/ngie/more-tests/contrib/wpa/src/wps/wps_upnp_ssdp.c user/ngie/more-tests/contrib/wpa/src/wps/wps_upnp_web.c user/ngie/more-tests/contrib/wpa/src/wps/wps_validate.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/ChangeLog user/ngie/more-tests/contrib/wpa/wpa_supplicant/README user/ngie/more-tests/contrib/wpa/wpa_supplicant/README-HS20 user/ngie/more-tests/contrib/wpa/wpa_supplicant/README-P2P user/ngie/more-tests/contrib/wpa/wpa_supplicant/README-WPS user/ngie/more-tests/contrib/wpa/wpa_supplicant/ap.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/ap.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/bgscan.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/bgscan.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/bgscan_learn.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/bgscan_simple.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/bss.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/bss.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/config.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/config.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/config_file.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/config_none.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/config_ssid.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/ctrl_iface.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/ctrl_iface.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/ctrl_iface_named_pipe.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/ctrl_iface_udp.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/ctrl_iface_unix.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/Makefile user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_common.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_dict_helpers.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_dict_helpers.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_new.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_new.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_p2p.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_p2p.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_new_handlers_wps.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_new_helpers.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_new_helpers.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_new_introspect.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_old.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_old.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_old_handlers.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_old_handlers.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/dbus/dbus_old_handlers_wps.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/defconfig user/ngie/more-tests/contrib/wpa/wpa_supplicant/driver_i.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/eap_register.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/eapol_test.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/events.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/examples/p2p-action.sh user/ngie/more-tests/contrib/wpa/wpa_supplicant/examples/wps-ap-cli user/ngie/more-tests/contrib/wpa/wpa_supplicant/examples/wps-nfc.py user/ngie/more-tests/contrib/wpa/wpa_supplicant/gas_query.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/gas_query.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/hs20_supplicant.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/hs20_supplicant.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/ibss_rsn.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/ibss_rsn.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/interworking.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/interworking.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/main.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/main_none.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/notify.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/notify.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/offchannel.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/p2p_supplicant.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/p2p_supplicant.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/preauth_test.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/scan.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/scan.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/sme.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/sme.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/tests/test_wpa.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/todo.txt user/ngie/more-tests/contrib/wpa/wpa_supplicant/wifi_display.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/wifi_display.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/wnm_sta.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/wnm_sta.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/wpa_cli.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/wpa_priv.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/wpa_supplicant.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/wpa_supplicant.conf user/ngie/more-tests/contrib/wpa/wpa_supplicant/wpa_supplicant_i.h user/ngie/more-tests/contrib/wpa/wpa_supplicant/wpa_supplicant_template.conf user/ngie/more-tests/contrib/wpa/wpa_supplicant/wpas_glue.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/wps_supplicant.c user/ngie/more-tests/contrib/wpa/wpa_supplicant/wps_supplicant.h user/ngie/more-tests/etc/defaults/rc.conf user/ngie/more-tests/etc/rc.d/mountd user/ngie/more-tests/etc/rc.d/nfsd user/ngie/more-tests/lib/libc/Makefile user/ngie/more-tests/lib/libc/amd64/sys/Makefile.inc user/ngie/more-tests/lib/libc/arm/sys/Makefile.inc user/ngie/more-tests/lib/libc/gen/_once_stub.c user/ngie/more-tests/lib/libc/gen/setproctitle.c user/ngie/more-tests/lib/libc/gen/waitid.c user/ngie/more-tests/lib/libc/i386/sys/Makefile.inc user/ngie/more-tests/lib/libc/iconv/citrus_prop.c user/ngie/more-tests/lib/libc/include/compat.h user/ngie/more-tests/lib/libc/include/libc_private.h user/ngie/more-tests/lib/libc/mips/sys/Makefile.inc user/ngie/more-tests/lib/libc/net/sctp_recvmsg.3 user/ngie/more-tests/lib/libc/powerpc/sys/Makefile.inc user/ngie/more-tests/lib/libc/powerpc64/sys/Makefile.inc user/ngie/more-tests/lib/libc/regex/regcomp.c user/ngie/more-tests/lib/libc/sparc64/sys/Makefile.inc user/ngie/more-tests/lib/libc/stdio/flags.c user/ngie/more-tests/lib/libc/stdio/open_memstream.3 user/ngie/more-tests/lib/libc/stdio/open_memstream.c user/ngie/more-tests/lib/libc/stdio/open_wmemstream.c user/ngie/more-tests/lib/libc/sys/Makefile.inc user/ngie/more-tests/lib/libc/sys/closefrom.2 user/ngie/more-tests/lib/libc/sys/fcntl.c user/ngie/more-tests/lib/libc/sys/interposing_table.c user/ngie/more-tests/lib/libc/sys/procctl.2 user/ngie/more-tests/lib/libgeom/geom_xml2tree.c user/ngie/more-tests/lib/libmt/mt.3 user/ngie/more-tests/lib/libpmc/libpmc.c user/ngie/more-tests/lib/libpmc/pmc.haswellxeon.3 user/ngie/more-tests/lib/libstand/Makefile user/ngie/more-tests/lib/libthr/Makefile user/ngie/more-tests/lib/libthr/thread/thr_clean.c user/ngie/more-tests/lib/libthr/thread/thr_syscalls.c user/ngie/more-tests/libexec/rtld-elf/rtld.c user/ngie/more-tests/release/release.conf.sample user/ngie/more-tests/release/release.sh user/ngie/more-tests/release/scripts/mk-vmimage.sh user/ngie/more-tests/release/tools/vmimage.subr user/ngie/more-tests/sbin/dmesg/dmesg.c user/ngie/more-tests/sbin/ipfw/nat.c user/ngie/more-tests/sbin/mount/mount.8 user/ngie/more-tests/sbin/mount/mount.c user/ngie/more-tests/sbin/mount_nfs/Makefile user/ngie/more-tests/sbin/mount_nfs/mount_nfs.8 user/ngie/more-tests/share/man/man3/pthread_testcancel.3 user/ngie/more-tests/share/man/man3/queue.3 user/ngie/more-tests/share/man/man4/Makefile user/ngie/more-tests/share/man/man4/ada.4 user/ngie/more-tests/share/man/man4/ata.4 user/ngie/more-tests/share/man/man4/run.4 user/ngie/more-tests/share/man/man4/urtwn.4 user/ngie/more-tests/share/man/man5/rc.conf.5 user/ngie/more-tests/share/man/man5/src.conf.5 user/ngie/more-tests/share/man/man9/BUS_BIND_INTR.9 user/ngie/more-tests/share/man/man9/BUS_CHILD_DELETED.9 user/ngie/more-tests/share/man/man9/BUS_CHILD_DETACHED.9 user/ngie/more-tests/share/man/man9/BUS_DESCRIBE_INTR.9 user/ngie/more-tests/share/man/man9/BUS_NEW_PASS.9 user/ngie/more-tests/share/man/man9/Makefile user/ngie/more-tests/share/man/man9/SDT.9 user/ngie/more-tests/share/man/man9/VOP_ADVISE.9 user/ngie/more-tests/share/man/man9/VOP_ALLOCATE.9 user/ngie/more-tests/share/man/man9/bus_adjust_resource.9 user/ngie/more-tests/share/man/man9/bus_generic_new_pass.9 user/ngie/more-tests/share/man/man9/bus_set_pass.9 user/ngie/more-tests/share/man/man9/getenv.9 user/ngie/more-tests/share/man/man9/panic.9 user/ngie/more-tests/share/man/man9/printf.9 user/ngie/more-tests/share/man/man9/refcount.9 user/ngie/more-tests/share/man/man9/sglist.9 user/ngie/more-tests/share/man/man9/shm_map.9 user/ngie/more-tests/share/mk/src.opts.mk user/ngie/more-tests/sys/amd64/amd64/machdep.c user/ngie/more-tests/sys/amd64/amd64/pmap.c user/ngie/more-tests/sys/amd64/include/md_var.h user/ngie/more-tests/sys/amd64/include/vm.h user/ngie/more-tests/sys/amd64/vmm/amd/svm.c user/ngie/more-tests/sys/arm/allwinner/a10_clk.h user/ngie/more-tests/sys/arm/allwinner/a20/a20_mp.c user/ngie/more-tests/sys/arm/allwinner/a20/files.a20 user/ngie/more-tests/sys/arm/allwinner/a20/std.a20 user/ngie/more-tests/sys/arm/allwinner/files.a10 user/ngie/more-tests/sys/arm/allwinner/std.a10 user/ngie/more-tests/sys/arm/amlogic/aml8726/files.aml8726 user/ngie/more-tests/sys/arm/amlogic/aml8726/std.aml8726 user/ngie/more-tests/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c user/ngie/more-tests/sys/arm/conf/CUBIEBOARD user/ngie/more-tests/sys/arm/conf/CUBIEBOARD2 user/ngie/more-tests/sys/arm/conf/EFIKA_MX user/ngie/more-tests/sys/arm/conf/IMX53 user/ngie/more-tests/sys/arm/conf/IMX6 user/ngie/more-tests/sys/arm/conf/ODROIDC1 user/ngie/more-tests/sys/arm/conf/RPI2 user/ngie/more-tests/sys/arm/conf/VSATV102 user/ngie/more-tests/sys/arm/freescale/imx/std.imx51 user/ngie/more-tests/sys/arm/freescale/imx/std.imx53 user/ngie/more-tests/sys/arm64/arm64/pmap.c user/ngie/more-tests/sys/arm64/arm64/stack_machdep.c user/ngie/more-tests/sys/boot/fdt/dts/arm/bcm2836.dtsi user/ngie/more-tests/sys/boot/fdt/dts/arm/rpi2.dts user/ngie/more-tests/sys/boot/i386/common/edd.h user/ngie/more-tests/sys/boot/libstand32/Makefile user/ngie/more-tests/sys/boot/userboot/libstand/Makefile user/ngie/more-tests/sys/cam/scsi/scsi_all.c user/ngie/more-tests/sys/cam/scsi/scsi_da.c user/ngie/more-tests/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c user/ngie/more-tests/sys/cddl/dev/dtrace/amd64/dtrace_asm.S user/ngie/more-tests/sys/cddl/dev/dtrace/arm/dtrace_asm.S user/ngie/more-tests/sys/cddl/dev/dtrace/dtrace_hacks.c user/ngie/more-tests/sys/cddl/dev/dtrace/i386/dtrace_asm.S user/ngie/more-tests/sys/cddl/dev/dtrace/mips/dtrace_asm.S user/ngie/more-tests/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S user/ngie/more-tests/sys/compat/linux/linux_file.c user/ngie/more-tests/sys/compat/linux/linux_getcwd.c user/ngie/more-tests/sys/compat/linux/linux_misc.h user/ngie/more-tests/sys/conf/NOTES user/ngie/more-tests/sys/conf/files user/ngie/more-tests/sys/conf/files.amd64 user/ngie/more-tests/sys/conf/files.i386 user/ngie/more-tests/sys/conf/files.pc98 user/ngie/more-tests/sys/conf/files.powerpc user/ngie/more-tests/sys/conf/options user/ngie/more-tests/sys/conf/options.arm user/ngie/more-tests/sys/dev/acpica/acpi.c user/ngie/more-tests/sys/dev/acpica/acpivar.h user/ngie/more-tests/sys/dev/atkbdc/psm.c user/ngie/more-tests/sys/dev/bxe/bxe.h user/ngie/more-tests/sys/dev/e1000/if_igb.c user/ngie/more-tests/sys/dev/etherswitch/miiproxy.c user/ngie/more-tests/sys/dev/hwpmc/hwpmc_mpc7xxx.c user/ngie/more-tests/sys/dev/hwpmc/hwpmc_powerpc.c user/ngie/more-tests/sys/dev/hwpmc/hwpmc_powerpc.h user/ngie/more-tests/sys/dev/hwpmc/hwpmc_ppc970.c user/ngie/more-tests/sys/dev/hwpmc/pmc_events.h user/ngie/more-tests/sys/dev/ichsmb/ichsmb_pci.c user/ngie/more-tests/sys/dev/iicbus/iic.c user/ngie/more-tests/sys/dev/iicbus/iic.h user/ngie/more-tests/sys/dev/iicbus/iicbus_if.m user/ngie/more-tests/sys/dev/iicbus/iiconf.c user/ngie/more-tests/sys/dev/ixgbe/if_ix.c user/ngie/more-tests/sys/dev/mii/acphy.c user/ngie/more-tests/sys/dev/mii/brgphy.c user/ngie/more-tests/sys/dev/mii/lxtphy.c user/ngie/more-tests/sys/dev/mii/mii_physubr.c user/ngie/more-tests/sys/dev/mii/miivar.h user/ngie/more-tests/sys/dev/mii/mlphy.c user/ngie/more-tests/sys/dev/mii/xmphy.c user/ngie/more-tests/sys/dev/mxge/if_mxge.c user/ngie/more-tests/sys/dev/pccbb/pccbb_pci.c user/ngie/more-tests/sys/dev/pci/pci.c user/ngie/more-tests/sys/dev/pci/pci_pci.c user/ngie/more-tests/sys/dev/pci/pci_subr.c user/ngie/more-tests/sys/dev/pci/pcib_private.h user/ngie/more-tests/sys/dev/pci/pcivar.h user/ngie/more-tests/sys/dev/usb/controller/dwc_otg.c user/ngie/more-tests/sys/dev/usb/usbdevs user/ngie/more-tests/sys/dev/usb/video/udl.c user/ngie/more-tests/sys/dev/usb/wlan/if_run.c user/ngie/more-tests/sys/dev/usb/wlan/if_urtwn.c user/ngie/more-tests/sys/dev/virtio/block/virtio_blk.c user/ngie/more-tests/sys/dev/xen/netfront/netfront.c user/ngie/more-tests/sys/fs/nfs/nfs_commonport.c user/ngie/more-tests/sys/fs/nfsclient/nfs_clrpcops.c user/ngie/more-tests/sys/fs/nfsclient/nfs_clvfsops.c user/ngie/more-tests/sys/fs/nfsserver/nfs_nfsdport.c user/ngie/more-tests/sys/geom/uncompress/g_uncompress.c user/ngie/more-tests/sys/geom/uzip/g_uzip.c user/ngie/more-tests/sys/i386/i386/apic_vector.s user/ngie/more-tests/sys/i386/i386/db_trace.c user/ngie/more-tests/sys/i386/i386/machdep.c user/ngie/more-tests/sys/i386/i386/mp_machdep.c user/ngie/more-tests/sys/i386/i386/pmap.c user/ngie/more-tests/sys/i386/i386/swtch.s user/ngie/more-tests/sys/i386/include/md_var.h user/ngie/more-tests/sys/i386/include/smp.h user/ngie/more-tests/sys/i386/include/vm.h user/ngie/more-tests/sys/i386/xen/mp_machdep.c user/ngie/more-tests/sys/i386/xen/pmap.c user/ngie/more-tests/sys/kern/init_sysent.c user/ngie/more-tests/sys/kern/kern_exec.c user/ngie/more-tests/sys/kern/kern_gzio.c user/ngie/more-tests/sys/kern/kern_physio.c user/ngie/more-tests/sys/kern/kern_shutdown.c user/ngie/more-tests/sys/kern/kern_synch.c user/ngie/more-tests/sys/kern/kern_thread.c user/ngie/more-tests/sys/kern/link_elf.c user/ngie/more-tests/sys/kern/link_elf_obj.c user/ngie/more-tests/sys/kern/subr_prf.c user/ngie/more-tests/sys/kern/sys_generic.c user/ngie/more-tests/sys/kern/syscalls.c user/ngie/more-tests/sys/kern/syscalls.master user/ngie/more-tests/sys/kern/systrace_args.c user/ngie/more-tests/sys/kern/vfs_aio.c user/ngie/more-tests/sys/kern/vfs_cache.c user/ngie/more-tests/sys/kern/vfs_syscalls.c user/ngie/more-tests/sys/kern/vfs_vnops.c user/ngie/more-tests/sys/modules/hwpmc/Makefile user/ngie/more-tests/sys/modules/zlib/Makefile user/ngie/more-tests/sys/net/bpf.c user/ngie/more-tests/sys/net/bpf.h user/ngie/more-tests/sys/net/if_media.c user/ngie/more-tests/sys/net/if_vlan.c user/ngie/more-tests/sys/netgraph/bluetooth/include/ng_hci.h user/ngie/more-tests/sys/netgraph/ng_deflate.c user/ngie/more-tests/sys/netinet/ip_carp.c user/ngie/more-tests/sys/netipsec/ipsec.c user/ngie/more-tests/sys/netipsec/ipsec.h user/ngie/more-tests/sys/netipsec/ipsec_input.c user/ngie/more-tests/sys/netipsec/ipsec_output.c user/ngie/more-tests/sys/netipsec/key.c user/ngie/more-tests/sys/netipsec/xform.h user/ngie/more-tests/sys/netipsec/xform_ah.c user/ngie/more-tests/sys/netipsec/xform_esp.c user/ngie/more-tests/sys/netipsec/xform_ipcomp.c user/ngie/more-tests/sys/nfsclient/nfs.h user/ngie/more-tests/sys/opencrypto/cryptodeflate.c user/ngie/more-tests/sys/opencrypto/deflate.h user/ngie/more-tests/sys/powerpc/booke/interrupt.c user/ngie/more-tests/sys/powerpc/booke/locore.S user/ngie/more-tests/sys/powerpc/booke/machdep.c user/ngie/more-tests/sys/powerpc/booke/trap_subr.S user/ngie/more-tests/sys/powerpc/include/pmc_mdep.h user/ngie/more-tests/sys/sys/cdefs.h user/ngie/more-tests/sys/sys/fcntl.h user/ngie/more-tests/sys/sys/mbuf.h user/ngie/more-tests/sys/sys/pmc.h user/ngie/more-tests/sys/sys/procctl.h user/ngie/more-tests/sys/sys/syscall.h user/ngie/more-tests/sys/sys/syscall.mk user/ngie/more-tests/sys/sys/syscallsubr.h user/ngie/more-tests/sys/sys/sysproto.h user/ngie/more-tests/sys/sys/systm.h user/ngie/more-tests/sys/sys/vnode.h user/ngie/more-tests/sys/vm/device_pager.c user/ngie/more-tests/sys/vm/sg_pager.c user/ngie/more-tests/sys/vm/uma_core.c user/ngie/more-tests/sys/vm/vm_mmap.c user/ngie/more-tests/sys/x86/acpica/srat.c user/ngie/more-tests/sys/x86/include/mca.h user/ngie/more-tests/sys/x86/pci/qpi.c user/ngie/more-tests/sys/x86/x86/mca.c user/ngie/more-tests/sys/x86/xen/xen_apic.c user/ngie/more-tests/tests/sys/file/closefrom_test.c user/ngie/more-tests/tools/build/check-links.sh user/ngie/more-tests/tools/regression/lib/libc/stdio/test-open_memstream.c user/ngie/more-tests/tools/regression/lib/libc/stdio/test-open_wmemstream.c user/ngie/more-tests/tools/regression/netinet/arphold/arphold.c user/ngie/more-tests/tools/tools/netmap/pkt-gen.c user/ngie/more-tests/tools/tools/tscdrift/tscdrift.c user/ngie/more-tests/usr.bin/bmake/Makefile user/ngie/more-tests/usr.bin/bmake/unit-tests/Makefile user/ngie/more-tests/usr.bin/calendar/io.c user/ngie/more-tests/usr.bin/find/find.1 user/ngie/more-tests/usr.bin/nfsstat/Makefile user/ngie/more-tests/usr.bin/nfsstat/nfsstat.1 user/ngie/more-tests/usr.bin/nfsstat/nfsstat.c user/ngie/more-tests/usr.bin/patch/inp.c user/ngie/more-tests/usr.bin/patch/pch.c user/ngie/more-tests/usr.bin/patch/util.c user/ngie/more-tests/usr.bin/perror/perror.1 user/ngie/more-tests/usr.bin/perror/perror.c user/ngie/more-tests/usr.bin/procstat/procstat_rusage.c user/ngie/more-tests/usr.bin/protect/protect.1 user/ngie/more-tests/usr.bin/protect/protect.c user/ngie/more-tests/usr.bin/rpcgen/rpc_sample.c user/ngie/more-tests/usr.sbin/bhyve/block_if.c user/ngie/more-tests/usr.sbin/bhyve/block_if.h user/ngie/more-tests/usr.sbin/bhyve/ioapic.c user/ngie/more-tests/usr.sbin/bhyve/ioapic.h user/ngie/more-tests/usr.sbin/bhyve/pci_ahci.c user/ngie/more-tests/usr.sbin/bhyve/pci_irq.c user/ngie/more-tests/usr.sbin/bhyve/pci_irq.h user/ngie/more-tests/usr.sbin/bhyve/pci_virtio_block.c user/ngie/more-tests/usr.sbin/bhyve/pci_virtio_net.c user/ngie/more-tests/usr.sbin/bhyve/pm.c user/ngie/more-tests/usr.sbin/bluetooth/hccontrol/Makefile user/ngie/more-tests/usr.sbin/bluetooth/hccontrol/hccontrol.c user/ngie/more-tests/usr.sbin/bluetooth/hccontrol/hccontrol.h user/ngie/more-tests/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c user/ngie/more-tests/usr.sbin/config/main.c user/ngie/more-tests/usr.sbin/crunch/crunchide/exec_elf32.c user/ngie/more-tests/usr.sbin/ctld/ctl.conf.5 user/ngie/more-tests/usr.sbin/etcupdate/etcupdate.8 user/ngie/more-tests/usr.sbin/etcupdate/etcupdate.sh user/ngie/more-tests/usr.sbin/etcupdate/tests/always_test.sh user/ngie/more-tests/usr.sbin/etcupdate/tests/conflicts_test.sh user/ngie/more-tests/usr.sbin/etcupdate/tests/fbsdid_test.sh user/ngie/more-tests/usr.sbin/etcupdate/tests/ignore_test.sh user/ngie/more-tests/usr.sbin/etcupdate/tests/preworld_test.sh user/ngie/more-tests/usr.sbin/etcupdate/tests/tests_test.sh user/ngie/more-tests/usr.sbin/etcupdate/tests/tzsetup_test.sh user/ngie/more-tests/usr.sbin/inetd/inetd.c user/ngie/more-tests/usr.sbin/mountd/mountd.c user/ngie/more-tests/usr.sbin/nfsd/nfsd.8 user/ngie/more-tests/usr.sbin/pciconf/err.c user/ngie/more-tests/usr.sbin/sysrc/sysrc user/ngie/more-tests/usr.sbin/tzsetup/tzsetup.c user/ngie/more-tests/usr.sbin/vidcontrol/vidcontrol.c user/ngie/more-tests/usr.sbin/wpa/Makefile.crypto user/ngie/more-tests/usr.sbin/wpa/hostapd/Makefile user/ngie/more-tests/usr.sbin/wpa/wpa_passphrase/Makefile user/ngie/more-tests/usr.sbin/wpa/wpa_supplicant/Makefile Directory Properties: user/ngie/more-tests/ (props changed) user/ngie/more-tests/cddl/ (props changed) user/ngie/more-tests/cddl/contrib/opensolaris/ (props changed) user/ngie/more-tests/contrib/bmake/ (props changed) user/ngie/more-tests/contrib/llvm/ (props changed) user/ngie/more-tests/contrib/wpa/ (props changed) user/ngie/more-tests/etc/ (props changed) user/ngie/more-tests/lib/libc/ (props changed) user/ngie/more-tests/sbin/ (props changed) user/ngie/more-tests/sbin/ipfw/ (props changed) user/ngie/more-tests/share/ (props changed) user/ngie/more-tests/share/man/man4/ (props changed) user/ngie/more-tests/sys/ (props changed) user/ngie/more-tests/sys/amd64/vmm/ (props changed) user/ngie/more-tests/sys/boot/ (props changed) user/ngie/more-tests/sys/cddl/contrib/opensolaris/ (props changed) user/ngie/more-tests/sys/conf/ (props changed) user/ngie/more-tests/usr.bin/calendar/ (props changed) user/ngie/more-tests/usr.bin/procstat/ (props changed) user/ngie/more-tests/usr.sbin/bhyve/ (props changed) Modified: user/ngie/more-tests/.arcconfig ============================================================================== --- user/ngie/more-tests/.arcconfig Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/.arcconfig Fri Apr 24 10:18:41 2015 (r281926) @@ -1,5 +1,4 @@ { "project.name": "S", - "phabricator.uri" : "https://reviews.freebsd.org/", - "history.immutable" : true + "phabricator.uri" : "https://reviews.freebsd.org/" } Modified: user/ngie/more-tests/.arclint ============================================================================== --- user/ngie/more-tests/.arclint Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/.arclint Fri Apr 24 10:18:41 2015 (r281926) @@ -1,9 +1,25 @@ { + "exclude": "(contrib|crypto)", "linters": { "python": { "type": "pep8", - "exclude": "(contrib)", "include": "(\\.py$)" + }, + "spelling": { + "type": "spelling" + }, + "chmod": { + "type": "chmod" + }, + "merge-conflict": { + "type": "merge-conflict" + }, + "filename": { + "type": "filename" + }, + "json": { + "type": "json", + "include": "(\\.arclint|\\.json$)" } } } Modified: user/ngie/more-tests/Makefile.inc1 ============================================================================== --- user/ngie/more-tests/Makefile.inc1 Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/Makefile.inc1 Fri Apr 24 10:18:41 2015 (r281926) @@ -1357,13 +1357,7 @@ _kerberos5_bootstrap_tools= \ kerberos5/tools/slc \ usr.bin/compile_et -${_bt}-kerberos5/lib/libroken: ${_bt}-kerberos5/tools/make-roken -${_bt}-kerberos5/tools/asn1_compile: \ - ${_bt}-kerberos5/lib/libroken ${_bt}-kerberos5/lib/libvers -${_bt}-kerberos5/tools/slc: \ - ${_bt}-kerberos5/lib/libroken ${_bt}-kerberos5/lib/libvers -${_bt}-usr.bin/compile_et: \ - ${_bt}-kerberos5/lib/libroken ${_bt}-kerberos5/lib/libvers +.ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} .endif bootstrap-tools: .PHONY Modified: user/ngie/more-tests/ObsoleteFiles.inc ============================================================================== --- user/ngie/more-tests/ObsoleteFiles.inc Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/ObsoleteFiles.inc Fri Apr 24 10:18:41 2015 (r281926) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20150418 +OLD_FILES+=sbin/mount_oldnfs +OLD_FILES+=usr/share/man/man8/mount_oldnfs.8.gz # 20150416: ALTQ moved to net/altq OLD_FILES+=usr/include/altq/altq_rmclass_debug.h OLD_FILES+=usr/include/altq/altq.h Modified: user/ngie/more-tests/README ============================================================================== --- user/ngie/more-tests/README Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/README Fri Apr 24 10:18:41 2015 (r281926) @@ -8,37 +8,32 @@ sources in this tree - please see the sp more information). The Makefile in this directory supports a number of targets for -building components (or all) of the FreeBSD source tree, the most -commonly used one being ``world'', which rebuilds and installs -everything in the FreeBSD system from the source tree except the -kernel, the kernel-modules and the contents of /etc. The ``world'' -target should only be used in cases where the source tree has not -changed from the currently running version. See: -http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html +building components (or all) of the FreeBSD source tree. See build(7) +and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html for more information, including setting make(1) variables. -The ``buildkernel'' and ``installkernel'' targets build and install +The `buildkernel` and `installkernel` targets build and install the kernel and the modules (see below). Please see the top of the Makefile in this directory for more information on the standard build targets and compile-time flags. -Building a kernel is a somewhat more involved process, documentation -for which can be found at: - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html -And in the config(8) man page. +Building a kernel is a somewhat more involved process. See build(7), config(8), +and http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html +for more information. + Note: If you want to build and install the kernel with the -``buildkernel'' and ``installkernel'' targets, you might need to build +`buildkernel` and `installkernel` targets, you might need to build world before. More information is available in the handbook. -The sample kernel configuration files reside in the sys//conf -sub-directory (assuming that you've installed the kernel sources), the -file named GENERIC being the one used to build your initial installation -kernel. The file NOTES contains entries and documentation for all possible +The kernel configuration files reside in the sys//conf +sub-directory. GENERIC is the default configuration used in release builds. +NOTES contains entries and documentation for all possible devices, not just those commonly used. Source Roadmap: --------------- + bin System/user commands. cddl Various commands and libraries under the Common Development Modified: user/ngie/more-tests/bin/ed/glbl.c ============================================================================== --- user/ngie/more-tests/bin/ed/glbl.c Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/bin/ed/glbl.c Fri Apr 24 10:18:41 2015 (r281926) @@ -60,7 +60,7 @@ build_active_list(int isgcmd) return ERR; if (isbinary) NUL_TO_NEWLINE(s, lp->len); - if (!regexec(pat, s, 0, NULL, 0) == isgcmd && + if (!(regexec(pat, s, 0, NULL, 0) == isgcmd) && set_active_node(lp) < 0) return ERR; } @@ -153,7 +153,7 @@ set_active_node(line_t *lp) if (active_list != NULL) { #endif if ((ts = (line_t **) realloc(active_list, - (ti += MINBUFSZ) * sizeof(line_t **))) == NULL) { + (ti += MINBUFSZ) * sizeof(line_t *))) == NULL) { fprintf(stderr, "%s\n", strerror(errno)); errmsg = "out of memory"; SPL0(); Modified: user/ngie/more-tests/bin/sh/sh.1 ============================================================================== --- user/ngie/more-tests/bin/sh/sh.1 Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/bin/sh/sh.1 Fri Apr 24 10:18:41 2015 (r281926) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd February 22, 2015 +.Dd April 18, 2015 .Dt SH 1 .Os .Sh NAME @@ -2574,8 +2574,7 @@ the former causes the specified signal t and the latter causes the default action to be taken. Omitting the .Ar action -is another way to request the default action, for compatibility reasons this -usage is not recommended though. +and using only signal numbers is another way to request the default action. In a subshell or utility environment, the shell resets trapped (but not ignored) signals to the default action. The Modified: user/ngie/more-tests/bin/sh/tests/builtins/Makefile ============================================================================== --- user/ngie/more-tests/bin/sh/tests/builtins/Makefile Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/bin/sh/tests/builtins/Makefile Fri Apr 24 10:18:41 2015 (r281926) @@ -137,6 +137,8 @@ FILES+= trap11.0 FILES+= trap12.0 FILES+= trap13.0 FILES+= trap14.0 +FILES+= trap15.0 +FILES+= trap16.0 FILES+= trap2.0 FILES+= trap3.0 FILES+= trap4.0 Copied: user/ngie/more-tests/bin/sh/tests/builtins/trap15.0 (from r281924, head/bin/sh/tests/builtins/trap15.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/ngie/more-tests/bin/sh/tests/builtins/trap15.0 Fri Apr 24 10:18:41 2015 (r281926, copy of r281924, head/bin/sh/tests/builtins/trap15.0) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +(${SH} -c 'term(){ exit 5;}; trap term TERM; kill -TERM $$') & +wait >/dev/null 2>&1 $! +[ $? -eq 5 ] Copied: user/ngie/more-tests/bin/sh/tests/builtins/trap16.0 (from r281924, head/bin/sh/tests/builtins/trap16.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/ngie/more-tests/bin/sh/tests/builtins/trap16.0 Fri Apr 24 10:18:41 2015 (r281926, copy of r281924, head/bin/sh/tests/builtins/trap16.0) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +traps=$(${SH} -c 'trap "echo bad" 0; trap - 0; trap') +[ -z "$traps" ] || exit 1 +traps=$(${SH} -c 'trap "echo bad" 0; trap "" 0; trap') +expected_traps=$(${SH} -c 'trap "" EXIT; trap') +[ "$traps" = "$expected_traps" ] || exit 2 +traps=$(${SH} -c 'trap "echo bad" 0; trap 0; trap') +[ -z "$traps" ] || exit 3 +traps=$(${SH} -c 'trap "echo bad" 0; trap -- 0; trap') +[ -z "$traps" ] || exit 4 +traps=$(${SH} -c 'trap "echo bad" 0 1 2; trap - 0 1 2; trap') +[ -z "$traps" ] || exit 5 +traps=$(${SH} -c 'trap "echo bad" 0 1 2; trap "" 0 1 2; trap') +expected_traps=$(${SH} -c 'trap "" EXIT HUP INT; trap') +[ "$traps" = "$expected_traps" ] || exit 6 +traps=$(${SH} -c 'trap "echo bad" 0 1 2; trap 0 1 2; trap') +[ -z "$traps" ] || exit 7 +traps=$(${SH} -c 'trap "echo bad" 0 1 2; trap -- 0 1 2; trap') +[ -z "$traps" ] || exit 8 Modified: user/ngie/more-tests/bin/sh/trap.c ============================================================================== --- user/ngie/more-tests/bin/sh/trap.c Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/bin/sh/trap.c Fri Apr 24 10:18:41 2015 (r281926) @@ -183,7 +183,7 @@ trapcmd(int argc __unused, char **argv) return 0; } action = NULL; - if (*argv && sigstring_to_signum(*argv) == -1) { + if (*argv && !is_number(*argv)) { if (strcmp(*argv, "-") == 0) argv++; else { Modified: user/ngie/more-tests/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 ============================================================================== --- user/ngie/more-tests/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Fri Apr 24 10:18:41 2015 (r281926) @@ -21,7 +21,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2013 +.Dd April 18, 2015 .Dt DTRACE 1 .Os .Sh NAME @@ -670,7 +670,8 @@ Invalid command line options or argument .Sh SEE ALSO .Xr cpp 1 , .Xr dtruss 1 , -.Xr elf 5 +.Xr elf 5 , +.Xr SDT 9 .Rs .%T Solaris Dynamic Tracing Guide .Re Modified: user/ngie/more-tests/contrib/bmake/ChangeLog ============================================================================== --- user/ngie/more-tests/contrib/bmake/ChangeLog Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/contrib/bmake/ChangeLog Fri Apr 24 10:18:41 2015 (r281926) @@ -1,8 +1,76 @@ +2015-04-18 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150418 + Merge with NetBSD make, pick up + o job.c: use memmove() rather than memcpy() + + * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL + case, so skip it. + +2015-04-11 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150411 + bump version - only mk/ changes. + +2015-04-10 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150410 + Merge with NetBSD make, pick up + o document different handling of '-' in jobs mode vs compat + o fix jobs mode so that '-' only applies to whole job + when shell lacks hasErrCtl + o meta.c: use separate vars to track lcwd and latestdir (read) + per process + +2015-04-01 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150401 + Merge with NetBSD make, pick up + o meta.c: close meta file in child + + * Makefile: use BINDIR.bmake if set. + Same for MANDIR and SHAREDIR + Handy for testing release candidates + in various environments. + +2015-03-26 Simon J. Gerraty + + * move initialization of savederr to block where it is used + to avoid spurious warning from gcc5 + +2014-11-11 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20141111 + just a cooler number + +2014-11-05 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20141105 + Merge with NetBSD make, pick up + o revert major overhaul of suffix handling + and POSIX compliance - too much breakage + and impossible to make backwards compatible. + o we still have the new unit test structure which is ok. + o meta.c ensure "-- filemon" is at start of line. + +2014-09-17 Simon J. Gerraty + + * configure.in: test that result of getconf PATH_MAX is numeric + and discard if not. Apparently needed for Hurd. + +2014-08-30 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20140830 + Merge with NetBSD make, pick up + o major overhaul of suffix handling + o improved POSIX compliance + o overhauled unit-tests + 2014-06-20 Simon J. Gerraty * Makefile (MAKE_VERSION): 20140620 Merge with NetBSD make, pick up - o var.c return varNoError rather than var_Error for ::= modidiers. + o var.c return varNoError rather than var_Error for ::= modifiers. 2014-05-22 Simon J. Gerraty Modified: user/ngie/more-tests/contrib/bmake/FILES ============================================================================== --- user/ngie/more-tests/contrib/bmake/FILES Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/contrib/bmake/FILES Fri Apr 24 10:18:41 2015 (r281926) @@ -92,35 +92,74 @@ targ.c trace.c trace.h unit-tests/Makefile.in -unit-tests/comment -unit-tests/cond1 -unit-tests/doterror -unit-tests/dotwait -unit-tests/error -unit-tests/export -unit-tests/export-all -unit-tests/export-env -unit-tests/forloop -unit-tests/forsubst -unit-tests/hash -unit-tests/misc -unit-tests/moderrs -unit-tests/modmatch -unit-tests/modmisc -unit-tests/modorder -unit-tests/modts -unit-tests/modword -unit-tests/order -unit-tests/phony-end -unit-tests/posix -unit-tests/qequals -unit-tests/sunshcmd -unit-tests/sysv -unit-tests/ternary -unit-tests/test.exp -unit-tests/unexport -unit-tests/unexport-env -unit-tests/varcmd +unit-tests/comment.exp +unit-tests/comment.mk +unit-tests/cond1.exp +unit-tests/cond1.mk +unit-tests/doterror.exp +unit-tests/doterror.mk +unit-tests/dotwait.exp +unit-tests/dotwait.mk +unit-tests/error.exp +unit-tests/error.mk +unit-tests/escape.exp +unit-tests/escape.mk +unit-tests/export-all.exp +unit-tests/export-all.mk +unit-tests/export-env.exp +unit-tests/export-env.mk +unit-tests/export.exp +unit-tests/export.mk +unit-tests/forloop.exp +unit-tests/forloop.mk +unit-tests/forsubst.exp +unit-tests/forsubst.mk +unit-tests/hash.exp +unit-tests/hash.mk +unit-tests/impsrc.exp +unit-tests/impsrc.mk +unit-tests/misc.exp +unit-tests/misc.mk +unit-tests/moderrs.exp +unit-tests/moderrs.mk +unit-tests/modmatch.exp +unit-tests/modmatch.mk +unit-tests/modmisc.exp +unit-tests/modmisc.mk +unit-tests/modorder.exp +unit-tests/modorder.mk +unit-tests/modts.exp +unit-tests/modts.mk +unit-tests/modword.exp +unit-tests/modword.mk +unit-tests/order.exp +unit-tests/order.mk +unit-tests/phony-end.exp +unit-tests/phony-end.mk +unit-tests/posix.exp +unit-tests/posix.mk +unit-tests/posix1.exp +unit-tests/posix1.mk +unit-tests/qequals.exp +unit-tests/qequals.mk +unit-tests/suffixes.exp +unit-tests/suffixes.mk +unit-tests/sunshcmd.exp +unit-tests/sunshcmd.mk +unit-tests/sysv.exp +unit-tests/sysv.mk +unit-tests/ternary.exp +unit-tests/ternary.mk +unit-tests/unexport-env.exp +unit-tests/unexport-env.mk +unit-tests/unexport.exp +unit-tests/unexport.mk +unit-tests/varcmd.exp +unit-tests/varcmd.mk +unit-tests/varmisc.exp +unit-tests/varmisc.mk +unit-tests/varshell.exp +unit-tests/varshell.mk util.c var.c wait.h Modified: user/ngie/more-tests/contrib/bmake/Makefile ============================================================================== --- user/ngie/more-tests/contrib/bmake/Makefile Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/contrib/bmake/Makefile Fri Apr 24 10:18:41 2015 (r281926) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.27 2014/06/20 14:51:54 sjg Exp $ +# $Id: Makefile,v 1.36 2015/04/18 19:58:53 sjg Exp $ # Base version on src date -MAKE_VERSION= 20140620 +MAKE_VERSION= 20150418 PROG= bmake @@ -180,9 +180,9 @@ COPTS.parse.c += -Wno-format-nonliteral COPTS.var.c += -Wno-format-nonliteral # Force these -SHAREDIR= ${prefix}/share -BINDIR= ${prefix}/bin -MANDIR= ${SHAREDIR}/man +SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share} +BINDIR= ${BINDIR.bmake:U${prefix}/bin} +MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man} .if !exists(.depend) ${OBJS}: config.h Modified: user/ngie/more-tests/contrib/bmake/PSD.doc/Makefile ============================================================================== --- user/ngie/more-tests/contrib/bmake/PSD.doc/Makefile Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/contrib/bmake/PSD.doc/Makefile Fri Apr 24 10:18:41 2015 (r281926) @@ -1,8 +1,10 @@ -# $NetBSD: Makefile,v 1.2 1995/06/14 15:20:23 christos Exp $ +# $NetBSD: Makefile,v 1.4 2014/07/05 19:22:43 dholland Exp $ # @(#)Makefile 8.1 (Berkeley) 8/14/93 -DIR= psd/12.make +SECTION=reference/ref1 +ARTICLE=make SRCS= tutorial.ms MACROS= -ms +EXTRAHTMLFILES=make1.png make2.png .include Modified: user/ngie/more-tests/contrib/bmake/PSD.doc/tutorial.ms ============================================================================== --- user/ngie/more-tests/contrib/bmake/PSD.doc/tutorial.ms Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/contrib/bmake/PSD.doc/tutorial.ms Fri Apr 24 10:18:41 2015 (r281926) @@ -1,4 +1,4 @@ -.\" $NetBSD: tutorial.ms,v 1.11 2011/08/18 15:19:30 sjg Exp $ +.\" $NetBSD: tutorial.ms,v 1.12 2014/09/30 21:33:14 christos Exp $ .\" Copyright (c) 1988, 1989, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -67,6 +67,16 @@ .\" .EH 'PSD:12-%''PMake \*- A Tutorial' .OH 'PMake \*- A Tutorial''PSD:12-%' +.\" Ix is an indexing macro similar to .IX but I've disabled it for now +.\" Since that would require 2 passes and I am not in the mood for that. +.de Ix +.. +.\" Rd is section (region) define and Rm is region mention? Again disable for +.\" now. +.de Rd +.. +.de Rm +.. .\" xH is a macro to provide numbered headers that are automatically stuffed .\" into a table-of-contents, properly indented, etc. If the first argument .\" is numeric, it is taken as the depth for numbering (as for .NH), else Modified: user/ngie/more-tests/contrib/bmake/bmake.1 ============================================================================== --- user/ngie/more-tests/contrib/bmake/bmake.1 Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/contrib/bmake/bmake.1 Fri Apr 24 10:18:41 2015 (r281926) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.229 2014/01/19 10:23:29 apb Exp $ +.\" $NetBSD: make.1,v 1.247 2015/04/10 08:43:32 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 February 14, 2014 +.Dd April 9, 2015 .Dt MAKE 1 .Os .Sh NAME @@ -209,8 +209,6 @@ Force the option to print raw values of variables. .It Ar v Print debugging information about variable assignment. -.It Ar w -Print entering and leaving directory messages, pre and post processing. .It Ar x Run shell commands with .Fl x @@ -352,6 +350,8 @@ contains a then the value will be expanded before printing. .It Fl W Treat any warnings during makefile parsing as errors. +.It Fl w +Print entering and leaving directory messages, pre and post processing. .It Fl X Don't export variables passed on the command line to the environment individually. @@ -441,17 +441,29 @@ The value need not necessarily be used to describe existing files. Expansion is in directory order, not alphabetically as done in the shell. .Sh SHELL COMMANDS -Each target may have associated with it a series of shell commands, normally +Each target may have associated with it one or more lines of shell +commands, normally used to create the target. -Each of the commands in this script +Each of the lines in this script .Em must be preceded by a tab. -While any target may appear on a dependency line, only one of these -dependencies may be followed by a creation script, unless the +(For historical reasons, spaces are not accepted.) +While targets can appear in many dependency lines if desired, by +default only one of these rules may be followed by a creation +script. +If the .Ql Ic \&:: -operator is used. +operator is used, however, all rules may include scripts and the +scripts are executed in the order found. .Pp -If the first characters of the command line are any combination of +Each line is treated as a separate shell command, unless the end of +line is escaped with a backslash +.Pq Ql \e +in which case that line and the next are combined. +.\" The escaped newline is retained and passed to the shell, which +.\" normally ignores it. +.\" However, the tab at the beginning of the following line is removed. +If the first characters of the command are any combination of .Ql Ic @ , .Ql Ic + , or @@ -469,6 +481,7 @@ This is similar to the effect of the .MA except that the effect can be limited to a single line of a script. A .Ql Ic \- +in compatibility mode causes any non-zero exit status of the command line to be ignored. .Pp When @@ -477,22 +490,21 @@ is run in jobs mode with .Fl j Ar max_jobs , the entire script for the target is fed to a single instance of the shell. -.Pp In compatibility (non-jobs) mode, each command is run in a separate process. If the command contains any shell meta characters .Pq Ql #=|^(){};&<>*?[]:$`\e\en -it will be passed to the shell, otherwise +it will be passed to the shell; otherwise .Nm will attempt direct execution. -.Pp -Since -.Nm -will -.Xr chdir 2 -to -.Ql Va .OBJDIR -before executing any targets, each child process -starts with that as its current working directory. +If a line starts with +.Ql Ic \- +and the shell has ErrCtl enabled then failure of the command line +will be ignored as in compatibility mode. +Otherwise +.Ql Ic \- +affects the entire job; +the script will stop at the first command line that fails, +but the target will not be deemed to have failed. .Pp Makefiles should be written so that the mode of .Nm @@ -500,20 +512,32 @@ operation does not change their behavior For example, any command which needs to use .Dq cd or -.Dq chdir , -without side-effect should be put in parenthesis: +.Dq chdir +without potentially changing the directory for subsequent commands +should be put in parentheses so it executes in a subshell. +To force the use of one shell, escape the line breaks so as to make +the whole script one command. +For example: .Bd -literal -offset indent - avoid-chdir-side-effects: @echo Building $@ in `pwd` - @(cd ${.CURDIR} && ${.MAKE} $@) + @(cd ${.CURDIR} && ${MAKE} $@) @echo Back in `pwd` ensure-one-shell-regardless-of-mode: - @echo Building $@ in `pwd`; \\ - (cd ${.CURDIR} && ${.MAKE} $@); \\ + @echo Building $@ in `pwd`; \e + (cd ${.CURDIR} && ${MAKE} $@); \e echo Back in `pwd` .Ed +.Pp +Since +.Nm +will +.Xr chdir 2 +to +.Ql Va .OBJDIR +before executing any targets, each child process +starts with that as its current working directory. .Sh VARIABLE ASSIGNMENTS Variables in make are much like variables in the shell, and, by tradition, consist of all upper-case letters. @@ -624,13 +648,19 @@ Variables defined in the makefile or in Variables defined as part of the command line. .It Local variables Variables that are defined specific to a certain target. +.El +.Pp +Local variables are all built in and their values vary magically from +target to target. +It is not currently possible to define new local variables. The seven local variables are as follows: -.Bl -tag -width ".ARCHIVE" +.Bl -tag -width ".ARCHIVE" -offset indent .It Va .ALLSRC The list of all sources for this target; also known as .Ql Va \&\*[Gt] . .It Va .ARCHIVE -The name of the archive file. +The name of the archive file; also known as +.Ql Va \&! . .It Va .IMPSRC In suffix-transformation rules, the name/path of the source from which the target is to be transformed (the @@ -639,7 +669,8 @@ source); also known as .Ql Va \&\*[Lt] . It is not defined in explicit rules. .It Va .MEMBER -The name of the archive member. +The name of the archive member; also known as +.Ql Va % . .It Va .OODATE The list of sources for this target that were deemed out-of-date; also known as @@ -648,31 +679,41 @@ known as The file prefix of the target, containing only the file portion, no suffix or preceding directory components; also known as .Ql Va * . +The suffix must be one of the known suffixes declared with +.Ic .SUFFIXES +or it will not be recognized. .It Va .TARGET The name of the target; also known as .Ql Va @ . .El .Pp The shorter forms -.Ql Va @ , +.Ql ( Va \*[Gt] , +.Ql Va \&! , +.Ql Va \*[Lt] , +.Ql Va % , .Ql Va \&? , -.Ql Va \&\*[Lt] , -.Ql Va \&\*[Gt] , +.Ql Va * , and -.Ql Va * +.Ql Va @ ) are permitted for backward -compatibility with historical makefiles and are not recommended. -The six variables -.Ql Va "@F" , -.Ql Va "@D" , -.Ql Va "\*[Lt]F" , -.Ql Va "\*[Lt]D" , -.Ql Va "*F" , +compatibility with historical makefiles and legacy POSIX make and are +not recommended. +.Pp +Variants of these variables with the punctuation followed immediately by +.Ql D +or +.Ql F , +e.g. +.Ql Va $(@D) , +are legacy forms equivalent to using the +.Ql :H and -.Ql Va "*D" -are permitted for compatibility with +.Ql :T +modifiers. +These forms are accepted for compatibility with .At V -makefiles and are not recommended. +makefiles and POSIX but are not recommended. .Pp Four of the local variables may be used in sources on dependency lines because they expand to the proper value for each target on the line. @@ -682,7 +723,6 @@ These variables are .Ql Va .ARCHIVE , and .Ql Va .MEMBER . -.El .Ss Additional built-in variables In addition, .Nm @@ -2119,19 +2159,87 @@ system makefile system makefile directory .El .Sh COMPATIBILITY -The basic make syntax is compatible between different versions of make, +The basic make syntax is compatible between different versions of make; however the special variables, variable modifiers and conditionals are not. -.Pp -The way that parallel makes are scheduled changed in -NetBSD 4.0 -so that .ORDER and .WAIT apply recursively to the dependent nodes. -The algorithms used may change again in the future. +.Ss Older versions +An incomplete list of changes in older versions of +.Nm : .Pp The way that .for loop variables are substituted changed after NetBSD 5.0 so that they still appear to be variable expansions. In particular this stops them being treated as syntax, and removes some obscure problems using them in .if statements. +.Pp +The way that parallel makes are scheduled changed in +NetBSD 4.0 +so that .ORDER and .WAIT apply recursively to the dependent nodes. +The algorithms used may change again in the future. +.Ss Other make dialects +Other make dialects (GNU make, SVR4 make, POSIX make, etc.) do not +support most of the features of +.Nm +as described in this manual. +Most notably: +.Bl -bullet -offset indent +.It +The +.Ic .WAIT +and +.Ic .ORDER +declarations and most functionality pertaining to parallelization. +(GNU make supports parallelization but lacks these features needed to +control it effectively.) +.It +Directives, including for loops and conditionals and most of the +forms of include files. +(GNU make has its own incompatible and less powerful syntax for +conditionals.) +.It +All built-in variables that begin with a dot. +.It +Most of the special sources and targets that begin with a dot, +with the notable exception of +.Ic .PHONY , +.Ic .PRECIOUS , +and +.Ic .SUFFIXES . +.It +Variable modifiers, except for the +.Dl :old=new +string substitution, which does not portably support globbing with +.Ql % +and historically only works on declared suffixes. +.It +The +.Ic $> +variable even in its short form; most makes support this functionality +but its name varies. +.El +.Pp +Some features are somewhat more portable, such as assignment with +.Ic += , +.Ic ?= , +and +.Ic != . +The +.Ic .PATH +functionality is based on an older feature +.Ic VPATH +found in GNU make and many versions of SVR4 make; however, +historically its behavior is too ill-defined (and too buggy) to rely +upon. +.Pp +The +.Ic $@ +and +.Ic $< +variables are more or less universally portable, as is the +.Ic $(MAKE) +variable. +Basic use of suffix rules (for files only in the current directory, +not trying to chain transformations together, etc.) is also reasonably +portable. .Sh SEE ALSO .Xr mkdep 1 .Sh HISTORY Modified: user/ngie/more-tests/contrib/bmake/bmake.cat1 ============================================================================== --- user/ngie/more-tests/contrib/bmake/bmake.cat1 Fri Apr 24 10:17:55 2015 (r281925) +++ user/ngie/more-tests/contrib/bmake/bmake.cat1 Fri Apr 24 10:18:41 2015 (r281926) @@ -122,9 +122,6 @@ DDEESSCCRRIIPPTTIIOONN _v Print debugging information about variable assignment. - _w Print entering and leaving directory messages, pre and - post processing. - _x Run shell commands with --xx so the actual commands are printed as they are executed. @@ -221,6 +218,9 @@ DDEESSCCRRIIPPTTIIOONN --WW Treat any warnings during makefile parsing as errors. + --ww Print entering and leaving directory messages, pre and post pro- + cessing. + --XX Don't export variables passed on the command line to the environ- ment individually. Variables passed on the command line are still exported via the _M_A_K_E_F_L_A_G_S environment variable. This @@ -273,46 +273,55 @@ FFIILLEE DDEEPPEENNDDEENNCC done in the shell. SSHHEELLLL CCOOMMMMAANNDDSS - Each target may have associated with it a series of shell commands, nor- - mally used to create the target. Each of the commands in this script - _m_u_s_t be preceded by a tab. While any target may appear on a dependency - line, only one of these dependencies may be followed by a creation - script, unless the `::::' operator is used. - - If the first characters of the command line are any combination of `@@', - `++', or `--', the command is treated specially. A `@@' causes the command - not to be echoed before it is executed. A `++' causes the command to be - executed even when --nn is given. This is similar to the effect of the - .MAKE special source, except that the effect can be limited to a single - line of a script. A `--' causes any non-zero exit status of the command - line to be ignored. + Each target may have associated with it one or more lines of shell com- + mands, normally used to create the target. Each of the lines in this + script _m_u_s_t be preceded by a tab. (For historical reasons, spaces are + not accepted.) While targets can appear in many dependency lines if + desired, by default only one of these rules may be followed by a creation + script. If the `::::' operator is used, however, all rules may include + scripts and the scripts are executed in the order found. + + Each line is treated as a separate shell command, unless the end of line + is escaped with a backslash (`\') in which case that line and the next + are combined. If the first characters of the command are any combination + of `@@', `++', or `--', the command is treated specially. A `@@' causes the + command not to be echoed before it is executed. A `++' causes the command + to be executed even when --nn is given. This is similar to the effect of + the .MAKE special source, except that the effect can be limited to a sin- + gle line of a script. A `--' in compatibility mode causes any non-zero + exit status of the command line to be ignored. When bbmmaakkee is run in jobs mode with --jj _m_a_x___j_o_b_s, the entire script for - the target is fed to a single instance of the shell. - - In compatibility (non-jobs) mode, each command is run in a separate - process. If the command contains any shell meta characters - (`#=|^(){};&<>*?[]:$`\\n') it will be passed to the shell, otherwise - bbmmaakkee will attempt direct execution. - - Since bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' before executing any targets, each - child process starts with that as its current working directory. + the target is fed to a single instance of the shell. In compatibility + (non-jobs) mode, each command is run in a separate process. If the com- + mand contains any shell meta characters (`#=|^(){};&<>*?[]:$`\\n') it + will be passed to the shell; otherwise bbmmaakkee will attempt direct execu- + tion. If a line starts with `--' and the shell has ErrCtl enabled then + failure of the command line will be ignored as in compatibility mode. + Otherwise `--' affects the entire job; the script will stop at the first + command line that fails, but the target will not be deemed to have + failed. Makefiles should be written so that the mode of bbmmaakkee operation does not change their behavior. For example, any command which needs to use - ``cd'' or ``chdir'', without side-effect should be put in parenthesis: - + ``cd'' or ``chdir'' without potentially changing the directory for subse- + quent commands should be put in parentheses so it executes in a subshell. + To force the use of one shell, escape the line breaks so as to make the + whole script one command. For example: avoid-chdir-side-effects: @echo Building $@ in `pwd` - @(cd ${.CURDIR} && ${.MAKE} $@) + @(cd ${.CURDIR} && ${MAKE} $@) @echo Back in `pwd` ensure-one-shell-regardless-of-mode: @echo Building $@ in `pwd`; \ - (cd ${.CURDIR} && ${.MAKE} $@); \ + (cd ${.CURDIR} && ${MAKE} $@); \ echo Back in `pwd` + Since bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' before executing any targets, each + child process starts with that as its current working directory. + VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS Variables in make are much like variables in the shell, and, by tradi- tion, consist of all upper-case letters. @@ -402,40 +411,47 @@ VVAARRIIAABBLLEE AASSSSIIGG Variables defined as part of the command line. Local variables - Variables that are defined specific to a certain target. The - seven local variables are as follows: + Variables that are defined specific to a certain target. - _._A_L_L_S_R_C The list of all sources for this target; also known as - `_>'. + Local variables are all built in and their values vary magically from + target to target. It is not currently possible to define new local vari- + ables. The seven local variables are as follows: - _._A_R_C_H_I_V_E The name of the archive file. + _._A_L_L_S_R_C The list of all sources for this target; also known as + `_>'. - _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the - source from which the target is to be transformed (the - ``implied'' source); also known as `_<'. It is not - defined in explicit rules. + _._A_R_C_H_I_V_E The name of the archive file; also known as `_!'. - _._M_E_M_B_E_R The name of the archive member. + _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the + source from which the target is to be transformed (the + ``implied'' source); also known as `_<'. It is not + defined in explicit rules. - _._O_O_D_A_T_E The list of sources for this target that were deemed - out-of-date; also known as `_?'. + _._M_E_M_B_E_R The name of the archive member; also known as `_%'. - _._P_R_E_F_I_X The file prefix of the target, containing only the file - portion, no suffix or preceding directory components; - also known as `_*'. + _._O_O_D_A_T_E The list of sources for this target that were deemed out- + of-date; also known as `_?'. - _._T_A_R_G_E_T The name of the target; also known as `_@'. + _._P_R_E_F_I_X The file prefix of the target, containing only the file + portion, no suffix or preceding directory components; + also known as `_*'. The suffix must be one of the known + suffixes declared with ..SSUUFFFFIIXXEESS or it will not be recog- + nized. - The shorter forms `_@', `_?', `_<', `_>', and `_*' are permitted for - backward compatibility with historical makefiles and are not rec- - ommended. The six variables `_@_F', `_@_D', `_<_F', `_<_D', `_*_F', and - `_*_D' are permitted for compatibility with AT&T System V UNIX - makefiles and are not recommended. + _._T_A_R_G_E_T The name of the target; also known as `_@'. - Four of the local variables may be used in sources on dependency - lines because they expand to the proper value for each target on - the line. These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E', - and `_._M_E_M_B_E_R'. + The shorter forms (`_>', `_!', `_<', `_%', `_?', `_*', and `_@') are permitted + for backward compatibility with historical makefiles and legacy POSIX + make and are not recommended. + + Variants of these variables with the punctuation followed immediately by + `D' or `F', e.g. `_$_(_@_D_)', are legacy forms equivalent to using the `:H' + and `:T' modifiers. These forms are accepted for compatibility with AT&T + System V UNIX makefiles and POSIX but are not recommended. + + Four of the local variables may be used in sources on dependency lines + because they expand to the proper value for each target on the line. + These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E', and `_._M_E_M_B_E_R'. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Sat Apr 25 05:25:42 2015 Return-Path: Delivered-To: svn-src-user@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 BE321C32; Sat, 25 Apr 2015 05:25:42 +0000 (UTC) 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 AD80D1354; Sat, 25 Apr 2015 05:25:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P5PgfV074393; Sat, 25 Apr 2015 05:25:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P5Pg1B074392; Sat, 25 Apr 2015 05:25:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504250525.t3P5Pg1B074392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 25 Apr 2015 05:25:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281973 - user/ngie/more-tests/tests/sys/socket X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 05:25:42 -0000 Author: ngie Date: Sat Apr 25 05:25:41 2015 New Revision: 281973 URL: https://svnweb.freebsd.org/changeset/base/281973 Log: Add missing newline for SKIP plan Modified: user/ngie/more-tests/tests/sys/socket/so_setfib_test.c Modified: user/ngie/more-tests/tests/sys/socket/so_setfib_test.c ============================================================================== --- user/ngie/more-tests/tests/sys/socket/so_setfib_test.c Sat Apr 25 05:08:30 2015 (r281972) +++ user/ngie/more-tests/tests/sys/socket/so_setfib_test.c Sat Apr 25 05:25:41 2015 (r281973) @@ -171,7 +171,7 @@ main(int argc __unused, char *argv[] __u size_t s; if (geteuid() != 0) { - printf("1..0 # SKIP: must be root"); + printf("1..0 # SKIP: must be root\n"); return (0); } From owner-svn-src-user@FreeBSD.ORG Sat Apr 25 06:07:24 2015 Return-Path: Delivered-To: svn-src-user@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 76824669; Sat, 25 Apr 2015 06:07:24 +0000 (UTC) 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 625241750; Sat, 25 Apr 2015 06:07:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P67OM9094555; Sat, 25 Apr 2015 06:07:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P67KYR094530; Sat, 25 Apr 2015 06:07:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504250607.t3P67KYR094530@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 25 Apr 2015 06:07:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r281975 - in user/ngie/more-tests: contrib/tcpdump lib/libc/locale lib/libmd sbin/camcontrol sbin/growfs share/mk sys/amd64/amd64 sys/amd64/include sys/conf sys/dev/ipmi sys/dev/vt sys/... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 06:07:24 -0000 Author: ngie Date: Sat Apr 25 06:07:19 2015 New Revision: 281975 URL: https://svnweb.freebsd.org/changeset/base/281975 Log: MFhead @ r281974 Added: user/ngie/more-tests/sys/x86/x86/mp_x86.c - copied unchanged from r281974, head/sys/x86/x86/mp_x86.c Modified: user/ngie/more-tests/contrib/tcpdump/interface.h user/ngie/more-tests/contrib/tcpdump/netdissect.h user/ngie/more-tests/contrib/tcpdump/print-ip.c user/ngie/more-tests/contrib/tcpdump/print-pfsync.c user/ngie/more-tests/lib/libc/locale/duplocale.3 user/ngie/more-tests/lib/libc/locale/freelocale.3 user/ngie/more-tests/lib/libc/locale/newlocale.3 user/ngie/more-tests/lib/libc/locale/none.c user/ngie/more-tests/lib/libc/locale/querylocale.3 user/ngie/more-tests/lib/libc/locale/uselocale.3 user/ngie/more-tests/lib/libmd/mdXhl.c user/ngie/more-tests/sbin/camcontrol/camcontrol.8 user/ngie/more-tests/sbin/growfs/Makefile user/ngie/more-tests/sbin/growfs/growfs.c user/ngie/more-tests/share/mk/src.opts.mk user/ngie/more-tests/sys/amd64/amd64/mp_machdep.c user/ngie/more-tests/sys/amd64/include/smp.h user/ngie/more-tests/sys/conf/files.amd64 user/ngie/more-tests/sys/conf/files.i386 user/ngie/more-tests/sys/conf/files.pc98 user/ngie/more-tests/sys/dev/ipmi/ipmi.c user/ngie/more-tests/sys/dev/ipmi/ipmi_kcs.c user/ngie/more-tests/sys/dev/ipmi/ipmi_smic.c user/ngie/more-tests/sys/dev/ipmi/ipmivars.h user/ngie/more-tests/sys/dev/vt/vt_core.c user/ngie/more-tests/sys/fs/nfs/nfsport.h user/ngie/more-tests/sys/fs/nfsclient/nfs_clvfsops.c user/ngie/more-tests/sys/fs/nfsserver/nfs_nfsdkrpc.c user/ngie/more-tests/sys/i386/i386/mp_machdep.c user/ngie/more-tests/sys/i386/include/smp.h user/ngie/more-tests/sys/i386/xen/mp_machdep.c user/ngie/more-tests/sys/kern/uipc_shm.c user/ngie/more-tests/sys/kern/vfs_bio.c user/ngie/more-tests/sys/modules/oce/Makefile user/ngie/more-tests/sys/netinet/tcp_subr.c user/ngie/more-tests/sys/sparc64/pci/apb.c user/ngie/more-tests/sys/sys/cdefs.h user/ngie/more-tests/sys/sys/param.h user/ngie/more-tests/sys/ufs/ffs/ffs_alloc.c user/ngie/more-tests/sys/ufs/ffs/ffs_vfsops.c user/ngie/more-tests/sys/ufs/ufs/inode.h user/ngie/more-tests/sys/vm/uma_int.h user/ngie/more-tests/usr.bin/kdump/kdump.c user/ngie/more-tests/usr.bin/whois/whois.c user/ngie/more-tests/usr.sbin/bhyve/pci_emul.c user/ngie/more-tests/usr.sbin/iovctl/iovctl.conf.5 user/ngie/more-tests/usr.sbin/jail/jail.8 Directory Properties: user/ngie/more-tests/ (props changed) user/ngie/more-tests/contrib/tcpdump/ (props changed) user/ngie/more-tests/lib/libc/ (props changed) user/ngie/more-tests/sbin/ (props changed) user/ngie/more-tests/share/ (props changed) user/ngie/more-tests/sys/ (props changed) user/ngie/more-tests/sys/conf/ (props changed) user/ngie/more-tests/sys/x86/include/acpica_machdep.h (props changed) user/ngie/more-tests/usr.sbin/bhyve/ (props changed) user/ngie/more-tests/usr.sbin/jail/ (props changed) Modified: user/ngie/more-tests/contrib/tcpdump/interface.h ============================================================================== --- user/ngie/more-tests/contrib/tcpdump/interface.h Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/contrib/tcpdump/interface.h Sat Apr 25 06:07:19 2015 (r281975) @@ -148,8 +148,6 @@ extern uint16_t create_osi_cksum(const u #include -extern void pfsync_ip_print(const u_char *, u_int); - extern char *q922_string(const u_char *); extern char *smb_errstr(int, int); extern const char *nt_errstr(uint32_t); Modified: user/ngie/more-tests/contrib/tcpdump/netdissect.h ============================================================================== --- user/ngie/more-tests/contrib/tcpdump/netdissect.h Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/contrib/tcpdump/netdissect.h Sat Apr 25 06:07:19 2015 (r281975) @@ -540,6 +540,8 @@ extern void timed_print(netdissect_optio extern void m3ua_print(netdissect_options *, const u_char *, const u_int); extern void aoe_print(netdissect_options *, const u_char *, const u_int); +extern void pfsync_ip_print(netdissect_options *, const u_char *, u_int); + /* stuff that has not yet been rototiled */ #if 0 Modified: user/ngie/more-tests/contrib/tcpdump/print-ip.c ============================================================================== --- user/ngie/more-tests/contrib/tcpdump/print-ip.c Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/contrib/tcpdump/print-ip.c Sat Apr 25 06:07:19 2015 (r281975) @@ -487,7 +487,7 @@ again: #if defined(HAVE_NET_PFVAR_H) case IPPROTO_PFSYNC: - pfsync_ip_print(ipds->cp, ipds->len); + pfsync_ip_print(ndo, ipds->cp, ipds->len); break; #endif Modified: user/ngie/more-tests/contrib/tcpdump/print-pfsync.c ============================================================================== --- user/ngie/more-tests/contrib/tcpdump/print-pfsync.c Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/contrib/tcpdump/print-pfsync.c Sat Apr 25 06:07:19 2015 (r281975) @@ -47,10 +47,12 @@ #include "interface.h" #include "addrtoname.h" -static void pfsync_print(struct pfsync_header *, const u_char *, u_int); -static void print_src_dst(const struct pfsync_state_peer *, +static void pfsync_print(netdissect_options *, struct pfsync_header *, + const u_char *, u_int); +static void print_src_dst(netdissect_options *, + const struct pfsync_state_peer *, const struct pfsync_state_peer *, uint8_t); -static void print_state(struct pfsync_state *); +static void print_state(netdissect_options *, struct pfsync_state *); #ifdef notyet void @@ -62,7 +64,7 @@ pfsync_if_print(u_char *user, const stru ts_print(&h->ts); if (caplen < PFSYNC_HDRLEN) { - printf("[|pfsync]"); + ND_PRINT((ndo, "[|pfsync]")); goto out; } @@ -73,36 +75,36 @@ out: if (xflag) { default_print((const u_char *)p, caplen); } - putchar('\n'); + safeputchar(ndo, '\n'); } #endif /* notyet */ void -pfsync_ip_print(const u_char *bp, u_int len) +pfsync_ip_print(netdissect_options *ndo , const u_char *bp, u_int len) { struct pfsync_header *hdr = (struct pfsync_header *)bp; if (len < PFSYNC_HDRLEN) - printf("[|pfsync]"); + ND_PRINT((ndo, "[|pfsync]")); else - pfsync_print(hdr, bp + sizeof(struct pfsync_header), + pfsync_print(ndo, hdr, bp + sizeof(struct pfsync_header), len - sizeof(struct pfsync_header)); } struct pfsync_actions { const char *name; size_t len; - void (*print)(const void *); + void (*print)(netdissect_options *, const void *); }; -static void pfsync_print_clr(const void *); -static void pfsync_print_state(const void *); -static void pfsync_print_ins_ack(const void *); -static void pfsync_print_upd_c(const void *); -static void pfsync_print_upd_req(const void *); -static void pfsync_print_del_c(const void *); -static void pfsync_print_bus(const void *); -static void pfsync_print_tdb(const void *); +static void pfsync_print_clr(netdissect_options *, const void *); +static void pfsync_print_state(netdissect_options *, const void *); +static void pfsync_print_ins_ack(netdissect_options *, const void *); +static void pfsync_print_upd_c(netdissect_options *, const void *); +static void pfsync_print_upd_req(netdissect_options *, const void *); +static void pfsync_print_del_c(netdissect_options *, const void *); +static void pfsync_print_bus(netdissect_options *, const void *); +static void pfsync_print_tdb(netdissect_options *, const void *); struct pfsync_actions actions[] = { { "clear all", sizeof(struct pfsync_clr), pfsync_print_clr }, @@ -125,7 +127,8 @@ struct pfsync_actions actions[] = { }; static void -pfsync_print(struct pfsync_header *hdr, const u_char *bp, u_int len) +pfsync_print(netdissect_options *ndo, struct pfsync_header *hdr, + const u_char *bp, u_int len) { struct pfsync_subheader *subh; int count, plen, i; @@ -133,7 +136,7 @@ pfsync_print(struct pfsync_header *hdr, plen = ntohs(hdr->len); - printf("PFSYNCv%d len %d", hdr->version, plen); + ND_PRINT((ndo, "PFSYNCv%d len %d", hdr->version, plen)); if (hdr->version != PFSYNC_VERSION) return; @@ -150,19 +153,22 @@ pfsync_print(struct pfsync_header *hdr, plen -= sizeof(*subh); if (subh->action >= PFSYNC_ACT_MAX) { - printf("\n act UNKNOWN id %d", subh->action); + ND_PRINT((ndo, "\n act UNKNOWN id %d", + subh->action)); return; } count = ntohs(subh->count); - printf("\n %s count %d", actions[subh->action].name, count); + ND_PRINT((ndo, "\n %s count %d", actions[subh->action].name, + count)); alen = actions[subh->action].len; if (subh->action == PFSYNC_ACT_EOF) return; if (actions[subh->action].print == NULL) { - printf("\n unimplemented action %hhu", subh->action); + ND_PRINT((ndo, "\n unimplemented action %hhu", + subh->action)); return; } @@ -173,7 +179,7 @@ pfsync_print(struct pfsync_header *hdr, } if (vflag) - actions[subh->action].print(bp); + actions[subh->action].print(ndo, bp); bp += alen; len -= alen; @@ -182,78 +188,78 @@ pfsync_print(struct pfsync_header *hdr, } if (plen > 0) { - printf("\n ..."); + ND_PRINT((ndo, "\n ...")); return; } if (plen < 0) { - printf("\n invalid header length"); + ND_PRINT((ndo, "\n invalid header length")); return; } if (len > 0) - printf("\n invalid packet length"); + ND_PRINT((ndo, "\n invalid packet length")); } static void -pfsync_print_clr(const void *bp) +pfsync_print_clr(netdissect_options *ndo, const void *bp) { const struct pfsync_clr *clr = bp; - printf("\n\tcreatorid: %08x", htonl(clr->creatorid)); + ND_PRINT((ndo, "\n\tcreatorid: %08x", htonl(clr->creatorid))); if (clr->ifname[0] != '\0') - printf(" interface: %s", clr->ifname); + ND_PRINT((ndo, " interface: %s", clr->ifname)); } static void -pfsync_print_state(const void *bp) +pfsync_print_state(netdissect_options *ndo, const void *bp) { struct pfsync_state *st = (struct pfsync_state *)bp; - putchar('\n'); - print_state(st); + safeputchar(ndo, '\n'); + print_state(ndo, st); } static void -pfsync_print_ins_ack(const void *bp) +pfsync_print_ins_ack(netdissect_options *ndo, const void *bp) { const struct pfsync_ins_ack *iack = bp; - printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(iack->id), - ntohl(iack->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t)be64toh(iack->id), ntohl(iack->creatorid))); } static void -pfsync_print_upd_c(const void *bp) +pfsync_print_upd_c(netdissect_options *ndo, const void *bp) { const struct pfsync_upd_c *u = bp; - printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(u->id), - ntohl(u->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t)be64toh(u->id), ntohl(u->creatorid))); if (vflag > 2) { - printf("\n\tTCP? :"); - print_src_dst(&u->src, &u->dst, IPPROTO_TCP); + ND_PRINT((ndo, "\n\tTCP? :")); + print_src_dst(ndo, &u->src, &u->dst, IPPROTO_TCP); } } static void -pfsync_print_upd_req(const void *bp) +pfsync_print_upd_req(netdissect_options *ndo, const void *bp) { const struct pfsync_upd_req *ur = bp; - printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(ur->id), - ntohl(ur->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t)be64toh(ur->id), ntohl(ur->creatorid))); } static void -pfsync_print_del_c(const void *bp) +pfsync_print_del_c(netdissect_options *ndo, const void *bp) { const struct pfsync_del_c *d = bp; - printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(d->id), - ntohl(d->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t)be64toh(d->id), ntohl(d->creatorid))); } static void -pfsync_print_bus(const void *bp) +pfsync_print_bus(netdissect_options *ndo, const void *bp) { const struct pfsync_bus *b = bp; uint32_t endtime; @@ -278,95 +284,95 @@ pfsync_print_bus(const void *bp) break; } - printf("\n\tcreatorid: %08x age: %.2u:%.2u:%.2u status: %s", - htonl(b->creatorid), endtime, min, sec, status); + ND_PRINT((ndo, "\n\tcreatorid: %08x age: %.2u:%.2u:%.2u status: %s", + htonl(b->creatorid), endtime, min, sec, status)); } static void -pfsync_print_tdb(const void *bp) +pfsync_print_tdb(netdissect_options *ndo, const void *bp) { const struct pfsync_tdb *t = bp; - printf("\n\tspi: 0x%08x rpl: %ju cur_bytes: %ju", + ND_PRINT((ndo, "\n\tspi: 0x%08x rpl: %ju cur_bytes: %ju", ntohl(t->spi), (uintmax_t )be64toh(t->rpl), - (uintmax_t )be64toh(t->cur_bytes)); + (uintmax_t )be64toh(t->cur_bytes))); } static void -print_host(struct pf_addr *addr, uint16_t port, sa_family_t af, - const char *proto) +print_host(netdissect_options *ndo, struct pf_addr *addr, uint16_t port, + sa_family_t af, const char *proto) { char buf[48]; if (inet_ntop(af, addr, buf, sizeof(buf)) == NULL) - printf("?"); + ND_PRINT((ndo, "?")); else - printf("%s", buf); + ND_PRINT((ndo, "%s", buf)); if (port) - printf(".%hu", ntohs(port)); + ND_PRINT((ndo, ".%hu", ntohs(port))); } static void -print_seq(const struct pfsync_state_peer *p) +print_seq(netdissect_options *ndo, const struct pfsync_state_peer *p) { if (p->seqdiff) - printf("[%u + %u](+%u)", ntohl(p->seqlo), - ntohl(p->seqhi) - ntohl(p->seqlo), ntohl(p->seqdiff)); + ND_PRINT((ndo, "[%u + %u](+%u)", ntohl(p->seqlo), + ntohl(p->seqhi) - ntohl(p->seqlo), ntohl(p->seqdiff))); else - printf("[%u + %u]", ntohl(p->seqlo), - ntohl(p->seqhi) - ntohl(p->seqlo)); + ND_PRINT((ndo, "[%u + %u]", ntohl(p->seqlo), + ntohl(p->seqhi) - ntohl(p->seqlo))); } static void -print_src_dst(const struct pfsync_state_peer *src, +print_src_dst(netdissect_options *ndo, const struct pfsync_state_peer *src, const struct pfsync_state_peer *dst, uint8_t proto) { if (proto == IPPROTO_TCP) { if (src->state <= TCPS_TIME_WAIT && dst->state <= TCPS_TIME_WAIT) - printf(" %s:%s", tcpstates[src->state], - tcpstates[dst->state]); + ND_PRINT((ndo, " %s:%s", tcpstates[src->state], + tcpstates[dst->state])); else if (src->state == PF_TCPS_PROXY_SRC || dst->state == PF_TCPS_PROXY_SRC) - printf(" PROXY:SRC"); + ND_PRINT((ndo, " PROXY:SRC")); else if (src->state == PF_TCPS_PROXY_DST || dst->state == PF_TCPS_PROXY_DST) - printf(" PROXY:DST"); + ND_PRINT((ndo, " PROXY:DST")); else - printf(" ", - src->state, dst->state); + ND_PRINT((ndo, " ", + src->state, dst->state)); if (vflag > 1) { - printf("\n\t"); - print_seq(src); + ND_PRINT((ndo, "\n\t")); + print_seq(ndo, src); if (src->wscale && dst->wscale) - printf(" wscale %u", - src->wscale & PF_WSCALE_MASK); - printf(" "); - print_seq(dst); + ND_PRINT((ndo, " wscale %u", + src->wscale & PF_WSCALE_MASK)); + ND_PRINT((ndo, " ")); + print_seq(ndo, dst); if (src->wscale && dst->wscale) - printf(" wscale %u", - dst->wscale & PF_WSCALE_MASK); + ND_PRINT((ndo, " wscale %u", + dst->wscale & PF_WSCALE_MASK)); } } else if (proto == IPPROTO_UDP && src->state < PFUDPS_NSTATES && dst->state < PFUDPS_NSTATES) { const char *states[] = PFUDPS_NAMES; - printf(" %s:%s", states[src->state], states[dst->state]); + ND_PRINT((ndo, " %s:%s", states[src->state], states[dst->state])); } else if (proto != IPPROTO_ICMP && src->state < PFOTHERS_NSTATES && dst->state < PFOTHERS_NSTATES) { /* XXX ICMP doesn't really have state levels */ const char *states[] = PFOTHERS_NAMES; - printf(" %s:%s", states[src->state], states[dst->state]); + ND_PRINT((ndo, " %s:%s", states[src->state], states[dst->state])); } else { - printf(" %u:%u", src->state, dst->state); + ND_PRINT((ndo, " %u:%u", src->state, dst->state)); } } static void -print_state(struct pfsync_state *s) +print_state(netdissect_options *ndo, struct pfsync_state *s) { struct pfsync_state_peer *src, *dst; struct pfsync_state_key *sk, *nk; @@ -387,29 +393,29 @@ print_state(struct pfsync_state *s) if (s->proto == IPPROTO_ICMP || s->proto == IPPROTO_ICMPV6) sk->port[1] = nk->port[1]; } - printf("\t%s ", s->ifname); - printf("proto %u ", s->proto); + ND_PRINT((ndo, "\t%s ", s->ifname)); + ND_PRINT((ndo, "proto %u ", s->proto)); - print_host(&nk->addr[1], nk->port[1], s->af, NULL); + print_host(ndo, &nk->addr[1], nk->port[1], s->af, NULL); if (PF_ANEQ(&nk->addr[1], &sk->addr[1], s->af) || nk->port[1] != sk->port[1]) { - printf(" ("); - print_host(&sk->addr[1], sk->port[1], s->af, NULL); - printf(")"); + ND_PRINT((ndo, " (")); + print_host(ndo, &sk->addr[1], sk->port[1], s->af, NULL); + ND_PRINT((ndo, ")")); } if (s->direction == PF_OUT) - printf(" -> "); + ND_PRINT((ndo, " -> ")); else - printf(" <- "); - print_host(&nk->addr[0], nk->port[0], s->af, NULL); + ND_PRINT((ndo, " <- ")); + print_host(ndo, &nk->addr[0], nk->port[0], s->af, NULL); if (PF_ANEQ(&nk->addr[0], &sk->addr[0], s->af) || nk->port[0] != sk->port[0]) { - printf(" ("); - print_host(&sk->addr[0], sk->port[0], s->af, NULL); - printf(")"); + ND_PRINT((ndo, " (")); + print_host(ndo, &sk->addr[0], sk->port[0], s->af, NULL); + ND_PRINT((ndo, ")")); } - print_src_dst(src, dst, s->proto); + print_src_dst(ndo, src, dst, s->proto); if (vflag > 1) { uint64_t packets[2]; @@ -421,30 +427,30 @@ print_state(struct pfsync_state *s) creation /= 60; min = creation % 60; creation /= 60; - printf("\n\tage %.2u:%.2u:%.2u", creation, min, sec); + ND_PRINT((ndo, "\n\tage %.2u:%.2u:%.2u", creation, min, sec)); sec = expire % 60; expire /= 60; min = expire % 60; expire /= 60; - printf(", expires in %.2u:%.2u:%.2u", expire, min, sec); + ND_PRINT((ndo, ", expires in %.2u:%.2u:%.2u", expire, min, sec)); bcopy(s->packets[0], &packets[0], sizeof(uint64_t)); bcopy(s->packets[1], &packets[1], sizeof(uint64_t)); bcopy(s->bytes[0], &bytes[0], sizeof(uint64_t)); bcopy(s->bytes[1], &bytes[1], sizeof(uint64_t)); - printf(", %ju:%ju pkts, %ju:%ju bytes", + ND_PRINT((ndo, ", %ju:%ju pkts, %ju:%ju bytes", be64toh(packets[0]), be64toh(packets[1]), - be64toh(bytes[0]), be64toh(bytes[1])); + be64toh(bytes[0]), be64toh(bytes[1]))); if (s->anchor != ntohl(-1)) - printf(", anchor %u", ntohl(s->anchor)); + ND_PRINT((ndo, ", anchor %u", ntohl(s->anchor))); if (s->rule != ntohl(-1)) - printf(", rule %u", ntohl(s->rule)); + ND_PRINT((ndo, ", rule %u", ntohl(s->rule))); } if (vflag > 1) { uint64_t id; bcopy(&s->id, &id, sizeof(uint64_t)); - printf("\n\tid: %016jx creatorid: %08x", - (uintmax_t )be64toh(id), ntohl(s->creatorid)); + ND_PRINT((ndo, "\n\tid: %016jx creatorid: %08x", + (uintmax_t )be64toh(id), ntohl(s->creatorid))); } } Modified: user/ngie/more-tests/lib/libc/locale/duplocale.3 ============================================================================== --- user/ngie/more-tests/lib/libc/locale/duplocale.3 Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/lib/libc/locale/duplocale.3 Sat Apr 25 06:07:19 2015 (r281975) @@ -36,7 +36,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In locale.h .Ft locale_t .Fn duplocale "locale_t locale" .Sh DESCRIPTION Modified: user/ngie/more-tests/lib/libc/locale/freelocale.3 ============================================================================== --- user/ngie/more-tests/lib/libc/locale/freelocale.3 Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/lib/libc/locale/freelocale.3 Sat Apr 25 06:07:19 2015 (r281975) @@ -38,7 +38,7 @@ or .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In locale.h .Ft int .Fn freelocale "locale_t locale" .Sh DESCRIPTION Modified: user/ngie/more-tests/lib/libc/locale/newlocale.3 ============================================================================== --- user/ngie/more-tests/lib/libc/locale/newlocale.3 Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/lib/libc/locale/newlocale.3 Sat Apr 25 06:07:19 2015 (r281975) @@ -35,7 +35,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale +.In locale.h .Ft locale_t .Fn newlocale "int mask" "const char * locale" "locale_t base" .Sh DESCRIPTION Modified: user/ngie/more-tests/lib/libc/locale/none.c ============================================================================== --- user/ngie/more-tests/lib/libc/locale/none.c Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/lib/libc/locale/none.c Sat Apr 25 06:07:19 2015 (r281975) @@ -209,7 +209,7 @@ struct xlocale_ctype __xlocale_global_ct 256 /* __mb_sb_limit */ }; -const struct xlocale_ctype __xlocale_C_ctype = { +struct xlocale_ctype __xlocale_C_ctype = { {{0}, "C"}, (_RuneLocale*)&_DefaultRuneLocale, _none_mbrtowc, Modified: user/ngie/more-tests/lib/libc/locale/querylocale.3 ============================================================================== --- user/ngie/more-tests/lib/libc/locale/querylocale.3 Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/lib/libc/locale/querylocale.3 Sat Apr 25 06:07:19 2015 (r281975) @@ -36,7 +36,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In locale.h .Ft const char * .Fn querylocale "int mask" "locale_t locale" .Sh DESCRIPTION Modified: user/ngie/more-tests/lib/libc/locale/uselocale.3 ============================================================================== --- user/ngie/more-tests/lib/libc/locale/uselocale.3 Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/lib/libc/locale/uselocale.3 Sat Apr 25 06:07:19 2015 (r281975) @@ -36,7 +36,7 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In xlocale.h +.In locale.h .Ft locale_t .Fn uselocale "locale_t locale" .Sh DESCRIPTION Modified: user/ngie/more-tests/lib/libmd/mdXhl.c ============================================================================== --- user/ngie/more-tests/lib/libmd/mdXhl.c Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/lib/libmd/mdXhl.c Sat Apr 25 06:07:19 2015 (r281975) @@ -74,7 +74,7 @@ MDXFileChunk(const char *filename, char i = read(f, buffer, sizeof(buffer)); else i = read(f, buffer, n); - if (i < 0) + if (i <= 0) break; MDXUpdate(&ctx, buffer, i); n -= i; Modified: user/ngie/more-tests/sbin/camcontrol/camcontrol.8 ============================================================================== --- user/ngie/more-tests/sbin/camcontrol/camcontrol.8 Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/sbin/camcontrol/camcontrol.8 Sat Apr 25 06:07:19 2015 (r281975) @@ -575,7 +575,6 @@ Most drives support this format. Print out the list in extended physical sector format. The extended format allows for ranges of blocks to be printed. .El -.Pp .It Fl G Print out the grown defect list. This is a list of bad blocks that have Modified: user/ngie/more-tests/sbin/growfs/Makefile ============================================================================== --- user/ngie/more-tests/sbin/growfs/Makefile Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/sbin/growfs/Makefile Sat Apr 25 06:07:19 2015 (r281975) @@ -4,8 +4,6 @@ # $FreeBSD$ # -#GFSDBG= - .include .PATH: ${.CURDIR}/../mount @@ -16,7 +14,9 @@ MAN= growfs.8 CFLAGS+=-I${.CURDIR}/../mount .if defined(GFSDBG) -SRCS+= debug.c +SRCS+= debug.c +CFLAGS+= -DFS_DEBUG +NO_WCAST_ALIGN= yes .endif LIBADD= util Modified: user/ngie/more-tests/sbin/growfs/growfs.c ============================================================================== --- user/ngie/more-tests/sbin/growfs/growfs.c Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/sbin/growfs/growfs.c Sat Apr 25 06:07:19 2015 (r281975) @@ -161,7 +161,7 @@ growfs(int fsi, int fso, unsigned int Nf #ifdef FS_DEBUG { struct csum *dbg_csp; - int dbg_csc; + u_int32_t dbg_csc; char dbg_line[80]; dbg_csp = fscs; @@ -242,7 +242,7 @@ growfs(int fsi, int fso, unsigned int Nf #ifdef FS_DEBUG { struct csum *dbg_csp; - int dbg_csc; + u_int32_t dbg_csc; char dbg_line[80]; dbg_csp = fscs; Modified: user/ngie/more-tests/share/mk/src.opts.mk ============================================================================== --- user/ngie/more-tests/share/mk/src.opts.mk Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/share/mk/src.opts.mk Sat Apr 25 06:07:19 2015 (r281975) @@ -235,6 +235,10 @@ __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTST .if ${__T} == "aarch64" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GDB .endif +# LLVM lacks support for FreeBSD 64-bit atomic operations for ARMv4/ARMv5 +.if ${__T} == "arm" || ${__T} == "armeb" +BROKEN_OPTIONS+=LLDB +.endif .include Modified: user/ngie/more-tests/sys/amd64/amd64/mp_machdep.c ============================================================================== --- user/ngie/more-tests/sys/amd64/amd64/mp_machdep.c Sat Apr 25 05:31:52 2015 (r281974) +++ user/ngie/more-tests/sys/amd64/amd64/mp_machdep.c Sat Apr 25 06:07:19 2015 (r281975) @@ -81,28 +81,11 @@ __FBSDID("$FreeBSD$"); #define BIOS_RESET (0x0f) #define BIOS_WARM (0x0a) -/* lock region used by kernel profiling */ -int mcount_lock; - -int mp_naps; /* # of Applications processors */ -int boot_cpu_id = -1; /* designated BSP */ - -extern struct pcpu __pcpu[]; - -/* AP uses this during bootstrap. Do not staticize. */ -char *bootSTK; -int bootAP; - -/* Free these after use */ -void *bootstacks[MAXCPU]; +extern struct pcpu __pcpu[]; /* Temporary variables for init_secondary() */ char *doublefault_stack; char *nmi_stack; -void *dpcpu; - -struct pcb stoppcbs[MAXCPU]; -struct susppcb **susppcbs; /* Variables needed for SMP tlb shootdown. */ vm_offset_t smp_tlb_addr2; @@ -112,309 +95,16 @@ uint64_t pcid_cr3; pmap_t smp_tlb_pmap; extern int invpcid_works; -#ifdef COUNT_IPIS -/* Interrupt counts. */ -static u_long *ipi_preempt_counts[MAXCPU]; -static u_long *ipi_ast_counts[MAXCPU]; -u_long *ipi_invltlb_counts[MAXCPU]; -u_long *ipi_invlrng_counts[MAXCPU]; -u_long *ipi_invlpg_counts[MAXCPU]; -u_long *ipi_invlcache_counts[MAXCPU]; -u_long *ipi_rendezvous_counts[MAXCPU]; -static u_long *ipi_hardclock_counts[MAXCPU]; -#endif - -/* Default cpu_ops implementation. */ -struct cpu_ops cpu_ops; - extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); -extern int pmap_pcid_enabled; - /* * Local data and functions. */ -static volatile cpuset_t ipi_nmi_pending; - -/* used to hold the AP's until we are ready to release them */ -struct mtx ap_boot_mtx; - -/* Set to 1 once we're ready to let the APs out of the pen. */ -static volatile int aps_ready = 0; - -/* - * Store data from cpu_add() until later in the boot when we actually setup - * the APs. - */ -struct cpu_info { - int cpu_present:1; - int cpu_bsp:1; - int cpu_disabled:1; - int cpu_hyperthread:1; -} static cpu_info[MAX_APIC_ID + 1]; -int cpu_apic_ids[MAXCPU]; -int apic_cpuids[MAX_APIC_ID + 1]; - -/* Holds pending bitmap based IPIs per CPU */ -volatile u_int cpu_ipi_pending[MAXCPU]; - -static u_int boot_address; -static int cpu_logical; /* logical cpus per core */ -static int cpu_cores; /* cores per package */ - -static void assign_cpu_ids(void); -static void set_interrupt_apic_ids(void); static int start_ap(int apic_id); -static void release_aps(void *dummy); -static u_int hyperthreading_cpus; /* logical cpus sharing L1 cache */ -static int hyperthreading_allowed = 1; static u_int bootMP_size; - -static void -mem_range_AP_init(void) -{ - if (mem_range_softc.mr_op && mem_range_softc.mr_op->initAP) - mem_range_softc.mr_op->initAP(&mem_range_softc); -} - -static void -topo_probe_amd(void) -{ - int core_id_bits; - int id; - - /* AMD processors do not support HTT. */ - cpu_logical = 1; - - if ((amd_feature2 & AMDID2_CMP) == 0) { - cpu_cores = 1; - return; - } - - core_id_bits = (cpu_procinfo2 & AMDID_COREID_SIZE) >> - AMDID_COREID_SIZE_SHIFT; - if (core_id_bits == 0) { - cpu_cores = (cpu_procinfo2 & AMDID_CMP_CORES) + 1; - return; - } - - /* Fam 10h and newer should get here. */ - for (id = 0; id <= MAX_APIC_ID; id++) { - /* Check logical CPU availability. */ - if (!cpu_info[id].cpu_present || cpu_info[id].cpu_disabled) - continue; - /* Check if logical CPU has the same package ID. */ - if ((id >> core_id_bits) != (boot_cpu_id >> core_id_bits)) - continue; - cpu_cores++; - } -} - -/* - * Round up to the next power of two, if necessary, and then - * take log2. - * Returns -1 if argument is zero. - */ -static __inline int -mask_width(u_int x) -{ - - return (fls(x << (1 - powerof2(x))) - 1); -} - -static void -topo_probe_0x4(void) -{ - u_int p[4]; - int pkg_id_bits; - int core_id_bits; - int max_cores; - int max_logical; - int id; - - /* Both zero and one here mean one logical processor per package. */ - max_logical = (cpu_feature & CPUID_HTT) != 0 ? - (cpu_procinfo & CPUID_HTT_CORES) >> 16 : 1; - if (max_logical <= 1) - return; - - /* - * Because of uniformity assumption we examine only - * those logical processors that belong to the same - * package as BSP. Further, we count number of - * logical processors that belong to the same core - * as BSP thus deducing number of threads per core. - */ - if (cpu_high >= 0x4) { - cpuid_count(0x04, 0, p); - max_cores = ((p[0] >> 26) & 0x3f) + 1; - } else - max_cores = 1; - core_id_bits = mask_width(max_logical/max_cores); - if (core_id_bits < 0) - return; - pkg_id_bits = core_id_bits + mask_width(max_cores); - - for (id = 0; id <= MAX_APIC_ID; id++) { - /* Check logical CPU availability. */ - if (!cpu_info[id].cpu_present || cpu_info[id].cpu_disabled) - continue; - /* Check if logical CPU has the same package ID. */ - if ((id >> pkg_id_bits) != (boot_cpu_id >> pkg_id_bits)) - continue; - cpu_cores++; - /* Check if logical CPU has the same package and core IDs. */ - if ((id >> core_id_bits) == (boot_cpu_id >> core_id_bits)) - cpu_logical++; - } - - KASSERT(cpu_cores >= 1 && cpu_logical >= 1, - ("topo_probe_0x4 couldn't find BSP")); - - cpu_cores /= cpu_logical; - hyperthreading_cpus = cpu_logical; -} - -static void -topo_probe_0xb(void) -{ - u_int p[4]; - int bits; - int cnt; - int i; - int logical; - int type; - int x; - - /* We only support three levels for now. */ - for (i = 0; i < 3; i++) { - cpuid_count(0x0b, i, p); - - /* Fall back if CPU leaf 11 doesn't really exist. */ - if (i == 0 && p[1] == 0) { - topo_probe_0x4(); - return; - } - - bits = p[0] & 0x1f; - logical = p[1] &= 0xffff; - type = (p[2] >> 8) & 0xff; - if (type == 0 || logical == 0) - break; - /* - * Because of uniformity assumption we examine only - * those logical processors that belong to the same - * package as BSP. - */ - for (cnt = 0, x = 0; x <= MAX_APIC_ID; x++) { - if (!cpu_info[x].cpu_present || - cpu_info[x].cpu_disabled) - continue; - if (x >> bits == boot_cpu_id >> bits) - cnt++; - } - if (type == CPUID_TYPE_SMT) - cpu_logical = cnt; - else if (type == CPUID_TYPE_CORE) - cpu_cores = cnt; - } - if (cpu_logical == 0) - cpu_logical = 1; - cpu_cores /= cpu_logical; -} - -/* - * Both topology discovery code and code that consumes topology - * information assume top-down uniformity of the topology. - * That is, all physical packages must be identical and each - * core in a package must have the same number of threads. - * Topology information is queried only on BSP, on which this - * code runs and for which it can query CPUID information. - * Then topology is extrapolated on all packages using the - * uniformity assumption. - */ -static void -topo_probe(void) -{ - static int cpu_topo_probed = 0; - - if (cpu_topo_probed) - return; - - CPU_ZERO(&logical_cpus_mask); - if (mp_ncpus <= 1) - cpu_cores = cpu_logical = 1; - else if (cpu_vendor_id == CPU_VENDOR_AMD) - topo_probe_amd(); - else if (cpu_vendor_id == CPU_VENDOR_INTEL) { - /* - * See Intel(R) 64 Architecture Processor - * Topology Enumeration article for details. - * - * Note that 0x1 <= cpu_high < 4 case should be - * compatible with topo_probe_0x4() logic when - * CPUID.1:EBX[23:16] > 0 (cpu_cores will be 1) - * or it should trigger the fallback otherwise. - */ - if (cpu_high >= 0xb) - topo_probe_0xb(); - else if (cpu_high >= 0x1) - topo_probe_0x4(); - } - - /* - * Fallback: assume each logical CPU is in separate - * physical package. That is, no multi-core, no SMT. - */ - if (cpu_cores == 0 || cpu_logical == 0) - cpu_cores = cpu_logical = 1; - cpu_topo_probed = 1; -} - -struct cpu_group * -cpu_topo(void) -{ - int cg_flags; - - /* - * Determine whether any threading flags are - * necessry. - */ - topo_probe(); - if (cpu_logical > 1 && hyperthreading_cpus) - cg_flags = CG_FLAG_HTT; - else if (cpu_logical > 1) - cg_flags = CG_FLAG_SMT; - else - cg_flags = 0; - if (mp_ncpus % (cpu_cores * cpu_logical) != 0) { - printf("WARNING: Non-uniform processors.\n"); - printf("WARNING: Using suboptimal topology.\n"); - return (smp_topo_none()); - } - /* - * No multi-core or hyper-threaded. - */ - if (cpu_logical * cpu_cores == 1) - return (smp_topo_none()); - /* - * Only HTT no multi-core. - */ - if (cpu_logical > 1 && cpu_cores == 1) - return (smp_topo_1level(CG_SHARE_L1, cpu_logical, cg_flags)); - /* - * Only multi-core no HTT. - */ - if (cpu_cores > 1 && cpu_logical == 1) - return (smp_topo_1level(CG_SHARE_L2, cpu_cores, cg_flags)); - /* - * Both HTT and multi-core. - */ - return (smp_topo_2level(CG_SHARE_L2, cpu_cores, - CG_SHARE_L1, cpu_logical, cg_flags)); -} +static u_int boot_address; /* * Calculate usable address in base memory for AP trampoline code. @@ -433,85 +123,6 @@ mp_bootaddress(u_int basemem) return mptramp_pagetables; } -void -cpu_add(u_int apic_id, char boot_cpu) -{ - - if (apic_id > MAX_APIC_ID) { - panic("SMP: APIC ID %d too high", apic_id); - return; - } - KASSERT(cpu_info[apic_id].cpu_present == 0, ("CPU %d added twice", - apic_id)); - cpu_info[apic_id].cpu_present = 1; - if (boot_cpu) { - KASSERT(boot_cpu_id == -1, - ("CPU %d claims to be BSP, but CPU %d already is", apic_id, - boot_cpu_id)); - boot_cpu_id = apic_id; - cpu_info[apic_id].cpu_bsp = 1; - } - if (mp_ncpus < MAXCPU) { - mp_ncpus++; - mp_maxid = mp_ncpus - 1; - } - if (bootverbose) - printf("SMP: Added CPU %d (%s)\n", apic_id, boot_cpu ? "BSP" : - "AP"); -} - -void -cpu_mp_setmaxid(void) -{ - - /* *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***