From owner-svn-src-stable-10@freebsd.org Mon Aug 8 06:34:01 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F524BB12AD; Mon, 8 Aug 2016 06:34:01 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E92B618B4; Mon, 8 Aug 2016 06:34:00 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u786Xxxm027633; Mon, 8 Aug 2016 06:33:59 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u786XxlJ027632; Mon, 8 Aug 2016 06:33:59 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201608080633.u786XxlJ027632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 8 Aug 2016 06:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303827 - stable/10/sys/dev/hyperv/storvsc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2016 06:34:01 -0000 Author: sephe Date: Mon Aug 8 06:33:59 2016 New Revision: 303827 URL: https://svnweb.freebsd.org/changeset/base/303827 Log: MFC 303737 hyperv/storvsc: Claim SPC-3 conformance, thus enable UNMAP support The Hyper-V on pre-win10 systems will only report SPC-2 conformance, but it actually conforms to SPC-3. The INQUIRY response is adjusted to propagate the SPC-3 version information to CAM. Submitted by: Hongjiang Zhang Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7405 Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Mon Aug 8 06:33:57 2016 (r303826) +++ stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Mon Aug 8 06:33:59 2016 (r303827) @@ -2062,8 +2062,8 @@ storvsc_io_done(struct hv_storvsc_reques * For more information about INQUIRY, please refer to: * ftp://ftp.avc-pioneer.com/Mtfuji_7/Proposal/Jun09/INQUIRY.pdf */ - const struct scsi_inquiry_data *inq_data = - (const struct scsi_inquiry_data *)csio->data_ptr; + struct scsi_inquiry_data *inq_data = + (struct scsi_inquiry_data *)csio->data_ptr; uint8_t* resp_buf = (uint8_t*)csio->data_ptr; /* Get the buffer length reported by host */ int resp_xfer_len = vm_srb->transfer_len; @@ -2092,6 +2092,25 @@ storvsc_io_done(struct hv_storvsc_reques mtx_unlock(&sc->hs_lock); } } else { + char vendor[16]; + cam_strvis(vendor, inq_data->vendor, sizeof(inq_data->vendor), + sizeof(vendor)); + /** + * XXX: upgrade SPC2 to SPC3 if host is WIN8 or WIN2012 R2 + * in order to support UNMAP feature + */ + if (!strncmp(vendor,"Msft",4) && + SID_ANSI_REV(inq_data) == SCSI_REV_SPC2 && + (vmstor_proto_version == VMSTOR_PROTOCOL_VERSION_WIN8_1 || + vmstor_proto_version== VMSTOR_PROTOCOL_VERSION_WIN8)) { + inq_data->version = SCSI_REV_SPC3; + if (bootverbose) { + mtx_lock(&sc->hs_lock); + xpt_print(ccb->ccb_h.path, + "storvsc upgrades SPC2 to SPC3\n"); + mtx_unlock(&sc->hs_lock); + } + } ccb->ccb_h.status |= CAM_REQ_CMP; if (bootverbose) { mtx_lock(&sc->hs_lock); From owner-svn-src-stable-10@freebsd.org Mon Aug 8 18:11:00 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2ABFBB3F8B; Mon, 8 Aug 2016 18:11:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9551A1732; Mon, 8 Aug 2016 18:11:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u78IAxmn097379; Mon, 8 Aug 2016 18:10:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u78IAxGl097378; Mon, 8 Aug 2016 18:10:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201608081810.u78IAxGl097378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 8 Aug 2016 18:10:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303843 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2016 18:11:01 -0000 Author: bdrewery Date: Mon Aug 8 18:10:59 2016 New Revision: 303843 URL: https://svnweb.freebsd.org/changeset/base/303843 Log: MFC r280330,r282567: r280330: fork: assign refed credentials earlier r282567: Fix up panics when fork fails due to hitting proc limit PR: D7431 Modified: stable/10/sys/kern/kern_fork.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_fork.c ============================================================================== --- stable/10/sys/kern/kern_fork.c Mon Aug 8 18:10:30 2016 (r303842) +++ stable/10/sys/kern/kern_fork.c Mon Aug 8 18:10:59 2016 (r303843) @@ -412,9 +412,6 @@ do_fork(struct thread *td, int flags, st p2->p_treeflag = 0; p2->p_filemon = NULL; - crhold(td->td_ucred); - proc_set_cred(p2, td->td_ucred); - /* Tell the prison that we exist. */ prison_proc_hold(p2->p_ucred->cr_prison); @@ -875,7 +872,7 @@ fork1(struct thread *td, int flags, int td2 = thread_alloc(pages); if (td2 == NULL) { error = ENOMEM; - goto fail1; + goto fail2; } proc_linkup(newproc, td2); } else { @@ -884,7 +881,7 @@ fork1(struct thread *td, int flags, int vm_thread_dispose(td2); if (!thread_alloc_stack(td2, pages)) { error = ENOMEM; - goto fail1; + goto fail2; } } } @@ -893,7 +890,7 @@ fork1(struct thread *td, int flags, int vm2 = vmspace_fork(p1->p_vmspace, &mem_charged); if (vm2 == NULL) { error = ENOMEM; - goto fail1; + goto fail2; } if (!swap_reserve(mem_charged)) { /* @@ -904,7 +901,7 @@ fork1(struct thread *td, int flags, int */ swap_reserve_force(mem_charged); error = ENOMEM; - goto fail1; + goto fail2; } } else vm2 = NULL; @@ -913,7 +910,7 @@ fork1(struct thread *td, int flags, int * XXX: This is ugly; when we copy resource usage, we need to bump * per-cred resource counters. */ - proc_set_cred(newproc, p1->p_ucred); + proc_set_cred(newproc, crhold(td->td_ucred)); /* * Initialize resource accounting for the child process. @@ -974,6 +971,9 @@ fork1(struct thread *td, int flags, int #endif racct_proc_exit(newproc); fail1: + crfree(newproc->p_ucred); + newproc->p_ucred = NULL; +fail2: if (vm2 != NULL) vmspace_free(vm2); uma_zfree(proc_zone, newproc); From owner-svn-src-stable-10@freebsd.org Mon Aug 8 18:31:29 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9362CBB2C2F; Mon, 8 Aug 2016 18:31:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7145A11B3; Mon, 8 Aug 2016 18:31:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u78IVStE006497; Mon, 8 Aug 2016 18:31:28 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u78IVSBZ006493; Mon, 8 Aug 2016 18:31:28 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201608081831.u78IVSBZ006493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 8 Aug 2016 18:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303846 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2016 18:31:29 -0000 Author: bdrewery Date: Mon Aug 8 18:31:28 2016 New Revision: 303846 URL: https://svnweb.freebsd.org/changeset/base/303846 Log: MFC r280331: cred: add proc_set_cred_init helper PR: D7431 Modified: stable/10/sys/kern/init_main.c stable/10/sys/kern/kern_fork.c stable/10/sys/kern/kern_prot.c stable/10/sys/sys/ucred.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/init_main.c ============================================================================== --- stable/10/sys/kern/init_main.c Mon Aug 8 18:30:50 2016 (r303845) +++ stable/10/sys/kern/init_main.c Mon Aug 8 18:31:28 2016 (r303846) @@ -520,7 +520,7 @@ proc0_init(void *dummy __unused) newcred->cr_ruidinfo = uifind(0); newcred->cr_prison = &prison0; newcred->cr_loginclass = loginclass_find("default"); - proc_set_cred(p, newcred); + proc_set_cred_init(p, newcred); #ifdef AUDIT audit_cred_kproc0(newcred); #endif Modified: stable/10/sys/kern/kern_fork.c ============================================================================== --- stable/10/sys/kern/kern_fork.c Mon Aug 8 18:30:50 2016 (r303845) +++ stable/10/sys/kern/kern_fork.c Mon Aug 8 18:31:28 2016 (r303846) @@ -910,7 +910,7 @@ fork1(struct thread *td, int flags, int * XXX: This is ugly; when we copy resource usage, we need to bump * per-cred resource counters. */ - proc_set_cred(newproc, crhold(td->td_ucred)); + proc_set_cred_init(newproc, crhold(td->td_ucred)); /* * Initialize resource accounting for the child process. Modified: stable/10/sys/kern/kern_prot.c ============================================================================== --- stable/10/sys/kern/kern_prot.c Mon Aug 8 18:30:50 2016 (r303845) +++ stable/10/sys/kern/kern_prot.c Mon Aug 8 18:31:28 2016 (r303846) @@ -1957,8 +1957,19 @@ cred_update_thread(struct thread *td) } /* + * Set initial process credentials. + * Callers are responsible for providing the reference for provided credentials. + */ +void +proc_set_cred_init(struct proc *p, struct ucred *newcred) +{ + + p->p_ucred = newcred; +} + +/* * Change process credentials. - * Callers are responsible for providing the reference for current credentials + * Callers are responsible for providing the reference for passed credentials * and for freeing old ones. * * Process has to be locked except when it does not have credentials (as it @@ -1971,9 +1982,10 @@ proc_set_cred(struct proc *p, struct ucr { struct ucred *oldcred; + MPASS(p->p_ucred != NULL); if (newcred == NULL) MPASS(p->p_state == PRS_ZOMBIE); - else if (p->p_ucred != NULL) + else PROC_LOCK_ASSERT(p, MA_OWNED); oldcred = p->p_ucred; Modified: stable/10/sys/sys/ucred.h ============================================================================== --- stable/10/sys/sys/ucred.h Mon Aug 8 18:30:50 2016 (r303845) +++ stable/10/sys/sys/ucred.h Mon Aug 8 18:31:28 2016 (r303846) @@ -106,6 +106,7 @@ struct ucred *crcopysafe(struct proc *p, struct ucred *crdup(struct ucred *cr); void crextend(struct ucred *cr, int n); void cred_update_thread(struct thread *td); +void proc_set_cred_init(struct proc *p, struct ucred *cr); struct ucred *proc_set_cred(struct proc *p, struct ucred *cr); void crfree(struct ucred *cr); struct ucred *crget(void); From owner-svn-src-stable-10@freebsd.org Mon Aug 8 19:44:14 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A132BB2492; Mon, 8 Aug 2016 19:44:14 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A56217F5; Mon, 8 Aug 2016 19:44:14 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u78JiDbN033815; Mon, 8 Aug 2016 19:44:13 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u78JiDo3033814; Mon, 8 Aug 2016 19:44:13 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201608081944.u78JiDo3033814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Mon, 8 Aug 2016 19:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303850 - stable/10/sys/netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2016 19:44:14 -0000 Author: kp Date: Mon Aug 8 19:44:13 2016 New Revision: 303850 URL: https://svnweb.freebsd.org/changeset/base/303850 Log: MFC r290521: pf: Fix broken rule skip calculation r289932 accidentally broke the rule skip calculation. The address family argument to PF_ANEQ() is now important, and because it was set to 0 the macro always evaluated to false. This resulted in incorrect skip values, which in turn broke the rule evaluations. Modified: stable/10/sys/netpfil/pf/pf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Mon Aug 8 19:43:07 2016 (r303849) +++ stable/10/sys/netpfil/pf/pf.c Mon Aug 8 19:44:13 2016 (r303850) @@ -1985,9 +1985,9 @@ pf_addr_wrap_neq(struct pf_addr_wrap *aw switch (aw1->type) { case PF_ADDR_ADDRMASK: case PF_ADDR_RANGE: - if (PF_ANEQ(&aw1->v.a.addr, &aw2->v.a.addr, 0)) + if (PF_ANEQ(&aw1->v.a.addr, &aw2->v.a.addr, AF_INET6)) return (1); - if (PF_ANEQ(&aw1->v.a.mask, &aw2->v.a.mask, 0)) + if (PF_ANEQ(&aw1->v.a.mask, &aw2->v.a.mask, AF_INET6)) return (1); return (0); case PF_ADDR_DYNIFTL: From owner-svn-src-stable-10@freebsd.org Mon Aug 8 20:29:34 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 549CEBB30F0; Mon, 8 Aug 2016 20:29:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0626D16BC; Mon, 8 Aug 2016 20:29:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u78KTXO1048975; Mon, 8 Aug 2016 20:29:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u78KTXrB048972; Mon, 8 Aug 2016 20:29:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201608082029.u78KTXrB048972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Aug 2016 20:29:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303856 - stable/10/release/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2016 20:29:34 -0000 Author: gjb Date: Mon Aug 8 20:29:32 2016 New Revision: 303856 URL: https://svnweb.freebsd.org/changeset/base/303856 Log: Increase the IMX (CUBOX-HUMMINGBOARD, WANDBOARD) image size to successfully build. While here, add the SRCBRANCH to the CUBOX-HUMMINGBOARD.conf and GUMSTIX.conf. This is a direct commit to stable/10, as the images for stable/11 are already larger than this. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/arm/CUBOX-HUMMINGBOARD.conf stable/10/release/arm/GUMSTIX.conf stable/10/release/arm/WANDBOARD.conf Modified: stable/10/release/arm/CUBOX-HUMMINGBOARD.conf ============================================================================== --- stable/10/release/arm/CUBOX-HUMMINGBOARD.conf Mon Aug 8 20:25:04 2016 (r303855) +++ stable/10/release/arm/CUBOX-HUMMINGBOARD.conf Mon Aug 8 20:29:32 2016 (r303856) @@ -3,13 +3,14 @@ # $FreeBSD$ # +SRCBRANCH="base/stable/10@rHEAD" EMBEDDEDBUILD=1 EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-cubox-hummingboard" KERNEL="IMX6" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x12000000" -IMAGE_SIZE="480M" +IMAGE_SIZE="495M" PART_SCHEME="MBR" FAT_SIZE="50m -b 16384" FAT_TYPE="16" Modified: stable/10/release/arm/GUMSTIX.conf ============================================================================== --- stable/10/release/arm/GUMSTIX.conf Mon Aug 8 20:25:04 2016 (r303855) +++ stable/10/release/arm/GUMSTIX.conf Mon Aug 8 20:29:32 2016 (r303856) @@ -3,6 +3,7 @@ # $FreeBSD$ # +SRCBRANCH="base/stable/10@rHEAD" EMBEDDEDBUILD=1 EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" Modified: stable/10/release/arm/WANDBOARD.conf ============================================================================== --- stable/10/release/arm/WANDBOARD.conf Mon Aug 8 20:25:04 2016 (r303855) +++ stable/10/release/arm/WANDBOARD.conf Mon Aug 8 20:29:32 2016 (r303856) @@ -10,7 +10,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-wandboard" KERNEL="IMX6" WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x12000000" -IMAGE_SIZE="480M" +IMAGE_SIZE="495M" PART_SCHEME="MBR" FAT_SIZE="50m -b 16384" FAT_TYPE="16" From owner-svn-src-stable-10@freebsd.org Mon Aug 8 23:18:28 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B3EBBB35B4; Mon, 8 Aug 2016 23:18:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 206A6152F; Mon, 8 Aug 2016 23:18:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u78NIRCH011425; Mon, 8 Aug 2016 23:18:27 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u78NIRWW011423; Mon, 8 Aug 2016 23:18:27 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201608082318.u78NIRWW011423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 8 Aug 2016 23:18:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303861 - in stable: 10/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2016 23:18:28 -0000 Author: gjb Date: Mon Aug 8 23:18:27 2016 New Revision: 303861 URL: https://svnweb.freebsd.org/changeset/base/303861 Log: Document missing ENs and SAs. Reviewed by: brd Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/errata.xml stable/10/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/9/release/doc/share/xml/errata.xml stable/9/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/errata.xml ============================================================================== --- stable/10/release/doc/share/xml/errata.xml Mon Aug 8 21:45:39 2016 (r303860) +++ stable/10/release/doc/share/xml/errata.xml Mon Aug 8 23:18:27 2016 (r303861) @@ -19,7 +19,34 @@ - + FreeBSD-EN-16:06.libc + 4 May 2016 + Performance regression in libc + &man.hash.3; + + + + FreeBSD-EN-16:07.ipi + 4 May 2016 + Excessive latency in x86 IPI + delivery + + + + FreeBSD-EN-16:08.zfs + 4 May 2016 + Memory leak in ZFS + + + + FreeBSD-EN-16:09.freebsd-update + 25 July 2016 + Fix &man.freebsd-update.8; support of + &os; 11.0-RELEASE Modified: stable/10/release/doc/share/xml/security.xml ============================================================================== --- stable/10/release/doc/share/xml/security.xml Mon Aug 8 21:45:39 2016 (r303860) +++ stable/10/release/doc/share/xml/security.xml Mon Aug 8 23:18:27 2016 (r303861) @@ -19,7 +19,81 @@ - + FreeBSD-SA-16:09.ntp + 29 April 2016 + Multiple ntp + vulnerabilities. + + + + FreeBSD-SA-16:17.openssl + 29 April 2016 + Multiple OpenSSL + vulnerabilities. + + + + FreeBSD-SA-16:18.atkbd + 17 May 2016 + Keyboard driver buffer overflow + + + + FreeBSD-SA-16:19.sendmsg + 17 May 2016 + Incorrect argument handling in + &man.sendmsg.2; + + + + FreeBSD-SA-16:20.linux + 31 May 2016 + Kernel stack disclosure in Linux compatibility + layer + + + + FreeBSD-SA-16:21.43bsd + 31 May 2016 + Kernel stack disclosure in 4.3BSD compatibility + layer + + + + FreeBSD-SA-16:22.libarchive + 31 May 2016 + Absolute path traversal + vulnerability + + + + FreeBSD-SA-16:23.libarchive + 31 May 2016 + Absolute path traversal + vulnerability + + + + FreeBSD-SA-16:24.ntp + 3 June 2016 + Multiple ntp + vulnerabilties + + + + FreeBSD-SA-16:25.bspatch + 25 July 2016 + heap overflow vulnerability From owner-svn-src-stable-10@freebsd.org Tue Aug 9 03:47:39 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5B28BB39C8; Tue, 9 Aug 2016 03:47:39 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 956251B19; Tue, 9 Aug 2016 03:47:39 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u793lcnV011246; Tue, 9 Aug 2016 03:47:38 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u793lc66011245; Tue, 9 Aug 2016 03:47:38 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201608090347.u793lc66011245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 9 Aug 2016 03:47:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303865 - stable/10/sbin/pfctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2016 03:47:39 -0000 Author: loos Date: Tue Aug 9 03:47:38 2016 New Revision: 303865 URL: https://svnweb.freebsd.org/changeset/base/303865 Log: MFC r303760: Fix a regression in pf.conf while parsing the 'interval' keyword. The bug was introduced by r287009. PR: 210924 Submitted by: kp@ Sponsored by: Rubicon Communications (Netgate) Modified: stable/10/sbin/pfctl/parse.y Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/pfctl/parse.y ============================================================================== --- stable/10/sbin/pfctl/parse.y Tue Aug 9 03:39:21 2016 (r303864) +++ stable/10/sbin/pfctl/parse.y Tue Aug 9 03:47:38 2016 (r303865) @@ -4384,6 +4384,16 @@ timeout_spec : STRING NUMBER } free($1); } + | INTERVAL NUMBER { + if (check_rulestate(PFCTL_STATE_OPTION)) + YYERROR; + if ($2 < 0 || $2 > UINT_MAX) { + yyerror("only positive values permitted"); + YYERROR; + } + if (pfctl_set_timeout(pf, "interval", $2, 0) != 0) + YYERROR; + } ; timeout_list : timeout_list comma timeout_spec optnl From owner-svn-src-stable-10@freebsd.org Tue Aug 9 18:49:21 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15623BB4B06; Tue, 9 Aug 2016 18:49:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D616E1F6A; Tue, 9 Aug 2016 18:49:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u79InKYI050714; Tue, 9 Aug 2016 18:49:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u79InJqP050711; Tue, 9 Aug 2016 18:49:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201608091849.u79InJqP050711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 9 Aug 2016 18:49:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303882 - in stable/10/usr.bin/grep: . regex X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2016 18:49:21 -0000 Author: dim Date: Tue Aug 9 18:49:19 2016 New Revision: 303882 URL: https://svnweb.freebsd.org/changeset/base/303882 Log: MFC r270132 (by gabor): - Do not look for more matching lines if -L is specified Submitted by: eadler (based on) MFC r296799 (by ian): Fix a bug in bsdgrep that caused the program to hang in a tight loop for some combinations of command line options and search patterns. The code was examining regexec flags looking for a regcomp flag value. The fix is to look in the struct field where the decoded regcomp flag was stored when the regex was compiled. With this fix, it's possible to build WITHOUT_GNU_GREP_COMPAT and WITH_BSDGREP and have a usable GPL-free grep (which of course lacks gnugrep extensions). It now passes the kyua tests except for one test that requires the -z/--null-data gnu extension, and one test involving outputting context lines across multiple files which appears to sometimes output an extra delimiter line ("--") between matches (a rather obscure failure of a rather obscure feature, so bsdgrep should be generally usable now). MFC r303676: Fix a segfault in bsdgrep when parsing the invalid extended regexps "?" or "+" (these are invalid, because there is no preceding operand). When bsdgrep attempts to emulate GNU grep in discarding and ignoring the invalid ? or + operators, some later logic in tre_compile_fast() goes beyond the end of the buffer, leading to a crash. Fix this by bailing out, and reporting a bad pattern instead. Reported by: Steve Kargl Modified: stable/10/usr.bin/grep/regex/glue.h stable/10/usr.bin/grep/regex/tre-fastmatch.c stable/10/usr.bin/grep/util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/grep/regex/glue.h ============================================================================== --- stable/10/usr.bin/grep/regex/glue.h Tue Aug 9 17:57:11 2016 (r303881) +++ stable/10/usr.bin/grep/regex/glue.h Tue Aug 9 18:49:19 2016 (r303882) @@ -50,7 +50,7 @@ typedef enum { STR_WIDE, STR_BYTE, STR_M if ((long long)pmatch[0].rm_eo - pmatch[0].rm_so < 0) \ return REG_NOMATCH; \ ret = fn; \ - for (unsigned i = 0; (!(eflags & REG_NOSUB) && (i < nmatch)); i++)\ + for (unsigned i = 0; (!preg->nosub && (i < nmatch)); i++) \ { \ pmatch[i].rm_so += offset; \ pmatch[i].rm_eo += offset; \ Modified: stable/10/usr.bin/grep/regex/tre-fastmatch.c ============================================================================== --- stable/10/usr.bin/grep/regex/tre-fastmatch.c Tue Aug 9 17:57:11 2016 (r303881) +++ stable/10/usr.bin/grep/regex/tre-fastmatch.c Tue Aug 9 18:49:19 2016 (r303882) @@ -621,7 +621,7 @@ tre_compile_fast(fastmatch_t *fg, const case TRE_CHAR('+'): case TRE_CHAR('?'): if ((cflags & REG_EXTENDED) && (i == 0)) - continue; + goto badpat; else if ((cflags & REG_EXTENDED) ^ !escaped) STORE_CHAR; else Modified: stable/10/usr.bin/grep/util.c ============================================================================== --- stable/10/usr.bin/grep/util.c Tue Aug 9 17:57:11 2016 (r303881) +++ stable/10/usr.bin/grep/util.c Tue Aug 9 18:49:19 2016 (r303882) @@ -336,7 +336,7 @@ procline(struct str *l, int nottext) } /* One pass if we are not recording matches */ - if (!wflag && ((color == NULL && !oflag) || qflag || lflag)) + if (!wflag && ((color == NULL && !oflag) || qflag || lflag || Lflag)) break; if (st == (size_t)pmatch.rm_so) From owner-svn-src-stable-10@freebsd.org Tue Aug 9 18:59:17 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30677BB4D60; Tue, 9 Aug 2016 18:59:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0219218AE; Tue, 9 Aug 2016 18:59:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u79IxGIw054649; Tue, 9 Aug 2016 18:59:16 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u79IxGVO054648; Tue, 9 Aug 2016 18:59:16 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201608091859.u79IxGVO054648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 9 Aug 2016 18:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303885 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2016 18:59:17 -0000 Author: jhb Date: Tue Aug 9 18:59:16 2016 New Revision: 303885 URL: https://svnweb.freebsd.org/changeset/base/303885 Log: MFC 303503: Don't treat NOCPU as a valid CPU to CPU_ISSET. If a thread is created bound to a cpuset it might already be bound before its very first timeslice, and td_lastcpu will be NOCPU in that case. Modified: stable/10/sys/kern/sched_4bsd.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/kern/sched_4bsd.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/kern/sched_4bsd.c ============================================================================== --- stable/10/sys/kern/sched_4bsd.c Tue Aug 9 18:56:29 2016 (r303884) +++ stable/10/sys/kern/sched_4bsd.c Tue Aug 9 18:59:16 2016 (r303885) @@ -1235,7 +1235,7 @@ sched_pickcpu(struct thread *td) mtx_assert(&sched_lock, MA_OWNED); - if (THREAD_CAN_SCHED(td, td->td_lastcpu)) + if (td->td_lastcpu != NOCPU && THREAD_CAN_SCHED(td, td->td_lastcpu)) best = td->td_lastcpu; else best = NOCPU; From owner-svn-src-stable-10@freebsd.org Wed Aug 10 12:36:55 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9178DBB357E; Wed, 10 Aug 2016 12:36:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A88A1F80; Wed, 10 Aug 2016 12:36:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7ACasFS050021; Wed, 10 Aug 2016 12:36:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7ACasoD050017; Wed, 10 Aug 2016 12:36:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201608101236.u7ACasoD050017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 10 Aug 2016 12:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303907 - stable/10/sys/fs/pseudofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2016 12:36:55 -0000 Author: kib Date: Wed Aug 10 12:36:54 2016 New Revision: 303907 URL: https://svnweb.freebsd.org/changeset/base/303907 Log: MFC r303704: Some style changes. Fix a typo in comment. MFC r303705: Remove Giant asserts. Update comment. Modified: stable/10/sys/fs/pseudofs/pseudofs.c stable/10/sys/fs/pseudofs/pseudofs.h stable/10/sys/fs/pseudofs/pseudofs_fileno.c stable/10/sys/fs/pseudofs/pseudofs_vncache.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/pseudofs/pseudofs.c ============================================================================== --- stable/10/sys/fs/pseudofs/pseudofs.c Wed Aug 10 12:34:49 2016 (r303906) +++ stable/10/sys/fs/pseudofs/pseudofs.c Wed Aug 10 12:36:54 2016 (r303907) @@ -383,11 +383,9 @@ pfs_init(struct pfs_info *pi, struct vfs struct pfs_node *root; int error; - mtx_assert(&Giant, MA_OWNED); - pfs_fileno_init(pi); - /* set up the root diretory */ + /* set up the root directory */ root = pfs_alloc_node(pi, "/", pfstype_root); pi->pi_root = root; pfs_fileno_alloc(root); @@ -414,8 +412,6 @@ pfs_uninit(struct pfs_info *pi, struct v { int error; - mtx_assert(&Giant, MA_OWNED); - pfs_destroy(pi->pi_root); pi->pi_root = NULL; pfs_fileno_uninit(pi); Modified: stable/10/sys/fs/pseudofs/pseudofs.h ============================================================================== --- stable/10/sys/fs/pseudofs/pseudofs.h Wed Aug 10 12:34:49 2016 (r303906) +++ stable/10/sys/fs/pseudofs/pseudofs.h Wed Aug 10 12:36:54 2016 (r303907) @@ -189,16 +189,16 @@ typedef int (*pfs_destroy_t)(PFS_DESTROY /* * pfs_info: describes a pseudofs instance * - * The pi_mutex is only used to avoid using the global subr_unit lock for - * unrhdr. The rest of struct pfs_info is only modified while Giant is - * held (during vfs_init() and vfs_uninit()). + * The pi_mutex is only used to avoid using the global subr_unit lock + * for unrhdr. The rest of struct pfs_info is only modified during + * vfs_init() and vfs_uninit() of the consumer filesystem. */ struct pfs_info { char pi_name[PFS_FSNAMELEN]; pfs_init_t pi_init; pfs_init_t pi_uninit; - /* members below this line are initialized at run time*/ + /* members below this line are initialized at run time */ struct pfs_node *pi_root; struct mtx pi_mutex; struct unrhdr *pi_unrhdr; @@ -285,17 +285,17 @@ static int \ _##name##_mount(struct mount *mp) { \ if (jflag && !prison_allow(curthread->td_ucred, jflag)) \ return (EPERM); \ - return pfs_mount(&name##_info, mp); \ + return (pfs_mount(&name##_info, mp)); \ } \ \ static int \ _##name##_init(struct vfsconf *vfc) { \ - return pfs_init(&name##_info, vfc); \ + return (pfs_init(&name##_info, vfc)); \ } \ \ static int \ _##name##_uninit(struct vfsconf *vfc) { \ - return pfs_uninit(&name##_info, vfc); \ + return (pfs_uninit(&name##_info, vfc)); \ } \ \ static struct vfsops name##_vfsops = { \ Modified: stable/10/sys/fs/pseudofs/pseudofs_fileno.c ============================================================================== --- stable/10/sys/fs/pseudofs/pseudofs_fileno.c Wed Aug 10 12:34:49 2016 (r303906) +++ stable/10/sys/fs/pseudofs/pseudofs_fileno.c Wed Aug 10 12:36:54 2016 (r303907) @@ -52,7 +52,6 @@ void pfs_fileno_init(struct pfs_info *pi) { - mtx_assert(&Giant, MA_OWNED); mtx_init(&pi->pi_mutex, "pfs_fileno", NULL, MTX_DEF); pi->pi_unrhdr = new_unrhdr(3, INT_MAX / NO_PID, &pi->pi_mutex); } @@ -64,7 +63,6 @@ void pfs_fileno_uninit(struct pfs_info *pi) { - mtx_assert(&Giant, MA_OWNED); delete_unrhdr(pi->pi_unrhdr); pi->pi_unrhdr = NULL; mtx_destroy(&pi->pi_mutex); Modified: stable/10/sys/fs/pseudofs/pseudofs_vncache.c ============================================================================== --- stable/10/sys/fs/pseudofs/pseudofs_vncache.c Wed Aug 10 12:34:49 2016 (r303906) +++ stable/10/sys/fs/pseudofs/pseudofs_vncache.c Wed Aug 10 12:36:54 2016 (r303907) @@ -84,7 +84,6 @@ void pfs_vncache_load(void) { - mtx_assert(&Giant, MA_OWNED); mtx_init(&pfs_vncache_mutex, "pfs_vncache", NULL, MTX_DEF); pfs_exit_tag = EVENTHANDLER_REGISTER(process_exit, pfs_exit, NULL, EVENTHANDLER_PRI_ANY); @@ -97,7 +96,6 @@ void pfs_vncache_unload(void) { - mtx_assert(&Giant, MA_OWNED); EVENTHANDLER_DEREGISTER(process_exit, pfs_exit_tag); KASSERT(pfs_vncache_entries == 0, ("%d vncache entries remaining", pfs_vncache_entries)); From owner-svn-src-stable-10@freebsd.org Wed Aug 10 12:56:03 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BA31BB4052; Wed, 10 Aug 2016 12:56:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE9AD12D8; Wed, 10 Aug 2016 12:56:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7ACu1pd057584; Wed, 10 Aug 2016 12:56:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7ACu12w057580; Wed, 10 Aug 2016 12:56:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201608101256.u7ACu12w057580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 10 Aug 2016 12:56:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303910 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2016 12:56:03 -0000 Author: kib Date: Wed Aug 10 12:56:01 2016 New Revision: 303910 URL: https://svnweb.freebsd.org/changeset/base/303910 Log: MFC r303710: Remove unneeded (recursing) Giant acquisition around vprintf(9). MFC r303715: Remove ncl_printf(), use printf(9) directly. Modified: stable/10/sys/fs/nfsclient/nfs_clbio.c stable/10/sys/fs/nfsclient/nfs_clsubs.c stable/10/sys/fs/nfsclient/nfs_clvnops.c stable/10/sys/fs/nfsclient/nfsnode.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clbio.c Wed Aug 10 12:53:30 2016 (r303909) +++ stable/10/sys/fs/nfsclient/nfs_clbio.c Wed Aug 10 12:56:01 2016 (r303910) @@ -105,7 +105,7 @@ ncl_getpages(struct vop_getpages_args *a count = ap->a_count; if ((object = vp->v_object) == NULL) { - ncl_printf("nfs_getpages: called with non-merged cache vnode??\n"); + printf("ncl_getpages: called with non-merged cache vnode\n"); return (VM_PAGER_ERROR); } @@ -113,7 +113,7 @@ ncl_getpages(struct vop_getpages_args *a mtx_lock(&np->n_mtx); if ((np->n_flag & NNONCACHE) && (vp->v_type == VREG)) { mtx_unlock(&np->n_mtx); - ncl_printf("nfs_getpages: called on non-cacheable vnode??\n"); + printf("ncl_getpages: called on non-cacheable vnode\n"); return (VM_PAGER_ERROR); } else mtx_unlock(&np->n_mtx); @@ -176,7 +176,7 @@ ncl_getpages(struct vop_getpages_args *a relpbuf(bp, &ncl_pbuf_freecnt); if (error && (uio.uio_resid == count)) { - ncl_printf("nfs_getpages: error %d\n", error); + printf("ncl_getpages: error %d\n", error); VM_OBJECT_WLOCK(object); for (i = 0; i < npages; ++i) { if (i != ap->a_reqpage) { @@ -283,7 +283,7 @@ ncl_putpages(struct vop_putpages_args *a if (newnfs_directio_enable && !newnfs_directio_allow_mmap && (np->n_flag & NNONCACHE) && (vp->v_type == VREG)) { mtx_unlock(&np->n_mtx); - ncl_printf("ncl_putpages: called on noncache-able vnode??\n"); + printf("ncl_putpages: called on noncache-able vnode\n"); mtx_lock(&np->n_mtx); } @@ -694,7 +694,7 @@ ncl_bioread(struct vnode *vp, struct uio n = np->n_direofoffset - uio->uio_offset; break; default: - ncl_printf(" ncl_bioread: type %x unexpected\n", vp->v_type); + printf(" ncl_bioread: type %x unexpected\n", vp->v_type); bp = NULL; break; }; @@ -1137,7 +1137,7 @@ again: */ if (bp->b_dirtyend > bcount) { - ncl_printf("NFS append race @%lx:%d\n", + printf("NFS append race @%lx:%d\n", (long)bp->b_blkno * DEV_BSIZE, bp->b_dirtyend - bcount); bp->b_dirtyend = bcount; @@ -1678,7 +1678,7 @@ ncl_doio(struct vnode *vp, struct buf *b bp->b_flags |= B_INVAL; break; default: - ncl_printf("ncl_doio: type %x unexpected\n", vp->v_type); + printf("ncl_doio: type %x unexpected\n", vp->v_type); break; }; if (error) { Modified: stable/10/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clsubs.c Wed Aug 10 12:53:30 2016 (r303909) +++ stable/10/sys/fs/nfsclient/nfs_clsubs.c Wed Aug 10 12:56:01 2016 (r303910) @@ -163,18 +163,6 @@ ncl_downgrade_vnlock(struct vnode *vp, i } } -void -ncl_printf(const char *fmt, ...) -{ - va_list ap; - - mtx_lock(&Giant); - va_start(ap, fmt); - vprintf(fmt, ap); - va_end(ap); - mtx_unlock(&Giant); -} - #ifdef NFS_ACDEBUG #include SYSCTL_DECL(_vfs_nfs); @@ -199,16 +187,13 @@ ncl_getattrcache(struct vnode *vp, struc vap = &np->n_vattr.na_vattr; nmp = VFSTONFS(vp->v_mount); mustflush = nfscl_mustflush(vp); /* must be before mtx_lock() */ -#ifdef NFS_ACDEBUG - mtx_lock(&Giant); /* ncl_printf() */ -#endif mtx_lock(&np->n_mtx); /* XXX n_mtime doesn't seem to be updated on a miss-and-reload */ timeo = (time_second - np->n_mtime.tv_sec) / 10; #ifdef NFS_ACDEBUG if (nfs_acdebug>1) - ncl_printf("nfs_getattrcache: initial timeo = %d\n", timeo); + printf("ncl_getattrcache: initial timeo = %d\n", timeo); #endif if (vap->va_type == VDIR) { @@ -225,22 +210,19 @@ ncl_getattrcache(struct vnode *vp, struc #ifdef NFS_ACDEBUG if (nfs_acdebug > 2) - ncl_printf("acregmin %d; acregmax %d; acdirmin %d; acdirmax %d\n", - nmp->nm_acregmin, nmp->nm_acregmax, - nmp->nm_acdirmin, nmp->nm_acdirmax); + printf("acregmin %d; acregmax %d; acdirmin %d; acdirmax %d\n", + nmp->nm_acregmin, nmp->nm_acregmax, + nmp->nm_acdirmin, nmp->nm_acdirmax); if (nfs_acdebug) - ncl_printf("nfs_getattrcache: age = %d; final timeo = %d\n", - (time_second - np->n_attrstamp), timeo); + printf("ncl_getattrcache: age = %d; final timeo = %d\n", + (time_second - np->n_attrstamp), timeo); #endif if ((time_second - np->n_attrstamp) >= timeo && (mustflush != 0 || np->n_attrstamp == 0)) { newnfsstats.attrcache_misses++; mtx_unlock(&np->n_mtx); -#ifdef NFS_ACDEBUG - mtx_unlock(&Giant); /* ncl_printf() */ -#endif KDTRACE_NFS_ATTRCACHE_GET_MISS(vp); return( ENOENT); } @@ -268,9 +250,6 @@ ncl_getattrcache(struct vnode *vp, struc vaper->va_mtime = np->n_mtim; } mtx_unlock(&np->n_mtx); -#ifdef NFS_ACDEBUG - mtx_unlock(&Giant); /* ncl_printf() */ -#endif KDTRACE_NFS_ATTRCACHE_GET_HIT(vp, vap); return (0); } Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvnops.c Wed Aug 10 12:53:30 2016 (r303909) +++ stable/10/sys/fs/nfsclient/nfs_clvnops.c Wed Aug 10 12:56:01 2016 (r303910) @@ -1786,7 +1786,7 @@ nfs_rename(struct vop_rename_args *ap) } if (fvp == tvp) { - ncl_printf("nfs_rename: fvp == tvp (can't happen)\n"); + printf("nfs_rename: fvp == tvp (can't happen)\n"); error = 0; goto out; } @@ -2314,7 +2314,7 @@ ncl_readdirrpc(struct vnode *vp, struct dnp->n_direofoffset = uiop->uio_offset; else { if (uiop->uio_resid > 0) - ncl_printf("EEK! readdirrpc resid > 0\n"); + printf("EEK! readdirrpc resid > 0\n"); ncl_dircookie_lock(dnp); cookiep = ncl_getcookie(dnp, uiop->uio_offset, 1); *cookiep = cookie; @@ -2373,7 +2373,7 @@ ncl_readdirplusrpc(struct vnode *vp, str dnp->n_direofoffset = uiop->uio_offset; else { if (uiop->uio_resid > 0) - ncl_printf("EEK! readdirplusrpc resid > 0\n"); + printf("EEK! readdirplusrpc resid > 0\n"); ncl_dircookie_lock(dnp); cookiep = ncl_getcookie(dnp, uiop->uio_offset, 1); *cookiep = cookie; @@ -3146,8 +3146,8 @@ nfs_print(struct vop_print_args *ap) struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); - ncl_printf("\tfileid %ld fsid 0x%x", - np->n_vattr.na_fileid, np->n_vattr.na_fsid); + printf("\tfileid %ld fsid 0x%x", np->n_vattr.na_fileid, + np->n_vattr.na_fsid); if (vp->v_type == VFIFO) fifo_printinfo(vp); printf("\n"); Modified: stable/10/sys/fs/nfsclient/nfsnode.h ============================================================================== --- stable/10/sys/fs/nfsclient/nfsnode.h Wed Aug 10 12:53:30 2016 (r303909) +++ stable/10/sys/fs/nfsclient/nfsnode.h Wed Aug 10 12:56:01 2016 (r303910) @@ -185,7 +185,6 @@ nfsuint64 *ncl_getcookie(struct nfsnode void ncl_invaldir(struct vnode *); int ncl_upgrade_vnlock(struct vnode *); void ncl_downgrade_vnlock(struct vnode *, int); -void ncl_printf(const char *, ...); void ncl_dircookie_lock(struct nfsnode *); void ncl_dircookie_unlock(struct nfsnode *); From owner-svn-src-stable-10@freebsd.org Wed Aug 10 14:00:09 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D496BB4A41; Wed, 10 Aug 2016 14:00:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2ADB61222; Wed, 10 Aug 2016 14:00:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7AE080h080182; Wed, 10 Aug 2016 14:00:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7AE07JG080181; Wed, 10 Aug 2016 14:00:07 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201608101400.u7AE07JG080181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 10 Aug 2016 14:00:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303917 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2016 14:00:09 -0000 Author: gjb Date: Wed Aug 10 14:00:07 2016 New Revision: 303917 URL: https://svnweb.freebsd.org/changeset/base/303917 Log: MFC r303782: Fix GCE image publication. The gcutil utility is deprecated in favor of gcloud. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile.gce Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile.gce ============================================================================== --- stable/10/release/Makefile.gce Wed Aug 10 13:50:21 2016 (r303916) +++ stable/10/release/Makefile.gce Wed Aug 10 14:00:07 2016 (r303917) @@ -35,7 +35,7 @@ gce-check-depends: @false . endif .endfor -.if !exists(/usr/local/bin/gcutil) +.if !exists(/usr/local/bin/gcloud) . if !exists(${PORTSDIR}/net/google-cloud-sdk/Makefile) . if !exists(/usr/local/sbin/pkg-static) env ASSUME_ALWAYS_YES=yes pkg bootstrap -yf @@ -63,7 +63,7 @@ gce-do-upload: /usr/local/bin/gsutil mb gs://${GCE_BUCKET} || true /usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET}.tar.gz \ gs://${GCE_BUCKET}/ - /usr/local/bin/gcutil addimage ${GCE_TARGET} \ - gs://${GCE_BUCKET}/${GCE_TARGET}.tar.gz + /usr/local/bin/gcloud compute images create ${GCE_TARGET} \ + --source-uri gs://${GCE_BUCKET}/${GCE_TARGET}.tar.gz touch ${.OBJDIR}/${.TARGET} From owner-svn-src-stable-10@freebsd.org Wed Aug 10 16:31:17 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26729BB4BBD; Wed, 10 Aug 2016 16:31:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E72D81B93; Wed, 10 Aug 2016 16:31:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7AGVFGt038501; Wed, 10 Aug 2016 16:31:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7AGVF4j038500; Wed, 10 Aug 2016 16:31:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201608101631.u7AGVF4j038500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 10 Aug 2016 16:31:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303925 - stable/10/share/examples/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2016 16:31:17 -0000 Author: jhb Date: Wed Aug 10 16:31:15 2016 New Revision: 303925 URL: https://svnweb.freebsd.org/changeset/base/303925 Log: MFC 273102: Use '-e' to check if the virtio backing file has already been created. The '-f' check works fine on a regular file but not if the backing file is a device (e.g., /dev/md0). In this case it would print a misleading but otherwise benign message about the backing file not being present. PR: 210410 Modified: stable/10/share/examples/bhyve/vmrun.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/bhyve/vmrun.sh ============================================================================== --- stable/10/share/examples/bhyve/vmrun.sh Wed Aug 10 16:12:31 2016 (r303924) +++ stable/10/share/examples/bhyve/vmrun.sh Wed Aug 10 16:31:15 2016 (r303925) @@ -177,7 +177,7 @@ make_and_check_diskdev() { local virtio_diskdev="$1" # Create the virtio diskdev file if needed - if [ ! -f ${virtio_diskdev} ]; then + if [ ! -e ${virtio_diskdev} ]; then echo "virtio disk device file \"${virtio_diskdev}\" does not exist." echo "Creating it ..." truncate -s 8G ${virtio_diskdev} > /dev/null From owner-svn-src-stable-10@freebsd.org Wed Aug 10 20:34:26 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42A04BB4EEA; Wed, 10 Aug 2016 20:34:26 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1392A1B08; Wed, 10 Aug 2016 20:34:26 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7AKYPag032153; Wed, 10 Aug 2016 20:34:25 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7AKYPGT032152; Wed, 10 Aug 2016 20:34:25 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201608102034.u7AKYPGT032152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 10 Aug 2016 20:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303940 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2016 20:34:26 -0000 Author: alc Date: Wed Aug 10 20:34:25 2016 New Revision: 303940 URL: https://svnweb.freebsd.org/changeset/base/303940 Log: MFC r303773 Correct a spelling error. Modified: stable/10/sys/vm/vm_pageout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_pageout.c ============================================================================== --- stable/10/sys/vm/vm_pageout.c Wed Aug 10 20:31:10 2016 (r303939) +++ stable/10/sys/vm/vm_pageout.c Wed Aug 10 20:34:25 2016 (r303940) @@ -243,7 +243,7 @@ static boolean_t vm_pageout_page_lock(vm /* * Initialize a dummy page for marking the caller's place in the specified * paging queue. In principle, this function only needs to set the flag - * PG_MARKER. Nonetheless, it wirte busies and initializes the hold count + * PG_MARKER. Nonetheless, it write busies and initializes the hold count * to one as safety precautions. */ static void From owner-svn-src-stable-10@freebsd.org Fri Aug 12 07:57:29 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AAFDBB716F; Fri, 12 Aug 2016 07:57:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4C0E1418; Fri, 12 Aug 2016 07:57:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7C7vS1H025850; Fri, 12 Aug 2016 07:57:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7C7vSKd025849; Fri, 12 Aug 2016 07:57:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201608120757.u7C7vSKd025849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 12 Aug 2016 07:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303993 - stable/10/sys/dev/sound/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2016 07:57:29 -0000 Author: hselasky Date: Fri Aug 12 07:57:27 2016 New Revision: 303993 URL: https://svnweb.freebsd.org/changeset/base/303993 Log: MFC r301039: Add support for simplex USB MIDI devices, which only provide BULK or INTERRUPT endpoints for moving data in one direction, like the KeyRig 49 from M-Audio. Requested by: Ivan Klymenko Modified: stable/10/sys/dev/sound/usb/uaudio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Fri Aug 12 07:57:03 2016 (r303992) +++ stable/10/sys/dev/sound/usb/uaudio.c Fri Aug 12 07:57:27 2016 (r303993) @@ -663,6 +663,7 @@ static const struct usb_config .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = UMIDI_TX_BUFFER, + .flags = {.no_pipe_ok = 1}, .callback = &umidi_bulk_write_callback, }, @@ -671,7 +672,7 @@ static const struct usb_config .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, .bufsize = 4, /* bytes */ - .flags = {.short_xfer_ok = 1,.proxy_buffer = 1,}, + .flags = {.short_xfer_ok = 1,.proxy_buffer = 1,.no_pipe_ok = 1}, .callback = &umidi_bulk_read_callback, }, }; @@ -5760,7 +5761,16 @@ umidi_start_write(struct usb_fifo *fifo) { struct umidi_chan *chan = usb_fifo_softc(fifo); - usbd_transfer_start(chan->xfer[UMIDI_TX_TRANSFER]); + if (chan->xfer[UMIDI_TX_TRANSFER] == NULL) { + uint8_t buf[1]; + int actlen; + do { + /* dump data */ + usb_fifo_get_data_linear(fifo, buf, 1, &actlen, 0); + } while (actlen > 0); + } else { + usbd_transfer_start(chan->xfer[UMIDI_TX_TRANSFER]); + } } static void @@ -5878,6 +5888,11 @@ umidi_probe(device_t dev) DPRINTF("error=%s\n", usbd_errstr(error)); goto detach; } + if (chan->xfer[UMIDI_TX_TRANSFER] == NULL && + chan->xfer[UMIDI_RX_TRANSFER] == NULL) { + DPRINTF("no BULK or INTERRUPT MIDI endpoint(s) found\n"); + goto detach; + } /* * Some USB MIDI device makers couldn't resist using @@ -5891,7 +5906,8 @@ umidi_probe(device_t dev) * and 64-byte maximum packet sizes for full-speed bulk * endpoints and 512 bytes for high-speed bulk endpoints." */ - if (usbd_xfer_maxp_was_clamped(chan->xfer[UMIDI_TX_TRANSFER])) + if (chan->xfer[UMIDI_TX_TRANSFER] != NULL && + usbd_xfer_maxp_was_clamped(chan->xfer[UMIDI_TX_TRANSFER])) chan->single_command = 1; if (chan->single_command != 0) From owner-svn-src-stable-10@freebsd.org Fri Aug 12 08:05:41 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4BD4BB7820; Fri, 12 Aug 2016 08:05:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 937251E60; Fri, 12 Aug 2016 08:05:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7C85edY029546; Fri, 12 Aug 2016 08:05:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7C85ekN029545; Fri, 12 Aug 2016 08:05:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201608120805.u7C85ekN029545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 12 Aug 2016 08:05:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303996 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2016 08:05:41 -0000 Author: hselasky Date: Fri Aug 12 08:05:40 2016 New Revision: 303996 URL: https://svnweb.freebsd.org/changeset/base/303996 Log: MFC r302371: Fix regression issue with XHCI on 32-bit ARMv7 Armada-38x. Make sure "struct xhci_dev_ctx_addr" fits into a single 4K page until further. Modified: stable/10/sys/dev/usb/controller/xhci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.h Fri Aug 12 08:03:31 2016 (r303995) +++ stable/10/sys/dev/usb/controller/xhci.h Fri Aug 12 08:05:40 2016 (r303996) @@ -30,7 +30,7 @@ #define XHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128) #define XHCI_MAX_ENDPOINTS 32 /* hardcoded - do not change */ -#define XHCI_MAX_SCRATCHPADS 1024 +#define XHCI_MAX_SCRATCHPADS 256 /* theoretical max is 1023 */ #define XHCI_MAX_EVENTS (16 * 13) #define XHCI_MAX_COMMANDS (16 * 1) #define XHCI_MAX_RSEG 1 From owner-svn-src-stable-10@freebsd.org Fri Aug 12 19:06:32 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1961BB7E41; Fri, 12 Aug 2016 19:06:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B21A21375; Fri, 12 Aug 2016 19:06:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7CJ6UIJ075416; Fri, 12 Aug 2016 19:06:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7CJ6Us1075415; Fri, 12 Aug 2016 19:06:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201608121906.u7CJ6Us1075415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 Aug 2016 19:06:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r304014 - in stable: 10/release 11/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2016 19:06:32 -0000 Author: gjb Date: Fri Aug 12 19:06:29 2016 New Revision: 304014 URL: https://svnweb.freebsd.org/changeset/base/304014 Log: MFC r303897: Pass overrides to make(1) when building ports for arm/armv6 targets, similar to what is done for the run-autotools-fixup override for non-arm targets. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/release.sh Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/release.sh Directory Properties: stable/11/ (props changed) Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Fri Aug 12 18:53:08 2016 (r304013) +++ stable/10/release/release.sh Fri Aug 12 19:06:29 2016 (r304014) @@ -281,9 +281,15 @@ extra_chroot_setup() { fi if [ ! -z "${EMBEDDEDPORTS}" ]; then + _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) + REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) + BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) + PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" + PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" + PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" for _PORT in ${EMBEDDEDPORTS}; do eval chroot ${CHROOTDIR} make -C /usr/ports/${_PORT} \ - BATCH=1 FORCE_PKG_REGISTER=1 install clean distclean + FORCE_PKG_REGISTER=1 ${PBUILD_FLAGS} install clean distclean done fi From owner-svn-src-stable-10@freebsd.org Fri Aug 12 19:43:08 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EE4FBB3C34; Fri, 12 Aug 2016 19:43:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 405941137; Fri, 12 Aug 2016 19:43:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7CJh7Pw090417; Fri, 12 Aug 2016 19:43:07 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7CJh6R7090408; Fri, 12 Aug 2016 19:43:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201608121943.u7CJh6R7090408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 12 Aug 2016 19:43:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r304017 - in stable/10: lib/libc/sys sys/kern sys/sys tests/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2016 19:43:08 -0000 Author: jhb Date: Fri Aug 12 19:43:06 2016 New Revision: 304017 URL: https://svnweb.freebsd.org/changeset/base/304017 Log: MFC 292894,292896: Add ptrace(2) reporting for LWP events. 292894: Add ptrace(2) reporting for LWP events. Add two new LWPINFO flags: PL_FLAG_BORN and PL_FLAG_EXITED for reporting thread creation and destruction. Newly created threads will stop to report PL_FLAG_BORN before returning to userland and exiting threads will stop to report PL_FLAG_EXIT before exiting completely. Both of these events are only enabled and reported if PT_LWP_EVENTS is enabled on a process. 292896: Document the recently added support for ptrace(2) LWP events. Modified: stable/10/lib/libc/sys/ptrace.2 stable/10/sys/kern/kern_fork.c stable/10/sys/kern/kern_sig.c stable/10/sys/kern/kern_thr.c stable/10/sys/kern/sys_process.c stable/10/sys/sys/proc.h stable/10/sys/sys/ptrace.h stable/10/tests/sys/kern/ptrace_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/ptrace.2 ============================================================================== --- stable/10/lib/libc/sys/ptrace.2 Fri Aug 12 19:31:41 2016 (r304016) +++ stable/10/lib/libc/sys/ptrace.2 Fri Aug 12 19:43:06 2016 (r304017) @@ -2,7 +2,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd October 20, 2015 +.Dd December 29, 2015 .Dt PTRACE 2 .Os .Sh NAME @@ -372,6 +372,20 @@ The flag is set for first event reported automatically attached due to .Dv PT_FOLLOW_FORK enabled. +.It PL_FLAG_BORN +This flag is set for the first event reported from a new LWP when LWP +events are enabled via +.Dv PT_LWP_EVENTS . +It is reported along with +.Dv PL_FLAG_SCX +and is always reported if LWP events are enabled. +.It PL_FLAG_EXITED +This flag is set for the last event reported by an exiting LWP when +LWP events are enabled via +.Dv PT_LWP_EVENTS . +Note that this event is not reported when the last LWP in a process exits. +The termination of the last thread is reported via a normal process exit +event. .El .It pl_sigmask The current signal mask of the LWP @@ -463,6 +477,29 @@ Child processes do not inherit this prop The traced process will set the .Dv PL_FLAG_FORKED flag upon exit from a system call that creates a new process. +.It PT_LWP_EVENTS +This request controls tracing of LWP creation and destruction. +If +.Fa data +is non-zero, +then LWPs will stop to report creation and destruction events. +If +.Fa data +is zero, +then LWP creation and destruction events will not be reported. +By default, tracing is not enabled for LWP events. +Child processes do not inherit this property. +New LWPs will stop to report an event with +.Dv PL_FLAG_BORN +set before executing their first instruction. +Exiting LWPs will stop to report an event with +.Dv PL_FLAG_EXITED +set before completing their termination. +.Pp +Note that new processes do not report an event for the creation of their +initial thread, +and exiting processes do not report an event for the termination of the +last thread. .It PT_VM_TIMESTAMP This request returns the generation number or timestamp of the memory map of the traced process as the return value from Modified: stable/10/sys/kern/kern_fork.c ============================================================================== --- stable/10/sys/kern/kern_fork.c Fri Aug 12 19:31:41 2016 (r304016) +++ stable/10/sys/kern/kern_fork.c Fri Aug 12 19:43:06 2016 (r304017) @@ -1083,7 +1083,7 @@ fork_return(struct thread *td, struct tr cv_broadcast(&p->p_dbgwait); } PROC_UNLOCK(p); - } else if (p->p_flag & P_TRACED) { + } else if (p->p_flag & P_TRACED || td->td_dbgflags & TDB_BORN) { /* * This is the start of a new thread in a traced * process. Report a system call exit event. @@ -1091,9 +1091,10 @@ fork_return(struct thread *td, struct tr PROC_LOCK(p); td->td_dbgflags |= TDB_SCX; _STOPEVENT(p, S_SCX, td->td_dbg_sc_code); - if ((p->p_stops & S_PT_SCX) != 0) + if ((p->p_stops & S_PT_SCX) != 0 || + (td->td_dbgflags & TDB_BORN) != 0) ptracestop(td, SIGTRAP); - td->td_dbgflags &= ~TDB_SCX; + td->td_dbgflags &= ~(TDB_SCX | TDB_BORN); PROC_UNLOCK(p); } Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Fri Aug 12 19:31:41 2016 (r304016) +++ stable/10/sys/kern/kern_sig.c Fri Aug 12 19:43:06 2016 (r304017) @@ -2488,7 +2488,12 @@ ptracestop(struct thread *td, int sig) td->td_tid, p->p_pid, td->td_dbgflags, sig); PROC_SLOCK(p); while ((p->p_flag & P_TRACED) && (td->td_dbgflags & TDB_XSIG)) { - if (p->p_flag & P_SINGLE_EXIT) { + if (p->p_flag & P_SINGLE_EXIT && + !(td->td_dbgflags & TDB_EXIT)) { + /* + * Ignore ptrace stops except for thread exit + * events when the process exits. + */ td->td_dbgflags &= ~TDB_XSIG; PROC_SUNLOCK(p); return (sig); Modified: stable/10/sys/kern/kern_thr.c ============================================================================== --- stable/10/sys/kern/kern_thr.c Fri Aug 12 19:31:41 2016 (r304016) +++ stable/10/sys/kern/kern_thr.c Fri Aug 12 19:43:06 2016 (r304017) @@ -252,6 +252,8 @@ thread_create(struct thread *td, struct thread_unlock(td); if (P_SHOULDSTOP(p)) newtd->td_flags |= TDF_ASTPENDING | TDF_NEEDSUSPCHK; + if (p->p_flag2 & P2_LWP_EVENTS) + newtd->td_dbgflags |= TDB_BORN; PROC_UNLOCK(p); tidhash_add(newtd); @@ -314,29 +316,54 @@ kern_thr_exit(struct thread *td) p = td->td_proc; - rw_wlock(&tidhash_lock); + /* + * If all of the threads in a process call this routine to + * exit (e.g. all threads call pthread_exit()), exactly one + * thread should return to the caller to terminate the process + * instead of the thread. + * + * Checking p_numthreads alone is not sufficient since threads + * might be committed to terminating while the PROC_LOCK is + * dropped in either ptracestop() or while removing this thread + * from the tidhash. Instead, the p_pendingexits field holds + * the count of threads in either of those states and a thread + * is considered the "last" thread if all of the other threads + * in a process are already terminating. + */ PROC_LOCK(p); - - if (p->p_numthreads != 1) { - racct_sub(p, RACCT_NTHR, 1); - LIST_REMOVE(td, td_hash); - rw_wunlock(&tidhash_lock); - tdsigcleanup(td); - umtx_thread_exit(td); - PROC_SLOCK(p); - thread_stopped(p); - thread_exit(); - /* NOTREACHED */ + if (p->p_numthreads == p->p_pendingexits + 1) { + /* + * Ignore attempts to shut down last thread in the + * proc. This will actually call _exit(2) in the + * usermode trampoline when it returns. + */ + PROC_UNLOCK(p); + return (0); } + p->p_pendingexits++; + td->td_dbgflags |= TDB_EXIT; + if (p->p_flag & P_TRACED && p->p_flag2 & P2_LWP_EVENTS) + ptracestop(td, SIGTRAP); + PROC_UNLOCK(p); + tidhash_remove(td); + PROC_LOCK(p); + p->p_pendingexits--; + /* - * Ignore attempts to shut down last thread in the proc. This - * will actually call _exit(2) in the usermode trampoline when - * it returns. + * The check above should prevent all other threads from this + * process from exiting while the PROC_LOCK is dropped, so + * there must be at least one other thread other than the + * current thread. */ - PROC_UNLOCK(p); - rw_wunlock(&tidhash_lock); - return (0); + KASSERT(p->p_numthreads > 1, ("too few threads")); + racct_sub(p, RACCT_NTHR, 1); + tdsigcleanup(td); + umtx_thread_exit(td); + PROC_SLOCK(p); + thread_stopped(p); + thread_exit(); + /* NOTREACHED */ } int Modified: stable/10/sys/kern/sys_process.c ============================================================================== --- stable/10/sys/kern/sys_process.c Fri Aug 12 19:31:41 2016 (r304016) +++ stable/10/sys/kern/sys_process.c Fri Aug 12 19:43:06 2016 (r304017) @@ -666,6 +666,7 @@ kern_ptrace(struct thread *td, int req, case PT_TO_SCX: case PT_SYSCALL: case PT_FOLLOW_FORK: + case PT_LWP_EVENTS: case PT_DETACH: sx_xlock(&proctree_lock); proctree_locked = 1; @@ -905,6 +906,16 @@ kern_ptrace(struct thread *td, int req, p->p_flag &= ~P_FOLLOWFORK; break; + case PT_LWP_EVENTS: + CTR3(KTR_PTRACE, "PT_LWP_EVENTS: pid %d %s -> %s", p->p_pid, + p->p_flag2 & P2_LWP_EVENTS ? "enabled" : "disabled", + data ? "enabled" : "disabled"); + if (data) + p->p_flag2 |= P2_LWP_EVENTS; + else + p->p_flag2 &= ~P2_LWP_EVENTS; + break; + case PT_STEP: case PT_CONTINUE: case PT_TO_SCE: @@ -1227,6 +1238,10 @@ kern_ptrace(struct thread *td, int req, } if (td2->td_dbgflags & TDB_CHILD) pl->pl_flags |= PL_FLAG_CHILD; + if (td2->td_dbgflags & TDB_BORN) + pl->pl_flags |= PL_FLAG_BORN; + if (td2->td_dbgflags & TDB_EXIT) + pl->pl_flags |= PL_FLAG_EXITED; pl->pl_sigmask = td2->td_sigmask; pl->pl_siglist = td2->td_siglist; strcpy(pl->pl_tdname, td2->td_name); Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Fri Aug 12 19:31:41 2016 (r304016) +++ stable/10/sys/sys/proc.h Fri Aug 12 19:43:06 2016 (r304017) @@ -396,6 +396,8 @@ do { \ #define TDB_STOPATFORK 0x00000080 /* Stop at the return from fork (child only) */ #define TDB_CHILD 0x00000100 /* New child indicator for ptrace() */ +#define TDB_BORN 0x00000200 /* New LWP indicator for ptrace() */ +#define TDB_EXIT 0x00000400 /* Exiting LWP indicator for ptrace() */ /* * "Private" flags kept in td_pflags: @@ -551,6 +553,7 @@ struct proc { int p_pendingcnt; /* how many signals are pending */ struct itimers *p_itimers; /* (c) POSIX interval timers. */ struct procdesc *p_procdesc; /* (e) Process descriptor, if any. */ + int p_pendingexits; /* (c) Count of pending thread exits. */ /* End area that is zeroed on creation. */ #define p_endzero p_magic @@ -674,6 +677,7 @@ struct proc { #define P2_NOTRACE 0x00000002 /* No ptrace(2) attach or coredumps. */ #define P2_NOTRACE_EXEC 0x00000004 /* Keep P2_NOPTRACE on exec(2). */ #define P2_AST_SU 0x00000008 /* Handles SU ast for kthreads. */ +#define P2_LWP_EVENTS 0x00000010 /* Report LWP events via ptrace(2). */ /* Flags protected by proctree_lock, kept in p_treeflags. */ #define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ Modified: stable/10/sys/sys/ptrace.h ============================================================================== --- stable/10/sys/sys/ptrace.h Fri Aug 12 19:31:41 2016 (r304016) +++ stable/10/sys/sys/ptrace.h Fri Aug 12 19:43:06 2016 (r304017) @@ -64,6 +64,7 @@ #define PT_SYSCALL 22 #define PT_FOLLOW_FORK 23 +#define PT_LWP_EVENTS 24 /* report LWP birth and exit */ #define PT_GETREGS 33 /* get general-purpose registers */ #define PT_SETREGS 34 /* set general-purpose registers */ @@ -108,6 +109,8 @@ struct ptrace_lwpinfo { #define PL_FLAG_SI 0x20 /* siginfo is valid */ #define PL_FLAG_FORKED 0x40 /* new child */ #define PL_FLAG_CHILD 0x80 /* I am from child */ +#define PL_FLAG_BORN 0x100 /* new LWP */ +#define PL_FLAG_EXITED 0x200 /* exiting LWP */ sigset_t pl_sigmask; /* LWP signal mask */ sigset_t pl_siglist; /* LWP pending signal */ struct __siginfo pl_siginfo; /* siginfo for signal */ Modified: stable/10/tests/sys/kern/ptrace_test.c ============================================================================== --- stable/10/tests/sys/kern/ptrace_test.c Fri Aug 12 19:31:41 2016 (r304016) +++ stable/10/tests/sys/kern/ptrace_test.c Fri Aug 12 19:43:06 2016 (r304017) @@ -1008,6 +1008,16 @@ simple_thread(void *arg __unused) pthread_exit(NULL); } +static __dead2 void +simple_thread_main(void) +{ + pthread_t thread; + + CHILD_REQUIRE(pthread_create(&thread, NULL, simple_thread, NULL) == 0); + CHILD_REQUIRE(pthread_join(thread, NULL) == 0); + exit(1); +} + /* * Verify that pl_syscall_code in struct ptrace_lwpinfo for a new * thread reports the correct value. @@ -1022,14 +1032,8 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { - pthread_t thread; - trace_me(); - - CHILD_REQUIRE(pthread_create(&thread, NULL, simple_thread, - NULL) == 0); - CHILD_REQUIRE(pthread_join(thread, NULL) == 0); - exit(1); + simple_thread_main(); } /* The first wait() should report the stop from SIGSTOP. */ @@ -1092,6 +1096,179 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall ATF_REQUIRE(errno == ECHILD); } +/* + * Verify that the expected LWP events are reported for a child thread. + */ +ATF_TC_WITHOUT_HEAD(ptrace__lwp_events); +ATF_TC_BODY(ptrace__lwp_events, tc) +{ + struct ptrace_lwpinfo pl; + pid_t fpid, wpid; + lwpid_t lwps[2]; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + simple_thread_main(); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + lwps[0] = pl.pl_lwpid; + + ATF_REQUIRE(ptrace(PT_LWP_EVENTS, wpid, NULL, 1) == 0); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The first event should be for the child thread's birth. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE((pl.pl_flags & (PL_FLAG_BORN | PL_FLAG_SCX)) == + (PL_FLAG_BORN | PL_FLAG_SCX)); + ATF_REQUIRE(pl.pl_lwpid != lwps[0]); + lwps[1] = pl.pl_lwpid; + + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The next event should be for the child thread's death. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE((pl.pl_flags & (PL_FLAG_EXITED | PL_FLAG_SCE)) == + (PL_FLAG_EXITED | PL_FLAG_SCE)); + ATF_REQUIRE(pl.pl_lwpid == lwps[1]); + + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The last event should be for the child process's exit. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 1); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + +static void * +exec_thread(void *arg __unused) +{ + + execl("/usr/bin/true", "true", NULL); + exit(127); +} + +static __dead2 void +exec_thread_main(void) +{ + pthread_t thread; + + CHILD_REQUIRE(pthread_create(&thread, NULL, exec_thread, NULL) == 0); + for (;;) + sleep(60); + exit(1); +} + +/* + * Verify that the expected LWP events are reported for a multithreaded + * process that calls execve(2). + */ +ATF_TC_WITHOUT_HEAD(ptrace__lwp_events_exec); +ATF_TC_BODY(ptrace__lwp_events_exec, tc) +{ + struct ptrace_lwpinfo pl; + pid_t fpid, wpid; + lwpid_t lwps[2]; + int status; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + exec_thread_main(); + } + + /* The first wait() should report the stop from SIGSTOP. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, + sizeof(pl)) != -1); + lwps[0] = pl.pl_lwpid; + + ATF_REQUIRE(ptrace(PT_LWP_EVENTS, wpid, NULL, 1) == 0); + + /* Continue the child ignoring the SIGSTOP. */ + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The first event should be for the child thread's birth. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE((pl.pl_flags & (PL_FLAG_BORN | PL_FLAG_SCX)) == + (PL_FLAG_BORN | PL_FLAG_SCX)); + ATF_REQUIRE(pl.pl_lwpid != lwps[0]); + lwps[1] = pl.pl_lwpid; + + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* + * The next event should be for the main thread's death due to + * single threading from execve(). + */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(wpid == fpid); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE((pl.pl_flags & (PL_FLAG_EXITED | PL_FLAG_SCE)) == + (PL_FLAG_EXITED)); + ATF_REQUIRE(pl.pl_lwpid == lwps[0]); + + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The next event should be for the child process's exec. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(WIFSTOPPED(status)); + ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); + ATF_REQUIRE((pl.pl_flags & (PL_FLAG_EXEC | PL_FLAG_SCX)) == + (PL_FLAG_EXEC | PL_FLAG_SCX)); + ATF_REQUIRE(pl.pl_lwpid == lwps[1]); + + ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + + /* The last event should be for the child process's exit. */ + wpid = waitpid(fpid, &status, 0); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 0); + + wpid = wait(&status); + ATF_REQUIRE(wpid == -1); + ATF_REQUIRE(errno == ECHILD); +} + ATF_TP_ADD_TCS(tp) { @@ -1110,6 +1287,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, ptrace__new_child_pl_syscall_code_fork); ATF_TP_ADD_TC(tp, ptrace__new_child_pl_syscall_code_vfork); ATF_TP_ADD_TC(tp, ptrace__new_child_pl_syscall_code_thread); + ATF_TP_ADD_TC(tp, ptrace__lwp_events); + ATF_TP_ADD_TC(tp, ptrace__lwp_events_exec); return (atf_no_error()); } From owner-svn-src-stable-10@freebsd.org Fri Aug 12 22:00:14 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77807BB8327; Fri, 12 Aug 2016 22:00:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26FCE1B5E; Fri, 12 Aug 2016 22:00:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7CM0DaO039490; Fri, 12 Aug 2016 22:00:13 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7CM0Dxh039489; Fri, 12 Aug 2016 22:00:13 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201608122200.u7CM0Dxh039489@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 12 Aug 2016 22:00:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r304022 - stable/10/release/doc/share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2016 22:00:14 -0000 Author: gjb Date: Fri Aug 12 22:00:13 2016 New Revision: 304022 URL: https://svnweb.freebsd.org/changeset/base/304022 Log: Document EN-16:10 through EN-16:16. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/errata.xml Modified: stable/10/release/doc/share/xml/errata.xml ============================================================================== --- stable/10/release/doc/share/xml/errata.xml Fri Aug 12 21:29:44 2016 (r304021) +++ stable/10/release/doc/share/xml/errata.xml Fri Aug 12 22:00:13 2016 (r304022) @@ -48,6 +48,62 @@ Fix &man.freebsd-update.8; support of &os; 11.0-RELEASE + + + FreeBSD-EN-16:10.dhclient + 11 August 2016 + Better handle unknown options received from + aDHCP server + + + + FreeBSD-EN-16:11.vmbus + 11 August 2016 + Avoid using spin locks for channel message + locks + + + + FreeBSD-EN-16:12.hv_storvsc + 11 August 2016 + Enable INQUIRY result check only on + Windows 10 host systems + + + + FreeBSD-EN-16:13.vmbus + 11 August 2016 + Register time counter early enough for TSC freq + calibration + + + + FreeBSD-EN-16:14.hv_storvsc + 11 August 2016 + Disable incorrect callout in + &man.hv.storvsc.4; + + + + FreeBSD-EN-16:15.vmbus + 11 August 2016 + Better handle the GPADL setup failure in + Hyper-V + + + + FreeBSD-EN-16:16.hv_storvsc + 11 August 2016 + Fix SCSI INQUIRY checks and error + handling + From owner-svn-src-stable-10@freebsd.org Sat Aug 13 01:33:54 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 470D6BB828C; Sat, 13 Aug 2016 01:33:54 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16AB21EEC; Sat, 13 Aug 2016 01:33:54 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7D1XrAd022844; Sat, 13 Aug 2016 01:33:53 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7D1XrZe022843; Sat, 13 Aug 2016 01:33:53 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201608130133.u7D1XrZe022843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 13 Aug 2016 01:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r304030 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Aug 2016 01:33:54 -0000 Author: cy Date: Sat Aug 13 01:33:53 2016 New Revision: 304030 URL: https://svnweb.freebsd.org/changeset/base/304030 Log: MFC r303806: Add Logitech Unifying receiver. Modified: stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Sat Aug 13 01:32:35 2016 (r304029) +++ stable/10/sys/dev/usb/usbdevs Sat Aug 13 01:33:53 2016 (r304030) @@ -2726,6 +2726,7 @@ product LOGITECH BB13 0xc401 USB-PS/2 T product LOGITECH RK53 0xc501 Cordless mouse product LOGITECH RB6 0xc503 Cordless keyboard product LOGITECH MX700 0xc506 Cordless optical mouse +product LOGITECH UNIFYING 0xc52b Logitech Unifying Receiver product LOGITECH QUICKCAMPRO2 0xd001 QuickCam Pro /* Logitec Corp. products */