From owner-svn-src-stable-11@freebsd.org Sun Jul 14 05:41:15 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67F3515D919F; Sun, 14 Jul 2019 05:41:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0941B898EE; Sun, 14 Jul 2019 05:41:15 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8176E90; Sun, 14 Jul 2019 05:41:14 +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 x6E5fEeC044282; Sun, 14 Jul 2019 05:41:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6E5fELD044281; Sun, 14 Jul 2019 05:41:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907140541.x6E5fELD044281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 14 Jul 2019 05:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349984 - stable/11/lib/libthr/thread X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/lib/libthr/thread X-SVN-Commit-Revision: 349984 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0941B898EE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.926,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jul 2019 05:41:15 -0000 Author: kib Date: Sun Jul 14 05:41:14 2019 New Revision: 349984 URL: https://svnweb.freebsd.org/changeset/base/349984 Log: MFC r349912: Restore ability to pass NULL name argument to pthread_set_name_np(3) to clear the thread name. PR: 239142 Modified: stable/11/lib/libthr/thread/thr_info.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libthr/thread/thr_info.c ============================================================================== --- stable/11/lib/libthr/thread/thr_info.c Sun Jul 14 05:40:03 2019 (r349983) +++ stable/11/lib/libthr/thread/thr_info.c Sun Jul 14 05:41:14 2019 (r349984) @@ -50,7 +50,7 @@ thr_set_name_np(struct pthread *thread, const char *na { free(thread->name); - thread->name = strdup(name); + thread->name = name != NULL ? strdup(name) : NULL; } /* Set the thread name for debug. */ From owner-svn-src-stable-11@freebsd.org Sun Jul 14 05:41:44 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C53115D921D; Sun, 14 Jul 2019 05:41:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E7DD589BA8; Sun, 14 Jul 2019 05:41:43 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C2E75EC5; Sun, 14 Jul 2019 05:41:43 +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 x6E5fh3v047414; Sun, 14 Jul 2019 05:41:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6E5fhqY047413; Sun, 14 Jul 2019 05:41:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907140541.x6E5fhqY047413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 14 Jul 2019 05:41:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349985 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/x86/x86 X-SVN-Commit-Revision: 349985 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E7DD589BA8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.926,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jul 2019 05:41:44 -0000 Author: kib Date: Sun Jul 14 05:41:43 2019 New Revision: 349985 URL: https://svnweb.freebsd.org/changeset/base/349985 Log: MFC r349913: Ensure that mds_handler always points to a valid method. Modified: stable/11/sys/x86/x86/cpu_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/cpu_machdep.c ============================================================================== --- stable/11/sys/x86/x86/cpu_machdep.c Sun Jul 14 05:41:14 2019 (r349984) +++ stable/11/sys/x86/x86/cpu_machdep.c Sun Jul 14 05:41:43 2019 (r349985) @@ -953,7 +953,6 @@ int hw_mds_disable; * architectural state except possibly %rflags. Also, it is always * called with interrupts disabled. */ -void (*mds_handler)(void); void mds_handler_void(void); void mds_handler_verw(void); void mds_handler_ivb(void); @@ -962,6 +961,7 @@ void mds_handler_skl_sse(void); void mds_handler_skl_avx(void); void mds_handler_skl_avx512(void); void mds_handler_silvermont(void); +void (*mds_handler)(void) = mds_handler_void; static int sysctl_hw_mds_disable_state_handler(SYSCTL_HANDLER_ARGS) From owner-svn-src-stable-11@freebsd.org Mon Jul 15 08:21:50 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38196B3B08; Mon, 15 Jul 2019 08:21:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A03684A0B; Mon, 15 Jul 2019 08:21:50 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E4BC11AD60; Mon, 15 Jul 2019 08:21:49 +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 x6F8LnNT086033; Mon, 15 Jul 2019 08:21:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6F8LnvJ086032; Mon, 15 Jul 2019 08:21:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201907150821.x6F8LnvJ086032@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 15 Jul 2019 08:21:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r349993 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 349993 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1A03684A0B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.945,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jul 2019 08:21:50 -0000 Author: kib Date: Mon Jul 15 08:21:49 2019 New Revision: 349993 URL: https://svnweb.freebsd.org/changeset/base/349993 Log: MFC r349950: Style: avoid long lines by using .Fo instead of .Fn. Modified: stable/11/share/man/man9/casuword.9 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/casuword.9 ============================================================================== --- stable/11/share/man/man9/casuword.9 Mon Jul 15 08:21:21 2019 (r349992) +++ stable/11/share/man/man9/casuword.9 Mon Jul 15 08:21:49 2019 (r349993) @@ -41,13 +41,31 @@ .In sys/types.h .In sys/systm.h .Ft int -.Fn casueword "volatile u_long *base" "u_long oldval" "u_long *oldvalp" "u_long newval" +.Fo casueword +.Fa "volatile u_long *base" +.Fa "u_long oldval" +.Fa "u_long *oldvalp" +.Fa "u_long newval" +.Fc .Ft int -.Fn casueword32 "volatile uint32_t *base" "uint32_t oldval" "uint32_t *oldvalp" "uint32_t newval" +.Fo casueword32 +.Fa "volatile uint32_t *base" +.Fa "uint32_t oldval" +.Fa "uint32_t *oldvalp" +.Fa "uint32_t newval" +.Fc .Ft u_long -.Fn casuword "volatile u_long *base" "u_long oldval" "u_long newval" +.Fo casuword +.Fa "volatile u_long *base" +.Fa "u_long oldval" +.Fa "u_long newval" +.Fc .Ft uint32_t -.Fn casuword32 "volatile uint32_t *base" "uint32_t oldval" "uint32_t newval" +.Fo casuword32 +.Fa "volatile uint32_t *base" +.Fa "uint32_t oldval" +.Fa "uint32_t newval" +.Fc .Sh DESCRIPTION The .Nm From owner-svn-src-stable-11@freebsd.org Mon Jul 15 20:14:31 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CD19C2B2D; Mon, 15 Jul 2019 20:14:31 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 006DF74FBA; Mon, 15 Jul 2019 20:14:31 +0000 (UTC) (envelope-from vmaffione@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6C9022DC8; Mon, 15 Jul 2019 20:14:30 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6FKEUL2014320; Mon, 15 Jul 2019 20:14:30 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6FKEU1b014319; Mon, 15 Jul 2019 20:14:30 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201907152014.x6FKEU1b014319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Mon, 15 Jul 2019 20:14:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350007 - stable/11/sys/dev/netmap X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/sys/dev/netmap X-SVN-Commit-Revision: 350007 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 006DF74FBA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jul 2019 20:14:31 -0000 Author: vmaffione Date: Mon Jul 15 20:14:30 2019 New Revision: 350007 URL: https://svnweb.freebsd.org/changeset/base/350007 Log: MFC r349966 netmap: fix bug introduced by r349752 r349752 introduced a NULL pointer reference bug in the emulated netmap code. Reported by: lwhsu Modified: stable/11/sys/dev/netmap/netmap_generic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/netmap_generic.c ============================================================================== --- stable/11/sys/dev/netmap/netmap_generic.c Mon Jul 15 20:12:54 2019 (r350006) +++ stable/11/sys/dev/netmap/netmap_generic.c Mon Jul 15 20:14:30 2019 (r350007) @@ -1124,7 +1124,8 @@ generic_netmap_attach(struct ifnet *ifp) nm_os_generic_set_features(gna); - nm_prinf("Emulated adapter for %s created (prev was %s)", na->name, gna->prev->name); + nm_prinf("Emulated adapter for %s created (prev was %s)", na->name, + gna->prev ? gna->prev->name : "NULL"); return retval; } From owner-svn-src-stable-11@freebsd.org Mon Jul 15 20:38:56 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC376C36AD; Mon, 15 Jul 2019 20:38:56 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDBFD76264; Mon, 15 Jul 2019 20:38:56 +0000 (UTC) (envelope-from vmaffione@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A85D92313F; Mon, 15 Jul 2019 20:38:56 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6FKcu2p026561; Mon, 15 Jul 2019 20:38:56 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6FKcukE026560; Mon, 15 Jul 2019 20:38:56 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201907152038.x6FKcukE026560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Mon, 15 Jul 2019 20:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350010 - stable/11/sys/dev/netmap X-SVN-Group: stable-11 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/11/sys/dev/netmap X-SVN-Commit-Revision: 350010 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CDBFD76264 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jul 2019 20:38:57 -0000 Author: vmaffione Date: Mon Jul 15 20:38:56 2019 New Revision: 350010 URL: https://svnweb.freebsd.org/changeset/base/350010 Log: MFC r349581 netmap: fix two panics with emulated adapter This patch fixes 2 panics. The first one is due to the current VNET not being set in the emulated adapter transmission path. The second one is caused by the M_PKTHDR flag not being set when preallocated mbufs are recycled in the transmit path. Submitted by: aleksandr.fedorov@itglobal.com Reviewed by: vmaffione Differential Revision: https://reviews.freebsd.org/D20824 Modified: stable/11/sys/dev/netmap/netmap_freebsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- stable/11/sys/dev/netmap/netmap_freebsd.c Mon Jul 15 20:25:49 2019 (r350009) +++ stable/11/sys/dev/netmap/netmap_freebsd.c Mon Jul 15 20:38:56 2019 (r350010) @@ -441,6 +441,7 @@ nm_os_generic_xmit_frame(struct nm_os_gen_arg *a) m->m_ext.ext_size = len; #endif /* __FreeBSD_version >= 1100000 */ + m->m_flags |= M_PKTHDR; m->m_len = m->m_pkthdr.len = len; /* mbuf refcnt is not contended, no need to use atomic @@ -449,7 +450,9 @@ nm_os_generic_xmit_frame(struct nm_os_gen_arg *a) M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); m->m_pkthdr.flowid = a->ring_nr; m->m_pkthdr.rcvif = ifp; /* used for tx notification */ + CURVNET_SET(ifp->if_vnet); ret = NA(ifp)->if_transmit(ifp, m); + CURVNET_RESTORE(); return ret ? -1 : 0; } From owner-svn-src-stable-11@freebsd.org Tue Jul 16 15:02:30 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 14740B1C38; Tue, 16 Jul 2019 15:02:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9B7E88C02; Tue, 16 Jul 2019 15:02:29 +0000 (UTC) (envelope-from avg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C68A67A23; Tue, 16 Jul 2019 15:02:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6GF2TTM082499; Tue, 16 Jul 2019 15:02:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6GF2TSq082497; Tue, 16 Jul 2019 15:02:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201907161502.x6GF2TSq082497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 16 Jul 2019 15:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350031 - stable/11/sys/dev/iicbus X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/iicbus X-SVN-Commit-Revision: 350031 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E9B7E88C02 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 15:02:30 -0000 Author: avg Date: Tue Jul 16 15:02:28 2019 New Revision: 350031 URL: https://svnweb.freebsd.org/changeset/base/350031 Log: MFC r348355: revert r273728 and parts of r306589, iicbus no-stop by default feature After r349227 the only consumer of that broken code is gone from this branch. Modified: stable/11/sys/dev/iicbus/iicbus.c stable/11/sys/dev/iicbus/iicbus.h stable/11/sys/dev/iicbus/iiconf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iicbus/iicbus.c ============================================================================== --- stable/11/sys/dev/iicbus/iicbus.c Tue Jul 16 14:59:39 2019 (r350030) +++ stable/11/sys/dev/iicbus/iicbus.c Tue Jul 16 15:02:28 2019 (r350031) @@ -192,9 +192,6 @@ iicbus_read_ivar(device_t bus, device_t child, int whi case IICBUS_IVAR_ADDR: *result = devi->addr; break; - case IICBUS_IVAR_NOSTOP: - *result = devi->nostop; - break; } return (0); } @@ -211,9 +208,6 @@ iicbus_write_ivar(device_t bus, device_t child, int wh if (devi->addr != 0) return (EINVAL); devi->addr = value; - case IICBUS_IVAR_NOSTOP: - devi->nostop = value; - break; } return (0); } Modified: stable/11/sys/dev/iicbus/iicbus.h ============================================================================== --- stable/11/sys/dev/iicbus/iicbus.h Tue Jul 16 14:59:39 2019 (r350030) +++ stable/11/sys/dev/iicbus/iicbus.h Tue Jul 16 15:02:28 2019 (r350031) @@ -52,19 +52,16 @@ struct iicbus_ivar { uint32_t addr; struct resource_list rl; - bool nostop; }; enum { - IICBUS_IVAR_ADDR, /* Address or base address */ - IICBUS_IVAR_NOSTOP, /* nostop defaults */ + IICBUS_IVAR_ADDR /* Address or base address */ }; #define IICBUS_ACCESSOR(A, B, T) \ __BUS_ACCESSOR(iicbus, A, IICBUS, B, T) IICBUS_ACCESSOR(addr, ADDR, uint32_t) -IICBUS_ACCESSOR(nostop, NOSTOP, bool) #define IICBUS_LOCK(sc) mtx_lock(&(sc)->lock) #define IICBUS_UNLOCK(sc) mtx_unlock(&(sc)->lock) Modified: stable/11/sys/dev/iicbus/iiconf.c ============================================================================== --- stable/11/sys/dev/iicbus/iiconf.c Tue Jul 16 14:59:39 2019 (r350030) +++ stable/11/sys/dev/iicbus/iiconf.c Tue Jul 16 15:02:28 2019 (r350031) @@ -418,7 +418,7 @@ iicbus_transfer_gen(device_t dev, struct iic_msg *msgs { int i, error, lenread, lenwrote, nkid, rpstart, addr; device_t *children, bus; - bool nostop, started; + bool started; if ((error = device_get_children(dev, &children, &nkid)) != 0) return (IIC_ERESOURCE); @@ -429,7 +429,6 @@ iicbus_transfer_gen(device_t dev, struct iic_msg *msgs bus = children[0]; rpstart = 0; free(children, M_TEMP); - nostop = iicbus_get_nostop(dev); started = false; for (i = 0, error = 0; i < nmsgs && error == 0; i++) { addr = msgs[i].slave; @@ -457,12 +456,11 @@ iicbus_transfer_gen(device_t dev, struct iic_msg *msgs if (error != 0) break; - if ((msgs[i].flags & IIC_M_NOSTOP) != 0 || - (nostop && i + 1 < nmsgs)) { - rpstart = 1; /* Next message gets repeated start */ - } else { + if (!(msgs[i].flags & IIC_M_NOSTOP)) { rpstart = 0; iicbus_stop(bus); + } else { + rpstart = 1; /* Next message gets repeated start */ } } if (error != 0 && started) From owner-svn-src-stable-11@freebsd.org Tue Jul 16 15:28:42 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3886B24EC; Tue, 16 Jul 2019 15:28:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CC3089FD6; Tue, 16 Jul 2019 15:28:42 +0000 (UTC) (envelope-from avg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7951F7E20; Tue, 16 Jul 2019 15:28:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6GFSgus095403; Tue, 16 Jul 2019 15:28:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6GFSgoW095402; Tue, 16 Jul 2019 15:28:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201907161528.x6GFSgoW095402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 16 Jul 2019 15:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350034 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 350034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9CC3089FD6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 15:28:43 -0000 Author: avg Date: Tue Jul 16 15:28:41 2019 New Revision: 350034 URL: https://svnweb.freebsd.org/changeset/base/350034 Log: MFC r348688: first step towards enforcing must-succeed semantics for bus accessors Modified: stable/11/sys/sys/bus.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/bus.h ============================================================================== --- stable/11/sys/sys/bus.h Tue Jul 16 15:28:28 2019 (r350033) +++ stable/11/sys/sys/bus.h Tue Jul 16 15:28:41 2019 (r350034) @@ -787,16 +787,30 @@ DECLARE_MODULE(name##_##busname, name##_##busname##_mo static __inline type varp ## _get_ ## var(device_t dev) \ { \ uintptr_t v; \ - BUS_READ_IVAR(device_get_parent(dev), dev, \ + int e; \ + e = BUS_READ_IVAR(device_get_parent(dev), dev, \ ivarp ## _IVAR_ ## ivar, &v); \ + if (e != 0) { \ + device_printf(dev, "failed to read ivar " \ + __XSTRING(ivarp ## _IVAR_ ## ivar) " on bus %s, " \ + "error = %d\n", \ + device_get_nameunit(device_get_parent(dev)), e); \ + } \ return ((type) v); \ } \ \ static __inline void varp ## _set_ ## var(device_t dev, type t) \ { \ uintptr_t v = (uintptr_t) t; \ - BUS_WRITE_IVAR(device_get_parent(dev), dev, \ + int e; \ + e = BUS_WRITE_IVAR(device_get_parent(dev), dev, \ ivarp ## _IVAR_ ## ivar, v); \ + if (e != 0) { \ + device_printf(dev, "failed to write ivar " \ + __XSTRING(ivarp ## _IVAR_ ## ivar) " on bus %s, " \ + "error = %d\n", \ + device_get_nameunit(device_get_parent(dev)), e); \ + } \ } /** From owner-svn-src-stable-11@freebsd.org Tue Jul 16 15:37:39 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3553DB27C1; Tue, 16 Jul 2019 15:37:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 165098A69A; Tue, 16 Jul 2019 15:37:39 +0000 (UTC) (envelope-from avg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC2DC7FD4; Tue, 16 Jul 2019 15:37:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6GFbc2Z001221; Tue, 16 Jul 2019 15:37:38 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6GFbcuF001220; Tue, 16 Jul 2019 15:37:38 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201907161537.x6GFbcuF001220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 16 Jul 2019 15:37:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350036 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 350036 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 165098A69A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 15:37:39 -0000 Author: avg Date: Tue Jul 16 15:37:38 2019 New Revision: 350036 URL: https://svnweb.freebsd.org/changeset/base/350036 Log: MFC r349406: owc.4: document how to set up the 1-wire bus on a device.hints system Modified: stable/11/share/man/man4/owc.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/owc.4 ============================================================================== --- stable/11/share/man/man4/owc.4 Tue Jul 16 15:36:05 2019 (r350035) +++ stable/11/share/man/man4/owc.4 Tue Jul 16 15:37:38 2019 (r350036) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 20, 2015 +.Dd June 26, 2019 .Dt OWC 4 .Os .Sh NAME @@ -69,6 +69,24 @@ For more details about the .Va gpios property, please consult .Pa /usr/src/sys/boot/fdt/dts/bindings-gpio.txt . +.Pp +On a +.Xr device.hints 5 +based system these values are required for the +.Nm : +.Bl -tag -width ".Va hint.owc.%d.atXXX" +.It Va hint.owc.%d.at +The +.Nm gpiobus +you are attaching to. +.It Va hint.owc.%d.pins +This is a bitmask that defines a pin on the +.Nm gpiobus +that is to be used for the 1-Wire bus. +For instance, to configure pin 10, use the bitmask of 0x400. +Please note that this mask should have only one bit set +(any other bits - i.e., pins - will be ignored). +.El .Sh SEE ALSO .Xr gpiobus 4 , .Xr ow 4 , From owner-svn-src-stable-11@freebsd.org Tue Jul 16 15:44:54 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2123EB2CB2; Tue, 16 Jul 2019 15:44:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 033A38B2EC; Tue, 16 Jul 2019 15:44:54 +0000 (UTC) (envelope-from avg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD3DA8199; Tue, 16 Jul 2019 15:44:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6GFirL3007942; Tue, 16 Jul 2019 15:44:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6GFirFS007941; Tue, 16 Jul 2019 15:44:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201907161544.x6GFirFS007941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 16 Jul 2019 15:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350040 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 350040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 033A38B2EC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 15:44:54 -0000 Author: avg Date: Tue Jul 16 15:44:53 2019 New Revision: 350040 URL: https://svnweb.freebsd.org/changeset/base/350040 Log: MFC r349408: gpio.4: document device hints common to all devices on gpiobus Modified: stable/11/share/man/man4/gpio.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/gpio.4 ============================================================================== --- stable/11/share/man/man4/gpio.4 Tue Jul 16 15:44:07 2019 (r350039) +++ stable/11/share/man/man4/gpio.4 Tue Jul 16 15:44:53 2019 (r350040) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 5, 2013 +.Dd June 26, 2019 .Dt GPIO 4 .Os .Sh NAME @@ -103,12 +103,36 @@ passed to the kernel, being either statically compiled of ways where the boot loader (or Open Firmware enabled system) passes the DTS blob to the kernel at boot. .Pp +On a +.Xr device.hints 5 +based system these hints can be used to configure drivers for devices +attached to +.Nm +pins: +.Bl -tag -width ".Va hint.driver.unit.pins" +.It Va hint.driver.unit.at +The +.Nm gpiobus +where the device is attached. +For example, +.Qq gpiobus0 . +.Ar driver +and +.Ar unit +are the driver name and the unit number for the device driver. +.It Va hint.driver.unit.pins +This is a bitmask of the pins on the +.Nm gpiobus +that are connected to the device. +The pins will be allocated to the specified driver instance. +.El +.Pp The following .Xr device.hints 5 are only provided by the .Cd ar71xx_gpio driver: -.Bl -tag -width ".Va hint.gpioiic.%d.atXXX" +.Bl -tag -width ".Va hint.gpio.function_clear" .It Va hint.gpio.%d.pinmask This is a bitmask of pins on the GPIO board that we would like to expose for use to the host operating system. @@ -133,6 +157,7 @@ of some device in a system. .Xr gpioiic 4 , .Xr gpioled 4 , .Xr iicbus 4 , +.Xr device.hints 5 , .Xr gpioctl 8 .Sh HISTORY The From owner-svn-src-stable-11@freebsd.org Tue Jul 16 15:49:45 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 952C6B2E0F; Tue, 16 Jul 2019 15:49:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75CD28B6C7; Tue, 16 Jul 2019 15:49:45 +0000 (UTC) (envelope-from avg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA61C819F; Tue, 16 Jul 2019 15:49:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6GFnhYE008434; Tue, 16 Jul 2019 15:49:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6GFnhec008433; Tue, 16 Jul 2019 15:49:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201907161549.x6GFnhec008433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 16 Jul 2019 15:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350042 - stable/11/sys/dev/ow X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/ow X-SVN-Commit-Revision: 350042 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 75CD28B6C7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 15:49:45 -0000 Author: avg Date: Tue Jul 16 15:49:43 2019 New Revision: 350042 URL: https://svnweb.freebsd.org/changeset/base/350042 Log: MFC r349428,r349433: owc_gpiobus: clean / fix up the driver module things "fdt" is removed from the driver module name as the driver does not require FDT and can work very well on hints based systems. A module dependency is added for gpiobus. Without that owc cannot resolve symbols in gpiobus if both are loaded as kernel modules. Finally, a driver module module version is added. Modified: stable/11/sys/dev/ow/owc_gpiobus.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ow/owc_gpiobus.c ============================================================================== --- stable/11/sys/dev/ow/owc_gpiobus.c Tue Jul 16 15:48:02 2019 (r350041) +++ stable/11/sys/dev/ow/owc_gpiobus.c Tue Jul 16 15:49:43 2019 (r350042) @@ -416,5 +416,7 @@ static driver_t owc_gpiobus_driver = { sizeof(struct owc_gpiobus_softc), }; -DRIVER_MODULE(owc_gpiobus_fdt, gpiobus, owc_gpiobus_driver, owc_gpiobus_devclass, 0, 0); -MODULE_DEPEND(owc_gpiobus_fdt, ow, 1, 1, 1); +DRIVER_MODULE(owc_gpiobus, gpiobus, owc_gpiobus_driver, owc_gpiobus_devclass, 0, 0); +MODULE_DEPEND(owc_gpiobus, ow, 1, 1, 1); +MODULE_DEPEND(owc_gpiobus, gpiobus, 1, 1, 1); +MODULE_VERSION(owc_gpiobus, 1); From owner-svn-src-stable-11@freebsd.org Tue Jul 16 15:58:20 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 816C0B3468; Tue, 16 Jul 2019 15:58:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61BB58C1C0; Tue, 16 Jul 2019 15:58:20 +0000 (UTC) (envelope-from avg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 505ED838C; Tue, 16 Jul 2019 15:58:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6GFwKFb014419; Tue, 16 Jul 2019 15:58:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6GFwJLN014417; Tue, 16 Jul 2019 15:58:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201907161558.x6GFwJLN014417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 16 Jul 2019 15:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350045 - in stable/11: share/man/man4 sys/dev/gpio X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/dev/gpio X-SVN-Commit-Revision: 350045 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 61BB58C1C0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 15:58:20 -0000 Author: avg Date: Tue Jul 16 15:58:19 2019 New Revision: 350045 URL: https://svnweb.freebsd.org/changeset/base/350045 Log: MFC r349460: gpiobus: provide a new hint, pin_list "pin_list" allows to specify child pins as a list of pin numbers. Existing hint "pins" serves the same purpose but with a 32-bit wide bit mask. One problem with that is that a controller can have more than 32 pins. One example is amdgpio. Also, a list of numbers is a little bit more human friendly than a matching bit mask. As a side note, it seems that in FDT pins are typically specified by their numbers as well. This commit also adds accessors for instance variables (IVARs) that define the child pins. My primary goal is to allow a child to be configured programmatically rather than via hints (assuming that FDT is not supported on a platform). Also, while a child should not care about specific pin numbers that are allocated to it, it could be interested in how many were actually assigned to it. While there, I removed "flags" instance variable. It was unused. Modified: stable/11/share/man/man4/gpio.4 stable/11/sys/dev/gpio/gpiobus.c stable/11/sys/dev/gpio/gpiobusvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/gpio.4 ============================================================================== --- stable/11/share/man/man4/gpio.4 Tue Jul 16 15:52:47 2019 (r350044) +++ stable/11/share/man/man4/gpio.4 Tue Jul 16 15:58:19 2019 (r350045) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 26, 2019 +.Dd June 27, 2019 .Dt GPIO 4 .Os .Sh NAME @@ -109,7 +109,7 @@ based system these hints can be used to configure driv attached to .Nm pins: -.Bl -tag -width ".Va hint.driver.unit.pins" +.Bl -tag -width ".Va hint.driver.unit.pin_list" .It Va hint.driver.unit.at The .Nm gpiobus @@ -125,6 +125,20 @@ This is a bitmask of the pins on the .Nm gpiobus that are connected to the device. The pins will be allocated to the specified driver instance. +Only pins with numbers from 0 to 31 can be specified using this hint. +.It Va hint.driver.unit.pin_list +This is a list of pin numbers of pins on the +.Nm gpiobus +that are connected to the device. +The pins will be allocated to the specified driver instance. +This is a more user friendly alternative to the +.Ar pins +hint. +Additionally, this hint allows specifying pin numbers greater than 31. +The numbers can be decimal or hexadecimal with 0x prefix. +Any non-digit character can be used as a separator. +For example, it can be a comma, a slash or a space. +The separator can be followed by any number of space characters. .El .Pp The following Modified: stable/11/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/11/sys/dev/gpio/gpiobus.c Tue Jul 16 15:52:47 2019 (r350044) +++ stable/11/sys/dev/gpio/gpiobus.c Tue Jul 16 15:58:19 2019 (r350045) @@ -253,13 +253,6 @@ gpiobus_alloc_ivars(struct gpiobus_ivar *devi) M_NOWAIT | M_ZERO); if (devi->pins == NULL) return (ENOMEM); - devi->flags = malloc(sizeof(uint32_t) * devi->npins, M_DEVBUF, - M_NOWAIT | M_ZERO); - if (devi->flags == NULL) { - free(devi->pins, M_DEVBUF); - return (ENOMEM); - } - return (0); } @@ -267,14 +260,11 @@ void gpiobus_free_ivars(struct gpiobus_ivar *devi) { - if (devi->flags) { - free(devi->flags, M_DEVBUF); - devi->flags = NULL; - } if (devi->pins) { free(devi->pins, M_DEVBUF); devi->pins = NULL; } + devi->npins = 0; } int @@ -324,6 +314,34 @@ gpiobus_release_pin(device_t bus, uint32_t pin) } static int +gpiobus_acquire_child_pins(device_t dev, device_t child) +{ + struct gpiobus_ivar *devi = GPIOBUS_IVAR(child); + int i; + + for (i = 0; i < devi->npins; i++) { + /* Reserve the GPIO pin. */ + if (gpiobus_acquire_pin(dev, devi->pins[i]) != 0) { + device_printf(child, "cannot acquire pin %d\n", + devi->pins[i]); + while (--i >= 0) { + (void)gpiobus_release_pin(dev, + devi->pins[i]); + } + gpiobus_free_ivars(devi); + return (EBUSY); + } + } + for (i = 0; i < devi->npins; i++) { + /* Use the child name as pin name. */ + GPIOBUS_PIN_SETNAME(dev, devi->pins[i], + device_get_nameunit(child)); + + } + return (0); +} + +static int gpiobus_parse_pins(struct gpiobus_softc *sc, device_t child, int mask) { struct gpiobus_ivar *devi = GPIOBUS_IVAR(child); @@ -347,21 +365,70 @@ gpiobus_parse_pins(struct gpiobus_softc *sc, device_t for (i = 0; i < 32; i++) { if ((mask & (1 << i)) == 0) continue; - /* Reserve the GPIO pin. */ - if (gpiobus_acquire_pin(sc->sc_busdev, i) != 0) { - gpiobus_free_ivars(devi); - return (EINVAL); - } devi->pins[npins++] = i; - /* Use the child name as pin name. */ - GPIOBUS_PIN_SETNAME(sc->sc_busdev, i, - device_get_nameunit(child)); } + if (gpiobus_acquire_child_pins(sc->sc_busdev, child) != 0) + return (EINVAL); return (0); } static int +gpiobus_parse_pin_list(struct gpiobus_softc *sc, device_t child, + const char *pins) +{ + struct gpiobus_ivar *devi = GPIOBUS_IVAR(child); + const char *p; + char *endp; + unsigned long pin; + int i, npins; + + npins = 0; + p = pins; + for (;;) { + pin = strtoul(p, &endp, 0); + if (endp == p) + break; + npins++; + if (*endp == '\0') + break; + p = endp + 1; + } + + if (*endp != '\0') { + device_printf(child, "garbage in the pin list: %s\n", endp); + return (EINVAL); + } + if (npins == 0) { + device_printf(child, "empty pin list\n"); + return (EINVAL); + } + + devi->npins = npins; + if (gpiobus_alloc_ivars(devi) != 0) { + device_printf(child, "cannot allocate device ivars\n"); + return (EINVAL); + } + + i = 0; + p = pins; + for (;;) { + pin = strtoul(p, &endp, 0); + + devi->pins[i] = pin; + + if (*endp == '\0') + break; + i++; + p = endp + 1; + } + + if (gpiobus_acquire_child_pins(sc->sc_busdev, child) != 0) + return (EINVAL); + return (0); +} + +static int gpiobus_probe(device_t dev) { device_set_desc(dev, "GPIO bus"); @@ -537,16 +604,27 @@ gpiobus_hinted_child(device_t bus, const char *dname, struct gpiobus_softc *sc = GPIOBUS_SOFTC(bus); struct gpiobus_ivar *devi; device_t child; - int irq, pins; + const char *pins; + int irq, pinmask; child = BUS_ADD_CHILD(bus, 0, dname, dunit); devi = GPIOBUS_IVAR(child); - resource_int_value(dname, dunit, "pins", &pins); - if (gpiobus_parse_pins(sc, child, pins)) { - resource_list_free(&devi->rl); - free(devi, M_DEVBUF); - device_delete_child(bus, child); + if (resource_int_value(dname, dunit, "pins", &pinmask) == 0) { + if (gpiobus_parse_pins(sc, child, pinmask)) { + resource_list_free(&devi->rl); + free(devi, M_DEVBUF); + device_delete_child(bus, child); + return; + } } + else if (resource_string_value(dname, dunit, "pin_list", &pins) == 0) { + if (gpiobus_parse_pin_list(sc, child, pins)) { + resource_list_free(&devi->rl); + free(devi, M_DEVBUF); + device_delete_child(bus, child); + return; + } + } if (resource_int_value(dname, dunit, "irq", &irq) == 0) { if (bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1) != 0) device_printf(bus, @@ -572,6 +650,61 @@ gpiobus_set_resource(device_t dev, device_t child, int return (0); } +static int +gpiobus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) +{ + struct gpiobus_ivar *devi; + + devi = GPIOBUS_IVAR(child); + switch (which) { + case GPIOBUS_IVAR_NPINS: + *result = devi->npins; + break; + case GPIOBUS_IVAR_PINS: + /* Children do not ever need to directly examine this. */ + return (ENOTSUP); + default: + return (ENOENT); + } + + return (0); +} + +static int +gpiobus_write_ivar(device_t dev, device_t child, int which, uintptr_t value) +{ + struct gpiobus_ivar *devi; + const uint32_t *ptr; + int i; + + devi = GPIOBUS_IVAR(child); + switch (which) { + case GPIOBUS_IVAR_NPINS: + /* GPIO ivars are set once. */ + if (devi->npins != 0) { + return (EBUSY); + } + devi->npins = value; + if (gpiobus_alloc_ivars(devi) != 0) { + device_printf(child, "cannot allocate device ivars\n"); + devi->npins = 0; + return (ENOMEM); + } + break; + case GPIOBUS_IVAR_PINS: + ptr = (const uint32_t *)value; + for (i = 0; i < devi->npins; i++) + devi->pins[i] = ptr[i]; + if (gpiobus_acquire_child_pins(dev, child) != 0) + return (EBUSY); + break; + default: + return (ENOENT); + } + + return (0); +} + static struct resource * gpiobus_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) @@ -831,6 +964,8 @@ static device_method_t gpiobus_methods[] = { DEVMETHOD(bus_child_pnpinfo_str, gpiobus_child_pnpinfo_str), DEVMETHOD(bus_child_location_str, gpiobus_child_location_str), DEVMETHOD(bus_hinted_child, gpiobus_hinted_child), + DEVMETHOD(bus_read_ivar, gpiobus_read_ivar), + DEVMETHOD(bus_write_ivar, gpiobus_write_ivar), /* GPIO protocol */ DEVMETHOD(gpiobus_acquire_bus, gpiobus_acquire_bus), Modified: stable/11/sys/dev/gpio/gpiobusvar.h ============================================================================== --- stable/11/sys/dev/gpio/gpiobusvar.h Tue Jul 16 15:52:47 2019 (r350044) +++ stable/11/sys/dev/gpio/gpiobusvar.h Tue Jul 16 15:58:19 2019 (r350045) @@ -102,9 +102,21 @@ struct gpiobus_ivar { struct resource_list rl; /* isr resource list */ uint32_t npins; /* pins total */ - uint32_t *flags; /* pins flags */ uint32_t *pins; /* pins map */ }; + +enum gpiobus_ivars { + GPIOBUS_IVAR_NPINS = 10500, + GPIOBUS_IVAR_PINS, +}; + +#define GPIOBUS_ACCESSOR(var, ivar, type) \ + __BUS_ACCESSOR(gpiobus, var, GPIOBUS, ivar, type) + +GPIOBUS_ACCESSOR(npins, NPINS, uint32_t) +GPIOBUS_ACCESSOR(pins, PINS, const uint32_t *) + +#undef GPIOBUS_ACCESSOR #ifdef FDT struct ofw_gpiobus_devinfo { From owner-svn-src-stable-11@freebsd.org Tue Jul 16 16:02:05 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ACD13B366C; Tue, 16 Jul 2019 16:02:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DE068C79A; Tue, 16 Jul 2019 16:02:05 +0000 (UTC) (envelope-from avg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8E118522; Tue, 16 Jul 2019 16:02:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6GG23ln017549; Tue, 16 Jul 2019 16:02:03 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6GG23QI017534; Tue, 16 Jul 2019 16:02:03 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201907161602.x6GG23QI017534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 16 Jul 2019 16:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350047 - stable/11/sys/dev/nctgpio X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/nctgpio X-SVN-Commit-Revision: 350047 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8DE068C79A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 16:02:05 -0000 Author: avg Date: Tue Jul 16 16:02:03 2019 New Revision: 350047 URL: https://svnweb.freebsd.org/changeset/base/350047 Log: MFC r349579: nctgpio: change default pin names to those used by the datasheet(s) That is, instead of the current GPIO00 - GPIO15 the names will be GPIO00 - GPIO07, GPIO10 - GPIO17. The first digit is a GPIO "bank" / group number and the second one is a pin number within the bank. Alternative view is that the pin names are changed from decimal numbering scheme to octal one (as there are 8 pins per bank). Modified: stable/11/sys/dev/nctgpio/nctgpio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/nctgpio/nctgpio.c ============================================================================== --- stable/11/sys/dev/nctgpio/nctgpio.c Tue Jul 16 16:01:51 2019 (r350046) +++ stable/11/sys/dev/nctgpio/nctgpio.c Tue Jul 16 16:02:03 2019 (r350047) @@ -529,7 +529,7 @@ nct_attach(device_t dev) pin->gp_caps = NCT_GPIO_CAPS; pin->gp_flags = 0; - snprintf(pin->gp_name, GPIOMAXNAME, "GPIO%02u", i); + snprintf(pin->gp_name, GPIOMAXNAME, "GPIO%02o", i); pin->gp_name[GPIOMAXNAME - 1] = '\0'; if (nct_pin_is_input(sc, i)) From owner-svn-src-stable-11@freebsd.org Tue Jul 16 16:26:52 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 26D59B42BC; Tue, 16 Jul 2019 16:26:52 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A08F8E521; Tue, 16 Jul 2019 16:26:52 +0000 (UTC) (envelope-from lwhsu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F247B8915; Tue, 16 Jul 2019 16:26:51 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6GGQp4X033930; Tue, 16 Jul 2019 16:26:51 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6GGQplf033929; Tue, 16 Jul 2019 16:26:51 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201907161626.x6GGQplf033929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 16 Jul 2019 16:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350053 - stable/11/sys/dev/gpio X-SVN-Group: stable-11 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/11/sys/dev/gpio X-SVN-Commit-Revision: 350053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0A08F8E521 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 16:26:52 -0000 Author: lwhsu Date: Tue Jul 16 16:26:51 2019 New Revision: 350053 URL: https://svnweb.freebsd.org/changeset/base/350053 Log: MFC r349472: Follow r349460 to complete removing "flags" in struct gpiobus_ivar Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/dev/gpio/ofw_gpiobus.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- stable/11/sys/dev/gpio/ofw_gpiobus.c Tue Jul 16 16:25:27 2019 (r350052) +++ stable/11/sys/dev/gpio/ofw_gpiobus.c Tue Jul 16 16:26:51 2019 (r350053) @@ -317,10 +317,8 @@ ofw_gpiobus_setup_devinfo(device_t bus, device_t child ofw_gpiobus_destroy_devinfo(bus, dinfo); return (NULL); } - for (i = 0; i < devi->npins; i++) { - devi->flags[i] = pins[i].flags; + for (i = 0; i < devi->npins; i++) devi->pins[i] = pins[i].pin; - } free(pins, M_DEVBUF); /* Parse the interrupt resources. */ if (ofw_bus_intr_to_rl(bus, node, &dinfo->opd_dinfo.rl, NULL) != 0) { From owner-svn-src-stable-11@freebsd.org Tue Jul 16 16:49:12 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 14205B4B83; Tue, 16 Jul 2019 16:49:12 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E98908FAF3; Tue, 16 Jul 2019 16:49:11 +0000 (UTC) (envelope-from vangyzen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C62A58CF6; Tue, 16 Jul 2019 16:49:11 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6GGnB97046330; Tue, 16 Jul 2019 16:49:11 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6GGnBtO046329; Tue, 16 Jul 2019 16:49:11 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201907161649.x6GGnBtO046329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 16 Jul 2019 16:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350056 - stable/11/sys/dev/vt X-SVN-Group: stable-11 X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: stable/11/sys/dev/vt X-SVN-Commit-Revision: 350056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E98908FAF3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 16:49:12 -0000 Author: vangyzen Date: Tue Jul 16 16:49:11 2019 New Revision: 350056 URL: https://svnweb.freebsd.org/changeset/base/350056 Log: MFC r349834 Ignore kern.vt.splash_cpu without graphics When the system has no graphical console, such as bhyve in common configurations, ignore kern.vt.splash_cpu, instead of panicking on INVARIANTS kernels. Reviewed by: cem dumbbell Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20877 Modified: stable/11/sys/dev/vt/vt_cpulogos.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/vt_cpulogos.c ============================================================================== --- stable/11/sys/dev/vt/vt_cpulogos.c Tue Jul 16 16:33:44 2019 (r350055) +++ stable/11/sys/dev/vt/vt_cpulogos.c Tue Jul 16 16:49:11 2019 (r350056) @@ -227,9 +227,8 @@ vt_init_logos(void *dummy) return; VT_LOCK(vd); - KASSERT((vd->vd_flags & VDF_INITIALIZED) != 0, - ("vd %p not initialized", vd)); - + if ((vd->vd_flags & VDF_INITIALIZED) == 0) + goto out; if ((vd->vd_flags & (VDF_DEAD | VDF_TEXTMODE)) != 0) goto out; if (vd->vd_height <= vt_logo_sprite_height) From owner-svn-src-stable-11@freebsd.org Tue Jul 16 17:40:00 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52526B5EC5; Tue, 16 Jul 2019 17:40:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 322B66BA43; Tue, 16 Jul 2019 17:40:00 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D8359638; Tue, 16 Jul 2019 17:40:00 +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 x6GHdxbZ077193; Tue, 16 Jul 2019 17:39:59 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6GHdxwV077192; Tue, 16 Jul 2019 17:39:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201907161739.x6GHdxwV077192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 16 Jul 2019 17:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350060 - in stable: 11/contrib/llvm/tools/lld/ELF 12/contrib/llvm/tools/lld/ELF X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/llvm/tools/lld/ELF 12/contrib/llvm/tools/lld/ELF X-SVN-Commit-Revision: 350060 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 322B66BA43 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 17:40:00 -0000 Author: dim Date: Tue Jul 16 17:39:58 2019 New Revision: 350060 URL: https://svnweb.freebsd.org/changeset/base/350060 Log: MFC r349971: Pull in r365760 from upstream lld trunk (by Fangrui Song): [ELF] Handle non-glob patterns before glob patterns in version scripts & fix a corner case of --dynamic-list This fixes PR38549, which is silently accepted by ld.bfd. This seems correct because it makes sense to let non-glob patterns take precedence over glob patterns. lld issues an error because `assignWildcardVersion(ver, VER_NDX_LOCAL);` is processed before `assignExactVersion(ver, v.id, v.name);`. Move all assignWildcardVersion() calls after assignExactVersion() calls to fix this. Also, move handleDynamicList() to the bottom. computeBinding() called by includeInDynsym() has this cryptic rule: if (versionId == VER_NDX_LOCAL && isDefined() && !isPreemptible) return STB_LOCAL; Before the change: * foo's version is set to VER_NDX_LOCAL due to `local: *` * handleDynamicList() is called - foo.computeBinding() is STB_LOCAL - foo.includeInDynsym() is false - foo.isPreemptible is not set (wrong) * foo's version is set to V1 After the change: * foo's version is set to VER_NDX_LOCAL due to `local: *` * foo's version is set to V1 * handleDynamicList() is called - foo.computeBinding() is STB_GLOBAL - foo.includeInDynsym() is true - foo.isPreemptible is set (correct) Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D64550 This makes it longer necessary to patch the version scripts for the samba ports, to avoid "duplicate symbol 'pdb_search_init' in version script" errors. PR: 230602 Modified: stable/11/contrib/llvm/tools/lld/ELF/SymbolTable.cpp stable/11/contrib/llvm/tools/lld/ELF/SymbolTable.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/llvm/tools/lld/ELF/SymbolTable.cpp stable/12/contrib/llvm/tools/lld/ELF/SymbolTable.h Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/llvm/tools/lld/ELF/SymbolTable.cpp ============================================================================== --- stable/11/contrib/llvm/tools/lld/ELF/SymbolTable.cpp Tue Jul 16 17:27:51 2019 (r350059) +++ stable/11/contrib/llvm/tools/lld/ELF/SymbolTable.cpp Tue Jul 16 17:39:58 2019 (r350060) @@ -654,20 +654,6 @@ std::vector SymbolTable::findAllByVersion(Sy return Res; } -// If there's only one anonymous version definition in a version -// script file, the script does not actually define any symbol version, -// but just specifies symbols visibilities. -void SymbolTable::handleAnonymousVersion() { - for (SymbolVersion &Ver : Config->VersionScriptGlobals) - assignExactVersion(Ver, VER_NDX_GLOBAL, "global"); - for (SymbolVersion &Ver : Config->VersionScriptGlobals) - assignWildcardVersion(Ver, VER_NDX_GLOBAL); - for (SymbolVersion &Ver : Config->VersionScriptLocals) - assignExactVersion(Ver, VER_NDX_LOCAL, "local"); - for (SymbolVersion &Ver : Config->VersionScriptLocals) - assignWildcardVersion(Ver, VER_NDX_LOCAL); -} - // Handles -dynamic-list. void SymbolTable::handleDynamicList() { for (SymbolVersion &Ver : Config->DynamicList) { @@ -731,23 +717,27 @@ void SymbolTable::assignWildcardVersion(SymbolVersion // This function processes version scripts by updating VersionId // member of symbols. +// If there's only one anonymous version definition in a version +// script file, the script does not actually define any symbol version, +// but just specifies symbols visibilities. void SymbolTable::scanVersionScript() { - // Handle edge cases first. - handleAnonymousVersion(); - handleDynamicList(); - - // Now we have version definitions, so we need to set version ids to symbols. - // Each version definition has a glob pattern, and all symbols that match - // with the pattern get that version. - // First, we assign versions to exact matching symbols, // i.e. version definitions not containing any glob meta-characters. + for (SymbolVersion &Ver : Config->VersionScriptGlobals) + assignExactVersion(Ver, VER_NDX_GLOBAL, "global"); + for (SymbolVersion &Ver : Config->VersionScriptLocals) + assignExactVersion(Ver, VER_NDX_LOCAL, "local"); for (VersionDefinition &V : Config->VersionDefinitions) for (SymbolVersion &Ver : V.Globals) assignExactVersion(Ver, V.Id, V.Name); // Next, we assign versions to fuzzy matching symbols, // i.e. version definitions containing glob meta-characters. + for (SymbolVersion &Ver : Config->VersionScriptGlobals) + assignWildcardVersion(Ver, VER_NDX_GLOBAL); + for (SymbolVersion &Ver : Config->VersionScriptLocals) + assignWildcardVersion(Ver, VER_NDX_LOCAL); + // Note that because the last match takes precedence over previous matches, // we iterate over the definitions in the reverse order. for (VersionDefinition &V : llvm::reverse(Config->VersionDefinitions)) @@ -759,6 +749,12 @@ void SymbolTable::scanVersionScript() { // Let them parse and update their names to exclude version suffix. for (Symbol *Sym : SymVector) Sym->parseSymbolVersion(); + + // isPreemptible is false at this point. To correctly compute the binding of a + // Defined (which is used by includeInDynsym()), we need to know if it is + // VER_NDX_LOCAL or not. If defaultSymbolVersion is VER_NDX_LOCAL, we should + // compute symbol versions before handling --dynamic-list. + handleDynamicList(); } template void SymbolTable::addFile(InputFile *); Modified: stable/11/contrib/llvm/tools/lld/ELF/SymbolTable.h ============================================================================== --- stable/11/contrib/llvm/tools/lld/ELF/SymbolTable.h Tue Jul 16 17:27:51 2019 (r350059) +++ stable/11/contrib/llvm/tools/lld/ELF/SymbolTable.h Tue Jul 16 17:39:58 2019 (r350060) @@ -90,7 +90,6 @@ class SymbolTable { (private) std::vector findAllByVersion(SymbolVersion Ver); llvm::StringMap> &getDemangledSyms(); - void handleAnonymousVersion(); void assignExactVersion(SymbolVersion Ver, uint16_t VersionId, StringRef VersionName); void assignWildcardVersion(SymbolVersion Ver, uint16_t VersionId); From owner-svn-src-stable-11@freebsd.org Tue Jul 16 19:23:48 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 68A25B82D3; Tue, 16 Jul 2019 19:23:48 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D11A7073B; Tue, 16 Jul 2019 19:23:48 +0000 (UTC) (envelope-from eugen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 267F8AA2C; Tue, 16 Jul 2019 19:23:48 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6GJNm7r045297; Tue, 16 Jul 2019 19:23:48 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6GJNmeZ045296; Tue, 16 Jul 2019 19:23:48 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201907161923.x6GJNmeZ045296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Tue, 16 Jul 2019 19:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350065 - stable/11/sys/modules/tpm X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sys/modules/tpm X-SVN-Commit-Revision: 350065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D11A7073B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 19:23:48 -0000 Author: eugen Date: Tue Jul 16 19:23:47 2019 New Revision: 350065 URL: https://svnweb.freebsd.org/changeset/base/350065 Log: Make tpm(4) kernel module buildable outside of kernel build environment. This direct commit is partial merge of r345632 (by lwhsu) from head that cannot be merged completely due to significant differences in code base. PR: 239120 Modified: stable/11/sys/modules/tpm/Makefile Modified: stable/11/sys/modules/tpm/Makefile ============================================================================== --- stable/11/sys/modules/tpm/Makefile Tue Jul 16 19:00:42 2019 (r350064) +++ stable/11/sys/modules/tpm/Makefile Tue Jul 16 19:23:47 2019 (r350065) @@ -8,6 +8,6 @@ SRCS= tpm.c bus_if.h device_if.h #Bus specific stuff. SRCS+= tpm_isa.c tpm_acpi.c isa_if.h opt_acpi.h acpi_if.h #TPM 2.0 -SRCS+= tpm20.c tpm_crb.c tpm_tis.c +SRCS+= tpm20.c tpm_crb.c tpm_tis.c opt_tpm.h .include From owner-svn-src-stable-11@freebsd.org Tue Jul 16 19:40:24 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 093F6B8B11; Tue, 16 Jul 2019 19:40:24 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF807714F0; Tue, 16 Jul 2019 19:40:23 +0000 (UTC) (envelope-from eugen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6C5BAC55; Tue, 16 Jul 2019 19:40:23 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6GJeNr0051334; Tue, 16 Jul 2019 19:40:23 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6GJeNb9051333; Tue, 16 Jul 2019 19:40:23 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201907161940.x6GJeNb9051333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Tue, 16 Jul 2019 19:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350066 - stable/11/sys/modules/spigen X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sys/modules/spigen X-SVN-Commit-Revision: 350066 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DF807714F0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 19:40:24 -0000 Author: eugen Date: Tue Jul 16 19:40:23 2019 New Revision: 350066 URL: https://svnweb.freebsd.org/changeset/base/350066 Log: MFC r336561 by lwhsu: Fix `make` in sys/modules/spigen PR: 239119 Modified: stable/11/sys/modules/spigen/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/modules/spigen/Makefile ============================================================================== --- stable/11/sys/modules/spigen/Makefile Tue Jul 16 19:23:47 2019 (r350065) +++ stable/11/sys/modules/spigen/Makefile Tue Jul 16 19:40:23 2019 (r350066) @@ -9,6 +9,7 @@ SRCS+= \ bus_if.h \ device_if.h \ opt_platform.h \ + opt_spi.h \ spibus_if.h \ .if !empty(OPT_FDT) From owner-svn-src-stable-11@freebsd.org Wed Jul 17 01:05:34 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 37958BE83F; Wed, 17 Jul 2019 01:05:34 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17D6085975; Wed, 17 Jul 2019 01:05:34 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F116BEC4F; Wed, 17 Jul 2019 01:05:33 +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 x6H15Xtu046363; Wed, 17 Jul 2019 01:05:33 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6H15XPH046362; Wed, 17 Jul 2019 01:05:33 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907170105.x6H15XPH046362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 17 Jul 2019 01:05:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350073 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 350073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 17D6085975 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.93)[-0.935,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jul 2019 01:05:34 -0000 Author: cy Date: Wed Jul 17 01:05:33 2019 New Revision: 350073 URL: https://svnweb.freebsd.org/changeset/base/350073 Log: MFC r349978: style(9) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/fil.c Wed Jul 17 00:27:11 2019 (r350072) +++ stable/11/sys/contrib/ipfilter/netinet/fil.c Wed Jul 17 01:05:33 2019 (r350073) @@ -4431,23 +4431,23 @@ static int ipf_rule_compare(frentry_t *fr1, frentry_t *fr2) { if (fr1->fr_cksum != fr2->fr_cksum) - return 1; + return (1); if (fr1->fr_size != fr2->fr_size) - return 2; + return (2); if (fr1->fr_dsize != fr2->fr_dsize) - return 3; + return (3); if (bcmp((char *)&fr1->fr_func, (char *)&fr2->fr_func, fr1->fr_size - offsetof(struct frentry, fr_func)) != 0) - return 4; + return (4); if (fr1->fr_data && !fr2->fr_data) - return 5; + return (5); if (!fr1->fr_data && fr2->fr_data) - return 6; + return (6); if (fr1->fr_data) { if (bcmp(fr1->fr_caddr, fr2->fr_caddr, fr1->fr_dsize)) - return 7; + return (7); } - return 0; + return (0); } From owner-svn-src-stable-11@freebsd.org Thu Jul 18 11:43:10 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B548FA67AD; Thu, 18 Jul 2019 11:43:10 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 979C685BA7; Thu, 18 Jul 2019 11:43:10 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 69D0F71AB; Thu, 18 Jul 2019 11:43:10 +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 x6IBhAn5076801; Thu, 18 Jul 2019 11:43:10 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6IBhAho076800; Thu, 18 Jul 2019 11:43:10 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907181143.x6IBhAho076800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 18 Jul 2019 11:43:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350110 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 350110 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 979C685BA7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jul 2019 11:43:10 -0000 Author: cy Date: Thu Jul 18 11:43:09 2019 New Revision: 350110 URL: https://svnweb.freebsd.org/changeset/base/350110 Log: MFC r349898, r349916: ipfilter commands, in this case ipf(8), passes its operations and rules via an ioctl interface. Rules can be added or removed and stats and counters can be zeroed out. As the ipfilter interprets these instructions or operations they are stored in an integer called addrem (add/remove). 0 is add, 1 is remove, and 2 is clear stats and counters. Much of this is not documented. This commit documents these operations by replacing simple integers with a self documenting enum along with a few basic comments. Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/fil.c Thu Jul 18 07:37:26 2019 (r350109) +++ stable/11/sys/contrib/ipfilter/netinet/fil.c Thu Jul 18 11:43:09 2019 (r350110) @@ -4476,7 +4476,11 @@ frrequest(softc, unit, req, data, set, makecopy) int set, makecopy; caddr_t data; { - int error = 0, in, family, addrem, need_free = 0; + int error = 0, in, family, need_free = 0; + enum { OP_ADD, /* add rule */ + OP_REM, /* remove rule */ + OP_ZERO /* zero statistics and counters */ } + addrem = OP_ADD; frentry_t frd, *fp, *f, **fprev, **ftail; void *ptr, *uptr, *cptr; u_int *p, *pp; @@ -4544,11 +4548,11 @@ frrequest(softc, unit, req, data, set, makecopy) if (req == (ioctlcmd_t)SIOCINAFR || req == (ioctlcmd_t)SIOCINIFR || req == (ioctlcmd_t)SIOCADAFR || req == (ioctlcmd_t)SIOCADIFR) - addrem = 0; + addrem = OP_ADD; /* Add rule */ else if (req == (ioctlcmd_t)SIOCRMAFR || req == (ioctlcmd_t)SIOCRMIFR) - addrem = 1; + addrem = OP_REM; /* Remove rule */ else if (req == (ioctlcmd_t)SIOCZRLST) - addrem = 2; + addrem = OP_ZERO; /* Zero statistics and counters */ else { IPFERROR(9); error = EINVAL; @@ -4582,7 +4586,7 @@ frrequest(softc, unit, req, data, set, makecopy) goto donenolock; } - if (addrem == 0) { + if (addrem == OP_ADD) { error = ipf_funcinit(softc, fp); if (error != 0) goto donenolock; @@ -4646,7 +4650,7 @@ frrequest(softc, unit, req, data, set, makecopy) * them to be created if they don't already exit. */ group = FR_NAME(fp, fr_group); - if (addrem == 0) { + if (addrem == OP_ADD) { fg = ipf_group_add(softc, group, NULL, fp->fr_flags, unit, set); fp->fr_grp = fg; @@ -4951,7 +4955,7 @@ frrequest(softc, unit, req, data, set, makecopy) /* * If zero'ing statistics, copy current to caller and zero. */ - if (addrem == 2) { + if (addrem == OP_ZERO) { if (f == NULL) { IPFERROR(27); error = ESRCH; @@ -5044,7 +5048,7 @@ frrequest(softc, unit, req, data, set, makecopy) /* * Request to remove a rule. */ - if (addrem == 1) { + if (addrem == OP_REM) { if (f == NULL) { IPFERROR(29); error = ESRCH; @@ -5110,7 +5114,7 @@ frrequest(softc, unit, req, data, set, makecopy) if (fp->fr_next != NULL) fp->fr_next->fr_pnext = &fp->fr_next; *ftail = fp; - if (addrem == 0) + if (addrem == OP_ADD) ipf_fixskip(ftail, fp, 1); fp->fr_icmpgrp = NULL; From owner-svn-src-stable-11@freebsd.org Thu Jul 18 11:46:38 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 852E2A68BB; Thu, 18 Jul 2019 11:46:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 67E3885E5C; Thu, 18 Jul 2019 11:46:38 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3EF7771AF; Thu, 18 Jul 2019 11:46:38 +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 x6IBkcrF077041; Thu, 18 Jul 2019 11:46:38 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6IBkccF077040; Thu, 18 Jul 2019 11:46:38 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201907181146.x6IBkccF077040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 18 Jul 2019 11:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350111 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 350111 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 67E3885E5C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jul 2019 11:46:38 -0000 Author: cy Date: Thu Jul 18 11:46:37 2019 New Revision: 350111 URL: https://svnweb.freebsd.org/changeset/base/350111 Log: MFC r349917: Remove a tautological test for adding a rule in the block that adds rules. Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/fil.c Thu Jul 18 11:43:09 2019 (r350110) +++ stable/11/sys/contrib/ipfilter/netinet/fil.c Thu Jul 18 11:46:37 2019 (r350111) @@ -5114,8 +5114,7 @@ frrequest(softc, unit, req, data, set, makecopy) if (fp->fr_next != NULL) fp->fr_next->fr_pnext = &fp->fr_next; *ftail = fp; - if (addrem == OP_ADD) - ipf_fixskip(ftail, fp, 1); + ipf_fixskip(ftail, fp, 1); fp->fr_icmpgrp = NULL; if (fp->fr_icmphead != -1) { From owner-svn-src-stable-11@freebsd.org Fri Jul 19 14:22:24 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC9B0A3D2A; Fri, 19 Jul 2019 14:22:24 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD4636F876; Fri, 19 Jul 2019 14:22:24 +0000 (UTC) (envelope-from asomers@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A716D22392; Fri, 19 Jul 2019 14:22:24 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6JEMObJ026257; Fri, 19 Jul 2019 14:22:24 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6JEMOpB026256; Fri, 19 Jul 2019 14:22:24 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201907191422.x6JEMOpB026256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 19 Jul 2019 14:22:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350124 - stable/11/tests/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/tests/sys/net X-SVN-Commit-Revision: 350124 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CD4636F876 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2019 14:22:25 -0000 Author: asomers Date: Fri Jul 19 14:22:24 2019 New Revision: 350124 URL: https://svnweb.freebsd.org/changeset/base/350124 Log: MFC r349009: Add test cases for epair Implements the missing test cases for epair in a similar fashion to the existing tests. Fixes shared abstractions to work with epair tests. Submitted by: Ryan Moeller Reviewed by: asomers Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D20498 Modified: stable/11/tests/sys/net/if_clone_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/net/if_clone_test.sh ============================================================================== --- stable/11/tests/sys/net/if_clone_test.sh Fri Jul 19 14:16:11 2019 (r350123) +++ stable/11/tests/sys/net/if_clone_test.sh Fri Jul 19 14:22:24 2019 (r350124) @@ -39,6 +39,52 @@ TESTLEN=10 # seconds +atf_test_case epair_stress cleanup +epair_stress_head() +{ + atf_set "descr" "Simultaneously create and destroy an epair(4)" + atf_set "require.user" "root" +} +epair_stress_body() +{ + do_stress "epair" +} +epair_stress_cleanup() +{ + cleanup_ifaces +} + +atf_test_case epair_up_stress cleanup +epair_up_stress_head() +{ + atf_set "descr" "Simultaneously up and detroy an epair(4)" + atf_set "require.user" "root" +} +epair_up_stress_body() +{ + do_up_stress "epair" "" "" +} +epair_up_stress_cleanup() +{ + cleanup_ifaces +} + +atf_test_case epair_ipv6_up_stress cleanup +epair_ipv6_up_stress_head() +{ + atf_set "descr" "Simultaneously up and destroy an epair(4) with IPv6" + atf_set "require.user" "root" +} +epair_ipv6_up_stress_body() +{ + atf_skip "Quickly panics: page fault in in6_unlink_ifa (PR 225438)" + do_up_stress "epair" "6" "" +} +epair_ipv6_up_stress_cleanup() +{ + cleanup_ifaces +} + atf_test_case faith_stress cleanup faith_stress_head() { @@ -369,7 +415,9 @@ vmnet_ipv6_up_stress_cleanup() atf_init_test_cases() { - # TODO: add epair(4) tests, which need a different syntax + atf_add_test_case epair_ipv6_up_stress + atf_add_test_case epair_stress + atf_add_test_case epair_up_stress atf_add_test_case faith_ipv6_up_stress atf_add_test_case faith_stress atf_add_test_case faith_up_stress @@ -396,13 +444,13 @@ atf_init_test_cases() do_stress() { - local IFACE + local IFACE CREATOR_PID DESTROYER_PID IFACE=`get_iface $1` # First thread: create the interface while true; do - ifconfig $IFACE create 2>/dev/null && \ + ifconfig ${IFACE%a} create 2>/dev/null && \ echo -n . >> creator_count.txt done & CREATOR_PID=$! @@ -417,7 +465,7 @@ do_stress() sleep ${TESTLEN} kill $CREATOR_PID kill $DESTROYER_PID - echo "Created $IFACE `stat -f %z creator_count.txt` times." + echo "Created ${IFACE%a} `stat -f %z creator_count.txt` times." echo "Destroyed it `stat -f %z destroyer_count.txt` times." } @@ -428,7 +476,8 @@ do_stress() # $3 p2p for point to point interfaces, anything else for normal interfaces do_up_stress() { - local IFACE IPv6 MAC P2P SRCDIR + local ADDR DSTADDR MASK MEAN_SLEEP_SECONDS MAX_SLEEP_USECS \ + IFACE IPV6 P2P SRCDIR LOOP_PID ipv6_cmd up_cmd # Configure the interface to use an RFC5737 nonrouteable addresses ADDR="192.0.2.2" @@ -464,7 +513,7 @@ do_up_stress() ifconfig $IFACE destroy && echo -n . >> destroy_count.txt ; } & wait - ifconfig $IFACE create + ifconfig ${IFACE%a} create done & LOOP_PID=$! @@ -489,7 +538,11 @@ get_iface() N=$(($N + 1)) fi done - local DEV=${CLASS}${N} + if [ ${CLASS} = "epair" ]; then + DEV=${CLASS}${N}a + else + DEV=${CLASS}${N} + fi # Record the device so we can clean it up later echo ${DEV} >> "devices_to_cleanup" echo ${DEV} @@ -501,11 +554,7 @@ cleanup_ifaces() local DEV for DEV in `cat "devices_to_cleanup"`; do - if [ ${DEV%%[0-9]*a} = "epair" ]; then - ifconfig ${DEV}a destroy - else - ifconfig ${DEV} destroy - fi + ifconfig ${DEV} destroy done true } From owner-svn-src-stable-11@freebsd.org Fri Jul 19 14:23:24 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 27F98A3EC7; Fri, 19 Jul 2019 14:23:24 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A55B6F9D2; Fri, 19 Jul 2019 14:23:24 +0000 (UTC) (envelope-from asomers@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3EC3223A4; Fri, 19 Jul 2019 14:23:23 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6JENNPV026357; Fri, 19 Jul 2019 14:23:23 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6JENN3D026356; Fri, 19 Jul 2019 14:23:23 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201907191423.x6JENN3D026356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 19 Jul 2019 14:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350125 - stable/11/lib/libc/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/lib/libc/sys X-SVN-Commit-Revision: 350125 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0A55B6F9D2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2019 14:23:24 -0000 Author: asomers Date: Fri Jul 19 14:23:23 2019 New Revision: 350125 URL: https://svnweb.freebsd.org/changeset/base/350125 Log: MFC r349041: open(2): fix the description of O_FSYNC The man page claims that with O_FSYNC (aka O_SYNC) the kernel will not cache written data. However, that's not true. Nor does POSIX require it. Perhaps it was true when that section of the man page was written in r69336 (I haven't checked). But it's not true now. Now the effect is simply that writes are sent to disk immediately and synchronously, but they're still cached. See also: https://pubs.opengroup.org/onlinepubs/9699919799/ See also: ffs_write in sys/ufs/ffs/ffs_vnops.c Reviewed by: cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20641 Modified: stable/11/lib/libc/sys/open.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/open.2 ============================================================================== --- stable/11/lib/libc/sys/open.2 Fri Jul 19 14:22:24 2019 (r350124) +++ stable/11/lib/libc/sys/open.2 Fri Jul 19 14:23:23 2019 (r350125) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd March 28, 2018 +.Dd June 14, 2019 .Dt OPEN 2 .Os .Sh NAME @@ -183,10 +183,7 @@ The descriptor remains in non-blocking mode for subseq If .Dv O_FSYNC is used in the mask, all writes will -immediately be written to disk, -the kernel will not cache written data -and all writes on the descriptor will not return until -the data to be written completes. +immediately and synchronously be written to disk. .Pp .Dv O_SYNC is a synonym for From owner-svn-src-stable-11@freebsd.org Fri Jul 19 14:24:34 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3E1CA3F66; Fri, 19 Jul 2019 14:24:34 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84DFF6FB14; Fri, 19 Jul 2019 14:24:34 +0000 (UTC) (envelope-from asomers@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6107B223A5; Fri, 19 Jul 2019 14:24:34 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6JEOYS6026463; Fri, 19 Jul 2019 14:24:34 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6JEOXbw026460; Fri, 19 Jul 2019 14:24:33 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201907191424.x6JEOXbw026460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 19 Jul 2019 14:24:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350126 - in stable/11: share/man/man9 sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11: share/man/man9 sys/kern X-SVN-Commit-Revision: 350126 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 84DFF6FB14 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2019 14:24:34 -0000 Author: asomers Date: Fri Jul 19 14:24:33 2019 New Revision: 350126 URL: https://svnweb.freebsd.org/changeset/base/350126 Log: MFC r349230, r349234, r349477 r349230: Add a VOP_BMAP(9) man page Reviewed by: mckusick Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20704 r349234: VOP_BMAP(9): fix typo in the copyright header Reported by: rgrimes MFC-With: 349230 Sponsored by: The FreeBSD Foundation r349477: [skip ci] VOP_BMAP.9: fix diction in copyright header MFC-With: r349230 Sponsored by: The FreeBSD Foundation Added: stable/11/share/man/man9/VOP_BMAP.9 - copied, changed from r349230, head/share/man/man9/VOP_BMAP.9 Modified: stable/11/share/man/man9/Makefile stable/11/sys/kern/vfs_default.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Fri Jul 19 14:23:23 2019 (r350125) +++ stable/11/share/man/man9/Makefile Fri Jul 19 14:24:33 2019 (r350126) @@ -376,6 +376,7 @@ MAN= accept_filter.9 \ VOP_ADVLOCK.9 \ VOP_ALLOCATE.9 \ VOP_ATTRIB.9 \ + VOP_BMAP.9 \ VOP_BWRITE.9 \ VOP_CREATE.9 \ VOP_FSYNC.9 \ Copied and modified: stable/11/share/man/man9/VOP_BMAP.9 (from r349230, head/share/man/man9/VOP_BMAP.9) ============================================================================== --- head/share/man/man9/VOP_BMAP.9 Thu Jun 20 13:59:46 2019 (r349230, copy source) +++ stable/11/share/man/man9/VOP_BMAP.9 Fri Jul 19 14:24:33 2019 (r350126) @@ -3,15 +3,15 @@ .\" .\" Copyright (c) 2019 The FreeBSD Foundation .\" -.\" This software was developed by BFF Storage Systems, LLC under sponsorship -.\" from the FreeBSD Foundation. +.\" This documentation was written by BFF Storage Systems, LLC under +.\" sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. -.\".\"2. Redistributions in binary form must reproduce the above copyright +.\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" Modified: stable/11/sys/kern/vfs_default.c ============================================================================== --- stable/11/sys/kern/vfs_default.c Fri Jul 19 14:23:23 2019 (r350125) +++ stable/11/sys/kern/vfs_default.c Fri Jul 19 14:24:33 2019 (r350126) @@ -604,7 +604,13 @@ vop_stdgetwritemount(ap) return (0); } -/* XXX Needs good comment and VOP_BMAP(9) manpage */ +/* + * If the file system doesn't implement VOP_BMAP, then return sensible defaults: + * - Return the vnode's bufobj instead of any underlying device's bufobj + * - Calculate the physical block number as if there were equal size + * consecutive blocks, but + * - Report no contiguous runs of blocks. + */ int vop_stdbmap(ap) struct vop_bmap_args /* { From owner-svn-src-stable-11@freebsd.org Fri Jul 19 14:25:50 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 645C0A3FFE; Fri, 19 Jul 2019 14:25:50 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 44FC76FC5B; Fri, 19 Jul 2019 14:25:50 +0000 (UTC) (envelope-from asomers@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3893C223A6; Fri, 19 Jul 2019 14:25:50 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6JEPo0x026582; Fri, 19 Jul 2019 14:25:50 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6JEPowd026581; Fri, 19 Jul 2019 14:25:50 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201907191425.x6JEPowd026581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 19 Jul 2019 14:25:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350127 - stable/11/share/man/man9 X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/11/share/man/man9 X-SVN-Commit-Revision: 350127 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 44FC76FC5B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2019 14:25:50 -0000 Author: asomers Date: Fri Jul 19 14:25:49 2019 New Revision: 350127 URL: https://svnweb.freebsd.org/changeset/base/350127 Log: MFC r349237: VOP_REVOKE(9): update locking requirements per r143495 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20524 Modified: stable/11/share/man/man9/VOP_REVOKE.9 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/VOP_REVOKE.9 ============================================================================== --- stable/11/share/man/man9/VOP_REVOKE.9 Fri Jul 19 14:24:33 2019 (r350126) +++ stable/11/share/man/man9/VOP_REVOKE.9 Fri Jul 19 14:25:49 2019 (r350127) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 5, 2002 +.Dd June 20, 2019 .Dt VOP_REVOKE 9 .Os .Sh NAME @@ -61,7 +61,7 @@ to signify that all access will be revoked; any other .Sh LOCKS The .Fa vp -must be unlocked on entry, and will remain unlocked upon return. +must be exclusively locked on entry, and will remain locked upon return. .Sh SEE ALSO .Xr make_dev_alias 9 , .Xr vnode 9 From owner-svn-src-stable-11@freebsd.org Fri Jul 19 15:24:09 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44F80A56A7; Fri, 19 Jul 2019 15:24:09 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2782B7298B; Fri, 19 Jul 2019 15:24:09 +0000 (UTC) (envelope-from ae@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA21B22F48; Fri, 19 Jul 2019 15:24:08 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6JFO8qI063414; Fri, 19 Jul 2019 15:24:08 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6JFO84W063413; Fri, 19 Jul 2019 15:24:08 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201907191524.x6JFO84W063413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 19 Jul 2019 15:24:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350138 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw X-SVN-Commit-Revision: 350138 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2782B7298B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2019 15:24:09 -0000 Author: ae Date: Fri Jul 19 15:24:08 2019 New Revision: 350138 URL: https://svnweb.freebsd.org/changeset/base/350138 Log: MFC r349940: Correctly truncate the rule in case when it has several action opcodes. It is possible, that opcode at the ACTION_PTR() location is not real action, but action modificator like "log", "tag" etc. In this case we need to check for each opcode in the loop to find O_EXTERNAL_ACTION. Obtained from: Yandex LLC Sponsored by: Yandex LLC MFC r349941: Do not modify cmd pointer if it is already last opcode in the rule. Modified: stable/11/sys/netpfil/ipfw/ip_fw_eaction.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw_eaction.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_eaction.c Fri Jul 19 15:17:54 2019 (r350137) +++ stable/11/sys/netpfil/ipfw/ip_fw_eaction.c Fri Jul 19 15:24:08 2019 (r350138) @@ -377,35 +377,51 @@ ipfw_reset_eaction(struct ip_fw_chain *ch, struct ip_f uint16_t eaction_id, uint16_t default_id, uint16_t instance_id) { ipfw_insn *cmd, *icmd; + int l, cmdlen; IPFW_UH_WLOCK_ASSERT(ch); IPFW_WLOCK_ASSERT(ch); cmd = ACTION_PTR(rule); + l = rule->cmd_len - rule->act_ofs; + while (l > 0) { + cmdlen = F_LEN(cmd); + l -= cmdlen; + if (cmd->opcode == O_EXTERNAL_ACTION || l <= 0) + break; + cmd += cmdlen; + } + /* + * Return if there is not O_EXTERNAL_ACTION or its id is + * different. + */ if (cmd->opcode != O_EXTERNAL_ACTION || cmd->arg1 != eaction_id) return (0); - - if (instance_id != 0 && rule->act_ofs < rule->cmd_len - 1) { + /* + * If instance_id is specified, we need to truncate the + * rule length. Check if there is O_EXTERNAL_INSTANCE opcode. + */ + if (instance_id != 0 && l > 0) { + MPASS(cmdlen == 1); icmd = cmd + 1; if (icmd->opcode != O_EXTERNAL_INSTANCE || icmd->arg1 != instance_id) return (0); - /* FALLTHROUGH */ + /* + * Since named_object related to this instance will be + * destroyed, truncate the chain of opcodes to remove + * the rest of cmd chain just after O_EXTERNAL_ACTION + * opcode. + */ + EACTION_DEBUG("truncate rule %d: len %u -> %u", + rule->rulenum, rule->cmd_len, rule->cmd_len - l); + rule->cmd_len -= l; + MPASS(((uint32_t *)icmd - + (uint32_t *)rule->cmd) == rule->cmd_len); } cmd->arg1 = default_id; /* Set to default id */ - /* - * Since named_object related to this instance will be - * also destroyed, truncate the chain of opcodes to - * remove the rest of cmd chain just after O_EXTERNAL_ACTION - * opcode. - */ - if (rule->act_ofs < rule->cmd_len - 1) { - EACTION_DEBUG("truncate rule %d: len %u -> %u", - rule->rulenum, rule->cmd_len, rule->act_ofs + 1); - rule->cmd_len = rule->act_ofs + 1; - } /* * Return 1 when reset successfully happened. */ From owner-svn-src-stable-11@freebsd.org Fri Jul 19 15:37:54 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7033AA5ABB; Fri, 19 Jul 2019 15:37:54 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4730873085; Fri, 19 Jul 2019 15:37:54 +0000 (UTC) (envelope-from philip@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18FDD23141; Fri, 19 Jul 2019 15:37:54 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x6JFbr7a069799; Fri, 19 Jul 2019 15:37:53 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x6JFbrF3069795; Fri, 19 Jul 2019 15:37:53 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201907191537.x6JFbrF3069795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Fri, 19 Jul 2019 15:37:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350140 - stable/11/contrib/telnet/telnet X-SVN-Group: stable-11 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: stable/11/contrib/telnet/telnet X-SVN-Commit-Revision: 350140 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4730873085 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2019 15:37:54 -0000 Author: philip Date: Fri Jul 19 15:37:53 2019 New Revision: 350140 URL: https://svnweb.freebsd.org/changeset/base/350140 Log: MFC r349890: telnet: fix a couple of snprintf() buffer overflows Obtained from: Juniper Networks MFC r349896: telnet: fix minor style violationo While here also fix a very unlikely NULL pointer dereference. Submitted by: Shawn Webb Modified: stable/11/contrib/telnet/telnet/commands.c stable/11/contrib/telnet/telnet/telnet.c stable/11/contrib/telnet/telnet/utilities.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/telnet/telnet/commands.c ============================================================================== --- stable/11/contrib/telnet/telnet/commands.c Fri Jul 19 15:37:29 2019 (r350139) +++ stable/11/contrib/telnet/telnet/commands.c Fri Jul 19 15:37:53 2019 (r350140) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -1654,11 +1655,14 @@ env_init(void) || (strncmp((char *)ep->value, "unix:", 5) == 0))) { char hbuf[256+1]; char *cp2 = strchr((char *)ep->value, ':'); + size_t buflen; - gethostname(hbuf, 256); - hbuf[256] = '\0'; - cp = (char *)malloc(strlen(hbuf) + strlen(cp2) + 1); - sprintf((char *)cp, "%s%s", hbuf, cp2); + gethostname(hbuf, sizeof(hbuf)); + hbuf[sizeof(hbuf)-1] = '\0'; + buflen = strlen(hbuf) + strlen(cp2) + 1; + cp = (char *)malloc(sizeof(char)*buflen); + assert(cp != NULL); + snprintf((char *)cp, buflen, "%s%s", hbuf, cp2); free(ep->value); ep->value = (unsigned char *)cp; } Modified: stable/11/contrib/telnet/telnet/telnet.c ============================================================================== --- stable/11/contrib/telnet/telnet/telnet.c Fri Jul 19 15:37:29 2019 (r350139) +++ stable/11/contrib/telnet/telnet/telnet.c Fri Jul 19 15:37:53 2019 (r350140) @@ -785,7 +785,7 @@ suboption(void) name = gettermname(); len = strlen(name) + 4 + 2; if (len < NETROOM()) { - sprintf(temp, "%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE, + snprintf(temp, sizeof(temp), "%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE, TELQUAL_IS, name, IAC, SE); ring_supply_data(&netoring, temp, len); printsub('>', &temp[2], len-2); @@ -807,7 +807,7 @@ suboption(void) TerminalSpeeds(&ispeed, &ospeed); - sprintf((char *)temp, "%c%c%c%c%ld,%ld%c%c", IAC, SB, TELOPT_TSPEED, + snprintf((char *)temp, sizeof(temp), "%c%c%c%c%ld,%ld%c%c", IAC, SB, TELOPT_TSPEED, TELQUAL_IS, ospeed, ispeed, IAC, SE); len = strlen((char *)temp+4) + 4; /* temp[3] is 0 ... */ Modified: stable/11/contrib/telnet/telnet/utilities.c ============================================================================== --- stable/11/contrib/telnet/telnet/utilities.c Fri Jul 19 15:37:29 2019 (r350139) +++ stable/11/contrib/telnet/telnet/utilities.c Fri Jul 19 15:37:53 2019 (r350140) @@ -629,7 +629,7 @@ printsub(char direction, unsigned char *pointer, int l } { char tbuf[64]; - sprintf(tbuf, "%s%s%s%s%s", + snprintf(tbuf, sizeof(tbuf), "%s%s%s%s%s", pointer[2]&MODE_EDIT ? "|EDIT" : "", pointer[2]&MODE_TRAPSIG ? "|TRAPSIG" : "", pointer[2]&MODE_SOFT_TAB ? "|SOFT_TAB" : "",