From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 04:16:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 09BE4B4B; Sun, 1 Sep 2013 04:16:44 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EC5CB247A; Sun, 1 Sep 2013 04:16:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r814GhGJ095055; Sun, 1 Sep 2013 04:16:43 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r814Ghqh095053; Sun, 1 Sep 2013 04:16:43 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201309010416.r814Ghqh095053@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 1 Sep 2013 04:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255109 - head/sys/dev/virtio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 04:16:44 -0000 Author: bryanv Date: Sun Sep 1 04:16:43 2013 New Revision: 255109 URL: http://svnweb.freebsd.org/changeset/base/255109 Log: Add support for postponing VirtIO virtqueue interrupts Partial support for the EVENT_IDX feature was added a while ago, but this commit adds an interface for the device driver to hint how long (in terms of descriptors) the next interrupt should be delayed. The first user of this will be used to reduce VirtIO net's Tx completion interrupts. Modified: head/sys/dev/virtio/virtqueue.c head/sys/dev/virtio/virtqueue.h Modified: head/sys/dev/virtio/virtqueue.c ============================================================================== --- head/sys/dev/virtio/virtqueue.c Sat Aug 31 22:32:42 2013 (r255108) +++ head/sys/dev/virtio/virtqueue.c Sun Sep 1 04:16:43 2013 (r255109) @@ -127,7 +127,7 @@ static uint16_t vq_ring_enqueue_segments static int vq_ring_use_indirect(struct virtqueue *, int); static void vq_ring_enqueue_indirect(struct virtqueue *, void *, struct sglist *, int, int); -static int vq_ring_enable_interrupt(struct virtqueue *, uint16_t); +static int vq_ring_enable_interrupt(struct virtqueue *, uint16_t); static int vq_ring_must_notify_host(struct virtqueue *); static void vq_ring_notify_host(struct virtqueue *); static void vq_ring_free_chain(struct virtqueue *, uint16_t); @@ -440,28 +440,38 @@ virtqueue_enable_intr(struct virtqueue * } int -virtqueue_postpone_intr(struct virtqueue *vq) +virtqueue_postpone_intr(struct virtqueue *vq, vq_postpone_t hint) { uint16_t ndesc, avail_idx; - /* - * Request the next interrupt be postponed until at least half - * of the available descriptors have been consumed. - */ avail_idx = vq->vq_ring.avail->idx; - ndesc = (uint16_t)(avail_idx - vq->vq_used_cons_idx) / 2; + ndesc = (uint16_t)(avail_idx - vq->vq_used_cons_idx); + + switch (hint) { + case VQ_POSTPONE_SHORT: + ndesc /= 4; + break; + case VQ_POSTPONE_LONG: + ndesc *= 3 / 4; + break; + case VQ_POSTPONE_EMPTIED: + break; + } return (vq_ring_enable_interrupt(vq, ndesc)); } +/* + * Note this is only considered a hint to the host. + */ void virtqueue_disable_intr(struct virtqueue *vq) { - /* - * Note this is only considered a hint to the host. - */ - if ((vq->vq_flags & VIRTQUEUE_FLAG_EVENT_IDX) == 0) + if (vq->vq_flags & VIRTQUEUE_FLAG_EVENT_IDX) { + vring_used_event(&vq->vq_ring) = vq->vq_used_cons_idx - + vq->vq_nentries - 1; + } else vq->vq_ring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT; } Modified: head/sys/dev/virtio/virtqueue.h ============================================================================== --- head/sys/dev/virtio/virtqueue.h Sat Aug 31 22:32:42 2013 (r255108) +++ head/sys/dev/virtio/virtqueue.h Sun Sep 1 04:16:43 2013 (r255109) @@ -41,6 +41,16 @@ struct sglist; /* Device callback for a virtqueue interrupt. */ typedef void virtqueue_intr_t(void *); +/* + * Hint on how long the next interrupt should be postponed. This is + * only used when the EVENT_IDX feature is negotiated. + */ +typedef enum { + VQ_POSTPONE_SHORT, + VQ_POSTPONE_LONG, + VQ_POSTPONE_EMPTIED /* Until all available desc are used. */ +} vq_postpone_t; + #define VIRTQUEUE_MAX_NAME_SZ 32 /* One for each virtqueue the device wishes to allocate. */ @@ -73,7 +83,7 @@ int virtqueue_reinit(struct virtqueue * int virtqueue_intr_filter(struct virtqueue *vq); void virtqueue_intr(struct virtqueue *vq); int virtqueue_enable_intr(struct virtqueue *vq); -int virtqueue_postpone_intr(struct virtqueue *vq); +int virtqueue_postpone_intr(struct virtqueue *vq, vq_postpone_t hint); void virtqueue_disable_intr(struct virtqueue *vq); /* Get physical address of the virtqueue ring. */ From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 04:20:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A7DD5C94; Sun, 1 Sep 2013 04:20:24 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 96C4624AF; Sun, 1 Sep 2013 04:20:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r814KO8d098391; Sun, 1 Sep 2013 04:20:24 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r814KOgK098389; Sun, 1 Sep 2013 04:20:24 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201309010420.r814KOgK098389@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 1 Sep 2013 04:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255110 - in head/sys/dev/virtio: . pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 04:20:24 -0000 Author: bryanv Date: Sun Sep 1 04:20:23 2013 New Revision: 255110 URL: http://svnweb.freebsd.org/changeset/base/255110 Log: Add optional VirtIO device method for post-attach notifications This is called after the parent device (ie virito_pci) has completed the device attachment/initialization. Modified: head/sys/dev/virtio/pci/virtio_pci.c head/sys/dev/virtio/virtio_if.m Modified: head/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- head/sys/dev/virtio/pci/virtio_pci.c Sun Sep 1 04:16:43 2013 (r255109) +++ head/sys/dev/virtio/pci/virtio_pci.c Sun Sep 1 04:20:23 2013 (r255110) @@ -757,8 +757,10 @@ vtpci_probe_and_attach_child(struct vtpc vtpci_release_child_resources(sc); /* Reset status for future attempt. */ vtpci_set_status(dev, VIRTIO_CONFIG_STATUS_ACK); - } else + } else { vtpci_set_status(dev, VIRTIO_CONFIG_STATUS_DRIVER_OK); + VIRTIO_ATTACH_COMPLETED(child); + } } static int Modified: head/sys/dev/virtio/virtio_if.m ============================================================================== --- head/sys/dev/virtio/virtio_if.m Sun Sep 1 04:16:43 2013 (r255109) +++ head/sys/dev/virtio/virtio_if.m Sun Sep 1 04:20:23 2013 (r255110) @@ -31,6 +31,18 @@ INTERFACE virtio; CODE { static int + virtio_default_attach_completed(device_t dev) + { + return (0); + } +}; + +METHOD int attach_completed { + device_t dev; +} DEFAULT virtio_default_attach_completed; + +CODE { + static int virtio_default_config_change(device_t dev) { return (0); From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 04:23:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A8128DE7; Sun, 1 Sep 2013 04:23:54 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9147924C0; Sun, 1 Sep 2013 04:23:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r814Ns4I099633; Sun, 1 Sep 2013 04:23:54 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r814NsSS099632; Sun, 1 Sep 2013 04:23:54 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201309010423.r814NsSS099632@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 1 Sep 2013 04:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255111 - head/sys/dev/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 04:23:54 -0000 Author: bryanv Date: Sun Sep 1 04:23:54 2013 New Revision: 255111 URL: http://svnweb.freebsd.org/changeset/base/255111 Log: Sync VirtIO net device header file from recent Linux Modified: head/sys/dev/virtio/network/virtio_net.h Modified: head/sys/dev/virtio/network/virtio_net.h ============================================================================== --- head/sys/dev/virtio/network/virtio_net.h Sun Sep 1 04:20:23 2013 (r255110) +++ head/sys/dev/virtio/network/virtio_net.h Sun Sep 1 04:23:54 2013 (r255111) @@ -50,14 +50,22 @@ #define VIRTIO_NET_F_CTRL_RX 0x40000 /* Control channel RX mode support */ #define VIRTIO_NET_F_CTRL_VLAN 0x80000 /* Control channel VLAN filtering */ #define VIRTIO_NET_F_CTRL_RX_EXTRA 0x100000 /* Extra RX mode control support */ +#define VIRTIO_NET_F_GUEST_ANNOUNCE 0x200000 /* Announce device on network */ +#define VIRTIO_NET_F_MQ 0x400000 /* Device supports RFS */ +#define VIRTIO_NET_F_CTRL_MAC_ADDR 0x800000 /* Set MAC address */ #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ struct virtio_net_config { /* The config defining mac address (if VIRTIO_NET_F_MAC) */ - uint8_t mac[ETHER_ADDR_LEN]; + uint8_t mac[ETHER_ADDR_LEN]; /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ uint16_t status; + /* Maximum number of each of transmit and receive queues; + * see VIRTIO_NET_F_MQ and VIRTIO_NET_CTRL_MQ. + * Legal values are between 1 and 0x8000. + */ + uint16_t max_virtqueue_pairs; } __packed; /* @@ -66,6 +74,7 @@ struct virtio_net_config { */ struct virtio_net_hdr { #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 /* Use csum_start,csum_offset*/ +#define VIRTIO_NET_HDR_F_DATA_VALID 2 /* Csum is valid */ uint8_t flags; #define VIRTIO_NET_HDR_GSO_NONE 0 /* Not a GSO frame */ #define VIRTIO_NET_HDR_GSO_TCPV4 1 /* GSO frame, IPv4 TCP (TSO) */ @@ -100,8 +109,6 @@ struct virtio_net_ctrl_hdr { uint8_t cmd; } __packed; -typedef uint8_t virtio_net_ctrl_ack; - #define VIRTIO_NET_OK 0 #define VIRTIO_NET_ERR 1 @@ -134,6 +141,10 @@ typedef uint8_t virtio_net_ctrl_ack; * first sg list contains unicast addresses, the second is for multicast. * This functionality is present if the VIRTIO_NET_F_CTRL_RX feature * is available. + * + * The ADDR_SET command requests one out scatterlist, it contains a + * 6 bytes MAC address. This functionality is present if the + * VIRTIO_NET_F_CTRL_MAC_ADDR feature is available. */ struct virtio_net_ctrl_mac { uint32_t entries; @@ -142,6 +153,7 @@ struct virtio_net_ctrl_mac { #define VIRTIO_NET_CTRL_MAC 1 #define VIRTIO_NET_CTRL_MAC_TABLE_SET 0 +#define VIRTIO_NET_CTRL_MAC_ADDR_SET 1 /* * Control VLAN filtering @@ -156,4 +168,35 @@ struct virtio_net_ctrl_mac { #define VIRTIO_NET_CTRL_VLAN_ADD 0 #define VIRTIO_NET_CTRL_VLAN_DEL 1 +/* + * Control link announce acknowledgement + * + * The command VIRTIO_NET_CTRL_ANNOUNCE_ACK is used to indicate that + * driver has recevied the notification; device would clear the + * VIRTIO_NET_S_ANNOUNCE bit in the status field after it receives + * this command. + */ +#define VIRTIO_NET_CTRL_ANNOUNCE 3 +#define VIRTIO_NET_CTRL_ANNOUNCE_ACK 0 + +/* + * Control Receive Flow Steering + * + * The command VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET enables Receive Flow + * Steering, specifying the number of the transmit and receive queues + * that will be used. After the command is consumed and acked by the + * device, the device will not steer new packets on receive virtqueues + * other than specified nor read from transmit virtqueues other than + * specified. Accordingly, driver should not transmit new packets on + * virtqueues other than specified. + */ +struct virtio_net_ctrl_mq { + uint16_t virtqueue_pairs; +} __packed; + +#define VIRTIO_NET_CTRL_MQ 4 +#define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET 0 +#define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN 1 +#define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX 0x8000 + #endif /* _VIRTIO_NET_H */ From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 04:33:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5512B17D; Sun, 1 Sep 2013 04:33:48 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 41B70252D; Sun, 1 Sep 2013 04:33:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r814XmGf005366; Sun, 1 Sep 2013 04:33:48 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r814Xl5r005360; Sun, 1 Sep 2013 04:33:47 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201309010433.r814Xl5r005360@svn.freebsd.org> From: Bryan Venteicher Date: Sun, 1 Sep 2013 04:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255112 - in head: share/man/man4 sys/dev/virtio/network sys/modules/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 04:33:48 -0000 Author: bryanv Date: Sun Sep 1 04:33:47 2013 New Revision: 255112 URL: http://svnweb.freebsd.org/changeset/base/255112 Log: Import multiqueue VirtIO net driver from my user/bryanv/vtnetmq branch This is a significant rewrite of much of the previous driver; lots of misc. cleanup was also performed, and support for a few other minor features was also added. Modified: head/share/man/man4/vtnet.4 head/sys/dev/virtio/network/if_vtnet.c head/sys/dev/virtio/network/if_vtnetvar.h head/sys/modules/virtio/network/Makefile Modified: head/share/man/man4/vtnet.4 ============================================================================== --- head/share/man/man4/vtnet.4 Sun Sep 1 04:23:54 2013 (r255111) +++ head/share/man/man4/vtnet.4 Sun Sep 1 04:33:47 2013 (r255112) @@ -69,14 +69,30 @@ prompt before booting the kernel or stor .Xr loader.conf 5 . .Bl -tag -width "xxxxxx" .It Va hw.vtnet.csum_disable +.It Va hw.vtnet. Ns Ar X Ns Va .csum_disable This tunable disables receive and send checksum offload. The default value is 0. .It Va hw.vtnet.tso_disable +.It Va hw.vtnet. Ns Ar X Ns Va .tso_disable This tunable disables TSO. The default value is 0. .It Va hw.vtnet.lro_disable +.It Va hw.vtnet. Ns Ar X Ns Va .lro_disable This tunable disables LRO. The default value is 0. +.It Va hw.vtnet.mq_disable +.It Va hw.vtnet. Ns Ar X Ns Va .mq_disable +This tunable disables multiqueue. +The default value is 0. +.It Va hw.vtnet.mq_max_pairs +.It Va hw.vtnet. Ns Ar X Ns Va .mq_max_pairs +This tunable sets the maximum number of transmit and receive queue pairs. +Multiple queues are only supported when the Multiqueue feature is negotiated. +This driver supports a maximum of 8 queue pairs. +The number of queue pairs used is the lesser of the maximum supported by the +driver and the hypervisor, the number of CPUs present in the guest, and this +tunable if not zero. +The default value is 0. .El .Sh SEE ALSO .Xr arp 4 , Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Sun Sep 1 04:23:54 2013 (r255111) +++ head/sys/dev/virtio/network/if_vtnet.c Sun Sep 1 04:33:47 2013 (r255112) @@ -29,10 +29,6 @@ #include __FBSDID("$FreeBSD$"); -#ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" -#endif - #include #include #include @@ -46,6 +42,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include @@ -63,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -79,6 +79,9 @@ __FBSDID("$FreeBSD$"); #include "virtio_if.h" +#include "opt_inet.h" +#include "opt_inet6.h" + static int vtnet_modevent(module_t, int, void *); static int vtnet_probe(device_t); @@ -87,82 +90,139 @@ static int vtnet_detach(device_t); static int vtnet_suspend(device_t); static int vtnet_resume(device_t); static int vtnet_shutdown(device_t); +static int vtnet_attach_completed(device_t); static int vtnet_config_change(device_t); static void vtnet_negotiate_features(struct vtnet_softc *); +static void vtnet_setup_features(struct vtnet_softc *); +static int vtnet_init_rxq(struct vtnet_softc *, int); +static int vtnet_init_txq(struct vtnet_softc *, int); +static int vtnet_alloc_rxtx_queues(struct vtnet_softc *); +static void vtnet_free_rxtx_queues(struct vtnet_softc *); +static int vtnet_alloc_rx_filters(struct vtnet_softc *); +static void vtnet_free_rx_filters(struct vtnet_softc *); static int vtnet_alloc_virtqueues(struct vtnet_softc *); -static void vtnet_get_hwaddr(struct vtnet_softc *); -static void vtnet_set_hwaddr(struct vtnet_softc *); -static int vtnet_is_link_up(struct vtnet_softc *); -static void vtnet_update_link_status(struct vtnet_softc *); -static void vtnet_watchdog(struct vtnet_softc *); +static int vtnet_setup_interface(struct vtnet_softc *); static int vtnet_change_mtu(struct vtnet_softc *, int); static int vtnet_ioctl(struct ifnet *, u_long, caddr_t); -static int vtnet_init_rx_vq(struct vtnet_softc *); -static void vtnet_free_rx_mbufs(struct vtnet_softc *); -static void vtnet_free_tx_mbufs(struct vtnet_softc *); -static void vtnet_free_ctrl_vq(struct vtnet_softc *); - -#ifdef DEVICE_POLLING -static poll_handler_t vtnet_poll; -#endif - -static struct mbuf * vtnet_alloc_rxbuf(struct vtnet_softc *, int, - struct mbuf **); -static int vtnet_replace_rxbuf(struct vtnet_softc *, +static int vtnet_rxq_populate(struct vtnet_rxq *); +static void vtnet_rxq_free_mbufs(struct vtnet_rxq *); +static struct mbuf * + vtnet_rx_alloc_buf(struct vtnet_softc *, int , struct mbuf **); +static int vtnet_rxq_replace_lro_nomgr_buf(struct vtnet_rxq *, struct mbuf *, int); -static int vtnet_newbuf(struct vtnet_softc *); -static void vtnet_discard_merged_rxbuf(struct vtnet_softc *, int); -static void vtnet_discard_rxbuf(struct vtnet_softc *, struct mbuf *); -static int vtnet_enqueue_rxbuf(struct vtnet_softc *, struct mbuf *); -static void vtnet_vlan_tag_remove(struct mbuf *); -static int vtnet_rx_csum(struct vtnet_softc *, struct mbuf *, +static int vtnet_rxq_replace_buf(struct vtnet_rxq *, struct mbuf *, int); +static int vtnet_rxq_enqueue_buf(struct vtnet_rxq *, struct mbuf *); +static int vtnet_rxq_new_buf(struct vtnet_rxq *); +static int vtnet_rxq_csum(struct vtnet_rxq *, struct mbuf *, + struct virtio_net_hdr *); +static void vtnet_rxq_discard_merged_bufs(struct vtnet_rxq *, int); +static void vtnet_rxq_discard_buf(struct vtnet_rxq *, struct mbuf *); +static int vtnet_rxq_merged_eof(struct vtnet_rxq *, struct mbuf *, int); +static void vtnet_rxq_input(struct vtnet_rxq *, struct mbuf *, struct virtio_net_hdr *); -static int vtnet_rxeof_merged(struct vtnet_softc *, struct mbuf *, int); -static int vtnet_rxeof(struct vtnet_softc *, int, int *); +static int vtnet_rxq_eof(struct vtnet_rxq *); static void vtnet_rx_vq_intr(void *); +static void vtnet_rxq_tq_intr(void *, int); -static void vtnet_txeof(struct vtnet_softc *); -static struct mbuf * vtnet_tx_offload(struct vtnet_softc *, struct mbuf *, +static void vtnet_txq_free_mbufs(struct vtnet_txq *); +static int vtnet_txq_offload_ctx(struct vtnet_txq *, struct mbuf *, + int *, int *, int *); +static int vtnet_txq_offload_tso(struct vtnet_txq *, struct mbuf *, int, + int, struct virtio_net_hdr *); +static struct mbuf * + vtnet_txq_offload(struct vtnet_txq *, struct mbuf *, struct virtio_net_hdr *); -static int vtnet_enqueue_txbuf(struct vtnet_softc *, struct mbuf **, +static int vtnet_txq_enqueue_buf(struct vtnet_txq *, struct mbuf **, struct vtnet_tx_header *); -static int vtnet_encap(struct vtnet_softc *, struct mbuf **); -static void vtnet_start_locked(struct ifnet *); +static int vtnet_txq_encap(struct vtnet_txq *, struct mbuf **); +#ifdef VTNET_LEGACY_TX +static void vtnet_start_locked(struct vtnet_txq *, struct ifnet *); static void vtnet_start(struct ifnet *); -static void vtnet_tick(void *); +#else +static int vtnet_txq_mq_start_locked(struct vtnet_txq *, struct mbuf *); +static int vtnet_txq_mq_start(struct ifnet *, struct mbuf *); +static void vtnet_txq_tq_deferred(void *, int); +#endif +static void vtnet_txq_tq_intr(void *, int); +static void vtnet_txq_eof(struct vtnet_txq *); static void vtnet_tx_vq_intr(void *); +static void vtnet_tx_start_all(struct vtnet_softc *); + +#ifndef VTNET_LEGACY_TX +static void vtnet_qflush(struct ifnet *); +#endif + +static int vtnet_watchdog(struct vtnet_txq *); +static void vtnet_rxq_accum_stats(struct vtnet_rxq *, + struct vtnet_rxq_stats *); +static void vtnet_txq_accum_stats(struct vtnet_txq *, + struct vtnet_txq_stats *); +static void vtnet_accumulate_stats(struct vtnet_softc *); +static void vtnet_tick(void *); + +static void vtnet_start_taskqueues(struct vtnet_softc *); +static void vtnet_free_taskqueues(struct vtnet_softc *); +static void vtnet_drain_taskqueues(struct vtnet_softc *); +static void vtnet_drain_rxtx_queues(struct vtnet_softc *); +static void vtnet_stop_rendezvous(struct vtnet_softc *); static void vtnet_stop(struct vtnet_softc *); +static int vtnet_virtio_reinit(struct vtnet_softc *); +static void vtnet_init_rx_filters(struct vtnet_softc *); +static int vtnet_init_rx_queues(struct vtnet_softc *); +static int vtnet_init_tx_queues(struct vtnet_softc *); +static int vtnet_init_rxtx_queues(struct vtnet_softc *); +static void vtnet_set_active_vq_pairs(struct vtnet_softc *); static int vtnet_reinit(struct vtnet_softc *); static void vtnet_init_locked(struct vtnet_softc *); static void vtnet_init(void *); +static void vtnet_free_ctrl_vq(struct vtnet_softc *); static void vtnet_exec_ctrl_cmd(struct vtnet_softc *, void *, struct sglist *, int, int); - -static void vtnet_rx_filter(struct vtnet_softc *sc); +static int vtnet_ctrl_mac_cmd(struct vtnet_softc *, uint8_t *); +static int vtnet_ctrl_mq_cmd(struct vtnet_softc *, uint16_t); static int vtnet_ctrl_rx_cmd(struct vtnet_softc *, int, int); static int vtnet_set_promisc(struct vtnet_softc *, int); static int vtnet_set_allmulti(struct vtnet_softc *, int); +static void vtnet_attach_disable_promisc(struct vtnet_softc *); +static void vtnet_rx_filter(struct vtnet_softc *); static void vtnet_rx_filter_mac(struct vtnet_softc *); - static int vtnet_exec_vlan_filter(struct vtnet_softc *, int, uint16_t); static void vtnet_rx_filter_vlan(struct vtnet_softc *); -static void vtnet_set_vlan_filter(struct vtnet_softc *, int, uint16_t); +static void vtnet_update_vlan_filter(struct vtnet_softc *, int, uint16_t); static void vtnet_register_vlan(void *, struct ifnet *, uint16_t); static void vtnet_unregister_vlan(void *, struct ifnet *, uint16_t); +static int vtnet_is_link_up(struct vtnet_softc *); +static void vtnet_update_link_status(struct vtnet_softc *); static int vtnet_ifmedia_upd(struct ifnet *); static void vtnet_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static void vtnet_get_hwaddr(struct vtnet_softc *); +static void vtnet_set_hwaddr(struct vtnet_softc *); +static void vtnet_vlan_tag_remove(struct mbuf *); -static void vtnet_add_statistics(struct vtnet_softc *); +static void vtnet_setup_rxq_sysctl(struct sysctl_ctx_list *, + struct sysctl_oid_list *, struct vtnet_rxq *); +static void vtnet_setup_txq_sysctl(struct sysctl_ctx_list *, + struct sysctl_oid_list *, struct vtnet_txq *); +static void vtnet_setup_queue_sysctl(struct vtnet_softc *); +static void vtnet_setup_sysctl(struct vtnet_softc *); + +static int vtnet_rxq_enable_intr(struct vtnet_rxq *); +static void vtnet_rxq_disable_intr(struct vtnet_rxq *); +static int vtnet_txq_enable_intr(struct vtnet_txq *); +static void vtnet_txq_disable_intr(struct vtnet_txq *); +static void vtnet_enable_rx_interrupts(struct vtnet_softc *); +static void vtnet_enable_tx_interrupts(struct vtnet_softc *); +static void vtnet_enable_interrupts(struct vtnet_softc *); +static void vtnet_disable_rx_interrupts(struct vtnet_softc *); +static void vtnet_disable_tx_interrupts(struct vtnet_softc *); +static void vtnet_disable_interrupts(struct vtnet_softc *); -static int vtnet_enable_rx_intr(struct vtnet_softc *); -static int vtnet_enable_tx_intr(struct vtnet_softc *); -static void vtnet_disable_rx_intr(struct vtnet_softc *); -static void vtnet_disable_tx_intr(struct vtnet_softc *); +static int vtnet_tunable_int(struct vtnet_softc *, const char *, int); /* Tunables. */ static int vtnet_csum_disable = 0; @@ -171,16 +231,25 @@ static int vtnet_tso_disable = 0; TUNABLE_INT("hw.vtnet.tso_disable", &vtnet_tso_disable); static int vtnet_lro_disable = 0; TUNABLE_INT("hw.vtnet.lro_disable", &vtnet_lro_disable); +static int vtnet_mq_disable = 0; +TUNABLE_INT("hw.vtnet.mq_disable", &vtnet_mq_disable); +static int vtnet_mq_max_pairs = 0; +TUNABLE_INT("hw.vtnet.mq_max_pairs", &vtnet_mq_max_pairs); +static int vtnet_rx_process_limit = 512; +TUNABLE_INT("hw.vtnet.rx_process_limit", &vtnet_rx_process_limit); /* - * Reducing the number of transmit completed interrupts can - * improve performance. To do so, the define below keeps the - * Tx vq interrupt disabled and adds calls to vtnet_txeof() - * in the start and watchdog paths. The price to pay for this - * is the m_free'ing of transmitted mbufs may be delayed until - * the watchdog fires. + * Reducing the number of transmit completed interrupts can improve + * performance. To do so, the define below keeps the Tx vq interrupt + * disabled and adds calls to vtnet_txeof() in the start and watchdog + * paths. The price to pay for this is the m_free'ing of transmitted + * mbufs may be delayed until the watchdog fires. + * + * BMV: Reintroduce this later as a run-time option, if it makes + * sense after the EVENT_IDX feature is supported. + * + * #define VTNET_TX_INTR_MODERATION */ -#define VTNET_TX_INTR_MODERATION static uma_zone_t vtnet_tx_header_zone; @@ -203,21 +272,25 @@ static struct virtio_feature_desc vtnet_ { VIRTIO_NET_F_CTRL_RX, "RxMode" }, { VIRTIO_NET_F_CTRL_VLAN, "VLanFilter" }, { VIRTIO_NET_F_CTRL_RX_EXTRA, "RxModeExtra" }, + { VIRTIO_NET_F_GUEST_ANNOUNCE, "GuestAnnounce" }, + { VIRTIO_NET_F_MQ, "Multiqueue" }, + { VIRTIO_NET_F_CTRL_MAC_ADDR, "SetMacAddress" }, { 0, NULL } }; static device_method_t vtnet_methods[] = { /* Device methods. */ - DEVMETHOD(device_probe, vtnet_probe), - DEVMETHOD(device_attach, vtnet_attach), - DEVMETHOD(device_detach, vtnet_detach), - DEVMETHOD(device_suspend, vtnet_suspend), - DEVMETHOD(device_resume, vtnet_resume), - DEVMETHOD(device_shutdown, vtnet_shutdown), + DEVMETHOD(device_probe, vtnet_probe), + DEVMETHOD(device_attach, vtnet_attach), + DEVMETHOD(device_detach, vtnet_detach), + DEVMETHOD(device_suspend, vtnet_suspend), + DEVMETHOD(device_resume, vtnet_resume), + DEVMETHOD(device_shutdown, vtnet_shutdown), /* VirtIO methods. */ - DEVMETHOD(virtio_config_change, vtnet_config_change), + DEVMETHOD(virtio_attach_completed, vtnet_attach_completed), + DEVMETHOD(virtio_config_change, vtnet_config_change), DEVMETHOD_END }; @@ -282,56 +355,31 @@ static int vtnet_attach(device_t dev) { struct vtnet_softc *sc; - struct ifnet *ifp; - int tx_size, error; + int error; sc = device_get_softc(dev); sc->vtnet_dev = dev; - VTNET_LOCK_INIT(sc); - callout_init_mtx(&sc->vtnet_tick_ch, VTNET_MTX(sc), 0); - - ifmedia_init(&sc->vtnet_media, IFM_IMASK, vtnet_ifmedia_upd, - vtnet_ifmedia_sts); - ifmedia_add(&sc->vtnet_media, VTNET_MEDIATYPE, 0, NULL); - ifmedia_set(&sc->vtnet_media, VTNET_MEDIATYPE); - - vtnet_add_statistics(sc); - + /* Register our feature descriptions. */ virtio_set_feature_desc(dev, vtnet_feature_desc); - vtnet_negotiate_features(sc); - - if (virtio_with_feature(dev, VIRTIO_NET_F_MRG_RXBUF)) { - sc->vtnet_flags |= VTNET_FLAG_MRG_RXBUFS; - sc->vtnet_hdr_size = sizeof(struct virtio_net_hdr_mrg_rxbuf); - } else - sc->vtnet_hdr_size = sizeof(struct virtio_net_hdr); - - sc->vtnet_rx_mbuf_size = MCLBYTES; - sc->vtnet_rx_mbuf_count = VTNET_NEEDED_RX_MBUFS(sc); - - if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_VQ)) { - sc->vtnet_flags |= VTNET_FLAG_CTRL_VQ; - if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_RX)) { - sc->vtnet_mac_filter = malloc( - sizeof(struct vtnet_mac_filter), M_DEVBUF, - M_NOWAIT | M_ZERO); - if (sc->vtnet_mac_filter == NULL) { - device_printf(dev, - "cannot allocate mac filter table\n"); - error = ENOMEM; - goto fail; - } + VTNET_CORE_LOCK_INIT(sc); + callout_init_mtx(&sc->vtnet_tick_ch, VTNET_CORE_MTX(sc), 0); - sc->vtnet_flags |= VTNET_FLAG_CTRL_RX; - } + vtnet_setup_sysctl(sc); + vtnet_setup_features(sc); - if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_VLAN)) - sc->vtnet_flags |= VTNET_FLAG_VLAN_FILTER; + error = vtnet_alloc_rx_filters(sc); + if (error) { + device_printf(dev, "cannot allocate Rx filters\n"); + goto fail; } - vtnet_get_hwaddr(sc); + error = vtnet_alloc_rxtx_queues(sc); + if (error) { + device_printf(dev, "cannot allocate queues\n"); + goto fail; + } error = vtnet_alloc_virtqueues(sc); if (error) { @@ -339,111 +387,21 @@ vtnet_attach(device_t dev) goto fail; } - ifp = sc->vtnet_ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "cannot allocate ifnet structure\n"); - error = ENOSPC; + error = vtnet_setup_interface(sc); + if (error) { + device_printf(dev, "cannot setup interface\n"); goto fail; } - ifp->if_softc = sc; - if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_init = vtnet_init; - ifp->if_start = vtnet_start; - ifp->if_ioctl = vtnet_ioctl; - - sc->vtnet_rx_size = virtqueue_size(sc->vtnet_rx_vq); - sc->vtnet_rx_process_limit = sc->vtnet_rx_size; - - tx_size = virtqueue_size(sc->vtnet_tx_vq); - sc->vtnet_tx_size = tx_size; - IFQ_SET_MAXLEN(&ifp->if_snd, tx_size - 1); - ifp->if_snd.ifq_drv_maxlen = tx_size - 1; - IFQ_SET_READY(&ifp->if_snd); - - ether_ifattach(ifp, sc->vtnet_hwaddr); - - if (virtio_with_feature(dev, VIRTIO_NET_F_STATUS)) - ifp->if_capabilities |= IFCAP_LINKSTATE; - - /* Tell the upper layer(s) we support long frames. */ - ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); - ifp->if_capabilities |= IFCAP_JUMBO_MTU | IFCAP_VLAN_MTU; - - if (virtio_with_feature(dev, VIRTIO_NET_F_CSUM)) { - ifp->if_capabilities |= IFCAP_TXCSUM; - - if (virtio_with_feature(dev, VIRTIO_NET_F_HOST_TSO4)) - ifp->if_capabilities |= IFCAP_TSO4; - if (virtio_with_feature(dev, VIRTIO_NET_F_HOST_TSO6)) - ifp->if_capabilities |= IFCAP_TSO6; - if (ifp->if_capabilities & IFCAP_TSO) - ifp->if_capabilities |= IFCAP_VLAN_HWTSO; - - if (virtio_with_feature(dev, VIRTIO_NET_F_HOST_ECN)) - sc->vtnet_flags |= VTNET_FLAG_TSO_ECN; - } - - if (virtio_with_feature(dev, VIRTIO_NET_F_GUEST_CSUM)) { - ifp->if_capabilities |= IFCAP_RXCSUM; - - if (virtio_with_feature(dev, VIRTIO_NET_F_GUEST_TSO4) || - virtio_with_feature(dev, VIRTIO_NET_F_GUEST_TSO6)) - ifp->if_capabilities |= IFCAP_LRO; - } - - if (ifp->if_capabilities & IFCAP_HWCSUM) { - /* - * VirtIO does not support VLAN tagging, but we can fake - * it by inserting and removing the 802.1Q header during - * transmit and receive. We are then able to do checksum - * offloading of VLAN frames. - */ - ifp->if_capabilities |= - IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM; - } - - ifp->if_capenable = ifp->if_capabilities; - - /* - * Capabilities after here are not enabled by default. - */ - - if (sc->vtnet_flags & VTNET_FLAG_VLAN_FILTER) { - ifp->if_capabilities |= IFCAP_VLAN_HWFILTER; - - sc->vtnet_vlan_attach = EVENTHANDLER_REGISTER(vlan_config, - vtnet_register_vlan, sc, EVENTHANDLER_PRI_FIRST); - sc->vtnet_vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig, - vtnet_unregister_vlan, sc, EVENTHANDLER_PRI_FIRST); - } - -#ifdef DEVICE_POLLING - ifp->if_capabilities |= IFCAP_POLLING; -#endif - error = virtio_setup_intr(dev, INTR_TYPE_NET); if (error) { device_printf(dev, "cannot setup virtqueue interrupts\n"); - ether_ifdetach(ifp); + /* BMV: This will crash if during boot! */ + ether_ifdetach(sc->vtnet_ifp); goto fail; } - /* - * Device defaults to promiscuous mode for backwards - * compatibility. Turn it off if possible. - */ - if (sc->vtnet_flags & VTNET_FLAG_CTRL_RX) { - VTNET_LOCK(sc); - if (vtnet_set_promisc(sc, 0) != 0) { - ifp->if_flags |= IFF_PROMISC; - device_printf(dev, - "cannot disable promiscuous mode\n"); - } - VTNET_UNLOCK(sc); - } else - ifp->if_flags |= IFF_PROMISC; + vtnet_start_taskqueues(sc); fail: if (error) @@ -461,24 +419,19 @@ vtnet_detach(device_t dev) sc = device_get_softc(dev); ifp = sc->vtnet_ifp; - KASSERT(mtx_initialized(VTNET_MTX(sc)), - ("vtnet mutex not initialized")); - -#ifdef DEVICE_POLLING - if (ifp != NULL && ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); -#endif - if (device_is_attached(dev)) { - VTNET_LOCK(sc); + VTNET_CORE_LOCK(sc); vtnet_stop(sc); - VTNET_UNLOCK(sc); + VTNET_CORE_UNLOCK(sc); callout_drain(&sc->vtnet_tick_ch); + vtnet_drain_taskqueues(sc); ether_ifdetach(ifp); } + vtnet_free_taskqueues(sc); + if (sc->vtnet_vlan_attach != NULL) { EVENTHANDLER_DEREGISTER(vlan_config, sc->vtnet_vlan_attach); sc->vtnet_vlan_attach = NULL; @@ -488,25 +441,20 @@ vtnet_detach(device_t dev) sc->vtnet_vlan_detach = NULL; } - if (sc->vtnet_mac_filter != NULL) { - free(sc->vtnet_mac_filter, M_DEVBUF); - sc->vtnet_mac_filter = NULL; - } + ifmedia_removeall(&sc->vtnet_media); if (ifp != NULL) { if_free(ifp); sc->vtnet_ifp = NULL; } - if (sc->vtnet_rx_vq != NULL) - vtnet_free_rx_mbufs(sc); - if (sc->vtnet_tx_vq != NULL) - vtnet_free_tx_mbufs(sc); + vtnet_free_rxtx_queues(sc); + vtnet_free_rx_filters(sc); + if (sc->vtnet_ctrl_vq != NULL) vtnet_free_ctrl_vq(sc); - ifmedia_removeall(&sc->vtnet_media); - VTNET_LOCK_DESTROY(sc); + VTNET_CORE_LOCK_DESTROY(sc); return (0); } @@ -518,10 +466,10 @@ vtnet_suspend(device_t dev) sc = device_get_softc(dev); - VTNET_LOCK(sc); + VTNET_CORE_LOCK(sc); vtnet_stop(sc); sc->vtnet_flags |= VTNET_FLAG_SUSPENDED; - VTNET_UNLOCK(sc); + VTNET_CORE_UNLOCK(sc); return (0); } @@ -535,11 +483,11 @@ vtnet_resume(device_t dev) sc = device_get_softc(dev); ifp = sc->vtnet_ifp; - VTNET_LOCK(sc); + VTNET_CORE_LOCK(sc); if (ifp->if_flags & IFF_UP) vtnet_init_locked(sc); sc->vtnet_flags &= ~VTNET_FLAG_SUSPENDED; - VTNET_UNLOCK(sc); + VTNET_CORE_UNLOCK(sc); return (0); } @@ -556,15 +504,26 @@ vtnet_shutdown(device_t dev) } static int +vtnet_attach_completed(device_t dev) +{ + + vtnet_attach_disable_promisc(device_get_softc(dev)); + + return (0); +} + +static int vtnet_config_change(device_t dev) { struct vtnet_softc *sc; sc = device_get_softc(dev); - VTNET_LOCK(sc); + VTNET_CORE_LOCK(sc); vtnet_update_link_status(sc); - VTNET_UNLOCK(sc); + if (sc->vtnet_link_active != 0) + vtnet_tx_start_all(sc); + VTNET_CORE_UNLOCK(sc); return (0); } @@ -578,188 +537,491 @@ vtnet_negotiate_features(struct vtnet_so dev = sc->vtnet_dev; mask = 0; - if (vtnet_csum_disable) - mask |= VIRTIO_NET_F_CSUM | VIRTIO_NET_F_GUEST_CSUM; - /* - * TSO and LRO are only available when their corresponding - * checksum offload feature is also negotiated. + * TSO and LRO are only available when their corresponding checksum + * offload feature is also negotiated. */ - - if (vtnet_csum_disable || vtnet_tso_disable) - mask |= VIRTIO_NET_F_HOST_TSO4 | VIRTIO_NET_F_HOST_TSO6 | - VIRTIO_NET_F_HOST_ECN; - - if (vtnet_csum_disable || vtnet_lro_disable) + if (vtnet_tunable_int(sc, "csum_disable", vtnet_csum_disable)) { + mask |= VIRTIO_NET_F_CSUM | VIRTIO_NET_F_GUEST_CSUM; + mask |= VTNET_TSO_FEATURES | VTNET_LRO_FEATURES; + } + if (vtnet_tunable_int(sc, "tso_disable", vtnet_tso_disable)) + mask |= VTNET_TSO_FEATURES; + if (vtnet_tunable_int(sc, "lro_disable", vtnet_lro_disable)) mask |= VTNET_LRO_FEATURES; + if (vtnet_tunable_int(sc, "mq_disable", vtnet_mq_disable)) + mask |= VIRTIO_NET_F_MQ; +#ifdef VTNET_LEGACY_TX + mask |= VIRTIO_NET_F_MQ; +#endif features = VTNET_FEATURES & ~mask; -#ifdef VTNET_TX_INTR_MODERATION - features |= VIRTIO_F_NOTIFY_ON_EMPTY; -#endif sc->vtnet_features = virtio_negotiate_features(dev, features); - if (virtio_with_feature(dev, VIRTIO_NET_F_MRG_RXBUF) == 0 && - virtio_with_feature(dev, VTNET_LRO_FEATURES)) { - /* - * LRO without mergeable buffers requires special care. This - * is not ideal because every receive buffer must be large - * enough to hold the maximum TCP packet, the Ethernet header, - * and the vtnet_rx_header. This requires up to 34 descriptors - * when using MCLBYTES clusters. If we do not have indirect - * descriptors, LRO is disabled since the virtqueue will not - * be able to contain very many receive buffers. - */ - if (virtio_with_feature(dev, - VIRTIO_RING_F_INDIRECT_DESC) == 0) { - device_printf(dev, - "LRO disabled due to lack of both mergeable " - "buffers and indirect descriptors\n"); + if (virtio_with_feature(dev, VTNET_LRO_FEATURES) == 0) + return; + if (virtio_with_feature(dev, VIRTIO_NET_F_MRG_RXBUF)) + return; - sc->vtnet_features = virtio_negotiate_features(dev, - features & ~VTNET_LRO_FEATURES); - } else - sc->vtnet_flags |= VTNET_FLAG_LRO_NOMRG; - } + /* + * LRO without mergeable buffers requires special care. This is not + * ideal because every receive buffer must be large enough to hold + * the maximum TCP packet, the Ethernet header, and the header. This + * requires up to 34 descriptors with MCLBYTES clusters. If we do + * not have indirect descriptors, LRO is disabled since the virtqueue + * will not contain very many receive buffers. + */ + if (virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC) == 0) { + device_printf(dev, + "LRO disabled due to both mergeable buffers and indirect " + "descriptors not negotiated\n"); + + features &= ~VTNET_LRO_FEATURES; + sc->vtnet_features = virtio_negotiate_features(dev, features); + } else + sc->vtnet_flags |= VTNET_FLAG_LRO_NOMRG; } -static int -vtnet_alloc_virtqueues(struct vtnet_softc *sc) +static void +vtnet_setup_features(struct vtnet_softc *sc) { device_t dev; - struct vq_alloc_info vq_info[3]; - int nvqs, rxsegs; + int max_pairs, max; dev = sc->vtnet_dev; - nvqs = 2; - /* - * Indirect descriptors are not needed for the Rx - * virtqueue when mergeable buffers are negotiated. - * The header is placed inline with the data, not - * in a separate descriptor, and mbuf clusters are - * always physically contiguous. - */ - if ((sc->vtnet_flags & VTNET_FLAG_MRG_RXBUFS) == 0) { - rxsegs = sc->vtnet_flags & VTNET_FLAG_LRO_NOMRG ? - VTNET_MAX_RX_SEGS : VTNET_MIN_RX_SEGS; + vtnet_negotiate_features(sc); + + if (virtio_with_feature(dev, VIRTIO_NET_F_MAC)) { + /* This feature should always be negotiated. */ + sc->vtnet_flags |= VTNET_FLAG_MAC; + } + + if (virtio_with_feature(dev, VIRTIO_NET_F_MRG_RXBUF)) { + sc->vtnet_flags |= VTNET_FLAG_MRG_RXBUFS; + sc->vtnet_hdr_size = sizeof(struct virtio_net_hdr_mrg_rxbuf); } else - rxsegs = 0; + sc->vtnet_hdr_size = sizeof(struct virtio_net_hdr); - VQ_ALLOC_INFO_INIT(&vq_info[0], rxsegs, - vtnet_rx_vq_intr, sc, &sc->vtnet_rx_vq, - "%s receive", device_get_nameunit(dev)); - - VQ_ALLOC_INFO_INIT(&vq_info[1], VTNET_MAX_TX_SEGS, - vtnet_tx_vq_intr, sc, &sc->vtnet_tx_vq, - "%s transmit", device_get_nameunit(dev)); + if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_VQ)) { + sc->vtnet_flags |= VTNET_FLAG_CTRL_VQ; - if (sc->vtnet_flags & VTNET_FLAG_CTRL_VQ) { - nvqs++; + if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_RX)) + sc->vtnet_flags |= VTNET_FLAG_CTRL_RX; + if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_VLAN)) + sc->vtnet_flags |= VTNET_FLAG_VLAN_FILTER; + if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_MAC_ADDR)) + sc->vtnet_flags |= VTNET_FLAG_CTRL_MAC; + } - VQ_ALLOC_INFO_INIT(&vq_info[2], 0, NULL, NULL, - &sc->vtnet_ctrl_vq, "%s control", - device_get_nameunit(dev)); + if (virtio_with_feature(dev, VIRTIO_NET_F_MQ) && + sc->vtnet_flags & VTNET_FLAG_CTRL_VQ) { + max_pairs = virtio_read_dev_config_2(dev, + offsetof(struct virtio_net_config, max_virtqueue_pairs)); + if (max_pairs < VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN || + max_pairs > VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX) + max_pairs = 1; + } else + max_pairs = 1; + + if (max_pairs > 1) { + /* + * Limit the maximum number of queue pairs to the number of + * CPUs or the configured maximum. The actual number of + * queues that get used may be less. + */ + max = vtnet_tunable_int(sc, "mq_max_pairs", vtnet_mq_max_pairs); + if (max > 0 && max_pairs > max) + max_pairs = max; + if (max_pairs > mp_ncpus) + max_pairs = mp_ncpus; + if (max_pairs > VTNET_MAX_QUEUE_PAIRS) + max_pairs = VTNET_MAX_QUEUE_PAIRS; + if (max_pairs > 1) + sc->vtnet_flags |= VTNET_FLAG_MULTIQ; } - return (virtio_alloc_virtqueues(dev, 0, nvqs, vq_info)); + sc->vtnet_max_vq_pairs = max_pairs; } -static void -vtnet_get_hwaddr(struct vtnet_softc *sc) +static int +vtnet_init_rxq(struct vtnet_softc *sc, int id) { - device_t dev; + struct vtnet_rxq *rxq; - dev = sc->vtnet_dev; + rxq = &sc->vtnet_rxqs[id]; - if (virtio_with_feature(dev, VIRTIO_NET_F_MAC)) { - virtio_read_device_config(dev, - offsetof(struct virtio_net_config, mac), - sc->vtnet_hwaddr, ETHER_ADDR_LEN); - } else { - /* Generate random locally administered unicast address. */ - sc->vtnet_hwaddr[0] = 0xB2; - arc4rand(&sc->vtnet_hwaddr[1], ETHER_ADDR_LEN - 1, 0); + snprintf(rxq->vtnrx_name, sizeof(rxq->vtnrx_name), "%s-rx%d", + device_get_nameunit(sc->vtnet_dev), id); + mtx_init(&rxq->vtnrx_mtx, rxq->vtnrx_name, NULL, MTX_DEF); - vtnet_set_hwaddr(sc); - } + rxq->vtnrx_sc = sc; + rxq->vtnrx_id = id; + + TASK_INIT(&rxq->vtnrx_intrtask, 0, vtnet_rxq_tq_intr, rxq); + rxq->vtnrx_tq = taskqueue_create(rxq->vtnrx_name, M_NOWAIT, + taskqueue_thread_enqueue, &rxq->vtnrx_tq); + + return (rxq->vtnrx_tq == NULL ? ENOMEM : 0); } -static void -vtnet_set_hwaddr(struct vtnet_softc *sc) +static int +vtnet_init_txq(struct vtnet_softc *sc, int id) { - device_t dev; + struct vtnet_txq *txq; - dev = sc->vtnet_dev; + txq = &sc->vtnet_txqs[id]; - virtio_write_device_config(dev, - offsetof(struct virtio_net_config, mac), - sc->vtnet_hwaddr, ETHER_ADDR_LEN); + snprintf(txq->vtntx_name, sizeof(txq->vtntx_name), "%s-tx%d", + device_get_nameunit(sc->vtnet_dev), id); + mtx_init(&txq->vtntx_mtx, txq->vtntx_name, NULL, MTX_DEF); + + txq->vtntx_sc = sc; + txq->vtntx_id = id; + +#ifndef VTNET_LEGACY_TX + txq->vtntx_br = buf_ring_alloc(VTNET_DEFAULT_BUFRING_SIZE, M_DEVBUF, + M_NOWAIT, &txq->vtntx_mtx); + if (txq->vtntx_br == NULL) + return (ENOMEM); + + TASK_INIT(&txq->vtntx_defrtask, 0, vtnet_txq_tq_deferred, txq); +#endif + TASK_INIT(&txq->vtntx_intrtask, 0, vtnet_txq_tq_intr, txq); + txq->vtntx_tq = taskqueue_create(txq->vtntx_name, M_NOWAIT, + taskqueue_thread_enqueue, &txq->vtntx_tq); + if (txq->vtntx_tq == NULL) + return (ENOMEM); + + return (0); } static int -vtnet_is_link_up(struct vtnet_softc *sc) +vtnet_alloc_rxtx_queues(struct vtnet_softc *sc) { - device_t dev; - struct ifnet *ifp; - uint16_t status; + int i, npairs, error; - dev = sc->vtnet_dev; - ifp = sc->vtnet_ifp; + npairs = sc->vtnet_max_vq_pairs; - VTNET_LOCK_ASSERT(sc); + sc->vtnet_rxqs = malloc(sizeof(struct vtnet_rxq) * npairs, M_DEVBUF, + M_NOWAIT | M_ZERO); + sc->vtnet_txqs = malloc(sizeof(struct vtnet_txq) * npairs, M_DEVBUF, + M_NOWAIT | M_ZERO); + if (sc->vtnet_rxqs == NULL || sc->vtnet_txqs == NULL) + return (ENOMEM); - if ((ifp->if_capenable & IFCAP_LINKSTATE) == 0) - return (1); + for (i = 0; i < npairs; i++) { + error = vtnet_init_rxq(sc, i); + if (error) + return (error); + error = vtnet_init_txq(sc, i); + if (error) + return (error); + } - status = virtio_read_dev_config_2(dev, - offsetof(struct virtio_net_config, status)); + vtnet_setup_queue_sysctl(sc); - return ((status & VIRTIO_NET_S_LINK_UP) != 0); + return (0); } static void -vtnet_update_link_status(struct vtnet_softc *sc) +vtnet_destroy_rxq(struct vtnet_rxq *rxq) { - struct ifnet *ifp; - int link; - - ifp = sc->vtnet_ifp; - link = vtnet_is_link_up(sc); + rxq->vtnrx_sc = NULL; + rxq->vtnrx_id = -1; - if (link && ((sc->vtnet_flags & VTNET_FLAG_LINK) == 0)) { - sc->vtnet_flags |= VTNET_FLAG_LINK; - if_link_state_change(ifp, LINK_STATE_UP); - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - vtnet_start_locked(ifp); - } else if (!link && (sc->vtnet_flags & VTNET_FLAG_LINK)) { - sc->vtnet_flags &= ~VTNET_FLAG_LINK; - if_link_state_change(ifp, LINK_STATE_DOWN); - } + if (mtx_initialized(&rxq->vtnrx_mtx) != 0) + mtx_destroy(&rxq->vtnrx_mtx); } static void -vtnet_watchdog(struct vtnet_softc *sc) +vtnet_destroy_txq(struct vtnet_txq *txq) { - struct ifnet *ifp; - ifp = sc->vtnet_ifp; + txq->vtntx_sc = NULL; + txq->vtntx_id = -1; -#ifdef VTNET_TX_INTR_MODERATION - vtnet_txeof(sc); +#ifndef VTNET_LEGACY_TX + if (txq->vtntx_br != NULL) { + buf_ring_free(txq->vtntx_br, M_DEVBUF); + txq->vtntx_br = NULL; + } #endif - if (sc->vtnet_watchdog_timer == 0 || --sc->vtnet_watchdog_timer) - return; + if (mtx_initialized(&txq->vtntx_mtx) != 0) + mtx_destroy(&txq->vtntx_mtx); +} + +static void +vtnet_free_rxtx_queues(struct vtnet_softc *sc) +{ + int i; + + if (sc->vtnet_rxqs != NULL) { + for (i = 0; i < sc->vtnet_max_vq_pairs; i++) + vtnet_destroy_rxq(&sc->vtnet_rxqs[i]); + free(sc->vtnet_rxqs, M_DEVBUF); + sc->vtnet_rxqs = NULL; + } + + if (sc->vtnet_txqs != NULL) { + for (i = 0; i < sc->vtnet_max_vq_pairs; i++) + vtnet_destroy_txq(&sc->vtnet_txqs[i]); + free(sc->vtnet_txqs, M_DEVBUF); + sc->vtnet_txqs = NULL; + } +} + +static int +vtnet_alloc_rx_filters(struct vtnet_softc *sc) +{ + + if (sc->vtnet_flags & VTNET_FLAG_CTRL_RX) { + sc->vtnet_mac_filter = malloc(sizeof(struct vtnet_mac_filter), + M_DEVBUF, M_NOWAIT | M_ZERO); + if (sc->vtnet_mac_filter == NULL) + return (ENOMEM); + } + + if (sc->vtnet_flags & VTNET_FLAG_VLAN_FILTER) { + sc->vtnet_vlan_filter = malloc(sizeof(uint32_t) * + VTNET_VLAN_FILTER_NWORDS, M_DEVBUF, M_NOWAIT | M_ZERO); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 10:11:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7CB42B5C; Sun, 1 Sep 2013 10:11:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6AA47240A; Sun, 1 Sep 2013 10:11:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81AB1CT000781; Sun, 1 Sep 2013 10:11:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81AB1Uc000780; Sun, 1 Sep 2013 10:11:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201309011011.r81AB1Uc000780@svn.freebsd.org> From: Alexander Motin Date: Sun, 1 Sep 2013 10:11:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255117 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 10:11:01 -0000 Author: mav Date: Sun Sep 1 10:11:00 2013 New Revision: 255117 URL: http://svnweb.freebsd.org/changeset/base/255117 Log: Fix the build with CTLFEDEBUG, broken by unmapped I/O support changes. Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Sun Sep 1 09:10:15 2013 (r255116) +++ head/sys/cam/ctl/scsi_ctl.c Sun Sep 1 10:11:00 2013 (r255117) @@ -961,23 +961,23 @@ ctlfestart(struct cam_periph *periph, un /* * Valid combinations: - * - CAM_SEND_STATUS, SCATTER_VALID = 0, dxfer_len = 0, + * - CAM_SEND_STATUS, CAM_DATA_SG = 0, dxfer_len = 0, * sglist_cnt = 0 - * - CAM_SEND_STATUS = 0, SCATTER_VALID = 0, dxfer_len != 0, + * - CAM_SEND_STATUS = 0, CAM_DATA_SG = 0, dxfer_len != 0, * sglist_cnt = 0 - * - CAM_SEND_STATUS = 0, SCATTER_VALID, dxfer_len != 0, + * - CAM_SEND_STATUS = 0, CAM_DATA_SG, dxfer_len != 0, * sglist_cnt != 0 */ #ifdef CTLFEDEBUG if (((flags & CAM_SEND_STATUS) - && (((flags & CAM_SCATTER_VALID) != 0) + && (((flags & CAM_DATA_SG) != 0) || (dxfer_len != 0) || (csio->sglist_cnt != 0))) || (((flags & CAM_SEND_STATUS) == 0) && (dxfer_len == 0)) - || ((flags & CAM_SCATTER_VALID) + || ((flags & CAM_DATA_SG) && (csio->sglist_cnt == 0)) - || (((flags & CAM_SCATTER_VALID) == 0) + || (((flags & CAM_DATA_SG) == 0) && (csio->sglist_cnt != 0))) { printf("%s: tag %04x cdb %02x flags %#x dxfer_len " "%d sg %u\n", __func__, atio->tag_id, From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 11:50:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9C148874; Sun, 1 Sep 2013 11:50:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8997227A3; Sun, 1 Sep 2013 11:50:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81BobKe056637; Sun, 1 Sep 2013 11:50:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81Bob9H056636; Sun, 1 Sep 2013 11:50:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201309011150.r81Bob9H056636@svn.freebsd.org> From: Alexander Motin Date: Sun, 1 Sep 2013 11:50:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255118 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 11:50:37 -0000 Author: mav Date: Sun Sep 1 11:50:37 2013 New Revision: 255118 URL: http://svnweb.freebsd.org/changeset/base/255118 Log: Fix targbh crash on XPT_IMMED_NOTIFY error during attach. Modified: head/sys/cam/scsi/scsi_targ_bh.c Modified: head/sys/cam/scsi/scsi_targ_bh.c ============================================================================== --- head/sys/cam/scsi/scsi_targ_bh.c Sun Sep 1 10:11:00 2013 (r255117) +++ head/sys/cam/scsi/scsi_targ_bh.c Sun Sep 1 11:50:37 2013 (r255118) @@ -283,16 +283,13 @@ targbhenlun(struct cam_periph *periph) xpt_setup_ccb(&atio->ccb_h, periph->path, CAM_PRIORITY_NORMAL); atio->ccb_h.func_code = XPT_ACCEPT_TARGET_IO; atio->ccb_h.cbfcnp = targbhdone; - xpt_action((union ccb *)atio); - status = atio->ccb_h.status; - if (status != CAM_REQ_INPROG) { - targbhfreedescr(atio->ccb_h.ccb_descr); - free(atio, M_SCSIBH); - break; - } ((struct targbh_cmd_desc*)atio->ccb_h.ccb_descr)->atio_link = softc->accept_tio_list; softc->accept_tio_list = atio; + xpt_action((union ccb *)atio); + status = atio->ccb_h.status; + if (status != CAM_REQ_INPROG) + break; } if (i == 0) { @@ -321,14 +318,12 @@ targbhenlun(struct cam_periph *periph) xpt_setup_ccb(&inot->ccb_h, periph->path, CAM_PRIORITY_NORMAL); inot->ccb_h.func_code = XPT_IMMED_NOTIFY; inot->ccb_h.cbfcnp = targbhdone; + SLIST_INSERT_HEAD(&softc->immed_notify_slist, &inot->ccb_h, + periph_links.sle); xpt_action((union ccb *)inot); status = inot->ccb_h.status; - if (status != CAM_REQ_INPROG) { - free(inot, M_SCSIBH); + if (status != CAM_REQ_INPROG) break; - } - SLIST_INSERT_HEAD(&softc->immed_notify_slist, &inot->ccb_h, - periph_links.sle); } if (i == 0) { @@ -413,7 +408,9 @@ targbhctor(struct cam_periph *periph, vo periph->softc = softc; softc->init_level++; - return (targbhenlun(periph)); + if (targbhenlun(periph) != CAM_REQ_CMP) + cam_periph_invalidate(periph); + return (CAM_REQ_CMP); } static void From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 12:18:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8C656DAC; Sun, 1 Sep 2013 12:18:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7897228C9; Sun, 1 Sep 2013 12:18:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81CIjwE074800; Sun, 1 Sep 2013 12:18:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81CIjpC074799; Sun, 1 Sep 2013 12:18:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201309011218.r81CIjpC074799@svn.freebsd.org> From: Alexander Motin Date: Sun, 1 Sep 2013 12:18:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255119 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 12:18:45 -0000 Author: mav Date: Sun Sep 1 12:18:44 2013 New Revision: 255119 URL: http://svnweb.freebsd.org/changeset/base/255119 Log: Fix SES_ENABLE_PASSTHROUGH kernel option, unexpectedly broken during driver overhaul. MFC after: 3 days Modified: head/sys/cam/scsi/scsi_enc.c Modified: head/sys/cam/scsi/scsi_enc.c ============================================================================== --- head/sys/cam/scsi/scsi_enc.c Sun Sep 1 11:50:37 2013 (r255118) +++ head/sys/cam/scsi/scsi_enc.c Sun Sep 1 12:18:44 2013 (r255119) @@ -56,6 +56,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + MALLOC_DEFINE(M_SCSIENC, "SCSI ENC", "SCSI ENC buffers"); /* Enclosure type independent driver */ @@ -719,12 +721,12 @@ enc_type(struct ccb_getdev *cgd) return (ENC_NONE); } -#ifdef ENC_ENABLE_PASSTHROUGH +#ifdef SES_ENABLE_PASSTHROUGH if ((iqd[6] & 0x40) && (iqd[2] & 0x7) >= 2) { /* * PassThrough Device. */ - return (ENC_ENC_PASSTHROUGH); + return (ENC_SES_PASSTHROUGH); } #endif From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 13:02:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EE409694; Sun, 1 Sep 2013 13:02:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D9A692A6A; Sun, 1 Sep 2013 13:02:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81D20mJ001398; Sun, 1 Sep 2013 13:02:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81D20sA001391; Sun, 1 Sep 2013 13:02:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201309011302.r81D20sA001391@svn.freebsd.org> From: Alexander Motin Date: Sun, 1 Sep 2013 13:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255120 - in head: share/examples/scsi_target sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 13:02:01 -0000 Author: mav Date: Sun Sep 1 13:01:59 2013 New Revision: 255120 URL: http://svnweb.freebsd.org/changeset/base/255120 Log: Bring legacy CAM target implementation back into API/KPI-coherent and even functional state. While CTL is much more superior target from all points, there is no reason why this code should not work. Tested with ahc(4) as target side HBA. MFC after: 2 weeks Modified: head/share/examples/scsi_target/scsi_target.c head/sys/cam/scsi/scsi_targ_bh.c head/sys/cam/scsi/scsi_target.c Modified: head/share/examples/scsi_target/scsi_target.c ============================================================================== --- head/share/examples/scsi_target/scsi_target.c Sun Sep 1 12:18:44 2013 (r255119) +++ head/share/examples/scsi_target/scsi_target.c Sun Sep 1 13:01:59 2013 (r255120) @@ -365,7 +365,7 @@ init_ccbs() for (i = 0; i < MAX_INITIATORS; i++) { struct ccb_accept_tio *atio; struct atio_descr *a_descr; - struct ccb_immed_notify *inot; + struct ccb_immediate_notify *inot; atio = (struct ccb_accept_tio *)malloc(sizeof(*atio)); if (atio == NULL) { @@ -382,7 +382,7 @@ init_ccbs() atio->ccb_h.targ_descr = a_descr; send_ccb((union ccb *)atio, /*priority*/1); - inot = (struct ccb_immed_notify *)malloc(sizeof(*inot)); + inot = (struct ccb_immediate_notify *)malloc(sizeof(*inot)); if (inot == NULL) { warn("malloc INOT"); return (-1); @@ -593,7 +593,7 @@ handle_read() oo += run_queue(c_descr->atio); break; } - case XPT_IMMED_NOTIFY: + case XPT_IMMEDIATE_NOTIFY: /* INOTs are handled with priority */ TAILQ_INSERT_HEAD(&work_queue, &ccb->ccb_h, periph_links.tqe); @@ -903,7 +903,7 @@ free_ccb(union ccb *ccb) case XPT_ACCEPT_TARGET_IO: free(ccb->ccb_h.targ_descr); /* FALLTHROUGH */ - case XPT_IMMED_NOTIFY: + case XPT_IMMEDIATE_NOTIFY: default: free(ccb); break; Modified: head/sys/cam/scsi/scsi_targ_bh.c ============================================================================== --- head/sys/cam/scsi/scsi_targ_bh.c Sun Sep 1 12:18:44 2013 (r255119) +++ head/sys/cam/scsi/scsi_targ_bh.c Sun Sep 1 13:01:59 2013 (r255120) @@ -305,10 +305,10 @@ targbhenlun(struct cam_periph *periph) * so the SIM can tell us of asynchronous target mode events. */ for (i = 0; i < MAX_ACCEPT; i++) { - struct ccb_immed_notify *inot; + struct ccb_immediate_notify *inot; - inot = (struct ccb_immed_notify*)malloc(sizeof(*inot), M_SCSIBH, - M_NOWAIT); + inot = (struct ccb_immediate_notify*)malloc(sizeof(*inot), + M_SCSIBH, M_NOWAIT); if (inot == NULL) { status = CAM_RESRC_UNAVAIL; @@ -316,7 +316,7 @@ targbhenlun(struct cam_periph *periph) } xpt_setup_ccb(&inot->ccb_h, periph->path, CAM_PRIORITY_NORMAL); - inot->ccb_h.func_code = XPT_IMMED_NOTIFY; + inot->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY; inot->ccb_h.cbfcnp = targbhdone; SLIST_INSERT_HEAD(&softc->immed_notify_slist, &inot->ccb_h, periph_links.sle); @@ -712,7 +712,7 @@ targbhdone(struct cam_periph *periph, un } break; } - case XPT_IMMED_NOTIFY: + case XPT_IMMEDIATE_NOTIFY: { int frozen; Modified: head/sys/cam/scsi/scsi_target.c ============================================================================== --- head/sys/cam/scsi/scsi_target.c Sun Sep 1 12:18:44 2013 (r255119) +++ head/sys/cam/scsi/scsi_target.c Sun Sep 1 13:01:59 2013 (r255120) @@ -551,6 +551,7 @@ targwrite(struct cdev *dev, struct uio * switch (func_code) { case XPT_ACCEPT_TARGET_IO: case XPT_IMMED_NOTIFY: + case XPT_IMMEDIATE_NOTIFY: cam_periph_lock(softc->periph); ccb = targgetccb(softc, func_code, priority); descr = (struct targ_cmd_descr *)ccb->ccb_h.targ_descr; @@ -781,6 +782,7 @@ targdone(struct cam_periph *periph, unio switch (done_ccb->ccb_h.func_code) { /* All FC_*_QUEUED CCBs go back to userland */ case XPT_IMMED_NOTIFY: + case XPT_IMMEDIATE_NOTIFY: case XPT_ACCEPT_TARGET_IO: case XPT_CONT_TARGET_IO: TAILQ_INSERT_TAIL(&softc->user_ccb_queue, &done_ccb->ccb_h, @@ -961,6 +963,7 @@ targfreeccb(struct targ_softc *softc, un switch (ccb->ccb_h.func_code) { case XPT_ACCEPT_TARGET_IO: case XPT_IMMED_NOTIFY: + case XPT_IMMEDIATE_NOTIFY: CAM_DEBUG_PRINT(CAM_DEBUG_PERIPH, ("freeing ccb %p\n", ccb)); free(ccb, M_TARG); break; @@ -1131,6 +1134,9 @@ targccblen(xpt_opcode func_code) case XPT_IMMED_NOTIFY: len = sizeof(struct ccb_immed_notify); break; + case XPT_IMMEDIATE_NOTIFY: + len = sizeof(struct ccb_immediate_notify); + break; case XPT_REL_SIMQ: len = sizeof(struct ccb_relsim); break; From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 14:06:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9B5886D4; Sun, 1 Sep 2013 14:06:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8881B2D49; Sun, 1 Sep 2013 14:06:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81E6vXJ038322; Sun, 1 Sep 2013 14:06:57 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81E6vfn038321; Sun, 1 Sep 2013 14:06:57 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201309011406.r81E6vfn038321@svn.freebsd.org> From: Ian Lepore Date: Sun, 1 Sep 2013 14:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255122 - head/tools/tools/bus_autoconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 14:06:57 -0000 Author: ian Date: Sun Sep 1 14:06:57 2013 New Revision: 255122 URL: http://svnweb.freebsd.org/changeset/base/255122 Log: Fix a compiler warning about signed vs unsigned compare. Modified: head/tools/tools/bus_autoconf/bus_load_file.c Modified: head/tools/tools/bus_autoconf/bus_load_file.c ============================================================================== --- head/tools/tools/bus_autoconf/bus_load_file.c Sun Sep 1 13:33:05 2013 (r255121) +++ head/tools/tools/bus_autoconf/bus_load_file.c Sun Sep 1 14:06:57 2013 (r255122) @@ -39,7 +39,7 @@ void load_file(const char *fname, uint8_t **pptr, uint32_t *plen) { uint8_t *ptr; - uint32_t len; + ssize_t len; off_t off; int f; From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 14:15:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2096A8AD; Sun, 1 Sep 2013 14:15:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0D66B2DBD; Sun, 1 Sep 2013 14:15:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81EFVHl043930; Sun, 1 Sep 2013 14:15:31 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81EFViQ043928; Sun, 1 Sep 2013 14:15:31 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201309011415.r81EFViQ043928@svn.freebsd.org> From: Ian Lepore Date: Sun, 1 Sep 2013 14:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255123 - in head/sys/dev/usb: . serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 14:15:32 -0000 Author: ian Date: Sun Sep 1 14:15:31 2013 New Revision: 255123 URL: http://svnweb.freebsd.org/changeset/base/255123 Log: Add the device ID for a new flavor of FTDI serial adapter (model 232EX). Modified: head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Sun Sep 1 14:06:57 2013 (r255122) +++ head/sys/dev/usb/serial/uftdi.c Sun Sep 1 14:15:31 2013 (r255123) @@ -243,6 +243,7 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(FALCOM, TWIST, UFTDI_TYPE_8U232AM), UFTDI_DEV(FIC, NEO1973_DEBUG, UFTDI_TYPE_AUTO | UFTDI_FLAG_JTAG), UFTDI_DEV(FIC, NEO1973_DEBUG, UFTDI_TYPE_AUTO | UFTDI_FLAG_JTAG), + UFTDI_DEV(FTDI, 232EX, UFTDI_TYPE_AUTO), UFTDI_DEV(FTDI, 232H, UFTDI_TYPE_AUTO), UFTDI_DEV(FTDI, 232RL, UFTDI_TYPE_AUTO), UFTDI_DEV(FTDI, 4N_GALAXY_DE_1, UFTDI_TYPE_AUTO), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Sep 1 14:06:57 2013 (r255122) +++ head/sys/dev/usb/usbdevs Sun Sep 1 14:15:31 2013 (r255123) @@ -1776,6 +1776,7 @@ product FTDI SERIAL_8U232AM4 0x6004 8U23 product FTDI SERIAL_232RL 0x6006 FT232RL Serial product FTDI SERIAL_2232C 0x6010 FT2232C Dual port Serial product FTDI 232H 0x6014 FTDI compatible adapter +product FTDI 232EX 0x6015 FTDI compatible adapter product FTDI SERIAL_2232D 0x9e90 FT2232D Dual port Serial product FTDI SERIAL_4232H 0x6011 FT4232H Quad port Serial product FTDI BEAGLEBONE 0xa6d0 BeagleBone From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 14:28:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B61CED65; Sun, 1 Sep 2013 14:28:12 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 941D22EA5; Sun, 1 Sep 2013 14:28:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81ESCZU050563; Sun, 1 Sep 2013 14:28:12 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81ESC2Y050562; Sun, 1 Sep 2013 14:28:12 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201309011428.r81ESC2Y050562@svn.freebsd.org> From: Ian Lepore Date: Sun, 1 Sep 2013 14:28:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255124 - head/etc/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 14:28:12 -0000 Author: ian Date: Sun Sep 1 14:28:12 2013 New Revision: 255124 URL: http://svnweb.freebsd.org/changeset/base/255124 Log: Regenerate after recent addition of FTDI and bluetooth device IDs. Modified: head/etc/devd/usb.conf Modified: head/etc/devd/usb.conf ============================================================================== --- head/etc/devd/usb.conf Sun Sep 1 14:15:31 2013 (r255123) +++ head/etc/devd/usb.conf Sun Sep 1 14:28:12 2013 (r255124) @@ -129,7 +129,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0403"; - match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee8|0xeee 9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; + match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee 8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; action "kldload -n uftdi"; }; @@ -296,6 +296,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x044e"; + match "product" "(0x3001|0x3002)"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0456"; match "product" "(0xf000|0xf001)"; action "kldload -n uftdi"; @@ -385,7 +393,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0489"; - match "product" "(0xe027|0xe02c|0xe036|0xe03c|0xe03d|0xe04e|0xe056|0xe057)"; + match "product" "(0xe027|0xe02c|0xe036|0xe03c|0xe03d|0xe042|0xe04e|0xe056|0xe057)"; action "kldload -n ng_ubt"; }; @@ -520,6 +528,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x04bf"; + match "product" "0x030a"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x04c5"; match "product" "(0x1058|0x1079)"; action "kldload -n uipaq"; @@ -529,7 +545,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x04ca"; - match "product" "(0x3005|0x3006|0x3008)"; + match "product" "(0x2003|0x3005|0x3006|0x3008)"; action "kldload -n ng_ubt"; }; @@ -1080,6 +1096,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x05ac"; + match "product" "(0x8213|0x8215|0x8218|0x821a|0x821b|0x821f|0x8281|0x828f)"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x05ad"; match "product" "0x0fba"; action "kldload -n uplcom"; @@ -2048,6 +2072,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0a5c"; + match "product" "0x21e1"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0acd"; match "product" "0x0300"; action "kldload -n uftdi"; @@ -2257,6 +2289,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0b05"; + match "product" "0x17b5"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; match "product" "(0x4200|0x4201|0x4202|0x420f|0x9200|0x9202)"; action "kldload -n uipaq"; }; @@ -2448,6 +2488,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0bdb"; + match "product" "0x1002"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0bed"; match "product" "(0x1100|0x1101)"; action "kldload -n uslcom"; @@ -2472,6 +2520,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0c10"; + match "product" "0x0000"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0c26"; match "product" "(0x0004|0x0009|0x000a|0x000b|0x000c|0x000d|0x0010|0x0011|0x0012|0x0013|0x0018)"; action "kldload -n uftdi"; @@ -2888,6 +2944,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0e8d"; + match "product" "0x763f"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0ea0"; match "product" "0x6858"; action "kldload -n uplcom"; @@ -4777,6 +4841,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x413c"; + match "product" "0x8197"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x413c"; match "product" "0x9500"; action "kldload -n uslcom"; }; @@ -5008,6 +5080,26 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0489"; + match "intclass" "0xff"; + match "intsubclass" "0x01"; + match "intprotocol" "0x01"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x05ac"; + match "intclass" "0xff"; + match "intsubclass" "0x01"; + match "intprotocol" "0x01"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x05ac"; match "intclass" "0xff"; match "intsubclass" "0xfd"; @@ -5168,5 +5260,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2515 USB entries processed +# 2537 USB entries processed From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 14:41:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5C197233; Sun, 1 Sep 2013 14:41:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 178092FDD; Sun, 1 Sep 2013 14:41:25 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::8586:302a:e3e8:3a34] (unknown [IPv6:2001:7b8:3a7:0:8586:302a:e3e8:3a34]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 764815C44; Sun, 1 Sep 2013 16:41:22 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_DC5DA71F-0540-4A2F-B7C2-CFE6096797B2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r255109 - head/sys/dev/virtio From: Dimitry Andric In-Reply-To: <201309010416.r814Ghqh095053@svn.freebsd.org> Date: Sun, 1 Sep 2013 16:41:08 +0200 Message-Id: <3395F274-DA3F-41DA-A4C2-8A6C181D890D@FreeBSD.org> References: <201309010416.r814Ghqh095053@svn.freebsd.org> To: Bryan Venteicher X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 14:41:26 -0000 --Apple-Mail=_DC5DA71F-0540-4A2F-B7C2-CFE6096797B2 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Sep 1, 2013, at 06:16, Bryan Venteicher wrote: > Author: bryanv > Date: Sun Sep 1 04:16:43 2013 > New Revision: 255109 > URL: http://svnweb.freebsd.org/changeset/base/255109 > > Log: > Add support for postponing VirtIO virtqueue interrupts > > Partial support for the EVENT_IDX feature was added a while ago, > but this commit adds an interface for the device driver to hint > how long (in terms of descriptors) the next interrupt should be > delayed. > > The first user of this will be used to reduce VirtIO net's Tx > completion interrupts. ... > int > -virtqueue_postpone_intr(struct virtqueue *vq) > +virtqueue_postpone_intr(struct virtqueue *vq, vq_postpone_t hint) > { > uint16_t ndesc, avail_idx; > > - /* > - * Request the next interrupt be postponed until at least half > - * of the available descriptors have been consumed. > - */ > avail_idx = vq->vq_ring.avail->idx; > - ndesc = (uint16_t)(avail_idx - vq->vq_used_cons_idx) / 2; > + ndesc = (uint16_t)(avail_idx - vq->vq_used_cons_idx); > + > + switch (hint) { > + case VQ_POSTPONE_SHORT: > + ndesc /= 4; > + break; > + case VQ_POSTPONE_LONG: > + ndesc *= 3 / 4; > + break; The compiler will fold the "3 / 4" expression to zero, so ndesc will always end up as zero because of this. I assume that what you want is this instead: ndesc = (ndesc * 3) / 4; or if you want rounding: ndesc = (ndesc * 3 + 2) / 4; -Dimitry --Apple-Mail=_DC5DA71F-0540-4A2F-B7C2-CFE6096797B2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) iEYEARECAAYFAlIjUg8ACgkQsF6jCi4glqN38gCdF0IJWMfB0oXgkA8opTaX5LWP pmYAoMCWnSEPY6rn9sp6FS+9mR1pksum =r4WU -----END PGP SIGNATURE----- --Apple-Mail=_DC5DA71F-0540-4A2F-B7C2-CFE6096797B2-- From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 17:06:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0548FCD4; Sun, 1 Sep 2013 17:06:15 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E6DD52866; Sun, 1 Sep 2013 17:06:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81H6EYM044407; Sun, 1 Sep 2013 17:06:14 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81H6Ed9044406; Sun, 1 Sep 2013 17:06:14 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201309011706.r81H6Ed9044406@svn.freebsd.org> From: Alan Cox Date: Sun, 1 Sep 2013 17:06:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255125 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 17:06:15 -0000 Author: alc Date: Sun Sep 1 17:06:14 2013 New Revision: 255125 URL: http://svnweb.freebsd.org/changeset/base/255125 Log: pmap_protect() on MIPS does not need to acquire the pvh global lock. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sun Sep 1 14:28:12 2013 (r255124) +++ head/sys/mips/mips/pmap.c Sun Sep 1 17:06:14 2013 (r255125) @@ -1914,7 +1914,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sv if (prot & VM_PROT_WRITE) return; - rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); for (; sva < eva; sva = va_next) { pdpe = pmap_segmap(pmap, sva); @@ -1980,7 +1979,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sv if (va != va_next) pmap_invalidate_range(pmap, va, sva); } - rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 17:37:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2B2B7B69; Sun, 1 Sep 2013 17:37:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 08D252A7F; Sun, 1 Sep 2013 17:37:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81HbKTm062792; Sun, 1 Sep 2013 17:37:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81HbKLT062785; Sun, 1 Sep 2013 17:37:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201309011737.r81HbKLT062785@svn.freebsd.org> From: Alexander Motin Date: Sun, 1 Sep 2013 17:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255126 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 17:37:21 -0000 Author: mav Date: Sun Sep 1 17:37:19 2013 New Revision: 255126 URL: http://svnweb.freebsd.org/changeset/base/255126 Log: Add debug trace points for freeze/release device queue. Modified: head/sys/cam/cam_debug.h head/sys/cam/cam_periph.c head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt.h Modified: head/sys/cam/cam_debug.h ============================================================================== --- head/sys/cam/cam_debug.h Sun Sep 1 17:06:14 2013 (r255125) +++ head/sys/cam/cam_debug.h Sun Sep 1 17:37:19 2013 (r255126) @@ -99,6 +99,17 @@ extern u_int32_t cam_debug_delay; DELAY(cam_debug_delay); \ } +#define CAM_DEBUG_DEV(dev, flag, printfargs) \ + if (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags) \ + && (cam_dpath != NULL) \ + && (xpt_path_comp_dev(cam_dpath, dev) >= 0) \ + && (xpt_path_comp_dev(cam_dpath, dev) < 2)) { \ + xpt_print_device(dev); \ + printf printfargs; \ + if (cam_debug_delay != 0) \ + DELAY(cam_debug_delay); \ + } + #define CAM_DEBUG_PRINT(flag, printfargs) \ if (((flag) & (CAM_DEBUG_COMPILE) & cam_dflags)) { \ printf("cam_debug: "); \ Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Sun Sep 1 17:06:14 2013 (r255125) +++ head/sys/cam/cam_periph.c Sun Sep 1 17:37:19 2013 (r255126) @@ -1115,6 +1115,7 @@ cam_freeze_devq(struct cam_path *path) { struct ccb_hdr ccb_h; + CAM_DEBUG(path, CAM_DEBUG_TRACE, ("cam_freeze_devq\n")); xpt_setup_ccb(&ccb_h, path, /*priority*/1); ccb_h.func_code = XPT_NOOP; ccb_h.flags = CAM_DEV_QFREEZE; @@ -1128,6 +1129,8 @@ cam_release_devq(struct cam_path *path, { struct ccb_relsim crs; + CAM_DEBUG(path, CAM_DEBUG_TRACE, ("cam_release_devq(%u, %u, %u, %d)\n", + relsim_flags, openings, arg, getcount_only)); xpt_setup_ccb(&crs.ccb_h, path, CAM_PRIORITY_NORMAL); crs.ccb_h.func_code = XPT_REL_SIMQ; crs.ccb_h.flags = getcount_only ? CAM_DEV_QFREEZE : 0; Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sun Sep 1 17:06:14 2013 (r255125) +++ head/sys/cam/cam_xpt.c Sun Sep 1 17:37:19 2013 (r255126) @@ -3561,6 +3561,40 @@ xpt_path_comp(struct cam_path *path1, st return (retval); } +int +xpt_path_comp_dev(struct cam_path *path, struct cam_ed *dev) +{ + int retval = 0; + + if (path->bus != dev->target->bus) { + if (path->bus->path_id == CAM_BUS_WILDCARD) + retval = 1; + else if (dev->target->bus->path_id == CAM_BUS_WILDCARD) + retval = 2; + else + return (-1); + } + if (path->target != dev->target) { + if (path->target->target_id == CAM_TARGET_WILDCARD) { + if (retval == 0) + retval = 1; + } else if (dev->target->target_id == CAM_TARGET_WILDCARD) + retval = 2; + else + return (-1); + } + if (path->device != dev) { + if (path->device->lun_id == CAM_LUN_WILDCARD) { + if (retval == 0) + retval = 1; + } else if (dev->lun_id == CAM_LUN_WILDCARD) + retval = 2; + else + return (-1); + } + return (retval); +} + void xpt_print_path(struct cam_path *path) { @@ -3594,6 +3628,21 @@ xpt_print_path(struct cam_path *path) } void +xpt_print_device(struct cam_ed *device) +{ + + if (device == NULL) + printf("(nopath): "); + else { + printf("(noperiph:%s%d:%d:%d:%d): ", device->sim->sim_name, + device->sim->unit_number, + device->sim->bus_id, + device->target->target_id, + device->lun_id); + } +} + +void xpt_print(struct cam_path *path, const char *fmt, ...) { va_list ap; @@ -4114,6 +4163,8 @@ xpt_freeze_devq(struct cam_path *path, u struct cam_ed *dev = path->device; mtx_assert(path->bus->sim->mtx, MA_OWNED); + CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_freeze_devq() %u->%u\n", + dev->ccbq.queue.qfrozen_cnt, dev->ccbq.queue.qfrozen_cnt + count)); dev->ccbq.queue.qfrozen_cnt += count; /* Remove frozen device from sendq. */ if (device_is_queued(dev)) { @@ -4138,6 +4189,7 @@ xpt_release_devq_timeout(void *arg) struct cam_ed *device; device = (struct cam_ed *)arg; + CAM_DEBUG_DEV(device, CAM_DEBUG_TRACE, ("xpt_release_devq_timeout\n")); xpt_release_devq_device(device, /*count*/1, /*run_queue*/TRUE); } @@ -4146,6 +4198,8 @@ xpt_release_devq(struct cam_path *path, { mtx_assert(path->bus->sim->mtx, MA_OWNED); + CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_release_devq(%d, %d)\n", + count, run_queue)); xpt_release_devq_device(path->device, count, run_queue); } @@ -4153,6 +4207,9 @@ void xpt_release_devq_device(struct cam_ed *dev, u_int count, int run_queue) { + CAM_DEBUG_DEV(dev, CAM_DEBUG_TRACE, + ("xpt_release_devq_device(%d, %d) %u->%u\n", count, run_queue, + dev->ccbq.queue.qfrozen_cnt, dev->ccbq.queue.qfrozen_cnt - count)); if (count > dev->ccbq.queue.qfrozen_cnt) { #ifdef INVARIANTS printf("xpt_release_devq(): requested %u > present %u\n", Modified: head/sys/cam/cam_xpt.h ============================================================================== --- head/sys/cam/cam_xpt.h Sun Sep 1 17:06:14 2013 (r255125) +++ head/sys/cam/cam_xpt.h Sun Sep 1 17:37:19 2013 (r255126) @@ -35,6 +35,7 @@ /* Forward Declarations */ union ccb; struct cam_periph; +struct cam_ed; struct cam_sim; /* @@ -89,7 +90,10 @@ void xpt_path_counts(struct cam_path * uint32_t *device_ref); int xpt_path_comp(struct cam_path *path1, struct cam_path *path2); +int xpt_path_comp_dev(struct cam_path *path, + struct cam_ed *dev); void xpt_print_path(struct cam_path *path); +void xpt_print_device(struct cam_ed *device); void xpt_print(struct cam_path *path, const char *fmt, ...); int xpt_path_string(struct cam_path *path, char *str, size_t str_len); From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 18:59:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1B8C57B3; Sun, 1 Sep 2013 18:59:10 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 08B392FAA; Sun, 1 Sep 2013 18:59:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81Ix9ox010328; Sun, 1 Sep 2013 18:59:09 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81Ix9HN010326; Sun, 1 Sep 2013 18:59:09 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201309011859.r81Ix9HN010326@svn.freebsd.org> From: "Simon J. Gerraty" Date: Sun, 1 Sep 2013 18:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255127 - head/contrib/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 18:59:10 -0000 Author: sjg Date: Sun Sep 1 18:59:09 2013 New Revision: 255127 URL: http://svnweb.freebsd.org/changeset/base/255127 Log: Pay attention to errCheck! PR: 181715 Modified: head/contrib/bmake/compat.c Modified: head/contrib/bmake/compat.c ============================================================================== --- head/contrib/bmake/compat.c Sun Sep 1 17:37:19 2013 (r255126) +++ head/contrib/bmake/compat.c Sun Sep 1 18:59:09 2013 (r255127) @@ -340,7 +340,7 @@ again: /* * The following work for any of the builtin shell specs. */ - if (shellErrFlag) { + if (errCheck && shellErrFlag) { shargv[shargc++] = shellErrFlag; } if (DEBUG(SHELL)) From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 19:27:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4E4D4359; Sun, 1 Sep 2013 19:27:33 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3A30E213A; Sun, 1 Sep 2013 19:27:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81JRXQc027755; Sun, 1 Sep 2013 19:27:33 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81JRXBk027752; Sun, 1 Sep 2013 19:27:33 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201309011927.r81JRXBk027752@svn.freebsd.org> From: Eitan Adler Date: Sun, 1 Sep 2013 19:27:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255128 - head/sys/netgraph/bluetooth/drivers/ubt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 19:27:33 -0000 Author: eadler Date: Sun Sep 1 19:27:32 2013 New Revision: 255128 URL: http://svnweb.freebsd.org/changeset/base/255128 Log: Add support for the BCM20702A0 chipset, ASUS USB-BT400. PR: kern/181728 Submitted by: rakuco Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c ============================================================================== --- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Sun Sep 1 18:59:09 2013 (r255127) +++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Sun Sep 1 19:27:32 2013 (r255128) @@ -494,6 +494,7 @@ static const STRUCT_USB_HOST_ID ubt_devs /* Broadcom BCM20702A0 */ { USB_VPI(USB_VENDOR_ASUS, 0x17b5, 0) }, + { USB_VPI(USB_VENDOR_ASUS, 0x17cb, 0) }, { USB_VPI(USB_VENDOR_LITEON, 0x2003, 0) }, { USB_VPI(USB_VENDOR_FOXCONN, 0xe042, 0) }, { USB_VPI(USB_VENDOR_DELL, 0x8197, 0) }, From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 19:59:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DCD3695D; Sun, 1 Sep 2013 19:59:54 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C94622275; Sun, 1 Sep 2013 19:59:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81Jxsdj045748; Sun, 1 Sep 2013 19:59:54 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81Jxs8Z045747; Sun, 1 Sep 2013 19:59:54 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309011959.r81Jxs8Z045747@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 1 Sep 2013 19:59:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255129 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 19:59:54 -0000 Author: jilles Date: Sun Sep 1 19:59:54 2013 New Revision: 255129 URL: http://svnweb.freebsd.org/changeset/base/255129 Log: system(): Restore behaviour for SIGINT and SIGQUIT. As mentioned in r16117 and the book "Advanced Programming in the Unix Environment" by W. Richard Stevens, we should ignore SIGINT and SIGQUIT before forking, since it is not guaranteed that the parent process starts running soon enough. To avoid calling sigaction() in the vforked child, instead block SIGINT and SIGQUIT before vfork() and keep the sigaction() to ignore after vfork(). The FreeBSD kernel discards ignored signals, even if they are blocked; therefore, it is not necessary to unblock SIGINT and SIGQUIT earlier. Modified: head/lib/libc/stdlib/system.c Modified: head/lib/libc/stdlib/system.c ============================================================================== --- head/lib/libc/stdlib/system.c Sun Sep 1 19:27:32 2013 (r255128) +++ head/lib/libc/stdlib/system.c Sun Sep 1 19:59:54 2013 (r255129) @@ -59,6 +59,8 @@ __system(const char *command) (void)sigemptyset(&newsigblock); (void)sigaddset(&newsigblock, SIGCHLD); + (void)sigaddset(&newsigblock, SIGINT); + (void)sigaddset(&newsigblock, SIGQUIT); (void)_sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock); switch(pid = vfork()) { case -1: /* error */ From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 20:15:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AEB092A0; Sun, 1 Sep 2013 20:15:38 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 99C052382; Sun, 1 Sep 2013 20:15:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81KFcjF056690; Sun, 1 Sep 2013 20:15:38 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81KFaa9056648; Sun, 1 Sep 2013 20:15:36 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201309012015.r81KFaa9056648@svn.freebsd.org> From: Rui Paulo Date: Sun, 1 Sep 2013 20:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255130 - in head/sys: arm/conf arm/freescale/imx boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 20:15:38 -0000 Author: rpaulo Date: Sun Sep 1 20:15:35 2013 New Revision: 255130 URL: http://svnweb.freebsd.org/changeset/base/255130 Log: Initial support for the Digi ConnectCore(c) i.MX53 / Wi-i.MX53 boards. There are many drivers missing, but we can reach single user mode now. Hardware graciously donated by Douglas Beattie. Added: head/sys/arm/conf/DIGI-CCWMX53 (contents, props changed) head/sys/arm/freescale/imx/files.imx53 (contents, props changed) head/sys/arm/freescale/imx/imx53_machdep.c (contents, props changed) head/sys/arm/freescale/imx/std.imx53 (contents, props changed) head/sys/boot/fdt/dts/digi-ccwmx53.dts (contents, props changed) head/sys/boot/fdt/dts/imx53x.dtsi (contents, props changed) Modified: head/sys/arm/freescale/imx/imx51_ccm.c head/sys/arm/freescale/imx/imx51_gpio.c head/sys/arm/freescale/imx/imx51_iomux.c head/sys/arm/freescale/imx/imx51_machdep.c head/sys/arm/freescale/imx/imx_gpt.c head/sys/arm/freescale/imx/imx_wdog.c Added: head/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/DIGI-CCWMX53 Sun Sep 1 20:15:35 2013 (r255130) @@ -0,0 +1,175 @@ +# Kernel configuration for Digi ConnectCore Wi-i.MX53 boards +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident DIGI-CCWMX53 + +include "../freescale/imx/std.imx53" + +makeoptions WITHOUT_MODULES="ahc" + +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +#options DEBUG + +options SCHED_4BSD # 4BSD scheduler +#options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +#options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +#options MD_ROOT # MD is a potential root device +options NFSCL # New Network Filesystem Client +#options NFSD # New Network Filesystem Server +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +#options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # TMP Memory Filesystem +options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_LABEL # Provides labelization +#options COMPAT_FREEBSD5 # Compatible with FreeBSD5 +#options COMPAT_FREEBSD6 # Compatible with FreeBSD6 +#options COMPAT_FREEBSD7 # Compatible with FreeBSD7 +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options INCLUDE_CONFIG_FILE # Include this file in kernel +options VFP # vfp/neon + +# required for netbooting +#options BOOTP +#options BOOTP_COMPAT +#options BOOTP_NFSROOT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ue0 + +#options ROOTDEVNAME=\"ufs:ada0s2a\" + + +# kernel/memory size reduction +#options MUTEX_NOINLINE +#options NO_FFS_SNAPSHOT +#options NO_SWAPPING +#options NO_SYSCTL_DESCR +#options RWLOCK_NOINLINE + +# Debugging support. Always need this: +options KDB # Enable kernel debugger support. +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use this instead: +options DDB # Support DDB. +#options GDB # Support remote GDB. +options DEADLKRES # Enable the deadlock resolver +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +#device vlan # 802.1Q VLAN support +#device tun # Packet tunnel. +#device md # Memory "disks" +#device gif # IPv6 and IPv4 tunneling +#device faith # IPv6-to-IPv4 relaying (translation) +#device firmware # firmware assist module + +# Serial (COM) ports +#device uart # Multi-uart driver +options ALT_BREAK_TO_DEBUGGER + +device ata +device atapci # Only for helper functions +device imxata +options ATA_STATIC_ID # Static device numbering + +device iomux # IO Multiplexor + +device gpio +device gpioled + +device fsliic +device iic +device iicbus + +# SCSI peripherals +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) +device cd # CD +device pass # Passthrough device (direct SCSI access) + +# USB support +#options USB_DEBUG # enable debug msgs +#device ehci # OHCI USB interface +#device usb # USB Bus (required) +#device umass # Disks/Mass storage - Requires scbus and da +#device uhid # "Human Interface Devices" +#device ukbd # Allow keyboard like HIDs to control console +#device ums + +# USB Ethernet, requires miibus +#device miibus +#device aue # ADMtek USB Ethernet +#device axe # ASIX Electronics USB Ethernet +#device cdce # Generic USB over Ethernet +#device cue # CATC USB Ethernet +#device kue # Kawasaki LSI USB Ethernet +#device rue # RealTek RTL8150 USB Ethernet +#device udav # Davicom DM9601E USB + +# USB Wireless +#device rum # Ralink Technology RT2501USB wireless NICs + +# Watchdog timer. +# WARNING: can't be disabled!!! +device imxwdt # Watchdog + +# Wireless NIC cards +device wlan # 802.11 support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_amrr # AMRR transmit rate control algorithm + +# Flattened Device Tree +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=digi-ccwmx53.dts + +# NOTE: serial console will be disabled if syscons enabled +# Uncomment following lines for framebuffer/syscons support +#device sc +#device kbdmux +#options SC_DFLT_FONT # compile font in +#makeoptions SC_DFLT_FONT=cp437 Added: head/sys/arm/freescale/imx/files.imx53 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/files.imx53 Sun Sep 1 20:15:35 2013 (r255130) @@ -0,0 +1,51 @@ +# $FreeBSD$ +arm/arm/bus_space_asm_generic.S standard +arm/arm/bus_space_generic.c standard +arm/arm/cpufunc_asm_armv5.S standard +arm/arm/cpufunc_asm_arm11.S standard +arm/arm/cpufunc_asm_armv7.S standard +arm/arm/irq_dispatch.S standard +kern/kern_clocksource.c standard + +# Init +arm/freescale/imx/imx53_machdep.c standard +arm/freescale/imx/common.c standard +arm/freescale/imx/bus_space.c standard + +# Dummy serial console +arm/freescale/imx/console.c standard + +# TrustZone Interrupt Controller +arm/freescale/imx/tzic.c standard + +# IOMUX - external pins multiplexor +arm/freescale/imx/imx51_iomux.c optional iomux + +# GPIO +arm/freescale/imx/imx51_gpio.c optional gpio + +# Generic Periodic Timer +arm/freescale/imx/imx_gpt.c standard + +# Clock Configuration Manager +arm/freescale/imx/imx51_ccm.c standard + +# i.MX5xx PATA controller +dev/ata/chipsets/ata-fsl.c optional imxata + +# UART driver +#dev/uart/uart_dev_imx.c optional uart + +# USB join controller (1 OTG, 3 EHCI) +dev/usb/controller/ehci_imx.c optional ehci + +# Watchdog +arm/freescale/imx/imx_wdog.c optional imxwdt + +# i2c +arm/freescale/imx/i2c.c optional fsliic +dev/ofw/ofw_iicbus.c optional fsliic + +# IPU - Image Processing Unit (frame buffer also) +arm/freescale/imx/imx51_ipuv3.c optional sc + Modified: head/sys/arm/freescale/imx/imx51_ccm.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_ccm.c Sun Sep 1 19:59:54 2013 (r255129) +++ head/sys/arm/freescale/imx/imx51_ccm.c Sun Sep 1 20:15:35 2013 (r255130) @@ -140,7 +140,8 @@ static int imxccm_match(device_t dev) { - if (!ofw_bus_is_compatible(dev, "fsl,imx51-ccm")) + if (!ofw_bus_is_compatible(dev, "fsl,imx51-ccm") && + !ofw_bus_is_compatible(dev, "fsl,imx53-ccm")) return (ENXIO); device_set_desc(dev, "Freescale Clock Control Module"); Modified: head/sys/arm/freescale/imx/imx51_gpio.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_gpio.c Sun Sep 1 19:59:54 2013 (r255129) +++ head/sys/arm/freescale/imx/imx51_gpio.c Sun Sep 1 20:15:35 2013 (r255130) @@ -370,7 +370,8 @@ static int imx51_gpio_probe(device_t dev) { - if (ofw_bus_is_compatible(dev, "fsl,imx51-gpio")) { + if (ofw_bus_is_compatible(dev, "fsl,imx51-gpio") || + ofw_bus_is_compatible(dev, "fsl,imx53-gpio")) { device_set_desc(dev, "i.MX515 GPIO Controller"); return (BUS_PROBE_DEFAULT); } Modified: head/sys/arm/freescale/imx/imx51_iomux.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_iomux.c Sun Sep 1 19:59:54 2013 (r255129) +++ head/sys/arm/freescale/imx/imx51_iomux.c Sun Sep 1 20:15:35 2013 (r255130) @@ -106,7 +106,8 @@ static int iomux_probe(device_t dev) { - if (!ofw_bus_is_compatible(dev, "fsl,imx51-iomux")) + if (!ofw_bus_is_compatible(dev, "fsl,imx51-iomux") && + !ofw_bus_is_compatible(dev, "fsl,imx53-iomux")) return (ENXIO); device_set_desc(dev, "Freescale i.MX51 IO pins multiplexor"); Modified: head/sys/arm/freescale/imx/imx51_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_machdep.c Sun Sep 1 19:59:54 2013 (r255129) +++ head/sys/arm/freescale/imx/imx51_machdep.c Sun Sep 1 20:15:35 2013 (r255130) @@ -107,7 +107,7 @@ platform_devmap_init(void) * Map segment where UART1 and UART2 located. */ fdt_devmap[0].pd_va = IMX51_DEV_VIRT_BASE + 0x03f00000; - fdt_devmap[0].pd_pa = 0x73f00000; + fdt_devmap[0].pd_pa = 0x53f00000; fdt_devmap[0].pd_size = 0x00100000; fdt_devmap[0].pd_prot = VM_PROT_READ | VM_PROT_WRITE; fdt_devmap[0].pd_cache = PTE_NOCACHE; Added: head/sys/arm/freescale/imx/imx53_machdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx53_machdep.c Sun Sep 1 20:15:35 2013 (r255130) @@ -0,0 +1,141 @@ +/*- + * Copyright (c) 1994-1998 Mark Brinicombe. + * Copyright (c) 1994 Brini. + * Copyright (c) 2012, 2013 The FreeBSD Foundation + * All rights reserved. + * + * This code is derived from software written for Brini by Mark Brinicombe + * Portions of this software were developed by Oleksandr Rybalko + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Brini. + * 4. The name of the company nor the name of the author may be used to + * endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#define _ARM32_BUS_DMA_PRIVATE +#include +#include +#include +#include + +#include +#include + +#include +#include /* For trapframe_t, used in */ +#include +#include + +#include + +#define IMX53_DEV_VIRT_BASE 0xe0000000 + +vm_offset_t +initarm_lastaddr(void) +{ + + boothowto |= RB_VERBOSE|RB_MULTIPLE; + bootverbose = 1; + + if (fdt_immr_addr(IMX53_DEV_VIRT_BASE) != 0) + while (1); + + /* Platform-specific initialisation */ + return (fdt_immr_va - ARM_NOCACHE_KVA_SIZE); +} + +/* + * Set initial values of GPIO output ports + */ +void +initarm_gpio_init(void) +{ + +} + +void +initarm_late_init(void) +{ + +} + +#define FDT_DEVMAP_MAX 2 +static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = { + { 0, 0, 0, 0, 0, }, + { 0, 0, 0, 0, 0, } +}; + +/* + * Construct pmap_devmap[] with DT-derived config data. + */ +int +platform_devmap_init(void) +{ + + /* + * Map segment where UART1 and UART2 located. + */ + fdt_devmap[0].pd_va = IMX53_DEV_VIRT_BASE + 0x03f00000; + fdt_devmap[0].pd_pa = 0x53f00000; + fdt_devmap[0].pd_size = 0x00100000; + fdt_devmap[0].pd_prot = VM_PROT_READ | VM_PROT_WRITE; + fdt_devmap[0].pd_cache = PTE_NOCACHE; + + pmap_devmap_bootstrap_table = &fdt_devmap[0]; + + return (0); +} + +struct arm32_dma_range * +bus_dma_get_range(void) +{ + + return (NULL); +} + +int +bus_dma_get_range_nb(void) +{ + + return (0); +} + +void +cpu_reset(void) +{ + + printf("Reset ...\n"); + /* Clear n_reset flag */ + *((volatile u_int16_t *)(IMX53_DEV_VIRT_BASE + 0x03f98000)) = + (u_int16_t)0; + while (1); +} Modified: head/sys/arm/freescale/imx/imx_gpt.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpt.c Sun Sep 1 19:59:54 2013 (r255129) +++ head/sys/arm/freescale/imx/imx_gpt.c Sun Sep 1 20:15:35 2013 (r255130) @@ -112,7 +112,8 @@ static int imx_gpt_probe(device_t dev) { - if (!ofw_bus_is_compatible(dev, "fsl,imx51-gpt")) + if (!ofw_bus_is_compatible(dev, "fsl,imx51-gpt") && + !ofw_bus_is_compatible(dev, "fsl,imx53-gpt")) return (ENXIO); device_set_desc(dev, "Freescale i.MX GPT timer"); Modified: head/sys/arm/freescale/imx/imx_wdog.c ============================================================================== --- head/sys/arm/freescale/imx/imx_wdog.c Sun Sep 1 19:59:54 2013 (r255129) +++ head/sys/arm/freescale/imx/imx_wdog.c Sun Sep 1 20:15:35 2013 (r255130) @@ -130,7 +130,8 @@ static int imx_wdog_probe(device_t dev) { - if (!ofw_bus_is_compatible(dev, "fsl,imx51-wdt")) + if (!ofw_bus_is_compatible(dev, "fsl,imx51-wdt") && + !ofw_bus_is_compatible(dev, "fsl,imx53-wdt")) return (ENXIO); device_set_desc(dev, "Freescale i.MX5xx Watchdog Timer"); Added: head/sys/arm/freescale/imx/std.imx53 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/std.imx53 Sun Sep 1 20:15:35 2013 (r255130) @@ -0,0 +1,15 @@ +# $FreeBSD$ +machine arm armv6 +cpu CPU_CORTEXA +makeoptions ARM_LITTLE_ENDIAN +options ARM_L2_PIPT + +options KERNVIRTADDR=0xc0100000 +makeoptions KERNVIRTADDR=0xc0100000 +options KERNPHYSADDR=0x70100000 +makeoptions KERNPHYSADDR=0x70100000 +options PHYSADDR=0x70000000 +options STARTUP_PAGETABLE_ADDR=0x71000000 + +files "../freescale/imx/files.imx53" + Added: head/sys/boot/fdt/dts/digi-ccwmx53.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/digi-ccwmx53.dts Sun Sep 1 20:15:35 2013 (r255130) @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2012 The FreeBSD Foundation + * Copyright (c) 2013 Rui Paulo + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Digi ConnectCore Wi-i.MX53 + * + * $FreeBSD$ + */ + +/dts-v1/; +/include/ "imx53x.dtsi" + +/ { + model = "Digi ConnectCore Wi-i.MX53"; + compatible = "digi,imx53-ccwm53"; + + memory { + /* RAM 512M */ + reg = <0x70000000 0x20000000>; + }; + + localbus@18000000 { + ipu3@18000000 { + status = "okay"; + }; + }; + + soc@50000000 { + aips@50000000 { + spba@50000000 { + esdhc@50004000 { + clock-frequency = <216000000>; + status = "okay"; + }; + esdhc@50008000 { + clock-frequency = <216000000>; + status = "okay"; + }; + SSI2: ssi@50014000 { + status = "okay"; + }; + }; + timer@53fa0000 { + status = "okay"; + }; + + /* UART1, console */ + UART1: serial@53fbc000 { + status = "okay"; + clock-frequency = <3000000>; /* XXX */ + }; + + clock@53fd4000 { + status = "okay"; + }; + gpio@53f84000 { + status = "okay"; + }; + gpio@53f88000 { + status = "okay"; + }; + gpio@53f8c000 { + status = "okay"; + }; + gpio@53f90000 { + status = "okay"; + }; + wdog@53f98000 { + status = "okay"; + }; + }; + aips@60000000 { + i2c@63fc4000 { + status = "okay"; + }; + i2c@63fc8000 { + status = "okay"; + }; + audmux@63fd4000 { + status = "okay"; + }; + ide@63fe0000 { + status = "okay"; + }; + }; + }; + + aliases { + UART1 = &UART1; + SSI2 = &SSI2; + }; + + chosen { + bootargs = "-v"; + stdin = "UART1"; + stdout = "UART1"; + }; +}; Added: head/sys/boot/fdt/dts/imx53x.dtsi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/imx53x.dtsi Sun Sep 1 20:15:35 2013 (r255130) @@ -0,0 +1,680 @@ +/* + * Copyright (c) 2012 The FreeBSD Foundation + * Copyright (c) 2013 Rui Paulo + * All rights reserved. + * + * This software was developed by Semihalf under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * Freescale i.MX535 Device Tree Source. + * + * $FreeBSD$ + */ + +/ { + #address-cells = <1>; + #size-cells = <1>; + + aliases { + soc = &SOC; + }; + + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "ARM,MCIMX535"; + reg = <0x0>; + d-cache-line-size = <32>; + i-cache-line-size = <32>; + d-cache-size = <0x8000>; + i-cache-size = <0x8000>; + l2-cache-line-size = <32>; + l2-cache-line = <0x40000>; + timebase-frequency = <0>; + bus-frequency = <0>; + clock-frequency = <0>; + }; + }; + + localbus@0fffc000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + + /* This reflects CPU decode windows setup. */ + ranges; + + tzic: tz-interrupt-controller@0fffc000 { + compatible = "fsl,imx53-tzic", "fsl,tzic"; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0x0fffc000 0x00004000>; + }; + /* + * 40000000 40000FFF 4K Debug ROM + * 40001000 40001FFF 4K ETB + * 40002000 40002FFF 4K ETM + * 40003000 40003FFF 4K TPIU + * 40004000 40004FFF 4K CTI0 + * 40005000 40005FFF 4K CTI1 + * 40006000 40006FFF 4K CTI2 + * 40007000 40007FFF 4K CTI3 + * 40008000 40008FFF 4K ARM Debug Unit + * + * 0FFFC000 0FFFCFFF 0x4000 TZIC + */ + }; + + SOC: soc@50000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&tzic>; + ranges = <0x50000000 0x14000000>; + + aips@50000000 { /* AIPS1 */ + compatible = "fsl,aips-bus", "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&tzic>; + ranges; + + /* Required by many devices, so better to stay first */ + /* 53FD4000 0x4000 CCM */ + clock@53fd4000 { + compatible = "fsl,imx53-ccm"; + /* 63F80000 0x4000 DPLLIP1 */ + /* 63F84000 0x4000 DPLLIP2 */ + /* 63F88000 0x4000 DPLLIP3 */ + reg = <0x53fd4000 0x4000 + 0x63F80000 0x4000 + 0x63F84000 0x4000 + 0x63F88000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <71 72>; + status = "disabled"; + }; + + /* + * GPIO modules moved up - to have it attached for + * drivers which rely on GPIO + */ + /* 53F84000 0x4000 GPIO1 */ + gpio1: gpio@53f84000 { + compatible = "fsl,imx53-gpio"; + reg = <0x53f84000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <50 51 42 43 44 45 46 47 48 49>; + /* TODO: use <> also */ + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + /* 53F88000 0x4000 GPIO2 */ + gpio2: gpio@53f88000 { + compatible = "fsl,imx53-gpio"; + reg = <0x53f88000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <52 53>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + /* 53F8C000 0x4000 GPIO3 */ + gpio3: gpio@53f8c000 { + compatible = "fsl,imx53-gpio"; + reg = <0x53f8c000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <54 55>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + /* 53F90000 0x4000 GPIO4 */ + gpio4: gpio@53f90000 { + compatible = "fsl,imx53-gpio"; + reg = <0x53f90000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <56 57>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + /* 53FDC000 0x4000 GPIO5 */ + gpio5: gpio@53fdc000 { + compatible = "fsl,imx53-gpio"; + reg = <0x53fdc000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <103 104>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + /* 53FE0000 0x4000 GPIO6 */ + gpio6: gpio@53fe0000 { + compatible = "fsl,imx53-gpio"; + reg = <0x53fe0000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <105 106>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + /* 53FE4000 0x4000 GPIO5 */ + gpio7: gpio@53fe4000 { + compatible = "fsl,imx53-gpio"; + reg = <0x53fe4000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <107 108>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + spba@50000000 { + compatible = "fsl,spba-bus", "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&tzic>; + ranges; + + /* 50004000 0x4000 ESDHC 1 */ + esdhc@50004000 { + compatible = "fsl,imx53-esdhc"; + reg = <0x50004000 0x4000>; + interrupt-parent = <&tzic>; interrupts = <1>; + status = "disabled"; + }; + + /* 50008000 0x4000 ESDHC 2 */ + esdhc@50008000 { + compatible = "fsl,imx53-esdhc"; + reg = <0x50008000 0x4000>; + interrupt-parent = <&tzic>; interrupts = <2>; + status = "disabled"; + }; + + /* 5000C000 0x4000 UART 3 */ + uart3: serial@5000c000 { + compatible = "fsl,imx53-uart", "fsl,imx-uart"; + reg = <0x5000c000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <33>; + status = "disabled"; + }; + + /* 50010000 0x4000 eCSPI1 */ + ecspi@50010000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,imx53-ecspi"; + reg = <0x50010000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <36>; + status = "disabled"; + }; + + /* 50014000 0x4000 SSI2 irq30 */ + SSI2: ssi@50014000 { + compatible = "fsl,imx53-ssi"; + reg = <0x50014000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <30>; + status = "disabled"; + }; + + /* 50020000 0x4000 ESDHC 3 */ + esdhc@50020000 { + compatible = "fsl,imx53-esdhc"; + reg = <0x50020000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <3>; + status = "disabled"; + }; + + /* 50024000 0x4000 ESDHC 4 */ + esdhc@50024000 { + compatible = "fsl,imx53-esdhc"; + reg = <0x50024000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <4>; + status = "disabled"; + }; + + /* 50028000 0x4000 SPDIF */ + /* 91 SPDIF */ + + /* 50030000 0x4000 PATA (PORT UDMA) irq70 */ + + /* 50034000 0x4000 SLM */ + /* 50038000 0x4000 HSI2C */ + /* 64 HS-I2C */ + /* 5003C000 0x4000 SPBA */ + }; + + /* 73F80000 0x4000 USBOH3 */ + /* irq14 USBOH3 USB Host 1 */ + /* irq16 USBOH3 USB Host 2 */ + /* irq17 USBOH3 USB Host 3 */ + /* irq18 USBOH3 USB OTG */ + usb1: usb@53F80000 { + compatible = "fsl,usb-4core"; + reg = <0x53f80000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <18 14 16 17>; + }; + + /* 53F98000 0x4000 WDOG1 */ + wdog@53f98000 { + compatible = "fsl,imx53-wdt"; + reg = <0x53f98000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <58>; + status = "disabled"; + }; + + /* 53F9C000 0x4000 WDOG2 (TZ) */ + wdog@53f9c000 { + compatible = "fsl,imx53-wdt"; + reg = <0x53f9c000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <59>; + status = "disabled"; + }; + + /* 53F94000 0x4000 KPP */ + keyboard@53f94000 { + compatible = "fsl,imx53-kpp"; + reg = <0x53f94000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <60>; + status = "disabled"; + }; + + /* 53FA0000 0x4000 GPT */ + timer@53fa0000 { + compatible = "fsl,imx53-gpt"; + reg = <0x53fa0000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <39>; + status = "disabled"; + }; + + /* 53FA4000 0x4000 SRTC */ + + rtc@53fa4000 { + compatible = "fsl,imx53-srtc"; + reg = <0x53fa4000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <24 25>; + status = "disabled"; + }; + + /* 53FA8000 0x4000 IOMUXC */ + iomux@53fa8000 { + compatible = "fsl,imx53-iomux"; + reg = <0x53fa8000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <7>; + }; + + /* 53FAC000 0x4000 EPIT1 */ + epit1: timer@53fac000 { + compatible = "fsl,imx53-epit"; + reg = <0x53fac000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <40>; + status = "disabled"; + }; + + /* 53FB0000 0x4000 EPIT2 */ + epit2: timer@53fb0000 { + compatible = "fsl,imx53-epit"; + reg = <0x53fb0000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <41>; + status = "disabled"; + }; + + /* 53FB4000 0x4000 PWM1 */ + pwm@53fb4000 { + compatible = "fsl,imx53-pwm"; + reg = <0x53fb4000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <61>; + status = "disabled"; + }; + + /* 53FB8000 0x4000 PWM2 */ + pwm@53fb8000 { + compatible = "fsl,imx53-pwm"; + reg = <0x53fb8000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <94>; + status = "disabled"; + }; + + /* 53FBC000 0x4000 UART 1 */ + uart1: serial@53fbc000 { + compatible = "fsl,imx53-uart", "fsl,imx-uart"; + reg = <0x53fbc000 0x4000>; + interrupt-parent = <&tzic>; + interrupts = <31>; + status = "disabled"; + }; + + /* 53FC0000 0x4000 UART 2 */ + uart2: serial@53fc0000 { + compatible = "fsl,imx53-uart", "fsl,imx-uart"; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 20:22:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7746E4F5; Sun, 1 Sep 2013 20:22:53 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 645AD23CD; Sun, 1 Sep 2013 20:22:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81KMr8i061359; Sun, 1 Sep 2013 20:22:53 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81KMrYQ061358; Sun, 1 Sep 2013 20:22:53 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201309012022.r81KMrYQ061358@svn.freebsd.org> From: Eitan Adler Date: Sun, 1 Sep 2013 20:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255131 - head/sys/dev/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 20:22:53 -0000 Author: eadler Date: Sun Sep 1 20:22:52 2013 New Revision: 255131 URL: http://svnweb.freebsd.org/changeset/base/255131 Log: Fix build with gcc Reported by: Michael Butler Reviewed by: jilles Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Sun Sep 1 20:15:35 2013 (r255130) +++ head/sys/dev/virtio/network/if_vtnet.c Sun Sep 1 20:22:52 2013 (r255131) @@ -1531,7 +1531,7 @@ vtnet_rxq_csum_by_parse(struct vtnet_rxq */ #if 0 if_printf(sc->vtnet_ifp, "cksum offload of unsupported " - "protocol eth_type=%#x proto=%d csum_start=%d + "protocol eth_type=%#x proto=%d csum_start=%d " "csum_offset=%d\n", __func__, eth_type, proto, hdr->csum_start, hdr->csum_offset); #endif From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 21:44:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E9BFB68F; Sun, 1 Sep 2013 21:44:43 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D6FD32736; Sun, 1 Sep 2013 21:44:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81LihkV008249; Sun, 1 Sep 2013 21:44:43 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81Lih3w008247; Sun, 1 Sep 2013 21:44:43 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201309012144.r81Lih3w008247@svn.freebsd.org> From: Davide Italiano Date: Sun, 1 Sep 2013 21:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255133 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 21:44:44 -0000 Author: davide Date: Sun Sep 1 21:44:43 2013 New Revision: 255133 URL: http://svnweb.freebsd.org/changeset/base/255133 Log: Complete r250105. Do not zero fields if M_ZERO flag is specified to malloc(9). Reported by: pluknet, glebius Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Sun Sep 1 20:48:22 2013 (r255132) +++ head/sys/dev/hwpmc/hwpmc_mod.c Sun Sep 1 21:44:43 2013 (r255133) @@ -2026,11 +2026,7 @@ pmc_allocate_owner_descriptor(struct pro /* allocate space for N pointers and one descriptor struct */ po = malloc(sizeof(struct pmc_owner), M_PMC, M_WAITOK|M_ZERO); - po->po_sscount = po->po_error = po->po_flags = po->po_logprocmaps = 0; - po->po_file = NULL; po->po_owner = p; - po->po_kthread = NULL; - LIST_INIT(&po->po_pmcs); LIST_INSERT_HEAD(poh, po, po_next); /* insert into hash table */ TAILQ_INIT(&po->po_logbuffers); @@ -2156,8 +2152,6 @@ pmc_allocate_pmc_descriptor(void) struct pmc *pmc; pmc = malloc(sizeof(struct pmc), M_PMC, M_WAITOK|M_ZERO); - pmc->pm_owner = NULL; - LIST_INIT(&pmc->pm_targets); PMCDBG(PMC,ALL,1, "allocate-pmc -> pmc=%p", pmc); From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 22:30:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7CFAD394; Sun, 1 Sep 2013 22:30:25 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 69EB32944; Sun, 1 Sep 2013 22:30:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81MUPcA036045; Sun, 1 Sep 2013 22:30:25 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81MUP6w036044; Sun, 1 Sep 2013 22:30:25 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201309012230.r81MUP6w036044@svn.freebsd.org> From: Davide Italiano Date: Sun, 1 Sep 2013 22:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255135 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 22:30:25 -0000 Author: davide Date: Sun Sep 1 22:30:24 2013 New Revision: 255135 URL: http://svnweb.freebsd.org/changeset/base/255135 Log: Use single underscore for all parameters name and local variables in bintime_* related functions. This commit completes what was already done by theraven@ for bintime_shift, and just uses a single underscore instead of two (which is a style bug according to Bruce). See r251855 for reference. Reported by: theraven Discussed with: bde Reviewed by: bde Modified: head/sys/sys/time.h Modified: head/sys/sys/time.h ============================================================================== --- head/sys/sys/time.h Sun Sep 1 22:16:19 2013 (r255134) +++ head/sys/sys/time.h Sun Sep 1 22:30:24 2013 (r255135) @@ -56,64 +56,64 @@ struct bintime { }; static __inline void -bintime_addx(struct bintime *bt, uint64_t x) +bintime_addx(struct bintime *_bt, uint64_t _x) { - uint64_t u; + uint64_t _u; - u = bt->frac; - bt->frac += x; - if (u > bt->frac) - bt->sec++; + _u = _bt->frac; + _bt->frac += _x; + if (_u > _bt->frac) + _bt->sec++; } static __inline void -bintime_add(struct bintime *bt, const struct bintime *bt2) +bintime_add(struct bintime *_bt, const struct bintime *_bt2) { - uint64_t u; + uint64_t _u; - u = bt->frac; - bt->frac += bt2->frac; - if (u > bt->frac) - bt->sec++; - bt->sec += bt2->sec; + _u = _bt->frac; + _bt->frac += _bt2->frac; + if (_u > _bt->frac) + _bt->sec++; + _bt->sec += _bt2->sec; } static __inline void -bintime_sub(struct bintime *bt, const struct bintime *bt2) +bintime_sub(struct bintime *_bt, const struct bintime *_bt2) { - uint64_t u; + uint64_t _u; - u = bt->frac; - bt->frac -= bt2->frac; - if (u < bt->frac) - bt->sec--; - bt->sec -= bt2->sec; + _u = _bt->frac; + _bt->frac -= _bt2->frac; + if (_u < _bt->frac) + _bt->sec--; + _bt->sec -= _bt2->sec; } static __inline void -bintime_mul(struct bintime *bt, u_int x) +bintime_mul(struct bintime *_bt, u_int _x) { - uint64_t p1, p2; + uint64_t _p1, _p2; - p1 = (bt->frac & 0xffffffffull) * x; - p2 = (bt->frac >> 32) * x + (p1 >> 32); - bt->sec *= x; - bt->sec += (p2 >> 32); - bt->frac = (p2 << 32) | (p1 & 0xffffffffull); + _p1 = (_bt->frac & 0xffffffffull) * _x; + _p2 = (_bt->frac >> 32) * _x + (_p1 >> 32); + _bt->sec *= _x; + _bt->sec += (_p2 >> 32); + _bt->frac = (_p2 << 32) | (_p1 & 0xffffffffull); } static __inline void -bintime_shift(struct bintime *__bt, int __exp) +bintime_shift(struct bintime *_bt, int _exp) { - if (__exp > 0) { - __bt->sec <<= __exp; - __bt->sec |= __bt->frac >> (64 - __exp); - __bt->frac <<= __exp; - } else if (__exp < 0) { - __bt->frac >>= -__exp; - __bt->frac |= (uint64_t)__bt->sec << (64 + __exp); - __bt->sec >>= -__exp; + if (_exp > 0) { + _bt->sec <<= _exp; + _bt->sec |= _bt->frac >> (64 - _exp); + _bt->frac <<= _exp; + } else if (_exp < 0) { + _bt->frac >>= -_exp; + _bt->frac |= (uint64_t)_bt->sec << (64 + _exp); + _bt->sec >>= -_exp; } } @@ -131,27 +131,27 @@ bintime_shift(struct bintime *__bt, int #define SBT_1NS (SBT_1S / 1000000000) static __inline int -sbintime_getsec(sbintime_t sbt) +sbintime_getsec(sbintime_t _sbt) { - return (sbt >> 32); + return (_sbt >> 32); } static __inline sbintime_t -bttosbt(const struct bintime bt) +bttosbt(const struct bintime _bt) { - return (((sbintime_t)bt.sec << 32) + (bt.frac >> 32)); + return (((sbintime_t)_bt.sec << 32) + (_bt.frac >> 32)); } static __inline struct bintime -sbttobt(sbintime_t sbt) +sbttobt(sbintime_t _sbt) { - struct bintime bt; + struct bintime _bt; - bt.sec = sbt >> 32; - bt.frac = sbt << 32; - return (bt); + _bt.sec = _sbt >> 32; + _bt.frac = _sbt << 32; + return (_bt); } /*- @@ -169,73 +169,74 @@ sbttobt(sbintime_t sbt) */ static __inline void -bintime2timespec(const struct bintime *bt, struct timespec *ts) +bintime2timespec(const struct bintime *_bt, struct timespec *_ts) { - ts->tv_sec = bt->sec; - ts->tv_nsec = ((uint64_t)1000000000 * (uint32_t)(bt->frac >> 32)) >> 32; + _ts->tv_sec = _bt->sec; + _ts->tv_nsec = ((uint64_t)1000000000 * + (uint32_t)(_bt->frac >> 32)) >> 32; } static __inline void -timespec2bintime(const struct timespec *ts, struct bintime *bt) +timespec2bintime(const struct timespec *_ts, struct bintime *_bt) { - bt->sec = ts->tv_sec; + _bt->sec = _ts->tv_sec; /* 18446744073 = int(2^64 / 1000000000) */ - bt->frac = ts->tv_nsec * (uint64_t)18446744073LL; + _bt->frac = _ts->tv_nsec * (uint64_t)18446744073LL; } static __inline void -bintime2timeval(const struct bintime *bt, struct timeval *tv) +bintime2timeval(const struct bintime *_bt, struct timeval *_tv) { - tv->tv_sec = bt->sec; - tv->tv_usec = ((uint64_t)1000000 * (uint32_t)(bt->frac >> 32)) >> 32; + _tv->tv_sec = _bt->sec; + _tv->tv_usec = ((uint64_t)1000000 * (uint32_t)(_bt->frac >> 32)) >> 32; } static __inline void -timeval2bintime(const struct timeval *tv, struct bintime *bt) +timeval2bintime(const struct timeval *_tv, struct bintime *_bt) { - bt->sec = tv->tv_sec; + _bt->sec = _tv->tv_sec; /* 18446744073709 = int(2^64 / 1000000) */ - bt->frac = tv->tv_usec * (uint64_t)18446744073709LL; + _bt->frac = _tv->tv_usec * (uint64_t)18446744073709LL; } static __inline struct timespec -sbttots(sbintime_t sbt) +sbttots(sbintime_t _sbt) { - struct timespec ts; + struct timespec _ts; - ts.tv_sec = sbt >> 32; - ts.tv_nsec = ((uint64_t)1000000000 * (uint32_t)sbt) >> 32; - return (ts); + _ts.tv_sec = _sbt >> 32; + _ts.tv_nsec = ((uint64_t)1000000000 * (uint32_t)_sbt) >> 32; + return (_ts); } static __inline sbintime_t -tstosbt(struct timespec ts) +tstosbt(struct timespec _ts) { - return (((sbintime_t)ts.tv_sec << 32) + - (ts.tv_nsec * (((uint64_t)1 << 63) / 500000000) >> 32)); + return (((sbintime_t)_ts.tv_sec << 32) + + (_ts.tv_nsec * (((uint64_t)1 << 63) / 500000000) >> 32)); } static __inline struct timeval -sbttotv(sbintime_t sbt) +sbttotv(sbintime_t _sbt) { - struct timeval tv; + struct timeval _tv; - tv.tv_sec = sbt >> 32; - tv.tv_usec = ((uint64_t)1000000 * (uint32_t)sbt) >> 32; - return (tv); + _tv.tv_sec = _sbt >> 32; + _tv.tv_usec = ((uint64_t)1000000 * (uint32_t)_sbt) >> 32; + return (_tv); } static __inline sbintime_t -tvtosbt(struct timeval tv) +tvtosbt(struct timeval _tv) { - return (((sbintime_t)tv.tv_sec << 32) + - (tv.tv_usec * (((uint64_t)1 << 63) / 500000) >> 32)); + return (((sbintime_t)_tv.tv_sec << 32) + + (_tv.tv_usec * (((uint64_t)1 << 63) / 500000) >> 32)); } #endif /* __BSD_VISIBLE */ @@ -411,10 +412,10 @@ void microuptime(struct timeval *tvp); static __inline sbintime_t sbinuptime(void) { - struct bintime bt; + struct bintime _bt; - binuptime(&bt); - return (bttosbt(bt)); + binuptime(&_bt); + return (bttosbt(_bt)); } void bintime(struct bintime *bt); @@ -428,10 +429,10 @@ void getmicrouptime(struct timeval *tvp) static __inline sbintime_t getsbinuptime(void) { - struct bintime bt; + struct bintime _bt; - getbinuptime(&bt); - return (bttosbt(bt)); + getbinuptime(&_bt); + return (bttosbt(_bt)); } void getbintime(struct bintime *bt); From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 22:38:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 01D657E8; Sun, 1 Sep 2013 22:38:52 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-ve0-x22e.google.com (mail-ve0-x22e.google.com [IPv6:2607:f8b0:400c:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 920A52993; Sun, 1 Sep 2013 22:38:51 +0000 (UTC) Received: by mail-ve0-f174.google.com with SMTP id d10so2655247vea.33 for ; Sun, 01 Sep 2013 15:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=eC8/GVqQaRmw2g3I2bXOHTCIZxQVY1J59bWaTc3sRn8=; b=b+NplyQbHNcbjdxeEG/s603sNNh8BT9j/QCA4CYXyzWLvVnhPBhd6Vq18vRmmtFdsQ mvULvnjeOG7cb+SbjKKh9I/P4kjtyo929MhkxCzEtdbAy4q8PvJji+vPLXfcPJX5+Hmb uwjB18CxHyfQ7U4S6Xs6fZWWQ46UZdSt4b8WrWVfkRT9ulul2hBi35hmWImGbiUVMA86 PGHUBRPrv0GjYDwwJ5WNiluweaNYYdH6tiatnTVkD9aVoOLe22onwARwwqSHgLw3XD5z 5hyLFxxNnKm6vQKQuWvS8rkWEdiFWVI19HvxblooT6uNmEOWbMpAnWx5fH37JRmH7zJ/ W6Vw== MIME-Version: 1.0 X-Received: by 10.52.52.231 with SMTP id w7mr7546267vdo.12.1378075130663; Sun, 01 Sep 2013 15:38:50 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.65.132 with HTTP; Sun, 1 Sep 2013 15:38:50 -0700 (PDT) In-Reply-To: <201309012230.r81MUP6w036044@svn.freebsd.org> References: <201309012230.r81MUP6w036044@svn.freebsd.org> Date: Mon, 2 Sep 2013 00:38:50 +0200 X-Google-Sender-Auth: KZtAA0Q0O92tclh8r6yRKZkj37w Message-ID: Subject: Re: svn commit: r255135 - head/sys/sys From: Davide Italiano To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 22:38:52 -0000 On Mon, Sep 2, 2013 at 12:30 AM, Davide Italiano wrote: > Author: davide > Date: Sun Sep 1 22:30:24 2013 > New Revision: 255135 > URL: http://svnweb.freebsd.org/changeset/base/255135 > > Log: > Use single underscore for all parameters name and local variables in > bintime_* related functions. This commit completes what was already done > by theraven@ for bintime_shift, and just uses a single underscore instead > of two (which is a style bug according to Bruce). See r251855 for reference. > > Reported by: theraven > Discussed with: bde > Reviewed by: bde > This commit should fix the namespace problem(s) but still there are quite a few issues in time.h, as I previously privately discussed with Bruce. Other than stylistic issues, e.g. the usage of something more appropriate like _btp for pointers or something more explicative for second argument in bintime_add than _bt2, the main design error is that bintimes are pointers. This was good historically because it avoided passing large structs in 1978, but right now (with inline) there is little difference between using pointers and using structs, except the latter code is easier to write and optimize. JFYI, sbintime_t functions considers this previous "mistake" and do not rely on pointers. At some point probably bintime might be changed to be more similar to sbintime_t, even though this looks like a huge change for me now. Thanks, -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 22:47:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 26DBFD8B; Sun, 1 Sep 2013 22:47:37 +0000 (UTC) (envelope-from kubito@gmail.com) Received: from mail-la0-x233.google.com (mail-la0-x233.google.com [IPv6:2a00:1450:4010:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3EDC52A16; Sun, 1 Sep 2013 22:47:36 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id es20so3014549lab.38 for ; Sun, 01 Sep 2013 15:47:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=LTrWgR6wd9n/JS03BiYOvVqZRfohzBDfahL+lVxny5U=; b=tCC91vbHl55XnxCe78gaJqyBtj9gMw81j7YYH3/rInAXi9exsbopObRD4fwDnbAUTT 565Sv6QIuj5ycoyelU+1qt5KCGTNHDpLrm4imWHiGWr93LTB2Dpt5yc/UMCQBLI0G1n+ E6rMjzZQOKlA/FDPmxU0onSNlnzXVSPF1ouwzZu/uh5jkXsjVrH15XiH5fvw/wYiZWcd djcq1sIKwT7Nsax393lXoVRHB+X9GS5ULpjS6pCYl5UeVL3T/aWm/tsPDYjV54dEPyjN f7mUqt0I0WR+DmslFB4QbQmlKmy81WfvdC9Z1ivkN9GcPOQPuaKiuMeYXYFQjVUv5oKq DGzQ== X-Received: by 10.112.210.136 with SMTP id mu8mr3662473lbc.25.1378075654068; Sun, 01 Sep 2013 15:47:34 -0700 (PDT) Received: from orwell.Elisa.gmail.com (a91-154-115-217.elisa-laajakaista.fi. [91.154.115.217]) by mx.google.com with ESMTPSA id vx8sm4438527lbb.8.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 01 Sep 2013 15:47:33 -0700 (PDT) Sender: Raphael Kubo da Costa From: Raphael Kubo da Costa To: src-committers@freebsd.org Subject: Re: svn commit: r255128 - head/sys/netgraph/bluetooth/drivers/ubt References: <201309011927.r81JRXBk027752__49643.5845424005$1378063667$gmane$org@svn.freebsd.org> Date: Mon, 02 Sep 2013 01:47:25 +0300 In-Reply-To: <201309011927.r81JRXBk027752__49643.5845424005$1378063667$gmane$org@svn.freebsd.org> (Eitan Adler's message of "Sun, 1 Sep 2013 19:27:33 +0000 (UTC)") Message-ID: <861u58tb0i.fsf@orwell.Elisa> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 22:47:37 -0000 Eitan Adler writes: > Author: eadler > Date: Sun Sep 1 19:27:32 2013 > New Revision: 255128 > URL: http://svnweb.freebsd.org/changeset/base/255128 > > Log: > Add support for the BCM20702A0 chipset, ASUS USB-BT400. > > PR: kern/181728 > Submitted by: rakuco MFC after: 3 days as discussed with eadler. From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 23:03:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 99EDC5BD; Sun, 1 Sep 2013 23:03:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 86DBD2B19; Sun, 1 Sep 2013 23:03:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81N3075055677; Sun, 1 Sep 2013 23:03:00 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81N2xwG055662; Sun, 1 Sep 2013 23:02:59 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201309012302.r81N2xwG055662@svn.freebsd.org> From: Rick Macklem Date: Sun, 1 Sep 2013 23:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255136 - in head/sys: fs/nfsclient kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 23:03:00 -0000 Author: rmacklem Date: Sun Sep 1 23:02:59 2013 New Revision: 255136 URL: http://svnweb.freebsd.org/changeset/base/255136 Log: Forced dismounts of NFS mounts can fail when thread(s) are stuck waiting for an RPC reply from the server while holding the mount point busy (mnt_lockref incremented). This happens because dounmount() msleep()s waiting for mnt_lockref to become 0, before calling VFS_UNMOUNT(). This patch adds a new VFS operation called VFS_PURGE(), which the NFS client implements as purging RPCs in progress. Making this call before checking mnt_lockref fixes the problem, by ensuring that the VOP_xxx() calls will fail and unbusy the mount point. Reported by: sbruno Reviewed by: kib MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/kern/vfs_mount.c head/sys/sys/mount.h Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Sun Sep 1 22:30:24 2013 (r255135) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Sun Sep 1 23:02:59 2013 (r255136) @@ -120,6 +120,7 @@ static vfs_root_t nfs_root; static vfs_statfs_t nfs_statfs; static vfs_sync_t nfs_sync; static vfs_sysctl_t nfs_sysctl; +static vfs_purge_t nfs_purge; /* * nfs vfs operations. @@ -134,6 +135,7 @@ static struct vfsops nfs_vfsops = { .vfs_uninit = ncl_uninit, .vfs_unmount = nfs_unmount, .vfs_sysctl = nfs_sysctl, + .vfs_purge = nfs_purge, }; VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK | VFCF_SBDRY); @@ -1676,6 +1678,19 @@ nfs_sysctl(struct mount *mp, fsctlop_t o } /* + * Purge any RPCs in progress, so that they will all return errors. + * This allows dounmount() to continue as far as VFS_UNMOUNT() for a + * forced dismount. + */ +static void +nfs_purge(struct mount *mp) +{ + struct nfsmount *nmp = VFSTONFS(mp); + + newnfs_nmcancelreqs(nmp); +} + +/* * Extract the information needed by the nlm from the nfs vnode. */ static void Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Sun Sep 1 22:30:24 2013 (r255135) +++ head/sys/kern/vfs_mount.c Sun Sep 1 23:02:59 2013 (r255136) @@ -1269,8 +1269,16 @@ dounmount(mp, flags, td) } mp->mnt_kern_flag |= MNTK_UNMOUNT | MNTK_NOINSMNTQ; /* Allow filesystems to detect that a forced unmount is in progress. */ - if (flags & MNT_FORCE) + if (flags & MNT_FORCE) { mp->mnt_kern_flag |= MNTK_UNMOUNTF; + MNT_IUNLOCK(mp); + /* + * Must be done after setting MNTK_UNMOUNTF and before + * waiting for mnt_lockref to become 0. + */ + VFS_PURGE(mp); + MNT_ILOCK(mp); + } error = 0; if (mp->mnt_lockref) { mp->mnt_kern_flag |= MNTK_DRAINING; Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Sun Sep 1 22:30:24 2013 (r255135) +++ head/sys/sys/mount.h Sun Sep 1 23:02:59 2013 (r255136) @@ -609,6 +609,7 @@ typedef int vfs_sysctl_t(struct mount *m struct sysctl_req *req); typedef void vfs_susp_clean_t(struct mount *mp); typedef void vfs_notify_lowervp_t(struct mount *mp, struct vnode *lowervp); +typedef void vfs_purge_t(struct mount *mp); struct vfsops { vfs_mount_t *vfs_mount; @@ -628,6 +629,7 @@ struct vfsops { vfs_susp_clean_t *vfs_susp_clean; vfs_notify_lowervp_t *vfs_reclaim_lowervp; vfs_notify_lowervp_t *vfs_unlink_lowervp; + vfs_purge_t *vfs_purge; vfs_mount_t *vfs_spare[6]; /* spares for ABI compat */ }; @@ -757,6 +759,14 @@ vfs_statfs_t __vfs_statfs; } \ } while (0) +#define VFS_PURGE(MP) do { \ + if (*(MP)->mnt_op->vfs_purge != NULL) { \ + VFS_PROLOGUE(MP); \ + (*(MP)->mnt_op->vfs_purge)(MP); \ + VFS_EPILOGUE(MP); \ + } \ +} while (0) + #define VFS_KNOTE_LOCKED(vp, hint) do \ { \ if (((vp)->v_vflag & VV_NOKNOTE) == 0) \ From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 23:34:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8571BCF4; Sun, 1 Sep 2013 23:34:54 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 726A22D6F; Sun, 1 Sep 2013 23:34:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81NYsx4073911; Sun, 1 Sep 2013 23:34:54 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81NYrkj073907; Sun, 1 Sep 2013 23:34:53 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201309012334.r81NYrkj073907@svn.freebsd.org> From: Davide Italiano Date: Sun, 1 Sep 2013 23:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255138 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 23:34:54 -0000 Author: davide Date: Sun Sep 1 23:34:53 2013 New Revision: 255138 URL: http://svnweb.freebsd.org/changeset/base/255138 Log: Fix socket buffer timeouts precision using the new sbintime_t KPI instead of relying on the tvtohz() workaround. The latter has been introduced lately by jhb@ (r254699) in order to have a fix that can be backported to STABLE. Reported by: Vitja Makarov Reviewed by: jhb (earlier version) Modified: head/sys/kern/uipc_debug.c head/sys/kern/uipc_sockbuf.c head/sys/kern/uipc_socket.c head/sys/sys/sockbuf.h Modified: head/sys/kern/uipc_debug.c ============================================================================== --- head/sys/kern/uipc_debug.c Sun Sep 1 23:06:28 2013 (r255137) +++ head/sys/kern/uipc_debug.c Sun Sep 1 23:34:53 2013 (r255138) @@ -411,7 +411,7 @@ db_print_sockbuf(struct sockbuf *sb, con db_print_indent(indent); db_printf("sb_ctl: %u ", sb->sb_ctl); db_printf("sb_lowat: %d ", sb->sb_lowat); - db_printf("sb_timeo: %d\n", sb->sb_timeo); + db_printf("sb_timeo: %jd\n", sb->sb_timeo); db_print_indent(indent); db_printf("sb_flags: 0x%x (", sb->sb_flags); Modified: head/sys/kern/uipc_sockbuf.c ============================================================================== --- head/sys/kern/uipc_sockbuf.c Sun Sep 1 23:06:28 2013 (r255137) +++ head/sys/kern/uipc_sockbuf.c Sun Sep 1 23:34:53 2013 (r255138) @@ -127,9 +127,9 @@ sbwait(struct sockbuf *sb) SOCKBUF_LOCK_ASSERT(sb); sb->sb_flags |= SB_WAIT; - return (msleep(&sb->sb_cc, &sb->sb_mtx, + return (msleep_sbt(&sb->sb_cc, &sb->sb_mtx, (sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK | PCATCH, "sbwait", - sb->sb_timeo)); + sb->sb_timeo, 0, 0)); } int Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Sun Sep 1 23:06:28 2013 (r255137) +++ head/sys/kern/uipc_socket.c Sun Sep 1 23:34:53 2013 (r255138) @@ -2541,7 +2541,7 @@ sosetopt(struct socket *so, struct socko int error, optval; struct linger l; struct timeval tv; - u_long val; + sbintime_t val; uint32_t val32; #ifdef MAC struct mac extmac; @@ -2703,7 +2703,7 @@ sosetopt(struct socket *so, struct socko error = EDOM; goto bad; } - val = tvtohz(&tv); + val = tvtosbt(tv); switch (sopt->sopt_name) { case SO_SNDTIMEO: @@ -2857,8 +2857,7 @@ integer: optval = (sopt->sopt_name == SO_SNDTIMEO ? so->so_snd.sb_timeo : so->so_rcv.sb_timeo); - tv.tv_sec = optval / hz; - tv.tv_usec = (optval % hz) * tick; + tv = sbttotv(optval); #ifdef COMPAT_FREEBSD32 if (SV_CURPROC_FLAG(SV_ILP32)) { struct timeval32 tv32; Modified: head/sys/sys/sockbuf.h ============================================================================== --- head/sys/sys/sockbuf.h Sun Sep 1 23:06:28 2013 (r255137) +++ head/sys/sys/sockbuf.h Sun Sep 1 23:34:53 2013 (r255138) @@ -97,7 +97,7 @@ struct sockbuf { u_int sb_mbmax; /* (c/d) max chars of mbufs to use */ u_int sb_ctl; /* (c/d) non-data chars in buffer */ int sb_lowat; /* (c/d) low water mark */ - int sb_timeo; /* (c/d) timeout for read/write */ + sbintime_t sb_timeo; /* (c/d) timeout for read/write */ short sb_flags; /* (c/d) flags, see below */ int (*sb_upcall)(struct socket *, void *, int); /* (c/d) */ void *sb_upcallarg; /* (c/d) */ From owner-svn-src-head@FreeBSD.ORG Sun Sep 1 23:49:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B620431C; Sun, 1 Sep 2013 23:49:36 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 943A32EE4; Sun, 1 Sep 2013 23:49:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r81Nnao4081247; Sun, 1 Sep 2013 23:49:36 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r81Nnash081245; Sun, 1 Sep 2013 23:49:36 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201309012349.r81Nnash081245@svn.freebsd.org> From: "Justin T. Gibbs" Date: Sun, 1 Sep 2013 23:49:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255139 - head/sys/x86/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Sep 2013 23:49:36 -0000 Author: gibbs Date: Sun Sep 1 23:49:36 2013 New Revision: 255139 URL: http://svnweb.freebsd.org/changeset/base/255139 Log: Conform to style(9). No functional changes. sys/x86/xen/hvm.c: Do not rely on implicit conversion to boolean in expressions (e.g. use "if (rc != 0)" instead of "if (rc)". Line continuations for functions are indented an additional 4 spaces. Insert an empty line if the function has no local variables. Prefer separate initializtion statements to initialzing local variables in their declaration. Braces that are not necessary may be left out. MFC after: 2 weeks Modified: head/sys/x86/xen/hvm.c Modified: head/sys/x86/xen/hvm.c ============================================================================== --- head/sys/x86/xen/hvm.c Sun Sep 1 23:34:53 2013 (r255138) +++ head/sys/x86/xen/hvm.c Sun Sep 1 23:49:36 2013 (r255139) @@ -92,7 +92,7 @@ xen_hvm_init_hypercall_stubs(void) int i; base = xen_hvm_cpuid_base(); - if (!base) + if (base == 0) return (ENXIO); if (hypercall_stubs == NULL) { @@ -151,7 +151,7 @@ xen_hvm_set_callback(device_t dev) xhp.domid = DOMID_SELF; xhp.index = HVM_PARAM_CALLBACK_IRQ; - if (xen_feature(XENFEAT_hvm_callback_vector)) { + if (xen_feature(XENFEAT_hvm_callback_vector) != 0) { int error; xhp.value = HVM_CALLBACK_VECTOR(IDT_EVTCHN); @@ -161,8 +161,7 @@ xen_hvm_set_callback(device_t dev) return; } printf("Xen HVM callback vector registration failed (%d). " - "Falling back to emulated device interrupt\n", - error); + "Falling back to emulated device interrupt\n", error); } xen_vector_callback_enabled = 0; if (dev == NULL) { @@ -185,7 +184,7 @@ xen_hvm_set_callback(device_t dev) xhp.value = HVM_CALLBACK_PCI_INTX(slot, pin); } - if (HYPERVISOR_hvm_op(HVMOP_set_param, &xhp)) + if (HYPERVISOR_hvm_op(HVMOP_set_param, &xhp) != 0) panic("Can't set evtchn callback"); } @@ -216,6 +215,7 @@ xen_hvm_suspend(void) void xen_hvm_resume(void) { + xen_hvm_init_hypercall_stubs(); xen_hvm_init_shared_info_page(); } @@ -223,6 +223,7 @@ xen_hvm_resume(void) static void xen_hvm_init(void *dummy __unused) { + if (xen_hvm_init_hypercall_stubs() != 0) return; @@ -235,21 +236,20 @@ xen_hvm_init(void *dummy __unused) void xen_hvm_init_cpu(void) { - int cpu = PCPU_GET(acpi_id); - struct vcpu_info *vcpu_info; struct vcpu_register_vcpu_info info; - int rc; + struct vcpu_info *vcpu_info; + int cpu, rc; + cpu = PCPU_GET(acpi_id); vcpu_info = DPCPU_PTR(vcpu_local_info); info.mfn = vtophys(vcpu_info) >> PAGE_SHIFT; info.offset = vtophys(vcpu_info) - trunc_page(vtophys(vcpu_info)); rc = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, cpu, &info); - if (rc) { + if (rc != 0) DPCPU_SET(vcpu_info, &HYPERVISOR_shared_info->vcpu_info[cpu]); - } else { + else DPCPU_SET(vcpu_info, vcpu_info); - } } SYSINIT(xen_hvm_init, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, xen_hvm_init, NULL); From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 08:32:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8A6917F7; Mon, 2 Sep 2013 08:32:13 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 46BF52730; Mon, 2 Sep 2013 08:32:13 +0000 (UTC) Received: from terran (unknown [192.168.99.1]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 31A7BC4936; Mon, 2 Sep 2013 11:26:52 +0300 (EEST) Date: Mon, 2 Sep 2013 11:26:52 +0300 From: Aleksandr Rybalko To: Rui Paulo Subject: Re: svn commit: r255130 - in head/sys: arm/conf arm/freescale/imx boot/fdt/dts Message-Id: <20130902112652.870eff18955c9b28fee978df@ddteam.net> In-Reply-To: <201309012015.r81KFaa9056648@svn.freebsd.org> References: <201309012015.r81KFaa9056648@svn.freebsd.org> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 08:32:13 -0000 Hello Rui! On Sun, 1 Sep 2013 20:15:36 +0000 (UTC) Rui Paulo wrote: > Author: rpaulo > Date: Sun Sep 1 20:15:35 2013 > New Revision: 255130 > URL: http://svnweb.freebsd.org/changeset/base/255130 > > Log: > Initial support for the Digi ConnectCore(c) i.MX53 / Wi-i.MX53 boards. > > There are many drivers missing, but we can reach single user mode now. > > Hardware graciously donated by Douglas Beattie. > > Added: > head/sys/arm/conf/DIGI-CCWMX53 (contents, props changed) > head/sys/arm/freescale/imx/files.imx53 (contents, props changed) > head/sys/arm/freescale/imx/imx53_machdep.c (contents, props changed) > head/sys/arm/freescale/imx/std.imx53 (contents, props changed) > head/sys/boot/fdt/dts/digi-ccwmx53.dts (contents, props changed) > head/sys/boot/fdt/dts/imx53x.dtsi (contents, props changed) > Modified: > head/sys/arm/freescale/imx/imx51_ccm.c > head/sys/arm/freescale/imx/imx51_gpio.c > head/sys/arm/freescale/imx/imx51_iomux.c > head/sys/arm/freescale/imx/imx51_machdep.c > head/sys/arm/freescale/imx/imx_gpt.c > head/sys/arm/freescale/imx/imx_wdog.c > [[cut]] > Modified: head/sys/arm/freescale/imx/imx51_machdep.c > ============================================================================== > --- head/sys/arm/freescale/imx/imx51_machdep.c Sun Sep 1 19:59:54 2013 (r255129) > +++ head/sys/arm/freescale/imx/imx51_machdep.c Sun Sep 1 20:15:35 2013 (r255130) > @@ -107,7 +107,7 @@ platform_devmap_init(void) > * Map segment where UART1 and UART2 located. > */ > fdt_devmap[0].pd_va = IMX51_DEV_VIRT_BASE + 0x03f00000; > - fdt_devmap[0].pd_pa = 0x73f00000; > + fdt_devmap[0].pd_pa = 0x53f00000; I hope it is just mistake, is it? > fdt_devmap[0].pd_size = 0x00100000; > fdt_devmap[0].pd_prot = VM_PROT_READ | VM_PROT_WRITE; > fdt_devmap[0].pd_cache = PTE_NOCACHE; > [[cut]] And, do you board have own FDT blob? If it so, then better to try to use it. Otherwise, it is better to unify compatible property values, instead of do test for growing list. Thanks a lot for your work! WBW -- Aleksandr Rybalko From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 10:14:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 71D39535; Mon, 2 Sep 2013 10:14:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 506EC2EE9; Mon, 2 Sep 2013 10:14:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82AEQcV053343; Mon, 2 Sep 2013 10:14:26 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82AEQGX053342; Mon, 2 Sep 2013 10:14:26 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309021014.r82AEQGX053342@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 2 Sep 2013 10:14:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255143 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 10:14:26 -0000 Author: glebius Date: Mon Sep 2 10:14:25 2013 New Revision: 255143 URL: http://svnweb.freebsd.org/changeset/base/255143 Log: Merge 1.12 of pf_lb.c from OpenBSD, with some changes. Original commit: date: 2010/02/04 14:10:12; author: sthen; state: Exp; lines: +24 -19; pf_get_sport() picks a random port from the port range specified in a nat rule. It should check to see if it's in-use (i.e. matches an existing PF state), if it is, it cycles sequentially through other ports until it finds a free one. However the check was being done with the state keys the wrong way round so it was never actually finding the state to be in-use. - switch the keys to correct this, avoiding random state collisions with nat. Fixes PR 6300 and problems reported by robert@ and viq. - check pf_get_sport() return code in pf_test(); if port allocation fails the packet should be dropped rather than sent out untranslated. Help/ok claudio@. Some additional changes to 1.12: - We also need to bzero() the key to zero padding, otherwise key won't match. - Collapse two if blocks into one with ||, since both conditions lead to the same processing. - Only naddr changes in the cycle, so move initialization of other fields above the cycle. - s/u_intXX_t/uintXX_t/g PR: kern/181690 Submitted by: Olivier Cochard-Labbé Sponsored by: Nginx, Inc. Modified: head/sys/netpfil/pf/pf_lb.c Modified: head/sys/netpfil/pf/pf_lb.c ============================================================================== --- head/sys/netpfil/pf/pf_lb.c Mon Sep 2 06:41:54 2013 (r255142) +++ head/sys/netpfil/pf/pf_lb.c Mon Sep 2 10:14:25 2013 (r255143) @@ -58,10 +58,9 @@ static struct pf_rule *pf_match_translat int, int, struct pfi_kif *, struct pf_addr *, u_int16_t, struct pf_addr *, uint16_t, int, struct pf_anchor_stackframe *); -static int pf_get_sport(sa_family_t, u_int8_t, struct pf_rule *, - struct pf_addr *, struct pf_addr *, u_int16_t, - struct pf_addr *, u_int16_t*, u_int16_t, u_int16_t, - struct pf_src_node **); +static int pf_get_sport(sa_family_t, uint8_t, struct pf_rule *, + struct pf_addr *, uint16_t, struct pf_addr *, uint16_t, struct pf_addr *, + uint16_t *, uint16_t, uint16_t, struct pf_src_node **); #define mix(a,b,c) \ do { \ @@ -210,13 +209,13 @@ pf_match_translation(struct pf_pdesc *pd static int pf_get_sport(sa_family_t af, u_int8_t proto, struct pf_rule *r, - struct pf_addr *saddr, struct pf_addr *daddr, u_int16_t dport, - struct pf_addr *naddr, u_int16_t *nport, u_int16_t low, u_int16_t high, - struct pf_src_node **sn) + struct pf_addr *saddr, uint16_t sport, struct pf_addr *daddr, + uint16_t dport, struct pf_addr *naddr, uint16_t *nport, uint16_t low, + uint16_t high, struct pf_src_node **sn) { struct pf_state_key_cmp key; struct pf_addr init_addr; - u_int16_t cut; + uint16_t cut; bzero(&init_addr, sizeof(init_addr)); if (pf_map_addr(af, r, saddr, naddr, &init_addr, sn)) @@ -227,34 +226,38 @@ pf_get_sport(sa_family_t af, u_int8_t pr high = 65535; } + bzero(&key, sizeof(key)); + key.af = af; + key.proto = proto; + key.port[0] = dport; + PF_ACPY(&key.addr[0], daddr, key.af); + do { - key.af = af; - key.proto = proto; - PF_ACPY(&key.addr[1], daddr, key.af); - PF_ACPY(&key.addr[0], naddr, key.af); - key.port[1] = dport; + PF_ACPY(&key.addr[1], naddr, key.af); /* * port search; start random, step; * similar 2 portloop in in_pcbbind */ if (!(proto == IPPROTO_TCP || proto == IPPROTO_UDP || - proto == IPPROTO_ICMP)) { - key.port[0] = dport; - if (pf_find_state_all(&key, PF_IN, NULL) == NULL) - return (0); - } else if (low == 0 && high == 0) { - key.port[0] = *nport; - if (pf_find_state_all(&key, PF_IN, NULL) == NULL) + proto == IPPROTO_ICMP) || (low == 0 && high == 0)) { + /* + * XXX bug: icmp states don't use the id on both sides. + * (traceroute -I through nat) + */ + key.port[1] = sport; + if (pf_find_state_all(&key, PF_IN, NULL) == NULL) { + *nport = sport; return (0); + } } else if (low == high) { - key.port[0] = htons(low); + key.port[1] = htons(low); if (pf_find_state_all(&key, PF_IN, NULL) == NULL) { *nport = htons(low); return (0); } } else { - u_int16_t tmp; + uint16_t tmp; if (low > high) { tmp = low; @@ -265,7 +268,7 @@ pf_get_sport(sa_family_t af, u_int8_t pr cut = htonl(arc4random()) % (1 + high - low) + low; /* low <= cut <= high */ for (tmp = cut; tmp <= high; ++(tmp)) { - key.port[0] = htons(tmp); + key.port[1] = htons(tmp); if (pf_find_state_all(&key, PF_IN, NULL) == NULL) { *nport = htons(tmp); @@ -273,7 +276,7 @@ pf_get_sport(sa_family_t af, u_int8_t pr } } for (tmp = cut - 1; tmp >= low; --(tmp)) { - key.port[0] = htons(tmp); + key.port[1] = htons(tmp); if (pf_find_state_all(&key, PF_IN, NULL) == NULL) { *nport = htons(tmp); @@ -551,8 +554,8 @@ pf_get_translation(struct pf_pdesc *pd, switch (r->action) { case PF_NAT: - if (pf_get_sport(pd->af, pd->proto, r, saddr, daddr, dport, - naddr, nport, r->rpool.proxy_port[0], + if (pf_get_sport(pd->af, pd->proto, r, saddr, sport, daddr, + dport, naddr, nport, r->rpool.proxy_port[0], r->rpool.proxy_port[1], sn)) { DPFPRINTF(PF_DEBUG_MISC, ("pf: NAT proxy port allocation (%u-%u) failed\n", From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 10:44:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1D021532; Mon, 2 Sep 2013 10:44:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E5AAB215A; Mon, 2 Sep 2013 10:44:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82AisdK070835; Mon, 2 Sep 2013 10:44:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82AisqQ070834; Mon, 2 Sep 2013 10:44:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201309021044.r82AisqQ070834@svn.freebsd.org> From: Alexander Motin Date: Mon, 2 Sep 2013 10:44:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255144 - head/sys/geom/eli X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 10:44:55 -0000 Author: mav Date: Mon Sep 2 10:44:54 2013 New Revision: 255144 URL: http://svnweb.freebsd.org/changeset/base/255144 Log: Make ELI destruction (including orphanization) less aggressive, making it always wait for provider close. Old algorithm was reported to cause NULL dereference panic on attempt to close provider after softc destruction. If not global workaroung in GEOM, that could even cause destruction with requests still in flight. Modified: head/sys/geom/eli/g_eli.c Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Mon Sep 2 10:14:25 2013 (r255143) +++ head/sys/geom/eli/g_eli.c Mon Sep 2 10:44:54 2013 (r255144) @@ -621,21 +621,19 @@ end: * to close it when this situation occur. */ static void -g_eli_last_close(struct g_eli_softc *sc) +g_eli_last_close(void *arg, int flags __unused) { struct g_geom *gp; - struct g_provider *pp; - char ppname[64]; + char gpname[64]; int error; g_topology_assert(); - gp = sc->sc_geom; - pp = LIST_FIRST(&gp->provider); - strlcpy(ppname, pp->name, sizeof(ppname)); - error = g_eli_destroy(sc, TRUE); + gp = arg; + strlcpy(gpname, gp->name, sizeof(gpname)); + error = g_eli_destroy(gp->softc, TRUE); KASSERT(error == 0, ("Cannot detach %s on last close (error=%d).", - ppname, error)); - G_ELI_DEBUG(0, "Detached %s on last close.", ppname); + gpname, error)); + G_ELI_DEBUG(0, "Detached %s on last close.", gpname); } int @@ -665,7 +663,7 @@ g_eli_access(struct g_provider *pp, int */ if ((sc->sc_flags & G_ELI_FLAG_RW_DETACH) || (sc->sc_flags & G_ELI_FLAG_WOPEN)) { - g_eli_last_close(sc); + g_post_event(g_eli_last_close, gp, M_WAITOK, NULL); } return (0); } @@ -916,6 +914,10 @@ g_eli_destroy(struct g_eli_softc *sc, bo if (force) { G_ELI_DEBUG(1, "Device %s is still open, so it " "cannot be definitely removed.", pp->name); + sc->sc_flags |= G_ELI_FLAG_RW_DETACH; + gp->access = g_eli_access; + g_wither_provider(pp, ENXIO); + return (EBUSY); } else { G_ELI_DEBUG(1, "Device %s is still open (r%dw%de%d).", pp->name, From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 12:37:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0E10C7E1; Mon, 2 Sep 2013 12:37:34 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F04802BF9; Mon, 2 Sep 2013 12:37:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82CbX4F036485; Mon, 2 Sep 2013 12:37:33 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82CbX3n036484; Mon, 2 Sep 2013 12:37:33 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201309021237.r82CbX3n036484@svn.freebsd.org> From: Ed Maste Date: Mon, 2 Sep 2013 12:37:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255146 - head/lib/libexecinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 12:37:34 -0000 Author: emaste Date: Mon Sep 2 12:37:33 2013 New Revision: 255146 URL: http://svnweb.freebsd.org/changeset/base/255146 Log: libexecinfo compatibility with devel/libexecinfo port 1. Match shlib number 2. Add libelf dependency Suggested by: bapt[1] Modified: head/lib/libexecinfo/Makefile Modified: head/lib/libexecinfo/Makefile ============================================================================== --- head/lib/libexecinfo/Makefile Mon Sep 2 11:35:55 2013 (r255145) +++ head/lib/libexecinfo/Makefile Mon Sep 2 12:37:33 2013 (r255146) @@ -3,12 +3,16 @@ LIBEXECINFO= ${.CURDIR}/../../contrib/libexecinfo LIB= execinfo +SHLIB_MAJOR= 1 .PATH: ${LIBEXECINFO} INCS= execinfo.h symtab.h unwind.h SRCS= backtrace.c symtab.c unwind.c +DPADD= ${LIBELF} +LDADD= -lelf + MAN= backtrace.3 MLINKS+= backtrace.3 backtrace_symbols.3 From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 17:07:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F27E452E; Mon, 2 Sep 2013 17:07:46 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DFC4622AC; Mon, 2 Sep 2013 17:07:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82H7kmp098566; Mon, 2 Sep 2013 17:07:46 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82H7kJd098565; Mon, 2 Sep 2013 17:07:46 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201309021707.r82H7kJd098565@svn.freebsd.org> From: Rui Paulo Date: Mon, 2 Sep 2013 17:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255151 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 17:07:47 -0000 Author: rpaulo Date: Mon Sep 2 17:07:46 2013 New Revision: 255151 URL: http://svnweb.freebsd.org/changeset/base/255151 Log: Revert accidental commit. Modified: head/sys/arm/freescale/imx/imx51_machdep.c Modified: head/sys/arm/freescale/imx/imx51_machdep.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_machdep.c Mon Sep 2 16:20:10 2013 (r255150) +++ head/sys/arm/freescale/imx/imx51_machdep.c Mon Sep 2 17:07:46 2013 (r255151) @@ -107,7 +107,7 @@ platform_devmap_init(void) * Map segment where UART1 and UART2 located. */ fdt_devmap[0].pd_va = IMX51_DEV_VIRT_BASE + 0x03f00000; - fdt_devmap[0].pd_pa = 0x53f00000; + fdt_devmap[0].pd_pa = 0x73f00000; fdt_devmap[0].pd_size = 0x00100000; fdt_devmap[0].pd_prot = VM_PROT_READ | VM_PROT_WRITE; fdt_devmap[0].pd_cache = PTE_NOCACHE; From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 17:10:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 589E9873; Mon, 2 Sep 2013 17:10:40 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from felyko.com (felyko.com [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 41F92230F; Mon, 2 Sep 2013 17:10:40 +0000 (UTC) Received: from [IPv6:2601:9:4d00:119:fc2d:d8a4:158d:d65] (unknown [IPv6:2601:9:4d00:119:fc2d:d8a4:158d:d65]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 5213339821; Mon, 2 Sep 2013 10:10:39 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r255130 - in head/sys: arm/conf arm/freescale/imx boot/fdt/dts From: Rui Paulo In-Reply-To: <20130902112652.870eff18955c9b28fee978df@ddteam.net> Date: Mon, 2 Sep 2013 10:10:39 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201309012015.r81KFaa9056648@svn.freebsd.org> <20130902112652.870eff18955c9b28fee978df@ddteam.net> To: Aleksandr Rybalko X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 17:10:40 -0000 On 2 Sep 2013, at 01:26, Aleksandr Rybalko wrote: > Hello Rui! >=20 > On Sun, 1 Sep 2013 20:15:36 +0000 (UTC) > Rui Paulo wrote: >=20 >> Author: rpaulo >> Date: Sun Sep 1 20:15:35 2013 >> New Revision: 255130 >> URL: http://svnweb.freebsd.org/changeset/base/255130 >>=20 >> Log: >> Initial support for the Digi ConnectCore(c) i.MX53 / Wi-i.MX53 = boards. >>=20 >> There are many drivers missing, but we can reach single user mode = now. >>=20 >> Hardware graciously donated by Douglas Beattie. >>=20 >> Added: >> head/sys/arm/conf/DIGI-CCWMX53 (contents, props changed) >> head/sys/arm/freescale/imx/files.imx53 (contents, props changed) >> head/sys/arm/freescale/imx/imx53_machdep.c (contents, props = changed) >> head/sys/arm/freescale/imx/std.imx53 (contents, props changed) >> head/sys/boot/fdt/dts/digi-ccwmx53.dts (contents, props changed) >> head/sys/boot/fdt/dts/imx53x.dtsi (contents, props changed) >> Modified: >> head/sys/arm/freescale/imx/imx51_ccm.c >> head/sys/arm/freescale/imx/imx51_gpio.c >> head/sys/arm/freescale/imx/imx51_iomux.c >> head/sys/arm/freescale/imx/imx51_machdep.c >> head/sys/arm/freescale/imx/imx_gpt.c >> head/sys/arm/freescale/imx/imx_wdog.c >>=20 >=20 > [[cut]] >=20 >> Modified: head/sys/arm/freescale/imx/imx51_machdep.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/arm/freescale/imx/imx51_machdep.c Sun Sep 1 = 19:59:54 2013 (r255129) >> +++ head/sys/arm/freescale/imx/imx51_machdep.c Sun Sep 1 = 20:15:35 2013 (r255130) >> @@ -107,7 +107,7 @@ platform_devmap_init(void) >> * Map segment where UART1 and UART2 located. >> */ >> fdt_devmap[0].pd_va =3D IMX51_DEV_VIRT_BASE + 0x03f00000; >> - fdt_devmap[0].pd_pa =3D 0x73f00000; >> + fdt_devmap[0].pd_pa =3D 0x53f00000; >=20 > I hope it is just mistake, is it? Yes, fixed. >=20 >> fdt_devmap[0].pd_size =3D 0x00100000; >> fdt_devmap[0].pd_prot =3D VM_PROT_READ | VM_PROT_WRITE; >> fdt_devmap[0].pd_cache =3D PTE_NOCACHE; >>=20 >=20 > [[cut]] >=20 > And, do you board have own FDT blob? > If it so, then better to try to use it. Otherwise, it is better to > unify compatible property values, instead of do test for growing list. The FDT blob is not relevant to this since console.c is not using any = FDT functions. This is just a debugging aid for the platform bring up = until I get uart_dev_imx.c working correctly. That said, eventually this will go away. The i.MX51 port you did has the = same problem, anyway. -- Rui Paulo From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 18:25:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9A60B747; Mon, 2 Sep 2013 18:25:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8828528C3; Mon, 2 Sep 2013 18:25:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82IPIvs046034; Mon, 2 Sep 2013 18:25:18 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82IPIwi046033; Mon, 2 Sep 2013 18:25:18 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201309021825.r82IPIwi046033@svn.freebsd.org> From: Eitan Adler Date: Mon, 2 Sep 2013 18:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255152 - head/sys/dev/atkbdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 18:25:18 -0000 Author: eadler Date: Mon Sep 2 18:25:18 2013 New Revision: 255152 URL: http://svnweb.freebsd.org/changeset/base/255152 Log: synaptics and trackpoint support are stable enough to be on by default. Eventually both options should be removed. Reviewed by: dumbbell Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Mon Sep 2 17:07:46 2013 (r255151) +++ head/sys/dev/atkbdc/psm.c Mon Sep 2 18:25:18 2013 (r255152) @@ -375,10 +375,10 @@ static devclass_t psm_devclass; static int tap_enabled = -1; TUNABLE_INT("hw.psm.tap_enabled", &tap_enabled); -static int synaptics_support = 0; +static int synaptics_support = 1; TUNABLE_INT("hw.psm.synaptics_support", &synaptics_support); -static int trackpoint_support = 0; +static int trackpoint_support = 1; TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support); static int verbose = PSM_DEBUG; From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 19:15:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 73B474B0; Mon, 2 Sep 2013 19:15:21 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 535D52BB3; Mon, 2 Sep 2013 19:15:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82JFLNv075759; Mon, 2 Sep 2013 19:15:21 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82JFKO1075757; Mon, 2 Sep 2013 19:15:20 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201309021915.r82JFKO1075757@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Mon, 2 Sep 2013 19:15:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255153 - in head/sys: dev/atkbdc sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 19:15:21 -0000 Author: dumbbell Date: Mon Sep 2 19:15:20 2013 New Revision: 255153 URL: http://svnweb.freebsd.org/changeset/base/255153 Log: psm: Add support for middle and extended buttons on Synaptics touchpads PR: kern/170834 Submitted by: Brandon Gooch Tested by: Artyom Mirgorodskiy MFC after: 1 month Modified: head/sys/dev/atkbdc/psm.c head/sys/sys/mouse.h Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Mon Sep 2 18:25:18 2013 (r255152) +++ head/sys/dev/atkbdc/psm.c Mon Sep 2 19:15:20 2013 (r255153) @@ -2601,14 +2601,14 @@ proc_synaptics(struct psm_softc *sc, pac static int guest_buttons; int w, x0, y0; - /* TouchPad PS/2 absolute mode message format + /* TouchPad PS/2 absolute mode message format with capFourButtons: * * Bits: 7 6 5 4 3 2 1 0 (LSB) * ------------------------------------------------ * ipacket[0]: 1 0 W3 W2 0 W1 R L * ipacket[1]: Yb Ya Y9 Y8 Xb Xa X9 X8 * ipacket[2]: Z7 Z6 Z5 Z4 Z3 Z2 Z1 Z0 - * ipacket[3]: 1 1 Yc Xc 0 W0 D U + * ipacket[3]: 1 1 Yc Xc 0 W0 D^R U^L * ipacket[4]: X7 X6 X5 X4 X3 X2 X1 X0 * ipacket[5]: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 * @@ -2622,6 +2622,21 @@ proc_synaptics(struct psm_softc *sc, pac * Y: y position * Z: pressure * + * Without capFourButtons but with nExtendeButtons and/or capMiddle + * + * Bits: 7 6 5 4 3 2 1 0 (LSB) + * ------------------------------------------------------ + * ipacket[3]: 1 1 Yc Xc 0 W0 E^R M^L + * ipacket[4]: X7 X6 X5 X4 X3|b7 X2|b5 X1|b3 X0|b1 + * ipacket[5]: Y7 Y6 Y5 Y4 Y3|b8 Y2|b6 Y1|b4 Y0|b2 + * + * Legend: + * M: Middle physical mouse button + * E: Extended mouse buttons reported instead of low bits of X and Y + * b1-b8: Extended mouse buttons + * Only ((nExtendedButtons + 1) >> 1) bits are used in packet + * 4 and 5, for reading X and Y value they should be zeroed. + * * Absolute reportable limits: 0 - 6143. * Typical bezel limits: 1472 - 5472. * Typical edge marings: 1632 - 5312. @@ -2675,8 +2690,10 @@ proc_synaptics(struct psm_softc *sc, pac w = 4; } - /* Handle packets from the guest device */ - /* XXX Documentation? */ + /* + * Handle packets from the guest device. See: + * Synaptics PS/2 TouchPad Interfacing Guide, Section 5.1 + */ if (w == 3 && sc->synhw.capPassthrough) { *x = ((pb->ipacket[1] & 0x10) ? pb->ipacket[4] - 256 : pb->ipacket[4]); @@ -2704,36 +2721,49 @@ proc_synaptics(struct psm_softc *sc, pac touchpad_buttons |= MOUSE_BUTTON3DOWN; if (sc->synhw.capExtended && sc->synhw.capFourButtons) { - if ((pb->ipacket[3] & 0x01) && (pb->ipacket[0] & 0x01) == 0) + if ((pb->ipacket[3] ^ pb->ipacket[0]) & 0x01) touchpad_buttons |= MOUSE_BUTTON4DOWN; - if ((pb->ipacket[3] & 0x02) && (pb->ipacket[0] & 0x02) == 0) + if ((pb->ipacket[3] ^ pb->ipacket[0]) & 0x02) touchpad_buttons |= MOUSE_BUTTON5DOWN; - } - - /* - * In newer pads - bit 0x02 in the third byte of - * the packet indicates that we have an extended - * button press. - */ - /* XXX Documentation? */ - if (pb->ipacket[3] & 0x02) { - /* - * if directional_scrolls is not 1, we treat any of - * the scrolling directions as middle-click. - */ - if (sc->syninfo.directional_scrolls) { - if (pb->ipacket[4] & 0x01) - touchpad_buttons |= MOUSE_BUTTON4DOWN; - if (pb->ipacket[5] & 0x01) - touchpad_buttons |= MOUSE_BUTTON5DOWN; - if (pb->ipacket[4] & 0x02) - touchpad_buttons |= MOUSE_BUTTON6DOWN; - if (pb->ipacket[5] & 0x02) - touchpad_buttons |= MOUSE_BUTTON7DOWN; - } else { - if ((pb->ipacket[4] & 0x0F) || - (pb->ipacket[5] & 0x0F)) + } else if (sc->synhw.capExtended && sc->synhw.capMiddle) { + /* Middle Button */ + if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01) + touchpad_buttons |= MOUSE_BUTTON2DOWN; + } else if (sc->synhw.capExtended && (sc->synhw.nExtendedButtons > 0)) { + /* Extended Buttons */ + if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x02) { + if (sc->syninfo.directional_scrolls) { + if (pb->ipacket[4] & 0x01) + touchpad_buttons |= MOUSE_BUTTON4DOWN; + if (pb->ipacket[5] & 0x01) + touchpad_buttons |= MOUSE_BUTTON5DOWN; + if (pb->ipacket[4] & 0x02) + touchpad_buttons |= MOUSE_BUTTON6DOWN; + if (pb->ipacket[5] & 0x02) + touchpad_buttons |= MOUSE_BUTTON7DOWN; + } else { touchpad_buttons |= MOUSE_BUTTON2DOWN; + } + + /* + * Zero out bits used by extended buttons to avoid + * misinterpretation of the data absolute position. + * + * The bits represented by + * + * (nExtendedButtons + 1) >> 1 + * + * will be masked out in both bytes. + * The mask for n bits is computed with the formula + * + * (1 << n) - 1 + */ + int maskedbits = 0; + int mask = 0; + maskedbits = (sc->synhw.nExtendedButtons + 1) >> 1; + mask = (1 << maskedbits) - 1; + pb->ipacket[4] &= ~(mask); + pb->ipacket[5] &= ~(mask); } } @@ -4440,15 +4470,20 @@ enable_synaptics(KBDC kbdc, struct psm_s buttons = 0; synhw.capExtended = (status[0] & 0x80) != 0; if (synhw.capExtended) { - synhw.capPassthrough = (status[2] & 0x80) != 0; - synhw.capSleep = (status[2] & 0x10) != 0; - synhw.capFourButtons = (status[2] & 0x08) != 0; - synhw.capMultiFinger = (status[2] & 0x02) != 0; - synhw.capPalmDetect = (status[2] & 0x01) != 0; + synhw.nExtendedQueries = (status[0] & 0x70) != 0; + synhw.capMiddle = (status[0] & 0x04) != 0; + synhw.capPassthrough = (status[2] & 0x80) != 0; + synhw.capSleep = (status[2] & 0x10) != 0; + synhw.capFourButtons = (status[2] & 0x08) != 0; + synhw.capMultiFinger = (status[2] & 0x02) != 0; + synhw.capPalmDetect = (status[2] & 0x01) != 0; if (verbose >= 2) { printf(" Extended capabilities:\n"); printf(" capExtended: %d\n", synhw.capExtended); + printf(" capMiddle: %d\n", synhw.capMiddle); + printf(" nExtendedQueries: %d\n", + synhw.nExtendedQueries); printf(" capPassthrough: %d\n", synhw.capPassthrough); printf(" capSleep: %d\n", synhw.capSleep); printf(" capFourButtons: %d\n", synhw.capFourButtons); @@ -4457,16 +4492,27 @@ enable_synaptics(KBDC kbdc, struct psm_s } /* - * If we have bits set in status[0] & 0x70, then we can load + * If nExtendedQueries is 1 or greater, then the TouchPad + * supports this number of extended queries. We can load * more information about buttons using query 0x09. */ - if ((status[0] & 0x70) != 0) { + if (synhw.capExtended && synhw.nExtendedQueries) { if (mouse_ext_command(kbdc, 0x09) == 0) return (FALSE); if (get_mouse_status(kbdc, status, 0, 3) != 3) return (FALSE); - buttons = (status[1] & 0xf0) >> 4; + synhw.nExtendedButtons = (status[1] & 0xf0) >> 4; + /* + * Add the number of extended buttons to the total + * button support count, including the middle button + * if capMiddle support bit is set. + */ + buttons = synhw.nExtendedButtons + synhw.capMiddle; } else + /* + * If the capFourButtons support bit is set, + * add a fourth button to the total button count. + */ buttons = synhw.capFourButtons ? 1 : 0; } if (verbose >= 2) { @@ -4477,6 +4523,12 @@ enable_synaptics(KBDC kbdc, struct psm_s } /* + * Add the default number of 3 buttons to the total + * count of supported buttons reported above. + */ + buttons += 3; + + /* * Read the mode byte. * * XXX: Note the Synaptics documentation also defines the first @@ -4503,7 +4555,6 @@ enable_synaptics(KBDC kbdc, struct psm_s /* "Commit" the Set Mode Byte command sent above. */ set_mouse_sampling_rate(kbdc, 20); - buttons += 3; VLOG(3, (LOG_DEBUG, "synaptics: END init (%d buttons)\n", buttons)); if (sc != NULL) { Modified: head/sys/sys/mouse.h ============================================================================== --- head/sys/sys/mouse.h Mon Sep 2 18:25:18 2013 (r255152) +++ head/sys/sys/mouse.h Mon Sep 2 19:15:20 2013 (r255153) @@ -101,12 +101,15 @@ typedef struct synapticshw { int capPen; int infoSimplC; int infoGeometry; + int nExtendedButtons; int capExtended; + int nExtendedQueries; + int capMiddle; + int capPassthrough; int capSleep; int capFourButtons; int capMultiFinger; int capPalmDetect; - int capPassthrough; } synapticshw_t; /* iftype */ From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 19:16:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4DC6EBCE; Mon, 2 Sep 2013 19:16:35 +0000 (UTC) (envelope-from ray@freebsd.org) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 06C902BDC; Mon, 2 Sep 2013 19:16:34 +0000 (UTC) Received: from rnote.ddteam.net (150-124-135-95.pool.ukrtel.net [95.135.124.150]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 20355C492D; Mon, 2 Sep 2013 22:16:33 +0300 (EEST) Date: Mon, 2 Sep 2013 22:16:15 +0300 From: Aleksandr Rybalko To: Rui Paulo Subject: Re: svn commit: r255130 - in head/sys: arm/conf arm/freescale/imx boot/fdt/dts Message-Id: <20130902221615.4f88fb27.ray@freebsd.org> In-Reply-To: References: <201309012015.r81KFaa9056648@svn.freebsd.org> <20130902112652.870eff18955c9b28fee978df@ddteam.net> Organization: FreeBSD.ORG X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) X-Operating-System: FreeBSD Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 19:16:35 -0000 On Mon, 2 Sep 2013 10:10:39 -0700 Rui Paulo wrote: > On 2 Sep 2013, at 01:26, Aleksandr Rybalko wrote: > > > Hello Rui! > > > > On Sun, 1 Sep 2013 20:15:36 +0000 (UTC) > > Rui Paulo wrote: > > > >> Author: rpaulo > >> Date: Sun Sep 1 20:15:35 2013 > >> New Revision: 255130 > >> URL: http://svnweb.freebsd.org/changeset/base/255130 > >> > >> Log: > >> Initial support for the Digi ConnectCore(c) i.MX53 / Wi-i.MX53 > >> boards. > >> > >> There are many drivers missing, but we can reach single user mode > >> now. > >> > >> Hardware graciously donated by Douglas Beattie. > >> > >> Added: > >> head/sys/arm/conf/DIGI-CCWMX53 (contents, props changed) > >> head/sys/arm/freescale/imx/files.imx53 (contents, props changed) > >> head/sys/arm/freescale/imx/imx53_machdep.c (contents, props > >> changed) head/sys/arm/freescale/imx/std.imx53 (contents, props > >> changed) head/sys/boot/fdt/dts/digi-ccwmx53.dts (contents, props > >> changed) head/sys/boot/fdt/dts/imx53x.dtsi (contents, props > >> changed) Modified: > >> head/sys/arm/freescale/imx/imx51_ccm.c > >> head/sys/arm/freescale/imx/imx51_gpio.c > >> head/sys/arm/freescale/imx/imx51_iomux.c > >> head/sys/arm/freescale/imx/imx51_machdep.c > >> head/sys/arm/freescale/imx/imx_gpt.c > >> head/sys/arm/freescale/imx/imx_wdog.c > >> > > > > [[cut]] > > > >> Modified: head/sys/arm/freescale/imx/imx51_machdep.c > >> ============================================================================== > >> --- head/sys/arm/freescale/imx/imx51_machdep.c Sun Sep 1 > >> 19:59:54 2013 (r255129) +++ > >> head/sys/arm/freescale/imx/imx51_machdep.c Sun Sep 1 > >> 20:15:35 2013 (r255130) @@ -107,7 +107,7 @@ > >> platform_devmap_init(void) > >> * Map segment where UART1 and UART2 located. > >> */ > >> fdt_devmap[0].pd_va = IMX51_DEV_VIRT_BASE + 0x03f00000; > >> - fdt_devmap[0].pd_pa = 0x73f00000; > >> + fdt_devmap[0].pd_pa = 0x53f00000; > > > > I hope it is just mistake, is it? > > Yes, fixed. Thanks > > > > >> fdt_devmap[0].pd_size = 0x00100000; > >> fdt_devmap[0].pd_prot = VM_PROT_READ | VM_PROT_WRITE; > >> fdt_devmap[0].pd_cache = PTE_NOCACHE; > >> > > > > [[cut]] > > > > And, do you board have own FDT blob? > > If it so, then better to try to use it. Otherwise, it is better to > > unify compatible property values, instead of do test for growing > > list. > > The FDT blob is not relevant to this since console.c is not using any > FDT functions. This is just a debugging aid for the platform bring up > until I get uart_dev_imx.c working correctly. That said, eventually > this will go away. The i.MX51 port you did has the same problem, > anyway. I'm not about console, just want to look what vendors start to supply with i.mx devices. > > -- > Rui Paulo > -- Aleksandr Rybalko From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 19:24:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BDB5EF9D; Mon, 2 Sep 2013 19:24:17 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8198C2C93; Mon, 2 Sep 2013 19:24:17 +0000 (UTC) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=[192.168.1.176]) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VGZjT-000NTo-Gg; Mon, 02 Sep 2013 21:24:16 +0200 Message-ID: <5224E5DE.2090301@FreeBSD.org> Date: Mon, 02 Sep 2013 21:24:14 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Jung-uk Kim Subject: Re: svn commit: r255153 - in head/sys: dev/atkbdc sys References: <201309021915.r82JFKO1075757@svn.freebsd.org> In-Reply-To: <201309021915.r82JFKO1075757@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 19:24:17 -0000 Le 02/09/2013 21:15, Jean-Sebastien Pedron a écrit : > Author: dumbbell > Date: Mon Sep 2 19:15:20 2013 > New Revision: 255153 > URL: http://svnweb.freebsd.org/changeset/base/255153 > > Log: > psm: Add support for middle and extended buttons on Synaptics touchpads > > PR: kern/170834 > Submitted by: Brandon Gooch > Tested by: Artyom Mirgorodskiy > MFC after: 1 month Hello Jung-uk, I had this patch in my working copy for a few days and decided to commit it. But as I was about to reply to the thread on freebsd-x11@, I read the mail about ABI breakage; a mail I didn't notice before the commit... And you're right, the structure grows and members are shuffled. I guess the patch won't make it to 9.2 anyway. But I'd like to see it into 10 because it helps several people. Do you think a note in UPDATING would be enough? -- Jean-Sébastien Pédron From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 19:29:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 74655215; Mon, 2 Sep 2013 19:29:48 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x234.google.com (mail-we0-x234.google.com [IPv6:2a00:1450:400c:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 600392CD7; Mon, 2 Sep 2013 19:29:47 +0000 (UTC) Received: by mail-we0-f180.google.com with SMTP id q56so949722wes.25 for ; Mon, 02 Sep 2013 12:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=d3apgZN4RHu0tx1FO9aMk/yhCiaj8+gtTWEerYh0dDw=; b=F8YVBHNDQXgaJ1S5zUqIu58Xq6lxf9qTpi09JaQIvNXlwISu/NVagfEEjmWDJEIrDp oN0jOLhb1yxhv4Ga7FdjZpgPSeLEtu1SnPFxqkKnbJ2guj7nBI0XJYDrEsP7249XjhgI 6JMXLoV4Zk1rfWZtaf1+dM7JAxuKP/XdlNC+pokaSIx8WAoC8Eh86ltH/Q1Caa9c407o +AVNSg/oFaPs+r23y/zi0HfU8EMKBmAiWvz1ciXX2S/0JdITNt+z5xGZFPrS3WWLHFcN hinhWR6cW2dhgT1BPc1cvWJPkSnfSGT79qaNh/P7Np+274DVC+OcHKtSp5oLCUTFyK9r RatA== MIME-Version: 1.0 X-Received: by 10.180.20.15 with SMTP id j15mr1938759wie.0.1378150185571; Mon, 02 Sep 2013 12:29:45 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.146.2 with HTTP; Mon, 2 Sep 2013 12:29:45 -0700 (PDT) In-Reply-To: <5224E5DE.2090301@FreeBSD.org> References: <201309021915.r82JFKO1075757@svn.freebsd.org> <5224E5DE.2090301@FreeBSD.org> Date: Mon, 2 Sep 2013 12:29:45 -0700 X-Google-Sender-Auth: Yettr1zeLpdk2R5qQS6uQ_u71_k Message-ID: Subject: Re: svn commit: r255153 - in head/sys: dev/atkbdc sys From: Adrian Chadd To: =?ISO-8859-1?Q?Jean=2DS=E9bastien_P=E9dron?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Jung-uk Kim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 19:29:48 -0000 .. right, so you changed the structure layout without say, just adding to the end of said structure? :-) Yeah, I think you need to send out something. The binary packages for x11 need to be updated too or things will be odd. -adrian On 2 September 2013 12:24, Jean-S=E9bastien P=E9dron = wrote: > Le 02/09/2013 21:15, Jean-Sebastien Pedron a =E9crit : > > Author: dumbbell >> Date: Mon Sep 2 19:15:20 2013 >> New Revision: 255153 >> URL: http://svnweb.freebsd.org/**changeset/base/255153 >> >> Log: >> psm: Add support for middle and extended buttons on Synaptics touchpa= ds >> >> PR: kern/170834 >> Submitted by: Brandon Gooch >> Tested by: Artyom Mirgorodskiy >> MFC after: 1 month >> > > Hello Jung-uk, > > I had this patch in my working copy for a few days and decided to commit > it. But as I was about to reply to the thread on freebsd-x11@, I read the > mail about ABI breakage; a mail I didn't notice before the commit... > > And you're right, the structure grows and members are shuffled. > > I guess the patch won't make it to 9.2 anyway. But I'd like to see it int= o > 10 because it helps several people. Do you think a note in UPDATING would > be enough? > > -- > Jean-S=E9bastien P=E9dron > From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 19:49:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 888E58B6; Mon, 2 Sep 2013 19:49:19 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 734A92E12; Mon, 2 Sep 2013 19:49:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82JnJoE094960; Mon, 2 Sep 2013 19:49:19 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82JnJ8S094959; Mon, 2 Sep 2013 19:49:19 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201309021949.r82JnJ8S094959@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Mon, 2 Sep 2013 19:49:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255154 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 19:49:19 -0000 Author: dumbbell Date: Mon Sep 2 19:49:18 2013 New Revision: 255154 URL: http://svnweb.freebsd.org/changeset/base/255154 Log: sys/mouse.h: Move members introduced in r255153 to end of struct synapticshw I didn't know this structure was public and didn't pay enough attention... Modified: head/sys/sys/mouse.h Modified: head/sys/sys/mouse.h ============================================================================== --- head/sys/sys/mouse.h Mon Sep 2 19:15:20 2013 (r255153) +++ head/sys/sys/mouse.h Mon Sep 2 19:49:18 2013 (r255154) @@ -101,15 +101,15 @@ typedef struct synapticshw { int capPen; int infoSimplC; int infoGeometry; - int nExtendedButtons; int capExtended; - int nExtendedQueries; - int capMiddle; - int capPassthrough; int capSleep; int capFourButtons; int capMultiFinger; int capPalmDetect; + int capPassthrough; + int capMiddle; + int nExtendedButtons; + int nExtendedQueries; } synapticshw_t; /* iftype */ From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 19:53:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 14530AC1; Mon, 2 Sep 2013 19:53:26 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CAE342E78; Mon, 2 Sep 2013 19:53:25 +0000 (UTC) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=[192.168.1.176]) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VGaBf-000O1k-OB; Mon, 02 Sep 2013 21:53:24 +0200 Message-ID: <5224ECB2.9070309@FreeBSD.org> Date: Mon, 02 Sep 2013 21:53:22 +0200 From: =?ISO-8859-1?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r255153 - in head/sys: dev/atkbdc sys References: <201309021915.r82JFKO1075757@svn.freebsd.org> <5224E5DE.2090301@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 19:53:26 -0000 Le 02/09/2013 21:29, Adrian Chadd a écrit : > .. right, so you changed the structure layout without say, just adding > to the end of said structure? :-) Yes, I took the patch as-is from the PR, as I don't have the hardware to test it and didn't know this struct was public. And as it worked for several people... > Yeah, I think you need to send out something. The binary packages for > x11 need to be updated too or things will be odd. What's the correct procedure for such changes? After a quick search, xf86-input-synaptics is using it. I need to: o add a note to UPDATING, at least mentionning that xf86-input-synaptics must be rebuilt o send a mail to freebsd-x11@ to warn users o what about binary packages? o something else? I see now that the structure is documented in psm(4) too... -- Jean-Sébastien Pédron From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 20:44:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A596257A; Mon, 2 Sep 2013 20:44:19 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 91C7B2249; Mon, 2 Sep 2013 20:44:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82KiJug030021; Mon, 2 Sep 2013 20:44:19 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82KiJpi030020; Mon, 2 Sep 2013 20:44:19 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201309022044.r82KiJpi030020@svn.freebsd.org> From: Hiroki Sato Date: Mon, 2 Sep 2013 20:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255156 - head/usr.sbin/rtadvd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 20:44:19 -0000 Author: hrs Date: Mon Sep 2 20:44:19 2013 New Revision: 255156 URL: http://svnweb.freebsd.org/changeset/base/255156 Log: Ignore if the interface is not IPv6-capable. Spotted by: rpaulo Modified: head/usr.sbin/rtadvd/if.c Modified: head/usr.sbin/rtadvd/if.c ============================================================================== --- head/usr.sbin/rtadvd/if.c Mon Sep 2 20:35:39 2013 (r255155) +++ head/usr.sbin/rtadvd/if.c Mon Sep 2 20:44:19 2013 (r255156) @@ -394,8 +394,8 @@ update_ifinfo_nd_flags(struct ifinfo *if error = ioctl(s, SIOCGIFINFO_IN6, (caddr_t)&nd); if (error) { close(s); - syslog(LOG_ERR, - "<%s> ioctl() failed.", __func__); + if (errno != EPFNOSUPPORT) + syslog(LOG_ERR, "<%s> ioctl() failed.", __func__); return (1); } ifi->ifi_nd_flags = nd.ndi.flags; From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 21:57:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7BB8A253; Mon, 2 Sep 2013 21:57:47 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 686A428C2; Mon, 2 Sep 2013 21:57:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82Lvllt073971; Mon, 2 Sep 2013 21:57:47 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82Lvkmq073964; Mon, 2 Sep 2013 21:57:46 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309022157.r82Lvkmq073964@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 2 Sep 2013 21:57:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255157 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 21:57:47 -0000 Author: jilles Date: Mon Sep 2 21:57:46 2013 New Revision: 255157 URL: http://svnweb.freebsd.org/changeset/base/255157 Log: sh: Fix race condition with signals and wait or set -T. The change in r238888 was incomplete. It was still possible for a trapped signal to arrive before the shell went to sleep (sigsuspend()) because a check was missing or because the signal arrived before in_waitcmd was set. On SMP, this bug sometimes caused the builtins/wait4.0 test to take 1 second to execute; it then might or might not fail. On UP, the test almost always failed. Modified: head/bin/sh/jobs.c head/bin/sh/jobs.h head/bin/sh/trap.c head/bin/sh/trap.h Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Mon Sep 2 20:44:19 2013 (r255156) +++ head/bin/sh/jobs.c Mon Sep 2 21:57:46 2013 (r255157) @@ -83,13 +83,12 @@ static struct job *bgjob = NULL; /* last static struct job *jobmru; /* most recently used job list */ static pid_t initialpgrp; /* pgrp of shell on invocation */ #endif -int in_waitcmd = 0; /* are we in waitcmd()? */ -volatile sig_atomic_t breakwaitcmd = 0; /* should wait be terminated? */ static int ttyfd = -1; /* mode flags for dowait */ #define DOWAIT_BLOCK 0x1 /* wait until a child exits */ -#define DOWAIT_SIG 0x2 /* if DOWAIT_BLOCK, abort on signals */ +#define DOWAIT_SIG 0x2 /* if DOWAIT_BLOCK, abort on SIGINT/SIGQUIT */ +#define DOWAIT_SIG_ANY 0x4 /* if DOWAIT_SIG, abort on any signal */ #if JOBS static void restartjob(struct job *); @@ -484,7 +483,7 @@ waitcmd(int argc __unused, char **argv _ static int waitcmdloop(struct job *job) { - int status, retval; + int status, retval, sig; struct job *jp; /* @@ -492,7 +491,6 @@ waitcmdloop(struct job *job) * received. */ - in_waitcmd++; do { if (job != NULL) { if (job->state == JOBDONE) { @@ -508,7 +506,6 @@ waitcmdloop(struct job *job) if (job == bgjob) bgjob = NULL; } - in_waitcmd--; return retval; } } else { @@ -524,7 +521,6 @@ waitcmdloop(struct job *job) } for (jp = jobtab ; ; jp++) { if (jp >= jobtab + njobs) { /* no running procs */ - in_waitcmd--; return 0; } if (jp->used && jp->state == 0) @@ -532,9 +528,10 @@ waitcmdloop(struct job *job) } } } while (dowait(DOWAIT_BLOCK | DOWAIT_SIG, (struct job *)NULL) != -1); - in_waitcmd--; - return pendingsig + 128; + sig = pendingsig_waitcmd; + pendingsig_waitcmd = 0; + return sig + 128; } @@ -990,7 +987,8 @@ waitforjob(struct job *jp, int *origstat INTOFF; TRACE(("waitforjob(%%%td) called\n", jp - jobtab + 1)); while (jp->state == 0) - if (dowait(DOWAIT_BLOCK | (Tflag ? DOWAIT_SIG : 0), jp) == -1) + if (dowait(DOWAIT_BLOCK | (Tflag ? DOWAIT_SIG | + DOWAIT_SIG_ANY : 0), jp) == -1) dotrap(); #if JOBS if (jp->jobctl) { @@ -1081,12 +1079,17 @@ dowait(int mode, struct job *job) pid = wait3(&status, wflags, (struct rusage *)NULL); TRACE(("wait returns %d, status=%d\n", (int)pid, status)); if (pid == 0 && (mode & DOWAIT_SIG) != 0) { - sigsuspend(&omask); pid = -1; + if (((mode & DOWAIT_SIG_ANY) != 0 ? + pendingsig : pendingsig_waitcmd) != 0) { + errno = EINTR; + break; + } + sigsuspend(&omask); if (int_pending()) break; } - } while (pid == -1 && errno == EINTR && breakwaitcmd == 0); + } while (pid == -1 && errno == EINTR); if (pid == -1 && errno == ECHILD && job != NULL) job->state = JOBDONE; if ((mode & DOWAIT_SIG) != 0) { @@ -1095,11 +1098,6 @@ dowait(int mode, struct job *job) sigprocmask(SIG_SETMASK, &omask, NULL); INTON; } - if (breakwaitcmd != 0) { - breakwaitcmd = 0; - if (pid <= 0) - return -1; - } if (pid <= 0) return pid; INTOFF; Modified: head/bin/sh/jobs.h ============================================================================== --- head/bin/sh/jobs.h Mon Sep 2 20:44:19 2013 (r255156) +++ head/bin/sh/jobs.h Mon Sep 2 21:57:46 2013 (r255157) @@ -83,8 +83,6 @@ enum { }; extern int job_warning; /* user was warned about stopped jobs */ -extern int in_waitcmd; /* are we in waitcmd()? */ -extern volatile sig_atomic_t breakwaitcmd; /* break wait to process traps? */ void setjobctl(int); void showjobs(int, int); Modified: head/bin/sh/trap.c ============================================================================== --- head/bin/sh/trap.c Mon Sep 2 20:44:19 2013 (r255156) +++ head/bin/sh/trap.c Mon Sep 2 21:57:46 2013 (r255157) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); static char sigmode[NSIG]; /* current value of signal */ volatile sig_atomic_t pendingsig; /* indicates some signal received */ +volatile sig_atomic_t pendingsig_waitcmd; /* indicates SIGINT/SIGQUIT received */ int in_dotrap; /* do we execute in a trap handler? */ static char *volatile trap[NSIG]; /* trap handler commands */ static volatile sig_atomic_t gotsig[NSIG]; @@ -389,23 +390,13 @@ onsig(int signo) } /* If we are currently in a wait builtin, prepare to break it */ - if ((signo == SIGINT || signo == SIGQUIT) && in_waitcmd != 0) { - breakwaitcmd = 1; - pendingsig = signo; - } + if (signo == SIGINT || signo == SIGQUIT) + pendingsig_waitcmd = signo; if (trap[signo] != NULL && trap[signo][0] != '\0' && (signo != SIGCHLD || !ignore_sigchld)) { gotsig[signo] = 1; pendingsig = signo; - - /* - * If a trap is set, not ignored and not the null command, we - * need to make sure traps are executed even when a child - * blocks signals. - */ - if (Tflag && !(trap[signo][0] == ':' && trap[signo][1] == '\0')) - breakwaitcmd = 1; } #ifndef NO_HISTORY @@ -428,6 +419,7 @@ dotrap(void) in_dotrap++; for (;;) { pendingsig = 0; + pendingsig_waitcmd = 0; for (i = 1; i < NSIG; i++) { if (gotsig[i]) { gotsig[i] = 0; Modified: head/bin/sh/trap.h ============================================================================== --- head/bin/sh/trap.h Mon Sep 2 20:44:19 2013 (r255156) +++ head/bin/sh/trap.h Mon Sep 2 21:57:46 2013 (r255157) @@ -34,6 +34,7 @@ */ extern volatile sig_atomic_t pendingsig; +extern volatile sig_atomic_t pendingsig_waitcmd; extern int in_dotrap; extern volatile sig_atomic_t gotwinch; From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 22:22:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 94042D13; Mon, 2 Sep 2013 22:22:56 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 80DBE2B34; Mon, 2 Sep 2013 22:22:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82MMuKU090650; Mon, 2 Sep 2013 22:22:56 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82MMu6d090649; Mon, 2 Sep 2013 22:22:56 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201309022222.r82MMu6d090649@svn.freebsd.org> From: "Justin T. Gibbs" Date: Mon, 2 Sep 2013 22:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255158 - head/sys/i386/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 22:22:56 -0000 Author: gibbs Date: Mon Sep 2 22:22:56 2013 New Revision: 255158 URL: http://svnweb.freebsd.org/changeset/base/255158 Log: Better conformance to style(9) and organizational cleanup. No functional changes. sys/i386/xen/mp_machdep.c: Remove extra newlines. Group externs, forward delarations, local types, and pcpu data. Wrap at 80 columns. Use parens in return statements. Tab indent members of array initializers. MFC after: 2 weeks Modified: head/sys/i386/xen/mp_machdep.c Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Mon Sep 2 21:57:46 2013 (r255157) +++ head/sys/i386/xen/mp_machdep.c Mon Sep 2 22:22:56 2013 (r255158) @@ -85,20 +85,46 @@ __FBSDID("$FreeBSD$"); #include #include - - #include #include #include #include #include +/*---------------------------- Extern Declarations ---------------------------*/ +extern struct pcpu __pcpu[]; + +extern void Xhypervisor_callback(void); +extern void failsafe_callback(void); +extern void pmap_lazyfix_action(void); + +/*--------------------------- Forward Declarations ---------------------------*/ +static void assign_cpu_ids(void); +static void set_interrupt_apic_ids(void); +static int start_all_aps(void); +static int start_ap(int apic_id); +static void release_aps(void *dummy); + +/*-------------------------------- Local Types -------------------------------*/ +typedef void call_data_func_t(uintptr_t , uintptr_t); + +/* + * 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; +}; + +/*-------------------------------- Global Data -------------------------------*/ +static u_int hyperthreading_cpus; +static cpuset_t hyperthreading_cpus_mask; int mp_naps; /* # of Applications processors */ int boot_cpu_id = -1; /* designated BSP */ -extern struct pcpu __pcpu[]; - static int bootAP; static union descriptor *bootAPgdt; @@ -112,8 +138,6 @@ vm_offset_t smp_tlb_addr1; vm_offset_t smp_tlb_addr2; volatile int smp_tlb_wait; -typedef void call_data_func_t(uintptr_t , uintptr_t); - static u_int logical_cpus; static volatile cpuset_t ipi_nmi_pending; @@ -127,11 +151,7 @@ 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; -} static cpu_info[MAX_APIC_ID + 1]; +static struct cpu_info cpu_info[MAX_APIC_ID + 1]; int cpu_apic_ids[MAXCPU]; int apic_cpuids[MAX_APIC_ID + 1]; @@ -141,22 +161,11 @@ static volatile u_int cpu_ipi_pending[MA static int cpu_logical; static int cpu_cores; -static void assign_cpu_ids(void); -static void set_interrupt_apic_ids(void); -int start_all_aps(void); -static int start_ap(int apic_id); -static void release_aps(void *dummy); - -static u_int hyperthreading_cpus; -static cpuset_t hyperthreading_cpus_mask; - -extern void Xhypervisor_callback(void); -extern void failsafe_callback(void); -extern void pmap_lazyfix_action(void); - +/*------------------------------- Per-CPU Data -------------------------------*/ DPCPU_DEFINE(xen_intr_handle_t, ipi_port[NR_IPIS]); DPCPU_DEFINE(struct vcpu_info *, vcpu_info); +/*------------------------------ Implementation ------------------------------*/ struct cpu_group * cpu_topo(void) { @@ -353,14 +362,14 @@ iv_lazypmap(uintptr_t a, uintptr_t b) /* * These start from "IPI offset" APIC_IPI_INTS */ -static call_data_func_t *ipi_vectors[6] = +static call_data_func_t *ipi_vectors[] = { - iv_rendezvous, - iv_invltlb, - iv_invlpg, - iv_invlrng, - iv_invlcache, - iv_lazypmap, + iv_rendezvous, + iv_invltlb, + iv_invlpg, + iv_invlrng, + iv_invlcache, + iv_lazypmap, }; /* @@ -414,7 +423,8 @@ smp_call_function_interrupt(void *unused atomic_t *finished = &call_data->finished; /* We only handle function IPIs, not bitmap IPIs */ - if (call_data->func_id < APIC_IPI_INTS || call_data->func_id > IPI_BITMAP_VECTOR) + if (call_data->func_id < APIC_IPI_INTS || + call_data->func_id > IPI_BITMAP_VECTOR) panic("invalid function id %u", call_data->func_id); func = ipi_vectors[call_data->func_id - APIC_IPI_INTS]; @@ -494,14 +504,14 @@ xen_smp_cpu_init(unsigned int cpu) printf("[XEN] IPI cpu=%d port=%d vector=CALL_FUNCTION_VECTOR (%d)\n", cpu, xen_intr_port(irq_handle), CALL_FUNCTION_VECTOR); - return 0; + return (0); fail: xen_intr_unbind(DPCPU_ID_GET(cpu, ipi_port[RESCHEDULE_VECTOR])); DPCPU_ID_SET(cpu, ipi_port[RESCHEDULE_VECTOR], NULL); xen_intr_unbind(DPCPU_ID_GET(cpu, ipi_port[CALL_FUNCTION_VECTOR])); DPCPU_ID_SET(cpu, ipi_port[CALL_FUNCTION_VECTOR], NULL); - return rc; + return (rc); } static void @@ -795,7 +805,7 @@ start_all_aps(void) pmap_invalidate_range(kernel_pmap, 0, NKPT * NBPDR - 1); /* number of APs actually started */ - return mp_naps; + return (mp_naps); } extern uint8_t *pcpu_boot_stack; @@ -900,7 +910,8 @@ cpu_initialize_context(unsigned int cpu) smp_trap_init(ctxt.trap_ctxt); ctxt.ldt_ents = 0; - ctxt.gdt_frames[0] = (uint32_t)((uint64_t)vtomach(bootAPgdt) >> PAGE_SHIFT); + ctxt.gdt_frames[0] = + (uint32_t)((uint64_t)vtomach(bootAPgdt) >> PAGE_SHIFT); ctxt.gdt_ents = 512; #ifdef __i386__ @@ -960,10 +971,10 @@ start_ap(int apic_id) /* Wait up to 5 seconds for it to start. */ for (ms = 0; ms < 5000; ms++) { if (mp_naps > cpus) - return 1; /* return SUCCESS */ + return (1); /* return SUCCESS */ DELAY(1000); } - return 0; /* return FAILURE */ + return (0); /* return FAILURE */ } static void @@ -1026,7 +1037,8 @@ smp_tlb_shootdown(u_int vector, vm_offse } static void -smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, vm_offset_t addr1, vm_offset_t addr2) +smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, vm_offset_t addr1, + vm_offset_t addr2) { int cpu, ncpu, othercpus; struct _call_data data; @@ -1262,4 +1274,3 @@ release_aps(void *dummy __unused) SYSINIT(start_aps, SI_SUB_SMP, SI_ORDER_FIRST, release_aps, NULL); SYSINIT(start_ipis, SI_SUB_SMP, SI_ORDER_ANY, xen_smp_intr_init_cpus, NULL); SYSINIT(start_cpu, SI_SUB_INTR, SI_ORDER_ANY, xen_smp_intr_setup_cpus, NULL); - From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 22:48:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 291838FB; Mon, 2 Sep 2013 22:48:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 079172E1E; Mon, 2 Sep 2013 22:48:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82MmgqT004883; Mon, 2 Sep 2013 22:48:42 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82Mmgj5004877; Mon, 2 Sep 2013 22:48:42 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201309022248.r82Mmgj5004877@svn.freebsd.org> From: Michael Tuexen Date: Mon, 2 Sep 2013 22:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255160 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 22:48:43 -0000 Author: tuexen Date: Mon Sep 2 22:48:41 2013 New Revision: 255160 URL: http://svnweb.freebsd.org/changeset/base/255160 Log: All changes affect only SCTP-AUTH: * Remove non working code related to SHA224. * Remove support for non-standardised HMAC-IDs using SHA384 and SHA512. * Prefer SHA256 over SHA1. * Minor cleanup. MFC after: 2 weeks Modified: head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_auth.h head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_uio.h Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Mon Sep 2 22:45:49 2013 (r255159) +++ head/sys/netinet/sctp_auth.c Mon Sep 2 22:48:41 2013 (r255160) @@ -703,15 +703,7 @@ sctp_auth_add_hmacid(sctp_hmaclist_t * l return (-1); } if ((hmac_id != SCTP_AUTH_HMAC_ID_SHA1) && -#ifdef HAVE_SHA224 - (hmac_id != SCTP_AUTH_HMAC_ID_SHA224) && -#endif -#ifdef HAVE_SHA2 - (hmac_id != SCTP_AUTH_HMAC_ID_SHA256) && - (hmac_id != SCTP_AUTH_HMAC_ID_SHA384) && - (hmac_id != SCTP_AUTH_HMAC_ID_SHA512) && -#endif - 1) { + (hmac_id != SCTP_AUTH_HMAC_ID_SHA256)) { return (-1); } /* Now is it already in the list */ @@ -754,8 +746,9 @@ sctp_default_supported_hmaclist(void) new_list = sctp_alloc_hmaclist(2); if (new_list == NULL) return (NULL); - (void)sctp_auth_add_hmacid(new_list, SCTP_AUTH_HMAC_ID_SHA1); + /* We prefer SHA256, so list it first */ (void)sctp_auth_add_hmacid(new_list, SCTP_AUTH_HMAC_ID_SHA256); + (void)sctp_auth_add_hmacid(new_list, SCTP_AUTH_HMAC_ID_SHA1); return (new_list); } @@ -811,19 +804,13 @@ int sctp_verify_hmac_param(struct sctp_auth_hmac_algo *hmacs, uint32_t num_hmacs) { uint32_t i; - uint16_t hmac_id; - uint32_t sha1_supported = 0; for (i = 0; i < num_hmacs; i++) { - hmac_id = ntohs(hmacs->hmac_ids[i]); - if (hmac_id == SCTP_AUTH_HMAC_ID_SHA1) - sha1_supported = 1; + if (ntohs(hmacs->hmac_ids[i]) == SCTP_AUTH_HMAC_ID_SHA1) { + return (0); + } } - /* all HMAC id's are supported */ - if (sha1_supported == 0) - return (-1); - else - return (0); + return (-1); } sctp_authinfo_t * @@ -877,18 +864,8 @@ sctp_get_hmac_digest_len(uint16_t hmac_a switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: return (SCTP_AUTH_DIGEST_LEN_SHA1); -#ifdef HAVE_SHA224 - case SCTP_AUTH_HMAC_ID_SHA224: - return (SCTP_AUTH_DIGEST_LEN_SHA224); -#endif -#ifdef HAVE_SHA2 case SCTP_AUTH_HMAC_ID_SHA256: return (SCTP_AUTH_DIGEST_LEN_SHA256); - case SCTP_AUTH_HMAC_ID_SHA384: - return (SCTP_AUTH_DIGEST_LEN_SHA384); - case SCTP_AUTH_HMAC_ID_SHA512: - return (SCTP_AUTH_DIGEST_LEN_SHA512); -#endif default: /* unknown HMAC algorithm: can't do anything */ return (0); @@ -900,17 +877,9 @@ sctp_get_hmac_block_len(uint16_t hmac_al { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: -#ifdef HAVE_SHA224 - case SCTP_AUTH_HMAC_ID_SHA224: -#endif return (64); -#ifdef HAVE_SHA2 case SCTP_AUTH_HMAC_ID_SHA256: return (64); - case SCTP_AUTH_HMAC_ID_SHA384: - case SCTP_AUTH_HMAC_ID_SHA512: - return (128); -#endif case SCTP_AUTH_HMAC_ID_RSVD: default: /* unknown HMAC algorithm: can't do anything */ @@ -923,23 +892,11 @@ sctp_hmac_init(uint16_t hmac_algo, sctp_ { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: - SHA1_Init(&ctx->sha1); - break; -#ifdef HAVE_SHA224 - case SCTP_AUTH_HMAC_ID_SHA224: + SCTP_SHA1_INIT(&ctx->sha1); break; -#endif -#ifdef HAVE_SHA2 case SCTP_AUTH_HMAC_ID_SHA256: - SHA256_Init(&ctx->sha256); - break; - case SCTP_AUTH_HMAC_ID_SHA384: - SHA384_Init(&ctx->sha384); + SCTP_SHA256_INIT(&ctx->sha256); break; - case SCTP_AUTH_HMAC_ID_SHA512: - SHA512_Init(&ctx->sha512); - break; -#endif case SCTP_AUTH_HMAC_ID_RSVD: default: /* unknown HMAC algorithm: can't do anything */ @@ -953,23 +910,11 @@ sctp_hmac_update(uint16_t hmac_algo, sct { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: - SHA1_Update(&ctx->sha1, text, textlen); + SCTP_SHA1_UPDATE(&ctx->sha1, text, textlen); break; -#ifdef HAVE_SHA224 - case SCTP_AUTH_HMAC_ID_SHA224: - break; -#endif -#ifdef HAVE_SHA2 case SCTP_AUTH_HMAC_ID_SHA256: - SHA256_Update(&ctx->sha256, text, textlen); - break; - case SCTP_AUTH_HMAC_ID_SHA384: - SHA384_Update(&ctx->sha384, text, textlen); + SCTP_SHA256_UPDATE(&ctx->sha256, text, textlen); break; - case SCTP_AUTH_HMAC_ID_SHA512: - SHA512_Update(&ctx->sha512, text, textlen); - break; -#endif case SCTP_AUTH_HMAC_ID_RSVD: default: /* unknown HMAC algorithm: can't do anything */ @@ -983,24 +928,11 @@ sctp_hmac_final(uint16_t hmac_algo, sctp { switch (hmac_algo) { case SCTP_AUTH_HMAC_ID_SHA1: - SHA1_Final(digest, &ctx->sha1); + SCTP_SHA1_FINAL(digest, &ctx->sha1); break; -#ifdef HAVE_SHA224 - case SCTP_AUTH_HMAC_ID_SHA224: - break; -#endif -#ifdef HAVE_SHA2 case SCTP_AUTH_HMAC_ID_SHA256: - SHA256_Final(digest, &ctx->sha256); + SCTP_SHA256_FINAL(digest, &ctx->sha256); break; - case SCTP_AUTH_HMAC_ID_SHA384: - /* SHA384 is truncated SHA512 */ - SHA384_Final(digest, &ctx->sha384); - break; - case SCTP_AUTH_HMAC_ID_SHA512: - SHA512_Final(digest, &ctx->sha512); - break; -#endif case SCTP_AUTH_HMAC_ID_RSVD: default: /* unknown HMAC algorithm: can't do anything */ Modified: head/sys/netinet/sctp_auth.h ============================================================================== --- head/sys/netinet/sctp_auth.h Mon Sep 2 22:45:49 2013 (r255159) +++ head/sys/netinet/sctp_auth.h Mon Sep 2 22:48:41 2013 (r255160) @@ -36,14 +36,12 @@ __FBSDID("$FreeBSD$"); #ifndef _NETINET_SCTP_AUTH_H_ #define _NETINET_SCTP_AUTH_H_ +#include /* digest lengths */ #define SCTP_AUTH_DIGEST_LEN_SHA1 20 -#define SCTP_AUTH_DIGEST_LEN_SHA224 28 #define SCTP_AUTH_DIGEST_LEN_SHA256 32 -#define SCTP_AUTH_DIGEST_LEN_SHA384 48 -#define SCTP_AUTH_DIGEST_LEN_SHA512 64 -#define SCTP_AUTH_DIGEST_LEN_MAX 64 +#define SCTP_AUTH_DIGEST_LEN_MAX SCTP_AUTH_DIGEST_LEN_SHA256 /* random sizes */ #define SCTP_AUTH_RANDOM_SIZE_DEFAULT 32 @@ -52,12 +50,8 @@ __FBSDID("$FreeBSD$"); /* union of all supported HMAC algorithm contexts */ typedef union sctp_hash_context { - SHA1_CTX sha1; -#ifdef HAVE_SHA2 - SHA256_CTX sha256; - SHA384_CTX sha384; - SHA512_CTX sha512; -#endif + SCTP_SHA1_CTX sha1; + SCTP_SHA256_CTX sha256; } sctp_hash_context_t; typedef struct sctp_key { Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Mon Sep 2 22:45:49 2013 (r255159) +++ head/sys/netinet/sctp_os_bsd.h Mon Sep 2 22:48:41 2013 (r255160) @@ -104,6 +104,9 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + #ifndef in6pcb #define in6pcb inpcb #endif @@ -468,23 +471,18 @@ sctp_get_mbuf_for_msg(unsigned int space /* * SCTP AUTH */ -#define HAVE_SHA2 - #define SCTP_READ_RANDOM(buf, len) read_random(buf, len) -#ifdef USE_SCTP_SHA1 -#include -#else -#include /* map standard crypto API names */ -#define SHA1_Init SHA1Init -#define SHA1_Update SHA1Update -#define SHA1_Final(x,y) SHA1Final((caddr_t)x, y) -#endif - -#if defined(HAVE_SHA2) -#include -#endif +#define SCTP_SHA1_CTX SHA1_CTX +#define SCTP_SHA1_INIT SHA1Init +#define SCTP_SHA1_UPDATE SHA1Update +#define SCTP_SHA1_FINAL(x,y) SHA1Final((caddr_t)x, y) + +#define SCTP_SHA256_CTX SHA256_CTX +#define SCTP_SHA256_INIT SHA256_Init +#define SCTP_SHA256_UPDATE SHA256_Update +#define SCTP_SHA256_FINAL(x,y) SHA256_Final((caddr_t)x, y) #endif Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Mon Sep 2 22:45:49 2013 (r255159) +++ head/sys/netinet/sctp_uio.h Mon Sep 2 22:48:41 2013 (r255160) @@ -662,10 +662,6 @@ struct sctp_hmacalgo { #define SCTP_AUTH_HMAC_ID_RSVD 0x0000 #define SCTP_AUTH_HMAC_ID_SHA1 0x0001 /* default, mandatory */ #define SCTP_AUTH_HMAC_ID_SHA256 0x0003 -#define SCTP_AUTH_HMAC_ID_SHA224 0x0004 -#define SCTP_AUTH_HMAC_ID_SHA384 0x0005 -#define SCTP_AUTH_HMAC_ID_SHA512 0x0006 - /* SCTP_AUTH_ACTIVE_KEY / SCTP_AUTH_DELETE_KEY */ struct sctp_authkeyid { From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 23:22:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CF6EAE1; Mon, 2 Sep 2013 23:22:05 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BCD282074; Mon, 2 Sep 2013 23:22:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82NM5WD026306; Mon, 2 Sep 2013 23:22:05 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82NM5OW026305; Mon, 2 Sep 2013 23:22:05 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201309022322.r82NM5OW026305@svn.freebsd.org> From: Justin Hibbits Date: Mon, 2 Sep 2013 23:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255161 - head/sys/cddl/dev/dtrace/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 23:22:06 -0000 Author: jhibbits Date: Mon Sep 2 23:22:05 2013 New Revision: 255161 URL: http://svnweb.freebsd.org/changeset/base/255161 Log: Whitespace cleanup. Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c Mon Sep 2 22:48:41 2013 (r255160) +++ head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c Mon Sep 2 23:22:05 2013 (r255161) @@ -213,8 +213,8 @@ dtrace_gethrtime_init(void *arg) CPU_SET(pc->pc_cpuid, &map); smp_rendezvous_cpus(map, NULL, - dtrace_gethrtime_init_cpu, - smp_no_rendevous_barrier, (void *)(uintptr_t) i); + dtrace_gethrtime_init_cpu, + smp_no_rendevous_barrier, (void *)(uintptr_t) i); timebase_skew[i] = tgt_cpu_tsc - hst_cpu_tsc; } @@ -247,7 +247,7 @@ dtrace_gethrtime() lo = timebase; hi = timebase >> 32; return (((lo * nsec_scale) >> SCALE_SHIFT) + - ((hi * nsec_scale) << (32 - SCALE_SHIFT))); + ((hi * nsec_scale) << (32 - SCALE_SHIFT))); } uint64_t @@ -280,34 +280,34 @@ dtrace_trap(struct trapframe *frame, u_i * All the rest will be handled in the usual way. */ switch (type) { - /* Page fault. */ - case EXC_DSI: - case EXC_DSE: - /* Flag a bad address. */ - cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR; - cpu_core[curcpu].cpuc_dtrace_illval = frame->cpu.aim.dar; - - /* - * Offset the instruction pointer to the instruction - * following the one causing the fault. - */ - frame->srr0 += sizeof(int); - return (1); - case EXC_ISI: - case EXC_ISE: - /* Flag a bad address. */ - cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR; - cpu_core[curcpu].cpuc_dtrace_illval = frame->srr0; - - /* - * Offset the instruction pointer to the instruction - * following the one causing the fault. - */ - frame->srr0 += sizeof(int); - return (1); - default: - /* Handle all other traps in the usual way. */ - break; + /* Page fault. */ + case EXC_DSI: + case EXC_DSE: + /* Flag a bad address. */ + cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR; + cpu_core[curcpu].cpuc_dtrace_illval = frame->cpu.aim.dar; + + /* + * Offset the instruction pointer to the instruction + * following the one causing the fault. + */ + frame->srr0 += sizeof(int); + return (1); + case EXC_ISI: + case EXC_ISE: + /* Flag a bad address. */ + cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR; + cpu_core[curcpu].cpuc_dtrace_illval = frame->srr0; + + /* + * Offset the instruction pointer to the instruction + * following the one causing the fault. + */ + frame->srr0 += sizeof(int); + return (1); + default: + /* Handle all other traps in the usual way. */ + break; } } @@ -321,29 +321,29 @@ dtrace_probe_error(dtrace_state_t *state { dtrace_probe(dtrace_probeid_error, (uint64_t)(uintptr_t)state, - (uintptr_t)epid, - (uintptr_t)which, (uintptr_t)fault, (uintptr_t)fltoffs); + (uintptr_t)epid, + (uintptr_t)which, (uintptr_t)fault, (uintptr_t)fltoffs); } static int dtrace_invop_start(struct trapframe *frame) { switch (dtrace_invop(frame->srr0, (uintptr_t *)frame, frame->fixreg[3])) { - case DTRACE_INVOP_JUMP: - break; - case DTRACE_INVOP_BCTR: - frame->srr0 = frame->ctr; - break; - case DTRACE_INVOP_BLR: - frame->srr0 = frame->lr; - break; - case DTRACE_INVOP_MFLR_R0: - frame->fixreg[0] = frame->lr; - frame->srr0 = frame->srr0 + 4; - break; - default: - return (-1); - break; + case DTRACE_INVOP_JUMP: + break; + case DTRACE_INVOP_BCTR: + frame->srr0 = frame->ctr; + break; + case DTRACE_INVOP_BLR: + frame->srr0 = frame->lr; + break; + case DTRACE_INVOP_MFLR_R0: + frame->fixreg[0] = frame->lr; + frame->srr0 = frame->srr0 + 4; + break; + default: + return (-1); + break; } return (0); From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 23:27:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E5CE12F7; Mon, 2 Sep 2013 23:27:53 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D3CD520DA; Mon, 2 Sep 2013 23:27:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82NRreY028226; Mon, 2 Sep 2013 23:27:53 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82NRrGp028225; Mon, 2 Sep 2013 23:27:53 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201309022327.r82NRrGp028225@svn.freebsd.org> From: Michael Tuexen Date: Mon, 2 Sep 2013 23:27:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255162 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 23:27:54 -0000 Author: tuexen Date: Mon Sep 2 23:27:53 2013 New Revision: 255162 URL: http://svnweb.freebsd.org/changeset/base/255162 Log: Use uint16_t instead of in_port_t for consistency with the SCTP code. MFC after: 1 week Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Sep 2 23:22:05 2013 (r255161) +++ head/sys/netinet/sctp_output.c Mon Sep 2 23:27:53 2013 (r255162) @@ -3561,7 +3561,7 @@ sctp_process_cmsgs_for_init(struct sctp_ static struct sctp_tcb * sctp_findassociation_cmsgs(struct sctp_inpcb **inp_p, - in_port_t port, + uint16_t port, struct mbuf *control, struct sctp_nets **net_p, int *error) From owner-svn-src-head@FreeBSD.ORG Mon Sep 2 23:52:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3800592F; Mon, 2 Sep 2013 23:52:26 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 25B0D2379; Mon, 2 Sep 2013 23:52:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r82NqPti043381; Mon, 2 Sep 2013 23:52:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r82NqPKu043379; Mon, 2 Sep 2013 23:52:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201309022352.r82NqPKu043379@svn.freebsd.org> From: Xin LI Date: Mon, 2 Sep 2013 23:52:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255163 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Sep 2013 23:52:26 -0000 Author: delphij Date: Mon Sep 2 23:52:25 2013 New Revision: 255163 URL: http://svnweb.freebsd.org/changeset/base/255163 Log: Create the default router last. This allows using an static interface route for default routes, which seems to be common among many dedicated hosting providers. Reviewed by: hrs MFC after: 2 weeks Modified: head/etc/rc.d/routing Modified: head/etc/rc.d/routing ============================================================================== --- head/etc/rc.d/routing Mon Sep 2 23:27:53 2013 (r255162) +++ head/etc/rc.d/routing Mon Sep 2 23:52:25 2013 (r255163) @@ -143,7 +143,7 @@ static_inet() [Nn][Oo] | '') ;; *) - static_routes="_default ${static_routes}" + static_routes="${static_routes} _default" route__default="default ${defaultrouter}" ;; esac @@ -205,7 +205,7 @@ static_inet6() [Nn][Oo] | '') ;; *) - ipv6_static_routes="_default ${ipv6_static_routes}" + ipv6_static_routes="${ipv6_static_routes} _default" ipv6_route__default="default ${ipv6_defaultrouter}" ;; esac From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 00:34:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 33AAC407; Tue, 3 Sep 2013 00:34:19 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1FD81272C; Tue, 3 Sep 2013 00:34:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r830YJI8068690; Tue, 3 Sep 2013 00:34:19 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r830YIRp068687; Tue, 3 Sep 2013 00:34:18 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201309030034.r830YIRp068687@svn.freebsd.org> From: Justin Hibbits Date: Tue, 3 Sep 2013 00:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255164 - in head/sys: dev/hwpmc modules/hwpmc powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 00:34:19 -0000 Author: jhibbits Date: Tue Sep 3 00:34:18 2013 New Revision: 255164 URL: http://svnweb.freebsd.org/changeset/base/255164 Log: Refactor PowerPC hwpmc(4) driver into generic and specific. More refactoring will likely be done as more drivers are added, since AIM-compatible processors have similar PMC configuration logic. Added: head/sys/dev/hwpmc/hwpmc_mpc7xxx.c (contents, props changed) head/sys/dev/hwpmc/hwpmc_powerpc.h (contents, props changed) Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c head/sys/modules/hwpmc/Makefile head/sys/powerpc/include/pmc_mdep.h Added: head/sys/dev/hwpmc/hwpmc_mpc7xxx.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hwpmc/hwpmc_mpc7xxx.c Tue Sep 3 00:34:18 2013 (r255164) @@ -0,0 +1,748 @@ +/*- + * Copyright (c) 2011 Justin Hibbits + * Copyright (c) 2005, Joseph Koshy + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include +#include + +#include "hwpmc_powerpc.h" + +#define POWERPC_PMC_CAPS (PMC_CAP_INTERRUPT | PMC_CAP_USER | \ + PMC_CAP_SYSTEM | PMC_CAP_EDGE | \ + PMC_CAP_THRESHOLD | PMC_CAP_READ | \ + PMC_CAP_WRITE | PMC_CAP_INVERT | \ + PMC_CAP_QUALIFIER) + +#define PPC_SET_PMC1SEL(r, x) ((r & ~(SPR_MMCR0_PMC1SEL(0x3f))) | SPR_MMCR0_PMC1SEL(x)) +#define PPC_SET_PMC2SEL(r, x) ((r & ~(SPR_MMCR0_PMC2SEL(0x3f))) | SPR_MMCR0_PMC2SEL(x)) +#define PPC_SET_PMC3SEL(r, x) ((r & ~(SPR_MMCR1_PMC3SEL(0x1f))) | SPR_MMCR1_PMC3SEL(x)) +#define PPC_SET_PMC4SEL(r, x) ((r & ~(SPR_MMCR1_PMC4SEL(0x1f))) | SPR_MMCR1_PMC4SEL(x)) +#define PPC_SET_PMC5SEL(r, x) ((r & ~(SPR_MMCR1_PMC5SEL(0x1f))) | SPR_MMCR1_PMC5SEL(x)) +#define PPC_SET_PMC6SEL(r, x) ((r & ~(SPR_MMCR1_PMC6SEL(0x3f))) | SPR_MMCR1_PMC6SEL(x)) + +/* Change this when we support more than just the 7450. */ +#define MPC7XXX_MAX_PMCS 6 + +#define MPC7XXX_PMC_HAS_OVERFLOWED(x) (mpc7xxx_pmcn_read(x) & (0x1 << 31)) + +/* + * Things to improve on this: + * - It stops (clears to 0) the PMC and resets it at every context switch + * currently. + */ + +/* + * This should work for every 32-bit PowerPC implementation I know of (G3 and G4 + * specifically). + */ + +struct powerpc_event_code_map { + enum pmc_event pe_ev; /* enum value */ + uint8_t pe_counter_mask; /* Which counter this can be counted in. */ + uint8_t pe_code; /* numeric code */ +}; + +#define PPC_PMC_MASK1 0 +#define PPC_PMC_MASK2 1 +#define PPC_PMC_MASK3 2 +#define PPC_PMC_MASK4 3 +#define PPC_PMC_MASK5 4 +#define PPC_PMC_MASK6 5 +#define PPC_PMC_MASK_ALL 0x3f +#define PMC_POWERPC_EVENT(id, mask, number) \ + { .pe_ev = PMC_EV_PPC7450_##id, .pe_counter_mask = mask, .pe_code = number } + +static struct powerpc_event_code_map powerpc_event_codes[] = { + PMC_POWERPC_EVENT(CYCLE,PPC_PMC_MASK_ALL, 1), + PMC_POWERPC_EVENT(INSTR_COMPLETED, 0x0f, 2), + PMC_POWERPC_EVENT(TLB_BIT_TRANSITIONS, 0x0f, 3), + PMC_POWERPC_EVENT(INSTR_DISPATCHED, 0x0f, 4), + PMC_POWERPC_EVENT(PMON_EXCEPT, 0x0f, 5), + PMC_POWERPC_EVENT(PMON_SIG, 0x0f, 7), + PMC_POWERPC_EVENT(VPU_INSTR_COMPLETED, 0x03, 8), + PMC_POWERPC_EVENT(VFPU_INSTR_COMPLETED, 0x03, 9), + PMC_POWERPC_EVENT(VIU1_INSTR_COMPLETED, 0x03, 10), + PMC_POWERPC_EVENT(VIU2_INSTR_COMPLETED, 0x03, 11), + PMC_POWERPC_EVENT(MTVSCR_INSTR_COMPLETED, 0x03, 12), + PMC_POWERPC_EVENT(MTVRSAVE_INSTR_COMPLETED, 0x03, 13), + PMC_POWERPC_EVENT(VPU_INSTR_WAIT_CYCLES, 0x03, 14), + PMC_POWERPC_EVENT(VFPU_INSTR_WAIT_CYCLES, 0x03, 15), + PMC_POWERPC_EVENT(VIU1_INSTR_WAIT_CYCLES, 0x03, 16), + PMC_POWERPC_EVENT(VIU2_INSTR_WAIT_CYCLES, 0x03, 17), + PMC_POWERPC_EVENT(MFVSCR_SYNC_CYCLES, 0x03, 18), + PMC_POWERPC_EVENT(VSCR_SAT_SET, 0x03, 19), + PMC_POWERPC_EVENT(STORE_INSTR_COMPLETED, 0x03, 20), + PMC_POWERPC_EVENT(L1_INSTR_CACHE_MISSES, 0x03, 21), + PMC_POWERPC_EVENT(L1_DATA_SNOOPS, 0x03, 22), + PMC_POWERPC_EVENT(UNRESOLVED_BRANCHES, 0x01, 23), + PMC_POWERPC_EVENT(SPEC_BUFFER_CYCLES, 0x01, 24), + PMC_POWERPC_EVENT(BRANCH_UNIT_STALL_CYCLES, 0x01, 25), + PMC_POWERPC_EVENT(TRUE_BRANCH_TARGET_HITS, 0x01, 26), + PMC_POWERPC_EVENT(BRANCH_LINK_STAC_PREDICTED, 0x01, 27), + PMC_POWERPC_EVENT(GPR_ISSUE_QUEUE_DISPATCHES, 0x01, 28), + PMC_POWERPC_EVENT(CYCLES_THREE_INSTR_DISPATCHED, 0x01, 29), + PMC_POWERPC_EVENT(THRESHOLD_INSTR_QUEUE_ENTRIES_CYCLES, 0x01, 30), + PMC_POWERPC_EVENT(THRESHOLD_VEC_INSTR_QUEUE_ENTRIES_CYCLES, 0x01, 31), + PMC_POWERPC_EVENT(CYCLES_NO_COMPLETED_INSTRS, 0x01, 32), + PMC_POWERPC_EVENT(IU2_INSTR_COMPLETED, 0x01, 33), + PMC_POWERPC_EVENT(BRANCHES_COMPLETED, 0x01, 34), + PMC_POWERPC_EVENT(EIEIO_INSTR_COMPLETED, 0x01, 35), + PMC_POWERPC_EVENT(MTSPR_INSTR_COMPLETED, 0x01, 36), + PMC_POWERPC_EVENT(SC_INSTR_COMPLETED, 0x01, 37), + PMC_POWERPC_EVENT(LS_LM_COMPLETED, 0x01, 38), + PMC_POWERPC_EVENT(ITLB_HW_TABLE_SEARCH_CYCLES, 0x01, 39), + PMC_POWERPC_EVENT(DTLB_HW_SEARCH_CYCLES_OVER_THRESHOLD, 0x01, 40), + PMC_POWERPC_EVENT(L1_INSTR_CACHE_ACCESSES, 0x01, 41), + PMC_POWERPC_EVENT(INSTR_BKPT_MATCHES, 0x01, 42), + PMC_POWERPC_EVENT(L1_DATA_CACHE_LOAD_MISS_CYCLES_OVER_THRESHOLD, 0x01, 43), + PMC_POWERPC_EVENT(L1_DATA_SNOOP_HIT_ON_MODIFIED, 0x01, 44), + PMC_POWERPC_EVENT(LOAD_MISS_ALIAS, 0x01, 45), + PMC_POWERPC_EVENT(LOAD_MISS_ALIAS_ON_TOUCH, 0x01, 46), + PMC_POWERPC_EVENT(TOUCH_ALIAS, 0x01, 47), + PMC_POWERPC_EVENT(L1_DATA_SNOOP_HIT_CASTOUT_QUEUE, 0x01, 48), + PMC_POWERPC_EVENT(L1_DATA_SNOOP_HIT_CASTOUT, 0x01, 49), + PMC_POWERPC_EVENT(L1_DATA_SNOOP_HITS, 0x01, 50), + PMC_POWERPC_EVENT(WRITE_THROUGH_STORES, 0x01, 51), + PMC_POWERPC_EVENT(CACHE_INHIBITED_STORES, 0x01, 52), + PMC_POWERPC_EVENT(L1_DATA_LOAD_HIT, 0x01, 53), + PMC_POWERPC_EVENT(L1_DATA_TOUCH_HIT, 0x01, 54), + PMC_POWERPC_EVENT(L1_DATA_STORE_HIT, 0x01, 55), + PMC_POWERPC_EVENT(L1_DATA_TOTAL_HITS, 0x01, 56), + PMC_POWERPC_EVENT(DST_INSTR_DISPATCHED, 0x01, 57), + PMC_POWERPC_EVENT(REFRESHED_DSTS, 0x01, 58), + PMC_POWERPC_EVENT(SUCCESSFUL_DST_TABLE_SEARCHES, 0x01, 59), + PMC_POWERPC_EVENT(DSS_INSTR_COMPLETED, 0x01, 60), + PMC_POWERPC_EVENT(DST_STREAM_0_CACHE_LINE_FETCHES, 0x01, 61), + PMC_POWERPC_EVENT(VTQ_SUSPENDS_DUE_TO_CTX_CHANGE, 0x01, 62), + PMC_POWERPC_EVENT(VTQ_LINE_FETCH_HIT, 0x01, 63), + PMC_POWERPC_EVENT(VEC_LOAD_INSTR_COMPLETED, 0x01, 64), + PMC_POWERPC_EVENT(FP_STORE_INSTR_COMPLETED_IN_LSU, 0x01, 65), + PMC_POWERPC_EVENT(FPU_RENORMALIZATION, 0x01, 66), + PMC_POWERPC_EVENT(FPU_DENORMALIZATION, 0x01, 67), + PMC_POWERPC_EVENT(FP_STORE_CAUSES_STALL_IN_LSU, 0x01, 68), + PMC_POWERPC_EVENT(LD_ST_TRUE_ALIAS_STALL, 0x01, 70), + PMC_POWERPC_EVENT(LSU_INDEXED_ALIAS_STALL, 0x01, 71), + PMC_POWERPC_EVENT(LSU_ALIAS_VS_FSQ_WB0_WB1, 0x01, 72), + PMC_POWERPC_EVENT(LSU_ALIAS_VS_CSQ, 0x01, 73), + PMC_POWERPC_EVENT(LSU_LOAD_HIT_LINE_ALIAS_VS_CSQ0, 0x01, 74), + PMC_POWERPC_EVENT(LSU_LOAD_MISS_LINE_ALIAS_VS_CSQ0, 0x01, 75), + PMC_POWERPC_EVENT(LSU_TOUCH_LINE_ALIAS_VS_FSQ_WB0_WB1, 0x01, 76), + PMC_POWERPC_EVENT(LSU_TOUCH_ALIAS_VS_CSQ, 0x01, 77), + PMC_POWERPC_EVENT(LSU_LMQ_FULL_STALL, 0x01, 78), + PMC_POWERPC_EVENT(FP_LOAD_INSTR_COMPLETED_IN_LSU, 0x01, 79), + PMC_POWERPC_EVENT(FP_LOAD_SINGLE_INSTR_COMPLETED_IN_LSU, 0x01, 80), + PMC_POWERPC_EVENT(FP_LOAD_DOUBLE_COMPLETED_IN_LSU, 0x01, 81), + PMC_POWERPC_EVENT(LSU_RA_LATCH_STALL, 0x01, 82), + PMC_POWERPC_EVENT(LSU_LOAD_VS_STORE_QUEUE_ALIAS_STALL, 0x01, 83), + PMC_POWERPC_EVENT(LSU_LMQ_INDEX_ALIAS, 0x01, 84), + PMC_POWERPC_EVENT(LSU_STORE_QUEUE_INDEX_ALIAS, 0x01, 85), + PMC_POWERPC_EVENT(LSU_CSQ_FORWARDING, 0x01, 86), + PMC_POWERPC_EVENT(LSU_MISALIGNED_LOAD_FINISH, 0x01, 87), + PMC_POWERPC_EVENT(LSU_MISALIGN_STORE_COMPLETED, 0x01, 88), + PMC_POWERPC_EVENT(LSU_MISALIGN_STALL, 0x01, 89), + PMC_POWERPC_EVENT(FP_ONE_QUARTER_FPSCR_RENAMES_BUSY, 0x01, 90), + PMC_POWERPC_EVENT(FP_ONE_HALF_FPSCR_RENAMES_BUSY, 0x01, 91), + PMC_POWERPC_EVENT(FP_THREE_QUARTERS_FPSCR_RENAMES_BUSY, 0x01, 92), + PMC_POWERPC_EVENT(FP_ALL_FPSCR_RENAMES_BUSY, 0x01, 93), + PMC_POWERPC_EVENT(FP_DENORMALIZED_RESULT, 0x01, 94), + PMC_POWERPC_EVENT(L1_DATA_TOTAL_MISSES, 0x02, 23), + PMC_POWERPC_EVENT(DISPATCHES_TO_FPR_ISSUE_QUEUE, 0x02, 24), + PMC_POWERPC_EVENT(LSU_INSTR_COMPLETED, 0x02, 25), + PMC_POWERPC_EVENT(LOAD_INSTR_COMPLETED, 0x02, 26), + PMC_POWERPC_EVENT(SS_SM_INSTR_COMPLETED, 0x02, 27), + PMC_POWERPC_EVENT(TLBIE_INSTR_COMPLETED, 0x02, 28), + PMC_POWERPC_EVENT(LWARX_INSTR_COMPLETED, 0x02, 29), + PMC_POWERPC_EVENT(MFSPR_INSTR_COMPLETED, 0x02, 30), + PMC_POWERPC_EVENT(REFETCH_SERIALIZATION, 0x02, 31), + PMC_POWERPC_EVENT(COMPLETION_QUEUE_ENTRIES_OVER_THRESHOLD, 0x02, 32), + PMC_POWERPC_EVENT(CYCLES_ONE_INSTR_DISPATCHED, 0x02, 33), + PMC_POWERPC_EVENT(CYCLES_TWO_INSTR_COMPLETED, 0x02, 34), + PMC_POWERPC_EVENT(ITLB_NON_SPECULATIVE_MISSES, 0x02, 35), + PMC_POWERPC_EVENT(CYCLES_WAITING_FROM_L1_INSTR_CACHE_MISS, 0x02, 36), + PMC_POWERPC_EVENT(L1_DATA_LOAD_ACCESS_MISS, 0x02, 37), + PMC_POWERPC_EVENT(L1_DATA_TOUCH_MISS, 0x02, 38), + PMC_POWERPC_EVENT(L1_DATA_STORE_MISS, 0x02, 39), + PMC_POWERPC_EVENT(L1_DATA_TOUCH_MISS_CYCLES, 0x02, 40), + PMC_POWERPC_EVENT(L1_DATA_CYCLES_USED, 0x02, 41), + PMC_POWERPC_EVENT(DST_STREAM_1_CACHE_LINE_FETCHES, 0x02, 42), + PMC_POWERPC_EVENT(VTQ_STREAM_CANCELED_PREMATURELY, 0x02, 43), + PMC_POWERPC_EVENT(VTQ_RESUMES_DUE_TO_CTX_CHANGE, 0x02, 44), + PMC_POWERPC_EVENT(VTQ_LINE_FETCH_MISS, 0x02, 45), + PMC_POWERPC_EVENT(VTQ_LINE_FETCH, 0x02, 46), + PMC_POWERPC_EVENT(TLBIE_SNOOPS, 0x02, 47), + PMC_POWERPC_EVENT(L1_INSTR_CACHE_RELOADS, 0x02, 48), + PMC_POWERPC_EVENT(L1_DATA_CACHE_RELOADS, 0x02, 49), + PMC_POWERPC_EVENT(L1_DATA_CACHE_CASTOUTS_TO_L2, 0x02, 50), + PMC_POWERPC_EVENT(STORE_MERGE_GATHER, 0x02, 51), + PMC_POWERPC_EVENT(CACHEABLE_STORE_MERGE_TO_32_BYTES, 0x02, 52), + PMC_POWERPC_EVENT(DATA_BKPT_MATCHES, 0x02, 53), + PMC_POWERPC_EVENT(FALL_THROUGH_BRANCHES_PROCESSED, 0x02, 54), + PMC_POWERPC_EVENT(FIRST_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY, 0x02, 55), + PMC_POWERPC_EVENT(SECOND_SPECULATION_BUFFER_ACTIVE, 0x02, 56), + PMC_POWERPC_EVENT(BPU_STALL_ON_LR_DEPENDENCY, 0x02, 57), + PMC_POWERPC_EVENT(BTIC_MISS, 0x02, 58), + PMC_POWERPC_EVENT(BRANCH_LINK_STACK_CORRECTLY_RESOLVED, 0x02, 59), + PMC_POWERPC_EVENT(FPR_ISSUE_STALLED, 0x02, 60), + PMC_POWERPC_EVENT(SWITCHES_BETWEEN_PRIV_USER, 0x02, 61), + PMC_POWERPC_EVENT(LSU_COMPLETES_FP_STORE_SINGLE, 0x02, 62), + PMC_POWERPC_EVENT(CYCLES_TWO_INSTR_COMPLETED, 0x04, 8), + PMC_POWERPC_EVENT(CYCLES_ONE_INSTR_DISPATCHED, 0x04, 9), + PMC_POWERPC_EVENT(VR_ISSUE_QUEUE_DISPATCHES, 0x04, 10), + PMC_POWERPC_EVENT(VR_STALLS, 0x04, 11), + PMC_POWERPC_EVENT(GPR_RENAME_BUFFER_ENTRIES_OVER_THRESHOLD, 0x04, 12), + PMC_POWERPC_EVENT(FPR_ISSUE_QUEUE_ENTRIES, 0x04, 13), + PMC_POWERPC_EVENT(FPU_INSTR_COMPLETED, 0x04, 14), + PMC_POWERPC_EVENT(STWCX_INSTR_COMPLETED, 0x04, 15), + PMC_POWERPC_EVENT(LS_LM_INSTR_PIECES, 0x04, 16), + PMC_POWERPC_EVENT(ITLB_HW_SEARCH_CYCLES_OVER_THRESHOLD, 0x04, 17), + PMC_POWERPC_EVENT(DTLB_MISSES, 0x04, 18), + PMC_POWERPC_EVENT(CANCELLED_L1_INSTR_CACHE_MISSES, 0x04, 19), + PMC_POWERPC_EVENT(L1_DATA_CACHE_OP_HIT, 0x04, 20), + PMC_POWERPC_EVENT(L1_DATA_LOAD_MISS_CYCLES, 0x04, 21), + PMC_POWERPC_EVENT(L1_DATA_PUSHES, 0x04, 22), + PMC_POWERPC_EVENT(L1_DATA_TOTAL_MISS, 0x04, 23), + PMC_POWERPC_EVENT(VT2_FETCHES, 0x04, 24), + PMC_POWERPC_EVENT(TAKEN_BRANCHES_PROCESSED, 0x04, 25), + PMC_POWERPC_EVENT(BRANCH_FLUSHES, 0x04, 26), + PMC_POWERPC_EVENT(SECOND_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY, 0x04, 27), + PMC_POWERPC_EVENT(THIRD_SPECULATION_BUFFER_ACTIVE, 0x04, 28), + PMC_POWERPC_EVENT(BRANCH_UNIT_STALL_ON_CTR_DEPENDENCY, 0x04, 29), + PMC_POWERPC_EVENT(FAST_BTIC_HIT, 0x04, 30), + PMC_POWERPC_EVENT(BRANCH_LINK_STACK_MISPREDICTED, 0x04, 31), + PMC_POWERPC_EVENT(CYCLES_THREE_INSTR_COMPLETED, 0x08, 14), + PMC_POWERPC_EVENT(CYCLES_NO_INSTR_DISPATCHED, 0x08, 15), + PMC_POWERPC_EVENT(GPR_ISSUE_QUEUE_ENTRIES_OVER_THRESHOLD, 0x08, 16), + PMC_POWERPC_EVENT(GPR_ISSUE_QUEUE_STALLED, 0x08, 17), + PMC_POWERPC_EVENT(IU1_INSTR_COMPLETED, 0x08, 18), + PMC_POWERPC_EVENT(DSSALL_INSTR_COMPLETED, 0x08, 19), + PMC_POWERPC_EVENT(TLBSYNC_INSTR_COMPLETED, 0x08, 20), + PMC_POWERPC_EVENT(SYNC_INSTR_COMPLETED, 0x08, 21), + PMC_POWERPC_EVENT(SS_SM_INSTR_PIECES, 0x08, 22), + PMC_POWERPC_EVENT(DTLB_HW_SEARCH_CYCLES, 0x08, 23), + PMC_POWERPC_EVENT(SNOOP_RETRIES, 0x08, 24), + PMC_POWERPC_EVENT(SUCCESSFUL_STWCX, 0x08, 25), + PMC_POWERPC_EVENT(DST_STREAM_3_CACHE_LINE_FETCHES, 0x08, 26), + PMC_POWERPC_EVENT(THIRD_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY, 0x08, 27), + PMC_POWERPC_EVENT(MISPREDICTED_BRANCHES, 0x08, 28), + PMC_POWERPC_EVENT(FOLDED_BRANCHES, 0x08, 29), + PMC_POWERPC_EVENT(FP_STORE_DOUBLE_COMPLETES_IN_LSU, 0x08, 30), + PMC_POWERPC_EVENT(L2_CACHE_HITS, 0x30, 2), + PMC_POWERPC_EVENT(L3_CACHE_HITS, 0x30, 3), + PMC_POWERPC_EVENT(L2_INSTR_CACHE_MISSES, 0x30, 4), + PMC_POWERPC_EVENT(L3_INSTR_CACHE_MISSES, 0x30, 5), + PMC_POWERPC_EVENT(L2_DATA_CACHE_MISSES, 0x30, 6), + PMC_POWERPC_EVENT(L3_DATA_CACHE_MISSES, 0x30, 7), + PMC_POWERPC_EVENT(L2_LOAD_HITS, 0x10, 8), + PMC_POWERPC_EVENT(L2_STORE_HITS, 0x10, 9), + PMC_POWERPC_EVENT(L3_LOAD_HITS, 0x10, 10), + PMC_POWERPC_EVENT(L3_STORE_HITS, 0x10, 11), + PMC_POWERPC_EVENT(L2_TOUCH_HITS, 0x30, 13), + PMC_POWERPC_EVENT(L3_TOUCH_HITS, 0x30, 14), + PMC_POWERPC_EVENT(SNOOP_RETRIES, 0x30, 15), + PMC_POWERPC_EVENT(SNOOP_MODIFIED, 0x10, 16), + PMC_POWERPC_EVENT(SNOOP_VALID, 0x10, 17), + PMC_POWERPC_EVENT(INTERVENTION, 0x30, 18), + PMC_POWERPC_EVENT(L2_CACHE_MISSES, 0x10, 19), + PMC_POWERPC_EVENT(L3_CACHE_MISSES, 0x10, 20), + PMC_POWERPC_EVENT(L2_CACHE_CASTOUTS, 0x20, 8), + PMC_POWERPC_EVENT(L3_CACHE_CASTOUTS, 0x20, 9), + PMC_POWERPC_EVENT(L2SQ_FULL_CYCLES, 0x20, 10), + PMC_POWERPC_EVENT(L3SQ_FULL_CYCLES, 0x20, 11), + PMC_POWERPC_EVENT(RAQ_FULL_CYCLES, 0x20, 16), + PMC_POWERPC_EVENT(WAQ_FULL_CYCLES, 0x20, 17), + PMC_POWERPC_EVENT(L1_EXTERNAL_INTERVENTIONS, 0x20, 19), + PMC_POWERPC_EVENT(L2_EXTERNAL_INTERVENTIONS, 0x20, 20), + PMC_POWERPC_EVENT(L3_EXTERNAL_INTERVENTIONS, 0x20, 21), + PMC_POWERPC_EVENT(EXTERNAL_INTERVENTIONS, 0x20, 22), + PMC_POWERPC_EVENT(EXTERNAL_PUSHES, 0x20, 23), + PMC_POWERPC_EVENT(EXTERNAL_SNOOP_RETRY, 0x20, 24), + PMC_POWERPC_EVENT(DTQ_FULL_CYCLES, 0x20, 25), + PMC_POWERPC_EVENT(BUS_RETRY, 0x20, 26), + PMC_POWERPC_EVENT(L2_VALID_REQUEST, 0x20, 27), + PMC_POWERPC_EVENT(BORDQ_FULL, 0x20, 28), + PMC_POWERPC_EVENT(BUS_TAS_FOR_READS, 0x20, 42), + PMC_POWERPC_EVENT(BUS_TAS_FOR_WRITES, 0x20, 43), + PMC_POWERPC_EVENT(BUS_READS_NOT_RETRIED, 0x20, 44), + PMC_POWERPC_EVENT(BUS_WRITES_NOT_RETRIED, 0x20, 45), + PMC_POWERPC_EVENT(BUS_READS_WRITES_NOT_RETRIED, 0x20, 46), + PMC_POWERPC_EVENT(BUS_RETRY_DUE_TO_L1_RETRY, 0x20, 47), + PMC_POWERPC_EVENT(BUS_RETRY_DUE_TO_PREVIOUS_ADJACENT, 0x20, 48), + PMC_POWERPC_EVENT(BUS_RETRY_DUE_TO_COLLISION, 0x20, 49), + PMC_POWERPC_EVENT(BUS_RETRY_DUE_TO_INTERVENTION_ORDERING, 0x20, 50), + PMC_POWERPC_EVENT(SNOOP_REQUESTS, 0x20, 51), + PMC_POWERPC_EVENT(PREFETCH_ENGINE_REQUEST, 0x20, 52), + PMC_POWERPC_EVENT(PREFETCH_ENGINE_COLLISION_VS_LOAD, 0x20, 53), + PMC_POWERPC_EVENT(PREFETCH_ENGINE_COLLISION_VS_STORE, 0x20, 54), + PMC_POWERPC_EVENT(PREFETCH_ENGINE_COLLISION_VS_INSTR_FETCH, 0x20, 55), + PMC_POWERPC_EVENT(PREFETCH_ENGINE_COLLISION_VS_LOAD_STORE_INSTR_FETCH, 0x20, 56), + PMC_POWERPC_EVENT(PREFETCH_ENGINE_FULL, 0x20, 57) +}; + +const size_t powerpc_event_codes_size = + sizeof(powerpc_event_codes) / sizeof(powerpc_event_codes[0]); + +static pmc_value_t +mpc7xxx_pmcn_read(unsigned int pmc) +{ + switch (pmc) { + case 0: + return mfspr(SPR_PMC1); + break; + case 1: + return mfspr(SPR_PMC2); + break; + case 2: + return mfspr(SPR_PMC3); + break; + case 3: + return mfspr(SPR_PMC4); + break; + case 4: + return mfspr(SPR_PMC5); + break; + case 5: + return mfspr(SPR_PMC6); + default: + panic("Invalid PMC number: %d\n", pmc); + } +} + +static void +mpc7xxx_pmcn_write(unsigned int pmc, uint32_t val) +{ + switch (pmc) { + case 0: + mtspr(SPR_PMC1, val); + break; + case 1: + mtspr(SPR_PMC2, val); + break; + case 2: + mtspr(SPR_PMC3, val); + break; + case 3: + mtspr(SPR_PMC4, val); + break; + case 4: + mtspr(SPR_PMC5, val); + break; + case 5: + mtspr(SPR_PMC6, val); + break; + default: + panic("Invalid PMC number: %d\n", pmc); + } +} + +static int +mpc7xxx_read_pmc(int cpu, int ri, pmc_value_t *v) +{ + struct pmc *pm; + pmc_value_t tmp; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < MPC7XXX_MAX_PMCS, + ("[powerpc,%d] illegal row index %d", __LINE__, ri)); + + pm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc; + KASSERT(pm, + ("[core,%d] cpu %d ri %d pmc not configured", __LINE__, cpu, + ri)); + + tmp = mpc7xxx_pmcn_read(ri); + PMCDBG(MDP,REA,2,"ppc-read id=%d -> %jd", ri, tmp); + if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) + *v = POWERPC_PERFCTR_VALUE_TO_RELOAD_COUNT(tmp); + else + *v = tmp; + + return 0; +} + +static int +mpc7xxx_write_pmc(int cpu, int ri, pmc_value_t v) +{ + struct pmc *pm; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < MPC7XXX_MAX_PMCS, + ("[powerpc,%d] illegal row-index %d", __LINE__, ri)); + + pm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc; + + if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) + v = POWERPC_RELOAD_COUNT_TO_PERFCTR_VALUE(v); + + PMCDBG(MDP,WRI,1,"powerpc-write cpu=%d ri=%d v=%jx", cpu, ri, v); + + mpc7xxx_pmcn_write(ri, v); + + return 0; +} + +static int +mpc7xxx_config_pmc(int cpu, int ri, struct pmc *pm) +{ + struct pmc_hw *phw; + + PMCDBG(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < MPC7XXX_MAX_PMCS, + ("[powerpc,%d] illegal row-index %d", __LINE__, ri)); + + phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri]; + + KASSERT(pm == NULL || phw->phw_pmc == NULL, + ("[powerpc,%d] pm=%p phw->pm=%p hwpmc not unconfigured", + __LINE__, pm, phw->phw_pmc)); + + phw->phw_pmc = pm; + + return 0; +} + +static int +mpc7xxx_start_pmc(int cpu, int ri) +{ + uint32_t config; + struct pmc *pm; + struct pmc_hw *phw; + register_t pmc_mmcr; + + phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri]; + pm = phw->phw_pmc; + config = pm->pm_md.pm_powerpc.pm_powerpc_evsel & ~POWERPC_PMC_ENABLE; + + /* Enable the PMC. */ + switch (ri) { + case 0: + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr = PPC_SET_PMC1SEL(pmc_mmcr, config); + mtspr(SPR_MMCR0, pmc_mmcr); + break; + case 1: + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr = PPC_SET_PMC2SEL(pmc_mmcr, config); + mtspr(SPR_MMCR0, pmc_mmcr); + break; + case 2: + pmc_mmcr = mfspr(SPR_MMCR1); + pmc_mmcr = PPC_SET_PMC3SEL(pmc_mmcr, config); + mtspr(SPR_MMCR1, pmc_mmcr); + break; + case 3: + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr = PPC_SET_PMC4SEL(pmc_mmcr, config); + mtspr(SPR_MMCR0, pmc_mmcr); + break; + case 4: + pmc_mmcr = mfspr(SPR_MMCR1); + pmc_mmcr = PPC_SET_PMC5SEL(pmc_mmcr, config); + mtspr(SPR_MMCR1, pmc_mmcr); + break; + case 5: + pmc_mmcr = mfspr(SPR_MMCR1); + pmc_mmcr = PPC_SET_PMC6SEL(pmc_mmcr, config); + mtspr(SPR_MMCR1, pmc_mmcr); + break; + default: + break; + } + + /* The mask is inverted (enable is 1) compared to the flags in MMCR0, which + * are Freeze flags. + */ + config = ~pm->pm_md.pm_powerpc.pm_powerpc_evsel & POWERPC_PMC_ENABLE; + + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr &= ~SPR_MMCR0_FC; + pmc_mmcr |= config; + mtspr(SPR_MMCR0, pmc_mmcr); + + return 0; +} + +static int +mpc7xxx_stop_pmc(int cpu, int ri) +{ + struct pmc *pm; + struct pmc_hw *phw; + register_t pmc_mmcr; + + phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri]; + pm = phw->phw_pmc; + + /* + * Disable the PMCs. + */ + switch (ri) { + case 0: + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr = PPC_SET_PMC1SEL(pmc_mmcr, 0); + mtspr(SPR_MMCR0, pmc_mmcr); + break; + case 1: + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr = PPC_SET_PMC2SEL(pmc_mmcr, 0); + mtspr(SPR_MMCR0, pmc_mmcr); + break; + case 2: + pmc_mmcr = mfspr(SPR_MMCR1); + pmc_mmcr = PPC_SET_PMC3SEL(pmc_mmcr, 0); + mtspr(SPR_MMCR1, pmc_mmcr); + break; + case 3: + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr = PPC_SET_PMC4SEL(pmc_mmcr, 0); + mtspr(SPR_MMCR0, pmc_mmcr); + break; + case 4: + pmc_mmcr = mfspr(SPR_MMCR1); + pmc_mmcr = PPC_SET_PMC5SEL(pmc_mmcr, 0); + mtspr(SPR_MMCR1, pmc_mmcr); + break; + case 5: + pmc_mmcr = mfspr(SPR_MMCR1); + pmc_mmcr = PPC_SET_PMC6SEL(pmc_mmcr, 0); + mtspr(SPR_MMCR1, pmc_mmcr); + break; + default: + break; + } + return 0; +} + +static int +mpc7xxx_pcpu_init(struct pmc_mdep *md, int cpu) +{ + int first_ri, i; + struct pmc_cpu *pc; + struct powerpc_cpu *pac; + struct pmc_hw *phw; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] wrong cpu number %d", __LINE__, cpu)); + PMCDBG(MDP,INI,1,"powerpc-init cpu=%d", cpu); + + powerpc_pcpu[cpu] = pac = malloc(sizeof(struct powerpc_cpu), M_PMC, + M_WAITOK|M_ZERO); + pac->pc_ppcpmcs = malloc(sizeof(struct pmc_hw) * MPC7XXX_MAX_PMCS, + M_PMC, M_WAITOK|M_ZERO); + pc = pmc_pcpu[cpu]; + first_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_PPC7450].pcd_ri; + KASSERT(pc != NULL, ("[powerpc,%d] NULL per-cpu pointer", __LINE__)); + + for (i = 0, phw = pac->pc_ppcpmcs; i < MPC7XXX_MAX_PMCS; i++, phw++) { + phw->phw_state = PMC_PHW_FLAG_IS_ENABLED | + PMC_PHW_CPU_TO_STATE(cpu) | PMC_PHW_INDEX_TO_STATE(i); + phw->phw_pmc = NULL; + pc->pc_hwpmcs[i + first_ri] = phw; + } + + /* Clear the MMCRs, and set FC, to disable all PMCs. */ + mtspr(SPR_MMCR0, SPR_MMCR0_FC | SPR_MMCR0_PMXE | SPR_MMCR0_PMC1CE | SPR_MMCR0_PMCNCE); + mtspr(SPR_MMCR1, 0); + + return 0; +} + +static int +mpc7xxx_pcpu_fini(struct pmc_mdep *md, int cpu) +{ + uint32_t mmcr0 = mfspr(SPR_MMCR0); + + mmcr0 |= SPR_MMCR0_FC; + mtspr(SPR_MMCR0, mmcr0); + free(powerpc_pcpu[cpu]->pc_ppcpmcs, M_PMC); + free(powerpc_pcpu[cpu], M_PMC); + return 0; +} + +static int +mpc7xxx_allocate_pmc(int cpu, int ri, struct pmc *pm, + const struct pmc_op_pmcallocate *a) +{ + enum pmc_event pe; + uint32_t caps, config, counter; + int i; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < MPC7XXX_MAX_PMCS, + ("[powerpc,%d] illegal row index %d", __LINE__, ri)); + + caps = a->pm_caps; + + pe = a->pm_ev; + for (i = 0; i < powerpc_event_codes_size; i++) { + if (powerpc_event_codes[i].pe_ev == pe) { + config = powerpc_event_codes[i].pe_code; + counter = powerpc_event_codes[i].pe_counter_mask; + break; + } + } + if (i == powerpc_event_codes_size) + return (EINVAL); + + if ((counter & (1 << ri)) == 0) + return (EINVAL); + + if (caps & PMC_CAP_SYSTEM) + config |= POWERPC_PMC_KERNEL_ENABLE; + if (caps & PMC_CAP_USER) + config |= POWERPC_PMC_USER_ENABLE; + if ((caps & (PMC_CAP_USER | PMC_CAP_SYSTEM)) == 0) + config |= POWERPC_PMC_ENABLE; + + pm->pm_md.pm_powerpc.pm_powerpc_evsel = config; + + PMCDBG(MDP,ALL,2,"powerpc-allocate ri=%d -> config=0x%x", ri, config); + + return 0; +} + +static int +mpc7xxx_release_pmc(int cpu, int ri, struct pmc *pmc) +{ + struct pmc_hw *phw; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < MPC7XXX_MAX_PMCS, + ("[powerpc,%d] illegal row-index %d", __LINE__, ri)); + + phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri]; + KASSERT(phw->phw_pmc == NULL, + ("[powerpc,%d] PHW pmc %p non-NULL", __LINE__, phw->phw_pmc)); + + return 0; +} + +static int +mpc7xxx_intr(int cpu, struct trapframe *tf) +{ + int i, error, retval; + uint32_t config; + struct pmc *pm; + struct powerpc_cpu *pac; + pmc_value_t v; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] out of range CPU %d", __LINE__, cpu)); + + PMCDBG(MDP,INT,1, "cpu=%d tf=%p um=%d", cpu, (void *) tf, + TRAPF_USERMODE(tf)); + + retval = 0; + + pac = powerpc_pcpu[cpu]; + + config = mfspr(SPR_MMCR0); + mtspr(SPR_MMCR0, config | SPR_MMCR0_FC); + + /* + * look for all PMCs that have interrupted: + * - look for a running, sampling PMC which has overflowed + * and which has a valid 'struct pmc' association + * + * If found, we call a helper to process the interrupt. + */ + + for (i = 0; i < MPC7XXX_MAX_PMCS; i++) { + if ((pm = pac->pc_ppcpmcs[i].phw_pmc) == NULL || + !PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) { + continue; + } + + if (!MPC7XXX_PMC_HAS_OVERFLOWED(i)) + continue; + + retval = 1; /* Found an interrupting PMC. */ + + if (pm->pm_state != PMC_STATE_RUNNING) + continue; + + /* Stop the PMC, reload count. */ + v = pm->pm_sc.pm_reloadcount; + mpc7xxx_pmcn_write(i, v); + + /* Restart the counter if logging succeeded. */ + error = pmc_process_interrupt(cpu, PMC_HR, pm, tf, + TRAPF_USERMODE(tf)); + if (error != 0) + mpc7xxx_stop_pmc(cpu, i); + atomic_add_int(retval ? &pmc_stats.pm_intr_processed : + &pmc_stats.pm_intr_ignored, 1); + + } + + /* Re-enable PERF exceptions. */ + mtspr(SPR_MMCR0, config | SPR_MMCR0_PMXE); + + return (retval); +} + +int +pmc_mpc7xxx_initialize(struct pmc_mdep *pmc_mdep) +{ + struct pmc_classdep *pcd; + + pcd = &pmc_mdep->pmd_classdep[PMC_MDEP_CLASS_INDEX_PPC7450]; + pcd->pcd_caps = POWERPC_PMC_CAPS; + pcd->pcd_class = PMC_CLASS_PPC7450; + pcd->pcd_num = MPC7XXX_MAX_PMCS; + pcd->pcd_ri = pmc_mdep->pmd_npmc; + pcd->pcd_width = 32; /* All PMCs, even in ppc970, are 32-bit */ + + pcd->pcd_allocate_pmc = mpc7xxx_allocate_pmc; + pcd->pcd_config_pmc = mpc7xxx_config_pmc; + pcd->pcd_pcpu_fini = mpc7xxx_pcpu_fini; + pcd->pcd_pcpu_init = mpc7xxx_pcpu_init; + pcd->pcd_read_pmc = mpc7xxx_read_pmc; + pcd->pcd_release_pmc = mpc7xxx_release_pmc; + pcd->pcd_start_pmc = mpc7xxx_start_pmc; + pcd->pcd_stop_pmc = mpc7xxx_stop_pmc; + pcd->pcd_write_pmc = mpc7xxx_write_pmc; + + pmc_mdep->pmd_npmc += MPC7XXX_MAX_PMCS; + pmc_mdep->pmd_intr = mpc7xxx_intr; + + return 0; +} Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_powerpc.c Mon Sep 2 23:52:25 2013 (r255163) +++ head/sys/dev/hwpmc/hwpmc_powerpc.c Tue Sep 3 00:34:18 2013 (r255164) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Justin Hibbits + * Copyright (c) 2011,2013 Justin Hibbits * Copyright (c) 2005, Joseph Koshy * All rights reserved. * @@ -37,676 +37,50 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* For VM_MIN_KERNEL_ADDRESS/VM_MAX_KERNEL_ADDRESS */ -#define POWERPC_PMC_CAPS (PMC_CAP_INTERRUPT | PMC_CAP_USER | \ - PMC_CAP_SYSTEM | PMC_CAP_EDGE | \ - PMC_CAP_THRESHOLD | PMC_CAP_READ | \ - PMC_CAP_WRITE | PMC_CAP_INVERT | \ - PMC_CAP_QUALIFIER) - -#define PPC_SET_PMC1SEL(r, x) ((r & ~(SPR_MMCR0_PMC1SEL(0x3f))) | SPR_MMCR0_PMC1SEL(x)) -#define PPC_SET_PMC2SEL(r, x) ((r & ~(SPR_MMCR0_PMC2SEL(0x3f))) | SPR_MMCR0_PMC2SEL(x)) -#define PPC_SET_PMC3SEL(r, x) ((r & ~(SPR_MMCR1_PMC3SEL(0x1f))) | SPR_MMCR1_PMC3SEL(x)) -#define PPC_SET_PMC4SEL(r, x) ((r & ~(SPR_MMCR1_PMC4SEL(0x1f))) | SPR_MMCR1_PMC4SEL(x)) -#define PPC_SET_PMC5SEL(r, x) ((r & ~(SPR_MMCR1_PMC5SEL(0x1f))) | SPR_MMCR1_PMC5SEL(x)) -#define PPC_SET_PMC6SEL(r, x) ((r & ~(SPR_MMCR1_PMC6SEL(0x3f))) | SPR_MMCR1_PMC6SEL(x)) - -/* Change this when we support more than just the 7450. */ -#define PPC_MAX_PMCS 6 - -#define POWERPC_PMC_KERNEL_ENABLE (0x1 << 30) -#define POWERPC_PMC_USER_ENABLE (0x1 << 31) - -#define POWERPC_PMC_ENABLE (POWERPC_PMC_KERNEL_ENABLE | POWERPC_PMC_USER_ENABLE) -#define POWERPC_RELOAD_COUNT_TO_PERFCTR_VALUE(V) (0x80000000-(V)) -#define POWERPC_PERFCTR_VALUE_TO_RELOAD_COUNT(P) ((P)-0x80000000) -#define POWERPC_PMC_HAS_OVERFLOWED(x) (powerpc_pmcn_read(x) & (0x1 << 31)) +#include "hwpmc_powerpc.h" - -/* - * This should work for every 32-bit PowerPC implementation I know of (G3 and G4 - * specifically). PoewrPC 970 will take more work. - */ +#define INKERNEL(x) (((vm_offset_t)(x)) <= VM_MAX_KERNEL_ADDRESS && \ + ((vm_offset_t)(x)) >= VM_MIN_KERNEL_ADDRESS) /* * Per-processor information. */ -struct powerpc_cpu { - struct pmc_hw *pc_ppcpmcs; -}; - -static struct powerpc_cpu **powerpc_pcpu; - -struct powerpc_event_code_map { - enum pmc_event pe_ev; /* enum value */ - uint8_t pe_counter_mask; /* Which counter this can be counted in. */ - uint8_t pe_code; /* numeric code */ -}; - -#define PPC_PMC_MASK1 0 -#define PPC_PMC_MASK2 1 -#define PPC_PMC_MASK3 2 -#define PPC_PMC_MASK4 3 -#define PPC_PMC_MASK5 4 -#define PPC_PMC_MASK6 5 -#define PPC_PMC_MASK_ALL 0x3f - -#define PMC_POWERPC_EVENT(id, mask, number) \ - { .pe_ev = PMC_EV_PPC7450_##id, .pe_counter_mask = mask, .pe_code = number } - -static struct powerpc_event_code_map powerpc_event_codes[] = { - PMC_POWERPC_EVENT(CYCLE,PPC_PMC_MASK_ALL, 1), - PMC_POWERPC_EVENT(INSTR_COMPLETED, 0x0f, 2), - PMC_POWERPC_EVENT(TLB_BIT_TRANSITIONS, 0x0f, 3), - PMC_POWERPC_EVENT(INSTR_DISPATCHED, 0x0f, 4), - PMC_POWERPC_EVENT(PMON_EXCEPT, 0x0f, 5), - PMC_POWERPC_EVENT(PMON_SIG, 0x0f, 7), - PMC_POWERPC_EVENT(VPU_INSTR_COMPLETED, 0x03, 8), - PMC_POWERPC_EVENT(VFPU_INSTR_COMPLETED, 0x03, 9), - PMC_POWERPC_EVENT(VIU1_INSTR_COMPLETED, 0x03, 10), - PMC_POWERPC_EVENT(VIU2_INSTR_COMPLETED, 0x03, 11), - PMC_POWERPC_EVENT(MTVSCR_INSTR_COMPLETED, 0x03, 12), - PMC_POWERPC_EVENT(MTVRSAVE_INSTR_COMPLETED, 0x03, 13), - PMC_POWERPC_EVENT(VPU_INSTR_WAIT_CYCLES, 0x03, 14), - PMC_POWERPC_EVENT(VFPU_INSTR_WAIT_CYCLES, 0x03, 15), - PMC_POWERPC_EVENT(VIU1_INSTR_WAIT_CYCLES, 0x03, 16), - PMC_POWERPC_EVENT(VIU2_INSTR_WAIT_CYCLES, 0x03, 17), - PMC_POWERPC_EVENT(MFVSCR_SYNC_CYCLES, 0x03, 18), - PMC_POWERPC_EVENT(VSCR_SAT_SET, 0x03, 19), - PMC_POWERPC_EVENT(STORE_INSTR_COMPLETED, 0x03, 20), - PMC_POWERPC_EVENT(L1_INSTR_CACHE_MISSES, 0x03, 21), - PMC_POWERPC_EVENT(L1_DATA_SNOOPS, 0x03, 22), - PMC_POWERPC_EVENT(UNRESOLVED_BRANCHES, 0x01, 23), - PMC_POWERPC_EVENT(SPEC_BUFFER_CYCLES, 0x01, 24), - PMC_POWERPC_EVENT(BRANCH_UNIT_STALL_CYCLES, 0x01, 25), - PMC_POWERPC_EVENT(TRUE_BRANCH_TARGET_HITS, 0x01, 26), - PMC_POWERPC_EVENT(BRANCH_LINK_STAC_PREDICTED, 0x01, 27), - PMC_POWERPC_EVENT(GPR_ISSUE_QUEUE_DISPATCHES, 0x01, 28), - PMC_POWERPC_EVENT(CYCLES_THREE_INSTR_DISPATCHED, 0x01, 29), - PMC_POWERPC_EVENT(THRESHOLD_INSTR_QUEUE_ENTRIES_CYCLES, 0x01, 30), - PMC_POWERPC_EVENT(THRESHOLD_VEC_INSTR_QUEUE_ENTRIES_CYCLES, 0x01, 31), - PMC_POWERPC_EVENT(CYCLES_NO_COMPLETED_INSTRS, 0x01, 32), - PMC_POWERPC_EVENT(IU2_INSTR_COMPLETED, 0x01, 33), - PMC_POWERPC_EVENT(BRANCHES_COMPLETED, 0x01, 34), - PMC_POWERPC_EVENT(EIEIO_INSTR_COMPLETED, 0x01, 35), - PMC_POWERPC_EVENT(MTSPR_INSTR_COMPLETED, 0x01, 36), - PMC_POWERPC_EVENT(SC_INSTR_COMPLETED, 0x01, 37), - PMC_POWERPC_EVENT(LS_LM_COMPLETED, 0x01, 38), - PMC_POWERPC_EVENT(ITLB_HW_TABLE_SEARCH_CYCLES, 0x01, 39), - PMC_POWERPC_EVENT(DTLB_HW_SEARCH_CYCLES_OVER_THRESHOLD, 0x01, 40), - PMC_POWERPC_EVENT(L1_INSTR_CACHE_ACCESSES, 0x01, 41), - PMC_POWERPC_EVENT(INSTR_BKPT_MATCHES, 0x01, 42), - PMC_POWERPC_EVENT(L1_DATA_CACHE_LOAD_MISS_CYCLES_OVER_THRESHOLD, 0x01, 43), - PMC_POWERPC_EVENT(L1_DATA_SNOOP_HIT_ON_MODIFIED, 0x01, 44), - PMC_POWERPC_EVENT(LOAD_MISS_ALIAS, 0x01, 45), - PMC_POWERPC_EVENT(LOAD_MISS_ALIAS_ON_TOUCH, 0x01, 46), - PMC_POWERPC_EVENT(TOUCH_ALIAS, 0x01, 47), - PMC_POWERPC_EVENT(L1_DATA_SNOOP_HIT_CASTOUT_QUEUE, 0x01, 48), - PMC_POWERPC_EVENT(L1_DATA_SNOOP_HIT_CASTOUT, 0x01, 49), - PMC_POWERPC_EVENT(L1_DATA_SNOOP_HITS, 0x01, 50), - PMC_POWERPC_EVENT(WRITE_THROUGH_STORES, 0x01, 51), - PMC_POWERPC_EVENT(CACHE_INHIBITED_STORES, 0x01, 52), - PMC_POWERPC_EVENT(L1_DATA_LOAD_HIT, 0x01, 53), - PMC_POWERPC_EVENT(L1_DATA_TOUCH_HIT, 0x01, 54), - PMC_POWERPC_EVENT(L1_DATA_STORE_HIT, 0x01, 55), - PMC_POWERPC_EVENT(L1_DATA_TOTAL_HITS, 0x01, 56), - PMC_POWERPC_EVENT(DST_INSTR_DISPATCHED, 0x01, 57), - PMC_POWERPC_EVENT(REFRESHED_DSTS, 0x01, 58), - PMC_POWERPC_EVENT(SUCCESSFUL_DST_TABLE_SEARCHES, 0x01, 59), - PMC_POWERPC_EVENT(DSS_INSTR_COMPLETED, 0x01, 60), - PMC_POWERPC_EVENT(DST_STREAM_0_CACHE_LINE_FETCHES, 0x01, 61), - PMC_POWERPC_EVENT(VTQ_SUSPENDS_DUE_TO_CTX_CHANGE, 0x01, 62), - PMC_POWERPC_EVENT(VTQ_LINE_FETCH_HIT, 0x01, 63), - PMC_POWERPC_EVENT(VEC_LOAD_INSTR_COMPLETED, 0x01, 64), - PMC_POWERPC_EVENT(FP_STORE_INSTR_COMPLETED_IN_LSU, 0x01, 65), - PMC_POWERPC_EVENT(FPU_RENORMALIZATION, 0x01, 66), - PMC_POWERPC_EVENT(FPU_DENORMALIZATION, 0x01, 67), - PMC_POWERPC_EVENT(FP_STORE_CAUSES_STALL_IN_LSU, 0x01, 68), - PMC_POWERPC_EVENT(LD_ST_TRUE_ALIAS_STALL, 0x01, 70), - PMC_POWERPC_EVENT(LSU_INDEXED_ALIAS_STALL, 0x01, 71), - PMC_POWERPC_EVENT(LSU_ALIAS_VS_FSQ_WB0_WB1, 0x01, 72), - PMC_POWERPC_EVENT(LSU_ALIAS_VS_CSQ, 0x01, 73), - PMC_POWERPC_EVENT(LSU_LOAD_HIT_LINE_ALIAS_VS_CSQ0, 0x01, 74), - PMC_POWERPC_EVENT(LSU_LOAD_MISS_LINE_ALIAS_VS_CSQ0, 0x01, 75), - PMC_POWERPC_EVENT(LSU_TOUCH_LINE_ALIAS_VS_FSQ_WB0_WB1, 0x01, 76), - PMC_POWERPC_EVENT(LSU_TOUCH_ALIAS_VS_CSQ, 0x01, 77), - PMC_POWERPC_EVENT(LSU_LMQ_FULL_STALL, 0x01, 78), - PMC_POWERPC_EVENT(FP_LOAD_INSTR_COMPLETED_IN_LSU, 0x01, 79), - PMC_POWERPC_EVENT(FP_LOAD_SINGLE_INSTR_COMPLETED_IN_LSU, 0x01, 80), - PMC_POWERPC_EVENT(FP_LOAD_DOUBLE_COMPLETED_IN_LSU, 0x01, 81), - PMC_POWERPC_EVENT(LSU_RA_LATCH_STALL, 0x01, 82), - PMC_POWERPC_EVENT(LSU_LOAD_VS_STORE_QUEUE_ALIAS_STALL, 0x01, 83), - PMC_POWERPC_EVENT(LSU_LMQ_INDEX_ALIAS, 0x01, 84), - PMC_POWERPC_EVENT(LSU_STORE_QUEUE_INDEX_ALIAS, 0x01, 85), - PMC_POWERPC_EVENT(LSU_CSQ_FORWARDING, 0x01, 86), - PMC_POWERPC_EVENT(LSU_MISALIGNED_LOAD_FINISH, 0x01, 87), - PMC_POWERPC_EVENT(LSU_MISALIGN_STORE_COMPLETED, 0x01, 88), - PMC_POWERPC_EVENT(LSU_MISALIGN_STALL, 0x01, 89), - PMC_POWERPC_EVENT(FP_ONE_QUARTER_FPSCR_RENAMES_BUSY, 0x01, 90), - PMC_POWERPC_EVENT(FP_ONE_HALF_FPSCR_RENAMES_BUSY, 0x01, 91), - PMC_POWERPC_EVENT(FP_THREE_QUARTERS_FPSCR_RENAMES_BUSY, 0x01, 92), - PMC_POWERPC_EVENT(FP_ALL_FPSCR_RENAMES_BUSY, 0x01, 93), - PMC_POWERPC_EVENT(FP_DENORMALIZED_RESULT, 0x01, 94), - PMC_POWERPC_EVENT(L1_DATA_TOTAL_MISSES, 0x02, 23), - PMC_POWERPC_EVENT(DISPATCHES_TO_FPR_ISSUE_QUEUE, 0x02, 24), - PMC_POWERPC_EVENT(LSU_INSTR_COMPLETED, 0x02, 25), - PMC_POWERPC_EVENT(LOAD_INSTR_COMPLETED, 0x02, 26), - PMC_POWERPC_EVENT(SS_SM_INSTR_COMPLETED, 0x02, 27), - PMC_POWERPC_EVENT(TLBIE_INSTR_COMPLETED, 0x02, 28), - PMC_POWERPC_EVENT(LWARX_INSTR_COMPLETED, 0x02, 29), - PMC_POWERPC_EVENT(MFSPR_INSTR_COMPLETED, 0x02, 30), - PMC_POWERPC_EVENT(REFETCH_SERIALIZATION, 0x02, 31), - PMC_POWERPC_EVENT(COMPLETION_QUEUE_ENTRIES_OVER_THRESHOLD, 0x02, 32), - PMC_POWERPC_EVENT(CYCLES_ONE_INSTR_DISPATCHED, 0x02, 33), - PMC_POWERPC_EVENT(CYCLES_TWO_INSTR_COMPLETED, 0x02, 34), - PMC_POWERPC_EVENT(ITLB_NON_SPECULATIVE_MISSES, 0x02, 35), - PMC_POWERPC_EVENT(CYCLES_WAITING_FROM_L1_INSTR_CACHE_MISS, 0x02, 36), - PMC_POWERPC_EVENT(L1_DATA_LOAD_ACCESS_MISS, 0x02, 37), - PMC_POWERPC_EVENT(L1_DATA_TOUCH_MISS, 0x02, 38), - PMC_POWERPC_EVENT(L1_DATA_STORE_MISS, 0x02, 39), - PMC_POWERPC_EVENT(L1_DATA_TOUCH_MISS_CYCLES, 0x02, 40), - PMC_POWERPC_EVENT(L1_DATA_CYCLES_USED, 0x02, 41), - PMC_POWERPC_EVENT(DST_STREAM_1_CACHE_LINE_FETCHES, 0x02, 42), - PMC_POWERPC_EVENT(VTQ_STREAM_CANCELED_PREMATURELY, 0x02, 43), - PMC_POWERPC_EVENT(VTQ_RESUMES_DUE_TO_CTX_CHANGE, 0x02, 44), - PMC_POWERPC_EVENT(VTQ_LINE_FETCH_MISS, 0x02, 45), - PMC_POWERPC_EVENT(VTQ_LINE_FETCH, 0x02, 46), - PMC_POWERPC_EVENT(TLBIE_SNOOPS, 0x02, 47), - PMC_POWERPC_EVENT(L1_INSTR_CACHE_RELOADS, 0x02, 48), - PMC_POWERPC_EVENT(L1_DATA_CACHE_RELOADS, 0x02, 49), - PMC_POWERPC_EVENT(L1_DATA_CACHE_CASTOUTS_TO_L2, 0x02, 50), - PMC_POWERPC_EVENT(STORE_MERGE_GATHER, 0x02, 51), - PMC_POWERPC_EVENT(CACHEABLE_STORE_MERGE_TO_32_BYTES, 0x02, 52), - PMC_POWERPC_EVENT(DATA_BKPT_MATCHES, 0x02, 53), - PMC_POWERPC_EVENT(FALL_THROUGH_BRANCHES_PROCESSED, 0x02, 54), - PMC_POWERPC_EVENT(FIRST_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY, 0x02, 55), - PMC_POWERPC_EVENT(SECOND_SPECULATION_BUFFER_ACTIVE, 0x02, 56), - PMC_POWERPC_EVENT(BPU_STALL_ON_LR_DEPENDENCY, 0x02, 57), - PMC_POWERPC_EVENT(BTIC_MISS, 0x02, 58), - PMC_POWERPC_EVENT(BRANCH_LINK_STACK_CORRECTLY_RESOLVED, 0x02, 59), - PMC_POWERPC_EVENT(FPR_ISSUE_STALLED, 0x02, 60), - PMC_POWERPC_EVENT(SWITCHES_BETWEEN_PRIV_USER, 0x02, 61), - PMC_POWERPC_EVENT(LSU_COMPLETES_FP_STORE_SINGLE, 0x02, 62), - PMC_POWERPC_EVENT(CYCLES_TWO_INSTR_COMPLETED, 0x04, 8), - PMC_POWERPC_EVENT(CYCLES_ONE_INSTR_DISPATCHED, 0x04, 9), - PMC_POWERPC_EVENT(VR_ISSUE_QUEUE_DISPATCHES, 0x04, 10), - PMC_POWERPC_EVENT(VR_STALLS, 0x04, 11), - PMC_POWERPC_EVENT(GPR_RENAME_BUFFER_ENTRIES_OVER_THRESHOLD, 0x04, 12), - PMC_POWERPC_EVENT(FPR_ISSUE_QUEUE_ENTRIES, 0x04, 13), - PMC_POWERPC_EVENT(FPU_INSTR_COMPLETED, 0x04, 14), - PMC_POWERPC_EVENT(STWCX_INSTR_COMPLETED, 0x04, 15), - PMC_POWERPC_EVENT(LS_LM_INSTR_PIECES, 0x04, 16), - PMC_POWERPC_EVENT(ITLB_HW_SEARCH_CYCLES_OVER_THRESHOLD, 0x04, 17), - PMC_POWERPC_EVENT(DTLB_MISSES, 0x04, 18), - PMC_POWERPC_EVENT(CANCELLED_L1_INSTR_CACHE_MISSES, 0x04, 19), - PMC_POWERPC_EVENT(L1_DATA_CACHE_OP_HIT, 0x04, 20), - PMC_POWERPC_EVENT(L1_DATA_LOAD_MISS_CYCLES, 0x04, 21), - PMC_POWERPC_EVENT(L1_DATA_PUSHES, 0x04, 22), - PMC_POWERPC_EVENT(L1_DATA_TOTAL_MISS, 0x04, 23), - PMC_POWERPC_EVENT(VT2_FETCHES, 0x04, 24), - PMC_POWERPC_EVENT(TAKEN_BRANCHES_PROCESSED, 0x04, 25), - PMC_POWERPC_EVENT(BRANCH_FLUSHES, 0x04, 26), - PMC_POWERPC_EVENT(SECOND_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY, 0x04, 27), - PMC_POWERPC_EVENT(THIRD_SPECULATION_BUFFER_ACTIVE, 0x04, 28), - PMC_POWERPC_EVENT(BRANCH_UNIT_STALL_ON_CTR_DEPENDENCY, 0x04, 29), - PMC_POWERPC_EVENT(FAST_BTIC_HIT, 0x04, 30), - PMC_POWERPC_EVENT(BRANCH_LINK_STACK_MISPREDICTED, 0x04, 31), - PMC_POWERPC_EVENT(CYCLES_THREE_INSTR_COMPLETED, 0x08, 14), - PMC_POWERPC_EVENT(CYCLES_NO_INSTR_DISPATCHED, 0x08, 15), - PMC_POWERPC_EVENT(GPR_ISSUE_QUEUE_ENTRIES_OVER_THRESHOLD, 0x08, 16), - PMC_POWERPC_EVENT(GPR_ISSUE_QUEUE_STALLED, 0x08, 17), - PMC_POWERPC_EVENT(IU1_INSTR_COMPLETED, 0x08, 18), - PMC_POWERPC_EVENT(DSSALL_INSTR_COMPLETED, 0x08, 19), - PMC_POWERPC_EVENT(TLBSYNC_INSTR_COMPLETED, 0x08, 20), - PMC_POWERPC_EVENT(SYNC_INSTR_COMPLETED, 0x08, 21), - PMC_POWERPC_EVENT(SS_SM_INSTR_PIECES, 0x08, 22), - PMC_POWERPC_EVENT(DTLB_HW_SEARCH_CYCLES, 0x08, 23), - PMC_POWERPC_EVENT(SNOOP_RETRIES, 0x08, 24), - PMC_POWERPC_EVENT(SUCCESSFUL_STWCX, 0x08, 25), - PMC_POWERPC_EVENT(DST_STREAM_3_CACHE_LINE_FETCHES, 0x08, 26), - PMC_POWERPC_EVENT(THIRD_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY, 0x08, 27), - PMC_POWERPC_EVENT(MISPREDICTED_BRANCHES, 0x08, 28), - PMC_POWERPC_EVENT(FOLDED_BRANCHES, 0x08, 29), - PMC_POWERPC_EVENT(FP_STORE_DOUBLE_COMPLETES_IN_LSU, 0x08, 30), - PMC_POWERPC_EVENT(L2_CACHE_HITS, 0x30, 2), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 00:42:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 62D67600; Tue, 3 Sep 2013 00:42:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 509942793; Tue, 3 Sep 2013 00:42:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r830gGCK074248; Tue, 3 Sep 2013 00:42:16 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r830gGXj074247; Tue, 3 Sep 2013 00:42:16 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201309030042.r830gGXj074247@svn.freebsd.org> From: Justin Hibbits Date: Tue, 3 Sep 2013 00:42:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255165 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 00:42:16 -0000 Author: jhibbits Date: Tue Sep 3 00:42:15 2013 New Revision: 255165 URL: http://svnweb.freebsd.org/changeset/base/255165 Log: Enable PMC interrupt handling, and fix a DTrace trap handling bug. Modified: head/sys/powerpc/aim/trap.c Modified: head/sys/powerpc/aim/trap.c ============================================================================== --- head/sys/powerpc/aim/trap.c Tue Sep 3 00:34:18 2013 (r255164) +++ head/sys/powerpc/aim/trap.c Tue Sep 3 00:42:15 2013 (r255165) @@ -197,13 +197,11 @@ trap(struct trapframe *frame) #ifdef HWPMC_HOOKS if (type == EXC_PERF && (pmc_intr != NULL)) { -#ifdef notyet - (*pmc_intr)(PCPU_GET(cpuid), frame); - if (!user) + (*pmc_intr)(PCPU_GET(cpuid), frame); + if (user) + userret(td, frame); return; -#endif } - else #endif #ifdef KDTRACE_HOOKS /* @@ -316,9 +314,11 @@ trap(struct trapframe *frame) if (*(uintptr_t *)frame->srr0 == 0x7c810808) { if (dtrace_invop_jump_addr != NULL) { dtrace_invop_jump_addr(frame); + return; } } } + break; #endif #ifdef __powerpc64__ case EXC_DSE: From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 02:26:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 226F5533; Tue, 3 Sep 2013 02:26:58 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 102882CBB; Tue, 3 Sep 2013 02:26:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r832Qvpq036973; Tue, 3 Sep 2013 02:26:57 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r832Qvst036972; Tue, 3 Sep 2013 02:26:57 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201309030226.r832Qvst036972@svn.freebsd.org> From: Bryan Venteicher Date: Tue, 3 Sep 2013 02:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255166 - head/sys/dev/virtio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 02:26:58 -0000 Author: bryanv Date: Tue Sep 3 02:26:57 2013 New Revision: 255166 URL: http://svnweb.freebsd.org/changeset/base/255166 Log: Fix unintended compiler constant folding Pointed out by: dim@ Modified: head/sys/dev/virtio/virtqueue.c Modified: head/sys/dev/virtio/virtqueue.c ============================================================================== --- head/sys/dev/virtio/virtqueue.c Tue Sep 3 00:42:15 2013 (r255165) +++ head/sys/dev/virtio/virtqueue.c Tue Sep 3 02:26:57 2013 (r255166) @@ -449,10 +449,10 @@ virtqueue_postpone_intr(struct virtqueue switch (hint) { case VQ_POSTPONE_SHORT: - ndesc /= 4; + ndesc = ndesc / 4; break; case VQ_POSTPONE_LONG: - ndesc *= 3 / 4; + ndesc = (ndesc * 3) / 4; break; case VQ_POSTPONE_EMPTIED: break; From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 02:28:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3BE0A689; Tue, 3 Sep 2013 02:28:32 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 111B22CD2; Tue, 3 Sep 2013 02:28:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r832SVpV037726; Tue, 3 Sep 2013 02:28:31 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r832SVmf037724; Tue, 3 Sep 2013 02:28:31 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201309030228.r832SVmf037724@svn.freebsd.org> From: Bryan Venteicher Date: Tue, 3 Sep 2013 02:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255167 - head/sys/dev/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 02:28:32 -0000 Author: bryanv Date: Tue Sep 3 02:28:31 2013 New Revision: 255167 URL: http://svnweb.freebsd.org/changeset/base/255167 Log: Complete any pending Tx frames before attempting the next transmit Also complete pending frames in the watchdog function when the EVENT_IDX feature was negotiated just in case the completion interrupt was postponed. Modified: head/sys/dev/virtio/network/if_vtnet.c head/sys/dev/virtio/network/if_vtnetvar.h Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Tue Sep 3 02:26:57 2013 (r255166) +++ head/sys/dev/virtio/network/if_vtnet.c Tue Sep 3 02:28:31 2013 (r255167) @@ -592,6 +592,9 @@ vtnet_setup_features(struct vtnet_softc vtnet_negotiate_features(sc); + if (virtio_with_feature(dev, VIRTIO_RING_F_EVENT_IDX)) + sc->vtnet_flags |= VTNET_FLAG_EVENT_IDX; + if (virtio_with_feature(dev, VIRTIO_NET_F_MAC)) { /* This feature should always be negotiated. */ sc->vtnet_flags |= VTNET_FLAG_MAC; @@ -2155,6 +2158,8 @@ vtnet_start_locked(struct vtnet_txq *txq sc->vtnet_link_active == 0) return; + vtnet_txq_eof(txq); + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { if (virtqueue_full(vq)) break; @@ -2226,6 +2231,8 @@ vtnet_txq_mq_start_locked(struct vtnet_t return (error); } + vtnet_txq_eof(txq); + while ((m = drbr_peek(ifp, br)) != NULL) { error = vtnet_txq_encap(txq, &m); if (error) { @@ -2471,6 +2478,8 @@ vtnet_watchdog(struct vtnet_txq *txq) sc = txq->vtntx_sc; VTNET_TXQ_LOCK(txq); + if (sc->vtnet_flags & VTNET_FLAG_EVENT_IDX) + vtnet_txq_eof(txq); if (txq->vtntx_watchdog == 0 || --txq->vtntx_watchdog) { VTNET_TXQ_UNLOCK(txq); return (0); Modified: head/sys/dev/virtio/network/if_vtnetvar.h ============================================================================== --- head/sys/dev/virtio/network/if_vtnetvar.h Tue Sep 3 02:26:57 2013 (r255166) +++ head/sys/dev/virtio/network/if_vtnetvar.h Tue Sep 3 02:28:31 2013 (r255167) @@ -138,6 +138,7 @@ struct vtnet_softc { #define VTNET_FLAG_MRG_RXBUFS 0x0080 #define VTNET_FLAG_LRO_NOMRG 0x0100 #define VTNET_FLAG_MULTIQ 0x0200 +#define VTNET_FLAG_EVENT_IDX 0x0400 int vtnet_link_active; int vtnet_hdr_size; From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 07:47:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 04BB7989; Tue, 3 Sep 2013 07:47:54 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E661D2E6D; Tue, 3 Sep 2013 07:47:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r837lrXu028501; Tue, 3 Sep 2013 07:47:53 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r837lrv3028500; Tue, 3 Sep 2013 07:47:53 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201309030747.r837lrv3028500@svn.freebsd.org> From: Jeremie Le Hen Date: Tue, 3 Sep 2013 07:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255169 - head/etc/defaults X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 07:47:54 -0000 Author: jlh Date: Tue Sep 3 07:47:53 2013 New Revision: 255169 URL: http://svnweb.freebsd.org/changeset/base/255169 Log: Since r254974, periodic scripts' period can be configured independently. There is no reason to leave their options with the daily ones, so move them to their own section. Move periodic scripts' options into their own section. Since r254974, Modified: head/etc/defaults/periodic.conf Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Tue Sep 3 05:20:42 2013 (r255168) +++ head/etc/defaults/periodic.conf Tue Sep 3 07:47:53 2013 (r255169) @@ -162,6 +162,71 @@ daily_scrub_zfs_default_threshold="35" daily_local="/etc/daily.local" # Local scripts +# Weekly options + +# These options are used by periodic(8) itself to determine what to do +# with the output of the sub-programs that are run, and where to send +# that output. $weekly_output might be set to /var/log/weekly.log if you +# wish to log the weekly output and have the files rotated by newsyslog(8) +# +weekly_output="root" # user or /file +weekly_show_success="YES" # scripts returning 0 +weekly_show_info="YES" # scripts returning 1 +weekly_show_badconfig="NO" # scripts returning 2 + +# 310.locate +weekly_locate_enable="YES" # Update locate weekly + +# 320.whatis +weekly_whatis_enable="YES" # Update whatis weekly + +# 330.catman +weekly_catman_enable="NO" # Preformat man pages + +# 340.noid +weekly_noid_enable="NO" # Find unowned files +weekly_noid_dirs="/" # Look here + +# 400.status-pkg +weekly_status_pkg_enable="NO" # Find out-of-date pkgs +pkg_version=pkg_version # Use this program +pkg_version_index=/usr/ports/INDEX-10 # Use this index file + +# 450.status-security +weekly_status_security_enable="YES" # Security check +# See also "Security options" above for more options +weekly_status_security_inline="NO" # Run inline ? +weekly_status_security_output="root" # user or /file + +# 999.local +weekly_local="/etc/weekly.local" # Local scripts + + +# Monthly options + +# These options are used by periodic(8) itself to determine what to do +# with the output of the sub-programs that are run, and where to send +# that output. $monthly_output might be set to /var/log/monthly.log if you +# wish to log the monthly output and have the files rotated by newsyslog(8) +# +monthly_output="root" # user or /file +monthly_show_success="YES" # scripts returning 0 +monthly_show_info="YES" # scripts returning 1 +monthly_show_badconfig="NO" # scripts returning 2 + +# 200.accounting +monthly_accounting_enable="YES" # Login accounting + +# 450.status-security +monthly_status_security_enable="YES" # Security check +# See also "Security options" above for more options +monthly_status_security_inline="NO" # Run inline ? +monthly_status_security_output="root" # user or /file + +# 999.local +monthly_local="/etc/monthly.local" # Local scripts + + # Security options # These options are used by the security periodic(8) scripts spawned in @@ -169,11 +234,14 @@ daily_local="/etc/daily.local" # Loca security_status_logdir="/var/log" # Directory for logs security_status_diff_flags="-b -u" # flags for diff output -# Each of the security_status_*_enable options below can have one of the +# Each of the security_status_*_period options below can have one of the # following values: -# - NO +# - NO: do not run at all # - daily: only run during the daily security status # - weekly: only run during the weekly security status +# - monthly: only run during the monthly security status +# Note that if periodic security scripts are run from crontab(5) directly, +# they will be run unless _enable or _period is set to "NO". # 100.chksetuid security_status_chksetuid_enable="YES" @@ -239,70 +307,6 @@ security_status_tcpwrap_enable="YES" security_status_tcpwrap_period="daily" -# Weekly options - -# These options are used by periodic(8) itself to determine what to do -# with the output of the sub-programs that are run, and where to send -# that output. $weekly_output might be set to /var/log/weekly.log if you -# wish to log the weekly output and have the files rotated by newsyslog(8) -# -weekly_output="root" # user or /file -weekly_show_success="YES" # scripts returning 0 -weekly_show_info="YES" # scripts returning 1 -weekly_show_badconfig="NO" # scripts returning 2 - -# 310.locate -weekly_locate_enable="YES" # Update locate weekly - -# 320.whatis -weekly_whatis_enable="YES" # Update whatis weekly - -# 330.catman -weekly_catman_enable="NO" # Preformat man pages - -# 340.noid -weekly_noid_enable="NO" # Find unowned files -weekly_noid_dirs="/" # Look here - -# 400.status-pkg -weekly_status_pkg_enable="NO" # Find out-of-date pkgs -pkg_version=pkg_version # Use this program -pkg_version_index=/usr/ports/INDEX-10 # Use this index file - -# 450.status-security -weekly_status_security_enable="YES" # Security check -# See also "Security options" above for more options -weekly_status_security_inline="NO" # Run inline ? -weekly_status_security_output="root" # user or /file - -# 999.local -weekly_local="/etc/weekly.local" # Local scripts - - -# Monthly options - -# These options are used by periodic(8) itself to determine what to do -# with the output of the sub-programs that are run, and where to send -# that output. $monthly_output might be set to /var/log/monthly.log if you -# wish to log the monthly output and have the files rotated by newsyslog(8) -# -monthly_output="root" # user or /file -monthly_show_success="YES" # scripts returning 0 -monthly_show_info="YES" # scripts returning 1 -monthly_show_badconfig="NO" # scripts returning 2 - -# 200.accounting -monthly_accounting_enable="YES" # Login accounting - -# 450.status-security -monthly_status_security_enable="YES" # Security check -# See also "Security options" above for more options -monthly_status_security_inline="NO" # Run inline ? -monthly_status_security_output="root" # user or /file - -# 999.local -monthly_local="/etc/monthly.local" # Local scripts - # Define source_periodic_confs, the mechanism used by /etc/periodic/*/* # scripts to source defaults/periodic.conf overrides safely. From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 07:51:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F0306BC6; Tue, 3 Sep 2013 07:51:06 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DB9E42EFC; Tue, 3 Sep 2013 07:51:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r837p6nl031887; Tue, 3 Sep 2013 07:51:06 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r837p6h3031886; Tue, 3 Sep 2013 07:51:06 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201309030751.r837p6h3031886@svn.freebsd.org> From: Jeremie Le Hen Date: Tue, 3 Sep 2013 07:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255170 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 07:51:07 -0000 Author: jlh Date: Tue Sep 3 07:51:06 2013 New Revision: 255170 URL: http://svnweb.freebsd.org/changeset/base/255170 Log: Since r254974, periodic scripts' period can be configured independently. There is no reason to leave their options with the daily ones, so move them to their own section. Modified: head/share/man/man5/periodic.conf.5 Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Tue Sep 3 07:47:53 2013 (r255169) +++ head/share/man/man5/periodic.conf.5 Tue Sep 3 07:51:06 2013 (r255170) @@ -482,6 +482,242 @@ This variable behaves in the same way as .Va *_output variables above, namely it can be set either to one or more email addresses or to an absolute file name. +.It Va daily_status_mail_rejects_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to summarise mail rejections logged to +.Pa /var/log/maillog +for the previous day. +.It Va daily_status_mail_rejects_logs +.Pq Vt num +Set to the number of maillog files that should be checked +for yesterday's mail rejects. +.It Va daily_status_named_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to summarise denied zone transfers (AXFR and IXFR) +for the previous day. +.It Va daily_status_named_usedns +.Pq Vt bool +Set to +.Dq Li YES +if you want to enable reverse DNS lookups. +.It Va daily_status_ntpd +.Pq Vt bool +Set to +.Dq Li YES +if you want to enable NTP status check. +.It Va daily_queuerun_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to manually run the mail queue at least once a day. +.It Va daily_submit_queuerun +.Pq Vt bool +Set to +.Dq Li YES +if you also want to manually run the submit mail queue at least once a day +when +.Va daily_queuerun_enable +is set to +.Dq Li YES . +.It Va daily_scrub_zfs_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to run a zfs scrub periodically. +.It Va daily_scrub_zfs_pools +.Pq Vt str +A space separated list of names of zfs pools to scrub. +If the list is empty or not set, all zfs pools are scrubbed. +.It Va daily_scrub_zfs_default_threshold +.Pq Vt int +Number of days between a scrub if no pool-specific threshold is set. +If not set, the default value is 35, corresponding to 5 weeks. +.It Va daily_scrub_zfs_ Ns Ao Ar poolname Ac Ns Va _threshold +.Pq Vt int +The same as +.Va daily_scrub_zfs_default_threshold +but specific to the pool +.Ao Ar poolname Ac Ns . +.It Va daily_local +.Pq Vt str +Set to a list of extra scripts that should be run after all other +daily scripts. +All scripts must be absolute path names. +.El +.Pp +The following variables are used by the standard scripts that reside in +.Pa /etc/periodic/weekly : +.Bl -tag -offset 4n -width 2n +.It Va weekly_locate_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to run +.Pa /usr/libexec/locate.updatedb . +This script is run using +.Nm nice Fl 5 +as user +.Dq Li nobody , +and generates the table used by the +.Xr locate 1 +command. +.It Va weekly_whatis_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to run +.Pa /usr/libexec/makewhatis.local . +This script regenerates the database used by the +.Xr apropos 1 +command. +.It Va weekly_catman_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to run +.Pa /usr/libexec/catman.local . +This script processes all out of date manual pages, speeding up the +.Xr man 1 +command at the expense of disk space. +.It Va weekly_noid_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to locate orphaned files on the system. +An orphaned file is one with an invalid owner or group. +.It Va weekly_noid_dirs +.Pq Vt str +A list of directories under which orphaned files are searched for. +This would usually be set to +.Pa / . +.It Va weekly_status_security_enable +.Pq Vt bool +Weekly counterpart of +.Va daily_status_securiy_enable . +.It Va weekly_status_security_inline +.Pq Vt bool +Weekly counterpart of +.Va daily_status_securiy_inline . +.It Va weekly_status_security_output +.Pq Vt str +Weekly counterpart of +.Va daily_status_securiy_output . +.It Va weekly_status_pkg_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to use +.Xr pkg_version 1 +to list installed packages which are out of date. +.It Va pkg_version +.Pq Vt str +When +.Va weekly_status_pkg_enable +is set to +.Dq Li YES , +this variable specifies the program that is used to determine the out of +date packages. +If unset, the +.Xr pkg_version 1 +program is used. +As an example, this variable might be set to +.Dq Li portversion +if the +.Pa ports/sysutils/portupgrade +port has been installed. +.It Va pkg_version_index +.Pq Vt str +This variable specifies the +.Pa INDEX +file from +.Pa /usr/ports +that should be used by +.Xr pkg_version 1 . +Because the dependency tree may be substantially different between versions of +.Fx , +there may be more than one +.Pa INDEX +file in +.Pa /usr/ports . +.Pp +Note, if the +.Va pkg_version +variable is set to +.Dq Li portversion , +it will also be necessary to arrange that the correct +.Pa INDEX +file is specified +using environment variables and that +.Va pkg_version_index +is cleared in +.Pa /etc/periodic.conf +.Pq Dq Li pkg_version_index= . +.It Va weekly_local +.Pq Vt str +Set to a list of extra scripts that should be run after all other +weekly scripts. +All scripts must be absolute path names. +.El +.Pp +The following variables are used by the standard scripts that reside in +.Pa /etc/periodic/monthly : +.Bl -tag -offset 4n -width 2n +.It Va monthly_accounting_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to do login accounting using the +.Xr ac 8 +command. +.It Va monthly_status_security_enable +.Pq Vt bool +Monthly counterpart of +.Va daily_status_securiy_enable . +.It Va monthly_status_security_inline +.Pq Vt bool +Monthly counterpart of +.Va daily_status_securiy_inline . +.It Va monthly_status_security_output +.Pq Vt str +Monthly counterpart of +.Va daily_status_securiy_output . +.It Va monthly_local +.Pq Vt str +Set to a list of extra scripts that should be run after all other +monthly scripts. +All scripts must be absolute path names. +.El +.Pp +The following variables are used by the standard scripts that reside in +.Pa /etc/periodic/security . +Those scripts are usually run from daily +.Pq Va daily_status_security_enable , +weekly +.Pq Va weekly_status_security_enable , +and monthly +.Pq Va monthly_status_security_enable +periodic hooks. +The +.Va ..._period +of each script can be configured as +.Dq daily , +.Dq weekly , +.Dq monthly +or +.Dq NO . +Note that when periodic security scripts are run from +.Xr crontab 5 , +they will be always run unless their +.Va ..._enable +or +.Va ..._period +variable is set to +.Dq No . +.Bl -tag -offset 4n -width 2n .It Va security_status_diff_flags .Pq Vt str Set to the arguments to pass to the @@ -709,214 +945,6 @@ Set to either .Dq Li monthly or .Dq Li NO . -.It Va daily_status_mail_rejects_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to summarise mail rejections logged to -.Pa /var/log/maillog -for the previous day. -.It Va daily_status_mail_rejects_logs -.Pq Vt num -Set to the number of maillog files that should be checked -for yesterday's mail rejects. -.It Va daily_status_named_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to summarise denied zone transfers (AXFR and IXFR) -for the previous day. -.It Va daily_status_named_usedns -.Pq Vt bool -Set to -.Dq Li YES -if you want to enable reverse DNS lookups. -.It Va daily_status_ntpd -.Pq Vt bool -Set to -.Dq Li YES -if you want to enable NTP status check. -.It Va daily_queuerun_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to manually run the mail queue at least once a day. -.It Va daily_submit_queuerun -.Pq Vt bool -Set to -.Dq Li YES -if you also want to manually run the submit mail queue at least once a day -when -.Va daily_queuerun_enable -is set to -.Dq Li YES . -.It Va daily_scrub_zfs_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to run a zfs scrub periodically. -.It Va daily_scrub_zfs_pools -.Pq Vt str -A space separated list of names of zfs pools to scrub. -If the list is empty or not set, all zfs pools are scrubbed. -.It Va daily_scrub_zfs_default_threshold -.Pq Vt int -Number of days between a scrub if no pool-specific threshold is set. -If not set, the default value is 35, corresponding to 5 weeks. -.It Va daily_scrub_zfs_ Ns Ao Ar poolname Ac Ns Va _threshold -.Pq Vt int -The same as -.Va daily_scrub_zfs_default_threshold -but specific to the pool -.Ao Ar poolname Ac Ns . -.It Va daily_local -.Pq Vt str -Set to a list of extra scripts that should be run after all other -daily scripts. -All scripts must be absolute path names. -.El -.Pp -The following variables are used by the standard scripts that reside in -.Pa /etc/periodic/weekly : -.Bl -tag -offset 4n -width 2n -.It Va weekly_locate_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to run -.Pa /usr/libexec/locate.updatedb . -This script is run using -.Nm nice Fl 5 -as user -.Dq Li nobody , -and generates the table used by the -.Xr locate 1 -command. -.It Va weekly_whatis_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to run -.Pa /usr/libexec/makewhatis.local . -This script regenerates the database used by the -.Xr apropos 1 -command. -.It Va weekly_catman_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to run -.Pa /usr/libexec/catman.local . -This script processes all out of date manual pages, speeding up the -.Xr man 1 -command at the expense of disk space. -.It Va weekly_noid_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to locate orphaned files on the system. -An orphaned file is one with an invalid owner or group. -.It Va weekly_noid_dirs -.Pq Vt str -A list of directories under which orphaned files are searched for. -This would usually be set to -.Pa / . -.It Va weekly_status_security_enable -.Pq Vt bool -Weekly counterpart of -.Va daily_status_securiy_enable . -.It Va weekly_status_security_inline -.Pq Vt bool -Weekly counterpart of -.Va daily_status_securiy_inline . -.It Va weekly_status_security_output -.Pq Vt str -Weekly counterpart of -.Va daily_status_securiy_output . -.It Va weekly_status_pkg_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to use -.Xr pkg_version 1 -to list installed packages which are out of date. -.It Va pkg_version -.Pq Vt str -When -.Va weekly_status_pkg_enable -is set to -.Dq Li YES , -this variable specifies the program that is used to determine the out of -date packages. -If unset, the -.Xr pkg_version 1 -program is used. -As an example, this variable might be set to -.Dq Li portversion -if the -.Pa ports/sysutils/portupgrade -port has been installed. -.It Va pkg_version_index -.Pq Vt str -This variable specifies the -.Pa INDEX -file from -.Pa /usr/ports -that should be used by -.Xr pkg_version 1 . -Because the dependency tree may be substantially different between versions of -.Fx , -there may be more than one -.Pa INDEX -file in -.Pa /usr/ports . -.Pp -Note, if the -.Va pkg_version -variable is set to -.Dq Li portversion , -it will also be necessary to arrange that the correct -.Pa INDEX -file is specified -using environment variables and that -.Va pkg_version_index -is cleared in -.Pa /etc/periodic.conf -.Pq Dq Li pkg_version_index= . -.It Va weekly_local -.Pq Vt str -Set to a list of extra scripts that should be run after all other -weekly scripts. -All scripts must be absolute path names. -.El -.Pp -The following variables are used by the standard scripts that reside in -.Pa /etc/periodic/monthly : -.Bl -tag -offset 4n -width 2n -.It Va monthly_accounting_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to do login accounting using the -.Xr ac 8 -command. -.It Va monthly_status_security_enable -.Pq Vt bool -Monthly counterpart of -.Va daily_status_securiy_enable . -.It Va monthly_status_security_inline -.Pq Vt bool -Monthly counterpart of -.Va daily_status_securiy_inline . -.It Va monthly_status_security_output -.Pq Vt str -Monthly counterpart of -.Va daily_status_securiy_output . -.It Va monthly_local -.Pq Vt str -Set to a list of extra scripts that should be run after all other -monthly scripts. -All scripts must be absolute path names. .El .Sh FILES .Bl -tag -width ".Pa /etc/defaults/periodic.conf" From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 07:52:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B70A0E20; Tue, 3 Sep 2013 07:52:10 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from caravan.chchile.org (caravan.chchile.org [178.32.125.136]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7CFA32F3E; Tue, 3 Sep 2013 07:52:10 +0000 (UTC) Received: by caravan.chchile.org (Postfix, from userid 1000) id 6BEF2C05E2; Tue, 3 Sep 2013 07:52:02 +0000 (UTC) Date: Tue, 3 Sep 2013 09:52:02 +0200 From: Jeremie Le Hen To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r255169 - head/etc/defaults Message-ID: <20130903075201.GA43281@caravan.chchile.org> Mail-Followup-To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201309030747.r837lrv3028500@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201309030747.r837lrv3028500@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 07:52:10 -0000 On Tue, Sep 03, 2013 at 07:47:53AM +0000, Jeremie Le Hen wrote: > Author: jlh > Date: Tue Sep 3 07:47:53 2013 > New Revision: 255169 > URL: http://svnweb.freebsd.org/changeset/base/255169 > > Log: > Since r254974, periodic scripts' period can be configured > independently. There is no reason to leave their options > with the daily ones, so move them to their own section. > Move periodic scripts' options into their own section. Since r254974, Sorry, the last line was meant to be removed from the commit log. -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 08:19:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C58A57CE; Tue, 3 Sep 2013 08:19:06 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B304F22F2; Tue, 3 Sep 2013 08:19:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r838J63O047060; Tue, 3 Sep 2013 08:19:06 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r838J6l0047058; Tue, 3 Sep 2013 08:19:06 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201309030819.r838J6l0047058@svn.freebsd.org> From: Robert Watson Date: Tue, 3 Sep 2013 08:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255171 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 08:19:06 -0000 Author: rwatson Date: Tue Sep 3 08:19:06 2013 New Revision: 255171 URL: http://svnweb.freebsd.org/changeset/base/255171 Log: Document SIGLIBRT in signal(3); take a stab at the signal description as the original committer didn't provide one. MFC after: 3 days Modified: head/lib/libc/gen/signal.3 Modified: head/lib/libc/gen/signal.3 ============================================================================== --- head/lib/libc/gen/signal.3 Tue Sep 3 07:51:06 2013 (r255170) +++ head/lib/libc/gen/signal.3 Tue Sep 3 08:19:06 2013 (r255171) @@ -132,6 +132,7 @@ is possible on a descriptor (see .It 30 Ta Dv SIGUSR1 Ta "terminate process" Ta "User defined signal 1" .It 31 Ta Dv SIGUSR2 Ta "terminate process" Ta "User defined signal 2" .It 32 Ta Dv SIGTHR Ta "terminate process" Ta "thread interrupt" +.It 33 Ta Dv SIGLIBRT Ta "terminate process" Ta "real-time library interrupt" .El .Pp The From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 12:08:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D5E4FFF4; Tue, 3 Sep 2013 12:08:08 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C395B2054; Tue, 3 Sep 2013 12:08:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83C88cF087302; Tue, 3 Sep 2013 12:08:08 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83C88IN087300; Tue, 3 Sep 2013 12:08:08 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201309031208.r83C88IN087300@svn.freebsd.org> From: Ulrich Spoerlein Date: Tue, 3 Sep 2013 12:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255174 - in head/sys/modules: cam send X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 12:08:08 -0000 Author: uqs Date: Tue Sep 3 12:08:08 2013 New Revision: 255174 URL: http://svnweb.freebsd.org/changeset/base/255174 Log: Fix 'make depend' Modified: head/sys/modules/cam/Makefile head/sys/modules/send/Makefile Modified: head/sys/modules/cam/Makefile ============================================================================== --- head/sys/modules/cam/Makefile Tue Sep 3 09:36:43 2013 (r255173) +++ head/sys/modules/cam/Makefile Tue Sep 3 12:08:08 2013 (r255174) @@ -13,6 +13,7 @@ SRCS+= opt_scsi.h SRCS+= opt_cd.h SRCS+= opt_pt.h SRCS+= opt_sa.h +SRCS+= opt_ses.h SRCS+= device_if.h bus_if.h vnode_if.h SRCS+= cam.c SRCS+= cam_compat.c Modified: head/sys/modules/send/Makefile ============================================================================== --- head/sys/modules/send/Makefile Tue Sep 3 09:36:43 2013 (r255173) +++ head/sys/modules/send/Makefile Tue Sep 3 12:08:08 2013 (r255174) @@ -2,6 +2,6 @@ .PATH: ${.CURDIR}/../../netinet6 KMOD= send -SRCS= send.c +SRCS= send.c opt_kdtrace.h .include From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 13:31:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 954D6D3B; Tue, 3 Sep 2013 13:31:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 828232C2B; Tue, 3 Sep 2013 13:31:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83DVhK3041067; Tue, 3 Sep 2013 13:31:43 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83DVhGY041066; Tue, 3 Sep 2013 13:31:43 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201309031331.r83DVhGY041066@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Sep 2013 13:31:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255175 - head/lib/libexecinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 13:31:43 -0000 Author: emaste Date: Tue Sep 3 13:31:43 2013 New Revision: 255175 URL: http://svnweb.freebsd.org/changeset/base/255175 Log: Don't install private libexecinfo headers Modified: head/lib/libexecinfo/Makefile Modified: head/lib/libexecinfo/Makefile ============================================================================== --- head/lib/libexecinfo/Makefile Tue Sep 3 12:08:08 2013 (r255174) +++ head/lib/libexecinfo/Makefile Tue Sep 3 13:31:43 2013 (r255175) @@ -7,7 +7,7 @@ SHLIB_MAJOR= 1 .PATH: ${LIBEXECINFO} -INCS= execinfo.h symtab.h unwind.h +INCS= execinfo.h SRCS= backtrace.c symtab.c unwind.c DPADD= ${LIBELF} From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 13:36:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C90E0FBB; Tue, 3 Sep 2013 13:36:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B4F692CBB; Tue, 3 Sep 2013 13:36:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83DaNOD042999; Tue, 3 Sep 2013 13:36:23 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83DaNs5042998; Tue, 3 Sep 2013 13:36:23 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201309031336.r83DaNs5042998@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Sep 2013 13:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255176 - head/contrib/libexecinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 13:36:23 -0000 Author: emaste Date: Tue Sep 3 13:36:23 2013 New Revision: 255176 URL: http://svnweb.freebsd.org/changeset/base/255176 Log: Add $FreeBSD$ tag for user-facing header Modified: head/contrib/libexecinfo/execinfo.h Modified: head/contrib/libexecinfo/execinfo.h ============================================================================== --- head/contrib/libexecinfo/execinfo.h Tue Sep 3 13:31:43 2013 (r255175) +++ head/contrib/libexecinfo/execinfo.h Tue Sep 3 13:36:23 2013 (r255176) @@ -1,4 +1,5 @@ /* $NetBSD: execinfo.h,v 1.2 2012/06/09 21:22:17 christos Exp $ */ +/* $FreeBSD$ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 13:38:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9C9A92E1; Tue, 3 Sep 2013 13:38:42 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 704452CE5; Tue, 3 Sep 2013 13:38:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83DcgxP043779; Tue, 3 Sep 2013 13:38:42 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83DcgS5043778; Tue, 3 Sep 2013 13:38:42 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201309031338.r83DcgS5043778@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Sep 2013 13:38:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255177 - head/contrib/libexecinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 13:38:42 -0000 Author: emaste Date: Tue Sep 3 13:38:41 2013 New Revision: 255177 URL: http://svnweb.freebsd.org/changeset/base/255177 Log: Add svn:keywords property Modified: Directory Properties: head/contrib/libexecinfo/execinfo.h (props changed) From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 13:40:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 954D5435; Tue, 3 Sep 2013 13:40:25 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 68C6A2CF9; Tue, 3 Sep 2013 13:40:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83DePgd044963; Tue, 3 Sep 2013 13:40:25 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83DePOg044962; Tue, 3 Sep 2013 13:40:25 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201309031340.r83DePOg044962@svn.freebsd.org> From: Jeremie Le Hen Date: Tue, 3 Sep 2013 13:40:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255178 - head/usr.sbin/periodic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 13:40:25 -0000 Author: jlh Date: Tue Sep 3 13:40:24 2013 New Revision: 255178 URL: http://svnweb.freebsd.org/changeset/base/255178 Log: Include the calling context in the mail subject, if any. More concretely, periodic security scripts defaults to being called from daily ones -- daily context -- so the mail subject will now be "${HOST} daily security run output" instead of "{HOST} security run output". If you switch the period of some security checks to weekly, you will receive another email "${HOST} weekly security run output". Modified: head/usr.sbin/periodic/periodic.sh Modified: head/usr.sbin/periodic/periodic.sh ============================================================================== --- head/usr.sbin/periodic/periodic.sh Tue Sep 3 13:38:41 2013 (r255177) +++ head/usr.sbin/periodic/periodic.sh Tue Sep 3 13:40:24 2013 (r255178) @@ -21,7 +21,7 @@ output_pipe() case "$output" in /*) pipe="cat >>$output";; "") pipe=cat;; - *) pipe="mail -E -s '$host ${1##*/} run output' $output";; + *) pipe="mail -E -s '$host ${2}${2:+ }${1##*/} run output' $output";; esac eval $pipe } @@ -53,12 +53,13 @@ if [ $1 != "LOCKED" ]; then case $? in 0) ;; 73) #EX_CANTCREATE - echo "can't create ${lockfile}" | output_pipe $arg + echo "can't create ${lockfile}" | \ + output_pipe $arg "$PERIODIC" ret=1 ;; 75) #EX_TEMPFAIL echo "$host ${arg##*/} prior run still in progress" | \ - output_pipe $arg + output_pipe $arg "$PERIODIC" ret=1 ;; *) @@ -76,6 +77,7 @@ shift arg=$1 tmp_output=`mktemp ${TMPDIR:-/tmp}/periodic.XXXXXXXXXX` +context="$PERIODIC" export PERIODIC="$arg${PERIODIC:+ }${PERIODIC}" # Execute each executable file in the directory list. If the x bit is not @@ -136,6 +138,6 @@ esac echo "" echo "-- End of $arg output --" fi -} | output_pipe ${arg} +} | output_pipe $arg "$context" rm -f $tmp_output From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 13:49:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5CE96BAC; Tue, 3 Sep 2013 13:49:01 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 49A8D2DDF; Tue, 3 Sep 2013 13:49:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83Dn1VG049922; Tue, 3 Sep 2013 13:49:01 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83Dn1ia049921; Tue, 3 Sep 2013 13:49:01 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201309031349.r83Dn1ia049921@svn.freebsd.org> From: "Justin T. Gibbs" Date: Tue, 3 Sep 2013 13:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255179 - head/sys/dev/xen/blkback X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 13:49:01 -0000 Author: gibbs Date: Tue Sep 3 13:49:00 2013 New Revision: 255179 URL: http://svnweb.freebsd.org/changeset/base/255179 Log: sys/dev/xen/blkback/blkback.c: Initialize the request id for requests in xbb_get_resources() instead of its previous location in xbb_dispatch_io(). This guarantees that all request types (e.g. BLKIF_OP_FLUSH_DISKCACHE) have the front-end specified id recorded. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/blkback/blkback.c Modified: head/sys/dev/xen/blkback/blkback.c ============================================================================== --- head/sys/dev/xen/blkback/blkback.c Tue Sep 3 13:40:24 2013 (r255178) +++ head/sys/dev/xen/blkback/blkback.c Tue Sep 3 13:49:00 2013 (r255179) @@ -1239,6 +1239,7 @@ xbb_get_resources(struct xbb_softc *xbb, nreq->reqlist = *reqlist; nreq->req_ring_idx = ring_idx; + nreq->id = ring_req->id; if (xbb->abi != BLKIF_PROTOCOL_NATIVE) { bcopy(ring_req, &nreq->ring_req_storage, sizeof(*ring_req)); @@ -1608,7 +1609,6 @@ xbb_dispatch_io(struct xbb_softc *xbb, s req_ring_idx = nreq->req_ring_idx; nr_sects = 0; nseg = ring_req->nr_segments; - nreq->id = ring_req->id; nreq->nr_pages = nseg; nreq->nr_512b_sectors = 0; req_seg_idx = 0; From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 15:22:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0844D492; Tue, 3 Sep 2013 15:22:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E8DBD24CA; Tue, 3 Sep 2013 15:22:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83FM5iN009285; Tue, 3 Sep 2013 15:22:05 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83FM5wG009282; Tue, 3 Sep 2013 15:22:05 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201309031522.r83FM5wG009282@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Sep 2013 15:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255180 - in head: lib share/mk sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 15:22:06 -0000 Author: emaste Date: Tue Sep 3 15:22:04 2013 New Revision: 255180 URL: http://svnweb.freebsd.org/changeset/base/255180 Log: Connect libexecinfo to the build Sponsored by: DARPA, AFRL Modified: head/lib/Makefile head/share/mk/bsd.libnames.mk head/sys/sys/param.h Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Tue Sep 3 13:49:00 2013 (r255179) +++ head/lib/Makefile Tue Sep 3 15:22:04 2013 (r255180) @@ -72,6 +72,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libdwarf \ libedit \ ${_libefi} \ + libexecinfo \ libexpat \ libfetch \ libgeom \ Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Tue Sep 3 13:49:00 2013 (r255179) +++ head/share/mk/bsd.libnames.mk Tue Sep 3 15:22:04 2013 (r255180) @@ -51,6 +51,7 @@ LIBDTRACE?= ${DESTDIR}${LIBDIR}/libdtrac LIBDWARF?= ${DESTDIR}${LIBDIR}/libdwarf.a LIBEDIT?= ${DESTDIR}${LIBDIR}/libedit.a LIBELF?= ${DESTDIR}${LIBDIR}/libelf.a +LIBEXECINFO?= ${DESTDIR}${LIBDIR}/libexecinfo.a LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a LIBFL?= "don't use LIBFL, use LIBL" LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Sep 3 13:49:00 2013 (r255179) +++ head/sys/sys/param.h Tue Sep 3 15:22:04 2013 (r255180) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000051 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000052 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 17:33:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D09C2BC2; Tue, 3 Sep 2013 17:33:31 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE7EC2396; Tue, 3 Sep 2013 17:33:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83HXV9g091468; Tue, 3 Sep 2013 17:33:31 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83HXTrX091460; Tue, 3 Sep 2013 17:33:29 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201309031733.r83HXTrX091460@svn.freebsd.org> From: John-Mark Gurney Date: Tue, 3 Sep 2013 17:33:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255185 - in head: contrib/gcc contrib/gcc/config/i386 contrib/gcc/doc gnu/usr.bin/cc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 17:33:31 -0000 Author: jmg Date: Tue Sep 3 17:33:29 2013 New Revision: 255185 URL: http://svnweb.freebsd.org/changeset/base/255185 Log: add support to gcc for AES and PCLMUL intrinsics... This addes the -maes option, but not the -mpclmul option as I ran out of bits in the 32 bit flags field... You can -D__PCLMUL__ to get this, but it won't be compatible w/ clang and modern gcc... Reviewed by: -current, -toolchain Added: head/gnu/usr.bin/cc/include/__wmmintrin_aes.h (contents, props changed) head/gnu/usr.bin/cc/include/__wmmintrin_pclmul.h (contents, props changed) Modified: head/contrib/gcc/config/i386/i386.c head/contrib/gcc/config/i386/i386.h head/contrib/gcc/config/i386/i386.opt head/contrib/gcc/doc/invoke.texi head/contrib/gcc/opth-gen.awk head/gnu/usr.bin/cc/include/Makefile Modified: head/contrib/gcc/config/i386/i386.c ============================================================================== --- head/contrib/gcc/config/i386/i386.c Tue Sep 3 17:02:38 2013 (r255184) +++ head/contrib/gcc/config/i386/i386.c Tue Sep 3 17:33:29 2013 (r255185) @@ -1684,6 +1684,14 @@ ix86_handle_option (size_t code, const c } return true; + case OPT_maes: + if (!value) + { + target_flags &= ~MASK_AES; + target_flags_explicit |= MASK_AES; + } + return true; + default: return true; } @@ -2187,6 +2195,10 @@ override_options (void) if (TARGET_SSE3) target_flags |= MASK_SSE2; + /* Turn on SSE2 builtins for -maes. */ + if (TARGET_AES) + target_flags |= MASK_SSE2; + /* Turn on SSE builtins for -msse2. */ if (TARGET_SSE2) target_flags |= MASK_SSE; Modified: head/contrib/gcc/config/i386/i386.h ============================================================================== --- head/contrib/gcc/config/i386/i386.h Tue Sep 3 17:02:38 2013 (r255184) +++ head/contrib/gcc/config/i386/i386.h Tue Sep 3 17:33:29 2013 (r255185) @@ -428,6 +428,8 @@ extern const char *host_detect_local_cpu builtin_define ("__SSSE3__"); \ if (TARGET_SSE4A) \ builtin_define ("__SSE4A__"); \ + if (TARGET_AES) \ + builtin_define ("__AES__"); \ if (TARGET_SSE_MATH && TARGET_SSE) \ builtin_define ("__SSE_MATH__"); \ if (TARGET_SSE_MATH && TARGET_SSE2) \ Modified: head/contrib/gcc/config/i386/i386.opt ============================================================================== --- head/contrib/gcc/config/i386/i386.opt Tue Sep 3 17:02:38 2013 (r255184) +++ head/contrib/gcc/config/i386/i386.opt Tue Sep 3 17:33:29 2013 (r255185) @@ -205,6 +205,10 @@ msse4a Target Report Mask(SSE4A) Support MMX, SSE, SSE2, SSE3 and SSE4A built-in functions and code generation +maes +Target Report Mask(AES) +Support AES built-in functions and code generation. + mpopcnt Target Report Mask(POPCNT) Support code generation of popcount instruction for popcount built-ins Modified: head/contrib/gcc/doc/invoke.texi ============================================================================== --- head/contrib/gcc/doc/invoke.texi Tue Sep 3 17:02:38 2013 (r255184) +++ head/contrib/gcc/doc/invoke.texi Tue Sep 3 17:33:29 2013 (r255185) @@ -513,7 +513,7 @@ in the following sections. -mno-fp-ret-in-387 -msoft-float -msvr3-shlib @gol -mno-wide-multiply -mrtd -malign-double @gol -mpreferred-stack-boundary=@var{num} @gol --mmmx -msse -msse2 -msse3 -mssse3 -msse4a -m3dnow -mpopcnt -mabm @gol +-mmmx -msse -msse2 -msse3 -mssse3 -msse4a -m3dnow -mpopcnt -mabm -maes @gol -mthreads -mno-align-stringops -minline-all-stringops @gol -mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol -m96bit-long-double -mregparm=@var{num} -msseregparm @gol @@ -9367,6 +9367,8 @@ preferred alignment to @option{-mpreferr @itemx -mno-popcnt @item -mabm @itemx -mno-abm +@item -maes +@itemx -mno-aes @opindex mmmx @opindex mno-mmx @opindex msse @@ -9374,10 +9376,10 @@ preferred alignment to @option{-mpreferr @opindex m3dnow @opindex mno-3dnow These switches enable or disable the use of instructions in the MMX, -SSE, SSE2, SSE3, SSSE3, SSE4A, ABM or 3DNow! extended instruction sets. -These extensions are also available as built-in functions: see -@ref{X86 Built-in Functions}, for details of the functions enabled and -disabled by these switches. +SSE, SSE2, SSE3, SSSE3, SSE4A, ABM, AES or 3DNow! extended +instruction sets. These extensions are also available as built-in +functions: see @ref{X86 Built-in Functions}, for details of the functions +enabled and disabled by these switches. To have SSE/SSE2 instructions generated automatically from floating-point code (as opposed to 387 instructions), see @option{-mfpmath=sse}. Modified: head/contrib/gcc/opth-gen.awk ============================================================================== --- head/contrib/gcc/opth-gen.awk Tue Sep 3 17:02:38 2013 (r255184) +++ head/contrib/gcc/opth-gen.awk Tue Sep 3 17:33:29 2013 (r255185) @@ -87,7 +87,7 @@ for (i = 0; i < n_extra_masks; i++) { } for (var in masknum) { - if (masknum[var] > 31) { + if (masknum[var] > 32) { if (var == "") print "#error too many target masks" else Modified: head/gnu/usr.bin/cc/include/Makefile ============================================================================== --- head/gnu/usr.bin/cc/include/Makefile Tue Sep 3 17:02:38 2013 (r255184) +++ head/gnu/usr.bin/cc/include/Makefile Tue Sep 3 17:33:29 2013 (r255185) @@ -6,11 +6,12 @@ INCSDIR=${INCLUDEDIR}/gcc/${GCCVER} -.PATH: ${GCCDIR}/config/${GCC_CPU} +.PATH: ${GCCDIR}/config/${GCC_CPU} ${.CURDIR}/../../../../contrib/llvm/tools/clang/lib/Headers .if ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64" INCS= ammintrin.h emmintrin.h mmintrin.h mm3dnow.h pmmintrin.h \ tmmintrin.h xmmintrin.h mm_malloc.h +INCS+= wmmintrin.h __wmmintrin_aes.h __wmmintrin_pclmul.h .elif ${TARGET_ARCH} == "ia64" INCS= ia64intrin.h .elif ${TARGET_ARCH} == "arm" Added: head/gnu/usr.bin/cc/include/__wmmintrin_aes.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/cc/include/__wmmintrin_aes.h Tue Sep 3 17:33:29 2013 (r255185) @@ -0,0 +1,54 @@ +/*- + * Copyright 2013 John-Mark Gurney + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#ifndef _WMMINTRIN_AES_H_ +#define _WMMINTRIN_AES_H_ + +#include + +#define MAKE_AES(name) \ +static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) \ +_mm_## name ##_si128(__m128i __V, __m128i __R) \ +{ \ + __m128i v = __V; \ + \ + __asm__ (#name " %2, %0": "=x" (v): "0" (v), "xm" (__R)); \ + \ + return v; \ +} + +MAKE_AES(aesimc) +MAKE_AES(aesenc) +MAKE_AES(aesenclast) +MAKE_AES(aesdec) +MAKE_AES(aesdeclast) + +#undef MAKE_AES + +#endif /* _WMMINTRIN_AES_H_ */ Added: head/gnu/usr.bin/cc/include/__wmmintrin_pclmul.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/cc/include/__wmmintrin_pclmul.h Tue Sep 3 17:33:29 2013 (r255185) @@ -0,0 +1,53 @@ +/*- + * Copyright 2013 John-Mark Gurney + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#ifndef _WMMINTRIN_PCLMUL_H_ +#define _WMMINTRIN_PCLMUL_H_ + +#include + +/* + * c selects which parts of a and b to multiple: + * 0x00: a[ 63: 0] * b[ 63: 0] + * 0x01: a[127:64] * b[ 63: 0] + * 0x10: a[ 63: 0] * b[127:64] + * 0x11: a[127:64] * b[127:64] + */ +#define _mm_clmulepi64_si128(a, b, c) \ +({ \ + __m128i _a = (a); \ + __m128i _b = (b); \ + \ + __asm__("pclmulqdq %3, %2, %0": "=x" (_a): "0" (_a), "xm" (_b), \ + "i" (c)); \ + \ + _a; \ +}) + +#endif /* _WMMINTRIN_PCLMUL_H_ */ From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 18:31:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 816791F1; Tue, 3 Sep 2013 18:31:25 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5F3542C90; Tue, 3 Sep 2013 18:31:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83IVPWQ026535; Tue, 3 Sep 2013 18:31:25 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83IVNkh026523; Tue, 3 Sep 2013 18:31:23 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201309031831.r83IVNkh026523@svn.freebsd.org> From: John-Mark Gurney Date: Tue, 3 Sep 2013 18:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255187 - in head/sys: conf crypto/aesni modules/aesni X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 18:31:25 -0000 Author: jmg Date: Tue Sep 3 18:31:23 2013 New Revision: 255187 URL: http://svnweb.freebsd.org/changeset/base/255187 Log: Use the fact that the AES-NI instructions can be pipelined to improve performance... Use SSE2 instructions for calculating the XTS tweek factor... Let the compiler do more work and handle register allocation by using intrinsics, now only the key schedule is in assembly... Replace .byte hard coded instructions w/ the proper instructions now that both clang and gcc support them... On my machine, pulling the code to userland I saw performance go from ~150MB/sec to 2GB/sec in XTS mode. GELI on GNOP saw a more modest increase of about 3x due to other system overhead (geom and opencrypto)... These changes allow almost full disk io rate w/ geli... Reviewed by: -current, -security Thanks to: Mike Hamburg for the XTS tweek algorithm Added: head/sys/crypto/aesni/aesencdec.h (contents, props changed) Deleted: head/sys/crypto/aesni/aesencdec_amd64.S head/sys/crypto/aesni/aesencdec_i386.S Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/crypto/aesni/aeskeys_amd64.S head/sys/crypto/aesni/aesni.c head/sys/crypto/aesni/aesni.h head/sys/crypto/aesni/aesni_wrap.c head/sys/modules/aesni/Makefile Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Sep 3 18:14:30 2013 (r255186) +++ head/sys/conf/files.amd64 Tue Sep 3 18:31:23 2013 (r255187) @@ -138,10 +138,13 @@ amd64/amd64/uma_machdep.c standard amd64/amd64/vm_machdep.c standard amd64/pci/pci_cfgreg.c optional pci cddl/contrib/opensolaris/common/atomic/amd64/opensolaris_atomic.S optional zfs compile-with "${ZFS_S}" -crypto/aesni/aesencdec_amd64.S optional aesni crypto/aesni/aeskeys_amd64.S optional aesni crypto/aesni/aesni.c optional aesni -crypto/aesni/aesni_wrap.c optional aesni +aesni_wrap.o optional aesni \ + dependency "$S/crypto/aesni/aesni_wrap.c" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -maes ${.IMPSRC}" \ + no-implicit-rule \ + clean "aesni_wrap.o" crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb crypto/via/padlock.c optional padlock Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Sep 3 18:14:30 2013 (r255186) +++ head/sys/conf/files.i386 Tue Sep 3 18:31:23 2013 (r255187) @@ -124,10 +124,13 @@ bf_enc.o optional crypto | ipsec \ dependency "$S/crypto/blowfish/arch/i386/bf_enc.S $S/crypto/blowfish/arch/i386/bf_enc_586.S $S/crypto/blowfish/arch/i386/bf_enc_686.S" \ compile-with "${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \ no-implicit-rule -crypto/aesni/aesencdec_i386.S optional aesni crypto/aesni/aeskeys_i386.S optional aesni crypto/aesni/aesni.c optional aesni -crypto/aesni/aesni_wrap.c optional aesni +aesni_wrap.o optional aesni \ + dependency "$S/crypto/aesni/aesni_wrap.c" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -maes ${.IMPSRC}" \ + no-implicit-rule \ + clean "aesni_wrap.o" crypto/des/arch/i386/des_enc.S optional crypto | ipsec | netsmb crypto/via/padlock.c optional padlock crypto/via/padlock_cipher.c optional padlock Added: head/sys/crypto/aesni/aesencdec.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/crypto/aesni/aesencdec.h Tue Sep 3 18:31:23 2013 (r255187) @@ -0,0 +1,136 @@ +/*- + * Copyright 2013 John-Mark Gurney + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#include + +static inline void +aesni_enc8(int rounds, const uint8_t *key_schedule, __m128i a, + __m128i b, __m128i c, __m128i d, __m128i e, __m128i f, __m128i g, + __m128i h, __m128i out[8]) +{ + const __m128i *keysched = (const __m128i *)key_schedule; + int i; + + a ^= keysched[0]; + b ^= keysched[0]; + c ^= keysched[0]; + d ^= keysched[0]; + e ^= keysched[0]; + f ^= keysched[0]; + g ^= keysched[0]; + h ^= keysched[0]; + + for (i = 0; i < rounds; i++) { + a = _mm_aesenc_si128(a, keysched[i + 1]); + b = _mm_aesenc_si128(b, keysched[i + 1]); + c = _mm_aesenc_si128(c, keysched[i + 1]); + d = _mm_aesenc_si128(d, keysched[i + 1]); + e = _mm_aesenc_si128(e, keysched[i + 1]); + f = _mm_aesenc_si128(f, keysched[i + 1]); + g = _mm_aesenc_si128(g, keysched[i + 1]); + h = _mm_aesenc_si128(h, keysched[i + 1]); + } + + out[0] = _mm_aesenclast_si128(a, keysched[i + 1]); + out[1] = _mm_aesenclast_si128(b, keysched[i + 1]); + out[2] = _mm_aesenclast_si128(c, keysched[i + 1]); + out[3] = _mm_aesenclast_si128(d, keysched[i + 1]); + out[4] = _mm_aesenclast_si128(e, keysched[i + 1]); + out[5] = _mm_aesenclast_si128(f, keysched[i + 1]); + out[6] = _mm_aesenclast_si128(g, keysched[i + 1]); + out[7] = _mm_aesenclast_si128(h, keysched[i + 1]); +} + +static inline void +aesni_dec8(int rounds, const uint8_t *key_schedule, __m128i a, + __m128i b, __m128i c, __m128i d, __m128i e, __m128i f, __m128i g, + __m128i h, __m128i out[8]) +{ + const __m128i *keysched = (const __m128i *)key_schedule; + int i; + + a ^= keysched[0]; + b ^= keysched[0]; + c ^= keysched[0]; + d ^= keysched[0]; + e ^= keysched[0]; + f ^= keysched[0]; + g ^= keysched[0]; + h ^= keysched[0]; + + for (i = 0; i < rounds; i++) { + a = _mm_aesdec_si128(a, keysched[i + 1]); + b = _mm_aesdec_si128(b, keysched[i + 1]); + c = _mm_aesdec_si128(c, keysched[i + 1]); + d = _mm_aesdec_si128(d, keysched[i + 1]); + e = _mm_aesdec_si128(e, keysched[i + 1]); + f = _mm_aesdec_si128(f, keysched[i + 1]); + g = _mm_aesdec_si128(g, keysched[i + 1]); + h = _mm_aesdec_si128(h, keysched[i + 1]); + } + + out[0] = _mm_aesdeclast_si128(a, keysched[i + 1]); + out[1] = _mm_aesdeclast_si128(b, keysched[i + 1]); + out[2] = _mm_aesdeclast_si128(c, keysched[i + 1]); + out[3] = _mm_aesdeclast_si128(d, keysched[i + 1]); + out[4] = _mm_aesdeclast_si128(e, keysched[i + 1]); + out[5] = _mm_aesdeclast_si128(f, keysched[i + 1]); + out[6] = _mm_aesdeclast_si128(g, keysched[i + 1]); + out[7] = _mm_aesdeclast_si128(h, keysched[i + 1]); +} + +static inline __m128i +aesni_enc(int rounds, const uint8_t *key_schedule, const __m128i from) +{ + __m128i tmp; + const __m128i *keysched = (const __m128i *)key_schedule; + int i; + + tmp = from ^ keysched[0]; + + for (i = 0; i < rounds; i++) + tmp = _mm_aesenc_si128(tmp, keysched[i + 1]); + + return _mm_aesenclast_si128(tmp, keysched[i + 1]); +} + +static inline __m128i +aesni_dec(int rounds, const uint8_t *key_schedule, const __m128i from) +{ + __m128i tmp; + const __m128i *keysched = (const __m128i *)key_schedule; + int i; + + tmp = from ^ keysched[0]; + + for (i = 0; i < rounds; i++) + tmp = _mm_aesdec_si128(tmp, keysched[i + 1]); + + return _mm_aesdeclast_si128(tmp, keysched[i + 1]); +} Modified: head/sys/crypto/aesni/aeskeys_amd64.S ============================================================================== --- head/sys/crypto/aesni/aeskeys_amd64.S Tue Sep 3 18:14:30 2013 (r255186) +++ head/sys/crypto/aesni/aeskeys_amd64.S Tue Sep 3 18:31:23 2013 (r255187) @@ -125,103 +125,72 @@ ENTRY(aesni_set_enckey) movups 0x10(%rdi),%xmm2 # other user key movaps %xmm2,(%rsi) addq $0x10,%rsi -// aeskeygenassist $0x1,%xmm2,%xmm1 # round 1 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x01 + aeskeygenassist $0x1,%xmm2,%xmm1 # round 1 call _key_expansion_256a -// aeskeygenassist $0x1,%xmm0,%xmm1 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x01 + aeskeygenassist $0x1,%xmm0,%xmm1 call _key_expansion_256b -// aeskeygenassist $0x2,%xmm2,%xmm1 # round 2 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x02 + aeskeygenassist $0x2,%xmm2,%xmm1 # round 2 call _key_expansion_256a -// aeskeygenassist $0x2,%xmm0,%xmm1 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x02 + aeskeygenassist $0x2,%xmm0,%xmm1 call _key_expansion_256b -// aeskeygenassist $0x4,%xmm2,%xmm1 # round 3 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x04 + aeskeygenassist $0x4,%xmm2,%xmm1 # round 3 call _key_expansion_256a -// aeskeygenassist $0x4,%xmm0,%xmm1 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x04 + aeskeygenassist $0x4,%xmm0,%xmm1 call _key_expansion_256b -// aeskeygenassist $0x8,%xmm2,%xmm1 # round 4 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x08 + aeskeygenassist $0x8,%xmm2,%xmm1 # round 4 call _key_expansion_256a -// aeskeygenassist $0x8,%xmm0,%xmm1 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x08 + aeskeygenassist $0x8,%xmm0,%xmm1 call _key_expansion_256b -// aeskeygenassist $0x10,%xmm2,%xmm1 # round 5 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x10 + aeskeygenassist $0x10,%xmm2,%xmm1 # round 5 call _key_expansion_256a -// aeskeygenassist $0x10,%xmm0,%xmm1 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x10 + aeskeygenassist $0x10,%xmm0,%xmm1 call _key_expansion_256b -// aeskeygenassist $0x20,%xmm2,%xmm1 # round 6 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x20 + aeskeygenassist $0x20,%xmm2,%xmm1 # round 6 call _key_expansion_256a -// aeskeygenassist $0x20,%xmm0,%xmm1 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x20 + aeskeygenassist $0x20,%xmm0,%xmm1 call _key_expansion_256b -// aeskeygenassist $0x40,%xmm2,%xmm1 # round 7 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x40 + aeskeygenassist $0x40,%xmm2,%xmm1 # round 7 call _key_expansion_256a retq .Lenc_key192: movq 0x10(%rdi),%xmm2 # other user key -// aeskeygenassist $0x1,%xmm2,%xmm1 # round 1 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x01 + aeskeygenassist $0x1,%xmm2,%xmm1 # round 1 call _key_expansion_192a -// aeskeygenassist $0x2,%xmm2,%xmm1 # round 2 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x02 + aeskeygenassist $0x2,%xmm2,%xmm1 # round 2 call _key_expansion_192b -// aeskeygenassist $0x4,%xmm2,%xmm1 # round 3 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x04 + aeskeygenassist $0x4,%xmm2,%xmm1 # round 3 call _key_expansion_192a -// aeskeygenassist $0x8,%xmm2,%xmm1 # round 4 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x08 + aeskeygenassist $0x8,%xmm2,%xmm1 # round 4 call _key_expansion_192b -// aeskeygenassist $0x10,%xmm2,%xmm1 # round 5 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x10 + aeskeygenassist $0x10,%xmm2,%xmm1 # round 5 call _key_expansion_192a -// aeskeygenassist $0x20,%xmm2,%xmm1 # round 6 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x20 + aeskeygenassist $0x20,%xmm2,%xmm1 # round 6 call _key_expansion_192b -// aeskeygenassist $0x40,%xmm2,%xmm1 # round 7 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x40 + aeskeygenassist $0x40,%xmm2,%xmm1 # round 7 call _key_expansion_192a -// aeskeygenassist $0x80,%xmm2,%xmm1 # round 8 - .byte 0x66,0x0f,0x3a,0xdf,0xca,0x80 + aeskeygenassist $0x80,%xmm2,%xmm1 # round 8 call _key_expansion_192b retq .Lenc_key128: -// aeskeygenassist $0x1,%xmm0,%xmm1 # round 1 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x01 + aeskeygenassist $0x1,%xmm0,%xmm1 # round 1 call _key_expansion_128 -// aeskeygenassist $0x2,%xmm0,%xmm1 # round 2 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x02 + aeskeygenassist $0x2,%xmm0,%xmm1 # round 2 call _key_expansion_128 -// aeskeygenassist $0x4,%xmm0,%xmm1 # round 3 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x04 + aeskeygenassist $0x4,%xmm0,%xmm1 # round 3 call _key_expansion_128 -// aeskeygenassist $0x8,%xmm0,%xmm1 # round 4 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x08 + aeskeygenassist $0x8,%xmm0,%xmm1 # round 4 call _key_expansion_128 -// aeskeygenassist $0x10,%xmm0,%xmm1 # round 5 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x10 + aeskeygenassist $0x10,%xmm0,%xmm1 # round 5 call _key_expansion_128 -// aeskeygenassist $0x20,%xmm0,%xmm1 # round 6 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x20 + aeskeygenassist $0x20,%xmm0,%xmm1 # round 6 call _key_expansion_128 -// aeskeygenassist $0x40,%xmm0,%xmm1 # round 7 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x40 + aeskeygenassist $0x40,%xmm0,%xmm1 # round 7 call _key_expansion_128 -// aeskeygenassist $0x80,%xmm0,%xmm1 # round 8 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x80 + aeskeygenassist $0x80,%xmm0,%xmm1 # round 8 call _key_expansion_128 -// aeskeygenassist $0x1b,%xmm0,%xmm1 # round 9 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x1b + aeskeygenassist $0x1b,%xmm0,%xmm1 # round 9 call _key_expansion_128 -// aeskeygenassist $0x36,%xmm0,%xmm1 # round 10 - .byte 0x66,0x0f,0x3a,0xdf,0xc8,0x36 + aeskeygenassist $0x36,%xmm0,%xmm1 # round 10 call _key_expansion_128 retq .cfi_endproc @@ -238,8 +207,7 @@ ENTRY(aesni_set_deckey) 1: addq $0x10,%rsi subq $0x10,%rdi -// aesimc (%rdi),%xmm1 - .byte 0x66,0x0f,0x38,0xdb,0x0f + aesimc (%rdi),%xmm1 movdqa %xmm1,(%rsi) decl %edx jne 1b Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Tue Sep 3 18:14:30 2013 (r255186) +++ head/sys/crypto/aesni/aesni.c Tue Sep 3 18:31:23 2013 (r255187) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include "cryptodev_if.h" +#include struct aesni_softc { int32_t cid; @@ -74,6 +74,12 @@ aesni_probe(device_t dev) device_printf(dev, "No AESNI support.\n"); return (EINVAL); } + + if ((cpu_feature & CPUID_SSE2) == 0) { + device_printf(dev, "No SSE2 support but AESNI!?!\n"); + return (EINVAL); + } + device_set_desc_copy(dev, "AES-CBC,AES-XTS"); return (0); } Modified: head/sys/crypto/aesni/aesni.h ============================================================================== --- head/sys/crypto/aesni/aesni.h Tue Sep 3 18:14:30 2013 (r255186) +++ head/sys/crypto/aesni/aesni.h Tue Sep 3 18:31:23 2013 (r255187) @@ -71,12 +71,6 @@ struct aesni_session { /* * Internal functions, implemented in assembler. */ -void aesni_enc(int rounds, const uint8_t *key_schedule, - const uint8_t from[AES_BLOCK_LEN], uint8_t to[AES_BLOCK_LEN], - const uint8_t iv[AES_BLOCK_LEN]); -void aesni_dec(int rounds, const uint8_t *key_schedule, - const uint8_t from[AES_BLOCK_LEN], uint8_t to[AES_BLOCK_LEN], - const uint8_t iv[AES_BLOCK_LEN]); void aesni_set_enckey(const uint8_t *userkey, uint8_t *encrypt_schedule, int number_of_rounds); void aesni_set_deckey(const uint8_t *encrypt_schedule, @@ -88,12 +82,19 @@ void aesni_set_deckey(const uint8_t *enc void aesni_encrypt_cbc(int rounds, const void *key_schedule, size_t len, const uint8_t *from, uint8_t *to, const uint8_t iv[AES_BLOCK_LEN]); void aesni_decrypt_cbc(int rounds, const void *key_schedule, size_t len, - const uint8_t *from, const uint8_t iv[AES_BLOCK_LEN]); + uint8_t *buf, const uint8_t iv[AES_BLOCK_LEN]); void aesni_encrypt_ecb(int rounds, const void *key_schedule, size_t len, const uint8_t from[AES_BLOCK_LEN], uint8_t to[AES_BLOCK_LEN]); void aesni_decrypt_ecb(int rounds, const void *key_schedule, size_t len, const uint8_t from[AES_BLOCK_LEN], uint8_t to[AES_BLOCK_LEN]); +void aesni_encrypt_xts(int rounds, const void *data_schedule, + const void *tweak_schedule, size_t len, const uint8_t *from, uint8_t *to, + const uint8_t iv[AES_BLOCK_LEN]); +void aesni_decrypt_xts(int rounds, const void *data_schedule, + const void *tweak_schedule, size_t len, const uint8_t *from, uint8_t *to, + const uint8_t iv[AES_BLOCK_LEN]); + int aesni_cipher_setup(struct aesni_session *ses, struct cryptoini *encini); int aesni_cipher_process(struct aesni_session *ses, Modified: head/sys/crypto/aesni/aesni_wrap.c ============================================================================== --- head/sys/crypto/aesni/aesni_wrap.c Tue Sep 3 18:14:30 2013 (r255186) +++ head/sys/crypto/aesni/aesni_wrap.c Tue Sep 3 18:31:23 2013 (r255187) @@ -2,6 +2,7 @@ * Copyright (C) 2008 Damien Miller * Copyright (c) 2010 Konstantin Belousov * Copyright (c) 2010-2011 Pawel Jakub Dawidek + * Copyright 2012-2013 John-Mark Gurney * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,13 +29,15 @@ #include __FBSDID("$FreeBSD$"); - + #include #include #include #include #include #include + +#include "aesencdec.h" MALLOC_DECLARE(M_AESNI); @@ -42,28 +45,78 @@ void aesni_encrypt_cbc(int rounds, const void *key_schedule, size_t len, const uint8_t *from, uint8_t *to, const uint8_t iv[AES_BLOCK_LEN]) { - const uint8_t *ivp; + __m128i tot, ivreg; size_t i; len /= AES_BLOCK_LEN; - ivp = iv; + ivreg = _mm_loadu_si128((const __m128i *)iv); for (i = 0; i < len; i++) { - aesni_enc(rounds - 1, key_schedule, from, to, ivp); - ivp = to; + tot = aesni_enc(rounds - 1, key_schedule, + _mm_loadu_si128((const __m128i *)from) ^ ivreg); + ivreg = tot; + _mm_storeu_si128((__m128i *)to, tot); from += AES_BLOCK_LEN; to += AES_BLOCK_LEN; } } void -aesni_encrypt_ecb(int rounds, const void *key_schedule, size_t len, - const uint8_t from[AES_BLOCK_LEN], uint8_t to[AES_BLOCK_LEN]) +aesni_decrypt_cbc(int rounds, const void *key_schedule, size_t len, + uint8_t *buf, const uint8_t iv[AES_BLOCK_LEN]) { - size_t i; + __m128i blocks[8]; + __m128i *bufs; + __m128i ivreg, nextiv; + size_t i, j, cnt; + + ivreg = _mm_loadu_si128((const __m128i *)iv); + cnt = len / AES_BLOCK_LEN / 8; + for (i = 0; i < cnt; i++) { + bufs = (__m128i *)buf; + aesni_dec8(rounds - 1, key_schedule, bufs[0], bufs[1], + bufs[2], bufs[3], bufs[4], bufs[5], bufs[6], + bufs[7], &blocks[0]); + for (j = 0; j < 8; j++) { + nextiv = bufs[j]; + bufs[j] = blocks[j] ^ ivreg; + ivreg = nextiv; + } + buf += AES_BLOCK_LEN * 8; + } + i *= 8; + cnt = len / AES_BLOCK_LEN; + for (; i < cnt; i++) { + bufs = (__m128i *)buf; + nextiv = bufs[0]; + bufs[0] = aesni_dec(rounds - 1, key_schedule, bufs[0]) ^ ivreg; + ivreg = nextiv; + buf += AES_BLOCK_LEN; + } +} - len /= AES_BLOCK_LEN; - for (i = 0; i < len; i++) { - aesni_enc(rounds - 1, key_schedule, from, to, NULL); +void +aesni_encrypt_ecb(int rounds, const void *key_schedule, size_t len, + const uint8_t *from, uint8_t *to) +{ + __m128i tot; + const __m128i *blocks; + size_t i, cnt; + + cnt = len / AES_BLOCK_LEN / 8; + for (i = 0; i < cnt; i++) { + blocks = (const __m128i *)from; + aesni_enc8(rounds - 1, key_schedule, blocks[0], blocks[1], + blocks[2], blocks[3], blocks[4], blocks[5], blocks[6], + blocks[7], (__m128i *)to); + from += AES_BLOCK_LEN * 8; + to += AES_BLOCK_LEN * 8; + } + i *= 8; + cnt = len / AES_BLOCK_LEN; + for (; i < cnt; i++) { + tot = aesni_enc(rounds - 1, key_schedule, + _mm_loadu_si128((const __m128i *)from)); + _mm_storeu_si128((__m128i *)to, tot); from += AES_BLOCK_LEN; to += AES_BLOCK_LEN; } @@ -73,11 +126,25 @@ void aesni_decrypt_ecb(int rounds, const void *key_schedule, size_t len, const uint8_t from[AES_BLOCK_LEN], uint8_t to[AES_BLOCK_LEN]) { - size_t i; - - len /= AES_BLOCK_LEN; - for (i = 0; i < len; i++) { - aesni_dec(rounds - 1, key_schedule, from, to, NULL); + __m128i tot; + const __m128i *blocks; + size_t i, cnt; + + cnt = len / AES_BLOCK_LEN / 8; + for (i = 0; i < cnt; i++) { + blocks = (const __m128i *)from; + aesni_dec8(rounds - 1, key_schedule, blocks[0], blocks[1], + blocks[2], blocks[3], blocks[4], blocks[5], blocks[6], + blocks[7], (__m128i *)to); + from += AES_BLOCK_LEN * 8; + to += AES_BLOCK_LEN * 8; + } + i *= 8; + cnt = len / AES_BLOCK_LEN; + for (; i < cnt; i++) { + tot = aesni_dec(rounds - 1, key_schedule, + _mm_loadu_si128((const __m128i *)from)); + _mm_storeu_si128((__m128i *)to, tot); from += AES_BLOCK_LEN; to += AES_BLOCK_LEN; } @@ -87,34 +154,88 @@ aesni_decrypt_ecb(int rounds, const void #define AES_XTS_IVSIZE 8 #define AES_XTS_ALPHA 0x87 /* GF(2^128) generator polynomial */ +static inline __m128i +xts_crank_lfsr(__m128i inp) +{ + const __m128i alphamask = _mm_set_epi32(1, 1, 1, AES_XTS_ALPHA); + __m128i xtweak, ret; + + /* set up xor mask */ + xtweak = _mm_shuffle_epi32(inp, 0x93); + xtweak = _mm_srai_epi32(xtweak, 31); + xtweak &= alphamask; + + /* next term */ + ret = _mm_slli_epi32(inp, 1); + ret ^= xtweak; + + return ret; +} + static void -aesni_crypt_xts_block(int rounds, const void *key_schedule, uint64_t *tweak, - const uint64_t *from, uint64_t *to, uint64_t *block, int do_encrypt) +aesni_crypt_xts_block(int rounds, const void *key_schedule, __m128i *tweak, + const __m128i *from, __m128i *to, int do_encrypt) { - int carry; + __m128i block; - block[0] = from[0] ^ tweak[0]; - block[1] = from[1] ^ tweak[1]; + block = *from ^ *tweak; if (do_encrypt) - aesni_enc(rounds - 1, key_schedule, (uint8_t *)block, (uint8_t *)to, NULL); + block = aesni_enc(rounds - 1, key_schedule, block); else - aesni_dec(rounds - 1, key_schedule, (uint8_t *)block, (uint8_t *)to, NULL); + block = aesni_dec(rounds - 1, key_schedule, block); + + *to = block ^ *tweak; + + *tweak = xts_crank_lfsr(*tweak); +} + +static void +aesni_crypt_xts_block8(int rounds, const void *key_schedule, __m128i *tweak, + const __m128i *from, __m128i *to, int do_encrypt) +{ + __m128i tmptweak; + __m128i a, b, c, d, e, f, g, h; + __m128i tweaks[8]; + __m128i tmp[8]; + + tmptweak = *tweak; + + /* + * unroll the loop. This lets gcc put values directly in the + * register and saves memory accesses. + */ +#define PREPINP(v, pos) \ + do { \ + tweaks[(pos)] = tmptweak; \ + (v) = from[(pos)] ^ tmptweak; \ + tmptweak = xts_crank_lfsr(tmptweak); \ + } while (0) + PREPINP(a, 0); + PREPINP(b, 1); + PREPINP(c, 2); + PREPINP(d, 3); + PREPINP(e, 4); + PREPINP(f, 5); + PREPINP(g, 6); + PREPINP(h, 7); + *tweak = tmptweak; - to[0] ^= tweak[0]; - to[1] ^= tweak[1]; + if (do_encrypt) + aesni_enc8(rounds - 1, key_schedule, a, b, c, d, e, f, g, h, + tmp); + else + aesni_dec8(rounds - 1, key_schedule, a, b, c, d, e, f, g, h, + tmp); - /* Exponentiate tweak. */ - carry = ((tweak[0] & 0x8000000000000000ULL) > 0); - tweak[0] <<= 1; - if (tweak[1] & 0x8000000000000000ULL) { - uint8_t *twk = (uint8_t *)tweak; - - twk[0] ^= AES_XTS_ALPHA; - } - tweak[1] <<= 1; - if (carry) - tweak[1] |= 1; + to[0] = tmp[0] ^ tweaks[0]; + to[1] = tmp[1] ^ tweaks[1]; + to[2] = tmp[2] ^ tweaks[2]; + to[3] = tmp[3] ^ tweaks[3]; + to[4] = tmp[4] ^ tweaks[4]; + to[5] = tmp[5] ^ tweaks[5]; + to[6] = tmp[6] ^ tweaks[6]; + to[7] = tmp[7] ^ tweaks[7]; } static void @@ -122,9 +243,9 @@ aesni_crypt_xts(int rounds, const void * const void *tweak_schedule, size_t len, const uint8_t *from, uint8_t *to, const uint8_t iv[AES_BLOCK_LEN], int do_encrypt) { - uint64_t block[AES_XTS_BLOCKSIZE / 8]; - uint8_t tweak[AES_XTS_BLOCKSIZE]; - size_t i; + __m128i tweakreg; + uint8_t tweak[AES_XTS_BLOCKSIZE] __aligned(16); + size_t i, cnt; /* * Prepare tweak as E_k2(IV). IV is specified as LE representation @@ -137,21 +258,27 @@ aesni_crypt_xts(int rounds, const void * #else #error Only LITTLE_ENDIAN architectures are supported. #endif - aesni_enc(rounds - 1, tweak_schedule, tweak, tweak, NULL); + tweakreg = _mm_loadu_si128((__m128i *)&tweak[0]); + tweakreg = aesni_enc(rounds - 1, tweak_schedule, tweakreg); - len /= AES_XTS_BLOCKSIZE; - for (i = 0; i < len; i++) { - aesni_crypt_xts_block(rounds, data_schedule, (uint64_t *)tweak, - (const uint64_t *)from, (uint64_t *)to, block, do_encrypt); + cnt = len / AES_XTS_BLOCKSIZE / 8; + for (i = 0; i < cnt; i++) { + aesni_crypt_xts_block8(rounds, data_schedule, &tweakreg, + (const __m128i *)from, (__m128i *)to, do_encrypt); + from += AES_XTS_BLOCKSIZE * 8; + to += AES_XTS_BLOCKSIZE * 8; + } + i *= 8; + cnt = len / AES_XTS_BLOCKSIZE; + for (; i < cnt; i++) { + aesni_crypt_xts_block(rounds, data_schedule, &tweakreg, + (const __m128i *)from, (__m128i *)to, do_encrypt); from += AES_XTS_BLOCKSIZE; to += AES_XTS_BLOCKSIZE; } - - bzero(tweak, sizeof(tweak)); - bzero(block, sizeof(block)); } -static void +void aesni_encrypt_xts(int rounds, const void *data_schedule, const void *tweak_schedule, size_t len, const uint8_t *from, uint8_t *to, const uint8_t iv[AES_BLOCK_LEN]) @@ -161,7 +288,7 @@ aesni_encrypt_xts(int rounds, const void iv, 1); } -static void +void aesni_decrypt_xts(int rounds, const void *data_schedule, const void *tweak_schedule, size_t len, const uint8_t *from, uint8_t *to, const uint8_t iv[AES_BLOCK_LEN]) Modified: head/sys/modules/aesni/Makefile ============================================================================== --- head/sys/modules/aesni/Makefile Tue Sep 3 18:14:30 2013 (r255186) +++ head/sys/modules/aesni/Makefile Tue Sep 3 18:31:23 2013 (r255187) @@ -3,8 +3,17 @@ .PATH: ${.CURDIR}/../../crypto/aesni KMOD= aesni -SRCS= aesni.c aesni_wrap.c -SRCS+= aesencdec_${MACHINE_CPUARCH}.S aeskeys_${MACHINE_CPUARCH}.S +SRCS= aesni.c +SRCS+= aeskeys_${MACHINE_CPUARCH}.S SRCS+= device_if.h bus_if.h opt_bus.h cryptodev_if.h +OBJS+= aesni_wrap.o + +# Remove -nostdinc so we can get the intrinsics. +aesni_wrap.o: aesni_wrap.c + ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} \ + -mmmx -msse -maes ${.IMPSRC} + ${CTFCONVERT_CMD} + .include + From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 19:08:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 38F00540; Tue, 3 Sep 2013 19:08:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 034902FBB; Tue, 3 Sep 2013 19:08:31 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A6A83B981; Tue, 3 Sep 2013 15:08:29 -0400 (EDT) From: John Baldwin To: "=?iso-8859-15?q?Jean-S=E9bastien?= =?iso-8859-15?q?_P=E9dron?=" Subject: Re: svn commit: r254882 - head/sys/dev/pci Date: Tue, 3 Sep 2013 14:10:45 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201308251809.r7PI9CsE052978@svn.freebsd.org> <201308301644.36750.jhb@freebsd.org> <52219DAE.9010707@FreeBSD.org> In-Reply-To: <52219DAE.9010707@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <201309031410.46052.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 03 Sep 2013 15:08:29 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 19:08:31 -0000 On Saturday, August 31, 2013 3:39:26 am Jean-S=E9bastien P=E9dron wrote: > Le 30/08/2013 22:44, John Baldwin a =E9crit : > >> However, BUS_ALLOC_RESOURCE() returns NULL in my tests. > > > > Hmm, can you get devinfo -u output? I wonder if orm0 is eating this > > resource. >=20 > You'll find it attached. Yes, orm0 is eating it. Try this along with using RF_SHAREABLE in your call to BUS_ALLOC_RESOURCE(): Index: x86/isa/orm.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- orm.c (revision 255020) +++ orm.c (working copy) @@ -133,7 +133,8 @@ orm_identify(driver_t* driver, device_t parent) bus_set_resource(child, SYS_RES_MEMORY, sc->rnum, chunk, rom_size); rid =3D sc->rnum; =2D res =3D bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, 0); + res =3D bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, + RF_SHAREABLE); if (res =3D=3D NULL) { bus_delete_resource(child, SYS_RES_MEMORY, sc->rnum); chunk +=3D IOMEM_STEP; =2D-=20 John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 19:22:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 42DBDFAD; Tue, 3 Sep 2013 19:22:20 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 175A82186; Tue, 3 Sep 2013 19:22:20 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 167DC11691; Tue, 3 Sep 2013 12:22:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1378236139; bh=7AbP2MuxYqD1P5u86Ikky/vNvxAXychuj4Tpnkhz4jQ=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=a+PCvQ2m3O7Ym1EBPMvQExuIz46hRMnXi7p44+xZP0cOJrKza6YZchK8z92QLB+oT 61CU8eqgVh7xCZ5yQOnETnh3+sy7obrxyTSTb/2iCeDh4aneaWFbpwlw4cNt33W1vZ 5H4G2ZE9pnWn/bL7EZqKiRmyJ7waExECWC6e4Vis= Message-ID: <522636EA.3010509@delphij.net> Date: Tue, 03 Sep 2013 12:22:18 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Eitan Adler Subject: Re: svn commit: r255152 - head/sys/dev/atkbdc References: <201309021825.r82IPIwi046033@svn.freebsd.org> In-Reply-To: <201309021825.r82IPIwi046033@svn.freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, re , dumbbell@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 19:22:20 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 09/02/13 11:25, Eitan Adler wrote: > Author: eadler Date: Mon Sep 2 18:25:18 2013 New Revision: 255152 > URL: http://svnweb.freebsd.org/changeset/base/255152 > > Log: synaptics and trackpoint support are stable enough to be on by > default. > > Eventually both options should be removed. > > Reviewed by: dumbbell I think this broke my ThinkPad T530, the system appears like that the click button is "sticky" (not quite sure what's happening though, key combos like Alt+Tab won't work). After adding: hw.psm.synaptics_support=0 hw.psm.trackpoint_support=0 to /boot/loader.conf, my laptop works as usual again. Any hints on how to diagnose what's happening? (I'll test patches, etc. if there is any) Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBCgAGBQJSJjbqAAoJEG80Jeu8UPuz37AIAKcptlWuzEbR+lL8UlVbsCuE S/yMqQOC0hwj0gBy3iz24EbVxoPIyvkVs1lCZLePQOtMjPLMDm1n/HLg7IuxO0o+ WMDRv9JgEpbgMWx1qEoDQEFWvfMa14q7JhoZgkEND/GR5FfWhhsd7Mdd6q3Rq9PN eWwwA0Gsz8yoBDKpxtsayD6G8I3P+STMyHctBid0jlSkRWU4vjU6SYY2MVygqMFz vJje1RZhHTTAk3lpV11vLsXLS/tBIuhEdVzD1JZfe4PK1Y7ZC/RBkVVfslOE70NR 0P8xOiqGWXb+hOURlA7kiw5HdKSNowdcRaYGNBKCllPVMlLXfdkmIJ/F92HFvhM= =Fl21 -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 19:32:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DAE9D7E5; Tue, 3 Sep 2013 19:32:00 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C8E7C2243; Tue, 3 Sep 2013 19:32:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83JW0DJ062947; Tue, 3 Sep 2013 19:32:00 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83JVxHl062860; Tue, 3 Sep 2013 19:31:59 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201309031931.r83JVxHl062860@svn.freebsd.org> From: Michael Tuexen Date: Tue, 3 Sep 2013 19:31:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255190 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 19:32:01 -0000 Author: tuexen Date: Tue Sep 3 19:31:59 2013 New Revision: 255190 URL: http://svnweb.freebsd.org/changeset/base/255190 Log: Remove redundant field pr_sctp_on. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_timer.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Tue Sep 3 19:07:01 2013 (r255189) +++ head/sys/netinet/sctp_indata.c Tue Sep 3 19:31:59 2013 (r255190) @@ -4718,7 +4718,7 @@ sctp_handle_sack(struct mbuf *m, int off } } TAILQ_REMOVE(&asoc->sent_queue, tp1, sctp_next); - if (tp1->pr_sctp_on) { + if (PR_SCTP_ENABLED(tp1->flags)) { if (asoc->pr_sctp_cnt != 0) asoc->pr_sctp_cnt--; } Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Tue Sep 3 19:07:01 2013 (r255189) +++ head/sys/netinet/sctp_output.c Tue Sep 3 19:31:59 2013 (r255190) @@ -6067,7 +6067,6 @@ sctp_get_frag_point(struct sctp_tcb *stc static void sctp_set_prsctp_policy(struct sctp_stream_queue_pending *sp) { - sp->pr_sctp_on = 0; /* * We assume that the user wants PR_SCTP_TTL if the user provides a * positive lifetime but does not specify any PR_SCTP policy. This @@ -6077,7 +6076,6 @@ sctp_set_prsctp_policy(struct sctp_strea */ if (PR_SCTP_ENABLED(sp->sinfo_flags)) { sp->act_flags |= PR_SCTP_POLICY(sp->sinfo_flags); - sp->pr_sctp_on = 1; } else { return; } @@ -7425,13 +7423,8 @@ dont_do_it: } chk->send_size += pads; } - /* We only re-set the policy if it is on */ - if (sp->pr_sctp_on) { - sctp_set_prsctp_policy(sp); + if (PR_SCTP_ENABLED(chk->flags)) { asoc->pr_sctp_cnt++; - chk->pr_sctp_on = 1; - } else { - chk->pr_sctp_on = 0; } if (sp->msg_is_complete && (sp->length == 0) && (sp->sender_all_done)) { /* All done pull and kill the message */ Modified: head/sys/netinet/sctp_structs.h ============================================================================== --- head/sys/netinet/sctp_structs.h Tue Sep 3 19:07:01 2013 (r255189) +++ head/sys/netinet/sctp_structs.h Tue Sep 3 19:31:59 2013 (r255190) @@ -446,7 +446,6 @@ struct sctp_tmit_chunk { uint8_t do_rtt; uint8_t book_size_scale; uint8_t no_fr_allowed; - uint8_t pr_sctp_on; uint8_t copy_by_ref; uint8_t window_probe; }; @@ -522,7 +521,6 @@ struct sctp_stream_queue_pending { uint8_t holds_key_ref; uint8_t msg_is_complete; uint8_t some_taken; - uint8_t pr_sctp_on; uint8_t sender_all_done; uint8_t put_last_out; uint8_t discard_rest; Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Tue Sep 3 19:07:01 2013 (r255189) +++ head/sys/netinet/sctp_timer.c Tue Sep 3 19:31:59 2013 (r255190) @@ -446,7 +446,7 @@ sctp_recover_sent_list(struct sctp_tcb * } } TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next); - if (chk->pr_sctp_on) { + if (PR_SCTP_ENABLED(chk->flags)) { if (asoc->pr_sctp_cnt != 0) asoc->pr_sctp_cnt--; } Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Tue Sep 3 19:07:01 2013 (r255189) +++ head/sys/netinet/sctputil.c Tue Sep 3 19:31:59 2013 (r255190) @@ -4833,7 +4833,6 @@ sctp_release_pr_sctp_chunk(struct sctp_t atomic_add_int(&chk->whoTo->ref_count, 1); chk->rec.data.TSN_seq = atomic_fetchadd_int(&stcb->asoc.sending_seq, 1); stcb->asoc.pr_sctp_cnt++; - chk->pr_sctp_on = 1; TAILQ_INSERT_TAIL(&stcb->asoc.sent_queue, chk, sctp_next); stcb->asoc.sent_queue_cnt++; stcb->asoc.pr_sctp_cnt++; From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 19:54:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E6CB396E for ; Tue, 3 Sep 2013 19:54:45 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7936C243A for ; Tue, 3 Sep 2013 19:54:45 +0000 (UTC) Received: by mail-ee0-f44.google.com with SMTP id b47so3254897eek.3 for ; Tue, 03 Sep 2013 12:54:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:openpgp:content-type :content-transfer-encoding; bh=6+SxLIBQxcNySGerFtmq+PfmVLSubOAmeiaLFjzuZ7o=; b=LM74ClfJG5YS/WYlxOhsuIOAI2PeDFjmby0ijZeOJ3MpZeOeZX65me9bw96LrEHukw 2/tBbFcQABBBVSp3j1s4YKvR9pY1LSMQwT3MKLOAyom6UPvBmEgMGAkqTUboi9/B2L9+ Yxja9bYjbgRbaE/6HUQqX92Fo9SMpvoAVmhLgr3wlYpewGXKhONllaxdyzHF8eUTEF/8 DQ+hFeFQmZo0PsGxObZMFP7O0JBpbtZqizJMSJakHyWoVxcYRnOISlmxa/YNGvwbIm6i VOCcjwIZj4DP+wtSWoqfgTcEQs9G18q7o0HtSPJV8JiPBXkaSdmMkQw2XitSqVhaFzc2 kj3Q== X-Gm-Message-State: ALoCoQkFx2bkYoQrCSoqG+e/SeGwnS7Y5MYdvfeEGjI+7tj4rLBajVk56fUL52uV5kEk+oJEJLtf X-Received: by 10.15.36.9 with SMTP id h9mr48970144eev.30.1378238077981; Tue, 03 Sep 2013 12:54:37 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id i1sm34233320eeg.0.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Sep 2013 12:54:37 -0700 (PDT) Message-ID: <52263E7C.9070404@freebsd.org> Date: Tue, 03 Sep 2013 23:54:36 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Ed Maste Subject: Re: svn commit: r255175 - head/lib/libexecinfo References: <201309031331.r83DVhGY041066@svn.freebsd.org> In-Reply-To: <201309031331.r83DVhGY041066@svn.freebsd.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 19:54:46 -0000 On 03.09.2013 17:31, Ed Maste wrote: > Author: emaste > Date: Tue Sep 3 13:31:43 2013 > New Revision: 255175 > URL: http://svnweb.freebsd.org/changeset/base/255175 > > Log: > Don't install private libexecinfo headers Perhaps it should be added to obsolete files cleanup... -- http://ache.vniz.net/ bitcoin:1G6ugdNY6e5jx1GVnAU2ntj2NEfmjKG85r From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 19:59:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5F514C8E; Tue, 3 Sep 2013 19:59:47 +0000 (UTC) (envelope-from joel@vnode.se) Received: from mail.vnode.se (mail.vnode.se [212.247.52.13]) by mx1.freebsd.org (Postfix) with ESMTP id DFAB224A1; Tue, 3 Sep 2013 19:59:46 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id 5C43EE3F07A; Tue, 3 Sep 2013 21:52:46 +0200 (CEST) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JwuHeI-sXsCP; Tue, 3 Sep 2013 21:52:44 +0200 (CEST) Received: from devbox.vnode.local (unknown [83.223.1.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id 51B00E3F079; Tue, 3 Sep 2013 21:52:42 +0200 (CEST) Date: Tue, 3 Sep 2013 21:52:41 +0200 From: Joel Dahl To: Peter Wemm Subject: Re: svn commit: r254273 - in head: . include lib lib/libc/iconv lib/libiconv_compat lib/libkiconv share/mk sys/sys tools/build/mk Message-ID: <20130903195241.GA93218@devbox.vnode.local> References: <201308130715.r7D7F1nu076335@svn.freebsd.org> <3887D7C7-D766-40DF-B154-D05768B86AA6@FreeBSD.org> <20130818195304.GA81160@devbox.vnode.local> <20130818224244.GA59141@stack.nl> <52114FED.3010106@wemm.org> <20130822155835.GA52789@devbox.vnode.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130822155835.GA52789@devbox.vnode.local> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, Jilles Tjoelker , Peter Wemm , svn-src-all@freebsd.org, Dimitry Andric , gabor@freebsd.org, svn-src-head@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 19:59:47 -0000 On Thu, Aug 22, 2013 at 05:58:35PM +0200, Joel Dahl wrote: > On Sun, Aug 18, 2013 at 03:51:25PM -0700, Peter Wemm wrote: > > On 8/18/13 3:42 PM, Jilles Tjoelker wrote: > > > On Sun, Aug 18, 2013 at 09:53:04PM +0200, Joel Dahl wrote: > > >> On Sun, Aug 18, 2013 at 12:34:30AM +0200, Dimitry Andric wrote: > > >>> On Aug 13, 2013, at 09:15, Peter Wemm wrote: > > >>>> Author: peter > > >>>> Date: Tue Aug 13 07:15:01 2013 > > >>>> New Revision: 254273 > > >>>> URL: http://svnweb.freebsd.org/changeset/base/254273 > > > > > >>>> Log: > > >>>> The iconv in libc did two things - implement the standard APIs, the GNU > > >>>> extensions and also tried to be link time compatible with ports libiconv. > > >>>> This splits that functionality and enables the parts that shouldn't > > >>>> interfere with the port by default. > > > > > >>>> WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) etc. > > >>>> WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open etc API, linker > > >>>> symbols and even a stub libiconv.so.3 that are good enough to be able > > >>>> to 'pkg delete -f libiconv' on a running system and reasonably expect it > > >>>> to work. > > > > > >>>> I have tortured many machines over the last few days to try and reduce > > >>>> the possibilities of foot-shooting as much as I can. I've successfully > > >>>> recompiled to enable and disable the libiconv_compat modes, ports that use > > >>>> libiconv alongside system iconv etc. If you don't enable the > > >>>> WITH_LIBICONV_COMPAT switch, they don't share symbol space. > > > > > >>>> This is an extension of behavior on other system. iconv(3) is a standard > > >>>> libc interface and libiconv port expects to be able to run alongside it on > > >>>> systems that have it. > > > > > >>> Unfortunately I expect this will break many ports, when the libiconv > > >>> port is installed. A simple example is the following: > > >> > > > > > >> It also breaks installworld when /usr/src and /usr/obj are NFS exported > > >> read-only. > > > > > > I think it has to do with share/i18n/csmapper and share/i18n/esdb using > > > directories as make targets. This apparently causes these files to be > > > rebuilt at 'make installworld' time, which is always bad but is only > > > detected when /usr/obj is read-only. > > > > > > A hack that works is to enclose the four targets depending on ${SUBDIR} > > > in .if !make(install) . > > > > > > Unfortunately, the Makefiles were written to depend on the directories > > > as make targets fairly deeply, so a real fix is harder. > > > > I was looking at this yesterday, but was tied up with other things. I'll > > take a look at it today after getting a few other things done. It should be > > easy enough to replicate by changing /usr/obj to readonly on test systems. > > FWIW, this is still broken. Again, this is still broken. -- Joel From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 20:03:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 40CC912B; Tue, 3 Sep 2013 20:03:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2DD5F250C; Tue, 3 Sep 2013 20:03:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83K3BXc081089; Tue, 3 Sep 2013 20:03:11 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83K3AZd081086; Tue, 3 Sep 2013 20:03:10 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201309032003.r83K3AZd081086@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 3 Sep 2013 20:03:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255191 - in head: . gnu/usr.bin gnu/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 20:03:11 -0000 Author: pfg Date: Tue Sep 3 20:03:10 2013 New Revision: 255191 URL: http://svnweb.freebsd.org/changeset/base/255191 Log: Remove our hacked GNU patch. The old (2.1) GNU patch has outlived its days. The major local changes have been moved into the less restrictedly licensed patch(1) we adopted in usr.bin/ . A much newer version of GNU patch is available in the ports tree (devel/patch). Disconnect from the build and remove. Deleted: head/gnu/usr.bin/patch/ Modified: head/ObsoleteFiles.inc head/gnu/usr.bin/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Sep 3 19:31:59 2013 (r255190) +++ head/ObsoleteFiles.inc Tue Sep 3 20:03:10 2013 (r255191) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20130903: gnupatch is no more +OLD_FILES+=usr/bin/gnupatch +OLD_FILES+=usr/share/man/man1/gnupatch.1.gz # 20130829: bsdpatch is patch unconditionally OLD_FILES+=usr/bin/bsdpatch OLD_FILES+=usr/share/man/man1/bsdpatch.1.gz Modified: head/gnu/usr.bin/Makefile ============================================================================== --- head/gnu/usr.bin/Makefile Tue Sep 3 19:31:59 2013 (r255190) +++ head/gnu/usr.bin/Makefile Tue Sep 3 20:03:10 2013 (r255191) @@ -12,7 +12,6 @@ SUBDIR= ${_binutils} \ ${_gperf} \ grep \ ${_groff} \ - patch \ ${_rcs} \ sdiff \ send-pr \ From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 20:51:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B94A1355; Tue, 3 Sep 2013 20:51:22 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7CBCA28CF; Tue, 3 Sep 2013 20:51:22 +0000 (UTC) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=[192.168.1.176]) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VGxZH-0007en-RB; Tue, 03 Sep 2013 22:51:20 +0200 Message-ID: <52264BC6.8070102@FreeBSD.org> Date: Tue, 03 Sep 2013 22:51:18 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: d@delphij.net Subject: Re: svn commit: r255152 - head/sys/dev/atkbdc References: <201309021825.r82IPIwi046033@svn.freebsd.org> <522636EA.3010509@delphij.net> In-Reply-To: <522636EA.3010509@delphij.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, re , svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 20:51:22 -0000 Le 03/09/2013 21:22, Xin Li a écrit : >> Log: synaptics and trackpoint support are stable enough to be on by >> default. > > I think this broke my ThinkPad T530, the system appears like that the > click button is "sticky" (not quite sure what's happening though, key > combos like Alt+Tab won't work). Hi! Could you try to instead revert r255153 and r255154 (the latter fixes the former)? It adds support for middle and extended buttons, which makes the touchpad usable on some laptops. -- Jean-Sébastien Pédron From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 21:21:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 220EC11C; Tue, 3 Sep 2013 21:21:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F3B002B06; Tue, 3 Sep 2013 21:21:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83LLmNE026527; Tue, 3 Sep 2013 21:21:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83LLlI5026519; Tue, 3 Sep 2013 21:21:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201309032121.r83LLlI5026519@svn.freebsd.org> From: John Baldwin Date: Tue, 3 Sep 2013 21:21:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255192 - in head: contrib/binutils/gas/config contrib/binutils/opcodes sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 21:21:49 -0000 Author: jhb Date: Tue Sep 3 21:21:47 2013 New Revision: 255192 URL: http://svnweb.freebsd.org/changeset/base/255192 Log: Add support for the 'invpcid' instruction to binutils and DDB's disassembler on amd64. MFC after: 1 month Modified: head/contrib/binutils/gas/config/tc-i386.c head/contrib/binutils/opcodes/i386-dis.c head/contrib/binutils/opcodes/i386-opc.tbl head/contrib/binutils/opcodes/i386-tbl.h head/sys/amd64/amd64/db_disasm.c Modified: head/contrib/binutils/gas/config/tc-i386.c ============================================================================== --- head/contrib/binutils/gas/config/tc-i386.c Tue Sep 3 20:03:10 2013 (r255191) +++ head/contrib/binutils/gas/config/tc-i386.c Tue Sep 3 21:21:47 2013 (r255192) @@ -3990,7 +3990,8 @@ output_insn (void) goto check_prefix; } } - else if (i.tm.base_opcode == 0x660f3880 || i.tm.base_opcode == 0x660f3881) + else if (i.tm.base_opcode == 0x660f3880 || i.tm.base_opcode == 0x660f3881 + || i.tm.base_opcode == 0x660f3882) { /* invept and invvpid are 3 byte instructions with a mandatory prefix. */ @@ -4040,7 +4041,8 @@ output_insn (void) *p++ = (i.tm.base_opcode >> 16) & 0xff; } else if (i.tm.base_opcode == 0x660f3880 || - i.tm.base_opcode == 0x660f3881) + i.tm.base_opcode == 0x660f3881 || + i.tm.base_opcode == 0x660f3882) { p = frag_more (3); *p++ = (i.tm.base_opcode >> 16) & 0xff; Modified: head/contrib/binutils/opcodes/i386-dis.c ============================================================================== --- head/contrib/binutils/opcodes/i386-dis.c Tue Sep 3 20:03:10 2013 (r255191) +++ head/contrib/binutils/opcodes/i386-dis.c Tue Sep 3 21:21:47 2013 (r255192) @@ -550,6 +550,7 @@ fetch_data (struct disassemble_info *inf #define PREGRP104 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 104 } } #define PREGRP105 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 105 } } #define PREGRP106 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 106 } } +#define PREGRP107 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 107 } } #define X86_64_0 NULL, { { NULL, X86_64_SPECIAL }, { NULL, 0 } } @@ -2668,6 +2669,14 @@ static const struct dis386 prefix_user_t { "pclmulqdq", { XM, EXx, Ib } }, { "(bad)", { XX } }, }, + + /* PREGRP107 */ + { + { "(bad)", { XX } }, + { "(bad)", { XX } }, + { "invpcid",{ Gm, Mo } }, + { "(bad)", { XX } }, + }, }; static const struct dis386 x86_64_table[][2] = { @@ -2839,7 +2848,7 @@ static const struct dis386 three_byte_ta /* 80 */ { PREGRP98 }, { PREGRP99 }, - { "(bad)", { XX } }, + { PREGRP107 }, { "(bad)", { XX } }, { "(bad)", { XX } }, { "(bad)", { XX } }, Modified: head/contrib/binutils/opcodes/i386-opc.tbl ============================================================================== --- head/contrib/binutils/opcodes/i386-opc.tbl Tue Sep 3 20:03:10 2013 (r255191) +++ head/contrib/binutils/opcodes/i386-opc.tbl Tue Sep 3 21:21:47 2013 (r255192) @@ -1498,3 +1498,7 @@ xsetbv, 0, 0xf01, 0xd1, CpuXSAVE, No_bSu xsave, 1, 0xfae, 0x4, CpuXSAVE, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S } xsaveopt, 1, 0xfae, 0x6, CpuXSAVE, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S } xrstor, 1, 0xfae, 0x5, CpuXSAVE, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S } + +// INVPCID +invpcid, 2, 0x660f3882, None, CpuNo64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 } +invpcid, 2, 0x660f3882, None, Cpu64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 } Modified: head/contrib/binutils/opcodes/i386-tbl.h ============================================================================== --- head/contrib/binutils/opcodes/i386-tbl.h Tue Sep 3 20:03:10 2013 (r255191) +++ head/contrib/binutils/opcodes/i386-tbl.h Tue Sep 3 21:21:47 2013 (r255192) @@ -3641,6 +3641,14 @@ const template i386_optab[] = Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 } }, + { "invpcid", 2, 0x660f3882, None, CpuNo64, + Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, + { BaseIndex|Disp8|Disp16|Disp32|Disp32S, + Reg32 } }, + { "invpcid", 2, 0x660f3882, None, Cpu64, + Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, + { BaseIndex|Disp8|Disp16|Disp32|Disp32S, + Reg64 } }, { "vmcall", 0, 0xf01, 0xc1, CpuVMX, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 } }, Modified: head/sys/amd64/amd64/db_disasm.c ============================================================================== --- head/sys/amd64/amd64/db_disasm.c Tue Sep 3 20:03:10 2013 (r255191) +++ head/sys/amd64/amd64/db_disasm.c Tue Sep 3 21:21:47 2013 (r255192) @@ -127,7 +127,7 @@ struct finst { static const struct inst db_inst_0f388x[] = { /*80*/ { "", TRUE, SDEP, op2(E, Rq), "invept" }, /*81*/ { "", TRUE, SDEP, op2(E, Rq), "invvpid" }, -/*82*/ { "", FALSE, NONE, 0, 0 }, +/*82*/ { "", TRUE, SDEP, op2(E, Rq), "invpcid" }, /*83*/ { "", FALSE, NONE, 0, 0 }, /*84*/ { "", FALSE, NONE, 0, 0 }, /*85*/ { "", FALSE, NONE, 0, 0 }, From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 22:04:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 604A74E2; Tue, 3 Sep 2013 22:04:56 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4C0372E5B; Tue, 3 Sep 2013 22:04:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83M4ufi051013; Tue, 3 Sep 2013 22:04:56 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83M4t2M051011; Tue, 3 Sep 2013 22:04:55 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201309032204.r83M4t2M051011@svn.freebsd.org> From: Warner Losh Date: Tue, 3 Sep 2013 22:04:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255194 - in head/sys: mips/include powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 22:04:56 -0000 Author: imp Date: Tue Sep 3 22:04:55 2013 New Revision: 255194 URL: http://svnweb.freebsd.org/changeset/base/255194 Log: Newer versions of gcc define __INT64_C and __UINT64_C, so avoid redefining them if gcc provides them. Modified: head/sys/mips/include/_stdint.h head/sys/powerpc/include/_stdint.h Modified: head/sys/mips/include/_stdint.h ============================================================================== --- head/sys/mips/include/_stdint.h Tue Sep 3 21:30:42 2013 (r255193) +++ head/sys/mips/include/_stdint.h Tue Sep 3 22:04:55 2013 (r255194) @@ -66,6 +66,7 @@ #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) +#ifndef __INT64_C #ifdef __mips_n64 #define __INT64_C(c) (c ## L) #define __UINT64_C(c) (c ## UL) @@ -73,6 +74,7 @@ #define __INT64_C(c) (c ## LL) #define __UINT64_C(c) (c ## ULL) #endif +#endif /* * ISO/IEC 9899:1999 Modified: head/sys/powerpc/include/_stdint.h ============================================================================== --- head/sys/powerpc/include/_stdint.h Tue Sep 3 21:30:42 2013 (r255193) +++ head/sys/powerpc/include/_stdint.h Tue Sep 3 22:04:55 2013 (r255194) @@ -65,6 +65,7 @@ #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) +#ifndef __INT64_C #ifdef __LP64__ #define __INT64_C(c) (c ## L) #define __UINT64_C(c) (c ## UL) @@ -72,6 +73,7 @@ #define __INT64_C(c) (c ## LL) #define __UINT64_C(c) (c ## ULL) #endif +#endif /* * ISO/IEC 9899:1999 From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 22:33:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5A27B16A; Tue, 3 Sep 2013 22:33:07 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 47322209E; Tue, 3 Sep 2013 22:33:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83MX7EX067488; Tue, 3 Sep 2013 22:33:07 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83MX7HV067487; Tue, 3 Sep 2013 22:33:07 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201309032233.r83MX7HV067487@svn.freebsd.org> From: Sean Bruno Date: Tue, 3 Sep 2013 22:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255195 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 22:33:07 -0000 Author: sbruno Date: Tue Sep 3 22:33:06 2013 New Revision: 255195 URL: http://svnweb.freebsd.org/changeset/base/255195 Log: Add options GEOM_PART_GPT and options MSDOSFS to the DIR-825 Reviewed by: adrian@ Modified: head/sys/mips/conf/DIR-825 Modified: head/sys/mips/conf/DIR-825 ============================================================================== --- head/sys/mips/conf/DIR-825 Tue Sep 3 22:04:55 2013 (r255194) +++ head/sys/mips/conf/DIR-825 Tue Sep 3 22:33:06 2013 (r255195) @@ -54,12 +54,15 @@ options NO_SYSCTL_DESCR device geom_map # to get access to the SPI flash partitions device geom_uncompress # compressed in-memory filesystem hackery! options GEOM_UNCOMPRESS +options GEOM_PART_GPT options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uncompress\" options AR71XX_REALMEM=64*1024*1024 options AR71XX_ENV_UBOOT +options MSDOSFS # Read MSDOS filesystems; useful for USB/CF + # options MD_ROOT # options MD_ROOT_SIZE="6144" From owner-svn-src-head@FreeBSD.ORG Tue Sep 3 23:34:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5C10DA24; Tue, 3 Sep 2013 23:34:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48B5B2563; Tue, 3 Sep 2013 23:34:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r83NY5MJ002637; Tue, 3 Sep 2013 23:34:05 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r83NY5L8002636; Tue, 3 Sep 2013 23:34:05 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201309032334.r83NY5L8002636@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 3 Sep 2013 23:34:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255198 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 23:34:05 -0000 Author: np Date: Tue Sep 3 23:34:04 2013 New Revision: 255198 URL: http://svnweb.freebsd.org/changeset/base/255198 Log: For TOE connections, the window scale factor in CPL_PASS_ACCEPT_REQ is set to 15 to indicate that the peer did not send a window scale option with its SYN. Do not send a window scale option in the SYN|ACK reply in that case. Modified: head/sys/dev/cxgbe/tom/t4_listen.c Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Tue Sep 3 23:20:03 2013 (r255197) +++ head/sys/dev/cxgbe/tom/t4_listen.c Tue Sep 3 23:34:04 2013 (r255198) @@ -1007,7 +1007,7 @@ calc_opt2p(struct adapter *sc, struct po opt2 |= F_TSTAMPS_EN; if (tcpopt->sack) opt2 |= F_SACK_EN; - if (tcpopt->wsf > 0) + if (tcpopt->wsf <= 14) opt2 |= F_WND_SCALE_EN; } From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 00:16:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E9236528; Wed, 4 Sep 2013 00:16:07 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ob0-x231.google.com (mail-ob0-x231.google.com [IPv6:2607:f8b0:4003:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8E0622812; Wed, 4 Sep 2013 00:16:07 +0000 (UTC) Received: by mail-ob0-f177.google.com with SMTP id f8so6617813obp.36 for ; Tue, 03 Sep 2013 17:16:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=vbtLcUMdPgJjTscjlnk91Dc5lqkWIdmF7X1B0uR5EcI=; b=bMMyUj9CY2gj8cMoRHB8lzCkbpU0JoSC4jZeW6wbKtJ9FmnolilKTzNq4/p88lR+Tb 3UVxLGgp1mZ1wLrlQDG2YhrQpy+rM742k93JBFy5yU0l6ZtsQXFMT4ySM31CZ0cfJ7mX sil7DsAlAU+Ddkh2YiWqWC56NnDn2ptmmbasR11ilNNcv+l0JYguYFc3xU2jiOuh9y8q +CjPNBFKudqBn3TXVUgL+tOo7tNHkVz6U/dfq17Xs2uTz+tgMIBTBb2ablhEuZdLFZTk ztcH3Lu+dNilzqpOTdS7soiM1Hr7J8w4hdbYUz9tCsxTnt+CH7euy2KIDfYUZE+HpxRi hK4w== MIME-Version: 1.0 X-Received: by 10.182.142.106 with SMTP id rv10mr70210obb.51.1378253766902; Tue, 03 Sep 2013 17:16:06 -0700 (PDT) Sender: carpeddiem@gmail.com Received: by 10.60.25.38 with HTTP; Tue, 3 Sep 2013 17:16:06 -0700 (PDT) In-Reply-To: <52263E7C.9070404@freebsd.org> References: <201309031331.r83DVhGY041066@svn.freebsd.org> <52263E7C.9070404@freebsd.org> Date: Tue, 3 Sep 2013 20:16:06 -0400 X-Google-Sender-Auth: ja2Z0rMOrcZ6wuGbThpMj40r8Ko Message-ID: Subject: Re: svn commit: r255175 - head/lib/libexecinfo From: Ed Maste To: Andrey Chernov Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 00:16:08 -0000 On 3 September 2013 15:54, Andrey Chernov wrote: > On 03.09.2013 17:31, Ed Maste wrote: >> Author: emaste >> Date: Tue Sep 3 13:31:43 2013 >> New Revision: 255175 >> URL: http://svnweb.freebsd.org/changeset/base/255175 >> >> Log: >> Don't install private libexecinfo headers > > Perhaps it should be added to obsolete files cleanup... Libexecinfo wasn't connected to the build prior to this fix, so I think there's no need. From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 04:11:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A7004F93; Wed, 4 Sep 2013 04:11:39 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7B5C2282B; Wed, 4 Sep 2013 04:11:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r844BdAb065350; Wed, 4 Sep 2013 04:11:39 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r844BdG5065348; Wed, 4 Sep 2013 04:11:39 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201309040411.r844BdG5065348@svn.freebsd.org> From: Justin Hibbits Date: Wed, 4 Sep 2013 04:11:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255199 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 04:11:39 -0000 Author: jhibbits Date: Wed Sep 4 04:11:38 2013 New Revision: 255199 URL: http://svnweb.freebsd.org/changeset/base/255199 Log: Fix hwpmc(4) for 32-bit PowerPC. Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c head/sys/dev/hwpmc/hwpmc_powerpc.h Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_powerpc.c Tue Sep 3 23:34:04 2013 (r255198) +++ head/sys/dev/hwpmc/hwpmc_powerpc.c Wed Sep 4 04:11:38 2013 (r255199) @@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include /* For VM_MIN_KERNEL_ADDRESS/VM_MAX_KERNEL_ADDRESS */ @@ -44,11 +46,6 @@ __FBSDID("$FreeBSD$"); #define INKERNEL(x) (((vm_offset_t)(x)) <= VM_MAX_KERNEL_ADDRESS && \ ((vm_offset_t)(x)) >= VM_MIN_KERNEL_ADDRESS) -/* - * Per-processor information. - */ -static unsigned int ppc_npmcs; - int pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, struct trapframe *tf) @@ -89,8 +86,6 @@ powerpc_describe(int cpu, int ri, struct KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[powerpc,%d], illegal CPU %d", __LINE__, cpu)); - KASSERT(ri >= 0 && ri < ppc_npmcs, - ("[powerpc,%d] row-index %d out of range", __LINE__, ri)); phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri]; snprintf(powerpc_name, sizeof(powerpc_name), "POWERPC-%d", ri); Modified: head/sys/dev/hwpmc/hwpmc_powerpc.h ============================================================================== --- head/sys/dev/hwpmc/hwpmc_powerpc.h Tue Sep 3 23:34:04 2013 (r255198) +++ head/sys/dev/hwpmc/hwpmc_powerpc.h Wed Sep 4 04:11:38 2013 (r255199) @@ -51,7 +51,6 @@ struct powerpc_cpu { extern struct powerpc_cpu **powerpc_pcpu; extern int pmc_mpc7xxx_initialize(struct pmc_mdep *pmc_mdep); -extern int pmc_ppc970_initialize(struct pmc_mdep *pmc_mdep); extern int powerpc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc); extern int powerpc_get_config(int cpu, int ri, struct pmc **ppm); From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 04:25:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 990224F3; Wed, 4 Sep 2013 04:25:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0A9BC292D; Wed, 4 Sep 2013 04:25:41 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r844Pa2s010631; Wed, 4 Sep 2013 07:25:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r844Pa2s010631 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r844PZqu010620; Wed, 4 Sep 2013 07:25:35 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 4 Sep 2013 07:25:35 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r255192 - in head: contrib/binutils/gas/config contrib/binutils/opcodes sys/amd64/amd64 Message-ID: <20130904042535.GX41229@kib.kiev.ua> References: <201309032121.r83LLlI5026519@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8jEihaNHb65WmIJG" Content-Disposition: inline In-Reply-To: <201309032121.r83LLlI5026519@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 04:25:42 -0000 --8jEihaNHb65WmIJG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 03, 2013 at 09:21:47PM +0000, John Baldwin wrote: > Author: jhb > Date: Tue Sep 3 21:21:47 2013 > New Revision: 255192 > URL: http://svnweb.freebsd.org/changeset/base/255192 >=20 > Log: > Add support for the 'invpcid' instruction to binutils and DDB's > disassembler on amd64. > =20 > MFC after: 1 month Nice, thank you. Do you agree with me that it is premature to start using the mnemonics in the kernel source until the changes are merged into stable/9 at least ? --8jEihaNHb65WmIJG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSJrY/AAoJEJDCuSvBvK1BTzUP/Az/a1n4z3DTwqDuiB9wj224 D+wu7hoLng8qCspRDQ6JEjiFhlrLFUsv+DHE8Xm5s9UBcuZn9FpPM35eH+GsnfY3 QrLtx9aCCpUmiL4Ho33sJhN1ve7hREIBobWQX8gk/ZrKkhfjzww3lB3hZqek3B0Y 37E3wpK379ACEFYTBj5R1X55hfQc9XmMm7TntoxlGDZ8081jXQ/78WvG0ax4SURA PhHZdW3d1U5PutmOPHfRlyt33cIQFUHjQYleIvOIjJuY0IZKlE2X+MR7EGXYy7fG cd6/QQSx5sqbycSCHt8nAVFHgS6n8K6yJofQbxKYXtHINiYgAfFWO3Ufp8Go+/DR cPXQH7r/FIDyZ8QZjy9O1QbzfezSci19iLByPKWBa5ZkAUgXqJU7W28Sn6qtNeMN g6b/HLWbeXrofjP58b7XGgv448f2AOudAEOvfuVZcE0yuQ7nepUW9x/I5xmmndEO CobTzwC66W2ZhudD5cj/K580MIk2RZfBSfJh05kBd/HoGTFCSfBKYYpSZbc1C3v3 ETKi/f9d5iCI99seg+di3A0g87fuimehTJAP55Dgf53mFjRkRAmt63R7tmT+7ISN UKS7Hh+1UIIUHG2wo4QX6DjA4V2IFWOnFMKmX/m0ErqrzWO9jSLo4ESClSl6nIXF o0/vuc2ZGlJxj9hVo6oC =Q2RS -----END PGP SIGNATURE----- --8jEihaNHb65WmIJG-- From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 07:55:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BDA36B7; Wed, 4 Sep 2013 07:55:54 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F7B62BB9; Wed, 4 Sep 2013 07:55:54 +0000 (UTC) Received: from [2001:1b48:10b:cafe:225:64ff:febe:589f] (helo=viking.yzserv.com) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VH7wO-000O0S-By; Wed, 04 Sep 2013 09:55:52 +0200 Message-ID: <5226E777.4000909@FreeBSD.org> Date: Wed, 04 Sep 2013 09:55:35 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130813 Thunderbird/17.0.8 MIME-Version: 1.0 To: d@delphij.net Subject: Re: svn commit: r255152 - head/sys/dev/atkbdc References: <201309021825.r82IPIwi046033@svn.freebsd.org> <522636EA.3010509@delphij.net> In-Reply-To: <522636EA.3010509@delphij.net> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2PPPAQUVSSRLJOONCJWNN" Cc: svn-src-head@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, src-committers@freebsd.org, Xin Li X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 07:55:54 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2PPPAQUVSSRLJOONCJWNN Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03.09.2013 21:22, Xin Li wrote: > I think this broke my ThinkPad T530, the system appears like that the > click button is "sticky" (not quite sure what's happening though, key > combos like Alt+Tab won't work). After a quick search, it seems this laptop has a Trackpoint, not a Synaptics touchpad, as I assumed. Therefore, you don't need to try to revert the commits I mentioned. Instead, can you just set the trackpoint_support tunable to 0, not the Synaptics one, to see if it isolates the issue? --=20 Jean-S=C3=A9bastien P=C3=A9dron ------enig2PPPAQUVSSRLJOONCJWNN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIm54UACgkQa+xGJsFYOlODagCgizi3x9z7ODb3WTfpnnpcYOkJ k2oAoI2JS/ALku8NAImo0pQMPfyZg/bq =5C19 -----END PGP SIGNATURE----- ------enig2PPPAQUVSSRLJOONCJWNN-- From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 10:17:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A0C0EF56; Wed, 4 Sep 2013 10:17:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8E3D825CA; Wed, 4 Sep 2013 10:17:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84AHoir075615; Wed, 4 Sep 2013 10:17:50 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84AHoR2075614; Wed, 4 Sep 2013 10:17:50 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309041017.r84AHoR2075614@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 4 Sep 2013 10:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255202 - head/sys/netgraph/netflow X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 10:17:50 -0000 Author: glebius Date: Wed Sep 4 10:17:50 2013 New Revision: 255202 URL: http://svnweb.freebsd.org/changeset/base/255202 Log: Make default cache size more modern. Requested by: Slawa Olhovchenkov Modified: head/sys/netgraph/netflow/ng_netflow.h Modified: head/sys/netgraph/netflow/ng_netflow.h ============================================================================== --- head/sys/netgraph/netflow/ng_netflow.h Wed Sep 4 08:01:11 2013 (r255201) +++ head/sys/netgraph/netflow/ng_netflow.h Wed Sep 4 10:17:50 2013 (r255202) @@ -416,7 +416,7 @@ struct netflow { * indexed by hash hash. Each hash element consist of tailqueue * head and mutex to protect this element. */ -#define CACHESIZE (65536*4) +#define CACHESIZE (65536*16) #define CACHELOWAT (CACHESIZE * 3/4) #define CACHEHIGHWAT (CACHESIZE * 9/10) uma_zone_t zone; From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 11:28:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 893EEF45; Wed, 4 Sep 2013 11:28:48 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 770712A85; Wed, 4 Sep 2013 11:28:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84BSmUC015964; Wed, 4 Sep 2013 11:28:48 GMT (envelope-from br@svn.freebsd.org) Received: (from br@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84BSmMq015963; Wed, 4 Sep 2013 11:28:48 GMT (envelope-from br@svn.freebsd.org) Message-Id: <201309041128.r84BSmMq015963@svn.freebsd.org> From: Ruslan Bukin Date: Wed, 4 Sep 2013 11:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255204 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 11:28:48 -0000 Author: br Date: Wed Sep 4 11:28:47 2013 New Revision: 255204 URL: http://svnweb.freebsd.org/changeset/base/255204 Log: - Add myself as a src committer - Note cognet is my mentor Approved by: cognet (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Sep 4 11:27:51 2013 (r255203) +++ head/share/misc/committers-src.dot Wed Sep 4 11:28:47 2013 (r255204) @@ -117,6 +117,7 @@ bapt [label="Baptiste Daroussin\nbapt@Fr benl [label="Ben Laurie\nbenl@FreeBSD.org\n2011/05/18"] benno [label="Benno Rice\nbenno@FreeBSD.org\n2000/11/02"] bms [label="Bruce M Simpson\nbms@FreeBSD.org\n2003/08/06"] +br [label="Ruslan Bukin\nbr@FreeBSD.org\n2013/09/02"] brian [label="Brian Somers\nbrian@FreeBSD.org\n1996/12/16"] brooks [label="Brooks Davis\nbrooks@FreeBSD.org\n2001/06/21"] brucec [label="Bruce Cran\nbrucec@FreeBSD.org\n2010/01/29"] @@ -348,6 +349,7 @@ bz -> anchie bz -> jamie bz -> syrinx +cognet -> br cognet -> jceel cognet -> kevlo cognet -> ian From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 11:52:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E1FD459F; Wed, 4 Sep 2013 11:52:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF5312C3D; Wed, 4 Sep 2013 11:52:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84BqSZ1030548; Wed, 4 Sep 2013 11:52:28 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84BqS4g030547; Wed, 4 Sep 2013 11:52:28 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201309041152.r84BqS4g030547@svn.freebsd.org> From: John Baldwin Date: Wed, 4 Sep 2013 11:52:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255205 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 11:52:29 -0000 Author: jhb Date: Wed Sep 4 11:52:28 2013 New Revision: 255205 URL: http://svnweb.freebsd.org/changeset/base/255205 Log: Trim a couple of panic messages. Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Wed Sep 4 11:28:47 2013 (r255204) +++ head/sys/kern/subr_witness.c Wed Sep 4 11:52:28 2013 (r255205) @@ -1138,18 +1138,12 @@ witness_checkorder(struct lock_object *l iclass = LOCK_CLASS(interlock); lock1 = find_instance(lock_list, interlock); if (lock1 == NULL) - kassert_panic( - "interlock (%s) %s not locked while locking" - " %s @ %s:%d", + kassert_panic("interlock (%s) %s not locked @ %s:%d", iclass->lc_name, interlock->lo_name, - flags & LOP_EXCLUSIVE ? "exclusive" : "shared", fixup_filename(file), line); else if ((lock1->li_flags & LI_RECURSEMASK) != 0) - kassert_panic( - "interlock (%s) %s recursed while locking %s" - " @ %s:%d", + kassert_panic("interlock (%s) %s recursed @ %s:%d", iclass->lc_name, interlock->lo_name, - flags & LOP_EXCLUSIVE ? "exclusive" : "shared", fixup_filename(file), line); } From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 12:31:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 989A1D0; Wed, 4 Sep 2013 12:31:03 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id 5602D2F0A; Wed, 4 Sep 2013 12:31:03 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1VHCGg-000FYs-Fs; Wed, 04 Sep 2013 16:33:06 +0400 Date: Wed, 4 Sep 2013 16:33:06 +0400 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r255202 - head/sys/netgraph/netflow Message-ID: <20130904123306.GA59372@zxy.spb.ru> References: <201309041017.r84AHoR2075614@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201309041017.r84AHoR2075614@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 12:31:03 -0000 On Wed, Sep 04, 2013 at 10:17:50AM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Sep 4 10:17:50 2013 > New Revision: 255202 > URL: http://svnweb.freebsd.org/changeset/base/255202 > > Log: > Make default cache size more modern. > > Requested by: Slawa Olhovchenkov Thanks! MFC? From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 12:58:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DFA9CBD6; Wed, 4 Sep 2013 12:58:04 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ve0-x22c.google.com (mail-ve0-x22c.google.com [IPv6:2607:f8b0:400c:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 69BE22157; Wed, 4 Sep 2013 12:58:04 +0000 (UTC) Received: by mail-ve0-f172.google.com with SMTP id oz10so191795veb.31 for ; Wed, 04 Sep 2013 05:58:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=60G8VY619gfR8DX39/T3nG1zZvlwJp2ZfhznbA1rq+g=; b=F1rR4VngskrQZuKDLfRnaDgtvq693voXDAkmsNnROs612/kVToZbQk8VRL9AP5oyjZ 3+7e91m7XWbqASiDrpuHe4HbBtby3mOIJPoGy/HEOczgUDl87K+sUFmgA1k2dRCCJniY C4uD3kPD767e9mZehju/nyQj1GvPqMTadkPtiFTHg2ubJH1oIcA4Kx4hrxCLu0lVbpsa ZtoGMQc/hXFgx6rKSl5ZiZYkuwl49kfW8vlcX/mMUiSuClLeePKrwBxoJTkA04lqkMwL 8gEUZYaaWzqMmWCc/sgw81tYqgMil0fs+Xb+XBV/51sIaoWBNqzMuLKZTETefV/jfQfW OpXQ== X-Received: by 10.58.108.74 with SMTP id hi10mr2651443veb.14.1378299483558; Wed, 04 Sep 2013 05:58:03 -0700 (PDT) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.58.229.167 with HTTP; Wed, 4 Sep 2013 05:57:23 -0700 (PDT) In-Reply-To: <201309041017.r84AHoR2075614@svn.freebsd.org> References: <201309041017.r84AHoR2075614@svn.freebsd.org> From: Ivan Voras Date: Wed, 4 Sep 2013 14:57:23 +0200 X-Google-Sender-Auth: KVTkamUT6thmpA61z6CLQxsQiYo Message-ID: Subject: Re: svn commit: r255202 - head/sys/netgraph/netflow To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 12:58:05 -0000 On 4 September 2013 12:17, Gleb Smirnoff wrote: > Log: > Make default cache size more modern. > -#define CACHESIZE (65536*4) > +#define CACHESIZE (65536*16) Things like this make me wonder if there shouldn't be a constant somehwere in an ubiquitous header which would basically be a single place to modify and which would cascade all over the place. Maybe even something like a macro based on something like a YEAR_OF_RELEASE, so e.g. the code becomes #define AUTO_TUNE_BASE (YEAR_OF_RELEASE - 2000) #define AUTO_TUNE_AGGRESIVE (AUTO_TUNE_BASE * 2) #define AUTO_TUNE_CONSERVATIVE ((AUTO_TUNE_BASE * 6) / 5) #define CACHESIZE (65536 * (4 + AUTO_TUNE_CONSERVATIVE)) Of course, some power-of-2 variants should also exist... From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 14:11:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A0F85A1A; Wed, 4 Sep 2013 14:11:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 77DFE26E6; Wed, 4 Sep 2013 14:11:13 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F2945B97F; Wed, 4 Sep 2013 10:11:09 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r255192 - in head: contrib/binutils/gas/config contrib/binutils/opcodes sys/amd64/amd64 Date: Wed, 4 Sep 2013 07:56:45 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201309032121.r83LLlI5026519@svn.freebsd.org> <20130904042535.GX41229@kib.kiev.ua> In-Reply-To: <20130904042535.GX41229@kib.kiev.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201309040756.45464.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 04 Sep 2013 10:11:10 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 14:11:13 -0000 On Wednesday, September 04, 2013 12:25:35 am Konstantin Belousov wrote: > On Tue, Sep 03, 2013 at 09:21:47PM +0000, John Baldwin wrote: > > Author: jhb > > Date: Tue Sep 3 21:21:47 2013 > > New Revision: 255192 > > URL: http://svnweb.freebsd.org/changeset/base/255192 > > > > Log: > > Add support for the 'invpcid' instruction to binutils and DDB's > > disassembler on amd64. > > > > MFC after: 1 month > > Nice, thank you. > > Do you agree with me that it is premature to start using the mnemonics > in the kernel source until the changes are merged into stable/9 at least ? That is fine. Can you test that using them directly works fine with GCC? I know clang already supported this instruction. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 15:02:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C7E879A5; Wed, 4 Sep 2013 15:02:15 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B54F42A50; Wed, 4 Sep 2013 15:02:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84F2Ffr041320; Wed, 4 Sep 2013 15:02:15 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84F2Fwb041317; Wed, 4 Sep 2013 15:02:15 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201309041502.r84F2Fwb041317@svn.freebsd.org> From: David Chisnall Date: Wed, 4 Sep 2013 15:02:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255206 - in head: etc/mtree lib/libc++ X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 15:02:15 -0000 Author: theraven Date: Wed Sep 4 15:02:14 2013 New Revision: 255206 URL: http://svnweb.freebsd.org/changeset/base/255206 Log: Add a c++/v1/tr1 include directory containing symlinks to all of the standard headrs. Lots of third-party code expects to find C++03 headers under tr1 because that's where GNU decided to hide them. This should fix ports that expect them there. MFC after: 1 week Modified: head/etc/mtree/BSD.include.dist head/lib/libc++/Makefile Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Wed Sep 4 11:52:28 2013 (r255205) +++ head/etc/mtree/BSD.include.dist Wed Sep 4 15:02:14 2013 (r255206) @@ -83,6 +83,8 @@ v1 ext .. + tr1 + .. .. .. cam Modified: head/lib/libc++/Makefile ============================================================================== --- head/lib/libc++/Makefile Wed Sep 4 11:52:28 2013 (r255205) +++ head/lib/libc++/Makefile Wed Sep 4 15:02:14 2013 (r255206) @@ -165,6 +165,7 @@ RT_HEADERS= cxxabi.h\ .for hdr in ${STD_HEADERS} STD+= ${HDRDIR}/${hdr} +INCSLINKS+= ${CXXINCLUDEDIR}/${hdr} ${CXXINCLUDEDIR}/tr1/${hdr} .endfor .for hdr in ${RT_HEADERS} STD+= ${LIBCXXRTDIR}/${hdr} From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 17:19:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5661C94A; Wed, 4 Sep 2013 17:19:23 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 428832526; Wed, 4 Sep 2013 17:19:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84HJNtB019743; Wed, 4 Sep 2013 17:19:23 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84HJMcK019737; Wed, 4 Sep 2013 17:19:22 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201309041719.r84HJMcK019737@svn.freebsd.org> From: Brooks Davis Date: Wed, 4 Sep 2013 17:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255207 - head/sys/dev/cfi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 17:19:23 -0000 Author: brooks Date: Wed Sep 4 17:19:21 2013 New Revision: 255207 URL: http://svnweb.freebsd.org/changeset/base/255207 Log: MFP4 217312, 222008, 222052, 222053, 222673, 231484, 231491, 231565, 570643 Rework the timeout code to use actual time rather than a DELAY() loop and to use both typical and maximum to allow logging of timeout failures. Also correct the erase timeout, it is specified in milliseconds not microseconds like the other timeouts. Do not invoke DELAY() between status queries as this adds significant latency which in turn reduced write performance substantially. Sanity check timeout values from the hardware. Implement support for buffered writes (only enabled on Intel/Sharp parts for now). This yields an order of magnitude speedup on the 64MB Intel StrataFlash parts we use. When making a copy of the block to modify, also keep a clean copy around until we are ready to commit the block and use it to avoid unnecessary erases. In the non-buffer write case, also use it to avoid unnecessary writes when the block has not been erased. This yields a significant speedup when doing things like zeroing a block. Sponsored by: DARPA, AFRL Reviewed by: imp (previous version) Modified: head/sys/dev/cfi/cfi_bus_nexus.c head/sys/dev/cfi/cfi_core.c head/sys/dev/cfi/cfi_dev.c head/sys/dev/cfi/cfi_disk.c head/sys/dev/cfi/cfi_reg.h head/sys/dev/cfi/cfi_var.h Modified: head/sys/dev/cfi/cfi_bus_nexus.c ============================================================================== --- head/sys/dev/cfi/cfi_bus_nexus.c Wed Sep 4 15:02:14 2013 (r255206) +++ head/sys/dev/cfi/cfi_bus_nexus.c Wed Sep 4 17:19:21 2013 (r255207) @@ -4,6 +4,11 @@ * Copyright (c) 2009 Sam Leffler, Errno Consulting * All rights reserved. * + * Portions of this software were developed by SRI International and the + * University of Cambridge Computer Laboratory under DARPA/AFRL contract + * (FA8750-10-C-0237) ("CTSRD"), as part of the DARPA CRASH research + * programme. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: head/sys/dev/cfi/cfi_core.c ============================================================================== --- head/sys/dev/cfi/cfi_core.c Wed Sep 4 15:02:14 2013 (r255206) +++ head/sys/dev/cfi/cfi_core.c Wed Sep 4 17:19:21 2013 (r255207) @@ -1,7 +1,13 @@ /*- * Copyright (c) 2007, Juniper Networks, Inc. + * Copyright (c) 2012-2013, SRI International * All rights reserved. * + * Portions of this software were developed by SRI International and the + * University of Cambridge Computer Laboratory under DARPA/AFRL contract + * (FA8750-10-C-0237) ("CTSRD"), as part of the DARPA CRASH research + * programme. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -49,6 +55,8 @@ __FBSDID("$FreeBSD$"); #include #include +static void cfi_add_sysctls(struct cfi_softc *); + extern struct cdevsw cfi_cdevsw; char cfi_driver_name[] = "cfi"; @@ -262,6 +270,7 @@ cfi_attach(device_t dev) struct cfi_softc *sc; u_int blksz, blocks; u_int r, u; + uint64_t mtoexp, ttoexp; #ifdef CFI_SUPPORT_STRATAFLASH uint64_t ppr; char name[KENV_MNAMELEN], value[32]; @@ -279,11 +288,79 @@ cfi_attach(device_t dev) sc->sc_tag = rman_get_bustag(sc->sc_res); sc->sc_handle = rman_get_bushandle(sc->sc_res); - /* Get time-out values for erase and write. */ - sc->sc_write_timeout = 1 << cfi_read_qry(sc, CFI_QRY_TTO_WRITE); - sc->sc_erase_timeout = 1 << cfi_read_qry(sc, CFI_QRY_TTO_ERASE); - sc->sc_write_timeout *= 1 << cfi_read_qry(sc, CFI_QRY_MTO_WRITE); - sc->sc_erase_timeout *= 1 << cfi_read_qry(sc, CFI_QRY_MTO_ERASE); + /* Get time-out values for erase, write, and buffer write. */ + ttoexp = cfi_read_qry(sc, CFI_QRY_TTO_ERASE); + mtoexp = cfi_read_qry(sc, CFI_QRY_MTO_ERASE); + if (ttoexp == 0) { + device_printf(dev, "erase timeout == 0, using 2^16ms\n"); + ttoexp = 16; + } + if (ttoexp > 41) { + device_printf(dev, "insane timeout: 2^%jdms\n", ttoexp); + return (EINVAL); + } + if (mtoexp == 0) { + device_printf(dev, "max erase timeout == 0, using 2^%jdms\n", + ttoexp + 4); + mtoexp = 4; + } + if (ttoexp + mtoexp > 41) { + device_printf(dev, "insane max erase timeout: 2^%jd\n", + ttoexp + mtoexp); + return (EINVAL); + } + sc->sc_typical_timeouts[CFI_TIMEOUT_ERASE] = SBT_1MS * (1ULL << ttoexp); + sc->sc_max_timeouts[CFI_TIMEOUT_ERASE] = + sc->sc_typical_timeouts[CFI_TIMEOUT_ERASE] * (1ULL << mtoexp); + + ttoexp = cfi_read_qry(sc, CFI_QRY_TTO_WRITE); + mtoexp = cfi_read_qry(sc, CFI_QRY_MTO_WRITE); + if (ttoexp == 0) { + device_printf(dev, "write timeout == 0, using 2^18ns\n"); + ttoexp = 18; + } + if (ttoexp > 51) { + device_printf(dev, "insane write timeout: 2^%jdus\n", ttoexp); + return (EINVAL); + } + if (mtoexp == 0) { + device_printf(dev, "max write timeout == 0, using 2^%jdms\n", + ttoexp + 4); + mtoexp = 4; + } + if (ttoexp + mtoexp > 51) { + device_printf(dev, "insane max write timeout: 2^%jdus\n", + ttoexp + mtoexp); + return (EINVAL); + } + sc->sc_typical_timeouts[CFI_TIMEOUT_WRITE] = SBT_1US * (1ULL << ttoexp); + sc->sc_max_timeouts[CFI_TIMEOUT_WRITE] = + sc->sc_typical_timeouts[CFI_TIMEOUT_WRITE] * (1ULL << mtoexp); + + ttoexp = cfi_read_qry(sc, CFI_QRY_TTO_BUFWRITE); + mtoexp = cfi_read_qry(sc, CFI_QRY_MTO_BUFWRITE); + /* Don't check for 0, it means not-supported. */ + if (ttoexp > 51) { + device_printf(dev, "insane write timeout: 2^%jdus\n", ttoexp); + return (EINVAL); + } + if (ttoexp + mtoexp > 51) { + device_printf(dev, "insane max write timeout: 2^%jdus\n", + ttoexp + mtoexp); + return (EINVAL); + } + sc->sc_typical_timeouts[CFI_TIMEOUT_BUFWRITE] = + SBT_1US * (1ULL << cfi_read_qry(sc, CFI_QRY_TTO_BUFWRITE)); + sc->sc_max_timeouts[CFI_TIMEOUT_BUFWRITE] = + sc->sc_typical_timeouts[CFI_TIMEOUT_BUFWRITE] * + (1ULL << cfi_read_qry(sc, CFI_QRY_MTO_BUFWRITE)); + + /* Get the maximum size of a multibyte program */ + if (sc->sc_typical_timeouts[CFI_TIMEOUT_BUFWRITE] != 0) + sc->sc_maxbuf = 1 << (cfi_read_qry(sc, CFI_QRY_MAXBUF) | + cfi_read_qry(sc, CFI_QRY_MAXBUF) << 8); + else + sc->sc_maxbuf = 0; /* Get erase regions. */ sc->sc_regions = cfi_read_qry(sc, CFI_QRY_NREGIONS); @@ -317,6 +394,8 @@ cfi_attach(device_t dev) "%s%u", cfi_driver_name, u); sc->sc_nod->si_drv1 = sc; + cfi_add_sysctls(sc); + #ifdef CFI_SUPPORT_STRATAFLASH /* * Store the Intel factory PPR in the environment. In some @@ -337,6 +416,45 @@ cfi_attach(device_t dev) return (0); } +static void +cfi_add_sysctls(struct cfi_softc *sc) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *children; + + ctx = device_get_sysctl_ctx(sc->sc_dev); + children = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev)); + + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, + "typical_erase_timout_count", + CTLFLAG_RD, &sc->sc_tto_counts[CFI_TIMEOUT_ERASE], + 0, "Number of times the typical erase timeout was exceeded"); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, + "max_erase_timout_count", + CTLFLAG_RD, &sc->sc_mto_counts[CFI_TIMEOUT_ERASE], 0, + "Number of times the maximum erase timeout was exceeded"); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, + "typical_write_timout_count", + CTLFLAG_RD, &sc->sc_tto_counts[CFI_TIMEOUT_WRITE], 0, + "Number of times the typical write timeout was exceeded"); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, + "max_write_timout_count", + CTLFLAG_RD, &sc->sc_mto_counts[CFI_TIMEOUT_WRITE], 0, + "Number of times the maximum write timeout was exceeded"); + if (sc->sc_maxbuf > 0) { + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, + "typical_bufwrite_timout_count", + CTLFLAG_RD, &sc->sc_tto_counts[CFI_TIMEOUT_BUFWRITE], 0, + "Number of times the typical buffered write timeout was " + "exceeded"); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, + "max_bufwrite_timout_count", + CTLFLAG_RD, &sc->sc_mto_counts[CFI_TIMEOUT_BUFWRITE], 0, + "Number of times the maximum buffered write timeout was " + "exceeded"); + } +} + int cfi_detach(device_t dev) { @@ -351,17 +469,22 @@ cfi_detach(device_t dev) } static int -cfi_wait_ready(struct cfi_softc *sc, u_int ofs, u_int timeout) +cfi_wait_ready(struct cfi_softc *sc, u_int ofs, sbintime_t start, + enum cfi_wait_cmd cmd) { - int done, error; + int done, error, tto_exceeded; uint32_t st0 = 0, st = 0; + sbintime_t now; done = 0; error = 0; - timeout *= 10; - while (!done && !error && timeout) { - DELAY(100); - timeout--; + tto_exceeded = 0; + while (!done && !error) { + /* + * Save time before we start so we always do one check + * after the timeout has expired. + */ + now = sbinuptime(); switch (sc->sc_cmdset) { case CFI_VEND_INTEL_ECS: @@ -390,6 +513,25 @@ cfi_wait_ready(struct cfi_softc *sc, u_i done = ((st & 0x40) == (st0 & 0x40)) ? 1 : 0; break; } + + if (tto_exceeded || + now > start + sc->sc_typical_timeouts[cmd]) { + if (!tto_exceeded) { + tto_exceeded = 1; + sc->sc_tto_counts[cmd]++; +#ifdef CFI_DEBUG_TIMEOUT + device_printf(sc->sc_dev, + "typical timeout exceeded (cmd %d)", cmd); +#endif + } + if (now > start + sc->sc_max_timeouts[cmd]) { + sc->sc_mto_counts[cmd]++; +#ifdef CFI_DEBUG_TIMEOUT + device_printf(sc->sc_dev, + "max timeout exceeded (cmd %d)", cmd); +#endif + } + } } if (!done && !error) error = ETIMEDOUT; @@ -405,9 +547,12 @@ cfi_write_block(struct cfi_softc *sc) uint8_t *x8; uint16_t *x16; uint32_t *x32; - } ptr; + } ptr, cpyprt; register_t intr; - int error, i; + int error, i, neederase = 0; + uint32_t st; + u_int wlen; + sbintime_t start; /* Intel flash must be unlocked before modification */ switch (sc->sc_cmdset) { @@ -419,31 +564,124 @@ cfi_write_block(struct cfi_softc *sc) break; } - /* Erase the block. */ - switch (sc->sc_cmdset) { - case CFI_VEND_INTEL_ECS: - case CFI_VEND_INTEL_SCS: - cfi_write(sc, sc->sc_wrofs, CFI_BCS_BLOCK_ERASE); - cfi_write(sc, sc->sc_wrofs, CFI_BCS_CONFIRM); - break; - case CFI_VEND_AMD_SCS: - case CFI_VEND_AMD_ECS: - cfi_amd_write(sc, sc->sc_wrofs, AMD_ADDR_START, - CFI_AMD_ERASE_SECTOR); - cfi_amd_write(sc, sc->sc_wrofs, 0, CFI_AMD_BLOCK_ERASE); - break; - default: - /* Better safe than sorry... */ - return (ENODEV); - } - error = cfi_wait_ready(sc, sc->sc_wrofs, sc->sc_erase_timeout); - if (error) - goto out; + /* Check if an erase is required. */ + for (i = 0; i < sc->sc_wrbufsz; i++) + if ((sc->sc_wrbuf[i] & sc->sc_wrbufcpy[i]) != sc->sc_wrbuf[i]) { + neederase = 1; + break; + } - /* Write the block. */ + if (neederase) { + intr = intr_disable(); + start = sbinuptime(); + /* Erase the block. */ + switch (sc->sc_cmdset) { + case CFI_VEND_INTEL_ECS: + case CFI_VEND_INTEL_SCS: + cfi_write(sc, sc->sc_wrofs, CFI_BCS_BLOCK_ERASE); + cfi_write(sc, sc->sc_wrofs, CFI_BCS_CONFIRM); + break; + case CFI_VEND_AMD_SCS: + case CFI_VEND_AMD_ECS: + cfi_amd_write(sc, sc->sc_wrofs, AMD_ADDR_START, + CFI_AMD_ERASE_SECTOR); + cfi_amd_write(sc, sc->sc_wrofs, 0, CFI_AMD_BLOCK_ERASE); + break; + default: + /* Better safe than sorry... */ + intr_restore(intr); + return (ENODEV); + } + intr_restore(intr); + error = cfi_wait_ready(sc, sc->sc_wrofs, start, + CFI_TIMEOUT_ERASE); + if (error) + goto out; + } else + error = 0; + + /* Write the block using a multibyte write if supported. */ ptr.x8 = sc->sc_wrbuf; + cpyprt.x8 = sc->sc_wrbufcpy; + if (sc->sc_maxbuf > sc->sc_width) { + switch (sc->sc_cmdset) { + case CFI_VEND_INTEL_ECS: + case CFI_VEND_INTEL_SCS: + for (i = 0; i < sc->sc_wrbufsz; i += wlen) { + wlen = MIN(sc->sc_maxbuf, sc->sc_wrbufsz - i); + + intr = intr_disable(); + + start = sbinuptime(); + do { + cfi_write(sc, sc->sc_wrofs + i, + CFI_BCS_BUF_PROG_SETUP); + if (sbinuptime() > start + sc->sc_max_timeouts[CFI_TIMEOUT_BUFWRITE]) { + error = ETIMEDOUT; + goto out; + } + st = cfi_read(sc, sc->sc_wrofs + i); + } while (! (st & CFI_INTEL_STATUS_WSMS)); + + cfi_write(sc, sc->sc_wrofs + i, + (wlen / sc->sc_width) - 1); + switch (sc->sc_width) { + case 1: + bus_space_write_region_1(sc->sc_tag, + sc->sc_handle, sc->sc_wrofs + i, + ptr.x8 + i, wlen); + break; + case 2: + bus_space_write_region_2(sc->sc_tag, + sc->sc_handle, sc->sc_wrofs + i, + ptr.x16 + i / 2, wlen / 2); + break; + case 4: + bus_space_write_region_4(sc->sc_tag, + sc->sc_handle, sc->sc_wrofs + i, + ptr.x32 + i / 4, wlen / 4); + break; + } + + cfi_write(sc, sc->sc_wrofs + i, + CFI_BCS_CONFIRM); + + intr_restore(intr); + + error = cfi_wait_ready(sc, sc->sc_wrofs + i, + start, CFI_TIMEOUT_BUFWRITE); + if (error != 0) + goto out; + } + goto out; + default: + /* Fall through to single word case */ + break; + } + + } + + /* Write the block one byte/word at a time. */ for (i = 0; i < sc->sc_wrbufsz; i += sc->sc_width) { + /* Avoid writing unless we are actually changing bits */ + if (!neederase) { + switch (sc->sc_width) { + case 1: + if(*(ptr.x8 + i) == *(cpyprt.x8 + i)) + continue; + break; + case 2: + if(*(ptr.x16 + i / 2) == *(cpyprt.x16 + i / 2)) + continue; + break; + case 4: + if(*(ptr.x32 + i / 4) == *(cpyprt.x32 + i / 4)) + continue; + break; + } + } + /* * Make sure the command to start a write and the * actual write happens back-to-back without any @@ -451,6 +689,7 @@ cfi_write_block(struct cfi_softc *sc) */ intr = intr_disable(); + start = sbinuptime(); switch (sc->sc_cmdset) { case CFI_VEND_INTEL_ECS: case CFI_VEND_INTEL_SCS: @@ -464,21 +703,22 @@ cfi_write_block(struct cfi_softc *sc) switch (sc->sc_width) { case 1: bus_space_write_1(sc->sc_tag, sc->sc_handle, - sc->sc_wrofs + i, *(ptr.x8)++); + sc->sc_wrofs + i, *(ptr.x8 + i)); break; case 2: bus_space_write_2(sc->sc_tag, sc->sc_handle, - sc->sc_wrofs + i, *(ptr.x16)++); + sc->sc_wrofs + i, *(ptr.x16 + i / 2)); break; case 4: bus_space_write_4(sc->sc_tag, sc->sc_handle, - sc->sc_wrofs + i, *(ptr.x32)++); + sc->sc_wrofs + i, *(ptr.x32 + i / 4)); break; } - + intr_restore(intr); - error = cfi_wait_ready(sc, sc->sc_wrofs, sc->sc_write_timeout); + error = cfi_wait_ready(sc, sc->sc_wrofs, start, + CFI_TIMEOUT_WRITE); if (error) goto out; } @@ -576,6 +816,7 @@ cfi_intel_set_oem_pr(struct cfi_softc *s #ifdef CFI_ARMEDANDDANGEROUS register_t intr; int i, error; + sbintime_t start; #endif if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) @@ -585,11 +826,12 @@ cfi_intel_set_oem_pr(struct cfi_softc *s #ifdef CFI_ARMEDANDDANGEROUS for (i = 7; i >= 4; i--, id >>= 16) { intr = intr_disable(); + start = sbinuptime(); cfi_write(sc, 0, CFI_INTEL_PP_SETUP); cfi_put16(sc, CFI_INTEL_PR(i), id&0xffff); intr_restore(intr); - error = cfi_wait_ready(sc, CFI_BCS_READ_STATUS, - sc->sc_write_timeout); + error = cfi_wait_ready(sc, CFI_BCS_READ_STATUS, start, + CFI_TIMEOUT_WRITE); if (error) break; } @@ -629,6 +871,7 @@ cfi_intel_set_plr(struct cfi_softc *sc) #ifdef CFI_ARMEDANDDANGEROUS register_t intr; int error; + sbintime_t start; #endif if (sc->sc_cmdset != CFI_VEND_INTEL_ECS) return EOPNOTSUPP; @@ -638,10 +881,12 @@ cfi_intel_set_plr(struct cfi_softc *sc) /* worthy of console msg */ device_printf(sc->sc_dev, "set PLR\n"); intr = intr_disable(); + binuptime(&start); cfi_write(sc, 0, CFI_INTEL_PP_SETUP); cfi_put16(sc, CFI_INTEL_PLR, 0xFFFD); intr_restore(intr); - error = cfi_wait_ready(sc, CFI_BCS_READ_STATUS, sc->sc_write_timeout); + error = cfi_wait_ready(sc, CFI_BCS_READ_STATUS, start, + CFI_TIMEOUT_WRITE); cfi_write(sc, 0, CFI_BCS_READ_ARRAY); return error; #else Modified: head/sys/dev/cfi/cfi_dev.c ============================================================================== --- head/sys/dev/cfi/cfi_dev.c Wed Sep 4 15:02:14 2013 (r255206) +++ head/sys/dev/cfi/cfi_dev.c Wed Sep 4 17:19:21 2013 (r255207) @@ -1,7 +1,13 @@ /*- * Copyright (c) 2007, Juniper Networks, Inc. + * Copyright (c) 2012-2013, SRI International * All rights reserved. * + * Portions of this software were developed by SRI International and the + * University of Cambridge Computer Laboratory under DARPA/AFRL contract + * (FA8750-10-C-0237) ("CTSRD"), as part of the DARPA CRASH research + * programme. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -72,7 +78,8 @@ struct cdevsw cfi_cdevsw = { * Begin writing into a new block/sector. We read the sector into * memory and keep updating that, until we move into another sector * or the process stops writing. At that time we write the whole - * sector to flash (see cfi_block_finish). + * sector to flash (see cfi_block_finish). To avoid unneeded erase + * cycles, keep a pristine copy of the sector on hand. */ int cfi_block_start(struct cfi_softc *sc, u_int ofs) @@ -116,6 +123,8 @@ cfi_block_start(struct cfi_softc *sc, u_ break; } } + sc->sc_wrbufcpy = malloc(sc->sc_wrbufsz, M_TEMP, M_WAITOK); + memcpy(sc->sc_wrbufcpy, sc->sc_wrbuf, sc->sc_wrbufsz); sc->sc_writing = 1; return (0); } @@ -131,6 +140,7 @@ cfi_block_finish(struct cfi_softc *sc) error = cfi_write_block(sc); free(sc->sc_wrbuf, M_TEMP); + free(sc->sc_wrbufcpy, M_TEMP); sc->sc_wrbuf = NULL; sc->sc_wrbufsz = 0; sc->sc_wrofs = 0; Modified: head/sys/dev/cfi/cfi_disk.c ============================================================================== --- head/sys/dev/cfi/cfi_disk.c Wed Sep 4 15:02:14 2013 (r255206) +++ head/sys/dev/cfi/cfi_disk.c Wed Sep 4 17:19:21 2013 (r255207) @@ -1,7 +1,13 @@ /*- * Copyright (c) 2009 Sam Leffler, Errno Consulting + * Copyright (c) 2012-2013, SRI International * All rights reserved. * + * Portions of this software were developed by SRI International and the + * University of Cambridge Computer Laboratory under DARPA/AFRL contract + * (FA8750-10-C-0237) ("CTSRD"), as part of the DARPA CRASH research + * programme. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: head/sys/dev/cfi/cfi_reg.h ============================================================================== --- head/sys/dev/cfi/cfi_reg.h Wed Sep 4 15:02:14 2013 (r255206) +++ head/sys/dev/cfi/cfi_reg.h Wed Sep 4 17:19:21 2013 (r255207) @@ -1,7 +1,13 @@ /*- * Copyright (c) 2007, Juniper Networks, Inc. + * Copyright (c) 2012-2013, SRI International * All rights reserved. * + * Portions of this software were developed by SRI International and the + * University of Cambridge Computer Laboratory under DARPA/AFRL contract + * (FA8750-10-C-0237) ("CTSRD"), as part of the DARPA CRASH research + * programme. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -44,8 +50,8 @@ struct cfi_qry { u_char max_vcc; u_char min_vpp; u_char max_vpp; - u_char tto_byte_write; /* 2**n milliseconds. */ - u_char tto_buf_write; /* 2**n milliseconds. */ + u_char tto_byte_write; /* 2**n microseconds. */ + u_char tto_buf_write; /* 2**n microseconds. */ u_char tto_block_erase; /* 2**n milliseconds. */ u_char tto_chip_erase; /* 2**n milliseconds. */ u_char mto_byte_write; /* 2**n times typical t/o. */ @@ -70,12 +76,15 @@ struct cfi_qry { #define CFI_QRY_VEND offsetof(struct cfi_qry, pri_vend) #define CFI_QRY_TTO_WRITE offsetof(struct cfi_qry, tto_byte_write) +#define CFI_QRY_TTO_BUFWRITE offsetof(struct cfi_qry, tto_buf_write) #define CFI_QRY_TTO_ERASE offsetof(struct cfi_qry, tto_block_erase) #define CFI_QRY_MTO_WRITE offsetof(struct cfi_qry, mto_byte_write) +#define CFI_QRY_MTO_BUFWRITE offsetof(struct cfi_qry, mto_buf_write) #define CFI_QRY_MTO_ERASE offsetof(struct cfi_qry, mto_block_erase) #define CFI_QRY_SIZE offsetof(struct cfi_qry, size) #define CFI_QRY_IFACE offsetof(struct cfi_qry, iface) +#define CFI_QRY_MAXBUF offsetof(struct cfi_qry, max_buf_write_size) #define CFI_QRY_NREGIONS offsetof(struct cfi_qry, nregions) #define CFI_QRY_REGION0 offsetof(struct cfi_qry, region) #define CFI_QRY_REGION(x) (CFI_QRY_REGION0 + (x) * 4) @@ -102,6 +111,7 @@ struct cfi_qry { #define CFI_BCS_ERASE_SUSPEND 0xb0 #define CFI_BCS_ERASE_RESUME 0xd0 /* Equals CONFIRM */ #define CFI_BCS_CONFIRM 0xd0 +#define CFI_BCS_BUF_PROG_SETUP 0xe8 #define CFI_BCS_READ_ARRAY 0xff /* Intel commands. */ Modified: head/sys/dev/cfi/cfi_var.h ============================================================================== --- head/sys/dev/cfi/cfi_var.h Wed Sep 4 15:02:14 2013 (r255206) +++ head/sys/dev/cfi/cfi_var.h Wed Sep 4 17:19:21 2013 (r255207) @@ -1,7 +1,13 @@ /*- * Copyright (c) 2007, Juniper Networks, Inc. + * Copyright (c) 2012-2013, SRI International * All rights reserved. * + * Portions of this software were developed by SRI International and the + * University of Cambridge Computer Laboratory under DARPA/AFRL contract + * (FA8750-10-C-0237) ("CTSRD"), as part of the DARPA CRASH research + * programme. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -32,6 +38,12 @@ #ifndef _DEV_CFI_VAR_H_ #define _DEV_CFI_VAR_H_ +enum cfi_wait_cmd { + CFI_TIMEOUT_ERASE, + CFI_TIMEOUT_WRITE, + CFI_TIMEOUT_BUFWRITE +}; + struct cfi_region { u_int r_blocks; u_int r_blksz; @@ -51,13 +63,18 @@ struct cfi_softc { struct cfi_region *sc_region; /* Array of region info. */ u_int sc_cmdset; - u_int sc_erase_timeout; - u_int sc_write_timeout; + sbintime_t sc_typical_timeouts[3]; + sbintime_t sc_max_timeouts[3]; + u_int sc_tto_counts[3]; + u_int sc_mto_counts[3]; + + u_int sc_maxbuf; struct cdev *sc_nod; struct proc *sc_opened; /* Process that has us opened. */ u_char *sc_wrbuf; + u_char *sc_wrbufcpy; u_int sc_wrbufsz; u_int sc_wrofs; u_int sc_writing; From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 17:48:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D0157720; Wed, 4 Sep 2013 17:48:39 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B59472730; Wed, 4 Sep 2013 17:48:39 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 3548B111BF; Wed, 4 Sep 2013 10:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1378316919; bh=0SW+MHdzQ2a7jpXFn4urViMcCVt/7xrVrXWfD3dCCuI=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=HYE7znCMyjoM5tOqz5+VzskWpn8m46fqZ7vxMpYsGALlur3QW0Kki8HOq6Rg8xnnD QQ2ipvG/N4TG4U9Hm0Wf24byygJTV92jKgRgaPTi6XEQyR2KkH9I2oJ7M+8KRgjIwN 97GkTZLbWZ01MOWFJzMbCvM2F/6fIbzlxm8+I72A= Message-ID: <52277276.9050206@delphij.net> Date: Wed, 04 Sep 2013 10:48:38 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= Subject: Re: svn commit: r255152 - head/sys/dev/atkbdc References: <201309021825.r82IPIwi046033@svn.freebsd.org> <522636EA.3010509@delphij.net> <5226E777.4000909@FreeBSD.org> In-Reply-To: <5226E777.4000909@FreeBSD.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, src-committers@freebsd.org, d@delphij.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 17:48:39 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi, On 09/04/13 00:55, Jean-Sébastien Pédron wrote: > On 03.09.2013 21:22, Xin Li wrote: >> I think this broke my ThinkPad T530, the system appears like that >> the click button is "sticky" (not quite sure what's happening >> though, key combos like Alt+Tab won't work). > > After a quick search, it seems this laptop has a Trackpoint, not a > Synaptics touchpad, as I assumed. Therefore, you don't need to try > to revert the commits I mentioned. > > Instead, can you just set the trackpoint_support tunable to 0, not > the Synaptics one, to see if it isolates the issue? With the following: #hw.psm.synaptics_support=0 hw.psm.trackpoint_support=0 I am still able to reproduce the issue. It seems like if I "swipe" my finger on the touchpad, I can recover from the situation. Any suggestions? Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBCgAGBQJSJ3J2AAoJEG80Jeu8UPuz13wH+wahQ8e50Kq5WCYixM8nPpMf PVlNBM4J5mf0h7aLAJGnjtnPyd13qpNFo5PChyb5RJ0S0OIkqneZg0iDP5xvsDft jx7U7J1wQjwAoxixstfLXcqvKwQlpXPaFfgBROYUQdyDMT6jtJT9iaqWlKzQ6RN3 pImaRZfutjRIZHHrUuKftWukQkaTc5+xmqmkdWz11C6K5xf5ZTP7qn11ZX/XyV/b Rqx3+DVLxdGDpFyT16c1qScmPSzXG35Ur/ce3+MiTNMg6kcOXxG/ogVe65Mpmm63 0KKiADtD32xRGalRUT8+DDKJijlnUkzQfm0wNYId3vVUQcYqXulqN/IYcMOQthg= =hyMn -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 17:48:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 025B8726; Wed, 4 Sep 2013 17:48:42 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E48BB2732; Wed, 4 Sep 2013 17:48:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84Hmf0S036600; Wed, 4 Sep 2013 17:48:41 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84Hmflg036599; Wed, 4 Sep 2013 17:48:41 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201309041748.r84Hmflg036599@svn.freebsd.org> From: John-Mark Gurney Date: Wed, 4 Sep 2013 17:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255208 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 17:48:42 -0000 Author: jmg Date: Wed Sep 4 17:48:41 2013 New Revision: 255208 URL: http://svnweb.freebsd.org/changeset/base/255208 Log: add links for the various vmem functions... Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Wed Sep 4 17:19:21 2013 (r255207) +++ head/share/man/man9/Makefile Wed Sep 4 17:48:41 2013 (r255208) @@ -1443,6 +1443,13 @@ MLINKS+=vfs_getopt.9 vfs_copyopt.9 \ MLINKS+=vhold.9 vdrop.9 \ vhold.9 vdropl.9 \ vhold.9 vholdl.9 +MLINKS+=vmem.9 vmem_add.9 \ + vmem.9 vmem_alloc.9 \ + vmem.9 vmem_create.9 \ + vmem.9 vmem_destroy.9 \ + vmem.9 vmem_free.9 \ + vmem.9 vmem_xalloc.9 \ + vmem.9 vmem_xfree.9 MLINKS+=vm_map_lock.9 vm_map_lock_downgrade.9 \ vm_map_lock.9 vm_map_lock_read.9 \ vm_map_lock.9 vm_map_lock_upgrade.9 \ From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 18:15:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id 54630384; Wed, 4 Sep 2013 18:15:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Message-ID: <52277838.1030102@FreeBSD.org> Date: Wed, 04 Sep 2013 14:13:12 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130814 Thunderbird/17.0.8 MIME-Version: 1.0 To: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= Subject: Re: svn commit: r255152 - head/sys/dev/atkbdc References: <201309021825.r82IPIwi046033@svn.freebsd.org> <522636EA.3010509@delphij.net> <5226E777.4000909@FreeBSD.org> <52277276.9050206@delphij.net> In-Reply-To: <52277276.9050206@delphij.net> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 18:15:30 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-09-04 13:48:38 -0400, Xin Li wrote: > Hi, > > On 09/04/13 00:55, Jean-Sébastien Pédron wrote: >> On 03.09.2013 21:22, Xin Li wrote: >>> I think this broke my ThinkPad T530, the system appears like >>> that the click button is "sticky" (not quite sure what's >>> happening though, key combos like Alt+Tab won't work). > >> After a quick search, it seems this laptop has a Trackpoint, not >> a Synaptics touchpad, as I assumed. Therefore, you don't need to >> try to revert the commits I mentioned. > >> Instead, can you just set the trackpoint_support tunable to 0, >> not the Synaptics one, to see if it isolates the issue? > > With the following: > > #hw.psm.synaptics_support=0 hw.psm.trackpoint_support=0 > > I am still able to reproduce the issue. It seems like if I "swipe" > my finger on the touchpad, I can recover from the situation. Please revert r255152. synaptics_support was turned off by default because its probing method is too intrusive, i.e., it affects other mice/touchpads. trackpoint_support is still experimental. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBAgAGBQJSJ3g4AAoJECXpabHZMqHOMzQIAJQHpXmI1Gk2jum9lVy0xx6d 7tOOpfhdAneCndMQ374UpUoQzm3DjPl/hGHuCk6aP+WcM65Zue2PYMvIipjVK4Fl 27ws1XuMye2pbfWo6iZiYyFgrAb6i7yGaldlax9hGxvhFWZivQv+4OV/o3VkFCpz bjMmTx/oBGCOfRs3bk6gu2RwXcqIdej1LQRtftIBYVRRIZr5q9UVem2KO1/KhuoT j5C9Yod6fBmv0UZPTOGQKYC99+uliO+5gB4biij2+5rP5E0Z4L7MLaBLMuTesy4B VtzQ+YzfH5j+u0JFWjLKDC1Eyq5RyNOWAdDLBxhbVsilKpk6UN60TgwyHQcumhE= =h5nx -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 18:40:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id 55689D7F; Wed, 4 Sep 2013 18:40:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Message-ID: <52277E18.2000908@FreeBSD.org> Date: Wed, 04 Sep 2013 14:38:16 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130814 Thunderbird/17.0.8 MIME-Version: 1.0 To: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= Subject: Re: svn commit: r255152 - head/sys/dev/atkbdc References: <201309021825.r82IPIwi046033@svn.freebsd.org> <522636EA.3010509@delphij.net> <5226E777.4000909@FreeBSD.org> <52277276.9050206@delphij.net> <52277838.1030102@FreeBSD.org> In-Reply-To: <52277838.1030102@FreeBSD.org> X-Enigmail-Version: 1.5.1 Content-Type: multipart/mixed; boundary="------------070302030305030702060505" Cc: svn-src-head@freebsd.org, Xin LI , svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 18:40:34 -0000 This is a multi-part message in MIME format. --------------070302030305030702060505 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-09-04 14:13:12 -0400, Jung-uk Kim wrote: > On 2013-09-04 13:48:38 -0400, Xin Li wrote: >> Hi, > >> On 09/04/13 00:55, Jean-Sébastien Pédron wrote: >>> On 03.09.2013 21:22, Xin Li wrote: >>>> I think this broke my ThinkPad T530, the system appears like >>>> that the click button is "sticky" (not quite sure what's >>>> happening though, key combos like Alt+Tab won't work). > >>> After a quick search, it seems this laptop has a Trackpoint, >>> not a Synaptics touchpad, as I assumed. Therefore, you don't >>> need to try to revert the commits I mentioned. > >>> Instead, can you just set the trackpoint_support tunable to 0, >>> not the Synaptics one, to see if it isolates the issue? > >> With the following: > >> #hw.psm.synaptics_support=0 hw.psm.trackpoint_support=0 > >> I am still able to reproduce the issue. It seems like if I >> "swipe" my finger on the touchpad, I can recover from the >> situation. > > Please revert r255152. synaptics_support was turned off by > default because its probing method is too intrusive, i.e., it > affects other mice/touchpads. trackpoint_support is still > experimental. Or maybe the attached patch is enough, I am not sure. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBAgAGBQJSJ34YAAoJECXpabHZMqHO3W8H/3lBm1q0ZeLfUQRNW+saP+AX 0buoXnmIeLlrrBYnvkwx6YDsm6jNWifUncGeIEePBwpe6X1McMizGtw0vrHiWSq0 ZlYnAOmUmjPDfLk6LG7oyZIlDsOsuY2wSCuXphDyzJh/A4xy81pYAwxqpTE3QXq1 O6yPqCJHNbFNt7X6vpN4UQmPbMU6RRxXnIedswsBK0eUn74I0b9DV8fV5MsIstIw n3XOjbEh55bxbqF1bFz7tS9YkkRVctYCDVoHw2+szAI/NV4uNjD/Ciydj+6ktiBc VDcksZ7fIhWMvA3jNLl1TWCGjuE7KHuKuF6SPBfZb0T9tQMPvZ7N3Di0coB8/hw= =hBv2 -----END PGP SIGNATURE----- --------------070302030305030702060505 Content-Type: text/x-patch; name="psm.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="psm.diff" Index: /usr/src/sys/dev/atkbdc/psm.c =================================================================== --- /usr/src/sys/dev/atkbdc/psm.c (revision 255209) +++ /usr/src/sys/dev/atkbdc/psm.c (working copy) @@ -494,6 +494,8 @@ static struct { 0x08, MOUSE_4D_PACKETSIZE, enable_4dmouse }, { MOUSE_MODEL_4DPLUS, /* A4 Tech 4D+ Mouse */ 0xc8, MOUSE_4DPLUS_PACKETSIZE, enable_4dplus }, + { MOUSE_MODEL_TRACKPOINT, /* IBM/Lenovo TrackPoint */ + 0xc0, MOUSE_PS2_PACKETSIZE, enable_trackpoint }, { MOUSE_MODEL_SYNAPTICS, /* Synaptics Touchpad */ 0xc0, MOUSE_SYNAPTICS_PACKETSIZE, enable_synaptics }, { MOUSE_MODEL_INTELLI, /* Microsoft IntelliMouse */ @@ -504,8 +506,6 @@ static struct { 0x80, MOUSE_PS2_PACKETSIZE, enable_kmouse }, { MOUSE_MODEL_VERSAPAD, /* Interlink electronics VersaPad */ 0xe8, MOUSE_PS2VERSA_PACKETSIZE, enable_versapad }, - { MOUSE_MODEL_TRACKPOINT, /* IBM/Lenovo TrackPoint */ - 0xc0, MOUSE_PS2_PACKETSIZE, enable_trackpoint }, { MOUSE_MODEL_GENERIC, 0xc0, MOUSE_PS2_PACKETSIZE, NULL }, }; --------------070302030305030702060505-- From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 18:42:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4BEB76A; Wed, 4 Sep 2013 18:42:06 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 393542B6D; Wed, 4 Sep 2013 18:42:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84Ig6GD070660; Wed, 4 Sep 2013 18:42:06 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84Ig6Sj070657; Wed, 4 Sep 2013 18:42:06 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201309041842.r84Ig6Sj070657@svn.freebsd.org> From: Eitan Adler Date: Wed, 4 Sep 2013 18:42:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255210 - head/sys/dev/atkbdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 18:42:06 -0000 Author: eadler Date: Wed Sep 4 18:42:05 2013 New Revision: 255210 URL: http://svnweb.freebsd.org/changeset/base/255210 Log: Revert r255152: It turns out that synaptics_support was turned off by default because its probing method is too intrusive not because it was unstable. Once this is fixed it should be enabled once again. Reported by: delphij, jkim Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Wed Sep 4 18:20:24 2013 (r255209) +++ head/sys/dev/atkbdc/psm.c Wed Sep 4 18:42:05 2013 (r255210) @@ -375,10 +375,10 @@ static devclass_t psm_devclass; static int tap_enabled = -1; TUNABLE_INT("hw.psm.tap_enabled", &tap_enabled); -static int synaptics_support = 1; +static int synaptics_support = 0; TUNABLE_INT("hw.psm.synaptics_support", &synaptics_support); -static int trackpoint_support = 1; +static int trackpoint_support = 0; TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support); static int verbose = PSM_DEBUG; From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 18:45:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 58BC1278 for ; Wed, 4 Sep 2013 18:45:52 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-x233.google.com (mail-pb0-x233.google.com [IPv6:2607:f8b0:400e:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2AA352BA1 for ; Wed, 4 Sep 2013 18:45:52 +0000 (UTC) Received: by mail-pb0-f51.google.com with SMTP id jt11so703271pbb.24 for ; Wed, 04 Sep 2013 11:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=hd4YPskDPsQ0uBqiFurTFS+SnS8ZJEPTxzHjuRX79FM=; b=ODKYrNQXrOcj5GC+VqQXQcjK12TTzwGXZBvJqmPU8z5/uN87hml84dTfqnc6rDNw7c SdLmgKd5C7hcOzKHb4HPNWzEbxmdCOuLnBFwwY9mBbJ+tYiwKCcV0UpbnzyeGUvTR4kO 9f39A8JeCKikNddMPYoBiqyKpLl56YvOqEswQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=hd4YPskDPsQ0uBqiFurTFS+SnS8ZJEPTxzHjuRX79FM=; b=LpcXpsY2AQ75sf/G6Xch1VmnY2FSpoYcQ9M9Pqz2EZ/+hIOWPzu9A4NDJtPmMNjFcs y//OYMWpL5H2LHYYG7FUw7zQ6T+Pm0ROl8XRk4fM6sEzbLaqFrZI9cxYOoOn4zGKNKH9 /JlRQ8TyozoB7tY0lKR1GLfqYxNk/h2Zbu8GrFhj1ZIWE/ud4zSKYRsJFsAUpLqs0U+5 54L4Unp6EZsfwTnXCsdYoEIKCDYdHVUezicVujHbmG5mDvXErMYZCPqRAn6RKFsMI3UI N/MY9fPRJmoFwgcHEd5cWi+/fsNTOeC/5YGuVxHvVCoivQbhdybOO5hjPneNG2tvjk2k x/+Q== X-Gm-Message-State: ALoCoQnrFIB2Rw+P2spK8GxdxtDFouzVCv/RDg29XGUSMDM91Xgk9YKMlOhFEgJd8bDtcLzFqDWT X-Received: by 10.68.52.41 with SMTP id q9mr4807050pbo.108.1378320351862; Wed, 04 Sep 2013 11:45:51 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.70.6.3 with HTTP; Wed, 4 Sep 2013 11:45:21 -0700 (PDT) In-Reply-To: <52277E18.2000908@FreeBSD.org> References: <201309021825.r82IPIwi046033@svn.freebsd.org> <522636EA.3010509@delphij.net> <5226E777.4000909@FreeBSD.org> <52277276.9050206@delphij.net> <52277838.1030102@FreeBSD.org> <52277E18.2000908@FreeBSD.org> From: Eitan Adler Date: Wed, 4 Sep 2013 14:45:21 -0400 X-Google-Sender-Auth: fNVieKdnr-jiFHx0D7GNP93e_Tg Message-ID: Subject: Re: svn commit: r255152 - head/sys/dev/atkbdc To: Jung-uk Kim Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Xin LI , =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 18:45:52 -0000 On Wed, Sep 4, 2013 at 2:38 PM, Jung-uk Kim wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 2013-09-04 14:13:12 -0400, Jung-uk Kim wrote: >> On 2013-09-04 13:48:38 -0400, Xin Li wrote: >>> Hi, >> >>> On 09/04/13 00:55, Jean-S=C3=A9bastien P=C3=A9dron wrote: >>>> On 03.09.2013 21:22, Xin Li wrote: >>>>> I think this broke my ThinkPad T530, the system appears like >>>>> that the click button is "sticky" (not quite sure what's >>>>> happening though, key combos like Alt+Tab won't work). >> >>>> After a quick search, it seems this laptop has a Trackpoint, >>>> not a Synaptics touchpad, as I assumed. Therefore, you don't >>>> need to try to revert the commits I mentioned. >> >>>> Instead, can you just set the trackpoint_support tunable to 0, >>>> not the Synaptics one, to see if it isolates the issue? >> >>> With the following: >> >>> #hw.psm.synaptics_support=3D0 hw.psm.trackpoint_support=3D0 >> >>> I am still able to reproduce the issue. It seems like if I >>> "swipe" my finger on the touchpad, I can recover from the >>> situation. >> >> Please revert r255152. synaptics_support was turned off by >> default because its probing method is too intrusive, i.e., it >> affects other mice/touchpads. trackpoint_support is still >> experimental. > > Or maybe the attached patch is enough, I am not sure. I have already reverted the commit, but can you please try with this patch anyways? It would help in the future when we could eliminate the sysctl. --=20 Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 18:52:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id CAB5D68D; Wed, 4 Sep 2013 18:52:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Message-ID: <522780E7.2090300@FreeBSD.org> Date: Wed, 04 Sep 2013 14:50:15 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130814 Thunderbird/17.0.8 MIME-Version: 1.0 To: Eitan Adler Subject: Re: svn commit: r255210 - head/sys/dev/atkbdc References: <201309041842.r84Ig6Sj070657@svn.freebsd.org> In-Reply-To: <201309041842.r84Ig6Sj070657@svn.freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 18:52:34 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-09-04 14:42:06 -0400, Eitan Adler wrote: > Author: eadler Date: Wed Sep 4 18:42:05 2013 New Revision: 255210 > URL: http://svnweb.freebsd.org/changeset/base/255210 > > Log: Revert r255152: > > It turns out that synaptics_support was turned off by default > because its probing method is too intrusive not because it was > unstable. > > Once this is fixed it should be enabled once again.Thanks! Thanks! Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBAgAGBQJSJ4DnAAoJECXpabHZMqHOc/YIAMEO5EbZucPb5lHRhZL84V7I +7+e4kbRCBWOw0Mx6ql5x9asilalzEidcGjJWAboo9n4pGid6mPVzxZIn0Su+UHh h4o1QanftaPFf926Rx1bVO82bKHBlSi/rKfzBwAC7hx5QiuT2PSXKfjw/e+zfI2S d7uOumA4NHw5C4UHNNi9nuExuGudIb65TKYWNOM3AjubYF/B4Y3kTLAhJ9C19Z9g He59ZANybhomM5yc8QBQIBrvYKPpscWVhktgVX0z8VKGPt94AyjPbz7dnCPNNeL0 eHdpb8tSrTsSgehRQRVjsADj3TjD3CUATRi3qVNv/YeWgmfdic/CkSaXmXGSqCw= =Xgms -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 19:47:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 474FA632; Wed, 4 Sep 2013 19:47:12 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2832F2F44; Wed, 4 Sep 2013 19:47:11 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 6966D11B27; Wed, 4 Sep 2013 12:47:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1378324031; bh=uLCF4rwBvh8qQkvXHmP2GP4WqFYaBmdqFiH1H9QbvTo=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=AzihVdGouVxrKdRtuh3xaF+yFSSHdkdpJY6PKahiFPQfvZn6DjDtH5gxRSGK5+Qip 2oYrYIKVkSkKnpibDU9AnxFqxH5jtJLOTJSS84ENf1sv/BZg2k2t32juTbUpMpges7 wFLag+/ouQ4rkAO0/4Cf7G3z/g5OpmF06fEWR2DY= Message-ID: <52278E3F.9090809@delphij.net> Date: Wed, 04 Sep 2013 12:47:11 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Jung-uk Kim Subject: Re: svn commit: r255152 - head/sys/dev/atkbdc References: <201309021825.r82IPIwi046033@svn.freebsd.org> <522636EA.3010509@delphij.net> <5226E777.4000909@FreeBSD.org> <52277276.9050206@delphij.net> <52277838.1030102@FreeBSD.org> <52277E18.2000908@FreeBSD.org> In-Reply-To: <52277E18.2000908@FreeBSD.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: src-committers@freebsd.org, Eitan Adler , svn-src-all@freebsd.org, Xin LI , svn-src-head@freebsd.org, =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 19:47:12 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 09/04/13 11:38, Jung-uk Kim wrote: > On 2013-09-04 14:13:12 -0400, Jung-uk Kim wrote: >> On 2013-09-04 13:48:38 -0400, Xin Li wrote: >>> Hi, > >>> On 09/04/13 00:55, Jean-Sébastien Pédron wrote: >>>> On 03.09.2013 21:22, Xin Li wrote: >>>>> I think this broke my ThinkPad T530, the system appears >>>>> like that the click button is "sticky" (not quite sure >>>>> what's happening though, key combos like Alt+Tab won't >>>>> work). > >>>> After a quick search, it seems this laptop has a Trackpoint, >>>> not a Synaptics touchpad, as I assumed. Therefore, you don't >>>> need to try to revert the commits I mentioned. > >>>> Instead, can you just set the trackpoint_support tunable to >>>> 0, not the Synaptics one, to see if it isolates the issue? > >>> With the following: > >>> #hw.psm.synaptics_support=0 hw.psm.trackpoint_support=0 > >>> I am still able to reproduce the issue. It seems like if I >>> "swipe" my finger on the touchpad, I can recover from the >>> situation. > >> Please revert r255152. synaptics_support was turned off by >> default because its probing method is too intrusive, i.e., it >> affects other mice/touchpads. trackpoint_support is still >> experimental. > > Or maybe the attached patch is enough, I am not sure. Running r255207M with the change and: #hw.psm.synaptics_support=0 #hw.psm.trackpoint_support=0 And the problem persists. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBCgAGBQJSJ44/AAoJEG80Jeu8UPuz0VkIAJuYvZWvR06d5Q/B+XXmeoC6 nxTbj6zAgvb4eiFi9bcFszyIy48hj11eShfdxdd9bWtrqdNNnenh1AWkvSMgCn39 JmXbCvdEGUyUw3USIoo3pYfpTnwFSHnAuaeYoJoZ8e78o32/qx1xUsaKHkY5clr0 5zM/SnZ8G/+GP12UEVQ/T+lcRNl2BmZdWcS3i6oIYBXuAik4gaThXSNrx17Idavp UKxsF/7vAMmBzAEinzx4eovkdkPTpB3k426zVGHHeduRLgUmVguwCXq0qr5w+wzW pYL/x8JtLbK3Zya6fR6vNXsVGz9pvxUvXpFh7dWbhWfhg6EwiJAV6VDSlEMg0b0= =7QH8 -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 20:12:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E3E80BC; Wed, 4 Sep 2013 20:12:33 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D084A2227; Wed, 4 Sep 2013 20:12:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84KCXWN024153; Wed, 4 Sep 2013 20:12:33 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84KCX4d024152; Wed, 4 Sep 2013 20:12:33 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201309042012.r84KCX4d024152@svn.freebsd.org> From: "George V. Neville-Neil" Date: Wed, 4 Sep 2013 20:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255211 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 20:12:34 -0000 Author: gnn Date: Wed Sep 4 20:12:33 2013 New Revision: 255211 URL: http://svnweb.freebsd.org/changeset/base/255211 Log: Add myself to the list of ports committers. Approved by: skreuzer (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Wed Sep 4 18:42:05 2013 (r255210) +++ head/share/misc/committers-ports.dot Wed Sep 4 20:12:33 2013 (r255211) @@ -103,6 +103,7 @@ gerald [label="Gerald Pfeifer\ngerald@Fr gjb [label="Glen Barber\ngjb@FreeBSD.org\n2012/06/19"] glarkin [label="Greg Larkin\nglarkin@FreeBSD.org\n2008/07/17"] glewis [label="Greg Lewis\nglewis@FreeBSD.org\n2002/04/08"] +gnn [label="George Neville-Neil\ngnn@FreeBSD.org\n2013/09/04"] hq [label="Herve Quiroz\nhq@FreeBSD.org\n2004/08/05"] ijliao [label="Ying-Chieh Liao\nijliao@FreeBSD.org\n2001/01/20"] itetcu [label="Ion-Mihai Tetcu\nitetcu@FreeBSD.org\n2006/06/07"] @@ -491,6 +492,8 @@ sem -> stas shaun -> timur shaun -> matthew +skreuzer -> gnn + sobomax -> demon sobomax -> glewis sobomax -> lev From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 20:21:20 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5DFE43D8; Wed, 4 Sep 2013 20:21:20 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 60B5E22CB; Wed, 4 Sep 2013 20:21:17 +0000 (UTC) Received: from alph.d.allbsd.org (p2049-ipbf1102funabasi.chiba.ocn.ne.jp [122.26.101.49]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r84KKvF6059332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 5 Sep 2013 05:21:07 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r84KKtNL079909; Thu, 5 Sep 2013 05:20:56 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 05 Sep 2013 05:19:41 +0900 (JST) Message-Id: <20130905.051941.1980191753384588454.hrs@allbsd.org> To: asomers@FreeBSD.org Subject: Re: svn commit: r253924 - in head: etc etc/rc.d share/man/man5 From: Hiroki Sato In-Reply-To: References: <201308040636.r746aI5i038931@svn.freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart0(Thu_Sep__5_05_19_41_2013_357)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Thu, 05 Sep 2013 05:21:07 +0900 (JST) X-Spam-Status: No, score=-90.6 required=13.0 tests=CONTENT_TYPE_PRESENT, DIRECTOCNDYN,DYN_PBL,RCVD_IN_PBL,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 20:21:20 -0000 ----Security_Multipart0(Thu_Sep__5_05_19_41_2013_357)-- Content-Type: Multipart/Mixed; boundary="--Next_Part(Thu_Sep__5_05_19_41_2013_886)--" Content-Transfer-Encoding: 7bit ----Next_Part(Thu_Sep__5_05_19_41_2013_886)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Alan Somers wrote in : as> With this revision, I am unable to down an ipv4 interface using as> "/etc/rc.d/netif stop em1". When I try, ipv4_down cannot find the address as> to delete, because "$_inet" begins with a tab character and the therefore as> it matches the "*)" rule in the case statement. Presumably "$_inet" as> doesn't always begin with a tab, so this patch will match with or without as> the tab. Does it look good to you? as> as> --- /usr/home/alans/freebsd/head/etc/network.subr 2013-08-20 as> 19:33:30.6712 as> 28832 +0000 as> +++ /etc/network.subr 2013-08-22 15:49:53.000000000 +0000 as> @@ -661,16 +668,16 @@ as> for _inet in $inetList ; do as> # get rid of extraneous line as> case $_inet in as> - "") break ;; as> - inet\ *) ;; as> - *) continue ;; as> + "") break ;; as> + \ inet\ *|inet\ *) ;; as> + *) continue ;; as> esac as> [ -z "$_inet" ] && break Sorry for the delay getting back to you. Can you try the attached patch? It includes some other fixes but I think adding \t to tr(1) should be enough to solve the problem. -- Hiroki ----Next_Part(Thu_Sep__5_05_19_41_2013_886)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="network.subr.20130905-1.diff" Index: etc/network.subr =================================================================== --- etc/network.subr (revision 254465) +++ etc/network.subr (working copy) @@ -654,7 +654,7 @@ ifalias ${_if} inet -alias && _ret=0 - inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet ' | tr "\n" "$_ifs"`" + inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet ' | tr "\n\t" "$_ifs"`" oldifs="$IFS" IFS="$_ifs" @@ -661,11 +661,9 @@ for _inet in $inetList ; do # get rid of extraneous line case $_inet in - "") break ;; inet\ *) ;; *) continue ;; esac - [ -z "$_inet" ] && break _inet=`expr "$_inet" : '.*\(inet \([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\).*'` @@ -696,13 +694,16 @@ ipv6_prefix_hostid_addr_common ${_if} -alias && _ret=0 ifalias ${_if} inet6 -alias && _ret=0 - inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet6 ' | tr "\n" "$_ifs"`" + inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet6 ' | tr "\n\t" "$_ifs"`" oldifs="$IFS" IFS="$_ifs" for _inet6 in $inetList ; do # get rid of extraneous line - [ -z "$_inet6" ] && break + case $_inet in + inet6\ *) ;; + *) continue ;; + esac _inet6=`expr "$_inet6" : '.*\(inet6 \([0-9a-f:]*\)\).*'` ----Next_Part(Thu_Sep__5_05_19_41_2013_886)---- ----Security_Multipart0(Thu_Sep__5_05_19_41_2013_357)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlInld0ACgkQTyzT2CeTzy2zhgCfdR7QTcGQLIVQbY/1ppAt10Xf 6qoAn3TCX+dLv4j4EWXHAR98tt5cjeq9 =qXbL -----END PGP SIGNATURE----- ----Security_Multipart0(Thu_Sep__5_05_19_41_2013_357)---- From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 20:34:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AE5BD84E; Wed, 4 Sep 2013 20:34:37 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C5D4237A; Wed, 4 Sep 2013 20:34:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84KYbZc036425; Wed, 4 Sep 2013 20:34:37 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84KYaEW036419; Wed, 4 Sep 2013 20:34:36 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201309042034.r84KYaEW036419@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Wed, 4 Sep 2013 20:34:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255212 - in head/sys: dev/gxemul/cons dev/gxemul/disk dev/gxemul/ether mips/conf mips/gxemul X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 20:34:37 -0000 Author: gonzo Date: Wed Sep 4 20:34:36 2013 New Revision: 255212 URL: http://svnweb.freebsd.org/changeset/base/255212 Log: Add 32-bit support for Gxemul's oldtestmips machine emulation Original work by: kan@ Added: head/sys/mips/conf/GXEMUL32 (contents, props changed) Modified: head/sys/dev/gxemul/cons/gxemul_cons.c head/sys/dev/gxemul/disk/gxemul_disk.c head/sys/dev/gxemul/disk/gxemul_diskreg.h head/sys/dev/gxemul/ether/gxreg.h head/sys/mips/gxemul/mpreg.h Modified: head/sys/dev/gxemul/cons/gxemul_cons.c ============================================================================== --- head/sys/dev/gxemul/cons/gxemul_cons.c Wed Sep 4 20:12:33 2013 (r255211) +++ head/sys/dev/gxemul/cons/gxemul_cons.c Wed Sep 4 20:34:36 2013 (r255212) @@ -99,18 +99,16 @@ static void gxemul_cons_timeout(void *) * XXXRW: Should be using FreeBSD's bus routines here, but they are not * available until later in the boot. */ -typedef uint64_t paddr_t; -typedef uint64_t vaddr_t; -static inline vaddr_t -mips_phys_to_uncached(paddr_t phys) +static inline vm_offset_t +mips_phys_to_uncached(vm_paddr_t phys) { return (MIPS_PHYS_TO_DIRECT_UNCACHED(phys)); } static inline uint8_t -mips_ioread_uint8(vaddr_t vaddr) +mips_ioread_uint8(vm_offset_t vaddr) { uint8_t v; @@ -119,7 +117,7 @@ mips_ioread_uint8(vaddr_t vaddr) } static inline void -mips_iowrite_uint8(vaddr_t vaddr, uint8_t v) +mips_iowrite_uint8(vm_offset_t vaddr, uint8_t v) { __asm__ __volatile__ ("sb %0, 0(%1)" : : "r" (v), "r" (vaddr)); Modified: head/sys/dev/gxemul/disk/gxemul_disk.c ============================================================================== --- head/sys/dev/gxemul/disk/gxemul_disk.c Wed Sep 4 20:12:33 2013 (r255211) +++ head/sys/dev/gxemul/disk/gxemul_disk.c Wed Sep 4 20:34:36 2013 (r255212) @@ -214,7 +214,14 @@ gxemul_disk_read(unsigned diskid, void * if (off < 0 || off % GXEMUL_DISK_DEV_BLOCKSIZE != 0) return (EINVAL); +#ifdef _LP64 GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_OFFSET, (uint64_t)off); +#else + GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_OFFSET_LO, + (uint32_t)(off & 0xffffffff)); + GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_OFFSET_HI, + (uint32_t)((off >> 32) & 0xffffffff)); +#endif GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_DISKID, diskid); GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_START, GXEMUL_DISK_DEV_START_READ); switch (GXEMUL_DISK_DEV_READ(GXEMUL_DISK_DEV_STATUS)) { @@ -280,7 +287,15 @@ gxemul_disk_write(unsigned diskid, const if (off < 0 || off % GXEMUL_DISK_DEV_BLOCKSIZE != 0) return (EINVAL); +#ifdef _LP64 GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_OFFSET, (uint64_t)off); +#else + GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_OFFSET_LO, + (uint32_t)(off & 0xffffffff)); + GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_OFFSET_HI, + (uint32_t)((off >> 32) & 0xffffffff)); +#endif + GXEMUL_DISK_DEV_WRITE(GXEMUL_DISK_DEV_DISKID, diskid); dst = GXEMUL_DISK_DEV_FUNCTION(GXEMUL_DISK_DEV_BLOCK); Modified: head/sys/dev/gxemul/disk/gxemul_diskreg.h ============================================================================== --- head/sys/dev/gxemul/disk/gxemul_diskreg.h Wed Sep 4 20:12:33 2013 (r255211) +++ head/sys/dev/gxemul/disk/gxemul_diskreg.h Wed Sep 4 20:34:36 2013 (r255212) @@ -36,16 +36,28 @@ #define GXEMUL_DISK_DEV_ID_START (0x0000) #define GXEMUL_DISK_DEV_ID_END (0x0100) -#define GXEMUL_DISK_DEV_OFFSET (0x0000) +#ifdef _LP64 +#define GXEMUL_DISK_DEV_OFFSET (0x0000) +#else +#define GXEMUL_DISK_DEV_OFFSET_LO (0x0000) +#define GXEMUL_DISK_DEV_OFFSET_HI (0x0008) +#endif #define GXEMUL_DISK_DEV_DISKID (0x0010) #define GXEMUL_DISK_DEV_START (0x0020) #define GXEMUL_DISK_DEV_STATUS (0x0030) #define GXEMUL_DISK_DEV_BLOCK (0x4000) +#ifdef _LP64 #define GXEMUL_DISK_DEV_FUNCTION(f) \ (volatile uint64_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_DISK_DEV_BASE + (f)) #define GXEMUL_DISK_DEV_READ(f) \ (volatile uint64_t)*GXEMUL_DISK_DEV_FUNCTION(f) +#else +#define GXEMUL_DISK_DEV_FUNCTION(f) \ + (volatile uint32_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_DISK_DEV_BASE + (f)) +#define GXEMUL_DISK_DEV_READ(f) \ + (volatile uint32_t)*GXEMUL_DISK_DEV_FUNCTION(f) +#endif #define GXEMUL_DISK_DEV_WRITE(f, v) \ *GXEMUL_DISK_DEV_FUNCTION(f) = (v) Modified: head/sys/dev/gxemul/ether/gxreg.h ============================================================================== --- head/sys/dev/gxemul/ether/gxreg.h Wed Sep 4 20:12:33 2013 (r255211) +++ head/sys/dev/gxemul/ether/gxreg.h Wed Sep 4 20:34:36 2013 (r255212) @@ -40,10 +40,17 @@ #define GXEMUL_ETHER_DEV_COMMAND (0x4020) #define GXEMUL_ETHER_DEV_MAC (0x4040) +#ifdef _LP64 #define GXEMUL_ETHER_DEV_FUNCTION(f) \ (volatile uint64_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_ETHER_DEV_BASE + (f)) #define GXEMUL_ETHER_DEV_READ(f) \ (volatile uint64_t)*GXEMUL_ETHER_DEV_FUNCTION(f) +#else +#define GXEMUL_ETHER_DEV_FUNCTION(f) \ + (volatile uint32_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_ETHER_DEV_BASE + (f)) +#define GXEMUL_ETHER_DEV_READ(f) \ + (volatile uint32_t)*GXEMUL_ETHER_DEV_FUNCTION(f) +#endif #define GXEMUL_ETHER_DEV_WRITE(f, v) \ *GXEMUL_ETHER_DEV_FUNCTION(f) = (v) Added: head/sys/mips/conf/GXEMUL32 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/GXEMUL32 Wed Sep 4 20:34:36 2013 (r255212) @@ -0,0 +1,61 @@ +# +# GXEMUL "oldtestmips" sample kernel configuration. +# +# $FreeBSD$ +# + +ident GXEMUL + +machine mips mips +cpu CPU_MIPS4KC + +options HZ=100 + +makeoptions KERNLOADADDR=0x80100000 + +include "../gxemul/std.gxemul" + +hints "GXEMUL.hints" #Default places to look for devices. + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + +makeoptions MODULES_OVERRIDE="" + +options DDB +options KDB + +# Make an SMP-capable kernel by default +options SMP # Symmetric MultiProcessor Kernel + +options SCHED_ULE +options INET # InterNETworking +options INET6 # IPv6 communications protocols + +options FFS #Berkeley Fast Filesystem + +# Debugging for use in -current +#options DEADLKRES #Enable the deadlock resolver +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed + +options ROOTDEVNAME=\"ufs:gxemul_disk0\" + +device gxemul_cons +device gxemul_disk +device gxemul_ether + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device tun # Packet tunnel. +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device faith # IPv6-to-IPv4 relaying (translation) + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter Modified: head/sys/mips/gxemul/mpreg.h ============================================================================== --- head/sys/mips/gxemul/mpreg.h Wed Sep 4 20:12:33 2013 (r255211) +++ head/sys/mips/gxemul/mpreg.h Wed Sep 4 20:34:36 2013 (r255212) @@ -43,10 +43,17 @@ #define GXEMUL_MP_DEV_IPI_READ 0x00c0 #define GXEMUL_MP_DEV_CYCLES 0x00d0 +#ifdef _LP64 #define GXEMUL_MP_DEV_FUNCTION(f) \ (volatile uint64_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_MP_DEV_BASE + (f)) #define GXEMUL_MP_DEV_READ(f) \ (volatile uint64_t)*GXEMUL_MP_DEV_FUNCTION(f) +#else +#define GXEMUL_MP_DEV_FUNCTION(f) \ + (volatile uint32_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_MP_DEV_BASE + (f)) +#define GXEMUL_MP_DEV_READ(f) \ + (volatile uint32_t)*GXEMUL_MP_DEV_FUNCTION(f) +#endif #define GXEMUL_MP_DEV_WRITE(f, v) \ *GXEMUL_MP_DEV_FUNCTION(f) = (v) From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 20:49:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 38C08CCE; Wed, 4 Sep 2013 20:49:33 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 26971243E; Wed, 4 Sep 2013 20:49:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84KnXUn044124; Wed, 4 Sep 2013 20:49:33 GMT (envelope-from zbb@svn.freebsd.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84KnX3P044121; Wed, 4 Sep 2013 20:49:33 GMT (envelope-from zbb@svn.freebsd.org) Message-Id: <201309042049.r84KnX3P044121@svn.freebsd.org> From: Zbigniew Bodek Date: Wed, 4 Sep 2013 20:49:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255213 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 20:49:33 -0000 Author: zbb Date: Wed Sep 4 20:49:32 2013 New Revision: 255213 URL: http://svnweb.freebsd.org/changeset/base/255213 Log: Add myself as a new committer and cognet as my mentor. Approved by: cognet (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Sep 4 20:34:36 2013 (r255212) +++ head/share/misc/committers-src.dot Wed Sep 4 20:49:32 2013 (r255213) @@ -290,6 +290,7 @@ wkoszek [label="Wojciech A. Koszek\nwkos wollman [label="Garrett Wollman\nwollman@FreeBSD.org\n????/??/??"] wsalamon [label="Wayne Salamon\nwsalamon@FreeBSD.org\n2005/06/25"] yongari [label="Pyun YongHyeon\nyongari@FreeBSD.org\n2004/08/01"] +zbb [label="Zbigniew Bodek\nzbb@FreeBSD.org\n2013/09/02"] zec [label="Marko Zec\nzec@FreeBSD.org\n2008/06/22"] zml [label="Zachary Loafman\nzml@FreeBSD.org\n2009/05/27"] zont [label="Andrey Zonov\nzont@FreeBSD.org\n2012/08/21"] @@ -354,6 +355,7 @@ cognet -> jceel cognet -> kevlo cognet -> ian cognet -> wkoszek +cognet -> zbb cperciva -> eadler cperciva -> flz From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 22:10:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2494D80C; Wed, 4 Sep 2013 22:10:18 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1190A29ED; Wed, 4 Sep 2013 22:10:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84MAHpm091448; Wed, 4 Sep 2013 22:10:17 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84MAHXh091439; Wed, 4 Sep 2013 22:10:17 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309042210.r84MAHXh091439@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 4 Sep 2013 22:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255215 - in head: bin/sh tools/regression/bin/sh/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 22:10:18 -0000 Author: jilles Date: Wed Sep 4 22:10:16 2013 New Revision: 255215 URL: http://svnweb.freebsd.org/changeset/base/255215 Log: sh: Make return return from the closest function or dot script. Formerly, return always returned from a function if it was called from a function, even if there was a closer dot script. This was for compatibility with the Bourne shell which only allowed returning from functions. Other modern shells and POSIX return from the function or the dot script, whichever is closest. Git 1.8.4's rebase --continue depends on the POSIX behaviour. Reported by: Christoph Mallon, avg Added: head/tools/regression/bin/sh/builtins/return8.0 (contents, props changed) Modified: head/bin/sh/eval.c head/bin/sh/eval.h head/bin/sh/main.c head/bin/sh/sh.1 Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Wed Sep 4 20:55:56 2013 (r255214) +++ head/bin/sh/eval.c Wed Sep 4 22:10:16 2013 (r255215) @@ -324,7 +324,7 @@ skipping: if (evalskip == SKIPCONT && } if (evalskip == SKIPBREAK && --skipcount <= 0) evalskip = 0; - if (evalskip == SKIPFUNC || evalskip == SKIPFILE) + if (evalskip == SKIPRETURN) status = exitstatus; break; } @@ -1068,7 +1068,7 @@ evalcommand(union node *cmd, int flags, funcnest--; popredir(); INTON; - if (evalskip == SKIPFUNC) { + if (evalskip == SKIPRETURN) { evalskip = 0; skipcount = 0; } @@ -1305,14 +1305,8 @@ returncmd(int argc, char **argv) { int ret = argc > 1 ? number(argv[1]) : oexitstatus; - if (funcnest) { - evalskip = SKIPFUNC; - skipcount = 1; - } else { - /* skip the rest of the file */ - evalskip = SKIPFILE; - skipcount = 1; - } + evalskip = SKIPRETURN; + skipcount = 1; return ret; } Modified: head/bin/sh/eval.h ============================================================================== --- head/bin/sh/eval.h Wed Sep 4 20:55:56 2013 (r255214) +++ head/bin/sh/eval.h Wed Sep 4 22:10:16 2013 (r255215) @@ -67,5 +67,4 @@ extern int skipcount; /* reasons for skipping commands (see comment on breakcmd routine) */ #define SKIPBREAK 1 #define SKIPCONT 2 -#define SKIPFUNC 3 -#define SKIPFILE 4 +#define SKIPRETURN 3 Modified: head/bin/sh/main.c ============================================================================== --- head/bin/sh/main.c Wed Sep 4 20:55:56 2013 (r255214) +++ head/bin/sh/main.c Wed Sep 4 22:10:16 2013 (r255215) @@ -231,7 +231,7 @@ cmdloop(int top) popstackmark(&smark); setstackmark(&smark); if (evalskip != 0) { - if (evalskip == SKIPFILE) + if (evalskip == SKIPRETURN) evalskip = 0; break; } Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Wed Sep 4 20:55:56 2013 (r255214) +++ head/bin/sh/sh.1 Wed Sep 4 22:10:16 2013 (r255215) @@ -1145,8 +1145,10 @@ command is .Pp .D1 Ic return Op Ar exitstatus .Pp -It terminates the current executional scope, returning from the previous -nested function, sourced script, or shell instance, in that order. +It terminates the current executional scope, returning from the closest +nested function or sourced script; +if no function or sourced script is being executed, +it exits the shell instance. The .Ic return command is implemented as a special built-in command. Added: head/tools/regression/bin/sh/builtins/return8.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/return8.0 Wed Sep 4 22:10:16 2013 (r255215) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +if [ "$1" = nested ]; then + return 17 +fi + +f() { + set -- nested + . "$0" + return $(($? ^ 1)) +} +f +exit $(($? ^ 16)) From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 22:47:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 171F9301; Wed, 4 Sep 2013 22:47:57 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 038142C54; Wed, 4 Sep 2013 22:47:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84MluAE013646; Wed, 4 Sep 2013 22:47:56 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84Mluxv013645; Wed, 4 Sep 2013 22:47:56 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201309042247.r84Mluxv013645@svn.freebsd.org> From: Rick Macklem Date: Wed, 4 Sep 2013 22:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255216 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 22:47:57 -0000 Author: rmacklem Date: Wed Sep 4 22:47:56 2013 New Revision: 255216 URL: http://svnweb.freebsd.org/changeset/base/255216 Log: Crashes have been observed for NFSv4.1 mounts when the system is being shut down which were caused by the nfscbd_pool being destroyed before the backchannel is disabled. This patch is believed to fix the problem, by simply avoiding ever destroying the nfscbd_pool. Since the NFS client module cannot be unloaded, this should not cause a memory leak. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clkrpc.c Modified: head/sys/fs/nfsclient/nfs_clkrpc.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clkrpc.c Wed Sep 4 22:10:16 2013 (r255215) +++ head/sys/fs/nfsclient/nfs_clkrpc.c Wed Sep 4 22:47:56 2013 (r255216) @@ -278,17 +278,15 @@ nfsrvd_cbinit(int terminating) while (nfs_numnfscbd > 0) msleep(&nfs_numnfscbd, NFSDLOCKMUTEXPTR, PZERO, "nfscbdt", 0); - NFSD_UNLOCK(); - svcpool_destroy(nfscbd_pool); - nfscbd_pool = NULL; - } else - NFSD_UNLOCK(); + } - nfscbd_pool = svcpool_create("nfscbd", NULL); - nfscbd_pool->sp_rcache = NULL; - nfscbd_pool->sp_assign = NULL; - nfscbd_pool->sp_done = NULL; - - NFSD_LOCK(); + if (nfscbd_pool == NULL) { + NFSD_UNLOCK(); + nfscbd_pool = svcpool_create("nfscbd", NULL); + nfscbd_pool->sp_rcache = NULL; + nfscbd_pool->sp_assign = NULL; + nfscbd_pool->sp_done = NULL; + NFSD_LOCK(); + } } From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 23:31:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 41EB8132; Wed, 4 Sep 2013 23:31:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 156582F91; Wed, 4 Sep 2013 23:31:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84NVUpo040312; Wed, 4 Sep 2013 23:31:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84NVThi040302; Wed, 4 Sep 2013 23:31:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309042331.r84NVThi040302@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 4 Sep 2013 23:31:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255217 - in head/sys/amd64: amd64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 23:31:31 -0000 Author: kib Date: Wed Sep 4 23:31:29 2013 New Revision: 255217 URL: http://svnweb.freebsd.org/changeset/base/255217 Log: Tidy up some loose ends in the PCID code: - Restore the pre-PCID TLB shootdown handlers for whole address space and single page invalidation asm code, and assign the IPI handler to them when PCID is not supported or disabled. Old handlers have linear control flow. But, still use the common return sequence. - Stop using pcpu for INVPCID descriptors in the invlrg handler. It is enough to allocate descriptors on the stack. As result, two SWAPGS instructions are shaved off from the code for Haswell+. - Fix the reverted condition in invlrng for checking of the PCID support [1], also in invlrng check that pmap is kernel pmap before performing other tests. For the kernel pmap, which provides global mappings, the INVLPG must be used for invalidation always. - Save the pre-computed pmap' %CR3 register in the struct pmap. This allows to remove several checks for pm_pcid validity when %CR3 is reloaded [2]. Noted by: gibbs [1] Discussed with: alc [2] Tested by: pho, flo Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/apic_vector.S head/sys/amd64/amd64/genassym.c head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/amd64/pmap.c head/sys/amd64/amd64/vm_machdep.c head/sys/amd64/include/pcpu.h head/sys/amd64/include/pmap.h head/sys/amd64/include/smp.h Modified: head/sys/amd64/amd64/apic_vector.S ============================================================================== --- head/sys/amd64/amd64/apic_vector.S Wed Sep 4 22:47:56 2013 (r255216) +++ head/sys/amd64/amd64/apic_vector.S Wed Sep 4 23:31:29 2013 (r255217) @@ -168,7 +168,7 @@ global_invltlb: invltlb_ret_clear_pm_save: movq smp_tlb_pmap,%rdx testq %rdx,%rdx - jz invltlb_ret + jz invltlb_ret_rdx testb $SEL_RPL_MASK,NAKE_INTR_CS(%rsp) jz 1f swapgs @@ -179,16 +179,17 @@ invltlb_ret_clear_pm_save: 2: LK btcl %eax,PM_SAVE(%rdx) SUPERALIGN_TEXT -invltlb_ret: +invltlb_ret_rdx: + popq %rdx +invltlb_ret_rax: movq lapic, %rax movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ LK incl smp_tlb_wait - popq %rdx popq %rax jmp doreti_iret SUPERALIGN_TEXT -IDTVEC(invltlb) +IDTVEC(invltlb_pcid) #if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) PUSH_FRAME movl PCPU(CPUID), %eax @@ -206,8 +207,6 @@ IDTVEC(invltlb) pushq %rdx movq %cr3,%rax - cmpl $0,pmap_pcid_enabled - je 2f movq $smp_tlb_invpcid,%rdx cmpl $0,(%rdx) @@ -216,8 +215,7 @@ IDTVEC(invltlb) je global_invltlb /* - * Non-zero smp_tlb_invpcid, only invalidate TLB for entries with - * current PCID. + * Only invalidate TLB for entries with current PCID. */ cmpl $0,invpcid_works je 1f @@ -233,21 +231,36 @@ IDTVEC(invltlb) je 2f movq %rdx,%cr3 /* Invalidate, bit 63 is zero. */ btsq $63,%rax - - /* - * Invalidate the TLB if PCID is not enabled. - * Restore the old address space. - */ 2: movq %rax,%cr3 jmp invltlb_ret_clear_pm_save + SUPERALIGN_TEXT +IDTVEC(invltlb) +#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) + PUSH_FRAME + movl PCPU(CPUID), %eax +#ifdef COUNT_XINVLTLB_HITS + incl xhits_gbl(,%rax,4) +#endif +#ifdef COUNT_IPIS + movq ipi_invltlb_counts(,%rax,8),%rax + incq (%rax) +#endif + POP_FRAME +#endif + + pushq %rax + movq %cr3, %rax /* invalidate the TLB */ + movq %rax, %cr3 + jmp invltlb_ret_rax + /* * Single page TLB shootdown */ .text SUPERALIGN_TEXT -IDTVEC(invlpg) +IDTVEC(invlpg_pcid) #if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) PUSH_FRAME movl PCPU(CPUID), %eax @@ -264,8 +277,6 @@ IDTVEC(invlpg) pushq %rax pushq %rdx movq $smp_tlb_invpcid,%rdx - cmpl $0,pmap_pcid_enabled - je 3f cmpl $0,invpcid_works jne 2f @@ -291,7 +302,7 @@ IDTVEC(invlpg) btsq $63,%rcx movq %rcx,%cr3 popq %rcx - jmp invltlb_ret + jmp invltlb_ret_rdx /* * Invalidate the TLB entry using INVPCID_ADDR. @@ -300,7 +311,7 @@ IDTVEC(invlpg) xorl %eax,%eax /* invpcid (%rdx),%rax */ .byte 0x66,0x0f,0x38,0x82,0x02 - jmp invltlb_ret + jmp invltlb_ret_rdx /* * PCID is not supported or kernel pmap. @@ -309,7 +320,27 @@ IDTVEC(invlpg) 3: movq 8(%rdx),%rax invlpg (%rax) - jmp invltlb_ret + jmp invltlb_ret_rdx + + SUPERALIGN_TEXT +IDTVEC(invlpg) +#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) + PUSH_FRAME + movl PCPU(CPUID), %eax +#ifdef COUNT_XINVLTLB_HITS + incl xhits_pg(,%rax,4) +#endif +#ifdef COUNT_IPIS + movq ipi_invlpg_counts(,%rax,8),%rax + incq (%rax) +#endif + POP_FRAME +#endif + + pushq %rax + movq smp_tlb_invpcid+8,%rax + invlpg (%rax) /* invalidate single page */ + jmp invltlb_ret_rax /* * Page range TLB shootdown. @@ -334,15 +365,15 @@ IDTVEC(invlrng) pushq %rdx movq $smp_tlb_invpcid,%rdx cmpl $0,pmap_pcid_enabled - jne invlrng_single_page - cmpl $0,invpcid_works - jne invlrng_invpcid + je invlrng_single_page /* kernel pmap - use invlpg to invalidate global mapping */ cmpl $0,(%rdx) je invlrng_single_page cmpl $-1,(%rdx) je global_invltlb + cmpl $0,invpcid_works + jne invlrng_invpcid pushq %rcx movq %cr3,%rcx @@ -362,37 +393,27 @@ IDTVEC(invlrng) btsq $63,%rcx movq %rcx,%cr3 popq %rcx - jmp invltlb_ret + jmp invltlb_ret_rdx invlrng_invpcid: - testb $SEL_RPL_MASK,NAKE_INTR_CS(%rsp) - jz 1f - swapgs -1: pushq %rcx + subq $16,%rsp movq (%rdx),%rcx - movq %rcx,PCPU(INVPCID_DESCR) + movq %rcx,(%rsp) movq 8(%rdx),%rax - movq %rax,PCPU(INVPCID_DESCR)+8 + movq %rax,8(%rsp) movq smp_tlb_addr2,%rcx - xorl %eax,%eax - movq $PC_INVPCID_DESCR,%rdx - gs - subq 8(%rdx),%rcx + subq %rax,%rcx shrq $PAGE_SHIFT,%rcx -2: - gs +1: // invpcid (%rdx),%rax .byte 0x66,0x0f,0x38,0x82,0x02 - gs - addq $PAGE_SIZE,8(%rdx) + addq $PAGE_SIZE,8(%rsp) dec %rcx - jne 2b + jne 1b + addq $16,%rsp popq %rcx - testb $SEL_RPL_MASK,NAKE_INTR_CS(%rsp) - jz invltlb_ret - swapgs - jmp invltlb_ret + jmp invltlb_ret_rdx invlrng_single_page: movq 8(%rdx),%rdx @@ -401,7 +422,7 @@ invlrng_single_page: addq $PAGE_SIZE,%rdx cmpq %rax,%rdx jb 1b - jmp invltlb_ret + jmp invltlb_ret_rdx /* * Invalidate cache. @@ -418,9 +439,8 @@ IDTVEC(invlcache) #endif pushq %rax - pushq %rdx wbinvd - jmp invltlb_ret + jmp invltlb_ret_rax /* * Handler for IPIs sent via the per-cpu IPI bitmap. Modified: head/sys/amd64/amd64/genassym.c ============================================================================== --- head/sys/amd64/amd64/genassym.c Wed Sep 4 22:47:56 2013 (r255216) +++ head/sys/amd64/amd64/genassym.c Wed Sep 4 23:31:29 2013 (r255217) @@ -228,7 +228,6 @@ ASSYM(PC_LDT, offsetof(struct pcpu, pc_l ASSYM(PC_COMMONTSSP, offsetof(struct pcpu, pc_commontssp)); ASSYM(PC_TSS, offsetof(struct pcpu, pc_tss)); ASSYM(PC_PM_SAVE_CNT, offsetof(struct pcpu, pc_pm_save_cnt)); -ASSYM(PC_INVPCID_DESCR, offsetof(struct pcpu, pc_invpcid_descr)); ASSYM(LA_VER, offsetof(struct LAPIC, version)); ASSYM(LA_TPR, offsetof(struct LAPIC, tpr)); Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Wed Sep 4 22:47:56 2013 (r255216) +++ head/sys/amd64/amd64/mp_machdep.c Wed Sep 4 23:31:29 2013 (r255217) @@ -127,6 +127,8 @@ static u_long *ipi_hardclock_counts[MAXC extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); +extern int pmap_pcid_enabled; + /* * Local data and functions. */ @@ -524,8 +526,15 @@ cpu_mp_start(void) } /* Install an inter-CPU IPI for TLB invalidation */ - setidt(IPI_INVLTLB, IDTVEC(invltlb), SDT_SYSIGT, SEL_KPL, 0); - setidt(IPI_INVLPG, IDTVEC(invlpg), SDT_SYSIGT, SEL_KPL, 0); + if (pmap_pcid_enabled) { + setidt(IPI_INVLTLB, IDTVEC(invltlb_pcid), SDT_SYSIGT, + SEL_KPL, 0); + setidt(IPI_INVLPG, IDTVEC(invlpg_pcid), SDT_SYSIGT, + SEL_KPL, 0); + } else { + setidt(IPI_INVLTLB, IDTVEC(invltlb), SDT_SYSIGT, SEL_KPL, 0); + setidt(IPI_INVLPG, IDTVEC(invlpg), SDT_SYSIGT, SEL_KPL, 0); + } setidt(IPI_INVLRNG, IDTVEC(invlrng), SDT_SYSIGT, SEL_KPL, 0); /* Install an inter-CPU IPI for cache invalidation. */ @@ -605,8 +614,6 @@ cpu_mp_announce(void) } } -extern int pmap_pcid_enabled; - /* * AP CPU's call this to initialize themselves. */ @@ -1141,8 +1148,7 @@ smp_tlb_shootdown(u_int vector, pmap_t p smp_tlb_invpcid.pcid = 0; } else { smp_tlb_invpcid.pcid = pmap->pm_pcid; - pcid_cr3 = DMAP_TO_PHYS((vm_offset_t)pmap->pm_pml4) | - (pmap->pm_pcid == -1 ? 0 : pmap->pm_pcid); + pcid_cr3 = pmap->pm_cr3; } smp_tlb_addr2 = addr2; smp_tlb_pmap = pmap; @@ -1176,8 +1182,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask smp_tlb_invpcid.pcid = 0; } else { smp_tlb_invpcid.pcid = pmap->pm_pcid; - pcid_cr3 = DMAP_TO_PHYS((vm_offset_t)pmap->pm_pml4) | - (pmap->pm_pcid == -1 ? 0 : pmap->pm_pcid); + pcid_cr3 = pmap->pm_cr3; } smp_tlb_addr2 = addr2; smp_tlb_pmap = pmap; Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Sep 4 22:47:56 2013 (r255216) +++ head/sys/amd64/amd64/pmap.c Wed Sep 4 23:31:29 2013 (r255217) @@ -728,6 +728,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) */ PMAP_LOCK_INIT(kernel_pmap); kernel_pmap->pm_pml4 = (pdp_entry_t *)PHYS_TO_DMAP(KPML4phys); + kernel_pmap->pm_cr3 = KPML4phys; CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ CPU_ZERO(&kernel_pmap->pm_save); TAILQ_INIT(&kernel_pmap->pm_pvchunk); @@ -1049,8 +1050,7 @@ pmap_invalidate_page_pcid(pmap_t pmap, v cr3 = rcr3(); critical_enter(); - load_cr3(DMAP_TO_PHYS((vm_offset_t)pmap->pm_pml4) | pmap->pm_pcid | - CR3_PCID_SAVE); + load_cr3(pmap->pm_cr3 | CR3_PCID_SAVE); invlpg(va); load_cr3(cr3 | CR3_PCID_SAVE); critical_exit(); @@ -1137,8 +1137,7 @@ pmap_invalidate_range_pcid(pmap_t pmap, cr3 = rcr3(); critical_enter(); - load_cr3(DMAP_TO_PHYS((vm_offset_t)pmap->pm_pml4) | pmap->pm_pcid | - CR3_PCID_SAVE); + load_cr3(pmap->pm_cr3 | CR3_PCID_SAVE); for (addr = sva; addr < eva; addr += PAGE_SIZE) invlpg(addr); load_cr3(cr3 | CR3_PCID_SAVE); @@ -1239,8 +1238,7 @@ pmap_invalidate_all(pmap_t pmap) * Bit 63 is clear, pcid TLB * entries are invalidated. */ - load_cr3(DMAP_TO_PHYS((vm_offset_t) - pmap->pm_pml4) | pmap->pm_pcid); + load_cr3(pmap->pm_cr3); load_cr3(cr3 | CR3_PCID_SAVE); critical_exit(); } @@ -1862,6 +1860,7 @@ pmap_pinit0(pmap_t pmap) PMAP_LOCK_INIT(pmap); pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(KPML4phys); + pmap->pm_cr3 = KPML4phys; pmap->pm_root.rt_root = 0; CPU_ZERO(&pmap->pm_active); CPU_ZERO(&pmap->pm_save); @@ -1869,7 +1868,6 @@ pmap_pinit0(pmap_t pmap) TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); pmap->pm_pcid = pmap_pcid_enabled ? 0 : -1; - CPU_ZERO(&pmap->pm_save); } /* @@ -1889,7 +1887,8 @@ pmap_pinit(pmap_t pmap) VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) VM_WAIT; - pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pg)); + pmap->pm_cr3 = VM_PAGE_TO_PHYS(pml4pg); + pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(pmap->pm_cr3); if ((pml4pg->flags & PG_ZERO) == 0) pagezero(pmap->pm_pml4); @@ -1911,7 +1910,13 @@ pmap_pinit(pmap_t pmap) CPU_ZERO(&pmap->pm_active); TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); - pmap->pm_pcid = pmap_pcid_enabled ? alloc_unr(&pcid_unr) : -1; + if (pmap_pcid_enabled) { + pmap->pm_pcid = alloc_unr(&pcid_unr); + if (pmap->pm_pcid != -1) + pmap->pm_cr3 |= pmap->pm_pcid; + } else { + pmap->pm_pcid = -1; + } CPU_ZERO(&pmap->pm_save); return (1); @@ -5936,7 +5941,6 @@ pmap_activate(struct thread *td) { pmap_t pmap, oldpmap; u_int cpuid; - u_int64_t cr3; critical_enter(); pmap = vmspace_pmap(td->td_proc->p_vmspace); @@ -5951,11 +5955,8 @@ pmap_activate(struct thread *td) CPU_SET(cpuid, &pmap->pm_active); CPU_SET(cpuid, &pmap->pm_save); #endif - cr3 = DMAP_TO_PHYS((vm_offset_t)pmap->pm_pml4); - if (pmap->pm_pcid != -1) - cr3 |= pmap->pm_pcid; - td->td_pcb->pcb_cr3 = cr3; - load_cr3(cr3); + td->td_pcb->pcb_cr3 = pmap->pm_cr3; + load_cr3(pmap->pm_cr3); PCPU_SET(curpmap, pmap); critical_exit(); } Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Wed Sep 4 22:47:56 2013 (r255216) +++ head/sys/amd64/amd64/vm_machdep.c Wed Sep 4 23:31:29 2013 (r255217) @@ -220,9 +220,7 @@ cpu_fork(td1, p2, td2, flags) * return address on stack. These are the kernel mode register values. */ pmap2 = vmspace_pmap(p2->p_vmspace); - pcb2->pcb_cr3 = DMAP_TO_PHYS((vm_offset_t)pmap2->pm_pml4); - if (pmap2->pm_pcid != -1) - pcb2->pcb_cr3 |= pmap2->pm_pcid; + pcb2->pcb_cr3 = pmap2->pm_cr3; pcb2->pcb_r12 = (register_t)fork_return; /* fork_trampoline argument */ pcb2->pcb_rbp = 0; pcb2->pcb_rsp = (register_t)td2->td_frame - sizeof(void *); Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Wed Sep 4 22:47:56 2013 (r255216) +++ head/sys/amd64/include/pcpu.h Wed Sep 4 23:31:29 2013 (r255217) @@ -68,7 +68,6 @@ /* Pointer to the CPU TSS descriptor */ \ struct system_segment_descriptor *pc_tss; \ uint64_t pc_pm_save_cnt; \ - char pc_invpcid_descr[16]; \ u_int pc_cmci_mask; /* MCx banks for CMCI */ \ uint64_t pc_dbreg[16]; /* ddb debugging regs */ \ int pc_dbreg_cmd; /* ddb debugging reg cmd */ \ Modified: head/sys/amd64/include/pmap.h ============================================================================== --- head/sys/amd64/include/pmap.h Wed Sep 4 22:47:56 2013 (r255216) +++ head/sys/amd64/include/pmap.h Wed Sep 4 23:31:29 2013 (r255217) @@ -238,6 +238,7 @@ struct md_page { struct pmap { struct mtx pm_mtx; pml4_entry_t *pm_pml4; /* KVA of level 4 page table */ + uint64_t pm_cr3; TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */ cpuset_t pm_active; /* active on cpus */ cpuset_t pm_save; /* Context valid on cpus mask */ Modified: head/sys/amd64/include/smp.h ============================================================================== --- head/sys/amd64/include/smp.h Wed Sep 4 22:47:56 2013 (r255216) +++ head/sys/amd64/include/smp.h Wed Sep 4 23:31:29 2013 (r255217) @@ -45,7 +45,9 @@ extern u_long *ipi_rendezvous_counts[MAX /* IPI handlers */ inthand_t + IDTVEC(invltlb_pcid), /* TLB shootdowns - global, pcid enabled */ IDTVEC(invltlb), /* TLB shootdowns - global */ + IDTVEC(invlpg_pcid), /* TLB shootdowns - 1 page, pcid enabled */ IDTVEC(invlpg), /* TLB shootdowns - 1 page */ IDTVEC(invlrng), /* TLB shootdowns - page range */ IDTVEC(invlcache), /* Write back and invalidate cache */ From owner-svn-src-head@FreeBSD.ORG Wed Sep 4 23:32:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 07B402A6; Wed, 4 Sep 2013 23:32:50 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CFF052FB2; Wed, 4 Sep 2013 23:32:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r84NWnCZ040723; Wed, 4 Sep 2013 23:32:49 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r84NWndg040721; Wed, 4 Sep 2013 23:32:49 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201309042332.r84NWndg040721@svn.freebsd.org> From: "Justin T. Gibbs" Date: Wed, 4 Sep 2013 23:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255218 - head/sys/dev/xen/blkback X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 23:32:50 -0000 Author: gibbs Date: Wed Sep 4 23:32:49 2013 New Revision: 255218 URL: http://svnweb.freebsd.org/changeset/base/255218 Log: Correct blkback handling of the BLKIF_OP_FLUSH_DISKCACHE opcode. Properly round-trip the "operation code" for client requests. sys/dev/xen/blkback/blkback.c: In xbb_dispatch_dev() when processing a flush request, correctly set bio->bio_caller1 to the request list (not bare request) for the operation, as is expected by the completion handler xbb_bio_done(). In xbb_get_resources(), initialize "operation" in the driver's internal request object from the client's "ring request", so it is correct when used to populate the reply when this operation completes. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Modified: head/sys/dev/xen/blkback/blkback.c Modified: head/sys/dev/xen/blkback/blkback.c ============================================================================== --- head/sys/dev/xen/blkback/blkback.c Wed Sep 4 23:31:29 2013 (r255217) +++ head/sys/dev/xen/blkback/blkback.c Wed Sep 4 23:32:49 2013 (r255218) @@ -230,7 +230,7 @@ struct xbb_xen_reqlist { int num_children; /** - * Number of I/O requests dispatched to the backend. + * Number of I/O requests still pending on the backend. */ int pendcnt; @@ -327,13 +327,6 @@ struct xbb_xen_req { int nr_512b_sectors; /** - * The number of struct bio requests still outstanding for this - * request on the backend device. This field is only used for - * device (rather than file) backed I/O. - */ - int pendcnt; - - /** * BLKIF_OP code for this request. */ int operation; @@ -1240,6 +1233,7 @@ xbb_get_resources(struct xbb_softc *xbb, nreq->reqlist = *reqlist; nreq->req_ring_idx = ring_idx; nreq->id = ring_req->id; + nreq->operation = ring_req->operation; if (xbb->abi != BLKIF_PROTOCOL_NATIVE) { bcopy(ring_req, &nreq->ring_req_storage, sizeof(*ring_req)); @@ -2062,7 +2056,6 @@ xbb_dispatch_dev(struct xbb_softc *xbb, { struct xbb_dev_data *dev_data; struct bio *bios[XBB_MAX_SEGMENTS_PER_REQLIST]; - struct xbb_xen_req *nreq; off_t bio_offset; struct bio *bio; struct xbb_sg *xbb_sg; @@ -2080,7 +2073,6 @@ xbb_dispatch_dev(struct xbb_softc *xbb, bio_idx = 0; if (operation == BIO_FLUSH) { - nreq = STAILQ_FIRST(&reqlist->contig_req_list); bio = g_new_bio(); if (__predict_false(bio == NULL)) { DPRINTF("Unable to allocate bio for BIO_FLUSH\n"); @@ -2094,10 +2086,10 @@ xbb_dispatch_dev(struct xbb_softc *xbb, bio->bio_offset = 0; bio->bio_data = 0; bio->bio_done = xbb_bio_done; - bio->bio_caller1 = nreq; + bio->bio_caller1 = reqlist; bio->bio_pblkno = 0; - nreq->pendcnt = 1; + reqlist->pendcnt = 1; SDT_PROBE1(xbb, kernel, xbb_dispatch_dev, flush, device_get_unit(xbb->dev)); From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 00:10:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5C3DDC3D; Thu, 5 Sep 2013 00:10:02 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4771F2373; Thu, 5 Sep 2013 00:10:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r850A24N061593; Thu, 5 Sep 2013 00:10:02 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8509vsE061271; Thu, 5 Sep 2013 00:09:57 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309050009.r8509vsE061271@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Sep 2013 00:09:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255219 - in head: contrib/tcpdump lib/libc lib/libc/capability lib/libc/include lib/libc/sys lib/libprocstat sbin/dhclient sbin/hastd sys/amd64/linux32 sys/bsm sys/cddl/compat/opensola... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 00:10:02 -0000 Author: pjd Date: Thu Sep 5 00:09:56 2013 New Revision: 255219 URL: http://svnweb.freebsd.org/changeset/base/255219 Log: Change the cap_rights_t type from uint64_t to a structure that we can extend in the future in a backward compatible (API and ABI) way. The cap_rights_t represents capability rights. We used to use one bit to represent one right, but we are running out of spare bits. Currently the new structure provides place for 114 rights (so 50 more than the previous cap_rights_t), but it is possible to grow the structure to hold at least 285 rights, although we can make it even larger if 285 rights won't be enough. The structure definition looks like this: struct cap_rights { uint64_t cr_rights[CAP_RIGHTS_VERSION + 2]; }; The initial CAP_RIGHTS_VERSION is 0. The top two bits in the first element of the cr_rights[] array contain total number of elements in the array - 2. This means if those two bits are equal to 0, we have 2 array elements. The top two bits in all remaining array elements should be 0. The next five bits in all array elements contain array index. Only one bit is used and bit position in this five-bits range defines array index. This means there can be at most five array elements in the future. To define new right the CAPRIGHT() macro must be used. The macro takes two arguments - an array index and a bit to set, eg. #define CAP_PDKILL CAPRIGHT(1, 0x0000000000000800ULL) We still support aliases that combine few rights, but the rights have to belong to the same array element, eg: #define CAP_LOOKUP CAPRIGHT(0, 0x0000000000000400ULL) #define CAP_FCHMOD CAPRIGHT(0, 0x0000000000002000ULL) #define CAP_FCHMODAT (CAP_FCHMOD | CAP_LOOKUP) There is new API to manage the new cap_rights_t structure: cap_rights_t *cap_rights_init(cap_rights_t *rights, ...); void cap_rights_set(cap_rights_t *rights, ...); void cap_rights_clear(cap_rights_t *rights, ...); bool cap_rights_is_set(const cap_rights_t *rights, ...); bool cap_rights_is_valid(const cap_rights_t *rights); void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little); Capability rights to the cap_rights_init(), cap_rights_set(), cap_rights_clear() and cap_rights_is_set() functions are provided by separating them with commas, eg: cap_rights_t rights; cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT); There is no need to terminate the list of rights, as those functions are actually macros that take care of the termination, eg: #define cap_rights_set(rights, ...) \ __cap_rights_set((rights), __VA_ARGS__, 0ULL) void __cap_rights_set(cap_rights_t *rights, ...); Thanks to using one bit as an array index we can assert in those functions that there are no two rights belonging to different array elements provided together. For example this is illegal and will be detected, because CAP_LOOKUP belongs to element 0 and CAP_PDKILL to element 1: cap_rights_init(&rights, CAP_LOOKUP | CAP_PDKILL); Providing several rights that belongs to the same array's element this way is correct, but is not advised. It should only be used for aliases definition. This commit also breaks compatibility with some existing Capsicum system calls, but I see no other way to do that. This should be fine as Capsicum is still experimental and this change is not going to 9.x. Sponsored by: The FreeBSD Foundation Added: head/lib/libc/capability/ head/lib/libc/capability/Makefile.inc (contents, props changed) head/lib/libc/capability/Symbol.map (contents, props changed) head/sys/kern/subr_capability.c (contents, props changed) head/sys/sys/caprights.h (contents, props changed) Modified: head/contrib/tcpdump/tcpdump.c head/lib/libc/Makefile head/lib/libc/include/compat.h head/lib/libc/sys/Symbol.map head/lib/libprocstat/libprocstat.c head/lib/libprocstat/libprocstat.h head/sbin/dhclient/bpf.c head/sbin/dhclient/dhclient.c head/sbin/hastd/subr.c head/sys/amd64/linux32/linux32_machdep.c head/sys/bsm/audit_kevents.h head/sys/bsm/audit_record.h head/sys/cddl/compat/opensolaris/sys/file.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c head/sys/compat/freebsd32/freebsd32_capability.c head/sys/compat/freebsd32/freebsd32_ioctl.c head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/freebsd32/syscalls.master head/sys/compat/linux/linux_file.c head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_socket.c head/sys/compat/svr4/svr4_fcntl.c head/sys/compat/svr4/svr4_filio.c head/sys/compat/svr4/svr4_ioctl.c head/sys/compat/svr4/svr4_misc.c head/sys/compat/svr4/svr4_stream.c head/sys/conf/files head/sys/dev/aac/aac_linux.c head/sys/dev/amr/amr_linux.c head/sys/dev/filemon/filemon.c head/sys/dev/hwpmc/hwpmc_logging.c head/sys/dev/ipmi/ipmi_linux.c head/sys/dev/iscsi_initiator/iscsi.c head/sys/dev/mfi/mfi_linux.c head/sys/dev/tdfx/tdfx_linux.c head/sys/fs/fdescfs/fdesc_vnops.c head/sys/fs/fuse/fuse_vfsops.c head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/i386/ibcs2/ibcs2_fcntl.c head/sys/i386/ibcs2/ibcs2_ioctl.c head/sys/i386/ibcs2/ibcs2_misc.c head/sys/i386/linux/linux_machdep.c head/sys/kern/capabilities.conf head/sys/kern/kern_descrip.c head/sys/kern/kern_event.c head/sys/kern/kern_exec.c head/sys/kern/kern_ktrace.c head/sys/kern/kern_sig.c head/sys/kern/sys_capability.c head/sys/kern/sys_generic.c head/sys/kern/sys_procdesc.c head/sys/kern/syscalls.master head/sys/kern/tty.c head/sys/kern/uipc_mqueue.c head/sys/kern/uipc_sem.c head/sys/kern/uipc_syscalls.c head/sys/kern/uipc_usrreq.c head/sys/kern/vfs_acl.c head/sys/kern/vfs_aio.c head/sys/kern/vfs_extattr.c head/sys/kern/vfs_lookup.c head/sys/kern/vfs_syscalls.c head/sys/netsmb/smb_dev.c head/sys/nfsserver/nfs_srvkrpc.c head/sys/security/audit/audit.h head/sys/security/audit/audit_arg.c head/sys/security/audit/audit_bsm.c head/sys/security/audit/audit_private.h head/sys/security/audit/bsm_token.c head/sys/security/mac/mac_syscalls.c head/sys/sys/_types.h head/sys/sys/capability.h head/sys/sys/file.h head/sys/sys/filedesc.h head/sys/sys/ktrace.h head/sys/sys/namei.h head/sys/sys/procdesc.h head/sys/sys/types.h head/sys/sys/user.h head/sys/ufs/ffs/ffs_alloc.c head/sys/vm/vm_mmap.c head/usr.bin/kdump/kdump.c head/usr.bin/kdump/mksubr head/usr.bin/procstat/procstat_files.c head/usr.bin/rwho/rwho.c head/usr.bin/uniq/uniq.c head/usr.sbin/rwhod/rwhod.c Modified: head/contrib/tcpdump/tcpdump.c ============================================================================== --- head/contrib/tcpdump/tcpdump.c Wed Sep 4 23:32:49 2013 (r255218) +++ head/contrib/tcpdump/tcpdump.c Thu Sep 5 00:09:56 2013 (r255219) @@ -715,8 +715,9 @@ main(int argc, char **argv) int status; FILE *VFile; #ifdef __FreeBSD__ + cap_rights_t rights; int cansandbox; -#endif +#endif /* __FreeBSD__ */ #ifdef WIN32 if(wsockinit() != 0) return 1; @@ -1206,7 +1207,8 @@ main(int argc, char **argv) if (pd == NULL) error("%s", ebuf); #ifdef __FreeBSD__ - if (cap_rights_limit(fileno(pcap_file(pd)), CAP_READ) < 0 && + cap_rights_init(&rights, CAP_READ); + if (cap_rights_limit(fileno(pcap_file(pd)), &rights) < 0 && errno != ENOSYS) { error("unable to limit pcap descriptor"); } @@ -1484,8 +1486,9 @@ main(int argc, char **argv) if (RFileName == NULL && VFileName == NULL) { static const unsigned long cmds[] = { BIOCGSTATS }; - if (cap_rights_limit(pcap_fileno(pd), - CAP_IOCTL | CAP_READ) < 0 && errno != ENOSYS) { + cap_rights_init(&rights, CAP_IOCTL, CAP_READ); + if (cap_rights_limit(pcap_fileno(pd), &rights) < 0 && + errno != ENOSYS) { error("unable to limit pcap descriptor"); } if (cap_ioctls_limit(pcap_fileno(pd), cmds, @@ -1516,8 +1519,9 @@ main(int argc, char **argv) if (p == NULL) error("%s", pcap_geterr(pd)); #ifdef __FreeBSD__ - if (cap_rights_limit(fileno(pcap_dump_file(p)), - CAP_SEEK | CAP_WRITE) < 0 && errno != ENOSYS) { + cap_rights_init(&rights, CAP_SEEK, CAP_WRITE); + if (cap_rights_limit(fileno(pcap_dump_file(p)), &rights) < 0 && + errno != ENOSYS) { error("unable to limit dump descriptor"); } #endif @@ -1530,9 +1534,10 @@ main(int argc, char **argv) error("unable to open directory %s", dirname(WFileName)); } - if (cap_rights_limit(dumpinfo.dirfd, CAP_CREATE | - CAP_FCNTL | CAP_FTRUNCATE | CAP_LOOKUP | CAP_SEEK | - CAP_WRITE) < 0 && errno != ENOSYS) { + cap_rights_init(&rights, CAP_CREATE, CAP_FCNTL, + CAP_FTRUNCATE, CAP_LOOKUP, CAP_SEEK, CAP_WRITE); + if (cap_rights_limit(dumpinfo.dirfd, &rights) < 0 && + errno != ENOSYS) { error("unable to limit directory rights"); } #else /* !__FreeBSD__ */ @@ -1615,7 +1620,7 @@ main(int argc, char **argv) error("unable to enter the capability mode"); if (cap_sandboxed()) fprintf(stderr, "capability mode sandbox enabled\n"); -#endif +#endif /* __FreeBSD__ */ do { status = pcap_loop(pd, cnt, callback, pcap_userdata); @@ -1657,8 +1662,9 @@ main(int argc, char **argv) if (pd == NULL) error("%s", ebuf); #ifdef __FreeBSD__ + cap_rights_init(&rights, CAP_READ); if (cap_rights_limit(fileno(pcap_file(pd)), - CAP_READ) < 0 && errno != ENOSYS) { + &rights) < 0 && errno != ENOSYS) { error("unable to limit pcap descriptor"); } #endif @@ -1830,6 +1836,9 @@ static void dump_packet_and_trunc(u_char *user, const struct pcap_pkthdr *h, const u_char *sp) { struct dump_info *dump_info; +#ifdef __FreeBSD__ + cap_rights_t rights; +#endif ++packets_captured; @@ -1933,8 +1942,9 @@ dump_packet_and_trunc(u_char *user, cons if (dump_info->p == NULL) error("%s", pcap_geterr(pd)); #ifdef __FreeBSD__ + cap_rights_init(&rights, CAP_SEEK, CAP_WRITE); if (cap_rights_limit(fileno(pcap_dump_file(dump_info->p)), - CAP_SEEK | CAP_WRITE) < 0 && errno != ENOSYS) { + &rights) < 0 && errno != ENOSYS) { error("unable to limit dump descriptor"); } #endif @@ -1993,8 +2003,9 @@ dump_packet_and_trunc(u_char *user, cons if (dump_info->p == NULL) error("%s", pcap_geterr(pd)); #ifdef __FreeBSD__ + cap_rights_init(&rights, CAP_SEEK, CAP_WRITE); if (cap_rights_limit(fileno(pcap_dump_file(dump_info->p)), - CAP_SEEK | CAP_WRITE) < 0 && errno != ENOSYS) { + &rights) < 0 && errno != ENOSYS) { error("unable to limit dump descriptor"); } #endif Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Wed Sep 4 23:32:49 2013 (r255218) +++ head/lib/libc/Makefile Thu Sep 5 00:09:56 2013 (r255219) @@ -100,6 +100,7 @@ NOASM= CFLAGS+= -DYP .include "${.CURDIR}/yp/Makefile.inc" .endif +.include "${.CURDIR}/capability/Makefile.inc" .if ${MK_HESIOD} != "no" CFLAGS+= -DHESIOD .endif Added: head/lib/libc/capability/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/capability/Makefile.inc Thu Sep 5 00:09:56 2013 (r255219) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +# capability sources +.PATH: ${.CURDIR}/../../sys/kern + +SRCS+= subr_capability.c + +SYM_MAPS+= ${.CURDIR}/capability/Symbol.map + +#MAN+= cap_rights_init.3 + +#MLINKS+=cap_rights_init.3 cap_rights_set.3 +#MLINKS+=cap_rights_init.3 cap_rights_clear.3 +#MLINKS+=cap_rights_init.3 cap_rights_is_set.3 +#MLINKS+=cap_rights_init.3 cap_rights_is_valid.3 +#MLINKS+=cap_rights_init.3 cap_rights_merge.3 +#MLINKS+=cap_rights_init.3 cap_rights_remove.3 +#MLINKS+=cap_rights_init.3 cap_rights_contains.3 + Added: head/lib/libc/capability/Symbol.map ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/capability/Symbol.map Thu Sep 5 00:09:56 2013 (r255219) @@ -0,0 +1,14 @@ +/* + * $FreeBSD$ + */ + +FBSD_1.3 { + __cap_rights_clear; + cap_rights_contains; + __cap_rights_init; + __cap_rights_is_set; + cap_rights_is_valid; + cap_rights_merge; + cap_rights_remove; + __cap_rights_set; +}; Modified: head/lib/libc/include/compat.h ============================================================================== --- head/lib/libc/include/compat.h Wed Sep 4 23:32:49 2013 (r255218) +++ head/lib/libc/include/compat.h Thu Sep 5 00:09:56 2013 (r255219) @@ -42,8 +42,6 @@ __sym_compat(__semctl, freebsd7___semctl __sym_compat(msgctl, freebsd7_msgctl, FBSD_1.0); __sym_compat(shmctl, freebsd7_shmctl, FBSD_1.0); -__sym_compat(cap_getrights, cap_rights_get, FBSD_1.2); - #undef __sym_compat #endif /* __LIBC_COMPAT_H__ */ Modified: head/lib/libc/sys/Symbol.map ============================================================================== --- head/lib/libc/sys/Symbol.map Wed Sep 4 23:32:49 2013 (r255218) +++ head/lib/libc/sys/Symbol.map Thu Sep 5 00:09:56 2013 (r255219) @@ -363,7 +363,6 @@ FBSD_1.1 { FBSD_1.2 { cap_enter; cap_getmode; - cap_new; getloginclass; pdfork; pdgetpid; @@ -385,7 +384,7 @@ FBSD_1.3 { cap_fcntls_limit; cap_ioctls_get; cap_ioctls_limit; - cap_rights_get; + __cap_rights_get; cap_rights_limit; cap_sandboxed; chflagsat; Modified: head/lib/libprocstat/libprocstat.c ============================================================================== --- head/lib/libprocstat/libprocstat.c Wed Sep 4 23:32:49 2013 (r255218) +++ head/lib/libprocstat/libprocstat.c Thu Sep 5 00:09:56 2013 (r255219) @@ -378,7 +378,7 @@ procstat_freefiles(struct procstat *proc static struct filestat * filestat_new_entry(void *typedep, int type, int fd, int fflags, int uflags, - int refcount, off_t offset, char *path, cap_rights_t cap_rights) + int refcount, off_t offset, char *path, cap_rights_t *cap_rightsp) { struct filestat *entry; @@ -395,7 +395,7 @@ filestat_new_entry(void *typedep, int ty entry->fs_ref_count = refcount; entry->fs_offset = offset; entry->fs_path = path; - entry->fs_cap_rights = cap_rights; + entry->fs_cap_rights = *cap_rightsp; return (entry); } @@ -851,7 +851,7 @@ procstat_getfiles_sysctl(struct procstat * Create filestat entry. */ entry = filestat_new_entry(kif, type, fd, fflags, uflags, - refcount, offset, path, cap_rights); + refcount, offset, path, &cap_rights); if (entry != NULL) STAILQ_INSERT_TAIL(head, entry, next); } Modified: head/lib/libprocstat/libprocstat.h ============================================================================== --- head/lib/libprocstat/libprocstat.h Wed Sep 4 23:32:49 2013 (r255218) +++ head/lib/libprocstat/libprocstat.h Thu Sep 5 00:09:56 2013 (r255219) @@ -36,6 +36,7 @@ #ifndef ZFS #include #endif +#include /* * Vnode types. Modified: head/sbin/dhclient/bpf.c ============================================================================== --- head/sbin/dhclient/bpf.c Wed Sep 4 23:32:49 2013 (r255218) +++ head/sbin/dhclient/bpf.c Thu Sep 5 00:09:56 2013 (r255219) @@ -43,6 +43,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include "dhcpd.h" #include "privsep.h" #include @@ -132,6 +134,7 @@ int dhcp_bpf_wfilter_len = sizeof(dhcp_b void if_register_send(struct interface_info *info) { + cap_rights_t rights; struct bpf_version v; struct bpf_program p; int sock, on = 1; @@ -160,7 +163,8 @@ if_register_send(struct interface_info * if (ioctl(info->wfdesc, BIOCLOCK, NULL) < 0) error("Cannot lock bpf"); - if (cap_rights_limit(info->wfdesc, CAP_WRITE) < 0 && errno != ENOSYS) + cap_rights_init(&rights, CAP_WRITE); + if (cap_rights_limit(info->wfdesc, &rights) < 0 && errno != ENOSYS) error("Can't limit bpf descriptor: %m"); /* @@ -213,6 +217,7 @@ void if_register_receive(struct interface_info *info) { static const unsigned long cmds[2] = { SIOCGIFFLAGS, SIOCGIFMEDIA }; + cap_rights_t rights; struct bpf_version v; struct bpf_program p; int flag = 1, sz; @@ -264,10 +269,9 @@ if_register_receive(struct interface_inf if (ioctl(info->rfdesc, BIOCLOCK, NULL) < 0) error("Cannot lock bpf"); - if (cap_rights_limit(info->rfdesc, - CAP_IOCTL | CAP_POLL_EVENT | CAP_READ) < 0 && errno != ENOSYS) { + cap_rights_init(&rights, CAP_IOCTL, CAP_POLL_EVENT, CAP_READ); + if (cap_rights_limit(info->rfdesc, &rights) < 0 && errno != ENOSYS) error("Can't limit bpf descriptor: %m"); - } if (cap_ioctls_limit(info->rfdesc, cmds, 2) < 0 && errno != ENOSYS) error("Can't limit ioctls for bpf descriptor: %m"); } Modified: head/sbin/dhclient/dhclient.c ============================================================================== --- head/sbin/dhclient/dhclient.c Wed Sep 4 23:32:49 2013 (r255218) +++ head/sbin/dhclient/dhclient.c Thu Sep 5 00:09:56 2013 (r255219) @@ -56,6 +56,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include "dhcpd.h" #include "privsep.h" @@ -346,6 +348,7 @@ main(int argc, char *argv[]) int immediate_daemon = 0; struct passwd *pw; pid_t otherpid; + cap_rights_t rights; /* Initially, log errors to stderr as well as to syslogd. */ openlog(__progname, LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); @@ -477,10 +480,9 @@ main(int argc, char *argv[]) close(pipe_fd[0]); privfd = pipe_fd[1]; - if (cap_rights_limit(privfd, CAP_READ | CAP_WRITE) < 0 && - errno != ENOSYS) { + cap_rights_init(&rights, CAP_READ, CAP_WRITE); + if (cap_rights_limit(privfd, &rights) < 0 && errno != ENOSYS) error("can't limit private descriptor: %m"); - } if ((fd = open(path_dhclient_db, O_RDONLY|O_EXLOCK|O_CREAT, 0)) == -1) error("can't open and lock %s: %m", path_dhclient_db); @@ -492,10 +494,9 @@ main(int argc, char *argv[]) add_protocol("AF_ROUTE", routefd, routehandler, ifi); if (shutdown(routefd, SHUT_WR) < 0) error("can't shutdown route socket: %m"); - if (cap_rights_limit(routefd, CAP_POLL_EVENT | CAP_READ) < 0 && - errno != ENOSYS) { + cap_rights_init(&rights, CAP_POLL_EVENT, CAP_READ); + if (cap_rights_limit(routefd, &rights) < 0 && errno != ENOSYS) error("can't limit route socket: %m"); - } if (chroot(_PATH_VAREMPTY) == -1) error("chroot"); @@ -1840,13 +1841,15 @@ void rewrite_client_leases(void) { struct client_lease *lp; + cap_rights_t rights; if (!leaseFile) { leaseFile = fopen(path_dhclient_db, "w"); if (!leaseFile) error("can't create %s: %m", path_dhclient_db); - if (cap_rights_limit(fileno(leaseFile), CAP_FSTAT | CAP_FSYNC | - CAP_FTRUNCATE | CAP_SEEK | CAP_WRITE) < 0 && + cap_rights_init(&rights, CAP_FSTAT, CAP_FSYNC, CAP_FTRUNCATE, + CAP_SEEK, CAP_WRITE); + if (cap_rights_limit(fileno(leaseFile), &rights) < 0 && errno != ENOSYS) { error("can't limit lease descriptor: %m"); } @@ -2354,6 +2357,7 @@ void go_daemon(void) { static int state = 0; + cap_rights_t rights; if (no_daemon || state) return; @@ -2366,9 +2370,11 @@ go_daemon(void) if (daemon(1, 0) == -1) error("daemon"); + cap_rights_init(&rights); + if (pidfile != NULL) { pidfile_write(pidfile); - if (cap_rights_limit(pidfile_fileno(pidfile), CAP_NONE) < 0 && + if (cap_rights_limit(pidfile_fileno(pidfile), &rights) < 0 && errno != ENOSYS) { error("can't limit pidfile descriptor: %m"); } @@ -2383,11 +2389,12 @@ go_daemon(void) nullfd = -1; } - if (cap_rights_limit(STDIN_FILENO, CAP_NONE) < 0 && errno != ENOSYS) + if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS) error("can't limit stdin: %m"); - if (cap_rights_limit(STDOUT_FILENO, CAP_WRITE) < 0 && errno != ENOSYS) + cap_rights_init(&rights, CAP_WRITE); + if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) error("can't limit stdout: %m"); - if (cap_rights_limit(STDERR_FILENO, CAP_WRITE) < 0 && errno != ENOSYS) + if (cap_rights_limit(STDERR_FILENO, &rights) < 0 && errno != ENOSYS) error("can't limit stderr: %m"); } Modified: head/sbin/hastd/subr.c ============================================================================== --- head/sbin/hastd/subr.c Wed Sep 4 23:32:49 2013 (r255218) +++ head/sbin/hastd/subr.c Thu Sep 5 00:09:56 2013 (r255219) @@ -231,6 +231,7 @@ drop_privs(const struct hast_resource *r pjdlog_common(LOG_DEBUG, 1, errno, "Unable to sandbox using capsicum"); } else if (res != NULL) { + cap_rights_t rights; static const unsigned long geomcmds[] = { DIOCGDELETE, DIOCGFLUSH @@ -239,8 +240,9 @@ drop_privs(const struct hast_resource *r PJDLOG_ASSERT(res->hr_role == HAST_ROLE_PRIMARY || res->hr_role == HAST_ROLE_SECONDARY); - if (cap_rights_limit(res->hr_localfd, - CAP_FLOCK | CAP_IOCTL | CAP_PREAD | CAP_PWRITE) == -1) { + cap_rights_init(&rights, CAP_FLOCK, CAP_IOCTL, CAP_PREAD, + CAP_PWRITE); + if (cap_rights_limit(res->hr_localfd, &rights) == -1) { pjdlog_errno(LOG_ERR, "Unable to limit capability rights on local descriptor"); } @@ -258,7 +260,8 @@ drop_privs(const struct hast_resource *r G_GATE_CMD_DESTROY }; - if (cap_rights_limit(res->hr_ggatefd, CAP_IOCTL) == -1) { + cap_rights_init(&rights, CAP_IOCTL); + if (cap_rights_limit(res->hr_ggatefd, &rights) == -1) { pjdlog_errno(LOG_ERR, "Unable to limit capability rights to CAP_IOCTL on ggate descriptor"); } Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Wed Sep 4 23:32:49 2013 (r255218) +++ head/sys/amd64/linux32/linux32_machdep.c Thu Sep 5 00:09:56 2013 (r255219) @@ -519,6 +519,7 @@ linux_mmap_common(struct thread *td, l_u } */ bsd_args; int error; struct file *fp; + cap_rights_t rights; error = 0; bsd_args.flags = 0; @@ -567,7 +568,9 @@ linux_mmap_common(struct thread *td, l_u * protection options specified. */ - if ((error = fget(td, bsd_args.fd, CAP_MMAP, &fp)) != 0) + error = fget(td, bsd_args.fd, + cap_rights_init(&rights, CAP_MMAP), &fp); + if (error != 0) return (error); if (fp->f_type != DTYPE_VNODE) { fdrop(fp, td); Modified: head/sys/bsm/audit_kevents.h ============================================================================== --- head/sys/bsm/audit_kevents.h Wed Sep 4 23:32:49 2013 (r255218) +++ head/sys/bsm/audit_kevents.h Thu Sep 5 00:09:56 2013 (r255219) @@ -589,6 +589,7 @@ #define AUE_POSIX_OPENPT 43185 /* FreeBSD. */ #define AUE_CAP_NEW 43186 /* TrustedBSD. */ #define AUE_CAP_RIGHTS_GET 43187 /* TrustedBSD. */ +#define AUE_CAP_GETRIGHTS AUE_CAP_RIGHTS_GET #define AUE_CAP_ENTER 43188 /* TrustedBSD. */ #define AUE_CAP_GETMODE 43189 /* TrustedBSD. */ #define AUE_POSIX_SPAWN 43190 /* Darwin. */ Modified: head/sys/bsm/audit_record.h ============================================================================== --- head/sys/bsm/audit_record.h Wed Sep 4 23:32:49 2013 (r255218) +++ head/sys/bsm/audit_record.h Thu Sep 5 00:09:56 2013 (r255219) @@ -34,6 +34,7 @@ #define _BSM_AUDIT_RECORD_H_ #include /* struct timeval */ +#include /* cap_rights_t */ /* * Token type identifiers. @@ -126,6 +127,8 @@ #define AUT_SOCKINET128 0x81 /* XXX */ #define AUT_SOCKUNIX 0x82 /* XXX */ +#define AUT_RIGHTS 0x83 + /* print values for the arbitrary token */ #define AUP_BINARY 0 #define AUP_OCTAL 1 @@ -248,6 +251,7 @@ token_t *au_to_process32_ex(au_id_t auid au_tid_addr_t *tid); token_t *au_to_process64_ex(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, gid_t rgid, pid_t pid, au_asid_t sid, au_tid_addr_t *tid); +token_t *au_to_rights(cap_rights_t *rightsp); token_t *au_to_return(char status, uint32_t ret); token_t *au_to_return32(char status, uint32_t ret); token_t *au_to_return64(char status, uint64_t ret); Modified: head/sys/cddl/compat/opensolaris/sys/file.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/file.h Wed Sep 4 23:32:49 2013 (r255218) +++ head/sys/cddl/compat/opensolaris/sys/file.h Thu Sep 5 00:09:56 2013 (r255219) @@ -39,11 +39,11 @@ typedef struct file file_t; #include static __inline file_t * -getf(int fd, cap_rights_t rights) +getf(int fd, cap_rights_t *rightsp) { struct file *fp; - if (fget(curthread, fd, rights, &fp) == 0) + if (fget(curthread, fd, rightsp, &fp) == 0) return (fp); return (NULL); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Sep 4 23:32:49 2013 (r255218) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Sep 5 00:09:56 2013 (r255219) @@ -4005,6 +4005,7 @@ zfs_ioc_recv(zfs_cmd_t *zc) char *origin = NULL; char *tosnap; char tofs[ZFS_MAXNAMELEN]; + cap_rights_t rights; boolean_t first_recvd_props = B_FALSE; if (dataset_namecheck(zc->zc_value, NULL, NULL) != 0 || @@ -4022,7 +4023,7 @@ zfs_ioc_recv(zfs_cmd_t *zc) return (error); fd = zc->zc_cookie; - fp = getf(fd, CAP_PREAD); + fp = getf(fd, cap_rights_init(&rights, CAP_PREAD)); if (fp == NULL) { nvlist_free(props); return (SET_ERROR(EBADF)); @@ -4260,7 +4261,11 @@ zfs_ioc_send(zfs_cmd_t *zc) dsl_dataset_rele(tosnap, FTAG); dsl_pool_rele(dp, FTAG); } else { - file_t *fp = getf(zc->zc_cookie, CAP_WRITE); + file_t *fp; + cap_rights_t rights; + + fp = getf(zc->zc_cookie, + cap_rights_init(&rights, CAP_WRITE)); if (fp == NULL) return (SET_ERROR(EBADF)); @@ -4851,10 +4856,11 @@ static int zfs_ioc_diff(zfs_cmd_t *zc) { file_t *fp; + cap_rights_t rights; offset_t off; int error; - fp = getf(zc->zc_cookie, CAP_WRITE); + fp = getf(zc->zc_cookie, cap_rights_init(&rights, CAP_WRITE)); if (fp == NULL) return (SET_ERROR(EBADF)); @@ -5214,6 +5220,7 @@ zfs_ioc_unjail(zfs_cmd_t *zc) static int zfs_ioc_send_new(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl) { + cap_rights_t rights; int error; offset_t off; char *fromname = NULL; @@ -5225,7 +5232,7 @@ zfs_ioc_send_new(const char *snapname, n (void) nvlist_lookup_string(innvl, "fromsnap", &fromname); - file_t *fp = getf(fd, CAP_READ); + file_t *fp = getf(fd, cap_rights_init(&rights, CAP_READ)); if (fp == NULL) return (SET_ERROR(EBADF)); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Wed Sep 4 23:32:49 2013 (r255218) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Thu Sep 5 00:09:56 2013 (r255219) @@ -122,10 +122,11 @@ zfs_onexit_fd_hold(int fd, minor_t *mino { file_t *fp, *tmpfp; zfs_onexit_t *zo; + cap_rights_t rights; void *data; int error; - fp = getf(fd, CAP_NONE); + fp = getf(fd, cap_rights_init(&rights)); if (fp == NULL) return (SET_ERROR(EBADF)); Modified: head/sys/compat/freebsd32/freebsd32_capability.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_capability.c Wed Sep 4 23:32:49 2013 (r255218) +++ head/sys/compat/freebsd32/freebsd32_capability.c Thu Sep 5 00:09:56 2013 (r255219) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #ifdef CAPABILITIES @@ -50,17 +49,6 @@ __FBSDID("$FreeBSD$"); MALLOC_DECLARE(M_FILECAPS); int -freebsd32_cap_rights_limit(struct thread *td, - struct freebsd32_cap_rights_limit_args *uap) -{ - struct cap_rights_limit_args ap; - - ap.fd = uap->fd; - ap.rights = PAIR32TO64(uint64_t, uap->rights); - return (sys_cap_rights_limit(td, &ap)); -} - -int freebsd32_cap_ioctls_limit(struct thread *td, struct freebsd32_cap_ioctls_limit_args *uap) { @@ -148,14 +136,6 @@ out: #else /* !CAPABILITIES */ int -freebsd32_cap_rights_limit(struct thread *td, - struct freebsd32_cap_rights_limit_args *uap) -{ - - return (ENOSYS); -} - -int freebsd32_cap_ioctls_limit(struct thread *td, struct freebsd32_cap_ioctls_limit_args *uap) { Modified: head/sys/compat/freebsd32/freebsd32_ioctl.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_ioctl.c Wed Sep 4 23:32:49 2013 (r255218) +++ head/sys/compat/freebsd32/freebsd32_ioctl.c Thu Sep 5 00:09:56 2013 (r255219) @@ -353,9 +353,11 @@ freebsd32_ioctl(struct thread *td, struc caddr_t data; }*/ ; struct file *fp; + cap_rights_t rights; int error; - if ((error = fget(td, uap->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, uap->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); if ((fp->f_flag & (FREAD | FWRITE)) == 0) { fdrop(fp, td); Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Wed Sep 4 23:32:49 2013 (r255218) +++ head/sys/compat/freebsd32/freebsd32_misc.c Thu Sep 5 00:09:56 2013 (r255219) @@ -1650,6 +1650,7 @@ freebsd32_do_sendfile(struct thread *td, struct uio *hdr_uio, *trl_uio; struct iovec32 *iov32; struct file *fp; + cap_rights_t rights; off_t offset; int error; @@ -1686,8 +1687,10 @@ freebsd32_do_sendfile(struct thread *td, AUDIT_ARG_FD(uap->fd); - if ((error = fget_read(td, uap->fd, CAP_PREAD, &fp)) != 0) + if ((error = fget_read(td, uap->fd, + cap_rights_init(&rights, CAP_PREAD), &fp)) != 0) { goto out; + } error = fo_sendfile(fp, uap->s, hdr_uio, trl_uio, offset, uap->nbytes, uap->sbytes, uap->flags, compat ? SFK_COMPAT : 0, td); Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Wed Sep 4 23:32:49 2013 (r255218) +++ head/sys/compat/freebsd32/syscalls.master Thu Sep 5 00:09:56 2013 (r255219) @@ -970,9 +970,9 @@ 512 AUE_SHMCTL NOSTD { int freebsd32_shmctl(int shmid, int cmd, \ struct shmid_ds32 *buf); } 513 AUE_LPATHCONF NOPROTO { int lpathconf(char *path, int name); } -514 AUE_CAP_NEW NOPROTO { int cap_new(int fd, uint64_t rights); } -515 AUE_CAP_RIGHTS_GET NOPROTO { int cap_rights_get(int fd, \ - uint64_t *rightsp); } +514 AUE_NULL OBSOL cap_new +515 AUE_CAP_RIGHTS_GET NOPROTO { int __cap_rights_get(int version, \ + int fd, cap_rights_t *rightsp); } 516 AUE_CAP_ENTER NOPROTO { int cap_enter(void); } 517 AUE_CAP_GETMODE NOPROTO { int cap_getmode(u_int *modep); } 518 AUE_PDFORK NOPROTO { int pdfork(int *fdp, int flags); } @@ -1016,10 +1016,6 @@ int *status, int options, \ struct wrusage32 *wrusage, \ siginfo_t *info); } -533 AUE_CAP_RIGHTS_LIMIT STD { \ - int freebsd32_cap_rights_limit(int fd, \ - int pad, \ - uint32_t rights1, uint32_t rights2); } #else 530 AUE_NULL STD { int freebsd32_posix_fallocate(int fd,\ uint32_t offset1, uint32_t offset2,\ @@ -1033,10 +1029,10 @@ int *status, int options, \ struct wrusage32 *wrusage, \ siginfo_t *info); } -533 AUE_CAP_RIGHTS_LIMIT STD { \ - int freebsd32_cap_rights_limit(int fd, \ - uint32_t rights1, uint32_t rights2); } #endif +533 AUE_CAP_RIGHTS_LIMIT NOPROTO { \ + int cap_rights_limit(int fd, \ + cap_rights_t *rightsp); } 534 AUE_CAP_IOCTLS_LIMIT STD { \ int freebsd32_cap_ioctls_limit(int fd, \ const uint32_t *cmds, size_t ncmds); } Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Wed Sep 4 23:32:49 2013 (r255218) +++ head/sys/compat/linux/linux_file.c Thu Sep 5 00:09:56 2013 (r255219) @@ -92,6 +92,7 @@ linux_creat(struct thread *td, struct li static int linux_common_open(struct thread *td, int dirfd, char *path, int l_flags, int mode) { + cap_rights_t rights; struct proc *p = td->td_proc; struct file *fp; int fd; @@ -143,7 +144,7 @@ linux_common_open(struct thread *td, int * having the same filedesc could use that fd without * checking below. */ - error = fget(td, fd, CAP_IOCTL, &fp); + error = fget(td, fd, cap_rights_init(&rights, CAP_IOCTL), &fp); if (!error) { sx_slock(&proctree_lock); PROC_LOCK(p); @@ -328,6 +329,7 @@ getdents_common(struct thread *td, struc caddr_t outp; /* Linux-format */ int resid, linuxreclen=0; /* Linux-format */ caddr_t lbuf; /* Linux-format */ + cap_rights_t rights; struct file *fp; struct uio auio; struct iovec aiov; @@ -348,7 +350,9 @@ getdents_common(struct thread *td, struc } else justone = 0; - if ((error = getvnode(td->td_proc->p_fd, args->fd, CAP_READ, &fp)) != 0) + error = getvnode(td->td_proc->p_fd, args->fd, + cap_rights_init(&rights, CAP_READ), &fp); + if (error != 0) return (error); if ((fp->f_flag & FREAD) == 0) { @@ -1024,6 +1028,7 @@ linux_pread(td, uap) struct linux_pread_args *uap; { struct pread_args bsd; + cap_rights_t rights; struct vnode *vp; int error; @@ -1036,7 +1041,9 @@ linux_pread(td, uap) if (error == 0) { /* This seems to violate POSIX but linux does it */ - if ((error = fgetvp(td, uap->fd, CAP_PREAD, &vp)) != 0) + error = fgetvp(td, uap->fd, + cap_rights_init(&rights, CAP_PREAD), &vp); + if (error != 0) return (error); if (vp->v_type == VDIR) { vrele(vp); @@ -1283,6 +1290,7 @@ fcntl_common(struct thread *td, struct l { struct l_flock linux_flock; struct flock bsd_flock; + cap_rights_t rights; struct file *fp; long arg; int error, result; @@ -1385,7 +1393,8 @@ fcntl_common(struct thread *td, struct l * significant effect for pipes (SIGIO is not delivered for * pipes under Linux-2.2.35 at least). */ - error = fget(td, args->fd, CAP_FCNTL, &fp); + error = fget(td, args->fd, + cap_rights_init(&rights, CAP_FCNTL), &fp); if (error) return (error); if (fp->f_type == DTYPE_PIPE) { Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Wed Sep 4 23:32:49 2013 (r255218) +++ head/sys/compat/linux/linux_ioctl.c Thu Sep 5 00:09:56 2013 (r255219) @@ -189,12 +189,14 @@ struct linux_hd_big_geometry { static int linux_ioctl_hdio(struct thread *td, struct linux_ioctl_args *args) { + cap_rights_t rights; struct file *fp; int error; u_int sectorsize, fwcylinders, fwheads, fwsectors; off_t mediasize, bytespercyl; - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); switch (args->cmd & 0xffff) { case LINUX_HDIO_GET_GEO: @@ -270,12 +272,14 @@ linux_ioctl_hdio(struct thread *td, stru static int linux_ioctl_disk(struct thread *td, struct linux_ioctl_args *args) { + cap_rights_t rights; struct file *fp; int error; u_int sectorsize; off_t mediasize; - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); switch (args->cmd & 0xffff) { case LINUX_BLKGETSIZE: @@ -698,10 +702,12 @@ linux_ioctl_termio(struct thread *td, st struct termios bios; struct linux_termios lios; struct linux_termio lio; + cap_rights_t rights; struct file *fp; int error; - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); switch (args->cmd & 0xffff) { @@ -1438,10 +1444,12 @@ bsd_to_linux_dvd_authinfo(struct dvd_aut static int linux_ioctl_cdrom(struct thread *td, struct linux_ioctl_args *args) { + cap_rights_t rights; struct file *fp; int error; - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); switch (args->cmd & 0xffff) { @@ -1963,10 +1971,12 @@ linux_ioctl_sound(struct thread *td, str static int linux_ioctl_console(struct thread *td, struct linux_ioctl_args *args) { + cap_rights_t rights; struct file *fp; int error; - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); switch (args->cmd & 0xffff) { @@ -2351,6 +2361,7 @@ static int linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args) { char lifname[LINUX_IFNAMSIZ], ifname[IFNAMSIZ]; + cap_rights_t rights; struct ifnet *ifp; struct file *fp; int error, type; @@ -2358,7 +2369,8 @@ linux_ioctl_socket(struct thread *td, st ifp = NULL; error = 0; - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); type = fp->f_type; fdrop(fp, td); @@ -2581,10 +2593,12 @@ linux_ioctl_socket(struct thread *td, st static int linux_ioctl_private(struct thread *td, struct linux_ioctl_args *args) { + cap_rights_t rights; struct file *fp; int error, type; - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); type = fp->f_type; fdrop(fp, td); @@ -2606,11 +2620,13 @@ linux_ioctl_drm(struct thread *td, struc static int linux_ioctl_sg(struct thread *td, struct linux_ioctl_args *args) { + cap_rights_t rights; struct file *fp; u_long cmd; int error; - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) { + error = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) { printf("sg_linux_ioctl: fget returned %d\n", error); return (error); } @@ -2828,6 +2844,7 @@ linux_v4l_cliplist_copy(struct l_video_w static int linux_ioctl_v4l(struct thread *td, struct linux_ioctl_args *args) { + cap_rights_t rights; struct file *fp; int error; struct video_tuner vtun; @@ -2845,7 +2862,9 @@ linux_ioctl_v4l(struct thread *td, struc case LINUX_VIDIOCSCHAN: args->cmd = VIDIOCSCHAN; break; case LINUX_VIDIOCGTUNER: - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, + cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); error = copyin((void *) args->arg, &l_vtun, sizeof(l_vtun)); if (error) { @@ -2863,7 +2882,9 @@ linux_ioctl_v4l(struct thread *td, struc return (error); case LINUX_VIDIOCSTUNER: - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, + cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); error = copyin((void *) args->arg, &l_vtun, sizeof(l_vtun)); if (error) { @@ -2880,7 +2901,9 @@ linux_ioctl_v4l(struct thread *td, struc case LINUX_VIDIOCCAPTURE: args->cmd = VIDIOCCAPTURE; break; case LINUX_VIDIOCGWIN: - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, + cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); error = fo_ioctl(fp, VIDIOCGWIN, &vwin, td->td_ucred, td); if (!error) { @@ -2892,7 +2915,9 @@ linux_ioctl_v4l(struct thread *td, struc return (error); case LINUX_VIDIOCSWIN: - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, + cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); error = copyin((void *) args->arg, &l_vwin, sizeof(l_vwin)); if (error) { @@ -2915,7 +2940,9 @@ linux_ioctl_v4l(struct thread *td, struc return (error); case LINUX_VIDIOCGFBUF: - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, + cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); error = fo_ioctl(fp, VIDIOCGFBUF, &vbuf, td->td_ucred, td); if (!error) { @@ -2927,7 +2954,9 @@ linux_ioctl_v4l(struct thread *td, struc return (error); case LINUX_VIDIOCSFBUF: - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, + cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); error = copyin((void *) args->arg, &l_vbuf, sizeof(l_vbuf)); if (error) { @@ -2955,7 +2984,9 @@ linux_ioctl_v4l(struct thread *td, struc case LINUX_VIDIOCGPLAYINFO: args->cmd = VIDIOCGPLAYINFO; break; case LINUX_VIDIOCSMICROCODE: - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, + cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error != 0) return (error); error = copyin((void *) args->arg, &l_vcode, sizeof(l_vcode)); if (error) { @@ -3108,6 +3139,7 @@ bsd_to_linux_v4l2_format(struct v4l2_for static int linux_ioctl_v4l2(struct thread *td, struct linux_ioctl_args *args) { + cap_rights_t rights; struct file *fp; int error; struct v4l2_format vformat; @@ -3199,7 +3231,9 @@ linux_ioctl_v4l2(struct thread *td, stru error = copyin((void *)args->arg, &l_vformat, sizeof(l_vformat)); if (error) return (error); - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, + cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error) return (error); if (linux_to_bsd_v4l2_format(&l_vformat, &vformat) != 0) error = EINVAL; @@ -3222,7 +3256,9 @@ linux_ioctl_v4l2(struct thread *td, stru if (error) return (error); linux_to_bsd_v4l2_standard(&l_vstd, &vstd); - if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0) + error = fget(td, args->fd, + cap_rights_init(&rights, CAP_IOCTL), &fp); + if (error) return (error); error = fo_ioctl(fp, VIDIOC_ENUMSTD, (caddr_t)&vstd, td->td_ucred, td); @@ -3244,7 +3280,9 @@ linux_ioctl_v4l2(struct thread *td, stru sizeof(struct l_v4l2_input)); if (error != 0) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 00:12:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 528C5DC8; Thu, 5 Sep 2013 00:12:02 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3FF8A23C8; Thu, 5 Sep 2013 00:12:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r850C20D064372; Thu, 5 Sep 2013 00:12:02 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r850C0H1064345; Thu, 5 Sep 2013 00:12:00 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309050012.r850C0H1064345@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Sep 2013 00:12:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255220 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 00:12:02 -0000 Author: pjd Date: Thu Sep 5 00:11:59 2013 New Revision: 255220 URL: http://svnweb.freebsd.org/changeset/base/255220 Log: Regenerate after r255219. Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Thu Sep 5 00:09:56 2013 (r255219) +++ head/sys/compat/freebsd32/freebsd32_proto.h Thu Sep 5 00:11:59 2013 (r255220) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 254491 2013-08-18 13:37:54Z pjd + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255219 2013-09-05 00:09:56Z pjd */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -627,12 +627,6 @@ struct freebsd32_wait6_args { char wrusage_l_[PADL_(struct wrusage32 *)]; struct wrusage32 * wrusage; char wrusage_r_[PADR_(struct wrusage32 *)]; char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; }; -struct freebsd32_cap_rights_limit_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; - char rights1_l_[PADL_(uint32_t)]; uint32_t rights1; char rights1_r_[PADR_(uint32_t)]; - char rights2_l_[PADL_(uint32_t)]; uint32_t rights2; char rights2_r_[PADR_(uint32_t)]; -}; #else struct freebsd32_posix_fallocate_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -658,11 +652,6 @@ struct freebsd32_wait6_args { char wrusage_l_[PADL_(struct wrusage32 *)]; struct wrusage32 * wrusage; char wrusage_r_[PADR_(struct wrusage32 *)]; char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; }; -struct freebsd32_cap_rights_limit_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char rights1_l_[PADL_(uint32_t)]; uint32_t rights1; char rights1_r_[PADR_(uint32_t)]; - char rights2_l_[PADL_(uint32_t)]; uint32_t rights2; char rights2_r_[PADR_(uint32_t)]; -}; #endif struct freebsd32_cap_ioctls_limit_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -795,12 +784,10 @@ int freebsd32_pselect(struct thread *, s int freebsd32_posix_fallocate(struct thread *, struct freebsd32_posix_fallocate_args *); int freebsd32_posix_fadvise(struct thread *, struct freebsd32_posix_fadvise_args *); int freebsd32_wait6(struct thread *, struct freebsd32_wait6_args *); -int freebsd32_cap_rights_limit(struct thread *, struct freebsd32_cap_rights_limit_args *); #else int freebsd32_posix_fallocate(struct thread *, struct freebsd32_posix_fallocate_args *); int freebsd32_posix_fadvise(struct thread *, struct freebsd32_posix_fadvise_args *); int freebsd32_wait6(struct thread *, struct freebsd32_wait6_args *); -int freebsd32_cap_rights_limit(struct thread *, struct freebsd32_cap_rights_limit_args *); #endif int freebsd32_cap_ioctls_limit(struct thread *, struct freebsd32_cap_ioctls_limit_args *); int freebsd32_cap_ioctls_get(struct thread *, struct freebsd32_cap_ioctls_get_args *); @@ -1199,11 +1186,9 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_posix_fadvise AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_wait6 AUE_WAIT6 -#define FREEBSD32_SYS_AUE_freebsd32_cap_rights_limit AUE_CAP_RIGHTS_LIMIT #define FREEBSD32_SYS_AUE_freebsd32_posix_fallocate AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_posix_fadvise AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_wait6 AUE_WAIT6 -#define FREEBSD32_SYS_AUE_freebsd32_cap_rights_limit AUE_CAP_RIGHTS_LIMIT #define FREEBSD32_SYS_AUE_freebsd32_cap_ioctls_limit AUE_CAP_IOCTLS_LIMIT #define FREEBSD32_SYS_AUE_freebsd32_cap_ioctls_get AUE_CAP_IOCTLS_GET #define FREEBSD32_SYS_AUE_freebsd32_aio_mlock AUE_NULL Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Thu Sep 5 00:09:56 2013 (r255219) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Thu Sep 5 00:11:59 2013 (r255220) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 254491 2013-08-18 13:37:54Z pjd + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255219 2013-09-05 00:09:56Z pjd */ #define FREEBSD32_SYS_syscall 0 @@ -420,8 +420,8 @@ #define FREEBSD32_SYS_freebsd32_msgctl 511 #define FREEBSD32_SYS_freebsd32_shmctl 512 #define FREEBSD32_SYS_lpathconf 513 -#define FREEBSD32_SYS_cap_new 514 -#define FREEBSD32_SYS_cap_rights_get 515 + /* 514 is obsolete cap_new */ +#define FREEBSD32_SYS___cap_rights_get 515 #define FREEBSD32_SYS_cap_enter 516 #define FREEBSD32_SYS_cap_getmode 517 #define FREEBSD32_SYS_pdfork 518 @@ -438,11 +438,10 @@ #define FREEBSD32_SYS_freebsd32_posix_fallocate 530 #define FREEBSD32_SYS_freebsd32_posix_fadvise 531 #define FREEBSD32_SYS_freebsd32_wait6 532 -#define FREEBSD32_SYS_freebsd32_cap_rights_limit 533 #define FREEBSD32_SYS_freebsd32_posix_fallocate 530 #define FREEBSD32_SYS_freebsd32_posix_fadvise 531 #define FREEBSD32_SYS_freebsd32_wait6 532 -#define FREEBSD32_SYS_freebsd32_cap_rights_limit 533 +#define FREEBSD32_SYS_cap_rights_limit 533 #define FREEBSD32_SYS_freebsd32_cap_ioctls_limit 534 #define FREEBSD32_SYS_freebsd32_cap_ioctls_get 535 #define FREEBSD32_SYS_cap_fcntls_limit 536 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Thu Sep 5 00:09:56 2013 (r255219) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Thu Sep 5 00:11:59 2013 (r255220) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 254491 2013-08-18 13:37:54Z pjd + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255219 2013-09-05 00:09:56Z pjd */ const char *freebsd32_syscallnames[] = { @@ -537,8 +537,8 @@ const char *freebsd32_syscallnames[] = { "freebsd32_msgctl", /* 511 = freebsd32_msgctl */ "freebsd32_shmctl", /* 512 = freebsd32_shmctl */ "lpathconf", /* 513 = lpathconf */ - "cap_new", /* 514 = cap_new */ - "cap_rights_get", /* 515 = cap_rights_get */ + "obs_cap_new", /* 514 = obsolete cap_new */ + "__cap_rights_get", /* 515 = __cap_rights_get */ "cap_enter", /* 516 = cap_enter */ "cap_getmode", /* 517 = cap_getmode */ "pdfork", /* 518 = pdfork */ @@ -557,13 +557,12 @@ const char *freebsd32_syscallnames[] = { "freebsd32_posix_fallocate", /* 530 = freebsd32_posix_fallocate */ "freebsd32_posix_fadvise", /* 531 = freebsd32_posix_fadvise */ "freebsd32_wait6", /* 532 = freebsd32_wait6 */ - "freebsd32_cap_rights_limit", /* 533 = freebsd32_cap_rights_limit */ #else "freebsd32_posix_fallocate", /* 530 = freebsd32_posix_fallocate */ "freebsd32_posix_fadvise", /* 531 = freebsd32_posix_fadvise */ "freebsd32_wait6", /* 532 = freebsd32_wait6 */ - "freebsd32_cap_rights_limit", /* 533 = freebsd32_cap_rights_limit */ #endif + "cap_rights_limit", /* 533 = cap_rights_limit */ "freebsd32_cap_ioctls_limit", /* 534 = freebsd32_cap_ioctls_limit */ "freebsd32_cap_ioctls_get", /* 535 = freebsd32_cap_ioctls_get */ "cap_fcntls_limit", /* 536 = cap_fcntls_limit */ Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Thu Sep 5 00:09:56 2013 (r255219) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Thu Sep 5 00:11:59 2013 (r255220) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 254491 2013-08-18 13:37:54Z pjd + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255219 2013-09-05 00:09:56Z pjd */ #include "opt_compat.h" @@ -574,8 +574,8 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_msgctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 511 = freebsd32_msgctl */ { AS(freebsd32_shmctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 512 = freebsd32_shmctl */ { AS(lpathconf_args), (sy_call_t *)sys_lpathconf, AUE_LPATHCONF, NULL, 0, 0, 0, SY_THR_STATIC }, /* 513 = lpathconf */ - { AS(cap_new_args), (sy_call_t *)sys_cap_new, AUE_CAP_NEW, NULL, 0, 0, 0, SY_THR_STATIC }, /* 514 = cap_new */ - { AS(cap_rights_get_args), (sy_call_t *)sys_cap_rights_get, AUE_CAP_RIGHTS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 515 = cap_rights_get */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 514 = obsolete cap_new */ + { AS(__cap_rights_get_args), (sy_call_t *)sys___cap_rights_get, AUE_CAP_RIGHTS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 515 = __cap_rights_get */ { 0, (sy_call_t *)sys_cap_enter, AUE_CAP_ENTER, NULL, 0, 0, 0, SY_THR_STATIC }, /* 516 = cap_enter */ { AS(cap_getmode_args), (sy_call_t *)sys_cap_getmode, AUE_CAP_GETMODE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 517 = cap_getmode */ { AS(pdfork_args), (sy_call_t *)sys_pdfork, AUE_PDFORK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 518 = pdfork */ @@ -594,13 +594,12 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_posix_fallocate_args), (sy_call_t *)freebsd32_posix_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */ { AS(freebsd32_posix_fadvise_args), (sy_call_t *)freebsd32_posix_fadvise, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */ { AS(freebsd32_wait6_args), (sy_call_t *)freebsd32_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 532 = freebsd32_wait6 */ - { AS(freebsd32_cap_rights_limit_args), (sy_call_t *)freebsd32_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 533 = freebsd32_cap_rights_limit */ #else { AS(freebsd32_posix_fallocate_args), (sy_call_t *)freebsd32_posix_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */ { AS(freebsd32_posix_fadvise_args), (sy_call_t *)freebsd32_posix_fadvise, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */ { AS(freebsd32_wait6_args), (sy_call_t *)freebsd32_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 532 = freebsd32_wait6 */ - { AS(freebsd32_cap_rights_limit_args), (sy_call_t *)freebsd32_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 533 = freebsd32_cap_rights_limit */ #endif + { AS(cap_rights_limit_args), (sy_call_t *)sys_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 533 = cap_rights_limit */ { AS(freebsd32_cap_ioctls_limit_args), (sy_call_t *)freebsd32_cap_ioctls_limit, AUE_CAP_IOCTLS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 534 = freebsd32_cap_ioctls_limit */ { AS(freebsd32_cap_ioctls_get_args), (sy_call_t *)freebsd32_cap_ioctls_get, AUE_CAP_IOCTLS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 535 = freebsd32_cap_ioctls_get */ { AS(cap_fcntls_limit_args), (sy_call_t *)sys_cap_fcntls_limit, AUE_CAP_FCNTLS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 536 = cap_fcntls_limit */ Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Thu Sep 5 00:09:56 2013 (r255219) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Thu Sep 5 00:11:59 2013 (r255220) @@ -2990,20 +2990,13 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } - /* cap_new */ - case 514: { - struct cap_new_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = p->rights; /* uint64_t */ - *n_args = 2; - break; - } - /* cap_rights_get */ + /* __cap_rights_get */ case 515: { - struct cap_rights_get_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->rightsp; /* uint64_t * */ - *n_args = 2; + struct __cap_rights_get_args *p = params; + iarg[0] = p->version; /* int */ + iarg[1] = p->fd; /* int */ + uarg[2] = (intptr_t) p->rightsp; /* cap_rights_t * */ + *n_args = 3; break; } /* cap_enter */ @@ -3159,16 +3152,6 @@ systrace_args(int sysnum, void *params, *n_args = 8; break; } - /* freebsd32_cap_rights_limit */ - case 533: { - struct freebsd32_cap_rights_limit_args *p = params; - iarg[0] = p->fd; /* int */ - iarg[1] = p->pad; /* int */ - uarg[2] = p->rights1; /* uint32_t */ - uarg[3] = p->rights2; /* uint32_t */ - *n_args = 4; - break; - } #else /* freebsd32_posix_fallocate */ case 530: { @@ -3206,16 +3189,15 @@ systrace_args(int sysnum, void *params, *n_args = 7; break; } - /* freebsd32_cap_rights_limit */ +#endif + /* cap_rights_limit */ case 533: { - struct freebsd32_cap_rights_limit_args *p = params; + struct cap_rights_limit_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = p->rights1; /* uint32_t */ - uarg[2] = p->rights2; /* uint32_t */ - *n_args = 3; + uarg[1] = (intptr_t) p->rightsp; /* cap_rights_t * */ + *n_args = 2; break; } -#endif /* freebsd32_cap_ioctls_limit */ case 534: { struct freebsd32_cap_ioctls_limit_args *p = params; @@ -8277,27 +8259,17 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* cap_new */ - case 514: + /* __cap_rights_get */ + case 515: switch(ndx) { case 0: p = "int"; break; case 1: - p = "uint64_t"; - break; - default: - break; - }; - break; - /* cap_rights_get */ - case 515: - switch(ndx) { - case 0: p = "int"; break; - case 1: - p = "uint64_t *"; + case 2: + p = "cap_rights_t *"; break; default: break; @@ -8583,25 +8555,6 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* freebsd32_cap_rights_limit */ - case 533: - switch(ndx) { - case 0: - p = "int"; - break; - case 1: - p = "int"; - break; - case 2: - p = "uint32_t"; - break; - case 3: - p = "uint32_t"; - break; - default: - break; - }; - break; #else /* freebsd32_posix_fallocate */ case 530: @@ -8678,23 +8631,20 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* freebsd32_cap_rights_limit */ +#endif + /* cap_rights_limit */ case 533: switch(ndx) { case 0: p = "int"; break; case 1: - p = "uint32_t"; - break; - case 2: - p = "uint32_t"; + p = "cap_rights_t *"; break; default: break; }; break; -#endif /* freebsd32_cap_ioctls_limit */ case 534: switch(ndx) { @@ -10567,12 +10517,7 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* cap_new */ - case 514: - if (ndx == 0 || ndx == 1) - p = "int"; - break; - /* cap_rights_get */ + /* __cap_rights_get */ case 515: if (ndx == 0 || ndx == 1) p = "int"; @@ -10655,11 +10600,6 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* freebsd32_cap_rights_limit */ - case 533: - if (ndx == 0 || ndx == 1) - p = "int"; - break; #else /* freebsd32_posix_fallocate */ case 530: @@ -10676,12 +10616,12 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* freebsd32_cap_rights_limit */ +#endif + /* cap_rights_limit */ case 533: if (ndx == 0 || ndx == 1) p = "int"; break; -#endif /* freebsd32_cap_ioctls_limit */ case 534: if (ndx == 0 || ndx == 1) Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Thu Sep 5 00:09:56 2013 (r255219) +++ head/sys/kern/init_sysent.c Thu Sep 5 00:11:59 2013 (r255220) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 251526 2013-06-08 13:27:57Z glebius + * created from FreeBSD: head/sys/kern/syscalls.master 255219 2013-09-05 00:09:56Z pjd */ #include "opt_compat.h" @@ -548,8 +548,8 @@ struct sysent sysent[] = { { AS(msgctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 511 = msgctl */ { AS(shmctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 512 = shmctl */ { AS(lpathconf_args), (sy_call_t *)sys_lpathconf, AUE_LPATHCONF, NULL, 0, 0, 0, SY_THR_STATIC }, /* 513 = lpathconf */ - { AS(cap_new_args), (sy_call_t *)sys_cap_new, AUE_CAP_NEW, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 514 = cap_new */ - { AS(cap_rights_get_args), (sy_call_t *)sys_cap_rights_get, AUE_CAP_RIGHTS_GET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 515 = cap_rights_get */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 514 = obsolete cap_new */ + { AS(__cap_rights_get_args), (sy_call_t *)sys___cap_rights_get, AUE_CAP_RIGHTS_GET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 515 = __cap_rights_get */ { 0, (sy_call_t *)sys_cap_enter, AUE_CAP_ENTER, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 516 = cap_enter */ { AS(cap_getmode_args), (sy_call_t *)sys_cap_getmode, AUE_CAP_GETMODE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 517 = cap_getmode */ { AS(pdfork_args), (sy_call_t *)sys_pdfork, AUE_PDFORK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 518 = pdfork */ Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Thu Sep 5 00:09:56 2013 (r255219) +++ head/sys/kern/syscalls.c Thu Sep 5 00:11:59 2013 (r255220) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 251526 2013-06-08 13:27:57Z glebius + * created from FreeBSD: head/sys/kern/syscalls.master 255219 2013-09-05 00:09:56Z pjd */ const char *syscallnames[] = { @@ -521,8 +521,8 @@ const char *syscallnames[] = { "msgctl", /* 511 = msgctl */ "shmctl", /* 512 = shmctl */ "lpathconf", /* 513 = lpathconf */ - "cap_new", /* 514 = cap_new */ - "cap_rights_get", /* 515 = cap_rights_get */ + "obs_cap_new", /* 514 = obsolete cap_new */ + "__cap_rights_get", /* 515 = __cap_rights_get */ "cap_enter", /* 516 = cap_enter */ "cap_getmode", /* 517 = cap_getmode */ "pdfork", /* 518 = pdfork */ Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Thu Sep 5 00:09:56 2013 (r255219) +++ head/sys/kern/systrace_args.c Thu Sep 5 00:11:59 2013 (r255220) @@ -3126,20 +3126,13 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } - /* cap_new */ - case 514: { - struct cap_new_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = p->rights; /* uint64_t */ - *n_args = 2; - break; - } - /* cap_rights_get */ + /* __cap_rights_get */ case 515: { - struct cap_rights_get_args *p = params; - iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->rightsp; /* uint64_t * */ - *n_args = 2; + struct __cap_rights_get_args *p = params; + iarg[0] = p->version; /* int */ + iarg[1] = p->fd; /* int */ + uarg[2] = (intptr_t) p->rightsp; /* cap_rights_t * */ + *n_args = 3; break; } /* cap_enter */ @@ -3290,7 +3283,7 @@ systrace_args(int sysnum, void *params, case 533: { struct cap_rights_limit_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = p->rights; /* uint64_t */ + uarg[1] = (intptr_t) p->rightsp; /* cap_rights_t * */ *n_args = 2; break; } @@ -8561,27 +8554,17 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* cap_new */ - case 514: + /* __cap_rights_get */ + case 515: switch(ndx) { case 0: p = "int"; break; case 1: - p = "uint64_t"; - break; - default: - break; - }; - break; - /* cap_rights_get */ - case 515: - switch(ndx) { - case 0: p = "int"; break; - case 1: - p = "uint64_t *"; + case 2: + p = "cap_rights_t *"; break; default: break; @@ -8849,7 +8832,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 1: - p = "uint64_t"; + p = "cap_rights_t *"; break; default: break; @@ -10818,12 +10801,7 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* cap_new */ - case 514: - if (ndx == 0 || ndx == 1) - p = "int"; - break; - /* cap_rights_get */ + /* __cap_rights_get */ case 515: if (ndx == 0 || ndx == 1) p = "int"; Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Thu Sep 5 00:09:56 2013 (r255219) +++ head/sys/sys/syscall.h Thu Sep 5 00:11:59 2013 (r255220) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 251526 2013-06-08 13:27:57Z glebius + * created from FreeBSD: head/sys/kern/syscalls.master 255219 2013-09-05 00:09:56Z pjd */ #define SYS_syscall 0 @@ -434,8 +434,8 @@ #define SYS_msgctl 511 #define SYS_shmctl 512 #define SYS_lpathconf 513 -#define SYS_cap_new 514 -#define SYS_cap_rights_get 515 + /* 514 is obsolete cap_new */ +#define SYS___cap_rights_get 515 #define SYS_cap_enter 516 #define SYS_cap_getmode 517 #define SYS_pdfork 518 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Thu Sep 5 00:09:56 2013 (r255219) +++ head/sys/sys/syscall.mk Thu Sep 5 00:11:59 2013 (r255220) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 251526 2013-06-08 13:27:57Z glebius +# created from FreeBSD: head/sys/kern/syscalls.master 255219 2013-09-05 00:09:56Z pjd MIASM = \ syscall.o \ exit.o \ @@ -383,8 +383,7 @@ MIASM = \ msgctl.o \ shmctl.o \ lpathconf.o \ - cap_new.o \ - cap_rights_get.o \ + __cap_rights_get.o \ cap_enter.o \ cap_getmode.o \ pdfork.o \ Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Thu Sep 5 00:09:56 2013 (r255219) +++ head/sys/sys/sysproto.h Thu Sep 5 00:11:59 2013 (r255220) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 251526 2013-06-08 13:27:57Z glebius + * created from FreeBSD: head/sys/kern/syscalls.master 255219 2013-09-05 00:09:56Z pjd */ #ifndef _SYS_SYSPROTO_H_ @@ -1672,13 +1672,10 @@ struct lpathconf_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char name_l_[PADL_(int)]; int name; char name_r_[PADR_(int)]; }; -struct cap_new_args { +struct __cap_rights_get_args { + char version_l_[PADL_(int)]; int version; char version_r_[PADR_(int)]; char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char rights_l_[PADL_(uint64_t)]; uint64_t rights; char rights_r_[PADR_(uint64_t)]; -}; -struct cap_rights_get_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char rightsp_l_[PADL_(uint64_t *)]; uint64_t * rightsp; char rightsp_r_[PADR_(uint64_t *)]; + char rightsp_l_[PADL_(cap_rights_t *)]; cap_rights_t * rightsp; char rightsp_r_[PADR_(cap_rights_t *)]; }; struct cap_enter_args { register_t dummy; @@ -1764,7 +1761,7 @@ struct wait6_args { }; struct cap_rights_limit_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char rights_l_[PADL_(uint64_t)]; uint64_t rights; char rights_r_[PADR_(uint64_t)]; + char rightsp_l_[PADL_(cap_rights_t *)]; cap_rights_t * rightsp; char rightsp_r_[PADR_(cap_rights_t *)]; }; struct cap_ioctls_limit_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -2179,8 +2176,7 @@ int sys___semctl(struct thread *, struct int sys_msgctl(struct thread *, struct msgctl_args *); int sys_shmctl(struct thread *, struct shmctl_args *); int sys_lpathconf(struct thread *, struct lpathconf_args *); -int sys_cap_new(struct thread *, struct cap_new_args *); -int sys_cap_rights_get(struct thread *, struct cap_rights_get_args *); +int sys___cap_rights_get(struct thread *, struct __cap_rights_get_args *); int sys_cap_enter(struct thread *, struct cap_enter_args *); int sys_cap_getmode(struct thread *, struct cap_getmode_args *); int sys_pdfork(struct thread *, struct pdfork_args *); @@ -2886,8 +2882,7 @@ int freebsd7_shmctl(struct thread *, str #define SYS_AUE_msgctl AUE_MSGCTL #define SYS_AUE_shmctl AUE_SHMCTL #define SYS_AUE_lpathconf AUE_LPATHCONF -#define SYS_AUE_cap_new AUE_CAP_NEW -#define SYS_AUE_cap_rights_get AUE_CAP_RIGHTS_GET +#define SYS_AUE___cap_rights_get AUE_CAP_RIGHTS_GET #define SYS_AUE_cap_enter AUE_CAP_ENTER #define SYS_AUE_cap_getmode AUE_CAP_GETMODE #define SYS_AUE_pdfork AUE_PDFORK From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 00:17:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D07C27C; Thu, 5 Sep 2013 00:17:38 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AED882449; Thu, 5 Sep 2013 00:17:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r850HcMV066198; Thu, 5 Sep 2013 00:17:38 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r850HcNq066196; Thu, 5 Sep 2013 00:17:38 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309050017.r850HcNq066196@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Sep 2013 00:17:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255221 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 00:17:38 -0000 Author: pjd Date: Thu Sep 5 00:17:38 2013 New Revision: 255221 URL: http://svnweb.freebsd.org/changeset/base/255221 Log: Style fixes. Most fixes are about not treating integers and pointers as booleans. Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Thu Sep 5 00:11:59 2013 (r255220) +++ head/sys/kern/uipc_syscalls.c Thu Sep 5 00:17:38 2013 (r255221) @@ -220,16 +220,16 @@ sys_socket(td, uap) #ifdef MAC error = mac_socket_check_create(td->td_ucred, uap->domain, type, uap->protocol); - if (error) + if (error != 0) return (error); #endif error = falloc(td, &fp, &fd, oflag); - if (error) + if (error != 0) return (error); /* An extra reference on `fp' has been held for us by falloc(). */ error = socreate(uap->domain, &so, type, uap->protocol, td->td_ucred, td); - if (error) { + if (error != 0) { fdclose(td->td_proc->p_fd, fp, fd, td); } else { finit(fp, FREAD | FWRITE | fflag, DTYPE_SOCKET, so, &socketops); @@ -274,7 +274,7 @@ kern_bindat(struct thread *td, int dirfd AUDIT_ARG_SOCKADDR(td, dirfd, sa); error = getsock_cap(td->td_proc->p_fd, fd, cap_rights_init(&rights, CAP_BIND), &fp, NULL); - if (error) + if (error != 0) return (error); so = fp->f_data; #ifdef KTRACE @@ -374,7 +374,7 @@ accept1(td, s, uname, anamelen, flags) return (kern_accept4(td, s, NULL, NULL, flags, NULL)); error = copyin(anamelen, &namelen, sizeof (namelen)); - if (error) + if (error != 0) return (error); error = kern_accept4(td, s, &name, &namelen, flags, &fp); @@ -383,7 +383,7 @@ accept1(td, s, uname, anamelen, flags) * return a namelen of zero for older code which might * ignore the return value from accept. */ - if (error) { + if (error != 0) { (void) copyout(&namelen, anamelen, sizeof(*anamelen)); return (error); } @@ -399,7 +399,7 @@ accept1(td, s, uname, anamelen, flags) if (error == 0) error = copyout(&namelen, anamelen, sizeof(namelen)); - if (error) + if (error != 0) fdclose(td->td_proc->p_fd, fp, td->td_retval[0], td); fdrop(fp, td); free(name, M_SONAME); @@ -420,22 +420,20 @@ kern_accept4(struct thread *td, int s, s struct filedesc *fdp; struct file *headfp, *nfp = NULL; struct sockaddr *sa = NULL; - int error; struct socket *head, *so; - int fd; cap_rights_t rights; u_int fflag; pid_t pgid; - int tmp; + int error, fd, tmp; - if (name) + if (name != NULL) *name = NULL; AUDIT_ARG_FD(s); fdp = td->td_proc->p_fd; error = getsock_cap(fdp, s, cap_rights_init(&rights, CAP_ACCEPT), &headfp, &fflag); - if (error) + if (error != 0) return (error); head = headfp->f_data; if ((head->so_options & SO_ACCEPTCONN) == 0) { @@ -448,7 +446,7 @@ kern_accept4(struct thread *td, int s, s goto done; #endif error = falloc(td, &nfp, &fd, (flags & SOCK_CLOEXEC) ? O_CLOEXEC : 0); - if (error) + if (error != 0) goto done; ACCEPT_LOCK(); if ((head->so_state & SS_NBIO) && TAILQ_EMPTY(&head->so_comp)) { @@ -463,7 +461,7 @@ kern_accept4(struct thread *td, int s, s } error = msleep(&head->so_timeo, &accept_mtx, PSOCK | PCATCH, "accept", 0); - if (error) { + if (error != 0) { ACCEPT_UNLOCK(); goto noconnection; } @@ -522,7 +520,7 @@ kern_accept4(struct thread *td, int s, s (void) fo_ioctl(nfp, FIOASYNC, &tmp, td->td_ucred, td); sa = 0; error = soaccept(so, &sa); - if (error) { + if (error != 0) { /* * return a namelen of zero for older code which might * ignore the return value from accept. @@ -549,14 +547,13 @@ kern_accept4(struct thread *td, int s, s sa = NULL; } noconnection: - if (sa) - free(sa, M_SONAME); + free(sa, M_SONAME); /* * close the new descriptor, assuming someone hasn't ripped it * out from under us. */ - if (error) + if (error != 0) fdclose(fdp, nfp, fd, td); /* @@ -591,6 +588,7 @@ sys_accept4(td, uap) struct thread *td; struct accept4_args *uap; { + if (uap->flags & ~(SOCK_CLOEXEC | SOCK_NONBLOCK)) return (EINVAL); @@ -636,14 +634,13 @@ kern_connectat(struct thread *td, int di struct socket *so; struct file *fp; cap_rights_t rights; - int error; - int interrupted = 0; + int error, interrupted = 0; AUDIT_ARG_FD(fd); AUDIT_ARG_SOCKADDR(td, dirfd, sa); error = getsock_cap(td->td_proc->p_fd, fd, cap_rights_init(&rights, CAP_CONNECT), &fp, NULL); - if (error) + if (error != 0) return (error); so = fp->f_data; if (so->so_state & SS_ISCONNECTING) { @@ -656,14 +653,14 @@ kern_connectat(struct thread *td, int di #endif #ifdef MAC error = mac_socket_check_connect(td->td_ucred, so, sa); - if (error) + if (error != 0) goto bad; #endif if (dirfd == AT_FDCWD) error = soconnect(so, sa, td); else error = soconnectat(dirfd, so, sa, td); - if (error) + if (error != 0) goto bad; if ((so->so_state & SS_NBIO) && (so->so_state & SS_ISCONNECTING)) { error = EINPROGRESS; @@ -673,7 +670,7 @@ kern_connectat(struct thread *td, int di while ((so->so_state & SS_ISCONNECTING) && so->so_error == 0) { error = msleep(&so->so_timeo, SOCK_MTX(so), PSOCK | PCATCH, "connec", 0); - if (error) { + if (error != 0) { if (error == EINTR || error == ERESTART) interrupted = 1; break; @@ -748,35 +745,35 @@ kern_socketpair(struct thread *td, int d /* We might want to have a separate check for socket pairs. */ error = mac_socket_check_create(td->td_ucred, domain, type, protocol); - if (error) + if (error != 0) return (error); #endif error = socreate(domain, &so1, type, protocol, td->td_ucred, td); - if (error) + if (error != 0) return (error); error = socreate(domain, &so2, type, protocol, td->td_ucred, td); - if (error) + if (error != 0) goto free1; /* On success extra reference to `fp1' and 'fp2' is set by falloc. */ error = falloc(td, &fp1, &fd, oflag); - if (error) + if (error != 0) goto free2; rsv[0] = fd; fp1->f_data = so1; /* so1 already has ref count */ error = falloc(td, &fp2, &fd, oflag); - if (error) + if (error != 0) goto free3; fp2->f_data = so2; /* so2 already has ref count */ rsv[1] = fd; error = soconnect2(so1, so2); - if (error) + if (error != 0) goto free4; if (type == SOCK_DGRAM) { /* * Datagram socket connection is asymmetric. */ error = soconnect2(so2, so1); - if (error) + if (error != 0) goto free4; } finit(fp1, FREAD | FWRITE | fflag, DTYPE_SOCKET, fp1->f_data, @@ -812,10 +809,10 @@ sys_socketpair(struct thread *td, struct error = kern_socketpair(td, uap->domain, uap->type, uap->protocol, sv); - if (error) + if (error != 0) return (error); error = copyout(sv, uap->rsv, 2 * sizeof(int)); - if (error) { + if (error != 0) { (void)kern_close(td, sv[0]); (void)kern_close(td, sv[1]); } @@ -840,7 +837,7 @@ sendit(td, s, mp, flags) if (mp->msg_name != NULL) { error = getsockaddr(&to, mp->msg_name, mp->msg_namelen); - if (error) { + if (error != 0) { to = NULL; goto bad; } @@ -860,7 +857,7 @@ sendit(td, s, mp, flags) } error = sockargs(&control, mp->msg_control, mp->msg_controllen, MT_CONTROL); - if (error) + if (error != 0) goto bad; #ifdef COMPAT_OLDSOCK if (mp->msg_flags == MSG_COMPAT) { @@ -880,8 +877,7 @@ sendit(td, s, mp, flags) error = kern_sendit(td, s, mp, flags, control, UIO_USERSPACE); bad: - if (to) - free(to, M_SONAME); + free(to, M_SONAME); return (error); } @@ -898,12 +894,12 @@ kern_sendit(td, s, mp, flags, control, s struct uio auio; struct iovec *iov; struct socket *so; - int i, error; - ssize_t len; cap_rights_t rights; #ifdef KTRACE struct uio *ktruio = NULL; #endif + ssize_t len; + int i, error; AUDIT_ARG_FD(s); cap_rights_init(&rights, CAP_SEND); @@ -912,7 +908,7 @@ kern_sendit(td, s, mp, flags, control, s cap_rights_set(&rights, CAP_CONNECT); } error = getsock_cap(td->td_proc->p_fd, s, &rights, &fp, NULL); - if (error) + if (error != 0) return (error); so = (struct socket *)fp->f_data; @@ -924,11 +920,11 @@ kern_sendit(td, s, mp, flags, control, s if (mp->msg_name != NULL) { error = mac_socket_check_connect(td->td_ucred, so, mp->msg_name); - if (error) + if (error != 0) goto bad; } error = mac_socket_check_send(td->td_ucred, so); - if (error) + if (error != 0) goto bad; #endif @@ -952,7 +948,7 @@ kern_sendit(td, s, mp, flags, control, s #endif len = auio.uio_resid; error = sosend(so, mp->msg_name, &auio, 0, control, flags, td); - if (error) { + if (error != 0) { if (auio.uio_resid != len && (error == ERESTART || error == EINTR || error == EWOULDBLOCK)) error = 0; @@ -991,7 +987,6 @@ sys_sendto(td, uap) { struct msghdr msg; struct iovec aiov; - int error; msg.msg_name = uap->to; msg.msg_namelen = uap->tolen; @@ -1003,8 +998,7 @@ sys_sendto(td, uap) #endif aiov.iov_base = uap->buf; aiov.iov_len = uap->len; - error = sendit(td, uap->s, &msg, uap->flags); - return (error); + return (sendit(td, uap->s, &msg, uap->flags)); } #ifdef COMPAT_OLDSOCK @@ -1020,7 +1014,6 @@ osend(td, uap) { struct msghdr msg; struct iovec aiov; - int error; msg.msg_name = 0; msg.msg_namelen = 0; @@ -1030,8 +1023,7 @@ osend(td, uap) aiov.iov_len = uap->len; msg.msg_control = 0; msg.msg_flags = 0; - error = sendit(td, uap->s, &msg, uap->flags); - return (error); + return (sendit(td, uap->s, &msg, uap->flags)); } int @@ -1048,10 +1040,10 @@ osendmsg(td, uap) int error; error = copyin(uap->msg, &msg, sizeof (struct omsghdr)); - if (error) + if (error != 0) return (error); error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); - if (error) + if (error != 0) return (error); msg.msg_iov = iov; msg.msg_flags = MSG_COMPAT; @@ -1075,10 +1067,10 @@ sys_sendmsg(td, uap) int error; error = copyin(uap->msg, &msg, sizeof (msg)); - if (error) + if (error != 0) return (error); error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); - if (error) + if (error != 0) return (error); msg.msg_iov = iov; #ifdef COMPAT_OLDSOCK @@ -1099,9 +1091,6 @@ kern_recvit(td, s, mp, fromseg, controlp { struct uio auio; struct iovec *iov; - int i; - ssize_t len; - int error; struct mbuf *m, *control = NULL; caddr_t ctlbuf; struct file *fp; @@ -1111,6 +1100,8 @@ kern_recvit(td, s, mp, fromseg, controlp #ifdef KTRACE struct uio *ktruio = NULL; #endif + ssize_t len; + int error, i; if (controlp != NULL) *controlp = NULL; @@ -1118,13 +1109,13 @@ kern_recvit(td, s, mp, fromseg, controlp AUDIT_ARG_FD(s); error = getsock_cap(td->td_proc->p_fd, s, cap_rights_init(&rights, CAP_RECV), &fp, NULL); - if (error) + if (error != 0) return (error); so = fp->f_data; #ifdef MAC error = mac_socket_check_receive(td->td_ucred, so); - if (error) { + if (error != 0) { fdrop(fp, td); return (error); } @@ -1152,7 +1143,7 @@ kern_recvit(td, s, mp, fromseg, controlp error = soreceive(so, &fromsa, &auio, NULL, (mp->msg_control || controlp) ? &control : NULL, &mp->msg_flags); - if (error) { + if (error != 0) { if (auio.uio_resid != len && (error == ERESTART || error == EINTR || error == EWOULDBLOCK)) error = 0; @@ -1165,7 +1156,7 @@ kern_recvit(td, s, mp, fromseg, controlp ktrgenio(s, UIO_READ, ktruio, error); } #endif - if (error) + if (error != 0) goto out; td->td_retval[0] = len - auio.uio_resid; if (mp->msg_name) { @@ -1183,7 +1174,7 @@ kern_recvit(td, s, mp, fromseg, controlp if (fromseg == UIO_USERSPACE) { error = copyout(fromsa, mp->msg_name, (unsigned)len); - if (error) + if (error != 0) goto out; } else bcopy(fromsa, mp->msg_name, len); @@ -1242,8 +1233,7 @@ out: if (fromsa && KTRPOINT(td, KTR_STRUCT)) ktrsockaddr(fromsa); #endif - if (fromsa) - free(fromsa, M_SONAME); + free(fromsa, M_SONAME); if (error == 0 && controlp != NULL) *controlp = control; @@ -1263,9 +1253,9 @@ recvit(td, s, mp, namelenp) int error; error = kern_recvit(td, s, mp, UIO_USERSPACE, NULL); - if (error) + if (error != 0) return (error); - if (namelenp) { + if (namelenp != NULL) { error = copyout(&mp->msg_namelen, namelenp, sizeof (socklen_t)); #ifdef COMPAT_OLDSOCK if (mp->msg_flags & MSG_COMPAT) @@ -1294,7 +1284,7 @@ sys_recvfrom(td, uap) if (uap->fromlenaddr) { error = copyin(uap->fromlenaddr, &msg.msg_namelen, sizeof (msg.msg_namelen)); - if (error) + if (error != 0) goto done2; } else { msg.msg_namelen = 0; @@ -1308,7 +1298,7 @@ sys_recvfrom(td, uap) msg.msg_flags = uap->flags; error = recvit(td, uap->s, &msg, uap->fromlenaddr); done2: - return(error); + return (error); } #ifdef COMPAT_OLDSOCK @@ -1336,7 +1326,6 @@ orecv(td, uap) { struct msghdr msg; struct iovec aiov; - int error; msg.msg_name = 0; msg.msg_namelen = 0; @@ -1346,8 +1335,7 @@ orecv(td, uap) aiov.iov_len = uap->len; msg.msg_control = 0; msg.msg_flags = uap->flags; - error = recvit(td, uap->s, &msg, NULL); - return (error); + return (recvit(td, uap->s, &msg, NULL)); } /* @@ -1369,10 +1357,10 @@ orecvmsg(td, uap) int error; error = copyin(uap->msg, &msg, sizeof (struct omsghdr)); - if (error) + if (error != 0) return (error); error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); - if (error) + if (error != 0) return (error); msg.msg_flags = uap->flags | MSG_COMPAT; msg.msg_iov = iov; @@ -1399,10 +1387,10 @@ sys_recvmsg(td, uap) int error; error = copyin(uap->msg, &msg, sizeof (msg)); - if (error) + if (error != 0) return (error); error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); - if (error) + if (error != 0) return (error); msg.msg_flags = uap->flags; #ifdef COMPAT_OLDSOCK @@ -1471,11 +1459,11 @@ kern_setsockopt(td, s, level, name, val, enum uio_seg valseg; socklen_t valsize; { - int error; struct socket *so; struct file *fp; struct sockopt sopt; cap_rights_t rights; + int error; if (val == NULL && valsize != 0) return (EFAULT); @@ -1522,11 +1510,11 @@ sys_getsockopt(td, uap) } */ *uap; { socklen_t valsize; - int error; + int error; if (uap->val) { error = copyin(uap->avalsize, &valsize, sizeof (valsize)); - if (error) + if (error != 0) return (error); } @@ -1552,11 +1540,11 @@ kern_getsockopt(td, s, level, name, val, enum uio_seg valseg; socklen_t *valsize; { - int error; - struct socket *so; + struct socket *so; struct file *fp; - struct sockopt sopt; + struct sockopt sopt; cap_rights_t rights; + int error; if (val == NULL) *valsize = 0; @@ -1610,11 +1598,11 @@ getsockname1(td, uap, compat) int error; error = copyin(uap->alen, &len, sizeof(len)); - if (error) + if (error != 0) return (error); error = kern_getsockname(td, uap->fdes, &sa, &len); - if (error) + if (error != 0) return (error); if (len != 0) { @@ -1643,14 +1631,14 @@ kern_getsockname(struct thread *td, int AUDIT_ARG_FD(fd); error = getsock_cap(td->td_proc->p_fd, fd, cap_rights_init(&rights, CAP_GETSOCKNAME), &fp, NULL); - if (error) + if (error != 0) return (error); so = fp->f_data; *sa = NULL; CURVNET_SET(so->so_vnet); error = (*so->so_proto->pr_usrreqs->pru_sockaddr)(so, sa); CURVNET_RESTORE(); - if (error) + if (error != 0) goto bad; if (*sa == NULL) len = 0; @@ -1663,7 +1651,7 @@ kern_getsockname(struct thread *td, int #endif bad: fdrop(fp, td); - if (error && *sa) { + if (error != 0 && *sa != NULL) { free(*sa, M_SONAME); *sa = NULL; } @@ -1709,11 +1697,11 @@ getpeername1(td, uap, compat) int error; error = copyin(uap->alen, &len, sizeof (len)); - if (error) + if (error != 0) return (error); error = kern_getpeername(td, uap->fdes, &sa, &len); - if (error) + if (error != 0) return (error); if (len != 0) { @@ -1742,7 +1730,7 @@ kern_getpeername(struct thread *td, int AUDIT_ARG_FD(fd); error = getsock_cap(td->td_proc->p_fd, fd, cap_rights_init(&rights, CAP_GETPEERNAME), &fp, NULL); - if (error) + if (error != 0) return (error); so = fp->f_data; if ((so->so_state & (SS_ISCONNECTED|SS_ISCONFIRMING)) == 0) { @@ -1753,7 +1741,7 @@ kern_getpeername(struct thread *td, int CURVNET_SET(so->so_vnet); error = (*so->so_proto->pr_usrreqs->pru_peeraddr)(so, sa); CURVNET_RESTORE(); - if (error) + if (error != 0) goto bad; if (*sa == NULL) len = 0; @@ -1765,7 +1753,7 @@ kern_getpeername(struct thread *td, int ktrsockaddr(*sa); #endif bad: - if (error && *sa) { + if (error != 0 && *sa != NULL) { free(*sa, M_SONAME); *sa = NULL; } @@ -1817,7 +1805,7 @@ sockargs(mp, buf, buflen, type) m = m_get2(buflen, M_WAITOK, type, 0); m->m_len = buflen; error = copyin(buf, mtod(m, caddr_t), (u_int)buflen); - if (error) + if (error != 0) (void) m_free(m); else { *mp = m; @@ -1849,7 +1837,7 @@ getsockaddr(namp, uaddr, len) return (EINVAL); sa = malloc(len, M_SONAME, M_WAITOK); error = copyin(uaddr, sa, len); - if (error) { + if (error != 0) { free(sa, M_SONAME); } else { #if defined(COMPAT_OLDSOCK) && BYTE_ORDER != BIG_ENDIAN @@ -1936,16 +1924,16 @@ do_sendfile(struct thread *td, struct se if (uap->hdtr != NULL) { error = copyin(uap->hdtr, &hdtr, sizeof(hdtr)); - if (error) + if (error != 0) goto out; if (hdtr.headers != NULL) { error = copyinuio(hdtr.headers, hdtr.hdr_cnt, &hdr_uio); - if (error) + if (error != 0) goto out; } if (hdtr.trailers != NULL) { error = copyinuio(hdtr.trailers, hdtr.trl_cnt, &trl_uio); - if (error) + if (error != 0) goto out; } @@ -1967,10 +1955,8 @@ do_sendfile(struct thread *td, struct se fdrop(fp, td); out: - if (hdr_uio) - free(hdr_uio, M_IOV); - if (trl_uio) - free(trl_uio, M_IOV); + free(hdr_uio, M_IOV); + free(trl_uio, M_IOV); return (error); } @@ -2005,11 +1991,10 @@ vn_sendfile(struct file *fp, int sockfd, struct sf_buf *sf; struct vm_page *pg; struct vattr va; + struct sendfile_sync *sfs = NULL; cap_rights_t rights; off_t off, xfsize, fsbytes = 0, sbytes = 0, rem = 0; - int error, hdrlen = 0, mnw = 0; - int bsize; - struct sendfile_sync *sfs = NULL; + int bsize, error, hdrlen = 0, mnw = 0; vn_lock(vp, LK_SHARED | LK_RETRY); if (vp->v_type == VREG) { @@ -2082,7 +2067,7 @@ vn_sendfile(struct file *fp, int sockfd, #ifdef MAC error = mac_socket_check_send(td->td_ucred, so); - if (error) + if (error != 0) goto out; #endif @@ -2197,7 +2182,7 @@ retry_space: * been interrupted by a signal. If we've sent anything * then return bytes sent, otherwise return the error. */ - if (error) { + if (error != 0) { SOCKBUF_UNLOCK(&so->so_snd); goto done; } @@ -2289,10 +2274,10 @@ retry_space: IO_VMIO | ((readahead / bsize) << IO_SEQSHIFT), td->td_ucred, NOCRED, &resid, td); SFSTAT_INC(sf_iocnt); - if (error) + if (error != 0) VM_OBJECT_WLOCK(obj); } - if (error) { + if (error != 0) { vm_page_lock(pg); vm_page_unwire(pg, 0); /* @@ -2417,7 +2402,7 @@ retry_space: /* Quit outer loop on error or when we're done. */ if (done) break; - if (error) + if (error != 0) goto done; } @@ -2484,23 +2469,22 @@ sys_sctp_peeloff(td, uap) { #if (defined(INET) || defined(INET6)) && defined(SCTP) struct file *nfp = NULL; - int error; struct socket *head, *so; - int fd; cap_rights_t rights; u_int fflag; + int error, fd; AUDIT_ARG_FD(uap->sd); error = fgetsock(td, uap->sd, cap_rights_init(&rights, CAP_PEELOFF), &head, &fflag); - if (error) + if (error != 0) goto done2; if (head->so_proto->pr_protocol != IPPROTO_SCTP) { error = EOPNOTSUPP; goto done; } error = sctp_can_peel_off(head, (sctp_assoc_t)uap->name); - if (error) + if (error != 0) goto done; /* * At this point we know we do have a assoc to pull @@ -2509,7 +2493,7 @@ sys_sctp_peeloff(td, uap) */ error = falloc(td, &nfp, &fd, 0); - if (error) + if (error != 0) goto done; td->td_retval[0] = fd; @@ -2539,7 +2523,7 @@ sys_sctp_peeloff(td, uap) ACCEPT_UNLOCK(); finit(nfp, fflag, DTYPE_SOCKET, so, &socketops); error = sctp_do_peeloff(head, so, (sctp_assoc_t)uap->name); - if (error) + if (error != 0) goto noconnection; if (head->so_sigio != NULL) fsetown(fgetown(&head->so_sigio), &so->so_sigio); @@ -2549,7 +2533,7 @@ noconnection: * close the new descriptor, assuming someone hasn't ripped it * out from under us. */ - if (error) + if (error != 0) fdclose(td->td_proc->p_fd, nfp, fd, td); /* @@ -2584,7 +2568,6 @@ sys_sctp_generic_sendmsg (td, uap) struct sctp_sndrcvinfo sinfo, *u_sinfo = NULL; struct socket *so; struct file *fp = NULL; - int error = 0, len; struct sockaddr *to = NULL; #ifdef KTRACE struct uio *ktruio = NULL; @@ -2592,18 +2575,19 @@ sys_sctp_generic_sendmsg (td, uap) struct uio auio; struct iovec iov[1]; cap_rights_t rights; + int error = 0, len; - if (uap->sinfo) { + if (uap->sinfo != NULL) { error = copyin(uap->sinfo, &sinfo, sizeof (sinfo)); - if (error) + if (error != 0) return (error); u_sinfo = &sinfo; } cap_rights_init(&rights, CAP_SEND); - if (uap->tolen) { + if (uap->tolen != 0) { error = getsockaddr(&to, uap->to, uap->tolen); - if (error) { + if (error != 0) { to = NULL; goto sctp_bad2; } @@ -2612,7 +2596,7 @@ sys_sctp_generic_sendmsg (td, uap) AUDIT_ARG_FD(uap->sd); error = getsock_cap(td->td_proc->p_fd, uap->sd, &rights, &fp, NULL); - if (error) + if (error != 0) goto sctp_bad; #ifdef KTRACE if (to && (KTRPOINT(td, KTR_STRUCT))) @@ -2629,7 +2613,7 @@ sys_sctp_generic_sendmsg (td, uap) } #ifdef MAC error = mac_socket_check_send(td->td_ucred, so); - if (error) + if (error != 0) goto sctp_bad; #endif /* MAC */ @@ -2642,11 +2626,10 @@ sys_sctp_generic_sendmsg (td, uap) auio.uio_resid = 0; len = auio.uio_resid = uap->mlen; CURVNET_SET(so->so_vnet); - error = sctp_lower_sosend(so, to, &auio, - (struct mbuf *)NULL, (struct mbuf *)NULL, - uap->flags, u_sinfo, td); + error = sctp_lower_sosend(so, to, &auio, (struct mbuf *)NULL, + (struct mbuf *)NULL, uap->flags, u_sinfo, td); CURVNET_RESTORE(); - if (error) { + if (error != 0) { if (auio.uio_resid != len && (error == ERESTART || error == EINTR || error == EWOULDBLOCK)) error = 0; @@ -2667,11 +2650,10 @@ sys_sctp_generic_sendmsg (td, uap) } #endif /* KTRACE */ sctp_bad: - if (fp) + if (fp != NULL) fdrop(fp, td); sctp_bad2: - if (to) - free(to, M_SONAME); + free(to, M_SONAME); return (error); #else /* SCTP */ return (EOPNOTSUPP); @@ -2695,8 +2677,6 @@ sys_sctp_generic_sendmsg_iov(td, uap) struct sctp_sndrcvinfo sinfo, *u_sinfo = NULL; struct socket *so; struct file *fp = NULL; - int error=0, i; - ssize_t len; struct sockaddr *to = NULL; #ifdef KTRACE struct uio *ktruio = NULL; @@ -2704,17 +2684,19 @@ sys_sctp_generic_sendmsg_iov(td, uap) struct uio auio; struct iovec *iov, *tiov; cap_rights_t rights; + ssize_t len; + int error, i; - if (uap->sinfo) { + if (uap->sinfo != NULL) { error = copyin(uap->sinfo, &sinfo, sizeof (sinfo)); - if (error) + if (error != 0) return (error); u_sinfo = &sinfo; } cap_rights_init(&rights, CAP_SEND); - if (uap->tolen) { + if (uap->tolen != 0) { error = getsockaddr(&to, uap->to, uap->tolen); - if (error) { + if (error != 0) { to = NULL; goto sctp_bad2; } @@ -2723,7 +2705,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) AUDIT_ARG_FD(uap->sd); error = getsock_cap(td->td_proc->p_fd, uap->sd, &rights, &fp, NULL); - if (error) + if (error != 0) goto sctp_bad1; #ifdef COMPAT_FREEBSD32 @@ -2733,7 +2715,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) else #endif error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); - if (error) + if (error != 0) goto sctp_bad1; #ifdef KTRACE if (to && (KTRPOINT(td, KTR_STRUCT))) @@ -2747,7 +2729,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) } #ifdef MAC error = mac_socket_check_send(td->td_ucred, so); - if (error) + if (error != 0) goto sctp_bad; #endif /* MAC */ @@ -2771,7 +2753,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) (struct mbuf *)NULL, (struct mbuf *)NULL, uap->flags, u_sinfo, td); CURVNET_RESTORE(); - if (error) { + if (error != 0) { if (auio.uio_resid != len && (error == ERESTART || error == EINTR || error == EWOULDBLOCK)) error = 0; @@ -2794,11 +2776,10 @@ sys_sctp_generic_sendmsg_iov(td, uap) sctp_bad: free(iov, M_IOV); sctp_bad1: - if (fp) + if (fp != NULL) fdrop(fp, td); sctp_bad2: - if (to) - free(to, M_SONAME); + free(to, M_SONAME); return (error); #else /* SCTP */ return (EOPNOTSUPP); @@ -2826,21 +2807,18 @@ sys_sctp_generic_recvmsg(td, uap) struct socket *so; struct file *fp = NULL; struct sockaddr *fromsa; - int fromlen; - ssize_t len; - int i, msg_flags; - int error = 0; cap_rights_t rights; #ifdef KTRACE struct uio *ktruio = NULL; #endif + ssize_t len; + int error, fromlen, i, msg_flags; AUDIT_ARG_FD(uap->sd); error = getsock_cap(td->td_proc->p_fd, uap->sd, cap_rights_init(&rights, CAP_RECV), &fp, NULL); - if (error) { + if (error != 0) return (error); - } #ifdef COMPAT_FREEBSD32 if (SV_CURPROC_FLAG(SV_ILP32)) error = freebsd32_copyiniov((struct iovec32 *)uap->iov, @@ -2848,7 +2826,7 @@ sys_sctp_generic_recvmsg(td, uap) else #endif error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); - if (error) + if (error != 0) goto out1; so = fp->f_data; @@ -2858,25 +2836,21 @@ sys_sctp_generic_recvmsg(td, uap) } #ifdef MAC error = mac_socket_check_receive(td->td_ucred, so); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 00:19:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3BC4B213; Thu, 5 Sep 2013 00:19:31 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1B0A5246C; Thu, 5 Sep 2013 00:19:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r850JVmA067060; Thu, 5 Sep 2013 00:19:31 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r850JVBC067058; Thu, 5 Sep 2013 00:19:31 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309050019.r850JVBC067058@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Sep 2013 00:19:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255222 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 00:19:31 -0000 Author: pjd Date: Thu Sep 5 00:19:30 2013 New Revision: 255222 URL: http://svnweb.freebsd.org/changeset/base/255222 Log: Style fixes. Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Thu Sep 5 00:17:38 2013 (r255221) +++ head/sys/kern/vfs_syscalls.c Thu Sep 5 00:19:30 2013 (r255222) @@ -181,8 +181,8 @@ sys_quotactl(td, uap) } */ *uap; { struct mount *mp; - int error; struct nameidata nd; + int error; AUDIT_ARG_CMD(uap->cmd); AUDIT_ARG_UID(uap->uid); @@ -198,7 +198,7 @@ sys_quotactl(td, uap) vput(nd.ni_vp); error = vfs_busy(mp, 0); vfs_rel(mp); - if (error) + if (error != 0) return (error); error = VFS_QUOTACTL(mp, uap->cmd, uap->uid, uap->arg); @@ -291,13 +291,13 @@ kern_statfs(struct thread *td, char *pat { struct mount *mp; struct statfs *sp, sb; - int error; struct nameidata nd; + int error; NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | AUDITVNODE1, pathseg, path, td); error = namei(&nd); - if (error) + if (error != 0) return (error); mp = nd.ni_vp->v_mount; vfs_ref(mp); @@ -305,11 +305,11 @@ kern_statfs(struct thread *td, char *pat vput(nd.ni_vp); error = vfs_busy(mp, 0); vfs_rel(mp); - if (error) + if (error != 0) return (error); #ifdef MAC error = mac_mount_check_stat(td->td_ucred, mp); - if (error) + if (error != 0) goto out; #endif /* @@ -320,7 +320,7 @@ kern_statfs(struct thread *td, char *pat sp->f_namemax = NAME_MAX; sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; error = VFS_STATFS(mp, sp); - if (error) + if (error != 0) goto out; if (priv_check(td, PRIV_VFS_GENERATION)) { bcopy(sp, &sb, sizeof(sb)); @@ -373,7 +373,7 @@ kern_fstatfs(struct thread *td, int fd, AUDIT_ARG_FD(fd); error = getvnode(td->td_proc->p_fd, fd, cap_rights_init(&rights, CAP_FSTATFS), &fp); - if (error) + if (error != 0) return (error); vp = fp->f_vnode; vn_lock(vp, LK_SHARED | LK_RETRY); @@ -391,11 +391,11 @@ kern_fstatfs(struct thread *td, int fd, } error = vfs_busy(mp, 0); vfs_rel(mp); - if (error) + if (error != 0) return (error); #ifdef MAC error = mac_mount_check_stat(td->td_ucred, mp); - if (error) + if (error != 0) goto out; #endif /* @@ -406,7 +406,7 @@ kern_fstatfs(struct thread *td, int fd, sp->f_namemax = NAME_MAX; sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; error = VFS_STATFS(mp, sp); - if (error) + if (error != 0) goto out; if (priv_check(td, PRIV_VFS_GENERATION)) { bcopy(sp, &sb, sizeof(sb)); @@ -525,7 +525,7 @@ kern_getfsstat(struct thread *td, struct bcopy(sp, sfsp, sizeof(*sp)); else /* if (bufseg == UIO_USERSPACE) */ { error = copyout(sp, sfsp, sizeof(*sp)); - if (error) { + if (error != 0) { vfs_unbusy(mp); return (error); } @@ -570,7 +570,7 @@ freebsd4_statfs(td, uap) int error; error = kern_statfs(td, uap->path, UIO_USERSPACE, &sf); - if (error) + if (error != 0) return (error); cvtstatfs(&sf, &osb); return (copyout(&osb, uap->buf, sizeof(osb))); @@ -598,7 +598,7 @@ freebsd4_fstatfs(td, uap) int error; error = kern_fstatfs(td, uap->fd, &sf); - if (error) + if (error != 0) return (error); cvtstatfs(&sf, &osb); return (copyout(&osb, uap->buf, sizeof(osb))); @@ -669,10 +669,10 @@ freebsd4_fhstatfs(td, uap) int error; error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t)); - if (error) + if (error != 0) return (error); error = kern_fhstatfs(td, fh, &sf); - if (error) + if (error != 0) return (error); cvtstatfs(&sf, &osb); return (copyout(&osb, uap->buf, sizeof(osb))); @@ -751,12 +751,12 @@ sys_fchdir(td, uap) continue; error = VFS_ROOT(mp, LK_SHARED, &tdp); vfs_unbusy(mp); - if (error) + if (error != 0) break; vput(vp); vp = tdp; } - if (error) { + if (error != 0) { vput(vp); return (error); } @@ -792,9 +792,9 @@ int kern_chdir(struct thread *td, char *path, enum uio_seg pathseg) { register struct filedesc *fdp = td->td_proc->p_fd; - int error; struct nameidata nd; struct vnode *vp; + int error; NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | AUDITVNODE1, pathseg, path, td); @@ -871,21 +871,23 @@ sys_chroot(td, uap) char *path; } */ *uap; { - int error; struct nameidata nd; + int error; error = priv_check(td, PRIV_VFS_CHROOT); - if (error) + if (error != 0) return (error); NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | AUDITVNODE1, UIO_USERSPACE, uap->path, td); error = namei(&nd); - if (error) + if (error != 0) goto error; - if ((error = change_dir(nd.ni_vp, td)) != 0) + error = change_dir(nd.ni_vp, td); + if (error != 0) goto e_vunlock; #ifdef MAC - if ((error = mac_vnode_check_chroot(td->td_ucred, nd.ni_vp))) + error = mac_vnode_check_chroot(td->td_ucred, nd.ni_vp); + if (error != 0) goto e_vunlock; #endif VOP_UNLOCK(nd.ni_vp, 0); @@ -909,18 +911,19 @@ change_dir(vp, td) struct vnode *vp; struct thread *td; { +#ifdef MAC int error; +#endif ASSERT_VOP_LOCKED(vp, "change_dir(): vp not locked"); if (vp->v_type != VDIR) return (ENOTDIR); #ifdef MAC error = mac_vnode_check_chdir(td->td_ucred, vp); - if (error) + if (error == 0) return (error); #endif - error = VOP_ACCESS(vp, VEXEC, td->td_ucred, td); - return (error); + return (VOP_ACCESS(vp, VEXEC, td->td_ucred, td)); } /* @@ -942,7 +945,7 @@ change_root(vp, td) if (chroot_allow_open_directories == 0 || (chroot_allow_open_directories == 1 && fdp->fd_rdir != rootvnode)) { error = chroot_refuse_vdir_fds(fdp); - if (error) { + if (error != 0) { FILEDESC_XUNLOCK(fdp); return (error); } @@ -1050,10 +1053,11 @@ kern_openat(struct thread *td, int fd, c struct filedesc *fdp = p->p_fd; struct file *fp; struct vnode *vp; - int cmode; - int indx = -1, error; struct nameidata nd; cap_rights_t rights; + int cmode, error, indx; + + indx = -1; AUDIT_ARG_FFLAGS(flags); AUDIT_ARG_MODE(mode); @@ -1077,7 +1081,7 @@ kern_openat(struct thread *td, int fd, c * Allocate the file descriptor, but don't install a descriptor yet. */ error = falloc_noinstall(td, &fp); - if (error) + if (error != 0) return (error); /* * An extra reference on `fp' has been held for us by @@ -1085,12 +1089,12 @@ kern_openat(struct thread *td, int fd, c */ /* Set the flags early so the finit in devfs can pick them up. */ fp->f_flag = flags & FMASK; - cmode = ((mode &~ fdp->fd_cmask) & ALLPERMS) &~ S_ISTXT; + cmode = ((mode & ~fdp->fd_cmask) & ALLPERMS) & ~S_ISTXT; NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | AUDITVNODE1, pathseg, path, fd, &rights, td); td->td_dupfd = -1; /* XXX check for fdopen */ error = vn_open(&nd, &flags, cmode, fp); - if (error) { + if (error != 0) { /* * If the vn_open replaced the method vector, something * wonderous happened deep below and we just pass it up @@ -1134,14 +1138,14 @@ kern_openat(struct thread *td, int fd, c if (fp->f_ops == &badfileops) { KASSERT(vp->v_type != VFIFO, ("Unexpected fifo.")); fp->f_seqcount = 1; - finit(fp, (flags & FMASK) | (fp->f_flag & FHASLOCK), DTYPE_VNODE, - vp, &vnops); + finit(fp, (flags & FMASK) | (fp->f_flag & FHASLOCK), + DTYPE_VNODE, vp, &vnops); } VOP_UNLOCK(vp, 0); if (flags & O_TRUNC) { error = fo_truncate(fp, 0, td->td_ucred, td); - if (error) + if (error != 0) goto bad; } success: @@ -1258,10 +1262,9 @@ kern_mknodat(struct thread *td, int fd, struct vnode *vp; struct mount *mp; struct vattr vattr; - int error; - int whiteout = 0; struct nameidata nd; cap_rights_t rights; + int error, whiteout = 0; AUDIT_ARG_MODE(mode); AUDIT_ARG_DEV(dev); @@ -1284,7 +1287,7 @@ kern_mknodat(struct thread *td, int fd, error = EINVAL; break; } - if (error) + if (error != 0) return (error); restart: bwillwrite(); @@ -1337,7 +1340,7 @@ restart: error = mac_vnode_check_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd, &vattr); #endif - if (!error) { + if (error == 0) { if (whiteout) error = VOP_WHITEOUT(nd.ni_dvp, &nd.ni_cnd, CREATE); else { @@ -1402,9 +1405,9 @@ kern_mkfifoat(struct thread *td, int fd, { struct mount *mp; struct vattr vattr; + struct nameidata nd; cap_rights_t rights; int error; - struct nameidata nd; AUDIT_ARG_MODE(mode); restart: @@ -1435,7 +1438,7 @@ restart: #ifdef MAC error = mac_vnode_check_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd, &vattr); - if (error) + if (error != 0) goto out; #endif error = VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); @@ -1519,13 +1522,13 @@ can_hardlink(struct vnode *vp, struct uc if (hardlink_check_uid && cred->cr_uid != va.va_uid) { error = priv_check_cred(cred, PRIV_VFS_LINK, 0); - if (error) + if (error != 0) return (error); } if (hardlink_check_gid && !groupmember(va.va_gid, cred)) { error = priv_check_cred(cred, PRIV_VFS_LINK, 0); - if (error) + if (error != 0) return (error); } @@ -1644,8 +1647,8 @@ kern_symlinkat(struct thread *td, char * struct mount *mp; struct vattr vattr; char *syspath; - int error; struct nameidata nd; + int error; cap_rights_t rights; if (segflg == UIO_SYSSPACE) { @@ -1685,7 +1688,7 @@ restart: vattr.va_type = VLNK; error = mac_vnode_check_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd, &vattr); - if (error) + if (error != 0) goto out2; #endif error = VOP_SYMLINK(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr, syspath); @@ -1713,16 +1716,16 @@ sys_undelete(td, uap) char *path; } */ *uap; { - int error; struct mount *mp; struct nameidata nd; + int error; restart: bwillwrite(); NDINIT(&nd, DELETE, LOCKPARENT | DOWHITEOUT | AUDITVNODE1, UIO_USERSPACE, uap->path, td); error = namei(&nd); - if (error) + if (error != 0) return (error); if (nd.ni_vp != NULLVP || !(nd.ni_cnd.cn_flags & ISWHITEOUT)) { @@ -1804,10 +1807,10 @@ kern_unlinkat(struct thread *td, int fd, { struct mount *mp; struct vnode *vp; - int error; struct nameidata nd; struct stat sb; cap_rights_t rights; + int error; restart: bwillwrite(); @@ -1847,7 +1850,7 @@ restart: #ifdef MAC error = mac_vnode_check_unlink(td->td_ucred, nd.ni_dvp, vp, &nd.ni_cnd); - if (error) + if (error != 0) goto out; #endif vfs_notify_upper(vp, VFS_NOTIFY_UPPER_UNLINK); @@ -1959,8 +1962,8 @@ vn_access(vp, user_flags, cred, td) struct ucred *cred; struct thread *td; { - int error; accmode_t accmode; + int error; /* Flags == 0 means only check for existence. */ error = 0; @@ -1974,7 +1977,7 @@ vn_access(vp, user_flags, cred, td) accmode |= VEXEC; #ifdef MAC error = mac_vnode_check_access(cred, vp, accmode); - if (error) + if (error != 0) return (error); #endif if ((accmode & VWRITE) == 0 || (error = vn_writechk(vp)) == 0) @@ -2121,11 +2124,10 @@ ostat(td, uap) int error; error = kern_stat(td, uap->path, UIO_USERSPACE, &sb); - if (error) + if (error != 0) return (error); cvtstat(&sb, &osb); - error = copyout(&osb, uap->ub, sizeof (osb)); - return (error); + return (copyout(&osb, uap->ub, sizeof (osb))); } /* @@ -2150,11 +2152,10 @@ olstat(td, uap) int error; error = kern_lstat(td, uap->path, UIO_USERSPACE, &sb); - if (error) + if (error != 0) return (error); cvtstat(&sb, &osb); - error = copyout(&osb, uap->ub, sizeof (osb)); - return (error); + return (copyout(&osb, uap->ub, sizeof (osb))); } /* @@ -2269,7 +2270,7 @@ kern_statat_vnhook(struct thread *td, in if ((error = namei(&nd)) != 0) return (error); error = vn_stat(nd.ni_vp, &sb, td->td_ucred, NOCRED, td); - if (!error) { + if (error == 0) { SDT_PROBE(vfs, , stat, mode, path, sb.st_mode, 0, 0, 0); if (S_ISREG(sb.st_mode)) SDT_PROBE(vfs, , stat, reg, path, pathseg, 0, 0, 0); @@ -2278,7 +2279,7 @@ kern_statat_vnhook(struct thread *td, in } NDFREE(&nd, NDF_ONLY_PNBUF); vput(nd.ni_vp); - if (error) + if (error != 0) return (error); *sbp = sb; #ifdef KTRACE @@ -2330,6 +2331,7 @@ cvtnstat(sb, nsb) struct stat *sb; struct nstat *nsb; { + bzero(nsb, sizeof *nsb); nsb->st_dev = sb->st_dev; nsb->st_ino = sb->st_ino; @@ -2368,11 +2370,10 @@ sys_nstat(td, uap) int error; error = kern_stat(td, uap->path, UIO_USERSPACE, &sb); - if (error) + if (error != 0) return (error); cvtnstat(&sb, &nsb); - error = copyout(&nsb, uap->ub, sizeof (nsb)); - return (error); + return (copyout(&nsb, uap->ub, sizeof (nsb))); } /* @@ -2397,11 +2398,10 @@ sys_nlstat(td, uap) int error; error = kern_lstat(td, uap->path, UIO_USERSPACE, &sb); - if (error) + if (error != 0) return (error); cvtnstat(&sb, &nsb); - error = copyout(&nsb, uap->ub, sizeof (nsb)); - return (error); + return (copyout(&nsb, uap->ub, sizeof (nsb))); } /* @@ -2521,8 +2521,8 @@ kern_readlinkat(struct thread *td, int f struct vnode *vp; struct iovec aiov; struct uio auio; - int error; struct nameidata nd; + int error; if (count > IOSIZE_MAX) return (EINVAL); @@ -2536,7 +2536,7 @@ kern_readlinkat(struct thread *td, int f vp = nd.ni_vp; #ifdef MAC error = mac_vnode_check_readlink(td->td_ucred, vp); - if (error) { + if (error != 0) { vput(vp); return (error); } @@ -2569,9 +2569,9 @@ setfflags(td, vp, flags) struct vnode *vp; u_long flags; { - int error; struct mount *mp; struct vattr vattr; + int error; /* We can't support the value matching VNOVAL. */ if (flags == VNOVAL) @@ -2585,7 +2585,7 @@ setfflags(td, vp, flags) */ if (vp->v_type == VCHR || vp->v_type == VBLK) { error = priv_check(td, PRIV_VFS_CHFLAGS_DEV); - if (error) + if (error != 0) return (error); } @@ -2738,9 +2738,9 @@ setfmode(td, cred, vp, mode) struct vnode *vp; int mode; { - int error; struct mount *mp; struct vattr vattr; + int error; if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) return (error); @@ -2833,10 +2833,9 @@ int kern_fchmodat(struct thread *td, int fd, char *path, enum uio_seg pathseg, mode_t mode, int flag) { - int error; struct nameidata nd; - int follow; cap_rights_t rights; + int error, follow; AUDIT_ARG_MODE(mode); follow = (flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : FOLLOW; @@ -2888,9 +2887,9 @@ setfown(td, cred, vp, uid, gid) uid_t uid; gid_t gid; { - int error; struct mount *mp; struct vattr vattr; + int error; if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) return (error); @@ -3093,9 +3092,9 @@ setutimes(td, vp, ts, numtimes, nullflag int numtimes; int nullflag; { - int error, setbirthtime; struct mount *mp; struct vattr vattr; + int error, setbirthtime; if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) return (error); @@ -3218,8 +3217,8 @@ kern_lutimes(struct thread *td, char *pa struct timeval *tptr, enum uio_seg tptrseg) { struct timespec ts[2]; - int error; struct nameidata nd; + int error; if ((error = getutimes(tptr, tptrseg, ts)) != 0) return (error); @@ -3263,7 +3262,8 @@ kern_futimes(struct thread *td, int fd, int error; AUDIT_ARG_FD(fd); - if ((error = getutimes(tptr, tptrseg, ts)) != 0) + error = getutimes(tptr, tptrseg, ts); + if (error != 0) return (error); error = getvnode(td->td_proc->p_fd, fd, cap_rights_init(&rights, CAP_FUTIMES), &fp); @@ -3423,7 +3423,8 @@ sys_fsync(td, uap) if (error != 0) return (error); vp = fp->f_vnode; - if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) + error = vn_start_write(vp, &mp, V_WAIT | PCATCH); + if (error != 0) goto drop; if (MNT_SHARED_WRITES(mp) || ((mp == NULL) && MNT_SHARED_WRITES(vp->v_mount))) { @@ -3584,15 +3585,15 @@ kern_renameat(struct thread *td, int old tond.ni_vp, fromnd.ni_dvp == tdvp, &tond.ni_cnd); #endif out: - if (!error) { + if (error == 0) { error = VOP_RENAME(fromnd.ni_dvp, fromnd.ni_vp, &fromnd.ni_cnd, - tond.ni_dvp, tond.ni_vp, &tond.ni_cnd); + tond.ni_dvp, tond.ni_vp, &tond.ni_cnd); NDFREE(&fromnd, NDF_ONLY_PNBUF); NDFREE(&tond, NDF_ONLY_PNBUF); } else { NDFREE(&fromnd, NDF_ONLY_PNBUF); NDFREE(&tond, NDF_ONLY_PNBUF); - if (tvp) + if (tvp != NULL) vput(tvp); if (tdvp == tvp) vrele(tdvp); @@ -3660,9 +3661,9 @@ kern_mkdirat(struct thread *td, int fd, struct mount *mp; struct vnode *vp; struct vattr vattr; + struct nameidata nd; cap_rights_t rights; int error; - struct nameidata nd; AUDIT_ARG_MODE(mode); restart: @@ -3700,7 +3701,7 @@ restart: #ifdef MAC error = mac_vnode_check_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd, &vattr); - if (error) + if (error != 0) goto out; #endif error = VOP_MKDIR(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); @@ -3709,7 +3710,7 @@ out: #endif NDFREE(&nd, NDF_ONLY_PNBUF); vput(nd.ni_dvp); - if (!error) + if (error == 0) vput(nd.ni_vp); vn_finished_write(mp); return (error); @@ -3746,9 +3747,9 @@ kern_rmdirat(struct thread *td, int fd, { struct mount *mp; struct vnode *vp; + struct nameidata nd; cap_rights_t rights; int error; - struct nameidata nd; restart: bwillwrite(); @@ -3778,7 +3779,7 @@ restart: #ifdef MAC error = mac_vnode_check_unlink(td->td_ucred, nd.ni_dvp, vp, &nd.ni_cnd); - if (error) + if (error != 0) goto out; #endif if (vn_start_write(nd.ni_dvp, &mp, V_NOWAIT) != 0) { @@ -3875,7 +3876,7 @@ unionread: loff = auio.uio_offset = foffset; #ifdef MAC error = mac_vnode_check_readdir(td->td_ucred, vp); - if (error) { + if (error != 0) { VOP_UNLOCK(vp, 0); foffset_unlock(fp, foffset, FOF_NOUPDATE); fdrop(fp, td); @@ -3933,7 +3934,7 @@ unionread: } free(dirbuf, M_TEMP); } - if (error) { + if (error != 0) { VOP_UNLOCK(vp, 0); foffset_unlock(fp, foffset, 0); fdrop(fp, td); @@ -3987,7 +3988,7 @@ sys_getdirentries(td, uap) error = kern_getdirentries(td, uap->fd, uap->buf, uap->count, &base, NULL, UIO_USERSPACE); - if (error) + if (error != 0) return (error); if (uap->basep != NULL) error = copyout(&base, uap->basep, sizeof(long)); @@ -4043,7 +4044,7 @@ unionread: error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, NULL, NULL); foffset = auio.uio_offset; - if (error) { + if (error != 0) { VOP_UNLOCK(vp, 0); goto fail; } @@ -4051,6 +4052,7 @@ unionread: (vp->v_vflag & VV_ROOT) && (vp->v_mount->mnt_flag & MNT_UNION)) { struct vnode *tvp = vp; + vp = vp->v_mount->mnt_vnodecovered; VREF(vp); fp->f_vnode = vp; @@ -4087,6 +4089,7 @@ sys_getdents(td, uap) } */ *uap; { struct getdirentries_args ap; + ap.fd = uap->fd; ap.buf = uap->buf; ap.count = uap->count; @@ -4137,8 +4140,8 @@ sys_revoke(td, uap) { struct vnode *vp; struct vattr vattr; - int error; struct nameidata nd; + int error; NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_USERSPACE, uap->path, td); @@ -4152,15 +4155,15 @@ sys_revoke(td, uap) } #ifdef MAC error = mac_vnode_check_revoke(td->td_ucred, vp); - if (error) + if (error != 0) goto out; #endif error = VOP_GETATTR(vp, &vattr, td->td_ucred); - if (error) + if (error != 0) goto out; if (td->td_ucred->cr_uid != vattr.va_uid) { error = priv_check(td, PRIV_VFS_ADMIN); - if (error) + if (error != 0) goto out; } if (vcount(vp) > 1) @@ -4226,12 +4229,12 @@ sys_lgetfh(td, uap) int error; error = priv_check(td, PRIV_VFS_GETFH); - if (error) + if (error != 0) return (error); NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | AUDITVNODE1, UIO_USERSPACE, uap->fname, td); error = namei(&nd); - if (error) + if (error != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); vp = nd.ni_vp; @@ -4239,9 +4242,8 @@ sys_lgetfh(td, uap) fh.fh_fsid = vp->v_mount->mnt_stat.f_fsid; error = VOP_VPTOFH(vp, &fh.fh_fid); vput(vp); - if (error) - return (error); - error = copyout(&fh, uap->fhp, sizeof (fh)); + if (error == 0) + error = copyout(&fh, uap->fhp, sizeof (fh)); return (error); } @@ -4262,12 +4264,12 @@ sys_getfh(td, uap) int error; error = priv_check(td, PRIV_VFS_GETFH); - if (error) + if (error != 0) return (error); NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_USERSPACE, uap->fname, td); error = namei(&nd); - if (error) + if (error != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); vp = nd.ni_vp; @@ -4275,9 +4277,8 @@ sys_getfh(td, uap) fh.fh_fsid = vp->v_mount->mnt_stat.f_fsid; error = VOP_VPTOFH(vp, &fh.fh_fid); vput(vp); - if (error) - return (error); - error = copyout(&fh, uap->fhp, sizeof (fh)); + if (error == 0) + error = copyout(&fh, uap->fhp, sizeof (fh)); return (error); } @@ -4310,7 +4311,7 @@ sys_fhopen(td, uap) int indx; error = priv_check(td, PRIV_VFS_FHOPEN); - if (error) + if (error != 0) return (error); indx = -1; fmode = FFLAGS(uap->flags); @@ -4318,7 +4319,7 @@ sys_fhopen(td, uap) if (((fmode & (FREAD | FWRITE)) == 0) || (fmode & O_CREAT)) return (EINVAL); error = copyin(uap->u_fhp, &fhp, sizeof(fhp)); - if (error) + if (error != 0) return(error); /* find the mount point */ mp = vfs_busyfs(&fhp.fh_fsid); @@ -4327,11 +4328,11 @@ sys_fhopen(td, uap) /* now give me my vnode, it gets returned to me locked */ error = VFS_FHTOVP(mp, &fhp.fh_fid, LK_EXCLUSIVE, &vp); vfs_unbusy(mp); - if (error) + if (error != 0) return (error); error = falloc_noinstall(td, &fp); - if (error) { + if (error != 0) { vput(vp); return (error); } @@ -4344,7 +4345,7 @@ sys_fhopen(td, uap) td->td_dupfd = -1; #endif error = vn_open_vnode(vp, fmode, td->td_ucred, td, fp); - if (error) { + if (error != 0) { KASSERT(fp->f_ops == &badfileops, ("VOP_OPEN in fhopen() set f_ops")); KASSERT(td->td_dupfd < 0, @@ -4361,9 +4362,9 @@ sys_fhopen(td, uap) finit(fp, (fmode & FMASK) | (fp->f_flag & FHASLOCK), DTYPE_VNODE, vp, &vnops); VOP_UNLOCK(vp, 0); - if (fmode & O_TRUNC) { + if ((fmode & O_TRUNC) != 0) { error = fo_truncate(fp, 0, td->td_ucred, td); - if (error) + if (error != 0) goto bad; } @@ -4399,9 +4400,8 @@ sys_fhstat(td, uap) if (error != 0) return (error); error = kern_fhstat(td, fh, &sb); - if (error != 0) - return (error); - error = copyout(&sb, uap->sb, sizeof(sb)); + if (error == 0) + error = copyout(&sb, uap->sb, sizeof(sb)); return (error); } @@ -4413,13 +4413,13 @@ kern_fhstat(struct thread *td, struct fh int error; error = priv_check(td, PRIV_VFS_FHSTAT); - if (error) + if (error != 0) return (error); if ((mp = vfs_busyfs(&fh.fh_fsid)) == NULL) return (ESTALE); error = VFS_FHTOVP(mp, &fh.fh_fid, LK_EXCLUSIVE, &vp); vfs_unbusy(mp); - if (error) + if (error != 0) return (error); error = vn_stat(vp, sb, td->td_ucred, NOCRED, td); vput(vp); @@ -4448,10 +4448,10 @@ sys_fhstatfs(td, uap) int error; error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t)); - if (error) + if (error != 0) return (error); error = kern_fhstatfs(td, fh, &sf); - if (error) + if (error != 0) return (error); return (copyout(&sf, uap->buf, sizeof(sf))); } @@ -4465,22 +4465,22 @@ kern_fhstatfs(struct thread *td, fhandle int error; error = priv_check(td, PRIV_VFS_FHSTATFS); - if (error) + if (error != 0) return (error); if ((mp = vfs_busyfs(&fh.fh_fsid)) == NULL) return (ESTALE); error = VFS_FHTOVP(mp, &fh.fh_fid, LK_EXCLUSIVE, &vp); - if (error) { + if (error != 0) { vfs_unbusy(mp); return (error); } vput(vp); error = prison_canseemount(td->td_ucred, mp); - if (error) + if (error != 0) goto out; #ifdef MAC error = mac_mount_check_stat(td->td_ucred, mp); - if (error) + if (error != 0) goto out; #endif /* From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 00:26:21 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D3E784F4; Thu, 5 Sep 2013 00:26:21 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 9849C252C; Thu, 5 Sep 2013 00:26:21 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id BA9F2E3E; Thu, 5 Sep 2013 02:20:52 +0200 (CEST) Date: Thu, 5 Sep 2013 02:26:28 +0200 From: Pawel Jakub Dawidek To: Andriy Gapon Subject: Re: svn commit: r254982 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20130905002628.GB1388@garage.freebsd.pl> References: <201308280039.r7S0dmRK082241@svn.freebsd.org> <521DAAB6.4010008@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IiVenqGWf+H9Y6IX" Content-Disposition: inline In-Reply-To: <521DAAB6.4010008@FreeBSD.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 00:26:21 -0000 --IiVenqGWf+H9Y6IX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 28, 2013 at 10:45:58AM +0300, Andriy Gapon wrote: > on 28/08/2013 03:39 Xin LI said the following: > > @@ -6250,8 +6250,11 @@ zfs_freebsd_rename(ap) > > ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART)); > > ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART)); > > =20 > > - error =3D zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, > > - ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); > > + if (fdvp->v_mount =3D=3D tdvp->v_mount) > > + error =3D zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, > > + ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); > > + else > > + error =3D EXDEV; > > =20 > > if (tdvp =3D=3D tvp) > > VN_RELE(tdvp); >=20 > So, I am still not sure if that is important or not, but this change stil= l misses > (tvp && (fvp->v_mount !=3D tvp->v_mount)) > check as found in ufs_rename. Yes, it is important. This is the case where 'fvp' represents a directory and 'tvp' also represents an existing directory. It is then possible that tdvp and tvp belong to different mount points. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --IiVenqGWf+H9Y6IX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlInz7QACgkQForvXbEpPzRPygCg5RH/ZkMzwZvBcSgHRnWJoa7w uv8AoJmb2IuWt0BHa3FfWect2u/ZTuzH =gFKN -----END PGP SIGNATURE----- --IiVenqGWf+H9Y6IX-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 00:38:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 295EF88D; Thu, 5 Sep 2013 00:38:54 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 17C57260B; Thu, 5 Sep 2013 00:38:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r850crIS078001; Thu, 5 Sep 2013 00:38:53 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r850crjB078000; Thu, 5 Sep 2013 00:38:53 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309050038.r850crjB078000@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Sep 2013 00:38:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255223 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 00:38:54 -0000 Author: pjd Date: Thu Sep 5 00:38:53 2013 New Revision: 255223 URL: http://svnweb.freebsd.org/changeset/base/255223 Log: Remove trailing comma. Modified: head/share/man/man4/capsicum.4 Modified: head/share/man/man4/capsicum.4 ============================================================================== --- head/share/man/man4/capsicum.4 Thu Sep 5 00:19:30 2013 (r255222) +++ head/share/man/man4/capsicum.4 Thu Sep 5 00:38:53 2013 (r255223) @@ -100,7 +100,7 @@ associated with file descriptors; descri .Xr read 2 , .Xr shm_open 2 , .Xr write 2 , -.Xr procdesc 4 , +.Xr procdesc 4 .Sh HISTORY .Nm first appeared in From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 00:41:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 49ACEA94; Thu, 5 Sep 2013 00:41:08 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 19D742647; Thu, 5 Sep 2013 00:41:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r850f79c081138; Thu, 5 Sep 2013 00:41:07 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r850f7GQ081137; Thu, 5 Sep 2013 00:41:07 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309050041.r850f7GQ081137@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Sep 2013 00:41:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255224 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 00:41:08 -0000 Author: pjd Date: Thu Sep 5 00:41:07 2013 New Revision: 255224 URL: http://svnweb.freebsd.org/changeset/base/255224 Log: Add missing '2'. Modified: head/share/man/man4/procdesc.4 Modified: head/share/man/man4/procdesc.4 ============================================================================== --- head/share/man/man4/procdesc.4 Thu Sep 5 00:38:53 2013 (r255223) +++ head/share/man/man4/procdesc.4 Thu Sep 5 00:41:07 2013 (r255224) @@ -68,7 +68,7 @@ Given a process descriptor, it is possib .Xr pdfork 2 , .Xr pdgetpid 2 , .Xr pdkill 2 , -.Xr pdwait4 , +.Xr pdwait4 2 , .Xr capsicum 4 .Sh HISTORY .Nm From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 00:44:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 667CEC3B; Thu, 5 Sep 2013 00:44:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EECA62667; Thu, 5 Sep 2013 00:44:35 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r850iUb7073565; Thu, 5 Sep 2013 03:44:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r850iUb7073565 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r850iUZu073564; Thu, 5 Sep 2013 03:44:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 5 Sep 2013 03:44:30 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r255192 - in head: contrib/binutils/gas/config contrib/binutils/opcodes sys/amd64/amd64 Message-ID: <20130905004430.GM41229@kib.kiev.ua> References: <201309032121.r83LLlI5026519@svn.freebsd.org> <20130904042535.GX41229@kib.kiev.ua> <201309040756.45464.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KQVDJCmBkPV8WfA9" Content-Disposition: inline In-Reply-To: <201309040756.45464.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 00:44:36 -0000 --KQVDJCmBkPV8WfA9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 04, 2013 at 07:56:45AM -0400, John Baldwin wrote: > On Wednesday, September 04, 2013 12:25:35 am Konstantin Belousov wrote: > > On Tue, Sep 03, 2013 at 09:21:47PM +0000, John Baldwin wrote: > > > Author: jhb > > > Date: Tue Sep 3 21:21:47 2013 > > > New Revision: 255192 > > > URL: http://svnweb.freebsd.org/changeset/base/255192 > > >=20 > > > Log: > > > Add support for the 'invpcid' instruction to binutils and DDB's > > > disassembler on amd64. > > > =20 > > > MFC after: 1 month > >=20 > > Nice, thank you. > >=20 > > Do you agree with me that it is premature to start using the mnemonics > > in the kernel source until the changes are merged into stable/9 at leas= t ? >=20 > That is fine. Can you test that using them directly works fine with GCC? > I know clang already supported this instruction. Hmm, tried make buildkernel CC=3Dgcc for the world (and builworld area) built after your commit. I get gcc -c -x assembler-with-cpp -DLOCORE -O2 -frename-registers -pipe -fno-str= ict-a liasing -std=3Dc99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-pr= ototype s -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-= point er-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-opti= on =20 -nostdinc -I. -I/usr/home/kostik/work/build/bsd/DEV/src/sys -I/usr/home/ko= stik/ work/build/bsd/DEV/src/sys/contrib/altq -I/usr/home/kostik/work/build/bsd/D= EV/sr c/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_gl= obal. h -fno-common -finline-limit=3D8000 --param inline-unit-growth=3D100 --para= m large-f unction-growth=3D1000 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer= -mcmod el=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous= -unwind -tables -ffreestanding -fstack-protector -Werror /usr/home/kostik/work/bui= ld/bsd/DEV/src/sys/amd64/amd64/exception.S /usr/home/kostik/work/build/bsd/DEV/src/sys/amd64/amd64/apic_vector.S: Asse= mbler messages: /usr/home/kostik/work/build/bsd/DEV/src/sys/amd64/amd64/apic_vector.S:224: = Error: no such instruction: `invpcid (%rdx),%rax' /usr/home/kostik/work/build/bsd/DEV/src/sys/amd64/amd64/apic_vector.S:312: = Error: no such instruction: `invpcid (%rdx),%rax' /usr/home/kostik/work/build/bsd/DEV/src/sys/amd64/amd64/apic_vector.S:409: = Error: no such instruction: `invpcid (%rdx),%rax' *** Error code 1 On the other hand, with the target machine, I successfully did the config/make style of the kernel build and verified that the assembled byte sequences for the invpcid are the same as manually assembled. I have no haswell machine to test this at runtime, but I believe that what was done is enough. diff --git a/sys/amd64/amd64/apic_vector.S b/sys/amd64/amd64/apic_vector.S index d002b4d..0e00549 100644 --- a/sys/amd64/amd64/apic_vector.S +++ b/sys/amd64/amd64/apic_vector.S @@ -221,8 +221,7 @@ IDTVEC(invltlb_pcid) je 1f /* Use invpcid if available. */ movl $1,%eax /* INVPCID_CTX */ - /* invpcid (%rdx),%rax */ - .byte 0x66,0x0f,0x38,0x82,0x02 + invpcid (%rdx),%rax jmp invltlb_ret_clear_pm_save 1: /* Otherwise reload %cr3 twice. */ @@ -309,8 +308,7 @@ IDTVEC(invlpg_pcid) */ 2: xorl %eax,%eax -/* invpcid (%rdx),%rax */ - .byte 0x66,0x0f,0x38,0x82,0x02 + invpcid (%rdx),%rax jmp invltlb_ret_rdx =20 /* @@ -406,8 +404,7 @@ invlrng_invpcid: subq %rax,%rcx shrq $PAGE_SHIFT,%rcx 1: -// invpcid (%rdx),%rax - .byte 0x66,0x0f,0x38,0x82,0x02 + invpcid (%rdx),%rax addq $PAGE_SIZE,8(%rsp) dec %rcx jne 1b diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index 3d381c6..f1b8209 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -487,9 +487,8 @@ static __inline void invpcid(struct invpcid_descr *d, int type) { =20 - /* invpcid (%rdx),%rax */ - __asm __volatile(".byte 0x66,0x0f,0x38,0x82,0x02" - : : "d" (d), "a" ((u_long)type) : "memory"); + __asm __volatile("invpcid (%0),%1" + : : "r" (d), "r" ((u_long)type) : "memory"); } =20 static __inline u_short --KQVDJCmBkPV8WfA9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSJ9PtAAoJEJDCuSvBvK1B/9QP/3Tex+554ueh15zJUeuw0AXd 5e9/r9h7SeNeZEX8yOJIjYyHVQxvVRv13yLGFrekQSBriTU0MH8IX4OapdJGkYGy uwlt1a6HXOReYmPxFwuczt7JS/RajqhADc76X6qfa2VLaVewLMM2DhN4kY7JPaLZ Yoq/7Iam3nMvYCVf39JTacyqOxXYsAhEAKOFfH77tfKKAUlmHgWbVhNxFqTiZaNZ OWXRhnaUggJ0Vf0wWMoYou9UkoxjzN72UtluZyo5fICJDJdtG/zHUZAWgo6k2sfZ vNzWydvdO73tT8bp8rgjneu+Q7+9MOffmw56ENzVQF12HQBmFjlElRM1w/FQikVx S6fbQOnogoQy7BmRmqqxA3b7rRE44OAwai2qXgCCKvkKT0CGqtO978C/dPT5Ke/P SI1fvZHYZy7H6o8TuOBSase9W5dkV/8qcD8gkAnHTfEqpOgXiZmPKFingFw/2GeN 4vj0YFByiElOLheQhq0QTKXBdr54G50A8H/A2wVa4AkUUGqp8Fxtr5NcN5KGQ0Qc TwNnsDafVnQSYNm4gGydEUUT/XPn1NQ9Be+hkMoJENBIT+5E6vRajz3XAwnkSop3 VtZ8LtdnhuRdr/QSYSgKK0FWp/eK73BFdPFbn3FsjFXP3U2qr2EwpeJ+98Xly7rS QwAthbt0hsAcK82siEMf =LTI9 -----END PGP SIGNATURE----- --KQVDJCmBkPV8WfA9-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 00:52:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 74EB7FC2; Thu, 5 Sep 2013 00:52:17 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6304626D6; Thu, 5 Sep 2013 00:52:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r850qHpT086960; Thu, 5 Sep 2013 00:52:17 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r850qHat086959; Thu, 5 Sep 2013 00:52:17 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309050052.r850qHat086959@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Sep 2013 00:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255225 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 00:52:17 -0000 Author: pjd Date: Thu Sep 5 00:52:16 2013 New Revision: 255225 URL: http://svnweb.freebsd.org/changeset/base/255225 Log: Advise a full buildworld, because of the recent Capsicum changes. Sponsored by: The FreeBSD Foundation Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Sep 5 00:41:07 2013 (r255224) +++ head/UPDATING Thu Sep 5 00:52:16 2013 (r255225) @@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130905: + The API and ABI related to the Capsicum framework was modified + in backward incompatible way. The userland libraries and programs + have to be recompiled to work with the new kernel. This includes the + following libraries and programs, but the whole buildworld is + advised: libc, libprocstat, dhclient, tcpdump, hastd, hastctl, + kdump, procstat, rwho, rwhod, uniq. + 20130827: Thomas Dickey (vendor author thereof) reports that dialog(1) since 2011/10/18 has a bug in handling --hline. Testers and I noticed the From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 00:53:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D6EE41C2; Thu, 5 Sep 2013 00:53:01 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C49D126E2; Thu, 5 Sep 2013 00:53:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r850r1s7087365; Thu, 5 Sep 2013 00:53:01 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r850r1w2087363; Thu, 5 Sep 2013 00:53:01 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309050053.r850r1w2087363@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Sep 2013 00:53:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255226 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 00:53:01 -0000 Author: pjd Date: Thu Sep 5 00:53:01 2013 New Revision: 255226 URL: http://svnweb.freebsd.org/changeset/base/255226 Log: Add sysctl/tunables for various metaslab variables. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Thu Sep 5 00:52:16 2013 (r255225) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Thu Sep 5 00:53:01 2013 (r255226) @@ -32,6 +32,9 @@ #include #include +SYSCTL_DECL(_vfs_zfs); +SYSCTL_NODE(_vfs_zfs, OID_AUTO, metaslab, CTLFLAG_RW, 0, "ZFS metaslab"); + /* * Allow allocations to switch to gang blocks quickly. We do this to * avoid having to load lots of space_maps in a given txg. There are, @@ -46,6 +49,10 @@ uint64_t metaslab_aliquot = 512ULL << 10; uint64_t metaslab_gang_bang = SPA_MAXBLOCKSIZE + 1; /* force gang blocks */ +TUNABLE_QUAD("vfs.zfs.metaslab.gang_bang", &metaslab_gang_bang); +SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, gang_bang, CTLFLAG_RWTUN, + &metaslab_gang_bang, 0, + "Force gang block allocation for blocks larger than or equal to this value"); /* * The in-core space map representation is more compact than its on-disk form. @@ -61,17 +68,19 @@ int zfs_condense_pct = 200; * allocations on that device. */ int zfs_mg_alloc_failures = 0; - -SYSCTL_DECL(_vfs_zfs); -SYSCTL_INT(_vfs_zfs, OID_AUTO, mg_alloc_failures, CTLFLAG_RDTUN, +TUNABLE_INT("vfs.zfs.mg_alloc_failures", &zfs_mg_alloc_failures); +SYSCTL_INT(_vfs_zfs, OID_AUTO, mg_alloc_failures, CTLFLAG_RWTUN, &zfs_mg_alloc_failures, 0, "Number of allowed allocation failures per vdev"); -TUNABLE_INT("vfs.zfs.mg_alloc_failures", &zfs_mg_alloc_failures); /* * Metaslab debugging: when set, keeps all space maps in core to verify frees. */ static int metaslab_debug = 0; +TUNABLE_INT("vfs.zfs.metaslab.debug", &metaslab_debug); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, debug, CTLFLAG_RWTUN, &metaslab_debug, + 0, + "Metaslab debugging: when set, keeps all space maps in core to verify frees"); /* * Minimum size which forces the dynamic allocator to change @@ -80,6 +89,11 @@ static int metaslab_debug = 0; * aggressive strategy (i.e search by size rather than offset). */ uint64_t metaslab_df_alloc_threshold = SPA_MAXBLOCKSIZE; +TUNABLE_QUAD("vfs.zfs.metaslab.df_alloc_threshold", + &metaslab_df_alloc_threshold); +SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, df_alloc_threshold, CTLFLAG_RWTUN, + &metaslab_df_alloc_threshold, 0, + "Minimum size which forces the dynamic allocator to change it's allocation strategy"); /* * The minimum free space, in percent, which must be available @@ -88,22 +102,37 @@ uint64_t metaslab_df_alloc_threshold = S * switch to using best-fit allocations. */ int metaslab_df_free_pct = 4; +TUNABLE_INT("vfs.zfs.metaslab.df_free_pct", &metaslab_df_free_pct); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, df_free_pct, CTLFLAG_RWTUN, + &metaslab_df_free_pct, 0, + "The minimum free space, in percent, which must be available in a space map to continue allocations in a first-fit fashion"); /* * A metaslab is considered "free" if it contains a contiguous * segment which is greater than metaslab_min_alloc_size. */ uint64_t metaslab_min_alloc_size = DMU_MAX_ACCESS; +TUNABLE_QUAD("vfs.zfs.metaslab.min_alloc_size", + &metaslab_min_alloc_size); +SYSCTL_QUAD(_vfs_zfs_metaslab, OID_AUTO, min_alloc_size, CTLFLAG_RWTUN, + &metaslab_min_alloc_size, 0, + "A metaslab is considered \"free\" if it contains a contiguous segment which is greater than vfs.zfs.metaslab.min_alloc_size"); /* * Max number of space_maps to prefetch. */ int metaslab_prefetch_limit = SPA_DVAS_PER_BP; +TUNABLE_INT("vfs.zfs.metaslab.prefetch_limit", &metaslab_prefetch_limit); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, prefetch_limit, CTLFLAG_RWTUN, + &metaslab_prefetch_limit, 0, "Maximum number of space_maps to prefetch"); /* * Percentage bonus multiplier for metaslabs that are in the bonus area. */ int metaslab_smo_bonus_pct = 150; +TUNABLE_INT("vfs.zfs.metaslab.smo_bonus_pct", &metaslab_smo_bonus_pct); +SYSCTL_INT(_vfs_zfs_metaslab, OID_AUTO, smo_bonus_pct, CTLFLAG_RWTUN, + &metaslab_smo_bonus_pct, 0, "Maximum number of space_maps to prefetch"); /* * Should we be willing to write data to degraded vdevs? From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 01:05:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C44C484C; Thu, 5 Sep 2013 01:05:49 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 983AF27CE; Thu, 5 Sep 2013 01:05:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8515n88094358; Thu, 5 Sep 2013 01:05:49 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8515nf3094355; Thu, 5 Sep 2013 01:05:49 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309050105.r8515nf3094355@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Sep 2013 01:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255227 - in head: . usr.sbin/rwhod X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 01:05:49 -0000 Author: pjd Date: Thu Sep 5 01:05:48 2013 New Revision: 255227 URL: http://svnweb.freebsd.org/changeset/base/255227 Log: Remove fallback to fork(2) if pdfork(2) is not available. If the parent process dies, the process descriptor will be closed and pdfork(2)ed child will be killed, which is not the case when regular fork(2) is used. The PROCDESC option is now part of the GENERIC kernel configuration, so we can start depending on it. Add UPDATING entry to inform that this option is now required and log detailed instruction to syslog if pdfork(2) is not available: The pdfork(2) system call is not available; recompile the kernel with options PROCDESC Submitted by: Mariusz Zaborski Sponsored by: Google Summer of Code 2013 Modified: head/UPDATING head/usr.sbin/rwhod/rwhod.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Sep 5 00:53:01 2013 (r255226) +++ head/UPDATING Thu Sep 5 01:05:48 2013 (r255227) @@ -32,6 +32,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20130905: + The PROCDESC kernel option is now part of the GENERIC kernel + configuration and is required for the rwhod(8) to work. + If you are using custom kernel configuration, you should include + 'options PROCDESC'. + +20130905: The API and ABI related to the Capsicum framework was modified in backward incompatible way. The userland libraries and programs have to be recompiled to work with the new kernel. This includes the Modified: head/usr.sbin/rwhod/rwhod.c ============================================================================== --- head/usr.sbin/rwhod/rwhod.c Thu Sep 5 00:53:01 2013 (r255226) +++ head/usr.sbin/rwhod/rwhod.c Thu Sep 5 01:05:48 2013 (r255227) @@ -274,21 +274,17 @@ main(int argc, char *argv[]) exit(1); if (!quiet_mode) { pid_child_receiver = pdfork(&fdp, 0); - if (pid_child_receiver == -1) { - if (errno != ENOSYS) { - syslog(LOG_ERR, "pdfork: %m"); - exit(1); - } else { - pid_child_receiver = fork(); - fdp = -1; - } - } if (pid_child_receiver == 0) { receiver_process(); } else if (pid_child_receiver > 0) { sender_process(); } else if (pid_child_receiver == -1) { - syslog(LOG_ERR, "pdfork: %m"); + if (errno == ENOSYS) { + syslog(LOG_ERR, + "The pdfork(2) system call is not available; recompile the kernel with options PROCDESC"); + } else { + syslog(LOG_ERR, "pdfork: %m"); + } exit(1); } } else { From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 01:13:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4560CB57; Thu, 5 Sep 2013 01:13:27 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 33647284C; Thu, 5 Sep 2013 01:13:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r851DQnN099425; Thu, 5 Sep 2013 01:13:26 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r851DQ6O099424; Thu, 5 Sep 2013 01:13:26 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201309050113.r851DQ6O099424@svn.freebsd.org> From: Justin Hibbits Date: Thu, 5 Sep 2013 01:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255228 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 01:13:27 -0000 Author: jhibbits Date: Thu Sep 5 01:13:26 2013 New Revision: 255228 URL: http://svnweb.freebsd.org/changeset/base/255228 Log: Fix the build. Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_powerpc.c Thu Sep 5 01:05:48 2013 (r255227) +++ head/sys/dev/hwpmc/hwpmc_powerpc.c Thu Sep 5 01:13:26 2013 (r255228) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); #define INKERNEL(x) (((vm_offset_t)(x)) <= VM_MAX_KERNEL_ADDRESS && \ ((vm_offset_t)(x)) >= VM_MIN_KERNEL_ADDRESS) +struct powerpc_cpu **powerpc_pcpu; + int pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, struct trapframe *tf) From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 01:20:42 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D43B2DC3; Thu, 5 Sep 2013 01:20:42 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D607028CF; Thu, 5 Sep 2013 01:20:41 +0000 (UTC) Received: from alph.d.allbsd.org (p2049-ipbf1102funabasi.chiba.ocn.ne.jp [122.26.101.49]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r851KL4d093611 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 5 Sep 2013 10:20:31 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r851KK5U015566; Thu, 5 Sep 2013 10:20:21 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 05 Sep 2013 10:20:13 +0900 (JST) Message-Id: <20130905.102013.1604548446233669011.hrs@allbsd.org> To: pjd@FreeBSD.org Subject: Re: svn commit: r255227 - in head: . usr.sbin/rwhod From: Hiroki Sato In-Reply-To: <201309050105.r8515nf3094355@svn.freebsd.org> References: <201309050105.r8515nf3094355@svn.freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Thu_Sep__5_10_20_13_2013_339)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Thu, 05 Sep 2013 10:20:31 +0900 (JST) X-Spam-Status: No, score=-90.6 required=13.0 tests=CONTENT_TYPE_PRESENT, DIRECTOCNDYN,DYN_PBL,RCVD_IN_PBL,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 01:20:42 -0000 ----Security_Multipart(Thu_Sep__5_10_20_13_2013_339)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Pawel Jakub Dawidek wrote in <201309050105.r8515nf3094355@svn.freebsd.org>: pj> Author: pjd pj> Date: Thu Sep 5 01:05:48 2013 pj> New Revision: 255227 pj> URL: http://svnweb.freebsd.org/changeset/base/255227 pj> pj> Log: pj> Remove fallback to fork(2) if pdfork(2) is not available. If the parent pj> process dies, the process descriptor will be closed and pdfork(2)ed child pj> will be killed, which is not the case when regular fork(2) is used. pj> pj> The PROCDESC option is now part of the GENERIC kernel configuration, so we pj> can start depending on it. pj> pj> Add UPDATING entry to inform that this option is now required and log pj> detailed instruction to syslog if pdfork(2) is not available: pj> pj> The pdfork(2) system call is not available; recompile the kernel with options PROCDESC pj> pj> Submitted by: Mariusz Zaborski pj> Sponsored by: Google Summer of Code 2013 Is there any reason to keep PROCDESC as an option? -- Hiroki ----Security_Multipart(Thu_Sep__5_10_20_13_2013_339)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlIn3E4ACgkQTyzT2CeTzy02OgCfU+1gx/m1Tv5TeAHHCiu8SdxW BPcAoI4vnPkmCv6O4g9k7GrR3knxmb8w =exe+ -----END PGP SIGNATURE----- ----Security_Multipart(Thu_Sep__5_10_20_13_2013_339)---- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 02:44:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BAC14E5B; Thu, 5 Sep 2013 02:44:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5711C2E72; Thu, 5 Sep 2013 02:44:53 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r852imr1004384; Thu, 5 Sep 2013 05:44:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r852imr1004384 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r852imtU004383; Thu, 5 Sep 2013 05:44:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 5 Sep 2013 05:44:48 +0300 From: Konstantin Belousov To: Pawel Jakub Dawidek Subject: Re: svn commit: r255219 - in head: contrib/tcpdump lib/libc lib/libc/capability lib/libc/include lib/libc/sys lib/libprocstat sbin/dhclient sbin/hastd sys/amd64/linux32 sys/bsm sys/cddl/compat/opensola... Message-ID: <20130905024448.GO41229@kib.kiev.ua> References: <201309050009.r8509vsE061271@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h/ohfBjN02kAJu/T" Content-Disposition: inline In-Reply-To: <201309050009.r8509vsE061271@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 02:44:53 -0000 --h/ohfBjN02kAJu/T Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 05, 2013 at 12:09:57AM +0000, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Thu Sep 5 00:09:56 2013 > New Revision: 255219 > URL: http://svnweb.freebsd.org/changeset/base/255219 Shortly after the boot of the updated kernel, I get: Fatal trap 12: page fault while in kernel mode cpuid = 7; apic id = 07 fault virtual address = 0x0 fault code = supervisor read data, page not present instruction pointer = 0x20:0xffffffff802f685a stack pointer = 0x28:0xfffffe0235d50460 frame pointer = 0x28:0xfffffe0235d504b0 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 199 (ip6addrctl) [ thread pid 199 tid 100086 ] Stopped at 0xffffffff802f685a = fget+0x2a: movq (%rdx),%rax db> bt Tracing pid 199 tid 100086 td 0xfffff80005351980 fget() at 0xffffffff802f685a = fget+0x2a/frame 0xfffffe0235d504b0 fdesc_lookup() at 0xffffffff80e6d88d = fdesc_lookup+0xed/frame 0xfffffe0235d50510 VOP_LOOKUP_APV() at 0xffffffff8057b54e = VOP_LOOKUP_APV+0x12e/frame 0xfffffe0235d50560 lookup() at 0xffffffff803d31b0 = lookup+0x5a0/frame 0xfffffe0235d505f0 namei() at 0xffffffff803d2934 = namei+0x464/frame 0xfffffe0235d506c0 vn_open_cred() at 0xffffffff803ee78f = vn_open_cred+0x27f/frame 0xfffffe0235d50810 kern_openat() at 0xffffffff803e7bfd = kern_openat+0x22d/frame 0xfffffe0235d50980 amd64_syscall() at 0xffffffff805387dd = amd64_syscall+0x28d/frame 0xfffffe0235d50ab0 Xfast_syscall() at 0xffffffff8051f21b = Xfast_syscall+0xfb/frame 0xfffffe0235d50ab0 --- syscall (5, FreeBSD ELF64, sys_open), rip = 0x800942d6a, rsp = 0x7fffffffcff8, rbp = 0x7fffffffd030 --- (gdb) list *fget+0x2a 0xffffffff802f685a is in fget (/usr/home/kostik/work/build/bsd/DEV/src/sys/kern/kern_descrip.c:2385). I do not have any capsicum-related options in the kernel config. --h/ohfBjN02kAJu/T Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSJ/AfAAoJEJDCuSvBvK1BGMIP/RM8mXA27ve/wVhdyKoahCeA jT7UUJuYWGNyhGzMlsb8WkgwZyN9hTqVLGwZqCTxLaMPPLVfZSdikh2jUrHC9h/Y ZzzRzRh2kwouskipxYImIyZMt5vCngK5k6XcAxBiL7qJMljydN+ls9CXCIsJtjcG b+YVuwLR3Vp5lH9K+K/vNKAZBKTVIxiGHloT84H8d/+OUOR1UhWti+sWQcye9ocP OAgcCpdxVIYk3GWmCkSaLTuCZFkjlDYMBqs/9p7T9M3Q0RESfQB6hPDh+MKi75dU gsLREyiu4UBaubyRDdrBSul95VKO4V7+z+kGy0a7TmkWRPoeZqyU1hKwKMba5pjr +ON7rb1LfGGery9JkHHSFz36XLCCzStjLbUhQssZma9LTuZ8R+LBo5pIvfnId0nm AQfrGfFckoZsSMgd0dmJkKIesDbtA8e/ylbSKmoED6M5X7+gory6hTNlRHmxqZUy tgiJHIELdT5Hgbh/DYhejsKm72KACRjIqabvEcxhkJ3aD4g3CyOfXRRgwI0oTVd0 I63GQsA7eXPGfTNlJH/Tm+Bdc1gHCL06TkY/0ksyhF/24UixhQiAzJ6XqeTv11wR LxyxHQFirrExktpU8X8e3czMiKFw0KlSQB7mTq1TnU/6Qtw5MSXScegx0zgTB5QX iN+VGZZwL/OlCggbIWeg =gf4F -----END PGP SIGNATURE----- --h/ohfBjN02kAJu/T-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 03:36:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BB60A71D; Thu, 5 Sep 2013 03:36:57 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A8DCB2302; Thu, 5 Sep 2013 03:36:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r853avLg082521; Thu, 5 Sep 2013 03:36:57 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r853av1T082520; Thu, 5 Sep 2013 03:36:57 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201309050336.r853av1T082520@svn.freebsd.org> From: Sean Bruno Date: Thu, 5 Sep 2013 03:36:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255229 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 03:36:57 -0000 Author: sbruno Date: Thu Sep 5 03:36:57 2013 New Revision: 255229 URL: http://svnweb.freebsd.org/changeset/base/255229 Log: This looks like a typo that breaks the build. Yell at me if this isn't the intended declaration. Modified: head/sys/kern/sys_capability.c Modified: head/sys/kern/sys_capability.c ============================================================================== --- head/sys/kern/sys_capability.c Thu Sep 5 01:13:26 2013 (r255228) +++ head/sys/kern/sys_capability.c Thu Sep 5 03:36:57 2013 (r255229) @@ -576,7 +576,7 @@ sys_cap_rights_limit(struct thread *td, } int -sys___cap_rights_get(struct thread *td, struct cap___rights_get_args *uap) +sys___cap_rights_get(struct thread *td, struct __cap_rights_get_args *uap) { return (ENOSYS); From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 03:46:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CB00BE2A; Thu, 5 Sep 2013 03:46:44 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B80E023C9; Thu, 5 Sep 2013 03:46:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r853kism088098; Thu, 5 Sep 2013 03:46:44 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r853kiXC088097; Thu, 5 Sep 2013 03:46:44 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201309050346.r853kiXC088097@svn.freebsd.org> From: Sean Bruno Date: Thu, 5 Sep 2013 03:46:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255230 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 03:46:44 -0000 Author: sbruno Date: Thu Sep 5 03:46:44 2013 New Revision: 255230 URL: http://svnweb.freebsd.org/changeset/base/255230 Log: Restore builds on architectures that don't support CAPABILITIES (mips). Modified: head/sys/kern/sys_generic.c Modified: head/sys/kern/sys_generic.c ============================================================================== --- head/sys/kern/sys_generic.c Thu Sep 5 03:36:57 2013 (r255229) +++ head/sys/kern/sys_generic.c Thu Sep 5 03:46:44 2013 (r255230) @@ -1368,7 +1368,9 @@ pollrescan(struct thread *td) struct filedesc *fdp; struct file *fp; struct pollfd *fd; +#ifdef CAPABILITIES cap_rights_t rights; +#endif int n; n = 0; @@ -1444,7 +1446,9 @@ pollscan(td, fds, nfd) { struct filedesc *fdp = td->td_proc->p_fd; struct file *fp; +#ifdef CAPABILITIES cap_rights_t rights; +#endif int i, n = 0; FILEDESC_SLOCK(fdp); From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 05:51:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 899864B4; Thu, 5 Sep 2013 05:51:16 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 76A6A2C32; Thu, 5 Sep 2013 05:51:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r855pGwE060847; Thu, 5 Sep 2013 05:51:16 GMT (envelope-from se@svn.freebsd.org) Received: (from se@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r855pGtj060845; Thu, 5 Sep 2013 05:51:16 GMT (envelope-from se@svn.freebsd.org) Message-Id: <201309050551.r855pGtj060845@svn.freebsd.org> From: Stefan Esser Date: Thu, 5 Sep 2013 05:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255232 - head/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 05:51:16 -0000 Author: se Date: Thu Sep 5 05:51:15 2013 New Revision: 255232 URL: http://svnweb.freebsd.org/changeset/base/255232 Log: Fix file selection logic for the RCS/SCCS case, as was done for the simple file case before. Bump version because of the changed behavior, which now matches the documentation. Reviewed by: pfg Modified: head/usr.bin/patch/pch.c head/usr.bin/patch/util.c Modified: head/usr.bin/patch/pch.c ============================================================================== --- head/usr.bin/patch/pch.c Thu Sep 5 04:00:48 2013 (r255231) +++ head/usr.bin/patch/pch.c Thu Sep 5 05:51:15 2013 (r255232) @@ -1516,15 +1516,12 @@ posix_name(const struct file_name *names return path ? savestr(path) : NULL; } -/* - * Choose the name of the file to be patched based the "best" one - * available. - */ static char * -best_name(const struct file_name *names, bool assume_exists) +compare_names(const struct file_name *names, bool assume_exists, int phase) { size_t min_components, min_baselen, min_len, tmp; char *best = NULL; + char *path; int i; /* @@ -1536,47 +1533,43 @@ best_name(const struct file_name *names, */ min_components = min_baselen = min_len = SIZE_MAX; for (i = INDEX_FILE; i >= OLD_FILE; i--) { - if (names[i].path == NULL || - (!names[i].exists && !assume_exists)) + path = names[i].path; + if (path == NULL || + (phase == 1 && !names[i].exists && !assume_exists) || + (phase == 2 && checked_in(path) == NULL)) continue; - if ((tmp = num_components(names[i].path)) > min_components) + if ((tmp = num_components(path)) > min_components) continue; if (tmp < min_components) { min_components = tmp; - best = names[i].path; + best = path; } - if ((tmp = strlen(basename(names[i].path))) > min_baselen) + if ((tmp = strlen(basename(path))) > min_baselen) continue; if (tmp < min_baselen) { min_baselen = tmp; - best = names[i].path; + best = path; } - if ((tmp = strlen(names[i].path)) > min_len) + if ((tmp = strlen(path)) > min_len) continue; min_len = tmp; - best = names[i].path; + best = path; } + return best; +} + +/* + * Choose the name of the file to be patched based the "best" one + * available. + */ +static char * +best_name(const struct file_name *names, bool assume_exists) +{ + char *best; + + best = compare_names(names, assume_exists, 1); if (best == NULL) { - /* - * No files found, look for something we can checkout from - * RCS/SCCS dirs. Logic is identical to that above... - */ - min_components = min_baselen = min_len = SIZE_MAX; - for (i = INDEX_FILE; i >= OLD_FILE; i--) { - if (names[i].path == NULL || - checked_in(names[i].path) == NULL) - continue; - if ((tmp = num_components(names[i].path)) > min_components) - continue; - min_components = tmp; - if ((tmp = strlen(basename(names[i].path))) > min_baselen) - continue; - min_baselen = tmp; - if ((tmp = strlen(names[i].path)) > min_len) - continue; - min_len = tmp; - best = names[i].path; - } + best = compare_names(names, assume_exists, 2); /* * Still no match? Check to see if the diff could be creating * a new file. Modified: head/usr.bin/patch/util.c ============================================================================== --- head/usr.bin/patch/util.c Thu Sep 5 04:00:48 2013 (r255231) +++ head/usr.bin/patch/util.c Thu Sep 5 05:51:15 2013 (r255232) @@ -412,7 +412,7 @@ checked_in(char *file) void version(void) { - fprintf(stderr, "patch 2.0-12u8 FreeBSD\n"); + fprintf(stderr, "patch 2.0-12u9 FreeBSD\n"); my_exit(EXIT_SUCCESS); } From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 06:12:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D7EF1BDF; Thu, 5 Sep 2013 06:12:44 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 9D84B2D5B; Thu, 5 Sep 2013 06:12:44 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 90F6AEA4; Thu, 5 Sep 2013 08:07:15 +0200 (CEST) Date: Thu, 5 Sep 2013 08:12:50 +0200 From: Pawel Jakub Dawidek To: Sean Bruno Subject: Re: svn commit: r255230 - head/sys/kern Message-ID: <20130905061250.GC1388@garage.freebsd.pl> References: <201309050346.r853kiXC088097@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ABTtc+pdwF7KHXCz" Content-Disposition: inline In-Reply-To: <201309050346.r853kiXC088097@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 06:12:44 -0000 --ABTtc+pdwF7KHXCz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 05, 2013 at 03:46:44AM +0000, Sean Bruno wrote: > Author: sbruno > Date: Thu Sep 5 03:46:44 2013 > New Revision: 255230 > URL: http://svnweb.freebsd.org/changeset/base/255230 >=20 > Log: > Restore builds on architectures that don't support CAPABILITIES (mips). Thanks for both fixes! > Modified: > head/sys/kern/sys_generic.c >=20 > Modified: head/sys/kern/sys_generic.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/sys_generic.c Thu Sep 5 03:36:57 2013 (r255229) > +++ head/sys/kern/sys_generic.c Thu Sep 5 03:46:44 2013 (r255230) > @@ -1368,7 +1368,9 @@ pollrescan(struct thread *td) > struct filedesc *fdp; > struct file *fp; > struct pollfd *fd; > +#ifdef CAPABILITIES > cap_rights_t rights; > +#endif > int n; > =20 > n =3D 0; > @@ -1444,7 +1446,9 @@ pollscan(td, fds, nfd) > { > struct filedesc *fdp =3D td->td_proc->p_fd; > struct file *fp; > +#ifdef CAPABILITIES > cap_rights_t rights; > +#endif > int i, n =3D 0; > =20 > FILEDESC_SLOCK(fdp); --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --ABTtc+pdwF7KHXCz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlIoIOIACgkQForvXbEpPzTCIwCfXYcZ+mUECmsmZHeSimcgBc46 j9cAn02sw7eqn8wy+fn3F+EI9vmL1wKu =hUHn -----END PGP SIGNATURE----- --ABTtc+pdwF7KHXCz-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 06:14:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A6CA7D5B; Thu, 5 Sep 2013 06:14:23 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 6AA042D6E; Thu, 5 Sep 2013 06:14:23 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id AE65CEA6; Thu, 5 Sep 2013 08:08:54 +0200 (CEST) Date: Thu, 5 Sep 2013 08:14:29 +0200 From: Pawel Jakub Dawidek To: Konstantin Belousov Subject: Re: svn commit: r255219 - in head: contrib/tcpdump lib/libc lib/libc/capability lib/libc/include lib/libc/sys lib/libprocstat sbin/dhclient sbin/hastd sys/amd64/linux32 sys/bsm sys/cddl/compat/opensola... Message-ID: <20130905061429.GD1388@garage.freebsd.pl> References: <201309050009.r8509vsE061271@svn.freebsd.org> <20130905024448.GO41229@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gE7i1rD7pdK0Ng3j" Content-Disposition: inline In-Reply-To: <20130905024448.GO41229@kib.kiev.ua> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 06:14:23 -0000 --gE7i1rD7pdK0Ng3j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 05, 2013 at 05:44:48AM +0300, Konstantin Belousov wrote: > On Thu, Sep 05, 2013 at 12:09:57AM +0000, Pawel Jakub Dawidek wrote: > > Author: pjd > > Date: Thu Sep 5 00:09:56 2013 > > New Revision: 255219 > > URL: http://svnweb.freebsd.org/changeset/base/255219 >=20 > Shortly after the boot of the updated kernel, I get: >=20 > Fatal trap 12: page fault while in kernel mode > cpuid =3D 7; apic id =3D 07 > fault virtual address =3D 0x0 > fault code =3D supervisor read data, page not present > instruction pointer =3D 0x20:0xffffffff802f685a > stack pointer =3D 0x28:0xfffffe0235d50460 > frame pointer =3D 0x28:0xfffffe0235d504b0 > code segment =3D base 0x0, limit 0xfffff, type 0x1b > =3D DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags =3D interrupt enabled, resume, IOPL =3D 0 > current process =3D 199 (ip6addrctl) > [ thread pid 199 tid 100086 ] > Stopped at 0xffffffff802f685a =3D fget+0x2a: movq (%rdx),%rax > db> bt > Tracing pid 199 tid 100086 td 0xfffff80005351980 > fget() at 0xffffffff802f685a =3D fget+0x2a/frame 0xfffffe0235d504b0 > fdesc_lookup() at 0xffffffff80e6d88d =3D fdesc_lookup+0xed/frame 0xfffffe= 0235d50510 > VOP_LOOKUP_APV() at 0xffffffff8057b54e =3D VOP_LOOKUP_APV+0x12e/frame 0xf= ffffe0235d50560 > lookup() at 0xffffffff803d31b0 =3D lookup+0x5a0/frame 0xfffffe0235d505f0 > namei() at 0xffffffff803d2934 =3D namei+0x464/frame 0xfffffe0235d506c0 > vn_open_cred() at 0xffffffff803ee78f =3D vn_open_cred+0x27f/frame 0xfffff= e0235d50810 > kern_openat() at 0xffffffff803e7bfd =3D kern_openat+0x22d/frame 0xfffffe0= 235d50980 > amd64_syscall() at 0xffffffff805387dd =3D amd64_syscall+0x28d/frame 0xfff= ffe0235d50ab0 > Xfast_syscall() at 0xffffffff8051f21b =3D Xfast_syscall+0xfb/frame 0xffff= fe0235d50ab0 > --- syscall (5, FreeBSD ELF64, sys_open), rip =3D 0x800942d6a, rsp =3D 0x= 7fffffffcff8, rbp =3D 0x7fffffffd030 --- >=20 > (gdb) list *fget+0x2a > 0xffffffff802f685a is in fget (/usr/home/kostik/work/build/bsd/DEV/src/sy= s/kern/kern_descrip.c:2385). >=20 > I do not have any capsicum-related options in the kernel config. Do you have some local changes? Could you try to do full buildkernel? There were two compilation issues when CAPABILITIES option was absent in kernel configuration, so something isn't right is you were able to compile your kernel. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --gE7i1rD7pdK0Ng3j Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlIoIUUACgkQForvXbEpPzRlUQCdGKhHDtP7uDpvQVL2gifuxv7v zR8AoMPhq9RUv3tZhIADddHPUBZmQRhz =9HLf -----END PGP SIGNATURE----- --gE7i1rD7pdK0Ng3j-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 06:19:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D6B3EF3D; Thu, 5 Sep 2013 06:19:17 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 6BA9C2D93; Thu, 5 Sep 2013 06:19:17 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id C241EEA9; Thu, 5 Sep 2013 08:13:48 +0200 (CEST) Date: Thu, 5 Sep 2013 08:19:24 +0200 From: Pawel Jakub Dawidek To: Konstantin Belousov Subject: Re: svn commit: r255219 - in head: contrib/tcpdump lib/libc lib/libc/capability lib/libc/include lib/libc/sys lib/libprocstat sbin/dhclient sbin/hastd sys/amd64/linux32 sys/bsm sys/cddl/compat/opensola... Message-ID: <20130905061923.GA5011@garage.freebsd.pl> References: <201309050009.r8509vsE061271@svn.freebsd.org> <20130905024448.GO41229@kib.kiev.ua> <20130905061429.GD1388@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline In-Reply-To: <20130905061429.GD1388@garage.freebsd.pl> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 06:19:18 -0000 --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 05, 2013 at 08:14:29AM +0200, Pawel Jakub Dawidek wrote: > On Thu, Sep 05, 2013 at 05:44:48AM +0300, Konstantin Belousov wrote: > > On Thu, Sep 05, 2013 at 12:09:57AM +0000, Pawel Jakub Dawidek wrote: > > > Author: pjd > > > Date: Thu Sep 5 00:09:56 2013 > > > New Revision: 255219 > > > URL: http://svnweb.freebsd.org/changeset/base/255219 > >=20 > > Shortly after the boot of the updated kernel, I get: > >=20 > > Fatal trap 12: page fault while in kernel mode > > cpuid =3D 7; apic id =3D 07 > > fault virtual address =3D 0x0 > > fault code =3D supervisor read data, page not present > > instruction pointer =3D 0x20:0xffffffff802f685a > > stack pointer =3D 0x28:0xfffffe0235d50460 > > frame pointer =3D 0x28:0xfffffe0235d504b0 > > code segment =3D base 0x0, limit 0xfffff, type 0x1b > > =3D DPL 0, pres 1, long 1, def32 0, gran 1 > > processor eflags =3D interrupt enabled, resume, IOPL =3D 0 > > current process =3D 199 (ip6addrctl) > > [ thread pid 199 tid 100086 ] > > Stopped at 0xffffffff802f685a =3D fget+0x2a: movq (%rdx),%rax > > db> bt > > Tracing pid 199 tid 100086 td 0xfffff80005351980 > > fget() at 0xffffffff802f685a =3D fget+0x2a/frame 0xfffffe0235d504b0 > > fdesc_lookup() at 0xffffffff80e6d88d =3D fdesc_lookup+0xed/frame 0xffff= fe0235d50510 > > VOP_LOOKUP_APV() at 0xffffffff8057b54e =3D VOP_LOOKUP_APV+0x12e/frame 0= xfffffe0235d50560 > > lookup() at 0xffffffff803d31b0 =3D lookup+0x5a0/frame 0xfffffe0235d505f0 > > namei() at 0xffffffff803d2934 =3D namei+0x464/frame 0xfffffe0235d506c0 > > vn_open_cred() at 0xffffffff803ee78f =3D vn_open_cred+0x27f/frame 0xfff= ffe0235d50810 > > kern_openat() at 0xffffffff803e7bfd =3D kern_openat+0x22d/frame 0xfffff= e0235d50980 > > amd64_syscall() at 0xffffffff805387dd =3D amd64_syscall+0x28d/frame 0xf= ffffe0235d50ab0 > > Xfast_syscall() at 0xffffffff8051f21b =3D Xfast_syscall+0xfb/frame 0xff= fffe0235d50ab0 > > --- syscall (5, FreeBSD ELF64, sys_open), rip =3D 0x800942d6a, rsp =3D = 0x7fffffffcff8, rbp =3D 0x7fffffffd030 --- > >=20 > > (gdb) list *fget+0x2a > > 0xffffffff802f685a is in fget (/usr/home/kostik/work/build/bsd/DEV/src/= sys/kern/kern_descrip.c:2385). > >=20 > > I do not have any capsicum-related options in the kernel config. >=20 > Do you have some local changes? Could you try to do full buildkernel? > There were two compilation issues when CAPABILITIES option was absent in > kernel configuration, so something isn't right is you were able to > compile your kernel. Forgot to mention that my test machine can boot fine with kernel compiled without the CAPABILITIES option. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --OXfL5xGRrasGEqWY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlIoImsACgkQForvXbEpPzRzEgCgzKvz0coHX/W159XjqRTKz5TU iOYAn3U/51RO8DkLhDT2LelfDIS/p9sQ =RDpB -----END PGP SIGNATURE----- --OXfL5xGRrasGEqWY-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 07:13:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 80ADF33A; Thu, 5 Sep 2013 07:13:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6DBC720E5; Thu, 5 Sep 2013 07:13:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r857D9xJ008308; Thu, 5 Sep 2013 07:13:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r857D9Ax008307; Thu, 5 Sep 2013 07:13:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201309050713.r857D9Ax008307@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Sep 2013 07:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255234 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 07:13:09 -0000 Author: mav Date: Thu Sep 5 07:13:08 2013 New Revision: 255234 URL: http://svnweb.freebsd.org/changeset/base/255234 Log: Add more references. Submitted by: Dmitry Luhtionov MFC after: 1 week Modified: head/share/man/man4/netgraph.4 Modified: head/share/man/man4/netgraph.4 ============================================================================== --- head/share/man/man4/netgraph.4 Thu Sep 5 06:58:49 2013 (r255233) +++ head/share/man/man4/netgraph.4 Thu Sep 5 07:13:08 2013 (r255234) @@ -1284,7 +1284,7 @@ link between two machines. There is a full multilink PPP implementation that runs in .Nm . The -.Pa net/mpd +.Pa net/mpd5 port can use these modules to make a very low latency high capacity PPP system. It also supports @@ -1423,6 +1423,7 @@ common networking problems, solved using .Xr ng_bridge 4 , .Xr ng_bt3c 4 , .Xr ng_btsocket 4 , +.Xr ng_car 4 , .Xr ng_cisco 4 , .Xr ng_device 4 , .Xr ng_echo 4 , @@ -1439,13 +1440,16 @@ common networking problems, solved using .Xr ng_hub 4 , .Xr ng_iface 4 , .Xr ng_ip_input 4 , +.Xr ng_ipfw 4 , .Xr ng_ksocket 4 , .Xr ng_l2cap 4 , .Xr ng_l2tp 4 , .Xr ng_lmi 4 , .Xr ng_mppc 4 , +.Xr ng_nat 4 , .Xr ng_netflow 4 , .Xr ng_one2many 4 , +.Xr ng_patch 4 , .Xr ng_ppp 4 , .Xr ng_pppoe 4 , .Xr ng_pptpgre 4 , From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 08:12:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E964891B; Thu, 5 Sep 2013 08:12:36 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D6BF52885; Thu, 5 Sep 2013 08:12:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r858CaID043361; Thu, 5 Sep 2013 08:12:36 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r858Capr043360; Thu, 5 Sep 2013 08:12:36 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201309050812.r858Capr043360@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 5 Sep 2013 08:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255235 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 08:12:37 -0000 Author: ae Date: Thu Sep 5 08:12:36 2013 New Revision: 255235 URL: http://svnweb.freebsd.org/changeset/base/255235 Log: Remove unused code and sort variables declarations. PR: kern/181822 MFC after: 1 week Modified: head/sys/netinet/ip_mroute.c Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Thu Sep 5 07:13:08 2013 (r255234) +++ head/sys/netinet/ip_mroute.c Thu Sep 5 08:12:36 2013 (r255235) @@ -704,10 +704,9 @@ ip_mrouter_init(struct socket *so, int v static int X_ip_mrouter_done(void) { - vifi_t vifi; - int i; struct ifnet *ifp; - struct ifreq ifr; + int i; + vifi_t vifi; MROUTER_LOCK(); @@ -732,11 +731,6 @@ X_ip_mrouter_done(void) for (vifi = 0; vifi < V_numvifs; vifi++) { if (!in_nullhost(V_viftable[vifi].v_lcl_addr) && !(V_viftable[vifi].v_flags & (VIFF_TUNNEL | VIFF_REGISTER))) { - struct sockaddr_in *so = (struct sockaddr_in *)&(ifr.ifr_addr); - - so->sin_len = sizeof(struct sockaddr_in); - so->sin_family = AF_INET; - so->sin_addr.s_addr = INADDR_ANY; ifp = V_viftable[vifi].v_ifp; if_allmulti(ifp, 0); } From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 09:36:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 83CBEE0A; Thu, 5 Sep 2013 09:36:20 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6EFA22EDC; Thu, 5 Sep 2013 09:36:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r859aKRE091676; Thu, 5 Sep 2013 09:36:20 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r859aKbo091675; Thu, 5 Sep 2013 09:36:20 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309050936.r859aKbo091675@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Sep 2013 09:36:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255236 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 09:36:20 -0000 Author: pjd Date: Thu Sep 5 09:36:19 2013 New Revision: 255236 URL: http://svnweb.freebsd.org/changeset/base/255236 Log: Correct the logic broken in my last commit. Reported by: tijl Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Thu Sep 5 08:12:36 2013 (r255235) +++ head/sys/kern/vfs_syscalls.c Thu Sep 5 09:36:19 2013 (r255236) @@ -920,7 +920,7 @@ change_dir(vp, td) return (ENOTDIR); #ifdef MAC error = mac_vnode_check_chdir(td->td_ucred, vp); - if (error == 0) + if (error != 0) return (error); #endif return (VOP_ACCESS(vp, VEXEC, td->td_ucred, td)); From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 09:44:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AE237301; Thu, 5 Sep 2013 09:44:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C42B2F54; Thu, 5 Sep 2013 09:44:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r859i9L5096610; Thu, 5 Sep 2013 09:44:09 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r859i9rO096609; Thu, 5 Sep 2013 09:44:09 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201309050944.r859i9rO096609@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 5 Sep 2013 09:44:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255237 - head/sys/geom/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 09:44:09 -0000 Author: ae Date: Thu Sep 5 09:44:09 2013 New Revision: 255237 URL: http://svnweb.freebsd.org/changeset/base/255237 Log: Remove stub implementation. MFC after: 1 week Modified: head/sys/geom/part/g_part_ldm.c Modified: head/sys/geom/part/g_part_ldm.c ============================================================================== --- head/sys/geom/part/g_part_ldm.c Thu Sep 5 09:36:19 2013 (r255236) +++ head/sys/geom/part/g_part_ldm.c Thu Sep 5 09:44:09 2013 (r255237) @@ -339,8 +339,6 @@ static int g_part_ldm_read(struct g_part static const char *g_part_ldm_type(struct g_part_table *, struct g_part_entry *, char *, size_t); static int g_part_ldm_write(struct g_part_table *, struct g_consumer *); -static int g_part_ldm_resize(struct g_part_table *, struct g_part_entry *, - struct g_part_parms *); static kobj_method_t g_part_ldm_methods[] = { KOBJMETHOD(g_part_add, g_part_ldm_add), @@ -350,7 +348,6 @@ static kobj_method_t g_part_ldm_methods[ KOBJMETHOD(g_part_dumpconf, g_part_ldm_dumpconf), KOBJMETHOD(g_part_dumpto, g_part_ldm_dumpto), KOBJMETHOD(g_part_modify, g_part_ldm_modify), - KOBJMETHOD(g_part_resize, g_part_ldm_resize), KOBJMETHOD(g_part_name, g_part_ldm_name), KOBJMETHOD(g_part_probe, g_part_ldm_probe), KOBJMETHOD(g_part_read, g_part_ldm_read), @@ -1206,14 +1203,6 @@ g_part_ldm_modify(struct g_part_table *b return (ENOSYS); } -static int -g_part_ldm_resize(struct g_part_table *basetable, - struct g_part_entry *baseentry, struct g_part_parms *gpp) -{ - - return (ENOSYS); -} - static const char * g_part_ldm_name(struct g_part_table *table, struct g_part_entry *baseentry, char *buf, size_t bufsz) From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 09:57:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ACAB7672; Thu, 5 Sep 2013 09:57:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 49BEB2026; Thu, 5 Sep 2013 09:57:45 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r859vYCV095235; Thu, 5 Sep 2013 12:57:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r859vYCV095235 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r859vXeh095234; Thu, 5 Sep 2013 12:57:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 5 Sep 2013 12:57:33 +0300 From: Konstantin Belousov To: Pawel Jakub Dawidek Subject: Re: svn commit: r255219 - in head: contrib/tcpdump lib/libc lib/libc/capability lib/libc/include lib/libc/sys lib/libprocstat sbin/dhclient sbin/hastd sys/amd64/linux32 sys/bsm sys/cddl/compat/opensola... Message-ID: <20130905095733.GP41229@kib.kiev.ua> References: <201309050009.r8509vsE061271@svn.freebsd.org> <20130905024448.GO41229@kib.kiev.ua> <20130905061429.GD1388@garage.freebsd.pl> <20130905061923.GA5011@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SBikYMzjhZGK9d4p" Content-Disposition: inline In-Reply-To: <20130905061923.GA5011@garage.freebsd.pl> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 09:57:45 -0000 --SBikYMzjhZGK9d4p Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 05, 2013 at 08:19:24AM +0200, Pawel Jakub Dawidek wrote: > On Thu, Sep 05, 2013 at 08:14:29AM +0200, Pawel Jakub Dawidek wrote: > > On Thu, Sep 05, 2013 at 05:44:48AM +0300, Konstantin Belousov wrote: > > > On Thu, Sep 05, 2013 at 12:09:57AM +0000, Pawel Jakub Dawidek wrote: > > > > Author: pjd > > > > Date: Thu Sep 5 00:09:56 2013 > > > > New Revision: 255219 > > > > URL: http://svnweb.freebsd.org/changeset/base/255219 > > >=20 > > > Shortly after the boot of the updated kernel, I get: > > >=20 > > > Fatal trap 12: page fault while in kernel mode > > > cpuid =3D 7; apic id =3D 07 > > > fault virtual address =3D 0x0 > > > fault code =3D supervisor read data, page not present > > > instruction pointer =3D 0x20:0xffffffff802f685a > > > stack pointer =3D 0x28:0xfffffe0235d50460 > > > frame pointer =3D 0x28:0xfffffe0235d504b0 > > > code segment =3D base 0x0, limit 0xfffff, type 0x1b > > > =3D DPL 0, pres 1, long 1, def32 0, gran 1 > > > processor eflags =3D interrupt enabled, resume, IOPL =3D 0 > > > current process =3D 199 (ip6addrctl) > > > [ thread pid 199 tid 100086 ] > > > Stopped at 0xffffffff802f685a =3D fget+0x2a: movq (%rdx),%rax > > > db> bt > > > Tracing pid 199 tid 100086 td 0xfffff80005351980 > > > fget() at 0xffffffff802f685a =3D fget+0x2a/frame 0xfffffe0235d504b0 > > > fdesc_lookup() at 0xffffffff80e6d88d =3D fdesc_lookup+0xed/frame 0xff= fffe0235d50510 > > > VOP_LOOKUP_APV() at 0xffffffff8057b54e =3D VOP_LOOKUP_APV+0x12e/frame= 0xfffffe0235d50560 > > > lookup() at 0xffffffff803d31b0 =3D lookup+0x5a0/frame 0xfffffe0235d50= 5f0 > > > namei() at 0xffffffff803d2934 =3D namei+0x464/frame 0xfffffe0235d506c0 > > > vn_open_cred() at 0xffffffff803ee78f =3D vn_open_cred+0x27f/frame 0xf= ffffe0235d50810 > > > kern_openat() at 0xffffffff803e7bfd =3D kern_openat+0x22d/frame 0xfff= ffe0235d50980 > > > amd64_syscall() at 0xffffffff805387dd =3D amd64_syscall+0x28d/frame 0= xfffffe0235d50ab0 > > > Xfast_syscall() at 0xffffffff8051f21b =3D Xfast_syscall+0xfb/frame 0x= fffffe0235d50ab0 > > > --- syscall (5, FreeBSD ELF64, sys_open), rip =3D 0x800942d6a, rsp = =3D 0x7fffffffcff8, rbp =3D 0x7fffffffd030 --- > > >=20 > > > (gdb) list *fget+0x2a > > > 0xffffffff802f685a is in fget (/usr/home/kostik/work/build/bsd/DEV/sr= c/sys/kern/kern_descrip.c:2385). > > >=20 > > > I do not have any capsicum-related options in the kernel config. > >=20 > > Do you have some local changes? Could you try to do full buildkernel? > > There were two compilation issues when CAPABILITIES option was absent in > > kernel configuration, so something isn't right is you were able to > > compile your kernel. I have local changes, but nothing in kern_descrip.c or VFS, for this branch. The trace above is from the clean kernel build. I do able to build the kernel without CAPABILITIES. >=20 > Forgot to mention that my test machine can boot fine with kernel > compiled without the CAPABILITIES option. If taking a time and actually looking at the backtrace I posted, you would see that fdescfs is broken. The _fget() assumes that needrightsp is always non-NULL, but fget() call from fdesc_lookup() passes NULL spelled as 0. Quick look over the sys/ catched at least sys/kern/vfs_aio.c:2053 sys/cddl/compat/opensolaris/sys/file.h:57 sys/compat/linux/linux_stats.c:148 sys/dev/aacraid/aacraid_linux.c:84 with the same problem. --SBikYMzjhZGK9d4p Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSKFWMAAoJEJDCuSvBvK1BnvIP/RDE5dTjLas2lhilQMRELkmc k/wjxi+COFVLUyVLcU90ISwNTWnEaK5krJK+vJTA2jJFwmDKbeRVrkQIrZJvk841 yzt2p4l7u1SxxzLAgl4VQ5HvHmFkR2Lb6I3yM7yy0NLZ01wXRn56W+kOHRDzAnpL AaHVdvDUisskdr80H7dYmefcfUphVgN7HLTn60U8RcsZNM9gbx2tbfYH/4zC7R43 l7sxKK04cORgiev59RZZhDoXUkyZefz0l/37ffnjbg7cgMYrG4tFTB3LPgQpWEoa +/GlEJ+2q88DZ+xyDTyjSZo10sQj+A4zEXBQ2oXj07hWA29M9zlrBDhR8TIE2HSQ rRl5jApitcGrgTXEFMTtyozB1X2qMbQwaAn7A6d0veEJHdjfW+bMEECo4NoBlf4x CVyrSWj2Z3ZScrTTgtO1tDqrTFmymZLFmyW4bQ5c/AxWWyDdGOgGIV44KEcEN0DG Hz7v6hbmKmnBSqY+JfhvXaPoY/1J7L4M0hirtNzlo7adXYYPpZOKojif45W4f6hl eS/EWSY26G8w66zN9dVmB2Sy24ucU6QhFHXEvqWK+KEpJFgTVP3R95bgEC+fMND/ +QY6j9F14Ke4TSDm4pk3MfgVK+jqqII+KKK+AmY6OioYJMUym4gYWXdnUWB9vmd5 h4tVGTUoBMKstjL9rJOl =57uS -----END PGP SIGNATURE----- --SBikYMzjhZGK9d4p-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 10:09:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 05A93D14; Thu, 5 Sep 2013 10:09:25 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E6D242116; Thu, 5 Sep 2013 10:09:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85A9ObO010910; Thu, 5 Sep 2013 10:09:24 GMT (envelope-from br@svn.freebsd.org) Received: (from br@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85A9ODV010908; Thu, 5 Sep 2013 10:09:24 GMT (envelope-from br@svn.freebsd.org) Message-Id: <201309051009.r85A9ODV010908@svn.freebsd.org> From: Ruslan Bukin Date: Thu, 5 Sep 2013 10:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255238 - in head/sys/dev/usb: . wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 10:09:25 -0000 Author: br Date: Thu Sep 5 10:09:24 2013 New Revision: 255238 URL: http://svnweb.freebsd.org/changeset/base/255238 Log: Add support for DLINK DWA-127 Wireless Adapter Approved by: cognet (mentor) Modified: head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu Sep 5 09:44:09 2013 (r255237) +++ head/sys/dev/usb/usbdevs Thu Sep 5 10:09:24 2013 (r255238) @@ -1547,6 +1547,7 @@ product DLINK DWLG122 0x3c00 DWL-G122 b product DLINK DUBE100B1 0x3c05 DUB-E100 rev B1 product DLINK RT2870 0x3c09 RT2870 product DLINK RT3072 0x3c0a RT3072 +product DLINK DWA127 0x3c1b DWA-127 Wireless Adapter product DLINK DSB650C 0x4000 10Mbps Ethernet product DLINK DSB650TX1 0x4001 10/100 Ethernet product DLINK DSB650TX 0x4002 10/100 Ethernet Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Thu Sep 5 09:44:09 2013 (r255237) +++ head/sys/dev/usb/wlan/if_run.c Thu Sep 5 10:09:24 2013 (r255238) @@ -171,6 +171,7 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(CYBERTAN, RT2870), RUN_DEV(DLINK, RT2870), RUN_DEV(DLINK, RT3072), + RUN_DEV(DLINK, DWA127), RUN_DEV(DLINK2, DWA130), RUN_DEV(DLINK2, RT2870_1), RUN_DEV(DLINK2, RT2870_2), From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 10:24:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 494B01DD; Thu, 5 Sep 2013 10:24:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 36BD7220A; Thu, 5 Sep 2013 10:24:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85AOARZ020598; Thu, 5 Sep 2013 10:24:10 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85AOA4p020597; Thu, 5 Sep 2013 10:24:10 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309051024.r85AOA4p020597@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 5 Sep 2013 10:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255239 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 10:24:10 -0000 Author: glebius Date: Thu Sep 5 10:24:09 2013 New Revision: 255239 URL: http://svnweb.freebsd.org/changeset/base/255239 Log: Fix !CAPABILITIES build. Modified: head/sys/kern/uipc_mqueue.c Modified: head/sys/kern/uipc_mqueue.c ============================================================================== --- head/sys/kern/uipc_mqueue.c Thu Sep 5 10:09:24 2013 (r255238) +++ head/sys/kern/uipc_mqueue.c Thu Sep 5 10:24:09 2013 (r255239) @@ -2247,7 +2247,9 @@ sys_kmq_timedsend(struct thread *td, str static int kern_kmq_notify(struct thread *td, int mqd, struct sigevent *sigev) { +#ifdef CAPABILITIES cap_rights_t rights; +#endif struct filedesc *fdp; struct proc *p; struct mqueue *mq; From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 10:31:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B00B5670; Thu, 5 Sep 2013 10:31:51 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay009.isp.belgacom.be (mailrelay009.isp.belgacom.be [195.238.6.176]) by mx1.freebsd.org (Postfix) with ESMTP id C0F4822B4; Thu, 5 Sep 2013 10:31:50 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoEGAElcKFJbsUGw/2dsb2JhbABbgwc1wheBJxd0giQBAQVWIxALDgYECRoLDyoeBgGIGAi6TY4igS0RB4QdA5Ajh1GBMJA3gWOBPzqBLQ Received: from 176.65-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.65.176]) by relay.skynet.be with ESMTP; 05 Sep 2013 12:31:40 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id r85AVdgO011456; Thu, 5 Sep 2013 12:31:39 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Thu, 5 Sep 2013 12:31:34 +0200 From: Tijl Coosemans To: Konstantin Belousov , Pawel Jakub Dawidek Subject: Re: svn commit: r255219 - in head: contrib/tcpdump lib/libc lib/libc/capability lib/libc/include lib/libc/sys lib/libprocstat sbin/dhclient sbin/hastd sys/amd64/linux32 sys/bsm sys/cddl/compat/opensola... Message-ID: <20130905123134.4bf15908@kalimero.tijl.coosemans.org> In-Reply-To: <20130905095733.GP41229@kib.kiev.ua> References: <201309050009.r8509vsE061271@svn.freebsd.org> <20130905024448.GO41229@kib.kiev.ua> <20130905061429.GD1388@garage.freebsd.pl> <20130905061923.GA5011@garage.freebsd.pl> <20130905095733.GP41229@kib.kiev.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA256; boundary="Sig_/Uk7Di_aRkw4iU_3tuxwBG9W"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 10:31:51 -0000 --Sig_/Uk7Di_aRkw4iU_3tuxwBG9W Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 5 Sep 2013 12:57:33 +0300 Konstantin Belousov wrote: > On Thu, Sep 05, 2013 at 08:19:24AM +0200, Pawel Jakub Dawidek wrote: > > On Thu, Sep 05, 2013 at 08:14:29AM +0200, Pawel Jakub Dawidek wrote: > > > On Thu, Sep 05, 2013 at 05:44:48AM +0300, Konstantin Belousov wrote: > > > > On Thu, Sep 05, 2013 at 12:09:57AM +0000, Pawel Jakub Dawidek wrote: > > > > > Author: pjd > > > > > Date: Thu Sep 5 00:09:56 2013 > > > > > New Revision: 255219 > > > > > URL: http://svnweb.freebsd.org/changeset/base/255219 > > > >=20 > > > > Shortly after the boot of the updated kernel, I get: > > > >=20 > > > > Fatal trap 12: page fault while in kernel mode > > > > cpuid =3D 7; apic id =3D 07 > > > > fault virtual address =3D 0x0 > > > > fault code =3D supervisor read data, page not present > > > > instruction pointer =3D 0x20:0xffffffff802f685a > > > > stack pointer =3D 0x28:0xfffffe0235d50460 > > > > frame pointer =3D 0x28:0xfffffe0235d504b0 > > > > code segment =3D base 0x0, limit 0xfffff, type 0x1b > > > > =3D DPL 0, pres 1, long 1, def32 0, gran 1 > > > > processor eflags =3D interrupt enabled, resume, IOPL =3D 0 > > > > current process =3D 199 (ip6addrctl) > > > > [ thread pid 199 tid 100086 ] > > > > Stopped at 0xffffffff802f685a =3D fget+0x2a: movq (%rdx),%r= ax > > > > db> bt > > > > Tracing pid 199 tid 100086 td 0xfffff80005351980 > > > > fget() at 0xffffffff802f685a =3D fget+0x2a/frame 0xfffffe0235d504b0 > > > > fdesc_lookup() at 0xffffffff80e6d88d =3D fdesc_lookup+0xed/frame 0x= fffffe0235d50510 > > > > VOP_LOOKUP_APV() at 0xffffffff8057b54e =3D VOP_LOOKUP_APV+0x12e/fra= me 0xfffffe0235d50560 > > > > lookup() at 0xffffffff803d31b0 =3D lookup+0x5a0/frame 0xfffffe0235d= 505f0 > > > > namei() at 0xffffffff803d2934 =3D namei+0x464/frame 0xfffffe0235d50= 6c0 > > > > vn_open_cred() at 0xffffffff803ee78f =3D vn_open_cred+0x27f/frame 0= xfffffe0235d50810 > > > > kern_openat() at 0xffffffff803e7bfd =3D kern_openat+0x22d/frame 0xf= ffffe0235d50980 > > > > amd64_syscall() at 0xffffffff805387dd =3D amd64_syscall+0x28d/frame= 0xfffffe0235d50ab0 > > > > Xfast_syscall() at 0xffffffff8051f21b =3D Xfast_syscall+0xfb/frame = 0xfffffe0235d50ab0 > > > > --- syscall (5, FreeBSD ELF64, sys_open), rip =3D 0x800942d6a, rsp = =3D 0x7fffffffcff8, rbp =3D 0x7fffffffd030 --- > > > >=20 > > > > (gdb) list *fget+0x2a > > > > 0xffffffff802f685a is in fget (/usr/home/kostik/work/build/bsd/DEV/= src/sys/kern/kern_descrip.c:2385). > > > >=20 > > > > I do not have any capsicum-related options in the kernel config. > > >=20 > > > Do you have some local changes? Could you try to do full buildkernel? > > > There were two compilation issues when CAPABILITIES option was absent= in > > > kernel configuration, so something isn't right is you were able to > > > compile your kernel. > I have local changes, but nothing in kern_descrip.c or VFS, for this bran= ch. > The trace above is from the clean kernel build. I do able to build the > kernel without CAPABILITIES. >=20 > >=20 > > Forgot to mention that my test machine can boot fine with kernel > > compiled without the CAPABILITIES option. >=20 > If taking a time and actually looking at the backtrace I posted, you would > see that fdescfs is broken. The _fget() assumes that needrightsp is > always non-NULL, but fget() call from fdesc_lookup() passes NULL spelled > as 0. >=20 > Quick look over the sys/ catched at least > sys/kern/vfs_aio.c:2053 > sys/cddl/compat/opensolaris/sys/file.h:57 > sys/compat/linux/linux_stats.c:148 > sys/dev/aacraid/aacraid_linux.c:84 > with the same problem. There are also fget_unlocked calls where the needrightsp argument is 0. --Sig_/Uk7Di_aRkw4iU_3tuxwBG9W Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iF4EAREIAAYFAlIoXYsACgkQfoCS2CCgtit36AD/SlVAWUue2nlwErH4A561Pc2D l6j1vAs5zW3TPDwuagQA/iTsSprfbD4rOIuHoHq9n1uThPJBAtV5//Qs7txjnsmV =mWIc -----END PGP SIGNATURE----- --Sig_/Uk7Di_aRkw4iU_3tuxwBG9W-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 11:58:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1E6471CA; Thu, 5 Sep 2013 11:58:14 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0AD9A27DF; Thu, 5 Sep 2013 11:58:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85BwDXv076165; Thu, 5 Sep 2013 11:58:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85BwCEU076081; Thu, 5 Sep 2013 11:58:12 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309051158.r85BwCEU076081@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Sep 2013 11:58:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255240 - in head/sys: cddl/compat/opensolaris/sys dev/aacraid fs/fdescfs kern ofed/include/linux security/audit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 11:58:14 -0000 Author: pjd Date: Thu Sep 5 11:58:12 2013 New Revision: 255240 URL: http://svnweb.freebsd.org/changeset/base/255240 Log: Handle cases where capability rights are not provided. Reported by: kib Modified: head/sys/cddl/compat/opensolaris/sys/file.h head/sys/dev/aacraid/aacraid_linux.c head/sys/fs/fdescfs/fdesc_vnops.c head/sys/kern/kern_descrip.c head/sys/ofed/include/linux/file.h head/sys/security/audit/audit_bsm_klib.c Modified: head/sys/cddl/compat/opensolaris/sys/file.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/file.h Thu Sep 5 10:24:09 2013 (r255239) +++ head/sys/cddl/compat/opensolaris/sys/file.h Thu Sep 5 11:58:12 2013 (r255240) @@ -54,7 +54,7 @@ releasef(int fd) struct file *fp; /* No CAP_ rights required, as we're only releasing. */ - if (fget(curthread, fd, 0, &fp) == 0) { + if (fget(curthread, fd, NULL, &fp) == 0) { fdrop(fp, curthread); fdrop(fp, curthread); } Modified: head/sys/dev/aacraid/aacraid_linux.c ============================================================================== --- head/sys/dev/aacraid/aacraid_linux.c Thu Sep 5 10:24:09 2013 (r255239) +++ head/sys/dev/aacraid/aacraid_linux.c Thu Sep 5 11:58:12 2013 (r255240) @@ -34,6 +34,9 @@ __FBSDID("$FreeBSD$"); */ #include +#if __FreeBSD_version >= 900000 +#include +#endif #include #include #include @@ -77,15 +80,19 @@ static int aacraid_linux_ioctl(struct thread *td, struct linux_ioctl_args *args) { struct file *fp; +#if __FreeBSD_version >= 900000 + cap_rights_t rights; +#endif u_long cmd; int error; + if ((error = fget(td, args->fd, #if __FreeBSD_version >= 900000 - if ((error = fget(td, args->fd, 0, &fp)) != 0) -#else - if ((error = fget(td, args->fd, &fp)) != 0) + cap_rights_init(&rights, CAP_IOCTL), #endif + &fp)) != 0) { return (error); + } cmd = args->cmd; /* Modified: head/sys/fs/fdescfs/fdesc_vnops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vnops.c Thu Sep 5 10:24:09 2013 (r255239) +++ head/sys/fs/fdescfs/fdesc_vnops.c Thu Sep 5 11:58:12 2013 (r255240) @@ -309,7 +309,7 @@ fdesc_lookup(ap) /* * No rights to check since 'fp' isn't actually used. */ - if ((error = fget(td, fd, 0, &fp)) != 0) + if ((error = fget(td, fd, NULL, &fp)) != 0) goto bad; /* Check if we're looking up ourselves. */ Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Sep 5 10:24:09 2013 (r255239) +++ head/sys/kern/kern_descrip.c Thu Sep 5 11:58:12 2013 (r255240) @@ -586,8 +586,8 @@ kern_fcntl(struct thread *td, int fd, in case F_SETLK: do_setlk: - error = fget_unlocked(fdp, fd, - cap_rights_init(&rights, CAP_FLOCK), 0, &fp, NULL); + cap_rights_init(&rights, CAP_FLOCK); + error = fget_unlocked(fdp, fd, &rights, 0, &fp, NULL); if (error != 0) break; if (fp->f_type != DTYPE_VNODE) { @@ -676,7 +676,7 @@ kern_fcntl(struct thread *td, int fd, in * that the closing thread was a bit slower and that the * advisory lock succeeded before the close. */ - error = fget_unlocked(fdp, fd, 0, 0, &fp2, NULL); + error = fget_unlocked(fdp, fd, &rights, 0, &fp2, NULL); if (error != 0) { fdrop(fp, td); break; @@ -733,7 +733,7 @@ kern_fcntl(struct thread *td, int fd, in arg = arg ? 128 * 1024: 0; /* FALLTHROUGH */ case F_READAHEAD: - error = fget_unlocked(fdp, fd, 0, 0, &fp, NULL); + error = fget_unlocked(fdp, fd, NULL, 0, &fp, NULL); if (error != 0) break; if (fp->f_type != DTYPE_VNODE) { @@ -2324,13 +2324,15 @@ fget_unlocked(struct filedesc *fdp, int return (EBADF); #ifdef CAPABILITIES haverights = *cap_rights(fdp, fd); - error = cap_check(&haverights, needrightsp); - if (error != 0) - return (error); - if (cap_rights_is_set(needrightsp, CAP_FCNTL)) { - error = cap_fcntl_check(fdp, fd, needfcntl); + if (needrightsp != NULL) { + error = cap_check(&haverights, needrightsp); if (error != 0) return (error); + if (cap_rights_is_set(needrightsp, CAP_FCNTL)) { + error = cap_fcntl_check(fdp, fd, needfcntl); + if (error != 0) + return (error); + } } #endif count = fp->f_count; @@ -2382,7 +2384,10 @@ _fget(struct thread *td, int fd, struct *fpp = NULL; if (td == NULL || (fdp = td->td_proc->p_fd) == NULL) return (EBADF); - needrights = *needrightsp; + if (needrightsp != NULL) + needrights = *needrightsp; + else + cap_rights_init(&needrights); if (maxprotp != NULL) cap_rights_set(&needrights, CAP_MMAP); error = fget_unlocked(fdp, fd, &needrights, 0, &fp, &haverights); @@ -2517,9 +2522,11 @@ fgetvp_rights(struct thread *td, int fd, return (EBADF); #ifdef CAPABILITIES - error = cap_check(cap_rights(fdp, fd), needrightsp); - if (error != 0) - return (error); + if (needrightsp != NULL) { + error = cap_check(cap_rights(fdp, fd), needrightsp); + if (error != 0) + return (error); + } #endif if (fp->f_vnode == NULL) Modified: head/sys/ofed/include/linux/file.h ============================================================================== --- head/sys/ofed/include/linux/file.h Thu Sep 5 10:24:09 2013 (r255239) +++ head/sys/ofed/include/linux/file.h Thu Sep 5 11:58:12 2013 (r255240) @@ -47,8 +47,10 @@ linux_fget(unsigned int fd) { struct file *file; - if (fget_unlocked(curthread->td_proc->p_fd, fd, 0, 0, &file, NULL) != 0) + if (fget_unlocked(curthread->td_proc->p_fd, fd, NULL, 0, &file, + NULL) != 0) { return (NULL); + } return (struct linux_file *)file->f_data; } @@ -70,8 +72,10 @@ put_unused_fd(unsigned int fd) { struct file *file; - if (fget_unlocked(curthread->td_proc->p_fd, fd, 0, 0, &file, NULL) != 0) + if (fget_unlocked(curthread->td_proc->p_fd, fd, NULL, 0, &file, + NULL) != 0) { return; + } fdclose(curthread->td_proc->p_fd, file, fd, curthread); } @@ -80,8 +84,10 @@ fd_install(unsigned int fd, struct linux { struct file *file; - if (fget_unlocked(curthread->td_proc->p_fd, fd, 0, 0, &file, NULL) != 0) + if (fget_unlocked(curthread->td_proc->p_fd, fd, NULL, 0, &file, + NULL) != 0) { file = NULL; + } filp->_file = file; finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops); } Modified: head/sys/security/audit/audit_bsm_klib.c ============================================================================== --- head/sys/security/audit/audit_bsm_klib.c Thu Sep 5 10:24:09 2013 (r255239) +++ head/sys/security/audit/audit_bsm_klib.c Thu Sep 5 11:58:12 2013 (r255240) @@ -496,7 +496,7 @@ audit_canon_path(struct thread *td, int vhold(cvnp); } else { /* XXX: fgetvp() that vhold()s vnode instead of vref()ing it would be better */ - error = fgetvp(td, dirfd, 0, &cvnp); + error = fgetvp(td, dirfd, NULL, &cvnp); if (error) { cpath[0] = '\0'; if (rvnp != NULL) From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 11:59:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B20A5317; Thu, 5 Sep 2013 11:59:23 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9FC0727EA; Thu, 5 Sep 2013 11:59:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85BxNd0076764; Thu, 5 Sep 2013 11:59:23 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85BxNka076763; Thu, 5 Sep 2013 11:59:23 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309051159.r85BxNka076763@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 5 Sep 2013 11:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255241 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 11:59:23 -0000 Author: pjd Date: Thu Sep 5 11:59:23 2013 New Revision: 255241 URL: http://svnweb.freebsd.org/changeset/base/255241 Log: The fget() function now takes pointer to cap_rights_t, so change 0 to NULL. Modified: head/sys/kern/vfs_aio.c Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Thu Sep 5 11:58:12 2013 (r255240) +++ head/sys/kern/vfs_aio.c Thu Sep 5 11:59:23 2013 (r255241) @@ -2050,7 +2050,7 @@ sys_aio_cancel(struct thread *td, struct struct vnode *vp; /* Lookup file object. */ - error = fget(td, uap->fd, 0, &fp); + error = fget(td, uap->fd, NULL, &fp); if (error) return (error); From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 12:02:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5B0038C0; Thu, 5 Sep 2013 12:02:26 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id E1FF12893; Thu, 5 Sep 2013 12:02:25 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 852C8F89; Thu, 5 Sep 2013 13:56:56 +0200 (CEST) Date: Thu, 5 Sep 2013 14:02:32 +0200 From: Pawel Jakub Dawidek To: Konstantin Belousov Subject: Re: svn commit: r255219 - in head: contrib/tcpdump lib/libc lib/libc/capability lib/libc/include lib/libc/sys lib/libprocstat sbin/dhclient sbin/hastd sys/amd64/linux32 sys/bsm sys/cddl/compat/opensola... Message-ID: <20130905120231.GF1383@garage.freebsd.pl> References: <201309050009.r8509vsE061271@svn.freebsd.org> <20130905024448.GO41229@kib.kiev.ua> <20130905061429.GD1388@garage.freebsd.pl> <20130905061923.GA5011@garage.freebsd.pl> <20130905095733.GP41229@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O98KdSgI27dgYlM5" Content-Disposition: inline In-Reply-To: <20130905095733.GP41229@kib.kiev.ua> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 12:02:26 -0000 --O98KdSgI27dgYlM5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 05, 2013 at 12:57:33PM +0300, Konstantin Belousov wrote: > On Thu, Sep 05, 2013 at 08:19:24AM +0200, Pawel Jakub Dawidek wrote: > > On Thu, Sep 05, 2013 at 08:14:29AM +0200, Pawel Jakub Dawidek wrote: > > > On Thu, Sep 05, 2013 at 05:44:48AM +0300, Konstantin Belousov wrote: > > > > On Thu, Sep 05, 2013 at 12:09:57AM +0000, Pawel Jakub Dawidek wrote: > > > > > Author: pjd > > > > > Date: Thu Sep 5 00:09:56 2013 > > > > > New Revision: 255219 > > > > > URL: http://svnweb.freebsd.org/changeset/base/255219 > > > >=20 > > > > Shortly after the boot of the updated kernel, I get: > > > >=20 > > > > Fatal trap 12: page fault while in kernel mode > > > > cpuid =3D 7; apic id =3D 07 > > > > fault virtual address =3D 0x0 > > > > fault code =3D supervisor read data, page not present > > > > instruction pointer =3D 0x20:0xffffffff802f685a > > > > stack pointer =3D 0x28:0xfffffe0235d50460 > > > > frame pointer =3D 0x28:0xfffffe0235d504b0 > > > > code segment =3D base 0x0, limit 0xfffff, type 0x1b > > > > =3D DPL 0, pres 1, long 1, def32 0, gran 1 > > > > processor eflags =3D interrupt enabled, resume, IOPL =3D 0 > > > > current process =3D 199 (ip6addrctl) > > > > [ thread pid 199 tid 100086 ] > > > > Stopped at 0xffffffff802f685a =3D fget+0x2a: movq (%rdx),%r= ax > > > > db> bt > > > > Tracing pid 199 tid 100086 td 0xfffff80005351980 > > > > fget() at 0xffffffff802f685a =3D fget+0x2a/frame 0xfffffe0235d504b0 > > > > fdesc_lookup() at 0xffffffff80e6d88d =3D fdesc_lookup+0xed/frame 0x= fffffe0235d50510 > > > > VOP_LOOKUP_APV() at 0xffffffff8057b54e =3D VOP_LOOKUP_APV+0x12e/fra= me 0xfffffe0235d50560 > > > > lookup() at 0xffffffff803d31b0 =3D lookup+0x5a0/frame 0xfffffe0235d= 505f0 > > > > namei() at 0xffffffff803d2934 =3D namei+0x464/frame 0xfffffe0235d50= 6c0 > > > > vn_open_cred() at 0xffffffff803ee78f =3D vn_open_cred+0x27f/frame 0= xfffffe0235d50810 > > > > kern_openat() at 0xffffffff803e7bfd =3D kern_openat+0x22d/frame 0xf= ffffe0235d50980 > > > > amd64_syscall() at 0xffffffff805387dd =3D amd64_syscall+0x28d/frame= 0xfffffe0235d50ab0 > > > > Xfast_syscall() at 0xffffffff8051f21b =3D Xfast_syscall+0xfb/frame = 0xfffffe0235d50ab0 > > > > --- syscall (5, FreeBSD ELF64, sys_open), rip =3D 0x800942d6a, rsp = =3D 0x7fffffffcff8, rbp =3D 0x7fffffffd030 --- > > > >=20 > > > > (gdb) list *fget+0x2a > > > > 0xffffffff802f685a is in fget (/usr/home/kostik/work/build/bsd/DEV/= src/sys/kern/kern_descrip.c:2385). > > > >=20 > > > > I do not have any capsicum-related options in the kernel config. > > >=20 > > > Do you have some local changes? Could you try to do full buildkernel? > > > There were two compilation issues when CAPABILITIES option was absent= in > > > kernel configuration, so something isn't right is you were able to > > > compile your kernel. > I have local changes, but nothing in kern_descrip.c or VFS, for this bran= ch. > The trace above is from the clean kernel build. I do able to build the > kernel without CAPABILITIES. >=20 > >=20 > > Forgot to mention that my test machine can boot fine with kernel > > compiled without the CAPABILITIES option. >=20 > If taking a time and actually looking at the backtrace I posted, you would > see that fdescfs is broken. The _fget() assumes that needrightsp is > always non-NULL, but fget() call from fdesc_lookup() passes NULL spelled > as 0. >=20 > Quick look over the sys/ catched at least > sys/kern/vfs_aio.c:2053 > sys/cddl/compat/opensolaris/sys/file.h:57 > sys/compat/linux/linux_stats.c:148 > sys/dev/aacraid/aacraid_linux.c:84 > with the same problem. Should be fixed in r255240. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --O98KdSgI27dgYlM5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlIoctcACgkQForvXbEpPzQPqgCfft/onYfjJJ0K3ueMqfkpwpAD gDwAnisFYZKQhWAWEE0yAiTdHFAkAQOi =TUq5 -----END PGP SIGNATURE----- --O98KdSgI27dgYlM5-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 12:21:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 44F53E8D; Thu, 5 Sep 2013 12:21:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3286B2A0D; Thu, 5 Sep 2013 12:21:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85CLCvl093531; Thu, 5 Sep 2013 12:21:12 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85CLCYU093530; Thu, 5 Sep 2013 12:21:12 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309051221.r85CLCYU093530@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 5 Sep 2013 12:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255242 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 12:21:12 -0000 Author: hselasky Date: Thu Sep 5 12:21:11 2013 New Revision: 255242 URL: http://svnweb.freebsd.org/changeset/base/255242 Log: Correct two comments. Modified: head/lib/libusb/libusb20_ugen20.c Modified: head/lib/libusb/libusb20_ugen20.c ============================================================================== --- head/lib/libusb/libusb20_ugen20.c Thu Sep 5 11:59:23 2013 (r255241) +++ head/lib/libusb/libusb20_ugen20.c Thu Sep 5 12:21:11 2013 (r255242) @@ -697,7 +697,7 @@ ugen20_detach_kernel_driver(struct libus if (ioctl(pdev->file_ctrl, IOUSB(USB_IFACE_DRIVER_DETACH), &temp)) { return (LIBUSB20_ERROR_OTHER); } - return (0); /* kernel driver is active */ + return (0); /* kernel driver is detached */ } static int @@ -724,7 +724,7 @@ ugen20_do_request_sync(struct libusb20_d /* get actual length */ *pactlen = req.ucr_actlen; } - return (0); /* kernel driver is active */ + return (0); /* request was successful */ } static int From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 12:35:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7BA5534B; Thu, 5 Sep 2013 12:35:24 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 68BCD2AEA; Thu, 5 Sep 2013 12:35:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85CZO95002528; Thu, 5 Sep 2013 12:35:24 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85CZOOl002527; Thu, 5 Sep 2013 12:35:24 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309051235.r85CZOOl002527@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Thu, 5 Sep 2013 12:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255243 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 12:35:24 -0000 Author: des Date: Thu Sep 5 12:35:23 2013 New Revision: 255243 URL: http://svnweb.freebsd.org/changeset/base/255243 Log: authpf needs /var/authpf to exist and be writable by group authpf. Modified: head/etc/mtree/BSD.var.dist Modified: head/etc/mtree/BSD.var.dist ============================================================================== --- head/etc/mtree/BSD.var.dist Thu Sep 5 12:21:11 2013 (r255242) +++ head/etc/mtree/BSD.var.dist Thu Sep 5 12:35:23 2013 (r255243) @@ -23,6 +23,8 @@ remote uname=auditdistd gname=wheel mode=0700 .. .. + authpf uname=root gname=authpf mode=0770 + .. /set gname=wheel backups .. From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 12:54:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1DC9FA42; Thu, 5 Sep 2013 12:54:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0B5932C21; Thu, 5 Sep 2013 12:54:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85CseH9014797; Thu, 5 Sep 2013 12:54:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85CseR5014796; Thu, 5 Sep 2013 12:54:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309051254.r85CseR5014796@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Sep 2013 12:54:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255244 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 12:54:41 -0000 Author: kib Date: Thu Sep 5 12:54:40 2013 New Revision: 255244 URL: http://svnweb.freebsd.org/changeset/base/255244 Log: The vm_page_trysbusy() should not fail when shared busy counter or VPB_BIT_WAITERS flag were changed between reading of busy_lock and the cas. The vm_page_sbusy(), which is the only user of vm_page_trysbusy() in the tree, panics on the failure, which in these cases is transient and do not mean that the current page state prevents sbusying. Retry the operation inside vm_page_trysbusy() if cas failed, only return a failure when VPB_BIT_SHARED is cleared. Reported and tested by: pho Reviewed by: attilio Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Sep 5 12:35:23 2013 (r255243) +++ head/sys/vm/vm_page.c Thu Sep 5 12:54:40 2013 (r255244) @@ -602,9 +602,13 @@ vm_page_trysbusy(vm_page_t m) { u_int x; - x = m->busy_lock; - return ((x & VPB_BIT_SHARED) != 0 && - atomic_cmpset_acq_int(&m->busy_lock, x, x + VPB_ONE_SHARER)); + for (;;) { + x = m->busy_lock; + if ((x & VPB_BIT_SHARED) == 0) + return (0); + if (atomic_cmpset_acq_int(&m->busy_lock, x, x + VPB_ONE_SHARER)) + return (1); + } } /* From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 12:56:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 85BA8C7E; Thu, 5 Sep 2013 12:56:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 72F762C3C; Thu, 5 Sep 2013 12:56:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85Cu9dW015709; Thu, 5 Sep 2013 12:56:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85Cu95u015708; Thu, 5 Sep 2013 12:56:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309051256.r85Cu95u015708@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Sep 2013 12:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255245 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 12:56:09 -0000 Author: kib Date: Thu Sep 5 12:56:08 2013 New Revision: 255245 URL: http://svnweb.freebsd.org/changeset/base/255245 Log: The vm_pageout_flush() functions sbusies pages in the passed pages run. After that, the pager put method is called, usually translated to VOP_WRITE(). For the filesystems which use buffer cache, bufwrite() sbusies the buffer pages again, waiting for the xbusy state to drain. The later is done in vfs_drain_busy_pages(), which is called with the buffer pages already sbusied (by vm_pageout_flush()). Since vfs_drain_busy_pages() can only wait for one page at the time, and during the wait, the object lock is dropped, previous pages in the buffer must be protected from other threads busying them. Up to the moment, it was done by xbusying the pages, that is incompatible with the sbusy state in the new implementation of busy. Switch to sbusy. Reported and tested by: pho Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Thu Sep 5 12:54:40 2013 (r255244) +++ head/sys/kern/vfs_bio.c Thu Sep 5 12:56:08 2013 (r255245) @@ -3994,7 +3994,7 @@ vfs_drain_busy_pages(struct buf *bp) m = bp->b_pages[i]; if (vm_page_xbusied(m)) { for (; last_busied < i; last_busied++) - vm_page_xbusy(bp->b_pages[last_busied]); + vm_page_sbusy(bp->b_pages[last_busied]); while (vm_page_xbusied(m)) { vm_page_lock(m); VM_OBJECT_WUNLOCK(bp->b_bufobj->bo_object); @@ -4004,7 +4004,7 @@ vfs_drain_busy_pages(struct buf *bp) } } for (i = 0; i < last_busied; i++) - vm_page_xunbusy(bp->b_pages[i]); + vm_page_sunbusy(bp->b_pages[i]); } /* From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 12:58:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3E0F8DDE; Thu, 5 Sep 2013 12:58:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9E8372C51; Thu, 5 Sep 2013 12:58:45 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r85Cwf2r033800; Thu, 5 Sep 2013 15:58:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r85Cwf2r033800 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r85CweGt033799; Thu, 5 Sep 2013 15:58:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 5 Sep 2013 15:58:40 +0300 From: Konstantin Belousov To: Pawel Jakub Dawidek Subject: Re: svn commit: r255219 - in head: contrib/tcpdump lib/libc lib/libc/capability lib/libc/include lib/libc/sys lib/libprocstat sbin/dhclient sbin/hastd sys/amd64/linux32 sys/bsm sys/cddl/compat/opensola... Message-ID: <20130905125840.GW41229@kib.kiev.ua> References: <201309050009.r8509vsE061271@svn.freebsd.org> <20130905024448.GO41229@kib.kiev.ua> <20130905061429.GD1388@garage.freebsd.pl> <20130905061923.GA5011@garage.freebsd.pl> <20130905095733.GP41229@kib.kiev.ua> <20130905120231.GF1383@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ucW7QTJbHsz5ya91" Content-Disposition: inline In-Reply-To: <20130905120231.GF1383@garage.freebsd.pl> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 12:58:46 -0000 --ucW7QTJbHsz5ya91 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 05, 2013 at 02:02:32PM +0200, Pawel Jakub Dawidek wrote: > Should be fixed in r255240. Seems to work now, thanks. --ucW7QTJbHsz5ya91 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSKH//AAoJEJDCuSvBvK1BI40P+wYOh6XgncDRkKUrVwhzoZOm FaU2erov2ls3dkOEW1dxzRKQ9tu+lPiMD5DfrFAQWydnlH8T4eS7tFCYfuVyn15g 4KyJ9kq0kbdkhuK1XzYrKTaP93llRX2aQLAAdNurhuZwlqKtYs+Qb9MsWIwtXADM KkbVD4n7tx3YULS8hurYqBVjeJocujnt8hjy+d99nxBXwV08dC1EZU8BbjzC+Q99 IQyccOOftxMMkcwqTamCP+eWhBHbXcyBfUJdADOhWX+L3ZEyMy99Y1bMzsayQFxQ A11hZkoe04UVhCxcpo8qGxKhZiaiRVgVmADVBFa3vhO4eWwCsCZyHxuF4BLEZjA/ TZ/ws5bZWoZIgBa071Mn2mtd+KWjetrUcugkucONt9aIAV63Mqm26P6dxqB4gSnQ e07zu84JCeuymFKGsMJPngxk2dJNcSWa8EJPaYAXD7ffLPCjPSm/bwD1G57Nvu7C CafEqz3BubeGtRzhxNY6Y4ll9vcJZkSwE6Ns6lzrrBFy38mB7R+zmVRMcPNGfd2A w9BDSOnnt6RhTWjA+ckkdyvIVUwEECT+ov+x0E8LXhh/VC1ndv1zX1sNF7uaDs0V TFSjwcpQFuXRRc+xX/dqJeKI4fHVfQ6tri74aLl3/FwiS/WuilSs+Xxqy5ctST+4 bNgbvL//XfeNTbG4dvuF =7LiO -----END PGP SIGNATURE----- --ucW7QTJbHsz5ya91-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 13:46:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0352E11D; Thu, 5 Sep 2013 13:46:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E4B4D2F9A; Thu, 5 Sep 2013 13:46:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85DkUDh045152; Thu, 5 Sep 2013 13:46:30 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85DkU6U045151; Thu, 5 Sep 2013 13:46:30 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309051346.r85DkU6U045151@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 5 Sep 2013 13:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255246 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 13:46:31 -0000 Author: glebius Date: Thu Sep 5 13:46:30 2013 New Revision: 255246 URL: http://svnweb.freebsd.org/changeset/base/255246 Log: Fix build. counter.h requires systm.h Modified: head/sys/sys/sf_buf.h Modified: head/sys/sys/sf_buf.h ============================================================================== --- head/sys/sys/sf_buf.h Thu Sep 5 12:56:08 2013 (r255245) +++ head/sys/sys/sf_buf.h Thu Sep 5 13:46:30 2013 (r255246) @@ -54,6 +54,7 @@ struct sfstat { /* sendfile statistic #ifdef _KERNEL #include +#include #include struct mbuf; /* for sf_buf_mext() */ From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 13:53:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7267B635; Thu, 5 Sep 2013 13:53:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5FA9E201E; Thu, 5 Sep 2013 13:53:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85DrP4l049824; Thu, 5 Sep 2013 13:53:25 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85DrP1a049823; Thu, 5 Sep 2013 13:53:25 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309051353.r85DrP1a049823@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 5 Sep 2013 13:53:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255247 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 13:53:26 -0000 Author: glebius Date: Thu Sep 5 13:53:25 2013 New Revision: 255247 URL: http://svnweb.freebsd.org/changeset/base/255247 Log: Fix build. Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Thu Sep 5 13:46:30 2013 (r255246) +++ head/sys/conf/files.powerpc Thu Sep 5 13:53:25 2013 (r255247) @@ -30,6 +30,7 @@ dev/agp/agp_apple.c optional agp powerm dev/fb/fb.c optional sc dev/fdt/fdt_powerpc.c optional fdt dev/hwpmc/hwpmc_powerpc.c optional hwpmc +dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc dev/iicbus/ad7417.c optional ad7417 powermac dev/iicbus/ds1631.c optional ds1631 powermac dev/iicbus/ds1775.c optional ds1775 powermac From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 14:03:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BC51FA4C; Thu, 5 Sep 2013 14:03:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2E91820E1; Thu, 5 Sep 2013 14:03:28 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r85E3JLm047637; Thu, 5 Sep 2013 17:03:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r85E3JLm047637 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r85E3JvE047636; Thu, 5 Sep 2013 17:03:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 5 Sep 2013 17:03:19 +0300 From: Konstantin Belousov To: Gleb Smirnoff Subject: Re: svn commit: r255246 - head/sys/sys Message-ID: <20130905140319.GX41229@kib.kiev.ua> References: <201309051346.r85DkU6U045151@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4YpuVpvaG742Nl2X" Content-Disposition: inline In-Reply-To: <201309051346.r85DkU6U045151@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 14:03:28 -0000 --4YpuVpvaG742Nl2X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 05, 2013 at 01:46:30PM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Thu Sep 5 13:46:30 2013 > New Revision: 255246 > URL: http://svnweb.freebsd.org/changeset/base/255246 >=20 > Log: > Fix build. > counter.h requires systm.h >=20 > Modified: > head/sys/sys/sf_buf.h >=20 > Modified: head/sys/sys/sf_buf.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/sys/sf_buf.h Thu Sep 5 12:56:08 2013 (r255245) > +++ head/sys/sys/sf_buf.h Thu Sep 5 13:46:30 2013 (r255246) > @@ -54,6 +54,7 @@ struct sfstat { /* sendfile statistic > =20 > #ifdef _KERNEL > #include > +#include > #include > struct mbuf; /* for sf_buf_mext() */ > =20 IMO the counter.h (and sfstat, SFSTAT_INC) should be removed from the sf_bu= f.h. --4YpuVpvaG742Nl2X Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSKI8mAAoJEJDCuSvBvK1B7SgQAJ5RwbhDYfy7HYEFhGksnCVy BMft7LFrqqFf95bnpRDRYSnGTgO9nLjBFXtWULHx9b+ESSeD0vawk/Vx2YP2vofC +oIyitClnGlqMi3HEPlEyNDKfeFvJnixwoH8Rsa/U9cf/8xpHBt0+J9DuN1mwqiO Q6amFXf0v/9akW1QykQkKoJdR7eONTjnrDC5LS48z6isFB5j13FKntFZI6gK9ZRL MTIFi+ju58rtA1AikKJizOuxVxRn3ad2imcztbD/7xc3SIgpViCIT8UW/GRUexV2 8cGK7gzEE6BzesyMhNBCP6kHPPCb3UorVilsDBXsLIUHmd5Yho/FD8o34OWMGair 7NwIqfYm3fQHus6nRtQfUCSXOxD56pEY3YcMOxS6HC+NokdvcIqMymmoAMP6YZJ2 Zga23AKNGc45ZhPkyBsGmix/uCfVhljVE/GAbGXCt0flkbY9SCigdzUNRvxDfe7p cegv7POtNuos/yDIhDLcGUSvx+wEGgxzgxzdprDwm0duqZrJGbhq1UHf9hsGz9GB Q4U7S8L/Ha6gVhvrASi6I0YyQfR4elKuJdD7R+mSd4vSHagJ7oXTcJrPNPSs/gj3 /q1B+lRhKSPvU4GB0n+qU3opVg5WDK9GfFtOs47bJu3axjD4/UcrFfnSGznZBec4 uh2kLGGkuhSzTkk4UVF1 =KdqN -----END PGP SIGNATURE----- --4YpuVpvaG742Nl2X-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 14:16:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A359E2BB; Thu, 5 Sep 2013 14:16:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9105E21D1; Thu, 5 Sep 2013 14:16:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85EGcS7063175; Thu, 5 Sep 2013 14:16:38 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85EGcZP063159; Thu, 5 Sep 2013 14:16:38 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201309051416.r85EGcZP063159@svn.freebsd.org> From: John Baldwin Date: Thu, 5 Sep 2013 14:16:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255248 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 14:16:38 -0000 Author: jhb Date: Thu Sep 5 14:16:37 2013 New Revision: 255248 URL: http://svnweb.freebsd.org/changeset/base/255248 Log: Use an unsigned long when indexing into mfchashtbl[] and mf6ctable[]. This matches the types used when computing hash indices and the type of the maximum size of mfchashtbl[]. PR: kern/181821 Submitted by: Sven-Thorsten Dietrich (IPv4) MFC after: 1 week Modified: head/sys/netinet/ip_mroute.c head/sys/netinet6/ip6_mroute.c Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Thu Sep 5 13:53:25 2013 (r255247) +++ head/sys/netinet/ip_mroute.c Thu Sep 5 14:16:37 2013 (r255248) @@ -609,7 +609,7 @@ static void if_detached_event(void *arg __unused, struct ifnet *ifp) { vifi_t vifi; - int i; + u_long i; MROUTER_LOCK(); @@ -705,7 +705,7 @@ static int X_ip_mrouter_done(void) { struct ifnet *ifp; - int i; + u_long i; vifi_t vifi; MROUTER_LOCK(); @@ -797,7 +797,7 @@ set_assert(int i) int set_api_config(uint32_t *apival) { - int i; + u_long i; /* * We can set the API capabilities only if it is the first operation @@ -1433,7 +1433,7 @@ non_fatal: static void expire_upcalls(void *arg) { - int i; + u_long i; CURVNET_SET((struct vnet *) arg); Modified: head/sys/netinet6/ip6_mroute.c ============================================================================== --- head/sys/netinet6/ip6_mroute.c Thu Sep 5 13:53:25 2013 (r255247) +++ head/sys/netinet6/ip6_mroute.c Thu Sep 5 14:16:37 2013 (r255248) @@ -576,7 +576,7 @@ int X_ip6_mrouter_done(void) { mifi_t mifi; - int i; + u_long i; struct mf6c *rt; struct rtdetq *rte; @@ -1341,7 +1341,7 @@ expire_upcalls(void *unused) { struct rtdetq *rte; struct mf6c *mfc, **nptr; - int i; + u_long i; MFC6_LOCK(); for (i = 0; i < MF6CTBLSIZ; i++) { From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 14:26:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 357BA9C7; Thu, 5 Sep 2013 14:26:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 232C52310; Thu, 5 Sep 2013 14:26:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85EQb6L068962; Thu, 5 Sep 2013 14:26:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85EQbt7068961; Thu, 5 Sep 2013 14:26:37 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201309051426.r85EQbt7068961@svn.freebsd.org> From: John Baldwin Date: Thu, 5 Sep 2013 14:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255249 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 14:26:38 -0000 Author: jhb Date: Thu Sep 5 14:26:37 2013 New Revision: 255249 URL: http://svnweb.freebsd.org/changeset/base/255249 Log: Use LIST_FOREACH_SAFE() instead of doing it by hand. Modified: head/sys/netinet/ip_mroute.c Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Thu Sep 5 14:16:37 2013 (r255248) +++ head/sys/netinet/ip_mroute.c Thu Sep 5 14:26:37 2013 (r255249) @@ -634,8 +634,8 @@ if_detached_event(void *arg __unused, st continue; for (i = 0; i < mfchashsize; i++) { struct mfc *rt, *nrt; - for (rt = LIST_FIRST(&V_mfchashtbl[i]); rt; rt = nrt) { - nrt = LIST_NEXT(rt, mfc_hash); + + LIST_FOREACH_SAFE(rt, &V_mfchashtbl[i], mfc_hash, nrt) { if (rt->mfc_parent == vifi) { expire_mfc(rt); } @@ -753,8 +753,8 @@ X_ip_mrouter_done(void) */ for (i = 0; i < mfchashsize; i++) { struct mfc *rt, *nrt; - for (rt = LIST_FIRST(&V_mfchashtbl[i]); rt; rt = nrt) { - nrt = LIST_NEXT(rt, mfc_hash); + + LIST_FOREACH_SAFE(rt, &V_mfchashtbl[i], mfc_hash, nrt) { expire_mfc(rt); } } @@ -1445,9 +1445,7 @@ expire_upcalls(void *arg) if (V_nexpire[i] == 0) continue; - for (rt = LIST_FIRST(&V_mfchashtbl[i]); rt; rt = nrt) { - nrt = LIST_NEXT(rt, mfc_hash); - + LIST_FOREACH_SAFE(rt, &V_mfchashtbl[i], mfc_hash, nrt) { if (TAILQ_EMPTY(&rt->mfc_stall)) continue; From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 14:32:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8BE32E18; Thu, 5 Sep 2013 14:32:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 61D1B2392; Thu, 5 Sep 2013 14:32:16 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9C31EB97A; Thu, 5 Sep 2013 10:32:12 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r255192 - in head: contrib/binutils/gas/config contrib/binutils/opcodes sys/amd64/amd64 Date: Thu, 5 Sep 2013 08:27:18 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201309032121.r83LLlI5026519@svn.freebsd.org> <201309040756.45464.jhb@freebsd.org> <20130905004430.GM41229@kib.kiev.ua> In-Reply-To: <20130905004430.GM41229@kib.kiev.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201309050827.18567.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 05 Sep 2013 10:32:12 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 14:32:16 -0000 On Wednesday, September 04, 2013 8:44:30 pm Konstantin Belousov wrote: > On Wed, Sep 04, 2013 at 07:56:45AM -0400, John Baldwin wrote: > > On Wednesday, September 04, 2013 12:25:35 am Konstantin Belousov wrote: > > > On Tue, Sep 03, 2013 at 09:21:47PM +0000, John Baldwin wrote: > > > > Author: jhb > > > > Date: Tue Sep 3 21:21:47 2013 > > > > New Revision: 255192 > > > > URL: http://svnweb.freebsd.org/changeset/base/255192 > > > > > > > > Log: > > > > Add support for the 'invpcid' instruction to binutils and DDB's > > > > disassembler on amd64. > > > > > > > > MFC after: 1 month > > > > > > Nice, thank you. > > > > > > Do you agree with me that it is premature to start using the mnemonics > > > in the kernel source until the changes are merged into stable/9 at least ? > > > > That is fine. Can you test that using them directly works fine with GCC? > > I know clang already supported this instruction. > > Hmm, tried make buildkernel CC=gcc for the world (and builworld area) > built after your commit. I get > > gcc -c -x assembler-with-cpp -DLOCORE -O2 -frename-registers -pipe -fno-strict-a > liasing -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototype > s -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-point > er-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option > -nostdinc -I. -I/usr/home/kostik/work/build/bsd/DEV/src/sys -I/usr/home/kostik/ > work/build/bsd/DEV/src/sys/contrib/altq -I/usr/home/kostik/work/build/bsd/DEV/sr > c/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global. > h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-f > unction-growth=1000 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mcmod > el=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind > -tables -ffreestanding -fstack-protector -Werror /usr/home/kostik/work/build/bsd/DEV/src/sys/amd64/amd64/exception.S > /usr/home/kostik/work/build/bsd/DEV/src/sys/amd64/amd64/apic_vector.S: Assembler messages: > /usr/home/kostik/work/build/bsd/DEV/src/sys/amd64/amd64/apic_vector.S:224: Error: no such instruction: `invpcid (%rdx),%rax' > /usr/home/kostik/work/build/bsd/DEV/src/sys/amd64/amd64/apic_vector.S:312: Error: no such instruction: `invpcid (%rdx),%rax' > /usr/home/kostik/work/build/bsd/DEV/src/sys/amd64/amd64/apic_vector.S:409: Error: no such instruction: `invpcid (%rdx),%rax' > *** Error code 1 Hmm, I have no idea why this failed. :( It should definitely be using the new as after a buildworld. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 14:32:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E6D1DE24; Thu, 5 Sep 2013 14:32:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C9B92395; Thu, 5 Sep 2013 14:32:22 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AB169B9AB; Thu, 5 Sep 2013 10:32:21 -0400 (EDT) From: John Baldwin To: Joel Dahl Subject: Re: svn commit: r254273 - in head: . include lib lib/libc/iconv lib/libiconv_compat lib/libkiconv share/mk sys/sys tools/build/mk Date: Thu, 5 Sep 2013 10:13:34 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201308130715.r7D7F1nu076335@svn.freebsd.org> <20130822155835.GA52789@devbox.vnode.local> <20130903195241.GA93218@devbox.vnode.local> In-Reply-To: <20130903195241.GA93218@devbox.vnode.local> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201309051013.35286.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 05 Sep 2013 10:32:21 -0400 (EDT) Cc: src-committers@freebsd.org, Jilles Tjoelker , Peter Wemm , svn-src-all@freebsd.org, Dimitry Andric , gabor@freebsd.org, svn-src-head@freebsd.org, Peter Wemm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 14:32:23 -0000 On Tuesday, September 03, 2013 3:52:41 pm Joel Dahl wrote: > On Thu, Aug 22, 2013 at 05:58:35PM +0200, Joel Dahl wrote: > > On Sun, Aug 18, 2013 at 03:51:25PM -0700, Peter Wemm wrote: > > > On 8/18/13 3:42 PM, Jilles Tjoelker wrote: > > > > On Sun, Aug 18, 2013 at 09:53:04PM +0200, Joel Dahl wrote: > > > >> On Sun, Aug 18, 2013 at 12:34:30AM +0200, Dimitry Andric wrote: > > > >>> On Aug 13, 2013, at 09:15, Peter Wemm wrote: > > > >>>> Author: peter > > > >>>> Date: Tue Aug 13 07:15:01 2013 > > > >>>> New Revision: 254273 > > > >>>> URL: http://svnweb.freebsd.org/changeset/base/254273 > > > > > > > >>>> Log: > > > >>>> The iconv in libc did two things - implement the standard APIs, the GNU > > > >>>> extensions and also tried to be link time compatible with ports libiconv. > > > >>>> This splits that functionality and enables the parts that shouldn't > > > >>>> interfere with the port by default. > > > > > > > >>>> WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) etc. > > > >>>> WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open etc API, linker > > > >>>> symbols and even a stub libiconv.so.3 that are good enough to be able > > > >>>> to 'pkg delete -f libiconv' on a running system and reasonably expect it > > > >>>> to work. > > > > > > > >>>> I have tortured many machines over the last few days to try and reduce > > > >>>> the possibilities of foot-shooting as much as I can. I've successfully > > > >>>> recompiled to enable and disable the libiconv_compat modes, ports that use > > > >>>> libiconv alongside system iconv etc. If you don't enable the > > > >>>> WITH_LIBICONV_COMPAT switch, they don't share symbol space. > > > > > > > >>>> This is an extension of behavior on other system. iconv(3) is a standard > > > >>>> libc interface and libiconv port expects to be able to run alongside it on > > > >>>> systems that have it. > > > > > > > >>> Unfortunately I expect this will break many ports, when the libiconv > > > >>> port is installed. A simple example is the following: > > > >> > > > > > > > >> It also breaks installworld when /usr/src and /usr/obj are NFS exported > > > >> read-only. > > > > > > > > I think it has to do with share/i18n/csmapper and share/i18n/esdb using > > > > directories as make targets. This apparently causes these files to be > > > > rebuilt at 'make installworld' time, which is always bad but is only > > > > detected when /usr/obj is read-only. > > > > > > > > A hack that works is to enclose the four targets depending on ${SUBDIR} > > > > in .if !make(install) . > > > > > > > > Unfortunately, the Makefiles were written to depend on the directories > > > > as make targets fairly deeply, so a real fix is harder. > > > > > > I was looking at this yesterday, but was tied up with other things. I'll > > > take a look at it today after getting a few other things done. It should be > > > easy enough to replicate by changing /usr/obj to readonly on test systems. > > > > FWIW, this is still broken. > > Again, this is still broken. Yeah, my laptop failed to build cups (required by ghostscript which is required by emacs) because of this: ===> FreeBSD 10 autotools fix applied to /usr/ports/print/cups-image/work/cups-1.5.4/configure Configuring CUPS with options: ... configure: WARNING: unrecognized options: --disable-pdftops ... checking iconv.h usability... yes checking iconv.h presence... yes checking for iconv.h... yes checking for library containing iconv_open... none required ... Linking texttops... cc -L../cgi-bin -L../cups -L../filter -L../ppdc -L../scheduler -L/usr/local/lib -Wl,-rpath=/usr/lib:/usr/local/lib -Wl,-R/usr/local/lib -Wall -Wno- format-y2k -Wunused -fPIC -Os -g -fstack-protector -Wno-tautological-compare -o texttops texttops.o textcommon.o common.o -lcups -lssl -lcrypto -lz -pthread -lcrypt -lm -lssp_nonshared ../cups/libcups.so: undefined reference to `libiconv' ../cups/libcups.so: undefined reference to `libiconv_close' ../cups/libcups.so: undefined reference to `libiconv_open' cc: error: linker command failed with exit code 1 (use -v to see invocation) gmake[9]: *** [commandtops] Error 1 ... Having cups broken will probably break all of kde, etc. Are we seeing this in HEAD package builds yet? (Maybe the world we are using doesn't have this change yet?) Note that this is just a clean build of HEAD and a fresh build of ports from scratch. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 14:41:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EC6A688D; Thu, 5 Sep 2013 14:41:48 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-bk0-x231.google.com (mail-bk0-x231.google.com [IPv6:2a00:1450:4008:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E47B244C; Thu, 5 Sep 2013 14:41:47 +0000 (UTC) Received: by mail-bk0-f49.google.com with SMTP id r7so790229bkg.36 for ; Thu, 05 Sep 2013 07:41:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=X3c04D1BmIQwDSHGcwftWqEuRD0gmx7CR347m1XXfeo=; b=YbnJXAfmAogVhGaa1nn4+C63Z/nMp/F9u2NFn6VgYSOSHf91JviTzPzVvCXRcHCT8I b80Q0sajV1PPLHKVHUfFCE3AKzguyde/5WGj4mOHBG9ryWO7vaZi3VqOHDnW7Y20+W9c kMcTzAut4A3L8PLpgn6yJ3eUqvdPX5F3ZI0vXX2UF6r1Nj5a0syqmHC90jWSmkHGWDLO CaCb0R88VH49jhe1OoXWDrMnlrR70XU50qrec1gfoWbNkzMHdWJJkvM+JPgX2Hk2TJBJ bGKaIXdjNiQNzcK1cKjvwacXIdYK8y/EuawQhuOrwK32mdPe7GKqSZRdp2b9G756XTU4 KTrQ== MIME-Version: 1.0 X-Received: by 10.205.76.133 with SMTP id ze5mr2104310bkb.37.1378392106178; Thu, 05 Sep 2013 07:41:46 -0700 (PDT) Sender: chmeeedalf@gmail.com Received: by 10.205.13.199 with HTTP; Thu, 5 Sep 2013 07:41:46 -0700 (PDT) Received: by 10.205.13.199 with HTTP; Thu, 5 Sep 2013 07:41:46 -0700 (PDT) In-Reply-To: <201309051353.r85DrP1a049823@svn.freebsd.org> References: <201309051353.r85DrP1a049823@svn.freebsd.org> Date: Thu, 5 Sep 2013 07:41:46 -0700 X-Google-Sender-Auth: N_SIJUAIoKb5vgiiyvBZkzvABQ4 Message-ID: Subject: Re: svn commit: r255247 - head/sys/conf From: Justin Hibbits To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 14:41:49 -0000 Pointyhat to: jhibbits Sorry about that, for the third time in as many days for the same component. On Sep 5, 2013 6:53 AM, "Gleb Smirnoff" wrote: > Author: glebius > Date: Thu Sep 5 13:53:25 2013 > New Revision: 255247 > URL: http://svnweb.freebsd.org/changeset/base/255247 > > Log: > Fix build. > > Modified: > head/sys/conf/files.powerpc > > Modified: head/sys/conf/files.powerpc > > ============================================================================== > --- head/sys/conf/files.powerpc Thu Sep 5 13:46:30 2013 (r255246) > +++ head/sys/conf/files.powerpc Thu Sep 5 13:53:25 2013 (r255247) > @@ -30,6 +30,7 @@ dev/agp/agp_apple.c optional agp powerm > dev/fb/fb.c optional sc > dev/fdt/fdt_powerpc.c optional fdt > dev/hwpmc/hwpmc_powerpc.c optional hwpmc > +dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc > dev/iicbus/ad7417.c optional ad7417 powermac > dev/iicbus/ds1631.c optional ds1631 powermac > dev/iicbus/ds1775.c optional ds1775 powermac > From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 14:44:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 74153AB4; Thu, 5 Sep 2013 14:44:42 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F0154247A; Thu, 5 Sep 2013 14:44:41 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id r85Eid3H014339; Thu, 5 Sep 2013 18:44:39 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id r85EidXo014338; Thu, 5 Sep 2013 18:44:39 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 5 Sep 2013 18:44:39 +0400 From: Gleb Smirnoff To: Konstantin Belousov Subject: Re: svn commit: r255246 - head/sys/sys Message-ID: <20130905144439.GD4574@FreeBSD.org> References: <201309051346.r85DkU6U045151@svn.freebsd.org> <20130905140319.GX41229@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130905140319.GX41229@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 14:44:42 -0000 On Thu, Sep 05, 2013 at 05:03:19PM +0300, Konstantin Belousov wrote: K> On Thu, Sep 05, 2013 at 01:46:30PM +0000, Gleb Smirnoff wrote: K> > Author: glebius K> > Date: Thu Sep 5 13:46:30 2013 K> > New Revision: 255246 K> > URL: http://svnweb.freebsd.org/changeset/base/255246 K> > K> > Log: K> > Fix build. K> > counter.h requires systm.h K> > K> > Modified: K> > head/sys/sys/sf_buf.h K> > K> > Modified: head/sys/sys/sf_buf.h K> > ============================================================================== K> > --- head/sys/sys/sf_buf.h Thu Sep 5 12:56:08 2013 (r255245) K> > +++ head/sys/sys/sf_buf.h Thu Sep 5 13:46:30 2013 (r255246) K> > @@ -54,6 +54,7 @@ struct sfstat { /* sendfile statistic K> > K> > #ifdef _KERNEL K> > #include K> > +#include K> > #include K> > struct mbuf; /* for sf_buf_mext() */ K> > K> IMO the counter.h (and sfstat, SFSTAT_INC) should be removed from the sf_buf.h. The problem is that SFSTAT_INC() is used in MD code. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 14:46:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 04CDDC0B; Thu, 5 Sep 2013 14:46:54 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-we0-x22a.google.com (mail-we0-x22a.google.com [IPv6:2a00:1450:400c:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9D716248E; Thu, 5 Sep 2013 14:46:52 +0000 (UTC) Received: by mail-we0-f170.google.com with SMTP id w62so773825wes.15 for ; Thu, 05 Sep 2013 07:46:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=FTO6llb1YZ0oXUYb1RUTODxS1h+5H+w+z6CciUP/iZQ=; b=fvpn7tGWsPOwZYtpC8hH5AGuOPC6qKUeYmd5vwQQ5eqpef8y1/nIJqIqeH0oyVjWEP TIboGz28XYxLitHLFOnBI+A6IYL5ooeIBd/LByoGPGAc18TsMPKliwlIsjcxCgQ05/0O s9tU+SZf59fFfwVeIU5RbI1Xlh3NNZXGeEhS4FLEEzZ7xKJOxdKjTXdJj44Eit2EFCij Zhu4GtF82/fSQVGDG0abDXMY+98LFcWKVIzOteHBMeQYQSYyTSPWi66iPGjS1ZsBiqv8 n9di9ogSxqZPX+UQfEo5lZbmIfK27/FBpioxGxf2daHXmc610v//b29ju5PYpha7hhTN KNfA== X-Received: by 10.180.109.35 with SMTP id hp3mr6630227wib.52.1378392410870; Thu, 05 Sep 2013 07:46:50 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPSA id v7sm12247563wiy.11.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Sep 2013 07:46:50 -0700 (PDT) Sender: Baptiste Daroussin Date: Thu, 5 Sep 2013 16:46:48 +0200 From: Baptiste Daroussin To: John Baldwin Subject: Re: svn commit: r254273 - in head: . include lib lib/libc/iconv lib/libiconv_compat lib/libkiconv share/mk sys/sys tools/build/mk Message-ID: <20130905144647.GO82066@ithaqua.etoilebsd.net> References: <201308130715.r7D7F1nu076335@svn.freebsd.org> <20130822155835.GA52789@devbox.vnode.local> <20130903195241.GA93218@devbox.vnode.local> <201309051013.35286.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Qa0ccP92Gc0Ko3P8" Content-Disposition: inline In-Reply-To: <201309051013.35286.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Thu, 05 Sep 2013 15:44:02 +0000 Cc: src-committers@freebsd.org, Jilles Tjoelker , Peter Wemm , svn-src-all@freebsd.org, Dimitry Andric , Joel Dahl , gabor@freebsd.org, svn-src-head@freebsd.org, Peter Wemm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 14:46:54 -0000 --Qa0ccP92Gc0Ko3P8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 05, 2013 at 10:13:34AM -0400, John Baldwin wrote: > On Tuesday, September 03, 2013 3:52:41 pm Joel Dahl wrote: > > On Thu, Aug 22, 2013 at 05:58:35PM +0200, Joel Dahl wrote: > > > On Sun, Aug 18, 2013 at 03:51:25PM -0700, Peter Wemm wrote: > > > > On 8/18/13 3:42 PM, Jilles Tjoelker wrote: > > > > > On Sun, Aug 18, 2013 at 09:53:04PM +0200, Joel Dahl wrote: > > > > >> On Sun, Aug 18, 2013 at 12:34:30AM +0200, Dimitry Andric wrote: > > > > >>> On Aug 13, 2013, at 09:15, Peter Wemm wrote: > > > > >>>> Author: peter > > > > >>>> Date: Tue Aug 13 07:15:01 2013 > > > > >>>> New Revision: 254273 > > > > >>>> URL: http://svnweb.freebsd.org/changeset/base/254273 > > > > >=20 > > > > >>>> Log: > > > > >>>> The iconv in libc did two things - implement the standard API= s, the GNU > > > > >>>> extensions and also tried to be link time compatible with por= ts libiconv. > > > > >>>> This splits that functionality and enables the parts that sho= uldn't > > > > >>>> interfere with the port by default. > > > > >=20 > > > > >>>> WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) = etc. > > > > >>>> WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open = etc API, linker > > > > >>>> symbols and even a stub libiconv.so.3 that are good enough to= be able > > > > >>>> to 'pkg delete -f libiconv' on a running system and reasonabl= y expect it > > > > >>>> to work. > > > > >=20 > > > > >>>> I have tortured many machines over the last few days to try a= nd reduce > > > > >>>> the possibilities of foot-shooting as much as I can. I've su= ccessfully > > > > >>>> recompiled to enable and disable the libiconv_compat modes, p= orts that use > > > > >>>> libiconv alongside system iconv etc. If you don't enable the > > > > >>>> WITH_LIBICONV_COMPAT switch, they don't share symbol space. > > > > >=20 > > > > >>>> This is an extension of behavior on other system. iconv(3) i= s a standard > > > > >>>> libc interface and libiconv port expects to be able to run al= ongside it on > > > > >>>> systems that have it. > > > > >=20 > > > > >>> Unfortunately I expect this will break many ports, when the lib= iconv > > > > >>> port is installed. A simple example is the following: > > > > >> > > > > >=20 > > > > >> It also breaks installworld when /usr/src and /usr/obj are NFS e= xported > > > > >> read-only. > > > > >=20 > > > > > I think it has to do with share/i18n/csmapper and share/i18n/esdb= using > > > > > directories as make targets. This apparently causes these files t= o be > > > > > rebuilt at 'make installworld' time, which is always bad but is o= nly > > > > > detected when /usr/obj is read-only. > > > > >=20 > > > > > A hack that works is to enclose the four targets depending on ${S= UBDIR} > > > > > in .if !make(install) . > > > > >=20 > > > > > Unfortunately, the Makefiles were written to depend on the direct= ories > > > > > as make targets fairly deeply, so a real fix is harder. > > > >=20 > > > > I was looking at this yesterday, but was tied up with other things.= I'll > > > > take a look at it today after getting a few other things done. It = should be > > > > easy enough to replicate by changing /usr/obj to readonly on test s= ystems. > > >=20 > > > FWIW, this is still broken. > >=20 > > Again, this is still broken. >=20 > Yeah, my laptop failed to build cups (required by ghostscript which is re= quired > by emacs) because of this: >=20 > =3D=3D=3D> FreeBSD 10 autotools fix applied to /usr/ports/print/cups-im= age/work/cups-1.5.4/configure > Configuring CUPS with options: > ... > configure: WARNING: unrecognized options: --disable-pdftops > ... > checking iconv.h usability... yes > checking iconv.h presence... yes > checking for iconv.h... yes > checking for library containing iconv_open... none required > ... > Linking texttops... > cc -L../cgi-bin -L../cups -L../filter -L../ppdc -L../scheduler -L/usr/loc= al/lib -Wl,-rpath=3D/usr/lib:/usr/local/lib -Wl,-R/usr/local/lib -Wall -W= no- > format-y2k -Wunused -fPIC -Os -g -fstack-protector -Wno-tautological-comp= are -o texttops texttops.o textcommon.o common.o -lcups -lssl -lcrypto -l= z=20 > -pthread -lcrypt -lm -lssp_nonshared=20 > ../cups/libcups.so: undefined reference to `libiconv' > ../cups/libcups.so: undefined reference to `libiconv_close' > ../cups/libcups.so: undefined reference to `libiconv_open' > cc: error: linker command failed with exit code 1 (use -v to see invocati= on) > gmake[9]: *** [commandtops] Error 1 > ... >=20 > Having cups broken will probably break all of kde, etc. Are we seeing th= is > in HEAD package builds yet? (Maybe the world we are using doesn't have > this change yet?) Note that this is just a clean build of HEAD and a fre= sh > build of ports from scratch. >=20 This should work properly now, the ports tree received motification yesterd= ay and converters/libiconv is not installed anymore now. regards, Bapt --Qa0ccP92Gc0Ko3P8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlIomVcACgkQ8kTtMUmk6EwPOgCgj0LeXhe56NfFHtfP0acKhKjl 6OwAoJATDcqMXj5lkU71Rj5fiH5nL/iS =kP58 -----END PGP SIGNATURE----- --Qa0ccP92Gc0Ko3P8-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 15:57:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A3C59E6D; Thu, 5 Sep 2013 15:57:31 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 82C7C2BF2; Thu, 5 Sep 2013 15:57:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85FvV8M022365; Thu, 5 Sep 2013 15:57:31 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85FvRZu022337; Thu, 5 Sep 2013 15:57:27 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201309051557.r85FvRZu022337@svn.freebsd.org> From: "Simon J. Gerraty" Date: Thu, 5 Sep 2013 15:57:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255253 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 15:57:31 -0000 Author: sjg Date: Thu Sep 5 15:57:26 2013 New Revision: 255253 URL: http://svnweb.freebsd.org/changeset/base/255253 Log: Merge bmake-20130904 Added: head/contrib/bmake/unit-tests/sunshcmd - copied unchanged from r255252, vendor/NetBSD/bmake/dist/unit-tests/sunshcmd Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/FILES head/contrib/bmake/Makefile head/contrib/bmake/bmake.1 head/contrib/bmake/bmake.cat1 head/contrib/bmake/compat.c head/contrib/bmake/job.c head/contrib/bmake/main.c head/contrib/bmake/make.1 head/contrib/bmake/make.h head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/gendirdeps.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/libs.mk head/contrib/bmake/mk/progs.mk head/contrib/bmake/parse.c head/contrib/bmake/unit-tests/Makefile.in head/contrib/bmake/unit-tests/test.exp head/contrib/bmake/var.c head/usr.bin/bmake/Makefile head/usr.bin/bmake/unit-tests/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/ChangeLog Thu Sep 5 15:57:26 2013 (r255253) @@ -1,3 +1,24 @@ +2013-09-04 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130904 + Merge with NetBSD make, pick up + o Add VAR_INTERNAL context, so that internal setting of + MAKEFILE does not override value set by makefiles. + +2013-09-02 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130902 + Merge with NetBSD make, pick up + o CompatRunCommand: only apply shellErrFlag when errCheck is true + +2013-08-28 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130828 + Merge with NetBSD make, pick up + o Fix VAR :sh = syntax from Will Andrews at freebsd.org + o Call Job_SetPrefix() from Job_Init() so makefiles have + opportunity to set .MAKE.JOB.PREFIX + 2013-07-30 Simon J. Gerraty * Makefile (MAKE_VERSION): 20130730 Modified: head/contrib/bmake/FILES ============================================================================== --- head/contrib/bmake/FILES Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/FILES Thu Sep 5 15:57:26 2013 (r255253) @@ -114,6 +114,7 @@ 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 Modified: head/contrib/bmake/Makefile ============================================================================== --- head/contrib/bmake/Makefile Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/Makefile Thu Sep 5 15:57:26 2013 (r255253) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.17 2013/07/30 19:13:53 sjg Exp $ +# $Id: Makefile,v 1.20 2013/09/04 15:42:03 sjg Exp $ # Base version on src date -MAKE_VERSION= 20130730 +MAKE_VERSION= 20130904 PROG= bmake Modified: head/contrib/bmake/bmake.1 ============================================================================== --- head/contrib/bmake/bmake.1 Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/bmake.1 Thu Sep 5 15:57:26 2013 (r255253) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.220 2013/07/30 19:09:57 sjg Exp $ +.\" $NetBSD: make.1,v 1.222 2013/08/11 09:53:49 apb 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 July 30, 2013 +.Dd August 11, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -1971,6 +1971,12 @@ If the source is the special .Ic .DOTLAST target, then the current working directory is searched last. +.It Ic .PATH. Ns Va suffix +Like +.Ic .PATH +but applies only to files with a particular suffix. +The suffix must have been previously declared with +.Ic .SUFFIXES . .It Ic .PHONY Apply the .Ic .PHONY Modified: head/contrib/bmake/bmake.cat1 ============================================================================== --- head/contrib/bmake/bmake.cat1 Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/bmake.cat1 Thu Sep 5 15:57:26 2013 (r255253) @@ -1257,6 +1257,10 @@ SSPPEECCIIAALL TTAARRGGEETT source is the special ..DDOOTTLLAASSTT target, then the current working directory is searched last. + ..PPAATTHH.._s_u_f_f_i_x + Like ..PPAATTHH but applies only to files with a particular suffix. + The suffix must have been previously declared with ..SSUUFFFFIIXXEESS. + ..PPHHOONNYY Apply the ..PPHHOONNYY attribute to any specified sources. ..PPRREECCIIOOUUSS @@ -1374,4 +1378,4 @@ BBUUGGSS There is no way of escaping a space character in a filename. -NetBSD 5.1 July 30, 2013 NetBSD 5.1 +NetBSD 5.1 August 11, 2013 NetBSD 5.1 Modified: head/contrib/bmake/compat.c ============================================================================== --- head/contrib/bmake/compat.c Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/compat.c Thu Sep 5 15:57:26 2013 (r255253) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $ */ +/* $NetBSD: compat.c,v 1.93 2013/09/02 19:26:42 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.93 2013/09/02 19:26:42 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.93 2013/09/02 19:26:42 sjg Exp $"); #endif #endif /* not lint */ #endif Modified: head/contrib/bmake/job.c ============================================================================== --- head/contrib/bmake/job.c Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/job.c Thu Sep 5 15:57:26 2013 (r255253) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $ */ +/* $NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $"); +__RCSID("$NetBSD: job.c,v 1.176 2013/08/04 16:48:15 sjg Exp $"); #endif #endif /* not lint */ #endif Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/main.c Thu Sep 5 15:57:26 2013 (r255253) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $ */ +/* $NetBSD: main.c,v 1.224 2013/09/04 15:38:26 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.224 2013/09/04 15:38:26 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.224 2013/09/04 15:38:26 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -1414,7 +1414,7 @@ ReadMakefile(const void *p, const void * if (!strcmp(fname, "-")) { Parse_File(NULL /*stdin*/, -1); - Var_Set("MAKEFILE", "", VAR_GLOBAL, 0); + Var_Set("MAKEFILE", "", VAR_INTERNAL, 0); } else { /* if we've chdir'd, rebuild the path name */ if (strcmp(curdir, objdir) && *fname != '/') { @@ -1463,7 +1463,7 @@ ReadMakefile(const void *p, const void * */ found: if (!doing_depend) - Var_Set("MAKEFILE", fname, VAR_GLOBAL, 0); + Var_Set("MAKEFILE", fname, VAR_INTERNAL, 0); Parse_File(fname, fd); } free(path); Modified: head/contrib/bmake/make.1 ============================================================================== --- head/contrib/bmake/make.1 Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/make.1 Thu Sep 5 15:57:26 2013 (r255253) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.220 2013/07/30 19:09:57 sjg Exp $ +.\" $NetBSD: make.1,v 1.222 2013/08/11 09:53:49 apb 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 July 30, 2013 +.Dd August 11, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -1982,6 +1982,12 @@ If the source is the special .Ic .DOTLAST target, then the current working directory is searched last. +.It Ic .PATH. Ns Va suffix +Like +.Ic .PATH +but applies only to files with a particular suffix. +The suffix must have been previously declared with +.Ic .SUFFIXES . .It Ic .PHONY Apply the .Ic .PHONY Modified: head/contrib/bmake/make.h ============================================================================== --- head/contrib/bmake/make.h Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/make.h Thu Sep 5 15:57:26 2013 (r255253) @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.91 2013/06/18 20:06:09 sjg Exp $ */ +/* $NetBSD: make.h,v 1.92 2013/09/04 15:38:26 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -404,6 +404,10 @@ extern Boolean varNoExportEnv; /* TRUE i extern GNode *DEFAULT; /* .DEFAULT rule */ +extern GNode *VAR_INTERNAL; /* Variables defined internally by make + * which should not override those set by + * makefiles. + */ extern GNode *VAR_GLOBAL; /* Variables defined in a global context, e.g * in the Makefile itself */ extern GNode *VAR_CMD; /* Variables defined on the command line */ Modified: head/contrib/bmake/mk/ChangeLog ============================================================================== --- head/contrib/bmake/mk/ChangeLog Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/mk/ChangeLog Thu Sep 5 15:57:26 2013 (r255253) @@ -1,3 +1,14 @@ +2013-09-04 Simon J. Gerraty + + * gendirdeps.mk (_objtops): fix typo also + while processing M2D_OBJROOTS to gather qualdir_list + qualify $ql with loop iterator to ensure correct results. + +2013-08-01 Simon J. Gerraty + + * install-mk (MK_VERSION): 20130801 + * libs.mk: update to match progs.mk + 2013-07-26 Simon J. Gerraty * install-mk (MK_VERSION): 20130726 Modified: head/contrib/bmake/mk/gendirdeps.mk ============================================================================== --- head/contrib/bmake/mk/gendirdeps.mk Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/mk/gendirdeps.mk Thu Sep 5 15:57:26 2013 (r255253) @@ -1,4 +1,4 @@ -# $Id: gendirdeps.mk,v 1.22 2013/05/11 05:16:26 sjg Exp $ +# $Id: gendirdeps.mk,v 1.23 2013/09/04 17:49:20 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -162,7 +162,7 @@ dir_list != cd ${_OBJDIR} && \ .warning Skipping ${_DEPENDFILE:S,${SRCTOP}/,,} # we are not going to update anything .else - +dpadd_dir_list= .if !empty(DPADD) _nonlibs := ${DPADD:T:Nlib*:N*include} .if !empty(_nonlibs) @@ -174,6 +174,7 @@ ddep_list += $f.dirdep ddep_list += ${f:H}.dirdep .else dir_list += ${f:H:tA} +dpadd_dir_list += ${f:H:tA} .endif .endfor .if !empty(ddep_list) @@ -197,7 +198,7 @@ dir_list += ${ddeps} # so we add # ${"${dir_list:M*bsd/sys/${MACHINE_ARCH}/include}":?bsd/include:} # to GENDIRDEPS_DIR_LIST_XTRAS -_objtops = ${OBJTOP} ${_OBJTOP} ${_obtop} +_objtops = ${OBJTOP} ${_OBJTOP} ${_objtop} _objtops := ${_objtops:O:u} dirdep_list = \ ${_objtops:@o@${dir_list:M$o*/*:C,$o[^/]*/,,}@} \ @@ -212,8 +213,11 @@ M2D_OBJROOTS := ${M2D_OBJROOTS:O:u:[-1.. skip_ql= ${SRCTOP}* ${_objtops:@o@$o*@} .for o in ${M2D_OBJROOTS:${skip_ql:${M_ListToSkip}}} # we need := so only skip_ql to this point applies -ql := ${dir_list:${skip_ql:${M_ListToSkip}}:M$o*/*/*:C,$o([^/]+)/(.*),\2.\1,:S,.${HOST_TARGET},.host,} -qualdir_list += ${ql} +ql.$o := ${dir_list:${skip_ql:${M_ListToSkip}}:M$o*/*/*:C,$o([^/]+)/(.*),\2.\1,:S,.${HOST_TARGET},.host,} +qualdir_list += ${ql.$o} +.if ${DEBUG_GENDIRDEPS:Uno:@x@${RELDIR:M$x}@} != "" +.info ${RELDIR}: o=$o ${ql.$o qualdir_list:L:@v@$v=${$v}@} +.endif skip_ql+= $o* .endfor @@ -241,6 +245,7 @@ DIRDEPS := ${DIRDEPS:${GENDIRDEPS_FILTER .if ${DEBUG_GENDIRDEPS:Uno:@x@${RELDIR:M$x}@} != "" .info ${RELDIR}: M2D_OBJROOTS=${M2D_OBJROOTS} .info ${RELDIR}: dir_list='${dir_list}' +.info ${RELDIR}: dpadd_dir_list='${dpadd_dir_list}' .info ${RELDIR}: dirdep_list='${dirdep_list}' .info ${RELDIR}: qualdir_list='${qualdir_list}' .info ${RELDIR}: SKIP_GENDIRDEPS='${SKIP_GENDIRDEPS}' Modified: head/contrib/bmake/mk/install-mk ============================================================================== --- head/contrib/bmake/mk/install-mk Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/mk/install-mk Thu Sep 5 15:57:26 2013 (r255253) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.92 2013/07/27 05:37:37 sjg Exp $ +# $Id: install-mk,v 1.93 2013/08/02 18:28:47 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20130726 +MK_VERSION=20130801 OWNER= GROUP= MODE=444 Modified: head/contrib/bmake/mk/libs.mk ============================================================================== --- head/contrib/bmake/mk/libs.mk Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/mk/libs.mk Thu Sep 5 15:57:26 2013 (r255253) @@ -1,4 +1,4 @@ -# $Id: libs.mk,v 1.2 2007/04/30 17:39:27 sjg Exp $ +# $Id: libs.mk,v 1.3 2013/08/02 18:28:48 sjg Exp $ # # @(#) Copyright (c) 2006, Simon J. Gerraty # @@ -17,7 +17,15 @@ .if defined(LIBS) +# In meta mode, we can capture dependenices for _one_ of the progs. +# if makefile doesn't nominate one, we use the first. +.ifndef UPDATE_DEPENDFILE_LIB +UPDATE_DEPENDFILE_LIB = ${LIBS:[1]} +.export UPDATE_DEPENDFILE_LIB +.endif + .ifndef LIB +# They may have asked us to build just one .for t in ${LIBS:R:T:S,^lib,,} .if make(lib$t) LIB?= $t @@ -28,14 +36,41 @@ lib$t: all .if defined(LIB) # just one of many -.for v in DPADD SRCS CFLAGS ${LIB_VARS} -$v += ${${v}_lib${LIB}} +LIB_VARS += \ + LIBDIR \ + CFLAGS \ + COPTS \ + CPPFLAGS \ + CXXFLAGS \ + DPADD \ + DPLIBS \ + LDADD \ + LDFLAGS \ + MAN \ + SRCS + +.for v in ${LIB_VARS:O:u} +.if defined(${v}.${LIB}) || defined(${v}_${LIB}) +$v += ${${v}_${LIB}:U${${v}.${LIB}}} +.endif .endfor + +# for meta mode, there can be only one! +.if ${LIB} == ${UPDATE_DEPENDFILE_LIB:Uno} +UPDATE_DEPENDFILE ?= yes +.endif +UPDATE_DEPENDFILE ?= NO + # ensure that we don't clobber each other's dependencies DEPENDFILE?= .depend.${LIB} # lib.mk will do the rest .else all: ${LIBS:S,^lib,,:@t@lib$t.a@} .MAKE + +# We cannot capture dependencies for meta mode here +UPDATE_DEPENDFILE = NO +# nor can we safely run in parallel. +.NOTPARALLEL: .endif .endif @@ -43,12 +78,16 @@ all: ${LIBS:S,^lib,,:@t@lib$t.a@} .MAKE .include <${.PARSEFILE:S,libs,lib,}> .ifndef LIB -.for t in ${LIBS:R:T:S,^lib,,} -lib$t.a: ${SRCS} ${DPADD} ${SRCS_lib$t} ${DPADD_lib$t} - (cd ${.CURDIR} && ${.MAKE} -f ${MAKEFILE} LIB=$t) +# tell libs.mk we might want to install things +LIBS_TARGETS+= cleandepend cleandir cleanobj depend install -clean: $t.clean -$t.clean: - (cd ${.CURDIR} && ${.MAKE} -f ${MAKEFILE} LIB=$t ${@:E}) +.for b in ${LIBS:R:T:S,^lib,,} +lib$b.a: ${SRCS} ${DPADD} ${SRCS_lib$b} ${DPADD_lib$b} + (cd ${.CURDIR} && ${.MAKE} -f ${MAKEFILE} LIB=$b) + +.for t in ${LIBS_TARGETS:O:u} +$b.$t: .PHONY .MAKE + (cd ${.CURDIR} && ${.MAKE} -f ${MAKEFILE} LIB=$b ${@:E}) +.endfor .endfor .endif Modified: head/contrib/bmake/mk/progs.mk ============================================================================== --- head/contrib/bmake/mk/progs.mk Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/mk/progs.mk Thu Sep 5 15:57:26 2013 (r255253) @@ -1,4 +1,4 @@ -# $Id: progs.mk,v 1.12 2013/04/22 18:10:04 sjg Exp $ +# $Id: progs.mk,v 1.13 2013/08/02 18:28:48 sjg Exp $ # # @(#) Copyright (c) 2006, Simon J. Gerraty # @@ -35,9 +35,21 @@ PROG ?= $t .if defined(PROG) # just one of many -PROG_VARS += BINDIR CFLAGS CPPFLAGS CXXFLAGS DPADD DPLIBS LDADD MAN SRCS +PROG_VARS += \ + BINDIR \ + CFLAGS \ + COPTS \ + CPPFLAGS \ + CXXFLAGS \ + DPADD \ + DPLIBS \ + LDADD \ + LDFLAGS \ + MAN \ + SRCS + .for v in ${PROG_VARS:O:u} -.if defined(${v}.${PROG}) +.if defined(${v}.${PROG}) || defined(${v}_${PROG}) $v += ${${v}_${PROG}:U${${v}.${PROG}}} .endif .endfor Modified: head/contrib/bmake/parse.c ============================================================================== --- head/contrib/bmake/parse.c Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/parse.c Thu Sep 5 15:57:26 2013 (r255253) @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.189 2013/06/18 19:31:27 sjg Exp $ */ +/* $NetBSD: parse.c,v 1.191 2013/08/28 21:56:49 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: parse.c,v 1.189 2013/06/18 19:31:27 sjg Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.191 2013/08/28 21:56:49 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.189 2013/06/18 19:31:27 sjg Exp $"); +__RCSID("$NetBSD: parse.c,v 1.191 2013/08/28 21:56:49 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -1751,6 +1751,12 @@ Parse_IsVar(char *line) ch = *line++; wasSpace = TRUE; } +#ifdef SUNSHCMD + if (ch == ':' && strncmp(line, "sh", 2) == 0) { + line += 2; + continue; + } +#endif if (ch == '=') return TRUE; if (*line == '=' && ISEQOPERATOR(ch)) Modified: head/contrib/bmake/unit-tests/Makefile.in ============================================================================== --- head/contrib/bmake/unit-tests/Makefile.in Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/unit-tests/Makefile.in Thu Sep 5 15:57:26 2013 (r255253) @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.43 2013/07/16 21:14:30 sjg Exp $ +# $Id: Makefile.in,v 1.44 2013/08/28 22:09:29 sjg Exp $ # -# $NetBSD: Makefile,v 1.37 2013/07/16 19:59:28 sjg Exp $ +# $NetBSD: Makefile,v 1.38 2013/08/28 21:56:50 sjg Exp $ # # Unit tests for make(1) # The main targets are: @@ -45,6 +45,7 @@ SUBFILES= \ phony-end \ posix \ qequals \ + sunshcmd \ sysv \ ternary \ unexport \ Copied: head/contrib/bmake/unit-tests/sunshcmd (from r255252, vendor/NetBSD/bmake/dist/unit-tests/sunshcmd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bmake/unit-tests/sunshcmd Thu Sep 5 15:57:26 2013 (r255253, copy of r255252, vendor/NetBSD/bmake/dist/unit-tests/sunshcmd) @@ -0,0 +1,10 @@ +BYECMD = echo bye +LATERCMD = echo later +TEST1 :sh = echo hello +TEST2 :sh = ${BYECMD} +TEST3 = ${LATERCMD:sh} + +all: + @echo "TEST1=${TEST1}" + @echo "TEST2=${TEST2}" + @echo "TEST3=${TEST3}" Modified: head/contrib/bmake/unit-tests/test.exp ============================================================================== --- head/contrib/bmake/unit-tests/test.exp Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/unit-tests/test.exp Thu Sep 5 15:57:26 2013 (r255253) @@ -349,6 +349,9 @@ Now we expect an error... *** Error code 1 (continuing) `all' not remade because of errors. V.i386 ?= OK +TEST1=hello +TEST2=bye +TEST3=later FOOBAR = FOOBAR = foobar fubar fun Modified: head/contrib/bmake/var.c ============================================================================== --- head/contrib/bmake/var.c Thu Sep 5 15:50:34 2013 (r255252) +++ head/contrib/bmake/var.c Thu Sep 5 15:57:26 2013 (r255253) @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.183 2013/07/16 20:00:56 sjg Exp $ */ +/* $NetBSD: var.c,v 1.184 2013/09/04 15:38:26 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.183 2013/07/16 20:00:56 sjg Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.184 2013/09/04 15:38:26 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.183 2013/07/16 20:00:56 sjg Exp $"); +__RCSID("$NetBSD: var.c,v 1.184 2013/09/04 15:38:26 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -187,6 +187,7 @@ static char varNoError[] = ""; * The four contexts are searched in the reverse order from which they are * listed. */ +GNode *VAR_INTERNAL; /* variables from make itself */ GNode *VAR_GLOBAL; /* variables from the makefile */ GNode *VAR_CMD; /* variables defined on the command-line */ @@ -419,6 +420,10 @@ VarFind(const char *name, GNode *ctxt, i (ctxt != VAR_GLOBAL)) { var = Hash_FindEntry(&VAR_GLOBAL->context, name); + if ((var == NULL) && (ctxt != VAR_INTERNAL)) { + /* VAR_INTERNAL is subordinate to VAR_GLOBAL */ + var = Hash_FindEntry(&VAR_INTERNAL->context, name); + } } if ((var == NULL) && (flags & FIND_ENV)) { char *env; @@ -440,6 +445,9 @@ VarFind(const char *name, GNode *ctxt, i (ctxt != VAR_GLOBAL)) { var = Hash_FindEntry(&VAR_GLOBAL->context, name); + if ((var == NULL) && (ctxt != VAR_INTERNAL)) { + var = Hash_FindEntry(&VAR_INTERNAL->context, name); + } if (var == NULL) { return NULL; } else { @@ -4182,6 +4190,7 @@ Var_GetHead(char *file) void Var_Init(void) { + VAR_INTERNAL = Targ_NewGN("Internal"); VAR_GLOBAL = Targ_NewGN("Global"); VAR_CMD = Targ_NewGN("Command"); Modified: head/usr.bin/bmake/Makefile ============================================================================== --- head/usr.bin/bmake/Makefile Thu Sep 5 15:50:34 2013 (r255252) +++ head/usr.bin/bmake/Makefile Thu Sep 5 15:57:26 2013 (r255253) @@ -14,10 +14,10 @@ CFLAGS+= -I${.CURDIR} CLEANDIRS+= FreeBSD CLEANFILES+= bootstrap -# $Id: Makefile,v 1.17 2013/07/30 19:13:53 sjg Exp $ +# $Id: Makefile,v 1.20 2013/09/04 15:42:03 sjg Exp $ # Base version on src date -MAKE_VERSION= 20130810 +MAKE_VERSION= 20130904 PROG?= ${.CURDIR:T} Modified: head/usr.bin/bmake/unit-tests/Makefile ============================================================================== --- head/usr.bin/bmake/unit-tests/Makefile Thu Sep 5 15:50:34 2013 (r255252) +++ head/usr.bin/bmake/unit-tests/Makefile Thu Sep 5 15:57:26 2013 (r255253) @@ -5,9 +5,9 @@ SRCTOP?= ${.CURDIR:H:H:H} -# $Id: Makefile.in,v 1.43 2013/07/16 21:14:30 sjg Exp $ +# $Id: Makefile.in,v 1.44 2013/08/28 22:09:29 sjg Exp $ # -# $NetBSD: Makefile,v 1.37 2013/07/16 19:59:28 sjg Exp $ +# $NetBSD: Makefile,v 1.38 2013/08/28 21:56:50 sjg Exp $ # # Unit tests for make(1) # The main targets are: @@ -52,6 +52,7 @@ SUBFILES= \ phony-end \ posix \ qequals \ + sunshcmd \ sysv \ ternary \ unexport \ From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 16:38:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 558E4543; Thu, 5 Sep 2013 16:38:27 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 435352E76; Thu, 5 Sep 2013 16:38:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85GcRTw046886; Thu, 5 Sep 2013 16:38:27 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85GcRFl046885; Thu, 5 Sep 2013 16:38:27 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201309051638.r85GcRFl046885@svn.freebsd.org> From: Sean Bruno Date: Thu, 5 Sep 2013 16:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255254 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 16:38:27 -0000 Author: sbruno Date: Thu Sep 5 16:38:26 2013 New Revision: 255254 URL: http://svnweb.freebsd.org/changeset/base/255254 Log: Minor printf nit to keep out clean Modified: head/sys/dev/gpio/gpiobus.c Modified: head/sys/dev/gpio/gpiobus.c ============================================================================== --- head/sys/dev/gpio/gpiobus.c Thu Sep 5 15:57:26 2013 (r255253) +++ head/sys/dev/gpio/gpiobus.c Thu Sep 5 16:38:26 2013 (r255254) @@ -131,7 +131,7 @@ gpiobus_parse_pins(struct gpiobus_softc } if (npins == 0) { - device_printf(child, "empty pin mask"); + device_printf(child, "empty pin mask\n"); return (EINVAL); } From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 16:20:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EE22E9A7; Thu, 5 Sep 2013 16:20:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B6DCD2D58; Thu, 5 Sep 2013 16:20:03 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A3D5AB988; Thu, 5 Sep 2013 12:20:02 -0400 (EDT) From: John Baldwin To: Baptiste Daroussin Subject: Re: svn commit: r254273 - in head: . include lib lib/libc/iconv lib/libiconv_compat lib/libkiconv share/mk sys/sys tools/build/mk Date: Thu, 5 Sep 2013 11:58:46 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201308130715.r7D7F1nu076335@svn.freebsd.org> <201309051013.35286.jhb@freebsd.org> <20130905144647.GO82066@ithaqua.etoilebsd.net> In-Reply-To: <20130905144647.GO82066@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201309051158.46831.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 05 Sep 2013 12:20:02 -0400 (EDT) X-Mailman-Approved-At: Thu, 05 Sep 2013 17:49:31 +0000 Cc: src-committers@freebsd.org, Jilles Tjoelker , Peter Wemm , svn-src-all@freebsd.org, Dimitry Andric , Joel Dahl , gabor@freebsd.org, svn-src-head@freebsd.org, Peter Wemm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 16:20:04 -0000 On Thursday, September 05, 2013 10:46:48 am Baptiste Daroussin wrote: > On Thu, Sep 05, 2013 at 10:13:34AM -0400, John Baldwin wrote: > > On Tuesday, September 03, 2013 3:52:41 pm Joel Dahl wrote: > > > On Thu, Aug 22, 2013 at 05:58:35PM +0200, Joel Dahl wrote: > > > > On Sun, Aug 18, 2013 at 03:51:25PM -0700, Peter Wemm wrote: > > > > > On 8/18/13 3:42 PM, Jilles Tjoelker wrote: > > > > > > On Sun, Aug 18, 2013 at 09:53:04PM +0200, Joel Dahl wrote: > > > > > >> On Sun, Aug 18, 2013 at 12:34:30AM +0200, Dimitry Andric wrote: > > > > > >>> On Aug 13, 2013, at 09:15, Peter Wemm wrote: > > > > > >>>> Author: peter > > > > > >>>> Date: Tue Aug 13 07:15:01 2013 > > > > > >>>> New Revision: 254273 > > > > > >>>> URL: http://svnweb.freebsd.org/changeset/base/254273 > > > > > > > > > > > >>>> Log: > > > > > >>>> The iconv in libc did two things - implement the standard APIs, the GNU > > > > > >>>> extensions and also tried to be link time compatible with ports libiconv. > > > > > >>>> This splits that functionality and enables the parts that shouldn't > > > > > >>>> interfere with the port by default. > > > > > > > > > > > >>>> WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) etc. > > > > > >>>> WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open etc API, linker > > > > > >>>> symbols and even a stub libiconv.so.3 that are good enough to be able > > > > > >>>> to 'pkg delete -f libiconv' on a running system and reasonably expect it > > > > > >>>> to work. > > > > > > > > > > > >>>> I have tortured many machines over the last few days to try and reduce > > > > > >>>> the possibilities of foot-shooting as much as I can. I've successfully > > > > > >>>> recompiled to enable and disable the libiconv_compat modes, ports that use > > > > > >>>> libiconv alongside system iconv etc. If you don't enable the > > > > > >>>> WITH_LIBICONV_COMPAT switch, they don't share symbol space. > > > > > > > > > > > >>>> This is an extension of behavior on other system. iconv(3) is a standard > > > > > >>>> libc interface and libiconv port expects to be able to run alongside it on > > > > > >>>> systems that have it. > > > > > > > > > > > >>> Unfortunately I expect this will break many ports, when the libiconv > > > > > >>> port is installed. A simple example is the following: > > > > > >> > > > > > > > > > > > >> It also breaks installworld when /usr/src and /usr/obj are NFS exported > > > > > >> read-only. > > > > > > > > > > > > I think it has to do with share/i18n/csmapper and share/i18n/esdb using > > > > > > directories as make targets. This apparently causes these files to be > > > > > > rebuilt at 'make installworld' time, which is always bad but is only > > > > > > detected when /usr/obj is read-only. > > > > > > > > > > > > A hack that works is to enclose the four targets depending on ${SUBDIR} > > > > > > in .if !make(install) . > > > > > > > > > > > > Unfortunately, the Makefiles were written to depend on the directories > > > > > > as make targets fairly deeply, so a real fix is harder. > > > > > > > > > > I was looking at this yesterday, but was tied up with other things. I'll > > > > > take a look at it today after getting a few other things done. It should be > > > > > easy enough to replicate by changing /usr/obj to readonly on test systems. > > > > > > > > FWIW, this is still broken. > > > > > > Again, this is still broken. > > > > Yeah, my laptop failed to build cups (required by ghostscript which is required > > by emacs) because of this: > > > > ===> FreeBSD 10 autotools fix applied to /usr/ports/print/cups-image/work/cups-1.5.4/configure > > Configuring CUPS with options: > > ... > > configure: WARNING: unrecognized options: --disable-pdftops > > ... > > checking iconv.h usability... yes > > checking iconv.h presence... yes > > checking for iconv.h... yes > > checking for library containing iconv_open... none required > > ... > > Linking texttops... > > cc -L../cgi-bin -L../cups -L../filter -L../ppdc -L../scheduler -L/usr/local/lib -Wl,-rpath=/usr/lib:/usr/local/lib -Wl,-R/usr/local/lib -Wall - Wno- > > format-y2k -Wunused -fPIC -Os -g -fstack-protector -Wno-tautological-compare -o texttops texttops.o textcommon.o common.o -lcups -lssl -lcrypto -lz > > -pthread -lcrypt -lm -lssp_nonshared > > ../cups/libcups.so: undefined reference to `libiconv' > > ../cups/libcups.so: undefined reference to `libiconv_close' > > ../cups/libcups.so: undefined reference to `libiconv_open' > > cc: error: linker command failed with exit code 1 (use -v to see invocation) > > gmake[9]: *** [commandtops] Error 1 > > ... > > > > Having cups broken will probably break all of kde, etc. Are we seeing this > > in HEAD package builds yet? (Maybe the world we are using doesn't have > > this change yet?) Note that this is just a clean build of HEAD and a fresh > > build of ports from scratch. > > > > This should work properly now, the ports tree received motification yesterday > and converters/libiconv is not installed anymore now. Good grief, I just svn up'd my ports yesterday morning. :) I'll update again, thanks! -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 18:18:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E1036E4E; Thu, 5 Sep 2013 18:18:23 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CFC9D265E; Thu, 5 Sep 2013 18:18:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85IINPO008172; Thu, 5 Sep 2013 18:18:23 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85IINAX008171; Thu, 5 Sep 2013 18:18:23 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201309051818.r85IINAX008171@svn.freebsd.org> From: Hiren Panchasara Date: Thu, 5 Sep 2013 18:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255259 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 18:18:24 -0000 Author: hiren Date: Thu Sep 5 18:18:23 2013 New Revision: 255259 URL: http://svnweb.freebsd.org/changeset/base/255259 Log: Fixing a small typo. Reviewed by: gjb Approved by: sbruno (mentor) Modified: head/sys/kern/kern_mbuf.c Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Thu Sep 5 17:58:25 2013 (r255258) +++ head/sys/kern/kern_mbuf.c Thu Sep 5 18:18:23 2013 (r255259) @@ -106,7 +106,7 @@ int nmbjumbo16; /* limits number of 16 static quad_t maxmbufmem; /* overall real memory limit for all mbufs */ SYSCTL_QUAD(_kern_ipc, OID_AUTO, maxmbufmem, CTLFLAG_RDTUN, &maxmbufmem, 0, - "Maximum real memory allocateable to various mbuf types"); + "Maximum real memory allocatable to various mbuf types"); /* * tunable_mbinit() has to be run before any mbuf allocations are done. From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 19:02:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 89B85295; Thu, 5 Sep 2013 19:02:04 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 75FBA2960; Thu, 5 Sep 2013 19:02:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85J24Nj035212; Thu, 5 Sep 2013 19:02:04 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85J24bJ035211; Thu, 5 Sep 2013 19:02:04 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309051902.r85J24bJ035211@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 5 Sep 2013 19:02:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255261 - head/usr.sbin/watch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 19:02:04 -0000 Author: jilles Date: Thu Sep 5 19:02:03 2013 New Revision: 255261 URL: http://svnweb.freebsd.org/changeset/base/255261 Log: watch: Do not mess up the tty modes on early error. Record the initial state earlier, so it is always safe to restore it. One way this happens is if watch(8) is started by a user that does not have access to /dev/snp. The result is "staircase effect" during later commands. PR: bin/153052 MFC after: 1 week Modified: head/usr.sbin/watch/watch.c Modified: head/usr.sbin/watch/watch.c ============================================================================== --- head/usr.sbin/watch/watch.c Thu Sep 5 18:45:23 2013 (r255260) +++ head/usr.sbin/watch/watch.c Thu Sep 5 19:02:03 2013 (r255261) @@ -110,7 +110,6 @@ set_tty(void) { struct termios ntty; - tcgetattr(std_in, &otty); ntty = otty; ntty.c_lflag &= ~ICANON; /* disable canonical operation */ ntty.c_lflag &= ~ECHO; @@ -324,6 +323,8 @@ main(int ac, char *av[]) usage(); } + tcgetattr(std_in, &otty); + if (modfind("snp") == -1) if (kldload("snp") == -1 || modfind("snp") == -1) warn("snp module not available"); From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 19:50:37 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 44F106F6; Thu, 5 Sep 2013 19:50:37 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 0A5712C68; Thu, 5 Sep 2013 19:50:36 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 2F224183; Thu, 5 Sep 2013 21:45:01 +0200 (CEST) Date: Thu, 5 Sep 2013 21:50:38 +0200 From: Pawel Jakub Dawidek To: Hiroki Sato Subject: Re: svn commit: r255227 - in head: . usr.sbin/rwhod Message-ID: <20130905195037.GA1410@garage.freebsd.pl> References: <201309050105.r8515nf3094355@svn.freebsd.org> <20130905.102013.1604548446233669011.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EVF5PPMfhYS0aIcm" Content-Disposition: inline In-Reply-To: <20130905.102013.1604548446233669011.hrs@allbsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 19:50:37 -0000 --EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 05, 2013 at 10:20:13AM +0900, Hiroki Sato wrote: > Pawel Jakub Dawidek wrote > in <201309050105.r8515nf3094355@svn.freebsd.org>: >=20 > pj> Author: pjd > pj> Date: Thu Sep 5 01:05:48 2013 > pj> New Revision: 255227 > pj> URL: http://svnweb.freebsd.org/changeset/base/255227 > pj> > pj> Log: > pj> Remove fallback to fork(2) if pdfork(2) is not available. If the pa= rent > pj> process dies, the process descriptor will be closed and pdfork(2)ed= child > pj> will be killed, which is not the case when regular fork(2) is used. > pj> > pj> The PROCDESC option is now part of the GENERIC kernel configuration= , so we > pj> can start depending on it. > pj> > pj> Add UPDATING entry to inform that this option is now required and l= og > pj> detailed instruction to syslog if pdfork(2) is not available: > pj> > pj> The pdfork(2) system call is not available; recompile the kernel w= ith options PROCDESC > pj> > pj> Submitted by: Mariusz Zaborski > pj> Sponsored by: Google Summer of Code 2013 >=20 > Is there any reason to keep PROCDESC as an option? There are still some rough edges that I think people expect to be polished before we can do that. But all in all I think this is good idea, but can wait for a bit. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --EVF5PPMfhYS0aIcm Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlIo4I0ACgkQForvXbEpPzRTzQCgzqs6lmrAtSZv8OodUcCJ/r4w Jo8AoIN/QuEIw81eMLTQrDx1HuOKdhi/ =eQoH -----END PGP SIGNATURE----- --EVF5PPMfhYS0aIcm-- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 20:00:42 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 985948D7; Thu, 5 Sep 2013 20:00:42 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E8A52CDA; Thu, 5 Sep 2013 20:00:41 +0000 (UTC) Received: from alph.d.allbsd.org (p2049-ipbf1102funabasi.chiba.ocn.ne.jp [122.26.101.49]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r85K0ONF023337 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 6 Sep 2013 05:00:34 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r85K0N83036193; Fri, 6 Sep 2013 05:00:23 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Fri, 06 Sep 2013 05:00:18 +0900 (JST) Message-Id: <20130906.050018.754568513566380448.hrs@allbsd.org> To: pjd@FreeBSD.org Subject: Re: svn commit: r255227 - in head: . usr.sbin/rwhod From: Hiroki Sato In-Reply-To: <20130905195037.GA1410@garage.freebsd.pl> References: <201309050105.r8515nf3094355@svn.freebsd.org> <20130905.102013.1604548446233669011.hrs@allbsd.org> <20130905195037.GA1410@garage.freebsd.pl> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Fri_Sep__6_05_00_18_2013_099)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Fri, 06 Sep 2013 05:00:34 +0900 (JST) X-Spam-Status: No, score=-90.6 required=13.0 tests=CONTENT_TYPE_PRESENT, DIRECTOCNDYN,DYN_PBL,RCVD_IN_PBL,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 20:00:42 -0000 ----Security_Multipart(Fri_Sep__6_05_00_18_2013_099)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Pawel Jakub Dawidek wrote in <20130905195037.GA1410@garage.freebsd.pl>: pj> On Thu, Sep 05, 2013 at 10:20:13AM +0900, Hiroki Sato wrote: pj> > Pawel Jakub Dawidek wrote pj> > in <201309050105.r8515nf3094355@svn.freebsd.org>: pj> > pj> > pj> Author: pjd pj> > pj> Date: Thu Sep 5 01:05:48 2013 pj> > pj> New Revision: 255227 pj> > pj> URL: http://svnweb.freebsd.org/changeset/base/255227 pj> > pj> pj> > pj> Log: pj> > pj> Remove fallback to fork(2) if pdfork(2) is not available. If the parent pj> > pj> process dies, the process descriptor will be closed and pdfork(2)ed child pj> > pj> will be killed, which is not the case when regular fork(2) is used. pj> > pj> pj> > pj> The PROCDESC option is now part of the GENERIC kernel configuration, so we pj> > pj> can start depending on it. pj> > pj> pj> > pj> Add UPDATING entry to inform that this option is now required and log pj> > pj> detailed instruction to syslog if pdfork(2) is not available: pj> > pj> pj> > pj> The pdfork(2) system call is not available; recompile the kernel with options PROCDESC pj> > pj> pj> > pj> Submitted by: Mariusz Zaborski pj> > pj> Sponsored by: Google Summer of Code 2013 pj> > pj> > Is there any reason to keep PROCDESC as an option? pj> pj> There are still some rough edges that I think people expect to be pj> polished before we can do that. But all in all I think this is good pj> idea, but can wait for a bit. I see. I hope it will happen before 10.0. Generally speaking, if a userland utility does not work without it, it should not be an option. -- Hiroki ----Security_Multipart(Fri_Sep__6_05_00_18_2013_099)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlIo4tIACgkQTyzT2CeTzy2RRACfXZ2chNf4tGnr49qV16I9EaL/ ttgAnjYSLYpuHARJOP/zjvoGuObE93my =FKVB -----END PGP SIGNATURE----- ----Security_Multipart(Fri_Sep__6_05_00_18_2013_099)---- From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 20:15:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3A087138; Thu, 5 Sep 2013 20:15:55 +0000 (UTC) (envelope-from joel@vnode.se) Received: from mail.vnode.se (mail.vnode.se [212.247.52.13]) by mx1.freebsd.org (Postfix) with ESMTP id B13832DB0; Thu, 5 Sep 2013 20:15:54 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id 43D97E3F07A; Thu, 5 Sep 2013 22:15:46 +0200 (CEST) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cf-UpbmZXC58; Thu, 5 Sep 2013 22:15:44 +0200 (CEST) Received: from devbox.vnode.local (unknown [83.223.1.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id CD898E3F079; Thu, 5 Sep 2013 22:15:41 +0200 (CEST) Date: Thu, 5 Sep 2013 22:15:40 +0200 From: Joel Dahl To: John Baldwin Subject: Re: svn commit: r254273 - in head: . include lib lib/libc/iconv lib/libiconv_compat lib/libkiconv share/mk sys/sys tools/build/mk Message-ID: <20130905201540.GA23637@devbox.vnode.local> References: <201308130715.r7D7F1nu076335@svn.freebsd.org> <20130822155835.GA52789@devbox.vnode.local> <20130903195241.GA93218@devbox.vnode.local> <201309051013.35286.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201309051013.35286.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, Jilles Tjoelker , Peter Wemm , svn-src-all@freebsd.org, Dimitry Andric , gabor@freebsd.org, svn-src-head@freebsd.org, Peter Wemm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 20:15:55 -0000 On Thu, Sep 05, 2013 at 10:13:34AM -0400, John Baldwin wrote: > On Tuesday, September 03, 2013 3:52:41 pm Joel Dahl wrote: > > On Thu, Aug 22, 2013 at 05:58:35PM +0200, Joel Dahl wrote: > > > On Sun, Aug 18, 2013 at 03:51:25PM -0700, Peter Wemm wrote: > > > > On 8/18/13 3:42 PM, Jilles Tjoelker wrote: > > > > > On Sun, Aug 18, 2013 at 09:53:04PM +0200, Joel Dahl wrote: > > > > >> On Sun, Aug 18, 2013 at 12:34:30AM +0200, Dimitry Andric wrote: > > > > >>> On Aug 13, 2013, at 09:15, Peter Wemm wrote: > > > > >>>> Author: peter > > > > >>>> Date: Tue Aug 13 07:15:01 2013 > > > > >>>> New Revision: 254273 > > > > >>>> URL: http://svnweb.freebsd.org/changeset/base/254273 > > > > > > > > > >>>> Log: > > > > >>>> The iconv in libc did two things - implement the standard APIs, the GNU > > > > >>>> extensions and also tried to be link time compatible with ports libiconv. > > > > >>>> This splits that functionality and enables the parts that shouldn't > > > > >>>> interfere with the port by default. > > > > > > > > > >>>> WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) etc. > > > > >>>> WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open etc API, linker > > > > >>>> symbols and even a stub libiconv.so.3 that are good enough to be able > > > > >>>> to 'pkg delete -f libiconv' on a running system and reasonably expect it > > > > >>>> to work. > > > > > > > > > >>>> I have tortured many machines over the last few days to try and reduce > > > > >>>> the possibilities of foot-shooting as much as I can. I've successfully > > > > >>>> recompiled to enable and disable the libiconv_compat modes, ports that use > > > > >>>> libiconv alongside system iconv etc. If you don't enable the > > > > >>>> WITH_LIBICONV_COMPAT switch, they don't share symbol space. > > > > > > > > > >>>> This is an extension of behavior on other system. iconv(3) is a standard > > > > >>>> libc interface and libiconv port expects to be able to run alongside it on > > > > >>>> systems that have it. > > > > > > > > > >>> Unfortunately I expect this will break many ports, when the libiconv > > > > >>> port is installed. A simple example is the following: > > > > >> > > > > > > > > > >> It also breaks installworld when /usr/src and /usr/obj are NFS exported > > > > >> read-only. > > > > > > > > > > I think it has to do with share/i18n/csmapper and share/i18n/esdb using > > > > > directories as make targets. This apparently causes these files to be > > > > > rebuilt at 'make installworld' time, which is always bad but is only > > > > > detected when /usr/obj is read-only. > > > > > > > > > > A hack that works is to enclose the four targets depending on ${SUBDIR} > > > > > in .if !make(install) . > > > > > > > > > > Unfortunately, the Makefiles were written to depend on the directories > > > > > as make targets fairly deeply, so a real fix is harder. > > > > > > > > I was looking at this yesterday, but was tied up with other things. I'll > > > > take a look at it today after getting a few other things done. It should be > > > > easy enough to replicate by changing /usr/obj to readonly on test systems. > > > > > > FWIW, this is still broken. > > > > Again, this is still broken. > > Yeah, my laptop failed to build cups (required by ghostscript which is required > by emacs) because of this: Well, that's a different problem. Installworld is still broken on systems with readonly /usr/obj. -- Joel From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 20:50:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 99F64D3B; Thu, 5 Sep 2013 20:50:52 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 86BBB2F8A; Thu, 5 Sep 2013 20:50:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85KoquX000927; Thu, 5 Sep 2013 20:50:52 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85KoqIx000926; Thu, 5 Sep 2013 20:50:52 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201309052050.r85KoqIx000926@svn.freebsd.org> From: Hiroki Sato Date: Thu, 5 Sep 2013 20:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255265 - head/sbin/swapon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 20:50:52 -0000 Author: hrs Date: Thu Sep 5 20:50:52 2013 New Revision: 255265 URL: http://svnweb.freebsd.org/changeset/base/255265 Log: Enable "late" option when a file= option is specified in /etc/fstab. The file= option requires rw mount where the backing store exists but it does not work because rc.d/swap runs before rc.d/fsck. Reported by: wblock Modified: head/sbin/swapon/swapon.c Modified: head/sbin/swapon/swapon.c ============================================================================== --- head/sbin/swapon/swapon.c Thu Sep 5 20:34:58 2013 (r255264) +++ head/sbin/swapon/swapon.c Thu Sep 5 20:50:52 2013 (r255265) @@ -170,13 +170,20 @@ main(int argc, char **argv) if (which_prog == SWAPON || which_prog == SWAPOFF) { if (doall) { while ((fsp = getfsent()) != NULL) { - if (strcmp(fsp->fs_type, FSTAB_SW)) + if (strcmp(fsp->fs_type, FSTAB_SW) != 0) continue; - if (strstr(fsp->fs_mntops, "noauto")) + if (strstr(fsp->fs_mntops, "noauto") != NULL) continue; + /* + * Forcibly enable "late" option when file= is + * specified. This is because mounting file + * systems with rw option is typically + * required to make the backing store ready. + */ if (which_prog != SWAPOFF && - strstr(fsp->fs_mntops, "late") && - !late) + (strstr(fsp->fs_mntops, "late") != NULL || + strstr(fsp->fs_mntops, "file=") != NULL) && + late == 0) continue; swfile = swap_on_off(fsp->fs_spec, 1, fsp->fs_mntops); From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 20:56:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 53D1FED7; Thu, 5 Sep 2013 20:56:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E56F2FD6; Thu, 5 Sep 2013 20:56:40 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 247BFB97A; Thu, 5 Sep 2013 16:56:38 -0400 (EDT) From: John Baldwin To: Joel Dahl Subject: Re: svn commit: r254273 - in head: . include lib lib/libc/iconv lib/libiconv_compat lib/libkiconv share/mk sys/sys tools/build/mk Date: Thu, 5 Sep 2013 16:54:13 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201308130715.r7D7F1nu076335@svn.freebsd.org> <201309051013.35286.jhb@freebsd.org> <20130905201540.GA23637@devbox.vnode.local> In-Reply-To: <20130905201540.GA23637@devbox.vnode.local> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201309051654.13482.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 05 Sep 2013 16:56:38 -0400 (EDT) Cc: src-committers@freebsd.org, Jilles Tjoelker , Peter Wemm , svn-src-all@freebsd.org, Dimitry Andric , gabor@freebsd.org, svn-src-head@freebsd.org, Peter Wemm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 20:56:40 -0000 On Thursday, September 05, 2013 4:15:40 pm Joel Dahl wrote: > On Thu, Sep 05, 2013 at 10:13:34AM -0400, John Baldwin wrote: > > On Tuesday, September 03, 2013 3:52:41 pm Joel Dahl wrote: > > > On Thu, Aug 22, 2013 at 05:58:35PM +0200, Joel Dahl wrote: > > > > On Sun, Aug 18, 2013 at 03:51:25PM -0700, Peter Wemm wrote: > > > > > On 8/18/13 3:42 PM, Jilles Tjoelker wrote: > > > > > > On Sun, Aug 18, 2013 at 09:53:04PM +0200, Joel Dahl wrote: > > > > > >> On Sun, Aug 18, 2013 at 12:34:30AM +0200, Dimitry Andric wrote: > > > > > >>> On Aug 13, 2013, at 09:15, Peter Wemm wrote: > > > > > >>>> Author: peter > > > > > >>>> Date: Tue Aug 13 07:15:01 2013 > > > > > >>>> New Revision: 254273 > > > > > >>>> URL: http://svnweb.freebsd.org/changeset/base/254273 > > > > > > > > > > > >>>> Log: > > > > > >>>> The iconv in libc did two things - implement the standard APIs, the GNU > > > > > >>>> extensions and also tried to be link time compatible with ports libiconv. > > > > > >>>> This splits that functionality and enables the parts that shouldn't > > > > > >>>> interfere with the port by default. > > > > > > > > > > > >>>> WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) etc. > > > > > >>>> WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open etc API, linker > > > > > >>>> symbols and even a stub libiconv.so.3 that are good enough to be able > > > > > >>>> to 'pkg delete -f libiconv' on a running system and reasonably expect it > > > > > >>>> to work. > > > > > > > > > > > >>>> I have tortured many machines over the last few days to try and reduce > > > > > >>>> the possibilities of foot-shooting as much as I can. I've successfully > > > > > >>>> recompiled to enable and disable the libiconv_compat modes, ports that use > > > > > >>>> libiconv alongside system iconv etc. If you don't enable the > > > > > >>>> WITH_LIBICONV_COMPAT switch, they don't share symbol space. > > > > > > > > > > > >>>> This is an extension of behavior on other system. iconv(3) is a standard > > > > > >>>> libc interface and libiconv port expects to be able to run alongside it on > > > > > >>>> systems that have it. > > > > > > > > > > > >>> Unfortunately I expect this will break many ports, when the libiconv > > > > > >>> port is installed. A simple example is the following: > > > > > >> > > > > > > > > > > > >> It also breaks installworld when /usr/src and /usr/obj are NFS exported > > > > > >> read-only. > > > > > > > > > > > > I think it has to do with share/i18n/csmapper and share/i18n/esdb using > > > > > > directories as make targets. This apparently causes these files to be > > > > > > rebuilt at 'make installworld' time, which is always bad but is only > > > > > > detected when /usr/obj is read-only. > > > > > > > > > > > > A hack that works is to enclose the four targets depending on ${SUBDIR} > > > > > > in .if !make(install) . > > > > > > > > > > > > Unfortunately, the Makefiles were written to depend on the directories > > > > > > as make targets fairly deeply, so a real fix is harder. > > > > > > > > > > I was looking at this yesterday, but was tied up with other things. I'll > > > > > take a look at it today after getting a few other things done. It should be > > > > > easy enough to replicate by changing /usr/obj to readonly on test systems. > > > > > > > > FWIW, this is still broken. > > > > > > Again, this is still broken. > > > > Yeah, my laptop failed to build cups (required by ghostscript which is required > > by emacs) because of this: > > Well, that's a different problem. Installworld is still broken on systems with > readonly /usr/obj. It is the problem originally reported by dim@ at the start of this thread. :) My ports tree from today does build cups fine FWIW, but it seems there is still a lot of fallout from this change. :( -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 21:19:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 563F1A3D; Thu, 5 Sep 2013 21:19:17 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 42B1D2133; Thu, 5 Sep 2013 21:19:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85LJH2x016528; Thu, 5 Sep 2013 21:19:17 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85LJHOY016527; Thu, 5 Sep 2013 21:19:17 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201309052119.r85LJHOY016527@svn.freebsd.org> From: Hiroki Sato Date: Thu, 5 Sep 2013 21:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255267 - head/sbin/swapon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 21:19:17 -0000 Author: hrs Date: Thu Sep 5 21:19:16 2013 New Revision: 255267 URL: http://svnweb.freebsd.org/changeset/base/255267 Log: Style clean-ups. Reviewed by: md5 Modified: head/sbin/swapon/swapon.c Modified: head/sbin/swapon/swapon.c ============================================================================== --- head/sbin/swapon/swapon.c Thu Sep 5 21:03:27 2013 (r255266) +++ head/sbin/swapon/swapon.c Thu Sep 5 21:19:16 2013 (r255267) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. * @@ -83,16 +83,16 @@ main(int argc, char **argv) struct fstab *fsp; const char *swfile; char *ptr; - int ret; - int ch, doall; - int sflag = 0, lflag = 0, late = 0, hflag = 0; + int ret, ch, doall; + int sflag, lflag, late, hflag; const char *etc_fstab; + sflag = lflag = late = hflag = 0; if ((ptr = strrchr(argv[0], '/')) == NULL) ptr = argv[0]; - if (strstr(ptr, "swapon")) + if (strstr(ptr, "swapon") != NULL) which_prog = SWAPON; - else if (strstr(ptr, "swapoff")) + else if (strstr(ptr, "swapoff") != NULL) which_prog = SWAPOFF; orig_prog = which_prog; @@ -104,9 +104,8 @@ main(int argc, char **argv) if (which_prog == SWAPCTL) { doall = 1; which_prog = SWAPON; - } else { + } else usage(); - } break; case 'a': if (which_prog == SWAPON || which_prog == SWAPOFF) @@ -149,9 +148,8 @@ main(int argc, char **argv) if (which_prog == SWAPCTL) { doall = 1; which_prog = SWAPOFF; - } else { + } else usage(); - } break; case 'F': etc_fstab = optarg; @@ -191,15 +189,14 @@ main(int argc, char **argv) ret = 1; continue; } - if (!qflag) { + if (qflag == 0) { printf("%s: %sing %s as swap device\n", getprogname(), (which_prog == SWAPOFF) ? "remov" : "add", swfile); } } - } - else if (!*argv) + } else if (*argv == NULL) usage(); for (; *argv; ++argv) { swfile = swap_on_off(*argv, 0, NULL); @@ -288,7 +285,7 @@ swap_on_off_gbde(const char *name, int d if (error) { /* bde device found. Ignore it. */ free(dname); - if (!qflag) + if (qflag == 0) warnx("%s: Device already in use", name); return (NULL); } @@ -308,7 +305,7 @@ swap_on_off_gbde(const char *name, int d free(dname); if (error) { /* bde device not found. Ignore it. */ - if (!qflag) + if (qflag == 0) warnx("%s: Device not found", name); return (NULL); } @@ -323,18 +320,16 @@ swap_on_geli_args(const char *mntops) { const char *aalgo, *ealgo, *keylen_str, *sectorsize_str; const char *aflag, *eflag, *lflag, *sflag; - char *p; - char *args; - char *token, *string, *ops; + char *p, *args, *token, *string, *ops; int argsize, pagesize; size_t pagesize_len; u_long ul; - /* Use built-in defaults for geli(8) */ + /* Use built-in defaults for geli(8). */ aalgo = ealgo = keylen_str = ""; aflag = eflag = lflag = ""; - /* We will always specify sectorsize */ + /* We will always specify sectorsize. */ sflag = " -s "; sectorsize_str = NULL; @@ -371,7 +366,8 @@ swap_on_geli_args(const char *mntops) errno = EINVAL; } if (errno) { - warn("Invalid sectorsize: %s", sectorsize_str); + warn("Invalid sectorsize: %s", + sectorsize_str); free(ops); return (NULL); } @@ -389,7 +385,7 @@ swap_on_geli_args(const char *mntops) * pagesize as sector size. */ if (sectorsize_str == NULL) { - /* Use pagesize as default sectorsize */ + /* Use pagesize as default sectorsize. */ pagesize = getpagesize(); pagesize_len = snprintf(NULL, 0, "%d", pagesize) + 1; p = alloca(pagesize_len); @@ -408,15 +404,14 @@ swap_on_geli_args(const char *mntops) static const char * swap_on_off_geli(const char *name, char *mntops, int doingall) { - char *dname; - char *args; struct stat sb; + char *dname, *args; int error; error = stat(name, &sb); if (which_prog == SWAPON) do { - /* Skip if the .eli device already exists */ + /* Skip if the .eli device already exists. */ if (error == 0) break; @@ -437,8 +432,8 @@ swap_on_off_geli(const char *name, char free(args); if (error) { - /* error occured during creation */ - if (!qflag) + /* error occured during creation. */ + if (qflag == 0) warnx("%s: Invalid parameters", name); return (NULL); } @@ -543,7 +538,7 @@ swap_on_off_md(const char *name, char *m if (error == 0) { /* md device found. Ignore it. */ close(fd); - if (!qflag) + if (qflag == 0) warnx("md%d on %s: Device already " "in use", mdunit, vnodefile); free(vnodefile); @@ -726,13 +721,13 @@ swap_on_off_sfile(const char *name, int if (error == -1) { switch (errno) { case EBUSY: - if (!doingall) + if (doingall == 0) warnx("%s: Device already in use", name); break; case EINVAL: if (which_prog == SWAPON) warnx("%s: NSWAPDEV limit reached", name); - else if (!doingall) + else if (doingall == 0) warn("%s", name); break; default: @@ -747,6 +742,7 @@ swap_on_off_sfile(const char *name, int static void usage(void) { + fprintf(stderr, "usage: %s ", getprogname()); switch(orig_prog) { case SWAPON: @@ -764,16 +760,14 @@ static void sizetobuf(char *buf, size_t bufsize, int hflag, long long val, int hlen, long blocksize) { + char tmp[16]; if (hflag == 'H') { - char tmp[16]; - humanize_number(tmp, 5, (int64_t)val, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); snprintf(buf, bufsize, "%*s", hlen, tmp); - } else { + } else snprintf(buf, bufsize, "%*lld", hlen, val / blocksize); - } } static void @@ -792,32 +786,32 @@ swaplist(int lflag, int sflag, int hflag pagesize = getpagesize(); switch(hflag) { case 'G': - blocksize = 1024 * 1024 * 1024; - strlcpy(buf, "1GB-blocks", sizeof(buf)); - hlen = 10; - break; + blocksize = 1024 * 1024 * 1024; + strlcpy(buf, "1GB-blocks", sizeof(buf)); + hlen = 10; + break; case 'H': - blocksize = -1; - strlcpy(buf, "Bytes", sizeof(buf)); - hlen = 10; - break; + blocksize = -1; + strlcpy(buf, "Bytes", sizeof(buf)); + hlen = 10; + break; case 'K': - blocksize = 1024; - strlcpy(buf, "1kB-blocks", sizeof(buf)); - hlen = 10; - break; + blocksize = 1024; + strlcpy(buf, "1kB-blocks", sizeof(buf)); + hlen = 10; + break; case 'M': - blocksize = 1024 * 1024; - strlcpy(buf, "1MB-blocks", sizeof(buf)); - hlen = 10; - break; + blocksize = 1024 * 1024; + strlcpy(buf, "1MB-blocks", sizeof(buf)); + hlen = 10; + break; default: - getbsize(&hlen, &blocksize); - snprintf(buf, sizeof(buf), "%ld-blocks", blocksize); - break; + getbsize(&hlen, &blocksize); + snprintf(buf, sizeof(buf), "%ld-blocks", blocksize); + break; } - mibsize = sizeof mib / sizeof mib[0]; + mibsize = nitems(mib); if (sysctlnametomib("vm.swap_info", mib, &mibsize) == -1) err(1, "sysctlnametomib()"); From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 21:33:39 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 18333EC8; Thu, 5 Sep 2013 21:33:39 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD9582208; Thu, 5 Sep 2013 21:33:37 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id r85LXI04007439; Thu, 5 Sep 2013 23:33:27 +0200 (CEST) (envelope-from andreast@FreeBSD.org) Message-ID: <5228F89E.9030102@FreeBSD.org> Date: Thu, 05 Sep 2013 23:33:18 +0200 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: src-committers@FreeBSD.org Subject: Re: svn commit: r254273 - in head: . include lib lib/libc/iconv lib/libiconv_compat lib/libkiconv share/mk sys/sys tools/build/mk References: <201308130715.r7D7F1nu076335@svn.freebsd.org> <201309051013.35286.jhb@freebsd.org> <20130905201540.GA23637@devbox.vnode.local> <201309051654.13482.jhb@freebsd.org> In-Reply-To: <201309051654.13482.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: Jilles Tjoelker , Peter Wemm , svn-src-all@FreeBSD.org, Dimitry Andric , Joel Dahl , gabor@FreeBSD.org, svn-src-head@FreeBSD.org, John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 21:33:39 -0000 On 05.09.13 22:54, John Baldwin wrote: > On Thursday, September 05, 2013 4:15:40 pm Joel Dahl wrote: >> On Thu, Sep 05, 2013 at 10:13:34AM -0400, John Baldwin wrote: >>> On Tuesday, September 03, 2013 3:52:41 pm Joel Dahl wrote: >>>> On Thu, Aug 22, 2013 at 05:58:35PM +0200, Joel Dahl wrote: >>>>> On Sun, Aug 18, 2013 at 03:51:25PM -0700, Peter Wemm wrote: >>>>>> On 8/18/13 3:42 PM, Jilles Tjoelker wrote: >>>>>>> On Sun, Aug 18, 2013 at 09:53:04PM +0200, Joel Dahl wrote: >>>>>>>> On Sun, Aug 18, 2013 at 12:34:30AM +0200, Dimitry Andric wrote: >>>>>>>>> On Aug 13, 2013, at 09:15, Peter Wemm wrote: >>>>>>>>>> Author: peter >>>>>>>>>> Date: Tue Aug 13 07:15:01 2013 >>>>>>>>>> New Revision: 254273 >>>>>>>>>> URL: http://svnweb.freebsd.org/changeset/base/254273 >>>>>>> >>>>>>>>>> Log: >>>>>>>>>> The iconv in libc did two things - implement the standard APIs, the GNU >>>>>>>>>> extensions and also tried to be link time compatible with ports libiconv. >>>>>>>>>> This splits that functionality and enables the parts that shouldn't >>>>>>>>>> interfere with the port by default. >>>>>>> >>>>>>>>>> WITH_ICONV (now on by default) - adds iconv.h, iconv_open(3) etc. >>>>>>>>>> WITH_LIBICONV_COMPAT (off by default) adds the libiconv_open etc API, linker >>>>>>>>>> symbols and even a stub libiconv.so.3 that are good enough to be able >>>>>>>>>> to 'pkg delete -f libiconv' on a running system and reasonably expect it >>>>>>>>>> to work. >>>>>>> >>>>>>>>>> I have tortured many machines over the last few days to try and reduce >>>>>>>>>> the possibilities of foot-shooting as much as I can. I've successfully >>>>>>>>>> recompiled to enable and disable the libiconv_compat modes, ports that use >>>>>>>>>> libiconv alongside system iconv etc. If you don't enable the >>>>>>>>>> WITH_LIBICONV_COMPAT switch, they don't share symbol space. >>>>>>> >>>>>>>>>> This is an extension of behavior on other system. iconv(3) is a standard >>>>>>>>>> libc interface and libiconv port expects to be able to run alongside it on >>>>>>>>>> systems that have it. >>>>>>> >>>>>>>>> Unfortunately I expect this will break many ports, when the libiconv >>>>>>>>> port is installed. A simple example is the following: >>>>>>>> >>>>>>> >>>>>>>> It also breaks installworld when /usr/src and /usr/obj are NFS exported >>>>>>>> read-only. >>>>>>> >>>>>>> I think it has to do with share/i18n/csmapper and share/i18n/esdb using >>>>>>> directories as make targets. This apparently causes these files to be >>>>>>> rebuilt at 'make installworld' time, which is always bad but is only >>>>>>> detected when /usr/obj is read-only. >>>>>>> >>>>>>> A hack that works is to enclose the four targets depending on ${SUBDIR} >>>>>>> in .if !make(install) . >>>>>>> >>>>>>> Unfortunately, the Makefiles were written to depend on the directories >>>>>>> as make targets fairly deeply, so a real fix is harder. >>>>>> >>>>>> I was looking at this yesterday, but was tied up with other things. I'll >>>>>> take a look at it today after getting a few other things done. It should be >>>>>> easy enough to replicate by changing /usr/obj to readonly on test systems. >>>>> >>>>> FWIW, this is still broken. >>>> >>>> Again, this is still broken. >>> >>> Yeah, my laptop failed to build cups (required by ghostscript which is required >>> by emacs) because of this: >> >> Well, that's a different problem. Installworld is still broken on systems with >> readonly /usr/obj. > > It is the problem originally reported by dim@ at the start of this thread. :) > > My ports tree from today does build cups fine FWIW, but it seems there is still > a lot of fallout from this change. :( Jumping in an give my comment. This has been fixed in the past few days. A lot of has been done and I was also able to build my 600 pkg set w/o any iconv hickup. A week ago I had to change the mobo of my workstation and I thought this would be a good idea to rebuild every port I have installed. Bad idea, every iconv related one failed. Yesterday I retried..... I had only one issue when building qcad which relies on openNURBS. And the latter has to be compiled with -fPIC. But this is not related to the topic. So a big thanks to the ports people! Andreas From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 22:46:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0AF0BFDC; Thu, 5 Sep 2013 22:46:50 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DB94825B6; Thu, 5 Sep 2013 22:46:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85Mkn5J068902; Thu, 5 Sep 2013 22:46:49 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85MknRe068897; Thu, 5 Sep 2013 22:46:49 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052246.r85MknRe068897@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 22:46:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255268 - in head/sys/dev/ntb: if_ntb ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 22:46:50 -0000 Author: carl Date: Thu Sep 5 22:46:48 2013 New Revision: 255268 URL: http://svnweb.freebsd.org/changeset/base/255268 Log: Add some logging to ntb link up. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_hw.h Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Thu Sep 5 21:19:16 2013 (r255267) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Thu Sep 5 22:46:48 2013 (r255268) @@ -475,8 +475,11 @@ ntb_transport_init(struct ntb_softc *ntb if (rc != 0) goto err; - if (ntb_query_link_status(ntb)) + if (ntb_query_link_status(ntb)) { + if (bootverbose) + device_printf(ntb_get_device(ntb), "link up\n"); callout_reset(&nt->link_work, 0, ntb_transport_link_work, nt); + } return (0); @@ -673,6 +676,8 @@ ntb_transport_link_up(struct ntb_transpo return; qp->client_ready = NTB_LINK_UP; + if (bootverbose) + device_printf(ntb_get_device(qp->ntb), "qp client ready\n"); if (qp->transport->transport_link == NTB_LINK_UP) callout_reset(&qp->link_work, 0, ntb_qp_link_work, qp); @@ -988,9 +993,13 @@ ntb_transport_event_callback(void *data, switch (event) { case NTB_EVENT_HW_LINK_UP: + if (bootverbose) + device_printf(ntb_get_device(nt->ntb), "HW link up\n"); callout_reset(&nt->link_work, 0, ntb_transport_link_work, nt); break; case NTB_EVENT_HW_LINK_DOWN: + if (bootverbose) + device_printf(ntb_get_device(nt->ntb), "HW link down\n"); ntb_transport_link_cleanup(nt); break; default: @@ -1071,6 +1080,8 @@ ntb_transport_link_work(void *arg) return; nt->transport_link = NTB_LINK_UP; + if (bootverbose) + device_printf(ntb_get_device(ntb), "transport link up\n"); for (i = 0; i < nt->max_qps; i++) { qp = &nt->qps[i]; @@ -1176,6 +1187,8 @@ ntb_qp_link_work(void *arg) qp->qp_link = NTB_LINK_UP; if (qp->event_handler != NULL) qp->event_handler(qp->cb_data, NTB_LINK_UP); + if (bootverbose) + device_printf(ntb_get_device(ntb), "qp link up\n"); } else if (nt->transport_link == NTB_LINK_UP) { callout_reset(&qp->link_work, NTB_LINK_DOWN_TIMEOUT * hz / 1000, ntb_qp_link_work, qp); Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 21:19:16 2013 (r255267) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 22:46:48 2013 (r255268) @@ -1286,3 +1286,9 @@ is_bar_for_data_transfer(int bar_num) else return false; } + +device_t ntb_get_device(struct ntb_softc *ntb) +{ + + return (ntb->device); +} Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.h Thu Sep 5 21:19:16 2013 (r255267) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.h Thu Sep 5 22:46:48 2013 (r255268) @@ -69,5 +69,6 @@ u_long ntb_get_mw_size(struct ntb_softc void ntb_set_mw_addr(struct ntb_softc *ntb, unsigned int mw, uint64_t addr); void ntb_ring_sdb(struct ntb_softc *ntb, unsigned int db); bool ntb_query_link_status(struct ntb_softc *ntb); +device_t ntb_get_device(struct ntb_softc *ntb); #endif /* _NTB_HW_H_ */ From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 22:52:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 12EC756A; Thu, 5 Sep 2013 22:52:41 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 007062620; Thu, 5 Sep 2013 22:52:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85Mqev2073206; Thu, 5 Sep 2013 22:52:40 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85Mqetm073205; Thu, 5 Sep 2013 22:52:40 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052252.r85Mqetm073205@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 22:52:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255269 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 22:52:41 -0000 Author: carl Date: Thu Sep 5 22:52:40 2013 New Revision: 255269 URL: http://svnweb.freebsd.org/changeset/base/255269 Log: Throw a bit to enable the link to come up on Xeon. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 22:46:48 2013 (r255268) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 22:52:40 2013 (r255269) @@ -637,6 +637,10 @@ ntb_setup_xeon(struct ntb_softc *ntb) /* Enable Bus Master and Memory Space on the secondary side */ ntb_write_2(ntb->reg_ofs.spci_cmd, PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); + + /* Enable link training */ + ntb_write_4(ntb->reg_ofs.lnk_cntl, + NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP); return (0); } From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 22:55:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 84FBE6B0; Thu, 5 Sep 2013 22:55:09 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 731A6262B; Thu, 5 Sep 2013 22:55:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85Mt9Io074059; Thu, 5 Sep 2013 22:55:09 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85Mt9Pa074058; Thu, 5 Sep 2013 22:55:09 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052255.r85Mt9Pa074058@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 22:55:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255270 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 22:55:09 -0000 Author: carl Date: Thu Sep 5 22:55:08 2013 New Revision: 255270 URL: http://svnweb.freebsd.org/changeset/base/255270 Log: Fix a typo. Approved by: jimharris Sponsored by: Intel Modified: head/share/man/man4/ntb.4 Modified: head/share/man/man4/ntb.4 ============================================================================== --- head/share/man/man4/ntb.4 Thu Sep 5 22:52:40 2013 (r255269) +++ head/share/man/man4/ntb.4 Thu Sep 5 22:55:08 2013 (r255270) @@ -71,7 +71,7 @@ This needs to be done on both systems. Each system needs to have a different IP address assigned. The MAC address is randomly generated. Also for maximum performance, the MTU should be set to 16 kiB. -This can be down by adding the line below to +This can be done by adding the line below to .Xr rc.conf 5 : .Bd -literal -offset indent ifconfig_ntb0="inet 192.168.1.10 netmask 255.255.255.0 mtu 16384" From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 22:56:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1A4EF7FE; Thu, 5 Sep 2013 22:56:53 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0816C263A; Thu, 5 Sep 2013 22:56:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85Muq13074842; Thu, 5 Sep 2013 22:56:52 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85Muq08074841; Thu, 5 Sep 2013 22:56:52 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052256.r85Muq08074841@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 22:56:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255271 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 22:56:53 -0000 Author: carl Date: Thu Sep 5 22:56:52 2013 New Revision: 255271 URL: http://svnweb.freebsd.org/changeset/base/255271 Log: Fix name change from ntb_transport to if_ntb. A few places were overlooked. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Thu Sep 5 22:55:08 2013 (r255270) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Thu Sep 5 22:56:52 2013 (r255271) @@ -279,14 +279,14 @@ ntb_handle_module_events(struct module * return (err); } -static moduledata_t ntb_transport_mod = { - "ntb_transport", +static moduledata_t if_ntb_mod = { + "if_ntb", ntb_handle_module_events, NULL }; -DECLARE_MODULE(ntb_transport, ntb_transport_mod, SI_SUB_KLD, SI_ORDER_ANY); -MODULE_DEPEND(ntb_transport, ntb_hw, 1, 1, 1); +DECLARE_MODULE(if_ntb, if_ntb_mod, SI_SUB_KLD, SI_ORDER_ANY); +MODULE_DEPEND(if_ntb, ntb_hw, 1, 1, 1); static int ntb_setup_interface() From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 22:59:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1AC2C953; Thu, 5 Sep 2013 22:59:19 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EDC70264E; Thu, 5 Sep 2013 22:59:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85MxIRp075750; Thu, 5 Sep 2013 22:59:18 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85MxI1f075748; Thu, 5 Sep 2013 22:59:18 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052259.r85MxI1f075748@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 22:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255272 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 22:59:19 -0000 Author: carl Date: Thu Sep 5 22:59:18 2013 New Revision: 255272 URL: http://svnweb.freebsd.org/changeset/base/255272 Log: Restructure the PCI bar initialization code in anticipation of upcoming bug fixes. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 22:56:52 2013 (r255271) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 22:59:18 2013 (r255272) @@ -161,10 +161,18 @@ struct ntb_softc { #define ntb_write_4(offset, val) ntb_reg_write(4, (offset), (val)) #define ntb_write_8(offset, val) ntb_reg_write(8, (offset), (val)) +typedef int (*bar_map_strategy)(struct ntb_softc *ntb, + struct ntb_pci_bar_info *bar); + static int ntb_probe(device_t device); static int ntb_attach(device_t device); static int ntb_detach(device_t device); -static int ntb_map_pci_bar(struct ntb_softc *ntb); +static int ntb_map_pci_bars(struct ntb_softc *ntb); +static int map_pci_bar(struct ntb_softc *ntb, bar_map_strategy strategy, + struct ntb_pci_bar_info *bar); +static int map_mmr_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar); +static int map_memory_window_bar(struct ntb_softc *ntb, + struct ntb_pci_bar_info *bar); static void ntb_unmap_pci_bar(struct ntb_softc *ntb); static int ntb_setup_interrupts(struct ntb_softc *ntb); static void ntb_teardown_interrupts(struct ntb_softc *ntb); @@ -250,7 +258,7 @@ ntb_attach(device_t device) callout_init(&ntb->heartbeat_timer, CALLOUT_MPSAFE); callout_init(&ntb->lr_timer, CALLOUT_MPSAFE); - DETACH_ON_ERROR(ntb_map_pci_bar(ntb)); + DETACH_ON_ERROR(ntb_map_pci_bars(ntb)); DETACH_ON_ERROR(ntb_initialize_hw(ntb)); DETACH_ON_ERROR(ntb_setup_interrupts(ntb)); @@ -273,59 +281,84 @@ ntb_detach(device_t device) } static int -ntb_map_pci_bar(struct ntb_softc *ntb) +ntb_map_pci_bars(struct ntb_softc *ntb) { - struct ntb_pci_bar_info *current_bar; - int rc, i; + int rc; ntb->bar_info[NTB_CONFIG_BAR].pci_resource_id = PCIR_BAR(0); + rc = map_pci_bar(ntb, map_mmr_bar, &ntb->bar_info[NTB_CONFIG_BAR]); + if (rc != 0) + return rc; + ntb->bar_info[NTB_B2B_BAR_1].pci_resource_id = PCIR_BAR(2); + rc = map_pci_bar(ntb, map_memory_window_bar, + &ntb->bar_info[NTB_B2B_BAR_1]); + if (rc != 0) + return rc; + ntb->bar_info[NTB_B2B_BAR_2].pci_resource_id = PCIR_BAR(4); + rc = map_pci_bar(ntb, map_memory_window_bar, + &ntb->bar_info[NTB_B2B_BAR_2]); + if (rc != 0) + return rc; + + return (0); +} - for (i = 0; i< NTB_MAX_BARS; i++) { - current_bar = &ntb->bar_info[i]; - current_bar->pci_resource = - bus_alloc_resource(ntb->device, - SYS_RES_MEMORY, - ¤t_bar->pci_resource_id, 0, ~0, 1, +static int +map_pci_bar(struct ntb_softc *ntb, bar_map_strategy strategy, + struct ntb_pci_bar_info *bar) +{ + int rc; + + rc = strategy(ntb, bar); + if (rc != 0) { + device_printf(ntb->device, + "unable to allocate pci resource\n"); + } else { + device_printf(ntb->device, + "Bar size = %lx, v %p, p %p\n", + bar->size, bar->vbase, + (void *)(bar->pbase)); + } + return (rc); +} + +static int +map_mmr_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar) +{ + + bar->pci_resource = bus_alloc_resource(ntb->device, SYS_RES_MEMORY, + &bar->pci_resource_id, 0, ~0, 1, RF_ACTIVE); + + if (bar->pci_resource == NULL) + return (ENXIO); + else { + save_bar_parameters(bar); + return (0); + } +} + +static int +map_memory_window_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar) +{ + int rc; + + bar->pci_resource = bus_alloc_resource(ntb->device, + SYS_RES_MEMORY, &bar->pci_resource_id, 0, ~0, 1, RF_ACTIVE); - if (current_bar->pci_resource == NULL) { - device_printf(ntb->device, - "unable to allocate pci resource\n"); - return (ENXIO); - } - else { - current_bar->pci_bus_tag = - rman_get_bustag(current_bar->pci_resource); - current_bar->pci_bus_handle = - rman_get_bushandle(current_bar->pci_resource); - current_bar->pbase = - rman_get_start(current_bar->pci_resource); - current_bar->size = - rman_get_size(current_bar->pci_resource); - current_bar->vbase = - rman_get_virtual(current_bar->pci_resource); - if (is_bar_for_data_transfer(i)) { - /* - * Mark bar region as write combining to improve - * performance. - */ - rc = pmap_change_attr( - (vm_offset_t)current_bar->vbase, - current_bar->size, - VM_MEMATTR_WRITE_COMBINING); - if (rc != 0) { - device_printf(ntb->device, - "Couldn't mark bar as" - " WRITE_COMBINING\n"); - return (rc); - } - } - device_printf(ntb->device, - "Bar size = %lx, v %p, p %p\n", - current_bar->size, current_bar->vbase, - (void *)(current_bar->pbase)); + if (bar->pci_resource == NULL) + return (ENXIO); + else { + save_bar_parameters(bar); + /* Mark bar region as write combining to improve performance. */ + rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size, + VM_MEMATTR_WRITE_COMBINING); + if (rc != 0) { + device_printf(ntb->device, "unable to mark bar as" + " WRITE_COMBINING\n"); + return (rc); } } return (0); @@ -1282,13 +1315,20 @@ ntb_query_link_status(struct ntb_softc * return (ntb->link_status == NTB_LINK_UP); } -static bool -is_bar_for_data_transfer(int bar_num) +static void +save_bar_parameters(struct ntb_pci_bar_info *bar) { - if ((bar_num > NTB_CONFIG_BAR) && (bar_num < NTB_MAX_BARS)) - return true; - else - return false; + bar->pci_bus_tag = + rman_get_bustag(bar->pci_resource); + bar->pci_bus_handle = + rman_get_bushandle(bar->pci_resource); + bar->pbase = + rman_get_start(bar->pci_resource); + bar->size = + rman_get_size(bar->pci_resource); + bar->vbase = + rman_get_virtual(bar->pci_resource); + } device_t ntb_get_device(struct ntb_softc *ntb) From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 23:00:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F3ED4AB4; Thu, 5 Sep 2013 23:00:24 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E1C7C2665; Thu, 5 Sep 2013 23:00:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85N0OaN076498; Thu, 5 Sep 2013 23:00:24 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85N0OLX076496; Thu, 5 Sep 2013 23:00:24 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309052300.r85N0OLX076496@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 5 Sep 2013 23:00:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255273 - in head/sys/powerpc: aim include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 23:00:25 -0000 Author: nwhitehorn Date: Thu Sep 5 23:00:24 2013 New Revision: 255273 URL: http://svnweb.freebsd.org/changeset/base/255273 Log: Align stacks of kernel threads correctly at 16-byte boundaries rather than making sure they are all misaligned at +8 bytes. This fixes clang builds of powerpc64 kernels (aside from a required increase in KSTACK_PAGES which will come later). This commit from FreeBSD/powerpc64 with a clang-built kernel. MFC after: 2 weeks Modified: head/sys/powerpc/aim/vm_machdep.c head/sys/powerpc/include/frame.h Modified: head/sys/powerpc/aim/vm_machdep.c ============================================================================== --- head/sys/powerpc/aim/vm_machdep.c Thu Sep 5 22:59:18 2013 (r255272) +++ head/sys/powerpc/aim/vm_machdep.c Thu Sep 5 23:00:24 2013 (r255273) @@ -187,6 +187,7 @@ cpu_fork(struct thread *td1, struct proc cf->cf_arg1 = (register_t)tf; pcb->pcb_sp = (register_t)cf; + KASSERT(pcb->pcb_sp % 16 == 0, ("stack misaligned")); #ifdef __powerpc64__ pcb->pcb_lr = ((register_t *)fork_trampoline)[0]; pcb->pcb_toc = ((register_t *)fork_trampoline)[1]; Modified: head/sys/powerpc/include/frame.h ============================================================================== --- head/sys/powerpc/include/frame.h Thu Sep 5 22:59:18 2013 (r255272) +++ head/sys/powerpc/include/frame.h Thu Sep 5 23:00:24 2013 (r255273) @@ -94,6 +94,7 @@ struct callframe { register_t cf_func; register_t cf_arg0; register_t cf_arg1; + register_t _padding; /* Maintain 16-byte alignment */ }; #else struct callframe { From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 23:01:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A1BE6BF9; Thu, 5 Sep 2013 23:01:00 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 761F1268F; Thu, 5 Sep 2013 23:01:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85N10Mm078536; Thu, 5 Sep 2013 23:01:00 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85N10bB078535; Thu, 5 Sep 2013 23:01:00 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052301.r85N10bB078535@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 23:01:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255274 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 23:01:00 -0000 Author: carl Date: Thu Sep 5 23:00:59 2013 New Revision: 255274 URL: http://svnweb.freebsd.org/changeset/base/255274 Log: Add support for per device features and workarounds. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:00:24 2013 (r255273) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:00:59 2013 (r255274) @@ -76,10 +76,18 @@ enum ntb_device_type { NTB_SOC }; +/* Device features and workarounds */ +#define HAS_FEATURE(feature) \ + ((ntb->features & (feature)) != 0) + +#define NTB_BAR_SIZE_4K (1 << 0) +#define NTB_REGS_THRU_MW (1 << 1) + struct ntb_hw_info { uint32_t device_id; - enum ntb_device_type type; const char *desc; + enum ntb_device_type type; + uint64_t features; }; struct ntb_pci_bar_info { @@ -108,6 +116,7 @@ struct ntb_db_cb { struct ntb_softc { device_t device; enum ntb_device_type type; + uint64_t features; struct ntb_pci_bar_info bar_info[NTB_MAX_BARS]; struct ntb_int_info int_info[MAX_MSIX_INTERRUPTS]; @@ -190,13 +199,15 @@ static void ntb_handle_heartbeat(void *a static void ntb_handle_link_event(struct ntb_softc *ntb, int link_state); static void recover_soc_link(void *arg); static int ntb_check_link_status(struct ntb_softc *ntb); -static bool is_bar_for_data_transfer(int bar_num); +static void save_bar_parameters(struct ntb_pci_bar_info *bar); static struct ntb_hw_info pci_ids[] = { - { 0x3C0D8086, NTB_XEON, "Xeon E5/Core i7 Non-Transparent Bridge B2B" }, - { 0x0C4E8086, NTB_SOC, "Atom Processor S1200 NTB Primary B2B" }, - { 0x0E0D8086, NTB_XEON, "Xeon E5 V2 Non-Transparent Bridge B2B" }, - { 0x00000000, NTB_SOC, NULL } + { 0x3C0D8086, "Xeon E5/Core i7 Non-Transparent Bridge B2B", NTB_XEON, + NTB_REGS_THRU_MW }, + { 0x0C4E8086, "Atom Processor S1200 NTB Primary B2B", NTB_SOC, 0 }, + { 0x0E0D8086, "Xeon E5 V2 Non-Transparent Bridge B2B", NTB_XEON, + NTB_REGS_THRU_MW | NTB_BAR_SIZE_4K }, + { 0x00000000, NULL, NTB_SOC, 0 } }; /* @@ -253,6 +264,7 @@ ntb_attach(device_t device) ntb->device = device; ntb->type = p->type; + ntb->features = p->features; /* Heartbeat timer for NTB_SOC since there is no link interrupt */ callout_init(&ntb->heartbeat_timer, CALLOUT_MPSAFE); @@ -301,7 +313,7 @@ ntb_map_pci_bars(struct ntb_softc *ntb) &ntb->bar_info[NTB_B2B_BAR_2]); if (rc != 0) return rc; - + return (0); } From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 23:02:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BB62AD49; Thu, 5 Sep 2013 23:02:43 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A98FB269F; Thu, 5 Sep 2013 23:02:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85N2hpb079159; Thu, 5 Sep 2013 23:02:43 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85N2hrB079158; Thu, 5 Sep 2013 23:02:43 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052302.r85N2hrB079158@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 23:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255275 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 23:02:43 -0000 Author: carl Date: Thu Sep 5 23:02:43 2013 New Revision: 255275 URL: http://svnweb.freebsd.org/changeset/base/255275 Log: Simplifying bus alloc resource call since we only need the default values. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:00:59 2013 (r255274) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:02:43 2013 (r255275) @@ -340,8 +340,8 @@ static int map_mmr_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar) { - bar->pci_resource = bus_alloc_resource(ntb->device, SYS_RES_MEMORY, - &bar->pci_resource_id, 0, ~0, 1, RF_ACTIVE); + bar->pci_resource = bus_alloc_resource_any(ntb->device, SYS_RES_MEMORY, + &bar->pci_resource_id, RF_ACTIVE); if (bar->pci_resource == NULL) return (ENXIO); @@ -356,9 +356,8 @@ map_memory_window_bar(struct ntb_softc * { int rc; - bar->pci_resource = bus_alloc_resource(ntb->device, - SYS_RES_MEMORY, &bar->pci_resource_id, 0, ~0, 1, - RF_ACTIVE); + bar->pci_resource = bus_alloc_resource_any(ntb->device, + SYS_RES_MEMORY, &bar->pci_resource_id, RF_ACTIVE); if (bar->pci_resource == NULL) return (ENXIO); From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 23:04:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ED76CF99; Thu, 5 Sep 2013 23:04:36 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CCA5D26BF; Thu, 5 Sep 2013 23:04:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85N4a2O080046; Thu, 5 Sep 2013 23:04:36 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85N4aBd080044; Thu, 5 Sep 2013 23:04:36 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052304.r85N4aBd080044@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 23:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255276 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 23:04:37 -0000 Author: carl Date: Thu Sep 5 23:04:36 2013 New Revision: 255276 URL: http://svnweb.freebsd.org/changeset/base/255276 Log: Implement workaround for IvyTown 4K BAR size issue. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:02:43 2013 (r255275) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:04:36 2013 (r255276) @@ -355,6 +355,7 @@ static int map_memory_window_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar) { int rc; + uint8_t bar_size_bits = 0; bar->pci_resource = bus_alloc_resource_any(ntb->device, SYS_RES_MEMORY, &bar->pci_resource_id, RF_ACTIVE); @@ -363,6 +364,40 @@ map_memory_window_bar(struct ntb_softc * return (ENXIO); else { save_bar_parameters(bar); + /* + * Ivytown NTB BAR sizes are misreported by the hardware due to + * a hardware issue. To work around this, query the size it + * should be configured to by the device and modify the resource + * to correspond to this new size. The BIOS on systems with this + * problem is required to provide enough address space to allow + * the driver to make this change safely. + * + * Ideally I could have just specified the size when I allocated + * the resource like: + * bus_alloc_resource(ntb->device, + * SYS_RES_MEMORY, &bar->pci_resource_id, 0ul, ~0ul, + * 1ul << bar_size_bits, RF_ACTIVE); + * but the PCI driver does not honor the size in this call, so + * we have to modify it after the fact. + */ + if (HAS_FEATURE(BAR_SIZE_4K)) { + if (bar->pci_resource_id == PCIR_BAR(2)) + bar_size_bits = pci_read_config(ntb->device, + XEON_PBAR23SZ_OFFSET, 1); + else + bar_size_bits = pci_read_config(ntb->device, + XEON_PBAR45SZ_OFFSET, 1); + rc = bus_adjust_resource(ntb->device, SYS_RES_MEMORY, + bar->pci_resource, bar->pbase, + bar->pbase + (1ul << bar_size_bits) - 1); + if (rc != 0 ) { + device_printf(ntb->device, + "unable to resize bar\n"); + return (rc); + } else + save_bar_parameters(bar); + } + /* Mark bar region as write combining to improve performance. */ rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size, VM_MEMATTR_WRITE_COMBINING); Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Thu Sep 5 23:02:43 2013 (r255275) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Thu Sep 5 23:04:36 2013 (r255276) @@ -120,6 +120,8 @@ #define NTB_CNTL_BAR45_SNOOP (1 << 6) #define SOC_CNTL_LINK_DOWN (1 << 16) +#define XEON_PBAR23SZ_OFFSET 0x00d0 +#define XEON_PBAR45SZ_OFFSET 0x00d1 #define NTB_PPD_OFFSET 0x00D4 #define XEON_PPD_CONN_TYPE 0x0003 #define XEON_PPD_DEV_TYPE 0x0010 From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 23:06:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A1B861F1; Thu, 5 Sep 2013 23:06:26 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 802CE26DE; Thu, 5 Sep 2013 23:06:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85N6QYV080983; Thu, 5 Sep 2013 23:06:26 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85N6QVb080982; Thu, 5 Sep 2013 23:06:26 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052306.r85N6QVb080982@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 23:06:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255277 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 23:06:26 -0000 Author: carl Date: Thu Sep 5 23:06:25 2013 New Revision: 255277 URL: http://svnweb.freebsd.org/changeset/base/255277 Log: Cleaning up spacing and making hex value case consistent. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Thu Sep 5 23:04:36 2013 (r255276) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Thu Sep 5 23:06:25 2013 (r255277) @@ -39,14 +39,14 @@ #define XEON_MAX_SPADS 16 #define XEON_MAX_COMPAT_SPADS 8 /* Reserve the uppermost bit for link interrupt */ -#define XEON_MAX_DB_BITS 15 +#define XEON_MAX_DB_BITS 15 #define XEON_DB_BITS_PER_VEC 5 #define XEON_DB_HW_LINK 0x8000 #define XEON_PCICMD_OFFSET 0x0504 #define XEON_DEVCTRL_OFFSET 0x0598 -#define XEON_LINK_STATUS_OFFSET 0x01A2 +#define XEON_LINK_STATUS_OFFSET 0x01a2 #define XEON_PBAR2LMT_OFFSET 0x0000 #define XEON_PBAR4LMT_OFFSET 0x0008 @@ -60,13 +60,13 @@ #define XEON_SBAR2BASE_OFFSET 0x0048 #define XEON_SBAR4BASE_OFFSET 0x0050 #define XEON_NTBCNTL_OFFSET 0x0058 -#define XEON_SBDF_OFFSET 0x005C +#define XEON_SBDF_OFFSET 0x005c #define XEON_PDOORBELL_OFFSET 0x0060 #define XEON_PDBMSK_OFFSET 0x0062 #define XEON_SDOORBELL_OFFSET 0x0064 #define XEON_SDBMSK_OFFSET 0x0066 #define XEON_USMEMMISS 0x0070 -#define XEON_SPAD_OFFSET 0x0080 +#define XEON_SPAD_OFFSET 0x0080 #define XEON_SPADSEMA4_OFFSET 0x00c0 #define XEON_WCCNTRL_OFFSET 0x00e0 #define XEON_B2B_SPAD_OFFSET 0x0100 @@ -105,7 +105,7 @@ #define SOC_MODPHY_PCSREG4 0x1c004 #define SOC_MODPHY_PCSREG6 0x1c006 -#define SOC_IP_BASE 0xC000 +#define SOC_IP_BASE 0xc000 #define SOC_DESKEWSTS_OFFSET (SOC_IP_BASE + 0x3024) #define SOC_LTSSMERRSTS0_OFFSET (SOC_IP_BASE + 0x3180) #define SOC_LTSSMSTATEJMP_OFFSET (SOC_IP_BASE + 0x3040) @@ -114,7 +114,7 @@ #define SOC_DESKEWSTS_DBERR (1 << 15) #define SOC_LTSSMERRSTS0_UNEXPECTEDEI (1 << 20) #define SOC_LTSSMSTATEJMP_FORCEDETECT (1 << 2) -#define SOC_IBIST_ERR_OFLOW 0x7FFF7FFF +#define SOC_IBIST_ERR_OFLOW 0x7fff7fff #define NTB_CNTL_BAR23_SNOOP (1 << 2) #define NTB_CNTL_BAR45_SNOOP (1 << 6) @@ -122,7 +122,7 @@ #define XEON_PBAR23SZ_OFFSET 0x00d0 #define XEON_PBAR45SZ_OFFSET 0x00d1 -#define NTB_PPD_OFFSET 0x00D4 +#define NTB_PPD_OFFSET 0x00d4 #define XEON_PPD_CONN_TYPE 0x0003 #define XEON_PPD_DEV_TYPE 0x0010 #define SOC_PPD_INIT_LINK 0x0008 @@ -138,11 +138,11 @@ #define SOC_PBAR2XLAT_USD_ADDR 0x0000004000000000 #define SOC_PBAR4XLAT_USD_ADDR 0x0000008000000000 -#define SOC_MBAR23_USD_ADDR 0x000000410000000C -#define SOC_MBAR45_USD_ADDR 0x000000810000000C +#define SOC_MBAR23_USD_ADDR 0x000000410000000c +#define SOC_MBAR45_USD_ADDR 0x000000810000000c #define SOC_PBAR2XLAT_DSD_ADDR 0x0000004100000000 #define SOC_PBAR4XLAT_DSD_ADDR 0x0000008100000000 -#define SOC_MBAR23_DSD_ADDR 0x000000400000000C -#define SOC_MBAR45_DSD_ADDR 0x000000800000000C +#define SOC_MBAR23_DSD_ADDR 0x000000400000000c +#define SOC_MBAR45_DSD_ADDR 0x000000800000000c #endif /* _NTB_REGS_H_ */ From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 23:08:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DE8F4353; Thu, 5 Sep 2013 23:08:22 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB73B26F5; Thu, 5 Sep 2013 23:08:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85N8MHU081461; Thu, 5 Sep 2013 23:08:22 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85N8MKI081460; Thu, 5 Sep 2013 23:08:22 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052308.r85N8MKI081460@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 23:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255278 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 23:08:23 -0000 Author: carl Date: Thu Sep 5 23:08:22 2013 New Revision: 255278 URL: http://svnweb.freebsd.org/changeset/base/255278 Log: Simplify register access macros by removing one level of indirection. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:06:25 2013 (r255277) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:08:22 2013 (r255278) @@ -161,14 +161,6 @@ struct ntb_softc { bus_space_write_ ## SIZE (ntb->bar_info[NTB_CONFIG_BAR].pci_bus_tag, \ ntb->bar_info[NTB_CONFIG_BAR].pci_bus_handle, (offset), (val)) -#define ntb_read_1(offset) ntb_reg_read(1, (offset)) -#define ntb_read_2(offset) ntb_reg_read(2, (offset)) -#define ntb_read_4(offset) ntb_reg_read(4, (offset)) -#define ntb_read_8(offset) ntb_reg_read(8, (offset)) -#define ntb_write_1(offset, val) ntb_reg_write(1, (offset), (val)) -#define ntb_write_2(offset, val) ntb_reg_write(2, (offset), (val)) -#define ntb_write_4(offset, val) ntb_reg_write(4, (offset), (val)) -#define ntb_write_8(offset, val) ntb_reg_write(8, (offset), (val)) typedef int (*bar_map_strategy)(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar); @@ -440,9 +432,9 @@ ntb_setup_interrupts(struct ntb_softc *n * Interrupt. The rest will be unmasked as callbacks are registered. */ if (ntb->type == NTB_SOC) - ntb_write_8(ntb->reg_ofs.pdb_mask, ~0); + ntb_reg_write(8, ntb->reg_ofs.pdb_mask, ~0); else - ntb_write_2(ntb->reg_ofs.pdb_mask, + ntb_reg_write(2, ntb->reg_ofs.pdb_mask, ~(1 << ntb->limits.max_db_bits)); num_vectors = MIN(pci_msix_count(ntb->device), @@ -542,7 +534,7 @@ handle_soc_irq(void *arg) struct ntb_db_cb *db_cb = arg; struct ntb_softc *ntb = db_cb->ntb; - ntb_write_8(ntb->reg_ofs.pdb, (uint64_t) 1 << db_cb->db_num); + ntb_reg_write(8, ntb->reg_ofs.pdb, (uint64_t) 1 << db_cb->db_num); if (db_cb->callback != NULL) db_cb->callback(db_cb->data, db_cb->db_num); @@ -560,7 +552,7 @@ handle_xeon_irq(void *arg) * vectors, with the 4th having a single bit for link * interrupts. */ - ntb_write_2(ntb->reg_ofs.pdb, + ntb_reg_write(2, ntb->reg_ofs.pdb, ((1 << ntb->bits_per_vector) - 1) << (db_cb->db_num * ntb->bits_per_vector)); @@ -580,7 +572,7 @@ handle_xeon_event_irq(void *arg) device_printf(ntb->device, "Error determining link status\n"); /* bit 15 is always the link bit */ - ntb_write_2(ntb->reg_ofs.pdb, 1 << ntb->limits.max_db_bits); + ntb_reg_write(2, ntb->reg_ofs.pdb, 1 << ntb->limits.max_db_bits); } static void @@ -592,7 +584,7 @@ ntb_handle_legacy_interrupt(void *arg) uint16_t pdb16; if (ntb->type == NTB_SOC) { - pdb64 = ntb_read_8(ntb->reg_ofs.pdb); + pdb64 = ntb_reg_read(8, ntb->reg_ofs.pdb); while (pdb64) { i = ffs(pdb64); @@ -600,7 +592,7 @@ ntb_handle_legacy_interrupt(void *arg) handle_soc_irq(&ntb->db_cb[i]); } } else { - pdb16 = ntb_read_2(ntb->reg_ofs.pdb); + pdb16 = ntb_reg_read(2, ntb->reg_ofs.pdb); if ((pdb16 & XEON_DB_HW_LINK) != 0) { handle_xeon_event_irq(ntb); @@ -714,11 +706,11 @@ ntb_setup_xeon(struct ntb_softc *ntb) ntb->bits_per_vector = XEON_DB_BITS_PER_VEC; /* Enable Bus Master and Memory Space on the secondary side */ - ntb_write_2(ntb->reg_ofs.spci_cmd, + ntb_reg_write(2, ntb->reg_ofs.spci_cmd, PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); /* Enable link training */ - ntb_write_4(ntb->reg_ofs.lnk_cntl, + ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP); return (0); @@ -786,37 +778,37 @@ ntb_setup_soc(struct ntb_softc *ntb) * Check and correct the issue. */ if (ntb->dev_type == NTB_DEV_USD) { - if (ntb_read_8(SOC_PBAR2XLAT_OFFSET) == 0) - ntb_write_8(SOC_PBAR2XLAT_OFFSET, + if (ntb_reg_read(8, SOC_PBAR2XLAT_OFFSET) == 0) + ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, SOC_PBAR2XLAT_USD_ADDR); - if (ntb_read_8(SOC_PBAR4XLAT_OFFSET) == 0) - ntb_write_8(SOC_PBAR4XLAT_OFFSET, + if (ntb_reg_read(8, SOC_PBAR4XLAT_OFFSET) == 0) + ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, SOC_PBAR4XLAT_USD_ADDR); - if (ntb_read_8(SOC_MBAR23_OFFSET) == 0xC) - ntb_write_8(SOC_MBAR23_OFFSET, SOC_MBAR23_USD_ADDR); + if (ntb_reg_read(8, SOC_MBAR23_OFFSET) == 0xC) + ntb_reg_write(8, SOC_MBAR23_OFFSET, SOC_MBAR23_USD_ADDR); - if (ntb_read_8(SOC_MBAR45_OFFSET) == 0xC) - ntb_write_8(SOC_MBAR45_OFFSET, SOC_MBAR45_USD_ADDR); + if (ntb_reg_read(8, SOC_MBAR45_OFFSET) == 0xC) + ntb_reg_write(8, SOC_MBAR45_OFFSET, SOC_MBAR45_USD_ADDR); } else { - if (ntb_read_8(SOC_PBAR2XLAT_OFFSET) == 0) - ntb_write_8(SOC_PBAR2XLAT_OFFSET, + if (ntb_reg_read(8, SOC_PBAR2XLAT_OFFSET) == 0) + ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, SOC_PBAR2XLAT_DSD_ADDR); - if (ntb_read_8(SOC_PBAR4XLAT_OFFSET) == 0) - ntb_write_8(SOC_PBAR4XLAT_OFFSET, + if (ntb_reg_read(8, SOC_PBAR4XLAT_OFFSET) == 0) + ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, SOC_PBAR4XLAT_DSD_ADDR); - if (ntb_read_8(SOC_MBAR23_OFFSET) == 0xC) - ntb_write_8(SOC_MBAR23_OFFSET, SOC_MBAR23_DSD_ADDR); + if (ntb_reg_read(8, SOC_MBAR23_OFFSET) == 0xC) + ntb_reg_write(8, SOC_MBAR23_OFFSET, SOC_MBAR23_DSD_ADDR); - if (ntb_read_8(SOC_MBAR45_OFFSET) == 0xC) - ntb_write_8(SOC_MBAR45_OFFSET, SOC_MBAR45_DSD_ADDR); + if (ntb_reg_read(8, SOC_MBAR45_OFFSET) == 0xC) + ntb_reg_write(8, SOC_MBAR45_OFFSET, SOC_MBAR45_DSD_ADDR); } /* Enable Bus Master and Memory Space on the secondary side */ - ntb_write_2(ntb->reg_ofs.spci_cmd, + ntb_reg_write(2, ntb->reg_ofs.spci_cmd, PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); callout_reset(&ntb->heartbeat_timer, 0, ntb_handle_heartbeat, ntb); @@ -836,7 +828,7 @@ ntb_handle_heartbeat(void *arg) "Error determining link status\n"); /* Check to see if a link error is the cause of the link down */ if (ntb->link_status == NTB_LINK_DOWN) { - status32 = ntb_read_4(SOC_LTSSMSTATEJMP_OFFSET); + status32 = ntb_reg_read(4, SOC_LTSSMSTATEJMP_OFFSET); if ((status32 & SOC_LTSSMSTATEJMP_FORCEDETECT) != 0) { callout_reset(&ntb->lr_timer, 0, recover_soc_link, ntb); @@ -854,37 +846,37 @@ soc_perform_link_restart(struct ntb_soft uint32_t status; /* Driver resets the NTB ModPhy lanes - magic! */ - ntb_write_1(SOC_MODPHY_PCSREG6, 0xe0); - ntb_write_1(SOC_MODPHY_PCSREG4, 0x40); - ntb_write_1(SOC_MODPHY_PCSREG4, 0x60); - ntb_write_1(SOC_MODPHY_PCSREG6, 0x60); + ntb_reg_write(1, SOC_MODPHY_PCSREG6, 0xe0); + ntb_reg_write(1, SOC_MODPHY_PCSREG4, 0x40); + ntb_reg_write(1, SOC_MODPHY_PCSREG4, 0x60); + ntb_reg_write(1, SOC_MODPHY_PCSREG6, 0x60); /* Driver waits 100ms to allow the NTB ModPhy to settle */ pause("ModPhy", hz / 10); /* Clear AER Errors, write to clear */ - status = ntb_read_4(SOC_ERRCORSTS_OFFSET); + status = ntb_reg_read(4, SOC_ERRCORSTS_OFFSET); status &= PCIM_AER_COR_REPLAY_ROLLOVER; - ntb_write_4(SOC_ERRCORSTS_OFFSET, status); + ntb_reg_write(4, SOC_ERRCORSTS_OFFSET, status); /* Clear unexpected electrical idle event in LTSSM, write to clear */ - status = ntb_read_4(SOC_LTSSMERRSTS0_OFFSET); + status = ntb_reg_read(4, SOC_LTSSMERRSTS0_OFFSET); status |= SOC_LTSSMERRSTS0_UNEXPECTEDEI; - ntb_write_4(SOC_LTSSMERRSTS0_OFFSET, status); + ntb_reg_write(4, SOC_LTSSMERRSTS0_OFFSET, status); /* Clear DeSkew Buffer error, write to clear */ - status = ntb_read_4(SOC_DESKEWSTS_OFFSET); + status = ntb_reg_read(4, SOC_DESKEWSTS_OFFSET); status |= SOC_DESKEWSTS_DBERR; - ntb_write_4(SOC_DESKEWSTS_OFFSET, status); + ntb_reg_write(4, SOC_DESKEWSTS_OFFSET, status); - status = ntb_read_4(SOC_IBSTERRRCRVSTS0_OFFSET); + status = ntb_reg_read(4, SOC_IBSTERRRCRVSTS0_OFFSET); status &= SOC_IBIST_ERR_OFLOW; - ntb_write_4(SOC_IBSTERRRCRVSTS0_OFFSET, status); + ntb_reg_write(4, SOC_IBSTERRRCRVSTS0_OFFSET, status); /* Releases the NTB state machine to allow the link to retrain */ - status = ntb_read_4(SOC_LTSSMSTATEJMP_OFFSET); + status = ntb_reg_read(4, SOC_LTSSMSTATEJMP_OFFSET); status &= ~SOC_LTSSMSTATEJMP_FORCEDETECT; - ntb_write_4(SOC_LTSSMSTATEJMP_OFFSET, status); + ntb_reg_write(4, SOC_LTSSMSTATEJMP_OFFSET, status); } static void @@ -902,7 +894,7 @@ ntb_handle_link_event(struct ntb_softc * event = NTB_EVENT_HW_LINK_UP; if (ntb->type == NTB_SOC) - status = ntb_read_2(ntb->reg_ofs.lnk_stat); + status = ntb_reg_read(2, ntb->reg_ofs.lnk_stat); else status = pci_read_config(ntb->device, XEON_LINK_STATUS_OFFSET, 2); @@ -935,15 +927,15 @@ recover_soc_link(void *arg) soc_perform_link_restart(ntb); pause("Link", SOC_LINK_RECOVERY_TIME * hz / 1000); - status32 = ntb_read_4(SOC_LTSSMSTATEJMP_OFFSET); + status32 = ntb_reg_read(4, SOC_LTSSMSTATEJMP_OFFSET); if ((status32 & SOC_LTSSMSTATEJMP_FORCEDETECT) != 0) goto retry; - status32 = ntb_read_4(SOC_IBSTERRRCRVSTS0_OFFSET); + status32 = ntb_reg_read(4, SOC_IBSTERRRCRVSTS0_OFFSET); if ((status32 & SOC_IBIST_ERR_OFLOW) != 0) goto retry; - status16 = ntb_read_2(ntb->reg_ofs.lnk_stat); + status16 = ntb_reg_read(2, ntb->reg_ofs.lnk_stat); width = (status16 & NTB_LINK_WIDTH_MASK) >> 4; speed = (status16 & NTB_LINK_SPEED_MASK); if (ntb->link_width != width || ntb->link_speed != speed) @@ -966,7 +958,7 @@ ntb_check_link_status(struct ntb_softc * uint16_t status; if (ntb->type == NTB_SOC) { - ntb_cntl = ntb_read_4(ntb->reg_ofs.lnk_cntl); + ntb_cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl); if ((ntb_cntl & SOC_CNTL_LINK_DOWN) != 0) link_state = NTB_LINK_DOWN; else @@ -1048,9 +1040,9 @@ ntb_register_db_callback(struct ntb_soft ntb->db_cb[idx].data = data; /* unmask interrupt */ - mask = ntb_read_2(ntb->reg_ofs.pdb_mask); + mask = ntb_reg_read(2, ntb->reg_ofs.pdb_mask); mask &= ~(1 << (idx * ntb->bits_per_vector)); - ntb_write_2(ntb->reg_ofs.pdb_mask, mask); + ntb_reg_write(2, ntb->reg_ofs.pdb_mask, mask); return (0); } @@ -1071,9 +1063,9 @@ ntb_unregister_db_callback(struct ntb_so if (idx >= ntb->allocated_interrupts || !ntb->db_cb[idx].callback) return; - mask = ntb_read_2(ntb->reg_ofs.pdb_mask); + mask = ntb_reg_read(2, ntb->reg_ofs.pdb_mask); mask |= 1 << (idx * ntb->bits_per_vector); - ntb_write_2(ntb->reg_ofs.pdb_mask, mask); + ntb_reg_write(2, ntb->reg_ofs.pdb_mask, mask); ntb->db_cb[idx].callback = NULL; } @@ -1174,7 +1166,7 @@ ntb_write_local_spad(struct ntb_softc *n if (idx >= ntb->limits.max_spads) return (EINVAL); - ntb_write_4(ntb->reg_ofs.spad_local + idx * 4, val); + ntb_reg_write(4, ntb->reg_ofs.spad_local + idx * 4, val); return (0); } @@ -1197,7 +1189,7 @@ ntb_read_local_spad(struct ntb_softc *nt if (idx >= ntb->limits.max_spads) return (EINVAL); - *val = ntb_read_4(ntb->reg_ofs.spad_local + idx * 4); + *val = ntb_reg_read(4, ntb->reg_ofs.spad_local + idx * 4); return (0); } @@ -1220,7 +1212,7 @@ ntb_write_remote_spad(struct ntb_softc * if (idx >= ntb->limits.max_spads) return (EINVAL); - ntb_write_4(ntb->reg_ofs.spad_remote + idx * 4, val); + ntb_reg_write(4, ntb->reg_ofs.spad_remote + idx * 4, val); return (0); } @@ -1243,7 +1235,7 @@ ntb_read_remote_spad(struct ntb_softc *n if (idx >= ntb->limits.max_spads) return (EINVAL); - *val = ntb_read_4(ntb->reg_ofs.spad_remote + idx * 4); + *val = ntb_reg_read(4, ntb->reg_ofs.spad_remote + idx * 4); return (0); } @@ -1316,10 +1308,10 @@ ntb_set_mw_addr(struct ntb_softc *ntb, u switch (NTB_MW_TO_BAR(mw)) { case NTB_B2B_BAR_1: - ntb_write_8(ntb->reg_ofs.sbar2_xlat, addr); + ntb_reg_write(8, ntb->reg_ofs.sbar2_xlat, addr); break; case NTB_B2B_BAR_2: - ntb_write_8(ntb->reg_ofs.sbar4_xlat, addr); + ntb_reg_write(8, ntb->reg_ofs.sbar4_xlat, addr); break; } } @@ -1339,9 +1331,9 @@ ntb_ring_sdb(struct ntb_softc *ntb, unsi { if (ntb->type == NTB_SOC) - ntb_write_8(ntb->reg_ofs.sdb, (uint64_t) 1 << db); + ntb_reg_write(8, ntb->reg_ofs.sdb, (uint64_t) 1 << db); else - ntb_write_2(ntb->reg_ofs.sdb, + ntb_reg_write(2, ntb->reg_ofs.sdb, ((1 << ntb->bits_per_vector) - 1) << (db * ntb->bits_per_vector)); } From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 23:11:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EE03B4A4; Thu, 5 Sep 2013 23:11:11 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CBA52272A; Thu, 5 Sep 2013 23:11:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85NBBoc084537; Thu, 5 Sep 2013 23:11:11 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85NBBLH084534; Thu, 5 Sep 2013 23:11:11 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052311.r85NBBLH084534@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 23:11:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255279 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 23:11:12 -0000 Author: carl Date: Thu Sep 5 23:11:11 2013 New Revision: 255279 URL: http://svnweb.freebsd.org/changeset/base/255279 Log: Workaround an issue with hardware by accessing remote device through mem window. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:08:22 2013 (r255278) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:11:11 2013 (r255279) @@ -154,13 +154,18 @@ struct ntb_softc { uint8_t link_speed; }; -#define ntb_reg_read(SIZE, offset) \ - bus_space_read_ ## SIZE (ntb->bar_info[NTB_CONFIG_BAR].pci_bus_tag, \ - ntb->bar_info[NTB_CONFIG_BAR].pci_bus_handle, (offset)) +#define ntb_bar_read(SIZE, bar, offset) \ + bus_space_read_ ## SIZE (ntb->bar_info[(bar)].pci_bus_tag, \ + ntb->bar_info[(bar)].pci_bus_handle, (offset)) +#define ntb_bar_write(SIZE, bar, offset, val) \ + bus_space_write_ ## SIZE (ntb->bar_info[(bar)].pci_bus_tag, \ + ntb->bar_info[(bar)].pci_bus_handle, (offset), (val)) +#define ntb_reg_read(SIZE, offset) ntb_bar_read(SIZE, NTB_CONFIG_BAR, offset) #define ntb_reg_write(SIZE, offset, val) \ - bus_space_write_ ## SIZE (ntb->bar_info[NTB_CONFIG_BAR].pci_bus_tag, \ - ntb->bar_info[NTB_CONFIG_BAR].pci_bus_handle, (offset), (val)) - + ntb_bar_write(SIZE, NTB_CONFIG_BAR, offset, val) +#define ntb_mw_read(SIZE, offset) ntb_bar_read(SIZE, NTB_B2B_BAR_2, offset) +#define ntb_mw_write(SIZE, offset, val) \ + ntb_bar_write(SIZE, NTB_B2B_BAR_2, offset, val) typedef int (*bar_map_strategy)(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar); @@ -187,6 +192,8 @@ static struct ntb_hw_info *ntb_get_devic static int ntb_initialize_hw(struct ntb_softc *ntb); static int ntb_setup_xeon(struct ntb_softc *ntb); static int ntb_setup_soc(struct ntb_softc *ntb); +static void configure_soc_secondary_side_bars(struct ntb_softc *ntb); +static void configure_xeon_secondary_side_bars(struct ntb_softc *ntb); static void ntb_handle_heartbeat(void *arg); static void ntb_handle_link_event(struct ntb_softc *ntb, int link_state); static void recover_soc_link(void *arg); @@ -301,8 +308,12 @@ ntb_map_pci_bars(struct ntb_softc *ntb) return rc; ntb->bar_info[NTB_B2B_BAR_2].pci_resource_id = PCIR_BAR(4); - rc = map_pci_bar(ntb, map_memory_window_bar, - &ntb->bar_info[NTB_B2B_BAR_2]); + if (HAS_FEATURE(NTB_REGS_THRU_MW)) + rc = map_pci_bar(ntb, map_mmr_bar, + &ntb->bar_info[NTB_B2B_BAR_2]); + else + rc = map_pci_bar(ntb, map_memory_window_bar, + &ntb->bar_info[NTB_B2B_BAR_2]); if (rc != 0) return rc; @@ -320,7 +331,7 @@ map_pci_bar(struct ntb_softc *ntb, bar_m device_printf(ntb->device, "unable to allocate pci resource\n"); } else { - device_printf(ntb->device, + device_printf(ntb->device, "Bar size = %lx, v %p, p %p\n", bar->size, bar->vbase, (void *)(bar->pbase)); @@ -372,7 +383,7 @@ map_memory_window_bar(struct ntb_softc * * but the PCI driver does not honor the size in this call, so * we have to modify it after the fact. */ - if (HAS_FEATURE(BAR_SIZE_4K)) { + if (HAS_FEATURE(NTB_BAR_SIZE_4K)) { if (bar->pci_resource_id == PCIR_BAR(2)) bar_size_bits = pci_read_config(ntb->device, XEON_PBAR23SZ_OFFSET, 1); @@ -464,7 +475,8 @@ ntb_setup_interrupts(struct ntb_softc *n int_arg = &ntb->db_cb[i]; } else { if (i == num_vectors - 1) { - interrupt_handler = handle_xeon_event_irq; + interrupt_handler = + handle_xeon_event_irq; int_arg = ntb; } else { interrupt_handler = @@ -484,8 +496,8 @@ ntb_setup_interrupts(struct ntb_softc *n } else { ntb->int_info[0].rid = 0; - ntb->int_info[0].res = bus_alloc_resource_any(ntb->device, SYS_RES_IRQ, - &ntb->int_info[0].rid, RF_SHAREABLE|RF_ACTIVE); + ntb->int_info[0].res = bus_alloc_resource_any(ntb->device, + SYS_RES_IRQ, &ntb->int_info[0].rid, RF_SHAREABLE|RF_ACTIVE); interrupt_handler = ntb_handle_legacy_interrupt; if (ntb->int_info[0].res == NULL) { device_printf(ntb->device, @@ -705,10 +717,11 @@ ntb_setup_xeon(struct ntb_softc *ntb) ntb->limits.msix_cnt = XEON_MSIX_CNT; ntb->bits_per_vector = XEON_DB_BITS_PER_VEC; + configure_xeon_secondary_side_bars(ntb); /* Enable Bus Master and Memory Space on the secondary side */ ntb_reg_write(2, ntb->reg_ofs.spci_cmd, PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN); - + /* Enable link training */ ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP); @@ -773,39 +786,7 @@ ntb_setup_soc(struct ntb_softc *ntb) */ pci_write_config(ntb->device, 0xFC, 0x4, 4); - /* - * Some BIOSes aren't filling out the XLAT offsets. - * Check and correct the issue. - */ - if (ntb->dev_type == NTB_DEV_USD) { - if (ntb_reg_read(8, SOC_PBAR2XLAT_OFFSET) == 0) - ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, - SOC_PBAR2XLAT_USD_ADDR); - - if (ntb_reg_read(8, SOC_PBAR4XLAT_OFFSET) == 0) - ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, - SOC_PBAR4XLAT_USD_ADDR); - - if (ntb_reg_read(8, SOC_MBAR23_OFFSET) == 0xC) - ntb_reg_write(8, SOC_MBAR23_OFFSET, SOC_MBAR23_USD_ADDR); - - if (ntb_reg_read(8, SOC_MBAR45_OFFSET) == 0xC) - ntb_reg_write(8, SOC_MBAR45_OFFSET, SOC_MBAR45_USD_ADDR); - } else { - if (ntb_reg_read(8, SOC_PBAR2XLAT_OFFSET) == 0) - ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, - SOC_PBAR2XLAT_DSD_ADDR); - - if (ntb_reg_read(8, SOC_PBAR4XLAT_OFFSET) == 0) - ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, - SOC_PBAR4XLAT_DSD_ADDR); - - if (ntb_reg_read(8, SOC_MBAR23_OFFSET) == 0xC) - ntb_reg_write(8, SOC_MBAR23_OFFSET, SOC_MBAR23_DSD_ADDR); - - if (ntb_reg_read(8, SOC_MBAR45_OFFSET) == 0xC) - ntb_reg_write(8, SOC_MBAR45_OFFSET, SOC_MBAR45_DSD_ADDR); - } + configure_soc_secondary_side_bars(ntb); /* Enable Bus Master and Memory Space on the secondary side */ ntb_reg_write(2, ntb->reg_ofs.spci_cmd, @@ -815,6 +796,52 @@ ntb_setup_soc(struct ntb_softc *ntb) return (0); } +static void +configure_soc_secondary_side_bars(struct ntb_softc *ntb) +{ + + if (ntb->dev_type == NTB_DEV_USD) { + ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, PBAR2XLAT_USD_ADDR); + ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, PBAR4XLAT_USD_ADDR); + ntb_reg_write(8, SOC_MBAR23_OFFSET, MBAR23_USD_ADDR); + ntb_reg_write(8, SOC_MBAR45_OFFSET, MBAR45_USD_ADDR); + } else { + ntb_reg_write(8, SOC_PBAR2XLAT_OFFSET, PBAR2XLAT_DSD_ADDR); + ntb_reg_write(8, SOC_PBAR4XLAT_OFFSET, PBAR4XLAT_DSD_ADDR); + ntb_reg_write(8, SOC_MBAR23_OFFSET, MBAR23_DSD_ADDR); + ntb_reg_write(8, SOC_MBAR45_OFFSET, MBAR45_DSD_ADDR); + } +} + +static void +configure_xeon_secondary_side_bars(struct ntb_softc *ntb) +{ + + if (ntb->dev_type == NTB_DEV_USD) { + ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, PBAR2XLAT_USD_ADDR); + if (HAS_FEATURE(NTB_REGS_THRU_MW)) + ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, + MBAR01_DSD_ADDR); + else + ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, + PBAR4XLAT_USD_ADDR); + ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, MBAR01_USD_ADDR); + ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, MBAR23_USD_ADDR); + ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, MBAR45_USD_ADDR); + } else { + ntb_reg_write(8, XEON_PBAR2XLAT_OFFSET, PBAR2XLAT_DSD_ADDR); + if (HAS_FEATURE(NTB_REGS_THRU_MW)) + ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, + MBAR01_USD_ADDR); + else + ntb_reg_write(8, XEON_PBAR4XLAT_OFFSET, + PBAR4XLAT_DSD_ADDR); + ntb_reg_write(8, XEON_SBAR0BASE_OFFSET, MBAR01_DSD_ADDR); + ntb_reg_write(8, XEON_SBAR2BASE_OFFSET, MBAR23_DSD_ADDR); + ntb_reg_write(8, XEON_SBAR4BASE_OFFSET, MBAR45_DSD_ADDR); + } +} + /* SOC doesn't have link status interrupt, poll on that platform */ static void ntb_handle_heartbeat(void *arg) @@ -1212,7 +1239,10 @@ ntb_write_remote_spad(struct ntb_softc * if (idx >= ntb->limits.max_spads) return (EINVAL); - ntb_reg_write(4, ntb->reg_ofs.spad_remote + idx * 4, val); + if (HAS_FEATURE(NTB_REGS_THRU_MW)) + ntb_mw_write(4, XEON_SHADOW_SPAD_OFFSET + idx * 4, val); + else + ntb_reg_write(4, ntb->reg_ofs.spad_remote + idx * 4, val); return (0); } @@ -1235,7 +1265,10 @@ ntb_read_remote_spad(struct ntb_softc *n if (idx >= ntb->limits.max_spads) return (EINVAL); - *val = ntb_reg_read(4, ntb->reg_ofs.spad_remote + idx * 4); + if (HAS_FEATURE(NTB_REGS_THRU_MW)) + *val = ntb_mw_read(4, XEON_SHADOW_SPAD_OFFSET + idx * 4); + else + *val = ntb_reg_read(4, ntb->reg_ofs.spad_remote + idx * 4); return (0); } @@ -1333,9 +1366,14 @@ ntb_ring_sdb(struct ntb_softc *ntb, unsi if (ntb->type == NTB_SOC) ntb_reg_write(8, ntb->reg_ofs.sdb, (uint64_t) 1 << db); else - ntb_reg_write(2, ntb->reg_ofs.sdb, - ((1 << ntb->bits_per_vector) - 1) << - (db * ntb->bits_per_vector)); + if (HAS_FEATURE(NTB_REGS_THRU_MW)) + ntb_mw_write(2, XEON_SHADOW_PDOORBELL_OFFSET, + ((1 << ntb->bits_per_vector) - 1) << + (db * ntb->bits_per_vector)); + else + ntb_reg_write(2, ntb->reg_ofs.sdb, + ((1 << ntb->bits_per_vector) - 1) << + (db * ntb->bits_per_vector)); } /** Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Thu Sep 5 23:08:22 2013 (r255278) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Thu Sep 5 23:11:11 2013 (r255279) @@ -136,13 +136,19 @@ #define NTB_DEV_DSD 1 #define NTB_DEV_USD 0 -#define SOC_PBAR2XLAT_USD_ADDR 0x0000004000000000 -#define SOC_PBAR4XLAT_USD_ADDR 0x0000008000000000 -#define SOC_MBAR23_USD_ADDR 0x000000410000000c -#define SOC_MBAR45_USD_ADDR 0x000000810000000c -#define SOC_PBAR2XLAT_DSD_ADDR 0x0000004100000000 -#define SOC_PBAR4XLAT_DSD_ADDR 0x0000008100000000 -#define SOC_MBAR23_DSD_ADDR 0x000000400000000c -#define SOC_MBAR45_DSD_ADDR 0x000000800000000c +#define PBAR2XLAT_USD_ADDR 0x0000004000000000 +#define PBAR4XLAT_USD_ADDR 0x0000008000000000 +#define MBAR01_USD_ADDR 0x000000210000000c +#define MBAR23_USD_ADDR 0x000000410000000c +#define MBAR45_USD_ADDR 0x000000810000000c +#define PBAR2XLAT_DSD_ADDR 0x0000004100000000 +#define PBAR4XLAT_DSD_ADDR 0x0000008100000000 +#define MBAR01_DSD_ADDR 0x000000200000000c +#define MBAR23_DSD_ADDR 0x000000400000000c +#define MBAR45_DSD_ADDR 0x000000800000000c + +/* XEON Shadowed MMIO Space */ +#define XEON_SHADOW_PDOORBELL_OFFSET 0x60 +#define XEON_SHADOW_SPAD_OFFSET 0x80 #endif /* _NTB_REGS_H_ */ From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 23:12:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E5B2B5ED; Thu, 5 Sep 2013 23:12:58 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D4AC22739; Thu, 5 Sep 2013 23:12:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85NCwKU085396; Thu, 5 Sep 2013 23:12:58 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85NCwt8085395; Thu, 5 Sep 2013 23:12:58 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052312.r85NCwt8085395@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 23:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255280 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 23:12:59 -0000 Author: carl Date: Thu Sep 5 23:12:58 2013 New Revision: 255280 URL: http://svnweb.freebsd.org/changeset/base/255280 Log: Only tear down interface and transport if they've been successfully setup. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Thu Sep 5 23:11:11 2013 (r255279) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Thu Sep 5 23:12:58 2013 (r255280) @@ -334,14 +334,19 @@ ntb_setup_interface() static int ntb_teardown_interface() { - struct ifnet *ifp = net_softc.ifp; - ntb_transport_link_down(net_softc.qp); + if (net_softc.qp != NULL) + ntb_transport_link_down(net_softc.qp); - ether_ifdetach(ifp); - if_free(ifp); - ntb_transport_free_queue(net_softc.qp); - ntb_transport_free(&net_softc); + if (net_softc.ifp != NULL) { + ether_ifdetach(net_softc.ifp); + if_free(net_softc.ifp); + } + + if (net_softc.qp != NULL) { + ntb_transport_free_queue(net_softc.qp); + ntb_transport_free(&net_softc); + } return (0); } From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 23:14:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B8041754; Thu, 5 Sep 2013 23:14:28 +0000 (UTC) (envelope-from carl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C9AC2743; Thu, 5 Sep 2013 23:14:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85NESbG086198; Thu, 5 Sep 2013 23:14:28 GMT (envelope-from carl@svn.freebsd.org) Received: (from carl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85NESqC086196; Thu, 5 Sep 2013 23:14:28 GMT (envelope-from carl@svn.freebsd.org) Message-Id: <201309052314.r85NESqC086196@svn.freebsd.org> From: Carl Delsey Date: Thu, 5 Sep 2013 23:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255281 - in head/sys/dev/ntb: if_ntb ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 23:14:28 -0000 Author: carl Date: Thu Sep 5 23:14:27 2013 New Revision: 255281 URL: http://svnweb.freebsd.org/changeset/base/255281 Log: Remove contractions. Approved by: jimharris Sponsored by: Intel Modified: head/sys/dev/ntb/if_ntb/if_ntb.c head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Thu Sep 5 23:12:58 2013 (r255280) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Thu Sep 5 23:14:27 2013 (r255281) @@ -104,7 +104,7 @@ struct ntb_transport_qp { bool client_ready; bool qp_link; - uint8_t qp_num; /* Only 64 QP's are allowed. 0-63 */ + uint8_t qp_num; /* Only 64 QPs are allowed. 0-63 */ struct ntb_rx_info *rx_info; struct ntb_rx_info *remote_rx_info; @@ -297,7 +297,7 @@ ntb_setup_interface() net_softc.ntb = devclass_get_softc(devclass_find("ntb_hw"), 0); if (net_softc.ntb == NULL) { - printf("ntb: Can't find devclass\n"); + printf("ntb: Cannot find devclass\n"); return (ENXIO); } @@ -410,7 +410,7 @@ ntb_start(struct ifnet *ifp) m_length(m_head, NULL)); if (rc != 0) { CTR1(KTR_NTB, - "TX: couldn't tx mbuf %p. Returning to snd q", + "TX: could not tx mbuf %p. Returning to snd q", m_head); if (rc == EAGAIN) { ifp->if_drv_flags |= IFF_DRV_OACTIVE; @@ -505,7 +505,7 @@ ntb_transport_free(void *transport) callout_drain(&nt->link_work); - /* verify that all the qp's are freed */ + /* verify that all the qps are freed */ for (i = 0; i < nt->max_qps; i++) if (!test_bit(i, &nt->qp_bitmap)) ntb_transport_free_queue(&nt->qps[i]); @@ -719,7 +719,7 @@ ntb_transport_tx_enqueue(struct ntb_tran entry = ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q); if (entry == NULL) { - CTR0(KTR_NTB, "TX: couldn't get entry from tx_free_q"); + CTR0(KTR_NTB, "TX: could not get entry from tx_free_q"); return (ENOMEM); } CTR1(KTR_NTB, "TX: got entry %p from tx_free_q", entry); Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:12:58 2013 (r255280) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Thu Sep 5 23:14:27 2013 (r255281) @@ -842,7 +842,7 @@ configure_xeon_secondary_side_bars(struc } } -/* SOC doesn't have link status interrupt, poll on that platform */ +/* SOC does not have link status interrupt, poll on that platform */ static void ntb_handle_heartbeat(void *arg) { @@ -935,7 +935,7 @@ ntb_handle_link_event(struct ntb_softc * device_printf(ntb->device, "Link Down\n"); ntb->link_status = NTB_LINK_DOWN; event = NTB_EVENT_HW_LINK_DOWN; - /* Don't modify link width/speed, we need it in link recovery */ + /* Do not modify link width/speed, we need it in link recovery */ } /* notify the upper layer if we have an event change */ From owner-svn-src-head@FreeBSD.ORG Thu Sep 5 23:28:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 884F9A2E; Thu, 5 Sep 2013 23:28:51 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7506727C3; Thu, 5 Sep 2013 23:28:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r85NSppi093391; Thu, 5 Sep 2013 23:28:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r85NSpkK093390; Thu, 5 Sep 2013 23:28:51 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309052328.r85NSpkK093390@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 5 Sep 2013 23:28:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255282 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2013 23:28:51 -0000 Author: nwhitehorn Date: Thu Sep 5 23:28:50 2013 New Revision: 255282 URL: http://svnweb.freebsd.org/changeset/base/255282 Log: Also align the 32-bit PowerPC stacks. Modified: head/sys/powerpc/include/frame.h Modified: head/sys/powerpc/include/frame.h ============================================================================== --- head/sys/powerpc/include/frame.h Thu Sep 5 23:14:27 2013 (r255281) +++ head/sys/powerpc/include/frame.h Thu Sep 5 23:28:50 2013 (r255282) @@ -103,6 +103,7 @@ struct callframe { register_t cf_func; register_t cf_arg0; register_t cf_arg1; + register_t _padding; /* Maintain 16-byte alignment */ }; #endif From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 02:34:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3109A342; Fri, 6 Sep 2013 02:34:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1DE562EA8; Fri, 6 Sep 2013 02:34:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r862YYtQ004948; Fri, 6 Sep 2013 02:34:34 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r862YY2L004947; Fri, 6 Sep 2013 02:34:34 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201309060234.r862YY2L004947@svn.freebsd.org> From: Rick Macklem Date: Fri, 6 Sep 2013 02:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255284 - head/sys/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 02:34:35 -0000 Author: rmacklem Date: Fri Sep 6 02:34:34 2013 New Revision: 255284 URL: http://svnweb.freebsd.org/changeset/base/255284 Log: It was reported via email that the cu_sent field used by the krpc client side UDP was observed as way out of range and caused the rpc.lockd daemon to hang trying to do an RPC. Inspection of the code found two places where the RPC request is re-queued, but the value of cu_sent was not incremented. Since cu_sent is always decremented when the RPC request is dequeued, I think this could have caused cu_sent to go out of range. This patch adds lines to increment cu_sent for these two cases. Reported by: dwhite@ixsystems.com Discussed with: dwhite@ixsystems.com MFC after: 2 weeks Modified: head/sys/rpc/clnt_dg.c Modified: head/sys/rpc/clnt_dg.c ============================================================================== --- head/sys/rpc/clnt_dg.c Fri Sep 6 00:40:14 2013 (r255283) +++ head/sys/rpc/clnt_dg.c Fri Sep 6 02:34:34 2013 (r255284) @@ -682,6 +682,7 @@ get_reply: next_sendtime += retransmit_time; goto send_again; } + cu->cu_sent += CWNDSCALE; TAILQ_INSERT_TAIL(&cs->cs_pending, cr, cr_link); } @@ -733,6 +734,7 @@ got_reply: */ XDR_DESTROY(&xdrs); mtx_lock(&cs->cs_lock); + cu->cu_sent += CWNDSCALE; TAILQ_INSERT_TAIL(&cs->cs_pending, cr, cr_link); cr->cr_mrep = NULL; From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 02:55:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3D3275BF; Fri, 6 Sep 2013 02:55:52 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 105662F52; Fri, 6 Sep 2013 02:55:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r862tpvt016924; Fri, 6 Sep 2013 02:55:51 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r862tptD016923; Fri, 6 Sep 2013 02:55:51 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201309060255.r862tptD016923@svn.freebsd.org> From: "Simon J. Gerraty" Date: Fri, 6 Sep 2013 02:55:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255285 - head/contrib/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 02:55:52 -0000 Author: sjg Date: Fri Sep 6 02:55:51 2013 New Revision: 255285 URL: http://svnweb.freebsd.org/changeset/base/255285 Log: If MAKE_JOB_ERROR_TOKEN is set to false, do not put an error token ("E") into the job queue. This avoids closing down an entire build on failure of one branch. Probably has no use outside the context of universe/tinderbox. Reviewed by: obrien Modified: head/contrib/bmake/job.c Modified: head/contrib/bmake/job.c ============================================================================== --- head/contrib/bmake/job.c Fri Sep 6 02:34:34 2013 (r255284) +++ head/contrib/bmake/job.c Fri Sep 6 02:55:51 2013 (r255285) @@ -178,6 +178,14 @@ __RCSID("$NetBSD: job.c,v 1.176 2013/08/ */ #define MAKE_ALWAYS_PASS_JOB_QUEUE ".MAKE.ALWAYS_PASS_JOB_QUEUE" static int Always_pass_job_queue = TRUE; +/* + * FreeBSD: aborting entire parallel make isn't always + * desired. When doing tinderbox for example, failure of + * one architecture should not stop all. + * We still want to bail on interrupt though. + */ +#define MAKE_JOB_ERROR_TOKEN "MAKE_JOB_ERROR_TOKEN" +static int Job_error_token = TRUE; /* * error handling variables @@ -2237,6 +2245,9 @@ Job_Init(void) Always_pass_job_queue = getBoolean(MAKE_ALWAYS_PASS_JOB_QUEUE, Always_pass_job_queue); + Job_error_token = getBoolean(MAKE_JOB_ERROR_TOKEN, Job_error_token); + + /* * There is a non-zero chance that we already have children. * eg after 'make -f- < Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 46F1F6F8; Fri, 6 Sep 2013 02:57:16 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 334A62F58; Fri, 6 Sep 2013 02:57:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r862vG0m017646; Fri, 6 Sep 2013 02:57:16 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r862vGBf017645; Fri, 6 Sep 2013 02:57:16 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201309060257.r862vGBf017645@svn.freebsd.org> From: "Simon J. Gerraty" Date: Fri, 6 Sep 2013 02:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255286 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 02:57:16 -0000 Author: sjg Date: Fri Sep 6 02:57:15 2013 New Revision: 255286 URL: http://svnweb.freebsd.org/changeset/base/255286 Log: During universe/tinderbox export MAKE_JOB_ERROR_TOKEN=no This avoids aborting everything when one kernel fails. Reviewed by: obrien Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Fri Sep 6 02:55:51 2013 (r255285) +++ head/Makefile Fri Sep 6 02:57:15 2013 (r255286) @@ -498,3 +498,11 @@ universe_epilogue: buildLINT: ${MAKE} -C ${.CURDIR}/sys/${_TARGET}/conf LINT + +.if defined(.PARSEDIR) +.if make(universe) +# we do not want a failure of one branch abort all. +MAKE_JOB_ERROR_TOKEN= no +.export MAKE_JOB_ERROR_TOKEN +.endif +.endif From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 04:43:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id D0CC3709; Fri, 6 Sep 2013 04:43:54 +0000 (UTC) Date: Fri, 6 Sep 2013 04:43:54 +0000 From: Alexey Dokuchaev To: Pawel Jakub Dawidek Subject: Re: svn commit: r255219 - in head: contrib/tcpdump lib/libc lib/libc/capability lib/libc/include lib/libc/sys lib/libprocstat sbin/dhclient sbin/hastd sys/amd64/linux32 sys/bsm sys/cddl/compat/opensola... Message-ID: <20130906044354.GA26806@FreeBSD.org> References: <201309050009.r8509vsE061271@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201309050009.r8509vsE061271@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 04:43:54 -0000 On Thu, Sep 05, 2013 at 12:09:57AM +0000, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Thu Sep 5 00:09:56 2013 > New Revision: 255219 > URL: http://svnweb.freebsd.org/changeset/base/255219 > > Log: > Change the cap_rights_t type from uint64_t to a structure that we can extend > in the future in a backward compatible (API and ABI) way. > > The cap_rights_t represents capability rights. We used to use one bit to > represent one right, but we are running out of spare bits. Currently the new > structure provides place for 114 rights (so 50 more than the previous > cap_rights_t), but it is possible to grow the structure to hold at least 285 > rights, although we can make it even larger if 285 rights won't be enough. > > The structure definition looks like this: > > struct cap_rights { > uint64_t cr_rights[CAP_RIGHTS_VERSION + 2]; > }; I believe this commit broke nvidia-driver. Fix is trivial; however, I would have to use OSVERSION from Sep 3rd, since you forgot to update sys/param.h. ./danfe From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 05:16:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B8149DC1; Fri, 6 Sep 2013 05:16:11 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A5AC8265E; Fri, 6 Sep 2013 05:16:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r865GB44001243; Fri, 6 Sep 2013 05:16:11 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r865GBEw001241; Fri, 6 Sep 2013 05:16:11 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309060516.r865GBEw001241@svn.freebsd.org> From: Peter Grehan Date: Fri, 6 Sep 2013 05:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255287 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 05:16:11 -0000 Author: grehan Date: Fri Sep 6 05:16:10 2013 New Revision: 255287 URL: http://svnweb.freebsd.org/changeset/base/255287 Log: Allow CPUID leaf 0xD to be read as zeroes. Linux reads this even though extended features aren't exposed. Support for 0xD will be expanded once AVX[2] is exposed to the guest in upcoming work. Modified: head/sys/amd64/vmm/x86.c head/sys/amd64/vmm/x86.h Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Fri Sep 6 02:57:15 2013 (r255286) +++ head/sys/amd64/vmm/x86.c Fri Sep 6 05:16:10 2013 (r255287) @@ -200,6 +200,7 @@ x86_emulate_cpuid(struct vm *vm, int vcp case CPUID_0000_0006: case CPUID_0000_0007: case CPUID_0000_000A: + case CPUID_0000_000D: /* * Handle the access, but report 0 for * all options Modified: head/sys/amd64/vmm/x86.h ============================================================================== --- head/sys/amd64/vmm/x86.h Fri Sep 6 02:57:15 2013 (r255286) +++ head/sys/amd64/vmm/x86.h Fri Sep 6 05:16:10 2013 (r255287) @@ -38,6 +38,7 @@ #define CPUID_0000_0007 (0x7) #define CPUID_0000_000A (0xA) #define CPUID_0000_000B (0xB) +#define CPUID_0000_000D (0xD) #define CPUID_8000_0000 (0x80000000) #define CPUID_8000_0001 (0x80000001) #define CPUID_8000_0002 (0x80000002) From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 05:20:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8C9F9F6A; Fri, 6 Sep 2013 05:20:12 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 79FBA2693; Fri, 6 Sep 2013 05:20:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r865KCtW003044; Fri, 6 Sep 2013 05:20:12 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r865KCAN003040; Fri, 6 Sep 2013 05:20:12 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309060520.r865KCAN003040@svn.freebsd.org> From: Peter Grehan Date: Fri, 6 Sep 2013 05:20:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255288 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 05:20:12 -0000 Author: grehan Date: Fri Sep 6 05:20:11 2013 New Revision: 255288 URL: http://svnweb.freebsd.org/changeset/base/255288 Log: Emulate reading of the IA32_MISC_ENABLE MSR, by returning the host MSR and masking off features that aren't supported. Linux reads this MSR to detect if NX has been disabled via BIOS. Modified: head/sys/amd64/vmm/vmm_msr.c Modified: head/sys/amd64/vmm/vmm_msr.c ============================================================================== --- head/sys/amd64/vmm/vmm_msr.c Fri Sep 6 05:16:10 2013 (r255287) +++ head/sys/amd64/vmm/vmm_msr.c Fri Sep 6 05:20:11 2013 (r255288) @@ -57,6 +57,7 @@ static struct vmm_msr vmm_msr[] = { { MSR_PAT, VMM_MSR_F_EMULATE | VMM_MSR_F_INVALID }, { MSR_BIOS_SIGN,VMM_MSR_F_EMULATE }, { MSR_MCG_CAP, VMM_MSR_F_EMULATE | VMM_MSR_F_READONLY }, + { MSR_IA32_MISC_ENABLE, VMM_MSR_F_EMULATE | VMM_MSR_F_READONLY }, }; #define vmm_msr_num (sizeof(vmm_msr) / sizeof(vmm_msr[0])) @@ -91,7 +92,7 @@ void guest_msrs_init(struct vm *vm, int cpu) { int i; - uint64_t *guest_msrs; + uint64_t *guest_msrs, misc; guest_msrs = vm_guest_msrs(vm, cpu); @@ -115,6 +116,20 @@ guest_msrs_init(struct vm *vm, int cpu) PAT_VALUE(6, PAT_UNCACHED) | PAT_VALUE(7, PAT_UNCACHEABLE); break; + case MSR_IA32_MISC_ENABLE: + misc = rdmsr(MSR_IA32_MISC_ENABLE); + /* + * Set mandatory bits + * 11: branch trace disabled + * 12: PEBS unavailable + * Clear unsupported features + * 16: SpeedStep enable + * 18: enable MONITOR FSM + */ + misc |= (1 << 12) | (1 << 11); + misc &= ~((1 << 18) | (1 << 16)); + guest_msrs[i] = misc; + break; default: panic("guest_msrs_init: missing initialization for msr " "0x%0x", vmm_msr[i].num); From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 05:37:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 780F42E5; Fri, 6 Sep 2013 05:37:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 55D3C272F; Fri, 6 Sep 2013 05:37:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r865bpUN013510; Fri, 6 Sep 2013 05:37:51 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r865boJN013504; Fri, 6 Sep 2013 05:37:50 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309060537.r865boJN013504@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 6 Sep 2013 05:37:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255289 - in head/sys: amd64/amd64 amd64/include ia64/ia64 ia64/include mips/include mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 05:37:51 -0000 Author: glebius Date: Fri Sep 6 05:37:49 2013 New Revision: 255289 URL: http://svnweb.freebsd.org/changeset/base/255289 Log: On those machines, where sf_bufs do not represent any real object, make sf_buf_alloc()/sf_buf_free() inlines, to save two calls to an absolutely empty functions. Reviewed by: alc, kib, scottl Sponsored by: Nginx, Inc. Sponsored by: Netflix Modified: head/sys/amd64/amd64/vm_machdep.c head/sys/amd64/include/sf_buf.h head/sys/ia64/ia64/vm_machdep.c head/sys/ia64/include/sf_buf.h head/sys/mips/include/sf_buf.h head/sys/mips/mips/vm_machdep.c Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Fri Sep 6 05:20:11 2013 (r255288) +++ head/sys/amd64/amd64/vm_machdep.c Fri Sep 6 05:37:49 2013 (r255289) @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -695,27 +694,6 @@ cpu_reset_real() } /* - * Allocate an sf_buf for the given vm_page. On this machine, however, there - * is no sf_buf object. Instead, an opaque pointer to the given vm_page is - * returned. - */ -struct sf_buf * -sf_buf_alloc(struct vm_page *m, int pri) -{ - - return ((struct sf_buf *)m); -} - -/* - * Free the sf_buf. In fact, do nothing because there are no resources - * associated with the sf_buf. - */ -void -sf_buf_free(struct sf_buf *sf) -{ -} - -/* * Software interrupt handler for queued VM system processing. */ void Modified: head/sys/amd64/include/sf_buf.h ============================================================================== --- head/sys/amd64/include/sf_buf.h Fri Sep 6 05:20:11 2013 (r255288) +++ head/sys/amd64/include/sf_buf.h Fri Sep 6 05:37:49 2013 (r255289) @@ -41,6 +41,18 @@ */ struct sf_buf; +static inline struct sf_buf * +sf_buf_alloc(struct vm_page *m, int pri) +{ + + return ((struct sf_buf *)m); +} + +static inline void +sf_buf_free(struct sf_buf *sf) +{ +} + static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { Modified: head/sys/ia64/ia64/vm_machdep.c ============================================================================== --- head/sys/ia64/ia64/vm_machdep.c Fri Sep 6 05:20:11 2013 (r255288) +++ head/sys/ia64/ia64/vm_machdep.c Fri Sep 6 05:37:49 2013 (r255289) @@ -79,7 +79,6 @@ #include #include #include -#include #include #include @@ -353,27 +352,6 @@ cpu_exit(struct thread *td) } /* - * Allocate an sf_buf for the given vm_page. On this machine, however, there - * is no sf_buf object. Instead, an opaque pointer to the given vm_page is - * returned. - */ -struct sf_buf * -sf_buf_alloc(struct vm_page *m, int pri) -{ - - return ((struct sf_buf *)m); -} - -/* - * Free the sf_buf. In fact, do nothing because there are no resources - * associated with the sf_buf. - */ -void -sf_buf_free(struct sf_buf *sf) -{ -} - -/* * Software interrupt handler for queued VM system processing. */ void Modified: head/sys/ia64/include/sf_buf.h ============================================================================== --- head/sys/ia64/include/sf_buf.h Fri Sep 6 05:20:11 2013 (r255288) +++ head/sys/ia64/include/sf_buf.h Fri Sep 6 05:37:49 2013 (r255289) @@ -41,6 +41,18 @@ */ struct sf_buf; +static inline struct sf_buf * +sf_buf_alloc(struct vm_page *m, int pri) +{ + + return ((struct sf_buf *)m); +} + +static inline void +sf_buf_free(struct sf_buf *sf) +{ +} + static __inline vm_page_t sf_buf_page(struct sf_buf *sf) { Modified: head/sys/mips/include/sf_buf.h ============================================================================== --- head/sys/mips/include/sf_buf.h Fri Sep 6 05:20:11 2013 (r255288) +++ head/sys/mips/include/sf_buf.h Fri Sep 6 05:37:49 2013 (r255289) @@ -41,6 +41,18 @@ /* In 64 bit the whole memory is directly mapped */ struct sf_buf; +static inline struct sf_buf * +sf_buf_alloc(struct vm_page *m, int pri) +{ + + return ((struct sf_buf *)m); +} + +static inline void +sf_buf_free(struct sf_buf *sf) +{ +} + static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Fri Sep 6 05:20:11 2013 (r255288) +++ head/sys/mips/mips/vm_machdep.c Fri Sep 6 05:37:49 2013 (r255289) @@ -76,7 +76,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef __mips_n64 #include +#endif #ifndef NSFBUFS #define NSFBUFS (512 + maxusers * 16) @@ -523,7 +525,6 @@ sf_buf_init(void *arg) } sf_buf_alloc_want = 0; } -#endif /* * Get an sf_buf from the freelist. Will block if none are available. @@ -531,7 +532,6 @@ sf_buf_init(void *arg) struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags) { -#ifndef __mips_n64 struct sf_buf *sf; int error; @@ -560,9 +560,6 @@ sf_buf_alloc(struct vm_page *m, int flag } mtx_unlock(&sf_freelist.sf_lock); return (sf); -#else - return ((struct sf_buf *)m); -#endif } /* @@ -571,7 +568,6 @@ sf_buf_alloc(struct vm_page *m, int flag void sf_buf_free(struct sf_buf *sf) { -#ifndef __mips_n64 pmap_qremove(sf->kva, 1); mtx_lock(&sf_freelist.sf_lock); SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list); @@ -579,8 +575,8 @@ sf_buf_free(struct sf_buf *sf) if (sf_buf_alloc_want > 0) wakeup(&sf_freelist); mtx_unlock(&sf_freelist.sf_lock); -#endif } +#endif /* !__mips_n64 */ /* * Software interrupt handler for queued VM system processing. From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 05:38:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 57509444; Fri, 6 Sep 2013 05:38:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 44CC82736; Fri, 6 Sep 2013 05:38:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r865cLCe013686; Fri, 6 Sep 2013 05:38:21 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r865cLUd013685; Fri, 6 Sep 2013 05:38:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309060538.r865cLUd013685@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 6 Sep 2013 05:38:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255290 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 05:38:21 -0000 Author: glebius Date: Fri Sep 6 05:38:20 2013 New Revision: 255290 URL: http://svnweb.freebsd.org/changeset/base/255290 Log: Fix build. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Fri Sep 6 05:37:49 2013 (r255289) +++ head/sys/conf/files.mips Fri Sep 6 05:38:20 2013 (r255290) @@ -56,6 +56,7 @@ libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard libkern/memmove.c standard +libkern/cmpdi2.c optional mips | mipsel libkern/ucmpdi2.c optional mips | mipsel # cfe support From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 05:42:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 53E7C58A; Fri, 6 Sep 2013 05:42:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E5F2B2766; Fri, 6 Sep 2013 05:42:02 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r865fvZj045004; Fri, 6 Sep 2013 08:41:57 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r865fvZj045004 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r865fvP2045003; Fri, 6 Sep 2013 08:41:57 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 6 Sep 2013 08:41:57 +0300 From: Konstantin Belousov To: Gleb Smirnoff Subject: Re: svn commit: r255246 - head/sys/sys Message-ID: <20130906054157.GZ41229@kib.kiev.ua> References: <201309051346.r85DkU6U045151@svn.freebsd.org> <20130905140319.GX41229@kib.kiev.ua> <20130905144439.GD4574@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SnACAX3oZLWUNEDt" Content-Disposition: inline In-Reply-To: <20130905144439.GD4574@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 05:42:03 -0000 --SnACAX3oZLWUNEDt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 05, 2013 at 06:44:39PM +0400, Gleb Smirnoff wrote: > On Thu, Sep 05, 2013 at 05:03:19PM +0300, Konstantin Belousov wrote: > K> On Thu, Sep 05, 2013 at 01:46:30PM +0000, Gleb Smirnoff wrote: > K> > Author: glebius > K> > Date: Thu Sep 5 13:46:30 2013 > K> > New Revision: 255246 > K> > URL: http://svnweb.freebsd.org/changeset/base/255246 > K> >=20 > K> > Log: > K> > Fix build. > K> > counter.h requires systm.h > K> >=20 > K> > Modified: > K> > head/sys/sys/sf_buf.h > K> >=20 > K> > Modified: head/sys/sys/sf_buf.h > K> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > K> > --- head/sys/sys/sf_buf.h Thu Sep 5 12:56:08 2013 (r255245) > K> > +++ head/sys/sys/sf_buf.h Thu Sep 5 13:46:30 2013 (r255246) > K> > @@ -54,6 +54,7 @@ struct sfstat { /* sendfile statistic > K> > =20 > K> > #ifdef _KERNEL > K> > #include > K> > +#include > K> > #include > K> > struct mbuf; /* for sf_buf_mext() */ > K> > =20 > K> IMO the counter.h (and sfstat, SFSTAT_INC) should be removed from the = sf_buf.h. >=20 > The problem is that SFSTAT_INC() is used in MD code. Then MD code should start including additional header. This is probably some amount of work, but the current situation is not acceptable. sf buffers have overgrown the 'sendfile buffers' use case for long time. --SnACAX3oZLWUNEDt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSKWskAAoJEJDCuSvBvK1BooQP+QGa35k3vPFlyZKxZfdVOWzo eVVgN3lA2q4S0ZMI3I0pd3Ap/bH9wV3QtoJu9Nyapwg8ESSDtkKg0SyF7RyY6uNF au//JnjA0X7pERC1bS/enXoTZmg4KBLoR2Sg24SH1MOjw0rq0kgd6oJ+VME121wz w4BhlvYSnyF7uF5kTnvowf+rmYUD+ztdLMMpFmGNlQBzKy7CMNz5QNFV3pevzM35 ONTWTCVgP4/Yxjwp6aOKWebW3FfhM4jKzPUlRkorez323eNzEeXn1eyXLe70aeIT 4KkOZCiMAvf8snVOnTggWuFbHkVleO26DRcmt5eLJdeiJFB41CHmU0wDA/RwqzpC 7fvuialpleuHhOxRxeoiKdCOOKrfnmvjw/DUC7tFZDLC/HxEeix02n5Tmk58/W+J HHTbv2BK3UJFU0Lv6bCYIqODF0uC0meT/EphhfFppkgGb7l8RBMp4jC3nTjqakLP QERciRlZy2NE4TJ+g1OZJBERUM350T2ZTGCmrAbOc2nWobbld4bvOTWIFfIIckRJ R4YxSviQjWUIyqworYMPY9RJuzNcXiOsGMM3Bui4sqtMjAbltsp524bsJlY9kOuN QR7UE36sAla4qEH6etYpiwlHwX0AlCrsRcZJiaebypufcxl1h3KCj6qzvSHavxRH cosi8rMNJ2YwZPXwWYeP =m9e6 -----END PGP SIGNATURE----- --SnACAX3oZLWUNEDt-- From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 05:55:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B29FFA0A; Fri, 6 Sep 2013 05:55:43 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A006F27ED; Fri, 6 Sep 2013 05:55:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r865thDI024571; Fri, 6 Sep 2013 05:55:43 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r865thPS024570; Fri, 6 Sep 2013 05:55:43 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309060555.r865thPS024570@svn.freebsd.org> From: Peter Grehan Date: Fri, 6 Sep 2013 05:55:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255292 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 05:55:43 -0000 Author: grehan Date: Fri Sep 6 05:55:43 2013 New Revision: 255292 URL: http://svnweb.freebsd.org/changeset/base/255292 Log: Allow level-triggered interrupt sources. While this isn't precisely emulated, it is good enough for the single consumer i.e. irq4, the serial port on Linux. Modified: head/usr.sbin/bhyve/ioapic.c Modified: head/usr.sbin/bhyve/ioapic.c ============================================================================== --- head/usr.sbin/bhyve/ioapic.c Fri Sep 6 05:55:02 2013 (r255291) +++ head/usr.sbin/bhyve/ioapic.c Fri Sep 6 05:55:43 2013 (r255292) @@ -101,13 +101,13 @@ ioapic_set_pinstate(struct vmctx *ctx, i * XXX * We only deal with: * - edge triggered interrupts - * - physical destination mode * - fixed delivery mode + * Level-triggered sources will work so long as their is + * no sharing. */ low = ioapic->redtbl[pin]; high = ioapic->redtbl[pin] >> 32; if ((low & IOART_INTMASK) == IOART_INTMCLR && - (low & IOART_TRGRMOD) == IOART_TRGREDG && (low & IOART_DESTMOD) == IOART_DESTPHY && (low & IOART_DELMOD) == IOART_DELFIXED) { vector = low & IOART_INTVEC; From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 05:58:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3FF86B65; Fri, 6 Sep 2013 05:58:11 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2D3E72801; Fri, 6 Sep 2013 05:58:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r865wBHN025346; Fri, 6 Sep 2013 05:58:11 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r865wBpc025345; Fri, 6 Sep 2013 05:58:11 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309060558.r865wBpc025345@svn.freebsd.org> From: Peter Grehan Date: Fri, 6 Sep 2013 05:58:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255293 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 05:58:11 -0000 Author: grehan Date: Fri Sep 6 05:58:10 2013 New Revision: 255293 URL: http://svnweb.freebsd.org/changeset/base/255293 Log: Fix spelling. Modified: head/usr.sbin/bhyve/ioapic.c Modified: head/usr.sbin/bhyve/ioapic.c ============================================================================== --- head/usr.sbin/bhyve/ioapic.c Fri Sep 6 05:55:43 2013 (r255292) +++ head/usr.sbin/bhyve/ioapic.c Fri Sep 6 05:58:10 2013 (r255293) @@ -102,7 +102,7 @@ ioapic_set_pinstate(struct vmctx *ctx, i * We only deal with: * - edge triggered interrupts * - fixed delivery mode - * Level-triggered sources will work so long as their is + * Level-triggered sources will work so long as there is * no sharing. */ low = ioapic->redtbl[pin]; From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 07:58:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C1DEFD1E; Fri, 6 Sep 2013 07:58:24 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AF3F22389; Fri, 6 Sep 2013 07:58:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r867wOAH098898; Fri, 6 Sep 2013 07:58:24 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r867wO6p098895; Fri, 6 Sep 2013 07:58:24 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201309060758.r867wO6p098895@svn.freebsd.org> From: David Chisnall Date: Fri, 6 Sep 2013 07:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255294 - in head/lib/msun: . src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 07:58:24 -0000 Author: theraven Date: Fri Sep 6 07:58:23 2013 New Revision: 255294 URL: http://svnweb.freebsd.org/changeset/base/255294 Log: Add stub implementations of the missing C++11 math functions. These are weak and so can be replaced by other versions in applications that choose to do so, and will give a linker warning when used so that applications that rely on the extra precision can avoid them. Note that since the C/C++ specs only guarantee that long double has precision equal to double, code that actually relies on these functions having greater precision is unportable at best and broken at worst. Added: head/lib/msun/src/imprecise.c (contents, props changed) Modified: head/lib/msun/Makefile head/lib/msun/Symbol.map Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Fri Sep 6 05:58:10 2013 (r255293) +++ head/lib/msun/Makefile Fri Sep 6 07:58:23 2013 (r255294) @@ -53,6 +53,7 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c e_pow.c e_powf.c e_rem_pio2.c \ e_rem_pio2f.c e_remainder.c e_remainderf.c e_scalb.c e_scalbf.c \ e_sinh.c e_sinhf.c e_sqrt.c e_sqrtf.c fenv.c \ + imprecise.c \ k_cos.c k_cosf.c k_exp.c k_expf.c k_rem_pio2.c k_sin.c k_sinf.c \ k_tan.c k_tanf.c \ s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_carg.c s_cargf.c s_cargl.c \ Modified: head/lib/msun/Symbol.map ============================================================================== --- head/lib/msun/Symbol.map Fri Sep 6 05:58:10 2013 (r255293) +++ head/lib/msun/Symbol.map Fri Sep 6 07:58:23 2013 (r255294) @@ -270,4 +270,13 @@ FBSD_1.3 { log1pl; log2l; logl; + # Implemented as weak aliases for imprecise versions + coshl; + erfcl; + erfl; + lgammal; + powl; + sinhl; + tanhl; + tgammal; }; Added: head/lib/msun/src/imprecise.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/imprecise.c Fri Sep 6 07:58:23 2013 (r255294) @@ -0,0 +1,69 @@ +/*- + * Copyright (c) 2013 David Chisnall + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include + +/* + * If long double is not the same size as double, then these will lose + * precision and we should emit a warning whenever something links against + * them. + */ +#if (LDBL_MANT_DIG > 53) +#define WARN_IMPRECISE(x) \ + __warn_references(x, # x " has lower than advertised precision"); +#else +#define WARN_IMPRECISE(x) +#endif +/* + * Declare the functions as weak variants so that other libraries providing + * real versions can override them. + */ +#define DECLARE_WEAK(x)\ + __weak_reference(imprecise_## x, x);\ + WARN_IMPRECISE(x) + +long double +imprecise_powl(long double x, long double y) +{ + + return pow(x, y); +} +DECLARE_WEAK(powl); + +#define DECLARE_IMPRECISE(f) \ + long double imprecise_ ## f ## l(long double v) { return f(v); }\ + DECLARE_WEAK(f ## l) + +DECLARE_IMPRECISE(cosh); +DECLARE_IMPRECISE(erfc); +DECLARE_IMPRECISE(erf); +DECLARE_IMPRECISE(lgamma); +DECLARE_IMPRECISE(sinh); +DECLARE_IMPRECISE(tanh); +DECLARE_IMPRECISE(tgamma); From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 08:01:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5D9ABF41; Fri, 6 Sep 2013 08:01:16 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 223E12408; Fri, 6 Sep 2013 08:01:16 +0000 (UTC) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=[192.168.1.176]) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VHqyf-000AWU-Aq; Fri, 06 Sep 2013 10:01:13 +0200 Message-ID: <52298BCA.7040602@FreeBSD.org> Date: Fri, 06 Sep 2013 10:01:14 +0200 From: =?ISO-8859-15?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r254882 - head/sys/dev/pci References: <201308251809.r7PI9CsE052978@svn.freebsd.org> <201308301644.36750.jhb@freebsd.org> <52219DAE.9010707@FreeBSD.org> <201309031410.46052.jhb@freebsd.org> In-Reply-To: <201309031410.46052.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 08:01:16 -0000 Le 03/09/2013 20:10, John Baldwin a écrit : > Yes, orm0 is eating it. Try this along with using RF_SHAREABLE in your > call to BUS_ALLOC_RESOURCE(): > > Index: x86/isa/orm.c > (...) > - res = bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, 0); > + res = bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, > + RF_SHAREABLE); I tried this patch + RF_SHAREABLE in vga_pci.c but without success. In the call to BUS_ALLOC_RESOURCE in vga_pci.c, I tried with various "parents"/"grand-parents" but it always returns NULL. -- Jean-Sébastien Pédron From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 08:58:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 570F018D; Fri, 6 Sep 2013 08:58:47 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (mail.vlakno.cz [178.238.39.38]) by mx1.freebsd.org (Postfix) with ESMTP id 174122AFC; Fri, 6 Sep 2013 08:58:46 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id D5D411CC5618; Fri, 6 Sep 2013 10:53:01 +0200 (CEST) Date: Fri, 6 Sep 2013 10:53:01 +0200 From: Roman Divacky To: Nathan Whitehorn Subject: Re: svn commit: r255273 - in head/sys/powerpc: aim include Message-ID: <20130906085301.GA44778@freebsd.org> References: <201309052300.r85N0OLX076496@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201309052300.r85N0OLX076496@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 08:58:47 -0000 On Thu, Sep 05, 2013 at 11:00:24PM +0000, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Thu Sep 5 23:00:24 2013 > New Revision: 255273 > URL: http://svnweb.freebsd.org/changeset/base/255273 > > Log: > Align stacks of kernel threads correctly at 16-byte boundaries rather than > making sure they are all misaligned at +8 bytes. This fixes clang builds > of powerpc64 kernels (aside from a required increase in KSTACK_PAGES which > will come later). > > This commit from FreeBSD/powerpc64 with a clang-built kernel. The increased KSTACK_PAGES is needed because the kernel you're using is built with O0. I suppose O2 kernel will be fine. Needs to be tested. Anyway, this is a great step forward and I believe PowerPC64 is basically ready to be compiled with clang instead of gcc :) Congrats! Roman From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 09:08:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2B8DE4A2; Fri, 6 Sep 2013 09:08:42 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 17E632BA2; Fri, 6 Sep 2013 09:08:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8698fIl041201; Fri, 6 Sep 2013 09:08:41 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8698fnY041196; Fri, 6 Sep 2013 09:08:41 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309060908.r8698fnY041196@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 6 Sep 2013 09:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255296 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 09:08:42 -0000 Author: jilles Date: Fri Sep 6 09:08:40 2013 New Revision: 255296 URL: http://svnweb.freebsd.org/changeset/base/255296 Log: Update some signal man pages for multithreading. Modified: head/lib/libc/sys/sigaction.2 head/lib/libc/sys/sigpending.2 head/lib/libc/sys/sigreturn.2 head/lib/libc/sys/sigwait.2 Modified: head/lib/libc/sys/sigaction.2 ============================================================================== --- head/lib/libc/sys/sigaction.2 Fri Sep 6 08:21:55 2013 (r255295) +++ head/lib/libc/sys/sigaction.2 Fri Sep 6 09:08:40 2013 (r255296) @@ -28,7 +28,7 @@ .\" From: @(#)sigaction.2 8.2 (Berkeley) 4/3/94 .\" $FreeBSD$ .\" -.Dd June 8, 2013 +.Dd September 6, 2013 .Dt SIGACTION 2 .Os .Sh NAME @@ -55,7 +55,7 @@ struct sigaction { .Sh DESCRIPTION The system defines a set of signals that may be delivered to a process. Signal delivery resembles the occurrence of a hardware interrupt: -the signal is normally blocked from further occurrence, the current process +the signal is normally blocked from further occurrence, the current thread context is saved, and a new one is built. A process may specify a .Em handler @@ -64,13 +64,14 @@ to which a signal is delivered, or speci A process may also specify that a default action is to be taken by the system when a signal occurs. A signal may also be -.Em blocked , -in which case its delivery is postponed until it is +.Em blocked +for a thread, +in which case it will not be delivered to that thread until it is .Em unblocked . The action to be taken on delivery is determined at the time of delivery. Normally, signal handlers execute on the current stack -of the process. +of the thread. This may be changed, on a per-handler basis, so that signals are taken on a special .Em "signal stack" . @@ -82,20 +83,30 @@ but other signals may yet occur. A global .Em "signal mask" defines the set of signals currently blocked from delivery -to a process. -The signal mask for a process is initialized +to a thread. +The signal mask for a thread is initialized from that of its parent (normally empty). It may be changed with a .Xr sigprocmask 2 -call, or when a signal is delivered to the process. +or +.Xr pthread_sigmask 3 +call, or when a signal is delivered to the thread. .Pp When a signal -condition arises for a process, the signal is added to a set of -signals pending for the process. -If the signal is not currently +condition arises for a process or thread, the signal is added to a set of +signals pending for the process or thread. +Whether the signal is directed at the process in general or at a specific +thread depends on how it is generated. +For signals directed at a specific thread, +if the signal is not currently .Em blocked -by the process then it is delivered to the process. -Signals may be delivered any time a process enters the operating system +by the thread then it is delivered to the thread. +For signals directed at the process, +if the signal is not currently +.Em blocked +by all threads then it is delivered to one thread that does not have it blocked +(the selection of which is unspecified). +Signals may be delivered any time a thread enters the operating system (e.g., during a system call, page fault or trap, or clock interrupt). If multiple signals are ready to be delivered at the same time, any signals that could be caused by traps are delivered first. @@ -106,17 +117,17 @@ The set of pending signals is returned b .Xr sigpending 2 system call. When a caught signal -is delivered, the current state of the process is saved, +is delivered, the current state of the thread is saved, a new signal mask is calculated (as described below), and the signal handler is invoked. The call to the handler is arranged so that if the signal handling routine returns -normally the process will resume execution in the context +normally the thread will resume execution in the context from before the signal's delivery. -If the process wishes to resume in a different context, then it +If the thread wishes to resume in a different context, then it must arrange to restore the previous context itself. .Pp -When a signal is delivered to a process a new signal mask is +When a signal is delivered to a thread a new signal mask is installed for the duration of the process' signal handler (or until a .Xr sigprocmask 2 @@ -218,7 +229,7 @@ to If this bit is set, the system will deliver the signal to the process on a .Em "signal stack" , -specified with +specified by each thread with .Xr sigaltstack 2 . .It Dv SA_NODEFER If this bit is set, further occurrences of the delivered signal are @@ -272,6 +283,11 @@ However, calls that have already committ but instead return a partial success (for example, a short read count). .Pp After a +.Xr pthread_create 3 +the signal mask is inherited by the new thread and +the set of pending signals and the signal stack for the new thread are empty. +.Pp +After a .Xr fork 2 or .Xr vfork 2 Modified: head/lib/libc/sys/sigpending.2 ============================================================================== --- head/lib/libc/sys/sigpending.2 Fri Sep 6 08:21:55 2013 (r255295) +++ head/lib/libc/sys/sigpending.2 Fri Sep 6 09:08:40 2013 (r255296) @@ -31,7 +31,7 @@ .\" @(#)sigpending.2 8.3 (Berkeley) 1/12/94 .\" $FreeBSD$ .\" -.Dd January 12, 1994 +.Dd September 6, 2013 .Dt SIGPENDING 2 .Os .Sh NAME @@ -47,7 +47,7 @@ The .Fn sigpending system call returns a mask of the signals pending for delivery -to the calling process in the location indicated by +to the calling thread or the calling process in the location indicated by .Fa set . Signals may be pending because they are currently masked, or transiently before delivery (although the latter case is not Modified: head/lib/libc/sys/sigreturn.2 ============================================================================== --- head/lib/libc/sys/sigreturn.2 Fri Sep 6 08:21:55 2013 (r255295) +++ head/lib/libc/sys/sigreturn.2 Fri Sep 6 09:08:40 2013 (r255296) @@ -28,7 +28,7 @@ .\" @(#)sigreturn.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd September 6, 2013 .Dt SIGRETURN 2 .Os .Sh NAME @@ -46,7 +46,7 @@ The system call allows users to atomically unmask, switch stacks, and return from a signal context. -The processes signal mask and stack status are +The thread's signal mask and stack status are restored from the context structure pointed to by .Fa scp . The system call does not return; @@ -65,7 +65,7 @@ is set to indicate the error. The .Fn sigreturn system call -will fail and the process context will remain unchanged +will fail and the thread context will remain unchanged if one of the following occurs. .Bl -tag -width Er .It Bq Er EFAULT Modified: head/lib/libc/sys/sigwait.2 ============================================================================== --- head/lib/libc/sys/sigwait.2 Fri Sep 6 08:21:55 2013 (r255295) +++ head/lib/libc/sys/sigwait.2 Fri Sep 6 09:08:40 2013 (r255296) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2012 +.Dd September 6, 2013 .Dt SIGWAIT 2 .Os .Sh NAME @@ -50,7 +50,7 @@ waits until one or more of the selected Then .Fn sigwait atomically clears one of the selected signals from the set of pending signals -for the process and sets the location pointed to by +(for the process or for the current thread) and sets the location pointed to by .Fa sig to the signal number that was cleared. .Pp From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 09:46:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0E440D43; Fri, 6 Sep 2013 09:46:46 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D5C882D6F; Fri, 6 Sep 2013 09:46:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r869kjB4064462; Fri, 6 Sep 2013 09:46:45 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r869kj8T064459; Fri, 6 Sep 2013 09:46:45 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201309060946.r869kj8T064459@svn.freebsd.org> From: David Chisnall Date: Fri, 6 Sep 2013 09:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255297 - in head: include lib/libc/iconv lib/libiconv_modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 09:46:46 -0000 Author: theraven Date: Fri Sep 6 09:46:44 2013 New Revision: 255297 URL: http://svnweb.freebsd.org/changeset/base/255297 Log: Fix the namespace pollution caused by iconv.h including stdbool.h This broke any C89 ports that defined bool themselves, including things like gcc, gtk, and so on. Modified: head/include/iconv.h head/lib/libc/iconv/citrus_iconv_local.h head/lib/libiconv_modules/Makefile Modified: head/include/iconv.h ============================================================================== --- head/include/iconv.h Fri Sep 6 09:08:40 2013 (r255296) +++ head/include/iconv.h Fri Sep 6 09:46:44 2013 (r255297) @@ -35,7 +35,6 @@ #include #include -#include #include #include @@ -48,6 +47,13 @@ #define libiconv iconv #define libiconv_t iconv_t #endif +#ifdef __cplusplus +typedef bool __iconv_bool; +#elif __STDC_VERSION__ >= 199901L +typedef _Bool __iconv_bool; +#else +typedef int __iconv_bool; +#endif struct __tag_iconv_t; typedef struct __tag_iconv_t *iconv_t; @@ -61,7 +67,7 @@ int iconv_close(iconv_t); /* * non-portable interfaces for iconv */ -int __iconv_get_list(char ***, size_t *, bool); +int __iconv_get_list(char ***, size_t *, __iconv_bool); void __iconv_free_list(char **, size_t); size_t __iconv(iconv_t, const char **, size_t *, char **, size_t *, __uint32_t, size_t *); Modified: head/lib/libc/iconv/citrus_iconv_local.h ============================================================================== --- head/lib/libc/iconv/citrus_iconv_local.h Fri Sep 6 09:08:40 2013 (r255296) +++ head/lib/libc/iconv/citrus_iconv_local.h Fri Sep 6 09:46:44 2013 (r255297) @@ -31,6 +31,7 @@ #define _CITRUS_ICONV_LOCAL_H_ #include +#include #define _CITRUS_ICONV_GETOPS_FUNC_BASE(_n_) \ int _n_(struct _citrus_iconv_ops *) Modified: head/lib/libiconv_modules/Makefile ============================================================================== --- head/lib/libiconv_modules/Makefile Fri Sep 6 09:08:40 2013 (r255296) +++ head/lib/libiconv_modules/Makefile Fri Sep 6 09:46:44 2013 (r255297) @@ -2,6 +2,9 @@ .include +CFLAGS+= -Dbool=_Bool +.export CFLAGS + SUBDIR= BIG5 DECHanyu EUC EUCTW GBK2K HZ ISO2022 JOHAB MSKanji UES UTF1632 \ UTF7 UTF8 VIQR ZW iconv_none iconv_std mapper_646 mapper_none \ mapper_parallel mapper_serial mapper_std mapper_zone From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 10:36:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A7C6A871; Fri, 6 Sep 2013 10:36:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 191A82067; Fri, 6 Sep 2013 10:36:47 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r86AabfL008200; Fri, 6 Sep 2013 13:36:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r86AabfL008200 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r86AaaYb008199; Fri, 6 Sep 2013 13:36:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 6 Sep 2013 13:36:36 +0300 From: Konstantin Belousov To: David Chisnall Subject: Re: svn commit: r255297 - in head: include lib/libc/iconv lib/libiconv_modules Message-ID: <20130906103636.GF41229@kib.kiev.ua> References: <201309060946.r869kj8T064459@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wQFNOvpuONRGomCw" Content-Disposition: inline In-Reply-To: <201309060946.r869kj8T064459@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 10:36:48 -0000 --wQFNOvpuONRGomCw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 06, 2013 at 09:46:45AM +0000, David Chisnall wrote: > --- head/lib/libiconv_modules/Makefile Fri Sep 6 09:08:40 2013 (r255296) > +++ head/lib/libiconv_modules/Makefile Fri Sep 6 09:46:44 2013 (r255297) > @@ -2,6 +2,9 @@ > =20 > .include > =20 > +CFLAGS+=3D -Dbool=3D_Bool > +.export CFLAGS > + > SUBDIR=3D BIG5 DECHanyu EUC EUCTW GBK2K HZ ISO2022 JOHAB MSKanji UES UTF= 1632 \ > UTF7 UTF8 VIQR ZW iconv_none iconv_std mapper_646 mapper_none \ > mapper_parallel mapper_serial mapper_std mapper_zone This is extremely rude. Such things are traditionally (and properly) done with Makefile.inc in our tree. Look at the very beginning of mk/bsd.init.mk. But the whole commit is hack. If you want to use C99 _Bool, use it directly instead of obfuscating the code through the build system. --wQFNOvpuONRGomCw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSKbA0AAoJEJDCuSvBvK1BbeIQAJZmJMD9vDtHqfoz/RphPw+/ JFWZxdfLTIps5go/+zGHOY75GMNW4ag0B+TX5gvP/+5lW5P/lzPzs9+ViEQUdunl bh+EFjUGiMUjcvmdvz8yYFjH8iH8zqfLlmhPIuarahsRjMxAp7UvQc9rLQEbBC6Y VYgeBsW9FHeFS0LLQg+5gqmaZU3Rlx3+4F+I2iSrHaWKa1U+LPKXndb7MayTz7KB jm7Af1Ztmux9zbetNALZEtOYsFBncKlG4v9tAWiN3MJjm0Z5sqqX1ekGeiVrhVgl 9dPgdUbWh1Emcd1UdU9aVzZj3E5scbMTS6lqo/e+d37/8y25QNr2XFnKwXLGoNBq nHaZjIU3z5tw8PwtRQ7OFkONiHlivGzbejxc7S1gBfcvNHKk90JtWnMm8PFZ+MHb KeTRlrogtFdVRs5C87byWoIozFDU+5Y/QdTsQKWeZiZazQqbTZWCEtChlN6vSz++ UV+hMsSer4rJfRk2VPl5O+/3CYbrjZFBnW1Enhvnfny9hBMrozPx9FooMTFj7Rre A+kEv6JnLziTNjr/lixSC+UXvU+OSbppdBH5qn9DmCwZWlk+WRZdsKVNk3jPnUgF ygs0uFMh/73JtcM6W7Hsy/xA4bYEzNl9G5VhEpEnixvBqdiPX/0KceQtx0Nvia/c Zf5iVLjpOxVX/y4Fkmlt =n7+f -----END PGP SIGNATURE----- --wQFNOvpuONRGomCw-- From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 10:40:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6B909A5F; Fri, 6 Sep 2013 10:40:39 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5901F20B7; Fri, 6 Sep 2013 10:40:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86AedhI097234; Fri, 6 Sep 2013 10:40:39 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86Aedol097232; Fri, 6 Sep 2013 10:40:39 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201309061040.r86Aedol097232@svn.freebsd.org> From: David Chisnall Date: Fri, 6 Sep 2013 10:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255298 - head/lib/libiconv_modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 10:40:39 -0000 Author: theraven Date: Fri Sep 6 10:40:38 2013 New Revision: 255298 URL: http://svnweb.freebsd.org/changeset/base/255298 Log: Use Makefile.inc instead of .export. Modified: head/lib/libiconv_modules/Makefile head/lib/libiconv_modules/Makefile.inc Modified: head/lib/libiconv_modules/Makefile ============================================================================== --- head/lib/libiconv_modules/Makefile Fri Sep 6 09:46:44 2013 (r255297) +++ head/lib/libiconv_modules/Makefile Fri Sep 6 10:40:38 2013 (r255298) @@ -2,9 +2,6 @@ .include -CFLAGS+= -Dbool=_Bool -.export CFLAGS - SUBDIR= BIG5 DECHanyu EUC EUCTW GBK2K HZ ISO2022 JOHAB MSKanji UES UTF1632 \ UTF7 UTF8 VIQR ZW iconv_none iconv_std mapper_646 mapper_none \ mapper_parallel mapper_serial mapper_std mapper_zone Modified: head/lib/libiconv_modules/Makefile.inc ============================================================================== --- head/lib/libiconv_modules/Makefile.inc Fri Sep 6 09:46:44 2013 (r255297) +++ head/lib/libiconv_modules/Makefile.inc Fri Sep 6 10:40:38 2013 (r255298) @@ -5,6 +5,9 @@ SHLIB_MAJOR= 4 WARNS?= 6 CFLAGS+= -I${.CURDIR}/../../libc/iconv + +CFLAGS+= -Dbool=_Bool + .if !defined(COMPAT_32BIT) SHLIBDIR= /usr/lib/i18n .else From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 10:43:13 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 84664CAE; Fri, 6 Sep 2013 10:43:13 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 51A4220DB; Fri, 6 Sep 2013 10:43:12 +0000 (UTC) Received: from [192.168.0.2] (cpc27-cmbg15-2-0-cust235.5-4.cable.virginmedia.com [86.27.188.236]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r86Ah91r070564 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 6 Sep 2013 10:43:10 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r255297 - in head: include lib/libc/iconv lib/libiconv_modules From: David Chisnall In-Reply-To: <20130906103636.GF41229@kib.kiev.ua> Date: Fri, 6 Sep 2013 11:43:04 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <81E1EB28-814E-491B-B3C9-90B17CDF189D@FreeBSD.org> References: <201309060946.r869kj8T064459@svn.freebsd.org> <20130906103636.GF41229@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 10:43:13 -0000 On 6 Sep 2013, at 11:36, Konstantin Belousov = wrote: > This is extremely rude. Such things are traditionally (and properly) > done with Makefile.inc in our tree. Look at the very beginning of > mk/bsd.init.mk. I was not aware of Makefile.inc, thank you. =20 > But the whole commit is hack. If you want to use C99 _Bool, use it = directly > instead of obfuscating the code through the build system. My intent was to minimise diffs from the citrus code. Our iconv.h leaks = stdbool.h into c89 files that use it, which is currently breaking around = a thousand ports (as would have been detected if there had been an exp = run before it was enabled by default). Removing this from the header = fixes the ports, but breaks the modules that expect bool to be defined. = This was the minimal change that would allow it to continue to build. The more elegant fix would be to modify all of the modules to explicitly = include stdbool.h if they wanted to use it, but this would then impose = lots more work on whoever does the next import from upstream. David (Who is currently trying to get the ports tree into a useable state for = 10.0)= From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 12:47:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1A163C9F; Fri, 6 Sep 2013 12:47:15 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E0AEF27D4; Fri, 6 Sep 2013 12:47:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86ClEDe072718; Fri, 6 Sep 2013 12:47:14 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86ClEoI072717; Fri, 6 Sep 2013 12:47:14 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201309061247.r86ClEoI072717@svn.freebsd.org> From: Luiz Otavio O Souza Date: Fri, 6 Sep 2013 12:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255300 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 12:47:15 -0000 Author: loos Date: Fri Sep 6 12:47:14 2013 New Revision: 255300 URL: http://svnweb.freebsd.org/changeset/base/255300 Log: Fix the leakage of dma tags on if_arge. The leak occur when arge_start() add some packet(s) to tx ring and arge_stop() is called before receive the sent packet interrupt from hardware. Fix arge_stop() to unload the in use dma tags and free the associated mbuf. PR: 178319, 163670 Approved by: adrian (mentor) Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Fri Sep 6 12:45:08 2013 (r255299) +++ head/sys/mips/atheros/if_arge.c Fri Sep 6 12:47:14 2013 (r255300) @@ -142,6 +142,7 @@ static int arge_resume(device_t); static int arge_rx_ring_init(struct arge_softc *); static void arge_rx_ring_free(struct arge_softc *sc); static int arge_tx_ring_init(struct arge_softc *); +static void arge_tx_ring_free(struct arge_softc *); #ifdef DEVICE_POLLING static int arge_poll(struct ifnet *, enum poll_cmd, int); #endif @@ -1278,6 +1279,7 @@ arge_stop(struct arge_softc *sc) /* Flush FIFO and free any existing mbufs */ arge_flush_ddr(sc); arge_rx_ring_free(sc); + arge_tx_ring_free(sc); } @@ -1708,6 +1710,30 @@ arge_tx_ring_init(struct arge_softc *sc) } /* + * Free the Tx ring, unload any pending dma transaction and free the mbuf. + */ +static void +arge_tx_ring_free(struct arge_softc *sc) +{ + struct arge_txdesc *txd; + int i; + + /* Free the Tx buffers. */ + for (i = 0; i < ARGE_TX_RING_COUNT; i++) { + txd = &sc->arge_cdata.arge_txdesc[i]; + if (txd->tx_dmamap) { + bus_dmamap_sync(sc->arge_cdata.arge_tx_tag, + txd->tx_dmamap, BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->arge_cdata.arge_tx_tag, + txd->tx_dmamap); + } + if (txd->tx_m) + m_freem(txd->tx_m); + txd->tx_m = NULL; + } +} + +/* * Initialize the RX descriptors and allocate mbufs for them. Note that * we arrange the descriptors in a closed ring, so that the last descriptor * points back to the first. From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 12:56:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A5C5294; Fri, 6 Sep 2013 12:56:50 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 799102847; Fri, 6 Sep 2013 12:56:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86Cuolm078521; Fri, 6 Sep 2013 12:56:50 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86CunHI078518; Fri, 6 Sep 2013 12:56:49 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309061256.r86CunHI078518@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 6 Sep 2013 12:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255301 - head/tools/regression/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 12:56:50 -0000 Author: jilles Date: Fri Sep 6 12:56:49 2013 New Revision: 255301 URL: http://svnweb.freebsd.org/changeset/base/255301 Log: libc/stdio: Provide proper TAP output for fmemopen/open_[w]memstream. A *.t file should provide Test Anything Protocol output so that it can be run using the Perl "prove" tool. Modified: head/tools/regression/lib/libc/stdio/test-fmemopen.t head/tools/regression/lib/libc/stdio/test-open_memstream.t head/tools/regression/lib/libc/stdio/test-open_wmemstream.t Modified: head/tools/regression/lib/libc/stdio/test-fmemopen.t ============================================================================== --- head/tools/regression/lib/libc/stdio/test-fmemopen.t Fri Sep 6 12:47:14 2013 (r255300) +++ head/tools/regression/lib/libc/stdio/test-fmemopen.t Fri Sep 6 12:56:49 2013 (r255301) @@ -7,4 +7,9 @@ executable=`basename $0 .t` make $executable 2>&1 > /dev/null -exec ./$executable +echo 1..1 +if ./$executable; then + echo ok 1 - $executable successful +else + echo not ok 1 - $executable failed +fi Modified: head/tools/regression/lib/libc/stdio/test-open_memstream.t ============================================================================== --- head/tools/regression/lib/libc/stdio/test-open_memstream.t Fri Sep 6 12:47:14 2013 (r255300) +++ head/tools/regression/lib/libc/stdio/test-open_memstream.t Fri Sep 6 12:56:49 2013 (r255301) @@ -7,4 +7,9 @@ executable=`basename $0 .t` make $executable 2>&1 > /dev/null -exec ./$executable +echo 1..1 +if ./$executable; then + echo ok 1 - $executable successful +else + echo not ok 1 - $executable failed +fi Modified: head/tools/regression/lib/libc/stdio/test-open_wmemstream.t ============================================================================== --- head/tools/regression/lib/libc/stdio/test-open_wmemstream.t Fri Sep 6 12:47:14 2013 (r255300) +++ head/tools/regression/lib/libc/stdio/test-open_wmemstream.t Fri Sep 6 12:56:49 2013 (r255301) @@ -7,4 +7,9 @@ executable=`basename $0 .t` make $executable 2>&1 > /dev/null -exec ./$executable +echo 1..1 +if ./$executable; then + echo ok 1 - $executable successful +else + echo not ok 1 - $executable failed +fi From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 12:59:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 447622DB; Fri, 6 Sep 2013 12:59:49 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 31F7F285B; Fri, 6 Sep 2013 12:59:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86Cxnnn079535; Fri, 6 Sep 2013 12:59:49 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86Cxnw3079534; Fri, 6 Sep 2013 12:59:49 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309061259.r86Cxnw3079534@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 6 Sep 2013 12:59:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255302 - head/tools/regression/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 12:59:49 -0000 Author: jilles Date: Fri Sep 6 12:59:48 2013 New Revision: 255302 URL: http://svnweb.freebsd.org/changeset/base/255302 Log: libc/stdio: Run mkostemp test using prove. Added: head/tools/regression/lib/libc/stdio/test-mkostemp.t (contents, props changed) Added: head/tools/regression/lib/libc/stdio/test-mkostemp.t ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/lib/libc/stdio/test-mkostemp.t Fri Sep 6 12:59:48 2013 (r255302) @@ -0,0 +1,10 @@ +#!/bin/sh +# $FreeBSD$ + +cd `dirname $0` + +executable=`basename $0 .t` + +make $executable 2>&1 > /dev/null + +exec ./$executable From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 13:16:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5DC81817; Fri, 6 Sep 2013 13:16:54 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtpauth2.wiscmail.wisc.edu (wmauth2.doit.wisc.edu [144.92.197.222]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 333822954; Fri, 6 Sep 2013 13:16:53 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) id <0MSP00D00EDVLR00@smtpauth2.wiscmail.wisc.edu>; Fri, 06 Sep 2013 08:16:52 -0500 (CDT) X-Spam-PmxInfo: Server=avs-2, Version=6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.9.6.130619, SenderIP=0.0.0.0 X-Spam-Report: AuthenticatedSender=yes, SenderIP=0.0.0.0 Received: from comporellon.tachypleus.net (adsl-76-208-67-185.dsl.mdsnwi.sbcglobal.net [76.208.67.185]) by smtpauth2.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTPSA id <0MSP0093UGW30C20@smtpauth2.wiscmail.wisc.edu>; Fri, 06 Sep 2013 08:16:52 -0500 (CDT) Message-id: <5229D5C3.6070302@freebsd.org> Date: Fri, 06 Sep 2013 08:16:51 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130810 Thunderbird/17.0.8 To: Roman Divacky Subject: Re: svn commit: r255273 - in head/sys/powerpc: aim include References: <201309052300.r85N0OLX076496@svn.freebsd.org> <20130906085301.GA44778@freebsd.org> In-reply-to: <20130906085301.GA44778@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 13:16:54 -0000 On 09/06/13 03:53, Roman Divacky wrote: > On Thu, Sep 05, 2013 at 11:00:24PM +0000, Nathan Whitehorn wrote: >> Author: nwhitehorn >> Date: Thu Sep 5 23:00:24 2013 >> New Revision: 255273 >> URL: http://svnweb.freebsd.org/changeset/base/255273 >> >> Log: >> Align stacks of kernel threads correctly at 16-byte boundaries rather than >> making sure they are all misaligned at +8 bytes. This fixes clang builds >> of powerpc64 kernels (aside from a required increase in KSTACK_PAGES which >> will come later). >> >> This commit from FreeBSD/powerpc64 with a clang-built kernel. > The increased KSTACK_PAGES is needed because the kernel you're using is built > with O0. I suppose O2 kernel will be fine. Needs to be tested. > > Anyway, this is a great step forward and I believe PowerPC64 is basically ready > to be compiled with clang instead of gcc :) > > Congrats! > > Roman I think you are the one who did all the hard work here, so thanks a great deal. As an update for the list, this is where we currently are for clang/ppc64: 1) We need to update the in-tree clang to a more recent version 2) Kernel and world both appear to work perfectly 3) We need a few minor updates to clang so that we can enable -integrated-as by default, which is important to work around some limitations of our ancient binutils (-g will break as otherwise) 4) KDB currently relies on a deprecated scheme of PPC64 ELF symbol declarations to provide stack traces. We either need to add it to clang or fix KDB to give meaningful output on panics with the default symbol emission strategy. 5) clang/ppc32 is not as advanced and we need to figure out a way to build /usr/lib32. This is a pretty short list of TODOs. Once (1) and (3) are done, we will start encouraging testing of WITH_CLANG_IS_CC (with WITHOUT_LIB32 due to #5). If we can figure out a solution to #5, and nothing untoward happens in testing, WITH_CLANG_IS_CC will become the default on ppc64. Thanks in particular to Roman for working very hard for a very long time to make this happen. -Nathan From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 13:47:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B427DDB5; Fri, 6 Sep 2013 13:47:17 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A08862BAC; Fri, 6 Sep 2013 13:47:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86DlH2U009489; Fri, 6 Sep 2013 13:47:17 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86DlHHQ009486; Fri, 6 Sep 2013 13:47:17 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309061347.r86DlHHQ009486@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 6 Sep 2013 13:47:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255303 - in head: lib/libc/stdio tools/regression/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 13:47:17 -0000 Author: jilles Date: Fri Sep 6 13:47:16 2013 New Revision: 255303 URL: http://svnweb.freebsd.org/changeset/base/255303 Log: libc/stdio: Allow fopen/freopen modes in any order (except initial r/w/a). Austin Group issue #411 requires 'e' to be accepted before and after 'x', and encourages accepting the characters in any order, except the initial 'r', 'w' or 'a'. Given that glibc accepts the characters after r/w/a in any order and that diagnosing this problem may be hard, change our libc to behave that way as well. Added: head/tools/regression/lib/libc/stdio/test-fopen.c (contents, props changed) head/tools/regression/lib/libc/stdio/test-fopen.t - copied unchanged from r255302, head/tools/regression/lib/libc/stdio/test-mkostemp.t Modified: head/lib/libc/stdio/flags.c Modified: head/lib/libc/stdio/flags.c ============================================================================== --- head/lib/libc/stdio/flags.c Fri Sep 6 12:59:48 2013 (r255302) +++ head/lib/libc/stdio/flags.c Fri Sep 6 13:47:16 2013 (r255303) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); int __sflags(const char *mode, int *optr) { - int ret, m, o; + int ret, m, o, known; switch (*mode++) { @@ -78,34 +78,35 @@ __sflags(const char *mode, int *optr) return (0); } - /* 'b' (binary) is ignored */ - if (*mode == 'b') - mode++; - - /* [rwa][b]\+ means read and write */ - if (*mode == '+') { - mode++; - ret = __SRW; - m = O_RDWR; - } - - /* 'b' (binary) can appear here, too -- and is ignored again */ - if (*mode == 'b') - mode++; - - /* 'x' means exclusive (fail if the file exists) */ - if (*mode == 'x') { - mode++; - if (m == O_RDONLY) { - errno = EINVAL; - return (0); + do { + known = 1; + switch (*mode++) { + case 'b': + /* 'b' (binary) is ignored */ + break; + case '+': + /* [rwa][b]\+ means read and write */ + ret = __SRW; + m = O_RDWR; + break; + case 'x': + /* 'x' means exclusive (fail if the file exists) */ + o |= O_EXCL; + break; + case 'e': + /* set close-on-exec */ + o |= O_CLOEXEC; + break; + default: + known = 0; + break; } - o |= O_EXCL; - } + } while (known); - /* set close-on-exec */ - if (*mode == 'e') - o |= O_CLOEXEC; + if ((o & O_EXCL) != 0 && m == O_RDONLY) { + errno = EINVAL; + return (0); + } *optr = m | o; return (ret); Added: head/tools/regression/lib/libc/stdio/test-fopen.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/lib/libc/stdio/test-fopen.c Fri Sep 6 13:47:16 2013 (r255303) @@ -0,0 +1,113 @@ +/*- + * Copyright (c) 2013 Jilles Tjoelker + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +/* + * O_ACCMODE is currently defined incorrectly. This is what it should be. + * Various code depends on the incorrect value. + */ +#define CORRECT_O_ACCMODE (O_ACCMODE | O_EXEC) + +static int testnum = 1; + +static void +runtest(const char *fname, const char *mode) +{ + FILE *fp; + int fd, flags, wantedflags; + + fp = fopen(fname, mode); + if (fp == NULL) { + printf("not ok %d - fopen(\"%s\", \"%s\") failed\n", + testnum++, fname, mode); + printf("not ok %d - FD_CLOEXEC # SKIP\n", + testnum++); + return; + } + fd = fileno(fp); + if (fd < 0) + printf("not ok %d - fileno() failed\n", testnum++); + else + printf("ok %d - fopen(\"%s\", \"%s\") and fileno() succeeded\n", + testnum++, fname, mode); + if (fcntl(fd, F_GETFD) == (strchr(mode, 'e') != NULL ? FD_CLOEXEC : 0)) + printf("ok %d - FD_CLOEXEC flag correct\n", testnum++); + else + printf("not ok %d - FD_CLOEXEC flag incorrect\n", testnum++); + flags = fcntl(fd, F_GETFL); + if (strchr(mode, '+')) + wantedflags = O_RDWR | (*mode == 'a' ? O_APPEND : 0); + else if (*mode == 'r') + wantedflags = O_RDONLY; + else if (*mode == 'w') + wantedflags = O_WRONLY; + else if (*mode == 'a') + wantedflags = O_WRONLY | O_APPEND; + else + wantedflags = -1; + if (wantedflags == -1) + printf("not ok %d - unrecognized mode\n", testnum++); + else if ((flags & (CORRECT_O_ACCMODE | O_APPEND)) == wantedflags) + printf("ok %d - correct access mode\n", testnum++); + else + printf("not ok %d - incorrect access mode\n", testnum++); + fclose(fp); +} + +/* + * Test program for fopen(). + */ +int +main(int argc, char *argv[]) +{ + printf("1..45\n"); + runtest("/dev/null", "r"); + runtest("/dev/null", "r+"); + runtest("/dev/null", "w"); + runtest("/dev/null", "w+"); + runtest("/dev/null", "a"); + runtest("/dev/null", "a+"); + runtest("/dev/null", "re"); + runtest("/dev/null", "r+e"); + runtest("/dev/null", "we"); + runtest("/dev/null", "w+e"); + runtest("/dev/null", "ae"); + runtest("/dev/null", "a+e"); + runtest("/dev/null", "re+"); + runtest("/dev/null", "we+"); + runtest("/dev/null", "ae+"); + + return 0; +} + +/* vim:ts=8:cin:sw=8 + * */ Copied: head/tools/regression/lib/libc/stdio/test-fopen.t (from r255302, head/tools/regression/lib/libc/stdio/test-mkostemp.t) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/lib/libc/stdio/test-fopen.t Fri Sep 6 13:47:16 2013 (r255303, copy of r255302, head/tools/regression/lib/libc/stdio/test-mkostemp.t) @@ -0,0 +1,10 @@ +#!/bin/sh +# $FreeBSD$ + +cd `dirname $0` + +executable=`basename $0 .t` + +make $executable 2>&1 > /dev/null + +exec ./$executable From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 14:31:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2083F367; Fri, 6 Sep 2013 14:31:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E7D7220BA; Fri, 6 Sep 2013 14:31:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86EVq7I038747; Fri, 6 Sep 2013 14:31:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86EVqsb038746; Fri, 6 Sep 2013 14:31:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201309061431.r86EVqsb038746@svn.freebsd.org> From: Alexander Motin Date: Fri, 6 Sep 2013 14:31:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255304 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 14:31:53 -0000 Author: mav Date: Fri Sep 6 14:31:52 2013 New Revision: 255304 URL: http://svnweb.freebsd.org/changeset/base/255304 Log: Fix kernel panic if cache->nelms is zero. MFC after: 2 weeks Modified: head/sys/cam/scsi/scsi_enc_ses.c Modified: head/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- head/sys/cam/scsi/scsi_enc_ses.c Fri Sep 6 13:47:16 2013 (r255303) +++ head/sys/cam/scsi/scsi_enc_ses.c Fri Sep 6 14:31:52 2013 (r255304) @@ -567,8 +567,8 @@ ses_cache_free_elm_addlstatus(enc_softc_ return; for (cur_elm = cache->elm_map, - last_elm = &cache->elm_map[cache->nelms - 1]; - cur_elm <= last_elm; cur_elm++) { + last_elm = &cache->elm_map[cache->nelms]; + cur_elm != last_elm; cur_elm++) { ses_element_t *elmpriv; elmpriv = cur_elm->elm_private; @@ -598,8 +598,8 @@ ses_cache_free_elm_descs(enc_softc_t *en return; for (cur_elm = cache->elm_map, - last_elm = &cache->elm_map[cache->nelms - 1]; - cur_elm <= last_elm; cur_elm++) { + last_elm = &cache->elm_map[cache->nelms]; + cur_elm != last_elm; cur_elm++) { ses_element_t *elmpriv; elmpriv = cur_elm->elm_private; @@ -644,8 +644,8 @@ ses_cache_free_elm_map(enc_softc_t *enc, ses_cache_free_elm_descs(enc, cache); ses_cache_free_elm_addlstatus(enc, cache); for (cur_elm = cache->elm_map, - last_elm = &cache->elm_map[cache->nelms - 1]; - cur_elm <= last_elm; cur_elm++) { + last_elm = &cache->elm_map[cache->nelms]; + cur_elm != last_elm; cur_elm++) { ENC_FREE_AND_NULL(cur_elm->elm_private); } @@ -717,8 +717,8 @@ ses_cache_clone(enc_softc_t *enc, enc_ca dst->elm_map = ENC_MALLOCZ(dst->nelms * sizeof(enc_element_t)); memcpy(dst->elm_map, src->elm_map, dst->nelms * sizeof(enc_element_t)); for (dst_elm = dst->elm_map, src_elm = src->elm_map, - last_elm = &src->elm_map[src->nelms - 1]; - src_elm <= last_elm; src_elm++, dst_elm++) { + last_elm = &src->elm_map[src->nelms]; + src_elm != last_elm; src_elm++, dst_elm++) { dst_elm->elm_private = ENC_MALLOCZ(sizeof(ses_element_t)); memcpy(dst_elm->elm_private, src_elm->elm_private, From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 14:34:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3E6B2524; Fri, 6 Sep 2013 14:34:21 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2A5FF2103; Fri, 6 Sep 2013 14:34:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86EYLSS039893; Fri, 6 Sep 2013 14:34:21 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86EYLm8039892; Fri, 6 Sep 2013 14:34:21 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309061434.r86EYLm8039892@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 6 Sep 2013 14:34:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255305 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 14:34:21 -0000 Author: pjd Date: Fri Sep 6 14:34:20 2013 New Revision: 255305 URL: http://svnweb.freebsd.org/changeset/base/255305 Log: Bump __FreeBSD_version to 1000053 after cap_rights_t change. Suggested by: danfe Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Sep 6 14:31:52 2013 (r255304) +++ head/sys/sys/param.h Fri Sep 6 14:34:20 2013 (r255305) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000052 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000053 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 14:34:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2FB1D66F; Fri, 6 Sep 2013 14:34:48 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id E7FD72112; Fri, 6 Sep 2013 14:34:47 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id ACB943C0; Fri, 6 Sep 2013 16:29:17 +0200 (CEST) Date: Fri, 6 Sep 2013 16:34:55 +0200 From: Pawel Jakub Dawidek To: Alexey Dokuchaev Subject: Re: svn commit: r255219 - in head: contrib/tcpdump lib/libc lib/libc/capability lib/libc/include lib/libc/sys lib/libprocstat sbin/dhclient sbin/hastd sys/amd64/linux32 sys/bsm sys/cddl/compat/opensola... Message-ID: <20130906143455.GB1369@garage.freebsd.pl> References: <201309050009.r8509vsE061271@svn.freebsd.org> <20130906044354.GA26806@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LpQ9ahxlCli8rRTG" Content-Disposition: inline In-Reply-To: <20130906044354.GA26806@FreeBSD.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 14:34:48 -0000 --LpQ9ahxlCli8rRTG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 06, 2013 at 04:43:54AM +0000, Alexey Dokuchaev wrote: > On Thu, Sep 05, 2013 at 12:09:57AM +0000, Pawel Jakub Dawidek wrote: > > Author: pjd > > Date: Thu Sep 5 00:09:56 2013 > > New Revision: 255219 > > URL: http://svnweb.freebsd.org/changeset/base/255219 > >=20 > > Log: > > Change the cap_rights_t type from uint64_t to a structure that we can= extend > > in the future in a backward compatible (API and ABI) way. > > =20 > > The cap_rights_t represents capability rights. We used to use one bit= to > > represent one right, but we are running out of spare bits. Currently = the new > > structure provides place for 114 rights (so 50 more than the previous > > cap_rights_t), but it is possible to grow the structure to hold at le= ast 285 > > rights, although we can make it even larger if 285 rights won't be en= ough. > > =20 > > The structure definition looks like this: > > =20 > > struct cap_rights { > > uint64_t cr_rights[CAP_RIGHTS_VERSION + 2]; > > }; >=20 > I believe this commit broke nvidia-driver. Fix is trivial; however, I wo= uld > have to use OSVERSION from Sep 3rd, since you forgot to update sys/param.= h. Bumped, thanks. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --LpQ9ahxlCli8rRTG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlIp6A8ACgkQForvXbEpPzRXpQCePsvCLn6bPAnkFM85gVAgvSKb E7oAn1HrhIIukuqBWt/HnQiKtj5YfE60 =Xy05 -----END PGP SIGNATURE----- --LpQ9ahxlCli8rRTG-- From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 15:19:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6F40D1D6; Fri, 6 Sep 2013 15:19:58 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5AC0D26F1; Fri, 6 Sep 2013 15:19:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86FJwVb066423; Fri, 6 Sep 2013 15:19:58 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86FJvjp066412; Fri, 6 Sep 2013 15:19:57 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201309061519.r86FJvjp066412@svn.freebsd.org> From: Bryan Venteicher Date: Fri, 6 Sep 2013 15:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255307 - in head: sbin/camcontrol sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 15:19:58 -0000 Author: bryanv Date: Fri Sep 6 15:19:57 2013 New Revision: 255307 URL: http://svnweb.freebsd.org/changeset/base/255307 Log: Add camcontrol support for the SCSI sanitize command Reviewed by: ken, mjacob (eariler version) Sponsored by: Netapp Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c head/sys/cam/scsi/scsi_da.c head/sys/cam/scsi/scsi_da.h Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Fri Sep 6 15:17:25 2013 (r255306) +++ head/sbin/camcontrol/camcontrol.8 Fri Sep 6 15:19:57 2013 (r255307) @@ -207,6 +207,19 @@ .Op Fl w .Op Fl y .Nm +.Ic sanitize +.Op device id +.Op generic args +.Aq Fl a Ar overwrite | block | crypto | exitfailure +.Op Fl c Ar passes +.Op Fl I +.Op Fl P Ar pattern +.Op Fl q +.Op Fl U +.Op Fl r +.Op Fl w +.Op Fl y +.Nm .Ic idle .Op device id .Op generic args @@ -1088,6 +1101,116 @@ The user will not be asked about the timeout if a timeout is specified on the command line. .El +.It Ic sanitize +Issue the +.Tn SCSI +SANITIZE command to the named device. +.Pp +.Em WARNING! WARNING! WARNING! +.Pp +ALL data in the cache and on the disk will be destroyed or made inaccessible. +Recovery of the data is not possible. +Use extreme caution when issuing this command. +.Pp +The +.Sq sanitize +subcommand takes several arguments that modify its default behavior. +The +.Fl q +and +.Fl y +arguments can be useful for scripts. +.Bl -tag -width 6n +.It Fl a Ar operation +Specify the sanitize operation to perform. +.Bl -tag -width 16n +.It overwrite +Perform an overwrite operation by writing a user supplied +data pattern to the device one or more times. +The pattern is given by the +.Fl P +argument. +The number of times is given by the +.Fl c +argument. +.It block +Perform a block erase operation. +All the device's blocks are set to a vendor defined +value, typically zero. +.It crypto +Perform a cryptographic erase operation. +The encryption keys are changed to prevent the decryption +of the data. +.It exitfailure +Exits a previously failed sanitize operation. +A failed sanitize operation can only be exited if it was +run in the unrestricted completion mode, as provided by the +.Fl U +argument. +.El +.It Fl c Ar passes +The number of passes when performing an +.Sq overwrite +operation. +Valid values are between 1 and 31. The default is 1. +.It Fl I +When performing an +.Sq overwrite +operation, the pattern is inverted between consecutive passes. +.It Fl P Ar pattern +Path to the file containing the pattern to use when +performing an +.Sq overwrite +operation. +The pattern is repeated as needed to fill each block. +.It Fl q +Be quiet, do not print any status messages. +This option will not disable +the questions, however. +To disable questions, use the +.Fl y +argument, below. +.It Fl U +Perform the sanitize in the unrestricted completion mode. +If the operation fails, it can later be exited with the +.Sq exitfailure +operation. +.It Fl r +Run in +.Dq report only +mode. +This will report status on a sanitize that is already running on the drive. +.It Fl w +Issue a non-immediate sanitize command. +By default, +.Nm +issues the SANITIZE command with the immediate bit set. +This tells the +device to immediately return the sanitize command, before +the sanitize has actually completed. +Then, +.Nm +gathers +.Tn SCSI +sense information from the device every second to determine how far along +in the sanitize process it is. +If the +.Fl w +argument is specified, +.Nm +will issue a non-immediate sanitize command, and will be unable to print any +information to let the user know what percentage of the disk has been +sanitized. +.It Fl y +Do not ask any questions. +By default, +.Nm +will ask the user if he/she really wants to sanitize the disk in question, +and also if the default sanitize command timeout is acceptable. +The user +will not be asked about the timeout if a timeout is specified on the +command line. +.El .It Ic idle Put ATA device into IDLE state. Optional parameter .Pq Fl t Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Fri Sep 6 15:17:25 2013 (r255306) +++ head/sbin/camcontrol/camcontrol.c Fri Sep 6 15:19:57 2013 (r255307) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -93,7 +94,8 @@ typedef enum { CAM_CMD_SMP_MANINFO = 0x0000001b, CAM_CMD_DOWNLOAD_FW = 0x0000001c, CAM_CMD_SECURITY = 0x0000001d, - CAM_CMD_HPA = 0x0000001e + CAM_CMD_HPA = 0x0000001e, + CAM_CMD_SANITIZE = 0x0000001f, } cam_cmdmask; typedef enum { @@ -209,6 +211,7 @@ static struct camcontrol_opts option_tab {"rate", CAM_CMD_RATE, CAM_ARG_NONE, negotiate_opts}, {"debug", CAM_CMD_DEBUG, CAM_ARG_NONE, "IPTSXcp"}, {"format", CAM_CMD_FORMAT, CAM_ARG_NONE, "qrwy"}, + {"sanitize", CAM_CMD_SANITIZE, CAM_ARG_NONE, "a:c:IP:qrUwy"}, {"idle", CAM_CMD_IDLE, CAM_ARG_NONE, "t:"}, {"standby", CAM_CMD_STANDBY, CAM_ARG_NONE, "t:"}, {"sleep", CAM_CMD_SLEEP, CAM_ARG_NONE, ""}, @@ -301,6 +304,8 @@ static int ratecontrol(struct cam_device int timeout, int argc, char **argv, char *combinedopt); static int scsiformat(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); +static int scsisanitize(struct cam_device *device, int argc, char **argv, + char *combinedopt, int retry_count, int timeout); static int scsireportluns(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); static int scsireadcapacity(struct cam_device *device, int argc, char **argv, @@ -5537,6 +5542,402 @@ scsiformat_bailout: } static int +scsisanitize(struct cam_device *device, int argc, char **argv, + char *combinedopt, int retry_count, int timeout) +{ + union ccb *ccb; + u_int8_t action = 0; + int c; + int ycount = 0, quiet = 0; + int error = 0, retval = 0; + int use_timeout = 10800 * 1000; + int immediate = 1; + int invert = 0; + int passes = 0; + int ause = 0; + int fd = -1; + const char *pattern = NULL; + u_int8_t *data_ptr = NULL; + u_int32_t dxfer_len = 0; + u_int8_t byte2 = 0; + int num_warnings = 0; + int reportonly = 0; + + ccb = cam_getccb(device); + + if (ccb == NULL) { + warnx("scsisanitize: error allocating ccb"); + return(1); + } + + bzero(&(&ccb->ccb_h)[1], + sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + + while ((c = getopt(argc, argv, combinedopt)) != -1) { + switch(c) { + case 'a': + if (strcasecmp(optarg, "overwrite") == 0) + action = SSZ_SERVICE_ACTION_OVERWRITE; + else if (strcasecmp(optarg, "block") == 0) + action = SSZ_SERVICE_ACTION_BLOCK_ERASE; + else if (strcasecmp(optarg, "crypto") == 0) + action = SSZ_SERVICE_ACTION_CRYPTO_ERASE; + else if (strcasecmp(optarg, "exitfailure") == 0) + action = SSZ_SERVICE_ACTION_EXIT_MODE_FAILURE; + else { + warnx("invalid service operation \"%s\"", + optarg); + error = 1; + goto scsisanitize_bailout; + } + break; + case 'c': + passes = strtol(optarg, NULL, 0); + if (passes < 1 || passes > 31) { + warnx("invalid passes value %d", passes); + error = 1; + goto scsisanitize_bailout; + } + break; + case 'I': + invert = 1; + break; + case 'P': + pattern = optarg; + break; + case 'q': + quiet++; + break; + case 'U': + ause = 1; + break; + case 'r': + reportonly = 1; + break; + case 'w': + immediate = 0; + break; + case 'y': + ycount++; + break; + } + } + + if (reportonly) + goto doreport; + + if (action == 0) { + warnx("an action is required"); + error = 1; + goto scsisanitize_bailout; + } else if (action == SSZ_SERVICE_ACTION_OVERWRITE) { + struct scsi_sanitize_parameter_list *pl; + struct stat sb; + ssize_t sz, amt; + + if (pattern == NULL) { + warnx("overwrite action requires -P argument"); + error = 1; + goto scsisanitize_bailout; + } + fd = open(pattern, O_RDONLY); + if (fd < 0) { + warn("cannot open pattern file %s", pattern); + error = 1; + goto scsisanitize_bailout; + } + if (fstat(fd, &sb) < 0) { + warn("cannot stat pattern file %s", pattern); + error = 1; + goto scsisanitize_bailout; + } + sz = sb.st_size; + if (sz > SSZPL_MAX_PATTERN_LENGTH) { + warnx("pattern file size exceeds maximum value %d", + SSZPL_MAX_PATTERN_LENGTH); + error = 1; + goto scsisanitize_bailout; + } + dxfer_len = sizeof(*pl) + sz; + data_ptr = calloc(1, dxfer_len); + if (data_ptr == NULL) { + warnx("cannot allocate parameter list buffer"); + error = 1; + goto scsisanitize_bailout; + } + + amt = read(fd, data_ptr + sizeof(*pl), sz); + if (amt < 0) { + warn("cannot read pattern file"); + error = 1; + goto scsisanitize_bailout; + } else if (amt != sz) { + warnx("short pattern file read"); + error = 1; + goto scsisanitize_bailout; + } + + pl = (struct scsi_sanitize_parameter_list *)data_ptr; + if (passes == 0) + pl->byte1 = 1; + else + pl->byte1 = passes; + if (invert != 0) + pl->byte1 |= SSZPL_INVERT; + scsi_ulto2b(sz, pl->length); + } else { + const char *arg; + + if (passes != 0) + arg = "-c"; + else if (invert != 0) + arg = "-I"; + else if (pattern != NULL) + arg = "-P"; + else + arg = NULL; + if (arg != NULL) { + warnx("%s argument only valid with overwrite " + "operation", arg); + error = 1; + goto scsisanitize_bailout; + } + } + + if (quiet == 0) { + fprintf(stdout, "You are about to REMOVE ALL DATA from the " + "following device:\n"); + + error = scsidoinquiry(device, argc, argv, combinedopt, + retry_count, timeout); + + if (error != 0) { + warnx("scsisanitize: error sending inquiry"); + goto scsisanitize_bailout; + } + } + + if (ycount == 0) { + if (!get_confirmation()) { + error = 1; + goto scsisanitize_bailout; + } + } + + if (timeout != 0) + use_timeout = timeout; + + if (quiet == 0) { + fprintf(stdout, "Current sanitize timeout is %d seconds\n", + use_timeout / 1000); + } + + /* + * If the user hasn't disabled questions and didn't specify a + * timeout on the command line, ask them if they want the current + * timeout. + */ + if ((ycount == 0) + && (timeout == 0)) { + char str[1024]; + int new_timeout = 0; + + fprintf(stdout, "Enter new timeout in seconds or press\n" + "return to keep the current timeout [%d] ", + use_timeout / 1000); + + if (fgets(str, sizeof(str), stdin) != NULL) { + if (str[0] != '\0') + new_timeout = atoi(str); + } + + if (new_timeout != 0) { + use_timeout = new_timeout * 1000; + fprintf(stdout, "Using new timeout value %d\n", + use_timeout / 1000); + } + } + + byte2 = action; + if (ause != 0) + byte2 |= SSZ_UNRESTRICTED_EXIT; + if (immediate != 0) + byte2 |= SSZ_IMMED; + + scsi_sanitize(&ccb->csio, + /* retries */ retry_count, + /* cbfcnp */ NULL, + /* tag_action */ MSG_SIMPLE_Q_TAG, + /* byte2 */ byte2, + /* control */ 0, + /* data_ptr */ data_ptr, + /* dxfer_len */ dxfer_len, + /* sense_len */ SSD_FULL_SIZE, + /* timeout */ use_timeout); + + /* Disable freezing the device queue */ + ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; + + if (arglist & CAM_ARG_ERR_RECOVER) + ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; + + if (((retval = cam_send_ccb(device, ccb)) < 0) + || ((immediate == 0) + && ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP))) { + const char errstr[] = "error sending sanitize command"; + + if (retval < 0) + warn(errstr); + else + warnx(errstr); + + if (arglist & CAM_ARG_VERBOSE) { + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + } + error = 1; + goto scsisanitize_bailout; + } + + /* + * If we ran in non-immediate mode, we already checked for errors + * above and printed out any necessary information. If we're in + * immediate mode, we need to loop through and get status + * information periodically. + */ + if (immediate == 0) { + if (quiet == 0) { + fprintf(stdout, "Sanitize Complete\n"); + } + goto scsisanitize_bailout; + } + +doreport: + do { + cam_status status; + + bzero(&(&ccb->ccb_h)[1], + sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + + /* + * There's really no need to do error recovery or + * retries here, since we're just going to sit in a + * loop and wait for the device to finish sanitizing. + */ + scsi_test_unit_ready(&ccb->csio, + /* retries */ 0, + /* cbfcnp */ NULL, + /* tag_action */ MSG_SIMPLE_Q_TAG, + /* sense_len */ SSD_FULL_SIZE, + /* timeout */ 5000); + + /* Disable freezing the device queue */ + ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; + + retval = cam_send_ccb(device, ccb); + + /* + * If we get an error from the ioctl, bail out. SCSI + * errors are expected. + */ + if (retval < 0) { + warn("error sending CAMIOCOMMAND ioctl"); + if (arglist & CAM_ARG_VERBOSE) { + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + } + error = 1; + goto scsisanitize_bailout; + } + + status = ccb->ccb_h.status & CAM_STATUS_MASK; + + if ((status != CAM_REQ_CMP) + && (status == CAM_SCSI_STATUS_ERROR) + && ((ccb->ccb_h.status & CAM_AUTOSNS_VALID) != 0)) { + struct scsi_sense_data *sense; + int error_code, sense_key, asc, ascq; + + sense = &ccb->csio.sense_data; + scsi_extract_sense_len(sense, ccb->csio.sense_len - + ccb->csio.sense_resid, &error_code, &sense_key, + &asc, &ascq, /*show_errors*/ 1); + + /* + * According to the SCSI-3 spec, a drive that is in the + * middle of a sanitize should return NOT READY with an + * ASC of "logical unit not ready, sanitize in + * progress". The sense key specific bytes will then + * be a progress indicator. + */ + if ((sense_key == SSD_KEY_NOT_READY) + && (asc == 0x04) && (ascq == 0x1b)) { + uint8_t sks[3]; + + if ((scsi_get_sks(sense, ccb->csio.sense_len - + ccb->csio.sense_resid, sks) == 0) + && (quiet == 0)) { + int val; + u_int64_t percentage; + + val = scsi_2btoul(&sks[1]); + percentage = 10000 * val; + + fprintf(stdout, + "\rSanitizing: %ju.%02u %% " + "(%d/%d) done", + (uintmax_t)(percentage / + (0x10000 * 100)), + (unsigned)((percentage / + 0x10000) % 100), + val, 0x10000); + fflush(stdout); + } else if ((quiet == 0) + && (++num_warnings <= 1)) { + warnx("Unexpected SCSI Sense Key " + "Specific value returned " + "during sanitize:"); + scsi_sense_print(device, &ccb->csio, + stderr); + warnx("Unable to print status " + "information, but sanitze will " + "proceed."); + warnx("will exit when sanitize is " + "complete"); + } + sleep(1); + } else { + warnx("Unexpected SCSI error during sanitize"); + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + error = 1; + goto scsisanitize_bailout; + } + + } else if (status != CAM_REQ_CMP) { + warnx("Unexpected CAM status %#x", status); + if (arglist & CAM_ARG_VERBOSE) + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + error = 1; + goto scsisanitize_bailout; + } + } while((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP); + + if (quiet == 0) + fprintf(stdout, "\nSanitize Complete\n"); + +scsisanitize_bailout: + if (fd >= 0) + close(fd); + if (data_ptr != NULL) + free(data_ptr); + cam_freeccb(ccb); + + return(error); +} + +static int scsireportluns(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout) { @@ -7361,6 +7762,10 @@ usage(int printlong) " [-q][-R syncrate][-v][-T ]\n" " [-U][-W bus_width]\n" " camcontrol format [dev_id][generic args][-q][-r][-w][-y]\n" +" camcontrol sanitize [dev_id][generic args]\n" +" [-a overwrite|block|crypto|exitfailure]\n" +" [-c passes][-I][-P pattern][-q][-U][-r][-w]\n" +" [-y]\n" " camcontrol idle [dev_id][generic args][-t time]\n" " camcontrol standby [dev_id][generic args][-t time]\n" " camcontrol sleep [dev_id][generic args]\n" @@ -7403,6 +7808,7 @@ usage(int printlong) "tags report or set the number of transaction slots for a device\n" "negotiate report or set device negotiation parameters\n" "format send the SCSI FORMAT UNIT command to the named device\n" +"sanitize send the SCSI SANITIZE command to the named device\n" "idle send the ATA IDLE command to the named device\n" "standby send the ATA STANDBY command to the named device\n" "sleep send the ATA SLEEP command to the named device\n" @@ -7498,6 +7904,16 @@ usage(int printlong) "-r run in report only mode\n" "-w don't send immediate format command\n" "-y don't ask any questions\n" +"sanitize arguments:\n" +"-a operation operation mode: overwrite, block, crypto or exitfailure\n" +"-c passes overwrite passes to perform (1 to 31)\n" +"-I invert overwrite pattern after each pass\n" +"-P pattern path to overwrite pattern file\n" +"-q be quiet, don't print status messages\n" +"-r run in report only mode\n" +"-U run operation in unrestricted completion exit mode\n" +"-w don't send immediate sanitize command\n" +"-y don't ask any questions\n" "idle/standby arguments:\n" "-t number of seconds before respective state.\n" "fwdownload arguments:\n" @@ -7860,6 +8276,10 @@ main(int argc, char **argv) arglist & CAM_ARG_VERBOSE, retry_count, timeout, get_disk_type(cam_dev)); break; + case CAM_CMD_SANITIZE: + error = scsisanitize(cam_dev, argc, argv, + combinedopt, retry_count, timeout); + break; #endif /* MINIMALISTIC */ case CAM_CMD_USAGE: usage(1); Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Fri Sep 6 15:17:25 2013 (r255306) +++ head/sys/cam/scsi/scsi_da.c Fri Sep 6 15:19:57 2013 (r255307) @@ -3851,4 +3851,31 @@ scsi_format_unit(struct ccb_scsiio *csio timeout); } +void +scsi_sanitize(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + u_int8_t tag_action, u_int8_t byte2, u_int16_t control, + u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, + u_int32_t timeout) +{ + struct scsi_sanitize *scsi_cmd; + + scsi_cmd = (struct scsi_sanitize *)&csio->cdb_io.cdb_bytes; + scsi_cmd->opcode = SANITIZE; + scsi_cmd->byte2 = byte2; + scsi_cmd->control = control; + scsi_ulto2b(dxfer_len, scsi_cmd->length); + + cam_fill_csio(csio, + retries, + cbfcnp, + /*flags*/ (dxfer_len > 0) ? CAM_DIR_OUT : CAM_DIR_NONE, + tag_action, + data_ptr, + dxfer_len, + sense_len, + sizeof(*scsi_cmd), + timeout); +} + #endif /* _KERNEL */ Modified: head/sys/cam/scsi/scsi_da.h ============================================================================== --- head/sys/cam/scsi/scsi_da.h Fri Sep 6 15:17:25 2013 (r255306) +++ head/sys/cam/scsi/scsi_da.h Fri Sep 6 15:19:57 2013 (r255307) @@ -116,6 +116,31 @@ struct scsi_read_defect_data_10 u_int8_t control; }; +struct scsi_sanitize +{ + u_int8_t opcode; + u_int8_t byte2; +#define SSZ_SERVICE_ACTION_OVERWRITE 0x01 +#define SSZ_SERVICE_ACTION_BLOCK_ERASE 0x02 +#define SSZ_SERVICE_ACTION_CRYPTO_ERASE 0x03 +#define SSZ_SERVICE_ACTION_EXIT_MODE_FAILURE 0x1F +#define SSZ_UNRESTRICTED_EXIT 0x20 +#define SSZ_IMMED 0x80 + u_int8_t reserved[5]; + u_int8_t length[2]; + u_int8_t control; +}; + +struct scsi_sanitize_parameter_list +{ + u_int8_t byte1; +#define SSZPL_INVERT 0x80 + u_int8_t reserved; + u_int8_t length[2]; + /* Variable length initialization pattern. */ +#define SSZPL_MAX_PATTERN_LENGTH 65535 +}; + struct scsi_read_defect_data_12 { u_int8_t opcode; @@ -156,6 +181,7 @@ struct scsi_read_defect_data_12 #define WRITE_AND_VERIFY 0x2e #define VERIFY 0x2f #define READ_DEFECT_DATA_10 0x37 +#define SANITIZE 0x48 #define READ_DEFECT_DATA_12 0xb7 struct format_defect_list_header @@ -508,6 +534,12 @@ void scsi_format_unit(struct ccb_scsiio u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, u_int32_t timeout); +void scsi_sanitize(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + u_int8_t tag_action, u_int8_t byte2, u_int16_t control, + u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, + u_int32_t timeout); + #endif /* !_KERNEL */ __END_DECLS From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 15:41:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 191FF4AB; Fri, 6 Sep 2013 15:41:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 039B02933; Fri, 6 Sep 2013 15:41:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86FfbPC081676; Fri, 6 Sep 2013 15:41:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86Ffbw2081674; Fri, 6 Sep 2013 15:41:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201309061541.r86Ffbw2081674@svn.freebsd.org> From: Alexander Motin Date: Fri, 6 Sep 2013 15:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255309 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 15:41:38 -0000 Author: mav Date: Fri Sep 6 15:41:37 2013 New Revision: 255309 URL: http://svnweb.freebsd.org/changeset/base/255309 Log: Make SES driver adequately react on simple enclosure devices -- read Short Enclosure status to enclosure status field, clear previous state and exit. Modified: head/sys/cam/scsi/scsi_enc_ses.c Modified: head/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- head/sys/cam/scsi/scsi_enc_ses.c Fri Sep 6 15:38:40 2013 (r255308) +++ head/sys/cam/scsi/scsi_enc_ses.c Fri Sep 6 15:41:37 2013 (r255309) @@ -1555,6 +1555,18 @@ ses_process_status(enc_softc_t *enc, str ENC_VLOG(enc, "Enclosure Status Page Too Long\n"); goto out; } + + /* Check for simple enclosure reporting short enclosure status. */ + if (length >= 4 && page->hdr.page_code == SesShortStatus) { + ENC_DLOG(enc, "Got Short Enclosure Status page\n"); + ses->ses_flags &= ~(SES_FLAG_ADDLSTATUS | SES_FLAG_DESC); + ses_cache_free(enc, enc_cache); + enc_cache->enc_status = page->hdr.page_specific_flags; + enc_update_request(enc, SES_PUBLISH_CACHE); + err = 0; + goto out; + } + /* Make sure the length contains at least one header and status */ if (length < (sizeof(*page) + sizeof(*page->elements))) { ENC_VLOG(enc, "Enclosure Status Page Too Short\n"); From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 16:34:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9295F995; Fri, 6 Sep 2013 16:34:10 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7FD292D87; Fri, 6 Sep 2013 16:34:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86GYAo0018448; Fri, 6 Sep 2013 16:34:10 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86GYAHR018445; Fri, 6 Sep 2013 16:34:10 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201309061634.r86GYAHR018445@svn.freebsd.org> From: Bryan Venteicher Date: Fri, 6 Sep 2013 16:34:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255310 - head/sbin/camcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 16:34:10 -0000 Author: bryanv Date: Fri Sep 6 16:34:09 2013 New Revision: 255310 URL: http://svnweb.freebsd.org/changeset/base/255310 Log: Add firmware downloading support for Samsung drives Tested on Samsung SM1625 SSDs. Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/fwdownload.c Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Fri Sep 6 15:41:37 2013 (r255309) +++ head/sbin/camcontrol/camcontrol.8 Fri Sep 6 16:34:09 2013 (r255310) @@ -1423,6 +1423,8 @@ PLEXTOR .It QUANTUM .It +SAMSUNG +.It SEAGATE .El .Pp Modified: head/sbin/camcontrol/fwdownload.c ============================================================================== --- head/sbin/camcontrol/fwdownload.c Fri Sep 6 15:41:37 2013 (r255309) +++ head/sbin/camcontrol/fwdownload.c Fri Sep 6 16:34:09 2013 (r255310) @@ -77,6 +77,7 @@ typedef enum { VENDOR_PLEXTOR, VENDOR_QUALSTAR, VENDOR_QUANTUM, + VENDOR_SAMSUNG, VENDOR_SEAGATE, VENDOR_UNKNOWN } fw_vendor_t; @@ -98,6 +99,7 @@ static const struct fw_vendor vendors_li {VENDOR_PLEXTOR, "PLEXTOR", 0x2000, 0x04, 0x05, 0, 1}, {VENDOR_QUALSTAR, "QUALSTAR", 0x2030, 0x05, 0x05, 0, 0}, {VENDOR_QUANTUM, "QUANTUM", 0x2000, 0x04, 0x05, 0, 1}, + {VENDOR_SAMSUNG, "SAMSUNG", 0x8000, 0x07, 0x07, 0, 1}, {VENDOR_SEAGATE, "SEAGATE", 0x8000, 0x07, 0x07, 0, 1}, /* the next 2 are SATA disks going through SAS HBA */ {VENDOR_SEAGATE, "ATA ST", 0x8000, 0x07, 0x07, 0, 1}, From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 16:48:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E64D4FB2; Fri, 6 Sep 2013 16:48:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D2F502E8C; Fri, 6 Sep 2013 16:48:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86GmYcZ026881; Fri, 6 Sep 2013 16:48:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86GmY79026880; Fri, 6 Sep 2013 16:48:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309061648.r86GmY79026880@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 6 Sep 2013 16:48:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255311 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 16:48:35 -0000 Author: kib Date: Fri Sep 6 16:48:34 2013 New Revision: 255311 URL: http://svnweb.freebsd.org/changeset/base/255311 Log: In pmap_ts_referenced(), when restarting the loop due to pv list generation changed, do not drop and immediately relock the pv list. Suggested and reviewed by: alc Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Sep 6 16:34:09 2013 (r255310) +++ head/sys/amd64/amd64/pmap.c Fri Sep 6 16:48:34 2013 (r255311) @@ -5086,8 +5086,8 @@ pmap_ts_referenced(vm_page_t m) lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); rtval = 0; -retry: rw_wlock(lock); +retry: if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, pvn) { @@ -5099,7 +5099,6 @@ retry: rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); goto retry; } } @@ -5154,7 +5153,6 @@ small_mappings: if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); goto retry; } } From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 16:53:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7C5362F5; Fri, 6 Sep 2013 16:53:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 598BB2EF0; Fri, 6 Sep 2013 16:53:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86GrnQB031103; Fri, 6 Sep 2013 16:53:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86GrnVd031102; Fri, 6 Sep 2013 16:53:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201309061653.r86GrnVd031102@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 6 Sep 2013 16:53:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255312 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 16:53:49 -0000 Author: kib Date: Fri Sep 6 16:53:48 2013 New Revision: 255312 URL: http://svnweb.freebsd.org/changeset/base/255312 Log: Only lock pvh_global_lock read-only for pmap_page_wired_mappings(), pmap_is_modified() and pmap_is_referenced(), same as it was done for pmap_ts_referenced(). Consolidate identical code for pmap_is_modified() and pmap_is_referenced() into helper pmap_page_test_mappings(). Reviewed by: alc Tested by: pho (previous version) Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Sep 6 16:48:34 2013 (r255311) +++ head/sys/amd64/amd64/pmap.c Fri Sep 6 16:53:48 2013 (r255312) @@ -315,7 +315,6 @@ static void pmap_pv_promote_pde(pmap_t p static void pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va); static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, vm_offset_t va); -static int pmap_pvh_wired_mappings(struct md_page *pvh, int count); static int pmap_change_attr_locked(vm_offset_t va, vm_size_t size, int mode); static boolean_t pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); @@ -329,8 +328,6 @@ static vm_page_t pmap_enter_quick_locked vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); -static boolean_t pmap_is_modified_pvh(struct md_page *pvh); -static boolean_t pmap_is_referenced_pvh(struct md_page *pvh); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits); @@ -4604,42 +4601,61 @@ pmap_page_exists_quick(pmap_t pmap, vm_p int pmap_page_wired_mappings(vm_page_t m) { - int count; - - count = 0; - if ((m->oflags & VPO_UNMANAGED) != 0) - return (count); - rw_wlock(&pvh_global_lock); - count = pmap_pvh_wired_mappings(&m->md, count); - if ((m->flags & PG_FICTITIOUS) == 0) { - count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), - count); - } - rw_wunlock(&pvh_global_lock); - return (count); -} - -/* - * pmap_pvh_wired_mappings: - * - * Return the updated number "count" of managed mappings that are wired. - */ -static int -pmap_pvh_wired_mappings(struct md_page *pvh, int count) -{ + struct rwlock *lock; + struct md_page *pvh; pmap_t pmap; pt_entry_t *pte; pv_entry_t pv; + int count, md_gen, pvh_gen; - rw_assert(&pvh_global_lock, RA_WLOCKED); - TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { + if ((m->oflags & VPO_UNMANAGED) != 0) + return (0); + rw_rlock(&pvh_global_lock); + lock = VM_PAGE_TO_PV_LIST_LOCK(m); + rw_rlock(lock); +restart: + count = 0; + TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { pmap = PV_PMAP(pv); - PMAP_LOCK(pmap); + if (!PMAP_TRYLOCK(pmap)) { + md_gen = m->md.pv_gen; + rw_runlock(lock); + PMAP_LOCK(pmap); + rw_rlock(lock); + if (md_gen != m->md.pv_gen) { + PMAP_UNLOCK(pmap); + goto restart; + } + } pte = pmap_pte(pmap, pv->pv_va); if ((*pte & PG_W) != 0) count++; PMAP_UNLOCK(pmap); } + if ((m->flags & PG_FICTITIOUS) == 0) { + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { + pmap = PV_PMAP(pv); + if (!PMAP_TRYLOCK(pmap)) { + md_gen = m->md.pv_gen; + pvh_gen = pvh->pv_gen; + rw_runlock(lock); + PMAP_LOCK(pmap); + rw_rlock(lock); + if (md_gen != m->md.pv_gen || + pvh_gen != pvh->pv_gen) { + PMAP_UNLOCK(pmap); + goto restart; + } + } + pte = pmap_pde(pmap, pv->pv_va); + if ((*pte & PG_W) != 0) + count++; + PMAP_UNLOCK(pmap); + } + } + rw_runlock(lock); + rw_runlock(&pvh_global_lock); return (count); } @@ -4835,6 +4851,69 @@ pmap_remove_pages(pmap_t pmap) pmap_free_zero_pages(&free); } +static boolean_t +pmap_page_test_mappings(vm_page_t m, pt_entry_t mask) +{ + struct rwlock *lock; + pv_entry_t pv; + struct md_page *pvh; + pt_entry_t *pte; + pmap_t pmap; + int md_gen, pvh_gen; + boolean_t rv; + + rv = FALSE; + rw_rlock(&pvh_global_lock); + lock = VM_PAGE_TO_PV_LIST_LOCK(m); + rw_rlock(lock); +restart: + TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { + pmap = PV_PMAP(pv); + if (!PMAP_TRYLOCK(pmap)) { + md_gen = m->md.pv_gen; + rw_runlock(lock); + PMAP_LOCK(pmap); + rw_rlock(lock); + if (md_gen != m->md.pv_gen) { + PMAP_UNLOCK(pmap); + goto restart; + } + } + pte = pmap_pte(pmap, pv->pv_va); + rv = (*pte & mask) == mask; + PMAP_UNLOCK(pmap); + if (rv) + goto out; + } + if ((m->flags & PG_FICTITIOUS) == 0) { + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { + pmap = PV_PMAP(pv); + if (!PMAP_TRYLOCK(pmap)) { + md_gen = m->md.pv_gen; + pvh_gen = pvh->pv_gen; + rw_runlock(lock); + PMAP_LOCK(pmap); + rw_rlock(lock); + if (md_gen != m->md.pv_gen || + pvh_gen != pvh->pv_gen) { + PMAP_UNLOCK(pmap); + goto restart; + } + } + pte = pmap_pde(pmap, pv->pv_va); + rv = (*pte & mask) == mask; + PMAP_UNLOCK(pmap); + if (rv) + goto out; + } + } +out: + rw_runlock(lock); + rw_runlock(&pvh_global_lock); + return (rv); +} + /* * pmap_is_modified: * @@ -4844,7 +4923,6 @@ pmap_remove_pages(pmap_t pmap) boolean_t pmap_is_modified(vm_page_t m) { - boolean_t rv; KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_is_modified: page %p is not managed", m)); @@ -4857,39 +4935,7 @@ pmap_is_modified(vm_page_t m) VM_OBJECT_ASSERT_WLOCKED(m->object); if (!vm_page_xbusied(m) && (m->aflags & PGA_WRITEABLE) == 0) return (FALSE); - rw_wlock(&pvh_global_lock); - rv = pmap_is_modified_pvh(&m->md) || - ((m->flags & PG_FICTITIOUS) == 0 && - pmap_is_modified_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); - rw_wunlock(&pvh_global_lock); - return (rv); -} - -/* - * Returns TRUE if any of the given mappings were used to modify - * physical memory. Otherwise, returns FALSE. Both page and 2mpage - * mappings are supported. - */ -static boolean_t -pmap_is_modified_pvh(struct md_page *pvh) -{ - pv_entry_t pv; - pt_entry_t *pte; - pmap_t pmap; - boolean_t rv; - - rw_assert(&pvh_global_lock, RA_WLOCKED); - rv = FALSE; - TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { - pmap = PV_PMAP(pv); - PMAP_LOCK(pmap); - pte = pmap_pte(pmap, pv->pv_va); - rv = (*pte & (PG_M | PG_RW)) == (PG_M | PG_RW); - PMAP_UNLOCK(pmap); - if (rv) - break; - } - return (rv); + return (pmap_page_test_mappings(m, PG_M | PG_RW)); } /* @@ -4925,42 +4971,10 @@ pmap_is_prefaultable(pmap_t pmap, vm_off boolean_t pmap_is_referenced(vm_page_t m) { - boolean_t rv; KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_is_referenced: page %p is not managed", m)); - rw_wlock(&pvh_global_lock); - rv = pmap_is_referenced_pvh(&m->md) || - ((m->flags & PG_FICTITIOUS) == 0 && - pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); - rw_wunlock(&pvh_global_lock); - return (rv); -} - -/* - * Returns TRUE if any of the given mappings were referenced and FALSE - * otherwise. Both page and 2mpage mappings are supported. - */ -static boolean_t -pmap_is_referenced_pvh(struct md_page *pvh) -{ - pv_entry_t pv; - pt_entry_t *pte; - pmap_t pmap; - boolean_t rv; - - rw_assert(&pvh_global_lock, RA_WLOCKED); - rv = FALSE; - TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { - pmap = PV_PMAP(pv); - PMAP_LOCK(pmap); - pte = pmap_pte(pmap, pv->pv_va); - rv = (*pte & (PG_A | PG_V)) == (PG_A | PG_V); - PMAP_UNLOCK(pmap); - if (rv) - break; - } - return (rv); + return (pmap_page_test_mappings(m, PG_A | PG_V)); } /* From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 17:08:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D199DB07; Fri, 6 Sep 2013 17:08:37 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-lb0-x22a.google.com (mail-lb0-x22a.google.com [IPv6:2a00:1450:4010:c04::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1C542FC8; Fri, 6 Sep 2013 17:08:36 +0000 (UTC) Received: by mail-lb0-f170.google.com with SMTP id w7so3144214lbi.1 for ; Fri, 06 Sep 2013 10:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=1/JuLOUlWCuBWY5oSqZ/VcasqhQfboOe1fatfHUTsrE=; b=Ym7qKc2oqB/weJkzfSATf3TYXQjnkRYhv+Txqoe+1NhAdr8053pNUDA0KBKb8kX0Av 2YAHJgkqeiBeko0SSFigPFy+dKxeL7lfipRV0uhNoyuJ7c1Wco7aBApvdIYMUGTb8a+G DEBr4nAohNXAytdzIM372MBpmm8Razw1/TiyyflfyHqXgTSdGzxn+//cIY5MnfdoRMI9 0W1/4kpeW5+32tLCsUSjHRcYzFqgq1gK6yaAJmfCFYS6fsH0P1IC7c3fc6vJ118fXMPh Hq/6v0+7I18S9rgdxYqZneQ0jYAUNNV0Gfvbv496OsETLiWWL0EFBtSFTaHWZUdL2m84 zReA== MIME-Version: 1.0 X-Received: by 10.152.115.176 with SMTP id jp16mr3009085lab.17.1378487314512; Fri, 06 Sep 2013 10:08:34 -0700 (PDT) Sender: rizzo.unipi@gmail.com Received: by 10.114.200.165 with HTTP; Fri, 6 Sep 2013 10:08:34 -0700 (PDT) In-Reply-To: <201309060537.r865boJN013504@svn.freebsd.org> References: <201309060537.r865boJN013504@svn.freebsd.org> Date: Fri, 6 Sep 2013 19:08:34 +0200 X-Google-Sender-Auth: IvpVcxCCGafPSHL1V_Sk98SX5Qw Message-ID: Subject: Re: svn commit: r255289 - in head/sys: amd64/amd64 amd64/include ia64/ia64 ia64/include mips/include mips/mips From: Luigi Rizzo To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 17:08:37 -0000 On Fri, Sep 6, 2013 at 7:37 AM, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Sep 6 05:37:49 2013 > New Revision: 255289 > URL: http://svnweb.freebsd.org/changeset/base/255289 > > Log: > On those machines, where sf_bufs do not represent any real object, make > sf_buf_alloc()/sf_buf_free() inlines, to save two calls to an absolutely > empty functions. > this seems to break the build WITHOUT_CLANG: cc1: warnings being treated as errors In file included from /usr/home/luigi/FreeBSD/head/sys/dev/md/md.c:87: /usr/home/luigi/FreeBSD/head/sys/sys/sf_buf.h:69: warning: redundant redeclaration of 'sf_buf_alloc' ./machine/sf_buf.h:46: warning: previous definition of 'sf_buf_alloc' was here /usr/home/luigi/FreeBSD/head/sys/sys/sf_buf.h:70: warning: redundant redeclaration of 'sf_buf_free' ./machine/sf_buf.h:53: warning: previous definition of 'sf_buf_free' was here *** [md.o] Error code 1 I don't know what could be a good way to handle this, maybe make sf_buf_alloc/sf_buf_free/sf_buf_mext prototypes mandatory in machine/sf_buf.h, and use the prototypes here only in the !_KERNEL case ? (and btw do we need sf_buf_mext() in that case ?) cheers luigi I >> do >> here > > *** [md.o] Error code 1 > > > Reviewed by: alc, kib, scottl > Sponsored by: Nginx, Inc. > Sponsored by: Netflix > > Modified: > head/sys/amd64/amd64/vm_machdep.c > head/sys/amd64/include/sf_buf.h > head/sys/ia64/ia64/vm_machdep.c > head/sys/ia64/include/sf_buf.h > head/sys/mips/include/sf_buf.h > head/sys/mips/mips/vm_machdep.c > > Modified: head/sys/amd64/amd64/vm_machdep.c > > ============================================================================== > --- head/sys/amd64/amd64/vm_machdep.c Fri Sep 6 05:20:11 2013 > (r255288) > +++ head/sys/amd64/amd64/vm_machdep.c Fri Sep 6 05:37:49 2013 > (r255289) > @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > #include > #include > @@ -695,27 +694,6 @@ cpu_reset_real() > } > > /* > - * Allocate an sf_buf for the given vm_page. On this machine, however, > there > - * is no sf_buf object. Instead, an opaque pointer to the given vm_page > is > - * returned. > - */ > -struct sf_buf * > -sf_buf_alloc(struct vm_page *m, int pri) > -{ > - > - return ((struct sf_buf *)m); > -} > - > -/* > - * Free the sf_buf. In fact, do nothing because there are no resources > - * associated with the sf_buf. > - */ > -void > -sf_buf_free(struct sf_buf *sf) > -{ > -} > - > -/* > * Software interrupt handler for queued VM system processing. > */ > void > > Modified: head/sys/amd64/include/sf_buf.h > > ============================================================================== > --- head/sys/amd64/include/sf_buf.h Fri Sep 6 05:20:11 2013 > (r255288) > +++ head/sys/amd64/include/sf_buf.h Fri Sep 6 05:37:49 2013 > (r255289) > @@ -41,6 +41,18 @@ > */ > struct sf_buf; > > +static inline struct sf_buf * > +sf_buf_alloc(struct vm_page *m, int pri) > +{ > + > + return ((struct sf_buf *)m); > +} > + > +static inline void > +sf_buf_free(struct sf_buf *sf) > +{ > +} > + > static __inline vm_offset_t > sf_buf_kva(struct sf_buf *sf) > { > > Modified: head/sys/ia64/ia64/vm_machdep.c > > ============================================================================== > --- head/sys/ia64/ia64/vm_machdep.c Fri Sep 6 05:20:11 2013 > (r255288) > +++ head/sys/ia64/ia64/vm_machdep.c Fri Sep 6 05:37:49 2013 > (r255289) > @@ -79,7 +79,6 @@ > #include > #include > #include > -#include > #include > #include > > @@ -353,27 +352,6 @@ cpu_exit(struct thread *td) > } > > /* > - * Allocate an sf_buf for the given vm_page. On this machine, however, > there > - * is no sf_buf object. Instead, an opaque pointer to the given vm_page > is > - * returned. > - */ > -struct sf_buf * > -sf_buf_alloc(struct vm_page *m, int pri) > -{ > - > - return ((struct sf_buf *)m); > -} > - > -/* > - * Free the sf_buf. In fact, do nothing because there are no resources > - * associated with the sf_buf. > - */ > -void > -sf_buf_free(struct sf_buf *sf) > -{ > -} > - > -/* > * Software interrupt handler for queued VM system processing. > */ > void > > Modified: head/sys/ia64/include/sf_buf.h > > ============================================================================== > --- head/sys/ia64/include/sf_buf.h Fri Sep 6 05:20:11 2013 > (r255288) > +++ head/sys/ia64/include/sf_buf.h Fri Sep 6 05:37:49 2013 > (r255289) > @@ -41,6 +41,18 @@ > */ > struct sf_buf; > > +static inline struct sf_buf * > +sf_buf_alloc(struct vm_page *m, int pri) > +{ > + > + return ((struct sf_buf *)m); > +} > + > +static inline void > +sf_buf_free(struct sf_buf *sf) > +{ > +} > + > static __inline vm_page_t > sf_buf_page(struct sf_buf *sf) > { > > Modified: head/sys/mips/include/sf_buf.h > > ============================================================================== > --- head/sys/mips/include/sf_buf.h Fri Sep 6 05:20:11 2013 > (r255288) > +++ head/sys/mips/include/sf_buf.h Fri Sep 6 05:37:49 2013 > (r255289) > @@ -41,6 +41,18 @@ > /* In 64 bit the whole memory is directly mapped */ > struct sf_buf; > > +static inline struct sf_buf * > +sf_buf_alloc(struct vm_page *m, int pri) > +{ > + > + return ((struct sf_buf *)m); > +} > + > +static inline void > +sf_buf_free(struct sf_buf *sf) > +{ > +} > + > static __inline vm_offset_t > sf_buf_kva(struct sf_buf *sf) > { > > Modified: head/sys/mips/mips/vm_machdep.c > > ============================================================================== > --- head/sys/mips/mips/vm_machdep.c Fri Sep 6 05:20:11 2013 > (r255288) > +++ head/sys/mips/mips/vm_machdep.c Fri Sep 6 05:37:49 2013 > (r255289) > @@ -76,7 +76,9 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#ifndef __mips_n64 > #include > +#endif > > #ifndef NSFBUFS > #define NSFBUFS (512 + maxusers * 16) > @@ -523,7 +525,6 @@ sf_buf_init(void *arg) > } > sf_buf_alloc_want = 0; > } > -#endif > > /* > * Get an sf_buf from the freelist. Will block if none are available. > @@ -531,7 +532,6 @@ sf_buf_init(void *arg) > struct sf_buf * > sf_buf_alloc(struct vm_page *m, int flags) > { > -#ifndef __mips_n64 > struct sf_buf *sf; > int error; > > @@ -560,9 +560,6 @@ sf_buf_alloc(struct vm_page *m, int flag > } > mtx_unlock(&sf_freelist.sf_lock); > return (sf); > -#else > - return ((struct sf_buf *)m); > -#endif > } > > /* > @@ -571,7 +568,6 @@ sf_buf_alloc(struct vm_page *m, int flag > void > sf_buf_free(struct sf_buf *sf) > { > -#ifndef __mips_n64 > pmap_qremove(sf->kva, 1); > mtx_lock(&sf_freelist.sf_lock); > SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list); > @@ -579,8 +575,8 @@ sf_buf_free(struct sf_buf *sf) > if (sf_buf_alloc_want > 0) > wakeup(&sf_freelist); > mtx_unlock(&sf_freelist.sf_lock); > -#endif > } > +#endif /* !__mips_n64 */ > > /* > * Software interrupt handler for queued VM system processing. > From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 17:16:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2B66076; Fri, 6 Sep 2013 17:16:34 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 18AB22073; Fri, 6 Sep 2013 17:16:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86HGXQS044946; Fri, 6 Sep 2013 17:16:33 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86HGXJt044945; Fri, 6 Sep 2013 17:16:33 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201309061716.r86HGXJt044945@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 6 Sep 2013 17:16:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255313 - head/release/picobsd/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 17:16:34 -0000 Author: luigi Date: Fri Sep 6 17:16:33 2013 New Revision: 255313 URL: http://svnweb.freebsd.org/changeset/base/255313 Log: r253616 nuked BINMAKE so we need to adapt to the new definition Modified: head/release/picobsd/build/picobsd Modified: head/release/picobsd/build/picobsd ============================================================================== --- head/release/picobsd/build/picobsd Fri Sep 6 16:53:48 2013 (r255312) +++ head/release/picobsd/build/picobsd Fri Sep 6 17:16:33 2013 (r255313) @@ -972,6 +972,8 @@ set_build_parameters() { #-- export MACHINE_ARCH=`uname -m` MACHINE=`uname -m` # export CWARNFLAGS="-Wextra -Wno-sign-compare -Wno-missing-field-initializers" eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\"" + [ "$BINMAKE" = "" ] && \ + eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V SUB_MAKE`\"" fi if [ "${o_init_src}" != "" ] ; then From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 17:18:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1BA531ED; Fri, 6 Sep 2013 17:18:44 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 08EF72086; Fri, 6 Sep 2013 17:18:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86HIhwl045680; Fri, 6 Sep 2013 17:18:43 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86HIhu3045678; Fri, 6 Sep 2013 17:18:43 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201309061718.r86HIhu3045678@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 6 Sep 2013 17:18:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255314 - head/release/picobsd/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 17:18:44 -0000 Author: luigi Date: Fri Sep 6 17:18:43 2013 New Revision: 255314 URL: http://svnweb.freebsd.org/changeset/base/255314 Log: generate multiple host keys and do that unconditionally Modified: head/release/picobsd/build/picobsd Modified: head/release/picobsd/build/picobsd ============================================================================== --- head/release/picobsd/build/picobsd Fri Sep 6 17:16:33 2013 (r255313) +++ head/release/picobsd/build/picobsd Fri Sep 6 17:18:43 2013 (r255314) @@ -693,17 +693,22 @@ populate_mfs_tree() { # rm $a # do not remove! ) || fail $? crunch - if [ -f ${dst}/stand/sshd ] ; then - log "Setting up host key for sshd:" - if [ -f ${BUILDDIR}/floppy.tree/etc/ssh_host_key.gz ] ; then - log "Using existing host key" + log "Setting up host key for sshd:" + for K in rsa1 rsa dsa ; do + if [ $K = rsa1 ] ; then + i=ssh_host_key else - log "Generating new host key" - ssh-keygen -t rsa1 -f ${BUILDDIR}/floppy.tree/etc/ssh_host_key \ - -N "" -C "root@picobsd" - gzip -9 ${BUILDDIR}/floppy.tree/etc/ssh_host_key* || true + i=ssh_host_${K}_key fi - fi + if [ -f ${BUILDDIR}/floppy.tree/etc/$i.gz ] ; then + log "Using existing host key $i" + else + log "Generating new host key $i" + ssh-keygen -t $K -f ${BUILDDIR}/floppy.tree/etc/$i \ + -N "" -C "root@picobsd" + gzip -9 ${BUILDDIR}/floppy.tree/etc/${i}* || true + fi + done log "Copy generic and site-specific MFS tree..." for MFS_TREE in ${PICO_TREE}/mfs_tree ${MY_TREE}/mfs_tree ; do From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 17:19:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C102732E; Fri, 6 Sep 2013 17:19:57 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ADDC92091; Fri, 6 Sep 2013 17:19:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86HJvp9046188; Fri, 6 Sep 2013 17:19:57 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86HJv6E046187; Fri, 6 Sep 2013 17:19:57 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201309061719.r86HJv6E046187@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 6 Sep 2013 17:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255315 - head/release/picobsd/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 17:19:57 -0000 Author: luigi Date: Fri Sep 6 17:19:57 2013 New Revision: 255315 URL: http://svnweb.freebsd.org/changeset/base/255315 Log: comment out some stale loader configurations. Modified: head/release/picobsd/build/picobsd Modified: head/release/picobsd/build/picobsd ============================================================================== --- head/release/picobsd/build/picobsd Fri Sep 6 17:18:43 2013 (r255314) +++ head/release/picobsd/build/picobsd Fri Sep 6 17:19:57 2013 (r255315) @@ -885,9 +885,11 @@ fill_floppy_image() { mkdir -p ${dst}/boot/kernel # XXX loader.conf does not work unless we also load the .4th files - echo "hint.acpi.0.disabled=\"1\"" > ${dst}/boot/loader.conf - echo "console=\"comconsole\"" >> ${dst}/boot/loader.conf - cp -p /boot/loader ${dst}/boot/loader || fail $? no_space "copying bootloader" + # echo "hint.acpi.0.disabled=\"1\"" > ${dst}/boot/loader.conf + # echo "console=\"comconsole\"" >> ${dst}/boot/loader.conf + local blf="loader* *.4th" # loader.rc loader.4th support.4th" + (cd /boot; cp -p loader ${dst}/boot) || fail $? no_space "copying bootloader" + cp ${MY_TREE}/floppy.tree/boot/loader.conf ${dst}/boot || true gzip -c kernel > ${dst}/boot/kernel/kernel.gz || fail $? no_space "copying kernel" # now transfer the floppy tree. If it is already in mfs, dont bother. From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 17:32:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AA77B691; Fri, 6 Sep 2013 17:32:29 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 928892152; Fri, 6 Sep 2013 17:32:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86HWTYL054905; Fri, 6 Sep 2013 17:32:29 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86HWTha054904; Fri, 6 Sep 2013 17:32:29 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201309061732.r86HWTha054904@svn.freebsd.org> From: Jamie Gritton Date: Fri, 6 Sep 2013 17:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255316 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 17:32:29 -0000 Author: jamie Date: Fri Sep 6 17:32:29 2013 New Revision: 255316 URL: http://svnweb.freebsd.org/changeset/base/255316 Log: Keep PRIV_KMEM_READ permitted inside jails as it is on the outside. Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Fri Sep 6 17:19:57 2013 (r255315) +++ head/sys/kern/kern_jail.c Fri Sep 6 17:32:29 2013 (r255316) @@ -3885,6 +3885,13 @@ prison_priv_check(struct ucred *cred, in case PRIV_VFS_SETGID: case PRIV_VFS_STAT: case PRIV_VFS_STICKYFILE: + + /* + * As in the non-jail case, non-root users are expected to be + * able to read kernel/phyiscal memory (provided /dev/[k]mem + * exists in the jail and they have permission to access it). + */ + case PRIV_KMEM_READ: return (0); /* From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 17:44:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 47493A7B; Fri, 6 Sep 2013 17:44:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 31FEE21DC; Fri, 6 Sep 2013 17:44:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86HiFW0061662; Fri, 6 Sep 2013 17:44:15 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86HiEGx061653; Fri, 6 Sep 2013 17:44:14 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309061744.r86HiEGx061653@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 6 Sep 2013 17:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255318 - in head/sys: arm/include i386/include mips/include powerpc/include sparc64/include sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 17:44:15 -0000 Author: glebius Date: Fri Sep 6 17:44:13 2013 New Revision: 255318 URL: http://svnweb.freebsd.org/changeset/base/255318 Log: Fix build with gcc. Move sf_buf_alloc()/sf_buf_free() declarations to MD headers. Modified: head/sys/arm/include/sf_buf.h head/sys/i386/include/sf_buf.h head/sys/mips/include/sf_buf.h head/sys/powerpc/include/sf_buf.h head/sys/sparc64/include/sf_buf.h head/sys/sys/sf_buf.h Modified: head/sys/arm/include/sf_buf.h ============================================================================== --- head/sys/arm/include/sf_buf.h Fri Sep 6 17:42:12 2013 (r255317) +++ head/sys/arm/include/sf_buf.h Fri Sep 6 17:44:13 2013 (r255318) @@ -40,6 +40,8 @@ struct vm_page; struct sf_buf; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) Modified: head/sys/i386/include/sf_buf.h ============================================================================== --- head/sys/i386/include/sf_buf.h Fri Sep 6 17:42:12 2013 (r255317) +++ head/sys/i386/include/sf_buf.h Fri Sep 6 17:44:13 2013 (r255318) @@ -45,6 +45,9 @@ struct sf_buf { #endif }; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); + static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { Modified: head/sys/mips/include/sf_buf.h ============================================================================== --- head/sys/mips/include/sf_buf.h Fri Sep 6 17:42:12 2013 (r255317) +++ head/sys/mips/include/sf_buf.h Fri Sep 6 17:44:13 2013 (r255318) @@ -78,6 +78,9 @@ struct sf_buf { vm_offset_t kva; /* va of mapping */ }; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); + static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { Modified: head/sys/powerpc/include/sf_buf.h ============================================================================== --- head/sys/powerpc/include/sf_buf.h Fri Sep 6 17:42:12 2013 (r255317) +++ head/sys/powerpc/include/sf_buf.h Fri Sep 6 17:44:13 2013 (r255318) @@ -45,6 +45,9 @@ struct sf_buf { int ref_count; /* usage of this mapping */ }; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); + /* * On 32-bit OEA, the only purpose for which sf_buf is used is to implement * an opaque pointer required by the machine-independent parts of the kernel. Modified: head/sys/sparc64/include/sf_buf.h ============================================================================== --- head/sys/sparc64/include/sf_buf.h Fri Sep 6 17:42:12 2013 (r255317) +++ head/sys/sparc64/include/sf_buf.h Fri Sep 6 17:44:13 2013 (r255318) @@ -39,6 +39,9 @@ struct sf_buf { vm_offset_t kva; /* va of mapping */ }; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); + static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { Modified: head/sys/sys/sf_buf.h ============================================================================== --- head/sys/sys/sf_buf.h Fri Sep 6 17:42:12 2013 (r255317) +++ head/sys/sys/sf_buf.h Fri Sep 6 17:44:13 2013 (r255318) @@ -65,9 +65,6 @@ extern counter_u64_t sfstat[sizeof(struc #define SFSTAT_INC(name) SFSTAT_ADD(name, 1) #endif /* _KERNEL */ -struct sf_buf * - sf_buf_alloc(struct vm_page *m, int flags); -void sf_buf_free(struct sf_buf *sf); int sf_buf_mext(struct mbuf *mb, void *addr, void *args); #endif /* !_SYS_SF_BUF_H_ */ From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 18:18:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D161680B; Fri, 6 Sep 2013 18:18:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5BB5E24A2; Fri, 6 Sep 2013 18:18:28 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id r86IIQRq021244; Fri, 6 Sep 2013 22:18:26 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id r86IIQZP021243; Fri, 6 Sep 2013 22:18:26 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 6 Sep 2013 22:18:26 +0400 From: Gleb Smirnoff To: Jamie Gritton Subject: Re: svn commit: r255316 - head/sys/kern Message-ID: <20130906181826.GL4574@FreeBSD.org> References: <201309061732.r86HWTha054904@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201309061732.r86HWTha054904@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 18:18:29 -0000 On Fri, Sep 06, 2013 at 05:32:29PM +0000, Jamie Gritton wrote: J> Author: jamie J> Date: Fri Sep 6 17:32:29 2013 J> New Revision: 255316 J> URL: http://svnweb.freebsd.org/changeset/base/255316 J> J> Log: J> Keep PRIV_KMEM_READ permitted inside jails as it is on the outside. J> J> Modified: J> head/sys/kern/kern_jail.c J> J> Modified: head/sys/kern/kern_jail.c J> ============================================================================== J> --- head/sys/kern/kern_jail.c Fri Sep 6 17:19:57 2013 (r255315) J> +++ head/sys/kern/kern_jail.c Fri Sep 6 17:32:29 2013 (r255316) J> @@ -3885,6 +3885,13 @@ prison_priv_check(struct ucred *cred, in J> case PRIV_VFS_SETGID: J> case PRIV_VFS_STAT: J> case PRIV_VFS_STICKYFILE: J> + J> + /* J> + * As in the non-jail case, non-root users are expected to be J> + * able to read kernel/phyiscal memory (provided /dev/[k]mem J> + * exists in the jail and they have permission to access it). J> + */ J> + case PRIV_KMEM_READ: J> return (0); J> J> /* Was that discussed anywhere or reviewed by anyone? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 18:41:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7D70E2F8; Fri, 6 Sep 2013 18:41:58 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A8972622; Fri, 6 Sep 2013 18:41:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86IfwOM097494; Fri, 6 Sep 2013 18:41:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86IfwPF097492; Fri, 6 Sep 2013 18:41:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201309061841.r86IfwPF097492@svn.freebsd.org> From: Xin LI Date: Fri, 6 Sep 2013 18:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255320 - head/sys/dev/hpt27xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 18:41:58 -0000 Author: delphij Date: Fri Sep 6 18:41:57 2013 New Revision: 255320 URL: http://svnweb.freebsd.org/changeset/base/255320 Log: Return BUS_PROBE_DEFAULT instead of BUS_PROBE_SPECIFIC. This change is a 9.2-RELEASE candidate. Approved by: HighPoint Technologies Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Sep 6 17:51:52 2013 (r255319) +++ head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Sep 6 18:41:57 2013 (r255320) @@ -52,7 +52,7 @@ static int hpt_probe(device_t dev) memset(hba, 0, sizeof(HBA)); hba->ext_type = EXT_TYPE_HBA; hba->ldm_adapter.him = him; - return 0; + return (BUS_PROBE_DEFAULT); } } } From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 18:59:19 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1805EB0A; Fri, 6 Sep 2013 18:59:19 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from m2.gritton.org (gritton.org [199.192.164.235]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E9B0326EE; Fri, 6 Sep 2013 18:59:18 +0000 (UTC) Received: from guppy.corp.verio.net (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by m2.gritton.org (8.14.5/8.14.5) with ESMTP id r86IxBqe092405; Fri, 6 Sep 2013 12:59:12 -0600 (MDT) (envelope-from jamie@FreeBSD.org) Message-ID: <522A25FA.5060008@FreeBSD.org> Date: Fri, 06 Sep 2013 12:59:06 -0600 From: Jamie Gritton User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130807 Thunderbird/17.0.7 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r255316 - head/sys/kern References: <201309061732.r86HWTha054904@svn.freebsd.org> <20130906181826.GL4574@FreeBSD.org> In-Reply-To: <20130906181826.GL4574@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 18:59:19 -0000 On 09/06/13 12:18, Gleb Smirnoff wrote: > On Fri, Sep 06, 2013 at 05:32:29PM +0000, Jamie Gritton wrote: > J> Author: jamie > J> Date: Fri Sep 6 17:32:29 2013 > J> New Revision: 255316 > J> URL: http://svnweb.freebsd.org/changeset/base/255316 > J> > J> Log: > J> Keep PRIV_KMEM_READ permitted inside jails as it is on the outside. > J> > J> Modified: > J> head/sys/kern/kern_jail.c > J> > J> Modified: head/sys/kern/kern_jail.c > J> ============================================================================== > J> --- head/sys/kern/kern_jail.c Fri Sep 6 17:19:57 2013 (r255315) > J> +++ head/sys/kern/kern_jail.c Fri Sep 6 17:32:29 2013 (r255316) > J> @@ -3885,6 +3885,13 @@ prison_priv_check(struct ucred *cred, in > J> case PRIV_VFS_SETGID: > J> case PRIV_VFS_STAT: > J> case PRIV_VFS_STICKYFILE: > J> + > J> + /* > J> + * As in the non-jail case, non-root users are expected to be > J> + * able to read kernel/phyiscal memory (provided /dev/[k]mem > J> + * exists in the jail and they have permission to access it). > J> + */ > J> + case PRIV_KMEM_READ: > J> return (0); > J> > J> /* > > Was that discussed anywhere or reviewed by anyone? Yes, it was brought up by jase@ in src-committers last week, noting that my original PRIV_KMEM_* commit (r252841) broke existing jail behavior. The entire "discussion" was the mention of the problem and my mention of what it would take to fix it. There was no code review as such, but that seemed appropriate for an obvious one-liner. - Jamie From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:08:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5444E2F3; Fri, 6 Sep 2013 20:08:05 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 328B820C4; Fri, 6 Sep 2013 20:08:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86K85Kx048862; Fri, 6 Sep 2013 20:08:05 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86K836C048843; Fri, 6 Sep 2013 20:08:03 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201309062008.r86K836C048843@svn.freebsd.org> From: David Chisnall Date: Fri, 6 Sep 2013 20:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:08:05 -0000 Author: theraven Date: Fri Sep 6 20:08:03 2013 New Revision: 255321 URL: http://svnweb.freebsd.org/changeset/base/255321 Log: On platforms where clang is the default compiler, don't build gcc or libstdc++. To enable them, set WITH_GCC and WITH_GNUCXX in src.conf. Make clang default to using libc++ on FreeBSD 10. Bumped __FreeBSD_version for the change. GCC is still enabled on PC98, because the PC98 bootloader requires GCC to build (or, at least, hard-codes the use of gcc into its build). Thanks to everyone who helped make the ports tree ready for this (and bapt for coordinating them all). Also to imp for reviewing this and working on the forward-porting of the changes in our gcc so that we're getting to a much better place with regard to external toolchains. Sorry to all of the people who helped who I forgot to mention by name. Reviewed by: bapt, imp, dim, ... Added: head/tools/build/options/WITHOUT_GNUCXX (contents, props changed) head/tools/build/options/WITH_GNUCXX (contents, props changed) Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h head/gnu/lib/Makefile head/gnu/usr.bin/cc/Makefile head/share/mk/bsd.own.mk head/sys/sys/param.h Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Fri Sep 6 18:41:57 2013 (r255320) +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Fri Sep 6 20:08:03 2013 (r255321) @@ -1851,6 +1851,38 @@ bool FreeBSD::UseSjLjExceptions() const } } +ToolChain::CXXStdlibType +FreeBSD::GetCXXStdlibType(const ArgList &Args) const { + if (Arg *A = Args.getLastArg(options::OPT_stdlib_EQ)) { + StringRef Value = A->getValue(); + if (Value == "libc++") + return ToolChain::CST_Libcxx; + if (Value == "libstdc++") + return ToolChain::CST_Libstdcxx; + getDriver().Diag(diag::err_drv_invalid_stdlib_name) + << A->getAsString(Args); + } + + return getTriple().getOSMajorVersion() >= 10 ? ToolChain::CST_Libcxx : + ToolChain::CST_Libstdcxx; +} + +void FreeBSD::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, + ArgStringList &CC1Args) const { + if (DriverArgs.hasArg(options::OPT_nostdlibinc) || + DriverArgs.hasArg(options::OPT_nostdincxx)) + return; + + if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) + addSystemInclude(DriverArgs, CC1Args, + getDriver().SysRoot + "/usr/include/c++/v1"); + else + addSystemInclude(DriverArgs, CC1Args, + getDriver().SysRoot + "/usr/include/c++/4.2"); + return; + +} + /// NetBSD - NetBSD tool chain which can call as(1) and ld(1) directly. NetBSD::NetBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Fri Sep 6 18:41:57 2013 (r255320) +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Fri Sep 6 20:08:03 2013 (r255321) @@ -458,9 +458,14 @@ class LLVM_LIBRARY_VISIBILITY FreeBSD : public: FreeBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args); + virtual CXXStdlibType GetCXXStdlibType(const ArgList &Args) const; + virtual bool IsMathErrnoDefault() const { return false; } virtual bool IsObjCNonFragileABIDefault() const { return true; } + virtual void AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, + ArgStringList &CC1Args) const; + virtual bool UseSjLjExceptions() const; protected: virtual Tool *buildAssembler() const; Modified: head/gnu/lib/Makefile ============================================================================== --- head/gnu/lib/Makefile Fri Sep 6 18:41:57 2013 (r255320) +++ head/gnu/lib/Makefile Fri Sep 6 20:08:03 2013 (r255321) @@ -10,7 +10,7 @@ SUBDIR+= libssp # libsupc++ uses libstdc++ headers, although 'make includes' should # have taken care of that already. -.if ${MK_CXX} != "no" +.if ${MK_GNUCXX} != "no" SUBDIR+= libstdc++ libsupc++ .endif Modified: head/gnu/usr.bin/cc/Makefile ============================================================================== --- head/gnu/usr.bin/cc/Makefile Fri Sep 6 18:41:57 2013 (r255320) +++ head/gnu/usr.bin/cc/Makefile Fri Sep 6 20:08:03 2013 (r255321) @@ -12,7 +12,12 @@ SUBDIR+= cpp .endif .if ${MK_CXX} != "no" -SUBDIR+= cc1plus c++ c++filt +.if ${MK_GNUCXX} != "no" +SUBDIR+= cc1plus c++ +.endif +# This should be moved into the above block once c++filt from elftoolchain or +# similar is provided. +SUBDIR+= c++filt .endif .if ${MK_GCOV} != "no" Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Fri Sep 6 18:41:57 2013 (r255320) +++ head/share/mk/bsd.own.mk Fri Sep 6 20:08:03 2013 (r255321) @@ -284,7 +284,6 @@ __DEFAULT_YES_OPTIONS = \ FP_LIBC \ FREEBSD_UPDATE \ GAMES \ - GCC \ GCOV \ GDB \ GNU \ @@ -400,6 +399,11 @@ __T=${TARGET_ARCH} .else __T=${MACHINE_ARCH} .endif +.if defined(TARGET) +__TT=${TARGET} +.else +__TT=${MACHINE_ARCH} +.endif # Clang is only for x86, powerpc and little-endian arm right now, by default. .if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} __DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL @@ -414,8 +418,30 @@ __DEFAULT_NO_OPTIONS+=CLANG CLANG_FULL .if ${__T} == "amd64" || ${__T} == "arm" || ${__T} == "armv6" || \ ${__T} == "i386" __DEFAULT_YES_OPTIONS+=CLANG_IS_CC +# The pc98 bootloader requires gcc to build and so we must leave gcc enabled +# for pc98 for now. +.if ${__TT} == "pc98" +__DEFAULT_NO_OPTIONS+=GNUCXX +__DEFAULT_YES_OPTIONS+=GCC +.else +__DEFAULT_NO_OPTIONS+=GCC GNUCXX +.endif +# The libc++ headers use c++11 extensions. These are normally silenced because +# they are treated as system headers, but we explicitly disable that warning +# suppression when building the base system to catch bugs in our headers. +# Eventually we'll want to start building the base system C++ code as C++11, +# but not yet. +CXXFLAGS+= -Wno-c++11-extensions .else +# If clang is not cc, then build gcc by default __DEFAULT_NO_OPTIONS+=CLANG_IS_CC +__DEFAULT_YES_OPTIONS+=GCC +# And if g++ is c++, build the rest of the GNU C++ stack +.if defined(WITHOUT_CXX) +__DEFAULT_NO_OPTIONS+=GNUCXX +.else +__DEFAULT_YES_OPTIONS+=GNUCXX +.endif .endif # FDT is needed only for arm, mips and powerpc .if ${__T:Marm*} || ${__T:Mpowerpc*} || ${__T:Mmips*} Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Sep 6 18:41:57 2013 (r255320) +++ head/sys/sys/param.h Fri Sep 6 20:08:03 2013 (r255321) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000053 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000054 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Added: head/tools/build/options/WITHOUT_GNUCXX ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_GNUCXX Fri Sep 6 20:08:03 2013 (r255321) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Do not build the GNU C++ stack (g++, libstdc++). +This is the default on platforms where clang is the system compiler. Added: head/tools/build/options/WITH_GNUCXX ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_GNUCXX Fri Sep 6 20:08:03 2013 (r255321) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Build the GNU C++ stack (g++, libstdc++). +This is the default on platforms where gcc is the system compiler. From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:11:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 226B25CA; Fri, 6 Sep 2013 20:11:45 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from anacreon.physics.wisc.edu (unknown [IPv6:2607:f388:101c:0:216:cbff:fe39:3fae]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DFCB52167; Fri, 6 Sep 2013 20:11:44 +0000 (UTC) Received: from anacreon.physics.wisc.edu (localhost [IPv6:::1]) by anacreon.physics.wisc.edu (8.14.7/8.14.7) with ESMTP id r86KBhDm003871; Fri, 6 Sep 2013 15:11:43 -0500 (CDT) (envelope-from nwhitehorn@freebsd.org) Message-ID: <522A36FF.6050209@freebsd.org> Date: Fri, 06 Sep 2013 15:11:43 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD powerpc; rv:17.0) Gecko/20130402 Thunderbird/17.0.4 MIME-Version: 1.0 To: David Chisnall Subject: Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options References: <201309062008.r86K836C048843@svn.freebsd.org> In-Reply-To: <201309062008.r86K836C048843@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:11:45 -0000 On 09/06/13 15:08, David Chisnall wrote: > Author: theraven > Date: Fri Sep 6 20:08:03 2013 > New Revision: 255321 > URL: http://svnweb.freebsd.org/changeset/base/255321 > > Log: > On platforms where clang is the default compiler, don't build gcc or libstdc++. > To enable them, set WITH_GCC and WITH_GNUCXX in src.conf. > Make clang default to using libc++ on FreeBSD 10. > Bumped __FreeBSD_version for the change. > . > > Modified: head/share/mk/bsd.own.mk > ============================================================================== > --- head/share/mk/bsd.own.mk Fri Sep 6 18:41:57 2013 (r255320) > +++ head/share/mk/bsd.own.mk Fri Sep 6 20:08:03 2013 (r255321) > @@ -284,7 +284,6 @@ __DEFAULT_YES_OPTIONS = \ > FP_LIBC \ > FREEBSD_UPDATE \ > GAMES \ > - GCC \ > GCOV \ > GDB \ > GNU \ > @@ -400,6 +399,11 @@ __T=${TARGET_ARCH} > .else > __T=${MACHINE_ARCH} > .endif > +.if defined(TARGET) > +__TT=${TARGET} > +.else > +__TT=${MACHINE_ARCH} > +.endif Don't you mean MACHINE here? Otherwise native builds on pc98 will fail due to: > +# The pc98 bootloader requires gcc to build and so we must leave gcc enabled > +# for pc98 for now. > +.if ${__TT} == "pc98" > +__DEFAULT_NO_OPTIONS+=GNUCXX > +__DEFAULT_YES_OPTIONS+=GCC > +.else > +__DEFAULT_NO_OPTIONS+=GCC GNUCXX > +.endif > this section, where __TT will be "i386" when built natively on pc98 systems. -Nathan From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:23:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 97269D7C; Fri, 6 Sep 2013 20:23:15 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 847B2221E; Fri, 6 Sep 2013 20:23:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86KNFup059224; Fri, 6 Sep 2013 20:23:15 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86KNFOo059223; Fri, 6 Sep 2013 20:23:15 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201309062023.r86KNFOo059223@svn.freebsd.org> From: David Chisnall Date: Fri, 6 Sep 2013 20:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255322 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:23:15 -0000 Author: theraven Date: Fri Sep 6 20:23:15 2013 New Revision: 255322 URL: http://svnweb.freebsd.org/changeset/base/255322 Log: Fix use of MACHINE_ARCH where MACHINE was intended for pc98 detection. Reported by: nwhitehorn Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Fri Sep 6 20:08:03 2013 (r255321) +++ head/share/mk/bsd.own.mk Fri Sep 6 20:23:15 2013 (r255322) @@ -402,7 +402,7 @@ __T=${MACHINE_ARCH} .if defined(TARGET) __TT=${TARGET} .else -__TT=${MACHINE_ARCH} +__TT=${MACHINE} .endif # Clang is only for x86, powerpc and little-endian arm right now, by default. .if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:23:34 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3A3D7EB5; Fri, 6 Sep 2013 20:23:34 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 08EC22221; Fri, 6 Sep 2013 20:23:33 +0000 (UTC) Received: from [192.168.0.2] (cpc27-cmbg15-2-0-cust235.5-4.cable.virginmedia.com [86.27.188.236]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r86KNVIW073805 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 6 Sep 2013 20:23:32 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options From: David Chisnall In-Reply-To: <522A36FF.6050209@freebsd.org> Date: Fri, 6 Sep 2013 21:23:25 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <05156062-6577-458F-AACF-5EA649092ACA@FreeBSD.org> References: <201309062008.r86K836C048843@svn.freebsd.org> <522A36FF.6050209@freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:23:34 -0000 On 6 Sep 2013, at 21:11, Nathan Whitehorn = wrote: > Don't you mean MACHINE here? Otherwise native builds on pc98 will fail > due to: >=20 >> +# The pc98 bootloader requires gcc to build and so we must leave gcc = enabled >> +# for pc98 for now. >> +.if ${__TT} =3D=3D "pc98" >> +__DEFAULT_NO_OPTIONS+=3DGNUCXX >> +__DEFAULT_YES_OPTIONS+=3DGCC >> +.else >> +__DEFAULT_NO_OPTIONS+=3DGCC GNUCXX >> +.endif >>=20 > this section, where __TT will be "i386" when built natively on pc98 > systems. > -Nathan Yes, I think you're right. Thank you. Fixed in 255322. David From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:24:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BF9F0FF1; Fri, 6 Sep 2013 20:24:22 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 94466222A; Fri, 6 Sep 2013 20:24:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86KOMaA059840; Fri, 6 Sep 2013 20:24:22 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86KOMqm059838; Fri, 6 Sep 2013 20:24:22 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201309062024.r86KOMqm059838@svn.freebsd.org> From: Bryan Venteicher Date: Fri, 6 Sep 2013 20:24:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255323 - in head/sys: amd64/conf i386/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:24:22 -0000 Author: bryanv Date: Fri Sep 6 20:24:21 2013 New Revision: 255323 URL: http://svnweb.freebsd.org/changeset/base/255323 Log: Add vmx device to the i386 and amd64 NOTES files Modified: head/sys/amd64/conf/NOTES head/sys/i386/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Fri Sep 6 20:23:15 2013 (r255322) +++ head/sys/amd64/conf/NOTES Fri Sep 6 20:24:21 2013 (r255323) @@ -309,6 +309,7 @@ options DRM_DEBUG # Include debug print # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking # sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters +# vmx: VMware VMXNET3 Ethernet (BSD open source) # wpi: Intel 3945ABG Wireless LAN controller # Requires the wpi firmware module @@ -325,6 +326,7 @@ device mthca # Mellanox HCA InfiniBan device nfe # nVidia nForce MCP on-board Ethernet device nve # nVidia nForce MCP on-board Ethernet Networking device sfxge # Solarflare SFC9000 10Gb Ethernet +device vmx # VMware VMXNET3 Ethernet device wpi # Intel 3945ABG wireless NICs. # IEEE 802.11 adapter firmware modules Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Fri Sep 6 20:23:15 2013 (r255322) +++ head/sys/i386/conf/NOTES Fri Sep 6 20:24:21 2013 (r255323) @@ -580,6 +580,7 @@ hint.mse.0.irq="5" # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking # sbni: Granch SBNI12-xx ISA and PCI adapters +# vmx: VMware VMXNET3 Ethernet (BSD open source) # wl: Lucent Wavelan (ISA card only). # wpi: Intel 3945ABG Wireless LAN controller # Requires the wpi firmware module @@ -629,6 +630,7 @@ hint.sbni.0.at="isa" hint.sbni.0.port="0x210" hint.sbni.0.irq="0xefdead" hint.sbni.0.flags="0" +device vmx # VMware VMXNET3 Ethernet device wl hint.wl.0.at="isa" hint.wl.0.port="0x300" From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:25:13 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B84DF1B8; Fri, 6 Sep 2013 20:25:13 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from anacreon.physics.wisc.edu (unknown [IPv6:2607:f388:101c:0:216:cbff:fe39:3fae]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8184E222F; Fri, 6 Sep 2013 20:25:13 +0000 (UTC) Received: from anacreon.physics.wisc.edu (localhost [IPv6:::1]) by anacreon.physics.wisc.edu (8.14.7/8.14.7) with ESMTP id r86KPCfY003932; Fri, 6 Sep 2013 15:25:12 -0500 (CDT) (envelope-from nwhitehorn@freebsd.org) Message-ID: <522A3A28.4060408@freebsd.org> Date: Fri, 06 Sep 2013 15:25:12 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD powerpc; rv:17.0) Gecko/20130402 Thunderbird/17.0.4 MIME-Version: 1.0 To: David Chisnall Subject: Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options References: <201309062008.r86K836C048843@svn.freebsd.org> <522A36FF.6050209@freebsd.org> <05156062-6577-458F-AACF-5EA649092ACA@FreeBSD.org> In-Reply-To: <05156062-6577-458F-AACF-5EA649092ACA@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:25:13 -0000 On 09/06/13 15:23, David Chisnall wrote: > On 6 Sep 2013, at 21:11, Nathan Whitehorn wrote: > >> Don't you mean MACHINE here? Otherwise native builds on pc98 will fail >> due to: >> >>> +# The pc98 bootloader requires gcc to build and so we must leave gcc enabled >>> +# for pc98 for now. >>> +.if ${__TT} == "pc98" >>> +__DEFAULT_NO_OPTIONS+=GNUCXX >>> +__DEFAULT_YES_OPTIONS+=GCC >>> +.else >>> +__DEFAULT_NO_OPTIONS+=GCC GNUCXX >>> +.endif >>> >> this section, where __TT will be "i386" when built natively on pc98 >> systems. >> -Nathan > Yes, I think you're right. Thank you. Fixed in 255322. > > David > > Thanks! I ran into one other issue with the patch: c++filt continues to be built, but will be removed by make delete-old, which I guess is not intentional. -Nathan From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:26:12 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 81F1030D; Fri, 6 Sep 2013 20:26:12 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4D305223C; Fri, 6 Sep 2013 20:26:11 +0000 (UTC) Received: from [192.168.0.2] (cpc27-cmbg15-2-0-cust235.5-4.cable.virginmedia.com [86.27.188.236]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r86KQ95D073827 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 6 Sep 2013 20:26:10 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options From: David Chisnall In-Reply-To: <522A3A28.4060408@freebsd.org> Date: Fri, 6 Sep 2013 21:26:00 +0100 Content-Transfer-Encoding: 7bit Message-Id: References: <201309062008.r86K836C048843@svn.freebsd.org> <522A36FF.6050209@freebsd.org> <05156062-6577-458F-AACF-5EA649092ACA@FreeBSD.org> <522A3A28.4060408@freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:26:12 -0000 On 6 Sep 2013, at 21:25, Nathan Whitehorn wrote: > Thanks! I ran into one other issue with the patch: c++filt continues to > be built, but will be removed by make delete-old, which I guess is not > intentional. Hmm, no that's not intentional. Why is make delete-old deleting it? David From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:35:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D0B817CE; Fri, 6 Sep 2013 20:35:00 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-qe0-x22f.google.com (mail-qe0-x22f.google.com [IPv6:2607:f8b0:400d:c02::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E25122DB; Fri, 6 Sep 2013 20:35:00 +0000 (UTC) Received: by mail-qe0-f47.google.com with SMTP id b4so1970075qen.34 for ; Fri, 06 Sep 2013 13:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=O+NkvIM+X6WURT0gdjdMU4X/ZmDCd9CTsOEku9Esj8U=; b=0Q/NnTeBquago+Snx8gPjmnDdKGCpQTyOPPTTBelu3aJ9jvJOnqT0NBqcKkB0+3+30 16Do8te/Qpei9EL+EV2F2wCbo+ylrUsr9qmuf3xMzhtmQWZYL3e3ZAoADU1c4Lu24V62 u6ICen59h+TwhzP06Wsf2itp7BL6T7ifIFMNp3foXFMLtDEOc9IMHXydMCOFjui9vPWM PMbgPmyQ8DNfQUrb8hIBsO5d86J7TFgkAXmuGoCiyICL+IHcrt+TobIF0i8R3Xs++qnf fY5xeD2teeqINTfWCfE8VCFwh2EqvdrywhjL4WmUCNY3o+kCOI0qPZuj6WJ/timw+xtV 0agQ== MIME-Version: 1.0 X-Received: by 10.224.2.71 with SMTP id 7mr4037045qai.97.1378499699480; Fri, 06 Sep 2013 13:34:59 -0700 (PDT) Received: by 10.49.63.73 with HTTP; Fri, 6 Sep 2013 13:34:59 -0700 (PDT) In-Reply-To: <201309062008.r86K836C048843@svn.freebsd.org> References: <201309062008.r86K836C048843@svn.freebsd.org> Date: Fri, 6 Sep 2013 13:34:59 -0700 Message-ID: Subject: Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options From: Xin LI To: David Chisnall Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:35:00 -0000 Will this break cross building on 9.x host? I hit this: c++ -O2 -pipe -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/include -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/tools/clang/include -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support -I. -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd10.0\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd10.0\" -DDEFAULT_SYSROOT=\"\" -I/tank/home/delphij/obj/tank/home/delphij/head/tmp/legacy/usr/include -Wno-c++11-extensions -fno-exceptions -fno-rtti -c /tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/APFloat.cpp -o APFloat.o cc1plus: error: unrecognized command line option "-Wno-c++11-extensions" On Fri, Sep 6, 2013 at 1:08 PM, David Chisnall wrote: > Author: theraven > Date: Fri Sep 6 20:08:03 2013 > New Revision: 255321 > URL: http://svnweb.freebsd.org/changeset/base/255321 > > Log: > On platforms where clang is the default compiler, don't build gcc or libstdc++. > To enable them, set WITH_GCC and WITH_GNUCXX in src.conf. > Make clang default to using libc++ on FreeBSD 10. > Bumped __FreeBSD_version for the change. > > GCC is still enabled on PC98, because the PC98 bootloader requires GCC to build > (or, at least, hard-codes the use of gcc into its build). > > Thanks to everyone who helped make the ports tree ready for this (and bapt > for coordinating them all). Also to imp for reviewing this and working on the > forward-porting of the changes in our gcc so that we're getting to a much > better place with regard to external toolchains. > > Sorry to all of the people who helped who I forgot to mention by name. > > Reviewed by: bapt, imp, dim, ... > > Added: > head/tools/build/options/WITHOUT_GNUCXX (contents, props changed) > head/tools/build/options/WITH_GNUCXX (contents, props changed) > Modified: > head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp > head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h > head/gnu/lib/Makefile > head/gnu/usr.bin/cc/Makefile > head/share/mk/bsd.own.mk > head/sys/sys/param.h > > Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp > ============================================================================== > --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Fri Sep 6 18:41:57 2013 (r255320) > +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Fri Sep 6 20:08:03 2013 (r255321) > @@ -1851,6 +1851,38 @@ bool FreeBSD::UseSjLjExceptions() const > } > } > > +ToolChain::CXXStdlibType > +FreeBSD::GetCXXStdlibType(const ArgList &Args) const { > + if (Arg *A = Args.getLastArg(options::OPT_stdlib_EQ)) { > + StringRef Value = A->getValue(); > + if (Value == "libc++") > + return ToolChain::CST_Libcxx; > + if (Value == "libstdc++") > + return ToolChain::CST_Libstdcxx; > + getDriver().Diag(diag::err_drv_invalid_stdlib_name) > + << A->getAsString(Args); > + } > + > + return getTriple().getOSMajorVersion() >= 10 ? ToolChain::CST_Libcxx : > + ToolChain::CST_Libstdcxx; > +} > + > +void FreeBSD::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, > + ArgStringList &CC1Args) const { > + if (DriverArgs.hasArg(options::OPT_nostdlibinc) || > + DriverArgs.hasArg(options::OPT_nostdincxx)) > + return; > + > + if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) > + addSystemInclude(DriverArgs, CC1Args, > + getDriver().SysRoot + "/usr/include/c++/v1"); > + else > + addSystemInclude(DriverArgs, CC1Args, > + getDriver().SysRoot + "/usr/include/c++/4.2"); > + return; > + > +} > + > /// NetBSD - NetBSD tool chain which can call as(1) and ld(1) directly. > > NetBSD::NetBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) > > Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h > ============================================================================== > --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Fri Sep 6 18:41:57 2013 (r255320) > +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Fri Sep 6 20:08:03 2013 (r255321) > @@ -458,9 +458,14 @@ class LLVM_LIBRARY_VISIBILITY FreeBSD : > public: > FreeBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args); > > + virtual CXXStdlibType GetCXXStdlibType(const ArgList &Args) const; > + > virtual bool IsMathErrnoDefault() const { return false; } > virtual bool IsObjCNonFragileABIDefault() const { return true; } > > + virtual void AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, > + ArgStringList &CC1Args) const; > + > virtual bool UseSjLjExceptions() const; > protected: > virtual Tool *buildAssembler() const; > > Modified: head/gnu/lib/Makefile > ============================================================================== > --- head/gnu/lib/Makefile Fri Sep 6 18:41:57 2013 (r255320) > +++ head/gnu/lib/Makefile Fri Sep 6 20:08:03 2013 (r255321) > @@ -10,7 +10,7 @@ SUBDIR+= libssp > > # libsupc++ uses libstdc++ headers, although 'make includes' should > # have taken care of that already. > -.if ${MK_CXX} != "no" > +.if ${MK_GNUCXX} != "no" > SUBDIR+= libstdc++ libsupc++ > .endif > > > Modified: head/gnu/usr.bin/cc/Makefile > ============================================================================== > --- head/gnu/usr.bin/cc/Makefile Fri Sep 6 18:41:57 2013 (r255320) > +++ head/gnu/usr.bin/cc/Makefile Fri Sep 6 20:08:03 2013 (r255321) > @@ -12,7 +12,12 @@ SUBDIR+= cpp > .endif > > .if ${MK_CXX} != "no" > -SUBDIR+= cc1plus c++ c++filt > +.if ${MK_GNUCXX} != "no" > +SUBDIR+= cc1plus c++ > +.endif > +# This should be moved into the above block once c++filt from elftoolchain or > +# similar is provided. > +SUBDIR+= c++filt > .endif > > .if ${MK_GCOV} != "no" > > Modified: head/share/mk/bsd.own.mk > ============================================================================== > --- head/share/mk/bsd.own.mk Fri Sep 6 18:41:57 2013 (r255320) > +++ head/share/mk/bsd.own.mk Fri Sep 6 20:08:03 2013 (r255321) > @@ -284,7 +284,6 @@ __DEFAULT_YES_OPTIONS = \ > FP_LIBC \ > FREEBSD_UPDATE \ > GAMES \ > - GCC \ > GCOV \ > GDB \ > GNU \ > @@ -400,6 +399,11 @@ __T=${TARGET_ARCH} > .else > __T=${MACHINE_ARCH} > .endif > +.if defined(TARGET) > +__TT=${TARGET} > +.else > +__TT=${MACHINE_ARCH} > +.endif > # Clang is only for x86, powerpc and little-endian arm right now, by default. > .if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} > __DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL > @@ -414,8 +418,30 @@ __DEFAULT_NO_OPTIONS+=CLANG CLANG_FULL > .if ${__T} == "amd64" || ${__T} == "arm" || ${__T} == "armv6" || \ > ${__T} == "i386" > __DEFAULT_YES_OPTIONS+=CLANG_IS_CC > +# The pc98 bootloader requires gcc to build and so we must leave gcc enabled > +# for pc98 for now. > +.if ${__TT} == "pc98" > +__DEFAULT_NO_OPTIONS+=GNUCXX > +__DEFAULT_YES_OPTIONS+=GCC > +.else > +__DEFAULT_NO_OPTIONS+=GCC GNUCXX > +.endif > +# The libc++ headers use c++11 extensions. These are normally silenced because > +# they are treated as system headers, but we explicitly disable that warning > +# suppression when building the base system to catch bugs in our headers. > +# Eventually we'll want to start building the base system C++ code as C++11, > +# but not yet. > +CXXFLAGS+= -Wno-c++11-extensions > .else > +# If clang is not cc, then build gcc by default > __DEFAULT_NO_OPTIONS+=CLANG_IS_CC > +__DEFAULT_YES_OPTIONS+=GCC > +# And if g++ is c++, build the rest of the GNU C++ stack > +.if defined(WITHOUT_CXX) > +__DEFAULT_NO_OPTIONS+=GNUCXX > +.else > +__DEFAULT_YES_OPTIONS+=GNUCXX > +.endif > .endif > # FDT is needed only for arm, mips and powerpc > .if ${__T:Marm*} || ${__T:Mpowerpc*} || ${__T:Mmips*} > > Modified: head/sys/sys/param.h > ============================================================================== > --- head/sys/sys/param.h Fri Sep 6 18:41:57 2013 (r255320) > +++ head/sys/sys/param.h Fri Sep 6 20:08:03 2013 (r255321) > @@ -58,7 +58,7 @@ > * in the range 5 to 9. > */ > #undef __FreeBSD_version > -#define __FreeBSD_version 1000053 /* Master, propagated to newvers */ > +#define __FreeBSD_version 1000054 /* Master, propagated to newvers */ > > /* > * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, > > Added: head/tools/build/options/WITHOUT_GNUCXX > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tools/build/options/WITHOUT_GNUCXX Fri Sep 6 20:08:03 2013 (r255321) > @@ -0,0 +1,3 @@ > +.\" $FreeBSD$ > +Do not build the GNU C++ stack (g++, libstdc++). > +This is the default on platforms where clang is the system compiler. > > Added: head/tools/build/options/WITH_GNUCXX > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tools/build/options/WITH_GNUCXX Fri Sep 6 20:08:03 2013 (r255321) > @@ -0,0 +1,3 @@ > +.\" $FreeBSD$ > +Build the GNU C++ stack (g++, libstdc++). > +This is the default on platforms where gcc is the system compiler. -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:40:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E0EA4934; Fri, 6 Sep 2013 20:40:11 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9154922F7; Fri, 6 Sep 2013 20:40:11 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 257574000C; Fri, 6 Sep 2013 22:40:10 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 10DA94001A; Fri, 6 Sep 2013 22:40:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.3.1 X-Spam-Score: 0.0 Received: from mx.daemonic.se (unknown [94.254.45.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id DC8854000C; Fri, 6 Sep 2013 22:40:09 +0200 (CEST) Received: from mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) by mx.daemonic.se (Postfix) with ESMTPS id 3cWrHY4thHz8hVn; Fri, 6 Sep 2013 22:40:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mx.daemonic.se ([IPv6:2001:470:dca9:0:1::3]) (using TLS with cipher CAMELLIA256-SHA) by mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) (amavisd-new, port 10025) with ESMTPS id r-W0Ce5KuvrX; Fri, 6 Sep 2013 22:40:07 +0200 (CEST) Received: from mail.daemonic.se (mail.daemonic.se [10.1.0.4]) by mx.daemonic.se (Postfix) with ESMTPS id 3cWrHW0prfz8hVm; Fri, 6 Sep 2013 22:40:07 +0200 (CEST) Received: from vivi.daemonic.se (vivi.daemonic.se [10.32.0.4]) by mail.daemonic.se (Postfix) with ESMTPSA id 3cWrHV5vPSz9Ctq; Fri, 6 Sep 2013 22:40:06 +0200 (CEST) Message-ID: <522A3DA6.5070004@freebsd.org> Date: Fri, 06 Sep 2013 22:40:06 +0200 From: Niclas Zeising User-Agent: Mutt/1.5.21 MIME-Version: 1.0 To: David Chisnall Subject: Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options References: <201309062008.r86K836C048843@svn.freebsd.org> In-Reply-To: <201309062008.r86K836C048843@svn.freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:40:12 -0000 On 09/06/13 22:08, David Chisnall wrote: > Author: theraven > Date: Fri Sep 6 20:08:03 2013 > New Revision: 255321 > URL: http://svnweb.freebsd.org/changeset/base/255321 > > Log: > On platforms where clang is the default compiler, don't build gcc or libstdc++. > To enable them, set WITH_GCC and WITH_GNUCXX in src.conf. > Make clang default to using libc++ on FreeBSD 10. > Bumped __FreeBSD_version for the change. Please remember to regenerate src.conf(5), or let me know and I'll fix it. Regards! -- Niclas Zeising From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:42:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8535FC0B; Fri, 6 Sep 2013 20:42:15 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 72B542325; Fri, 6 Sep 2013 20:42:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86KgFeh071026; Fri, 6 Sep 2013 20:42:15 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86KgFcK071024; Fri, 6 Sep 2013 20:42:15 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201309062042.r86KgFcK071024@svn.freebsd.org> From: David Chisnall Date: Fri, 6 Sep 2013 20:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255324 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:42:15 -0000 Author: theraven Date: Fri Sep 6 20:42:14 2013 New Revision: 255324 URL: http://svnweb.freebsd.org/changeset/base/255324 Log: Only set -Wno-c++11-extensions if we're building with clang, so bootstrapping clang with gcc doesn't fail. Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Fri Sep 6 20:24:21 2013 (r255323) +++ head/share/mk/bsd.own.mk Fri Sep 6 20:42:14 2013 (r255324) @@ -431,7 +431,10 @@ __DEFAULT_NO_OPTIONS+=GCC GNUCXX # suppression when building the base system to catch bugs in our headers. # Eventually we'll want to start building the base system C++ code as C++11, # but not yet. +_COMPVERSION!= ${CC} --version +.if ${_COMPVERSION:Mclang} CXXFLAGS+= -Wno-c++11-extensions +.endif .else # If clang is not cc, then build gcc by default __DEFAULT_NO_OPTIONS+=CLANG_IS_CC From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:43:11 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0AB80DC8; Fri, 6 Sep 2013 20:43:11 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 97B51232B; Fri, 6 Sep 2013 20:43:10 +0000 (UTC) Received: from [192.168.0.2] (cpc27-cmbg15-2-0-cust235.5-4.cable.virginmedia.com [86.27.188.236]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r86Kh7E7073919 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 6 Sep 2013 20:43:08 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options From: David Chisnall In-Reply-To: Date: Fri, 6 Sep 2013 21:43:01 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201309062008.r86K836C048843@svn.freebsd.org> To: Xin LI X-Mailer: Apple Mail (2.1508) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:43:11 -0000 Thanks for the report. I've now bracketed the extra flag in a check = that we're compiling with clang, which should fix it, so let me know if = it still breaks for you. David On 6 Sep 2013, at 21:34, Xin LI wrote: > Will this break cross building on 9.x host? I hit this: >=20 > c++ -O2 -pipe = -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/i= nclude > = -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/t= ools/clang/include > = -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/l= ib/Support > -I. = -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/.= ./../lib/clang/include > -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS > -D__STDC_CONSTANT_MACROS -fno-strict-aliasing > -DLLVM_DEFAULT_TARGET_TRIPLE=3D\"x86_64-unknown-freebsd10.0\" > -DLLVM_HOST_TRIPLE=3D\"x86_64-unknown-freebsd10.0\" > -DDEFAULT_SYSROOT=3D\"\" > -I/tank/home/delphij/obj/tank/home/delphij/head/tmp/legacy/usr/include > -Wno-c++11-extensions -fno-exceptions -fno-rtti -c > = /tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/lib= /Support/APFloat.cpp > -o APFloat.o > cc1plus: error: unrecognized command line option = "-Wno-c++11-extensions" >=20 > On Fri, Sep 6, 2013 at 1:08 PM, David Chisnall = wrote: >> Author: theraven >> Date: Fri Sep 6 20:08:03 2013 >> New Revision: 255321 >> URL: http://svnweb.freebsd.org/changeset/base/255321 >>=20 >> Log: >> On platforms where clang is the default compiler, don't build gcc or = libstdc++. >> To enable them, set WITH_GCC and WITH_GNUCXX in src.conf. >> Make clang default to using libc++ on FreeBSD 10. >> Bumped __FreeBSD_version for the change. >>=20 >> GCC is still enabled on PC98, because the PC98 bootloader requires = GCC to build >> (or, at least, hard-codes the use of gcc into its build). >>=20 >> Thanks to everyone who helped make the ports tree ready for this = (and bapt >> for coordinating them all). Also to imp for reviewing this and = working on the >> forward-porting of the changes in our gcc so that we're getting to a = much >> better place with regard to external toolchains. >>=20 >> Sorry to all of the people who helped who I forgot to mention by = name. >>=20 >> Reviewed by: bapt, imp, dim, ... >>=20 >> Added: >> head/tools/build/options/WITHOUT_GNUCXX (contents, props changed) >> head/tools/build/options/WITH_GNUCXX (contents, props changed) >> Modified: >> head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp >> head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h >> head/gnu/lib/Makefile >> head/gnu/usr.bin/cc/Makefile >> head/share/mk/bsd.own.mk >> head/sys/sys/param.h >>=20 >> Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Fri = Sep 6 18:41:57 2013 (r255320) >> +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Fri = Sep 6 20:08:03 2013 (r255321) >> @@ -1851,6 +1851,38 @@ bool FreeBSD::UseSjLjExceptions() const >> } >> } >>=20 >> +ToolChain::CXXStdlibType >> +FreeBSD::GetCXXStdlibType(const ArgList &Args) const { >> + if (Arg *A =3D Args.getLastArg(options::OPT_stdlib_EQ)) { >> + StringRef Value =3D A->getValue(); >> + if (Value =3D=3D "libc++") >> + return ToolChain::CST_Libcxx; >> + if (Value =3D=3D "libstdc++") >> + return ToolChain::CST_Libstdcxx; >> + getDriver().Diag(diag::err_drv_invalid_stdlib_name) >> + << A->getAsString(Args); >> + } >> + >> + return getTriple().getOSMajorVersion() >=3D 10 ? = ToolChain::CST_Libcxx : >> + ToolChain::CST_Libstdcxx; >> +} >> + >> +void FreeBSD::AddClangCXXStdlibIncludeArgs(const ArgList = &DriverArgs, >> + ArgStringList &CC1Args) = const { >> + if (DriverArgs.hasArg(options::OPT_nostdlibinc) || >> + DriverArgs.hasArg(options::OPT_nostdincxx)) >> + return; >> + >> + if (GetCXXStdlibType(DriverArgs) =3D=3D ToolChain::CST_Libcxx) >> + addSystemInclude(DriverArgs, CC1Args, >> + getDriver().SysRoot + "/usr/include/c++/v1"); >> + else >> + addSystemInclude(DriverArgs, CC1Args, >> + getDriver().SysRoot + "/usr/include/c++/4.2"); >> + return; >> + >> +} >> + >> /// NetBSD - NetBSD tool chain which can call as(1) and ld(1) = directly. >>=20 >> NetBSD::NetBSD(const Driver &D, const llvm::Triple& Triple, const = ArgList &Args) >>=20 >> Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Fri = Sep 6 18:41:57 2013 (r255320) >> +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Fri = Sep 6 20:08:03 2013 (r255321) >> @@ -458,9 +458,14 @@ class LLVM_LIBRARY_VISIBILITY FreeBSD : >> public: >> FreeBSD(const Driver &D, const llvm::Triple& Triple, const ArgList = &Args); >>=20 >> + virtual CXXStdlibType GetCXXStdlibType(const ArgList &Args) const; >> + >> virtual bool IsMathErrnoDefault() const { return false; } >> virtual bool IsObjCNonFragileABIDefault() const { return true; } >>=20 >> + virtual void AddClangCXXStdlibIncludeArgs(const ArgList = &DriverArgs, >> + ArgStringList &CC1Args) = const; >> + >> virtual bool UseSjLjExceptions() const; >> protected: >> virtual Tool *buildAssembler() const; >>=20 >> Modified: head/gnu/lib/Makefile >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/gnu/lib/Makefile Fri Sep 6 18:41:57 2013 = (r255320) >> +++ head/gnu/lib/Makefile Fri Sep 6 20:08:03 2013 = (r255321) >> @@ -10,7 +10,7 @@ SUBDIR+=3D libssp >>=20 >> # libsupc++ uses libstdc++ headers, although 'make includes' should >> # have taken care of that already. >> -.if ${MK_CXX} !=3D "no" >> +.if ${MK_GNUCXX} !=3D "no" >> SUBDIR+=3D libstdc++ libsupc++ >> .endif >>=20 >>=20 >> Modified: head/gnu/usr.bin/cc/Makefile >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/gnu/usr.bin/cc/Makefile Fri Sep 6 18:41:57 2013 = (r255320) >> +++ head/gnu/usr.bin/cc/Makefile Fri Sep 6 20:08:03 2013 = (r255321) >> @@ -12,7 +12,12 @@ SUBDIR+=3D cpp >> .endif >>=20 >> .if ${MK_CXX} !=3D "no" >> -SUBDIR+=3D cc1plus c++ c++filt >> +.if ${MK_GNUCXX} !=3D "no" >> +SUBDIR+=3D cc1plus c++ >> +.endif >> +# This should be moved into the above block once c++filt from = elftoolchain or >> +# similar is provided. >> +SUBDIR+=3D c++filt >> .endif >>=20 >> .if ${MK_GCOV} !=3D "no" >>=20 >> Modified: head/share/mk/bsd.own.mk >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/share/mk/bsd.own.mk Fri Sep 6 18:41:57 2013 = (r255320) >> +++ head/share/mk/bsd.own.mk Fri Sep 6 20:08:03 2013 = (r255321) >> @@ -284,7 +284,6 @@ __DEFAULT_YES_OPTIONS =3D \ >> FP_LIBC \ >> FREEBSD_UPDATE \ >> GAMES \ >> - GCC \ >> GCOV \ >> GDB \ >> GNU \ >> @@ -400,6 +399,11 @@ __T=3D${TARGET_ARCH} >> .else >> __T=3D${MACHINE_ARCH} >> .endif >> +.if defined(TARGET) >> +__TT=3D${TARGET} >> +.else >> +__TT=3D${MACHINE_ARCH} >> +.endif >> # Clang is only for x86, powerpc and little-endian arm right now, by = default. >> .if ${__T} =3D=3D "amd64" || ${__T} =3D=3D "i386" || ${__T:Mpowerpc*} >> __DEFAULT_YES_OPTIONS+=3DCLANG CLANG_FULL >> @@ -414,8 +418,30 @@ __DEFAULT_NO_OPTIONS+=3DCLANG CLANG_FULL >> .if ${__T} =3D=3D "amd64" || ${__T} =3D=3D "arm" || ${__T} =3D=3D = "armv6" || \ >> ${__T} =3D=3D "i386" >> __DEFAULT_YES_OPTIONS+=3DCLANG_IS_CC >> +# The pc98 bootloader requires gcc to build and so we must leave gcc = enabled >> +# for pc98 for now. >> +.if ${__TT} =3D=3D "pc98" >> +__DEFAULT_NO_OPTIONS+=3DGNUCXX >> +__DEFAULT_YES_OPTIONS+=3DGCC >> +.else >> +__DEFAULT_NO_OPTIONS+=3DGCC GNUCXX >> +.endif >> +# The libc++ headers use c++11 extensions. These are normally = silenced because >> +# they are treated as system headers, but we explicitly disable that = warning >> +# suppression when building the base system to catch bugs in our = headers. >> +# Eventually we'll want to start building the base system C++ code = as C++11, >> +# but not yet. >> +CXXFLAGS+=3D -Wno-c++11-extensions >> .else >> +# If clang is not cc, then build gcc by default >> __DEFAULT_NO_OPTIONS+=3DCLANG_IS_CC >> +__DEFAULT_YES_OPTIONS+=3DGCC >> +# And if g++ is c++, build the rest of the GNU C++ stack >> +.if defined(WITHOUT_CXX) >> +__DEFAULT_NO_OPTIONS+=3DGNUCXX >> +.else >> +__DEFAULT_YES_OPTIONS+=3DGNUCXX >> +.endif >> .endif >> # FDT is needed only for arm, mips and powerpc >> .if ${__T:Marm*} || ${__T:Mpowerpc*} || ${__T:Mmips*} >>=20 >> Modified: head/sys/sys/param.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/sys/param.h Fri Sep 6 18:41:57 2013 = (r255320) >> +++ head/sys/sys/param.h Fri Sep 6 20:08:03 2013 = (r255321) >> @@ -58,7 +58,7 @@ >> * in the range 5 to 9. >> */ >> #undef __FreeBSD_version >> -#define __FreeBSD_version 1000053 /* Master, propagated to = newvers */ >> +#define __FreeBSD_version 1000054 /* Master, propagated to = newvers */ >>=20 >> /* >> * __FreeBSD_kernel__ indicates that this system uses the kernel of = FreeBSD, >>=20 >> Added: head/tools/build/options/WITHOUT_GNUCXX >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/tools/build/options/WITHOUT_GNUCXX Fri Sep 6 20:08:03 = 2013 (r255321) >> @@ -0,0 +1,3 @@ >> +.\" $FreeBSD$ >> +Do not build the GNU C++ stack (g++, libstdc++). >> +This is the default on platforms where clang is the system compiler. >>=20 >> Added: head/tools/build/options/WITH_GNUCXX >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/tools/build/options/WITH_GNUCXX Fri Sep 6 20:08:03 = 2013 (r255321) >> @@ -0,0 +1,3 @@ >> +.\" $FreeBSD$ >> +Build the GNU C++ stack (g++, libstdc++). >> +This is the default on platforms where gcc is the system compiler. >=20 >=20 >=20 > --=20 > Xin LI https://www.delphij.net/ > FreeBSD - The Power to Serve! Live free or die From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:46:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4EC4AF26; Fri, 6 Sep 2013 20:46:08 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3CBF6234A; Fri, 6 Sep 2013 20:46:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86Kk89T072510; Fri, 6 Sep 2013 20:46:08 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86Kk8pp072509; Fri, 6 Sep 2013 20:46:08 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201309062046.r86Kk8pp072509@svn.freebsd.org> From: David Chisnall Date: Fri, 6 Sep 2013 20:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255325 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:46:08 -0000 Author: theraven Date: Fri Sep 6 20:46:07 2013 New Revision: 255325 URL: http://svnweb.freebsd.org/changeset/base/255325 Log: Don't delete c++filt when doing a make delete-old if GCC is not built but C++ is. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Sep 6 20:42:14 2013 (r255324) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Sep 6 20:46:07 2013 (r255325) @@ -1546,7 +1546,9 @@ OLD_FILES+=usr/share/man/man8/unstr.8.gz .endif .if ${MK_GCC} == no +.if ${MK_CXX} == no OLD_FILES+=usr/bin/c++filt +.endif OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/bin/gcc OLD_FILES+=usr/bin/gcov From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:46:36 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8A6E9ED; Fri, 6 Sep 2013 20:46:36 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 560BC2350; Fri, 6 Sep 2013 20:46:35 +0000 (UTC) Received: from [192.168.0.2] (cpc27-cmbg15-2-0-cust235.5-4.cable.virginmedia.com [86.27.188.236]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r86KkXKY073959 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 6 Sep 2013 20:46:34 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options From: David Chisnall In-Reply-To: Date: Fri, 6 Sep 2013 21:46:27 +0100 Content-Transfer-Encoding: 7bit Message-Id: References: <201309062008.r86K836C048843@svn.freebsd.org> <522A36FF.6050209@freebsd.org> <05156062-6577-458F-AACF-5EA649092ACA@FreeBSD.org> <522A3A28.4060408@freebsd.org> To: David Chisnall X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Nathan Whitehorn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:46:36 -0000 On 6 Sep 2013, at 21:26, David Chisnall wrote: > On 6 Sep 2013, at 21:25, Nathan Whitehorn wrote: > >> Thanks! I ran into one other issue with the patch: c++filt continues to >> be built, but will be removed by make delete-old, which I guess is not >> intentional. > > Hmm, no that's not intentional. Why is make delete-old deleting it? This should also be fixed now. David From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:46:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B1C111BA; Fri, 6 Sep 2013 20:46:42 +0000 (UTC) (envelope-from mr.kodiak@gmail.com) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 665AC2351; Fri, 6 Sep 2013 20:46:42 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id y16so2646431ieg.26 for ; Fri, 06 Sep 2013 13:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=Febk5K5DQZTY6hDjqd7nJxF1MalYr/UnBM7qYxr3xc0=; b=azrCuc/cUJn1QVcDDf7CShxA5ikf0bpcCsPOMBJzRPIf4WgY4sMgr6ZrNh61BZR4fq likOhxf89M9kjkNIxhAbiiyt3XQKfkiYU9a+01rzJequR4g6F2JqbK+DcyhQ/VFE//7k rbJHiqnELi2Z6EmPYJlk8PIH3a8r96mTCaBw3vjp/TmS+UDtKePH9pi6f94jAtin4wt0 54oEkCNWEObOco9P9vrcwB616pmDp0Fga892e/X0xzVre0VjOJ79hwlFUab4nTKN3qbn wuGECE13XITMkaXxdeFc7yK16yJ1+e4qgy7Qj3Hw83Ykh8n4JAFHZyVFcb6LflG3BN2z 8qww== X-Received: by 10.42.92.84 with SMTP id s20mr1603407icm.63.1378500401516; Fri, 06 Sep 2013 13:46:41 -0700 (PDT) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.6.136 with HTTP; Fri, 6 Sep 2013 13:46:11 -0700 (PDT) In-Reply-To: <201309062024.r86KOMqm059838@svn.freebsd.org> References: <201309062024.r86KOMqm059838@svn.freebsd.org> From: Bryan Venteicher Date: Fri, 6 Sep 2013 15:46:11 -0500 X-Google-Sender-Auth: NDiXPqCtF8RG-iAipHrm3pv3UXc Message-ID: Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf To: Bryan Venteicher Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:46:42 -0000 On Fri, Sep 6, 2013 at 3:24 PM, Bryan Venteicher wrote: > Author: bryanv > Date: Fri Sep 6 20:24:21 2013 > New Revision: 255323 > URL: http://svnweb.freebsd.org/changeset/base/255323 > > Log: > Add vmx device to the i386 and amd64 NOTES files > > FWIW - I'm on the fence about adding vmx to GENERIC for 10.0. IIRC, VMware's vmxnet3 driver returns BUS_PROBE_VENDOR so the two drivers should coexist. This is assuming VMware updates the driver for 10 ... which I'm guessing isn't likely and was a large reason I added this driver in the first place. LMK if anybody has strong thoughts either way. Modified: > head/sys/amd64/conf/NOTES > head/sys/i386/conf/NOTES > > Modified: head/sys/amd64/conf/NOTES > > ============================================================================== > --- head/sys/amd64/conf/NOTES Fri Sep 6 20:23:15 2013 (r255322) > +++ head/sys/amd64/conf/NOTES Fri Sep 6 20:24:21 2013 (r255323) > @@ -309,6 +309,7 @@ options DRM_DEBUG # Include debug print > # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) > # nve: nVidia nForce MCP on-board Ethernet Networking > # sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters > +# vmx: VMware VMXNET3 Ethernet (BSD open source) > # wpi: Intel 3945ABG Wireless LAN controller > # Requires the wpi firmware module > > @@ -325,6 +326,7 @@ device mthca # Mellanox HCA InfiniBan > device nfe # nVidia nForce MCP on-board Ethernet > device nve # nVidia nForce MCP on-board Ethernet > Networking > device sfxge # Solarflare SFC9000 10Gb Ethernet > +device vmx # VMware VMXNET3 Ethernet > device wpi # Intel 3945ABG wireless NICs. > > # IEEE 802.11 adapter firmware modules > > Modified: head/sys/i386/conf/NOTES > > ============================================================================== > --- head/sys/i386/conf/NOTES Fri Sep 6 20:23:15 2013 (r255322) > +++ head/sys/i386/conf/NOTES Fri Sep 6 20:24:21 2013 (r255323) > @@ -580,6 +580,7 @@ hint.mse.0.irq="5" > # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) > # nve: nVidia nForce MCP on-board Ethernet Networking > # sbni: Granch SBNI12-xx ISA and PCI adapters > +# vmx: VMware VMXNET3 Ethernet (BSD open source) > # wl: Lucent Wavelan (ISA card only). > # wpi: Intel 3945ABG Wireless LAN controller > # Requires the wpi firmware module > @@ -629,6 +630,7 @@ hint.sbni.0.at="isa" > hint.sbni.0.port="0x210" > hint.sbni.0.irq="0xefdead" > hint.sbni.0.flags="0" > +device vmx # VMware VMXNET3 Ethernet > device wl > hint.wl.0.at="isa" > hint.wl.0.port="0x300" > From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:48:08 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 51CF0376; Fri, 6 Sep 2013 20:48:08 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 34D54235E; Fri, 6 Sep 2013 20:48:08 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 774311161C; Fri, 6 Sep 2013 13:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1378500487; bh=rB6wYfDB0ZEmpLUF+syVbpiFAIF7AJwvve+SxOgtWjM=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=plVnOtvvfK7MVE64jRDM2DAuCfBCUavjN6J/PDPncBzZcKKl096t5ujGBGfBlRqez awnAJh2Xaf4gqd5X8eRQPaOMsHLtgPPQ2gC0TJFDnjHERFbnV0Wg9aNlaDMyU6MXeM GyQ4tF2pigXaCUo4OiYhZCGSeD/e89wiAJLxzeV4= Message-ID: <522A3F86.30805@delphij.net> Date: Fri, 06 Sep 2013 13:48:06 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: David Chisnall Subject: Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options References: <201309062008.r86K836C048843@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Xin LI X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:48:08 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 09/06/13 13:43, David Chisnall wrote: > Thanks for the report. I've now bracketed the extra flag in a > check that we're compiling with clang, which should fix it, so let > me know if it still breaks for you. That's fast! Thanks, this is fixed now. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBCgAGBQJSKj+GAAoJEG80Jeu8UPuzq2UIAI550OLa2DRRqZ/LuS3BzElX m5J4iUqzbVfY8KSrDR3KcVHH83KVUmHRF2RzEMX+2bQDvIHj7vFrlVu6gtP2SkO9 zFGLwGwuqQ5uTOA979D4wvRvKJEBaKMxvfIUHOkQQYBPX+pPBdImNoE9k2QmulyQ C00mhsv1jc/BxQKoPyFI/jPHlFkSNC9Z+xQpxg3m76vqZ4aATiR0hkuDsOvyt3sL uInTVY60mCb3KNiEL2z9m70B02Ne8SPEdDe5upkVamRS1FE9yr+GCmpcZgkWBoA/ IRHc56N6Spj2MmLAzFz//Dxb+WofGhom00r0X/lwGLv6QWYmOa2x+gihmzslaj8= =y0sw -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:49:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BB1734D7; Fri, 6 Sep 2013 20:49:49 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A8F022374; Fri, 6 Sep 2013 20:49:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86KnnCW074054; Fri, 6 Sep 2013 20:49:49 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86KnnCV074052; Fri, 6 Sep 2013 20:49:49 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201309062049.r86KnnCV074052@svn.freebsd.org> From: Niclas Zeising Date: Fri, 6 Sep 2013 20:49:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255326 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:49:49 -0000 Author: zeising (doc,ports committer) Date: Fri Sep 6 20:49:48 2013 New Revision: 255326 URL: http://svnweb.freebsd.org/changeset/base/255326 Log: Add WITH_GCC alongside WITHOUT_GCC. Remove the comment from WITHOUT_GCC about this not working without an alternate toolchain, we have clang now. Added: head/tools/build/options/WITH_GCC - copied, changed from r255323, head/tools/build/options/WITHOUT_GCC Modified: head/tools/build/options/WITHOUT_GCC Modified: head/tools/build/options/WITHOUT_GCC ============================================================================== --- head/tools/build/options/WITHOUT_GCC Fri Sep 6 20:46:07 2013 (r255325) +++ head/tools/build/options/WITHOUT_GCC Fri Sep 6 20:49:48 2013 (r255326) @@ -1,6 +1,2 @@ .\" $FreeBSD$ -Set to not install gcc and g++. -.Bf -symbolic -The option does not generally work for build targets, unless some alternative -toolchain is enabled. -.Ef +Set to not build and install gcc and g++. Copied and modified: head/tools/build/options/WITH_GCC (from r255323, head/tools/build/options/WITHOUT_GCC) ============================================================================== --- head/tools/build/options/WITHOUT_GCC Fri Sep 6 20:24:21 2013 (r255323, copy source) +++ head/tools/build/options/WITH_GCC Fri Sep 6 20:49:48 2013 (r255326) @@ -1,6 +1,2 @@ .\" $FreeBSD$ -Set to not install gcc and g++. -.Bf -symbolic -The option does not generally work for build targets, unless some alternative -toolchain is enabled. -.Ef +Set to build and install gcc and g++. From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 20:51:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 46313632; Fri, 6 Sep 2013 20:51:16 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 16A7123AD; Fri, 6 Sep 2013 20:51:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86KpFhd076598; Fri, 6 Sep 2013 20:51:15 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86KpFvC076597; Fri, 6 Sep 2013 20:51:15 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201309062051.r86KpFvC076597@svn.freebsd.org> From: Niclas Zeising Date: Fri, 6 Sep 2013 20:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255327 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 20:51:16 -0000 Author: zeising (doc,ports committer) Date: Fri Sep 6 20:51:15 2013 New Revision: 255327 URL: http://svnweb.freebsd.org/changeset/base/255327 Log: Regenerate after unhooking gcc/g++ from the default build for some arches. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Fri Sep 6 20:49:48 2013 (r255326) +++ head/share/man/man5/src.conf.5 Fri Sep 6 20:51:15 2013 (r255327) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 253304 2013-07-12 23:08:44Z bapt .\" $FreeBSD$ -.Dd August 29, 2013 +.Dd September 6, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -471,12 +471,17 @@ Set to not build .\" from FreeBSD: head/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. .It Va WITHOUT_GCC -.\" from FreeBSD: head/tools/build/options/WITHOUT_GCC 222090 2011-05-19 05:13:25Z imp -Set to not install gcc and g++. -.Bf -symbolic -The option does not generally work for build targets, unless some alternative -toolchain is enabled. -.Ef +.\" from FreeBSD: head/tools/build/options/WITHOUT_GCC 255326 2013-09-06 20:49:48Z zeising +Set to not build and install gcc and g++. +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armv6 and i386/i386. +.It Va WITH_GCC +.\" from FreeBSD: head/tools/build/options/WITH_GCC 255326 2013-09-06 20:49:48Z zeising +Set to build and install gcc and g++. +.Pp +It is a default setting on +arm/armeb, arm/armv6eb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCOV .\" from FreeBSD: head/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru Set to not build the @@ -500,6 +505,20 @@ When set, it also enforces the following .It .Va WITHOUT_GNU_SUPPORT .El +.It Va WITHOUT_GNUCXX +.\" from FreeBSD: head/tools/build/options/WITHOUT_GNUCXX 255321 2013-09-06 20:08:03Z theraven +Do not build the GNU C++ stack (g++, libstdc++). +This is the default on platforms where clang is the system compiler. +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armv6, i386/i386 and pc98/i386. +.It Va WITH_GNUCXX +.\" from FreeBSD: head/tools/build/options/WITH_GNUCXX 255321 2013-09-06 20:08:03Z theraven +Build the GNU C++ stack (g++, libstdc++). +This is the default on platforms where gcc is the system compiler. +.Pp +It is a default setting on +arm/armeb, arm/armv6eb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 21:02:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8C783989; Fri, 6 Sep 2013 21:02:07 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 798062439; Fri, 6 Sep 2013 21:02:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86L27vC083001; Fri, 6 Sep 2013 21:02:07 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86L26P1082995; Fri, 6 Sep 2013 21:02:06 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309062102.r86L26P1082995@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 6 Sep 2013 21:02:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255328 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 21:02:07 -0000 Author: jilles Date: Fri Sep 6 21:02:06 2013 New Revision: 255328 URL: http://svnweb.freebsd.org/changeset/base/255328 Log: libc: Use SOCK_CLOEXEC for various internal file descriptors. This change avoids undesirably passing some internal file descriptors to a process created (fork+exec) by another thread. Kernel support for SOCK_CLOEXEC was added in r248534, March 19, 2013. Modified: head/lib/libc/net/getaddrinfo.c head/lib/libc/net/if_nametoindex.c head/lib/libc/net/name6.c head/lib/libc/net/nscachedcli.c Modified: head/lib/libc/net/getaddrinfo.c ============================================================================== --- head/lib/libc/net/getaddrinfo.c Fri Sep 6 20:51:15 2013 (r255327) +++ head/lib/libc/net/getaddrinfo.c Fri Sep 6 21:02:06 2013 (r255328) @@ -831,7 +831,8 @@ set_source(struct ai_order *aio, struct get_port(&ai, "1", 0); /* open a socket to get the source address for the given dst */ - if ((s = _socket(ai.ai_family, ai.ai_socktype, ai.ai_protocol)) < 0) + if ((s = _socket(ai.ai_family, ai.ai_socktype | SOCK_CLOEXEC, + ai.ai_protocol)) < 0) return; /* give up */ if (_connect(s, ai.ai_addr, ai.ai_addrlen) < 0) goto cleanup; @@ -1131,7 +1132,7 @@ explore_null(const struct addrinfo *pai, * filter out AFs that are not supported by the kernel * XXX errno? */ - s = _socket(pai->ai_family, SOCK_DGRAM, 0); + s = _socket(pai->ai_family, SOCK_DGRAM | SOCK_CLOEXEC, 0); if (s < 0) { if (errno != EMFILE) return 0; @@ -1541,18 +1542,19 @@ addrconfig(struct addrinfo *pai) */ af = pai->ai_family; if (af == AF_UNSPEC) { - if ((s = _socket(AF_INET6, SOCK_DGRAM, 0)) < 0) + if ((s = _socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) af = AF_INET; else { _close(s); - if ((s = _socket(AF_INET, SOCK_DGRAM, 0)) < 0) + if ((s = _socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, + 0)) < 0) af = AF_INET6; else _close(s); } } if (af != AF_UNSPEC) { - if ((s = _socket(af, SOCK_DGRAM, 0)) < 0) + if ((s = _socket(af, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) return 0; _close(s); } Modified: head/lib/libc/net/if_nametoindex.c ============================================================================== --- head/lib/libc/net/if_nametoindex.c Fri Sep 6 20:51:15 2013 (r255327) +++ head/lib/libc/net/if_nametoindex.c Fri Sep 6 21:02:06 2013 (r255328) @@ -68,7 +68,7 @@ if_nametoindex(const char *ifname) struct ifaddrs *ifaddrs, *ifa; unsigned int ni; - s = _socket(AF_INET, SOCK_DGRAM, 0); + s = _socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0); if (s != -1) { #ifdef PURIFY memset(&ifr, 0, sizeof(ifr)); Modified: head/lib/libc/net/name6.c ============================================================================== --- head/lib/libc/net/name6.c Fri Sep 6 20:51:15 2013 (r255327) +++ head/lib/libc/net/name6.c Fri Sep 6 21:02:06 2013 (r255328) @@ -235,7 +235,7 @@ getipnodebyname(const char *name, int af if (flags & AI_ADDRCONFIG) { int s; - if ((s = _socket(af, SOCK_DGRAM, 0)) < 0) + if ((s = _socket(af, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) return NULL; /* * TODO: @@ -868,7 +868,8 @@ set_source(struct hp_order *aio, struct } /* open a socket to get the source address for the given dst */ - if ((s = _socket(ss.ss_family, SOCK_DGRAM, IPPROTO_UDP)) < 0) + if ((s = _socket(ss.ss_family, SOCK_DGRAM | SOCK_CLOEXEC, + IPPROTO_UDP)) < 0) return; /* give up */ if (_connect(s, (struct sockaddr *)&ss, ss.ss_len) < 0) goto cleanup; Modified: head/lib/libc/net/nscachedcli.c ============================================================================== --- head/lib/libc/net/nscachedcli.c Fri Sep 6 20:51:15 2013 (r255327) +++ head/lib/libc/net/nscachedcli.c Fri Sep 6 21:02:06 2013 (r255328) @@ -200,7 +200,7 @@ __open_cached_connection(struct cached_c assert(params != NULL); - client_socket = _socket(PF_LOCAL, SOCK_STREAM, 0); + client_socket = _socket(PF_LOCAL, SOCK_STREAM | SOCK_CLOEXEC, 0); client_address.sun_family = PF_LOCAL; strncpy(client_address.sun_path, params->socket_path, sizeof(client_address.sun_path)); From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 21:02:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7C537BB1; Fri, 6 Sep 2013 21:02:44 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4FFEE244D; Fri, 6 Sep 2013 21:02:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86L2iuA083428; Fri, 6 Sep 2013 21:02:44 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86L2iLo083427; Fri, 6 Sep 2013 21:02:44 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201309062102.r86L2iLo083427@svn.freebsd.org> From: Davide Italiano Date: Fri, 6 Sep 2013 21:02:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255329 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 21:02:44 -0000 Author: davide Date: Fri Sep 6 21:02:43 2013 New Revision: 255329 URL: http://svnweb.freebsd.org/changeset/base/255329 Log: Retire netisr.netisr_direct and netisr.netisr_direct_force sysctls. These were used to control/export dispatch policy but they're not anymore. This commit cannot be MFC'ed to 9 because old netstat(9) binary relies on such sysctl to work. On the other hand, there's no real reason to keep'em around in 10. Modified: head/sys/net/netisr.c Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Fri Sep 6 21:02:06 2013 (r255328) +++ head/sys/net/netisr.c Fri Sep 6 21:02:43 2013 (r255329) @@ -154,19 +154,6 @@ SYSCTL_PROC(_net_isr, OID_AUTO, dispatch "netisr dispatch policy"); /* - * These sysctls were used in previous versions to control and export - * dispatch policy state. Now, we provide read-only export via them so that - * older netstat binaries work. At some point they can be garbage collected. - */ -static int netisr_direct_force; -SYSCTL_INT(_net_isr, OID_AUTO, direct_force, CTLFLAG_RD, - &netisr_direct_force, 0, "compat: force direct dispatch"); - -static int netisr_direct; -SYSCTL_INT(_net_isr, OID_AUTO, direct, CTLFLAG_RD, &netisr_direct, 0, - "compat: enable direct dispatch"); - -/* * Allow the administrator to limit the number of threads (CPUs) to use for * netisr. We don't check netisr_maxthreads before creating the thread for * CPU 0, so in practice we ignore values <= 1. This must be set at boot. @@ -338,32 +325,6 @@ netisr_dispatch_policy_from_str(const ch return (EINVAL); } -static void -netisr_dispatch_policy_compat(void) -{ - - switch (netisr_dispatch_policy) { - case NETISR_DISPATCH_DEFERRED: - netisr_direct_force = 0; - netisr_direct = 0; - break; - - case NETISR_DISPATCH_HYBRID: - netisr_direct_force = 0; - netisr_direct = 1; - break; - - case NETISR_DISPATCH_DIRECT: - netisr_direct_force = 1; - netisr_direct = 1; - break; - - default: - panic("%s: unknown policy %u", __func__, - netisr_dispatch_policy); - } -} - static int sysctl_netisr_dispatch_policy(SYSCTL_HANDLER_ARGS) { @@ -379,10 +340,8 @@ sysctl_netisr_dispatch_policy(SYSCTL_HAN &dispatch_policy); if (error == 0 && dispatch_policy == NETISR_DISPATCH_DEFAULT) error = EINVAL; - if (error == 0) { + if (error == 0) netisr_dispatch_policy = dispatch_policy; - netisr_dispatch_policy_compat(); - } } return (error); } @@ -1199,10 +1158,9 @@ netisr_init(void *arg) &dispatch_policy); if (error == 0 && dispatch_policy == NETISR_DISPATCH_DEFAULT) error = EINVAL; - if (error == 0) { + if (error == 0) netisr_dispatch_policy = dispatch_policy; - netisr_dispatch_policy_compat(); - } else + else printf( "%s: invalid dispatch policy %s, using default\n", __func__, tmp); From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 21:26:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EC777620; Fri, 6 Sep 2013 21:26:36 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA2F02747; Fri, 6 Sep 2013 21:26:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86LQasx097287; Fri, 6 Sep 2013 21:26:36 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86LQaaP097286; Fri, 6 Sep 2013 21:26:36 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201309062126.r86LQaaP097286@svn.freebsd.org> From: Bryan Venteicher Date: Fri, 6 Sep 2013 21:26:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255330 - head/sbin/camcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 21:26:37 -0000 Author: bryanv Date: Fri Sep 6 21:26:36 2013 New Revision: 255330 URL: http://svnweb.freebsd.org/changeset/base/255330 Log: Bump .Dd after r255307 and r255310 Requested by: joel Modified: head/sbin/camcontrol/camcontrol.8 Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Fri Sep 6 21:02:43 2013 (r255329) +++ head/sbin/camcontrol/camcontrol.8 Fri Sep 6 21:26:36 2013 (r255330) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 24, 2013 +.Dd September 6, 2013 .Dt CAMCONTROL 8 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 22:17:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 675213BF; Fri, 6 Sep 2013 22:17:05 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 531302D9C; Fri, 6 Sep 2013 22:17:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86MH5W3028287; Fri, 6 Sep 2013 22:17:05 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86MH2M8028267; Fri, 6 Sep 2013 22:17:02 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201309062217.r86MH2M8028267@svn.freebsd.org> From: "Justin T. Gibbs" Date: Fri, 6 Sep 2013 22:17:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255331 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include i386/xen x86/xen xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 22:17:05 -0000 Author: gibbs Date: Fri Sep 6 22:17:02 2013 New Revision: 255331 URL: http://svnweb.freebsd.org/changeset/base/255331 Log: Implement PV IPIs for PVHVM guests and further converge PV and HVM IPI implmementations. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Submitted by: gibbs (misc cleanup, table driven config) Reviewed by: gibbs MFC after: 2 weeks sys/amd64/include/cpufunc.h: sys/amd64/amd64/pmap.c: Move invltlb_globpcid() into cpufunc.h so that it can be used by the Xen HVM version of tlb shootdown IPI handlers. sys/x86/xen/xen_intr.c: sys/xen/xen_intr.h: Rename xen_intr_bind_ipi() to xen_intr_alloc_and_bind_ipi(), and remove the ipi vector parameter. This api allocates an event channel port that can be used for ipi services, but knows nothing of the actual ipi for which that port will be used. Removing the unused argument and cleaning up the comments surrounding its declaration helps clarify its actual role. sys/amd64/amd64/mp_machdep.c: sys/amd64/include/cpu.h: sys/i386/i386/mp_machdep.c: sys/i386/include/cpu.h: Implement a generic framework for amd64 and i386 that allows the implementation of certain CPU management functions to be selected at runtime. Currently this is only used for the ipi send function, which we optimize for Xen when running on a Xen hypervisor, but can easily be expanded to support more operations. sys/x86/xen/hvm.c: Implement Xen PV IPI handlers and operations, replacing native send IPI. sys/amd64/include/pcpu.h: sys/i386/include/pcpu.h: sys/i386/include/smp.h: Remove NR_VIRQS and NR_IPIS from FreeBSD headers. NR_VIRQS is defined already for us in the xen interface files. NR_IPIS is only needed in one file per Xen platform and is easily inferred by the IPI vector table that is defined in those files. sys/i386/xen/mp_machdep.c: Restructure to more closely match the HVM implementation by performing table driven IPI setup. Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/amd64/pmap.c head/sys/amd64/include/cpu.h head/sys/amd64/include/cpufunc.h head/sys/amd64/include/pcpu.h head/sys/i386/i386/mp_machdep.c head/sys/i386/include/cpu.h head/sys/i386/include/pcpu.h head/sys/i386/include/smp.h head/sys/i386/xen/mp_machdep.c head/sys/x86/xen/hvm.c head/sys/x86/xen/xen_intr.c head/sys/xen/xen_intr.h Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/amd64/amd64/mp_machdep.c Fri Sep 6 22:17:02 2013 (r255331) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef XENHVM #include @@ -125,6 +126,11 @@ u_long *ipi_rendezvous_counts[MAXCPU]; static u_long *ipi_hardclock_counts[MAXCPU]; #endif +/* Default cpu_ops implementation. */ +struct cpu_ops cpu_ops = { + .ipi_vectored = lapic_ipi_vectored +}; + extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); extern int pmap_pcid_enabled; @@ -1125,7 +1131,7 @@ ipi_send_cpu(int cpu, u_int ipi) if (old_pending) return; } - lapic_ipi_vectored(ipi, cpu_apic_ids[cpu]); + cpu_ops.ipi_vectored(ipi, cpu_apic_ids[cpu]); } /* @@ -1395,7 +1401,7 @@ ipi_all_but_self(u_int ipi) CPU_OR_ATOMIC(&ipi_nmi_pending, &other_cpus); CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); + cpu_ops.ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } int Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/amd64/amd64/pmap.c Fri Sep 6 22:17:02 2013 (r255331) @@ -254,30 +254,6 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pcid_enab 0, "Is TLB Context ID enabled ?"); int invpcid_works = 0; -/* - * Perform the guaranteed invalidation of all TLB entries. This - * includes the global entries, and entries in all PCIDs, not only the - * current context. The function works both on non-PCID CPUs and CPUs - * with the PCID turned off or on. See IA-32 SDM Vol. 3a 4.10.4.1 - * Operations that Invalidate TLBs and Paging-Structure Caches. - */ -static __inline void -invltlb_globpcid(void) -{ - uint64_t cr4; - - cr4 = rcr4(); - load_cr4(cr4 & ~CR4_PGE); - /* - * Although preemption at this point could be detrimental to - * performance, it would not lead to an error. PG_G is simply - * ignored if CR4.PGE is clear. Moreover, in case this block - * is re-entered, the load_cr4() either above or below will - * modify CR4.PGE flushing the TLB. - */ - load_cr4(cr4 | CR4_PGE); -} - static int pmap_pcid_save_cnt_proc(SYSCTL_HANDLER_ARGS) { Modified: head/sys/amd64/include/cpu.h ============================================================================== --- head/sys/amd64/include/cpu.h Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/amd64/include/cpu.h Fri Sep 6 22:17:02 2013 (r255331) @@ -54,6 +54,17 @@ #define TRAPF_PC(framep) ((framep)->tf_rip) #ifdef _KERNEL +/* + * Struct containing pointers to CPU management functions whose + * implementation is run time selectable. Selection can be made, + * for example, based on detection of a particular CPU variant or + * hypervisor environment. + */ +struct cpu_ops { + void (*ipi_vectored)(u_int, int); +}; + +extern struct cpu_ops cpu_ops; extern char btext[]; extern char etext[]; Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/amd64/include/cpufunc.h Fri Sep 6 22:17:02 2013 (r255331) @@ -461,6 +461,34 @@ invltlb(void) load_cr3(rcr3()); } +#ifndef CR4_PGE +#define CR4_PGE 0x00000080 /* Page global enable */ +#endif + +/* + * Perform the guaranteed invalidation of all TLB entries. This + * includes the global entries, and entries in all PCIDs, not only the + * current context. The function works both on non-PCID CPUs and CPUs + * with the PCID turned off or on. See IA-32 SDM Vol. 3a 4.10.4.1 + * Operations that Invalidate TLBs and Paging-Structure Caches. + */ +static __inline void +invltlb_globpcid(void) +{ + uint64_t cr4; + + cr4 = rcr4(); + load_cr4(cr4 & ~CR4_PGE); + /* + * Although preemption at this point could be detrimental to + * performance, it would not lead to an error. PG_G is simply + * ignored if CR4.PGE is clear. Moreover, in case this block + * is re-entered, the load_cr4() either above or below will + * modify CR4.PGE flushing the TLB. + */ + load_cr4(cr4 | CR4_PGE); +} + /* * TLB flush for an individual page (even if it has PG_G). * Only works on 486+ CPUs (i386 does not have PG_G). Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/amd64/include/pcpu.h Fri Sep 6 22:17:02 2013 (r255331) @@ -33,15 +33,6 @@ #error "sys/cdefs.h is a prerequisite for this file" #endif -#if defined(XEN) || defined(XENHVM) -#ifndef NR_VIRQS -#define NR_VIRQS 24 -#endif -#ifndef NR_IPIS -#define NR_IPIS 2 -#endif -#endif - /* * The SMP parts are setup in pmap.c and locore.s for the BSP, and * mp_machdep.c sets up the data for the AP's to "see" when they awake. Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/i386/i386/mp_machdep.c Fri Sep 6 22:17:02 2013 (r255331) @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef XENHVM #include @@ -170,6 +171,11 @@ u_long *ipi_lazypmap_counts[MAXCPU]; static u_long *ipi_hardclock_counts[MAXCPU]; #endif +/* Default cpu_ops implementation. */ +struct cpu_ops cpu_ops = { + .ipi_vectored = lapic_ipi_vectored +}; + /* * Local data and functions. */ @@ -1209,7 +1215,7 @@ ipi_send_cpu(int cpu, u_int ipi) if (old_pending) return; } - lapic_ipi_vectored(ipi, cpu_apic_ids[cpu]); + cpu_ops.ipi_vectored(ipi, cpu_apic_ids[cpu]); } /* @@ -1460,7 +1466,7 @@ ipi_all_but_self(u_int ipi) CPU_OR_ATOMIC(&ipi_nmi_pending, &other_cpus); CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); + cpu_ops.ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } int Modified: head/sys/i386/include/cpu.h ============================================================================== --- head/sys/i386/include/cpu.h Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/i386/include/cpu.h Fri Sep 6 22:17:02 2013 (r255331) @@ -54,6 +54,17 @@ #define TRAPF_PC(framep) ((framep)->tf_eip) #ifdef _KERNEL +/* + * Struct containing pointers to CPU management functions whose + * implementation is run time selectable. Selection can be made, + * for example, based on detection of a particular CPU variant or + * hypervisor environment. + */ +struct cpu_ops { + void (*ipi_vectored)(u_int, int); +}; + +extern struct cpu_ops cpu_ops; extern char btext[]; extern char etext[]; Modified: head/sys/i386/include/pcpu.h ============================================================================== --- head/sys/i386/include/pcpu.h Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/i386/include/pcpu.h Fri Sep 6 22:17:02 2013 (r255331) @@ -44,15 +44,6 @@ * other processors" */ -#if defined(XEN) || defined(XENHVM) -#ifndef NR_VIRQS -#define NR_VIRQS 24 -#endif -#ifndef NR_IPIS -#define NR_IPIS 2 -#endif -#endif - #if defined(XEN) /* These are peridically updated in shared_info, and then copied here. */ Modified: head/sys/i386/include/smp.h ============================================================================== --- head/sys/i386/include/smp.h Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/i386/include/smp.h Fri Sep 6 22:17:02 2013 (r255331) @@ -84,11 +84,6 @@ void smp_masked_invltlb(cpuset_t mask); #ifdef XEN void ipi_to_irq_init(void); - -#define RESCHEDULE_VECTOR 0 -#define CALL_FUNCTION_VECTOR 1 -#define NR_IPIS 2 - #endif #endif /* !LOCORE */ #endif /* SMP */ Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/i386/xen/mp_machdep.c Fri Sep 6 22:17:02 2013 (r255331) @@ -99,25 +99,37 @@ extern void failsafe_callback(void); extern void pmap_lazyfix_action(void); /*--------------------------- Forward Declarations ---------------------------*/ -static void assign_cpu_ids(void); -static void set_interrupt_apic_ids(void); -static int start_all_aps(void); -static int start_ap(int apic_id); -static void release_aps(void *dummy); +static driver_filter_t smp_reschedule_interrupt; +static driver_filter_t smp_call_function_interrupt; +static void assign_cpu_ids(void); +static void set_interrupt_apic_ids(void); +static int start_all_aps(void); +static int start_ap(int apic_id); +static void release_aps(void *dummy); + +/*---------------------------------- Macros ----------------------------------*/ +#define IPI_TO_IDX(ipi) ((ipi) - APIC_IPI_INTS) /*-------------------------------- Local Types -------------------------------*/ typedef void call_data_func_t(uintptr_t , uintptr_t); -/* - * 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; }; +struct xen_ipi_handler +{ + driver_filter_t *filter; + const char *description; +}; + +enum { + RESCHEDULE_VECTOR, + CALL_FUNCTION_VECTOR, +}; + /*-------------------------------- Global Data -------------------------------*/ static u_int hyperthreading_cpus; static cpuset_t hyperthreading_cpus_mask; @@ -161,8 +173,14 @@ static volatile u_int cpu_ipi_pending[MA static int cpu_logical; static int cpu_cores; +static const struct xen_ipi_handler xen_ipis[] = +{ + [RESCHEDULE_VECTOR] = { smp_reschedule_interrupt, "resched" }, + [CALL_FUNCTION_VECTOR] = { smp_call_function_interrupt,"callfunc" } +}; + /*------------------------------- Per-CPU Data -------------------------------*/ -DPCPU_DEFINE(xen_intr_handle_t, ipi_port[NR_IPIS]); +DPCPU_DEFINE(xen_intr_handle_t, ipi_handle[nitems(xen_ipis)]); DPCPU_DEFINE(struct vcpu_info *, vcpu_info); /*------------------------------ Implementation ------------------------------*/ @@ -362,7 +380,7 @@ iv_lazypmap(uintptr_t a, uintptr_t b) /* * These start from "IPI offset" APIC_IPI_INTS */ -static call_data_func_t *ipi_vectors[] = +static call_data_func_t *ipi_vectors[6] = { iv_rendezvous, iv_invltlb, @@ -427,7 +445,7 @@ smp_call_function_interrupt(void *unused call_data->func_id > IPI_BITMAP_VECTOR) panic("invalid function id %u", call_data->func_id); - func = ipi_vectors[call_data->func_id - APIC_IPI_INTS]; + func = ipi_vectors[IPI_TO_IDX(call_data->func_id)]; /* * Notify initiating CPU that I've grabbed the data and am * about to execute the function @@ -473,44 +491,43 @@ cpu_mp_announce(void) static int xen_smp_cpu_init(unsigned int cpu) { - int rc; - xen_intr_handle_t irq_handle; + xen_intr_handle_t *ipi_handle; + const struct xen_ipi_handler *ipi; + int idx, rc; - DPCPU_ID_SET(cpu, ipi_port[RESCHEDULE_VECTOR], NULL); - DPCPU_ID_SET(cpu, ipi_port[CALL_FUNCTION_VECTOR], NULL); + ipi_handle = DPCPU_ID_GET(cpu, ipi_handle); + for (ipi = xen_ipis, idx = 0; idx < nitems(xen_ipis); ipi++, idx++) { - /* - * The PCPU variable pc_device is not initialized on i386 PV, - * so we have to use the root_bus device in order to setup - * the IPIs. - */ - rc = xen_intr_bind_ipi(root_bus, RESCHEDULE_VECTOR, - cpu, smp_reschedule_interrupt, INTR_TYPE_TTY, &irq_handle); - if (rc < 0) - goto fail; - xen_intr_describe(irq_handle, "resched%u", cpu); - DPCPU_ID_SET(cpu, ipi_port[RESCHEDULE_VECTOR], irq_handle); - - printf("[XEN] IPI cpu=%d port=%d vector=RESCHEDULE_VECTOR (%d)\n", - cpu, xen_intr_port(irq_handle), RESCHEDULE_VECTOR); - - rc = xen_intr_bind_ipi(root_bus, CALL_FUNCTION_VECTOR, - cpu, smp_call_function_interrupt, INTR_TYPE_TTY, &irq_handle); - if (rc < 0) - goto fail; - xen_intr_describe(irq_handle, "callfunc%u", cpu); - DPCPU_ID_SET(cpu, ipi_port[CALL_FUNCTION_VECTOR], irq_handle); + /* + * The PCPU variable pc_device is not initialized on i386 PV, + * so we have to use the root_bus device in order to setup + * the IPIs. + */ + rc = xen_intr_alloc_and_bind_ipi(root_bus, cpu, + ipi->filter, INTR_TYPE_TTY, &ipi_handle[idx]); + if (rc != 0) { + printf("Unable to allocate a XEN IPI port. " + "Error %d\n", rc); + break; + } + xen_intr_describe(ipi_handle[idx], "%s", ipi->description); + } - printf("[XEN] IPI cpu=%d port=%d vector=CALL_FUNCTION_VECTOR (%d)\n", - cpu, xen_intr_port(irq_handle), CALL_FUNCTION_VECTOR); + for (;idx < nitems(xen_ipis); idx++) + ipi_handle[idx] = NULL; - return (0); + if (rc == 0) + return (0); + + /* Either all are successfully mapped, or none at all. */ + for (idx = 0; idx < nitems(xen_ipis); idx++) { + if (ipi_handle[idx] == NULL) + continue; + + xen_intr_unbind(ipi_handle[idx]); + ipi_handle[idx] = NULL; + } - fail: - xen_intr_unbind(DPCPU_ID_GET(cpu, ipi_port[RESCHEDULE_VECTOR])); - DPCPU_ID_SET(cpu, ipi_port[RESCHEDULE_VECTOR], NULL); - xen_intr_unbind(DPCPU_ID_GET(cpu, ipi_port[CALL_FUNCTION_VECTOR])); - DPCPU_ID_SET(cpu, ipi_port[CALL_FUNCTION_VECTOR], NULL); return (rc); } @@ -980,8 +997,8 @@ start_ap(int apic_id) static void ipi_pcpu(int cpu, u_int ipi) { - KASSERT((ipi <= NR_IPIS), ("invalid IPI")); - xen_intr_signal(DPCPU_ID_GET(cpu, ipi_port[ipi])); + KASSERT((ipi <= nitems(xen_ipis)), ("invalid IPI")); + xen_intr_signal(DPCPU_ID_GET(cpu, ipi_handle[ipi])); } /* Modified: head/sys/x86/xen/hvm.c ============================================================================== --- head/sys/x86/xen/hvm.c Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/x86/xen/hvm.c Fri Sep 6 22:17:02 2013 (r255331) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008 Citrix Systems, Inc. + * Copyright (c) 2008, 2013 Citrix Systems, Inc. * Copyright (c) 2012 Spectra Logic Corporation * All rights reserved. * @@ -33,9 +33,19 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include + +#include +#include #include + #include +#include +#include + +#include #include #include @@ -44,30 +54,450 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include - #include #include -static MALLOC_DEFINE(M_XENHVM, "xen_hvm", "Xen HVM PV Support"); +/*--------------------------- Forward Declarations ---------------------------*/ +static driver_filter_t xen_smp_rendezvous_action; +static driver_filter_t xen_invltlb; +static driver_filter_t xen_invlpg; +static driver_filter_t xen_invlrng; +static driver_filter_t xen_invlcache; +#ifdef __i386__ +static driver_filter_t xen_lazypmap; +#endif +static driver_filter_t xen_ipi_bitmap_handler; +static driver_filter_t xen_cpustop_handler; +static driver_filter_t xen_cpususpend_handler; +static driver_filter_t xen_cpustophard_handler; + +/*---------------------------- Extern Declarations ---------------------------*/ +/* Variables used by mp_machdep to perform the MMU related IPIs */ +extern volatile int smp_tlb_wait; +extern vm_offset_t smp_tlb_addr2; +#ifdef __i386__ +extern vm_offset_t smp_tlb_addr1; +#else +extern struct invpcid_descr smp_tlb_invpcid; +extern uint64_t pcid_cr3; +extern int invpcid_works; +extern int pmap_pcid_enabled; +extern pmap_t smp_tlb_pmap; +#endif + +#ifdef __i386__ +extern void pmap_lazyfix_action(void); +#endif -DPCPU_DEFINE(struct vcpu_info, vcpu_local_info); -DPCPU_DEFINE(struct vcpu_info *, vcpu_info); +/*---------------------------------- Macros ----------------------------------*/ +#define IPI_TO_IDX(ipi) ((ipi) - APIC_IPI_INTS) + +/*-------------------------------- Local Types -------------------------------*/ +struct xen_ipi_handler +{ + driver_filter_t *filter; + const char *description; +}; /*-------------------------------- Global Data -------------------------------*/ +enum xen_domain_type xen_domain_type = XEN_NATIVE; + +static MALLOC_DEFINE(M_XENHVM, "xen_hvm", "Xen HVM PV Support"); + +static struct xen_ipi_handler xen_ipis[] = +{ + [IPI_TO_IDX(IPI_RENDEZVOUS)] = { xen_smp_rendezvous_action, "r" }, + [IPI_TO_IDX(IPI_INVLTLB)] = { xen_invltlb, "itlb"}, + [IPI_TO_IDX(IPI_INVLPG)] = { xen_invlpg, "ipg" }, + [IPI_TO_IDX(IPI_INVLRNG)] = { xen_invlrng, "irg" }, + [IPI_TO_IDX(IPI_INVLCACHE)] = { xen_invlcache, "ic" }, +#ifdef __i386__ + [IPI_TO_IDX(IPI_LAZYPMAP)] = { xen_lazypmap, "lp" }, +#endif + [IPI_TO_IDX(IPI_BITMAP_VECTOR)] = { xen_ipi_bitmap_handler, "b" }, + [IPI_TO_IDX(IPI_STOP)] = { xen_cpustop_handler, "st" }, + [IPI_TO_IDX(IPI_SUSPEND)] = { xen_cpususpend_handler, "sp" }, + [IPI_TO_IDX(IPI_STOP_HARD)] = { xen_cpustophard_handler, "sth" }, +}; + /** * If non-zero, the hypervisor has been configured to use a direct * IDT event callback for interrupt injection. */ int xen_vector_callback_enabled; +/*------------------------------- Per-CPU Data -------------------------------*/ +DPCPU_DEFINE(struct vcpu_info, vcpu_local_info); +DPCPU_DEFINE(struct vcpu_info *, vcpu_info); +DPCPU_DEFINE(xen_intr_handle_t, ipi_handle[nitems(xen_ipis)]); + /*------------------ Hypervisor Access Shared Memory Regions -----------------*/ /** Hypercall table accessed via HYPERVISOR_*_op() methods. */ char *hypercall_stubs; shared_info_t *HYPERVISOR_shared_info; -enum xen_domain_type xen_domain_type = XEN_NATIVE; +/*---------------------------- XEN PV IPI Handlers ---------------------------*/ +/* + * This are C clones of the ASM functions found in apic_vector.s + */ +static int +xen_ipi_bitmap_handler(void *arg) +{ + struct trapframe *frame; + + frame = arg; + ipi_bitmap_handler(*frame); + return (FILTER_HANDLED); +} + +static int +xen_smp_rendezvous_action(void *arg) +{ +#ifdef COUNT_IPIS + int cpu; + + cpu = PCPU_GET(cpuid); + (*ipi_rendezvous_counts[cpu])++; +#endif /* COUNT_IPIS */ + + smp_rendezvous_action(); + return (FILTER_HANDLED); +} + +static int +xen_invltlb(void *arg) +{ +#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) + int cpu; + + cpu = PCPU_GET(cpuid); +#ifdef COUNT_XINVLTLB_HITS + xhits_gbl[cpu]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invltlb_counts[cpu])++; +#endif /* COUNT_IPIS */ +#endif /* COUNT_XINVLTLB_HITS || COUNT_IPIS */ + + invltlb(); + atomic_add_int(&smp_tlb_wait, 1); + return (FILTER_HANDLED); +} + +#ifdef __amd64__ +static int +xen_invltlb_pcid(void *arg) +{ + uint64_t cr3; +#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) + int cpu; + + cpu = PCPU_GET(cpuid); +#ifdef COUNT_XINVLTLB_HITS + xhits_gbl[cpu]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invltlb_counts[cpu])++; +#endif /* COUNT_IPIS */ +#endif /* COUNT_XINVLTLB_HITS || COUNT_IPIS */ + + cr3 = rcr3(); + if (smp_tlb_invpcid.pcid != (uint64_t)-1 && + smp_tlb_invpcid.pcid != 0) { + + if (invpcid_works) { + invpcid(&smp_tlb_invpcid, INVPCID_CTX); + } else { + /* Otherwise reload %cr3 twice. */ + if (cr3 != pcid_cr3) { + load_cr3(pcid_cr3); + cr3 |= CR3_PCID_SAVE; + } + load_cr3(cr3); + } + } else { + invltlb_globpcid(); + } + if (smp_tlb_pmap != NULL) + CPU_CLR_ATOMIC(PCPU_GET(cpuid), &smp_tlb_pmap->pm_save); + + atomic_add_int(&smp_tlb_wait, 1); + return (FILTER_HANDLED); +} +#endif + +static int +xen_invlpg(void *arg) +{ +#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) + int cpu; + + cpu = PCPU_GET(cpuid); +#ifdef COUNT_XINVLTLB_HITS + xhits_pg[cpu]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlpg_counts[cpu])++; +#endif /* COUNT_IPIS */ +#endif /* COUNT_XINVLTLB_HITS || COUNT_IPIS */ + +#ifdef __i386__ + invlpg(smp_tlb_addr1); +#else + invlpg(smp_tlb_invpcid.addr); +#endif + atomic_add_int(&smp_tlb_wait, 1); + return (FILTER_HANDLED); +} + +#ifdef __amd64__ +static int +xen_invlpg_pcid(void *arg) +{ +#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) + int cpu; + + cpu = PCPU_GET(cpuid); +#ifdef COUNT_XINVLTLB_HITS + xhits_pg[cpu]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlpg_counts[cpu])++; +#endif /* COUNT_IPIS */ +#endif /* COUNT_XINVLTLB_HITS || COUNT_IPIS */ + + if (invpcid_works) { + invpcid(&smp_tlb_invpcid, INVPCID_ADDR); + } else if (smp_tlb_invpcid.pcid == 0) { + invlpg(smp_tlb_invpcid.addr); + } else if (smp_tlb_invpcid.pcid == (uint64_t)-1) { + invltlb_globpcid(); + } else { + uint64_t cr3; + + /* + * PCID supported, but INVPCID is not. + * Temporarily switch to the target address + * space and do INVLPG. + */ + cr3 = rcr3(); + if (cr3 != pcid_cr3) + load_cr3(pcid_cr3 | CR3_PCID_SAVE); + invlpg(smp_tlb_invpcid.addr); + load_cr3(cr3 | CR3_PCID_SAVE); + } + + atomic_add_int(&smp_tlb_wait, 1); + return (FILTER_HANDLED); +} +#endif + +static inline void +invlpg_range(vm_offset_t start, vm_offset_t end) +{ + do { + invlpg(start); + start += PAGE_SIZE; + } while (start < end); +} + +static int +xen_invlrng(void *arg) +{ + vm_offset_t addr; +#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) + int cpu; + + cpu = PCPU_GET(cpuid); +#ifdef COUNT_XINVLTLB_HITS + xhits_rng[cpu]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlrng_counts[cpu])++; +#endif /* COUNT_IPIS */ +#endif /* COUNT_XINVLTLB_HITS || COUNT_IPIS */ + +#ifdef __i386__ + addr = smp_tlb_addr1; + invlpg_range(addr, smp_tlb_addr2); +#else + addr = smp_tlb_invpcid.addr; + if (pmap_pcid_enabled) { + if (invpcid_works) { + struct invpcid_descr d; + + d = smp_tlb_invpcid; + do { + invpcid(&d, INVPCID_ADDR); + d.addr += PAGE_SIZE; + } while (d.addr < smp_tlb_addr2); + } else if (smp_tlb_invpcid.pcid == 0) { + /* + * kernel pmap - use invlpg to invalidate + * global mapping. + */ + invlpg_range(addr, smp_tlb_addr2); + } else if (smp_tlb_invpcid.pcid != (uint64_t)-1) { + invltlb_globpcid(); + if (smp_tlb_pmap != NULL) { + CPU_CLR_ATOMIC(PCPU_GET(cpuid), + &smp_tlb_pmap->pm_save); + } + } else { + uint64_t cr3; + + cr3 = rcr3(); + if (cr3 != pcid_cr3) + load_cr3(pcid_cr3 | CR3_PCID_SAVE); + invlpg_range(addr, smp_tlb_addr2); + load_cr3(cr3 | CR3_PCID_SAVE); + } + } else { + invlpg_range(addr, smp_tlb_addr2); + } +#endif + + atomic_add_int(&smp_tlb_wait, 1); + return (FILTER_HANDLED); +} + +static int +xen_invlcache(void *arg) +{ +#ifdef COUNT_IPIS + int cpu = PCPU_GET(cpuid); + + cpu = PCPU_GET(cpuid); + (*ipi_invlcache_counts[cpu])++; +#endif /* COUNT_IPIS */ + + wbinvd(); + atomic_add_int(&smp_tlb_wait, 1); + return (FILTER_HANDLED); +} + +#ifdef __i386__ +static int +xen_lazypmap(void *arg) +{ + + pmap_lazyfix_action(); + return (FILTER_HANDLED); +} +#endif + +static int +xen_cpustop_handler(void *arg) +{ + + cpustop_handler(); + return (FILTER_HANDLED); +} + +static int +xen_cpususpend_handler(void *arg) +{ + + cpususpend_handler(); + return (FILTER_HANDLED); +} + +static int +xen_cpustophard_handler(void *arg) +{ + + ipi_nmi_handler(); + return (FILTER_HANDLED); +} + +/* Xen PV IPI sender */ +static void +xen_ipi_vectored(u_int vector, int dest) +{ + xen_intr_handle_t *ipi_handle; + int ipi_idx, to_cpu, self; + + ipi_idx = IPI_TO_IDX(vector); + if (ipi_idx > nitems(xen_ipis)) + panic("IPI out of range"); + + switch(dest) { + case APIC_IPI_DEST_SELF: + ipi_handle = DPCPU_GET(ipi_handle); + xen_intr_signal(ipi_handle[ipi_idx]); + break; + case APIC_IPI_DEST_ALL: + CPU_FOREACH(to_cpu) { + ipi_handle = DPCPU_ID_GET(to_cpu, ipi_handle); + xen_intr_signal(ipi_handle[ipi_idx]); + } + break; + case APIC_IPI_DEST_OTHERS: + self = PCPU_GET(cpuid); + CPU_FOREACH(to_cpu) { + if (to_cpu != self) { + ipi_handle = DPCPU_ID_GET(to_cpu, ipi_handle); + xen_intr_signal(ipi_handle[ipi_idx]); + } + } + break; + default: + to_cpu = apic_cpuid(dest); + ipi_handle = DPCPU_ID_GET(to_cpu, ipi_handle); + xen_intr_signal(ipi_handle[ipi_idx]); + break; + } +} + +static void +xen_cpu_ipi_init(int cpu) +{ + xen_intr_handle_t *ipi_handle; + const struct xen_ipi_handler *ipi; + device_t dev; + int idx, rc; + + ipi_handle = DPCPU_ID_GET(cpu, ipi_handle); + dev = pcpu_find(cpu)->pc_device; + KASSERT((dev != NULL), ("NULL pcpu device_t")); + + for (ipi = xen_ipis, idx = 0; idx < nitems(xen_ipis); ipi++, idx++) { + + if (ipi->filter == NULL) { + ipi_handle[idx] = NULL; + continue; + } + + rc = xen_intr_alloc_and_bind_ipi(dev, cpu, ipi->filter, + INTR_TYPE_TTY, &ipi_handle[idx]); + if (rc != 0) + panic("Unable to allocate a XEN IPI port"); + xen_intr_describe(ipi_handle[idx], "%s", ipi->description); + } +} + +static void +xen_init_ipis(void) +{ + int i; + + if (!xen_hvm_domain() || !xen_vector_callback_enabled) + return; + +#ifdef __amd64__ + if (pmap_pcid_enabled) { + xen_ipis[IPI_TO_IDX(IPI_INVLTLB)].filter = xen_invltlb_pcid; + xen_ipis[IPI_TO_IDX(IPI_INVLPG)].filter = xen_invlpg_pcid; + } +#endif + CPU_FOREACH(i) + xen_cpu_ipi_init(i); + + /* Set the xen pv ipi ops to replace the native ones */ + cpu_ops.ipi_vectored = xen_ipi_vectored; +} + +/*---------------------- XEN Hypervisor Probe and Setup ----------------------*/ static uint32_t xen_hvm_cpuid_base(void) { @@ -253,4 +683,5 @@ void xen_hvm_init_cpu(void) } SYSINIT(xen_hvm_init, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, xen_hvm_init, NULL); +SYSINIT(xen_init_ipis, SI_SUB_SMP, SI_ORDER_FIRST, xen_init_ipis, NULL); SYSINIT(xen_hvm_init_cpu, SI_SUB_INTR, SI_ORDER_FIRST, xen_hvm_init_cpu, NULL); Modified: head/sys/x86/xen/xen_intr.c ============================================================================== --- head/sys/x86/xen/xen_intr.c Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/x86/xen/xen_intr.c Fri Sep 6 22:17:02 2013 (r255331) @@ -1010,7 +1010,7 @@ xen_intr_bind_virq(device_t dev, u_int v } int -xen_intr_bind_ipi(device_t dev, u_int ipi, u_int cpu, +xen_intr_alloc_and_bind_ipi(device_t dev, u_int cpu, driver_filter_t filter, enum intr_type flags, xen_intr_handle_t *port_handlep) { Modified: head/sys/xen/xen_intr.h ============================================================================== --- head/sys/xen/xen_intr.h Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/xen/xen_intr.h Fri Sep 6 22:17:02 2013 (r255331) @@ -141,21 +141,20 @@ int xen_intr_bind_virq(device_t dev, u_i void *arg, enum intr_type irqflags, xen_intr_handle_t *handlep); /** - * Associate an interprocessor interrupt vector with an interrupt handler. + * Allocate a local event channel port for servicing interprocessor + * interupts and, if successful, associate the port with the specified + * interrupt handler. * * \param dev The device making this bind request. - * \param ipi The interprocessor interrupt vector number of the - * interrupt source being hooked. * \param cpu The cpu receiving the IPI. - * \param filter An interrupt filter handler. Specify NULL - * to always dispatch to the ithread handler. + * \param filter The interrupt filter servicing this IPI. * \param irqflags Interrupt handler flags. See sys/bus.h. * \param handlep Pointer to an opaque handle used to manage this * registration. * * \returns 0 on success, otherwise an errno. */ -int xen_intr_bind_ipi(device_t dev, u_int ipi, u_int cpu, +int xen_intr_alloc_and_bind_ipi(device_t dev, u_int cpu, driver_filter_t filter, enum intr_type irqflags, xen_intr_handle_t *handlep); From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 22:53:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9875FCE4; Fri, 6 Sep 2013 22:53:13 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-ve0-x22e.google.com (mail-ve0-x22e.google.com [IPv6:2607:f8b0:400c:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 223A92FA3; Fri, 6 Sep 2013 22:53:13 +0000 (UTC) Received: by mail-ve0-f174.google.com with SMTP id jy13so2061048veb.33 for ; Fri, 06 Sep 2013 15:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=gdHtOSllLh9hfifEQJVfW6Ge6evDOPzoCeR4r2oelSI=; b=tlTQk3gyhehRVuMLrF1QU8kX2uocErRawzJtGUc09Ejcy8HynAzf803ep5LGjuLKcQ ONCr99oinymYgyvbXPkGjA9mwlG23k4/F4mdbCWVmPDiUDU6sc8XQiEKQfOoQHeT8NxH CCz7/WnFGoXhndVJnfvC7Sj7mTJxJN+sOVQt12X4H/qU15VaAJsfEmb53LRo1BR9GtAV /NN5+CP/Ax/fLutvL97MF7nuRH8mKOqN2bsA2NVOUHIsAzRjiGwrVnuaGbM1N+hdguhN B3Y8qDIDCQS4C1BqZhWq/7kynKusSr2MgbDyiP8GuneKzBlMi5fS3INlOouccd/j+wIN mnuA== MIME-Version: 1.0 X-Received: by 10.58.19.162 with SMTP id g2mr4626398vee.12.1378507991720; Fri, 06 Sep 2013 15:53:11 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.65.132 with HTTP; Fri, 6 Sep 2013 15:53:11 -0700 (PDT) In-Reply-To: <201309062102.r86L2iLo083427@svn.freebsd.org> References: <201309062102.r86L2iLo083427@svn.freebsd.org> Date: Sat, 7 Sep 2013 00:53:11 +0200 X-Google-Sender-Auth: NZWAwBkJap_av393i2l48Pr-GoA Message-ID: Subject: Re: svn commit: r255329 - head/sys/net From: Davide Italiano To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 22:53:13 -0000 On Fri, Sep 6, 2013 at 11:02 PM, Davide Italiano wrote: > Author: davide > Date: Fri Sep 6 21:02:43 2013 > New Revision: 255329 > URL: http://svnweb.freebsd.org/changeset/base/255329 > > Log: > Retire netisr.netisr_direct and netisr.netisr_direct_force sysctls. > These were used to control/export dispatch policy but they're not anymore. > This commit cannot be MFC'ed to 9 because old netstat(9) binary relies That should be read as netstat(1) obviously. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 23:04:43 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A6C66427; Fri, 6 Sep 2013 23:04:43 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from caravan.chchile.org (caravan.chchile.org [178.32.125.136]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F8792197; Fri, 6 Sep 2013 23:04:43 +0000 (UTC) Received: by caravan.chchile.org (Postfix, from userid 1000) id E7913C1F4A; Fri, 6 Sep 2013 23:04:41 +0000 (UTC) Date: Sat, 7 Sep 2013 01:04:41 +0200 From: Jeremie Le Hen To: Dag-Erling =?utf-8?B?U23Dg8W+cmdyYXY=?= Subject: Re: svn commit: r255243 - head/etc/mtree Message-ID: <20130906230441.GJ43281@caravan.chchile.org> Mail-Followup-To: Dag-Erling =?utf-8?B?U23Dg8W+cmdyYXY=?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201309051235.r85CZOOl002527@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201309051235.r85CZOOl002527@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 23:04:43 -0000 On Thu, Sep 05, 2013 at 12:35:24PM +0000, Dag-Erling SmÞrgrav wrote: > Author: des > Date: Thu Sep 5 12:35:23 2013 > New Revision: 255243 > URL: http://svnweb.freebsd.org/changeset/base/255243 > > Log: > authpf needs /var/authpf to exist and be writable by group authpf. Thanks! -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 23:11:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C23898D4; Fri, 6 Sep 2013 23:11:23 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ACCA922D4; Fri, 6 Sep 2013 23:11:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86NBN1n062416; Fri, 6 Sep 2013 23:11:23 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86NBKvM062396; Fri, 6 Sep 2013 23:11:20 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201309062311.r86NBKvM062396@svn.freebsd.org> From: Cy Schubert Date: Fri, 6 Sep 2013 23:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255332 - in head: contrib/ipfilter contrib/ipfilter/BSD contrib/ipfilter/FWTK contrib/ipfilter/FreeBSD contrib/ipfilter/FreeBSD-2.2 contrib/ipfilter/FreeBSD-3 contrib/ipfilter/FreeBSD-... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 23:11:23 -0000 Author: cy Date: Fri Sep 6 23:11:19 2013 New Revision: 255332 URL: http://svnweb.freebsd.org/changeset/base/255332 Log: Update ipfilter 4.1.28 --> 5.1.2. Approved by: glebius (mentor) BSD Licensed by: Darren Reed (author) Added: head/contrib/ipfilter/BSD/upgrade - copied unchanged from r254219, vendor/ipfilter/dist/BSD/upgrade head/contrib/ipfilter/WhatsNew50.txt - copied unchanged from r254219, vendor/ipfilter/dist/WhatsNew50.txt head/contrib/ipfilter/arc4random.c - copied unchanged from r254219, vendor/ipfilter/dist/arc4random.c head/contrib/ipfilter/genmask.c - copied unchanged from r254431, vendor/ipfilter/dist/lib/genmask.c head/contrib/ipfilter/ip_dstlist.c - copied unchanged from r254219, vendor/ipfilter/dist/ip_dstlist.c head/contrib/ipfilter/ip_dstlist.h - copied unchanged from r254219, vendor/ipfilter/dist/ip_dstlist.h head/contrib/ipfilter/ip_fil_compat.c - copied unchanged from r254219, vendor/ipfilter/dist/ip_fil_compat.c head/contrib/ipfilter/ipf_rb.h - copied unchanged from r254219, vendor/ipfilter/dist/ipf_rb.h head/contrib/ipfilter/lib/allocmbt.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/allocmbt.c head/contrib/ipfilter/lib/assigndefined.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/assigndefined.c head/contrib/ipfilter/lib/connecttcp.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/connecttcp.c head/contrib/ipfilter/lib/dupmbt.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/dupmbt.c head/contrib/ipfilter/lib/familyname.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/familyname.c head/contrib/ipfilter/lib/findword.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/findword.c head/contrib/ipfilter/lib/freembt.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/freembt.c head/contrib/ipfilter/lib/ftov.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/ftov.c head/contrib/ipfilter/lib/geticmptype.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/geticmptype.c head/contrib/ipfilter/lib/icmptypename.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/icmptypename.c head/contrib/ipfilter/lib/icmptypes.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/icmptypes.c head/contrib/ipfilter/lib/interror.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/interror.c head/contrib/ipfilter/lib/ipf_perror.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/ipf_perror.c head/contrib/ipfilter/lib/load_dstlist.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/load_dstlist.c head/contrib/ipfilter/lib/load_dstlistnode.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/load_dstlistnode.c head/contrib/ipfilter/lib/mb_hexdump.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/mb_hexdump.c head/contrib/ipfilter/lib/msgdsize.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/msgdsize.c head/contrib/ipfilter/lib/parsefields.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/parsefields.c head/contrib/ipfilter/lib/parseipfexpr.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/parseipfexpr.c head/contrib/ipfilter/lib/parsewhoisline.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/parsewhoisline.c head/contrib/ipfilter/lib/poolio.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/poolio.c head/contrib/ipfilter/lib/prependmbt.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/prependmbt.c head/contrib/ipfilter/lib/printactiveaddr.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printactiveaddr.c head/contrib/ipfilter/lib/printaddr.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printaddr.c head/contrib/ipfilter/lib/printdstl_live.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printdstl_live.c head/contrib/ipfilter/lib/printdstlist.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printdstlist.c head/contrib/ipfilter/lib/printdstlistdata.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printdstlistdata.c head/contrib/ipfilter/lib/printdstlistnode.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printdstlistnode.c head/contrib/ipfilter/lib/printdstlistpolicy.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printdstlistpolicy.c head/contrib/ipfilter/lib/printfieldhdr.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printfieldhdr.c head/contrib/ipfilter/lib/printhost.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printhost.c head/contrib/ipfilter/lib/printipfexpr.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printipfexpr.c head/contrib/ipfilter/lib/printiphdr.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printiphdr.c head/contrib/ipfilter/lib/printlookup.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printlookup.c head/contrib/ipfilter/lib/printnataddr.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printnataddr.c head/contrib/ipfilter/lib/printnatfield.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printnatfield.c head/contrib/ipfilter/lib/printnatside.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printnatside.c head/contrib/ipfilter/lib/printpoolfield.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printpoolfield.c head/contrib/ipfilter/lib/printstatefields.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printstatefields.c head/contrib/ipfilter/lib/printtcpflags.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printtcpflags.c head/contrib/ipfilter/lib/printunit.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/printunit.c head/contrib/ipfilter/lib/save_execute.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/save_execute.c head/contrib/ipfilter/lib/save_file.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/save_file.c head/contrib/ipfilter/lib/save_nothing.c - copied, changed from r254219, vendor/ipfilter/dist/lib/save_nothing.c head/contrib/ipfilter/lib/save_syslog.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/save_syslog.c head/contrib/ipfilter/lib/save_v1trap.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/save_v1trap.c head/contrib/ipfilter/lib/save_v2trap.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/save_v2trap.c head/contrib/ipfilter/lib/vtof.c - copied unchanged from r254219, vendor/ipfilter/dist/lib/vtof.c head/contrib/ipfilter/ml_ipl.c (contents, props changed) head/contrib/ipfilter/mlfk_ipl.c (contents, props changed) head/contrib/ipfilter/mli_ipl.c (contents, props changed) head/contrib/ipfilter/mln_ipl.c (contents, props changed) head/contrib/ipfilter/mln_rule.c - copied unchanged from r254689, vendor/ipfilter/dist/mln_rule.c head/contrib/ipfilter/mlo_ipl.c - copied, changed from r254219, vendor/ipfilter/dist/mlo_ipl.c head/contrib/ipfilter/mlo_rule.c - copied, changed from r254219, vendor/ipfilter/dist/mlo_rule.c head/contrib/ipfilter/mls_ipl.c (contents, props changed) head/contrib/ipfilter/mls_rule.c - copied, changed from r254219, vendor/ipfilter/dist/mls_rule.c head/contrib/ipfilter/mlso_rule.c - copied, changed from r254219, vendor/ipfilter/dist/mlso_rule.c head/contrib/ipfilter/radix_ipf.c - copied unchanged from r254219, vendor/ipfilter/dist/radix_ipf.c head/contrib/ipfilter/sys/ - copied from r254219, vendor/ipfilter/dist/sys/ head/contrib/ipfilter/test/e4to6 - copied unchanged from r254219, vendor/ipfilter/dist/test/e4to6 head/contrib/ipfilter/test/expected/f21 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/f21 head/contrib/ipfilter/test/expected/f22 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/f22 head/contrib/ipfilter/test/expected/f25 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/f25 head/contrib/ipfilter/test/expected/f26 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/f26 head/contrib/ipfilter/test/expected/f27 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/f27 head/contrib/ipfilter/test/expected/f28 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/f28 head/contrib/ipfilter/test/expected/f29 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/f29 head/contrib/ipfilter/test/expected/f30 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/f30 head/contrib/ipfilter/test/expected/i22 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/i22 head/contrib/ipfilter/test/expected/i23 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/i23 head/contrib/ipfilter/test/expected/in100 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/in100 head/contrib/ipfilter/test/expected/in101 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/in101 head/contrib/ipfilter/test/expected/in102 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/in102 head/contrib/ipfilter/test/expected/in7 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/in7 head/contrib/ipfilter/test/expected/ip3 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/ip3 head/contrib/ipfilter/test/expected/ipv6.4 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/ipv6.4 head/contrib/ipfilter/test/expected/n100 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n100 head/contrib/ipfilter/test/expected/n101 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n101 head/contrib/ipfilter/test/expected/n102 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n102 head/contrib/ipfilter/test/expected/n103 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n103 head/contrib/ipfilter/test/expected/n104 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n104 head/contrib/ipfilter/test/expected/n105 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n105 head/contrib/ipfilter/test/expected/n106 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n106 head/contrib/ipfilter/test/expected/n11_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n11_6 head/contrib/ipfilter/test/expected/n12_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n12_6 head/contrib/ipfilter/test/expected/n13_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n13_6 head/contrib/ipfilter/test/expected/n14_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n14_6 head/contrib/ipfilter/test/expected/n15 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n15 head/contrib/ipfilter/test/expected/n15_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n15_6 head/contrib/ipfilter/test/expected/n17 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n17 head/contrib/ipfilter/test/expected/n18 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n18 head/contrib/ipfilter/test/expected/n1_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n1_6 head/contrib/ipfilter/test/expected/n200 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n200 head/contrib/ipfilter/test/expected/n2_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n2_6 head/contrib/ipfilter/test/expected/n4_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n4_6 head/contrib/ipfilter/test/expected/n5_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n5_6 head/contrib/ipfilter/test/expected/n6_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n6_6 head/contrib/ipfilter/test/expected/n7_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n7_6 head/contrib/ipfilter/test/expected/n8_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n8_6 head/contrib/ipfilter/test/expected/n9_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/n9_6 head/contrib/ipfilter/test/expected/ni17 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/ni17 head/contrib/ipfilter/test/expected/ni18 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/ni18 head/contrib/ipfilter/test/expected/p10 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/p10 head/contrib/ipfilter/test/expected/p11 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/p11 head/contrib/ipfilter/test/expected/p12 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/p12 head/contrib/ipfilter/test/expected/p13 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/p13 head/contrib/ipfilter/test/expected/p4 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/p4 head/contrib/ipfilter/test/expected/p6 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/p6 head/contrib/ipfilter/test/expected/p7 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/p7 head/contrib/ipfilter/test/expected/p9 - copied unchanged from r254219, vendor/ipfilter/dist/test/expected/p9 head/contrib/ipfilter/test/h4to6 - copied unchanged from r254219, vendor/ipfilter/dist/test/h4to6 head/contrib/ipfilter/test/i4to6 - copied unchanged from r254219, vendor/ipfilter/dist/test/i4to6 head/contrib/ipfilter/test/input/f21 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/f21 head/contrib/ipfilter/test/input/f22 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/f22 head/contrib/ipfilter/test/input/f25 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/f25 head/contrib/ipfilter/test/input/f26 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/f26 head/contrib/ipfilter/test/input/f27 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/f27 head/contrib/ipfilter/test/input/f28 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/f28 head/contrib/ipfilter/test/input/f29 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/f29 head/contrib/ipfilter/test/input/f30 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/f30 head/contrib/ipfilter/test/input/ipv6.4 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/ipv6.4 head/contrib/ipfilter/test/input/n100 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n100 head/contrib/ipfilter/test/input/n101 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n101 head/contrib/ipfilter/test/input/n102 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n102 head/contrib/ipfilter/test/input/n103 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n103 head/contrib/ipfilter/test/input/n104 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n104 head/contrib/ipfilter/test/input/n105 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n105 head/contrib/ipfilter/test/input/n106 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n106 head/contrib/ipfilter/test/input/n10_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n10_6 head/contrib/ipfilter/test/input/n11_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n11_6 head/contrib/ipfilter/test/input/n12_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n12_6 head/contrib/ipfilter/test/input/n13_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n13_6 head/contrib/ipfilter/test/input/n14_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n14_6 head/contrib/ipfilter/test/input/n15 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n15 head/contrib/ipfilter/test/input/n15_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n15_6 head/contrib/ipfilter/test/input/n17 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n17 head/contrib/ipfilter/test/input/n17_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n17_6 head/contrib/ipfilter/test/input/n18 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n18 head/contrib/ipfilter/test/input/n1_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n1_6 head/contrib/ipfilter/test/input/n200 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n200 head/contrib/ipfilter/test/input/n2_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n2_6 head/contrib/ipfilter/test/input/n4_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n4_6 head/contrib/ipfilter/test/input/n5_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n5_6 head/contrib/ipfilter/test/input/n6_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n6_6 head/contrib/ipfilter/test/input/n7_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n7_6 head/contrib/ipfilter/test/input/n8_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n8_6 head/contrib/ipfilter/test/input/n9_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/n9_6 head/contrib/ipfilter/test/input/ni18 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/ni18 head/contrib/ipfilter/test/input/p10 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/p10 head/contrib/ipfilter/test/input/p11 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/p11 head/contrib/ipfilter/test/input/p12 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/p12 head/contrib/ipfilter/test/input/p13 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/p13 head/contrib/ipfilter/test/input/p4 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/p4 head/contrib/ipfilter/test/input/p6 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/p6 head/contrib/ipfilter/test/input/p7 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/p7 head/contrib/ipfilter/test/input/p9 - copied unchanged from r254219, vendor/ipfilter/dist/test/input/p9 head/contrib/ipfilter/test/ipflib.sh - copied unchanged from r254219, vendor/ipfilter/dist/test/ipflib.sh head/contrib/ipfilter/test/regress/f21 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/f21 head/contrib/ipfilter/test/regress/f22 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/f22 head/contrib/ipfilter/test/regress/f25 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/f25 head/contrib/ipfilter/test/regress/f26 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/f26 head/contrib/ipfilter/test/regress/f27 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/f27 head/contrib/ipfilter/test/regress/f28.ipf - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/f28.ipf head/contrib/ipfilter/test/regress/f28.pool - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/f28.pool head/contrib/ipfilter/test/regress/f29.ipf - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/f29.ipf head/contrib/ipfilter/test/regress/f29.pool - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/f29.pool head/contrib/ipfilter/test/regress/f30 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/f30 head/contrib/ipfilter/test/regress/i22 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/i22 head/contrib/ipfilter/test/regress/i23 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/i23 head/contrib/ipfilter/test/regress/in100 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/in100 head/contrib/ipfilter/test/regress/in101 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/in101 head/contrib/ipfilter/test/regress/in102 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/in102 head/contrib/ipfilter/test/regress/in7 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/in7 head/contrib/ipfilter/test/regress/ip3 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/ip3 head/contrib/ipfilter/test/regress/ipv6.4 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/ipv6.4 head/contrib/ipfilter/test/regress/n100 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n100 head/contrib/ipfilter/test/regress/n101 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n101 head/contrib/ipfilter/test/regress/n102 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n102 head/contrib/ipfilter/test/regress/n103 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n103 head/contrib/ipfilter/test/regress/n104 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n104 head/contrib/ipfilter/test/regress/n105 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n105 head/contrib/ipfilter/test/regress/n106 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n106 head/contrib/ipfilter/test/regress/n10_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n10_6 head/contrib/ipfilter/test/regress/n11_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n11_6 head/contrib/ipfilter/test/regress/n12_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n12_6 head/contrib/ipfilter/test/regress/n13_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n13_6 head/contrib/ipfilter/test/regress/n14_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n14_6 head/contrib/ipfilter/test/regress/n15 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n15 head/contrib/ipfilter/test/regress/n15_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n15_6 head/contrib/ipfilter/test/regress/n16_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n16_6 head/contrib/ipfilter/test/regress/n17 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n17 head/contrib/ipfilter/test/regress/n17_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n17_6 head/contrib/ipfilter/test/regress/n18 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n18 head/contrib/ipfilter/test/regress/n1_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n1_6 head/contrib/ipfilter/test/regress/n200 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n200 head/contrib/ipfilter/test/regress/n2_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n2_6 head/contrib/ipfilter/test/regress/n4_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n4_6 head/contrib/ipfilter/test/regress/n5_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n5_6 head/contrib/ipfilter/test/regress/n6_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n6_6 head/contrib/ipfilter/test/regress/n7_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n7_6 head/contrib/ipfilter/test/regress/n8_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n8_6 head/contrib/ipfilter/test/regress/n9_6 - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/n9_6 head/contrib/ipfilter/test/regress/ni17.ipf - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/ni17.ipf head/contrib/ipfilter/test/regress/ni18.ipf - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/ni18.ipf head/contrib/ipfilter/test/regress/ni18.nat - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/ni18.nat head/contrib/ipfilter/test/regress/p10.nat - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p10.nat head/contrib/ipfilter/test/regress/p10.pool - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p10.pool head/contrib/ipfilter/test/regress/p11.nat - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p11.nat head/contrib/ipfilter/test/regress/p11.pool - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p11.pool head/contrib/ipfilter/test/regress/p12.nat - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p12.nat head/contrib/ipfilter/test/regress/p12.pool - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p12.pool head/contrib/ipfilter/test/regress/p13.ipf - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p13.ipf head/contrib/ipfilter/test/regress/p13.pool - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p13.pool head/contrib/ipfilter/test/regress/p4.nat - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p4.nat head/contrib/ipfilter/test/regress/p4.pool - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p4.pool head/contrib/ipfilter/test/regress/p6.ipf - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p6.ipf head/contrib/ipfilter/test/regress/p6.pool - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p6.pool head/contrib/ipfilter/test/regress/p6.whois - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p6.whois head/contrib/ipfilter/test/regress/p7.nat - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p7.nat head/contrib/ipfilter/test/regress/p7.pool - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p7.pool head/contrib/ipfilter/test/regress/p9.nat - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p9.nat head/contrib/ipfilter/test/regress/p9.pool - copied unchanged from r254219, vendor/ipfilter/dist/test/regress/p9.pool head/contrib/ipfilter/tools/ipfsyncd.c - copied unchanged from r254219, vendor/ipfilter/dist/tools/ipfsyncd.c head/sys/contrib/ipfilter/netinet/ip_dns_pxy.c - copied unchanged from r254572, vendor-sys/ipfilter/dist/netinet/ip_dns_pxy.c head/sys/contrib/ipfilter/netinet/ip_dstlist.c - copied unchanged from r254572, vendor-sys/ipfilter/dist/netinet/ip_dstlist.c head/sys/contrib/ipfilter/netinet/ip_dstlist.h - copied unchanged from r254572, vendor-sys/ipfilter/dist/netinet/ip_dstlist.h head/sys/contrib/ipfilter/netinet/ip_nat6.c - copied, changed from r254572, vendor-sys/ipfilter/dist/netinet/ip_nat6.c head/sys/contrib/ipfilter/netinet/ip_tftp_pxy.c - copied, changed from r254572, vendor-sys/ipfilter/dist/netinet/ip_tftp_pxy.c head/sys/contrib/ipfilter/netinet/ipf_rb.h - copied unchanged from r254572, vendor-sys/ipfilter/dist/netinet/ipf_rb.h head/sys/contrib/ipfilter/netinet/radix_ipf.c - copied unchanged from r254572, vendor-sys/ipfilter/dist/netinet/radix_ipf.c head/sys/contrib/ipfilter/netinet/radix_ipf.h - copied unchanged from r254572, vendor-sys/ipfilter/dist/netinet/radix_ipf.h Deleted: head/contrib/ipfilter/.cvsignore head/contrib/ipfilter/BSD/.cvsignore head/contrib/ipfilter/iplang/.cvsignore head/contrib/ipfilter/ipsend/.cvsignore head/contrib/ipfilter/ipsend/README head/contrib/ipfilter/ipsend/hpux.c head/contrib/ipfilter/ipsend/in_var.h head/contrib/ipfilter/ipsend/ip_var.h head/contrib/ipfilter/ipsend/tcpip.h head/contrib/ipfilter/lib/ipft_ef.c head/contrib/ipfilter/lib/ipft_sn.c head/contrib/ipfilter/lib/ipft_td.c head/contrib/ipfilter/net/.cvsignore head/contrib/ipfilter/radix.c head/contrib/ipfilter/rules/.cvsignore head/contrib/ipfilter/samples/.cvsignore head/contrib/ipfilter/test/.cvsignore head/contrib/ipfilter/test/hextest head/contrib/ipfilter/test/input/ipf6-1 head/contrib/ipfilter/test/mhtest head/sys/contrib/ipfilter/netinet/QNX_OCL.txt Modified: head/contrib/ipfilter/BNF head/contrib/ipfilter/BSD/Makefile head/contrib/ipfilter/BSD/Makefile.ipsend head/contrib/ipfilter/BSD/ipfadm-rcd head/contrib/ipfilter/BSD/kupgrade head/contrib/ipfilter/FAQ.FreeBSD head/contrib/ipfilter/FWTK/ftp-gw.diff head/contrib/ipfilter/FWTK/fwtk_transparent.diff head/contrib/ipfilter/FreeBSD-2.2/kinstall head/contrib/ipfilter/FreeBSD-3/INST.FreeBSD-3 head/contrib/ipfilter/FreeBSD-3/kinstall head/contrib/ipfilter/FreeBSD-4.0/kinstall head/contrib/ipfilter/FreeBSD/kinstall head/contrib/ipfilter/HISTORY head/contrib/ipfilter/INSTALL.FreeBSD head/contrib/ipfilter/Makefile head/contrib/ipfilter/NAT.FreeBSD head/contrib/ipfilter/etc/protocols head/contrib/ipfilter/etc/services head/contrib/ipfilter/ip_fil.c head/contrib/ipfilter/ipf.h head/contrib/ipfilter/iplang/Makefile head/contrib/ipfilter/iplang/iplang.h head/contrib/ipfilter/iplang/iplang.tst head/contrib/ipfilter/iplang/iplang_l.l head/contrib/ipfilter/iplang/iplang_y.y head/contrib/ipfilter/ipmon.h head/contrib/ipfilter/ipsd/Makefile head/contrib/ipfilter/ipsd/ipsd.c head/contrib/ipfilter/ipsd/ipsdr.c head/contrib/ipfilter/ipsd/linux.h head/contrib/ipfilter/ipsd/sbpf.c head/contrib/ipfilter/ipsd/sdlpi.c head/contrib/ipfilter/ipsd/slinux.c head/contrib/ipfilter/ipsd/snit.c head/contrib/ipfilter/ipsend/44arp.c head/contrib/ipfilter/ipsend/Makefile head/contrib/ipfilter/ipsend/arp.c head/contrib/ipfilter/ipsend/dlcommon.c head/contrib/ipfilter/ipsend/ip.c head/contrib/ipfilter/ipsend/ipresend.c head/contrib/ipfilter/ipsend/ipsend.5 head/contrib/ipfilter/ipsend/ipsend.c head/contrib/ipfilter/ipsend/ipsend.h head/contrib/ipfilter/ipsend/ipsopt.c head/contrib/ipfilter/ipsend/iptest.c head/contrib/ipfilter/ipsend/iptests.c head/contrib/ipfilter/ipsend/larp.c head/contrib/ipfilter/ipsend/linux.h head/contrib/ipfilter/ipsend/lsock.c head/contrib/ipfilter/ipsend/resend.c head/contrib/ipfilter/ipsend/sbpf.c head/contrib/ipfilter/ipsend/sdlpi.c head/contrib/ipfilter/ipsend/sirix.c head/contrib/ipfilter/ipsend/slinux.c head/contrib/ipfilter/ipsend/snit.c head/contrib/ipfilter/ipsend/sock.c head/contrib/ipfilter/ipt.h head/contrib/ipfilter/kmem.h head/contrib/ipfilter/l4check/Makefile head/contrib/ipfilter/l4check/l4check.c head/contrib/ipfilter/lib/Makefile head/contrib/ipfilter/lib/addicmp.c head/contrib/ipfilter/lib/addipopt.c head/contrib/ipfilter/lib/alist_free.c head/contrib/ipfilter/lib/alist_new.c head/contrib/ipfilter/lib/bcopywrap.c head/contrib/ipfilter/lib/binprint.c head/contrib/ipfilter/lib/buildopts.c head/contrib/ipfilter/lib/checkrev.c head/contrib/ipfilter/lib/count4bits.c head/contrib/ipfilter/lib/count6bits.c head/contrib/ipfilter/lib/debug.c head/contrib/ipfilter/lib/facpri.c head/contrib/ipfilter/lib/facpri.h head/contrib/ipfilter/lib/fill6bits.c head/contrib/ipfilter/lib/flags.c head/contrib/ipfilter/lib/gethost.c head/contrib/ipfilter/lib/getifname.c head/contrib/ipfilter/lib/getnattype.c head/contrib/ipfilter/lib/getport.c head/contrib/ipfilter/lib/getportproto.c head/contrib/ipfilter/lib/getproto.c head/contrib/ipfilter/lib/getsumd.c head/contrib/ipfilter/lib/hostname.c head/contrib/ipfilter/lib/icmpcode.c head/contrib/ipfilter/lib/initparse.c head/contrib/ipfilter/lib/ionames.c head/contrib/ipfilter/lib/ipf_dotuning.c head/contrib/ipfilter/lib/ipft_hx.c head/contrib/ipfilter/lib/ipft_pc.c head/contrib/ipfilter/lib/ipft_tx.c head/contrib/ipfilter/lib/ipoptsec.c head/contrib/ipfilter/lib/kmem.c head/contrib/ipfilter/lib/kmem.h head/contrib/ipfilter/lib/kmemcpywrap.c head/contrib/ipfilter/lib/kvatoname.c head/contrib/ipfilter/lib/load_file.c head/contrib/ipfilter/lib/load_hash.c head/contrib/ipfilter/lib/load_hashnode.c head/contrib/ipfilter/lib/load_http.c head/contrib/ipfilter/lib/load_pool.c head/contrib/ipfilter/lib/load_poolnode.c head/contrib/ipfilter/lib/load_url.c head/contrib/ipfilter/lib/mutex_emul.c head/contrib/ipfilter/lib/nametokva.c head/contrib/ipfilter/lib/nat_setgroupmap.c head/contrib/ipfilter/lib/ntomask.c head/contrib/ipfilter/lib/optname.c head/contrib/ipfilter/lib/optprint.c head/contrib/ipfilter/lib/optprintv6.c head/contrib/ipfilter/lib/optvalue.c head/contrib/ipfilter/lib/portname.c head/contrib/ipfilter/lib/print_toif.c head/contrib/ipfilter/lib/printactivenat.c head/contrib/ipfilter/lib/printaps.c head/contrib/ipfilter/lib/printbuf.c head/contrib/ipfilter/lib/printfr.c head/contrib/ipfilter/lib/printfraginfo.c head/contrib/ipfilter/lib/printhash.c head/contrib/ipfilter/lib/printhash_live.c head/contrib/ipfilter/lib/printhashdata.c head/contrib/ipfilter/lib/printhashnode.c head/contrib/ipfilter/lib/printhostmap.c head/contrib/ipfilter/lib/printhostmask.c head/contrib/ipfilter/lib/printifname.c head/contrib/ipfilter/lib/printip.c head/contrib/ipfilter/lib/printlog.c head/contrib/ipfilter/lib/printmask.c head/contrib/ipfilter/lib/printnat.c head/contrib/ipfilter/lib/printpacket.c head/contrib/ipfilter/lib/printpacket6.c head/contrib/ipfilter/lib/printpool.c head/contrib/ipfilter/lib/printpool_live.c head/contrib/ipfilter/lib/printpooldata.c head/contrib/ipfilter/lib/printpoolnode.c head/contrib/ipfilter/lib/printportcmp.c head/contrib/ipfilter/lib/printproto.c head/contrib/ipfilter/lib/printsbuf.c head/contrib/ipfilter/lib/printstate.c head/contrib/ipfilter/lib/printtqtable.c head/contrib/ipfilter/lib/printtunable.c head/contrib/ipfilter/lib/remove_hash.c head/contrib/ipfilter/lib/remove_hashnode.c head/contrib/ipfilter/lib/remove_pool.c head/contrib/ipfilter/lib/remove_poolnode.c head/contrib/ipfilter/lib/resetlexer.c head/contrib/ipfilter/lib/rwlock_emul.c head/contrib/ipfilter/lib/tcpflags.c head/contrib/ipfilter/lib/tcpoptnames.c head/contrib/ipfilter/lib/v6ionames.c head/contrib/ipfilter/lib/v6optvalue.c head/contrib/ipfilter/lib/var.c head/contrib/ipfilter/lib/verbose.c head/contrib/ipfilter/man/Makefile head/contrib/ipfilter/man/ipf.4 head/contrib/ipfilter/man/ipf.5 head/contrib/ipfilter/man/ipfilter.4 head/contrib/ipfilter/man/ipfilter.4.mandoc head/contrib/ipfilter/man/ipfstat.8 head/contrib/ipfilter/man/ipftest.1 head/contrib/ipfilter/man/ipmon.5 head/contrib/ipfilter/man/ipnat.4 head/contrib/ipfilter/man/ipnat.5 head/contrib/ipfilter/man/ipnat.8 head/contrib/ipfilter/man/ippool.5 head/contrib/ipfilter/man/ippool.8 head/contrib/ipfilter/md5.c head/contrib/ipfilter/mkfilters head/contrib/ipfilter/mlf_ipl.c head/contrib/ipfilter/mlf_rule.c head/contrib/ipfilter/mlfk_rule.c head/contrib/ipfilter/mlh_rule.c (contents, props changed) head/contrib/ipfilter/opts.h head/contrib/ipfilter/pcap-ipf.h head/contrib/ipfilter/perl/Ipfanaly.pl head/contrib/ipfilter/perl/Isbgraph head/contrib/ipfilter/perl/Services head/contrib/ipfilter/perl/ipfmeta.pl head/contrib/ipfilter/perl/logfilter.pl head/contrib/ipfilter/radix_ipf.h head/contrib/ipfilter/rules/BASIC_1.FW head/contrib/ipfilter/rules/BASIC_2.FW head/contrib/ipfilter/rules/firewall head/contrib/ipfilter/rules/ipmon.conf head/contrib/ipfilter/rules/server head/contrib/ipfilter/samples/proxy.c head/contrib/ipfilter/samples/relay.c head/contrib/ipfilter/snoop.h head/contrib/ipfilter/test/Makefile head/contrib/ipfilter/test/bpftest head/contrib/ipfilter/test/dotest head/contrib/ipfilter/test/expected/f11 head/contrib/ipfilter/test/expected/f13 head/contrib/ipfilter/test/expected/f18 head/contrib/ipfilter/test/expected/i1 head/contrib/ipfilter/test/expected/i10 head/contrib/ipfilter/test/expected/i11 head/contrib/ipfilter/test/expected/i12 head/contrib/ipfilter/test/expected/i14 head/contrib/ipfilter/test/expected/i17 head/contrib/ipfilter/test/expected/i18 head/contrib/ipfilter/test/expected/i2 head/contrib/ipfilter/test/expected/i20 head/contrib/ipfilter/test/expected/i3 head/contrib/ipfilter/test/expected/i4 head/contrib/ipfilter/test/expected/i5 head/contrib/ipfilter/test/expected/i6 head/contrib/ipfilter/test/expected/i7 head/contrib/ipfilter/test/expected/i8 head/contrib/ipfilter/test/expected/i9 head/contrib/ipfilter/test/expected/in1 head/contrib/ipfilter/test/expected/in2 head/contrib/ipfilter/test/expected/in3 head/contrib/ipfilter/test/expected/in5 head/contrib/ipfilter/test/expected/in6 head/contrib/ipfilter/test/expected/ip1 head/contrib/ipfilter/test/expected/ip2 head/contrib/ipfilter/test/expected/ipv6.6 head/contrib/ipfilter/test/expected/l1 head/contrib/ipfilter/test/expected/l1.b head/contrib/ipfilter/test/expected/n1 head/contrib/ipfilter/test/expected/n10 head/contrib/ipfilter/test/expected/n11 head/contrib/ipfilter/test/expected/n12 head/contrib/ipfilter/test/expected/n13 head/contrib/ipfilter/test/expected/n14 head/contrib/ipfilter/test/expected/n16 head/contrib/ipfilter/test/expected/n2 head/contrib/ipfilter/test/expected/n3 head/contrib/ipfilter/test/expected/n4 head/contrib/ipfilter/test/expected/n5 head/contrib/ipfilter/test/expected/n6 head/contrib/ipfilter/test/expected/n7 head/contrib/ipfilter/test/expected/n8 head/contrib/ipfilter/test/expected/n9 head/contrib/ipfilter/test/expected/ni10 head/contrib/ipfilter/test/expected/ni11 head/contrib/ipfilter/test/expected/ni12 head/contrib/ipfilter/test/expected/ni19 head/contrib/ipfilter/test/expected/ni2 head/contrib/ipfilter/test/expected/ni20 head/contrib/ipfilter/test/expected/ni21 head/contrib/ipfilter/test/expected/ni23 head/contrib/ipfilter/test/expected/ni4 head/contrib/ipfilter/test/expected/ni5 head/contrib/ipfilter/test/expected/ni6 head/contrib/ipfilter/test/expected/ni8 head/contrib/ipfilter/test/expected/p1 head/contrib/ipfilter/test/expected/p2 head/contrib/ipfilter/test/expected/p3 head/contrib/ipfilter/test/expected/p5 head/contrib/ipfilter/test/input/f13 head/contrib/ipfilter/test/input/f24 head/contrib/ipfilter/test/input/ipv6.1 head/contrib/ipfilter/test/input/ipv6.3 head/contrib/ipfilter/test/input/ipv6.6 head/contrib/ipfilter/test/input/n10 head/contrib/ipfilter/test/input/n12 head/contrib/ipfilter/test/input/n16 head/contrib/ipfilter/test/input/n8 head/contrib/ipfilter/test/input/n9 head/contrib/ipfilter/test/input/ni1 head/contrib/ipfilter/test/input/ni10 head/contrib/ipfilter/test/input/ni11 head/contrib/ipfilter/test/input/ni12 head/contrib/ipfilter/test/input/ni13 head/contrib/ipfilter/test/input/ni14 head/contrib/ipfilter/test/input/ni15 head/contrib/ipfilter/test/input/ni16 head/contrib/ipfilter/test/input/ni19 head/contrib/ipfilter/test/input/ni2 head/contrib/ipfilter/test/input/ni20 head/contrib/ipfilter/test/input/ni3 head/contrib/ipfilter/test/input/ni4 head/contrib/ipfilter/test/input/ni5 head/contrib/ipfilter/test/input/ni7 head/contrib/ipfilter/test/input/ni8 head/contrib/ipfilter/test/input/ni9 head/contrib/ipfilter/test/intest head/contrib/ipfilter/test/iptest head/contrib/ipfilter/test/itest head/contrib/ipfilter/test/logtest head/contrib/ipfilter/test/mtest head/contrib/ipfilter/test/natipftest head/contrib/ipfilter/test/nattest head/contrib/ipfilter/test/ptest head/contrib/ipfilter/test/regress/f13 head/contrib/ipfilter/test/regress/i11 head/contrib/ipfilter/test/regress/i12 head/contrib/ipfilter/test/regress/i14 head/contrib/ipfilter/test/regress/i17 head/contrib/ipfilter/test/regress/i18 head/contrib/ipfilter/test/regress/i2 head/contrib/ipfilter/test/regress/i21 head/contrib/ipfilter/test/regress/i7 head/contrib/ipfilter/test/regress/i8 head/contrib/ipfilter/test/regress/in2 head/contrib/ipfilter/test/regress/ipv6.5 head/contrib/ipfilter/test/regress/ipv6.6 head/contrib/ipfilter/test/regress/ni13.nat head/contrib/ipfilter/test/regress/ni14.nat head/contrib/ipfilter/test/regress/p1.pool head/contrib/ipfilter/test/regress/p3.ipf head/contrib/ipfilter/test/test.format head/contrib/ipfilter/test/vfycksum.pl head/contrib/ipfilter/todo head/contrib/ipfilter/tools/BNF.ipf head/contrib/ipfilter/tools/Makefile head/contrib/ipfilter/tools/ipf.c head/contrib/ipfilter/tools/ipf_y.y head/contrib/ipfilter/tools/ipfcomp.c head/contrib/ipfilter/tools/ipfs.c head/contrib/ipfilter/tools/ipfstat.c head/contrib/ipfilter/tools/ipftest.c head/contrib/ipfilter/tools/ipmon.c head/contrib/ipfilter/tools/ipmon_y.y head/contrib/ipfilter/tools/ipnat.c head/contrib/ipfilter/tools/ipnat_y.y head/contrib/ipfilter/tools/ippool.c head/contrib/ipfilter/tools/ippool_y.y head/contrib/ipfilter/tools/ipscan_y.y head/contrib/ipfilter/tools/ipsyncm.c head/contrib/ipfilter/tools/ipsyncs.c head/contrib/ipfilter/tools/lex_var.h head/contrib/ipfilter/tools/lexer.c head/contrib/ipfilter/tools/lexer.h head/sbin/ipf/ipf/Makefile head/sbin/ipf/ipftest/Makefile head/sbin/ipf/libipf/Makefile head/sys/conf/files head/sys/contrib/ipfilter/netinet/fil.c head/sys/contrib/ipfilter/netinet/ip_auth.c head/sys/contrib/ipfilter/netinet/ip_auth.h head/sys/contrib/ipfilter/netinet/ip_compat.h head/sys/contrib/ipfilter/netinet/ip_fil.h head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c (contents, props changed) head/sys/contrib/ipfilter/netinet/ip_frag.c head/sys/contrib/ipfilter/netinet/ip_frag.h head/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c head/sys/contrib/ipfilter/netinet/ip_htable.c head/sys/contrib/ipfilter/netinet/ip_htable.h head/sys/contrib/ipfilter/netinet/ip_ipsec_pxy.c head/sys/contrib/ipfilter/netinet/ip_irc_pxy.c head/sys/contrib/ipfilter/netinet/ip_log.c head/sys/contrib/ipfilter/netinet/ip_lookup.c head/sys/contrib/ipfilter/netinet/ip_lookup.h head/sys/contrib/ipfilter/netinet/ip_nat.c head/sys/contrib/ipfilter/netinet/ip_nat.h head/sys/contrib/ipfilter/netinet/ip_netbios_pxy.c head/sys/contrib/ipfilter/netinet/ip_pool.c head/sys/contrib/ipfilter/netinet/ip_pool.h head/sys/contrib/ipfilter/netinet/ip_pptp_pxy.c head/sys/contrib/ipfilter/netinet/ip_proxy.c head/sys/contrib/ipfilter/netinet/ip_proxy.h head/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c (contents, props changed) head/sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c head/sys/contrib/ipfilter/netinet/ip_rpcb_pxy.c head/sys/contrib/ipfilter/netinet/ip_rules.c head/sys/contrib/ipfilter/netinet/ip_scan.c head/sys/contrib/ipfilter/netinet/ip_scan.h head/sys/contrib/ipfilter/netinet/ip_state.c head/sys/contrib/ipfilter/netinet/ip_state.h head/sys/contrib/ipfilter/netinet/ip_sync.c head/sys/contrib/ipfilter/netinet/ip_sync.h head/sys/contrib/ipfilter/netinet/ipl.h head/sys/contrib/ipfilter/netinet/mlfk_ipl.c head/sys/modules/ipfilter/Makefile Directory Properties: head/contrib/ipfilter/test/expected/i19 (props changed) Modified: head/contrib/ipfilter/BNF ============================================================================== --- head/contrib/ipfilter/BNF Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/BNF Fri Sep 6 23:11:19 2013 (r255332) @@ -67,7 +67,7 @@ facility = "kern" | "user" | "mail" | "d "audit" | "logalert" | "local0" | "local1" | "local2" | "local3" | "local4" | "local5" | "local6" | "local7" . priority = "emerg" | "alert" | "crit" | "err" | "warn" | "notice" | - "info" | "debug" . + "info" | "debug" . hexnumber = "0" "x" hexstring . hexstring = hexdigit [ hexstring ] . Modified: head/contrib/ipfilter/BSD/Makefile ============================================================================== --- head/contrib/ipfilter/BSD/Makefile Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/BSD/Makefile Fri Sep 6 23:11:19 2013 (r255332) @@ -1,9 +1,8 @@ # -# Copyright (C) 1993-1998 by Darren Reed. +# Copyright (C) 2012 by Darren Reed. # # See the IPFILTER.LICENCE file for details on licencing. # -TOP=../.. BINDEST=/usr/sbin SBINDEST=/sbin MANDIR=/usr/share/man @@ -17,13 +16,14 @@ CFLAGS=-g -I$(TOP) # DEVFS!=/usr/bin/lsvfs 2>&1 | sed -n 's/.*devfs.*/-DDEVFS/p' CPU!=uname -m -INC=-I/usr/include -I/sys -I/sys/sys -I/sys/arch +COMPDIR!=/bin/ls -1tr /usr/src/sys/arch/${CPU}/compile | tail -1 +INC=-I/usr/include -I/sys -I/sys/sys -I/sys/arch -I/usr/src/sys/arch/${CPU}/compile/${COMPDIR} DEF=-D$(CPU) -D__$(CPU)__ -DINET -DKERNEL -D_KERNEL $(INC) $(DEVFS) -fno-builtin IPDEF=$(DEF) -DGATEWAY -DDIRECTED_BROADCAST VNODESHDIR=/sys/kern MLD=$(ML) ML=mln_ipl.c -LKM=if_ipl.o +LKM=ipflkm.o LKMR=ipfrule.o DLKM= OBJ=. @@ -44,15 +44,15 @@ INSTALL=install # MODOBJS=ip_fil.o fil.o ml_ipl.o ip_nat.o ip_frag.o ip_state.o ip_proxy.o \ ip_auth.o ip_log.o ip_pool.o ip_htable.o ip_lookup.o ip_rules.o \ - ip_scan.o ip_sync.o + ip_scan.o ip_sync.o ip_nat6.o ip_dstlist.o radix_ipf.o # ip_trafcon.o DFLAGS=$(IPFLKM) $(IPFLOG) $(LOOKUP) $(SYNC) $(DEF) $(DLKM) $(IPFBPF) -IPF=ipf.o ipfcomp.o ipf_y.o ipf_l.o bpf_filter_u.o -IPT=ipftest.o fil_u.o ip_frag_u.o ip_state_u.o ip_nat_u.o \ +IPF=ipf.o ipfcomp.o ipf_y.o ipf_l.o +IPT=ipftest.o fil_u.o ip_frag_u.o ip_state_u.o ip_nat_u.o ip_nat6_u.o \ ip_proxy_u.o ip_auth_u.o ip_htable_u.o ip_lookup_u.o ip_pool_u.o \ ip_scan_u.o ip_sync_u.o ip_rules_u.o ip_fil_u.o ip_log_u.o \ ippool_y.o ippool_l.o ipf_y.o ipf_l.o ipnat_y.o ipnat_l.o \ - md5_u.o radix_u.o bpf_filter_u.o + md5_u.o radix_ipf_u.o ip_dstlist_u.o # ip_syn_u.o #ip_trafcon_u.o TOOL=$(TOP)/tools @@ -60,9 +60,9 @@ IPNAT=ipnat.o ipnat_y.o ipnat_l.o IPMON=ipmon.o ipmon_y.o ipmon_l.o IPPOOL=ippool_y.o ippool_l.o kmem.o ippool.o IPTRAFCON=iptrafcon.o -PROXYLIST=$(TOP)/ip_ftp_pxy.c $(TOP)/ip_ipsec_pxy.c $(TOP)/ip_irc_pxy.c \ - $(TOP)/ip_netbios_pxy.c $(TOP)/ip_raudio_pxy.c $(TOP)/ip_rcmd_pxy.c \ - $(TOP)/ip_rpcb_pxy.c $(TOP)/ip_pptp_pxy.c +PROXYLIST=$(TOP)/ip_dns_pxy.c $(TOP)/ip_ftp_pxy.c $(TOP)/ip_ipsec_pxy.c \ + $(TOP)/ip_irc_pxy.c $(TOP)/ip_netbios_pxy.c $(TOP)/ip_raudio_pxy.c \ + $(TOP)/ip_rcmd_pxy.c $(TOP)/ip_rpcb_pxy.c $(TOP)/ip_pptp_pxy.c FILS=ipfstat.o LIBSRC=$(TOP)/lib RANLIB=ranlib @@ -70,6 +70,11 @@ AROPTS=cq HERE!=pwd CCARGS=-I. $(DEBUG) $(CFLAGS) $(UFLAGS) KCARGS=-I. $(DEBUG) $(CFLAGS) +.if ${MACHINE_ARCH} == amd64 +KCARGS+=-mcmodel=kernel -mno-red-zone -fno-omit-frame-pointer \ + -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow \ + -msoft-float -fno-asynchronous-unwind-tables +.endif # # Extra is option kernel things we always want in user space. # @@ -77,9 +82,11 @@ EXTRA=$(ALLOPTS) include $(TOP)/lib/Makefile -build all: machine $(OBJ)/libipf.a ipf ipfs ipfstat ipftest ipmon ipnat \ - ippool ipscan ipsyncm ipsyncs $(LKM) $(LKMR) - -sh -c 'for i in ipf ipftest ipmon ippool ipnat ipscan ipsyncm ipsyncs; do /bin/rm -f $(TOP)/$$i; ln -s `pwd`/$$i $(TOP); done' +build all: machine $(OBJ)/libipf.a tools $(LKM) $(LKMR) + +tools: ipf ipfs ipfstat ipftest ipmon ipnat ippool ipscan ipsyncm \ + ipsyncs ipfsyncd + -sh -c 'for i in ipf ipftest ipmon ippool ipnat ipscan ipsyncm ipsyncs ipfsyncd; do /bin/rm -f $(TOP)/$$i; ln -s `pwd`/$$i $(TOP); done' -/bin/rm -f ../tools ./tools -ln -s ../tools . -ln -s ../tools .. @@ -122,12 +129,18 @@ ipsyncm: ipsyncm.o $(OBJ)/libipf.a ipsyncs: ipsyncs.o $(OBJ)/libipf.a $(CC) $(CCARGS) ipsyncs.o -o $@ $(LIBS) +ipfsyncd: ipfsyncd.o $(OBJ)/libipf.a + $(CC) $(CCARGS) ipfsyncd.o -o $@ $(LIBS) + ipsyncm.o: $(TOOL)/ipsyncm.c $(TOP)/ip_sync.h $(CC) $(CCARGS) -c $(TOOL)/ipsyncm.c -o $@ ipsyncs.o: $(TOOL)/ipsyncs.c $(TOP)/ip_sync.h $(CC) $(CCARGS) -c $(TOOL)/ipsyncs.c -o $@ +ipfsyncd.o: $(TOOL)/ipfsyncd.c $(TOP)/ip_sync.h + $(CC) $(CCARGS) -c $(TOOL)/ipfsyncd.c -o $@ + tests: (cd test; make ) @@ -146,7 +159,7 @@ fil_u.o: $(TOP)/fil.c $(TOP)/ip_fil.h $( fil.o: $(TOP)/fil.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h $(TOP)/ipl.h \ $(TOP)/ip_rules.h - $(CC) $(KCARGS) $(POLICY) $(DFLAGS) $(IPFBPF) $(COMPIPF) \ + $(CC) $(KCARGS) $(POLICY) $(DFLAGS) $(IPFBPF) $(COMPIPF) $(COMPATIPF) \ -c $(TOP)/fil.c -o $@ ipf.o: $(TOOL)/ipf.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/opts.h @@ -163,7 +176,7 @@ ipnat.o: $(TOOL)/ipnat.c $(TOP)/ip_fil.h $(TOP)/opts.h $(CC) $(CCARGS) -c $(TOOL)/ipnat.c -o $@ -ipnat_y.o: ipnat_y.c ipnat_y.h ipnat_l.h +ipnat_y.o: ipnat_y.c ipnat_y.h ipnat_l.h $(TOP)/ip_fil.h $(TOP)/ip_nat.h $(CC) $(CCARGS) -c ipnat_y.c -o $@ ipnat_l.o: ipnat_l.c ipnat_y.h @@ -183,6 +196,9 @@ ipnat_l.h: $(TOOL)/lexer.h ip_nat_u.o: $(TOP)/ip_nat.c $(TOP)/ip_nat.h $(TOP)/ip_compat.h $(TOP)/ip_fil.h $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_nat.c -o $@ +ip_nat6_u.o: $(TOP)/ip_nat6.c $(TOP)/ip_nat.h $(TOP)/ip_compat.h $(TOP)/ip_fil.h + $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_nat6.c -o $@ + ip_proxy_u.o: $(TOP)/ip_proxy.c $(TOP)/ip_proxy.h $(TOP)/ip_compat.h \ $(TOP)/ip_fil.h $(PROXYLIST) $(TOP)/ip_nat.h $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_proxy.c -o $@ @@ -222,8 +238,13 @@ ip_htable_u.o: $(TOP)/ip_htable.c $(TOP) $(TOP)/ip_htable.h $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_htable.c -o $@ +ip_dstlist_u.o: $(TOP)/ip_dstlist.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \ + $(TOP)/ip_dstlist.h + $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_dstlist.c -o $@ + ip_lookup_u.o: $(TOP)/ip_lookup.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \ - $(TOP)/ip_lookup.h $(TOP)/ip_pool.h $(TOP)/ip_htable.h + $(TOP)/ip_lookup.h $(TOP)/ip_pool.h $(TOP)/ip_htable.h \ + $(TOP)/ip_dstlist.h $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/ip_lookup.c -o $@ ip_trafcon_u.o: $(TOP)/ip_trafcon.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \ @@ -236,19 +257,28 @@ ip_log_u.o: $(TOP)/ip_log.c $(TOP)/ip_fi md5_u.o: $(TOP)/md5.c $(TOP)/md5.h $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/md5.c -o $@ -radix_u.o: $(TOP)/md5.c $(TOP)/radix_ipf.h - $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/radix.c -o $@ +radix_ipf_u.o: $(TOP)/md5.c $(TOP)/radix_ipf.h + $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/radix_ipf.c -o $@ bpf_filter_u.o: $(TOP)/bpf_filter.c $(TOP)/pcap-ipf.h $(CC) $(CCARGS) $(EXTRA) -c $(TOP)/bpf_filter.c -o $@ -if_ipl.o: $(MODOBJS) +ipflkm.o: $(MODOBJS) ld -r $(MODOBJS) -o $(LKM) - ${RM} -f if_ipl + ${RM} -f ipflkm ipfrule.ko.5: ip_rulesx.o $(MLR) +.if ${MACHINE_ARCH} != amd64 ld -warn-common -r -d -o $(.TARGET:S/.ko/.kld/) ip_rulesx.o $(MLR) - ld -Bshareable -d -warn-common -o $(LKMR:S/.5$//) $(.TARGET:S/.ko/.kld/) + ld -Bshareable -d -warn-common -o $(LKMR:S/.5$//) $(.TARGET:S/.ko/.kld/) +.else + ld -warn-common -r -d -o $(.TARGET:S/.5$//) ip_rulesx.o $(MLR) + nm -g $(.TARGET:S/.5$//) | \ + awk '/^[^[:space:]]+ [^AU] (.*)$$/ { print ($$2=="C" ? "-N" : "-L") $$3 }' | \ + xargs -J% objcopy % $(.TARGET:S/.5$//) + +.endif + ipfrule.ko: ip_rulesx.o $(MLR) gensetdefs ip_rulesx.o $(MLR) $(CC) $(KCARGS) -c setdef0.c @@ -256,10 +286,17 @@ ipfrule.ko: ip_rulesx.o $(MLR) ld -Bshareable -o $@ setdef0.o ip_rulesx.o $(MLR) setdef1.o ipf.ko.5 ipl.ko.5: $(MODOBJS) +.if ${MACHINE_ARCH} != amd64 ld -warn-common -r -d -o $(.TARGET:S/.ko/.kld/) $(MODOBJS) ld -Bshareable -d -warn-common -o $(LKM:S/.5$//) $(.TARGET:S/.ko/.kld/) +.else + ld -warn-common -r -d -o $(.TARGET:S/.5$//) $(MODOBJS) + nm -g $(.TARGET:S/.5$//) | \ + awk '/^[^[:space:]]+ [^AU] (.*)$$/ { print ($$2=="C" ? "-N" : "-L") $$3 }' | \ + xargs -J% objcopy % $(.TARGET:S/.5$//) +.endif -ipf.ko ipl.ko: $(MODOBJS) +ipf.ko ipl.ko: $(MODOBJS) gensetdefs $(MODOBJS) $(CC) $(KCARGS) -c setdef0.c $(CC) $(KCARGS) -c setdef1.c @@ -268,6 +305,9 @@ ipf.ko ipl.ko: $(MODOBJS) ip_nat.o: $(TOP)/ip_nat.c $(TOP)/ip_nat.h $(TOP)/ip_compat.h $(TOP)/ip_fil.h $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_nat.c -o $@ +ip_nat6.o: $(TOP)/ip_nat6.c $(TOP)/ip_nat.h $(TOP)/ip_compat.h $(TOP)/ip_fil.h + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_nat6.c -o $@ + ip_frag.o: $(TOP)/ip_frag.c $(TOP)/ip_frag.h $(TOP)/ip_compat.h $(TOP)/ip_fil.h $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_frag.c -o $@ @@ -290,6 +330,11 @@ ip_fil.c: ip_fil.o: ip_fil.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h $(TOP)/ip_nat.h $(CC) $(KCARGS) $(DFLAGS) $(COMPIPF) -c ip_fil.c -o $@ +ip_fil_compat.o: $(TOP)/ip_fil_compat.c $(TOP)/ipl.h $(TOP)/ip_fil.h \ + $(TOP)/ip_compat.h $(TOP)/ip_nat.h $(TOP)/ip_state.h + $(CC) $(KCARGS) $(DFLAGS) $(COMPIPF) $(COMPATIPF) \ + -c $(TOP)/ip_fil_compat.c -o $@ + ip_log.o: $(TOP)/ip_log.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_log.c -o $@ @@ -307,16 +352,26 @@ ip_htable.o: $(TOP)/ip_htable.c $(TOP)/i $(TOP)/ip_lookup.h $(TOP)/ip_htable.h $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_htable.c -o $@ +ip_dstlist.o: $(TOP)/ip_dstlist.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \ + $(TOP)/ip_lookup.h $(TOP)/ip_dstlist.h + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_dstlist.c -o $@ + ip_lookup.o: $(TOP)/ip_lookup.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \ - $(TOP)/ip_pool.h $(TOP)/ip_htable.h $(TOP)/ip_lookup.h + $(TOP)/ip_pool.h $(TOP)/ip_htable.h $(TOP)/ip_lookup.h \ + $(TOP)/ip_dstlist.h $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_lookup.c -o $@ +radix_ipf.o: $(TOP)/md5.c $(TOP)/radix_ipf.h + $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/radix_ipf.c -o $@ + ip_trafcon.o: $(TOP)/ip_trafcon.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \ $(TOP)/ip_trafcon.h $(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_trafcon.c -o $@ vnode_if.h: $(VNODESHDIR)/vnode_if.src mkdir -p ../sys + mkdir -p ../rump/include/rump + mkdir -p ../rump/librump/rumpvfs if [ -f $(VNODESHDIR)/vnode_if.sh ] ; then \ sh $(VNODESHDIR)/vnode_if.sh $(VNODESHDIR)/vnode_if.src; \ fi @@ -325,10 +380,11 @@ vnode_if.h: $(VNODESHDIR)/vnode_if.src fi if [ -f ../sys/vnode_if.h ] ; then mv ../sys/vnode_if.h .; fi rmdir ../sys + rm -rf ../rump ml_ipl.o: vnode_if.h $(TOP)/$(MLD) $(TOP)/ipl.h -/bin/rm -f vnode_if.c - $(CC) -I. $(CFLAGS) $(DFLAGS) -c $(TOP)/$(ML) -o $@ + $(CC) -I. $(KCARGS) $(DFLAGS) -c $(TOP)/$(ML) -o $@ ip_rules.o: ip_rules.c $(TOP)/ip_rules.h $(CC) -I. $(CFLAGS) $(DFLAGS) $(COMPIPF) -c ip_rules.c -o $@ @@ -344,7 +400,7 @@ $(TOP)/ip_rules.h: ip_rules.c fi ip_rulesx.o: ip_rules.c $(TOP)/ip_rules.h - $(CC) -I. $(CFLAGS) $(DFLAGS) -DIPFILTER_COMPILED -c ip_rules.c -o $@ + $(CC) -I. $(KCARGS) $(DFLAGS) -DIPFILTER_COMPILED -c ip_rules.c -o $@ mlf_rule.o: $(TOP)/mlf_rule.c $(TOP)/ip_rules.h $(CC) -I. $(CFLAGS) $(DFLAGS) -c $(TOP)/mlf_rule.c -o $@ @@ -356,7 +412,7 @@ mlo_rule.o: $(TOP)/mlo_rule.c $(TOP)/ip_ $(CC) -I. $(CFLAGS) $(DFLAGS) -c $(TOP)/mlo_rule.c -o $@ mlfk_rule.o: $(TOP)/mlfk_rule.c $(TOP)/ip_rules.h - $(CC) -I. $(CFLAGS) $(DFLAGS) -c $(TOP)/mlfk_rule.c -o $@ + $(CC) -I. $(KCARGS) $(DFLAGS) -c $(TOP)/mlfk_rule.c -o $@ ipf_y.o: ipf_y.c ipf_y.h $(TOP)/ipf.h ipf_l.h $(TOP)/opts.h $(CC) $(CCARGS) $(IPFBPF) -c ipf_y.c -o $@ @@ -427,10 +483,11 @@ ippool_y.o: ippool_y.c ippool_y.h $(TOP) ippool_l.o: ippool_l.c ippool_y.h $(TOP)/ip_pool.h $(CC) $(CCARGS) -I. -c ippool_l.c -o $@ -ippool_y.c: $(TOOL)/ippool_y.y $(TOP)/ip_pool.h ippool_l.h +ippool_y.c: $(TOOL)/ippool_y.y $(TOP)/ip_pool.h ippool_l.h ippool_y.h (cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@) -ippool_y.h: ippool_y.c +ippool_y.h: $(TOOL)/ippool_y.y + (cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@) ippool_l.c: $(TOOL)/lexer.c $(TOP)/ip_pool.h (cd $(TOOL); make "DEST=$(HERE)" $(HERE)/$@) @@ -449,10 +506,10 @@ iptrafcon: $(IPTRAFCON) $(OBJ)/libipf.a .l.c: clean: - ${RM} -f ../ipf ../ipnat ../ipmon ../ippool ../ipftest + ${RM} -f ../ipf ../ipnat ../ipmon ../ippool ../ipftest ${RM} -f ../ipscan ../ipsyncm ../ipsyncs ${RM} -f *.core *.o *.a ipt ipfstat ipf ipfstat ipftest ipmon - ${RM} -f if_ipl ipnat ipfrule.ko* ipf.kld* ipfrule.kld* + ${RM} -f ipflkm ipnat ipfrule.ko* ipf.kld* ipfrule.kld* ${RM} -f vnode_if.h $(LKM) ioconf.h *.ko setdef1.c setdef0.c setdefs.h ${RM} -f ip_fil.c ipf_l.c ipf_y.c ipf_y.h ipf_l.h ${RM} -f ipscan ipscan_y.c ipscan_y.h ipscan_l.c ipscan_l.h @@ -481,8 +538,8 @@ install: /bin/cp $(TOP)/$$i /usr/include/netinet/; \ $(CHMOD) 444 /usr/include/netinet/$$i; \ done - -if [ -d /lkm -a -f if_ipl.o ] ; then \ - cp if_ipl.o /lkm; \ + -if [ -d /lkm -a -f ipflkm.o ] ; then \ + cp ipflkm.o /lkm; \ fi -if [ -d /modules -a -f ipf.ko ] ; then \ if [ -f /modules/ipl.ko ] ; then \ @@ -494,6 +551,7 @@ install: -if [ -d /modules -a -f ipfrule.ko ] ; then \ cp ipfrule.ko /modules; \ fi +.if ${MACHINE_ARCH} != amd64 -if [ -d /boot/kernel -a -f ipf.ko ] ; then \ if [ -f /boot/kernel/ipl.ko ] ; then \ cp ipf.ko /boot/kernel/ipl.ko; \ @@ -504,8 +562,29 @@ install: -if [ -d /boot/kernel -a -f ipfrule.ko ] ; then \ cp ipfrule.ko /boot/kernel; \ fi - -if [ -d /usr/lkm -a -f if_ipl.o ] ; then \ - cp if_ipl.o /usr/lkm; \ +.else + -if [ -d /boot/kernel -a -f ipf.ko ] ; then \ + if [ -f /boot/kernel/ipl.ko ] ; then \ + objcopy --only-keep-debug ipf.ko + /boot/kernel/ipl.ko.symbols; \ + objcopy --strip-debug \ + --add-gnu-debuglink=ipl.ko.symbols \ + ipf.ko /boot/kernel/ipl.ko; \ + else \ + objcopy --only-keep-debug ipf.ko \ + /boot/kernel/ipf.ko.symbols; \ + objcopy --strip-debug \ + --add-gnu-debuglink=ipl.ko.symbols \ + ipf.ko /boot/kernel/ipf.ko; \ + fi \ + fi + -if [ -d /boot/kernel -a -f ipfrule.ko ] ; then \ + objcopy --only-keep-debug ipfrule.ko /boot/kernel/ipfrule.ko.symbols; \ + objcopy --strip-debug --add-gnu-debuglink=ipfrule.ko.symbols ipfrule.ko /boot/kernel/ipfrule.ko; \ + fi +.endif + -if [ -d /usr/lkm -a -f ipflkm.o ] ; then \ + cp ipflkm.o /usr/lkm; \ fi -$(INSTALL) -cs -g wheel -m 755 -o root ipscan $(SBINDEST) (cd $(TOP)/man; make INSTALL=$(INSTALL) MANDIR=$(MANDIR) install; cd $(TOP)) @@ -533,8 +612,8 @@ install: (cd $(TOP)/man; make INSTALL=$(INSTALL) MANDIR=$(MANDIR) install; cd $(TOP)) coverage: - ksh -c 'for i in *.da; do j=$${i%%.da}.c; gcov $$j 2>&1 | egrep -v "y.tab.c|Could|Creating|_l\.c|\.h"; done' | sort -k 1n -k 3n > report - sort -k 1n -k 3n report | perl -e 'while(<>) { next if (/^0.00/); s/\%//g; @F=split;$$lc+=$$F[2];$$t += ($$F[0]/100)*$$F[2];} printf "%d of %d = %d%%\n", $$t, $$lc,($$t/$$lc)*100;' >> report + ksh -c 'for i in *.da; do j=$${i%%.da}.c; gcov $$j 2>&1 | egrep -v "y.tab.c|Could|Creating|_l\.c|\.h"; done' | sort -n > report + sort -n report | perl -e 'while(<>) { next if (/^0.00/); s/\%//g; @F=split;$$lc+=$$F[2];$$t += $$F[0]/100*$$F[2];} printf "%d of %d = %d%%\n", $$t, $$lc,$$t/$$lc*100;' >> report clean-coverage: /bin/rm -f *.gcov *.da Modified: head/contrib/ipfilter/BSD/Makefile.ipsend ============================================================================== --- head/contrib/ipfilter/BSD/Makefile.ipsend Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/BSD/Makefile.ipsend Fri Sep 6 23:11:19 2013 (r255332) @@ -1,5 +1,5 @@ # -# $Id: Makefile.ipsend,v 2.8 2002/05/22 16:15:36 darrenr Exp $ +# $Id$ # BINDEST=/usr/sbin @@ -23,7 +23,8 @@ MFLAGS="BINDEST=$(BINDEST)" "SBINDEST=$( "SOLARIS2=$(SOLARIS2)" "DEBUG=$(DEBUG)" "DCPU=$(CPU)" \ "CPUDIR=$(CPUDIR)" "LOOKUP=$(LOOKUP)" # -all build bsd-bpf : ipsend ipresend iptest +build: +all bsd-bpf : ipsend ipresend iptest iplang_y.o: $(TOP)/iplang/iplang_y.y (cd $(TOP)/iplang; $(MAKE) ../BSD/$(CPUDIR)/$@ $(MFLAGS) 'DESTDIR=../BSD/$(CPUDIR)' ) @@ -103,6 +104,6 @@ dlcommon.o: $(TOP)/ipsend/dlcommon.c sdlpi.o: $(TOP)/ipsend/sdlpi.c $(CC) $(DEBUG) $(CFLAGS) -c $(TOP)/ipsend/sdlpi.c -o $@ -install: +install: -$(INSTALL) -cs -g wheel -m 755 -o root ipsend ipresend iptest $(BINDEST) Modified: head/contrib/ipfilter/BSD/ipfadm-rcd ============================================================================== --- head/contrib/ipfilter/BSD/ipfadm-rcd Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/BSD/ipfadm-rcd Fri Sep 6 23:11:19 2013 (r255332) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2006 by Darren Reed. +# Copyright (C) 2012 by Darren Reed. # # See the IPFILTER.LICENCE file for details on licencing. # Modified: head/contrib/ipfilter/BSD/kupgrade ============================================================================== --- head/contrib/ipfilter/BSD/kupgrade Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/BSD/kupgrade Fri Sep 6 23:11:19 2013 (r255332) @@ -2,7 +2,7 @@ # PATH=/sbin:/usr/sbin:/bin:/usr/bin; export PATH argv0=`basename $0` - + os=`uname -s` rev=`uname -r` maj=`expr $rev : '\([0-9]*\)\.'` @@ -23,6 +23,7 @@ fi if [ -d /sys/dist/ipf ] ; then ipfdir=/sys/dist/ipf/netinet fi +mkdir -m 755 -p $ipfdir/../net confdir="$archdir/conf" if [ -f /dev/ipnat ] ; then major=`ls -l /dev/ipnat | sed -e 's/.* \([0-9]*\),.*/\1/'` @@ -30,7 +31,7 @@ if [ -f /dev/ipnat ] ; then else major=x fi - + if [ ! -f ip_rules.c -o ! -f ip_rules.h ] ; then echo "Trying to build ip_rules.c and ip_rules.h" make ip_rules.c @@ -43,8 +44,9 @@ if [ ! -f ip_rules.c -o ! -f ip_rules.h fi fi -echo -n "Installing " -for j in auth frag nat proxy scan state sync pool htable lookup rules; do +echo -n "Installing into $ipfdir" +for j in auth frag nat proxy scan state sync pool dstlist htable lookup rules \ + dstlist; do for i in ip_$j.[ch]; do if [ -f "$i" ] ; then echo -n " $i" @@ -53,6 +55,12 @@ for j in auth frag nat proxy scan state fi done done +echo -n " net/radix_ipf.h" +cp radix_ipf.h $ipfdir +chmod 644 $ipfdir/radix_ipf.h +echo -n " radix_ipf.c -> $ipfdir/radix_ipf.c" +cp radix_ipf.c $ipfdir/radix_ipf.c +chmod 644 $ipfdir/radix_ipf.c case $os in SunOS) @@ -88,14 +96,16 @@ if [ -f $ipfdir/ip_fil.c ] ; then chmod 644 $ipfdir/ip_fil.c fi -for i in ip_fil.h fil.c ip_log.c ip_compat.h ipl.h ip_*_pxy.c; do +for i in ip_nat6.c ip_fil.h fil.c ip_log.c ip_compat.h ipl.h ip_*_pxy.c \ + ip_fil_compat.c ipf_rb.h; do echo -n " $i" cp $i $ipfdir chmod 644 $ipfdir/$i done echo "" echo -n "Installing into /usr/include/netinet" -for j in auth compat fil frag nat proxy scan state sync pool htable lookup; do +for j in auth compat fil frag nat proxy scan state sync pool htable dstlist \ + lookup; do i=ip_$j.h if [ -f "$i" ] ; then echo -n " $i" @@ -103,7 +113,7 @@ for j in auth compat fil frag nat proxy chmod 644 /usr/include/netinet/$i fi done -for j in ipl.h; do +for j in ipl.h ipf_rb.h; do if [ -f "$j" ] ; then echo -n " $j" cp $j /usr/include/netinet/$j @@ -157,15 +167,19 @@ if [ $os = FreeBSD -a -f /sys/conf/files mv files files.preipf4 cp -p files.preipf4 files fi - for i in htable pool lookup; do + for i in dstlist htable pool lookup; do grep ip_$i.c files >/dev/null 2>&1 if [ $? -ne 0 ] ; then echo "contrib/ipfilter/netinet/ip_$i.c optional ipfilter inet ipfilter_lookup" >> files fi done + grep ip_fil_compat.c files >/dev/null 2>&1 + if [ $? -ne 0 ] ; then + echo 'contrib/ipfilter/netinet/ip_fil_compat.c optional ipfilter inet ipfilter_compat' >> files + fi grep ip_sync.c files >/dev/null 2>&1 if [ $? -ne 0 ] ; then - echo 'contrib/ipfilter/netinet/ip_sync.c optional ipfilter inet ipfilter_sync' >> files + echo 'contrib/ipfilter/netinet/ip_sync.c optional ipfilter inet' >> files fi grep ip_scan.c files >/dev/null 2>&1 if [ $? -ne 0 ] ; then @@ -177,13 +191,19 @@ if [ $os = FreeBSD -a -f /sys/conf/files fi fi if [ $os = NetBSD -a -f /sys/conf/files ] ; then + if [ -f /sys/netinet/files.ipfilter ] ; then + if ! grep -q ip_fil_compat.c /sys/netinet/files.ipfilter; then + echo 'file dist/ipf/netinet/ip_fil_compat.c ipfilter & ipfilter_compat' >> /sys/netinet/files.ipfilter + echo 'defflag opt_ipfilter.h IPFILTER_COMPAT' >> /sys/netinet/files.ipfilter + fi + fi cd /sys/conf if [ ! -f files.preipf4 ] ; then mv files files.preipf4 cp -p files.preipf4 files fi if [ $fullrev -ge 010600 -a $fullrev -lt 020000 ] ; then - for i in htable pool lookup; do + for i in dstlist htable pool lookup; do grep ip_$i.c files >/dev/null 2>&1 if [ $? -ne 0 ] ; then echo "file netinet/ip_$i.c ipfilter & ipfilter_lookup" >> files @@ -191,7 +211,7 @@ if [ $os = NetBSD -a -f /sys/conf/files done grep ip_sync.c files >/dev/null 2>&1 if [ $? -ne 0 ] ; then - echo 'file netinet/ip_sync.c ipfilter & ipfilter_sync' >> files + echo 'file netinet/ip_sync.c ipfilter' >> files fi grep ip_scan.c files >/dev/null 2>&1 if [ $? -ne 0 ] ; then @@ -210,15 +230,18 @@ if [ $os = OpenBSD -a -f /sys/conf/files cp -p files.preipf4 files fi if [ $fullrev -ge 030400 ] ; then - for i in htable pool lookup; do + for i in dstlist htable pool lookup; do grep ip_$i.c files >/dev/null 2>&1 if [ $? -ne 0 ] ; then echo "file netinet/ip_$i.c ipfilter & ipfilter_lookup" >> files fi done - grep ip_sync.c files >/dev/null 2>&1 + grep ip_fil_compat.c files >/dev/null 2>&1 + if [ $? -ne 0 ] ; then + echo 'file netinet/ip_fil_compat.c ipfilter & ipfilter_compat' >> files + fi if [ $? -ne 0 ] ; then - echo 'file netinet/ip_sync.c ipfilter & ipfilter_sync' >> files + echo 'file netinet/ip_sync.c ipfilter' >> files fi grep ip_scan.c files >/dev/null 2>&1 if [ $? -ne 0 ] ; then @@ -241,7 +264,7 @@ cat | (cd /usr/src/sys/modules/ipfilter; KMOD= ipl SRCS= mlfk_ipl.c ip_nat.c ip_frag.c ip_state.c ip_proxy.c ip_auth.c \\ ! ip_log.c ip_fil.c fil.c - + .if !defined(NOINET6) CFLAGS+= -DUSE_INET6 .endif @@ -249,10 +272,10 @@ cat | (cd /usr/src/sys/modules/ipfilter; ! CFLAGS+= -DIPFILTER=1 -DIPFILTER_LKM -DIPFILTER_LOG -DPFIL_HOOKS --- 5,15 ---- KMOD= ipl - SRCS= mlfk_ipl.c ip_nat.c ip_frag.c ip_state.c ip_proxy.c ip_auth.c \\ -! ip_log.c ip_fil.c fil.c ip_lookup.c ip_pool.c ip_htable.c \\ -! ip_sync.c ip_scan.c ip_rules.c - + SRCS= mlfk_ipl.c ip_nat.c ip_nat6.c ip_frag.c ip_state.c ip_proxy.c ip_auth.c \\ +! ip_log.c ip_fil.c fil.c ip_lookup.c ip_pool.c ip_dstlist.c ip_htable.c \\ +! ip_sync.c ip_scan.c ip_rules.c ip_fil_compat.c + .if !defined(NOINET6) CFLAGS+= -DUSE_INET6 .endif @@ -261,4 +284,29 @@ cat | (cd /usr/src/sys/modules/ipfilter; ! -DIPFILTER_LOOKUP -DIPFILTER_COMPILED __EOF__ fi + +CONF=/sys/netinet/files.ipfilter +if [ -f $CONF -a $os = NetBSD ] ; then + for i in ip_nat6.c ip_dstlist.c radix_ipf.c; do + echo "Checking for $i in $CONF" + grep $i $CONF >/dev/null 2>&1 + if [ $? -ne 0 ] ; then + echo "Adding $i to $CONF" + sed -n -e /ip_nat.c/s/ip_nat.c/$i/p $CONF >> $CONF + fi + done +fi + +CONF=/sys/conf/files +if [ -f $CONF -a $os = FreeBSD ] ; then + for i in ip_nat6.c ip_dstlist.c radix_ipf.c; do + echo "Checking for $i in $CONF" + grep $i $CONF >/dev/null 2>&1 + if [ $? -ne 0 ] ; then + echo "Adding $i to $CONF" + sed -n -e /ip_nat.c/,/NORMAL/p $CONF | \ + sed -e s/ip_nat.c/$i/p >> $CONF + fi + done +fi exit 0 Copied: head/contrib/ipfilter/BSD/upgrade (from r254219, vendor/ipfilter/dist/BSD/upgrade) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ipfilter/BSD/upgrade Fri Sep 6 23:11:19 2013 (r255332, copy of r254219, vendor/ipfilter/dist/BSD/upgrade) @@ -0,0 +1,46 @@ +#!/bin/sh +# +PATH=/sbin:/usr/sbin:/bin:/usr/bin; export PATH +argv0=`basename $0` + +case `pwd` in +*BSD) + ;; +*) + cd BSD + ;; +esac +os=`uname -s` +rev=`uname -r` +maj=`expr $rev : '\([0-9]*\)\.'` +min=`expr $rev : '[0-9]*\.\([0-9]*\)'` +sub=`expr $rev : '[0-9]*\.[0-9]*\.\([0-9]*\)'` +plat=`uname -p` +objdir=${os}-${rev}-${plat} + +# try to bomb out fast if anything fails.... +set -e + +for i in ipf ipfstat ipmon ipnat ippool; do + if [ ! -f /sbin/${i}.dist -a -f /sbin/${i} ] ; then + mv /sbin/${i} /sbin/${i}.dist + cp -p /sbin/${i}.dist /sbin/${i} + cp ${objdir}/${i} /sbin/ + fi + if [ ! -f /usr/sbin/${i}.dist -a -f /usr/sbin/${i} ] ; then + mv /usr/sbin/${i} /usr/sbin/${i}.dist + cp -p /usr/sbin/${i}.dist /usr/sbin/${i} + cp ${objdir}/${i} /usr/sbin/ + fi +done +if [ -f /boot/kernel/ipl.ko ] ; then + if [ ! -f /boot/kernel/ipl.ko.dist ] ; then + mv /boot/kernel/ipl.ko /boot/kernel/ipl.ko.dist + cp -p /boot/kernel/ipl.ko.dist /boot/kernel/ipl.ko + fi + if [ ! -f /boot/kernel/ipl.ko.symbols.dist ] ; then + mv /boot/kernel/ipl.ko.symbols /boot/kernel/ipl.ko.symbols.dist + fi + cp ${objdir}/ipf.ko /boot/kernel/ipl.ko +fi +exit 0 Modified: head/contrib/ipfilter/FAQ.FreeBSD ============================================================================== --- head/contrib/ipfilter/FAQ.FreeBSD Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/FAQ.FreeBSD Fri Sep 6 23:11:19 2013 (r255332) @@ -1,4 +1,4 @@ -These are Instructions for Configuring A FreeBSD Box For NAT +These are Instructions for Configuring A FreeBSD Box For NAT After you have installed IP-Filter. You will need to change three files: @@ -54,7 +54,7 @@ fpx0 is the interface with the real inte /32 is the subnet mask 255.255.255.255, ie only use this ip address. -portmap tcp/udp 10000:65000 +portmap tcp/udp 10000:65000 tells it to use the ports to redirect the tcp/udp calls through @@ -67,7 +67,7 @@ reboots. In your /etc/rc.local put the line: -ipnat -f /etc/natrules +ipnat -f /etc/natrules To check and see if it is loaded, as root type ipnat -ls Modified: head/contrib/ipfilter/FWTK/ftp-gw.diff ============================================================================== --- head/contrib/ipfilter/FWTK/ftp-gw.diff Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/FWTK/ftp-gw.diff Fri Sep 6 23:11:19 2013 (r255332) @@ -4,7 +4,7 @@ *** 11,31 **** --- 11,41 ---- */ - static char RcsId[] = "$Header: /devel/CVS/IP-Filter/FWTK/ftp-gw.diff,v 2.1 1999/08/04 17:30:30 darrenr Exp $"; + static char RcsId[] = "$Header$"; + /* + * Patches for IP Filter NAT extensions written by Darren Reed, 7/7/96 Modified: head/contrib/ipfilter/FWTK/fwtk_transparent.diff ============================================================================== --- head/contrib/ipfilter/FWTK/fwtk_transparent.diff Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/FWTK/fwtk_transparent.diff Fri Sep 6 23:11:19 2013 (r255332) @@ -124,7 +124,7 @@ diff -cr ../TIS.orig/fwtk/Makefile.confi *************** *** 11,30 **** # - # RcsId: "$Header: /devel/CVS/IP-Filter/FWTK/fwtk_transparent.diff,v 2.2 2001/02/28 09:36:06 darrenr Exp $" + # RcsId: "$Header$" # Your C compiler (eg, "cc" or "gcc") @@ -145,7 +145,7 @@ diff -cr ../TIS.orig/fwtk/Makefile.confi -Dgethostbyaddr=res_gethostbyaddr -Dgetnetbyname=res_getnetbyname \ --- 11,34 ---- # - # RcsId: "$Header: /devel/CVS/IP-Filter/FWTK/fwtk_transparent.diff,v 2.2 2001/02/28 09:36:06 darrenr Exp $" + # RcsId: "$Header$" + # + # Path to sources of ip_filter (ip_nat.h required in lib/hnam.c) Modified: head/contrib/ipfilter/FreeBSD-2.2/kinstall ============================================================================== --- head/contrib/ipfilter/FreeBSD-2.2/kinstall Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/FreeBSD-2.2/kinstall Fri Sep 6 23:11:19 2013 (r255332) @@ -17,8 +17,8 @@ foreach i (ip_{auth,fil,frag,nat,pool,pr case *.h: /bin/cp $i /usr/include/netinet/$i chmod 644 /usr/include/netinet/$i - breaksw - endsw + breaksw + endsw end echo "" echo "Copying /usr/include/osreldate.h to /sys/sys" Modified: head/contrib/ipfilter/FreeBSD-3/INST.FreeBSD-3 ============================================================================== --- head/contrib/ipfilter/FreeBSD-3/INST.FreeBSD-3 Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/FreeBSD-3/INST.FreeBSD-3 Fri Sep 6 23:11:19 2013 (r255332) @@ -10,7 +10,7 @@ To build a kernel with the IP filter, fo 4. build a new kernel 5. install the new kernel - + 6. If not using DEVFS, create devices for IP Filter as follows: mknod /dev/ipl c 79 0 mknod /dev/ipnat c 79 1 @@ -18,7 +18,7 @@ To build a kernel with the IP filter, fo mknod /dev/ipauth c 79 3 mknod /dev/ipsync c 79 4 mknod /dev/ipscan c 79 5 - + 7. reboot Modified: head/contrib/ipfilter/FreeBSD-3/kinstall ============================================================================== --- head/contrib/ipfilter/FreeBSD-3/kinstall Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/FreeBSD-3/kinstall Fri Sep 6 23:11:19 2013 (r255332) @@ -18,8 +18,8 @@ foreach i (ip_fil.[ch] ip_nat.[ch] ip_fr case *.h: /bin/cp $i /usr/include/netinet/$i chmod 644 /usr/include/netinet/$i - breaksw - endsw + breaksw + endsw end echo "" echo "Linking /usr/include/osreldate.h to /sys/sys/osreldate.h" Modified: head/contrib/ipfilter/FreeBSD-4.0/kinstall ============================================================================== --- head/contrib/ipfilter/FreeBSD-4.0/kinstall Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/FreeBSD-4.0/kinstall Fri Sep 6 23:11:19 2013 (r255332) @@ -20,8 +20,8 @@ foreach i (ip_{auth,fil,nat,pool,proxy,s case *.h: /bin/cp $i /usr/include/netinet/$i chmod 644 /usr/include/netinet/$i - breaksw - endsw + breaksw + endsw end echo "" echo "Linking /usr/include/osreldate.h to /sys/sys/osreldate.h" Modified: head/contrib/ipfilter/FreeBSD/kinstall ============================================================================== --- head/contrib/ipfilter/FreeBSD/kinstall Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/FreeBSD/kinstall Fri Sep 6 23:11:19 2013 (r255332) @@ -17,8 +17,8 @@ foreach i (ip_{auth,fil,frag,nat,pool,pr case *.h: /bin/cp $i /usr/include/netinet/$i chmod 644 /usr/include/netinet/$i - breaksw - endsw + breaksw + endsw end echo "" grep iplopen $archdir/$karch/conf.c >& /dev/null Modified: head/contrib/ipfilter/HISTORY ============================================================================== --- head/contrib/ipfilter/HISTORY Fri Sep 6 22:17:02 2013 (r255331) +++ head/contrib/ipfilter/HISTORY Fri Sep 6 23:11:19 2013 (r255332) @@ -10,745 +10,268 @@ # and especially those who have found the time to port IP Filter to new # platforms. # -4.1.28 - Release 16 October 2007 +5.1.2 - RELEASED - 22 Jul 2012 -backout changes (B1) & (B2) as they've caused NAT entries to persist for -too long and possibly other side effects. +3546266 macro letters could be more consistent +3546265 not all of the state statistics are displayed +3546261 scripts for updating BSD environment out of date +3546260 compiler warnings about non-integer array subscript +3546259 asserting numdereflists == 0 is not correct +3546258 expression matching does not see IPF_EXP_END +3544317 ipnat/ipfstat are not using ipfexp_t +3545324 proxy checksum calculation is not hardware aware +3545321 FTP sequence number adjustment incorrectly applied +3545320 EPSV is not recognised +3545319 move nat rule creation to ip_proxy.c +3545317 better feedback of checksum requirements for proxies +3545314 ftp proxy levels do not make sense +3545312 EPRT is not supported by ftp proxy +3544318 ipnat.conf parsing ignores LHS address family +3545309 non-ipv6 safe proxies do not fail with ipv6 +3545323 NAT updates the source port twice +3545322 ipv6 nat rules cannot start proxies +3544314 bucket copyout tries to copy too much data +3544313 remove nat encap feature +3546248 compat rule pointer type mismatch +3546247 UDP hardware checksum offload not recognised +3545311 ifp_ifaddr does not find the first set address +3545310 ipmon needs ipl_sec on 64bit boundary +3545326 reference count changes made without lock +3544315 stateful matching does not use ipfexp_t +3543493 tokens are not flushed when disabled +3543487 NAT rules do not always release lookup objects +3543491 function comments in ip_state.c are old +3543404 ipnat.conf parsing uses family/ip version badly +3543403 incorrect line number printed in ipnat parsing errors +3543402 Not all NAT statistics are printed +3542979 NAT session list management is too simple +3542978 ipv4 and ipv6 nat insert have common hash insertion +3542977 ipnat_t refence tracking incomplete +3542975 proxies must use ipnat_t separately +3542980 printing ipv6 expressions is wrong +3542983 ippool cannot handle more than one ipv6 address +3543018 mask array shifted incorrectly. +3542974 reason for dropping packet is lost +3542982 line numbers not recorded/displayed correctly by ipf +3542981 exclamation mark cuases trouble with pools +3541655 test suite checksums incorrect +3541653 display proxy fail status correctly +3540993 IP header offset excluded in pullup calculations +3540994 pullupmsg does not work as required +3540992 pointer to ipv6 frag header not updated on pullup +3541645 netmask management adds /32 for /0 +3541637 ipnat parser does not zero port fields for non-port protocol +3541635 pool names cannot by numbers +3540995 IPv6 fragment tracking does not always work +3540996 printing of nextip for ipv6 nat rules is wrong +3540999 ipnat.conf parsing has trouble with icmpidmap for ipv6 +3540825 whois output parsing error for ipv6 +3540814 ipfd_lock serves no purpose +3540810 lookup objects need tail pointers +3540809 refactor hash table lookups for nat +3540819 radix tree does not work with ipv6 +3540820 mutex emulation should be logged +3540828 ipfstat filtering with -m fails tests +3536480 ippool could be more like the others +3536477 pool printing not uniform +3536483 flushing empty destination lists causes panic +3536481 more use of bzero after KMALLOC required +3536479 ipnat.conf line numbers not stored +3536484 Makefile missing dependency for ippool +3536199 TFTP proxy requires something extra +3536198 ICMP checksum out by one +3536203 ipnat does not return an error +3536201 ipf.conf parsing too address friendly +3536200 printing of bytes/packets not indented +3497941 ipv4 multicast detection incorrect on little endian +3535361 to interfaces printed out of order +3535363 ipf parser is inconsistent +3532306 deleting ipnat rules does not work +3532054 new error required for ipf_rx_create +3532053 icmp6 checksums wrong +3532052 icmpv6 state check with incorrect length +3531871 checksum verification wants too many icmp6 bytes +3531870 ipnat.conf parsing needs to support inet6 +3532048 error in ipf group parsing +3531868 ICMPV6 checksum not validated +3531893 ipftest exits without error for bad input +3531890 whois pool parsing builds bad structures +3531891 icmpv6 text parsing ignorant of icmp types +3531653 rewrite with icmp does not work +3530563 NAT operations fail with EPERM +3530544 first pass at gcc -Wextra cleanup +3530540 lookup create functions do not set error properly +3530539 ipf_main_soft_destroy doesn't need 2nd arg +3530541 reorder structure for better packing +3530543 ipnat purge needs documentation +3530515 BSD upgrade script required +3528029 ipmon bad-mutex panic +3530247 loading address pools light on input validation +3530255 radix tree delete uses wrong lookup +3530254 radix tree allocation support wrong +3530264 ipmon prints qd for some 64bit numbers +3530260 decapsulate rules not printed correctly. +3530266 ipfstat -v/-d flags confused +2939220 why a packet is blocked is not discernable +2939218 output interface not recorded +2941850 use of destination lists with to/dup-to beneficial +3457747 build errors introduced with radix change +3535360 timeout groups leak +3535359 memory leak with tokens +3535358 listing rules in groups requires tracking groups +3535357 rule head removal is problematic +3530259 not all ioctl error checked wth SIOCIPFINTERROR +3530258 error routine that uses fd required +3530253 inadequate function comment blocks +3530249 walking lookup tables leaks memory +3530241 extra lock padding required for freebsd +3529901 ipf returns 0 when rules fail to load +3529491 checksum validation could be better +3529486 tcp checksum wrong for ipv6 +3533779 ipv6 nat rules missing inet6 keyword +3532693 ipnat.conf rejects some ipv6 addresses +3532691 ipv4 should not be forced for icmp +3532689 ipv6 nat rules do not print inet6 +3532688 ipv6 address always printed with "to " +3532687 with v6hdrs not supported like with ipopts +3532686 ipf expressions do not work with ipv6 +3540825 whois output parsing error for ipv6 +3540818 NAT for certain IPv6 ICMP packets should not be allowed +3540815 memory leak with destination lists +3540814 ipfd_lock serves no purpose +3540810 lookup objects need tail pointers +3540809 refactor hash table lookups for nat +3540808 completed tokens do not stop iteration +3530492 address hash table name not used +3528029 ipmon bad-mutex panic +3530256 hook memory leaked +3530271 pools parsing produces badly formed address structures +3488061 cleanup for illumos build +3484434 SIOCIPFINTERROR must work for all devices +3484067 mandoc -Tlint warnings to be fixed +3483343 compile warning in ipfcomp.c +3482893 building without IPFILTER_LOG fails +3482765 building netbsd kernel without inet6 fails +3482116 ipf_check frees packet from ipftest +3481663 does not compile on solaris 11 + +5.1.1 - RELEASED - 9 May 2012 + +3481322 ip_fil_compat.c needs a cleanup +3481211 add user errors to dtrace +3481152 compatibility for 4.1 needs more work +3481153 PRIu64 problems on FreeBSD +3481155 ipnat listing incorrect +3480543 change leads to compat problems +3480538 compiler errors from earlier patch +3480537 ipf_instance_destroy is incomplete +3480536 _fini order leads to panic +3479991 compiler warnings about size mismatches +3479974 copyright dates are wrong (fix) +3479464 add support for leaks testing +3479457 %qu is not the prefered way +3479451 iterators leak memory +3479453 nat rules with pools leak +3479454 memory leak in hostmap table +3479461 load_hash uses memory after free +3479462 printpool leaks memory +3479452 missing FREE_MB_T to freembt leaks +3479450 ipfdetach is called when detached +3479448 group mapping rules memory leak +3479455 memory leak from tuning +3479458 ipf must be running in global zone +3479460 driver replace is wrong +3479459 radix tree tries to free null pointer +3479463 rwlock emulation does not free memory +3479465 parser leaks memory +3475959 hardware checksum not correctly used +3475426 ip pseudo checksum wrong +3473566 radix tree does not delete dups right +3472987 compile is not clean +3472337 not everything is zero'd +3472344 interface setup needs to be after insert +3472340 wildcard counter drops twice *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 23:14:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A87F5B16; Fri, 6 Sep 2013 23:14:31 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 96ACA2359; Fri, 6 Sep 2013 23:14:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86NEV35063513; Fri, 6 Sep 2013 23:14:31 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86NEVbw063512; Fri, 6 Sep 2013 23:14:31 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201309062314.r86NEVbw063512@svn.freebsd.org> From: Rick Macklem Date: Fri, 6 Sep 2013 23:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255333 - head/sys/nlm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 23:14:31 -0000 Author: rmacklem Date: Fri Sep 6 23:14:31 2013 New Revision: 255333 URL: http://svnweb.freebsd.org/changeset/base/255333 Log: Intermittent crashes in the NLM (rpc.lockd) code during system shutdown was reporetd via email. The crashes occurred because the client side NLM would attempt to use its socket after it had been destroyed. Looking at the code, it would soclose() once the reference count on the socket handling structure went to 0. Unfortunately, nlm_host_get_rpc() will simply allocate a new socket handling structure when none exists and use the now soclose()d socket. Since there doesn't seem to be a safe way to determine when the socket is no longer needed, this patch modifies the code so that it never soclose()es the socket. Since there is only one socket ever created, this does not introduce a leak when the rpc.lockd is stopped/restarted. The patch also disables unloading of the nfslockd module, since it is not safe to do so (and has never been safe to do so, from what I can see). Reported by: mav Tested by: mav MFC after: 2 weeks Modified: head/sys/nlm/nlm_prot_impl.c Modified: head/sys/nlm/nlm_prot_impl.c ============================================================================== --- head/sys/nlm/nlm_prot_impl.c Fri Sep 6 23:11:19 2013 (r255332) +++ head/sys/nlm/nlm_prot_impl.c Fri Sep 6 23:14:31 2013 (r255333) @@ -133,6 +133,11 @@ static time_t nlm_grace_threshold; static time_t nlm_next_idle_check; /* + * A flag to indicate the server is already running. + */ +static int nlm_is_running; + +/* * A socket to use for RPC - shared by all IPv4 RPC clients. */ static struct socket *nlm_socket; @@ -1526,51 +1531,51 @@ nlm_server_main(int addr_count, char **a struct nlm_waiting_lock *nw; vop_advlock_t *old_nfs_advlock; vop_reclaim_t *old_nfs_reclaim; - int v4_used; -#ifdef INET6 - int v6_used; -#endif - if (nlm_socket) { + if (nlm_is_running != 0) { NLM_ERR("NLM: can't start server - " "it appears to be running already\n"); return (EPERM); } - memset(&opt, 0, sizeof(opt)); + if (nlm_socket == NULL) { + memset(&opt, 0, sizeof(opt)); - nlm_socket = NULL; - error = socreate(AF_INET, &nlm_socket, SOCK_DGRAM, 0, - td->td_ucred, td); - if (error) { - NLM_ERR("NLM: can't create IPv4 socket - error %d\n", error); - return (error); - } - opt.sopt_dir = SOPT_SET; - opt.sopt_level = IPPROTO_IP; - opt.sopt_name = IP_PORTRANGE; - portlow = IP_PORTRANGE_LOW; - opt.sopt_val = &portlow; - opt.sopt_valsize = sizeof(portlow); - sosetopt(nlm_socket, &opt); + error = socreate(AF_INET, &nlm_socket, SOCK_DGRAM, 0, + td->td_ucred, td); + if (error) { + NLM_ERR("NLM: can't create IPv4 socket - error %d\n", + error); + return (error); + } + opt.sopt_dir = SOPT_SET; + opt.sopt_level = IPPROTO_IP; + opt.sopt_name = IP_PORTRANGE; + portlow = IP_PORTRANGE_LOW; + opt.sopt_val = &portlow; + opt.sopt_valsize = sizeof(portlow); + sosetopt(nlm_socket, &opt); #ifdef INET6 - nlm_socket6 = NULL; - error = socreate(AF_INET6, &nlm_socket6, SOCK_DGRAM, 0, - td->td_ucred, td); - if (error) { - NLM_ERR("NLM: can't create IPv6 socket - error %d\n", error); - goto out; - return (error); - } - opt.sopt_dir = SOPT_SET; - opt.sopt_level = IPPROTO_IPV6; - opt.sopt_name = IPV6_PORTRANGE; - portlow = IPV6_PORTRANGE_LOW; - opt.sopt_val = &portlow; - opt.sopt_valsize = sizeof(portlow); - sosetopt(nlm_socket6, &opt); + nlm_socket6 = NULL; + error = socreate(AF_INET6, &nlm_socket6, SOCK_DGRAM, 0, + td->td_ucred, td); + if (error) { + NLM_ERR("NLM: can't create IPv6 socket - error %d\n", + error); + soclose(nlm_socket); + nlm_socket = NULL; + return (error); + } + opt.sopt_dir = SOPT_SET; + opt.sopt_level = IPPROTO_IPV6; + opt.sopt_name = IPV6_PORTRANGE; + portlow = IPV6_PORTRANGE_LOW; + opt.sopt_val = &portlow; + opt.sopt_valsize = sizeof(portlow); + sosetopt(nlm_socket6, &opt); #endif + } nlm_auth = authunix_create(curthread->td_ucred); @@ -1622,6 +1627,7 @@ nlm_server_main(int addr_count, char **a error = EINVAL; goto out; } + nlm_is_running = 1; NLM_DEBUG(1, "NLM: local NSM state is %d\n", smstat.state); nlm_nsm_state = smstat.state; @@ -1638,6 +1644,7 @@ nlm_server_main(int addr_count, char **a nfs_reclaim_p = old_nfs_reclaim; out: + nlm_is_running = 0; if (pool) svcpool_destroy(pool); @@ -1661,13 +1668,8 @@ out: * nlm_hosts to the host (which may remove it from the list * and free it). After this phase, the only entries in the * nlm_host list should be from other threads performing - * client lock requests. We arrange to defer closing the - * sockets until the last RPC client handle is released. + * client lock requests. */ - v4_used = 0; -#ifdef INET6 - v6_used = 0; -#endif mtx_lock(&nlm_global_lock); TAILQ_FOREACH(nw, &nlm_waiting_locks, nw_link) { wakeup(nw); @@ -1678,43 +1680,10 @@ out: nlm_host_release(host); mtx_lock(&nlm_global_lock); } - TAILQ_FOREACH_SAFE(host, &nlm_hosts, nh_link, nhost) { - mtx_lock(&host->nh_lock); - if (host->nh_srvrpc.nr_client - || host->nh_clntrpc.nr_client) { - if (host->nh_addr.ss_family == AF_INET) - v4_used++; -#ifdef INET6 - if (host->nh_addr.ss_family == AF_INET6) - v6_used++; -#endif - /* - * Note that the rpc over udp code copes - * correctly with the fact that a socket may - * be used by many rpc handles. - */ - if (host->nh_srvrpc.nr_client) - CLNT_CONTROL(host->nh_srvrpc.nr_client, - CLSET_FD_CLOSE, 0); - if (host->nh_clntrpc.nr_client) - CLNT_CONTROL(host->nh_clntrpc.nr_client, - CLSET_FD_CLOSE, 0); - } - mtx_unlock(&host->nh_lock); - } mtx_unlock(&nlm_global_lock); AUTH_DESTROY(nlm_auth); - if (!v4_used) - soclose(nlm_socket); - nlm_socket = NULL; -#ifdef INET6 - if (!v6_used) - soclose(nlm_socket6); - nlm_socket6 = NULL; -#endif - return (error); } @@ -2435,7 +2404,15 @@ static int nfslockd_modevent(module_t mod, int type, void *data) { - return (0); + switch (type) { + case MOD_LOAD: + return (0); + case MOD_UNLOAD: + /* The NLM module cannot be safely unloaded. */ + /* FALLTHROUGH */ + default: + return (EOPNOTSUPP); + } } static moduledata_t nfslockd_mod = { "nfslockd", From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 23:39:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B25E6CF3; Fri, 6 Sep 2013 23:39:57 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A078E276F; Fri, 6 Sep 2013 23:39:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86Ndvmj077823; Fri, 6 Sep 2013 23:39:57 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86NdvEw077821; Fri, 6 Sep 2013 23:39:57 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201309062339.r86NdvEw077821@svn.freebsd.org> From: Luiz Otavio O Souza Date: Fri, 6 Sep 2013 23:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255334 - in head/sys: arm/broadcom/bcm2835 mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 23:39:57 -0000 Author: loos Date: Fri Sep 6 23:39:56 2013 New Revision: 255334 URL: http://svnweb.freebsd.org/changeset/base/255334 Log: Fix an off-by-one bug in ar71xx_gpio and bcm2835_gpio which makes the last pin unavailable. Reported and tested by: sbruno (ar71xx) Approved by: adrian (mentor) Pointy hat to: loos Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c head/sys/mips/atheros/ar71xx_gpio.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Fri Sep 6 23:14:31 2013 (r255333) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Fri Sep 6 23:39:56 2013 (r255334) @@ -729,7 +729,7 @@ bcm_gpio_attach(device_t dev) goto fail; /* Initialize the software controlled pins. */ - for (i = 0, j = 0; j < BCM_GPIO_PINS - 1; j++) { + for (i = 0, j = 0; j < BCM_GPIO_PINS; j++) { if (bcm_gpio_pin_is_ro(sc, j)) continue; snprintf(sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME, Modified: head/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- head/sys/mips/atheros/ar71xx_gpio.c Fri Sep 6 23:14:31 2013 (r255333) +++ head/sys/mips/atheros/ar71xx_gpio.c Fri Sep 6 23:39:56 2013 (r255334) @@ -418,7 +418,7 @@ ar71xx_gpio_attach(device_t dev) "pinon", &pinon) != 0) pinon = 0; device_printf(dev, "gpio pinmask=0x%x\n", mask); - for (i = 0, j = 0; j < maxpin; j++) { + for (i = 0, j = 0; j <= maxpin; j++) { if ((mask & (1 << j)) == 0) continue; snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME, From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 23:47:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 51179EEF; Fri, 6 Sep 2013 23:47:51 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 26B8627D4; Fri, 6 Sep 2013 23:47:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86Nlplo082998; Fri, 6 Sep 2013 23:47:51 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86Nloek082996; Fri, 6 Sep 2013 23:47:50 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201309062347.r86Nloek082996@svn.freebsd.org> From: Luiz Otavio O Souza Date: Fri, 6 Sep 2013 23:47:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255335 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 23:47:51 -0000 Author: loos Date: Fri Sep 6 23:47:50 2013 New Revision: 255335 URL: http://svnweb.freebsd.org/changeset/base/255335 Log: Remove the hardcoded limit for the number of gpio_pins that can be used. Allocate it dynamically. Approved by: adrian (mentor) Modified: head/sys/mips/atheros/ar71xx_gpio.c head/sys/mips/atheros/ar71xx_gpiovar.h Modified: head/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- head/sys/mips/atheros/ar71xx_gpio.c Fri Sep 6 23:39:56 2013 (r255334) +++ head/sys/mips/atheros/ar71xx_gpio.c Fri Sep 6 23:47:50 2013 (r255335) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -418,6 +419,13 @@ ar71xx_gpio_attach(device_t dev) "pinon", &pinon) != 0) pinon = 0; device_printf(dev, "gpio pinmask=0x%x\n", mask); + for (j = 0; j <= maxpin; j++) { + if ((mask & (1 << j)) == 0) + continue; + sc->gpio_npins++; + } + sc->gpio_pins = malloc(sizeof(*sc->gpio_pins) * sc->gpio_npins, + M_DEVBUF, M_WAITOK | M_ZERO); for (i = 0, j = 0; j <= maxpin; j++) { if ((mask & (1 << j)) == 0) continue; @@ -429,7 +437,6 @@ ar71xx_gpio_attach(device_t dev) ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], DEFAULT_CAPS); i++; } - sc->gpio_npins = i; for (i = 0; i < sc->gpio_npins; i++) { j = sc->gpio_pins[i].gp_pin; if ((pinon & (1 << j)) != 0) @@ -455,6 +462,7 @@ ar71xx_gpio_detach(device_t dev) bus_release_resource(dev, SYS_RES_MEMORY, sc->gpio_mem_rid, sc->gpio_mem_res); + free(sc->gpio_pins, M_DEVBUF); mtx_destroy(&sc->gpio_mtx); return(0); Modified: head/sys/mips/atheros/ar71xx_gpiovar.h ============================================================================== --- head/sys/mips/atheros/ar71xx_gpiovar.h Fri Sep 6 23:39:56 2013 (r255334) +++ head/sys/mips/atheros/ar71xx_gpiovar.h Fri Sep 6 23:47:50 2013 (r255335) @@ -64,7 +64,7 @@ struct ar71xx_gpio_softc { int gpio_irq_rid; void *gpio_ih; int gpio_npins; - struct gpio_pin gpio_pins[AR71XX_GPIO_PINS]; + struct gpio_pin *gpio_pins; }; #endif /* __AR71XX_GPIOVAR_H__ */ From owner-svn-src-head@FreeBSD.ORG Fri Sep 6 23:49:55 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0FAAFD0; Fri, 6 Sep 2013 23:49:55 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F150F27E6; Fri, 6 Sep 2013 23:49:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r86Nns8t083626; Fri, 6 Sep 2013 23:49:54 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r86Nnss8083625; Fri, 6 Sep 2013 23:49:54 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309062349.r86Nnss8083625@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 6 Sep 2013 23:49:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255336 - head/lib/libc/resolv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2013 23:49:55 -0000 Author: jilles Date: Fri Sep 6 23:49:54 2013 New Revision: 255336 URL: http://svnweb.freebsd.org/changeset/base/255336 Log: libc: Make resolver sockets close-on-exec (SOCK_CLOEXEC). Although the resolver's sockets are exposed to applications via res_state, I do not expect them to pass the sockets across execve(). Modified: head/lib/libc/resolv/res_send.c Modified: head/lib/libc/resolv/res_send.c ============================================================================== --- head/lib/libc/resolv/res_send.c Fri Sep 6 23:47:50 2013 (r255335) +++ head/lib/libc/resolv/res_send.c Fri Sep 6 23:49:54 2013 (r255336) @@ -660,7 +660,8 @@ send_vc(res_state statp, if (statp->_vcsock >= 0) res_nclose(statp); - statp->_vcsock = _socket(nsap->sa_family, SOCK_STREAM, 0); + statp->_vcsock = _socket(nsap->sa_family, SOCK_STREAM | + SOCK_CLOEXEC, 0); #if !defined(USE_POLL) && !defined(USE_KQUEUE) if (statp->_vcsock > highestFD) { res_nclose(statp); @@ -851,7 +852,7 @@ send_dg(res_state statp, nsaplen = get_salen(nsap); if (EXT(statp).nssocks[ns] == -1) { EXT(statp).nssocks[ns] = _socket(nsap->sa_family, - SOCK_DGRAM, 0); + SOCK_DGRAM | SOCK_CLOEXEC, 0); #if !defined(USE_POLL) && !defined(USE_KQUEUE) if (EXT(statp).nssocks[ns] > highestFD) { res_nclose(statp); From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 00:45:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1426DDFF; Sat, 7 Sep 2013 00:45:25 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 020092BB5; Sat, 7 Sep 2013 00:45:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r870jOj2019195; Sat, 7 Sep 2013 00:45:24 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r870jOZ8019194; Sat, 7 Sep 2013 00:45:24 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201309070045.r870jOZ8019194@svn.freebsd.org> From: Michael Tuexen Date: Sat, 7 Sep 2013 00:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255337 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 00:45:25 -0000 Author: tuexen Date: Sat Sep 7 00:45:24 2013 New Revision: 255337 URL: http://svnweb.freebsd.org/changeset/base/255337 Log: When computing the partial delivery point, take the receiver socket buffer size correctly into account. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Fri Sep 6 23:49:54 2013 (r255336) +++ head/sys/netinet/sctp_indata.c Sat Sep 7 00:45:24 2013 (r255337) @@ -789,13 +789,12 @@ doit_again: * but should we? */ if (stcb->sctp_socket) { - pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket), + pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT, stcb->sctp_ep->partial_delivery_point); } else { pd_point = stcb->sctp_ep->partial_delivery_point; } if (sctp_is_all_msg_on_reasm(asoc, &tsize) || (tsize >= pd_point)) { - /* * Yes, we setup to start reception, by * backing down the TSN just in case we @@ -2491,7 +2490,7 @@ doit_again: * delivery queue and something can be delivered. */ if (stcb->sctp_socket) { - pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket), + pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT, stcb->sctp_ep->partial_delivery_point); } else { pd_point = stcb->sctp_ep->partial_delivery_point; From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 02:45:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2A629467; Sat, 7 Sep 2013 02:45:52 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 170DA2480; Sat, 7 Sep 2013 02:45:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r872jps0091884; Sat, 7 Sep 2013 02:45:51 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r872jp2Y091882; Sat, 7 Sep 2013 02:45:51 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201309070245.r872jp2Y091882@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 7 Sep 2013 02:45:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255338 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 02:45:52 -0000 Author: pfg Date: Sat Sep 7 02:45:51 2013 New Revision: 255338 URL: http://svnweb.freebsd.org/changeset/base/255338 Log: ext2fs: temporarily disable htree directory index. Our code does not consider yet the case of hash collisions. This is a rather annoying situation where two or more files that happen to have the same hash value will not appear accessible. The situation is not difficult to work-around but given that things will just work without enabling htree we will save possible embarrassments for the next release. Reported by: Kevin Lo Modified: head/sys/fs/ext2fs/ext2_htree.c head/sys/fs/ext2fs/ext2_lookup.c Modified: head/sys/fs/ext2fs/ext2_htree.c ============================================================================== --- head/sys/fs/ext2fs/ext2_htree.c Sat Sep 7 00:45:24 2013 (r255337) +++ head/sys/fs/ext2fs/ext2_htree.c Sat Sep 7 02:45:51 2013 (r255338) @@ -89,10 +89,12 @@ static int ext2_htree_writebuf(struct ex int ext2_htree_has_idx(struct inode *ip) { +#ifdef EXT2FS_HTREE if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) && ip->i_flags & EXT4_INDEX) return (1); else +#endif return (0); } Modified: head/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- head/sys/fs/ext2fs/ext2_lookup.c Sat Sep 7 00:45:24 2013 (r255337) +++ head/sys/fs/ext2fs/ext2_lookup.c Sat Sep 7 02:45:51 2013 (r255338) @@ -884,6 +884,7 @@ ext2_direnter(struct inode *ip, struct v bcopy(cnp->cn_nameptr, newdir.e2d_name, (unsigned)cnp->cn_namelen + 1); newentrysize = EXT2_DIR_REC_LEN(newdir.e2d_namlen); +#ifdef EXT2FS_HTREE if (ext2_htree_has_idx(dp)) { error = ext2_htree_add_entry(dvp, &newdir, cnp); if (error) { @@ -904,6 +905,7 @@ ext2_direnter(struct inode *ip, struct v return ext2_htree_create_index(dvp, cnp, &newdir); } } +#endif /* EXT2FS_HTREE */ if (dp->i_count == 0) { /* From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 03:10:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CB52B952; Sat, 7 Sep 2013 03:10:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B5D1525F8; Sat, 7 Sep 2013 03:10:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r873ACx7007134; Sat, 7 Sep 2013 03:10:12 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r873ACAm007133; Sat, 7 Sep 2013 03:10:12 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201309070310.r873ACAm007133@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 7 Sep 2013 03:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255339 - head/sbin/newfs_msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 03:10:12 -0000 Author: pfg Date: Sat Sep 7 03:10:12 2013 New Revision: 255339 URL: http://svnweb.freebsd.org/changeset/base/255339 Log: newfs_msdos: fix inaccurate comments. The fields from deMTime and deMDate in the DOS directory entry are actually the last-modified time/date. According to some online documentation these are the only timestamps available in FAT12/FAT16. MFC after: 3 days Modified: head/sbin/newfs_msdos/newfs_msdos.c Modified: head/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.c Sat Sep 7 02:45:51 2013 (r255338) +++ head/sbin/newfs_msdos/newfs_msdos.c Sat Sep 7 03:10:12 2013 (r255339) @@ -139,8 +139,8 @@ struct de { u_int8_t deName[11]; /* name and extension */ u_int8_t deAttributes; /* attributes */ u_int8_t rsvd[10]; /* reserved */ - u_int8_t deMTime[2]; /* creation time */ - u_int8_t deMDate[2]; /* creation date */ + u_int8_t deMTime[2]; /* last-modified time */ + u_int8_t deMDate[2]; /* last-modified date */ u_int8_t deStartCluster[2]; /* starting cluster */ u_int8_t deFileSize[4]; /* size */ } __packed; From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 03:24:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 80467B8D; Sat, 7 Sep 2013 03:24:23 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6BDB326A0; Sat, 7 Sep 2013 03:24:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r873ONYD016428; Sat, 7 Sep 2013 03:24:23 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r873ONFj016427; Sat, 7 Sep 2013 03:24:23 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201309070324.r873ONFj016427@svn.freebsd.org> From: Devin Teske Date: Sat, 7 Sep 2013 03:24:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255340 - head/usr.sbin/bsdconfig/examples X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 03:24:23 -0000 Author: dteske Date: Sat Sep 7 03:24:22 2013 New Revision: 255340 URL: http://svnweb.freebsd.org/changeset/base/255340 Log: Long URLs don't always appear even with autosizing and other tricks. So, add some whitespace to put the URL on a line by itself, maximizing view. Modified: head/usr.sbin/bsdconfig/examples/browse_packages.sh Modified: head/usr.sbin/bsdconfig/examples/browse_packages.sh ============================================================================== --- head/usr.sbin/bsdconfig/examples/browse_packages.sh Sat Sep 7 03:10:12 2013 (r255339) +++ head/usr.sbin/bsdconfig/examples/browse_packages.sh Sat Sep 7 03:24:22 2013 (r255340) @@ -17,7 +17,7 @@ if [ ! -e "$TMPDIR/packages/INDEX" ]; th # For older releases, use ftp://ftp-archive.freebsd.org mediaSetFTP mediaOpen - f_show_info "Downloading packages/INDEX from %s" "$_ftpPath" + f_show_info "Downloading packages/INDEX from\n %s" "$_ftpPath" f_device_get media packages/INDEX > $TMPDIR/packages/INDEX mediaClose fi From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 03:27:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 217BAD8D; Sat, 7 Sep 2013 03:27:14 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0D50426B5; Sat, 7 Sep 2013 03:27:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r873RDSx017769; Sat, 7 Sep 2013 03:27:13 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r873RDt4017768; Sat, 7 Sep 2013 03:27:13 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201309070327.r873RDt4017768@svn.freebsd.org> From: Devin Teske Date: Sat, 7 Sep 2013 03:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255341 - head/usr.sbin/bsdconfig/examples X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 03:27:14 -0000 Author: dteske Date: Sat Sep 7 03:27:13 2013 New Revision: 255341 URL: http://svnweb.freebsd.org/changeset/base/255341 Log: Remove unnecessary mediaClose (FTP operations are done with either ftp(1) or fetch(1), neither of which are stateful, compared to how sysinstall(8) did FTP operations, maintaining an open session until mediaClose). Modified: head/usr.sbin/bsdconfig/examples/browse_packages.sh Modified: head/usr.sbin/bsdconfig/examples/browse_packages.sh ============================================================================== --- head/usr.sbin/bsdconfig/examples/browse_packages.sh Sat Sep 7 03:24:22 2013 (r255340) +++ head/usr.sbin/bsdconfig/examples/browse_packages.sh Sat Sep 7 03:27:13 2013 (r255341) @@ -19,7 +19,6 @@ if [ ! -e "$TMPDIR/packages/INDEX" ]; th mediaOpen f_show_info "Downloading packages/INDEX from\n %s" "$_ftpPath" f_device_get media packages/INDEX > $TMPDIR/packages/INDEX - mediaClose fi _directoryPath=$TMPDIR mediaSetDirectory From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 03:33:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4588AF29; Sat, 7 Sep 2013 03:33:37 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 312CA2706; Sat, 7 Sep 2013 03:33:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r873XbP0022201; Sat, 7 Sep 2013 03:33:37 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r873XbMQ022200; Sat, 7 Sep 2013 03:33:37 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201309070333.r873XbMQ022200@svn.freebsd.org> From: Peter Grehan Date: Sat, 7 Sep 2013 03:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255342 - head/sys/amd64/vmm/io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 03:33:37 -0000 Author: grehan Date: Sat Sep 7 03:33:36 2013 New Revision: 255342 URL: http://svnweb.freebsd.org/changeset/base/255342 Log: Mask off the vector from the MSI-x data word. Some o/s's set the trigger-mode level bit which results in an invalid vector and pass-thru interrupts not being delivered. Modified: head/sys/amd64/vmm/io/ppt.c Modified: head/sys/amd64/vmm/io/ppt.c ============================================================================== --- head/sys/amd64/vmm/io/ppt.c Sat Sep 7 03:27:13 2013 (r255341) +++ head/sys/amd64/vmm/io/ppt.c Sat Sep 7 03:33:36 2013 (r255342) @@ -568,7 +568,7 @@ ppt_setup_msix(struct vm *vm, int vcpu, return (ENXIO); ppt->msix.arg[idx].pptdev = ppt; - ppt->msix.arg[idx].vec = msg; + ppt->msix.arg[idx].vec = msg & 0xFF; ppt->msix.arg[idx].vcpu = (addr >> 12) & 0xFF; /* Setup the MSI-X interrupt */ From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 05:30:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B211EC30; Sat, 7 Sep 2013 05:30:34 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9DD622B98; Sat, 7 Sep 2013 05:30:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r875UYje091356; Sat, 7 Sep 2013 05:30:34 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r875UYkU091355; Sat, 7 Sep 2013 05:30:34 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201309070530.r875UYkU091355@svn.freebsd.org> From: Neel Natu Date: Sat, 7 Sep 2013 05:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255343 - head/sys/amd64/vmm/intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 05:30:34 -0000 Author: neel Date: Sat Sep 7 05:30:34 2013 New Revision: 255343 URL: http://svnweb.freebsd.org/changeset/base/255343 Log: Allocate VPIDs by using the unit number allocator to keep do the bookkeeping. Also deal with VPID exhaustion by allocating out of a reserved range as the last resort. Modified: head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Sat Sep 7 03:33:36 2013 (r255342) +++ head/sys/amd64/vmm/intel/vmx.c Sat Sep 7 05:30:34 2013 (r255343) @@ -138,8 +138,6 @@ SYSCTL_ULONG(_hw_vmm_vmx, OID_AUTO, cr4_ SYSCTL_ULONG(_hw_vmm_vmx, OID_AUTO, cr4_zeros_mask, CTLFLAG_RD, &cr4_zeros_mask, 0, NULL); -static volatile u_int nextvpid; - static int vmx_no_patmsr; static int vmx_initialized; @@ -172,6 +170,11 @@ static int cap_monitor_trap; /* statistics */ static VMM_STAT_INTEL(VMEXIT_HLT_IGNORED, "number of times hlt was ignored"); +static struct unrhdr *vpid_unr; +static u_int vpid_alloc_failed; +SYSCTL_UINT(_hw_vmm_vmx, OID_AUTO, vpid_alloc_failed, CTLFLAG_RD, + &vpid_alloc_failed, 0, NULL); + #ifdef KTR static const char * exit_reason_to_str(int reason) @@ -382,6 +385,88 @@ vmx_fix_cr4(u_long cr4) } static void +vpid_free(int vpid) +{ + if (vpid < 0 || vpid > 0xffff) + panic("vpid_free: invalid vpid %d", vpid); + + /* + * VPIDs [0,VM_MAXCPU] are special and are not allocated from + * the unit number allocator. + */ + + if (vpid > VM_MAXCPU) + free_unr(vpid_unr, vpid); +} + +static void +vpid_alloc(uint16_t *vpid, int num) +{ + int i, x; + + if (num <= 0 || num > VM_MAXCPU) + panic("invalid number of vpids requested: %d", num); + + /* + * If the "enable vpid" execution control is not enabled then the + * VPID is required to be 0 for all vcpus. + */ + if ((procbased_ctls2 & PROCBASED2_ENABLE_VPID) == 0) { + for (i = 0; i < num; i++) + vpid[i] = 0; + return; + } + + /* + * Allocate a unique VPID for each vcpu from the unit number allocator. + */ + for (i = 0; i < num; i++) { + x = alloc_unr(vpid_unr); + if (x == -1) + break; + else + vpid[i] = x; + } + + if (i < num) { + atomic_add_int(&vpid_alloc_failed, 1); + + /* + * If the unit number allocator does not have enough unique + * VPIDs then we need to allocate from the [1,VM_MAXCPU] range. + * + * These VPIDs are not be unique across VMs but this does not + * affect correctness because the combined mappings are also + * tagged with the EP4TA which is unique for each VM. + * + * It is still sub-optimal because the invvpid will invalidate + * combined mappings for a particular VPID across all EP4TAs. + */ + while (i-- > 0) + vpid_free(vpid[i]); + + for (i = 0; i < num; i++) + vpid[i] = i + 1; + } +} + +static void +vpid_init(void) +{ + /* + * VPID 0 is required when the "enable VPID" execution control is + * disabled. + * + * VPIDs [1,VM_MAXCPU] are used as the "overflow namespace" when the + * unit number allocator does not have sufficient unique VPIDs to + * satisfy the allocation. + * + * The remaining VPIDs are managed by the unit number allocator. + */ + vpid_unr = new_unrhdr(VM_MAXCPU + 1, 0xffff, NULL); +} + +static void msr_save_area_init(struct msr_entry *g_area, int *g_count) { int cnt; @@ -422,6 +507,11 @@ static int vmx_cleanup(void) { + if (vpid_unr != NULL) { + delete_unrhdr(vpid_unr); + vpid_unr = NULL; + } + smp_rendezvous(NULL, vmx_disable, NULL, NULL); return (0); @@ -607,6 +697,8 @@ vmx_init(void) cr4_ones_mask = fixed0 & fixed1; cr4_zeros_mask = ~fixed0 & ~fixed1; + vpid_init(); + /* enable VMX operation */ smp_rendezvous(NULL, vmx_enable, NULL, NULL); @@ -615,37 +707,6 @@ vmx_init(void) return (0); } -/* - * If this processor does not support VPIDs then simply return 0. - * - * Otherwise generate the next value of VPID to use. Any value is alright - * as long as it is non-zero. - * - * We always execute in VMX non-root context with EPT enabled. Thus all - * combined mappings are tagged with the (EP4TA, VPID, PCID) tuple. This - * in turn means that multiple VMs can share the same VPID as long as - * they have distinct EPT page tables. - * - * XXX - * We should optimize this so that it returns VPIDs that are not in - * use. Then we will not unnecessarily invalidate mappings in - * vmx_set_pcpu_defaults() just because two or more vcpus happen to - * use the same 'vpid'. - */ -static uint16_t -vmx_vpid(void) -{ - uint16_t vpid = 0; - - if ((procbased_ctls2 & PROCBASED2_ENABLE_VPID) != 0) { - do { - vpid = atomic_fetchadd_int(&nextvpid, 1); - } while (vpid == 0); - } - - return (vpid); -} - static int vmx_setup_cr_shadow(int which, struct vmcs *vmcs, uint32_t initial) { @@ -681,7 +742,7 @@ vmx_setup_cr_shadow(int which, struct vm static void * vmx_vminit(struct vm *vm) { - uint16_t vpid; + uint16_t vpid[VM_MAXCPU]; int i, error, guest_msr_count; struct vmx *vmx; @@ -744,6 +805,8 @@ vmx_vminit(struct vm *vm) if (!vmx_no_patmsr && guest_msr_rw(vmx, MSR_PAT)) panic("vmx_vminit: error setting guest pat msr access"); + vpid_alloc(vpid, VM_MAXCPU); + for (i = 0; i < VM_MAXCPU; i++) { vmx->vmcs[i].identifier = vmx_revision(); error = vmclear(&vmx->vmcs[i]); @@ -752,8 +815,6 @@ vmx_vminit(struct vm *vm) error, i); } - vpid = vmx_vpid(); - error = vmcs_set_defaults(&vmx->vmcs[i], (u_long)vmx_longjmp, (u_long)&vmx->ctx[i], @@ -763,7 +824,7 @@ vmx_vminit(struct vm *vm) procbased_ctls2, exit_ctls, entry_ctls, vtophys(vmx->msr_bitmap), - vpid); + vpid[i]); if (error != 0) panic("vmx_vminit: vmcs_set_defaults error %d", error); @@ -772,7 +833,7 @@ vmx_vminit(struct vm *vm) vmx->cap[i].proc_ctls = procbased_ctls; vmx->state[i].lastcpu = -1; - vmx->state[i].vpid = vpid; + vmx->state[i].vpid = vpid[i]; msr_save_area_init(vmx->guest_msrs[i], &guest_msr_count); @@ -1580,9 +1641,12 @@ err_exit: static void vmx_vmcleanup(void *arg) { - int error; + int i, error; struct vmx *vmx = arg; + for (i = 0; i < VM_MAXCPU; i++) + vpid_free(vmx->state[i].vpid); + /* * XXXSMP we also need to clear the VMCS active on the other vcpus. */ From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 05:44:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 214A2DD7; Sat, 7 Sep 2013 05:44:54 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E3E92C1B; Sat, 7 Sep 2013 05:44:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r875irfq000829; Sat, 7 Sep 2013 05:44:53 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r875irBD000828; Sat, 7 Sep 2013 05:44:53 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201309070544.r875irBD000828@svn.freebsd.org> From: Joel Dahl Date: Sat, 7 Sep 2013 05:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255344 - head/sbin/camcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 05:44:54 -0000 Author: joel (doc committer) Date: Sat Sep 7 05:44:53 2013 New Revision: 255344 URL: http://svnweb.freebsd.org/changeset/base/255344 Log: - Begin sentence on a new line. - Minor language fixes. Modified: head/sbin/camcontrol/camcontrol.8 Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Sat Sep 7 05:30:34 2013 (r255343) +++ head/sbin/camcontrol/camcontrol.8 Sat Sep 7 05:44:53 2013 (r255344) @@ -662,7 +662,8 @@ request and not expect CRC bytes to be r .Bl -tag -width 17n .It Fl r Ar len Ar fmt Op args This specifies the size of the SMP request, without the CRC bytes, and the -SMP request format. If the format is +SMP request format. +If the format is .Sq - , .Ar len bytes of data will be read from standard input and written as the SMP @@ -1152,7 +1153,8 @@ argument. The number of passes when performing an .Sq overwrite operation. -Valid values are between 1 and 31. The default is 1. +Valid values are between 1 and 31. +The default is 1. .It Fl I When performing an .Sq overwrite @@ -1212,15 +1214,20 @@ will not be asked about the timeout if a command line. .El .It Ic idle -Put ATA device into IDLE state. Optional parameter +Put ATA device into IDLE state. +Optional parameter .Pq Fl t -specifies automatic standby timer value in seconds. Value 0 disables timer. +specifies automatic standby timer value in seconds. +Value 0 disables timer. .It Ic standby -Put ATA device into STANDBY state. Optional parameter +Put ATA device into STANDBY state. +Optional parameter .Pq Fl t -specifies automatic standby timer value in seconds. Value 0 disables timer. +specifies automatic standby timer value in seconds. +Value 0 disables timer. .It Ic sleep -Put ATA device into SLEEP state. Note that the only way get device out of +Put ATA device into SLEEP state. +Note that the only way get device out of this state may be reset. .It Ic security Update or report security settings, using an ATA identify command (0xec). @@ -1246,7 +1253,8 @@ Issuing a secure erase will user data on the device and may take several hours to complete. .Pp When this command is used against an SSD drive all its cells will be marked as -empty, restoring it to factory default write performance. For SSD's this action +empty, restoring it to factory default write performance. +For SSD's this action usually takes just a few seconds. .It Fl f .Pp @@ -1276,8 +1284,10 @@ the devices configured security level. .Pp Specifies which security level to set when issuing a .Fl s Ar pwd -command. The security level determines device behavior when the master -password is used to unlock the device. When the security level is set to high +command. +The security level determines device behavior when the master +password is used to unlock the device. +When the security level is set to high the device requires the unlock command and the master password to unlock. When the security level is set to maximum the device requires a secure erase with the master password to unlock. @@ -1296,7 +1306,8 @@ argument, below. .It Fl s Ar pwd .Pp Password the device (enable security) using the given password for the selected -user. This option can be combined with other options such as +user. +This option can be combined with other options such as .Fl e Em pwd .Pp A master password may be set in a addition to the user password. The purpose of @@ -1335,7 +1346,7 @@ Confirm yes to dangerous options such as without prompting for confirmation. .Pp .El -If the password specified for any action commands doesn't match the configured +If the password specified for any action commands does not match the configured password for the specified user the command will fail. .Pp The password in all cases is limited to 32 characters, longer passwords will @@ -1392,7 +1403,7 @@ call can be made without a power-on rese .It Fl U Ar pwd .Pp Unlock the HPA configuration of the specified device using the given password. -If the password specified doesn't match the password configured via +If the password specified does not match the password configured via .Fl p Ar pwd the command will fail. .Pp @@ -1599,7 +1610,7 @@ This will .Em ERASE ALL data from the device, so backup your data before using! .Pp -This command can be used used against an SSD drive to restoring it to +This command can be used against an SSD drive to restoring it to factory default write performance. .Bd -literal -offset indent camcontrol hpa ada0 From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 06:54:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 46218CBB; Sat, 7 Sep 2013 06:54:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 33BAA2EB1; Sat, 7 Sep 2013 06:54:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r876s0OV043688; Sat, 7 Sep 2013 06:54:00 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r876s0vw043687; Sat, 7 Sep 2013 06:54:00 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309070654.r876s0vw043687@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 7 Sep 2013 06:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255347 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 06:54:00 -0000 Author: hselasky Date: Sat Sep 7 06:53:59 2013 New Revision: 255347 URL: http://svnweb.freebsd.org/changeset/base/255347 Log: Disable USB 3.0 streams mode by default, hence not all XHCI chipsets implement it to avoid undefined behaviour. Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Sat Sep 7 06:41:22 2013 (r255346) +++ head/sys/dev/usb/controller/xhci.c Sat Sep 7 06:53:59 2013 (r255347) @@ -87,12 +87,18 @@ ((struct xhci_softc *)(((uint8_t *)(bus)) - \ ((uint8_t *)&(((struct xhci_softc *)0)->sc_bus)))) +static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI"); + +static int xhcistreams; +SYSCTL_INT(_hw_usb_xhci, OID_AUTO, streams, CTLFLAG_RW | CTLFLAG_TUN, + &xhcistreams, 0, "Set to enable streams mode support"); +TUNABLE_INT("hw.usb.xhci.streams", &xhcistreams); + #ifdef USB_DEBUG static int xhcidebug; static int xhciroute; static int xhcipolling; -static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI"); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &xhcidebug, 0, "Debug level"); TUNABLE_INT("hw.usb.xhci.debug", &xhcidebug); @@ -4127,7 +4133,8 @@ xhci_set_endpoint_mode(struct usb_device case USB_EP_MODE_DEFAULT: return (0); case USB_EP_MODE_STREAMS: - if ((ep->edesc->bmAttributes & UE_XFERTYPE) != UE_BULK || + if (xhcistreams == 0 || + (ep->edesc->bmAttributes & UE_XFERTYPE) != UE_BULK || udev->speed != USB_SPEED_SUPER) return (USB_ERR_INVAL); return (0); From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 07:03:15 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 89012E39; Sat, 7 Sep 2013 07:03:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1168A2EFD; Sat, 7 Sep 2013 07:03:14 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id r8773DJt024135; Sat, 7 Sep 2013 11:03:13 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id r8773DP9024134; Sat, 7 Sep 2013 11:03:13 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 7 Sep 2013 11:03:13 +0400 From: Gleb Smirnoff To: Jamie Gritton Subject: Re: svn commit: r255316 - head/sys/kern Message-ID: <20130907070313.GO4574@FreeBSD.org> References: <201309061732.r86HWTha054904@svn.freebsd.org> <20130906181826.GL4574@FreeBSD.org> <522A25FA.5060008@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <522A25FA.5060008@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 07:03:15 -0000 Jamie, On Fri, Sep 06, 2013 at 12:59:06PM -0600, Jamie Gritton wrote: J> > J> + J> > J> + /* J> > J> + * As in the non-jail case, non-root users are expected to be J> > J> + * able to read kernel/phyiscal memory (provided /dev/[k]mem J> > J> + * exists in the jail and they have permission to access it). J> > J> + */ J> > J> + case PRIV_KMEM_READ: J> > J> return (0); J> > J> J> > J> /* J> > J> > Was that discussed anywhere or reviewed by anyone? J> J> Yes, it was brought up by jase@ in src-committers last week, noting that J> my original PRIV_KMEM_* commit (r252841) broke existing jail behavior. J> The entire "discussion" was the mention of the problem and my mention of J> what it would take to fix it. There was no code review as such, but that J> seemed appropriate for an obvious one-liner. I'm sorry then. Does that mean that we always have had ability for a jail-root to investigate kernel memory? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 07:06:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ADD3AF99; Sat, 7 Sep 2013 07:06:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 350832F16; Sat, 7 Sep 2013 07:06:46 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id r8776iPX024155; Sat, 7 Sep 2013 11:06:44 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id r8776i2k024154; Sat, 7 Sep 2013 11:06:44 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 7 Sep 2013 11:06:44 +0400 From: Gleb Smirnoff To: Bryan Venteicher Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Message-ID: <20130907070644.GP4574@FreeBSD.org> References: <201309062024.r86KOMqm059838@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 07:06:47 -0000 On Fri, Sep 06, 2013 at 03:46:11PM -0500, Bryan Venteicher wrote: B> On Fri, Sep 6, 2013 at 3:24 PM, Bryan Venteicher wrote: B> B> > Author: bryanv B> > Date: Fri Sep 6 20:24:21 2013 B> > New Revision: 255323 B> > URL: http://svnweb.freebsd.org/changeset/base/255323 B> > B> > Log: B> > Add vmx device to the i386 and amd64 NOTES files B> > B> > B> FWIW - I'm on the fence about adding vmx to GENERIC for 10.0. IIRC, B> VMware's vmxnet3 driver returns BUS_PROBE_VENDOR so the two drivers should B> coexist. This is assuming VMware updates the driver for 10 ... which I'm B> guessing isn't likely and was a large reason I added this driver in the B> first place. B> B> LMK if anybody has strong thoughts either way. May be it is worth providing a special kernel config for VMware environment? When GENERIC is booted in vmware it has a load of stuff that would be never used. And if a GENERIC with vmx is booted on hardware, vmx won't be ever used. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 07:11:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 90A2319C for ; Sat, 7 Sep 2013 07:11:56 +0000 (UTC) (envelope-from bounces+73574-9504-svn-src-head=freebsd.org@sendgrid.me) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id 31FCF2F62 for ; Sat, 7 Sep 2013 07:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpapi; bh=jo4+HzohwlKGWEpXO3Y0cZ XClo4=; b=EpkNJg3SVAiCEwLImuONNu85ac3GnRWeobUkK8tmPXLuUwkjabpnh3 uV2v8hWhfLYyS0nmVuhB8JjqG/7NcXcTOyxXPhCDiI+cRJtDPbxI4SPb8mgmerBC ap2d7ZAMa9NhlwV6EVv6eKt2PMd/OfOr6I8Tufq+WxOAq22kHsFp8= Received: by with SMTP id filterdell-008.980.522AD0AF1 Sat, 07 Sep 2013 07:07:27 +0000 (GMT) Received: from mail.tarsnap.com (unknown [10.60.208.17]) by mi13 (SG) with ESMTP id 140f73f2b49.526.14a2d1e for ; Sat, 07 Sep 2013 07:07:26 +0000 (UTC) Received: (qmail 80168 invoked from network); 7 Sep 2013 07:07:25 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 7 Sep 2013 07:07:25 -0000 Received: (qmail 4162 invoked from network); 7 Sep 2013 07:06:32 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 7 Sep 2013 07:06:32 -0000 Message-ID: <522AD078.9010501@freebsd.org> Date: Sat, 07 Sep 2013 00:06:32 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130816 Thunderbird/17.0.8 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r255316 - head/sys/kern References: <201309061732.r86HWTha054904@svn.freebsd.org> <20130906181826.GL4574@FreeBSD.org> <522A25FA.5060008@FreeBSD.org> <20130907070313.GO4574@FreeBSD.org> In-Reply-To: <20130907070313.GO4574@FreeBSD.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SG-EID: EvYvoie/qnEezyq2t4eRKjDm9X7ZKbCMt75WvXA+XNEsXZ4lye8MxFr7qM+M6FqUrDjQqssW533SXboj/akIWqv4ujqde6BYwBVZWzJru0jvQwGKL6cQk/2AJ0lMbil6yKg+zZvF1fPdZr5cl0N6qZE33IBmXQqaEOTN0IJWFGE= Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Jamie Gritton X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 07:11:56 -0000 On 09/07/13 00:03, Gleb Smirnoff wrote: > Does that mean that we always have had ability for a jail-root to > investigate kernel memory? Only if you're crazy enough to have a /dev/kmem inside your jail. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 07:26:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 731C3475; Sat, 7 Sep 2013 07:26:52 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5FCAB2FF2; Sat, 7 Sep 2013 07:26:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r877Qqfj063811; Sat, 7 Sep 2013 07:26:52 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r877QqaM063810; Sat, 7 Sep 2013 07:26:52 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201309070726.r877QqaM063810@svn.freebsd.org> From: David Chisnall Date: Sat, 7 Sep 2013 07:26:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255348 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 07:26:52 -0000 Author: theraven Date: Sat Sep 7 07:26:51 2013 New Revision: 255348 URL: http://svnweb.freebsd.org/changeset/base/255348 Log: Add note in UPDATING about the no-gcc-by-default switch. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Sep 7 06:53:59 2013 (r255347) +++ head/UPDATING Sat Sep 7 07:26:51 2013 (r255348) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130906: + The GNU Compiler Collection and C++ standard library (libstdc++) + are no longer built by default on platforms where clang is the system + compiler. You can enable them with the WITH_GCC and WITH_GNUCXX + options in src.conf. + 20130905: The PROCDESC kernel option is now part of the GENERIC kernel configuration and is required for the rwhod(8) to work. From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 07:53:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E636FC28; Sat, 7 Sep 2013 07:53:21 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA8CE2130; Sat, 7 Sep 2013 07:53:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r877rLmR080379; Sat, 7 Sep 2013 07:53:21 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r877rLs0080377; Sat, 7 Sep 2013 07:53:21 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201309070753.r877rLs0080377@svn.freebsd.org> From: Navdeep Parhar Date: Sat, 7 Sep 2013 07:53:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255351 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 07:53:22 -0000 Author: np Date: Sat Sep 7 07:53:21 2013 New Revision: 255351 URL: http://svnweb.freebsd.org/changeset/base/255351 Log: Add a vtprintf. It is to tprintf what vprintf is to printf. Reviewed by: kib Modified: head/sys/kern/subr_prf.c head/sys/sys/systm.h Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Sat Sep 7 07:39:24 2013 (r255350) +++ head/sys/kern/subr_prf.c Sat Sep 7 07:53:21 2013 (r255351) @@ -175,15 +175,24 @@ out: } /* - * tprintf prints on the controlling terminal associated with the given - * session, possibly to the log as well. + * tprintf and vtprintf print on the controlling terminal associated with the + * given session, possibly to the log as well. */ void tprintf(struct proc *p, int pri, const char *fmt, ...) { + va_list ap; + + va_start(ap, fmt); + vtprintf(p, pri, fmt, ap); + va_end(ap); +} + +void +vtprintf(struct proc *p, int pri, const char *fmt, va_list ap) +{ struct tty *tp = NULL; int flags = 0; - va_list ap; struct putchar_arg pca; struct session *sess = NULL; @@ -208,13 +217,11 @@ tprintf(struct proc *p, int pri, const c pca.tty = tp; pca.flags = flags; pca.p_bufr = NULL; - va_start(ap, fmt); if (pca.tty != NULL) tty_lock(pca.tty); kvprintf(fmt, putchar, &pca, 10, ap); if (pca.tty != NULL) tty_unlock(pca.tty); - va_end(ap); if (sess != NULL) sess_release(sess); msgbuftrigger = 1; Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Sat Sep 7 07:39:24 2013 (r255350) +++ head/sys/sys/systm.h Sat Sep 7 07:53:21 2013 (r255351) @@ -212,6 +212,7 @@ u_long strtoul(const char *, char **, in quad_t strtoq(const char *, char **, int) __nonnull(1); u_quad_t strtouq(const char *, char **, int) __nonnull(1); void tprintf(struct proc *p, int pri, const char *, ...) __printflike(3, 4); +void vtprintf(struct proc *, int, const char *, __va_list) __printflike(3, 0); void hexdump(const void *ptr, int length, const char *hdr, int flags); #define HD_COLUMN_MASK 0xff #define HD_DELIM_MASK 0xff00 From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 07:56:56 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7FCFCF20; Sat, 7 Sep 2013 07:56:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D62A2144; Sat, 7 Sep 2013 07:56:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r877uuhE082362; Sat, 7 Sep 2013 07:56:56 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r877uuge082361; Sat, 7 Sep 2013 07:56:56 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309070756.r877uuge082361@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 7 Sep 2013 07:56:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255352 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 07:56:56 -0000 Author: glebius Date: Sat Sep 7 07:56:55 2013 New Revision: 255352 URL: http://svnweb.freebsd.org/changeset/base/255352 Log: Fix of r255318: move sf_buf_alloc()/sf_buf_free() out of #ifdef ARM_USE_SMALL_ALLOC. Modified: head/sys/arm/include/sf_buf.h Modified: head/sys/arm/include/sf_buf.h ============================================================================== --- head/sys/arm/include/sf_buf.h Sat Sep 7 07:53:21 2013 (r255351) +++ head/sys/arm/include/sf_buf.h Sat Sep 7 07:56:55 2013 (r255352) @@ -40,9 +40,6 @@ struct vm_page; struct sf_buf; -struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); -void sf_buf_free(struct sf_buf *sf); - static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { @@ -82,4 +79,8 @@ sf_buf_page(struct sf_buf *sf) } #endif + +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); + #endif /* !_MACHINE_SF_BUF_H_ */ From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 08:01:14 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4BA4F3BD; Sat, 7 Sep 2013 08:01:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id CD404219D; Sat, 7 Sep 2013 08:01:13 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1VIDUE-000P5K-Af; Sat, 07 Sep 2013 12:03:18 +0400 Date: Sat, 7 Sep 2013 12:03:18 +0400 From: Slawa Olhovchenkov To: Colin Percival Subject: Re: svn commit: r255316 - head/sys/kern Message-ID: <20130907080318.GA95723@zxy.spb.ru> References: <201309061732.r86HWTha054904@svn.freebsd.org> <20130906181826.GL4574@FreeBSD.org> <522A25FA.5060008@FreeBSD.org> <20130907070313.GO4574@FreeBSD.org> <522AD078.9010501@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <522AD078.9010501@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Gleb Smirnoff , src-committers@FreeBSD.org, Jamie Gritton X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 08:01:14 -0000 On Sat, Sep 07, 2013 at 12:06:32AM -0700, Colin Percival wrote: > On 09/07/13 00:03, Gleb Smirnoff wrote: > > Does that mean that we always have had ability for a jail-root to > > investigate kernel memory? > > Only if you're crazy enough to have a /dev/kmem inside your jail. Have we ability to export individual devices (from /dev/) to jail? For example, jail with named need /dev/ inside. From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 08:03:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7FB456B7 for ; Sat, 7 Sep 2013 08:03:28 +0000 (UTC) (envelope-from bounces+73574-9504-svn-src-head=freebsd.org@sendgrid.me) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id 2C61121AC for ; Sat, 7 Sep 2013 08:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpapi; bh=dcxMP4SHIp6leNVO9tAisZ ilr1U=; b=wlvOJ9Dt/SWmiuqHLeMlRGtlBpHLFYkv3WlBlCUFWcUHqAh0Y29pqg YNYKoWpUPTAeSBXOhS1vaS2S+FUB62EsuZdNNGDvu0mVu+drCw8fdvQh4mYCy4NT 9F1w70IYiqAdL/mFIk8ilPDHMMz3+O4rixGoRy021TP3/CfiEU34E= Received: by with SMTP id mf54.7513.522ADDCF2 Sat, 07 Sep 2013 08:03:27 +0000 (GMT) Received: from mail.tarsnap.com (unknown [10.60.208.17]) by mi16 (SG) with ESMTP id 140f7727222.b94.162f3ec for ; Sat, 07 Sep 2013 08:03:27 +0000 (UTC) Received: (qmail 82144 invoked from network); 7 Sep 2013 08:03:26 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 7 Sep 2013 08:03:26 -0000 Received: (qmail 4404 invoked from network); 7 Sep 2013 08:02:33 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 7 Sep 2013 08:02:33 -0000 Message-ID: <522ADD98.6050705@freebsd.org> Date: Sat, 07 Sep 2013 01:02:32 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130816 Thunderbird/17.0.8 MIME-Version: 1.0 To: Slawa Olhovchenkov Subject: Re: svn commit: r255316 - head/sys/kern References: <201309061732.r86HWTha054904@svn.freebsd.org> <20130906181826.GL4574@FreeBSD.org> <522A25FA.5060008@FreeBSD.org> <20130907070313.GO4574@FreeBSD.org> <522AD078.9010501@freebsd.org> <20130907080318.GA95723@zxy.spb.ru> In-Reply-To: <20130907080318.GA95723@zxy.spb.ru> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SG-EID: EvYvoie/qnEezyq2t4eRKjDm9X7ZKbCMt75WvXA+XNFHMZ5vw6SURwOt2+JkAS4obVyWF079lAxg8uyBDAGp5Oygv1musgl80BlkRJJQ5ApTmKvx1TppJ3BdeYqDmchZrXvcicyNTL6AhvxIwMdshoUW6NMlaQrzIp3TyUwdh+g= Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Gleb Smirnoff , src-committers@FreeBSD.org, Jamie Gritton X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 08:03:28 -0000 On 09/07/13 01:03, Slawa Olhovchenkov wrote: > On Sat, Sep 07, 2013 at 12:06:32AM -0700, Colin Percival wrote: > >> On 09/07/13 00:03, Gleb Smirnoff wrote: >>> Does that mean that we always have had ability for a jail-root to >>> investigate kernel memory? >> >> Only if you're crazy enough to have a /dev/kmem inside your jail. > > Have we ability to export individual devices (from /dev/) to jail? > For example, jail with named need /dev/ inside. Yes, man 8 devfs. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 08:15:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 86B86B2C; Sat, 7 Sep 2013 08:15:39 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id 43D69222F; Sat, 7 Sep 2013 08:15:39 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1VIDiB-000PCD-JU; Sat, 07 Sep 2013 12:17:43 +0400 Date: Sat, 7 Sep 2013 12:17:43 +0400 From: Slawa Olhovchenkov To: Bryan Venteicher Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Message-ID: <20130907081743.GB95723@zxy.spb.ru> References: <201309062024.r86KOMqm059838@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 08:15:39 -0000 On Fri, Sep 06, 2013 at 03:46:11PM -0500, Bryan Venteicher wrote: > On Fri, Sep 6, 2013 at 3:24 PM, Bryan Venteicher wrote: > > > Author: bryanv > > Date: Fri Sep 6 20:24:21 2013 > > New Revision: 255323 > > URL: http://svnweb.freebsd.org/changeset/base/255323 > > > > Log: > > Add vmx device to the i386 and amd64 NOTES files > > > > > FWIW - I'm on the fence about adding vmx to GENERIC for 10.0. IIRC, > VMware's vmxnet3 driver returns BUS_PROBE_VENDOR so the two drivers should > coexist. This is assuming VMware updates the driver for 10 ... which I'm > guessing isn't likely and was a large reason I added this driver in the > first place. Why we don't switch (in 10.0) to minimal GENERIC and all driver loaded as modules (/boot/loader.conf)? This is reduce memory (by easy unloading unneed drivers/modules), space (by reducing GENERIC+symbols size about 100M), space on install media too (100M + compressed 100M), build time (not need to build some modules twice) and add ability to easy update/bugfix modules w/o reboot. After last updates to bootloader loading many modules enought fast. I already switched (for me) to this setup and it's fine for me. From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 09:45:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2E75FDC5; Sat, 7 Sep 2013 09:45:44 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1CB802688; Sat, 7 Sep 2013 09:45:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r879jhQt050005; Sat, 7 Sep 2013 09:45:43 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r879jh9D050004; Sat, 7 Sep 2013 09:45:43 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309070945.r879jh9D050004@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 7 Sep 2013 09:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255354 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 09:45:44 -0000 Author: glebius Date: Sat Sep 7 09:45:43 2013 New Revision: 255354 URL: http://svnweb.freebsd.org/changeset/base/255354 Log: Add more leftovers from gcc. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Sep 7 07:58:29 2013 (r255353) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Sep 7 09:45:43 2013 (r255354) @@ -1554,13 +1554,17 @@ OLD_FILES+=usr/bin/gcc OLD_FILES+=usr/bin/gcov OLD_FILES+=usr/bin/gcpp .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/gcc/4.2/__wmmintrin_aes.h +OLD_FILES+=usr/include/gcc/4.2/__wmmintrin_pclmul.h +OLD_FILES+=usr/include/gcc/4.2/ammintrin.h OLD_FILES+=usr/include/gcc/4.2/emmintrin.h +OLD_FILES+=usr/include/gcc/4.2/mm3dnow.h OLD_FILES+=usr/include/gcc/4.2/mm_malloc.h OLD_FILES+=usr/include/gcc/4.2/mmintrin.h OLD_FILES+=usr/include/gcc/4.2/pmmintrin.h OLD_FILES+=usr/include/gcc/4.2/tmmintrin.h +OLD_FILES+=usr/include/gcc/4.2/wmmintrin.h OLD_FILES+=usr/include/gcc/4.2/xmmintrin.h -OLD_FILES+=usr/include/gcc/4.2/mm3dnow.h .elif ${TARGET_ARCH} == "ia64" OLD_FILES+=usr/include/gcc/4.2/ia64intrin.h .elif ${TARGET_ARCH} == "arm" From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 09:47:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0C43FFDF; Sat, 7 Sep 2013 09:47:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EEB7F2695; Sat, 7 Sep 2013 09:47:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r879lInt050810; Sat, 7 Sep 2013 09:47:18 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r879lI4V050809; Sat, 7 Sep 2013 09:47:18 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201309070947.r879lI4V050809@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 7 Sep 2013 09:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255355 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 09:47:19 -0000 Author: glebius Date: Sat Sep 7 09:47:18 2013 New Revision: 255355 URL: http://svnweb.freebsd.org/changeset/base/255355 Log: Fix !INET6 build. Modified: head/sys/contrib/ipfilter/netinet/fil.c Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Sat Sep 7 09:45:43 2013 (r255354) +++ head/sys/contrib/ipfilter/netinet/fil.c Sat Sep 7 09:47:18 2013 (r255355) @@ -9862,8 +9862,8 @@ ipf_ht_node_make_key(htp, key, family, a key->hn_addr.adf_addr.i6[0] = addr->i6[0] & htonl(0xffffffff << (32 - bits)); } - } #endif + } } From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 10:42:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8FEECA95; Sat, 7 Sep 2013 10:42:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7DD622953; Sat, 7 Sep 2013 10:42:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87Ag0DA089438; Sat, 7 Sep 2013 10:42:00 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87Ag0MH089437; Sat, 7 Sep 2013 10:42:00 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201309071042.r87Ag0MH089437@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 7 Sep 2013 10:42:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255356 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 10:42:00 -0000 Author: hselasky Date: Sat Sep 7 10:42:00 2013 New Revision: 255356 URL: http://svnweb.freebsd.org/changeset/base/255356 Log: Revert parts of r245132 and r245175. We don't need to write to the IMAN register to clear the pending interrupt status bits. This patch tries to solve problems seen on the MacBook Air, as reported by Johannes Lundberg MFC after: 1 week Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Sat Sep 7 09:47:18 2013 (r255355) +++ head/sys/dev/usb/controller/xhci.c Sat Sep 7 10:42:00 2013 (r255356) @@ -1480,7 +1480,6 @@ void xhci_interrupt(struct xhci_softc *sc) { uint32_t status; - uint32_t iman; USB_BUS_LOCK(&sc->sc_bus); @@ -1495,15 +1494,6 @@ xhci_interrupt(struct xhci_softc *sc) DPRINTFN(16, "real interrupt (status=0x%08x)\n", status); if (status & XHCI_STS_EINT) { - - /* acknowledge pending event */ - iman = XREAD4(sc, runt, XHCI_IMAN(0)); - - /* reset interrupt */ - XWRITE4(sc, runt, XHCI_IMAN(0), iman); - - DPRINTFN(16, "real interrupt (iman=0x%08x)\n", iman); - /* check for event(s) */ xhci_interrupt_poll(sc); } From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 11:02:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6C317FA7; Sat, 7 Sep 2013 11:02:39 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 59C9C2A16; Sat, 7 Sep 2013 11:02:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87B2d8L003232; Sat, 7 Sep 2013 11:02:39 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87B2dJx003231; Sat, 7 Sep 2013 11:02:39 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201309071102.r87B2dJx003231@svn.freebsd.org> From: Antoine Brodin Date: Sat, 7 Sep 2013 11:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255357 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 11:02:39 -0000 Author: antoine Date: Sat Sep 7 11:02:38 2013 New Revision: 255357 URL: http://svnweb.freebsd.org/changeset/base/255357 Log: Do not try to remove directories that are part of BSD.include.dist Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Sep 7 10:42:00 2013 (r255356) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Sep 7 11:02:38 2013 (r255357) @@ -1574,8 +1574,6 @@ OLD_FILES+=usr/include/gcc/4.2/altivec.h OLD_FILES+=usr/include/gcc/4.2/ppc-asm.h OLD_FILES+=usr/include/gcc/4.2/spe.h .endif -OLD_DIRS+=usr/include/gcc/4.2 -OLD_DIRS+=usr/include/gcc OLD_FILES+=usr/libexec/cc1 OLD_FILES+=usr/libexec/cc1plus OLD_FILES+=usr/share/info/cpp.info.gz From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 11:41:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 14B60A4E; Sat, 7 Sep 2013 11:41:53 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 027832BC5; Sat, 7 Sep 2013 11:41:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87BfqxH026968; Sat, 7 Sep 2013 11:41:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87BfqSQ026967; Sat, 7 Sep 2013 11:41:52 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201309071141.r87BfqSQ026967@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 7 Sep 2013 11:41:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255358 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 11:41:53 -0000 Author: jilles Date: Sat Sep 7 11:41:52 2013 New Revision: 255358 URL: http://svnweb.freebsd.org/changeset/base/255358 Log: wait(2): Add some possible caveats to standards section. Modified: head/lib/libc/sys/wait.2 Modified: head/lib/libc/sys/wait.2 ============================================================================== --- head/lib/libc/sys/wait.2 Sat Sep 7 11:02:38 2013 (r255357) +++ head/lib/libc/sys/wait.2 Sat Sep 7 11:41:52 2013 (r255358) @@ -28,7 +28,7 @@ .\" @(#)wait.2 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd November 10, 2012 +.Dd September 7, 2013 .Dt WAIT 2 .Os .Sh NAME @@ -604,9 +604,23 @@ are not specified by POSIX. The .Fn WCOREDUMP macro -and the ability to restart a pending -.Fn wait -call are extensions to the POSIX interface. +is an extension to the POSIX interface. +.Pp +The ability to use the +.Dv WNOWAIT +flag with +.Fn waitpid +is an extension; +.Tn POSIX +only permits this flag with +.Fn waitid . +.Pp +.Tn POSIX +requires +.Fn waitid +to return the full 32 bits passed to +.Xr _exit 2 ; +this implementation only returns 8 bits like in the other calls. .Sh HISTORY The .Fn wait From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 13:45:46 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 03A54D41; Sat, 7 Sep 2013 13:45:46 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E473D2213; Sat, 7 Sep 2013 13:45:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87Djjp7003444; Sat, 7 Sep 2013 13:45:45 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87Djj0P003439; Sat, 7 Sep 2013 13:45:45 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201309071345.r87Djj0P003439@svn.freebsd.org> From: Davide Italiano Date: Sat, 7 Sep 2013 13:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255359 - in head/sys: cddl/dev/dtrace dev/firewire dev/vkbd security/audit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 13:45:46 -0000 Author: davide Date: Sat Sep 7 13:45:44 2013 New Revision: 255359 URL: http://svnweb.freebsd.org/changeset/base/255359 Log: - Use make_dev_credf(MAKEDEV_REF) instead of the race-prone make_dev()+ dev_ref() in the clone handlers that still use it. - Don't set SI_CHEAPCLONE flag, it's not used anywhere neither in devfs (for anything real) Reviewed by: kib Modified: head/sys/cddl/dev/dtrace/dtrace_clone.c head/sys/dev/firewire/fwdev.c head/sys/dev/vkbd/vkbd.c head/sys/security/audit/audit_pipe.c Modified: head/sys/cddl/dev/dtrace/dtrace_clone.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_clone.c Sat Sep 7 11:41:52 2013 (r255358) +++ head/sys/cddl/dev/dtrace/dtrace_clone.c Sat Sep 7 13:45:44 2013 (r255359) @@ -52,10 +52,6 @@ dtrace_clone(void *arg, struct ucred *cr /* Clone the device to the new minor number. */ if (clone_create(&dtrace_clones, &dtrace_cdevsw, &u, dev, 0) != 0) /* Create the /dev/dtrace/dtraceNN entry. */ - *dev = make_dev_cred(&dtrace_cdevsw, u, cred, + *dev = make_dev_credf(MAKEDEV_REF, &dtrace_cdevsw, u, cred, UID_ROOT, GID_WHEEL, 0600, "dtrace/dtrace%d", u); - if (*dev != NULL) { - dev_ref(*dev); - (*dev)->si_flags |= SI_CHEAPCLONE; - } } Modified: head/sys/dev/firewire/fwdev.c ============================================================================== --- head/sys/dev/firewire/fwdev.c Sat Sep 7 11:41:52 2013 (r255358) +++ head/sys/dev/firewire/fwdev.c Sat Sep 7 13:45:44 2013 (r255359) @@ -992,11 +992,9 @@ found: sc = devclass_get_softc(firewire_devclass, unit); if (sc == NULL) return; - *dev = make_dev(&firewire_cdevsw, MAKEMINOR(devflag[i], unit, sub), - UID_ROOT, GID_OPERATOR, 0660, - "%s%d.%d", devnames[i], unit, sub); - dev_ref(*dev); - (*dev)->si_flags |= SI_CHEAPCLONE; + *dev = make_dev_credf(MAKEDEV_REF, &firewire_cdevsw, + MAKEMINOR(devflag[i], unit, sub), cred, UID_ROOT, GID_OPERATOR, + 0660, "%s%d.%d", devnames[i], unit, sub); dev_depends(sc->dev, *dev); return; } Modified: head/sys/dev/vkbd/vkbd.c ============================================================================== --- head/sys/dev/vkbd/vkbd.c Sat Sep 7 11:41:52 2013 (r255358) +++ head/sys/dev/vkbd/vkbd.c Sat Sep 7 13:45:44 2013 (r255359) @@ -186,14 +186,10 @@ vkbd_dev_clone(void *arg, struct ucred * return; /* don't recognize the name */ /* find any existing device, or allocate new unit number */ - if (clone_create(&vkbd_dev_clones, &vkbd_dev_cdevsw, &unit, dev, 0)) { - *dev = make_dev(&vkbd_dev_cdevsw, unit, - UID_ROOT, GID_WHEEL, 0600, DEVICE_NAME "%d", unit); - if (*dev != NULL) { - dev_ref(*dev); - (*dev)->si_flags |= SI_CHEAPCLONE; - } - } + if (clone_create(&vkbd_dev_clones, &vkbd_dev_cdevsw, &unit, dev, 0)) + *dev = make_dev_credf(MAKEDEV_REF, &vkbd_dev_cdevsw, unit, + cred, UID_ROOT, GID_WHEEL, 0600, DEVICE_NAME "%d", + unit); } /* Open device */ Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Sat Sep 7 11:41:52 2013 (r255358) +++ head/sys/security/audit/audit_pipe.c Sat Sep 7 13:45:44 2013 (r255359) @@ -672,14 +672,9 @@ audit_pipe_clone(void *arg, struct ucred return; i = clone_create(&audit_pipe_clones, &audit_pipe_cdevsw, &u, dev, 0); - if (i) { - *dev = make_dev(&audit_pipe_cdevsw, u, UID_ROOT, - GID_WHEEL, 0600, "%s%d", AUDIT_PIPE_NAME, u); - if (*dev != NULL) { - dev_ref(*dev); - (*dev)->si_flags |= SI_CHEAPCLONE; - } - } + if (i) + *dev = make_dev_credf(MAKEDEV_REF, &audit_pipe_cdevsw, u, cred, + UID_ROOT, GID_WHEEL, 0600, "%s%d", AUDIT_PIPE_NAME, u); } /* From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 13:50:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 12752EE2; Sat, 7 Sep 2013 13:50:14 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 002E32246; Sat, 7 Sep 2013 13:50:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87DoDoX005695; Sat, 7 Sep 2013 13:50:13 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87DoDUb005690; Sat, 7 Sep 2013 13:50:13 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201309071350.r87DoDUb005690@svn.freebsd.org> From: Davide Italiano Date: Sat, 7 Sep 2013 13:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255360 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 13:50:14 -0000 Author: davide Date: Sat Sep 7 13:50:13 2013 New Revision: 255360 URL: http://svnweb.freebsd.org/changeset/base/255360 Log: Don't clear the unused SI_CHEAPCLONE flag in tap_create()/tuncreate(). Reviewed by: kib Modified: head/sys/net/if_tap.c head/sys/net/if_tun.c Modified: head/sys/net/if_tap.c ============================================================================== --- head/sys/net/if_tap.c Sat Sep 7 13:45:44 2013 (r255359) +++ head/sys/net/if_tap.c Sat Sep 7 13:50:13 2013 (r255360) @@ -409,8 +409,6 @@ tapcreate(struct cdev *dev) const char *name = NULL; u_char eaddr[6]; - dev->si_flags &= ~SI_CHEAPCLONE; - /* allocate driver storage and create device */ tp = malloc(sizeof(*tp), M_TAP, M_WAITOK | M_ZERO); mtx_init(&tp->tap_mtx, "tap_mtx", NULL, MTX_DEF); Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Sat Sep 7 13:45:44 2013 (r255359) +++ head/sys/net/if_tun.c Sat Sep 7 13:50:13 2013 (r255360) @@ -361,8 +361,6 @@ tuncreate(const char *name, struct cdev struct tun_softc *sc; struct ifnet *ifp; - dev->si_flags &= ~SI_CHEAPCLONE; - sc = malloc(sizeof(*sc), M_TUN, M_WAITOK | M_ZERO); mtx_init(&sc->tun_mtx, "tun_mtx", NULL, MTX_DEF); cv_init(&sc->tun_cv, "tun_condvar"); From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 14:04:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 45607447; Sat, 7 Sep 2013 14:04:12 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 31A722397; Sat, 7 Sep 2013 14:04:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87E4Ceu016757; Sat, 7 Sep 2013 14:04:12 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87E4BJx016699; Sat, 7 Sep 2013 14:04:11 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201309071404.r87E4BJx016699@svn.freebsd.org> From: Andrew Turner Date: Sat, 7 Sep 2013 14:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255361 - in head: contrib/gcc/config/arm lib/libc/arm lib/libc/arm/softfloat lib/msun/src sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 14:04:12 -0000 Author: andrew Date: Sat Sep 7 14:04:10 2013 New Revision: 255361 URL: http://svnweb.freebsd.org/changeset/base/255361 Log: On ARM EABI double precision floating point values are stored in the endian the CPU is in, i.e. little-endian on most ARM cores. This allows ARMv4 and ARMv5 boards to boot with the ARM EABI. Modified: head/contrib/gcc/config/arm/ieee754-df.S head/lib/libc/arm/_fpmath.h head/lib/libc/arm/arith.h head/lib/libc/arm/softfloat/arm-gcc.h head/lib/msun/src/math_private.h head/sys/arm/include/ieee.h Modified: head/contrib/gcc/config/arm/ieee754-df.S ============================================================================== --- head/contrib/gcc/config/arm/ieee754-df.S Sat Sep 7 13:50:13 2013 (r255360) +++ head/contrib/gcc/config/arm/ieee754-df.S Sat Sep 7 14:04:10 2013 (r255361) @@ -43,7 +43,7 @@ @ For FPA, float words are always big-endian. @ For VFP, floats words follow the memory system mode. -#if defined(__VFP_FP__) && !defined(__ARMEB__) +#if (defined(__ARM_EABI__) || defined(__VFP_FP__)) && !defined(__ARMEB__) #define xl r0 #define xh r1 #define yl r2 Modified: head/lib/libc/arm/_fpmath.h ============================================================================== --- head/lib/libc/arm/_fpmath.h Sat Sep 7 13:50:13 2013 (r255360) +++ head/lib/libc/arm/_fpmath.h Sat Sep 7 14:04:10 2013 (r255361) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#if defined(__VFP_FP__) +#if defined(__VFP_FP__) || defined(__ARM_EABI__) #define _IEEE_WORD_ORDER _BYTE_ORDER #else #define _IEEE_WORD_ORDER _BIG_ENDIAN Modified: head/lib/libc/arm/arith.h ============================================================================== --- head/lib/libc/arm/arith.h Sat Sep 7 13:50:13 2013 (r255360) +++ head/lib/libc/arm/arith.h Sat Sep 7 14:04:10 2013 (r255361) @@ -11,7 +11,7 @@ * architecture. See contrib/gdtoa/gdtoaimp.h for details. */ -#if !defined(__ARMEB__) && defined(__VFP_FP__) +#if !defined(__ARMEB__) && (defined(__VFP_FP__) || defined(__ARM_EABI__)) #define IEEE_8087 #define Arith_Kind_ASL 1 #define Sudden_Underflow Modified: head/lib/libc/arm/softfloat/arm-gcc.h ============================================================================== --- head/lib/libc/arm/softfloat/arm-gcc.h Sat Sep 7 13:50:13 2013 (r255360) +++ head/lib/libc/arm/softfloat/arm-gcc.h Sat Sep 7 14:04:10 2013 (r255361) @@ -91,7 +91,7 @@ what the endianness of the CPU. VFP is ------------------------------------------------------------------------------- */ #if defined(SOFTFLOAT_FOR_GCC) -#if defined(__VFP_FP__) || defined(__ARMEB__) +#if defined (__ARM_EABI__) || defined(__VFP_FP__) || defined(__ARMEB__) #define FLOAT64_DEMANGLE(a) (a) #define FLOAT64_MANGLE(a) (a) #else Modified: head/lib/msun/src/math_private.h ============================================================================== --- head/lib/msun/src/math_private.h Sat Sep 7 13:50:13 2013 (r255360) +++ head/lib/msun/src/math_private.h Sat Sep 7 14:04:10 2013 (r255361) @@ -39,7 +39,7 @@ */ #ifdef __arm__ -#if defined(__VFP_FP__) +#if defined(__VFP_FP__) || defined(__ARM_EABI__) #define IEEE_WORD_ORDER BYTE_ORDER #else #define IEEE_WORD_ORDER BIG_ENDIAN Modified: head/sys/arm/include/ieee.h ============================================================================== --- head/sys/arm/include/ieee.h Sat Sep 7 13:50:13 2013 (r255360) +++ head/sys/arm/include/ieee.h Sat Sep 7 14:04:10 2013 (r255361) @@ -91,7 +91,7 @@ #define DBL_EXPBITS 11 #define DBL_FRACBITS 52 -#if defined(__VFP_FP__) +#if defined(__VFP_FP__) || defined(__ARM_EABI__) #define _IEEE_WORD_ORDER _BYTE_ORDER #else #define _IEEE_WORD_ORDER _BIG_ENDIAN From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 14:15:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F10DF8F1; Sat, 7 Sep 2013 14:15:16 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DABA22418; Sat, 7 Sep 2013 14:15:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87EFGuP025551; Sat, 7 Sep 2013 14:15:16 GMT (envelope-from markm@svn.freebsd.org) Received: (from markm@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87EFDMv025499; Sat, 7 Sep 2013 14:15:13 GMT (envelope-from markm@svn.freebsd.org) Message-Id: <201309071415.r87EFDMv025499@svn.freebsd.org> From: Mark Murray Date: Sat, 7 Sep 2013 14:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255362 - in head: share/examples/kld share/examples/kld/random_adaptor sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/ubsec sys/kern sys/mips/c... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 14:15:17 -0000 Author: markm Date: Sat Sep 7 14:15:13 2013 New Revision: 255362 URL: http://svnweb.freebsd.org/changeset/base/255362 Log: Bring in some behind-the-scenes development, mainly By Arthur Mesh, the rest by me. o Namespace cleanup; the Yarrow name is now restricted to where it really applies; this is in anticipation of being augmented or replaced by Fortuna in the future. Fortuna is mentioned, but behind #if logic, and is ignorable for now. o The harvest queue is pulled out into its own modules. o Entropy harvesting is emproved, both by being made more conservative, and by separating (a bit!) the sources. Available entropy crumbs are marginally improved. o Selection of sources is made clearer. With recent revelations, this will receive more work in the weeks and months to come. Submitted by: Arthur Mesh (partly) Added: head/share/examples/kld/random_adaptor/ - copied from r255353, projects/random_number_generator/share/examples/kld/random_adaptor/ head/sys/dev/random/pseudo_rng.c - copied unchanged from r255353, projects/random_number_generator/sys/dev/random/pseudo_rng.c head/sys/dev/random/random_harvestq.c - copied unchanged from r255353, projects/random_number_generator/sys/dev/random/random_harvestq.c head/sys/dev/random/random_harvestq.h - copied unchanged from r255353, projects/random_number_generator/sys/dev/random/random_harvestq.h Deleted: head/sys/dev/random/probe.c Modified: head/share/examples/kld/Makefile head/sys/conf/files head/sys/dev/glxsb/glxsb.c head/sys/dev/hifn/hifn7751.c head/sys/dev/random/harvest.c head/sys/dev/random/hash.c head/sys/dev/random/hash.h head/sys/dev/random/random_adaptors.c head/sys/dev/random/random_adaptors.h head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev.h head/sys/dev/random/randomdev_soft.c head/sys/dev/random/randomdev_soft.h head/sys/dev/random/yarrow.c head/sys/dev/random/yarrow.h head/sys/dev/rndtest/rndtest.c head/sys/dev/safe/safe.c head/sys/dev/ubsec/ubsec.c head/sys/kern/kern_intr.c head/sys/mips/cavium/octeon_rnd.c head/sys/modules/random/Makefile head/sys/net/if_ethersubr.c head/sys/net/if_tun.c head/sys/netgraph/ng_iface.c head/sys/sys/random.h Directory Properties: head/ (props changed) head/sys/ (props changed) Modified: head/share/examples/kld/Makefile ============================================================================== --- head/share/examples/kld/Makefile Sat Sep 7 14:04:10 2013 (r255361) +++ head/share/examples/kld/Makefile Sat Sep 7 14:15:13 2013 (r255362) @@ -67,6 +67,6 @@ # $FreeBSD$ # -SUBDIR= cdev dyn_sysctl firmware khelp syscall +SUBDIR= cdev dyn_sysctl firmware khelp random_adaptor syscall .include Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Sep 7 14:04:10 2013 (r255361) +++ head/sys/conf/files Sat Sep 7 14:15:13 2013 (r255362) @@ -2042,8 +2042,9 @@ rt2860.fw optional rt2860fw | ralfw \ clean "rt2860.fw" dev/random/harvest.c standard dev/random/hash.c optional random -dev/random/probe.c optional random +dev/random/pseudo_rng.c standard dev/random/random_adaptors.c standard +dev/random/random_harvestq.c standard dev/random/randomdev.c optional random dev/random/randomdev_soft.c optional random dev/random/yarrow.c optional random Modified: head/sys/dev/glxsb/glxsb.c ============================================================================== --- head/sys/dev/glxsb/glxsb.c Sat Sep 7 14:04:10 2013 (r255361) +++ head/sys/dev/glxsb/glxsb.c Sat Sep 7 14:15:13 2013 (r255362) @@ -476,7 +476,7 @@ glxsb_rnd(void *v) if (status & SB_RNS_TRNG_VALID) { value = bus_read_4(sc->sc_sr, SB_RANDOM_NUM); /* feed with one uint32 */ - random_harvest(&value, 4, 32, 0, RANDOM_PURE); + random_harvest(&value, 4, 32/2, 0, RANDOM_PURE); } callout_reset(&sc->sc_rngco, sc->sc_rnghz, glxsb_rnd, sc); Modified: head/sys/dev/hifn/hifn7751.c ============================================================================== --- head/sys/dev/hifn/hifn7751.c Sat Sep 7 14:04:10 2013 (r255361) +++ head/sys/dev/hifn/hifn7751.c Sat Sep 7 14:15:13 2013 (r255362) @@ -258,7 +258,7 @@ hifn_partname(struct hifn_softc *sc) static void default_harvest(struct rndtest_state *rsp, void *buf, u_int count) { - random_harvest(buf, count, count*NBBY, 0, RANDOM_PURE); + random_harvest(buf, count, count*NBBY/2, 0, RANDOM_PURE); } static u_int Modified: head/sys/dev/random/harvest.c ============================================================================== --- head/sys/dev/random/harvest.c Sat Sep 7 14:04:10 2013 (r255361) +++ head/sys/dev/random/harvest.c Sat Sep 7 14:15:13 2013 (r255362) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2004 Mark R V Murray + * Copyright (c) 2000-2013 Mark R V Murray * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -60,7 +60,7 @@ static int (*read_func)(void *, int) = r /* Initialise the harvester at load time */ void -random_yarrow_init_harvester(void (*reaper)(u_int64_t, const void *, u_int, +randomdev_init_harvester(void (*reaper)(u_int64_t, const void *, u_int, u_int, u_int, enum esource), int (*reader)(void *, int)) { reap_func = reaper; @@ -69,7 +69,7 @@ random_yarrow_init_harvester(void (*reap /* Deinitialise the harvester at unload time */ void -random_yarrow_deinit_harvester(void) +randomdev_deinit_harvester(void) { reap_func = NULL; read_func = read_random_phony; Modified: head/sys/dev/random/hash.c ============================================================================== --- head/sys/dev/random/hash.c Sat Sep 7 14:04:10 2013 (r255361) +++ head/sys/dev/random/hash.c Sat Sep 7 14:15:13 2013 (r255362) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2004 Mark R V Murray + * Copyright (c) 2000-2013 Mark R V Murray * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,46 +36,46 @@ __FBSDID("$FreeBSD$"); #include -/* initialise the hash */ +/* Initialise the hash */ void -yarrow_hash_init(struct yarrowhash *context) +randomdev_hash_init(struct randomdev_hash *context) { SHA256_Init(&context->sha); } -/* iterate the hash */ +/* Iterate the hash */ void -yarrow_hash_iterate(struct yarrowhash *context, void *data, size_t size) +randomdev_hash_iterate(struct randomdev_hash *context, void *data, size_t size) { SHA256_Update(&context->sha, data, size); } -/* Conclude by returning the hash in the supplied /buf/ which must be +/* Conclude by returning the hash in the supplied <*buf> which must be * KEYSIZE bytes long. */ void -yarrow_hash_finish(struct yarrowhash *context, void *buf) +randomdev_hash_finish(struct randomdev_hash *context, void *buf) { SHA256_Final(buf, &context->sha); } /* Initialise the encryption routine by setting up the key schedule - * from the supplied /data/ which must be KEYSIZE bytes of binary - * data. + * from the supplied <*data> which must be KEYSIZE bytes of binary + * data. Use CBC mode for better avalanche. */ void -yarrow_encrypt_init(struct yarrowkey *context, void *data) +randomdev_encrypt_init(struct randomdev_key *context, void *data) { rijndael_cipherInit(&context->cipher, MODE_CBC, NULL); rijndael_makeKey(&context->key, DIR_ENCRYPT, KEYSIZE*8, data); } /* Encrypt the supplied data using the key schedule preset in the context. - * KEYSIZE bytes are encrypted from /d_in/ to /d_out/. + * bytes are encrypted from <*d_in> to <*d_out>. must be + * a multiple of BLOCKSIZE. */ void -yarrow_encrypt(struct yarrowkey *context, void *d_in, void *d_out) +randomdev_encrypt(struct randomdev_key *context, void *d_in, void *d_out, unsigned length) { - rijndael_blockEncrypt(&context->cipher, &context->key, d_in, - KEYSIZE*8, d_out); + rijndael_blockEncrypt(&context->cipher, &context->key, d_in, length*8, d_out); } Modified: head/sys/dev/random/hash.h ============================================================================== --- head/sys/dev/random/hash.h Sat Sep 7 14:04:10 2013 (r255361) +++ head/sys/dev/random/hash.h Sat Sep 7 14:15:13 2013 (r255362) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2004 Mark R V Murray + * Copyright (c) 2000-2013 Mark R V Murray * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,19 +26,20 @@ * $FreeBSD$ */ -#define KEYSIZE 32 /* (in bytes) 32 bytes == 256 bits */ +#define KEYSIZE 32 /* (in bytes) == 256 bits */ +#define BLOCKSIZE 16 /* (in bytes) == 128 bits */ -struct yarrowhash { /* Big! Make static! */ +struct randomdev_hash { /* Big! Make static! */ SHA256_CTX sha; }; -struct yarrowkey { /* Big! Make static! */ +struct randomdev_key { /* Big! Make static! */ keyInstance key; /* Key schedule */ cipherInstance cipher; /* Rijndael internal */ }; -void yarrow_hash_init(struct yarrowhash *); -void yarrow_hash_iterate(struct yarrowhash *, void *, size_t); -void yarrow_hash_finish(struct yarrowhash *, void *); -void yarrow_encrypt_init(struct yarrowkey *, void *); -void yarrow_encrypt(struct yarrowkey *context, void *, void *); +void randomdev_hash_init(struct randomdev_hash *); +void randomdev_hash_iterate(struct randomdev_hash *, void *, size_t); +void randomdev_hash_finish(struct randomdev_hash *, void *); +void randomdev_encrypt_init(struct randomdev_key *, void *); +void randomdev_encrypt(struct randomdev_key *context, void *, void *, unsigned); Copied: head/sys/dev/random/pseudo_rng.c (from r255353, projects/random_number_generator/sys/dev/random/pseudo_rng.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/random/pseudo_rng.c Sat Sep 7 14:15:13 2013 (r255362, copy of r255353, projects/random_number_generator/sys/dev/random/pseudo_rng.c) @@ -0,0 +1,119 @@ +/*- + * Copyright (c) 2013 Arthur Mesh + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include + +static struct mtx pseudo_random_block_mtx; + +static int +pseudo_random_block_read(void *buf __unused, int c __unused) +{ + + mtx_lock(&pseudo_random_block_mtx); + + printf("random(4) device is blocking.\n"); + msleep(pseudo_random_block_read, &pseudo_random_block_mtx, 0, + "block", 0); + + mtx_unlock(&pseudo_random_block_mtx); + + return (0); +} + +static void +pseudo_random_block_init(void) +{ + + mtx_init(&pseudo_random_block_mtx, "sleep mtx for random_block", + NULL, MTX_DEF); +} + +static void +pseudo_random_block_deinit(void) +{ + + mtx_destroy(&pseudo_random_block_mtx); +} + +struct random_adaptor pseudo_random_block = { + .ident = "pseudo-RNG that always blocks", + .init = pseudo_random_block_init, + .deinit = pseudo_random_block_deinit, + .read = pseudo_random_block_read, + .write = (random_write_func_t *)random_null_func, + .reseed = (random_reseed_func_t *)random_null_func, + .seeded = 1, +}; + +static int +pseudo_random_panic_read(void *buf, int c) +{ + + panic("Insert a witty panic msg in here."); + + return (0); +} + +struct random_adaptor pseudo_random_panic = { + .ident = "pseudo-RNG that always panics on first read(2)", + .init = (random_init_func_t *)random_null_func, + .deinit = (random_deinit_func_t *)random_null_func, + .read = pseudo_random_panic_read, + .write = (random_write_func_t *)random_null_func, + .reseed = (random_reseed_func_t *)random_null_func, + .seeded = 1, +}; + +static int +pseudo_random_modevent(module_t mod, int type, void *unused) +{ + + switch (type) { + case MOD_LOAD: + random_adaptor_register("block", &pseudo_random_block); + EVENTHANDLER_INVOKE(random_adaptor_attach, + &pseudo_random_block); + + random_adaptor_register("panic", &pseudo_random_panic); + + return (0); + } + + return (EINVAL); +} + +RANDOM_ADAPTOR_MODULE(pseudo, pseudo_random_modevent, 1); Modified: head/sys/dev/random/random_adaptors.c ============================================================================== --- head/sys/dev/random/random_adaptors.c Sat Sep 7 14:04:10 2013 (r255361) +++ head/sys/dev/random/random_adaptors.c Sat Sep 7 14:15:13 2013 (r255362) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2013 Arthur Mesh * Copyright (c) 2013 David E. O'Brien + * Copyright (c) 2004 Mark R V Murray * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,16 +31,20 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include #include #include #include #include +#include -#include #include +#include +#include LIST_HEAD(adaptors_head, random_adaptors); static struct adaptors_head adaptors = LIST_HEAD_INITIALIZER(adaptors); @@ -57,7 +62,8 @@ random_adaptor_register(const char *name KASSERT(name != NULL && rsp != NULL, ("invalid input to %s", __func__)); - rpp = malloc(sizeof(struct random_adaptors), M_RANDOM_ADAPTORS, M_WAITOK); + rpp = malloc(sizeof(struct random_adaptors), M_RANDOM_ADAPTORS, + M_WAITOK); rpp->name = name; rpp->rsp = rsp; @@ -87,6 +93,93 @@ random_adaptor_get(const char *name) return (rsp); } +/* + * In the past, the logic of the random_adaptor selection was inverted, such + * that hardware RNGs would be chosen unless disabled. This routine is here to + * preserve that functionality to avoid folks losing their hardware RNGs by + * upgrading to newer kernel. + */ +static void +random_adaptor_choose_legacy(struct random_adaptor **adaptor) +{ + struct random_adaptor *tmp; + int enable; + + /* Then go looking for hardware */ + enable = 1; + TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable); + if (enable && (tmp = random_adaptor_get("nehemiah"))) + *adaptor = tmp; + + enable = 1; + TUNABLE_INT_FETCH("hw.ivy_rng_enable", &enable); + if (enable && (tmp = random_adaptor_get("rdrand"))) + *adaptor = tmp; +} + +/* + * Walk a list of registered random(4) adaptors and pick the last non-selected + * one. + * + * If none are selected, use yarrow if available. + */ +void +random_adaptor_choose(struct random_adaptor **adaptor) +{ + char rngs[128], *token, *cp; + struct random_adaptors *rpp; + + KASSERT(adaptor != NULL, ("pre-conditions failed")); + + *adaptor = NULL; + + random_adaptor_choose_legacy(adaptor); + + if (*adaptor != NULL) + return; + + if (TUNABLE_STR_FETCH("rngs_want", rngs, sizeof(rngs))) { + cp = rngs; + + while ((token = strsep(&cp, ",")) != NULL) { + if ((*adaptor = random_adaptor_get(token)) != NULL) + break; + else if (bootverbose) + printf( + "%s random adaptor is not available, skipping\n", + token); + } + } + + if (*adaptor == NULL) { + /* + * Either no RNGs are prefered via rngs_want tunable, or + * no prefered RNGs are registered. + * Fallback to Yarrow. + */ + *adaptor = random_adaptor_get("yarrow"); + + if (*adaptor == NULL) { + /* + * Yarrow doesn't seem to be available. + * Fallback to the first thing that's on the list of + * available RNGs. + */ + sx_slock(&adaptors_lock); + + rpp = LIST_FIRST(&adaptors); + if (rpp != NULL) + *adaptor = rpp->rsp; + + sx_sunlock(&adaptors_lock); + } + + if (bootverbose && *adaptor) + printf("Falling back to <%s> random adaptor", + (*adaptor)->ident); + } +} + static void random_adaptors_deinit(void *unused) { @@ -99,18 +192,28 @@ static int random_sysctl_adaptors_handler(SYSCTL_HANDLER_ARGS) { struct random_adaptors *rpp; - int error; + int error, count; - error = 0; + count = error = 0; sx_slock(&adaptors_lock); - if (LIST_EMPTY(&adaptors)) - error = SYSCTL_OUT(req, "", strlen("")); + if (LIST_EMPTY(&adaptors)) { + error = SYSCTL_OUT(req, "", 0); + } else { - LIST_FOREACH(rpp, &adaptors, entries) { - if (0 != SYSCTL_OUT(req, rpp->name, strlen(rpp->name))) - break; + LIST_FOREACH(rpp, &adaptors, entries) { + + error = SYSCTL_OUT(req, ",", count++ ? 1 : 0); + + if (error) + break; + + error = SYSCTL_OUT(req, rpp->name, strlen(rpp->name)); + + if (error) + break; + } } sx_sunlock(&adaptors_lock); @@ -118,6 +221,37 @@ random_sysctl_adaptors_handler(SYSCTL_HA return (error); } +static int +random_sysctl_active_adaptor_handler(SYSCTL_HANDLER_ARGS) +{ + struct random_adaptor *rsp; + struct random_adaptors *rpp; + const char *name; + int error; + + name = NULL; + rsp = random_get_active_adaptor(); + + if (rsp != NULL) { + sx_slock(&adaptors_lock); + + LIST_FOREACH(rpp, &adaptors, entries) { + if (rpp->rsp == rsp) + name = rpp->name; + } + + sx_sunlock(&adaptors_lock); + } + + if (rsp == NULL || name == NULL) { + error = SYSCTL_OUT(req, "", 0); + } else { + error = SYSCTL_OUT(req, name, strlen(name)); + } + + return (error); +} + static void random_adaptors_init(void *unused) { @@ -127,6 +261,11 @@ random_adaptors_init(void *unused) NULL, 0, random_sysctl_adaptors_handler, "", "Random Number Generator adaptors"); + SYSCTL_PROC(_kern_random, OID_AUTO, active_adaptor, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + NULL, 0, random_sysctl_active_adaptor_handler, "", + "Active Random Number Generator Adaptor"); + sx_init(&adaptors_lock, "random_adaptors"); } Modified: head/sys/dev/random/random_adaptors.h ============================================================================== --- head/sys/dev/random/random_adaptors.h Sat Sep 7 14:04:10 2013 (r255361) +++ head/sys/dev/random/random_adaptors.h Sat Sep 7 14:15:13 2013 (r255362) @@ -39,6 +39,7 @@ struct random_adaptors { struct random_adaptor *random_adaptor_get(const char *); int random_adaptor_register(const char *, struct random_adaptor *); +void random_adaptor_choose(struct random_adaptor **); /* * random_adaptor's should be registered prior to Copied: head/sys/dev/random/random_harvestq.c (from r255353, projects/random_number_generator/sys/dev/random/random_harvestq.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/random/random_harvestq.c Sat Sep 7 14:15:13 2013 (r255362, copy of r255353, projects/random_number_generator/sys/dev/random/random_harvestq.c) @@ -0,0 +1,251 @@ +/*- + * Copyright (c) 2013 Arthur Mesh + * Copyright (c) 2000-2009 Mark R V Murray + * Copyright (c) 2004 Robert N. M. Watson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "random_harvestq.h" + +#define RANDOM_FIFO_MAX 256 /* How many events to queue up */ + +MALLOC_DEFINE(M_ENTROPY, "entropy", "Entropy harvesting buffers"); + +/* + * The harvest mutex protects the consistency of the entropy fifos and + * empty fifo. + */ +struct mtx harvest_mtx; + +/* Lockable FIFO queue holding entropy buffers */ +struct entropyfifo { + int count; + STAILQ_HEAD(harvestlist, harvest) head; +}; + +/* Empty entropy buffers */ +static struct entropyfifo emptyfifo; + +#define EMPTYBUFFERS 1024 + +/* Harvested entropy */ +static struct entropyfifo harvestfifo[ENTROPYSOURCE]; + +/* <0 to end the kthread, 0 to let it run, 1 to flush the harvest queues */ +int random_kthread_control = 0; + +static struct proc *random_kthread_proc; + +static void +random_kthread(void *arg) +{ + STAILQ_HEAD(, harvest) local_queue; + struct harvest *event = NULL; + int local_count; + enum esource source; + event_proc_f func = arg; + + STAILQ_INIT(&local_queue); + local_count = 0; + + /* Process until told to stop */ + mtx_lock_spin(&harvest_mtx); + for (; random_kthread_control >= 0;) { + + /* Cycle through all the entropy sources */ + for (source = RANDOM_START; source < ENTROPYSOURCE; source++) { + /* + * Drain entropy source records into a thread-local + * queue for processing while not holding the mutex. + */ + STAILQ_CONCAT(&local_queue, &harvestfifo[source].head); + local_count += harvestfifo[source].count; + harvestfifo[source].count = 0; + } + + /* + * Deal with events, if any, dropping the mutex as we process + * each event. Then push the events back into the empty + * fifo. + */ + if (!STAILQ_EMPTY(&local_queue)) { + mtx_unlock_spin(&harvest_mtx); + STAILQ_FOREACH(event, &local_queue, next) + func(event); + mtx_lock_spin(&harvest_mtx); + STAILQ_CONCAT(&emptyfifo.head, &local_queue); + emptyfifo.count += local_count; + local_count = 0; + } + + KASSERT(local_count == 0, ("random_kthread: local_count %d", + local_count)); + + /* + * If a queue flush was commanded, it has now happened, + * and we can mark this by resetting the command. + */ + if (random_kthread_control == 1) + random_kthread_control = 0; + + /* Work done, so don't belabour the issue */ + msleep_spin_sbt(&random_kthread_control, &harvest_mtx, + "-", SBT_1S / 10, 0, C_PREL(1)); + + } + mtx_unlock_spin(&harvest_mtx); + + random_set_wakeup_exit(&random_kthread_control); + /* NOTREACHED */ +} + +void +random_harvestq_init(event_proc_f cb) +{ + int error, i; + struct harvest *np; + enum esource e; + + /* Initialise the harvest fifos */ + STAILQ_INIT(&emptyfifo.head); + emptyfifo.count = 0; + for (i = 0; i < EMPTYBUFFERS; i++) { + np = malloc(sizeof(struct harvest), M_ENTROPY, M_WAITOK); + STAILQ_INSERT_TAIL(&emptyfifo.head, np, next); + } + for (e = RANDOM_START; e < ENTROPYSOURCE; e++) { + STAILQ_INIT(&harvestfifo[e].head); + harvestfifo[e].count = 0; + } + + mtx_init(&harvest_mtx, "entropy harvest mutex", NULL, MTX_SPIN); + + + /* Start the hash/reseed thread */ + error = kproc_create(random_kthread, cb, + &random_kthread_proc, RFHIGHPID, 0, "rand_harvestq"); /* RANDOM_CSPRNG_NAME */ + + if (error != 0) + panic("Cannot create entropy maintenance thread."); +} + +void +random_harvestq_deinit(void) +{ + struct harvest *np; + enum esource e; + + /* Destroy the harvest fifos */ + while (!STAILQ_EMPTY(&emptyfifo.head)) { + np = STAILQ_FIRST(&emptyfifo.head); + STAILQ_REMOVE_HEAD(&emptyfifo.head, next); + free(np, M_ENTROPY); + } + for (e = RANDOM_START; e < ENTROPYSOURCE; e++) { + while (!STAILQ_EMPTY(&harvestfifo[e].head)) { + np = STAILQ_FIRST(&harvestfifo[e].head); + STAILQ_REMOVE_HEAD(&harvestfifo[e].head, next); + free(np, M_ENTROPY); + } + } + + mtx_destroy(&harvest_mtx); +} + +/* + * Entropy harvesting routine. This is supposed to be fast; do + * not do anything slow in here! + */ +void +random_harvestq_internal(u_int64_t somecounter, const void *entropy, + u_int count, u_int bits, u_int frac, enum esource origin) +{ + struct harvest *event; + + KASSERT(origin >= RANDOM_START && origin <= RANDOM_PURE, + ("random_harvest_internal: origin %d invalid\n", origin)); + + /* Lockless read to avoid lock operations if fifo is full. */ + if (harvestfifo[origin].count >= RANDOM_FIFO_MAX) + return; + + mtx_lock_spin(&harvest_mtx); + + /* + * Don't make the harvest queues too big - help to prevent low-grade + * entropy swamping + */ + if (harvestfifo[origin].count < RANDOM_FIFO_MAX) { + event = STAILQ_FIRST(&emptyfifo.head); + if (event != NULL) { + /* Add the harvested data to the fifo */ + STAILQ_REMOVE_HEAD(&emptyfifo.head, next); + harvestfifo[origin].count++; + event->somecounter = somecounter; + event->size = count; + event->bits = bits; + event->frac = frac; + event->source = origin; + + /* XXXX Come back and make this dynamic! */ + count = MIN(count, HARVESTSIZE); + memcpy(event->entropy, entropy, count); + +#if 0 + { + int i; + printf("Harvest:%16jX ", event->somecounter); + for (i = 0; i < event->size; i++) + printf("%02X", event->entropy[i]); + for (; i < 16; i++) + printf(" "); + printf(" %2d 0x%2X.%03X %02X\n", event->size, event->bits, event->frac, event->source); + } +#endif + + STAILQ_INSERT_TAIL(&harvestfifo[origin].head, + event, next); + } + } + mtx_unlock_spin(&harvest_mtx); +} + Copied: head/sys/dev/random/random_harvestq.h (from r255353, projects/random_number_generator/sys/dev/random/random_harvestq.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/random/random_harvestq.h Sat Sep 7 14:15:13 2013 (r255362, copy of r255353, projects/random_number_generator/sys/dev/random/random_harvestq.h) @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2013 Arthur Mesh + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __RANDOM_HARVEST_H__ +#define __RANDOM_HARVEST_H__ + +typedef void (*event_proc_f)(struct harvest *event); + +void random_harvestq_init(event_proc_f); +void random_harvestq_deinit(void); +void random_harvestq_internal(u_int64_t, const void *, + u_int, u_int, u_int, enum esource); + +extern int random_kthread_control; + +#endif /* __RANDOM_HARVEST_H__ */ Modified: head/sys/dev/random/randomdev.c ============================================================================== --- head/sys/dev/random/randomdev.c Sat Sep 7 14:04:10 2013 (r255361) +++ head/sys/dev/random/randomdev.c Sat Sep 7 14:15:13 2013 (r255362) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #define RANDOM_MINOR 0 @@ -85,6 +86,13 @@ random_null_func(void) { } +struct random_adaptor * +random_get_active_adaptor(void) +{ + + return (random_adaptor); +} + /* ARGSUSED */ static int random_close(struct cdev *dev __unused, int flags, int fmt __unused, @@ -215,7 +223,7 @@ random_modevent(module_t mod __unused, i switch (type) { case MOD_LOAD: - random_ident_hardware(&random_adaptor); + random_adaptor_choose(&random_adaptor); if (random_adaptor == NULL) { printf( Modified: head/sys/dev/random/randomdev.h ============================================================================== --- head/sys/dev/random/randomdev.h Sat Sep 7 14:04:10 2013 (r255361) +++ head/sys/dev/random/randomdev.h Sat Sep 7 14:15:13 2013 (r255362) @@ -53,3 +53,4 @@ struct random_adaptor { extern void random_ident_hardware(struct random_adaptor **); extern void random_null_func(void); +struct random_adaptor *random_get_active_adaptor(void); Modified: head/sys/dev/random/randomdev_soft.c ============================================================================== --- head/sys/dev/random/randomdev_soft.c Sat Sep 7 14:04:10 2013 (r255361) +++ head/sys/dev/random/randomdev_soft.c Sat Sep 7 14:15:13 2013 (r255362) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2009 Mark R V Murray + * Copyright (c) 2000-2013 Mark R V Murray * Copyright (c) 2004 Robert N. M. Watson * All rights reserved. * @@ -26,22 +26,24 @@ * */ +#if !defined(YARROW_RNG) && !defined(FORTUNA_RNG) +#define YARROW_RNG +#elif defined(YARROW_RNG) && defined(FORTUNA_RNG) +#error "Must define either YARROW_RNG or FORTUNA_RNG" +#endif + #include __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -54,55 +56,51 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(YARROW_RNG) +#include +#endif +#if defined(FORTUNA_RNG) +#include +#endif + +#include "random_harvestq.h" + +static int randomdev_poll(int event, struct thread *td); +static int randomdev_block(int flag); +static void randomdev_flush_reseed(void); -#define RANDOM_FIFO_MAX 256 /* How many events to queue up */ - -static void random_kthread(void *); -static void -random_harvest_internal(u_int64_t, const void *, u_int, - u_int, u_int, enum esource); -static int random_yarrow_poll(int event,struct thread *td); -static int random_yarrow_block(int flag); -static void random_yarrow_flush_reseed(void); - -struct random_adaptor random_yarrow = { +#if defined(YARROW_RNG) +static struct random_adaptor random_context = { .ident = "Software, Yarrow", - .init = random_yarrow_init, - .deinit = random_yarrow_deinit, - .block = random_yarrow_block, + .init = randomdev_init, + .deinit = randomdev_deinit, + .block = randomdev_block, .read = random_yarrow_read, - .write = random_yarrow_write, - .poll = random_yarrow_poll, - .reseed = random_yarrow_flush_reseed, - .seeded = 1, + .write = randomdev_write, + .poll = randomdev_poll, + .reseed = randomdev_flush_reseed, + .seeded = 0, }; - -MALLOC_DEFINE(M_ENTROPY, "entropy", "Entropy harvesting buffers"); - -/* - * The harvest mutex protects the consistency of the entropy fifos and - * empty fifo. - */ -struct mtx harvest_mtx; - -/* Lockable FIFO queue holding entropy buffers */ -struct entropyfifo { - int count; - STAILQ_HEAD(harvestlist, harvest) head; +#define RANDOM_MODULE_NAME yarrow +#define RANDOM_CSPRNG_NAME "yarrow" +#endif + +#if defined(FORTUNA_RNG) +static struct random_adaptor random_context = { + .ident = "Software, Fortuna", + .init = randomdev_init, + .deinit = randomdev_deinit, + .block = randomdev_block, + .read = random_fortuna_read, + .write = randomdev_write, + .poll = randomdev_poll, + .reseed = randomdev_flush_reseed, + .seeded = 0, }; +#define RANDOM_MODULE_NAME fortuna +#define RANDOM_CSPRNG_NAME "fortuna" -/* Empty entropy buffers */ -static struct entropyfifo emptyfifo; - -#define EMPTYBUFFERS 1024 - -/* Harvested entropy */ -static struct entropyfifo harvestfifo[ENTROPYSOURCE]; - -/* <0 to end the kthread, 0 to let it run, 1 to flush the harvest queues */ -static int random_kthread_control = 0; - -static struct proc *random_kthread_proc; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 15:16:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A541E2DA; Sat, 7 Sep 2013 15:16:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 928032628; Sat, 7 Sep 2013 15:16:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87FGUmH064853; Sat, 7 Sep 2013 15:16:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87FGURB064852; Sat, 7 Sep 2013 15:16:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201309071516.r87FGURB064852@svn.freebsd.org> From: Alexander Motin Date: Sat, 7 Sep 2013 15:16:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255363 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 15:16:30 -0000 Author: mav Date: Sat Sep 7 15:16:30 2013 New Revision: 255363 URL: http://svnweb.freebsd.org/changeset/base/255363 Log: Micro-optimize cpu_search(), allowing compiler to use more efficient inline ffsl() implementation, when it is available, instead of homegrown iteration. On dual-E5645 amd64 system (2x6x2 cores) under heavy I/O load that reduces time spent inside cpu_search() from 19% to 13%, while IOPS increased by 5%. Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Sat Sep 7 14:15:13 2013 (r255362) +++ head/sys/kern/sched_ule.c Sat Sep 7 15:16:30 2013 (r255363) @@ -667,10 +667,14 @@ cpu_search(const struct cpu_group *cg, s } /* Iterate through the child CPU groups and then remaining CPUs. */ - for (i = cg->cg_children, cpu = mp_maxid; i >= 0; ) { + for (i = cg->cg_children, cpu = mp_maxid; ; ) { if (i == 0) { +#ifdef HAVE_INLINE_FFSL + cpu = CPU_FFS(&cpumask) - 1; +#else while (cpu >= 0 && !CPU_ISSET(cpu, &cpumask)) cpu--; +#endif if (cpu < 0) break; child = NULL; @@ -695,6 +699,7 @@ cpu_search(const struct cpu_group *cg, s break; } } else { /* Handle child CPU. */ + CPU_CLR(cpu, &cpumask); tdq = TDQ_CPU(cpu); load = tdq->tdq_load * 256; rndptr = DPCPU_PTR(randomval); @@ -742,8 +747,11 @@ cpu_search(const struct cpu_group *cg, s i--; if (i == 0 && CPU_EMPTY(&cpumask)) break; - } else + } +#ifndef HAVE_INLINE_FFSL + else cpu--; +#endif } return (total); } From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 15:30:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0E4E04CF; Sat, 7 Sep 2013 15:30:37 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-ea0-x22e.google.com (mail-ea0-x22e.google.com [IPv6:2a00:1450:4013:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A872226BF; Sat, 7 Sep 2013 15:30:35 +0000 (UTC) Received: by mail-ea0-f174.google.com with SMTP id z15so2214036ead.33 for ; Sat, 07 Sep 2013 08:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=51Z6wdVrGIoA0K1KRCupuRGNxTV3NLQgDWsor2KWhkQ=; b=ydnuukKtGe9zBGj9vvEizbh0kQCuQAwubLFH2mGkxgRPqewCOBeJhOx91/G4ApuxCF TLtYjp4QPPrCii2b926apn6gE/5F62tDCxY8RrAbNsbpWSF3Q6OPGoT/YxdwkFnG9DaV 0Rgbp/LmS4Ji9Y2bOprArAXqv9VLwhsKJwM+ioK2S7+dms2+qNqaSfwnoElx/pPqIaGa FAftZeAzqMm8ndpptSSquLuJaZuwi6ZpLq3gWI2Aakg7CAc/35ejixkq96XDIFyvas/n Aup2v829qzR7bm69g9Igr2pEXcvWkoMoWBnF6MLHJfCBdPElr9v+vOVQEp9hRQcHrKa/ NzqA== X-Received: by 10.14.199.3 with SMTP id w3mr13879032een.33.1378567834045; Sat, 07 Sep 2013 08:30:34 -0700 (PDT) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPSA id p5sm5900299eeg.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 07 Sep 2013 08:30:33 -0700 (PDT) Sender: Mikolaj Golub Date: Sat, 7 Sep 2013 18:30:31 +0300 From: Mikolaj Golub To: Andre Oppermann Subject: Re: svn commit: r254773 - head/sys/net Message-ID: <20130907153029.GB7349@gmail.com> References: <201308241117.r7OBHPQ1032341@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="LyciRD1jyfeSSjG0" Content-Disposition: inline In-Reply-To: <201308241117.r7OBHPQ1032341@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, zec@freebsd.org, bz@freebsd.org, svn-src-head@freebsd.org, julian@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 15:30:37 -0000 --LyciRD1jyfeSSjG0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, On Sat, Aug 24, 2013 at 11:17:25AM +0000, Andre Oppermann wrote: > Author: andre > Date: Sat Aug 24 11:17:25 2013 > New Revision: 254773 > URL: http://svnweb.freebsd.org/changeset/base/254773 > > Log: > Resolve the confusion between the head_list and the hook list. > > The linked list of pfil hooks is changed to "chain" and this term > is applied consistently. The head_list remains with "list" term. > > Add KASSERT to vnet_pfil_uninit(). ... > vnet_pfil_uninit(const void *unused) > { > > - /* XXX should panic if list is not empty */ > + KASSERT(LIST_EMPTY(&V_pfil_head_list), > + ("%s: pfil_head_list %p not empty", __func__, &V_pfil_head_list)); > PFIL_LOCK_DESTROY_REAL(&V_pfil_lock); > return (0); > } > It is triggered when destroying a vnet, due to inet/inet6 pfil hooks are not being unregistered. The attached patch fixes the issue for me. I am going to commit it if there are no objections -- might the unregistration has been skipped intentionally due to some unresolved issue? -- Mikolaj Golub --LyciRD1jyfeSSjG0 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: inline; filename="ip_input.pfil_head_unregister.1.patch" Unregister inet/inet6 pfil hooks on vnet destroy. Index: sys/netinet/ip_input.c =================================================================== --- sys/netinet/ip_input.c (revision 255362) +++ sys/netinet/ip_input.c (working copy) @@ -363,7 +363,12 @@ ip_init(void) void ip_destroy(void) { + int i; + if ((i = pfil_head_unregister(&V_inet_pfil_hook)) != 0) + printf("%s: WARNING: unable to unregister pfil hook, " + "error %d\n", __func__, i); + /* Cleanup in_ifaddr hash table; should be empty. */ hashdestroy(V_in_ifaddrhashtbl, M_IFADDR, V_in_ifaddrhmask); Index: sys/netinet6/ip6_input.c =================================================================== --- sys/netinet6/ip6_input.c (revision 255362) +++ sys/netinet6/ip6_input.c (working copy) @@ -307,7 +307,11 @@ ip6proto_unregister(short ip6proto) void ip6_destroy() { + int i; + if ((i = pfil_head_unregister(&V_inet6_pfil_hook)) != 0) + printf("%s: WARNING: unable to unregister pfil hook, " + "error %d\n", __func__, i); hashdestroy(V_in6_ifaddrhashtbl, M_IFADDR, V_in6_ifaddrhmask); nd6_destroy(); callout_drain(&V_in6_tmpaddrtimer_ch); --LyciRD1jyfeSSjG0-- From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 16:31:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 98066A9F; Sat, 7 Sep 2013 16:31:31 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 762992924; Sat, 7 Sep 2013 16:31:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87GVVIq013454; Sat, 7 Sep 2013 16:31:31 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87GVUiQ013451; Sat, 7 Sep 2013 16:31:30 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201309071631.r87GVUiQ013451@svn.freebsd.org> From: "Jayachandran C." Date: Sat, 7 Sep 2013 16:31:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255367 - in head/sys: conf mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 16:31:31 -0000 Author: jchandra Date: Sat Sep 7 16:31:30 2013 New Revision: 255367 URL: http://svnweb.freebsd.org/changeset/base/255367 Log: Use a better version of memcpy/bcopy for mips kernel. Use a variant of mips libc memcpy for kernel. This implementation uses 64-bit operations when compiled for 64-bit, and is significantly faster in that case. Submitted by: Tanmay Jagdale Added: head/sys/mips/mips/bcopy.S (contents, props changed) Modified: head/sys/conf/files.mips head/sys/mips/mips/support.S Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Sat Sep 7 16:16:57 2013 (r255366) +++ head/sys/conf/files.mips Sat Sep 7 16:31:30 2013 (r255367) @@ -38,6 +38,7 @@ mips/mips/stack_machdep.c optional ddb mips/mips/stdatomic.c standard \ compile-with "${NORMAL_C:N-Wmissing-prototypes}" mips/mips/support.S standard +mips/mips/bcopy.S standard mips/mips/swtch.S standard mips/mips/sys_machdep.c standard mips/mips/tlb.c standard Added: head/sys/mips/mips/bcopy.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/mips/bcopy.S Sat Sep 7 16:31:30 2013 (r255367) @@ -0,0 +1,286 @@ +/* $NetBSD: bcopy.S,v 1.3 2009/12/14 00:39:00 matt Exp $ */ + +/* + * Mach Operating System + * Copyright (c) 1993 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ + +/* + * File: mips_bcopy.s + * Author: Chris Maeda + * Date: June 1993 + * + * Fast copy routine. Derived from aligned_block_copy. + */ + + +#include +__FBSDID("$FreeBSD$"); + +#include + +#if defined(LIBC_SCCS) && !defined(lint) +#if 0 + ASMSTR("from: @(#)mips_bcopy.s 2.2 CMU 18/06/93") +#else + ASMSTR("$NetBSD: bcopy.S,v 1.3 2009/12/14 00:39:00 matt Exp $") +#endif +#endif /* LIBC_SCCS and not lint */ + +#ifdef __ABICALLS__ + .abicalls +#endif + +/* + * bcopy(caddr_t src, caddr_t dst, unsigned int len) + * + * a0 src address + * a1 dst address + * a2 length + */ + +#define SRCREG a0 +#define DSTREG a1 +#define SIZEREG a2 + +LEAF(memcpy) + .set noat + .set noreorder + + move v0, a0 + move a0, a1 + move a1, v0 + +ALEAF(bcopy) +ALEAF(ovbcopy) + /* + * Make sure we can copy forwards. + */ + sltu t0,SRCREG,DSTREG # t0 == SRCREG < DSTREG + bne t0,zero,6f # copy backwards + + /* + * There are four alignment cases (with frequency) + * (Based on measurements taken with a DECstation 5000/200 + * inside a Mach kernel.) + * + * aligned -> aligned (mostly) + * unaligned -> aligned (sometimes) + * aligned,unaligned -> unaligned (almost never) + * + * Note that we could add another case that checks if + * the destination and source are unaligned but the + * copy is alignable. eg if src and dest are both + * on a halfword boundary. + */ + andi t1,DSTREG,(SZREG-1) # get last bits of dest + bne t1,zero,3f # dest unaligned + andi t0,SRCREG,(SZREG-1) # get last bits of src + bne t0,zero,5f + + /* + * Forward aligned->aligned copy, 8 words at a time. + */ +98: + li AT,-(SZREG*8) + and t0,SIZEREG,AT # count truncated to multiples + PTR_ADDU a3,SRCREG,t0 # run fast loop up to this addr + sltu AT,SRCREG,a3 # any work to do? + beq AT,zero,2f + PTR_SUBU SIZEREG,t0 + + /* + * loop body + */ +1: # cp + REG_L t3,(0*SZREG)(SRCREG) + REG_L v1,(1*SZREG)(SRCREG) + REG_L t0,(2*SZREG)(SRCREG) + REG_L t1,(3*SZREG)(SRCREG) + PTR_ADDU SRCREG,SZREG*8 + REG_S t3,(0*SZREG)(DSTREG) + REG_S v1,(1*SZREG)(DSTREG) + REG_S t0,(2*SZREG)(DSTREG) + REG_S t1,(3*SZREG)(DSTREG) + REG_L t1,(-1*SZREG)(SRCREG) + REG_L t0,(-2*SZREG)(SRCREG) + REG_L v1,(-3*SZREG)(SRCREG) + REG_L t3,(-4*SZREG)(SRCREG) + PTR_ADDU DSTREG,SZREG*8 + REG_S t1,(-1*SZREG)(DSTREG) + REG_S t0,(-2*SZREG)(DSTREG) + REG_S v1,(-3*SZREG)(DSTREG) + bne SRCREG,a3,1b + REG_S t3,(-4*SZREG)(DSTREG) + + /* + * Copy a word at a time, no loop unrolling. + */ +2: # wordcopy + andi t2,SIZEREG,(SZREG-1) # get byte count / SZREG + PTR_SUBU t2,SIZEREG,t2 # t2 = words to copy * SZREG + beq t2,zero,3f + PTR_ADDU t0,SRCREG,t2 # stop at t0 + PTR_SUBU SIZEREG,SIZEREG,t2 +1: + REG_L t3,0(SRCREG) + PTR_ADDU SRCREG,SZREG + REG_S t3,0(DSTREG) + bne SRCREG,t0,1b + PTR_ADDU DSTREG,SZREG + +3: # bytecopy + beq SIZEREG,zero,4f # nothing left to do? + nop +1: + lb t3,0(SRCREG) + PTR_ADDU SRCREG,1 + sb t3,0(DSTREG) + PTR_SUBU SIZEREG,1 + bgtz SIZEREG,1b + PTR_ADDU DSTREG,1 + +4: # copydone + j ra + nop + + /* + * Copy from unaligned source to aligned dest. + */ +5: # destaligned + andi t0,SIZEREG,(SZREG-1) # t0 = bytecount mod SZREG + PTR_SUBU a3,SIZEREG,t0 # number of words to transfer + beq a3,zero,3b + nop + move SIZEREG,t0 # this many to do after we are done + PTR_ADDU a3,SRCREG,a3 # stop point + +1: + REG_LHI t3,0(SRCREG) + REG_LLO t3,SZREG-1(SRCREG) + PTR_ADDI SRCREG,SZREG + REG_S t3,0(DSTREG) + bne SRCREG,a3,1b + PTR_ADDI DSTREG,SZREG + + b 3b + nop + +6: # backcopy -- based on above + PTR_ADDU SRCREG,SIZEREG + PTR_ADDU DSTREG,SIZEREG + andi t1,DSTREG,SZREG-1 # get last 3 bits of dest + bne t1,zero,3f + andi t0,SRCREG,SZREG-1 # get last 3 bits of src + bne t0,zero,5f + + /* + * Forward aligned->aligned copy, 8*4 bytes at a time. + */ + li AT,(-8*SZREG) + and t0,SIZEREG,AT # count truncated to multiple of 32 + beq t0,zero,2f # any work to do? + PTR_SUBU SIZEREG,t0 + PTR_SUBU a3,SRCREG,t0 + + /* + * loop body + */ +1: # cp + REG_L t3,(-4*SZREG)(SRCREG) + REG_L v1,(-3*SZREG)(SRCREG) + REG_L t0,(-2*SZREG)(SRCREG) + REG_L t1,(-1*SZREG)(SRCREG) + PTR_SUBU SRCREG,8*SZREG + REG_S t3,(-4*SZREG)(DSTREG) + REG_S v1,(-3*SZREG)(DSTREG) + REG_S t0,(-2*SZREG)(DSTREG) + REG_S t1,(-1*SZREG)(DSTREG) + REG_L t1,(3*SZREG)(SRCREG) + REG_L t0,(2*SZREG)(SRCREG) + REG_L v1,(1*SZREG)(SRCREG) + REG_L t3,(0*SZREG)(SRCREG) + PTR_SUBU DSTREG,8*SZREG + REG_S t1,(3*SZREG)(DSTREG) + REG_S t0,(2*SZREG)(DSTREG) + REG_S v1,(1*SZREG)(DSTREG) + bne SRCREG,a3,1b + REG_S t3,(0*SZREG)(DSTREG) + + /* + * Copy a word at a time, no loop unrolling. + */ +2: # wordcopy + andi t2,SIZEREG,SZREG-1 # get byte count / 4 + PTR_SUBU t2,SIZEREG,t2 # t2 = number of words to copy + beq t2,zero,3f + PTR_SUBU t0,SRCREG,t2 # stop at t0 + PTR_SUBU SIZEREG,SIZEREG,t2 +1: + REG_L t3,-SZREG(SRCREG) + PTR_SUBU SRCREG,SZREG + REG_S t3,-SZREG(DSTREG) + bne SRCREG,t0,1b + PTR_SUBU DSTREG,SZREG + +3: # bytecopy + beq SIZEREG,zero,4f # nothing left to do? + nop +1: + lb t3,-1(SRCREG) + PTR_SUBU SRCREG,1 + sb t3,-1(DSTREG) + PTR_SUBU SIZEREG,1 + bgtz SIZEREG,1b + PTR_SUBU DSTREG,1 + +4: # copydone + j ra + nop + + /* + * Copy from unaligned source to aligned dest. + */ +5: # destaligned + andi t0,SIZEREG,SZREG-1 # t0 = bytecount mod 4 + PTR_SUBU a3,SIZEREG,t0 # number of words to transfer + beq a3,zero,3b + nop + move SIZEREG,t0 # this many to do after we are done + PTR_SUBU a3,SRCREG,a3 # stop point + +1: + REG_LHI t3,-SZREG(SRCREG) + REG_LLO t3,-1(SRCREG) + PTR_SUBU SRCREG,SZREG + REG_S t3,-SZREG(DSTREG) + bne SRCREG,a3,1b + PTR_SUBU DSTREG,SZREG + + b 3b + nop + + .set reorder + .set at +END(memcpy) Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Sat Sep 7 16:16:57 2013 (r255366) +++ head/sys/mips/mips/support.S Sat Sep 7 16:31:30 2013 (r255367) @@ -507,98 +507,6 @@ LEAF(fswintrberr) END(fswintrberr) /* - * memcpy(to, from, len) - * {ov}bcopy(from, to, len) - */ -LEAF(memcpy) - .set noreorder - move v0, a0 # swap from and to - move a0, a1 - move a1, v0 -ALEAF(bcopy) -ALEAF(ovbcopy) - .set noreorder - PTR_ADDU t0, a0, a2 # t0 = end of s1 region - sltu t1, a1, t0 - sltu t2, a0, a1 - and t1, t1, t2 # t1 = true if from < to < (from+len) - beq t1, zero, forward # non overlapping, do forward copy - slt t2, a2, 12 # check for small copy - - ble a2, zero, 2f - PTR_ADDU t1, a1, a2 # t1 = end of to region -1: - lb v1, -1(t0) # copy bytes backwards, - PTR_SUBU t0, t0, 1 # doesnt happen often so do slow way - PTR_SUBU t1, t1, 1 - bne t0, a0, 1b - sb v1, 0(t1) -2: - j ra - nop -forward: - bne t2, zero, smallcpy # do a small bcopy - xor v1, a0, a1 # compare low two bits of addresses - and v1, v1, 3 - PTR_SUBU a3, zero, a1 # compute # bytes to word align address - beq v1, zero, aligned # addresses can be word aligned - and a3, a3, 3 - - beq a3, zero, 1f - PTR_SUBU a2, a2, a3 # subtract from remaining count - LWHI v1, 0(a0) # get next 4 bytes (unaligned) - LWLO v1, 3(a0) - PTR_ADDU a0, a0, a3 - SWHI v1, 0(a1) # store 1, 2, or 3 bytes to align a1 - PTR_ADDU a1, a1, a3 -1: - and v1, a2, 3 # compute number of words left - PTR_SUBU a3, a2, v1 - move a2, v1 - PTR_ADDU a3, a3, a0 # compute ending address -2: - LWHI v1, 0(a0) # copy words a0 unaligned, a1 aligned - LWLO v1, 3(a0) - PTR_ADDU a0, a0, 4 - sw v1, 0(a1) - PTR_ADDU a1, a1, 4 - bne a0, a3, 2b - nop # We have to do this mmu-bug. - b smallcpy - nop -aligned: - beq a3, zero, 1f - PTR_SUBU a2, a2, a3 # subtract from remaining count - LWHI v1, 0(a0) # copy 1, 2, or 3 bytes to align - PTR_ADDU a0, a0, a3 - SWHI v1, 0(a1) - PTR_ADDU a1, a1, a3 -1: - and v1, a2, 3 # compute number of whole words left - PTR_SUBU a3, a2, v1 - move a2, v1 - PTR_ADDU a3, a3, a0 # compute ending address -2: - lw v1, 0(a0) # copy words - PTR_ADDU a0, a0, 4 - sw v1, 0(a1) - bne a0, a3, 2b - PTR_ADDU a1, a1, 4 -smallcpy: - ble a2, zero, 2f - PTR_ADDU a3, a2, a0 # compute ending address -1: - lbu v1, 0(a0) # copy bytes - PTR_ADDU a0, a0, 1 - sb v1, 0(a1) - bne a0, a3, 1b - PTR_ADDU a1, a1, 1 # MMU BUG ? can not do -1(a1) at 0x80000000!! -2: - j ra - nop -END(memcpy) - -/* * memset(void *s1, int c, int len) * NetBSD: memset.S,v 1.3 2001/10/16 15:40:53 uch Exp */ From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 16:41:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5A623CDD; Sat, 7 Sep 2013 16:41:07 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 197712993; Sat, 7 Sep 2013 16:41:06 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 788664A38; Sat, 7 Sep 2013 16:41:00 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 72A8D2925B; Sat, 7 Sep 2013 18:40:33 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Mark Murray Subject: Re: svn commit: r255362 - in head: share/examples/kld share/examples/kld/random_adaptor sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/ubsec sys/kern sys/mips/c... References: <201309071415.r87EFDMv025499@svn.freebsd.org> Date: Sat, 07 Sep 2013 18:40:32 +0200 In-Reply-To: <201309071415.r87EFDMv025499@svn.freebsd.org> (Mark Murray's message of "Sat, 7 Sep 2013 14:15:13 +0000 (UTC)") Message-ID: <86ob84inzz.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 16:41:07 -0000 Mark Murray writes: > Log: > Bring in some behind-the-scenes development, mainly By Arthur Mesh, > the rest by me. Umm, this should have been submitted to secteam@ for review. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 16:53:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 00AAAFC; Sat, 7 Sep 2013 16:53:03 +0000 (UTC) (envelope-from mr.kodiak@gmail.com) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C8C82A03; Sat, 7 Sep 2013 16:53:03 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id 10so6407400ied.39 for ; Sat, 07 Sep 2013 09:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=eZfZ5iBqMU/b2nc2H+tUEbNypbdpSi5s8kAG8tTzd3c=; b=01kXMUmpeyuotlsskh/fVcOrBl6lIbmukB83mvoft8ZwEzOdcJRHxtjClIkfszOX67 M4mOCUArCzRIhvKokUwx0ngDRvymAr8/7DavfaXFOKPfegse0V6DvCopZ2vMJCm66ekg MSWiFlsnRVcnev6WufWPjpUKqCdU1ZNFWCPNSolKAqlbyrUPSXsNQ6hgwUk3+rJikaRc vuG5MJ8PljjJRTal4LHMjPjEade5rNfNj3RnwydgjgMbovwFesTtNJW4Oo44o6ZFuQZu WDnyXMMTjEwe+MyelfC8otsebh3XtbDnf3URORD98/ffUyIrLlMRVPeTnAV0vdAjFA/i znCA== X-Received: by 10.42.61.196 with SMTP id v4mr4016918ich.21.1378572783045; Sat, 07 Sep 2013 09:53:03 -0700 (PDT) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.6.136 with HTTP; Sat, 7 Sep 2013 09:52:32 -0700 (PDT) In-Reply-To: <20130907070644.GP4574@FreeBSD.org> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907070644.GP4574@FreeBSD.org> From: Bryan Venteicher Date: Sat, 7 Sep 2013 11:52:32 -0500 X-Google-Sender-Auth: wJLaEct-Co06nWeRf0eSBMGa7dM Message-ID: Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, Bryan Venteicher , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 16:53:04 -0000 On Sat, Sep 7, 2013 at 2:06 AM, Gleb Smirnoff wrote: > On Fri, Sep 06, 2013 at 03:46:11PM -0500, Bryan Venteicher wrote: > B> On Fri, Sep 6, 2013 at 3:24 PM, Bryan Venteicher > wrote: > B> > B> > Author: bryanv > B> > Date: Fri Sep 6 20:24:21 2013 > B> > New Revision: 255323 > B> > URL: http://svnweb.freebsd.org/changeset/base/255323 > B> > > B> > Log: > B> > Add vmx device to the i386 and amd64 NOTES files > B> > > B> > > B> FWIW - I'm on the fence about adding vmx to GENERIC for 10.0. IIRC, > B> VMware's vmxnet3 driver returns BUS_PROBE_VENDOR so the two drivers > should > B> coexist. This is assuming VMware updates the driver for 10 ... which I'm > B> guessing isn't likely and was a large reason I added this driver in the > B> first place. > B> > B> LMK if anybody has strong thoughts either way. > > May be it is worth providing a special kernel config for VMware > environment? > > Add QEMU, HYPERV, BHYVE, and VIRTUALBOX to that list. I don't think it is unreasonable for us to provide such configs, but I think we are lacking most of the infrastructure to make it useful. > When GENERIC is booted in vmware it has a load of stuff that would be > never used. And if a GENERIC with vmx is booted on hardware, vmx won't > be ever used. > > I agree it is far from ideal, but that's just the nature of what we've made GENERIC. > -- > Totus tuus, Glebius. > From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 16:53:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 735E81E7; Sat, 7 Sep 2013 16:53:13 +0000 (UTC) (envelope-from mr.kodiak@gmail.com) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 26D052A06; Sat, 7 Sep 2013 16:53:13 +0000 (UTC) Received: by mail-ie0-f170.google.com with SMTP id 17so535692iea.1 for ; Sat, 07 Sep 2013 09:53:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=5m+EG8xU+CTQfdzwVCOfrlJfocp82byMPh3ITfCzlbk=; b=VddXz859TUX5J9LfXRren9YY30A2Y+O9/KM1gz2+5mrQy7kiZu7YQbKJBd0VaQhwnh QdOhlRCFJItrJNeHgmLJc6DYKuuIChZGbkLD0ZdArTt1pOCOq8jsMjJP0wiTCtHGQbOP jJ6E+O1xWpXNna20ZFjkP6atf3RsXBOqRp4UwGP7JySClsHAvoksIjMAgax2kQkcZn5G vlDZ7fwibfZFPdvDNmm/KQrYMwbt3ThTjV+GlY0yExB81NPjuUywO6QmMlngD1FNw6pX SLHovmW1+gGM6HfS+JwRdwc5oixTVP2TVqaa2ZuChE5hTOQv+l42++8jU3yRV3/SOUvL xDOg== X-Received: by 10.50.62.211 with SMTP id a19mr2675746igs.18.1378572792605; Sat, 07 Sep 2013 09:53:12 -0700 (PDT) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.6.136 with HTTP; Sat, 7 Sep 2013 09:52:42 -0700 (PDT) In-Reply-To: <20130907081743.GB95723@zxy.spb.ru> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> From: Bryan Venteicher Date: Sat, 7 Sep 2013 11:52:42 -0500 X-Google-Sender-Auth: asAUZhcOpuOx_-w3uXDDD5dQsiQ Message-ID: Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf To: Slawa Olhovchenkov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, Bryan Venteicher , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 16:53:13 -0000 On Sat, Sep 7, 2013 at 3:17 AM, Slawa Olhovchenkov wrote: > On Fri, Sep 06, 2013 at 03:46:11PM -0500, Bryan Venteicher wrote: > > > On Fri, Sep 6, 2013 at 3:24 PM, Bryan Venteicher > wrote: > > > > > Author: bryanv > > > Date: Fri Sep 6 20:24:21 2013 > > > New Revision: 255323 > > > URL: http://svnweb.freebsd.org/changeset/base/255323 > > > > > > Log: > > > Add vmx device to the i386 and amd64 NOTES files > > > > > > > > FWIW - I'm on the fence about adding vmx to GENERIC for 10.0. IIRC, > > VMware's vmxnet3 driver returns BUS_PROBE_VENDOR so the two drivers > should > > coexist. This is assuming VMware updates the driver for 10 ... which I'm > > guessing isn't likely and was a large reason I added this driver in the > > first place. > > Why we don't switch (in 10.0) to minimal GENERIC and all driver loaded > as modules (/boot/loader.conf)? This is reduce memory (by easy unloading > unneed > drivers/modules), space (by reducing GENERIC+symbols size about 100M), > space on install media too (100M + compressed 100M), build time (not > need to build some modules twice) and add ability to easy > update/bugfix modules w/o reboot. > > After last updates to bootloader loading many modules enought fast. > I already switched (for me) to this setup and it's fine for me. > The holy grail would be for the loader to automatically detect and load what is needed/supported, but this has been talked and beaten to death in the past. From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 16:55:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CFD5837F; Sat, 7 Sep 2013 16:55:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A0F272A17; Sat, 7 Sep 2013 16:55:39 +0000 (UTC) Received: from glenbarber.us (c-71-224-221-174.hsd1.nj.comcast.net [71.224.221.174]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 23DD123EE; Sat, 7 Sep 2013 16:55:38 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 23DD123EE Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Sat, 7 Sep 2013 12:55:36 -0400 From: Glen Barber To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Subject: Re: svn commit: r255362 - in head: share/examples/kld share/examples/kld/random_adaptor sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/ubsec sys/kern sys/mips/c... Message-ID: <20130907165536.GS77463@glenbarber.us> References: <201309071415.r87EFDMv025499@svn.freebsd.org> <86ob84inzz.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9wW3yB/H9ZmnRBtb" Content-Disposition: inline In-Reply-To: <86ob84inzz.fsf@nine.des.no> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mark Murray X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 16:55:39 -0000 --9wW3yB/H9ZmnRBtb Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 07, 2013 at 06:40:32PM +0200, Dag-Erling Sm=F8rgrav wrote: > Mark Murray writes: > > Log: > > Bring in some behind-the-scenes development, mainly By Arthur Mesh, > > the rest by me. >=20 > Umm, this should have been submitted to secteam@ for review. >=20 This also causes problems booting when /dev/random is nonexistent. See the new thread on -current@ with subject "random(4) update causes mips compile fail | mips boot fail". Sean confirmed r255361 does not exhibit the boot failure. Glen --9wW3yB/H9ZmnRBtb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBCAAGBQJSK1qIAAoJEFJPDDeguUaj+qgH/3eqD/b+Rl9qCxCVftDmUEfd /dzeXMG+B4zuB00AyjsS0UKpx5FWv29ZhMxHFlXkRiaH4dPUfcLncPhehpLinUo5 8JJohGwv8YX3ew4UThldWMbJLpOPHsICGJF3yJ4j69wvbgsiwjE0W8DtcEWGpoPL fkMMxdrjM089wkpsM37/qMjOjVpFuqMNh6qfaNKMLTc4ptn1sqb8ZYTDRylYgvgo lXmoYDzdZ0NAXW2aXY5KNkb+SjoX6NHQM9EZRwUNX2OteP6eUda8ruSOU2785GOb K+771oEa6Yo7rmKzwZBqVY3gJFWxHN6QaqGGySHymdzfA5e3DZ4kVOz7fMD+z/o= =0jrN -----END PGP SIGNATURE----- --9wW3yB/H9ZmnRBtb-- From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 17:04:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9FB00562; Sat, 7 Sep 2013 17:04:57 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id 5859A2A77; Sat, 7 Sep 2013 17:04:57 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1VILyO-0004Mw-RQ; Sat, 07 Sep 2013 21:07:00 +0400 Date: Sat, 7 Sep 2013 21:07:00 +0400 From: Slawa Olhovchenkov To: Bryan Venteicher Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Message-ID: <20130907170700.GB3796@zxy.spb.ru> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 17:04:57 -0000 On Sat, Sep 07, 2013 at 11:52:42AM -0500, Bryan Venteicher wrote: > On Sat, Sep 7, 2013 at 3:17 AM, Slawa Olhovchenkov wrote: > > > On Fri, Sep 06, 2013 at 03:46:11PM -0500, Bryan Venteicher wrote: > > > > > On Fri, Sep 6, 2013 at 3:24 PM, Bryan Venteicher > > wrote: > > > > > > > Author: bryanv > > > > Date: Fri Sep 6 20:24:21 2013 > > > > New Revision: 255323 > > > > URL: http://svnweb.freebsd.org/changeset/base/255323 > > > > > > > > Log: > > > > Add vmx device to the i386 and amd64 NOTES files > > > > > > > > > > > FWIW - I'm on the fence about adding vmx to GENERIC for 10.0. IIRC, > > > VMware's vmxnet3 driver returns BUS_PROBE_VENDOR so the two drivers > > should > > > coexist. This is assuming VMware updates the driver for 10 ... which I'm > > > guessing isn't likely and was a large reason I added this driver in the > > > first place. > > > > Why we don't switch (in 10.0) to minimal GENERIC and all driver loaded > > as modules (/boot/loader.conf)? This is reduce memory (by easy unloading > > unneed > > drivers/modules), space (by reducing GENERIC+symbols size about 100M), > > space on install media too (100M + compressed 100M), build time (not > > need to build some modules twice) and add ability to easy > > update/bugfix modules w/o reboot. > > > > After last updates to bootloader loading many modules enought fast. > > > I already switched (for me) to this setup and it's fine for me. > > > > The holy grail would be for the loader to automatically detect and load > what is needed/supported, but this has been talked and beaten to death in > the past. No-no, not automatically detect. Just load all bundle of modules, cureently staticly compiled in GENERIC as individual modules. Just /boot/loader.conf of 100 lines module_load="yes". From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 17:17:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5213181C; Sat, 7 Sep 2013 17:17:02 +0000 (UTC) (envelope-from mark@grondar.org) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 12E302AE8; Sat, 7 Sep 2013 17:17:01 +0000 (UTC) Received: from graveyard.grondar.org ([88.96.155.33] helo=gronkulator.grondar.org) by gromit.grondar.org with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VIM81-000DaJ-13; Sat, 07 Sep 2013 18:16:58 +0100 Subject: Re: svn commit: r255362 - in head: share/examples/kld share/examples/kld/random_adaptor sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/ubsec sys/kern sys/mips/c... Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: multipart/signed; boundary="Apple-Mail=_8A704C6B-1F1F-459A-B851-1E1A489F429F"; protocol="application/pgp-signature"; micalg=pgp-sha512 From: Mark R V Murray In-Reply-To: <86ob84inzz.fsf@nine.des.no> Date: Sat, 7 Sep 2013 18:16:56 +0100 Message-Id: <85C6EE50-4578-4FD3-B6D2-1B147F116F1D@grondar.org> References: <201309071415.r87EFDMv025499@svn.freebsd.org> <86ob84inzz.fsf@nine.des.no> To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1508) X-SA-Score: -2.2 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mark Murray X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 17:17:02 -0000 --Apple-Mail=_8A704C6B-1F1F-459A-B851-1E1A489F429F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 7 Sep 2013, at 17:40, Dag-Erling Sm=F8rgrav wrote: > Mark Murray writes: >> Log: >> Bring in some behind-the-scenes development, mainly By Arthur Mesh, >> the rest by me. >=20 > Umm, this should have been submitted to secteam@ for review. My bad. I made the presumption that since we had discussed it in person that this would be OK, so my fault. I'd prefer not to churn by backing out, but will do so if needed. M --=20 Mark R V Murray --Apple-Mail=_8A704C6B-1F1F-459A-B851-1E1A489F429F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) Comment: GPGTools - http://gpgtools.org iQCVAwUBUitfiN58vKOKE6LNAQoHFwQAhSu9hmzsuCKWCLm/r+d1z2xgfrzQ8HIO 4HSr0vTOO9CU9vyd1u+WOQVx241hiJDAqv2CClt+q/XszLcZggbkHHty2m74aAHJ jVxqu9uoanDzaPfBkae+8LkR6rx3OYRDOKv8D1FOPLQQiDl//bXHDemh1QHh8O+2 UNoPICD7Zg0= =9Abb -----END PGP SIGNATURE----- --Apple-Mail=_8A704C6B-1F1F-459A-B851-1E1A489F429F-- From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 17:17:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C46AA95F; Sat, 7 Sep 2013 17:17:57 +0000 (UTC) (envelope-from mark@grondar.org) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 84B552AF0; Sat, 7 Sep 2013 17:17:57 +0000 (UTC) Received: from graveyard.grondar.org ([88.96.155.33] helo=gronkulator.grondar.org) by gromit.grondar.org with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VIM8w-000DaJ-Lm; Sat, 07 Sep 2013 18:17:56 +0100 Subject: Re: svn commit: r255362 - in head: share/examples/kld share/examples/kld/random_adaptor sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/ubsec sys/kern sys/mips/c... Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: multipart/signed; boundary="Apple-Mail=_163B86AA-95EB-4214-8D3F-DAE54F5D26EE"; protocol="application/pgp-signature"; micalg=pgp-sha512 From: Mark R V Murray In-Reply-To: <20130907165536.GS77463@glenbarber.us> Date: Sat, 7 Sep 2013 18:17:54 +0100 Message-Id: <3E85FDD4-CCE3-49B7-B3E1-1CEF4A99EF2B@grondar.org> References: <201309071415.r87EFDMv025499@svn.freebsd.org> <86ob84inzz.fsf@nine.des.no> <20130907165536.GS77463@glenbarber.us> To: Glen Barber X-Mailer: Apple Mail (2.1508) X-SA-Score: -2.2 Cc: svn-src-head@freebsd.org, =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , svn-src-all@freebsd.org, src-committers@freebsd.org, Mark Murray X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 17:17:57 -0000 --Apple-Mail=_163B86AA-95EB-4214-8D3F-DAE54F5D26EE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 7 Sep 2013, at 17:55, Glen Barber wrote: > On Sat, Sep 07, 2013 at 06:40:32PM +0200, Dag-Erling Sm=F8rgrav wrote: >> Mark Murray writes: >>> Log: >>> Bring in some behind-the-scenes development, mainly By Arthur Mesh, >>> the rest by me. >>=20 >> Umm, this should have been submitted to secteam@ for review. >>=20 >=20 > This also causes problems booting when /dev/random is nonexistent. >=20 > See the new thread on -current@ with subject "random(4) update causes > mips compile fail | mips boot fail". >=20 > Sean confirmed r255361 does not exhibit the boot failure. I can't find that thread :-( M --=20 Mark R V Murray --Apple-Mail=_163B86AA-95EB-4214-8D3F-DAE54F5D26EE Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) Comment: GPGTools - http://gpgtools.org iQCVAwUBUitfwt58vKOKE6LNAQr76wP/cOcULcD8WYi9SDonUDrd4kVHUrb/Qhtq 38BbD0mxaLzHzQlXFVB2R2p3bDJVCgipNOXoGCdhOK+W6xlWVsYBefT9VbieueIa gZfB2i4mmTfVljt2/XLAsjW/6Wf7D2OJTS0jQVlYaUIsCsX19Ki6LN0A83Omrcj4 P06ZF3O8vPo= =n19B -----END PGP SIGNATURE----- --Apple-Mail=_163B86AA-95EB-4214-8D3F-DAE54F5D26EE-- From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 17:20:40 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9A2CDAB5; Sat, 7 Sep 2013 17:20:40 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 5A2962B04; Sat, 7 Sep 2013 17:20:40 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 5CF314AA4; Sat, 7 Sep 2013 17:20:39 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 5CC0529278; Sat, 7 Sep 2013 19:20:12 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Mark R V Murray Subject: Re: svn commit: r255362 - in head: share/examples/kld share/examples/kld/random_adaptor sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/ubsec sys/kern sys/mips/c... References: <201309071415.r87EFDMv025499@svn.freebsd.org> <86ob84inzz.fsf@nine.des.no> <85C6EE50-4578-4FD3-B6D2-1B147F116F1D@grondar.org> Date: Sat, 07 Sep 2013 19:20:12 +0200 In-Reply-To: <85C6EE50-4578-4FD3-B6D2-1B147F116F1D@grondar.org> (Mark R. V. Murray's message of "Sat, 7 Sep 2013 18:16:56 +0100") Message-ID: <86fvtgim5v.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mark Murray X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 17:20:40 -0000 Mark R V Murray writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Umm, this should have been submitted to secteam@ for review. > I made the presumption that since we had discussed it in person that > this would be OK, so my fault. We discussed the outline, but we still need to review the details. > I'd prefer not to churn by backing out, but will do so if needed. I'm reviewing the patch as we speak. I haven't yet seen anything that would justify reverting the commit, but the mips breakage Glen mentioned needs to be fixed. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 17:21:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AD4F2CCB; Sat, 7 Sep 2013 17:21:41 +0000 (UTC) (envelope-from mark@grondar.org) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6EBD42B2E; Sat, 7 Sep 2013 17:21:41 +0000 (UTC) Received: from graveyard.grondar.org ([88.96.155.33] helo=gronkulator.grondar.org) by gromit.grondar.org with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VIMCY-000Db0-ID; Sat, 07 Sep 2013 18:21:40 +0100 Subject: Re: svn commit: r255362 - in head: share/examples/kld share/examples/kld/random_adaptor sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/ubsec sys/kern sys/mips/c... Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: multipart/signed; boundary="Apple-Mail=_A6B0D4AB-5018-4F96-833E-01EE4230BB92"; protocol="application/pgp-signature"; micalg=pgp-sha512 From: Mark R V Murray In-Reply-To: <86fvtgim5v.fsf@nine.des.no> Date: Sat, 7 Sep 2013 18:21:37 +0100 Message-Id: <2A4D924B-E246-458B-B0FF-0BDFC02F965A@grondar.org> References: <201309071415.r87EFDMv025499@svn.freebsd.org> <86ob84inzz.fsf@nine.des.no> <85C6EE50-4578-4FD3-B6D2-1B147F116F1D@grondar.org> <86fvtgim5v.fsf@nine.des.no> To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1508) X-SA-Score: -2.2 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mark Murray X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 17:21:41 -0000 --Apple-Mail=_A6B0D4AB-5018-4F96-833E-01EE4230BB92 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 7 Sep 2013, at 18:20, Dag-Erling Sm=F8rgrav wrote: > Mark R V Murray writes: >> Dag-Erling Sm=F8rgrav writes: >>> Umm, this should have been submitted to secteam@ for review. >> I made the presumption that since we had discussed it in person that >> this would be OK, so my fault. >=20 > We discussed the outline, but we still need to review the details. >=20 >> I'd prefer not to churn by backing out, but will do so if needed. >=20 > I'm reviewing the patch as we speak. I haven't yet seen anything that > would justify reverting the commit, but the mips breakage Glen = mentioned > needs to be fixed. OK, thanks, I'm on that MIPS breakage. M --=20 Mark R V Murray --Apple-Mail=_A6B0D4AB-5018-4F96-833E-01EE4230BB92 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) Comment: GPGTools - http://gpgtools.org iQCVAwUBUitgod58vKOKE6LNAQqtfgP/bi2hHRsgKLpdliDO3brv/pJCkzWxU7Ru MO1aNXOh36xSCDXOW8zZRe+pBmjBl5yJCgwdaX+ps6ZgIbeoNcvTDlmZ/DkNmZ4s UtnoeqrM5bxfDbZc3kMInprX28cz0uNKpoyFlfHeRTXwIyV97xtynnOIV3+eAib7 p9jjv1UKFBQ= =B4vO -----END PGP SIGNATURE----- --Apple-Mail=_A6B0D4AB-5018-4F96-833E-01EE4230BB92-- From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 17:24:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2EEF0315; Sat, 7 Sep 2013 17:24:25 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F34F72B4D; Sat, 7 Sep 2013 17:24:24 +0000 (UTC) Received: from glenbarber.us (c-71-224-221-174.hsd1.nj.comcast.net [71.224.221.174]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 818B92695; Sat, 7 Sep 2013 17:24:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 818B92695 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Sat, 7 Sep 2013 13:24:21 -0400 From: Glen Barber To: Mark R V Murray Subject: Re: svn commit: r255362 - in head: share/examples/kld share/examples/kld/random_adaptor sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/ubsec sys/kern sys/mips/c... Message-ID: <20130907172421.GT77463@glenbarber.us> References: <201309071415.r87EFDMv025499@svn.freebsd.org> <86ob84inzz.fsf@nine.des.no> <20130907165536.GS77463@glenbarber.us> <3E85FDD4-CCE3-49B7-B3E1-1CEF4A99EF2B@grondar.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WQ40utMgiyDduspJ" Content-Disposition: inline In-Reply-To: <3E85FDD4-CCE3-49B7-B3E1-1CEF4A99EF2B@grondar.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , svn-src-all@freebsd.org, src-committers@freebsd.org, Mark Murray X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 17:24:25 -0000 --WQ40utMgiyDduspJ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 07, 2013 at 06:17:54PM +0100, Mark R V Murray wrote: >=20 > On 7 Sep 2013, at 17:55, Glen Barber wrote: >=20 > > On Sat, Sep 07, 2013 at 06:40:32PM +0200, Dag-Erling Sm=F8rgrav wrote: > >> Mark Murray writes: > >>> Log: > >>> Bring in some behind-the-scenes development, mainly By Arthur Mesh, > >>> the rest by me. > >>=20 > >> Umm, this should have been submitted to secteam@ for review. > >>=20 > >=20 > > This also causes problems booting when /dev/random is nonexistent. > >=20 > > See the new thread on -current@ with subject "random(4) update causes > > mips compile fail | mips boot fail". > >=20 > > Sean confirmed r255361 does not exhibit the boot failure. >=20 > I can't find that thread :-( >=20 http://lists.freebsd.org/pipermail/freebsd-current/2013-September/044345.ht= ml Glen --WQ40utMgiyDduspJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBCAAGBQJSK2FFAAoJEFJPDDeguUaj3YEIAIYyxVh273tOcpiSH/g3EjI9 WeuqGucSChYEw47mAEgrNGYXvQC7ykwBHdgS8sijGQkJ2t5dC7i3LzlimD3Exi56 9vg+AWgOnV+1eKpWno48wR2Qe+hfNRJ1eAEVQknu1lz3Mvu5+210O1fbZzj2CYW1 HpyS1rzSO1UNFzwZ/jQ97N9ZBulerYaYhyNFbO8pSosHj+6mKZZmEHrHxW+Csfmp vVup1CURNcxlIvCiHECEVYlA+PucqrHDuktdGQKb2xwAbaw+EnNibzqF75F9Uehc N1an23nZQIgMO54Nxi5j3EtB0yp3h/nk6+GIWe7zfaMRQDB2Scsgn1vzG23YPcg= =h5r7 -----END PGP SIGNATURE----- --WQ40utMgiyDduspJ-- From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 17:47:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6F730B3E; Sat, 7 Sep 2013 17:47:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-x22e.google.com (mail-pb0-x22e.google.com [IPv6:2607:f8b0:400e:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35E472C17; Sat, 7 Sep 2013 17:47:08 +0000 (UTC) Received: by mail-pb0-f46.google.com with SMTP id rq2so4460364pbb.5 for ; Sat, 07 Sep 2013 10:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=J6tcwSXFojvK4kL5dcc6aOZgbVlcPozNhBWnvsQ0Nu0=; b=ROQOi59wrDSRgyHM03KewPnhuqGh1JNn5PZPtDhWsxbikwuPtdoIiO36tgW4pvjX4S o2VX7Evue3x6S+RTEhds3mvTVeydH4Ao9JvYde0lvKh4emS6o8NvUxzrPzTI3Ge9mQCW SHP46eBVYkXtr2EDVZl0PBeLCl/21zEowccF0u7VoECbAumZQ4GqQOOREbmc6fKH50QN Bg3+Pes7B9t0lo2FQvGAfp85J06bpnofQujU3RuSvMtGblx/yLkDTFRiVA4uR1cxypjw 2cg2M9sqaIvuJ8wCTYlDz1+BAJK3lwo23wb2beYKZTAciGwsJzbo7VFzULiH2uH3OCsn Uibw== MIME-Version: 1.0 X-Received: by 10.66.189.98 with SMTP id gh2mr10763972pac.60.1378576027812; Sat, 07 Sep 2013 10:47:07 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.70.126.71 with HTTP; Sat, 7 Sep 2013 10:47:07 -0700 (PDT) In-Reply-To: <20130907170700.GB3796@zxy.spb.ru> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> Date: Sat, 7 Sep 2013 10:47:07 -0700 X-Google-Sender-Auth: ORfAiteLhWI_1w6PXGwK5GWkTZY Message-ID: Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf From: Adrian Chadd To: Slawa Olhovchenkov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 17:47:08 -0000 I'll be happy if someone does this right now, by populating a /boot/loader.modules or something, and then force the "fixing" of loader to cache metadata to make the reads faster. -adrian On 7 September 2013 10:07, Slawa Olhovchenkov wrote: > On Sat, Sep 07, 2013 at 11:52:42AM -0500, Bryan Venteicher wrote: > > > On Sat, Sep 7, 2013 at 3:17 AM, Slawa Olhovchenkov > wrote: > > > > > On Fri, Sep 06, 2013 at 03:46:11PM -0500, Bryan Venteicher wrote: > > > > > > > On Fri, Sep 6, 2013 at 3:24 PM, Bryan Venteicher > > > > wrote: > > > > > > > > > Author: bryanv > > > > > Date: Fri Sep 6 20:24:21 2013 > > > > > New Revision: 255323 > > > > > URL: http://svnweb.freebsd.org/changeset/base/255323 > > > > > > > > > > Log: > > > > > Add vmx device to the i386 and amd64 NOTES files > > > > > > > > > > > > > > FWIW - I'm on the fence about adding vmx to GENERIC for 10.0. IIRC, > > > > VMware's vmxnet3 driver returns BUS_PROBE_VENDOR so the two drivers > > > should > > > > coexist. This is assuming VMware updates the driver for 10 ... which > I'm > > > > guessing isn't likely and was a large reason I added this driver in > the > > > > first place. > > > > > > Why we don't switch (in 10.0) to minimal GENERIC and all driver loaded > > > as modules (/boot/loader.conf)? This is reduce memory (by easy > unloading > > > unneed > > > drivers/modules), space (by reducing GENERIC+symbols size about 100M), > > > space on install media too (100M + compressed 100M), build time (not > > > need to build some modules twice) and add ability to easy > > > update/bugfix modules w/o reboot. > > > > > > After last updates to bootloader loading many modules enought fast. > > > > > I already switched (for me) to this setup and it's fine for me. > > > > > > > The holy grail would be for the loader to automatically detect and load > > what is needed/supported, but this has been talked and beaten to death in > > the past. > > No-no, not automatically detect. Just load all bundle of modules, > cureently staticly compiled in GENERIC as individual modules. > Just /boot/loader.conf of 100 lines module_load="yes". > From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 18:26:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7D41CB24; Sat, 7 Sep 2013 18:26:18 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6893A2D9C; Sat, 7 Sep 2013 18:26:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87IQIvU084964; Sat, 7 Sep 2013 18:26:18 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87IQGW3084943; Sat, 7 Sep 2013 18:26:16 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201309071826.r87IQGW3084943@svn.freebsd.org> From: "Jayachandran C." Date: Sat, 7 Sep 2013 18:26:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255368 - in head/sys/mips/nlm: . dev/net hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 18:26:18 -0000 Author: jchandra Date: Sat Sep 7 18:26:16 2013 New Revision: 255368 URL: http://svnweb.freebsd.org/changeset/base/255368 Log: Netlogic XLP network driver update Changes are to - update board and network interface detection logic - fix reading onboard CPLD in little-endian config - print NAE frequency conrrectly for Bx chips - update XAUI config to disable Rx/Tx until interface is up Submitted by: Venkatesh J V Modified: head/sys/mips/nlm/board.c head/sys/mips/nlm/board.h head/sys/mips/nlm/board_cpld.c head/sys/mips/nlm/dev/net/nae.c head/sys/mips/nlm/dev/net/xaui.c head/sys/mips/nlm/dev/net/xlpge.c head/sys/mips/nlm/dev/net/xlpge.h head/sys/mips/nlm/hal/nae.h head/sys/mips/nlm/hal/nlm_hal.c head/sys/mips/nlm/hal/sys.h Modified: head/sys/mips/nlm/board.c ============================================================================== --- head/sys/mips/nlm/board.c Sat Sep 7 16:31:30 2013 (r255367) +++ head/sys/mips/nlm/board.c Sat Sep 7 18:26:16 2013 (r255368) @@ -280,15 +280,8 @@ nlm_setup_port_defaults(struct xlp_port_ * 1 3 9 0 */ static void -nlm_board_get_phyaddr(int block, int port, int *mdio, int *phyaddr) +nlm_board_get_phyaddr(int block, int port, int *phyaddr) { - - /* XXXJC: this is a board feature, check for chip not proper */ - if (nlm_is_xlp3xx() || (nlm_is_xlp8xx() && block == 4)) - *mdio = 0; - else - *mdio = 1; - switch (block) { case 0: switch (port) { case 0: *phyaddr = 4; break; @@ -377,7 +370,7 @@ nlm_print_processor_info(void) * at run-time goes here */ static int -nlm_setup_xlp_board(void) +nlm_setup_xlp_board(int node) { struct xlp_board_info *boardp; struct xlp_node_info *nodep; @@ -385,17 +378,18 @@ nlm_setup_xlp_board(void) struct xlp_block_ivars *blockp; struct xlp_port_ivars *portp; uint64_t cpldbase, nae_pcibase; - int node, block, port, rv, dbtype, usecpld; + int block, port, rv, dbtype, usecpld = 0, evp = 0, svp = 0; uint8_t *b; /* start with a clean slate */ boardp = &xlp_board_info; - memset(boardp, 0, sizeof(xlp_board_info)); - boardp->nodemask = 0x1; /* only node 0 */ + if (boardp->nodemask == 0) + memset(boardp, 0, sizeof(xlp_board_info)); + boardp->nodemask |= (1 << node); nlm_print_processor_info(); b = board_eeprom_buf; - rv = nlm_board_eeprom_read(0, EEPROM_I2CBUS, EEPROM_I2CADDR, 0, b, + rv = nlm_board_eeprom_read(node, EEPROM_I2CBUS, EEPROM_I2CADDR, 0, b, EEPROM_SIZE); if (rv == 0) { board_eeprom_set = 1; @@ -409,80 +403,114 @@ nlm_setup_xlp_board(void) printf("Board Info: Error on EEPROM read (i2c@%d %#X).\n", EEPROM_I2CBUS, EEPROM_I2CADDR); + nae_pcibase = nlm_get_nae_pcibase(node); + nodep = &boardp->nodes[node]; + naep = &nodep->nae_ivars; + naep->node = node; + + /* frequency at which network block runs */ + naep->freq = 500; + + /* CRC16 polynomial used for flow table generation */ + naep->flow_crc_poly = 0xffff; + naep->hw_parser_en = 1; + naep->prepad_en = 1; + naep->prepad_size = 3; /* size in 16 byte units */ + naep->ieee_1588_en = 1; + + naep->ilmask = 0x0; /* set this based on daughter card */ + naep->xauimask = 0x0; /* set this based on daughter card */ + naep->sgmiimask = 0x0; /* set this based on daughter card */ + naep->nblocks = nae_num_complex(nae_pcibase); + if (strncmp(&b[16], "PCIE", 4) == 0) { + usecpld = 0; /* XLP PCIe card */ + /* Broadcom's XLP PCIe card has the following + * blocks fixed. + * blk 0-XAUI, 1-XAUI, 4-SGMII(one port) */ + naep->blockmask = 0x13; + } else if (strncmp(&b[16], "MB-EVP", 6) == 0) { + usecpld = 1; /* XLP non-PCIe card which has CPLD */ + evp = 1; + naep->blockmask = (1 << naep->nblocks) - 1; + } else if ((strncmp(&b[16], "MB-S", 4) == 0) || + (strncmp(&b[16], "MB_S", 4) == 0)) { + usecpld = 1; /* XLP non-PCIe card which has CPLD */ + svp = 1; + /* 3xx chip reports one block extra which is a bug */ + naep->nblocks = naep->nblocks - 1; + naep->blockmask = (1 << naep->nblocks) - 1; + } else { + printf("ERROR!!! Board type:%7s didn't match any board" + " type we support\n", &b[16]); + return (-1); + } + cpldbase = nlm_board_cpld_base(node, XLP_EVB_CPLD_CHIPSELECT); - /* XXXJC: check for boards with right CPLD, for now - * 4xx PCI cards don't have CPLD with daughter - * card info */ - usecpld = !nlm_is_xlp4xx(); + /* pretty print network config */ + printf("Network config"); + if (usecpld) + printf("(from CPLD@%d):\n", XLP_EVB_CPLD_CHIPSELECT); + else + printf("(defaults):\n"); + printf(" NAE@%d Blocks: ", node); + for (block = 0; block < naep->nblocks; block++) { + char *s = "???"; - for (node = 0; node < XLP_MAX_NODES; node++) { - if ((boardp->nodemask & (1 << node)) == 0) + if ((naep->blockmask & (1 << block)) == 0) continue; - nae_pcibase = nlm_get_nae_pcibase(node); - nodep = &boardp->nodes[node]; - naep = &nodep->nae_ivars; - naep->node = node; - - naep->nblocks = nae_num_complex(nae_pcibase); - /* 3xx chips lie shamelessly about this */ - if (nlm_is_xlp3xx()) - naep->nblocks = naep->nblocks - 1; - naep->blockmask = (1 << naep->nblocks) - 1; /* XXXJC: redundant */ - naep->xauimask = 0x0; /* set this based on daughter card */ - naep->sgmiimask = 0x0; /* set this based on daughter card */ - - /* frequency at which network block runs */ - naep->freq = 500; - - /* CRC16 polynomial used for flow table generation */ - naep->flow_crc_poly = 0xffff; - naep->hw_parser_en = 1; - naep->prepad_en = 1; - naep->prepad_size = 3; /* size in 16 byte units */ - - naep->ieee_1588_en = 1; - cpldbase = nlm_board_cpld_base(node, XLP_EVB_CPLD_CHIPSELECT); - - for (block = 0; block < naep->nblocks; block++) { - blockp = &naep->block_ivars[block]; - blockp->block = block; - if (usecpld) - dbtype = nlm_board_cpld_dboard_type(cpldbase, - block); + blockp = &naep->block_ivars[block]; + blockp->block = block; + if (usecpld) + dbtype = nlm_board_cpld_dboard_type(cpldbase, block); + else + dbtype = DCARD_XAUI; /* default XAUI */ + + /* XLP PCIe cards */ + if ((!evp && !svp) && ((block == 2) || (block == 3))) + dbtype = DCARD_NOT_PRSNT; + + if (block == 4) { + /* management block 4 on 8xx or XLP PCIe */ + blockp->type = SGMIIC; + if (evp) + blockp->portmask = 0x3; else - dbtype = DCARD_XAUI; /* default XAUI */ - - if (block == 4) { - /* management block 4 on 8xx */ + blockp->portmask = 0x1; + naep->sgmiimask |= (1 << block); + } else { + switch (dbtype) { + case DCARD_ILAKEN: + blockp->type = ILC; + blockp->portmask = 0x1; + naep->ilmask |= (1 << block); + break; + case DCARD_SGMII: blockp->type = SGMIIC; - blockp->portmask = 0x3; + blockp->portmask = 0xf; naep->sgmiimask |= (1 << block); - } else { - switch (dbtype) { - case DCARD_ILAKEN: - blockp->type = ILC; - blockp->portmask = 0x1; - naep->xauimask |= (1 << block); - break; - case DCARD_SGMII: - blockp->type = SGMIIC; - blockp->portmask = 0xf; - naep->sgmiimask |= (1 << block); - break; - case DCARD_XAUI: - default: - blockp->type = XAUIC; - blockp->portmask = 0x1; - naep->xauimask |= (1 << block); - break; - } + break; + case DCARD_XAUI: + blockp->type = XAUIC; + blockp->portmask = 0x1; + naep->xauimask |= (1 << block); + break; + default: /* DCARD_NOT_PRSNT */ + blockp->type = UNKNOWN; + blockp->portmask = 0; + break; } + } + if (blockp->type != UNKNOWN) { for (port = 0; port < PORTS_PER_CMPLX; port++) { if ((blockp->portmask & (1 << port)) == 0) continue; portp = &blockp->port_ivars[port]; nlm_board_get_phyaddr(block, port, - &portp->mdio_bus, &portp->phy_addr); + &portp->phy_addr); + if (svp || (block == 4)) + portp->mdio_bus = 0; + else + portp->mdio_bus = 1; portp->port = port; portp->block = block; portp->node = node; @@ -490,38 +518,20 @@ nlm_setup_xlp_board(void) nlm_setup_port_defaults(portp); } } - } - - /* pretty print network config */ - printf("Network config"); - if (usecpld) - printf("(from CPLD@%d):\n", XLP_EVB_CPLD_CHIPSELECT); - else - printf("(defaults):\n"); - for (node = 0; node < XLP_MAX_NODES; node++) { - if ((boardp->nodemask & (1 << node)) == 0) - continue; - nodep = &boardp->nodes[node]; - naep = &nodep->nae_ivars; - printf(" NAE@%d Blocks: ", node); - for (block = 0; block < naep->nblocks; block++) { - char *s = "???"; - - blockp = &naep->block_ivars[block]; - switch (blockp->type) { - case SGMIIC : s = "SGMII"; break; - case XAUIC : s = "XAUI"; break; - case ILC : s = "IL"; break; - } - printf(" [%d %s]", block, s); + switch (blockp->type) { + case SGMIIC : s = "SGMII"; break; + case XAUIC : s = "XAUI"; break; + case ILC : s = "IL"; break; } - printf("\n"); + printf(" [%d %s]", block, s); } + printf("\n"); return (0); } int nlm_board_info_setup(void) { - nlm_setup_xlp_board(); + if (nlm_setup_xlp_board(0) != 0) + return (-1); return (0); } Modified: head/sys/mips/nlm/board.h ============================================================================== --- head/sys/mips/nlm/board.h Sat Sep 7 16:31:30 2013 (r255367) +++ head/sys/mips/nlm/board.h Sat Sep 7 18:26:16 2013 (r255368) @@ -116,6 +116,7 @@ struct xlp_nae_ivars { int node; int nblocks; u_int blockmask; + u_int ilmask; u_int xauimask; u_int sgmiimask; int freq; Modified: head/sys/mips/nlm/board_cpld.c ============================================================================== --- head/sys/mips/nlm/board_cpld.c Sat Sep 7 16:31:30 2013 (r255367) +++ head/sys/mips/nlm/board_cpld.c Sat Sep 7 18:26:16 2013 (r255368) @@ -55,13 +55,13 @@ int nlm_cpld_read(uint64_t base, int reg uint16_t val; val = *(volatile uint16_t *)(long)(base + reg * 2); - return bswap16(val); + return le16toh(val); } static __inline void nlm_cpld_write(uint64_t base, int reg, uint16_t data) { - bswap16(data); + data = htole16(data); *(volatile uint16_t *)(long)(base + reg * 2) = data; } Modified: head/sys/mips/nlm/dev/net/nae.c ============================================================================== --- head/sys/mips/nlm/dev/net/nae.c Sat Sep 7 16:31:30 2013 (r255367) +++ head/sys/mips/nlm/dev/net/nae.c Sat Sep 7 18:26:16 2013 (r255368) @@ -59,31 +59,17 @@ nlm_nae_flush_free_fifo(uint64_t nae_bas } void -nlm_program_nae_parser_seq_fifo(uint64_t nae_base, int nblock, +nlm_program_nae_parser_seq_fifo(uint64_t nae_base, int maxports, struct nae_port_config *cfg) { uint32_t val; - int start = 0, size, i, j; - - for (i = 0; i < nblock; i++) { - for (j = 0; j < PORTS_PER_CMPLX; j++) { - if ((i == 4) && (j > 1)) - size = 0; - else - size = cfg[(i*4)+j].pseq_fifo_size; - start += size; - } - } - - for (j = 0; j < PORTS_PER_CMPLX; j++) { - if ((i == 4) && (j > 1)) - size = 0; - else - size = cfg[(i*4)+j].pseq_fifo_size; + int start = 0, size, i; + for (i = 0; i < maxports; i++) { + size = cfg[i].pseq_fifo_size; val = (((size & 0x1fff) << 17) | ((start & 0xfff) << 5) | - (((i * 4) + j) & 0x1f)); + (i & 0x1f)); nlm_write_nae_reg(nae_base, NAE_PARSER_SEQ_FIFO_CFG, val); start += size; } @@ -255,105 +241,66 @@ nlm_setup_flow_crc_poly(uint64_t nae_bas } void -nlm_setup_iface_fifo_cfg(uint64_t nae_base, int nblock, +nlm_setup_iface_fifo_cfg(uint64_t nae_base, int maxports, struct nae_port_config *cfg) { uint32_t reg; int fifo_xoff_thresh = 12; - int i, size, j; + int i, size; int cur_iface_start = 0; - for (i = 0; i < nblock; i++) { - for (j = 0; j < PORTS_PER_CMPLX; j++) { - if ((i == 4) && (j > 1)) - size = 0; - else - size = cfg[(i*4)+j].iface_fifo_size; - cur_iface_start += size; - } - } - - for (j = 0; j < PORTS_PER_CMPLX; j++) { - if ((i == 4) && (j > 1)) - size = 0; - else - size = cfg[(i*4)+j].iface_fifo_size; + for (i = 0; i < maxports; i++) { + size = cfg[i].iface_fifo_size; reg = ((fifo_xoff_thresh << 25) | ((size & 0x1ff) << 16) | ((cur_iface_start & 0xff) << 8) | - (((i * 4) + j) & 0x1f)); + (i & 0x1f)); nlm_write_nae_reg(nae_base, NAE_IFACE_FIFO_CFG, reg); cur_iface_start += size; } } void -nlm_setup_rx_base_config(uint64_t nae_base, int nblock, +nlm_setup_rx_base_config(uint64_t nae_base, int maxports, struct nae_port_config *cfg) { - uint32_t val, nc; int base = 0; - int i, j; + uint32_t val; + int i; int id; - for (i = 0; i < nblock; i++) { - for (j = 0; j < (PORTS_PER_CMPLX/2); j++) { - base += cfg[(i*4)+(2*j)].num_channels; - base += cfg[(i*4)+(2*j + 1)].num_channels; - } - } - - id = 0x12 + (i * 2); /* RX_IF_BASE_CONFIG0 */ + for (i = 0; i < (maxports/2); i++) { + id = 0x12 + i; /* RX_IF_BASE_CONFIG0 */ - for (j = 0; j < (PORTS_PER_CMPLX/2); j++) { val = (base & 0x3ff); - nc = cfg[(i*4)+(2*j)].num_channels; - base += nc; + base += cfg[(i * 2)].num_channels; val |= ((base & 0x3ff) << 16); - nc = cfg[(i*4)+(2*j + 1)].num_channels; - base += nc; + base += cfg[(i * 2) + 1].num_channels; - nlm_write_nae_reg(nae_base, NAE_REG(7, 0, (id+j)), val); + nlm_write_nae_reg(nae_base, NAE_REG(7, 0, id), val); } } void -nlm_setup_rx_buf_config(uint64_t nae_base, int nblock, +nlm_setup_rx_buf_config(uint64_t nae_base, int maxports, struct nae_port_config *cfg) { uint32_t val; - int i, sz, j, k; + int i, sz, k; int context = 0; int base = 0; - int nc = 0; - for (i = 0; i < nblock; i++) { - for (j = 0; j < PORTS_PER_CMPLX; j++) { - if ((i == 4) && (j > 1)) - nc = 0; - else - nc = cfg[(i*4)+j].num_channels; - for (k = 0; k < nc; k++) { - sz = cfg[(i*4)+j].rxbuf_size; - base += sz; - } - context += nc; - } - } - - for (j = 0; j < PORTS_PER_CMPLX; j++) { - if ((i == 4) && (j > 1)) - nc = 0; - else - nc = cfg[(i*4)+j].num_channels; - for (k = 0; k < nc; k++) { + for (i = 0; i < maxports; i++) { + if (cfg[i].type == UNKNOWN) + continue; + for (k = 0; k < cfg[i].num_channels; k++) { /* write index (context num) */ nlm_write_nae_reg(nae_base, NAE_RXBUF_BASE_DPTH_ADDR, (context+k)); /* write value (rx buf sizes) */ - sz = cfg[(i*4)+j].rxbuf_size; + sz = cfg[i].rxbuf_size; val = 0x80000000 | ((base << 2) & 0x3fff); /* base */ val |= (((sz << 2) & 0x3fff) << 16); /* size */ @@ -362,46 +309,29 @@ nlm_setup_rx_buf_config(uint64_t nae_bas (0x7fffffff & val)); base += sz; } - context += nc; + context += cfg[i].num_channels; } } void -nlm_setup_freein_fifo_cfg(uint64_t nae_base, int nblock, - struct nae_port_config *cfg) +nlm_setup_freein_fifo_cfg(uint64_t nae_base, struct nae_port_config *cfg) { - int size, i, cp = 0; + int size, i; uint32_t reg; - int start = 0; + int start = 0, maxbufpool; - for (cp = 0 ; cp < nblock; cp++ ) { - for (i = 0; i < PORTS_PER_CMPLX; i++) { /* 4 interfaces */ - if ((cp == 4) && (i > 1)) - size = 0; - else { - /* Each entry represents 2 descs; hence division by 2 */ - size = cfg[(cp*4)+i].num_free_descs / 2; - } - if (size == 0) - size = 8; - start += size; - } - } - - for (i = 0; i < PORTS_PER_CMPLX; i++) { /* 4 interfaces */ - if ((cp == 4) && (i > 1)) - size = 0; - else { - /* Each entry represents 2 descs; hence division by 2 */ - size = cfg[(cp*4)+i].num_free_descs / 2; - } + if (nlm_is_xlp8xx()) + maxbufpool = MAX_FREE_FIFO_POOL_8XX; + else + maxbufpool = MAX_FREE_FIFO_POOL_3XX; + for (i = 0; i < maxbufpool; i++) { /* Each entry represents 2 descs; hence division by 2 */ + size = (cfg[i].num_free_descs / 2); if (size == 0) size = 8; - reg = ((size & 0x3ff ) << 20) | /* fcSize */ ((start & 0x1ff) << 8) | /* fcStart */ - (((cp * 4) + i) & 0x1f); + (i & 0x1f); nlm_write_nae_reg(nae_base, NAE_FREE_IN_FIFO_CFG, reg); start += size; Modified: head/sys/mips/nlm/dev/net/xaui.c ============================================================================== --- head/sys/mips/nlm/dev/net/xaui.c Sat Sep 7 16:31:30 2013 (r255367) +++ head/sys/mips/nlm/dev/net/xaui.c Sat Sep 7 18:26:16 2013 (r255368) @@ -211,12 +211,10 @@ nlm_config_xaui(uint64_t nae_base, int n nlm_write_nae_reg(nae_base, XAUI_CONFIG0(nblock), 0); /* Enable tx/rx frame */ - val = 0xF00010A8; + val = 0x000010A8; val |= XAUI_CONFIG_LENCHK; val |= XAUI_CONFIG_GENFCS; val |= XAUI_CONFIG_PAD_64; - val |= XAUI_CONFIG_TFEN; - val |= XAUI_CONFIG_RFEN; nlm_write_nae_reg(nae_base, XAUI_CONFIG1(nblock), val); /* write max frame length */ Modified: head/sys/mips/nlm/dev/net/xlpge.c ============================================================================== --- head/sys/mips/nlm/dev/net/xlpge.c Sat Sep 7 16:31:30 2013 (r255367) +++ head/sys/mips/nlm/dev/net/xlpge.c Sat Sep 7 18:26:16 2013 (r255368) @@ -306,29 +306,12 @@ static int xlpnae_get_maxchannels(struct nlm_xlpnae_softc *sc) { int maxchans = 0; - int i, j, port = 0; + int i; - for (i = 0; i < sc->nblocks; i++) { - switch (sc->cmplx_type[i]) { - case SGMIIC: - for (j = 0; j < 4; j++) { /* 4 ports */ - if ((i == 4) && (j > 1)) - continue; - maxchans += sc->portcfg[port].num_channels; - port++; - } - break; - case XAUIC: - maxchans += sc->portcfg[port].num_channels; - port += 4; - break; - case ILC: - if (((i%2) == 0) && (i != 4)) { - maxchans += sc->portcfg[port].num_channels; - port += 4; - break; - } - } + for (i = 0; i < sc->max_ports; i++) { + if (sc->portcfg[i].type == UNKNOWN) + continue; + maxchans += sc->portcfg[i].num_channels; } return (maxchans); @@ -374,7 +357,7 @@ nlm_setup_interfaces(struct nlm_xlpnae_s uint32_t cur_slot, cur_slot_base; uint32_t cur_flow_base, port, flow_mask; int max_channels; - int i, j, context; + int i, context; cur_slot = 0; cur_slot_base = 0; @@ -386,39 +369,13 @@ nlm_setup_interfaces(struct nlm_xlpnae_s port = 0; context = 0; - for (i = 0; i < sc->nblocks; i++) { - switch (sc->cmplx_type[i]) { - case SGMIIC: - for (j = 0; j < 4; j++) { /* 4 ports */ - if ((i == 4) && (j > 1)) - continue; - nlm_setup_interface(sc, i, port, - cur_flow_base, flow_mask, - max_channels, context); - cur_flow_base += sc->per_port_num_flows; - context += sc->portcfg[port].num_channels; - port++; - } - break; - case XAUIC: - nlm_setup_interface(sc, i, port, cur_flow_base, - flow_mask, max_channels, context); - cur_flow_base += sc->per_port_num_flows; - context += sc->portcfg[port].num_channels; - port += 4; - break; - case ILC: - if (((i%2) == 0) && (i != 4)) { - nlm_setup_interface(sc, i, port, - cur_flow_base, flow_mask, - max_channels, context); - cur_flow_base += sc->per_port_num_flows; - context += sc->portcfg[port].num_channels; - port += 4; - } - break; - } - cur_slot_base++; + for (i = 0; i < sc->max_ports; i++) { + if (sc->portcfg[i].type == UNKNOWN) + continue; + nlm_setup_interface(sc, sc->portcfg[i].block, i, cur_flow_base, + flow_mask, max_channels, context); + cur_flow_base += sc->per_port_num_flows; + context += sc->portcfg[i].num_channels; } } @@ -481,8 +438,6 @@ nlm_xlpnae_init(int node, struct nlm_xlp nlm_setup_interfaces(sc); nlm_config_poe(sc->poe_base, sc->poedv_base); - nlm_xlpnae_print_frin_desc_carving(sc); - if (sc->hw_parser_en) nlm_enable_hardware_parser(nae_base); @@ -530,6 +485,12 @@ nlm_setup_portcfg(struct nlm_xlpnae_soft bp = &(naep->block_ivars[block]); p = &(bp->port_ivars[port & 0x3]); + sc->portcfg[port].node = p->node; + sc->portcfg[port].block = p->block; + sc->portcfg[port].port = p->port; + sc->portcfg[port].type = p->type; + sc->portcfg[port].mdio_bus = p->mdio_bus; + sc->portcfg[port].phy_addr = p->phy_addr; sc->portcfg[port].loopback_mode = p->loopback_mode; sc->portcfg[port].num_channels = p->num_channels; if (p->free_desc_sizes != MCLBYTES) { @@ -584,7 +545,7 @@ nlm_xlpnae_attach(device_t dev) struct nlm_xlpnae_softc *sc; device_t tmpd; uint32_t dv[NUM_WORDS_PER_DV]; - int port, i, j, n, nchan, nblock, node, qstart, qnum; + int port, i, j, nchan, nblock, node, qstart, qnum; int offset, context, txq_base, rxvcbase; uint64_t poe_pcibase, nae_pcibase; @@ -598,6 +559,8 @@ nlm_xlpnae_attach(device_t dev) sc->poe_base = nlm_get_poe_regbase(sc->node); sc->poedv_base = nlm_get_poedv_regbase(sc->node); sc->portcfg = nae_port_config; + sc->blockmask = nae_ivars->blockmask; + sc->ilmask = nae_ivars->ilmask; sc->xauimask = nae_ivars->xauimask; sc->sgmiimask = nae_ivars->sgmiimask; sc->nblocks = nae_ivars->nblocks; @@ -615,9 +578,10 @@ nlm_xlpnae_attach(device_t dev) sc->ncontexts = nlm_read_reg(nae_pcibase, XLP_PCI_DEVINFO_REG5); sc->nucores = nlm_num_uengines(nae_pcibase); - /* Initialize the 1st four complexes from board config */ - for (nblock = 0; nblock < sc->nblocks; nblock++) + for (nblock = 0; nblock < sc->nblocks; nblock++) { sc->cmplx_type[nblock] = nae_ivars->block_ivars[nblock].type; + sc->portmask[nblock] = nae_ivars->block_ivars[nblock].portmask; + } for (i = 0; i < sc->ncontexts; i++) cntx2port[i] = 18; /* 18 is an invalid port */ @@ -627,6 +591,8 @@ nlm_xlpnae_attach(device_t dev) else sc->max_ports = sc->nblocks * PORTS_PER_CMPLX; + for (i = 0; i < sc->max_ports; i++) + sc->portcfg[i].type = UNKNOWN; /* Port Not Present */ /* * Now setup all internal fifo carvings based on * total number of ports in the system @@ -638,13 +604,15 @@ nlm_xlpnae_attach(device_t dev) txq_base = nlm_qidstart(nae_pcibase); rxvcbase = txq_base + sc->ncontexts; for (i = 0; i < sc->nblocks; i++) { - /* only 2 SGMII ports in last complex */ - n = (sc->cmplx_type[i] == SGMIIC && i == 4) ? 2 : 4; - for (j = 0; j < n; j++, port++) { - if (sc->cmplx_type[i] == XAUIC && j != 0) - continue; - if (sc->cmplx_type[i] == ILC && - (i != 0 || i != 2 || j != 0)) + uint32_t portmask; + + if ((nae_ivars->blockmask & (1 << i)) == 0) { + port += 4; + continue; + } + portmask = nae_ivars->block_ivars[i].portmask; + for (j = 0; j < PORTS_PER_CMPLX; j++, port++) { + if ((portmask & (1 << j)) == 0) continue; nlm_setup_portcfg(sc, nae_ivars, i, port); nchan = sc->portcfg[port].num_channels; @@ -687,31 +655,27 @@ nlm_xlpnae_attach(device_t dev) nlm_xlpnae_init(node, sc); - for (i = 0; i < sc->nblocks; i++) { + for (i = 0; i < sc->max_ports; i++) { char desc[32]; - struct xlp_block_ivars *bv; + int block, port; - if ((nae_ivars->blockmask & (1 << i)) == 0) + if (sc->portcfg[i].type == UNKNOWN) continue; - bv = &nae_ivars->block_ivars[i]; - for (j = 0; j < PORTS_PER_CMPLX; j++) { - int port = i * 4 + j; - - if ((bv->portmask & (1 << j)) == 0) - continue; - tmpd = device_add_child(dev, "xlpge", port); - device_set_ivars(tmpd, &(bv->port_ivars[j])); - sprintf(desc, "XLP NAE Port %d,%d", i, j); - device_set_desc_copy(tmpd, desc); - } - - nlm_setup_iface_fifo_cfg(sc->base, i, sc->portcfg); - nlm_setup_rx_base_config(sc->base, i, sc->portcfg); - nlm_setup_rx_buf_config(sc->base, i, sc->portcfg); - nlm_setup_freein_fifo_cfg(sc->base, i, sc->portcfg); - nlm_program_nae_parser_seq_fifo(sc->base, i, sc->portcfg); - } + block = sc->portcfg[i].block; + port = sc->portcfg[i].port; + tmpd = device_add_child(dev, "xlpge", i); + device_set_ivars(tmpd, + &(nae_ivars->block_ivars[block].port_ivars[port])); + sprintf(desc, "XLP NAE Port %d,%d", block, port); + device_set_desc_copy(tmpd, desc); + } + nlm_setup_iface_fifo_cfg(sc->base, sc->max_ports, sc->portcfg); + nlm_setup_rx_base_config(sc->base, sc->max_ports, sc->portcfg); + nlm_setup_rx_buf_config(sc->base, sc->max_ports, sc->portcfg); + nlm_setup_freein_fifo_cfg(sc->base, sc->portcfg); + nlm_program_nae_parser_seq_fifo(sc->base, sc->max_ports, sc->portcfg); + nlm_xlpnae_print_frin_desc_carving(sc); bus_generic_probe(dev); bus_generic_attach(dev); Modified: head/sys/mips/nlm/dev/net/xlpge.h ============================================================================== --- head/sys/mips/nlm/dev/net/xlpge.h Sat Sep 7 16:31:30 2013 (r255367) +++ head/sys/mips/nlm/dev/net/xlpge.h Sat Sep 7 18:26:16 2013 (r255368) @@ -75,6 +75,9 @@ struct nlm_xlpnae_softc { /* NetIOR configs */ u_int cmplx_type[8]; /* XXXJC: redundant? */ struct nae_port_config *portcfg; + u_int blockmask; + u_int portmask[XLP_NAE_NBLOCKS]; + u_int ilmask; u_int xauimask; u_int sgmiimask; u_int hw_parser_en; Modified: head/sys/mips/nlm/hal/nae.h ============================================================================== --- head/sys/mips/nlm/hal/nae.h Sat Sep 7 16:31:30 2013 (r255367) +++ head/sys/mips/nlm/hal/nae.h Sat Sep 7 18:26:16 2013 (r255368) @@ -473,6 +473,9 @@ #define XLP_MAX_PORTS 18 #define XLP_STORM_MAX_PORTS 8 +#define MAX_FREE_FIFO_POOL_8XX 20 +#define MAX_FREE_FIFO_POOL_3XX 9 + #if !defined(LOCORE) && !defined(__ASSEMBLY__) #define nlm_read_nae_reg(b, r) nlm_read_reg_xkphys(b, r) @@ -494,6 +497,7 @@ enum XLPNAE_TX_TYPE { }; enum nblock_type { + UNKNOWN = 0, /* DONT MAKE IT NON-ZERO */ SGMIIC = 1, XAUIC = 2, ILC = 3 @@ -550,6 +554,12 @@ nae_num_context(uint64_t nae_pcibase) /* per port config structure */ struct nae_port_config { + int node; /* node id (quickread) */ + int block; /* network block id (quickread) */ + int port; /* port id - among the 18 in XLP */ + int type; /* port type - see xlp_gmac_port_types */ + int mdio_bus; + int phy_addr; int num_channels; int num_free_descs; int free_desc_sizes; @@ -605,7 +615,7 @@ void nlm_setup_flow_crc_poly(uint64_t, u void nlm_setup_iface_fifo_cfg(uint64_t, int, struct nae_port_config *); void nlm_setup_rx_base_config(uint64_t, int, struct nae_port_config *); void nlm_setup_rx_buf_config(uint64_t, int, struct nae_port_config *); -void nlm_setup_freein_fifo_cfg(uint64_t, int, struct nae_port_config *); +void nlm_setup_freein_fifo_cfg(uint64_t, struct nae_port_config *); int nlm_get_flow_mask(int); void nlm_program_flow_cfg(uint64_t, int, uint32_t, uint32_t); void xlp_ax_nae_lane_reset_txpll(uint64_t, int, int, int); Modified: head/sys/mips/nlm/hal/nlm_hal.c ============================================================================== --- head/sys/mips/nlm/hal/nlm_hal.c Sat Sep 7 16:31:30 2013 (r255367) +++ head/sys/mips/nlm/hal/nlm_hal.c Sat Sep 7 18:26:16 2013 (r255368) @@ -75,7 +75,10 @@ nlm_get_device_frequency(uint64_t sysbas dfsdiv = ((div_val >> (devtype << 2)) & 0xf) + 1; spf = (pllctrl >> 3 & 0x7f) + 1; spr = (pllctrl >> 1 & 0x03) + 1; - extra_div = nlm_is_xlp8xx_ax() ? 1 : 2; + if (devtype == DFS_DEVICE_NAE && !nlm_is_xlp8xx_ax()) + extra_div = 2; + else + extra_div = 1; return ((400 * spf) / (3 * extra_div * spr * dfsdiv)); } Modified: head/sys/mips/nlm/hal/sys.h ============================================================================== --- head/sys/mips/nlm/hal/sys.h Sat Sep 7 16:31:30 2013 (r255367) +++ head/sys/mips/nlm/hal/sys.h Sat Sep 7 18:26:16 2013 (r255368) @@ -95,9 +95,11 @@ #define SYS_UCO_S_ECC 0x38 #define SYS_UCO_M_ECC 0x39 #define SYS_UCO_ADDR 0x3a +#define SYS_PLL_DFS_BYP_CTRL 0x3a /* Bx stepping */ #define SYS_UCO_INSTR 0x3b #define SYS_MEM_BIST0 0x3c #define SYS_MEM_BIST1 0x3d +#define SYS_PLL_DFS_DIV_VALUE 0x3d /* Bx stepping */ #define SYS_MEM_BIST2 0x3e #define SYS_MEM_BIST3 0x3f #define SYS_MEM_BIST4 0x40 From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 18:34:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B9FE4EA4; Sat, 7 Sep 2013 18:34:33 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 40D362DFE; Sat, 7 Sep 2013 18:34:32 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id CD9484BBC; Sat, 7 Sep 2013 18:34:31 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id DC240292A1; Sat, 7 Sep 2013 20:34:34 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Mark Murray Subject: Re: svn commit: r255362 - in head: share/examples/kld share/examples/kld/random_adaptor sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/ubsec sys/kern sys/mips/c... References: <201309071415.r87EFDMv025499@svn.freebsd.org> Date: Sat, 07 Sep 2013 20:34:34 +0200 In-Reply-To: <201309071415.r87EFDMv025499@svn.freebsd.org> (Mark Murray's message of "Sat, 7 Sep 2013 14:15:13 +0000 (UTC)") Message-ID: <86bo44iipx.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 18:34:33 -0000 Mark Murray writes: > Log: > Bring in some behind-the-scenes development, mainly By Arthur Mesh, > the rest by me. >=20=20=20 > o Namespace cleanup; the Yarrow name is now restricted to where it > really applies; this is in anticipation of being augmented or > replaced by Fortuna in the future. Fortuna is mentioned, but behind > #if logic, and is ignorable for now. >=20=20=20 > o The harvest queue is pulled out into its own modules. >=20=20=20 > o Entropy harvesting is emproved, both by being made more conservative, > and by separating (a bit!) the sources. Available entropy crumbs are > marginally improved. >=20=20=20 > o Selection of sources is made clearer. With recent revelations, > this will receive more work in the weeks and months to come. >=20=20=20 > Submitted by: Arthur Mesh (partly) The patch is very large, but almost exclusively structural - code that will be shared between Yarrow and Fortuna and any other entropy mixer we may implement in the future has been renamed and / or moved away from Yarrow. I didn't see anything that deviated from the plan we agreed upon in Cambridge. Several random_harvest() calls have been changed to reduce the entropy estimate - that's a good thing (as long as we don't reduce it to an unusable level, which I don't think is the case). I also see that the network entropy harvesting bug we talked about has been fixed, which is also a good thing. As far as I can tell, these are the only changes which affect the quality of the output. The renaming part made the patch hard to read - IWBNI it had been committed separately, but it didn't kill me. Another factor that reduces readability is that the patch needlessly unfolds previously wrapped lines, e.g. - if (++random_state.outputblocks >=3D - random_state.gengateinterval) { + if (++random_state.outputblocks >=3D random_state.gengateinterval) { which doesn't actually change anything but introduces a style bug and increases the reviewers' workload. In fact, the patch introduces quite a few style bugs (including some that I personally aprove of but bde@ may complain about, such as s/u_char/uint8_t/), but that can be addressed when we get a fresh batch of round tuits. (joking aside - barring an overriding reason, we should strive to always conform to style(9)) In Yarrow, buffer sizes are now consistently referred to by BLOCKSIZE rather than a mix of BLOCKSIZE and (int)sizeof(whatever), which improves code readability at the cost of patch readability. However, it appears that the *meaning* of BLOCKSIZE has changed from bits to bytes, and if I read the code correctly, it used to be 256 bits but is now 128. I dislike the use of "pseudo" in sys/dev/random/pseudo_rng.c since it is easily confused with the P in PRNG and pseudo_rng.c is actually not a PRNG but rather a collection of fake or dummy RNGs for testing purposes. Perhaps s/pseudo/dummy/g would be in order. So, this is a provisional OK from my part. *However*, I did not review the new harvesting queue in detail, and a bug there could, in the worst case, result in all the harvested entropy being discarded and Yarrow receiving kilobyte upon kilobyte of zeroes; so I'd like to get a second opinion. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 18:46:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D277071E; Sat, 7 Sep 2013 18:46:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD11E2E80; Sat, 7 Sep 2013 18:46:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87Ikbpv097230; Sat, 7 Sep 2013 18:46:37 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87IkZeT097217; Sat, 7 Sep 2013 18:46:35 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309071846.r87IkZeT097217@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 7 Sep 2013 18:46:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255369 - in head: contrib/openpam contrib/openpam/bin/openpam_dump_policy contrib/openpam/bin/pamtest contrib/openpam/bin/su contrib/openpam/doc/man contrib/openpam/lib contrib/openpam... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 18:46:37 -0000 Author: des Date: Sat Sep 7 18:46:35 2013 New Revision: 255369 URL: http://svnweb.freebsd.org/changeset/base/255369 Log: MFV (r255364): move the code around in preparation for Nummularia. Added: head/contrib/openpam/lib/libpam/ - copied from r255364, vendor/openpam/dist/lib/libpam/ Deleted: head/contrib/openpam/lib/Makefile.am head/contrib/openpam/lib/Makefile.in head/contrib/openpam/lib/openpam_borrow_cred.c head/contrib/openpam/lib/openpam_check_owner_perms.c head/contrib/openpam/lib/openpam_configure.c head/contrib/openpam/lib/openpam_constants.c head/contrib/openpam/lib/openpam_constants.h head/contrib/openpam/lib/openpam_ctype.h head/contrib/openpam/lib/openpam_debug.h head/contrib/openpam/lib/openpam_dispatch.c head/contrib/openpam/lib/openpam_dynamic.c head/contrib/openpam/lib/openpam_features.c head/contrib/openpam/lib/openpam_features.h head/contrib/openpam/lib/openpam_findenv.c head/contrib/openpam/lib/openpam_free_data.c head/contrib/openpam/lib/openpam_free_envlist.c head/contrib/openpam/lib/openpam_get_feature.c head/contrib/openpam/lib/openpam_get_option.c head/contrib/openpam/lib/openpam_impl.h head/contrib/openpam/lib/openpam_load.c head/contrib/openpam/lib/openpam_log.c head/contrib/openpam/lib/openpam_nullconv.c head/contrib/openpam/lib/openpam_readline.c head/contrib/openpam/lib/openpam_readlinev.c head/contrib/openpam/lib/openpam_readword.c head/contrib/openpam/lib/openpam_restore_cred.c head/contrib/openpam/lib/openpam_set_feature.c head/contrib/openpam/lib/openpam_set_option.c head/contrib/openpam/lib/openpam_static.c head/contrib/openpam/lib/openpam_straddch.c head/contrib/openpam/lib/openpam_strlcat.h head/contrib/openpam/lib/openpam_strlcmp.h head/contrib/openpam/lib/openpam_strlcpy.h head/contrib/openpam/lib/openpam_subst.c head/contrib/openpam/lib/openpam_ttyconv.c head/contrib/openpam/lib/pam_acct_mgmt.c head/contrib/openpam/lib/pam_authenticate.c head/contrib/openpam/lib/pam_authenticate_secondary.c head/contrib/openpam/lib/pam_chauthtok.c head/contrib/openpam/lib/pam_close_session.c head/contrib/openpam/lib/pam_end.c head/contrib/openpam/lib/pam_error.c head/contrib/openpam/lib/pam_get_authtok.c head/contrib/openpam/lib/pam_get_data.c head/contrib/openpam/lib/pam_get_item.c head/contrib/openpam/lib/pam_get_mapped_authtok.c head/contrib/openpam/lib/pam_get_mapped_username.c head/contrib/openpam/lib/pam_get_user.c head/contrib/openpam/lib/pam_getenv.c head/contrib/openpam/lib/pam_getenvlist.c head/contrib/openpam/lib/pam_info.c head/contrib/openpam/lib/pam_open_session.c head/contrib/openpam/lib/pam_prompt.c head/contrib/openpam/lib/pam_putenv.c head/contrib/openpam/lib/pam_set_data.c head/contrib/openpam/lib/pam_set_item.c head/contrib/openpam/lib/pam_set_mapped_authtok.c head/contrib/openpam/lib/pam_set_mapped_username.c head/contrib/openpam/lib/pam_setcred.c head/contrib/openpam/lib/pam_setenv.c head/contrib/openpam/lib/pam_sm_acct_mgmt.c head/contrib/openpam/lib/pam_sm_authenticate.c head/contrib/openpam/lib/pam_sm_authenticate_secondary.c head/contrib/openpam/lib/pam_sm_chauthtok.c head/contrib/openpam/lib/pam_sm_close_session.c head/contrib/openpam/lib/pam_sm_get_mapped_authtok.c head/contrib/openpam/lib/pam_sm_get_mapped_username.c head/contrib/openpam/lib/pam_sm_open_session.c head/contrib/openpam/lib/pam_sm_set_mapped_authtok.c head/contrib/openpam/lib/pam_sm_set_mapped_username.c head/contrib/openpam/lib/pam_sm_setcred.c head/contrib/openpam/lib/pam_start.c head/contrib/openpam/lib/pam_strerror.c head/contrib/openpam/lib/pam_verror.c head/contrib/openpam/lib/pam_vinfo.c head/contrib/openpam/lib/pam_vprompt.c Modified: head/contrib/openpam/Makefile.am head/contrib/openpam/bin/openpam_dump_policy/Makefile.am head/contrib/openpam/bin/pamtest/Makefile.am head/contrib/openpam/bin/su/Makefile.am head/contrib/openpam/configure.ac head/contrib/openpam/doc/man/Makefile.am head/contrib/openpam/modules/pam_deny/Makefile.am head/contrib/openpam/modules/pam_permit/Makefile.am head/contrib/openpam/modules/pam_unix/Makefile.am head/lib/libpam/libpam/Makefile Directory Properties: head/contrib/openpam/ (props changed) Modified: head/contrib/openpam/Makefile.am ============================================================================== --- head/contrib/openpam/Makefile.am Sat Sep 7 18:26:16 2013 (r255368) +++ head/contrib/openpam/Makefile.am Sat Sep 7 18:46:35 2013 (r255369) @@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = lib bin modules include +SUBDIRS = lib/libpam bin modules include if WITH_DOC SUBDIRS += doc Modified: head/contrib/openpam/bin/openpam_dump_policy/Makefile.am ============================================================================== --- head/contrib/openpam/bin/openpam_dump_policy/Makefile.am Sat Sep 7 18:26:16 2013 (r255368) +++ head/contrib/openpam/bin/openpam_dump_policy/Makefile.am Sat Sep 7 18:46:35 2013 (r255369) @@ -1,7 +1,7 @@ # $Id: Makefile.am 538 2012-03-31 17:04:29Z des $ -INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib +INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/libpam noinst_PROGRAMS = openpam_dump_policy openpam_dump_policy_SOURCES = openpam_dump_policy.c -openpam_dump_policy_LDADD = $(top_builddir)/lib/libpam.la +openpam_dump_policy_LDADD = $(top_builddir)/lib/libpam/libpam.la Modified: head/contrib/openpam/bin/pamtest/Makefile.am ============================================================================== --- head/contrib/openpam/bin/pamtest/Makefile.am Sat Sep 7 18:26:16 2013 (r255368) +++ head/contrib/openpam/bin/pamtest/Makefile.am Sat Sep 7 18:46:35 2013 (r255369) @@ -4,6 +4,6 @@ INCLUDES = -I$(top_srcdir)/include bin_PROGRAMS = pamtest pamtest_SOURCES = pamtest.c -pamtest_LDADD = $(top_builddir)/lib/libpam.la +pamtest_LDADD = $(top_builddir)/lib/libpam/libpam.la dist_man1_MANS = pamtest.1 Modified: head/contrib/openpam/bin/su/Makefile.am ============================================================================== --- head/contrib/openpam/bin/su/Makefile.am Sat Sep 7 18:26:16 2013 (r255368) +++ head/contrib/openpam/bin/su/Makefile.am Sat Sep 7 18:46:35 2013 (r255369) @@ -4,6 +4,6 @@ INCLUDES = -I$(top_srcdir)/include bin_PROGRAMS = su su_SOURCES = su.c -su_LDADD = $(top_builddir)/lib/libpam.la +su_LDADD = $(top_builddir)/lib/libpam/libpam.la dist_man1_MANS = su.1 Modified: head/contrib/openpam/configure.ac ============================================================================== --- head/contrib/openpam/configure.ac Sat Sep 7 18:26:16 2013 (r255368) +++ head/contrib/openpam/configure.ac Sat Sep 7 18:46:35 2013 (r255369) @@ -3,7 +3,7 @@ dnl $Id: configure.ac 610 2012-05-26 14: AC_PREREQ([2.62]) AC_REVISION([$Id: configure.ac 610 2012-05-26 14:03:45Z des $]) AC_INIT([OpenPAM], [20120526], [des@des.no]) -AC_CONFIG_SRCDIR([lib/pam_start.c]) +AC_CONFIG_SRCDIR([lib/libpam/pam_start.c]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign]) AM_CONFIG_HEADER([config.h]) @@ -119,7 +119,7 @@ AC_CONFIG_FILES([ doc/man/Makefile include/Makefile include/security/Makefile - lib/Makefile + lib/libpam/Makefile modules/Makefile modules/pam_deny/Makefile modules/pam_permit/Makefile Modified: head/contrib/openpam/doc/man/Makefile.am ============================================================================== --- head/contrib/openpam/doc/man/Makefile.am Sat Sep 7 18:26:16 2013 (r255368) +++ head/contrib/openpam/doc/man/Makefile.am Sat Sep 7 18:46:35 2013 (r255369) @@ -73,7 +73,7 @@ CLEANFILES = $(ALLCMAN) openpam.3 pam.3 GENDOC = $(top_srcdir)/misc/gendoc.pl -LIBSRCDIR = $(top_srcdir)/lib +LIBSRCDIR = $(top_srcdir)/lib/libpam VPATH = $(LIBSRCDIR) $(srcdir) Modified: head/contrib/openpam/modules/pam_deny/Makefile.am ============================================================================== --- head/contrib/openpam/modules/pam_deny/Makefile.am Sat Sep 7 18:26:16 2013 (r255368) +++ head/contrib/openpam/modules/pam_deny/Makefile.am Sat Sep 7 18:46:35 2013 (r255369) @@ -7,4 +7,4 @@ pkglib_LTLIBRARIES = pam_deny.la pam_deny_la_SOURCES = pam_deny.c pam_deny_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@ -pam_deny_la_LIBADD = $(top_builddir)/lib/libpam.la +pam_deny_la_LIBADD = $(top_builddir)/lib/libpam/libpam.la Modified: head/contrib/openpam/modules/pam_permit/Makefile.am ============================================================================== --- head/contrib/openpam/modules/pam_permit/Makefile.am Sat Sep 7 18:26:16 2013 (r255368) +++ head/contrib/openpam/modules/pam_permit/Makefile.am Sat Sep 7 18:46:35 2013 (r255369) @@ -7,4 +7,4 @@ pkglib_LTLIBRARIES = pam_permit.la pam_permit_la_SOURCES = pam_permit.c pam_permit_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@ -pam_permit_la_LIBADD = $(top_builddir)/lib/libpam.la +pam_permit_la_LIBADD = $(top_builddir)/lib/libpam/libpam.la Modified: head/contrib/openpam/modules/pam_unix/Makefile.am ============================================================================== --- head/contrib/openpam/modules/pam_unix/Makefile.am Sat Sep 7 18:26:16 2013 (r255368) +++ head/contrib/openpam/modules/pam_unix/Makefile.am Sat Sep 7 18:46:35 2013 (r255369) @@ -8,5 +8,5 @@ pkglib_LTLIBRARIES = pam_unix.la pam_unix_la_SOURCES = pam_unix.c pam_unix_la_LDFLAGS = -no-undefined -module -version-info @LIB_MAJ@ -pam_unix_la_LIBADD = $(top_builddir)/lib/libpam.la @CRYPT_LIBS@ +pam_unix_la_LIBADD = $(top_builddir)/lib/libpam/libpam.la @CRYPT_LIBS@ endif Modified: head/lib/libpam/libpam/Makefile ============================================================================== --- head/lib/libpam/libpam/Makefile Sat Sep 7 18:26:16 2013 (r255368) +++ head/lib/libpam/libpam/Makefile Sat Sep 7 18:46:35 2013 (r255369) @@ -36,7 +36,7 @@ # $FreeBSD$ OPENPAM= ${.CURDIR}/../../../contrib/openpam -.PATH: ${OPENPAM}/include ${OPENPAM}/lib ${OPENPAM}/doc/man +.PATH: ${OPENPAM}/include ${OPENPAM}/lib/libpam ${OPENPAM}/doc/man LIB= pam NO_PROFILE= From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 18:48:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D5068859; Sat, 7 Sep 2013 18:48:15 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B374D2E87; Sat, 7 Sep 2013 18:48:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87ImF53097820; Sat, 7 Sep 2013 18:48:15 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87ImFXl097806; Sat, 7 Sep 2013 18:48:15 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201309071848.r87ImFXl097806@svn.freebsd.org> From: Luiz Otavio O Souza Date: Sat, 7 Sep 2013 18:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255370 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 18:48:15 -0000 Author: loos Date: Sat Sep 7 18:48:15 2013 New Revision: 255370 URL: http://svnweb.freebsd.org/changeset/base/255370 Log: Export a function to allow BCM2835's peripheral devices to enable their altenate pin function (from GPIO pins) as needed. Approved by: adrian (mentor) Added: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.h (contents, props changed) Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Sep 7 18:46:35 2013 (r255369) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Sep 7 18:48:15 2013 (r255370) @@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "gpio_if.h" #undef DEBUG @@ -87,17 +89,6 @@ struct bcm_gpio_softc { struct bcm_gpio_sysctl sc_sysctl[BCM_GPIO_PINS]; }; -enum bcm_gpio_fsel { - BCM_GPIO_INPUT, - BCM_GPIO_OUTPUT, - BCM_GPIO_ALT5, - BCM_GPIO_ALT4, - BCM_GPIO_ALT0, - BCM_GPIO_ALT1, - BCM_GPIO_ALT2, - BCM_GPIO_ALT3, -}; - enum bcm_gpio_pud { BCM_GPIO_NONE, BCM_GPIO_PULLDOWN, @@ -257,6 +248,32 @@ bcm_gpio_set_pud(struct bcm_gpio_softc * BCM_GPIO_WRITE(sc, BCM_GPIO_GPPUDCLK(bank), 0); } +void +bcm_gpio_set_alternate(device_t dev, uint32_t pin, uint32_t nfunc) +{ + struct bcm_gpio_softc *sc; + int i; + + sc = device_get_softc(dev); + BCM_GPIO_LOCK(sc); + + /* Disable pull-up or pull-down on pin. */ + bcm_gpio_set_pud(sc, pin, BCM_GPIO_NONE); + + /* And now set the pin function. */ + bcm_gpio_set_function(sc, pin, nfunc); + + /* Update the pin flags. */ + for (i = 0; i < sc->sc_gpio_npins; i++) { + if (sc->sc_gpio_pins[i].gp_pin == pin) + break; + } + if (i < sc->sc_gpio_npins) + sc->sc_gpio_pins[i].gp_flags = bcm_gpio_func_flag(nfunc); + + BCM_GPIO_UNLOCK(sc); +} + static void bcm_gpio_pin_configure(struct bcm_gpio_softc *sc, struct gpio_pin *pin, unsigned int flags) @@ -535,7 +552,7 @@ bcm_gpio_func_proc(SYSCTL_HANDLER_ARGS) struct bcm_gpio_softc *sc; struct bcm_gpio_sysctl *sc_sysctl; uint32_t nfunc; - int i, error; + int error; sc_sysctl = arg1; sc = sc_sysctl->sc; @@ -552,23 +569,8 @@ bcm_gpio_func_proc(SYSCTL_HANDLER_ARGS) if (bcm_gpio_str_func(buf, &nfunc) != 0) return (EINVAL); - BCM_GPIO_LOCK(sc); - - /* Disable pull-up or pull-down on pin. */ - bcm_gpio_set_pud(sc, sc_sysctl->pin, BCM_GPIO_NONE); - - /* And now set the pin function. */ - bcm_gpio_set_function(sc, sc_sysctl->pin, nfunc); - - /* Update the pin flags. */ - for (i = 0; i < sc->sc_gpio_npins; i++) { - if (sc->sc_gpio_pins[i].gp_pin == sc_sysctl->pin) - break; - } - if (i < sc->sc_gpio_npins) - sc->sc_gpio_pins[i].gp_flags = bcm_gpio_func_flag(nfunc); - - BCM_GPIO_UNLOCK(sc); + /* Update the pin alternate function. */ + bcm_gpio_set_alternate(sc->sc_dev, sc_sysctl->pin, nfunc); return (0); } Added: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.h Sat Sep 7 18:48:15 2013 (r255370) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2013 Oleksandr Tymoshenko + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _BCM2835_GPIO_H_ +#define _BCM2835_GPIO_H_ + +enum bcm_gpio_fsel { + BCM_GPIO_INPUT, + BCM_GPIO_OUTPUT, + BCM_GPIO_ALT5, + BCM_GPIO_ALT4, + BCM_GPIO_ALT0, + BCM_GPIO_ALT1, + BCM_GPIO_ALT2, + BCM_GPIO_ALT3, +}; + +void bcm_gpio_set_alternate(device_t, uint32_t, uint32_t); + +#endif /* _BCM2835_GPIO_H_ */ From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 18:52:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A36C4AC1; Sat, 7 Sep 2013 18:52:27 +0000 (UTC) (envelope-from mark@grondar.org) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6566C2ECD; Sat, 7 Sep 2013 18:52:27 +0000 (UTC) Received: from graveyard.grondar.org ([88.96.155.33] helo=gronkulator.grondar.org) by gromit.grondar.org with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VINcN-000Dhu-GC; Sat, 07 Sep 2013 19:52:25 +0100 Subject: Re: svn commit: r255362 - in head: share/examples/kld share/examples/kld/random_adaptor sys/conf sys/dev/glxsb sys/dev/hifn sys/dev/random sys/dev/rndtest sys/dev/safe sys/dev/ubsec sys/kern sys/mips/c... Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: multipart/signed; boundary="Apple-Mail=_3CD6B1A5-89CE-46A0-A6F9-909AFB43C969"; protocol="application/pgp-signature"; micalg=pgp-sha512 From: Mark R V Murray In-Reply-To: <86bo44iipx.fsf@nine.des.no> Date: Sat, 7 Sep 2013 19:52:22 +0100 Message-Id: References: <201309071415.r87EFDMv025499@svn.freebsd.org> <86bo44iipx.fsf@nine.des.no> To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-Mailer: Apple Mail (2.1508) X-SA-Score: -2.2 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mark Murray X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 18:52:27 -0000 --Apple-Mail=_3CD6B1A5-89CE-46A0-A6F9-909AFB43C969 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 7 Sep 2013, at 19:34, Dag-Erling Sm=F8rgrav wrote: > I didn't see anything that deviated from the plan we agreed upon in > Cambridge. That was the idea! :-D > Several random_harvest() calls have been changed to reduce the entropy > estimate - that's a good thing (as long as we don't reduce it to an > unusable level, which I don't think is the case). I also see that the > network entropy harvesting bug we talked about has been fixed, which = is > also a good thing. As far as I can tell, these are the only changes > which affect the quality of the output. Indeed. > The renaming part made the patch hard to read - IWBNI it had been > committed separately, but it didn't kill me. Another factor that > reduces readability is that the patch needlessly unfolds > previously wrapped lines, e.g. >=20 > - if (++random_state.outputblocks >=3D > - random_state.gengateinterval) { > + if (++random_state.outputblocks >=3D = random_state.gengateinterval) { >=20 > which doesn't actually change anything but introduces a style bug and > increases the reviewers' workload. In fact, the patch introduces = quite > a few style bugs (including some that I personally aprove of but bde@ > may complain about, such as s/u_char/uint8_t/), but that can be > addressed when we get a fresh batch of round tuts. Apologies for making your life hard; that was unintended. I'll be = working on this code some more; I'll fix those long lines then. > (joking aside - barring an overriding reason, we should strive to = always > conform to style(9)) Indeed; while this may not be a perfect lurch in that direction, the = uintN_t changes were a style(9) nod. > In Yarrow, buffer sizes are now consistently referred to by BLOCKSIZE > rather than a mix of BLOCKSIZE and (int)sizeof(whatever), which = improves > code readability at the cost of patch readability. However, it = appears > that the *meaning* of BLOCKSIZE has changed from bits to bytes, and if = I > read the code correctly, it used to be 256 bits but is now 128. Correct; it was a mess and I tidied it up. Having 256-bit blocks bought us nothing; the intent is to use the natural key and block sizes of the AES and SHA256 building-blocks. > I dislike the use of "pseudo" in sys/dev/random/pseudo_rng.c since it = is > easily confused with the P in PRNG and pseudo_rng.c is actually not a > PRNG but rather a collection of fake or dummy RNGs for testing = purposes. > Perhaps s/pseudo/dummy/g would be in order. Good point. I'll do that. > So, this is a provisional OK from my part. *However*, I did not = review > the new harvesting queue in detail, and a bug there could, in the = worst > case, result in all the harvested entropy being discarded and Yarrow > receiving kilobyte upon kilobyte of zeroes; so I'd like to get a = second > opinion. Of course! M --=20 Mark R V Murray --Apple-Mail=_3CD6B1A5-89CE-46A0-A6F9-909AFB43C969 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) Comment: GPGTools - http://gpgtools.org iQCVAwUBUit15t58vKOKE6LNAQpZDgP9HYhprygJEJAW1vLDcW3HXaa/xBgtwdwv nqUK10AAm9ak9DnrxLWFlNzG91Wh+npq71aNHMo2nCyTv+Q8ytVWttniDPYSNTw5 orpi7ShdVd2+RzKiK/JRyYpQ3FWBIiMuLsIyL66/SjIyMwK7z53SlCLsEVxPds4R z8wPryWtmA4= =HoEg -----END PGP SIGNATURE----- --Apple-Mail=_3CD6B1A5-89CE-46A0-A6F9-909AFB43C969-- From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 18:55:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A4EBEC18; Sat, 7 Sep 2013 18:55:53 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 78EE12EDE; Sat, 7 Sep 2013 18:55:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87Itrph002946; Sat, 7 Sep 2013 18:55:53 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87ItrlP002945; Sat, 7 Sep 2013 18:55:53 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309071855.r87ItrlP002945@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 7 Sep 2013 18:55:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255371 - head/contrib/openpam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 18:55:53 -0000 Author: des Date: Sat Sep 7 18:55:52 2013 New Revision: 255371 URL: http://svnweb.freebsd.org/changeset/base/255371 Log: This was a good idea that never went anywhere. Deleted: head/contrib/openpam/FREEBSD-vendor From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 19:03:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4BA2DFC0; Sat, 7 Sep 2013 19:03:17 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 397802F4C; Sat, 7 Sep 2013 19:03:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87J3HuL007919; Sat, 7 Sep 2013 19:03:17 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87J3H53007918; Sat, 7 Sep 2013 19:03:17 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309071903.r87J3H53007918@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 7 Sep 2013 19:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255372 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 19:03:17 -0000 Author: pjd Date: Sat Sep 7 19:03:16 2013 New Revision: 255372 URL: http://svnweb.freebsd.org/changeset/base/255372 Log: Fix panic in cap_rights_is_valid() when invalid rights are provided - the right_to_index() function should assert correctness in this case. Improve other assertions. Reported by: pho Tested by: pho Modified: head/sys/kern/subr_capability.c Modified: head/sys/kern/subr_capability.c ============================================================================== --- head/sys/kern/subr_capability.c Sat Sep 7 18:55:52 2013 (r255371) +++ head/sys/kern/subr_capability.c Sat Sep 7 19:03:16 2013 (r255372) @@ -51,7 +51,10 @@ __FBSDID("$FreeBSD$"); #define assert(exp) KASSERT((exp), ("%s:%u", __func__, __LINE__)) #endif -static __inline unsigned int +#define CAPARSIZE_MIN (CAP_RIGHTS_VERSION_00 + 2) +#define CAPARSIZE_MAX (CAP_RIGHTS_VERSION + 2) + +static __inline int right_to_index(uint64_t right) { static const int bit2idx[] = { @@ -61,23 +64,20 @@ right_to_index(uint64_t right) int idx; idx = CAPIDXBIT(right); - assert(idx == 1 || idx == 2 || idx == 4 || idx == 8 || idx == 16); - - idx = bit2idx[idx]; - assert(idx >= 0 && idx <= 4); - - return ((unsigned int)idx); + assert(idx >= 0 && idx < sizeof(bit2idx) / sizeof(bit2idx[0])); + return (bit2idx[idx]); } static void cap_rights_vset(cap_rights_t *rights, va_list ap) { - unsigned int i, n; uint64_t right; + int i, n; assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00); n = CAPARSIZE(rights); + assert(n >= CAPARSIZE_MIN && n <= CAPARSIZE_MAX); for (;;) { right = (uint64_t)va_arg(ap, unsigned long long); @@ -85,6 +85,7 @@ cap_rights_vset(cap_rights_t *rights, va break; assert(CAPRVER(right) == 0); i = right_to_index(right); + assert(i >= 0); assert(i < n); assert(CAPIDXBIT(rights->cr_rights[i]) == CAPIDXBIT(right)); rights->cr_rights[i] |= right; @@ -95,12 +96,13 @@ cap_rights_vset(cap_rights_t *rights, va static void cap_rights_vclear(cap_rights_t *rights, va_list ap) { - unsigned int i, n; uint64_t right; + int i, n; assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00); n = CAPARSIZE(rights); + assert(n >= CAPARSIZE_MIN && n <= CAPARSIZE_MAX); for (;;) { right = (uint64_t)va_arg(ap, unsigned long long); @@ -108,6 +110,7 @@ cap_rights_vclear(cap_rights_t *rights, break; assert(CAPRVER(right) == 0); i = right_to_index(right); + assert(i >= 0); assert(i < n); assert(CAPIDXBIT(rights->cr_rights[i]) == CAPIDXBIT(right)); rights->cr_rights[i] &= ~(right & 0x01FFFFFFFFFFFFFFULL); @@ -118,12 +121,13 @@ cap_rights_vclear(cap_rights_t *rights, static bool cap_rights_is_vset(const cap_rights_t *rights, va_list ap) { - unsigned int i, n; uint64_t right; + int i, n; assert(CAPVER(rights) == CAP_RIGHTS_VERSION_00); n = CAPARSIZE(rights); + assert(n >= CAPARSIZE_MIN && n <= CAPARSIZE_MAX); for (;;) { right = (uint64_t)va_arg(ap, unsigned long long); @@ -131,6 +135,7 @@ cap_rights_is_vset(const cap_rights_t *r break; assert(CAPRVER(right) == 0); i = right_to_index(right); + assert(i >= 0); assert(i < n); assert(CAPIDXBIT(rights->cr_rights[i]) == CAPIDXBIT(right)); if ((rights->cr_rights[i] & right) != right) @@ -149,6 +154,7 @@ __cap_rights_init(int version, cap_right assert(version == CAP_RIGHTS_VERSION_00); n = version + 2; + assert(n >= CAPARSIZE_MIN && n <= CAPARSIZE_MAX); memset(rights->cr_rights, 0, sizeof(rights->cr_rights[0]) * n); CAP_NONE(rights); va_start(ap, rights); @@ -201,10 +207,14 @@ bool cap_rights_is_valid(const cap_rights_t *rights) { cap_rights_t allrights; - unsigned int i, j; + int i, j; if (CAPVER(rights) != CAP_RIGHTS_VERSION_00) return (false); + if (CAPARSIZE(rights) < CAPARSIZE_MIN || + CAPARSIZE(rights) > CAPARSIZE_MAX) { + return (false); + } CAP_ALL(&allrights); if (!cap_rights_contains(&allrights, rights)) return (false); @@ -233,6 +243,7 @@ cap_rights_merge(cap_rights_t *dst, cons assert(cap_rights_is_valid(dst)); n = CAPARSIZE(dst); + assert(n >= CAPARSIZE_MIN && n <= CAPARSIZE_MAX); for (i = 0; i < n; i++) dst->cr_rights[i] |= src->cr_rights[i]; @@ -253,6 +264,7 @@ cap_rights_remove(cap_rights_t *dst, con assert(cap_rights_is_valid(dst)); n = CAPARSIZE(dst); + assert(n >= CAPARSIZE_MIN && n <= CAPARSIZE_MAX); for (i = 0; i < n; i++) { dst->cr_rights[i] &= @@ -273,6 +285,7 @@ cap_rights_contains(const cap_rights_t * assert(CAPVER(big) == CAPVER(little)); n = CAPARSIZE(big); + assert(n >= CAPARSIZE_MIN && n <= CAPARSIZE_MAX); for (i = 0; i < n; i++) { if ((big->cr_rights[i] & little->cr_rights[i]) != From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 19:04:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ED2D1186; Sat, 7 Sep 2013 19:04:28 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA2E02F53; Sat, 7 Sep 2013 19:04:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87J4S9m008608; Sat, 7 Sep 2013 19:04:28 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87J4SpB008607; Sat, 7 Sep 2013 19:04:28 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201309071904.r87J4SpB008607@svn.freebsd.org> From: Antoine Brodin Date: Sat, 7 Sep 2013 19:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255373 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 19:04:29 -0000 Author: antoine Date: Sat Sep 7 19:04:28 2013 New Revision: 255373 URL: http://svnweb.freebsd.org/changeset/base/255373 Log: Adjust optional obsolete files with new MK_GNUCXX Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Sep 7 19:03:16 2013 (r255372) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Sep 7 19:04:28 2013 (r255373) @@ -900,6 +900,11 @@ OLD_FILES+=usr/bin/CC OLD_FILES+=usr/bin/c++ OLD_FILES+=usr/bin/c++filt OLD_FILES+=usr/bin/g++ +OLD_FILES+=usr/libexec/cc1plus +.endif + +.if ${MK_GNUCXX} == no +OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/include/c++/4.2/algorithm OLD_FILES+=usr/include/c++/4.2/backward/algo.h OLD_FILES+=usr/include/c++/4.2/backward/algobase.h @@ -1455,12 +1460,23 @@ OLD_FILES+=usr/include/c++/4.2/utility OLD_FILES+=usr/include/c++/4.2/valarray OLD_FILES+=usr/include/c++/4.2/vector OLD_FILES+=usr/lib/libstdc++.a -# Keep libs to allow bootstrapping g++(1) with gperf(1) -#OLD_LIBS+=usr/lib/libstdc++.so -#OLD_LIBS+=usr/lib/libstdc++.so.6 +OLD_FILES+=usr/lib/libstdc++.so +OLD_LIBS+=usr/lib/libstdc++.so.6 OLD_FILES+=usr/lib/libstdc++_p.a OLD_FILES+=usr/lib/libsupc++.a +OLD_FILES+=usr/lib/libsupc++.so +OLD_LIBS+=usr/lib/libsupc++.so.1 OLD_FILES+=usr/lib/libsupc++_p.a +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" +OLD_FILES+=usr/lib32/libstdc++.a +OLD_FILES+=usr/lib32/libstdc++.so +OLD_LIBS+=usr/lib32/libstdc++.so.6 +OLD_FILES+=usr/lib32/libstdc++_p.a +OLD_FILES+=usr/lib32/libsupc++.a +OLD_FILES+=usr/lib32/libsupc++.so +OLD_LIBS+=usr/lib32/libsupc++.so.1 +OLD_FILES+=usr/lib32/libsupc++_p.a +.endif OLD_FILES+=usr/libexec/cc1plus .endif From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 19:09:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 95FAA2E8; Sat, 7 Sep 2013 19:09:14 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id 2A6A32F68; Sat, 7 Sep 2013 19:09:14 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1VINuf-00067x-SI; Sat, 07 Sep 2013 23:11:17 +0400 Date: Sat, 7 Sep 2013 23:11:17 +0400 From: Slawa Olhovchenkov To: Adrian Chadd Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Message-ID: <20130907191117.GC3796@zxy.spb.ru> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="XOIedfhf+7KOe/yw" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 19:09:14 -0000 --XOIedfhf+7KOe/yw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Sep 07, 2013 at 10:47:07AM -0700, Adrian Chadd wrote: > I'll be happy if someone does this right now, by populating a > /boot/loader.modules or something, and then force the "fixing" of loader to > cache metadata to make the reads faster. Some very, very old devices don't exist as modules. This SCSI controllers (ISA-only?). I just drop this. device adv # Advansys SCSI adapters device adw # Advansys wide SCSI adapters device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. device bt # Buslogic/Mylex MultiMaster SCSI adapters This 10Mbit network cards. I just drop this. device cs # Crystal Semiconductor CS89x0 NIC device ex # Intel EtherExpress Pro/10 and Pro/10+ device ep # Etherlink III based cards device fe # Fujitsu MB8696x based cards device xe # Xircom pccard Ethernet I attached my kernel config. My loader.conf. Not all modules from GENERIC present. I can write loader.conf with full list of modules from GENERIC kernel. zfs_load="YES" procfs_load="yes" pseudofs_load="yes" sysvmsg_load="yes" sysvsem_load="yes" sysvshm_load="yes" geom_part_gpt_load="yes" geom_label_load="yes" geom_raid_load="yes" ufs_load="yes" cpufreq_load="yes" ahci_load="yes" ata_load="yes" kbdmux_load="yes" agp_load="yes" uart_load="yes" lpt_load="yes" ppi_load="yes" puc_load="yes" random_load="yes" pty_load="yes" uhci_load="yes" ohci_load="yes" ehci_load="yes" xhci_load="yes" ukbd_load="yes" umass_load="yes" ums_load="yes" virtio_pci_load="yes" if_vtnet_load="yes" if_re_load="yes" if_em_load="yes" # NFS Client nfssvc_load="yes" nfscommon_load="yes" nfslock_load="yes" nfscl_load="yes" kgssapi_krb5_load="yes" nfslockd_load="yes" lockstat_load="yes" # > On 7 September 2013 10:07, Slawa Olhovchenkov wrote: > > > On Sat, Sep 07, 2013 at 11:52:42AM -0500, Bryan Venteicher wrote: > > > > > On Sat, Sep 7, 2013 at 3:17 AM, Slawa Olhovchenkov > > wrote: > > > > > > > On Fri, Sep 06, 2013 at 03:46:11PM -0500, Bryan Venteicher wrote: > > > > > > > > > On Fri, Sep 6, 2013 at 3:24 PM, Bryan Venteicher > > > > > > wrote: > > > > > > > > > > > Author: bryanv > > > > > > Date: Fri Sep 6 20:24:21 2013 > > > > > > New Revision: 255323 > > > > > > URL: http://svnweb.freebsd.org/changeset/base/255323 > > > > > > > > > > > > Log: > > > > > > Add vmx device to the i386 and amd64 NOTES files > > > > > > > > > > > > > > > > > FWIW - I'm on the fence about adding vmx to GENERIC for 10.0. IIRC, > > > > > VMware's vmxnet3 driver returns BUS_PROBE_VENDOR so the two drivers > > > > should > > > > > coexist. This is assuming VMware updates the driver for 10 ... which > > I'm > > > > > guessing isn't likely and was a large reason I added this driver in > > the > > > > > first place. > > > > > > > > Why we don't switch (in 10.0) to minimal GENERIC and all driver loaded > > > > as modules (/boot/loader.conf)? This is reduce memory (by easy > > unloading > > > > unneed > > > > drivers/modules), space (by reducing GENERIC+symbols size about 100M), > > > > space on install media too (100M + compressed 100M), build time (not > > > > need to build some modules twice) and add ability to easy > > > > update/bugfix modules w/o reboot. > > > > > > > > After last updates to bootloader loading many modules enought fast. > > > > > > > I already switched (for me) to this setup and it's fine for me. > > > > > > > > > > The holy grail would be for the loader to automatically detect and load > > > what is needed/supported, but this has been talked and beaten to death in > > > the past. > > > > No-no, not automatically detect. Just load all bundle of modules, > > cureently staticly compiled in GENERIC as individual modules. > > Just /boot/loader.conf of 100 lines module_load="yes". > > --XOIedfhf+7KOe/yw Content-Type: text/plain; charset=us-ascii; name=MODULAR Content-Disposition: attachment; filename=MODULAR # # GENERIC -- Generic kernel configuration file for FreeBSD/amd64 # # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the # FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the # latest information. # # An exhaustive list of options and more detailed explanations of the # device lines is also present in the ../../conf/NOTES and NOTES files. # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # # $FreeBSD: releng/9.2/sys/amd64/conf/GENERIC 253860 2013-08-01 13:18:47Z marius $ cpu HAMMER ident MODULAR makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options TCP_OFFLOAD # TCP offload options SCTP # Stream Control Transmission Protocol options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device options NFS_ROOT # NFS usable as /, requires NFSCL options COMPAT_FREEBSD32 # Compatible with i386 binaries options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 options COMPAT_FREEBSD7 # Compatible with FreeBSD7 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks options INCLUDE_CONFIG_FILE # Include this file in kernel options KDB # Kernel debugger related code options KDB_TRACE # Print a stack trace for a panic options DDB_CTF # kernel ELF linker loads CTF data # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel # Bus support. device acpi device pci # ATA controllers options ATA_CAM # Handle legacy controllers with CAM options ATA_STATIC_ID # Static device numbering # SCSI Controllers options AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~128k to driver. options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~215k to driver. # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard device psm # PS/2 mouse device vga # VGA video card driver options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support # syscons is the default console driver, resembling an SCO console device sc options SC_PIXEL_MODE # add support for the raster text mode options ENABLE_ALART # Control alarm on Intel intpm driver options VGA_WIDTH90 # support 90 column modes # Wireless NIC cards options IEEE80211_DEBUG # enable debug msgs options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's options IEEE80211_SUPPORT_MESH # enable 802.11s draft support options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors options ATH_DEBUG options ATH_DIAGAPI options ATH_ENABLE_DFS options ATH_ENABLE_11N # Pseudo devices. device loop # Network loopback options PADLOCK_RNG # VIA Padlock RNG options RDRAND_RNG # Intel Bull Mountain RNG device ether # Ethernet support # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter # USB support options USB_DEBUG # enable debug msgs --XOIedfhf+7KOe/yw-- From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 19:14:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D044C895; Sat, 7 Sep 2013 19:14:54 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-qe0-x231.google.com (mail-qe0-x231.google.com [IPv6:2607:f8b0:400d:c02::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 491D22FE3; Sat, 7 Sep 2013 19:14:54 +0000 (UTC) Received: by mail-qe0-f49.google.com with SMTP id s14so1581274qeb.22 for ; Sat, 07 Sep 2013 12:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IHvWouv4YHV1p6eLrrWk53+FFkSe94GCXjKaFru8rLQ=; b=qjGdWn3TflRXRXiKL/E/HJENud4AFsPgFWljz5aaVWUxoczHdv8HBe9DWsyBta+Zto toVeb4ueP2TAQv+mT3sawRDf6gVFNvnKn+V+Ai5i8gJysgUqYOp4KFyZLTgSjgd0JbES 0D+bGUHWKPraYv4ThysRVEDaAWwG1ThN94GLZLXRKckS90pNo6N7DE/G1udeW9/jybo1 bevMIhVhOWGja0IJHmoJNI/6KL4Ytm9jMhpJTlzA+6dmaEP/WROWs6y+Q8Hu4iOr4JEr BrI9SOYVFdk0ueigrM+rRkz8SB5EKoNMHGK2bCaFx1jeJBK4ho/r9L/R4vaI9Hs+ldmV Zp8A== MIME-Version: 1.0 X-Received: by 10.229.47.71 with SMTP id m7mr32095qcf.25.1378581293086; Sat, 07 Sep 2013 12:14:53 -0700 (PDT) Received: by 10.49.14.225 with HTTP; Sat, 7 Sep 2013 12:14:53 -0700 (PDT) In-Reply-To: <20130907191117.GC3796@zxy.spb.ru> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907191117.GC3796@zxy.spb.ru> Date: Sat, 7 Sep 2013 15:14:53 -0400 Message-ID: Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf From: Benjamin Kaduk To: Slawa Olhovchenkov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , Bryan Venteicher , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 19:14:55 -0000 On Sat, Sep 7, 2013 at 3:11 PM, Slawa Olhovchenkov wrote: > On Sat, Sep 07, 2013 at 10:47:07AM -0700, Adrian Chadd wrote: > > > I'll be happy if someone does this right now, by populating a > > /boot/loader.modules or something, and then force the "fixing" of loader > to > > cache metadata to make the reads faster. > > Some very, very old devices don't exist as modules. > This SCSI controllers (ISA-only?). I just drop this. > I think you're missing the point. Right now, loading modules from the loader is supposed to be painfully slow, at least in many situations. dougb (IIRC) added the kld_list rc.conf variable so that modules could be loaded once the machine is up, which proceeds at a much more reasonable pace. This seems to be what Adrian is alluding to with '"fixing" of loader to cache metadata to make the reads faster'. -Ben Kaduk From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 19:16:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3E8759D9; Sat, 7 Sep 2013 19:16:03 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 128912FEE; Sat, 7 Sep 2013 19:16:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87JG2QJ015659; Sat, 7 Sep 2013 19:16:02 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87JG2rX015658; Sat, 7 Sep 2013 19:16:02 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201309071916.r87JG2rX015658@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 7 Sep 2013 19:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255374 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 19:16:03 -0000 Author: pjd Date: Sat Sep 7 19:16:02 2013 New Revision: 255374 URL: http://svnweb.freebsd.org/changeset/base/255374 Log: Sort properly. Modified: head/sys/kern/capabilities.conf Modified: head/sys/kern/capabilities.conf ============================================================================== --- head/sys/kern/capabilities.conf Sat Sep 7 19:04:28 2013 (r255373) +++ head/sys/kern/capabilities.conf Sat Sep 7 19:16:02 2013 (r255374) @@ -120,8 +120,8 @@ cap_rights_limit ## ## Allow read-only clock operations. ## -clock_gettime clock_getres +clock_gettime ## ## Always allow file descriptor close(2). From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 19:34:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9DDC635D; Sat, 7 Sep 2013 19:34:57 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-wg0-x232.google.com (mail-wg0-x232.google.com [IPv6:2a00:1450:400c:c00::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C667D2162; Sat, 7 Sep 2013 19:34:56 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id j13so4056902wgh.17 for ; Sat, 07 Sep 2013 12:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=4l3weBtg27DOpzUuEgcF4ozs4D0YC9fiwOg5gHMfXLs=; b=Lp4V7cRhCRtepXInn1GIp9gqf/6z+HycNyPqBrKRDW+bkG3lf04pvQvy+Q5vZZHc9L P0Cp2SXOu4iHdSE4z73dOeJtl820T6qnyutKo8kjQ6f85wx0D9x2akf9Ui1aHSUUmUFS POqB2+y2EQd9e47OeNf3fFHzM+m7AtW9s7pMX3AGKf3MKDL1cVCaD5PlmGagpkQO71zr MXc4RCXlO2jyFEKvmS2ZJSjNJSOeDsWlILUKNSWWVb+ThF45C1Q++OwSZIKYIAZSWYOI 3ABTBtclPjDITzEYimdKBxUT79F7smwX3twRhOi4znvmuWVnd7JuxdnZprzTH9YS0c+0 yu0A== MIME-Version: 1.0 X-Received: by 10.180.221.38 with SMTP id qb6mr2968221wic.8.1378582495206; Sat, 07 Sep 2013 12:34:55 -0700 (PDT) Sender: antoine.brodin.freebsd@gmail.com Received: by 10.194.64.199 with HTTP; Sat, 7 Sep 2013 12:34:55 -0700 (PDT) In-Reply-To: <201309062046.r86Kk8pp072509@svn.freebsd.org> References: <201309062046.r86Kk8pp072509@svn.freebsd.org> Date: Sat, 7 Sep 2013 19:34:55 +0000 X-Google-Sender-Auth: ao8WNF7Nzl6hj35-S-szqmCkh9A Message-ID: Subject: Re: svn commit: r255325 - head/tools/build/mk From: Antoine Brodin To: David Chisnall Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 19:34:57 -0000 On Fri, Sep 6, 2013 at 8:46 PM, David Chisnall wrote: > Author: theraven > Date: Fri Sep 6 20:46:07 2013 > New Revision: 255325 > URL: http://svnweb.freebsd.org/changeset/base/255325 > > Log: > Don't delete c++filt when doing a make delete-old if GCC is not built but > C++ is. There may be something wrong, when MK_GCC=no, c++filt is not built and not installed, but not removed if present. Cheers, Antoine From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 19:43:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 003F74FB; Sat, 7 Sep 2013 19:43:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DEBB821AC; Sat, 7 Sep 2013 19:43:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87JhfpL032593; Sat, 7 Sep 2013 19:43:41 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87JhdD0032526; Sat, 7 Sep 2013 19:43:39 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309071943.r87JhdD0032526@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 7 Sep 2013 19:43:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255376 - in head: contrib/openpam contrib/openpam/bin contrib/openpam/bin/openpam_dump_policy contrib/openpam/bin/pamtest contrib/openpam/bin/su contrib/openpam/doc contrib/openpam/doc... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 19:43:42 -0000 Author: des Date: Sat Sep 7 19:43:39 2013 New Revision: 255376 URL: http://svnweb.freebsd.org/changeset/base/255376 Log: Update to OpenPAM Nummularia. Added: head/contrib/openpam/lib/Makefile.am - copied unchanged from r255365, vendor/openpam/dist/lib/Makefile.am head/contrib/openpam/lib/Makefile.in - copied unchanged from r255365, vendor/openpam/dist/lib/Makefile.in head/contrib/openpam/lib/libpam/openpam_asprintf.c - copied unchanged from r255365, vendor/openpam/dist/lib/libpam/openpam_asprintf.c head/contrib/openpam/lib/libpam/openpam_asprintf.h - copied unchanged from r255365, vendor/openpam/dist/lib/libpam/openpam_asprintf.h head/contrib/openpam/lib/libpam/openpam_cred.h - copied unchanged from r255365, vendor/openpam/dist/lib/libpam/openpam_cred.h head/contrib/openpam/lib/libpam/openpam_dlfunc.h - copied unchanged from r255365, vendor/openpam/dist/lib/libpam/openpam_dlfunc.h head/contrib/openpam/lib/libpam/openpam_strlcat.c - copied unchanged from r255365, vendor/openpam/dist/lib/libpam/openpam_strlcat.c head/contrib/openpam/lib/libpam/openpam_strlcpy.c - copied unchanged from r255365, vendor/openpam/dist/lib/libpam/openpam_strlcpy.c head/contrib/openpam/lib/libpam/openpam_vasprintf.c - copied unchanged from r255365, vendor/openpam/dist/lib/libpam/openpam_vasprintf.c head/contrib/openpam/lib/libpam/openpam_vasprintf.h - copied unchanged from r255365, vendor/openpam/dist/lib/libpam/openpam_vasprintf.h head/contrib/openpam/m4/ - copied from r255365, vendor/openpam/dist/m4/ head/contrib/openpam/mkpkgng.in - copied unchanged from r255365, vendor/openpam/dist/mkpkgng.in head/contrib/openpam/t/t_file.c - copied unchanged from r255365, vendor/openpam/dist/t/t_file.c head/contrib/openpam/test-driver - copied unchanged from r255365, vendor/openpam/dist/test-driver Modified: head/contrib/openpam/CREDITS head/contrib/openpam/HISTORY head/contrib/openpam/INSTALL head/contrib/openpam/LICENSE head/contrib/openpam/Makefile.am head/contrib/openpam/Makefile.in head/contrib/openpam/README head/contrib/openpam/RELNOTES head/contrib/openpam/TODO head/contrib/openpam/aclocal.m4 head/contrib/openpam/autogen.sh head/contrib/openpam/bin/Makefile.am head/contrib/openpam/bin/Makefile.in head/contrib/openpam/bin/openpam_dump_policy/Makefile.am head/contrib/openpam/bin/openpam_dump_policy/Makefile.in head/contrib/openpam/bin/openpam_dump_policy/openpam_dump_policy.c head/contrib/openpam/bin/pamtest/Makefile.am head/contrib/openpam/bin/pamtest/Makefile.in head/contrib/openpam/bin/pamtest/pamtest.1 head/contrib/openpam/bin/pamtest/pamtest.c head/contrib/openpam/bin/su/Makefile.am head/contrib/openpam/bin/su/Makefile.in head/contrib/openpam/bin/su/su.1 head/contrib/openpam/bin/su/su.c head/contrib/openpam/compile head/contrib/openpam/config.guess head/contrib/openpam/config.h.in head/contrib/openpam/config.sub head/contrib/openpam/configure head/contrib/openpam/configure.ac head/contrib/openpam/depcomp head/contrib/openpam/doc/Makefile.am head/contrib/openpam/doc/Makefile.in head/contrib/openpam/doc/man/Makefile.am head/contrib/openpam/doc/man/Makefile.in head/contrib/openpam/doc/man/openpam.3 head/contrib/openpam/doc/man/openpam.man head/contrib/openpam/doc/man/openpam_borrow_cred.3 head/contrib/openpam/doc/man/openpam_free_data.3 head/contrib/openpam/doc/man/openpam_free_envlist.3 head/contrib/openpam/doc/man/openpam_get_feature.3 head/contrib/openpam/doc/man/openpam_get_option.3 head/contrib/openpam/doc/man/openpam_log.3 head/contrib/openpam/doc/man/openpam_nullconv.3 head/contrib/openpam/doc/man/openpam_readline.3 head/contrib/openpam/doc/man/openpam_readlinev.3 head/contrib/openpam/doc/man/openpam_readword.3 head/contrib/openpam/doc/man/openpam_restore_cred.3 head/contrib/openpam/doc/man/openpam_set_feature.3 head/contrib/openpam/doc/man/openpam_set_option.3 head/contrib/openpam/doc/man/openpam_straddch.3 head/contrib/openpam/doc/man/openpam_subst.3 head/contrib/openpam/doc/man/openpam_ttyconv.3 head/contrib/openpam/doc/man/pam.3 head/contrib/openpam/doc/man/pam.conf.5 head/contrib/openpam/doc/man/pam.man head/contrib/openpam/doc/man/pam_acct_mgmt.3 head/contrib/openpam/doc/man/pam_authenticate.3 head/contrib/openpam/doc/man/pam_chauthtok.3 head/contrib/openpam/doc/man/pam_close_session.3 head/contrib/openpam/doc/man/pam_conv.3 head/contrib/openpam/doc/man/pam_end.3 head/contrib/openpam/doc/man/pam_error.3 head/contrib/openpam/doc/man/pam_get_authtok.3 head/contrib/openpam/doc/man/pam_get_data.3 head/contrib/openpam/doc/man/pam_get_item.3 head/contrib/openpam/doc/man/pam_get_user.3 head/contrib/openpam/doc/man/pam_getenv.3 head/contrib/openpam/doc/man/pam_getenvlist.3 head/contrib/openpam/doc/man/pam_info.3 head/contrib/openpam/doc/man/pam_open_session.3 head/contrib/openpam/doc/man/pam_prompt.3 head/contrib/openpam/doc/man/pam_putenv.3 head/contrib/openpam/doc/man/pam_set_data.3 head/contrib/openpam/doc/man/pam_set_item.3 head/contrib/openpam/doc/man/pam_setcred.3 head/contrib/openpam/doc/man/pam_setenv.3 head/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 head/contrib/openpam/doc/man/pam_sm_authenticate.3 head/contrib/openpam/doc/man/pam_sm_chauthtok.3 head/contrib/openpam/doc/man/pam_sm_close_session.3 head/contrib/openpam/doc/man/pam_sm_open_session.3 head/contrib/openpam/doc/man/pam_sm_setcred.3 head/contrib/openpam/doc/man/pam_start.3 head/contrib/openpam/doc/man/pam_strerror.3 head/contrib/openpam/doc/man/pam_verror.3 head/contrib/openpam/doc/man/pam_vinfo.3 head/contrib/openpam/doc/man/pam_vprompt.3 head/contrib/openpam/include/Makefile.am head/contrib/openpam/include/Makefile.in head/contrib/openpam/include/security/Makefile.am head/contrib/openpam/include/security/Makefile.in head/contrib/openpam/include/security/openpam.h head/contrib/openpam/include/security/openpam_attr.h head/contrib/openpam/include/security/openpam_version.h head/contrib/openpam/include/security/pam_appl.h head/contrib/openpam/include/security/pam_constants.h head/contrib/openpam/include/security/pam_modules.h head/contrib/openpam/include/security/pam_types.h head/contrib/openpam/install-sh head/contrib/openpam/lib/libpam/Makefile.am head/contrib/openpam/lib/libpam/Makefile.in head/contrib/openpam/lib/libpam/openpam_borrow_cred.c head/contrib/openpam/lib/libpam/openpam_check_owner_perms.c head/contrib/openpam/lib/libpam/openpam_configure.c head/contrib/openpam/lib/libpam/openpam_constants.c head/contrib/openpam/lib/libpam/openpam_constants.h head/contrib/openpam/lib/libpam/openpam_ctype.h head/contrib/openpam/lib/libpam/openpam_debug.h head/contrib/openpam/lib/libpam/openpam_dispatch.c head/contrib/openpam/lib/libpam/openpam_dynamic.c head/contrib/openpam/lib/libpam/openpam_features.c head/contrib/openpam/lib/libpam/openpam_features.h head/contrib/openpam/lib/libpam/openpam_findenv.c head/contrib/openpam/lib/libpam/openpam_free_data.c head/contrib/openpam/lib/libpam/openpam_free_envlist.c head/contrib/openpam/lib/libpam/openpam_get_feature.c head/contrib/openpam/lib/libpam/openpam_get_option.c head/contrib/openpam/lib/libpam/openpam_impl.h head/contrib/openpam/lib/libpam/openpam_load.c head/contrib/openpam/lib/libpam/openpam_log.c head/contrib/openpam/lib/libpam/openpam_nullconv.c head/contrib/openpam/lib/libpam/openpam_readline.c head/contrib/openpam/lib/libpam/openpam_readlinev.c head/contrib/openpam/lib/libpam/openpam_readword.c head/contrib/openpam/lib/libpam/openpam_restore_cred.c head/contrib/openpam/lib/libpam/openpam_set_feature.c head/contrib/openpam/lib/libpam/openpam_set_option.c head/contrib/openpam/lib/libpam/openpam_static.c head/contrib/openpam/lib/libpam/openpam_straddch.c head/contrib/openpam/lib/libpam/openpam_strlcat.h head/contrib/openpam/lib/libpam/openpam_strlcmp.h head/contrib/openpam/lib/libpam/openpam_strlcpy.h head/contrib/openpam/lib/libpam/openpam_subst.c head/contrib/openpam/lib/libpam/openpam_ttyconv.c head/contrib/openpam/lib/libpam/pam_acct_mgmt.c head/contrib/openpam/lib/libpam/pam_authenticate.c head/contrib/openpam/lib/libpam/pam_authenticate_secondary.c head/contrib/openpam/lib/libpam/pam_chauthtok.c head/contrib/openpam/lib/libpam/pam_close_session.c head/contrib/openpam/lib/libpam/pam_end.c head/contrib/openpam/lib/libpam/pam_error.c head/contrib/openpam/lib/libpam/pam_get_authtok.c head/contrib/openpam/lib/libpam/pam_get_data.c head/contrib/openpam/lib/libpam/pam_get_item.c head/contrib/openpam/lib/libpam/pam_get_mapped_authtok.c head/contrib/openpam/lib/libpam/pam_get_mapped_username.c head/contrib/openpam/lib/libpam/pam_get_user.c head/contrib/openpam/lib/libpam/pam_getenv.c head/contrib/openpam/lib/libpam/pam_getenvlist.c head/contrib/openpam/lib/libpam/pam_info.c head/contrib/openpam/lib/libpam/pam_open_session.c head/contrib/openpam/lib/libpam/pam_prompt.c head/contrib/openpam/lib/libpam/pam_putenv.c head/contrib/openpam/lib/libpam/pam_set_data.c head/contrib/openpam/lib/libpam/pam_set_item.c head/contrib/openpam/lib/libpam/pam_set_mapped_authtok.c head/contrib/openpam/lib/libpam/pam_set_mapped_username.c head/contrib/openpam/lib/libpam/pam_setcred.c head/contrib/openpam/lib/libpam/pam_setenv.c head/contrib/openpam/lib/libpam/pam_sm_acct_mgmt.c head/contrib/openpam/lib/libpam/pam_sm_authenticate.c head/contrib/openpam/lib/libpam/pam_sm_authenticate_secondary.c head/contrib/openpam/lib/libpam/pam_sm_chauthtok.c head/contrib/openpam/lib/libpam/pam_sm_close_session.c head/contrib/openpam/lib/libpam/pam_sm_get_mapped_authtok.c head/contrib/openpam/lib/libpam/pam_sm_get_mapped_username.c head/contrib/openpam/lib/libpam/pam_sm_open_session.c head/contrib/openpam/lib/libpam/pam_sm_set_mapped_authtok.c head/contrib/openpam/lib/libpam/pam_sm_set_mapped_username.c head/contrib/openpam/lib/libpam/pam_sm_setcred.c head/contrib/openpam/lib/libpam/pam_start.c head/contrib/openpam/lib/libpam/pam_strerror.c head/contrib/openpam/lib/libpam/pam_verror.c head/contrib/openpam/lib/libpam/pam_vinfo.c head/contrib/openpam/lib/libpam/pam_vprompt.c head/contrib/openpam/misc/gendoc.pl head/contrib/openpam/missing head/contrib/openpam/modules/Makefile.am head/contrib/openpam/modules/Makefile.in head/contrib/openpam/modules/pam_deny/Makefile.am head/contrib/openpam/modules/pam_deny/Makefile.in head/contrib/openpam/modules/pam_deny/pam_deny.c head/contrib/openpam/modules/pam_permit/Makefile.am head/contrib/openpam/modules/pam_permit/Makefile.in head/contrib/openpam/modules/pam_permit/pam_permit.c head/contrib/openpam/modules/pam_unix/Makefile.am head/contrib/openpam/modules/pam_unix/Makefile.in head/contrib/openpam/modules/pam_unix/pam_unix.c head/contrib/openpam/pamgdb.in head/contrib/openpam/t/Makefile.am head/contrib/openpam/t/Makefile.in head/contrib/openpam/t/t.h head/contrib/openpam/t/t_main.c head/contrib/openpam/t/t_openpam_readlinev.c head/contrib/openpam/t/t_openpam_readword.c head/lib/libpam/libpam/Makefile Directory Properties: head/contrib/openpam/ (props changed) Modified: head/contrib/openpam/CREDITS ============================================================================== --- head/contrib/openpam/CREDITS Sat Sep 7 19:27:58 2013 (r255375) +++ head/contrib/openpam/CREDITS Sat Sep 7 19:43:39 2013 (r255376) @@ -1,4 +1,6 @@ + _Ἀπόδοτε οὖν Ï„á½° ΚαίσαÏος ΚαίσαÏι καὶ Ï„á½° τοῦ Θεοῦ Ï„á¿· Θεῷ_ + The OpenPAM library was developed for the FreeBSD Project by ThinkSec AS and Network Associates Laboratories, the Security Research Division of Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 @@ -21,12 +23,14 @@ ideas: Don Lewis Emmanuel Dreyfus Eric Melville + Espen Grøndahl Gary Winiger Gleb Smirnoff Hubert Feyrer Jason Evans Joe Marcus Clarke Juli Mallett + Ankita Pal Jörg Sonnenberger Maëlle Lesage Mark Murray @@ -43,4 +47,4 @@ ideas: Wojciech A. Koszek Yar Tikhiy -$Id: CREDITS 587 2012-04-08 11:12:10Z des $ +$Id: CREDITS 648 2013-03-05 17:54:27Z des $ Modified: head/contrib/openpam/HISTORY ============================================================================== --- head/contrib/openpam/HISTORY Sat Sep 7 19:27:58 2013 (r255375) +++ head/contrib/openpam/HISTORY Sat Sep 7 19:43:39 2013 (r255376) @@ -1,3 +1,30 @@ +OpenPAM Nummularia 2013-09-07 + + - ENHANCE: Rewrite the dynamic loader to improve readability and + reliability. Modules can now be listed without the ".so" suffix in + the policy file; OpenPAM will automatically add it, just like it + will automatically add the version number if required. + + - ENHANCE: Allow openpam_straddch(3) to be called without a character + so it can be used to preallocate a string. + + - ENHANCE: Improve portability by adding simple asprintf(3) and + vasprintf(3) implementations for platforms that don't have them. + + - ENHANCE: Move the libpam sources into a separate subdirectory. + + - ENHANCE: Substantial documentation improvements. + + - BUGFIX: When openpam_readword(3) encountered an opening quote, it + would set the first byte in the buffer to '\0', discarding all + existing text and, unless the buffer was empty to begin with, all + subsequent text as well. This went unnoticed because none of the + unit tests for quoted strings had any text preceding the opening + quote. + + - BUGFIX: make --with-modules-dir work the way it was meant to work + (but never did). +============================================================================ OpenPAM Micrampelis 2012-05-26 - FEATURE: Add an openpam_readword(3) function which reads the next @@ -401,4 +428,4 @@ OpenPAM Calamite 2002-02-09 First (beta) release. ============================================================================ -$Id: HISTORY 609 2012-05-26 13:57:45Z des $ +$Id: HISTORY 737 2013-09-07 12:53:55Z des $ Modified: head/contrib/openpam/INSTALL ============================================================================== --- head/contrib/openpam/INSTALL Sat Sep 7 19:27:58 2013 (r255375) +++ head/contrib/openpam/INSTALL Sat Sep 7 19:43:39 2013 (r255376) @@ -55,4 +55,4 @@ # make install -$Id: INSTALL 388 2006-04-12 10:31:52Z des $ +$Id: INSTALL 648 2013-03-05 17:54:27Z des $ Modified: head/contrib/openpam/LICENSE ============================================================================== --- head/contrib/openpam/LICENSE Sat Sep 7 19:27:58 2013 (r255375) +++ head/contrib/openpam/LICENSE Sat Sep 7 19:43:39 2013 (r255376) @@ -32,4 +32,4 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$Id: LICENSE 546 2012-03-31 23:13:20Z des $ +$Id: LICENSE 648 2013-03-05 17:54:27Z des $ Modified: head/contrib/openpam/Makefile.am ============================================================================== --- head/contrib/openpam/Makefile.am Sat Sep 7 19:27:58 2013 (r255375) +++ head/contrib/openpam/Makefile.am Sat Sep 7 19:43:39 2013 (r255376) @@ -1,8 +1,8 @@ -# $Id: Makefile.am 549 2012-04-01 20:38:30Z des $ +# $Id: Makefile.am 623 2013-02-25 07:24:51Z des $ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = lib/libpam bin modules include +SUBDIRS = lib bin modules include if WITH_DOC SUBDIRS += doc Modified: head/contrib/openpam/Makefile.in ============================================================================== --- head/contrib/openpam/Makefile.in Sat Sep 7 19:27:58 2013 (r255375) +++ head/contrib/openpam/Makefile.in Sat Sep 7 19:43:39 2013 (r255376) @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,8 +14,53 @@ @SET_MAKE@ -# $Id: Makefile.am 549 2012-04-01 20:38:30Z des $ +# $Id: Makefile.am 623 2013-02-25 07:24:51Z des $ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -37,44 +81,91 @@ build_triplet = @build@ host_triplet = @host@ @WITH_DOC_TRUE@am__append_1 = doc subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(srcdir)/pamgdb.in $(top_srcdir)/configure INSTALL TODO \ - config.guess config.sub depcomp install-sh ltmain.sh missing +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in $(srcdir)/pamgdb.in $(srcdir)/mkpkgng.in \ + INSTALL README TODO compile config.guess config.sub depcomp \ + install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = pamgdb +CONFIG_CLEAN_FILES = pamgdb mkpkgng CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = lib bin modules include doc t DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -102,10 +193,14 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -116,6 +211,7 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CRYPTO_LIBS = @CRYPTO_LIBS@ CRYPT_LIBS = @CRYPT_LIBS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @@ -237,7 +333,7 @@ all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -273,10 +369,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -290,6 +384,8 @@ distclean-hdr: -rm -f config.h stamp-h1 pamgdb: $(top_builddir)/config.status $(srcdir)/pamgdb.in cd $(top_builddir) && $(SHELL) ./config.status $@ +mkpkgng: $(top_builddir)/config.status $(srcdir)/mkpkgng.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -301,22 +397,25 @@ distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -331,57 +430,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -397,12 +451,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCE set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -414,15 +463,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCE $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -431,9 +476,31 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -469,13 +536,10 @@ distdir: $(DISTFILES) done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -504,36 +568,42 @@ distdir: $(DISTFILES) || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -544,8 +614,8 @@ distcheck: dist GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -555,9 +625,9 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ @@ -565,6 +635,7 @@ distcheck: dist && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -588,13 +659,21 @@ distcheck: dist && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -625,10 +704,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -710,24 +794,24 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) all install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. Modified: head/contrib/openpam/README ============================================================================== --- head/contrib/openpam/README Sat Sep 7 19:27:58 2013 (r255375) +++ head/contrib/openpam/README Sat Sep 7 19:43:39 2013 (r255376) @@ -24,4 +24,4 @@ These are some of OpenPAM's features: Please direct bug reports and inquiries to . -$Id: README 424 2009-10-29 17:10:22Z des $ +$Id: README 648 2013-03-05 17:54:27Z des $ Modified: head/contrib/openpam/RELNOTES ============================================================================== --- head/contrib/openpam/RELNOTES Sat Sep 7 19:27:58 2013 (r255375) +++ head/contrib/openpam/RELNOTES Sat Sep 7 19:43:39 2013 (r255376) @@ -1,27 +1,24 @@ - Release notes for OpenPAM Micrampelis - ===================================== + Release notes for OpenPAM Nummularia + ==================================== This release corresponds to the code used in FreeBSD HEAD as of the release date, and is also expected to work on almost any POSIX-like platform that has GNU autotools, GNU make and the GNU compiler suite installed. -The library itself is complete. Documentation exists in the form of -man pages for the library functions. These man pages are generated by -a Perl script from specially marked-up comments in the source files -themselves, which minimizes the chance that any of them should be out -of date. - -The distribution also includes three sample modules (pam_deny, -pam_permit and pam_unix) and a sample application (su). These are not -intended for actual use, but rather to serve as examples for module or -application developers. It also includes a command-line application -(pamtest) which can be used to test policies and modules. +The distribution consists of the following components: -Unit tests for limited portions of the library can be found in the t -subdirectory. + - The PAM library itself, with complete API documentation. + + - Sample modules (pam_permit, pam_deny and pam_unix) and a sample + application (su) which demonstrate how to use PAM. + + - A test application (pamtest) which can be used to test policies and + modules. + + - Unit tests for limited portions of the libraries. Please direct bug reports and inquiries to . -$Id: RELNOTES 609 2012-05-26 13:57:45Z des $ +$Id: RELNOTES 741 2013-09-07 13:34:02Z des $ Modified: head/contrib/openpam/TODO ============================================================================== --- head/contrib/openpam/TODO Sat Sep 7 19:27:58 2013 (r255375) +++ head/contrib/openpam/TODO Sat Sep 7 19:43:39 2013 (r255376) @@ -1,13 +1,17 @@ Before the next release: - - Complete the transition from PAM_LOG_DEBUG to PAM_LOG_LIBDEBUG. + - Rewrite openpam_ttyconv(3). + - mostly done, needs review. -Whenever: + - Fix try_first_pass / use_first_pass (pam_get_authtok() code & + documentation are slightly incorrect, OpenPAM's pam_unix(8) is + incorrect, all FreeBSD modules are broken) - - Implement mechanism to enable / disable optional features. Use it - to disable strict error checking so pamtest and unit tests can do - things that we don't allow in production. + - Add loop detection to openpam_load_chain(). - - Rewrite the module-loading code. + - Look into the possibility of implementing a version of (or a + wrapper for) openpam_log() which respects the PAM_SILENT flag and + the no_warn module option. This would eliminate the need for + FreeBSD's _pam_verbose_error(). -$Id: TODO 592 2012-04-08 13:19:51Z des $ +$Id: TODO 736 2013-09-07 12:52:42Z des $ Modified: head/contrib/openpam/aclocal.m4 ============================================================================== --- head/contrib/openpam/aclocal.m4 Sat Sep 7 19:27:58 2013 (r255375) +++ head/contrib/openpam/aclocal.m4 Sat Sep 7 19:43:39 2013 (r255376) @@ -1,8612 +1,26 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.14 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 20:08:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2DF6DD35; Sat, 7 Sep 2013 20:08:12 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id D6DF722D2; Sat, 7 Sep 2013 20:08:11 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1VIOpk-0006i8-49; Sun, 08 Sep 2013 00:10:16 +0400 Date: Sun, 8 Sep 2013 00:10:16 +0400 From: Slawa Olhovchenkov To: Benjamin Kaduk Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Message-ID: <20130907201016.GD3796@zxy.spb.ru> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907191117.GC3796@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , Bryan Venteicher , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 20:08:12 -0000 On Sat, Sep 07, 2013 at 03:14:53PM -0400, Benjamin Kaduk wrote: > On Sat, Sep 7, 2013 at 3:11 PM, Slawa Olhovchenkov wrote: > > > On Sat, Sep 07, 2013 at 10:47:07AM -0700, Adrian Chadd wrote: > > > > > I'll be happy if someone does this right now, by populating a > > > /boot/loader.modules or something, and then force the "fixing" of loader > > to > > > cache metadata to make the reads faster. > > > > Some very, very old devices don't exist as modules. > > This SCSI controllers (ISA-only?). I just drop this. > > > > I think you're missing the point. Right now, loading modules from the > loader is supposed to be painfully slow, at least in many situations. > dougb (IIRC) added the kld_list rc.conf variable so that modules could be > loaded once the machine is up, which proceeds at a much more reasonable > pace. This seems to be what Adrian is alluding to with '"fixing" of loader > to cache metadata to make the reads faster'. Modules can be divided to three part: 1) need to boot (placed to loader.conf) 2) need to work (placed kld_list) 3) need to distribute (placed in /boot/kernel) On install disk (and for first boot) all modules must be in loader.conf. After boot to installed system we can edit loader.conf and kld_list. Manualy or by tools, but after boot. From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 20:25:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 79198575; Sat, 7 Sep 2013 20:25:23 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6744323B0; Sat, 7 Sep 2013 20:25:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87KPNxq057781; Sat, 7 Sep 2013 20:25:23 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87KPN5Q057780; Sat, 7 Sep 2013 20:25:23 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201309072025.r87KPN5Q057780@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Sat, 7 Sep 2013 20:25:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255377 - head/usr.sbin/setfib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 20:25:23 -0000 Author: des Date: Sat Sep 7 20:25:22 2013 New Revision: 255377 URL: http://svnweb.freebsd.org/changeset/base/255377 Log: Tweak wording. Modified: head/usr.sbin/setfib/setfib.1 Modified: head/usr.sbin/setfib/setfib.1 ============================================================================== --- head/usr.sbin/setfib/setfib.1 Sat Sep 7 19:43:39 2013 (r255376) +++ head/usr.sbin/setfib/setfib.1 Sat Sep 7 20:25:22 2013 (r255377) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 9, 2008 +.Dd October 20, 2008 .Dt SETFIB 1 .Os .Sh NAME @@ -39,11 +39,11 @@ .Sh DESCRIPTION The .Nm -utility runs +utility runs another .Ar utility -with an different routing table. +with a different routing table. The table number -.Dq Ar fib +.Ar fib will be used by default for all sockets started by this process or descendants. .Sh ENVIRONMENT @@ -69,8 +69,8 @@ An exit status of 127 indicates .Ar utility could not be found. .Sh EXAMPLES -Execute utility -.Sq netstat +Run +.Xr netstat 1 to view the second routing table. .Pp .Dl "setfib -F 1 netstat -rn" @@ -86,8 +86,9 @@ The .Nm utility is a .Fx -specific extension, however many -.Ux +specific extension. +However, many +.Ux Ns - Ns like systems have an equivalent function. .Sh HISTORY From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 20:26:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EFF916B7; Sat, 7 Sep 2013 20:26:39 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id B03F223B7; Sat, 7 Sep 2013 20:26:39 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 117214D4D; Sat, 7 Sep 2013 20:26:39 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 2B315292E8; Sat, 7 Sep 2013 22:26:12 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: src-committers@freebsd.org Subject: Re: svn commit: r255377 - head/usr.sbin/setfib References: <201309072025.r87KPN5Q057780@svn.freebsd.org> Date: Sat, 07 Sep 2013 22:26:11 +0200 In-Reply-To: <201309072025.r87KPN5Q057780@svn.freebsd.org> (Dag-Erling SmXXrgrav's message of "Sat, 7 Sep 2013 20:25:23 +0000 (UTC)") Message-ID: <86r4d0gyzg.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 20:26:40 -0000 Dag-Erling SmXXrgrav writes: > -.Dd April 9, 2008 > +.Dd October 20, 2008 This is not a mistake; this patch has actually been sitting in /usr/src on one of my dev boxes for five years... DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 20:48:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2D3C71000; Sat, 7 Sep 2013 20:48:53 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-ee0-x235.google.com (mail-ee0-x235.google.com [IPv6:2a00:1450:4013:c00::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1E88524B8; Sat, 7 Sep 2013 20:48:51 +0000 (UTC) Received: by mail-ee0-f53.google.com with SMTP id b15so2325770eek.40 for ; Sat, 07 Sep 2013 13:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Sz7ExpT4OYwP6wh1ErCQQpjLDMTO3IVuKSDtd3y0A+0=; b=zjFU7nxeMW2qzTxe/dijstCzeTODIWkeMDoFmXrKRjFiGv6MdvT4DmdfTBcqc1ld0G F013Pi1GcM3fjbu5IjWCOZ35Ymnd0EqQ3hq7dEVcSyc3oOvKHs/4DIitvlF3Hn1/aTZf McKbYZqQ1X/l8au5tC6o8nA4xNiMPcOvfAl2PUWnaJ/TqYG+XSB1BuIcuYutzNjX6KWe qHm5pCSorr5UMFn434BkogOxsSRQbl0h5RwfxSo/SXbMlOwg+F/CTeORppd5TLAZ8l87 c99TlvzVkei6xqmxKGcLwHSoYt/OjkAblmJlheWAN3ObNKYx8PsF52Eib8E82gyYoDU1 r8eQ== X-Received: by 10.15.83.2 with SMTP id b2mr16004078eez.28.1378586930475; Sat, 07 Sep 2013 13:48:50 -0700 (PDT) Received: from [192.168.1.102] (ajf203.neoplus.adsl.tpnet.pl. [83.25.239.203]) by mx.google.com with ESMTPSA id a6sm8021512eei.10.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 07 Sep 2013 13:48:50 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Content-Type: text/plain; charset=iso-8859-2 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: Date: Sat, 7 Sep 2013 22:48:48 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> To: Adrian Chadd X-Mailer: Apple Mail (2.1508) Cc: "svn-src-head@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Slawa Olhovchenkov X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 20:48:53 -0000 Wiadomo=B6=E6 napisana przez Adrian Chadd w dniu 7 = wrz 2013, o godz. 19:47: > I'll be happy if someone does this right now, by populating a = /boot/loader.modules or something, and then force the "fixing" of loader = to cache metadata to make the reads faster. I have no idea on what's the loader(8) state right now, but long time = ago I''ve made a patch that made it significantly faster by making caching actually work. No = idea if anyone picked up the patch (http://people.freebsd.org/~trasz/fast-loader-3.diff), = though. From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 20:52:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1A68A203; Sat, 7 Sep 2013 20:52:32 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0843A24EA; Sat, 7 Sep 2013 20:52:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87KqVCI074415; Sat, 7 Sep 2013 20:52:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87KqVqF074414; Sat, 7 Sep 2013 20:52:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201309072052.r87KqVqF074414@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 7 Sep 2013 20:52:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255378 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 20:52:32 -0000 Author: nwhitehorn Date: Sat Sep 7 20:52:31 2013 New Revision: 255378 URL: http://svnweb.freebsd.org/changeset/base/255378 Log: Fix error in r252115: space for the softc needs to be allocated. This seemed to be working by chance on most systems. Modified: head/sys/powerpc/ofw/ofw_cpu.c Modified: head/sys/powerpc/ofw/ofw_cpu.c ============================================================================== --- head/sys/powerpc/ofw/ofw_cpu.c Sat Sep 7 20:25:22 2013 (r255377) +++ head/sys/powerpc/ofw/ofw_cpu.c Sat Sep 7 20:52:31 2013 (r255378) @@ -158,7 +158,7 @@ static device_method_t ofw_cpu_methods[] static driver_t ofw_cpu_driver = { "cpu", ofw_cpu_methods, - 0 + sizeof(struct ofw_cpu_softc) }; static devclass_t ofw_cpu_devclass; From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 21:00:41 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A5FDF593; Sat, 7 Sep 2013 21:00:41 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id 08DE42544; Sat, 7 Sep 2013 21:00:41 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1VIPeW-0007Bd-TM; Sun, 08 Sep 2013 01:02:44 +0400 Date: Sun, 8 Sep 2013 01:02:44 +0400 From: Slawa Olhovchenkov To: Edward Tomasz Napiera?a Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Message-ID: <20130907210244.GE3796@zxy.spb.ru> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: Adrian Chadd , "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , ae@FreeBSD.org, "svn-src-head@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 21:00:41 -0000 On Sat, Sep 07, 2013 at 10:48:48PM +0200, Edward Tomasz Napiera?a wrote: > Wiadomo?? napisana przez Adrian Chadd w dniu 7 wrz 2013, o godz. 19:47: > > I'll be happy if someone does this right now, by populating a /boot/loader.modules or something, and then force the "fixing" of loader to cache metadata to make the reads faster. > > I have no idea on what's the loader(8) state right now, but long time ago I''ve made a patch > that made it significantly faster by making caching actually work. No idea if anyone picked > up the patch (http://people.freebsd.org/~trasz/fast-loader-3.diff), though. > Some time ago Andrey V. Elsukov do improvement in loader for more efficient caching and partition handling. Now loader load a lot of modules faster. I am insert hist in CC: list. From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 21:18:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3EE6C915; Sat, 7 Sep 2013 21:18:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 167B725D0; Sat, 7 Sep 2013 21:18:29 +0000 (UTC) Received: by mail-wg0-f42.google.com with SMTP id b12so1585140wgh.5 for ; Sat, 07 Sep 2013 14:18:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=xZUN/+JlYUbra/nGAv6HdjMQDqCJZtAUemsZc1hwxbU=; b=LBKQcJnjyVszFQzBlMAFoDZx3/vcKKD6uMo4W8uEU9MHzjZZppISJtw/9qHvAzz2M/ 4wJAWuYAQdctbaOfyOs83+kaXxeakzj7+x7IpqzAoejuC/ogy/6VHuB6qBxkjlWqWEmv gr4s7C4JsDve59wUT6vElzpIapWRHntVPuFsiXJ4evDMpiXGpidgCp+Wr9Sk6zLB9zsb zATIke/3+USovaDpS4GtsS7B2W9HS6YcMkwFYXkcouKUGjKSH+93NZgXxvaxG8G4mrgS 2kjXIJj03GQqvmxBOMZPkSD/UGQh7pZx0bxRWIe/TRM4xtnoydgwn7tA0omx2wt9nh04 UhjQ== MIME-Version: 1.0 X-Received: by 10.194.109.68 with SMTP id hq4mr7203940wjb.12.1378588707656; Sat, 07 Sep 2013 14:18:27 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.73.133 with HTTP; Sat, 7 Sep 2013 14:18:27 -0700 (PDT) In-Reply-To: <20130907210244.GE3796@zxy.spb.ru> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907210244.GE3796@zxy.spb.ru> Date: Sat, 7 Sep 2013 14:18:27 -0700 X-Google-Sender-Auth: SOf7eqYGsXigExBM9U7qB-yD95I Message-ID: Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf From: Adrian Chadd To: Slawa Olhovchenkov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , "Andrey V. Elsukov" , "svn-src-head@freebsd.org" , Edward Tomasz Napiera?a X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 21:18:31 -0000 On 7 September 2013 14:02, Slawa Olhovchenkov wrote: > On Sat, Sep 07, 2013 at 10:48:48PM +0200, Edward Tomasz Napiera?a wrote: > > > Wiadomo?? napisana przez Adrian Chadd w dniu 7 wrz > 2013, o godz. 19:47: > > > I'll be happy if someone does this right now, by populating a > /boot/loader.modules or something, and then force the "fixing" of loader to > cache metadata to make the reads faster. > > > > I have no idea on what's the loader(8) state right now, but long time > ago I''ve made a patch > > that made it significantly faster by making caching actually work. No > idea if anyone picked > > up the patch (http://people.freebsd.org/~trasz/fast-loader-3.diff), > though. > > > > Some time ago Andrey V. Elsukov do improvement in loader for more > efficient caching and partition handling. Now loader load a lot of > modules faster. I am insert hist in CC: list. > Cool! Between Andrey and trasz@ there seems to be significant work done in this area to make things better. How about we get together a single patch set against -HEAD to start testing out? I'll test it out on my amd64/i386 devices (and if I can get these ARM boards to work, arm as well) to see how it works? I think we can aim to get this stuff snuck into -HEAD after 10 branches off. Sneaking it into -HEAD now would be way too risky. We can always MFC it later on to hit 10.1 or something. Thanks guys! I'm glad someone has already done a large part of this work! -adrian From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 21:27:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AAEE5CF7; Sat, 7 Sep 2013 21:27:53 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id 5B15A261D; Sat, 7 Sep 2013 21:27:53 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1VIQ4r-0007LQ-Io; Sun, 08 Sep 2013 01:29:57 +0400 Date: Sun, 8 Sep 2013 01:29:57 +0400 From: Slawa Olhovchenkov To: Adrian Chadd Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Message-ID: <20130907212957.GF3796@zxy.spb.ru> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907210244.GE3796@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , "Andrey V. Elsukov" , "svn-src-head@freebsd.org" , Edward Tomasz Napiera?a X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 21:27:53 -0000 On Sat, Sep 07, 2013 at 02:18:27PM -0700, Adrian Chadd wrote: > On 7 September 2013 14:02, Slawa Olhovchenkov wrote: > > > On Sat, Sep 07, 2013 at 10:48:48PM +0200, Edward Tomasz Napiera?a wrote: > > > > > Wiadomo?? napisana przez Adrian Chadd w dniu 7 wrz > > 2013, o godz. 19:47: > > > > I'll be happy if someone does this right now, by populating a > > /boot/loader.modules or something, and then force the "fixing" of loader to > > cache metadata to make the reads faster. > > > > > > I have no idea on what's the loader(8) state right now, but long time > > ago I''ve made a patch > > > that made it significantly faster by making caching actually work. No > > idea if anyone picked > > > up the patch (http://people.freebsd.org/~trasz/fast-loader-3.diff), > > though. > > > > > > > Some time ago Andrey V. Elsukov do improvement in loader for more > > efficient caching and partition handling. Now loader load a lot of > > modules faster. I am insert hist in CC: list. > > > > Cool! > > Between Andrey and trasz@ there seems to be significant work done in this > area to make things better. > > How about we get together a single patch set against -HEAD to start testing > out? I'll test it out on my amd64/i386 devices (and if I can get these ARM > boards to work, arm as well) to see how it works? > > I think we can aim to get this stuff snuck into -HEAD after 10 branches > off. Sneaking it into -HEAD now would be way too risky. We can always MFC > it later on to hit 10.1 or something. I think now -HEAD can't be more risky by one or two patches. > Thanks guys! I'm glad someone has already done a large part of this work! > > > > -adrian From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 21:32:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CFF301AB; Sat, 7 Sep 2013 21:32:21 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x235.google.com (mail-wg0-x235.google.com [IPv6:2a00:1450:400c:c00::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A0BA8266C; Sat, 7 Sep 2013 21:32:20 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id x12so1715153wgg.20 for ; Sat, 07 Sep 2013 14:32:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=3Vxh2XCyj8WmeNk5Hh2FE60gFDwTA8J5TUcskvzNa5U=; b=qvMInrTpNHov6d69ea4weCJovYmw/cocgciW18Ms03jwBhUqIEcqmsw3hGOAbi4iNO Bn2+oGwVnonh27Sv1AwRK3fgBULoOYqd3tvQZQaHXXCmfo5OYd9DxA/s7dIqmqje6JKJ 0r7dfqMh6KDtTM6WkfjTBW6BGZE5qTIfLtdEDogpuYh71mT0TPRsYqTFaDn+4hjWuKHP zQSaDxDeHMWtmSYTawWtdGSrVQ+UBLxqAh8Y4VDDH4FIq02L2TAq8hPgQrNJcEVwYwZ3 wRa2+pDWs4m+PieYkg01Xy8Z2KcTFHeNBPl4Oebii//W1CQHW/TWsCOCB/v3NdrcZs7R bntQ== MIME-Version: 1.0 X-Received: by 10.180.93.104 with SMTP id ct8mr3291395wib.0.1378589539065; Sat, 07 Sep 2013 14:32:19 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.73.133 with HTTP; Sat, 7 Sep 2013 14:32:19 -0700 (PDT) In-Reply-To: <20130907212957.GF3796@zxy.spb.ru> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907210244.GE3796@zxy.spb.ru> <20130907212957.GF3796@zxy.spb.ru> Date: Sat, 7 Sep 2013 14:32:19 -0700 X-Google-Sender-Auth: 1Ll_dsbm1g3r9xtI60wl6UXOHJo Message-ID: Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf From: Adrian Chadd To: Slawa Olhovchenkov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , "Andrey V. Elsukov" , "svn-src-head@freebsd.org" , Edward Tomasz Napiera?a X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 21:32:22 -0000 On 7 September 2013 14:29, Slawa Olhovchenkov wrote: > > I think we can aim to get this stuff snuck into -HEAD after 10 branches > > off. Sneaking it into -HEAD now would be way too risky. We can always MFC > > it later on to hit 10.1 or something. > > I think now -HEAD can't be more risky by one or two patches. Hah, the ol' "it's already broken, we can't possibly make it worse" argument. :-) It's ultimately up to re@ at this point, but personally I think adding a last minute patch to loader primarily for a feature that we'd also have to rush in as well is too risky. A lot has changed in -HEAD over the last few weeks and in my opinion we should let the dust settle and get people using the latest -HEAD before trying out even more new stuff. We can always back-port it to -10 (and -9 if people want) later on in the year. -adrian From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 21:45:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 04D819A6; Sat, 7 Sep 2013 21:45:26 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id ADC7226F8; Sat, 7 Sep 2013 21:45:25 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1VIQLo-0007UF-TK; Sun, 08 Sep 2013 01:47:28 +0400 Date: Sun, 8 Sep 2013 01:47:28 +0400 From: Slawa Olhovchenkov To: Adrian Chadd Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Message-ID: <20130907214728.GG3796@zxy.spb.ru> References: <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907210244.GE3796@zxy.spb.ru> <20130907212957.GF3796@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , "Andrey V. Elsukov" , "svn-src-head@freebsd.org" , Edward Tomasz Napiera?a X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 21:45:26 -0000 On Sat, Sep 07, 2013 at 02:32:19PM -0700, Adrian Chadd wrote: > On 7 September 2013 14:29, Slawa Olhovchenkov wrote: > > > > > I think we can aim to get this stuff snuck into -HEAD after 10 branches > > > off. Sneaking it into -HEAD now would be way too risky. We can always MFC > > > it later on to hit 10.1 or something. > > > > I think now -HEAD can't be more risky by one or two patches. > > > Hah, the ol' "it's already broken, we can't possibly make it worse" > argument. :-) It's -HEAD! :) But yes, I fear try -HEAD after June. It's broken verty often. > It's ultimately up to re@ at this point, but personally I think adding a > last minute patch to loader primarily for a feature that we'd also have to > rush in as well is too risky. A lot has changed in -HEAD over the last few > weeks and in my opinion we should let the dust settle and get people using > the latest -HEAD before trying out even more new stuff. As we can see by activity in list planed: ipf 5.1, native iSCSI, switch off GCC (with broken by clang kernel part), patch ld.so and many others. Changed in loader and take out modules from kernel at this time is little-o. > We can always back-port it to -10 (and -9 if people want) later on in the > year. Early testing -- early complete. From owner-svn-src-head@FreeBSD.ORG Sat Sep 7 22:07:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C3A3FEFB; Sat, 7 Sep 2013 22:07:37 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A25EC27CA; Sat, 7 Sep 2013 22:07:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r87M7b7f020356; Sat, 7 Sep 2013 22:07:37 GMT (envelope-from markm@svn.freebsd.org) Received: (from markm@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r87M7aEI020346; Sat, 7 Sep 2013 22:07:36 GMT (envelope-from markm@svn.freebsd.org) Message-Id: <201309072207.r87M7aEI020346@svn.freebsd.org> From: Mark Murray Date: Sat, 7 Sep 2013 22:07:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255379 - head/sys/dev/random X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Sep 2013 22:07:37 -0000 Author: markm Date: Sat Sep 7 22:07:36 2013 New Revision: 255379 URL: http://svnweb.freebsd.org/changeset/base/255379 Log: Fix the build; Certain linkable symbols need to always be present. Pass the pointy hat please. Also unblock the software (Yarrow) generator for now. This will be reverted; Yarrow needs to block until secure, not this behaviour of serving as soon as asked. Folks with specific requiremnts will be able to (can!) unblock this device with any write, and are encouraged to do so in /etc/rc.d/* scripting. ("Any" in this case could be "echo '' > /dev/random" as root). Modified: head/sys/dev/random/pseudo_rng.c head/sys/dev/random/random_adaptors.c head/sys/dev/random/random_adaptors.h head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev.h head/sys/dev/random/randomdev_soft.c Modified: head/sys/dev/random/pseudo_rng.c ============================================================================== --- head/sys/dev/random/pseudo_rng.c Sat Sep 7 20:52:31 2013 (r255378) +++ head/sys/dev/random/pseudo_rng.c Sat Sep 7 22:07:36 2013 (r255379) @@ -39,6 +39,12 @@ __FBSDID("$FreeBSD$"); static struct mtx pseudo_random_block_mtx; +/* Used to fake out unused random calls in random_adaptor */ +void +random_null_func(void) +{ +} + static int pseudo_random_block_read(void *buf __unused, int c __unused) { Modified: head/sys/dev/random/random_adaptors.c ============================================================================== --- head/sys/dev/random/random_adaptors.c Sat Sep 7 20:52:31 2013 (r255378) +++ head/sys/dev/random/random_adaptors.c Sat Sep 7 22:07:36 2013 (r255379) @@ -53,6 +53,8 @@ static struct sx adaptors_lock; /* need /* List for the dynamic sysctls */ static struct sysctl_ctx_list random_clist; +struct random_adaptor *random_adaptor; + MALLOC_DEFINE(M_RANDOM_ADAPTORS, "random_adaptors", "Random adaptors buffers"); int @@ -230,7 +232,7 @@ random_sysctl_active_adaptor_handler(SYS int error; name = NULL; - rsp = random_get_active_adaptor(); + rsp = random_adaptor; if (rsp != NULL) { sx_slock(&adaptors_lock); Modified: head/sys/dev/random/random_adaptors.h ============================================================================== --- head/sys/dev/random/random_adaptors.h Sat Sep 7 20:52:31 2013 (r255378) +++ head/sys/dev/random/random_adaptors.h Sat Sep 7 22:07:36 2013 (r255379) @@ -41,6 +41,8 @@ struct random_adaptor *random_adaptor_ge int random_adaptor_register(const char *, struct random_adaptor *); void random_adaptor_choose(struct random_adaptor **); +extern struct random_adaptor *random_adaptor; + /* * random_adaptor's should be registered prior to * random module (SI_SUB_DRIVERS/SI_ORDER_MIDDLE) Modified: head/sys/dev/random/randomdev.c ============================================================================== --- head/sys/dev/random/randomdev.c Sat Sep 7 20:52:31 2013 (r255378) +++ head/sys/dev/random/randomdev.c Sat Sep 7 22:07:36 2013 (r255379) @@ -72,27 +72,12 @@ static struct cdevsw random_cdevsw = { .d_name = "random", }; -static struct random_adaptor *random_adaptor; static eventhandler_tag attach_tag; static int random_inited; - /* For use with make_dev(9)/destroy_dev(9). */ static struct cdev *random_dev; -/* Used to fake out unused random calls in random_adaptor */ -void -random_null_func(void) -{ -} - -struct random_adaptor * -random_get_active_adaptor(void) -{ - - return (random_adaptor); -} - /* ARGSUSED */ static int random_close(struct cdev *dev __unused, int flags, int fmt __unused, Modified: head/sys/dev/random/randomdev.h ============================================================================== --- head/sys/dev/random/randomdev.h Sat Sep 7 20:52:31 2013 (r255378) +++ head/sys/dev/random/randomdev.h Sat Sep 7 22:07:36 2013 (r255379) @@ -53,4 +53,3 @@ struct random_adaptor { extern void random_ident_hardware(struct random_adaptor **); extern void random_null_func(void); -struct random_adaptor *random_get_active_adaptor(void); Modified: head/sys/dev/random/randomdev_soft.c ============================================================================== --- head/sys/dev/random/randomdev_soft.c Sat Sep 7 20:52:31 2013 (r255378) +++ head/sys/dev/random/randomdev_soft.c Sat Sep 7 22:07:36 2013 (r255379) @@ -79,7 +79,7 @@ static struct random_adaptor random_cont .write = randomdev_write, .poll = randomdev_poll, .reseed = randomdev_flush_reseed, - .seeded = 0, + .seeded = 1, }; #define RANDOM_MODULE_NAME yarrow #define RANDOM_CSPRNG_NAME "yarrow" @@ -95,7 +95,7 @@ static struct random_adaptor random_cont .write = randomdev_write, .poll = randomdev_poll, .reseed = randomdev_flush_reseed, - .seeded = 0, + .seeded = 1, }; #define RANDOM_MODULE_NAME fortuna #define RANDOM_CSPRNG_NAME "fortuna"