From owner-svn-src-stable-12@freebsd.org Sun Mar 3 03:40:12 2019 Return-Path: Delivered-To: svn-src-stable-12@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 341D21521F54; Sun, 3 Mar 2019 03:40:12 +0000 (UTC) (envelope-from ume@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 CF4EF6C54F; Sun, 3 Mar 2019 03:40:11 +0000 (UTC) (envelope-from ume@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 C5C3DEFA0; Sun, 3 Mar 2019 03:40:11 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x233eBY6028765; Sun, 3 Mar 2019 03:40:11 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x233eBuH028764; Sun, 3 Mar 2019 03:40:11 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201903030340.x233eBuH028764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Sun, 3 Mar 2019 03:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344737 - stable/12/usr.sbin/syslogd X-SVN-Group: stable-12 X-SVN-Commit-Author: ume X-SVN-Commit-Paths: stable/12/usr.sbin/syslogd X-SVN-Commit-Revision: 344737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CF4EF6C54F 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.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Mar 2019 03:40:12 -0000 Author: ume Date: Sun Mar 3 03:40:11 2019 New Revision: 344737 URL: https://svnweb.freebsd.org/changeset/base/344737 Log: MFC r344491: An IPv6 address matching should be fixed. Specifying an IPv6 address by the -a option was broken since r309933. Modified: stable/12/usr.sbin/syslogd/syslogd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/12/usr.sbin/syslogd/syslogd.c Sun Mar 3 03:36:33 2019 (r344736) +++ stable/12/usr.sbin/syslogd/syslogd.c Sun Mar 3 03:40:11 2019 (r344737) @@ -3202,8 +3202,8 @@ validate(struct sockaddr *sa, const char *hname) dprintf("rejected in rule %d due to scope mismatch.\n", i); continue; } - if (IN6_ARE_MASKED_ADDR_EQUAL(&sin6->sin6_addr, - &a6p->sin6_addr, &m6p->sin6_addr) != 0) { + if (!IN6_ARE_MASKED_ADDR_EQUAL(&sin6->sin6_addr, + &a6p->sin6_addr, &m6p->sin6_addr)) { dprintf("rejected in rule %d due to IP mismatch.\n", i); continue; } From owner-svn-src-stable-12@freebsd.org Mon Mar 4 03:30:41 2019 Return-Path: Delivered-To: svn-src-stable-12@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 38F921526F5C; Mon, 4 Mar 2019 03:30:41 +0000 (UTC) (envelope-from avos@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 CD92083CD4; Mon, 4 Mar 2019 03:30:40 +0000 (UTC) (envelope-from avos@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 C03F4262D9; Mon, 4 Mar 2019 03:30:40 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x243UefV079275; Mon, 4 Mar 2019 03:30:40 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x243UeXn079274; Mon, 4 Mar 2019 03:30:40 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903040330.x243UeXn079274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 4 Mar 2019 03:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344746 - in stable: 10/usr.sbin/rpc.ypupdated 11/usr.sbin/rpc.ypupdated 12/usr.sbin/rpc.ypupdated X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/usr.sbin/rpc.ypupdated 11/usr.sbin/rpc.ypupdated 12/usr.sbin/rpc.ypupdated X-SVN-Commit-Revision: 344746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CD92083CD4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.90 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.90)[-0.905,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Mar 2019 03:30:41 -0000 Author: avos Date: Mon Mar 4 03:30:39 2019 New Revision: 344746 URL: https://svnweb.freebsd.org/changeset/base/344746 Log: MFC r344244: Fix memory / resource leaks in usr.sbin/rpc.ypupdated/update.c Re-apply r343909 to this file to get the issue fixed. PR: 204956 Reported by: David Binderman Modified: stable/12/usr.sbin/rpc.ypupdated/update.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/rpc.ypupdated/update.c stable/11/usr.sbin/rpc.ypupdated/update.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/usr.sbin/rpc.ypupdated/update.c ============================================================================== --- stable/12/usr.sbin/rpc.ypupdated/update.c Mon Mar 4 03:02:14 2019 (r344745) +++ stable/12/usr.sbin/rpc.ypupdated/update.c Mon Mar 4 03:30:39 2019 (r344746) @@ -263,11 +263,14 @@ localupdate(char *name, char *filename, u_int op, u_in sprintf(tmpname, "%s.tmp", filename); rf = fopen(filename, "r"); if (rf == NULL) { - return (ERR_READ); + err = ERR_READ; + goto cleanup; } wf = fopen(tmpname, "w"); if (wf == NULL) { - return (ERR_WRITE); + fclose(rf); + err = ERR_WRITE; + goto cleanup; } err = -1; while (fgets(line, sizeof (line), rf)) { @@ -307,13 +310,17 @@ localupdate(char *name, char *filename, u_int op, u_in fclose(rf); if (err == 0) { if (rename(tmpname, filename) < 0) { - return (ERR_DBASE); + err = ERR_DBASE; + goto cleanup; } } else { if (unlink(tmpname) < 0) { - return (ERR_DBASE); + err = ERR_DBASE; + goto cleanup; } } +cleanup: + free(tmpname); return (err); } From owner-svn-src-stable-12@freebsd.org Mon Mar 4 03:38:45 2019 Return-Path: Delivered-To: svn-src-stable-12@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 1B1E515005C7; Mon, 4 Mar 2019 03:38:45 +0000 (UTC) (envelope-from avos@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 B4CC88453A; Mon, 4 Mar 2019 03:38:44 +0000 (UTC) (envelope-from avos@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 A720426480; Mon, 4 Mar 2019 03:38:44 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x243ci0s082186; Mon, 4 Mar 2019 03:38:44 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x243ciVm082184; Mon, 4 Mar 2019 03:38:44 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903040338.x243ciVm082184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 4 Mar 2019 03:38:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344747 - in stable: 10/usr.sbin/bsnmpd/modules/snmp_hostres 11/usr.sbin/bsnmpd/modules/snmp_hostres 12/usr.sbin/bsnmpd/modules/snmp_hostres X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 10/usr.sbin/bsnmpd/modules/snmp_hostres 11/usr.sbin/bsnmpd/modules/snmp_hostres 12/usr.sbin/bsnmpd/modules/snmp_hostres X-SVN-Commit-Revision: 344747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B4CC88453A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.90 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.90)[-0.905,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Mar 2019 03:38:45 -0000 Author: avos Date: Mon Mar 4 03:38:43 2019 New Revision: 344747 URL: https://svnweb.freebsd.org/changeset/base/344747 Log: MFC r344245: snmp_hostres(3): fix a typo in sanity checks in handle_chunk() PR: 204253 Submitted by: David Binderman Modified: stable/12/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c ============================================================================== --- stable/12/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c Mon Mar 4 03:30:39 2019 (r344746) +++ stable/12/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c Mon Mar 4 03:38:43 2019 (r344747) @@ -312,7 +312,7 @@ handle_chunk(int32_t ds_index, const char *chunk_name, assert(chunk_name != NULL); assert(chunk_name[0] != '\0'); - if (chunk_name == NULL || chunk_name == '\0') + if (chunk_name == NULL || chunk_name[0] == '\0') return; HRDBG("ANALYZE chunk %s", chunk_name); From owner-svn-src-stable-12@freebsd.org Mon Mar 4 21:10:43 2019 Return-Path: Delivered-To: svn-src-stable-12@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 E10791523280; Mon, 4 Mar 2019 21:10:42 +0000 (UTC) (envelope-from bdrewery@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 8594F88544; Mon, 4 Mar 2019 21:10:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CD3599AD; Mon, 4 Mar 2019 21:10:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x24LAfnj067796; Mon, 4 Mar 2019 21:10:41 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x24LAf2b067795; Mon, 4 Mar 2019 21:10:41 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201903042110.x24LAf2b067795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 4 Mar 2019 21:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344781 - stable/12/tools/build/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/12/tools/build/mk X-SVN-Commit-Revision: 344781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8594F88544 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Mar 2019 21:10:43 -0000 Author: bdrewery Date: Mon Mar 4 21:10:40 2019 New Revision: 344781 URL: https://svnweb.freebsd.org/changeset/base/344781 Log: MFC r344666: bsd.nls.mk isn't optional. PR: 232527 Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/12/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 4 19:50:59 2019 (r344780) +++ stable/12/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 4 21:10:40 2019 (r344781) @@ -6592,7 +6592,6 @@ OLD_DIRS+=var/yp .if ${MK_NLS} == no OLD_DIRS+=usr/share/nls/ OLD_DIRS+=usr/share/nls/C -OLD_FILES+=usr/share/mk/bsd.nls.mk OLD_FILES+=usr/share/nls/C/ee.cat OLD_DIRS+=usr/share/nls/af_ZA.ISO8859-1 OLD_DIRS+=usr/share/nls/af_ZA.ISO8859-15 From owner-svn-src-stable-12@freebsd.org Tue Mar 5 08:33:15 2019 Return-Path: Delivered-To: svn-src-stable-12@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 9B3A6151D6C4; Tue, 5 Mar 2019 08:33:15 +0000 (UTC) (envelope-from jah@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 1E879862E0; Tue, 5 Mar 2019 08:33:15 +0000 (UTC) (envelope-from jah@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 055551980C; Tue, 5 Mar 2019 08:33:15 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x258XE6V029560; Tue, 5 Mar 2019 08:33:14 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x258XE41029559; Tue, 5 Mar 2019 08:33:14 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201903050833.x258XE41029559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Tue, 5 Mar 2019 08:33:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344792 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: jah X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 344792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1E879862E0 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)[-1.000,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 08:33:15 -0000 Author: jah Date: Tue Mar 5 08:33:14 2019 New Revision: 344792 URL: https://svnweb.freebsd.org/changeset/base/344792 Log: MFC r344561: Fix incorrect assertion in vnode_pager_generic_getpages() Modified: stable/12/sys/vm/vnode_pager.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vnode_pager.c ============================================================================== --- stable/12/sys/vm/vnode_pager.c Tue Mar 5 04:16:50 2019 (r344791) +++ stable/12/sys/vm/vnode_pager.c Tue Mar 5 08:33:14 2019 (r344792) @@ -774,7 +774,7 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page KASSERT(foff < object->un_pager.vnp.vnp_size, ("%s: page %p offset beyond vp %p size", __func__, m[0], vp)); - KASSERT(count <= sizeof(bp->b_pages), + KASSERT(count <= nitems(bp->b_pages), ("%s: requested %d pages", __func__, count)); /* From owner-svn-src-stable-12@freebsd.org Tue Mar 5 08:45:08 2019 Return-Path: Delivered-To: svn-src-stable-12@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 57C71151DDB4; Tue, 5 Mar 2019 08:45:08 +0000 (UTC) (envelope-from kp@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 F2A8C86989; Tue, 5 Mar 2019 08:45:07 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5887199ED; Tue, 5 Mar 2019 08:45:07 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x258j72Z035160; Tue, 5 Mar 2019 08:45:07 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x258j7T2035155; Tue, 5 Mar 2019 08:45:07 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903050845.x258j7T2035155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Tue, 5 Mar 2019 08:45:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344793 - stable/12/tests/sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/tests/sys/netpfil/pf X-SVN-Commit-Revision: 344793 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F2A8C86989 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 08:45:08 -0000 Author: kp Date: Tue Mar 5 08:45:07 2019 New Revision: 344793 URL: https://svnweb.freebsd.org/changeset/base/344793 Log: MFC r344692: pf tests: Test CVE-2019-5597 Generate a fragmented packet with different header chains, to provoke the incorrect behaviour of pf. Without the fix this will trigger a panic. Obtained from: Corentin Bayet, Nicolas Collignon, Luca Moro at Synacktiv Added: stable/12/tests/sys/netpfil/pf/CVE-2019-5597.py - copied unchanged from r344692, head/tests/sys/netpfil/pf/CVE-2019-5597.py Modified: stable/12/tests/sys/netpfil/pf/Makefile stable/12/tests/sys/netpfil/pf/fragmentation.sh Directory Properties: stable/12/ (props changed) Copied: stable/12/tests/sys/netpfil/pf/CVE-2019-5597.py (from r344692, head/tests/sys/netpfil/pf/CVE-2019-5597.py) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/tests/sys/netpfil/pf/CVE-2019-5597.py Tue Mar 5 08:45:07 2019 (r344793, copy of r344692, head/tests/sys/netpfil/pf/CVE-2019-5597.py) @@ -0,0 +1,35 @@ +#!/usr/local/bin/python2.7 + +import random +import scapy.all as sp +import sys + +UDP_PROTO = 17 +AH_PROTO = 51 +FRAG_PROTO = 44 + +def main(): + intf = sys.argv[1] + ipv6_src = sys.argv[2] + ipv6_dst = sys.argv[3] + + ipv6_main = sp.IPv6(dst=ipv6_dst, src=ipv6_src) + + padding = 8 + fid = random.randint(0,100000) + frag_0 = sp.IPv6ExtHdrFragment(id=fid, nh=UDP_PROTO, m=1, offset=0) + frag_1 = sp.IPv6ExtHdrFragment(id=fid, nh=UDP_PROTO, m=0, offset=padding/8) + + pkt1_opts = sp.AH(nh=AH_PROTO, payloadlen=200) \ + / sp.Raw('XXXX' * 199) \ + / sp.AH(nh=FRAG_PROTO, payloadlen=1) \ + / frag_1 + + pkt0 = sp.Ether() / ipv6_main / frag_0 / sp.Raw('A' * padding) + pkt1 = sp.Ether() / ipv6_main / pkt1_opts / sp.Raw('B' * padding) + + sp.sendp(pkt0, iface=intf, verbose=False) + sp.sendp(pkt1, iface=intf, verbose=False) + +if __name__ == '__main__': + main() Modified: stable/12/tests/sys/netpfil/pf/Makefile ============================================================================== --- stable/12/tests/sys/netpfil/pf/Makefile Tue Mar 5 08:33:14 2019 (r344792) +++ stable/12/tests/sys/netpfil/pf/Makefile Tue Mar 5 08:45:07 2019 (r344793) @@ -19,8 +19,10 @@ ATF_TESTS_SH+= anchor \ ${PACKAGE}FILES+= utils.subr \ echo_inetd.conf \ - pft_ping.py + pft_ping.py \ + CVE-2019-5597.py ${PACKAGE}FILESMODE_pft_ping.py= 0555 +${PACKAGE}FILESMODE_CVE-2019-5597.py= 0555 .include Modified: stable/12/tests/sys/netpfil/pf/fragmentation.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/fragmentation.sh Tue Mar 5 08:33:14 2019 (r344792) +++ stable/12/tests/sys/netpfil/pf/fragmentation.sh Tue Mar 5 08:45:07 2019 (r344793) @@ -104,6 +104,11 @@ v6_body() atf_check -s exit:0 -o ignore\ ping6 -c 1 -b 70000 -s 65000 2001:db8:43::3 + + $(atf_get_srcdir)/CVE-2019-5597.py \ + ${epair_send}a \ + 2001:db8:42::1 \ + 2001:db8:43::3 } v6_cleanup() From owner-svn-src-stable-12@freebsd.org Tue Mar 5 18:10:07 2019 Return-Path: Delivered-To: svn-src-stable-12@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 CCD97150B4A3; Tue, 5 Mar 2019 18:10:07 +0000 (UTC) (envelope-from emaste@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 7572277A41; Tue, 5 Mar 2019 18:10:07 +0000 (UTC) (envelope-from emaste@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 68EAB1FA7C; Tue, 5 Mar 2019 18:10:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x25IA7mS030435; Tue, 5 Mar 2019 18:10:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x25IA7BR030434; Tue, 5 Mar 2019 18:10:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903051810.x25IA7BR030434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Mar 2019 18:10:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344799 - stable/12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 344799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7572277A41 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)[-1.000,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 18:10:08 -0000 Author: emaste Date: Tue Mar 5 18:10:06 2019 New Revision: 344799 URL: https://svnweb.freebsd.org/changeset/base/344799 Log: MFC r343589: freebsd-update: regenerate man page database after update These are currently not reproducible because they're built by the makewhatis on the freebsd-update build host, not the one in the tree. Regenerate after update, and later we can avoid including it in freebsd-update data. PR: 214545, 217389 Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 16:18:06 2019 (r344798) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:10:06 2019 (r344799) @@ -2907,6 +2907,17 @@ Kernel updates have been installed. Please reboot and cap_mkdb ${BASEDIR}/etc/login.conf fi + # Rebuild man page databases, if necessary. + for D in /usr/share/man /usr/share/openssl/man; do + if [ ! -d ${BASEDIR}/$D ]; then + continue + fi + if [ -z "$(find ${BASEDIR}/$D -type f -newer ${BASEDIR}/$D/mandoc.db)" ]; then + continue; + fi + makewhatis ${BASEDIR}/$D + done + # We've finished installing the world and deleting old files # which are not shared libraries. touch $1/worlddone From owner-svn-src-stable-12@freebsd.org Tue Mar 5 18:15:36 2019 Return-Path: Delivered-To: svn-src-stable-12@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 C89ED150B779; Tue, 5 Mar 2019 18:15:36 +0000 (UTC) (envelope-from emaste@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 6B5DD80009; Tue, 5 Mar 2019 18:15:36 +0000 (UTC) (envelope-from emaste@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 5DA7B1FC1D; Tue, 5 Mar 2019 18:15:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x25IFavx035710; Tue, 5 Mar 2019 18:15:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x25IFaMb035709; Tue, 5 Mar 2019 18:15:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903051815.x25IFaMb035709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Mar 2019 18:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344801 - stable/12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 344801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6B5DD80009 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)[-1.000,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 18:15:37 -0000 Author: emaste Date: Tue Mar 5 18:15:35 2019 New Revision: 344801 URL: https://svnweb.freebsd.org/changeset/base/344801 Log: MFC r343409: freebsd-update: Stop installing empty component sets Submitted by: Gerald Aryeetey Reported by: rgrimes Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:11:36 2019 (r344800) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:15:35 2019 (r344801) @@ -2170,7 +2170,7 @@ upgrade_guess_components () { sort -k 2,2 -t ' ' > compfreq.present join -t ' ' -1 2 -2 2 compfreq.present compfreq.total | while read S P T; do - if [ ${P} -gt `expr ${T} / 2` ]; then + if [ ${T} -ne 0 -a ${P} -gt `expr ${T} / 2` ]; then echo ${S} fi done > comp.present From owner-svn-src-stable-12@freebsd.org Tue Mar 5 18:19:27 2019 Return-Path: Delivered-To: svn-src-stable-12@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 BC6D6150B980; Tue, 5 Mar 2019 18:19:27 +0000 (UTC) (envelope-from emaste@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 5D8CA803C7; Tue, 5 Mar 2019 18:19:27 +0000 (UTC) (envelope-from emaste@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 33E901FC1F; Tue, 5 Mar 2019 18:19:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x25IJR6D036007; Tue, 5 Mar 2019 18:19:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x25IJRLc036006; Tue, 5 Mar 2019 18:19:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903051819.x25IJRLc036006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Mar 2019 18:19:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344803 - stable/12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 344803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5D8CA803C7 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 18:19:28 -0000 Author: emaste Date: Tue Mar 5 18:19:26 2019 New Revision: 344803 URL: https://svnweb.freebsd.org/changeset/base/344803 Log: MFC r343407: freebsd-update: open $PAGER only if necessary PR: 194547, 208497 Submitted by: Gerald Aryeetey Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:17:06 2019 (r344802) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:19:26 2019 (r344803) @@ -1921,13 +1921,11 @@ fetch_create_manifest () { # Report to the user if any updates were avoided due to local changes if [ -s modifiedfiles ]; then - echo - echo -n "The following files are affected by updates, " - echo "but no changes have" - echo -n "been downloaded because the files have been " - echo "modified locally:" - cat modifiedfiles - fi | $PAGER + cat - modifiedfiles <<- EOF | ${PAGER} + The folling files are affected by updates but no changes have + been downloaded because the files have been modified locally: + EOF + fi rm modifiedfiles # If no files will be updated, tell the user and exit @@ -1953,30 +1951,29 @@ fetch_create_manifest () { # Report removed files, if any if [ -s files.removed ]; then - echo - echo -n "The following files will be removed " - echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" - cat files.removed - fi | $PAGER + cat - files.removed <<- EOF | ${PAGER} + The following files will be removed as part of updating to + ${RELNUM}-p${RELPATCHNUM}: + EOF + fi rm files.removed # Report added files, if any if [ -s files.added ]; then - echo - echo -n "The following files will be added " - echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" - cat files.added - fi | $PAGER + cat - files.added <<- EOF | ${PAGER} + The following files will be added as part of updating to + ${RELNUM}-p${RELPATCHNUM}: + EOF + fi rm files.added # Report updated files, if any if [ -s files.updated ]; then - echo - echo -n "The following files will be updated " - echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" - - cat files.updated - fi | $PAGER + cat - files.updated <<- EOF | ${PAGER} + The following files will be updated as part of updating to + ${RELNUM}-p${RELPATCHNUM}: + EOF + fi rm files.updated # Create a directory for the install manifest. From owner-svn-src-stable-12@freebsd.org Tue Mar 5 18:23:32 2019 Return-Path: Delivered-To: svn-src-stable-12@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 19BCA150BF9C; Tue, 5 Mar 2019 18:23:32 +0000 (UTC) (envelope-from emaste@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 B312080B9F; Tue, 5 Mar 2019 18:23:31 +0000 (UTC) (envelope-from emaste@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 9E2401FDC4; Tue, 5 Mar 2019 18:23:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x25INVYr041324; Tue, 5 Mar 2019 18:23:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x25INVVa041323; Tue, 5 Mar 2019 18:23:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903051823.x25INVVa041323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Mar 2019 18:23:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344805 - stable/12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 344805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B312080B9F 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 18:23:32 -0000 Author: emaste Date: Tue Mar 5 18:23:31 2019 New Revision: 344805 URL: https://svnweb.freebsd.org/changeset/base/344805 Log: MFC r343412: Fix a typo/wordsmith a description modified in [MFC of r343407] Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:20:16 2019 (r344804) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:23:31 2019 (r344805) @@ -1922,8 +1922,9 @@ fetch_create_manifest () { # Report to the user if any updates were avoided due to local changes if [ -s modifiedfiles ]; then cat - modifiedfiles <<- EOF | ${PAGER} - The folling files are affected by updates but no changes have - been downloaded because the files have been modified locally: + The following files are affected by updates. No changes have + been downloaded, however, because the files have been modified + locally: EOF fi rm modifiedfiles From owner-svn-src-stable-12@freebsd.org Tue Mar 5 18:26:35 2019 Return-Path: Delivered-To: svn-src-stable-12@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 C23FB150C1FA; Tue, 5 Mar 2019 18:26:35 +0000 (UTC) (envelope-from emaste@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 449A080F59; Tue, 5 Mar 2019 18:26:35 +0000 (UTC) (envelope-from emaste@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 35D801FDC8; Tue, 5 Mar 2019 18:26:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x25IQZAL041590; Tue, 5 Mar 2019 18:26:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x25IQZ0r041589; Tue, 5 Mar 2019 18:26:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903051826.x25IQZ0r041589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Mar 2019 18:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344807 - stable/12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 344807 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 449A080F59 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)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 18:26:35 -0000 Author: emaste Date: Tue Mar 5 18:26:34 2019 New Revision: 344807 URL: https://svnweb.freebsd.org/changeset/base/344807 Log: MFC r343411: freebsd-update: Clarify unsupported upgrade message PR: 204115 Submitted by: Gerald Aryeetey Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:23:55 2019 (r344806) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:26:34 2019 (r344807) @@ -994,7 +994,16 @@ fetch_pick_server () { # Have we run out of mirrors? if [ `wc -l < serverlist` -eq 0 ]; then - echo "No mirrors remaining, giving up." + cat <<- EOF + No mirrors remaining, giving up. + + This may be because upgrading from this platform (${ARCH}) + or release (${RELNUM}) is unsupported by `basename $0`. Only + platforms with Tier 1 support can be upgraded by `basename $0`. + See https://www.freebsd.org/platforms/index.html for more info. + + If unsupported, FreeBSD must be upgraded by source. + EOF return 1 fi From owner-svn-src-stable-12@freebsd.org Tue Mar 5 18:29:26 2019 Return-Path: Delivered-To: svn-src-stable-12@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 7FCC8150C4B4; Tue, 5 Mar 2019 18:29:26 +0000 (UTC) (envelope-from emaste@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 24C4A81373; Tue, 5 Mar 2019 18:29:26 +0000 (UTC) (envelope-from emaste@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 1AD7D1FDCD; Tue, 5 Mar 2019 18:29:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x25ITPgN041863; Tue, 5 Mar 2019 18:29:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x25ITP9j041862; Tue, 5 Mar 2019 18:29:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903051829.x25ITP9j041862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Mar 2019 18:29:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344809 - stable/12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 344809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 24C4A81373 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)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 18:29:26 -0000 Author: emaste Date: Tue Mar 5 18:29:25 2019 New Revision: 344809 URL: https://svnweb.freebsd.org/changeset/base/344809 Log: MFC r343270: freebsd-update: Update /etc/passwd after password db changes Add -p to pwd_mkdb in order to ensure password db changes are also included in /etc/passwd. PR: 165954, 232921, 229487 Submitted by: Gerald Aryeetey Reviewed by: jilles Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:27:29 2019 (r344808) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:29:25 2019 (r344809) @@ -2903,10 +2903,11 @@ Kernel updates have been installed. Please reboot and install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 - # Rebuild /etc/spwd.db and /etc/pwd.db if necessary. + # Rebuild generated pwd files. if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] || - [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ]; then - pwd_mkdb -d ${BASEDIR}/etc ${BASEDIR}/etc/master.passwd + [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ] || + [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/passwd ]; then + pwd_mkdb -d ${BASEDIR}/etc -p ${BASEDIR}/etc/master.passwd fi # Rebuild /etc/login.conf.db if necessary. From owner-svn-src-stable-12@freebsd.org Tue Mar 5 18:52:14 2019 Return-Path: Delivered-To: svn-src-stable-12@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 97051150D516; Tue, 5 Mar 2019 18:52:14 +0000 (UTC) (envelope-from emaste@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 3D3638283A; Tue, 5 Mar 2019 18:52:14 +0000 (UTC) (envelope-from emaste@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 30F0A20305; Tue, 5 Mar 2019 18:52:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x25IqEpY056307; Tue, 5 Mar 2019 18:52:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x25IqEGK056296; Tue, 5 Mar 2019 18:52:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903051852.x25IqEGK056296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Mar 2019 18:52:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344811 - stable/12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 344811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3D3638283A 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 18:52:14 -0000 Author: emaste Date: Tue Mar 5 18:52:13 2019 New Revision: 344811 URL: https://svnweb.freebsd.org/changeset/base/344811 Log: MFC r343152: freebsd-update: Use BASEDIR when checking for src component src could potentially be installed under the based dir and not under the root or vice versa. PR: 224048 Submitted by: Gerald Aryeetey Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:30:43 2019 (r344810) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:52:13 2019 (r344811) @@ -221,7 +221,7 @@ config_KeepModifiedMetadata () { config_Components () { for C in $@; do if [ "$C" = "src" ]; then - if [ -e /usr/src/COPYRIGHT ]; then + if [ -e "${BASEDIR}/usr/src/COPYRIGHT" ]; then COMPONENTS="${COMPONENTS} ${C}" else echo "src component not installed, skipped" From owner-svn-src-stable-12@freebsd.org Tue Mar 5 19:01:58 2019 Return-Path: Delivered-To: svn-src-stable-12@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 83DA2150DEE1; Tue, 5 Mar 2019 19:01:58 +0000 (UTC) (envelope-from emaste@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 24DAA831C2; Tue, 5 Mar 2019 19:01:58 +0000 (UTC) (envelope-from emaste@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 1AC93203B0; Tue, 5 Mar 2019 19:01:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x25J1vS4060256; Tue, 5 Mar 2019 19:01:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x25J1vFl060255; Tue, 5 Mar 2019 19:01:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903051901.x25J1vFl060255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Mar 2019 19:01:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344814 - stable/12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 344814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 24DAA831C2 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 19:01:58 -0000 Author: emaste Date: Tue Mar 5 19:01:57 2019 New Revision: 344814 URL: https://svnweb.freebsd.org/changeset/base/344814 Log: MFC freebsd-update: Clarify unsupported release upgrade error message MFC r343122: freebsd-update: Clarify unsupported release upgrade error message Notify users that upgrading from -CURRENT or -STABLE is unsupported by freebsd-update. Also ensure --currently-running provides a correctly formatted release (as done by -r). Reported by: yuri Reviewed by: bcran MFC r343268: frebsd-update: fix --currently-running after r343122 Reported by: Brandon Schneider MFC rr343271: freebsd-update: Allow upgrade from pre-release builds Update r343122 to include -ALPHA, -BETA and -RC releases as upgrade-able via freebsd-update. Reported by: delphij, des Reviewed by: delphij PR: 234771 Submitted by: Gerald Aryeetey Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:54:47 2019 (r344813) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 19:01:57 2019 (r344814) @@ -304,6 +304,15 @@ config_TargetRelease () { fi } +# Pretend current release is FreeBSD $1 +config_SourceRelease () { + UNAME_r=$1 + if echo ${UNAME_r} | grep -qE '^[0-9.]+$'; then + UNAME_r="${UNAME_r}-RELEASE" + fi + export UNAME_r +} + # Define what happens to output of utilities config_VerboseLevel () { if [ -z ${VERBOSELEVEL} ]; then @@ -442,7 +451,8 @@ parse_cmdline () { NOTTYOK=1 ;; --currently-running) - shift; export UNAME_r="$1" + shift + config_SourceRelease $1 || usage ;; # Configuration file equivalents @@ -657,6 +667,24 @@ fetchupgrade_check_params () { ARCH=`uname -m` FETCHDIR=${RELNUM}/${ARCH} PATCHDIR=${RELNUM}/${ARCH}/bp + + # Disallow upgrade from a version that is not a release + case ${RELNUM} in + *-RELEASE | *-ALPHA* | *-BETA* | *-RC*) + ;; + *) + echo -n "`basename $0`: " + cat <<- EOF + Cannot upgrade from a version that is not a release + (including alpha, beta and release candidates) + using `basename $0`. Instead, FreeBSD can be directly + upgraded by source or upgraded to a RELEASE/RELENG version + prior to running `basename $0`. + Currently running: ${RELNUM} + EOF + exit 1 + ;; + esac # Figure out what directory contains the running kernel BOOTFILE=`sysctl -n kern.bootfile` From owner-svn-src-stable-12@freebsd.org Tue Mar 5 19:08:38 2019 Return-Path: Delivered-To: svn-src-stable-12@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 846A9150E3A5; Tue, 5 Mar 2019 19:08:38 +0000 (UTC) (envelope-from emaste@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 2874B83817; Tue, 5 Mar 2019 19:08:38 +0000 (UTC) (envelope-from emaste@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 1C58D20509; Tue, 5 Mar 2019 19:08:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x25J8bK6063345; Tue, 5 Mar 2019 19:08:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x25J8bva063344; Tue, 5 Mar 2019 19:08:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903051908.x25J8bva063344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Mar 2019 19:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344816 - stable/12/usr.sbin/freebsd-update X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/usr.sbin/freebsd-update X-SVN-Commit-Revision: 344816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2874B83817 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)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 19:08:38 -0000 Author: emaste Date: Tue Mar 5 19:08:37 2019 New Revision: 344816 URL: https://svnweb.freebsd.org/changeset/base/344816 Log: MFC r343410: freebsd-update: fix style from r343271 change PR: 234771 Submitted by: Gerald Aryeetey Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 19:07:46 2019 (r344815) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 19:08:37 2019 (r344816) @@ -670,20 +670,20 @@ fetchupgrade_check_params () { # Disallow upgrade from a version that is not a release case ${RELNUM} in - *-RELEASE | *-ALPHA* | *-BETA* | *-RC*) - ;; - *) - echo -n "`basename $0`: " - cat <<- EOF - Cannot upgrade from a version that is not a release - (including alpha, beta and release candidates) - using `basename $0`. Instead, FreeBSD can be directly - upgraded by source or upgraded to a RELEASE/RELENG version - prior to running `basename $0`. - Currently running: ${RELNUM} - EOF - exit 1 - ;; + *-RELEASE | *-ALPHA* | *-BETA* | *-RC*) + ;; + *) + echo -n "`basename $0`: " + cat <<- EOF + Cannot upgrade from a version that is not a release + (including alpha, beta and release candidates) + using `basename $0`. Instead, FreeBSD can be directly + upgraded by source or upgraded to a RELEASE/RELENG version + prior to running `basename $0`. + Currently running: ${RELNUM} + EOF + exit 1 + ;; esac # Figure out what directory contains the running kernel From owner-svn-src-stable-12@freebsd.org Tue Mar 5 19:37:07 2019 Return-Path: Delivered-To: svn-src-stable-12@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 AA3A8150F607; Tue, 5 Mar 2019 19:37:07 +0000 (UTC) (envelope-from markj@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 4A44A84F44; Tue, 5 Mar 2019 19:37:07 +0000 (UTC) (envelope-from markj@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 37E1320A4D; Tue, 5 Mar 2019 19:37:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x25Jb7fb079187; Tue, 5 Mar 2019 19:37:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x25Jb7jB079186; Tue, 5 Mar 2019 19:37:07 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201903051937.x25Jb7jB079186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 5 Mar 2019 19:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344819 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 344819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4A44A84F44 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 19:37:07 -0000 Author: markj Date: Tue Mar 5 19:37:06 2019 New Revision: 344819 URL: https://svnweb.freebsd.org/changeset/base/344819 Log: MFC r344278: Move a racy assertion in filt_pipewrite(). PR: 235640 Modified: stable/12/sys/kern/sys_pipe.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/sys_pipe.c ============================================================================== --- stable/12/sys/kern/sys_pipe.c Tue Mar 5 19:17:24 2019 (r344818) +++ stable/12/sys/kern/sys_pipe.c Tue Mar 5 19:37:06 2019 (r344819) @@ -1743,15 +1743,19 @@ static int filt_pipewrite(struct knote *kn, long hint) { struct pipe *wpipe; - + + /* + * If this end of the pipe is closed, the knote was removed from the + * knlist and the list lock (i.e., the pipe lock) is therefore not held. + */ wpipe = kn->kn_hook; - PIPE_LOCK_ASSERT(wpipe, MA_OWNED); if (wpipe->pipe_present != PIPE_ACTIVE || (wpipe->pipe_state & PIPE_EOF)) { kn->kn_data = 0; kn->kn_flags |= EV_EOF; return (1); } + PIPE_LOCK_ASSERT(wpipe, MA_OWNED); kn->kn_data = (wpipe->pipe_buffer.size > 0) ? (wpipe->pipe_buffer.size - wpipe->pipe_buffer.cnt) : PIPE_BUF; if (wpipe->pipe_state & PIPE_DIRECTW) From owner-svn-src-stable-12@freebsd.org Tue Mar 5 19:41:09 2019 Return-Path: Delivered-To: svn-src-stable-12@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 26297150FA0F; Tue, 5 Mar 2019 19:41:09 +0000 (UTC) (envelope-from markj@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 B9B3085368; Tue, 5 Mar 2019 19:41:08 +0000 (UTC) (envelope-from markj@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 AF55720B88; Tue, 5 Mar 2019 19:41:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x25Jf8sN081093; Tue, 5 Mar 2019 19:41:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x25Jf8gd081092; Tue, 5 Mar 2019 19:41:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201903051941.x25Jf8gd081092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 5 Mar 2019 19:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344821 - stable/12/sys/geom/concat X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/geom/concat X-SVN-Commit-Revision: 344821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B9B3085368 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 19:41:09 -0000 Author: markj Date: Tue Mar 5 19:41:08 2019 New Revision: 344821 URL: https://svnweb.freebsd.org/changeset/base/344821 Log: MFC r344600: Add a missing return statement to g_concat_kernel_dump(). Modified: stable/12/sys/geom/concat/g_concat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/geom/concat/g_concat.c ============================================================================== --- stable/12/sys/geom/concat/g_concat.c Tue Mar 5 19:39:13 2019 (r344820) +++ stable/12/sys/geom/concat/g_concat.c Tue Mar 5 19:41:08 2019 (r344821) @@ -238,8 +238,10 @@ g_concat_kernel_dump(struct bio *bp) sc->sc_disks[i].d_end > gkd->offset) break; } - if (i == sc->sc_ndisks) + if (i == sc->sc_ndisks) { g_io_deliver(bp, EOPNOTSUPP); + return; + } disk = &sc->sc_disks[i]; gkd->offset -= disk->d_start; if (gkd->length > disk->d_end - disk->d_start - gkd->offset) From owner-svn-src-stable-12@freebsd.org Wed Mar 6 00:45:43 2019 Return-Path: Delivered-To: svn-src-stable-12@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 10C3D151D919; Wed, 6 Mar 2019 00:45:43 +0000 (UTC) (envelope-from emaste@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 A912169ECA; Wed, 6 Mar 2019 00:45:42 +0000 (UTC) (envelope-from emaste@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 9D98023EFF; Wed, 6 Mar 2019 00:45:42 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x260jgrl045727; Wed, 6 Mar 2019 00:45:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x260jgIY045726; Wed, 6 Mar 2019 00:45:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903060045.x260jgIY045726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 6 Mar 2019 00:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344832 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 344832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A912169ECA 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 00:45:43 -0000 Author: emaste Date: Wed Mar 6 00:45:42 2019 New Revision: 344832 URL: https://svnweb.freebsd.org/changeset/base/344832 Log: MFC r344628: poll.2: POLLNVAL is returned also for insufficient rights Reported by: Bora Özarslan Sponsored by: The FreeBSD Foundation Modified: stable/12/lib/libc/sys/poll.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/poll.2 ============================================================================== --- stable/12/lib/libc/sys/poll.2 Wed Mar 6 00:38:10 2019 (r344831) +++ stable/12/lib/libc/sys/poll.2 Wed Mar 6 00:45:42 2019 (r344832) @@ -28,7 +28,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 13, 2014 +.Dd February 27, 2019 .Dt POLL 2 .Os .Sh NAME @@ -127,7 +127,8 @@ should never be present in the .Fa revents bitmask at the same time. .It POLLNVAL -The file descriptor is not open. +The file descriptor is not open, +or in capability mode the file descriptor has insufficient rights. This flag is always checked, even if not present in the .Fa events From owner-svn-src-stable-12@freebsd.org Wed Mar 6 02:37:36 2019 Return-Path: Delivered-To: svn-src-stable-12@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 9908B15220F4; Wed, 6 Mar 2019 02:37:35 +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 33F536DA72; Wed, 6 Mar 2019 02:37:35 +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 B95FA25180; Wed, 6 Mar 2019 02:37:34 +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 x262bYrO003769; Wed, 6 Mar 2019 02:37:34 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x262bUAm003746; Wed, 6 Mar 2019 02:37:30 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201903060237.x262bUAm003746@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 6 Mar 2019 02:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344833 - in stable: 11/contrib/ipfilter 11/contrib/ipfilter/ipsend 11/contrib/ipfilter/ipsend/.OLD 11/contrib/ipfilter/lib 11/contrib/ipfilter/tools 11/sys/contrib/ipfilter/netinet 12/... X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ipfilter 11/contrib/ipfilter/ipsend 11/contrib/ipfilter/ipsend/.OLD 11/contrib/ipfilter/lib 11/contrib/ipfilter/tools 11/sys/contrib/ipfilter/netinet 12/contrib/ipfilter 12/contr... X-SVN-Commit-Revision: 344833 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 33F536DA72 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 02:37:36 -0000 Author: cy Date: Wed Mar 6 02:37:25 2019 New Revision: 344833 URL: https://svnweb.freebsd.org/changeset/base/344833 Log: MFC r343701 & r343732: ipfilter #ifdef cleanup. Remove #ifdefs for ancient and irrelevant operating systems from ipfilter. When ipfilter was written the UNIX and UNIX-like systems in use were diverse and plentiful. IRIX, Tru64 (OSF/1) don't exist any more. OpenBSD removed ipfilter shortly after the first time the ipfilter license terms changed in the early 2000's. ipfilter on AIX, HP/UX, and Linux never really caught on. Removal of code for operating systems that ipfilter will never run on again will simplify the code making it easier to fix bugs, complete partially implemented features, and extend ipfilter. Unsupported previous version FreeBSD code and some older NetBSD code has also been removed. What remains is supported FreeBSD, NetBSD, and illumos. FreeBSD and NetBSD have collaborated exchanging patches, while illumos has expressed willingness to have their ipfilter updated to 5.1.2, provided their zone-specific updates to their ipfilter are merged (which are of interest to FreeBSD to allow control of ipfilters in jails from the global zone). Reviewed by: glebius@ Differential Revision: https://reviews.freebsd.org/D19006 Modified: stable/12/contrib/ipfilter/arc4random.c stable/12/contrib/ipfilter/ip_dstlist.c stable/12/contrib/ipfilter/ip_fil.c stable/12/contrib/ipfilter/ip_fil_compat.c stable/12/contrib/ipfilter/ipf.h stable/12/contrib/ipfilter/ipsend/.OLD/ip_compat.h stable/12/contrib/ipfilter/ipsend/44arp.c stable/12/contrib/ipfilter/ipsend/arp.c stable/12/contrib/ipfilter/ipsend/dlcommon.c stable/12/contrib/ipfilter/ipsend/ip.c stable/12/contrib/ipfilter/ipsend/ipresend.c stable/12/contrib/ipfilter/ipsend/ipsend.c stable/12/contrib/ipfilter/ipsend/ipsend.h stable/12/contrib/ipfilter/ipsend/ipsopt.c stable/12/contrib/ipfilter/ipsend/iptest.c stable/12/contrib/ipfilter/ipsend/iptests.c stable/12/contrib/ipfilter/ipsend/resend.c stable/12/contrib/ipfilter/ipsend/sdlpi.c stable/12/contrib/ipfilter/ipsend/sock.c stable/12/contrib/ipfilter/lib/getifname.c stable/12/contrib/ipfilter/lib/getproto.c stable/12/contrib/ipfilter/lib/inet_addr.c stable/12/contrib/ipfilter/lib/kmem.c stable/12/contrib/ipfilter/lib/printproto.c stable/12/contrib/ipfilter/md5.c stable/12/contrib/ipfilter/tools/ipf.c stable/12/contrib/ipfilter/tools/ipfs.c stable/12/contrib/ipfilter/tools/ipfstat.c stable/12/contrib/ipfilter/tools/ipftest.c stable/12/contrib/ipfilter/tools/ipmon.c stable/12/contrib/ipfilter/tools/ipnat.c stable/12/contrib/ipfilter/tools/ipnat_y.y stable/12/contrib/ipfilter/tools/ippool.c stable/12/contrib/ipfilter/tools/ippool_y.y stable/12/sys/contrib/ipfilter/netinet/fil.c stable/12/sys/contrib/ipfilter/netinet/ip_auth.c stable/12/sys/contrib/ipfilter/netinet/ip_compat.h stable/12/sys/contrib/ipfilter/netinet/ip_dstlist.c stable/12/sys/contrib/ipfilter/netinet/ip_fil.h stable/12/sys/contrib/ipfilter/netinet/ip_frag.c stable/12/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c stable/12/sys/contrib/ipfilter/netinet/ip_htable.c stable/12/sys/contrib/ipfilter/netinet/ip_irc_pxy.c stable/12/sys/contrib/ipfilter/netinet/ip_log.c stable/12/sys/contrib/ipfilter/netinet/ip_lookup.c stable/12/sys/contrib/ipfilter/netinet/ip_nat.c stable/12/sys/contrib/ipfilter/netinet/ip_nat.h stable/12/sys/contrib/ipfilter/netinet/ip_nat6.c stable/12/sys/contrib/ipfilter/netinet/ip_pool.c stable/12/sys/contrib/ipfilter/netinet/ip_proxy.c stable/12/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c stable/12/sys/contrib/ipfilter/netinet/ip_scan.c stable/12/sys/contrib/ipfilter/netinet/ip_state.c stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/arc4random.c stable/11/contrib/ipfilter/ip_dstlist.c stable/11/contrib/ipfilter/ip_fil.c stable/11/contrib/ipfilter/ip_fil_compat.c stable/11/contrib/ipfilter/ipf.h stable/11/contrib/ipfilter/ipsend/.OLD/ip_compat.h stable/11/contrib/ipfilter/ipsend/44arp.c stable/11/contrib/ipfilter/ipsend/arp.c stable/11/contrib/ipfilter/ipsend/dlcommon.c stable/11/contrib/ipfilter/ipsend/ip.c stable/11/contrib/ipfilter/ipsend/ipresend.c stable/11/contrib/ipfilter/ipsend/ipsend.c stable/11/contrib/ipfilter/ipsend/ipsend.h stable/11/contrib/ipfilter/ipsend/ipsopt.c stable/11/contrib/ipfilter/ipsend/iptest.c stable/11/contrib/ipfilter/ipsend/iptests.c stable/11/contrib/ipfilter/ipsend/resend.c stable/11/contrib/ipfilter/ipsend/sdlpi.c stable/11/contrib/ipfilter/ipsend/sock.c stable/11/contrib/ipfilter/lib/getifname.c stable/11/contrib/ipfilter/lib/getproto.c stable/11/contrib/ipfilter/lib/inet_addr.c stable/11/contrib/ipfilter/lib/kmem.c stable/11/contrib/ipfilter/lib/printproto.c stable/11/contrib/ipfilter/md5.c stable/11/contrib/ipfilter/tools/ipf.c stable/11/contrib/ipfilter/tools/ipfs.c stable/11/contrib/ipfilter/tools/ipfstat.c stable/11/contrib/ipfilter/tools/ipftest.c stable/11/contrib/ipfilter/tools/ipmon.c stable/11/contrib/ipfilter/tools/ipnat.c stable/11/contrib/ipfilter/tools/ipnat_y.y stable/11/contrib/ipfilter/tools/ippool.c stable/11/contrib/ipfilter/tools/ippool_y.y stable/11/sys/contrib/ipfilter/netinet/fil.c stable/11/sys/contrib/ipfilter/netinet/ip_auth.c stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_dstlist.c stable/11/sys/contrib/ipfilter/netinet/ip_fil.h stable/11/sys/contrib/ipfilter/netinet/ip_frag.c stable/11/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c stable/11/sys/contrib/ipfilter/netinet/ip_htable.c stable/11/sys/contrib/ipfilter/netinet/ip_irc_pxy.c stable/11/sys/contrib/ipfilter/netinet/ip_log.c stable/11/sys/contrib/ipfilter/netinet/ip_lookup.c stable/11/sys/contrib/ipfilter/netinet/ip_nat.c stable/11/sys/contrib/ipfilter/netinet/ip_nat.h stable/11/sys/contrib/ipfilter/netinet/ip_nat6.c stable/11/sys/contrib/ipfilter/netinet/ip_pool.c stable/11/sys/contrib/ipfilter/netinet/ip_proxy.c stable/11/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c stable/11/sys/contrib/ipfilter/netinet/ip_scan.c stable/11/sys/contrib/ipfilter/netinet/ip_state.c stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/ipfilter/arc4random.c ============================================================================== --- stable/12/contrib/ipfilter/arc4random.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/arc4random.c Wed Mar 6 02:37:25 2019 (r344833) @@ -7,7 +7,7 @@ * * Dan Moschuk */ -#if !defined(SOLARIS2) && !defined(__osf__) +#if !defined(SOLARIS2) # include #endif @@ -16,26 +16,16 @@ #ifdef __FreeBSD__ # include #endif -#if !defined(__osf__) # include -#endif #ifdef __FreeBSD__ # include #endif #include -#ifndef __osf__ # include -#endif #include -#if defined(SOLARIS2) && (SOLARIS2 < 9) -# include -#endif #include #include -#ifdef __osf__ -# include -#endif #include #include #include "netinet/ip_compat.h" Modified: stable/12/contrib/ipfilter/ip_dstlist.c ============================================================================== --- stable/12/contrib/ipfilter/ip_dstlist.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ip_dstlist.c Wed Mar 6 02:37:25 2019 (r344833) @@ -9,9 +9,6 @@ # define KERNEL 1 # define _KERNEL 1 #endif -#if defined(__osf__) -# define _PROTO_NET_H_ -#endif #include #include #include @@ -21,9 +18,6 @@ # include # include # define _KERNEL -# ifdef __OpenBSD__ -struct file; -# endif # include # undef _KERNEL #else @@ -33,14 +27,12 @@ struct file; # endif #endif #include -#if !defined(linux) # include -#endif #include -#if defined(_KERNEL) && (!defined(__SVR4) && !defined(__svr4__)) +#if defined(_KERNEL) && !defined(__SVR4) # include #endif -#if defined(__SVR4) || defined(__svr4__) +#if defined(__SVR4) # include # include # ifdef _KERNEL @@ -49,7 +41,7 @@ struct file; # include # include #endif -#if defined(__FreeBSD_version) && (__FreeBSD_version >= 300000) +#if defined(__FreeBSD_version) # include #endif Modified: stable/12/contrib/ipfilter/ip_fil.c ============================================================================== --- stable/12/contrib/ipfilter/ip_fil.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ip_fil.c Wed Mar 6 02:37:25 2019 (r344833) @@ -25,24 +25,10 @@ struct rtentry; static void ipf_setifpaddr __P((struct ifnet *, char *)); void init_ifp __P((void)); -#if defined(__sgi) && (IRIX < 60500) static int no_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *)); -static int write_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *)); -#else -# if TRU64 >= 1885 -static int no_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *, struct rtentry *, char *)); -static int write_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *, struct rtentry *, char *)); -# else -static int no_output __P((struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *)); static int write_output __P((struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *)); -# endif -#endif struct ifaddr { struct sockaddr_storage ifa_addr; @@ -123,17 +109,8 @@ ipf_forgetifp(softc, ifp) static int -#if defined(__sgi) && (IRIX < 60500) -no_output(ifp, m, s) -#else -# if TRU64 >= 1885 -no_output (ifp, m, s, rt, cp) - char *cp; -# else no_output(ifp, m, s, rt) -# endif struct rtentry *rt; -#endif struct ifnet *ifp; struct mbuf *m; struct sockaddr *s; @@ -143,17 +120,8 @@ no_output(ifp, m, s, rt) static int -#if defined(__sgi) && (IRIX < 60500) -write_output(ifp, m, s) -#else -# if TRU64 >= 1885 -write_output (ifp, m, s, rt, cp) - char *cp; -# else write_output(ifp, m, s, rt) -# endif struct rtentry *rt; -#endif struct ifnet *ifp; struct mbuf *m; struct sockaddr *s; @@ -167,8 +135,7 @@ write_output(ifp, m, s, rt) ip = MTOD(mb, ip_t *); #if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \ - (defined(OpenBSD) && (OpenBSD >= 199603)) || defined(linux) || \ - (defined(__FreeBSD__) && (__FreeBSD_version >= 501113)) + defined(__FreeBSD__) sprintf(fname, "/tmp/%s", ifp->if_xname); #else sprintf(fname, "/tmp/%s%d", ifp->if_name, ifp->if_unit); @@ -189,42 +156,26 @@ ipf_setifpaddr(ifp, addr) struct ifnet *ifp; char *addr; { -#ifdef __sgi - struct in_ifaddr *ifa; -#else struct ifaddr *ifa; -#endif -#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__NetBSD__) || defined(__FreeBSD__) if (ifp->if_addrlist.tqh_first != NULL) #else -# ifdef __sgi - if (ifp->in_ifaddr != NULL) -# else if (ifp->if_addrlist != NULL) -# endif #endif return; ifa = (struct ifaddr *)malloc(sizeof(*ifa)); -#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__NetBSD__) || defined(__FreeBSD__) ifp->if_addrlist.tqh_first = ifa; #else -# ifdef __sgi - ifp->in_ifaddr = ifa; -# else ifp->if_addrlist = ifa; -# endif #endif if (ifa != NULL) { struct sockaddr_in *sin; -#ifdef __sgi - sin = (struct sockaddr_in *)&ifa->ia_addr; -#else sin = (struct sockaddr_in *)&ifa->ifa_addr; -#endif #ifdef USE_INET6 if (index(addr, ':') != NULL) { struct sockaddr_in6 *sin6; @@ -263,8 +214,7 @@ get_unit(name, family) struct ifnet *ifp, **ifpp, **old_ifneta; char *addr; #if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \ - (defined(OpenBSD) && (OpenBSD >= 199603)) || defined(linux) || \ - (defined(__FreeBSD__) && (__FreeBSD_version >= 501113)) + defined(__FreeBSD__) if (!*name) return NULL; @@ -333,12 +283,11 @@ get_unit(name, family) } ifp = ifneta[nifs - 1]; -#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__NetBSD__) || defined(__FreeBSD__) TAILQ_INIT(&ifp->if_addrlist); #endif #if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \ - (defined(OpenBSD) && (OpenBSD >= 199603)) || defined(linux) || \ - (defined(__FreeBSD__) && (__FreeBSD_version >= 501113)) + defined(__FreeBSD__) (void) strncpy(ifp->if_xname, name, sizeof(ifp->if_xname)); #else s = name + strlen(name) - 1; @@ -375,8 +324,7 @@ get_ifname(ifp) { static char ifname[LIFNAMSIZ]; -#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(linux) || \ - (defined(__FreeBSD__) && (__FreeBSD_version >= 501113)) +#if defined(__NetBSD__) || defined(__FreeBSD__) sprintf(ifname, "%s", ifp->if_xname); #else if (ifp->if_unit != -1) @@ -397,8 +345,7 @@ init_ifp() int fd; #if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \ - (defined(OpenBSD) && (OpenBSD >= 199603)) || defined(linux) || \ - (defined(__FreeBSD__) && (__FreeBSD_version >= 501113)) + defined(__FreeBSD__) for (ifpp = ifneta; ifpp && (ifp = *ifpp); ifpp++) { ifp->if_output = (void *)write_output; sprintf(fname, "/tmp/%s", ifp->if_xname); @@ -717,20 +664,12 @@ ipf_ifpaddr(softc, v, atype, ifptr, inp, inpmask) i6addr_t *inp, *inpmask; { struct ifnet *ifp = ifptr; -#ifdef __sgi - struct in_ifaddr *ifa; -#else struct ifaddr *ifa; -#endif -#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(__NetBSD__) || defined(__FreeBSD__) ifa = ifp->if_addrlist.tqh_first; #else -# ifdef __sgi - ifa = (struct in_ifaddr *)ifp->in_ifaddr; -# else ifa = ifp->if_addrlist; -# endif #endif if (ifa != NULL) { if (v == 4) { @@ -738,11 +677,7 @@ ipf_ifpaddr(softc, v, atype, ifptr, inp, inpmask) mask.sin_addr.s_addr = 0xffffffff; -#ifdef __sgi - sin = (struct sockaddr_in *)&ifa->ia_addr; -#else sin = (struct sockaddr_in *)&ifa->ifa_addr; -#endif return ipf_ifpfillv4addr(atype, sin, &mask, &inp->in4, &inpmask->in4); Modified: stable/12/contrib/ipfilter/ip_fil_compat.c ============================================================================== --- stable/12/contrib/ipfilter/ip_fil_compat.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ip_fil_compat.c Wed Mar 6 02:37:25 2019 (r344833) @@ -9,15 +9,12 @@ # define KERNEL 1 # define _KERNEL 1 #endif -#if defined(__osf__) -# define _PROTO_NET_H_ -#endif #include #include #include #include #include -#if __FreeBSD_version >= 220000 && defined(_KERNEL) +#if defined(__FreeBSD_version) && defined(_KERNEL) # include # include #else @@ -26,17 +23,10 @@ #if !defined(_KERNEL) # include # define _KERNEL -# ifdef __OpenBSD__ -struct file; -# endif # include # undef _KERNEL #endif #include -#if (defined(__osf__) || defined(AIX) || defined(__hpux) || defined(__sgi)) && defined(_KERNEL) -# include "radix_ipf_local.h" -# define _RADIX_H_ -#endif #include #if defined(__FreeBSD__) # include @@ -44,7 +34,7 @@ struct file; #endif #if defined(_KERNEL) # include -# if !defined(__SVR4) && !defined(__svr4__) +# if !defined(__SVR4) # include # endif #endif @@ -348,9 +338,6 @@ typedef struct fr_info_4_1_32 { void *fin_qpi; char fin_ifname[LIFNAMSIZ]; #endif -#ifdef __sgi - void *fin_hbuf; -#endif } fr_info_4_1_32_t; typedef struct fr_info_4_1_24 { @@ -389,9 +376,6 @@ typedef struct fr_info_4_1_24 { void *fin_qpi; char fin_ifname[LIFNAMSIZ]; #endif -#ifdef __sgi - void *fin_hbuf; -#endif } fr_info_4_1_24_t; typedef struct fr_info_4_1_23 { @@ -429,9 +413,6 @@ typedef struct fr_info_4_1_23 { void *fin_qpi; char fin_ifname[LIFNAMSIZ]; #endif -#ifdef __sgi - void *fin_hbuf; -#endif } fr_info_4_1_23_t; typedef struct fr_info_4_1_11 { @@ -468,9 +449,6 @@ typedef struct fr_info_4_1_11 { void *fin_qpi; char fin_ifname[LIFNAMSIZ]; #endif -#ifdef __sgi - void *fin_hbuf; -#endif } fr_info_4_1_11_t; /* ------------------------------------------------------------------------ */ @@ -2678,9 +2656,6 @@ fr_info_4_1_32_to_current(old, current) fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif -#ifdef __sgi - fin->fin_hbuf = old->fin_hbuf; -#endif } @@ -2719,9 +2694,6 @@ fr_info_4_1_24_to_current(old, current) fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif -#ifdef __sgi - fin->fin_hbuf = old->fin_hbuf; -#endif } @@ -2759,9 +2731,6 @@ fr_info_4_1_23_to_current(old, current) fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif -#ifdef __sgi - fin->fin_hbuf = fin->fin_hbuf; -#endif } @@ -2799,9 +2768,6 @@ fr_info_4_1_11_to_current(old, current) fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif -#ifdef __sgi - fin->fin_hbuf = fin->fin_hbuf; -#endif } @@ -4078,9 +4044,6 @@ fr_info_current_to_4_1_24(current, old) old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; #endif -#ifdef __sgi - old->fin_hbuf = fin->fin_hbuf; -#endif } @@ -4121,9 +4084,6 @@ fr_info_current_to_4_1_23(current, old) old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; #endif -#ifdef __sgi - old->fin_hbuf = fin->fin_hbuf; -#endif } @@ -4163,9 +4123,6 @@ fr_info_current_to_4_1_11(current, old) old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; -#endif -#ifdef __sgi - old->fin_hbuf = fin->fin_hbuf; #endif } Modified: stable/12/contrib/ipfilter/ipf.h ============================================================================== --- stable/12/contrib/ipfilter/ipf.h Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipf.h Wed Mar 6 02:37:25 2019 (r344833) @@ -12,11 +12,6 @@ #ifndef __IPF_H__ #define __IPF_H__ -#if defined(__osf__) -# define radix_mask ipf_radix_mask -# define radix_node ipf_radix_node -# define radix_node_head ipf_radix_node_head -#endif #include #include @@ -31,9 +26,6 @@ # define _KERNEL # define KERNEL #endif -#ifdef __OpenBSD__ -struct file; -#endif #include #ifdef ADD_KERNEL # undef _KERNEL @@ -188,9 +180,8 @@ typedef struct proxyrule { } proxyrule_t; -#if defined(__NetBSD__) || defined(__OpenBSD__) || \ - (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000) || \ - SOLARIS || defined(__sgi) || defined(__osf__) || defined(linux) +#if defined(__NetBSD__) || defined(__FreeBSD_version) || \ + SOLARIS # include typedef int (* ioctlfunc_t) __P((int, ioctlcmd_t, ...)); #else @@ -199,13 +190,6 @@ typedef int (* ioctlfunc_t) __P((dev_t, ioctlcmd_t, vo typedef int (* addfunc_t) __P((int, ioctlfunc_t, void *)); typedef int (* copyfunc_t) __P((void *, void *, size_t)); - -/* - * SunOS4 - */ -#if defined(sun) && !defined(__SVR4) && !defined(__svr4__) -extern int ioctl __P((int, int, void *)); -#endif extern char thishost[]; extern char flagset[]; Modified: stable/12/contrib/ipfilter/ipsend/.OLD/ip_compat.h ============================================================================== --- stable/12/contrib/ipfilter/ipsend/.OLD/ip_compat.h Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/.OLD/ip_compat.h Wed Mar 6 02:37:25 2019 (r344833) @@ -112,130 +112,12 @@ # define IPOPT_SECUR_TOPSECRET ((u_short)0x6bc5) #endif -#ifdef linux -# if LINUX < 0200 -# define icmp icmphdr -# define icmp_type type -# define icmp_code code -# endif -/* - * From /usr/include/netinet/ip_var.h - * !%@#!$@# linux... - */ -struct ipovly { - caddr_t ih_next, ih_prev; /* for protocol sequence q's */ - u_char ih_x1; /* (unused) */ - u_char ih_pr; /* protocol */ - short ih_len; /* protocol length */ - struct in_addr ih_src; /* source internet address */ - struct in_addr ih_dst; /* destination internet address */ -}; - -typedef struct { - __u16 th_sport; - __u16 th_dport; - __u32 th_seq; - __u32 th_ack; -# if defined(__i386__) || defined(__MIPSEL__) || defined(__alpha__) ||\ - defined(vax) - __u8 th_res:4; - __u8 th_off:4; -#else - __u8 th_off:4; - __u8 th_res:4; -#endif - __u8 th_flags; - __u16 th_win; - __u16 th_sum; - __u16 th_urp; -} tcphdr_t; - -typedef struct { - __u16 uh_sport; - __u16 uh_dport; - __s16 uh_ulen; - __u16 uh_sum; -} udphdr_t; - -typedef struct { -# if defined(__i386__) || defined(__MIPSEL__) || defined(__alpha__) ||\ - defined(vax) - __u8 ip_hl:4; - __u8 ip_v:4; -# else - __u8 ip_hl:4; - __u8 ip_v:4; -# endif - __u8 ip_tos; - __u16 ip_len; - __u16 ip_id; - __u16 ip_off; - __u8 ip_ttl; - __u8 ip_p; - __u16 ip_sum; - struct in_addr ip_src; - struct in_addr ip_dst; -} ip_t; - -typedef struct { - __u8 ether_dhost[6]; - __u8 ether_shost[6]; - __u16 ether_type; -} ether_header_t; - -typedef struct icmp { - u_char icmp_type; /* type of message, see below */ - u_char icmp_code; /* type sub code */ - u_short icmp_cksum; /* ones complement cksum of struct */ - union { - u_char ih_pptr; /* ICMP_PARAMPROB */ - struct in_addr ih_gwaddr; /* ICMP_REDIRECT */ - struct ih_idseq { - n_short icd_id; - n_short icd_seq; - } ih_idseq; - int ih_void; - } icmp_hun; -#define icmp_pptr icmp_hun.ih_pptr -#define icmp_gwaddr icmp_hun.ih_gwaddr -#define icmp_id icmp_hun.ih_idseq.icd_id -#define icmp_seq icmp_hun.ih_idseq.icd_seq -#define icmp_void icmp_hun.ih_void - union { - struct id_ts { - n_time its_otime; - n_time its_rtime; - n_time its_ttime; - } id_ts; - struct id_ip { - ip_t idi_ip; - /* options and then 64 bits of data */ - } id_ip; - u_long id_mask; - char id_data[1]; - } icmp_dun; -#define icmp_otime icmp_dun.id_ts.its_otime -#define icmp_rtime icmp_dun.id_ts.its_rtime -#define icmp_ttime icmp_dun.id_ts.its_ttime -#define icmp_ip icmp_dun.id_ip.idi_ip -#define icmp_mask icmp_dun.id_mask -#define icmp_data icmp_dun.id_data -} icmphdr_t; - -# define bcopy(a,b,c) memmove(b,a,c) -# define bcmp(a,b,c) memcmp(a,b,c) - -# define ifnet device - -#else - typedef struct udphdr udphdr_t; typedef struct tcphdr tcphdr_t; typedef struct ip ip_t; typedef struct ether_header ether_header_t; -#endif #if defined(__SVR4) || defined(__svr4__) # define bcopy(a,b,c) memmove(b,a,c) Modified: stable/12/contrib/ipfilter/ipsend/44arp.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/44arp.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/44arp.c Wed Mar 6 02:37:25 2019 (r344833) @@ -10,9 +10,7 @@ #include #include #include -#ifndef __osf__ # include -#endif #include #include #include Modified: stable/12/contrib/ipfilter/ipsend/arp.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/arp.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/arp.c Wed Mar 6 02:37:25 2019 (r344833) @@ -88,7 +88,6 @@ int arp(ip, ether) sin = (struct sockaddr_in *)&ar.arp_pa; sin->sin_family = AF_INET; bcopy(ip, (char *)&sin->sin_addr.s_addr, 4); -#ifndef hpux if ((hp = gethostbyaddr(ip, 4, AF_INET))) # if SOLARIS && (SOLARIS2 >= 10) if (!(ether_hostton(hp->h_name, (struct ether_addr *)ether))) @@ -96,7 +95,6 @@ int arp(ip, ether) if (!(ether_hostton(hp->h_name, ether))) # endif goto savearp; -#endif if (sfd == -1) if ((sfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) Modified: stable/12/contrib/ipfilter/ipsend/dlcommon.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/dlcommon.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/dlcommon.c Wed Mar 6 02:37:25 2019 (r344833) @@ -20,11 +20,7 @@ typedef unsigned long ulong; #include #include #include -#ifdef __osf__ -# include -#else # include -#endif #include #include #include Modified: stable/12/contrib/ipfilter/ipsend/ip.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/ip.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/ip.c Wed Mar 6 02:37:25 2019 (r344833) @@ -17,11 +17,9 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#ifndef linux # include # include # include -#endif #include #include #include Modified: stable/12/contrib/ipfilter/ipsend/ipresend.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/ipresend.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/ipresend.c Wed Mar 6 02:37:25 2019 (r344833) @@ -18,9 +18,7 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#ifndef linux #include -#endif #include #include #include @@ -37,9 +35,6 @@ extern struct ipread pcap, iphex, iptext; int opts = 0; #ifndef DEFAULT_DEVICE -# ifdef linux -char default_device[] = "eth0"; -# else # ifdef sun char default_device[] = "le0"; # else @@ -49,15 +44,10 @@ char default_device[] = "ln0"; # ifdef __bsdi__ char default_device[] = "ef0"; # else -# ifdef __sgi -char default_device[] = "ec0"; -# else char default_device[] = "lan0"; -# endif # endif # endif # endif -# endif #else char default_device[] = DEFAULT_DEVICE; #endif Modified: stable/12/contrib/ipfilter/ipsend/ipsend.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/ipsend.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/ipsend.c Wed Mar 6 02:37:25 2019 (r344833) @@ -21,14 +21,10 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#ifndef linux # include -#endif #include "ipsend.h" #include "ipf.h" -#ifndef linux # include -#endif extern char *optarg; @@ -37,27 +33,15 @@ extern void iplang __P((FILE *)); char options[68]; int opts; -#ifdef linux -char default_device[] = "eth0"; -#else # ifdef ultrix char default_device[] = "ln0"; # else # ifdef __bsdi__ char default_device[] = "ef0"; # else -# ifdef __sgi -char default_device[] = "ec0"; -# else -# ifdef __hpux -char default_device[] = "lan0"; -# else char default_device[] = "le0"; -# endif /* __hpux */ -# endif /* __sgi */ # endif /* __bsdi__ */ # endif /* ultrix */ -#endif /* linux */ static void usage __P((char *)); Modified: stable/12/contrib/ipfilter/ipsend/ipsend.h ============================================================================== --- stable/12/contrib/ipfilter/ipsend/ipsend.h Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/ipsend.h Wed Mar 6 02:37:25 2019 (r344833) @@ -26,9 +26,6 @@ #include #include "ipf.h" -#ifdef linux -#include -#endif /* XXX: The following is needed by tcpip.h */ #include #include "netinet/tcpip.h" @@ -49,11 +46,7 @@ extern u_32_t buildopts __P((char *, char *, int)); extern int addipopt __P((char *, struct ipopt_names *, int, char *)); extern int initdevice __P((char *, int)); extern int sendip __P((int, char *, int)); -#ifdef linux -extern struct sock *find_tcp __P((int, struct tcpiphdr *)); -#else extern struct tcpcb *find_tcp __P((int, struct tcpiphdr *)); -#endif extern int ip_resend __P((char *, int, struct ipread *, struct in_addr, char *)); extern void ip_test1 __P((char *, int, ip_t *, struct in_addr, int)); Modified: stable/12/contrib/ipfilter/ipsend/ipsopt.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/ipsopt.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/ipsopt.c Wed Mar 6 02:37:25 2019 (r344833) @@ -20,9 +20,7 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#ifndef linux #include -#endif #include #include #include "ipsend.h" Modified: stable/12/contrib/ipfilter/ipsend/iptest.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/iptest.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/iptest.c Wed Mar 6 02:37:25 2019 (r344833) @@ -18,12 +18,7 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#ifndef linux #include -#endif -#ifdef linux -#include -#endif #include #include #include @@ -36,9 +31,6 @@ extern char *optarg; extern int optind; char options[68]; -#ifdef linux -char default_device[] = "eth0"; -#else # ifdef sun char default_device[] = "le0"; # else @@ -48,15 +40,10 @@ char default_device[] = "ln0"; # ifdef __bsdi__ char default_device[] = "ef0"; # else -# ifdef __sgi -char default_device[] = "ec0"; -# else char default_device[] = "lan0"; -# endif # endif # endif # endif -#endif static void usage __P((char *)); int main __P((int, char **)); Modified: stable/12/contrib/ipfilter/ipsend/iptests.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/iptests.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/iptests.c Wed Mar 6 02:37:25 2019 (r344833) @@ -21,7 +21,6 @@ static const char rcsid[] = "@(#)$Id$"; typedef int boolean_t; #endif #include -#if !defined(__osf__) # ifdef __NetBSD__ # include # include @@ -37,7 +36,6 @@ typedef int boolean_t; # endif # undef _KERNEL # undef KERNEL -#endif #if !defined(solaris) && !defined(linux) && !defined(__sgi) # include # include @@ -66,24 +64,13 @@ typedef int boolean_t; #endif #include #include -#ifdef __hpux -# define _NET_ROUTE_INCLUDED -#endif #include -#if defined(linux) && (LINUX >= 0200) -# include -#endif -#if !defined(linux) # if defined(__FreeBSD__) # include "radix_ipf.h" # endif # if !defined(solaris) # include # endif -#else -# define __KERNEL__ /* because there's a macro not wrapped by this */ -# include /* in this file :-/ */ -#endif #include #include #include @@ -94,20 +81,13 @@ typedef int boolean_t; #include #include #include -#ifdef __hpux -# undef _NET_ROUTE_INCLUDED -#endif -#if !defined(linux) # include # if !defined(__hpux) && !defined(solaris) # include # endif -#endif #include "ipsend.h" -#if !defined(linux) && !defined(__hpux) # include # include -#endif #if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106000000) # define USE_NANOSLEEP #endif @@ -951,9 +931,7 @@ void ip_test5(dev, mtu, ip, gwip, ptest) int nfd, i; t = (tcphdr_t *)((char *)ip + (IP_HL(ip) << 2)); -#if !defined(linux) && !defined(__osf__) t->th_x2 = 0; -#endif TCP_OFF_A(t, 0); t->th_sport = htons(1); t->th_dport = htons(1); Modified: stable/12/contrib/ipfilter/ipsend/resend.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/resend.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/resend.c Wed Mar 6 02:37:25 2019 (r344833) @@ -19,10 +19,8 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#ifndef linux # include # include -#endif #include #include #include Modified: stable/12/contrib/ipfilter/ipsend/sdlpi.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/sdlpi.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/sdlpi.c Wed Mar 6 02:37:25 2019 (r344833) @@ -25,14 +25,7 @@ # include # include #endif -#ifdef __osf__ -# include -#else # include -#endif -#ifdef __hpux -# include -#endif #include #include Modified: stable/12/contrib/ipfilter/ipsend/sock.c ============================================================================== --- stable/12/contrib/ipfilter/ipsend/sock.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/ipsend/sock.c Wed Mar 6 02:37:25 2019 (r344833) @@ -29,7 +29,6 @@ typedef int boolean_t; #else # include #endif -#if !defined(__osf__) # ifdef __NetBSD__ # include # endif @@ -50,7 +49,6 @@ typedef int boolean_t; # undef _KERNEL # undef KERNEL # endif -#endif #include #include #include @@ -74,9 +72,7 @@ typedef int boolean_t; #include #include #include -#ifndef __osf__ # include -#endif #include #define _WANT_INPCB #include Modified: stable/12/contrib/ipfilter/lib/getifname.c ============================================================================== --- stable/12/contrib/ipfilter/lib/getifname.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/lib/getifname.c Wed Mar 6 02:37:25 2019 (r344833) @@ -25,9 +25,6 @@ char *getifname(ptr) # include # include # endif -# ifdef __hpux -# include "compat.h" -# endif # include "../pfil/qif.h" char *ifname; qif_t qif; Modified: stable/12/contrib/ipfilter/lib/getproto.c ============================================================================== --- stable/12/contrib/ipfilter/lib/getproto.c Wed Mar 6 00:45:42 2019 (r344832) +++ stable/12/contrib/ipfilter/lib/getproto.c Wed Mar 6 02:37:25 2019 (r344833) @@ -23,14 +23,6 @@ int getproto(name) if (*s == '\0') return atoi(name); -#ifdef _AIX51 - /* - * For some bogus reason, "ip" is 252 in /etc/protocols on AIX 5 - * The IANA has doubled up on the definition of 0 - it is now also - * used for IPv6 hop-opts, so we can no longer rely on /etc/protocols - * providing the correct name->number mapping - */ -#endif if (!strcasecmp(name, "ip")) return 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Wed Mar 6 02:40:03 2019 Return-Path: Delivered-To: svn-src-stable-12@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 2C36215221FD; Wed, 6 Mar 2019 02:40:03 +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 C12366DD10; Wed, 6 Mar 2019 02:40:02 +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 B77A725185; Wed, 6 Mar 2019 02:40:02 +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 x262e2Pp003963; Wed, 6 Mar 2019 02:40:02 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x262e2t2003962; Wed, 6 Mar 2019 02:40:02 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201903060240.x262e2t2003962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 6 Mar 2019 02:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344834 - in stable: 11/contrib/ipfilter/ipsend/.OLD 12/contrib/ipfilter/ipsend/.OLD X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ipfilter/ipsend/.OLD 12/contrib/ipfilter/ipsend/.OLD X-SVN-Commit-Revision: 344834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C12366DD10 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 02:40:03 -0000 Author: cy Date: Wed Mar 6 02:40:01 2019 New Revision: 344834 URL: https://svnweb.freebsd.org/changeset/base/344834 Log: MFC r343702: Remove a redundant ip_compat.h, originally merged from upstream. Deleted: stable/12/contrib/ipfilter/ipsend/.OLD/ip_compat.h Modified: Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Deleted: stable/11/contrib/ipfilter/ipsend/.OLD/ip_compat.h Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-12@freebsd.org Wed Mar 6 02:43:33 2019 Return-Path: Delivered-To: svn-src-stable-12@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 1829B152249D; Wed, 6 Mar 2019 02:43:33 +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 B188E6E235; Wed, 6 Mar 2019 02:43:32 +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 A743C25324; Wed, 6 Mar 2019 02:43:32 +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 x262hWKS008894; Wed, 6 Mar 2019 02:43:32 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x262hWuY008893; Wed, 6 Mar 2019 02:43:32 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201903060243.x262hWuY008893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 6 Mar 2019 02:43:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344835 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 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: 344835 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B188E6E235 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)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 02:43:33 -0000 Author: cy Date: Wed Mar 6 02:43:31 2019 New Revision: 344835 URL: https://svnweb.freebsd.org/changeset/base/344835 Log: MFC r343703 Remove a reference to HP-UX in a comment. Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/fil.c Wed Mar 6 02:40:01 2019 (r344834) +++ stable/12/sys/contrib/ipfilter/netinet/fil.c Wed Mar 6 02:43:31 2019 (r344835) @@ -2784,7 +2784,7 @@ ipf_firewall(fin, passp) /* out(I) - 0 == packet going in, 1 == packet going out */ /* mp(IO) - pointer to caller's buffer pointer that holds this */ /* IP packet. */ -/* Solaris & HP-UX ONLY : */ +/* Solaris: */ /* qpi(I) - pointer to STREAMS queue information for this */ /* interface & direction. */ /* */ From owner-svn-src-stable-12@freebsd.org Wed Mar 6 02:46:20 2019 Return-Path: Delivered-To: svn-src-stable-12@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 1043B15225E3; Wed, 6 Mar 2019 02:46:20 +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 A7D246E4DC; Wed, 6 Mar 2019 02:46:19 +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 9F1B525326; Wed, 6 Mar 2019 02:46:19 +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 x262kJud009105; Wed, 6 Mar 2019 02:46:19 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x262kJPp009104; Wed, 6 Mar 2019 02:46:19 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201903060246.x262kJPp009104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 6 Mar 2019 02:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344836 - in stable: 11/contrib/ipfilter 12/contrib/ipfilter X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ipfilter 12/contrib/ipfilter X-SVN-Commit-Revision: 344836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A7D246E4DC 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)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 02:46:20 -0000 Author: cy Date: Wed Mar 6 02:46:18 2019 New Revision: 344836 URL: https://svnweb.freebsd.org/changeset/base/344836 Log: MFC r343704: Kernel module shim sources have no business being in the userland build directory, especially those for other operating systems. The kernel module shims for other operating systems are hereby removed. The kernel module shim for FreeBSD, mlfk_ipl.c, is already in sys/contrib/ipfilter/netinet. The one here is never used and should not be in the userland build directory either. mlfk_rule.c isn't used either however we will keep it in case someone wishes to use this shim to load rules via a kernel module, handy for embedded. In that case it should be copied to sys/contrib/ipfilter/netinet and a Makefile created to employ it. (Probably a useful documentation project when time permits.) Deleted: stable/12/contrib/ipfilter/ml_ipl.c stable/12/contrib/ipfilter/mlf_ipl.c stable/12/contrib/ipfilter/mlf_rule.c stable/12/contrib/ipfilter/mlfk_ipl.c stable/12/contrib/ipfilter/mlh_rule.c stable/12/contrib/ipfilter/mln_ipl.c stable/12/contrib/ipfilter/mln_rule.c stable/12/contrib/ipfilter/mlo_ipl.c stable/12/contrib/ipfilter/mlo_rule.c stable/12/contrib/ipfilter/mls_ipl.c stable/12/contrib/ipfilter/mls_rule.c stable/12/contrib/ipfilter/mlso_rule.c Modified: Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Deleted: stable/11/contrib/ipfilter/ml_ipl.c stable/11/contrib/ipfilter/mlf_ipl.c stable/11/contrib/ipfilter/mlf_rule.c stable/11/contrib/ipfilter/mlfk_ipl.c stable/11/contrib/ipfilter/mlh_rule.c stable/11/contrib/ipfilter/mln_ipl.c stable/11/contrib/ipfilter/mln_rule.c stable/11/contrib/ipfilter/mlo_ipl.c stable/11/contrib/ipfilter/mlo_rule.c stable/11/contrib/ipfilter/mls_ipl.c stable/11/contrib/ipfilter/mls_rule.c stable/11/contrib/ipfilter/mlso_rule.c Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-12@freebsd.org Wed Mar 6 02:51:34 2019 Return-Path: Delivered-To: svn-src-stable-12@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 7A45415228FA; Wed, 6 Mar 2019 02:51: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 1E0406E9B7; Wed, 6 Mar 2019 02:51: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 12FEF25493; Wed, 6 Mar 2019 02:51:34 +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 x262pXGT014143; Wed, 6 Mar 2019 02:51:33 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x262pXx6014142; Wed, 6 Mar 2019 02:51:33 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201903060251.x262pXx6014142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 6 Mar 2019 02:51:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344837 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 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: 344837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1E0406E9B7 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)[-1.000,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 02:51:34 -0000 Author: cy Date: Wed Mar 6 02:51:33 2019 New Revision: 344837 URL: https://svnweb.freebsd.org/changeset/base/344837 Log: MFC r343705: new_kmem_alloc(9) is a Solaris/illumos malloc(9). FreeBSD and NetBSD never get here, however a test for SOLARIS, as redundant as this test is, serves to document that this is the illumos definition. This should help those who come after me to follow the code more easily. Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Wed Mar 6 02:46:18 2019 (r344836) +++ stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Wed Mar 6 02:51:33 2019 (r344837) @@ -590,7 +590,7 @@ MALLOC_DECLARE(M_IPFILTER); # define COPYOUT(a,b,c) (bcopy((caddr_t)(a), (caddr_t)(b), (c)), 0) # endif -# ifndef KMALLOC +# if SOLARIS && !defined(KMALLOC) # define KMALLOC(a,b) (a) = (b)new_kmem_alloc(sizeof(*(a)), \ KMEM_NOSLEEP) # define KMALLOCS(a,b,c) (a) = (b)new_kmem_alloc((c), KMEM_NOSLEEP) From owner-svn-src-stable-12@freebsd.org Wed Mar 6 17:25:12 2019 Return-Path: Delivered-To: svn-src-stable-12@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 B5A8115208E9; Wed, 6 Mar 2019 17:25:12 +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 61E819534A; Wed, 6 Mar 2019 17:25:12 +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 53D616BAE; Wed, 6 Mar 2019 17:25:12 +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 x26HPCs8073605; Wed, 6 Mar 2019 17:25:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x26HPBFO073601; Wed, 6 Mar 2019 17:25:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903061725.x26HPBFO073601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 6 Mar 2019 17:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344846 - in stable/12/sys: conf kern sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: conf kern sys X-SVN-Commit-Revision: 344846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 61E819534A 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 17:25:13 -0000 Author: kib Date: Wed Mar 6 17:25:11 2019 New Revision: 344846 URL: https://svnweb.freebsd.org/changeset/base/344846 Log: MFC r344351: Implement rangesets. Added: stable/12/sys/kern/subr_rangeset.c - copied unchanged from r344351, head/sys/kern/subr_rangeset.c stable/12/sys/sys/_rangeset.h - copied unchanged from r344351, head/sys/sys/_rangeset.h stable/12/sys/sys/rangeset.h - copied unchanged from r344351, head/sys/sys/rangeset.h Modified: stable/12/sys/conf/files Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/files ============================================================================== --- stable/12/sys/conf/files Wed Mar 6 16:50:14 2019 (r344845) +++ stable/12/sys/conf/files Wed Mar 6 17:25:11 2019 (r344846) @@ -3919,6 +3919,7 @@ kern/subr_pidctrl.c standard kern/subr_power.c standard kern/subr_prf.c standard kern/subr_prof.c standard +kern/subr_rangeset.c standard kern/subr_rman.c standard kern/subr_rtc.c standard kern/subr_sbuf.c standard Copied: stable/12/sys/kern/subr_rangeset.c (from r344351, head/sys/kern/subr_rangeset.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/kern/subr_rangeset.c Wed Mar 6 17:25:11 2019 (r344846, copy of r344351, head/sys/kern/subr_rangeset.c) @@ -0,0 +1,365 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#ifdef DIAGNOSTIC +static void rangeset_check(struct rangeset *rs); +#else +#define rangeset_check(rs) +#endif + +static uma_zone_t rs_node_zone; + +static void +rs_rangeset_init(void *arg __unused) +{ + + rs_node_zone = uma_zcreate("rangeset pctrie nodes", + pctrie_node_size(), NULL, NULL, pctrie_zone_init, NULL, + UMA_ALIGN_PTR, 0); +} +SYSINIT(rs, SI_SUB_LOCK, SI_ORDER_ANY, rs_rangeset_init, NULL); + +static void * +rs_node_alloc(struct pctrie *ptree) +{ + struct rangeset *rs; + + rs = __containerof(ptree, struct rangeset, rs_trie); + return (uma_zalloc(rs_node_zone, rs->rs_alloc_flags)); +} + +static void +rs_node_free(struct pctrie *ptree __unused, void *node) +{ + + uma_zfree(rs_node_zone, node); +} + +void +rangeset_init(struct rangeset *rs, rs_dup_data_t dup_data, + rs_free_data_t free_data, void *data_ctx, u_int alloc_flags) +{ + + pctrie_init(&rs->rs_trie); + rs->rs_dup_data = dup_data; + rs->rs_free_data = free_data; + rs->rs_data_ctx = data_ctx; + rs->rs_alloc_flags = alloc_flags; +} + +void +rangeset_fini(struct rangeset *rs) +{ + + rangeset_check(rs); + rangeset_remove_all(rs); +} + +bool +rangeset_check_empty(struct rangeset *rs, uint64_t start, uint64_t end) +{ + struct rs_el *r; + uint64_t *r1; + + rangeset_check(rs); + r1 = pctrie_lookup_le(&rs->rs_trie, end); + if (r1 != NULL) { + r = __containerof(r1, struct rs_el, re_start); + if (r->re_end > start) + return (false); + } + return (true); +} + +int +rangeset_insert(struct rangeset *rs, uint64_t start, uint64_t end, + void *data) +{ + struct rs_el *r; + int error; + + rangeset_check(rs); + error = rangeset_remove(rs, start, end); + if (error != 0) + return (error); + r = data; + r->re_start = start; + r->re_end = end; + error = pctrie_insert(&rs->rs_trie, &r->re_start, rs_node_alloc); + rangeset_check(rs); + return (error); +} + +int +rangeset_remove_pred(struct rangeset *rs, uint64_t start, uint64_t end, + rs_pred_t pred) +{ + struct rs_el *r, *rn; + uint64_t *r1; + int error; + + rangeset_check(rs); + error = 0; + for (; end > 0 && start < end;) { + r1 = pctrie_lookup_le(&rs->rs_trie, end - 1); + if (r1 == NULL) + break; + r = __containerof(r1, struct rs_el, re_start); + + /* + * ------============================--|-------|---- + * rs re s e + */ + if (r->re_end <= start) + break; + + if (r->re_end <= end) { + if (r->re_start < start) { + /* + * ------========|==============-------|---- + * rs s re e + */ + if (pred(rs->rs_data_ctx, r)) + r->re_end = start; + break; + } + + /* + * ------|--------===================----------|---- + * s rs re e + */ + end = r->re_start; + if (pred(rs->rs_data_ctx, r)) { + pctrie_remove(&rs->rs_trie, r->re_start, + rs_node_free); + rs->rs_free_data(rs->rs_data_ctx, r); + } + continue; + } + + /* + * ------|--------====================|==========---- + * s rs e re + */ + if (r->re_start >= start) { + if (pred(rs->rs_data_ctx, r)) { + pctrie_remove(&rs->rs_trie, r->re_start, + rs_node_free); + r->re_start = end; + error = pctrie_insert(&rs->rs_trie, + &r->re_start, rs_node_alloc); + /* + * The insert above must succeed + * because rs_node zone is marked + * nofree and we freed one element + * just before. + */ + MPASS(error == 0); + } else { + end = r->re_start; + } + continue; + } + + /* + * ------=========|===================|==========---- + * rs s e re + */ + if (pred(rs->rs_data_ctx, r)) { + /* + * Split. Can only happen once, and then if + * any allocation fails, the rangeset is kept + * intact. + */ + rn = rs->rs_dup_data(rs->rs_data_ctx, r); + if (rn == NULL) { + error = ENOMEM; + break; + } + rn->re_start = end; + rn->re_end = r->re_end; + error = pctrie_insert(&rs->rs_trie, &rn->re_start, + rs_node_alloc); + if (error != 0) { + rs->rs_free_data(rs->rs_data_ctx, rn); + break; + } + r->re_end = start; + } + break; + } + rangeset_check(rs); + return (error); +} + +static bool +rangeset_true_pred(void *ctx __unused, void *r __unused) +{ + + return (true); +} + +int +rangeset_remove(struct rangeset *rs, uint64_t start, uint64_t end) +{ + + return (rangeset_remove_pred(rs, start, end, rangeset_true_pred)); +} + +void +rangeset_remove_all(struct rangeset *rs) +{ + struct rs_el *r; + uint64_t *r1; + + for (;;) { + r1 = pctrie_lookup_ge(&rs->rs_trie, 0); + if (r1 == NULL) + break; + r = __containerof(r1, struct rs_el, re_start); + pctrie_remove(&rs->rs_trie, r->re_start, rs_node_free); + rs->rs_free_data(rs->rs_data_ctx, r); + } +} + +void * +rangeset_lookup(struct rangeset *rs, uint64_t place) +{ + struct rs_el *r; + uint64_t *r1; + + rangeset_check(rs); + r1 = pctrie_lookup_le(&rs->rs_trie, place); + if (r1 == NULL) + return (NULL); + r = __containerof(r1, struct rs_el, re_start); + if (r->re_end <= place) + return (NULL); + return (r); +} + +int +rangeset_copy(struct rangeset *dst_rs, struct rangeset *src_rs) +{ + struct rs_el *src_r, *dst_r; + uint64_t cursor, *r1; + int error; + + MPASS(pctrie_is_empty(&dst_rs->rs_trie)); + rangeset_check(src_rs); + MPASS(dst_rs->rs_dup_data == src_rs->rs_dup_data); + + error = 0; + for (cursor = 0;; cursor = src_r->re_start + 1) { + r1 = pctrie_lookup_ge(&src_rs->rs_trie, cursor); + if (r1 == NULL) + break; + src_r = __containerof(r1, struct rs_el, re_start); + dst_r = dst_rs->rs_dup_data(dst_rs->rs_data_ctx, src_r); + if (dst_r == NULL) { + error = ENOMEM; + break; + } + error = pctrie_insert(&dst_rs->rs_trie, &dst_r->re_start, + rs_node_alloc); + if (error != 0) + break; + } + if (error != 0) + rangeset_remove_all(dst_rs); + return (error); +} + +#ifdef DIAGNOSTIC +static void +rangeset_check(struct rangeset *rs) +{ + struct rs_el *r, *rp; + uint64_t cursor, *r1; + + for (cursor = 0, rp = NULL;; cursor = r->re_start + 1, rp = r) { + r1 = pctrie_lookup_ge(&rs->rs_trie, cursor); + if (r1 == NULL) + break; + r = __containerof(r1, struct rs_el, re_start); + KASSERT(r->re_start < r->re_end, + ("invalid interval rs %p elem %p (%#jx, %#jx)", + rs, r, (uintmax_t)r->re_start, (uintmax_t)r->re_end)); + if (rp != NULL) { + KASSERT(rp->re_end <= r->re_start, + ("non-ascending neighbors rs %p " + "prev elem %p (%#jx, %#jx) elem %p (%#jx, %#jx)", + rs, rp, (uintmax_t)rp->re_start, + (uintmax_t)rp->re_end, r, (uintmax_t)r->re_start, + (uintmax_t)r->re_end)); + } + } +} +#endif + +#include "opt_ddb.h" +#ifdef DDB +#include +#include + +DB_SHOW_COMMAND(rangeset, rangeset_show_fn) +{ + struct rangeset *rs; + struct rs_el *r; + uint64_t cursor, *r1; + + if (!have_addr) { + db_printf("show rangeset addr\n"); + return; + } + + rs = (struct rangeset *)addr; + db_printf("rangeset %p\n", rs); + for (cursor = 0;; cursor = r->re_start + 1) { + r1 = pctrie_lookup_ge(&rs->rs_trie, cursor); + if (r1 == NULL) + break; + r = __containerof(r1, struct rs_el, re_start); + db_printf(" el %p start %#jx end %#jx\n", + r, r->re_start, r->re_end); + } +} +#endif Copied: stable/12/sys/sys/_rangeset.h (from r344351, head/sys/sys/_rangeset.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/sys/_rangeset.h Wed Mar 6 17:25:11 2019 (r344846, copy of r344351, head/sys/sys/_rangeset.h) @@ -0,0 +1,51 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS__RANGESET_H +#define _SYS__RANGESET_H + +#include + +typedef void *(*rs_dup_data_t)(void *ctx, void *data); +typedef void (*rs_free_data_t)(void *ctx, void *data); + +struct rangeset { + struct pctrie rs_trie; + rs_dup_data_t rs_dup_data; + rs_free_data_t rs_free_data; + void *rs_data_ctx; + u_int rs_alloc_flags; +}; + +#endif + Copied: stable/12/sys/sys/rangeset.h (from r344351, head/sys/sys/rangeset.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/sys/rangeset.h Wed Mar 6 17:25:11 2019 (r344846, copy of r344351, head/sys/sys/rangeset.h) @@ -0,0 +1,88 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_RANGESET_H +#define _SYS_RANGESET_H + +#ifdef _KERNEL + +#include + +typedef bool (*rs_pred_t)(void *ctx, void *r); + +/* + * This structure must be embedded at the start of the rangeset element. + */ +struct rs_el { + uint64_t re_start; /* pctrie key */ + uint64_t re_end; +}; + +void rangeset_init(struct rangeset *rs, rs_dup_data_t dup_data, + rs_free_data_t free_data, void *rs_data_ctx, u_int alloc_flags); +void rangeset_fini(struct rangeset *rs); + +bool rangeset_check_empty(struct rangeset *rs, uint64_t start, + uint64_t end); + +/* + * r point to the app data with struct rs_el at the beginning. + */ +int rangeset_insert(struct rangeset *rs, uint64_t start, uint64_t end, + void *r); + +/* + * Guarantees that on error the rangeset is not modified. Remove + * might need to split element if its start/end completely cover the + * removed range, in which case ENOMEM might be returned. + */ +void rangeset_remove_all(struct rangeset *rs); +int rangeset_remove(struct rangeset *rs, uint64_t start, uint64_t end); +int rangeset_remove_pred(struct rangeset *rs, uint64_t start, + uint64_t end, rs_pred_t pred); + +/* + * Really returns the pointer to the data with struct rs_el embedded + * at the beginning. + */ +void *rangeset_lookup(struct rangeset *rs, uint64_t place); + +/* + * Copies src_rs entries into dst_rs. dst_rs must be empty. + * Leaves dst_rs empty on failure. + */ +int rangeset_copy(struct rangeset *dst_rs, struct rangeset *src_rs); + +#endif + +#endif From owner-svn-src-stable-12@freebsd.org Wed Mar 6 17:26:32 2019 Return-Path: Delivered-To: svn-src-stable-12@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 22A1B1520AE1; Wed, 6 Mar 2019 17:26:32 +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 BAD4895525; Wed, 6 Mar 2019 17:26:31 +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 B09BC6BAF; Wed, 6 Mar 2019 17:26:31 +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 x26HQVtF073717; Wed, 6 Mar 2019 17:26:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x26HQV1C073715; Wed, 6 Mar 2019 17:26:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903061726.x26HQV1C073715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 6 Mar 2019 17:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344847 - in stable/12/sys/amd64: amd64 include X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys/amd64: amd64 include X-SVN-Commit-Revision: 344847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BAD4895525 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 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.92)[-0.923,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 17:26:32 -0000 Author: kib Date: Wed Mar 6 17:26:30 2019 New Revision: 344847 URL: https://svnweb.freebsd.org/changeset/base/344847 Log: MFC r344352: amd64: add defines and decode protection keys and SGX page faults reasons. Modified: stable/12/sys/amd64/amd64/trap.c stable/12/sys/amd64/include/pmap.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/trap.c ============================================================================== --- stable/12/sys/amd64/amd64/trap.c Wed Mar 6 17:25:11 2019 (r344846) +++ stable/12/sys/amd64/amd64/trap.c Wed Mar 6 17:26:30 2019 (r344847) @@ -885,10 +885,12 @@ trap_fatal(frame, eva) #endif if (type == T_PAGEFLT) { printf("fault virtual address = 0x%lx\n", eva); - printf("fault code = %s %s %s, %s\n", + printf("fault code = %s %s %s%s%s, %s\n", code & PGEX_U ? "user" : "supervisor", code & PGEX_W ? "write" : "read", code & PGEX_I ? "instruction" : "data", + code & PGEX_PK ? " prot key" : " ", + code & PGEX_SGX ? " SGX" : " ", code & PGEX_RSV ? "reserved bits in PTE" : code & PGEX_P ? "protection violation" : "page not present"); } Modified: stable/12/sys/amd64/include/pmap.h ============================================================================== --- stable/12/sys/amd64/include/pmap.h Wed Mar 6 17:25:11 2019 (r344846) +++ stable/12/sys/amd64/include/pmap.h Wed Mar 6 17:26:30 2019 (r344847) @@ -131,6 +131,8 @@ #define PGEX_U 0x04 /* access from User mode (UPL) */ #define PGEX_RSV 0x08 /* reserved PTE field is non-zero */ #define PGEX_I 0x10 /* during an instruction fetch */ +#define PGEX_PK 0x20 /* protection key violation */ +#define PGEX_SGX 0x40 /* SGX-related */ /* * undef the PG_xx macros that define bits in the regular x86 PTEs that From owner-svn-src-stable-12@freebsd.org Wed Mar 6 17:33:09 2019 Return-Path: Delivered-To: svn-src-stable-12@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 046F815211B2; Wed, 6 Mar 2019 17:33:09 +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 A4DB495BC7; Wed, 6 Mar 2019 17:33:08 +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 6A6236D51; Wed, 6 Mar 2019 17:33:08 +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 x26HX8OJ079182; Wed, 6 Mar 2019 17:33:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x26HX5ra079167; Wed, 6 Mar 2019 17:33:05 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903061733.x26HX5ra079167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 6 Mar 2019 17:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344848 - in stable/12/sys: amd64/amd64 amd64/include arm/include arm64/include i386/include mips/include powerpc/include riscv/include sparc64/include vm x86/include X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: amd64/amd64 amd64/include arm/include arm64/include i386/include mips/include powerpc/include riscv/include sparc64/include vm x86/include X-SVN-Commit-Revision: 344848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A4DB495BC7 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.931,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 17:33:09 -0000 Author: kib Date: Wed Mar 6 17:33:05 2019 New Revision: 344848 URL: https://svnweb.freebsd.org/changeset/base/344848 Log: MFC r344353: Add kernel support for Intel userspace protection keys feature on Skylake Xeons. Modified: stable/12/sys/amd64/amd64/initcpu.c stable/12/sys/amd64/amd64/pmap.c stable/12/sys/amd64/amd64/sys_machdep.c stable/12/sys/amd64/amd64/trap.c stable/12/sys/amd64/include/pmap.h stable/12/sys/arm/include/pmap.h stable/12/sys/arm64/include/pmap.h stable/12/sys/i386/include/pmap.h stable/12/sys/mips/include/pmap.h stable/12/sys/powerpc/include/pmap.h stable/12/sys/riscv/include/pmap.h stable/12/sys/sparc64/include/pmap.h stable/12/sys/vm/vm_fault.c stable/12/sys/vm/vm_map.c stable/12/sys/x86/include/sysarch.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/12/sys/amd64/amd64/initcpu.c Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/amd64/amd64/initcpu.c Wed Mar 6 17:33:05 2019 (r344848) @@ -233,6 +233,9 @@ initializecpu(void) if (cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) cr4 |= CR4_FSGSBASE; + if (cpu_stdext_feature2 & CPUID_STDEXT2_PKU) + cr4 |= CR4_PKE; + /* * Postpone enabling the SMEP on the boot CPU until the page * tables are switched from the boot loader identity mapping Modified: stable/12/sys/amd64/amd64/pmap.c ============================================================================== --- stable/12/sys/amd64/amd64/pmap.c Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/amd64/amd64/pmap.c Wed Mar 6 17:33:05 2019 (r344848) @@ -48,7 +48,7 @@ */ /*- * Copyright (c) 2003 Networks Associates Technology, Inc. - * Copyright (c) 2014-2018 The FreeBSD Foundation + * Copyright (c) 2014-2019 The FreeBSD Foundation * All rights reserved. * * This software was developed for the FreeBSD Project by Jake Burkholder, @@ -121,6 +121,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -155,6 +156,7 @@ __FBSDID("$FreeBSD$"); #ifdef SMP #include #endif +#include #include static __inline boolean_t @@ -285,6 +287,13 @@ pmap_modified_bit(pmap_t pmap) return (mask); } +static __inline pt_entry_t +pmap_pku_mask_bit(pmap_t pmap) +{ + + return (pmap->pm_type == PT_X86 ? X86_PG_PKU_MASK : 0); +} + #if !defined(DIAGNOSTIC) #ifdef __GNUC_GNU_INLINE__ #define PMAP_INLINE __attribute__((__gnu_inline__)) inline @@ -429,6 +438,22 @@ static pml4_entry_t *pti_pml4; static vm_pindex_t pti_pg_idx; static bool pti_finalized; +struct pmap_pkru_range { + struct rs_el pkru_rs_el; + u_int pkru_keyidx; + int pkru_flags; +}; + +static uma_zone_t pmap_pkru_ranges_zone; +static bool pmap_pkru_same(pmap_t pmap, vm_offset_t sva, vm_offset_t eva); +static pt_entry_t pmap_pkru_get(pmap_t pmap, vm_offset_t va); +static void pmap_pkru_on_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva); +static void *pkru_dup_range(void *ctx, void *data); +static void pkru_free_range(void *ctx, void *node); +static int pmap_pkru_copy(pmap_t dst_pmap, pmap_t src_pmap); +static int pmap_pkru_deassign(pmap_t pmap, vm_offset_t sva, vm_offset_t eva); +static void pmap_pkru_deassign_all(pmap_t pmap); + static int pmap_pcid_save_cnt_proc(SYSCTL_HANDLER_ARGS) { @@ -2851,6 +2876,12 @@ pmap_pinit0(pmap_t pmap) pmap->pm_pcids[i].pm_gen = 1; } pmap_activate_boot(pmap); + + if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) != 0) { + pmap_pkru_ranges_zone = uma_zcreate("pkru ranges", + sizeof(struct pmap_pkru_range), NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, 0); + } } void @@ -2939,6 +2970,10 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, i pmap_pinit_pml4_pti(pml4pgu); pmap->pm_ucr3 = VM_PAGE_TO_PHYS(pml4pgu); } + if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) != 0) { + rangeset_init(&pmap->pm_pkru, pkru_dup_range, + pkru_free_range, pmap, M_NOWAIT); + } } pmap->pm_root.rt_root = 0; @@ -3235,6 +3270,9 @@ pmap_release(pmap_t pmap) vm_page_unwire_noq(m); vm_page_free(m); } + if (pmap->pm_type == PT_X86 && + (cpu_stdext_feature2 & CPUID_STDEXT2_PKU) != 0) + rangeset_fini(&pmap->pm_pkru); } static int @@ -4065,7 +4103,7 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, v { pd_entry_t newpde, oldpde; pt_entry_t *firstpte, newpte; - pt_entry_t PG_A, PG_G, PG_M, PG_RW, PG_V; + pt_entry_t PG_A, PG_G, PG_M, PG_PKU_MASK, PG_RW, PG_V; vm_paddr_t mptepa; vm_page_t mpte; struct spglist free; @@ -4078,6 +4116,7 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, v PG_RW = pmap_rw_bit(pmap); PG_V = pmap_valid_bit(pmap); PG_PTE_CACHE = pmap_cache_mask(pmap, 0); + PG_PKU_MASK = pmap_pku_mask_bit(pmap); PMAP_LOCK_ASSERT(pmap, MA_OWNED); oldpde = *pde; @@ -4510,6 +4549,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t out: if (anyvalid) pmap_invalidate_all(pmap); + pmap_pkru_on_remove(pmap, sva, eva); PMAP_UNLOCK(pmap); pmap_delayed_invl_finished(); vm_page_free_pages_toq(&free, true); @@ -4821,7 +4861,7 @@ pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offs { pd_entry_t newpde; pt_entry_t *firstpte, oldpte, pa, *pte; - pt_entry_t PG_G, PG_A, PG_M, PG_RW, PG_V; + pt_entry_t PG_G, PG_A, PG_M, PG_RW, PG_V, PG_PKU_MASK; vm_page_t mpte; int PG_PTE_CACHE; @@ -4830,6 +4870,7 @@ pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offs PG_M = pmap_modified_bit(pmap); PG_V = pmap_valid_bit(pmap); PG_RW = pmap_rw_bit(pmap); + PG_PKU_MASK = pmap_pku_mask_bit(pmap); PG_PTE_CACHE = pmap_cache_mask(pmap, 0); PMAP_LOCK_ASSERT(pmap, MA_OWNED); @@ -5057,6 +5098,8 @@ retry: origpte = *pte; pv = NULL; + if (va < VM_MAXUSER_ADDRESS && pmap->pm_type == PT_X86) + newpte |= pmap_pkru_get(pmap, va); /* * Is the specified virtual address already mapped? @@ -5276,6 +5319,25 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t " in pmap %p", va, pmap); return (KERN_RESOURCE_SHORTAGE); } + + /* + * If pkru is not same for the whole pde range, return failure + * and let vm_fault() cope. Check after pde allocation, since + * it could sleep. + */ + if (!pmap_pkru_same(pmap, va, va + NBPDR)) { + SLIST_INIT(&free); + if (pmap_unwire_ptp(pmap, va, pdpg, &free)) { + pmap_invalidate_page(pmap, va); + vm_page_free_pages_toq(&free, true); + } + return (KERN_FAILURE); + } + if (va < VM_MAXUSER_ADDRESS && pmap->pm_type == PT_X86) { + newpde &= ~X86_PG_PKU_MASK; + newpde |= pmap_pkru_get(pmap, va); + } + pde = (pd_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pdpg)); pde = &pde[pmap_pde_index(va)]; oldpde = *pde; @@ -5535,7 +5597,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, v if ((prot & VM_PROT_EXECUTE) == 0) newpte |= pg_nx; if (va < VM_MAXUSER_ADDRESS) - newpte |= PG_U; + newpte |= PG_U | pmap_pkru_get(pmap, va); pte_store(pte, newpte); return (mpte); } @@ -5911,6 +5973,36 @@ out: PMAP_UNLOCK(dst_pmap); } +int +pmap_vmspace_copy(pmap_t dst_pmap, pmap_t src_pmap) +{ + int error; + + if (dst_pmap->pm_type != src_pmap->pm_type || + dst_pmap->pm_type != PT_X86 || + (cpu_stdext_feature2 & CPUID_STDEXT2_PKU) == 0) + return (0); + for (;;) { + if (dst_pmap < src_pmap) { + PMAP_LOCK(dst_pmap); + PMAP_LOCK(src_pmap); + } else { + PMAP_LOCK(src_pmap); + PMAP_LOCK(dst_pmap); + } + error = pmap_pkru_copy(dst_pmap, src_pmap); + /* Clean up partial copy on failure due to no memory. */ + if (error == ENOMEM) + pmap_pkru_deassign_all(dst_pmap); + PMAP_UNLOCK(src_pmap); + PMAP_UNLOCK(dst_pmap); + if (error != ENOMEM) + break; + vm_wait(NULL); + } + return (error); +} + /* * Zero the specified hardware page. */ @@ -6310,6 +6402,7 @@ pmap_remove_pages(pmap_t pmap) if (lock != NULL) rw_wunlock(lock); pmap_invalidate_all(pmap); + pmap_pkru_deassign_all(pmap); PMAP_UNLOCK(pmap); vm_page_free_pages_toq(&free, true); } @@ -8944,6 +9037,285 @@ pmap_pti_remove_kva(vm_offset_t sva, vm_offset_t eva) } pmap_invalidate_range(kernel_pmap, sva, eva); VM_OBJECT_WUNLOCK(pti_obj); +} + +static void * +pkru_dup_range(void *ctx __unused, void *data) +{ + struct pmap_pkru_range *node, *new_node; + + new_node = uma_zalloc(pmap_pkru_ranges_zone, M_NOWAIT); + if (new_node == NULL) + return (NULL); + node = data; + memcpy(new_node, node, sizeof(*node)); + return (new_node); +} + +static void +pkru_free_range(void *ctx __unused, void *node) +{ + + uma_zfree(pmap_pkru_ranges_zone, node); +} + +static int +pmap_pkru_assign(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, u_int keyidx, + int flags) +{ + struct pmap_pkru_range *ppr; + int error; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + MPASS(pmap->pm_type == PT_X86); + MPASS((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) != 0); + if ((flags & AMD64_PKRU_EXCL) != 0 && + !rangeset_check_empty(&pmap->pm_pkru, sva, eva)) + return (EBUSY); + ppr = uma_zalloc(pmap_pkru_ranges_zone, M_NOWAIT); + if (ppr == NULL) + return (ENOMEM); + ppr->pkru_keyidx = keyidx; + ppr->pkru_flags = flags & AMD64_PKRU_PERSIST; + error = rangeset_insert(&pmap->pm_pkru, sva, eva, ppr); + if (error != 0) + uma_zfree(pmap_pkru_ranges_zone, ppr); + return (error); +} + +static int +pmap_pkru_deassign(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + MPASS(pmap->pm_type == PT_X86); + MPASS((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) != 0); + return (rangeset_remove(&pmap->pm_pkru, sva, eva)); +} + +static void +pmap_pkru_deassign_all(pmap_t pmap) +{ + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + if (pmap->pm_type == PT_X86 && + (cpu_stdext_feature2 & CPUID_STDEXT2_PKU) != 0) + rangeset_remove_all(&pmap->pm_pkru); +} + +static bool +pmap_pkru_same(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + struct pmap_pkru_range *ppr, *prev_ppr; + vm_offset_t va; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + if (pmap->pm_type != PT_X86 || + (cpu_stdext_feature2 & CPUID_STDEXT2_PKU) == 0 || + sva >= VM_MAXUSER_ADDRESS) + return (true); + MPASS(eva <= VM_MAXUSER_ADDRESS); + for (va = sva, prev_ppr = NULL; va < eva;) { + ppr = rangeset_lookup(&pmap->pm_pkru, va); + if ((ppr == NULL) ^ (prev_ppr == NULL)) + return (false); + if (ppr == NULL) { + va += PAGE_SIZE; + continue; + } + if (prev_ppr->pkru_keyidx != ppr->pkru_keyidx) + return (false); + va = ppr->pkru_rs_el.re_end; + } + return (true); +} + +static pt_entry_t +pmap_pkru_get(pmap_t pmap, vm_offset_t va) +{ + struct pmap_pkru_range *ppr; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + if (pmap->pm_type != PT_X86 || + (cpu_stdext_feature2 & CPUID_STDEXT2_PKU) == 0 || + va >= VM_MAXUSER_ADDRESS) + return (0); + ppr = rangeset_lookup(&pmap->pm_pkru, va); + if (ppr != NULL) + return (X86_PG_PKU(ppr->pkru_keyidx)); + return (0); +} + +static bool +pred_pkru_on_remove(void *ctx __unused, void *r) +{ + struct pmap_pkru_range *ppr; + + ppr = r; + return ((ppr->pkru_flags & AMD64_PKRU_PERSIST) == 0); +} + +static void +pmap_pkru_on_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + if (pmap->pm_type == PT_X86 && + (cpu_stdext_feature2 & CPUID_STDEXT2_PKU) != 0) { + rangeset_remove_pred(&pmap->pm_pkru, sva, eva, + pred_pkru_on_remove); + } +} + +static int +pmap_pkru_copy(pmap_t dst_pmap, pmap_t src_pmap) +{ + + PMAP_LOCK_ASSERT(dst_pmap, MA_OWNED); + PMAP_LOCK_ASSERT(src_pmap, MA_OWNED); + MPASS(dst_pmap->pm_type == PT_X86); + MPASS(src_pmap->pm_type == PT_X86); + MPASS((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) != 0); + if (src_pmap->pm_pkru.rs_data_ctx == NULL) + return (0); + return (rangeset_copy(&dst_pmap->pm_pkru, &src_pmap->pm_pkru)); +} + +static void +pmap_pkru_update_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, + u_int keyidx) +{ + pml4_entry_t *pml4e; + pdp_entry_t *pdpe; + pd_entry_t newpde, ptpaddr, *pde; + pt_entry_t newpte, *ptep, pte; + vm_offset_t va, va_next; + bool changed; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + MPASS(pmap->pm_type == PT_X86); + MPASS(keyidx <= PMAP_MAX_PKRU_IDX); + + for (changed = false, va = sva; va < eva; va = va_next) { + pml4e = pmap_pml4e(pmap, va); + if ((*pml4e & X86_PG_V) == 0) { + va_next = (va + NBPML4) & ~PML4MASK; + if (va_next < va) + va_next = eva; + continue; + } + + pdpe = pmap_pml4e_to_pdpe(pml4e, va); + if ((*pdpe & X86_PG_V) == 0) { + va_next = (va + NBPDP) & ~PDPMASK; + if (va_next < va) + va_next = eva; + continue; + } + + va_next = (va + NBPDR) & ~PDRMASK; + if (va_next < va) + va_next = eva; + + pde = pmap_pdpe_to_pde(pdpe, va); + ptpaddr = *pde; + if (ptpaddr == 0) + continue; + + MPASS((ptpaddr & X86_PG_V) != 0); + if ((ptpaddr & PG_PS) != 0) { + if (va + NBPDR == va_next && eva >= va_next) { + newpde = (ptpaddr & ~X86_PG_PKU_MASK) | + X86_PG_PKU(keyidx); + if (newpde != ptpaddr) { + *pde = newpde; + changed = true; + } + continue; + } else if (!pmap_demote_pde(pmap, pde, va)) { + continue; + } + } + + if (va_next > eva) + va_next = eva; + + for (ptep = pmap_pde_to_pte(pde, va); va != va_next; + ptep++, va += PAGE_SIZE) { + pte = *ptep; + if ((pte & X86_PG_V) == 0) + continue; + newpte = (pte & ~X86_PG_PKU_MASK) | X86_PG_PKU(keyidx); + if (newpte != pte) { + *ptep = newpte; + changed = true; + } + } + } + if (changed) + pmap_invalidate_range(pmap, sva, eva); +} + +static int +pmap_pkru_check_uargs(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, + u_int keyidx, int flags) +{ + + if (pmap->pm_type != PT_X86 || keyidx > PMAP_MAX_PKRU_IDX || + (flags & ~(AMD64_PKRU_PERSIST | AMD64_PKRU_EXCL)) != 0) + return (EINVAL); + if (eva <= sva || eva > VM_MAXUSER_ADDRESS) + return (EFAULT); + if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) == 0) + return (ENOTSUP); + return (0); +} + +int +pmap_pkru_set(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, u_int keyidx, + int flags) +{ + int error; + + sva = trunc_page(sva); + eva = round_page(eva); + error = pmap_pkru_check_uargs(pmap, sva, eva, keyidx, flags); + if (error != 0) + return (error); + for (;;) { + PMAP_LOCK(pmap); + error = pmap_pkru_assign(pmap, sva, eva, keyidx, flags); + if (error == 0) + pmap_pkru_update_range(pmap, sva, eva, keyidx); + PMAP_UNLOCK(pmap); + if (error != ENOMEM) + break; + vm_wait(NULL); + } + return (error); +} + +int +pmap_pkru_clear(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + int error; + + sva = trunc_page(sva); + eva = round_page(eva); + error = pmap_pkru_check_uargs(pmap, sva, eva, 0, 0); + if (error != 0) + return (error); + for (;;) { + PMAP_LOCK(pmap); + error = pmap_pkru_deassign(pmap, sva, eva); + if (error == 0) + pmap_pkru_update_range(pmap, sva, eva, 0); + PMAP_UNLOCK(pmap); + if (error != ENOMEM) + break; + vm_wait(NULL); + } + return (error); } #include "opt_ddb.h" Modified: stable/12/sys/amd64/amd64/sys_machdep.c ============================================================================== --- stable/12/sys/amd64/amd64/sys_machdep.c Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/amd64/amd64/sys_machdep.c Wed Mar 6 17:33:05 2019 (r344848) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -53,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include /* for kernel_map */ +#include #include #include @@ -170,13 +172,16 @@ update_gdt_fsbase(struct thread *td, uint32_t base) int sysarch(struct thread *td, struct sysarch_args *uap) { - int error = 0; - struct pcb *pcb = curthread->td_pcb; + struct pcb *pcb; + struct vm_map *map; uint32_t i386base; uint64_t a64base; struct i386_ioperm_args iargs; struct i386_get_xfpustate i386xfpu; + struct i386_set_pkru i386pkru; struct amd64_get_xfpustate a64xfpu; + struct amd64_set_pkru a64pkru; + int error; #ifdef CAPABILITY_MODE /* @@ -194,11 +199,15 @@ sysarch(struct thread *td, struct sysarch_args *uap) case I386_GET_GSBASE: case I386_SET_GSBASE: case I386_GET_XFPUSTATE: + case I386_SET_PKRU: + case I386_CLEAR_PKRU: case AMD64_GET_FSBASE: case AMD64_SET_FSBASE: case AMD64_GET_GSBASE: case AMD64_SET_GSBASE: case AMD64_GET_XFPUSTATE: + case AMD64_SET_PKRU: + case AMD64_CLEAR_PKRU: break; case I386_SET_IOPERM: @@ -214,6 +223,10 @@ sysarch(struct thread *td, struct sysarch_args *uap) if (uap->op == I386_GET_LDT || uap->op == I386_SET_LDT) return (sysarch_ldt(td, uap, UIO_USERSPACE)); + + error = 0; + pcb = td->td_pcb; + /* * XXXKIB check that the BSM generation code knows to encode * the op argument. @@ -233,11 +246,27 @@ sysarch(struct thread *td, struct sysarch_args *uap) a64xfpu.addr = (void *)(uintptr_t)i386xfpu.addr; a64xfpu.len = i386xfpu.len; break; + case I386_SET_PKRU: + case I386_CLEAR_PKRU: + if ((error = copyin(uap->parms, &i386pkru, + sizeof(struct i386_set_pkru))) != 0) + return (error); + a64pkru.addr = (void *)(uintptr_t)i386pkru.addr; + a64pkru.len = i386pkru.len; + a64pkru.keyidx = i386pkru.keyidx; + a64pkru.flags = i386pkru.flags; + break; case AMD64_GET_XFPUSTATE: if ((error = copyin(uap->parms, &a64xfpu, sizeof(struct amd64_get_xfpustate))) != 0) return (error); break; + case AMD64_SET_PKRU: + case AMD64_CLEAR_PKRU: + if ((error = copyin(uap->parms, &a64pkru, + sizeof(struct amd64_set_pkru))) != 0) + return (error); + break; default: break; } @@ -324,6 +353,34 @@ sysarch(struct thread *td, struct sysarch_args *uap) fpugetregs(td); error = copyout((char *)(get_pcb_user_save_td(td) + 1), a64xfpu.addr, a64xfpu.len); + break; + + case I386_SET_PKRU: + case AMD64_SET_PKRU: + /* + * Read-lock the map to synchronize with parallel + * pmap_vmspace_copy() on fork. + */ + map = &td->td_proc->p_vmspace->vm_map; + vm_map_lock_read(map); + error = pmap_pkru_set(PCPU_GET(curpmap), + (vm_offset_t)a64pkru.addr, (vm_offset_t)a64pkru.addr + + a64pkru.len, a64pkru.keyidx, a64pkru.flags); + vm_map_unlock_read(map); + break; + + case I386_CLEAR_PKRU: + case AMD64_CLEAR_PKRU: + if (a64pkru.flags != 0 || a64pkru.keyidx != 0) { + error = EINVAL; + break; + } + map = &td->td_proc->p_vmspace->vm_map; + vm_map_lock_read(map); + error = pmap_pkru_clear(PCPU_GET(curpmap), + (vm_offset_t)a64pkru.addr, + (vm_offset_t)a64pkru.addr + a64pkru.len); + vm_map_unlock(map); break; default: Modified: stable/12/sys/amd64/amd64/trap.c ============================================================================== --- stable/12/sys/amd64/amd64/trap.c Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/amd64/amd64/trap.c Wed Mar 6 17:33:05 2019 (r344848) @@ -808,6 +808,20 @@ trap_pfault(struct trapframe *frame, int usermode) } /* + * User-mode protection key violation (PKU). May happen + * either from usermode or from kernel if copyin accessed + * key-protected mapping. + */ + if ((frame->tf_err & PGEX_PK) != 0) { + if (eva > VM_MAXUSER_ADDRESS) { + trap_fatal(frame, eva); + return (-1); + } + rv = KERN_PROTECTION_FAILURE; + goto after_vmfault; + } + + /* * If nx protection of the usermode portion of kernel page * tables caused trap, panic. */ @@ -842,6 +856,7 @@ trap_pfault(struct trapframe *frame, int usermode) #endif return (0); } +after_vmfault: if (!usermode) { if (td->td_intr_nesting_level == 0 && curpcb->pcb_onfault != NULL) { Modified: stable/12/sys/amd64/include/pmap.h ============================================================================== --- stable/12/sys/amd64/include/pmap.h Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/amd64/include/pmap.h Wed Mar 6 17:33:05 2019 (r344848) @@ -66,6 +66,7 @@ #define X86_PG_AVAIL2 0x400 /* < programmers use */ #define X86_PG_AVAIL3 0x800 /* \ */ #define X86_PG_PDE_PAT 0x1000 /* PAT PAT index */ +#define X86_PG_PKU(idx) ((pt_entry_t)idx << 59) #define X86_PG_NX (1ul<<63) /* No-execute */ #define X86_PG_AVAIL(x) (1ul << (x)) @@ -73,6 +74,10 @@ #define X86_PG_PDE_CACHE (X86_PG_PDE_PAT | X86_PG_NC_PWT | X86_PG_NC_PCD) #define X86_PG_PTE_CACHE (X86_PG_PTE_PAT | X86_PG_NC_PWT | X86_PG_NC_PCD) +/* Protection keys indexes */ +#define PMAP_MAX_PKRU_IDX 0xf +#define X86_PG_PKU_MASK X86_PG_PKU(PMAP_MAX_PKRU_IDX) + /* * Intel extended page table (EPT) bit definitions. */ @@ -120,7 +125,7 @@ * (PTE) page mappings have identical settings for the following fields: */ #define PG_PTE_PROMOTE (PG_NX | PG_MANAGED | PG_W | PG_G | PG_PTE_CACHE | \ - PG_M | PG_A | PG_U | PG_RW | PG_V) + PG_M | PG_A | PG_U | PG_RW | PG_V | PG_PKU_MASK) /* * Page Protection Exception bits @@ -242,6 +247,8 @@ #include #include #include +#include +#include #include @@ -336,6 +343,7 @@ struct pmap { long pm_eptgen; /* EPT pmap generation id */ int pm_flags; struct pmap_pcids pm_pcids[MAXCPU]; + struct rangeset pm_pkru; }; /* flags */ @@ -454,6 +462,10 @@ void pmap_pti_pcid_invalidate(uint64_t ucr3, uint64_t void pmap_pti_pcid_invlpg(uint64_t ucr3, uint64_t kcr3, vm_offset_t va); void pmap_pti_pcid_invlrng(uint64_t ucr3, uint64_t kcr3, vm_offset_t sva, vm_offset_t eva); +int pmap_pkru_clear(pmap_t pmap, vm_offset_t sva, vm_offset_t eva); +int pmap_pkru_set(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, + u_int keyidx, int flags); +int pmap_vmspace_copy(pmap_t dst_pmap, pmap_t src_pmap); #endif /* _KERNEL */ /* Return various clipped indexes for a given VA */ Modified: stable/12/sys/arm/include/pmap.h ============================================================================== --- stable/12/sys/arm/include/pmap.h Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/arm/include/pmap.h Wed Mar 6 17:33:05 2019 (r344848) @@ -71,5 +71,12 @@ void pmap_kremove_device(vm_offset_t, vm_size_t); vm_paddr_t pmap_kextract(vm_offset_t); #define vtophys(va) pmap_kextract((vm_offset_t)(va)) +static inline int +pmap_vmspace_copy(pmap_t dst_pmap __unused, pmap_t src_pmap __unused) +{ + + return (0); +} + #endif /* _KERNEL */ #endif /* !_MACHINE_PMAP_H_ */ Modified: stable/12/sys/arm64/include/pmap.h ============================================================================== --- stable/12/sys/arm64/include/pmap.h Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/arm64/include/pmap.h Wed Mar 6 17:33:05 2019 (r344848) @@ -171,6 +171,13 @@ struct pcb *pmap_switch(struct thread *, struct thread #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) +static inline int +pmap_vmspace_copy(pmap_t dst_pmap __unused, pmap_t src_pmap __unused) +{ + + return (0); +} + #endif /* _KERNEL */ #endif /* !LOCORE */ Modified: stable/12/sys/i386/include/pmap.h ============================================================================== --- stable/12/sys/i386/include/pmap.h Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/i386/include/pmap.h Wed Mar 6 17:33:05 2019 (r344848) @@ -372,6 +372,13 @@ extern vm_offset_t virtual_end; #define pmap_page_is_write_mapped(m) (((m)->aflags & PGA_WRITEABLE) != 0) #define pmap_unmapbios(va, sz) pmap_unmapdev((va), (sz)) +static inline int +pmap_vmspace_copy(pmap_t dst_pmap __unused, pmap_t src_pmap __unused) +{ + + return (0); +} + /* * Only the following functions or macros may be used before pmap_bootstrap() * is called: pmap_kenter(), pmap_kextract(), pmap_kremove(), vtophys(), and Modified: stable/12/sys/mips/include/pmap.h ============================================================================== --- stable/12/sys/mips/include/pmap.h Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/mips/include/pmap.h Wed Mar 6 17:33:05 2019 (r344848) @@ -185,6 +185,13 @@ int pmap_emulate_modified(pmap_t pmap, vm_offset_t va) void pmap_page_set_memattr(vm_page_t, vm_memattr_t); int pmap_change_attr(vm_offset_t, vm_size_t, vm_memattr_t); +static inline int +pmap_vmspace_copy(pmap_t dst_pmap __unused, pmap_t src_pmap __unused) +{ + + return (0); +} + #endif /* _KERNEL */ #endif /* !LOCORE */ Modified: stable/12/sys/powerpc/include/pmap.h ============================================================================== --- stable/12/sys/powerpc/include/pmap.h Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/powerpc/include/pmap.h Wed Mar 6 17:33:05 2019 (r344848) @@ -288,6 +288,13 @@ vm_offset_t pmap_early_io_map(vm_paddr_t pa, vm_size_t void pmap_early_io_unmap(vm_offset_t va, vm_size_t size); void pmap_track_page(pmap_t pmap, vm_offset_t va); +static inline int +pmap_vmspace_copy(pmap_t dst_pmap __unused, pmap_t src_pmap __unused) +{ + + return (0); +} + #endif #endif /* !_MACHINE_PMAP_H_ */ Modified: stable/12/sys/riscv/include/pmap.h ============================================================================== --- stable/12/sys/riscv/include/pmap.h Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/riscv/include/pmap.h Wed Mar 6 17:33:05 2019 (r344848) @@ -155,6 +155,13 @@ bool pmap_get_tables(pmap_t, vm_offset_t, pd_entry_t * int pmap_fault_fixup(pmap_t, vm_offset_t, vm_prot_t); +static inline int +pmap_vmspace_copy(pmap_t dst_pmap __unused, pmap_t src_pmap __unused) +{ + + return (0); +} + #endif /* _KERNEL */ #endif /* !LOCORE */ Modified: stable/12/sys/sparc64/include/pmap.h ============================================================================== --- stable/12/sys/sparc64/include/pmap.h Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/sparc64/include/pmap.h Wed Mar 6 17:33:05 2019 (r344848) @@ -128,4 +128,11 @@ SYSCTL_DECL(_debug_pmap_stats); #endif +static inline int +pmap_vmspace_copy(pmap_t dst_pmap __unused, pmap_t src_pmap __unused) +{ + + return (0); +} + #endif /* !_MACHINE_PMAP_H_ */ Modified: stable/12/sys/vm/vm_fault.c ============================================================================== --- stable/12/sys/vm/vm_fault.c Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/vm/vm_fault.c Wed Mar 6 17:33:05 2019 (r344848) @@ -479,8 +479,20 @@ vm_fault_populate(struct faultstate *fs, vm_prot_t pro fault_flags, true); } VM_OBJECT_WUNLOCK(fs->first_object); - pmap_enter(fs->map->pmap, vaddr, m, prot, fault_type | (wired ? - PMAP_ENTER_WIRED : 0), psind); + rv = pmap_enter(fs->map->pmap, vaddr, m, prot, fault_type | + (wired ? PMAP_ENTER_WIRED : 0), psind); +#if defined(__amd64__) + if (psind > 0 && rv == KERN_FAILURE) { + for (i = 0; i < npages; i++) { + rv = pmap_enter(fs->map->pmap, vaddr + ptoa(i), + &m[i], prot, fault_type | + (wired ? PMAP_ENTER_WIRED : 0), 0); + MPASS(rv == KERN_SUCCESS); + } + } +#else + MPASS(rv == KERN_SUCCESS); +#endif VM_OBJECT_WLOCK(fs->first_object); m_mtx = NULL; for (i = 0; i < npages; i++) { Modified: stable/12/sys/vm/vm_map.c ============================================================================== --- stable/12/sys/vm/vm_map.c Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/vm/vm_map.c Wed Mar 6 17:33:05 2019 (r344848) @@ -3424,7 +3424,7 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c vm_map_t new_map, old_map; vm_map_entry_t new_entry, old_entry; vm_object_t object; - int locked; + int error, locked; vm_inherit_t inh; old_map = &vm1->vm_map; @@ -3433,6 +3433,7 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c pmap_pinit); if (vm2 == NULL) return (NULL); + vm2->vm_taddr = vm1->vm_taddr; vm2->vm_daddr = vm1->vm_daddr; vm2->vm_maxsaddr = vm1->vm_maxsaddr; @@ -3442,6 +3443,15 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c new_map = &vm2->vm_map; locked = vm_map_trylock(new_map); /* trylock to silence WITNESS */ KASSERT(locked, ("vmspace_fork: lock failed")); + + error = pmap_vmspace_copy(new_map->pmap, old_map->pmap); + if (error != 0) { + sx_xunlock(&old_map->lock); + sx_xunlock(&new_map->lock); + vm_map_process_deferred(); + vmspace_free(vm2); + return (NULL); + } old_entry = old_map->header.next; Modified: stable/12/sys/x86/include/sysarch.h ============================================================================== --- stable/12/sys/x86/include/sysarch.h Wed Mar 6 17:26:30 2019 (r344847) +++ stable/12/sys/x86/include/sysarch.h Wed Mar 6 17:33:05 2019 (r344848) @@ -52,6 +52,8 @@ #define I386_GET_GSBASE 9 #define I386_SET_GSBASE 10 #define I386_GET_XFPUSTATE 11 +#define I386_SET_PKRU 12 +#define I386_CLEAR_PKRU 13 /* Leave space for 0-127 for to avoid translating syscalls */ #define AMD64_GET_FSBASE 128 @@ -59,7 +61,13 @@ #define AMD64_GET_GSBASE 130 #define AMD64_SET_GSBASE 131 #define AMD64_GET_XFPUSTATE 132 +#define AMD64_SET_PKRU 133 +#define AMD64_CLEAR_PKRU 134 +/* Flags for AMD64_SET_PKRU */ +#define AMD64_PKRU_EXCL 0x0001 +#define AMD64_PKRU_PERSIST 0x0002 + struct i386_ioperm_args { unsigned int start; unsigned int length; @@ -94,11 +102,25 @@ struct i386_get_xfpustate { int len; }; +struct i386_set_pkru { + unsigned int addr; + unsigned int len; + unsigned int keyidx; + int flags; +}; + struct amd64_get_xfpustate { void *addr; int len; }; #endif + +struct amd64_set_pkru { + void *addr; + unsigned long len; + unsigned int keyidx; + int flags; +}; #ifndef _KERNEL union descriptor; From owner-svn-src-stable-12@freebsd.org Wed Mar 6 17:40:32 2019 Return-Path: Delivered-To: svn-src-stable-12@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 2C9A61521404; Wed, 6 Mar 2019 17:40:32 +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 C4A2795F4D; Wed, 6 Mar 2019 17:40:31 +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 B50676D58; Wed, 6 Mar 2019 17:40:31 +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 x26HeVqF079607; Wed, 6 Mar 2019 17:40:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x26HeUPZ079602; Wed, 6 Mar 2019 17:40:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903061740.x26HeUPZ079602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 6 Mar 2019 17:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344850 - in stable/12: lib/libc/amd64 lib/libc/i386 lib/libc/x86/sys sys/x86/include X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12: lib/libc/amd64 lib/libc/i386 lib/libc/x86/sys sys/x86/include X-SVN-Commit-Revision: 344850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C4A2795F4D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.93)[-0.925,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 17:40:32 -0000 Author: kib Date: Wed Mar 6 17:40:30 2019 New Revision: 344850 URL: https://svnweb.freebsd.org/changeset/base/344850 Log: MFC r344354: Add usermode helpers for the Intel userspace protection keys feature. Added: stable/12/lib/libc/x86/sys/pkru.c - copied unchanged from r344354, head/lib/libc/x86/sys/pkru.c Modified: stable/12/lib/libc/amd64/Symbol.map stable/12/lib/libc/i386/Symbol.map stable/12/lib/libc/x86/sys/Makefile.inc stable/12/sys/x86/include/sysarch.h Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/amd64/Symbol.map ============================================================================== --- stable/12/lib/libc/amd64/Symbol.map Wed Mar 6 17:37:56 2019 (r344849) +++ stable/12/lib/libc/amd64/Symbol.map Wed Mar 6 17:40:30 2019 (r344850) @@ -44,6 +44,13 @@ FBSD_1.0 { vfork; }; +FBSD_1.6 { + x86_pkru_get_perm; + x86_pkru_set_perm; + x86_pkru_protect_range; + x86_pkru_unprotect_range; +}; + /* * * FreeBSD private ABI Modified: stable/12/lib/libc/i386/Symbol.map ============================================================================== --- stable/12/lib/libc/i386/Symbol.map Wed Mar 6 17:37:56 2019 (r344849) +++ stable/12/lib/libc/i386/Symbol.map Wed Mar 6 17:40:30 2019 (r344850) @@ -46,6 +46,13 @@ FBSD_1.0 { ___tls_get_addr; }; +FBSD_1.6 { + x86_pkru_get_perm; + x86_pkru_set_perm; + x86_pkru_protect_range; + x86_pkru_unprotect_range; +}; + FBSDprivate_1.0 { /* PSEUDO syscalls */ __sys_getlogin; Modified: stable/12/lib/libc/x86/sys/Makefile.inc ============================================================================== --- stable/12/lib/libc/x86/sys/Makefile.inc Wed Mar 6 17:37:56 2019 (r344849) +++ stable/12/lib/libc/x86/sys/Makefile.inc Wed Mar 6 17:40:30 2019 (r344850) @@ -3,7 +3,8 @@ .PATH: ${LIBC_SRCTOP}/x86/sys SRCS+= \ - __vdso_gettc.c + __vdso_gettc.c \ + pkru.c .if ${MACHINE_CPUARCH} == "amd64" && ${MK_HYPERV} != "no" CFLAGS+= -DWANT_HYPERV Copied: stable/12/lib/libc/x86/sys/pkru.c (from r344354, head/lib/libc/x86/sys/pkru.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libc/x86/sys/pkru.c Wed Mar 6 17:40:30 2019 (r344850, copy of r344354, head/lib/libc/x86/sys/pkru.c) @@ -0,0 +1,138 @@ +/*- + * Copyright (c) 2019 The FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#define MAX_PKRU_IDX 0xf +#ifdef __i386__ +#define X86_SET_PKRU I386_SET_PKRU +#define X86_CLEAR_PKRU I386_CLEAR_PKRU +#else +#define X86_SET_PKRU AMD64_SET_PKRU +#define X86_CLEAR_PKRU AMD64_CLEAR_PKRU +#endif + +static int +x86_pkru_get_perm_unsup(u_int keyidx, int *access, int *modify) +{ + + errno = EOPNOTSUPP; + return (-1); +} + +static int +x86_pkru_get_perm_hw(u_int keyidx, int *access, int *modify) +{ + uint32_t pkru; + + if (keyidx > MAX_PKRU_IDX) { + errno = EINVAL; + return (-1); + } + keyidx *= 2; + pkru = rdpkru(); + *access = (pkru & (1 << keyidx)) == 0; + *modify = (pkru & (2 << keyidx)) == 0; + return (0); +} + +DEFINE_UIFUNC(, int, x86_pkru_get_perm, (u_int, int *, int *), static) +{ + + return ((cpu_stdext_feature2 & CPUID_STDEXT2_OSPKE) == 0 ? + x86_pkru_get_perm_unsup : x86_pkru_get_perm_hw); +} + +static int +x86_pkru_set_perm_unsup(u_int keyidx, int access, int modify) +{ + + errno = EOPNOTSUPP; + return (-1); +} + +static int +x86_pkru_set_perm_hw(u_int keyidx, int access, int modify) +{ + uint32_t pkru; + + if (keyidx > MAX_PKRU_IDX) { + errno = EINVAL; + return (-1); + } + keyidx *= 2; + pkru = rdpkru(); + pkru &= ~(3 << keyidx); + if (!access) + pkru |= 1 << keyidx; + if (!modify) + pkru |= 2 << keyidx; + wrpkru(pkru); + return (0); +} + +DEFINE_UIFUNC(, int, x86_pkru_set_perm, (u_int, int, int), static) +{ + + return ((cpu_stdext_feature2 & CPUID_STDEXT2_OSPKE) == 0 ? + x86_pkru_set_perm_unsup : x86_pkru_set_perm_hw); +} + +int +x86_pkru_protect_range(void *addr, unsigned long len, u_int keyidx, int flags) +{ + struct amd64_set_pkru a64pkru; + + memset(&a64pkru, 0, sizeof(a64pkru)); + a64pkru.addr = addr; + a64pkru.len = len; + a64pkru.keyidx = keyidx; + a64pkru.flags = flags; + return (sysarch(X86_SET_PKRU, &a64pkru)); +} + +int +x86_pkru_unprotect_range(void *addr, unsigned long len) +{ + struct amd64_set_pkru a64pkru; + + memset(&a64pkru, 0, sizeof(a64pkru)); + a64pkru.addr = addr; + a64pkru.len = len; + return (sysarch(X86_CLEAR_PKRU, &a64pkru)); +} Modified: stable/12/sys/x86/include/sysarch.h ============================================================================== --- stable/12/sys/x86/include/sysarch.h Wed Mar 6 17:37:56 2019 (r344849) +++ stable/12/sys/x86/include/sysarch.h Wed Mar 6 17:40:30 2019 (r344850) @@ -142,6 +142,11 @@ int amd64_get_fsbase(void **); int amd64_get_gsbase(void **); int amd64_set_fsbase(void *); int amd64_set_gsbase(void *); +int x86_pkru_get_perm(unsigned int keyidx, int *access, int *modify); +int x86_pkru_set_perm(unsigned int keyidx, int access, int modify); +int x86_pkru_protect_range(void *addr, unsigned long len, unsigned int keyidx, + int flag); +int x86_pkru_unprotect_range(void *addr, unsigned long len); int sysarch(int, void *); __END_DECLS #else From owner-svn-src-stable-12@freebsd.org Wed Mar 6 17:41:13 2019 Return-Path: Delivered-To: svn-src-stable-12@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 150861521486; Wed, 6 Mar 2019 17:41:13 +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 AEFA4960D2; Wed, 6 Mar 2019 17:41:12 +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 A21306E91; Wed, 6 Mar 2019 17:41:12 +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 x26HfC9O082563; Wed, 6 Mar 2019 17:41:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x26HfCJq082179; Wed, 6 Mar 2019 17:41:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903061741.x26HfCJq082179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 6 Mar 2019 17:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344851 - stable/12/lib/libc/x86/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/lib/libc/x86/sys X-SVN-Commit-Revision: 344851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AEFA4960D2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.925,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 17:41:13 -0000 Author: kib Date: Wed Mar 6 17:41:12 2019 New Revision: 344851 URL: https://svnweb.freebsd.org/changeset/base/344851 Log: MFC r344355: pkru(3) man page. Added: stable/12/lib/libc/x86/sys/pkru.3 - copied unchanged from r344355, head/lib/libc/x86/sys/pkru.3 Modified: stable/12/lib/libc/x86/sys/Makefile.inc Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/x86/sys/Makefile.inc ============================================================================== --- stable/12/lib/libc/x86/sys/Makefile.inc Wed Mar 6 17:40:30 2019 (r344850) +++ stable/12/lib/libc/x86/sys/Makefile.inc Wed Mar 6 17:41:12 2019 (r344851) @@ -6,6 +6,9 @@ SRCS+= \ __vdso_gettc.c \ pkru.c +MAN+= \ + pkru.3 + .if ${MACHINE_CPUARCH} == "amd64" && ${MK_HYPERV} != "no" CFLAGS+= -DWANT_HYPERV .endif Copied: stable/12/lib/libc/x86/sys/pkru.3 (from r344355, head/lib/libc/x86/sys/pkru.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libc/x86/sys/pkru.3 Wed Mar 6 17:41:12 2019 (r344851, copy of r344355, head/lib/libc/x86/sys/pkru.3) @@ -0,0 +1,206 @@ +.\" Copyright (c) 2019 The FreeBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This documentation was written by +.\" Konstantin Belousov under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 16, 2019 +.Dt PKRU 3 +.Os +.Sh NAME +.Nm Protection Key Rights for User pages +.Nd provide fast user-managed key-based access control for pages +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In machine/sysarch.h +.Ft int +.Fn x86_pkru_get_perm "unsigned int keyidx" "int *access" "int *modify" +.Ft int +.Fn x86_pkru_set_perm "unsigned int keyidx" "int access" "int modify" +.Ft int +.Fo x86_pkru_protect_range +.Fa "void *addr" +.Fa "unsigned long len" +.Fa "unsigned int keyidx" +.Fa "int flag" +.Fc +.Ft int +.Fn x86_pkru_unprotect_range "void *addr" "unsigned long len" +.Sh DESCRIPTION +The protection keys feature provides an additional mechanism, besides the +normal page permissions as established by +.Xr mmap 2 +and +.Xr mprotect 2 , +to control access to user-mode addresses. +The mechanism gives safety measures which can be used to avoid +incidental read or modification of sensitive memory, +or as a debugging feature. +It cannot guard against conscious accesses since permissions +are user-controllable. +.Pp +If supported by hardware, each mapped user linear address +has an associated 4-bit protection key. +A new per-thread PKRU hardware register determines, for each protection +key, whether user-mode addresses with that protection key may be +read or written. +.Pp +Only one key may apply to a given range at a time. +The default protection key index is zero, it is used even if no key +was explicitly assigned to the address, or if the key was removed. +.Pp +The protection prevents the system from accessing user addresses as well +as the user applications. +When a system call was unable to read or write user memory due to key +protection, it returns the +.Er EFAULT +error code. +Note that some side effects may have occurred if this error is reported. +.Pp +Protection keys require that the system uses 4-level paging +(also called long mode), +which means that it is only available on amd64 system. +Both 64-bit and 32-bit applications can use protection keys. +More information about the hardware feature is provided in the IA32 Software +Developer's Manual published by Intel Corp. +.Pp +The key indexes written into the page table entries are managed by the +.Fn sysarch +syscall. +Per-key permissions are managed using the user-mode instructions +.Em RDPKRU +and +.Em WRPKRU. +The system provides convenient library helpers for both the syscall and +the instructions, described below. +.Pp +The +.Fn x86_pkru_protect_range +function assigns key +.Fa keyidx +to the range starting at +.Fa addr +and having length +.Fa len . +Starting address is truncated to the page start, +and the end is rounded up to the end of the page. +After a successfull call, the range has the specified key assigned, +even if the key is zero and it did not change the page table entries. +.Pp +The +.Fa flags +argument takes the logical OR of the following values: +.Bl -tag -width +.It Bq Va AMD64_PKRU_EXCL +Only assign the key if the range does not have any other keys assigned +(including the zero key). +You must first remove any existing key with +.Fn x86_pkru_unprotect_range +in order for this request to succeed. +If the +.Va AMD64_PKRU_EXCL +flag is not specified, +.Fn x86_pkru_protect_range +replaces any existing key. +.It Bq Va AMD64_PKRU_PERSIST +The keys assigned to the range are persistent. +They are re-established when the current mapping is destroyed +and a new mapping is created in any sub-range of the specified range. +You must use a +.Fn x86_pkru_unprotect_range +call to forget the key. +.El +.Pp +The +.Fn x86_pkru_unprotect_range +function removes any keys assigned to the specified range. +Existing mappings are changed to use key index zero in page table entries. +Keys are no longer considered installed for all mappings in the range, +for the purposes of +.Fn x86_pkru_protect_range +with the +.Va AMD64_PKRU_EXCL +flag. +.Pp +The +.Fn x86_pkru_get_perm +function returns access rights for the key specified by the +.Fn keyidx +argument. +If the value pointed to by +.Fa access +is zero after the call, no read or write permissions is granted for +mappings which are assigned the key +.Fn keyidx . +If +.Fa access +is not zero, read access is permitted. +The non-zero value of the variable pointed to by the +.Fa modify +argument indicates that write access is permitted. +.Pp +Conversely, the +.Fn x86_pkru_set_perm +establishes the access and modify permissions for the given key index +as specified by its arguments. +.Sh RETURN VALUES +.Rv -std +.Sh ERRORS +.Bl -tag -width Er +.It Bq Er EOPNOTSUPP +The hardware does not support protection keys. +.It Bq Er EINVAL +The supplied key index is invalid (greater than 15). +.It Bq Er EINVAL +The supplied +.Fa flags +argument for +.Fn x86_pkru_protect_range +has reserved bits set. +.It Bq Er EFAULT +The supplied address range does not completely fit into the user-managed +address range. +.It Bq Er ENOMEM +The memory shortage prevents the completion of the operation. +.It Bq Er EBUSY +The +.Va AMD64_PKRU_EXCL +flag was specified for +.Fn x86_pkru_protect_range +and the range already has defined protection keys. +.El +.Sh SEE ALSO +.Xr mmap 2 , +.Xr mprotect 2 , +.Xr munmap 2 , +.Xr sysarch 2 . +.Sh STANDARDS +The +.Nm +functions are non-standard and first appeared in +.Fx 13.0 . From owner-svn-src-stable-12@freebsd.org Wed Mar 6 23:09:28 2019 Return-Path: Delivered-To: svn-src-stable-12@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 B30F2152A970; Wed, 6 Mar 2019 23:09:28 +0000 (UTC) (envelope-from jhb@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 3E25275AFE; Wed, 6 Mar 2019 23:09:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3379FA6B4; Wed, 6 Mar 2019 23:09:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x26N9SmS060298; Wed, 6 Mar 2019 23:09:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x26N9R97060294; Wed, 6 Mar 2019 23:09:27 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903062309.x26N9R97060294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 6 Mar 2019 23:09:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344858 - in stable: 11/sys/dev/cxgbe 12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/dev/cxgbe 12/sys/dev/cxgbe X-SVN-Commit-Revision: 344858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3E25275AFE 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 23:09:29 -0000 Author: jhb Date: Wed Mar 6 23:09:27 2019 New Revision: 344858 URL: https://svnweb.freebsd.org/changeset/base/344858 Log: MFC 341098: Add read-only sysctls for all tunables in the cxgbe(4) driver. Modified: stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/t4_netmap.c stable/12/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/cxgbe/adapter.h stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/t4_netmap.c stable/11/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Wed Mar 6 22:56:49 2019 (r344857) +++ stable/12/sys/dev/cxgbe/adapter.h Wed Mar 6 23:09:27 2019 (r344858) @@ -82,6 +82,8 @@ prefetch(void *x) #define CTLTYPE_U64 CTLTYPE_QUAD #endif +SYSCTL_DECL(_hw_cxgbe); + struct adapter; typedef struct adapter adapter_t; Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 6 22:56:49 2019 (r344857) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 6 23:09:27 2019 (r344858) @@ -251,110 +251,150 @@ SLIST_HEAD(, uld_info) t4_uld_list; * Tunables applicable to both T4 and T5 are under hw.cxgbe. Those specific to * T5 are under hw.cxl. */ +SYSCTL_NODE(_hw, OID_AUTO, cxgbe, CTLFLAG_RD, 0, "cxgbe(4) parameters"); +SYSCTL_NODE(_hw, OID_AUTO, cxl, CTLFLAG_RD, 0, "cxgbe(4) T5+ parameters"); +SYSCTL_NODE(_hw_cxgbe, OID_AUTO, toe, CTLFLAG_RD, 0, "cxgbe(4) TOE parameters"); /* * Number of queues for tx and rx, NIC and offload. */ #define NTXQ 16 int t4_ntxq = -NTXQ; -TUNABLE_INT("hw.cxgbe.ntxq", &t4_ntxq); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, ntxq, CTLFLAG_RDTUN, &t4_ntxq, 0, + "Number of TX queues per port"); TUNABLE_INT("hw.cxgbe.ntxq10g", &t4_ntxq); /* Old name, undocumented */ #define NRXQ 8 int t4_nrxq = -NRXQ; -TUNABLE_INT("hw.cxgbe.nrxq", &t4_nrxq); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nrxq, CTLFLAG_RDTUN, &t4_nrxq, 0, + "Number of RX queues per port"); TUNABLE_INT("hw.cxgbe.nrxq10g", &t4_nrxq); /* Old name, undocumented */ #define NTXQ_VI 1 static int t4_ntxq_vi = -NTXQ_VI; -TUNABLE_INT("hw.cxgbe.ntxq_vi", &t4_ntxq_vi); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, ntxq_vi, CTLFLAG_RDTUN, &t4_ntxq_vi, 0, + "Number of TX queues per VI"); #define NRXQ_VI 1 static int t4_nrxq_vi = -NRXQ_VI; -TUNABLE_INT("hw.cxgbe.nrxq_vi", &t4_nrxq_vi); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nrxq_vi, CTLFLAG_RDTUN, &t4_nrxq_vi, 0, + "Number of RX queues per VI"); static int t4_rsrv_noflowq = 0; -TUNABLE_INT("hw.cxgbe.rsrv_noflowq", &t4_rsrv_noflowq); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, rsrv_noflowq, CTLFLAG_RDTUN, &t4_rsrv_noflowq, + 0, "Reserve TX queue 0 of each VI for non-flowid packets"); #if defined(TCP_OFFLOAD) || defined(RATELIMIT) #define NOFLDTXQ 8 static int t4_nofldtxq = -NOFLDTXQ; -TUNABLE_INT("hw.cxgbe.nofldtxq", &t4_nofldtxq); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nofldtxq, CTLFLAG_RDTUN, &t4_nofldtxq, 0, + "Number of offload TX queues per port"); #define NOFLDRXQ 2 static int t4_nofldrxq = -NOFLDRXQ; -TUNABLE_INT("hw.cxgbe.nofldrxq", &t4_nofldrxq); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nofldrxq, CTLFLAG_RDTUN, &t4_nofldrxq, 0, + "Number of offload RX queues per port"); #define NOFLDTXQ_VI 1 static int t4_nofldtxq_vi = -NOFLDTXQ_VI; -TUNABLE_INT("hw.cxgbe.nofldtxq_vi", &t4_nofldtxq_vi); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nofldtxq_vi, CTLFLAG_RDTUN, &t4_nofldtxq_vi, 0, + "Number of offload TX queues per VI"); #define NOFLDRXQ_VI 1 static int t4_nofldrxq_vi = -NOFLDRXQ_VI; -TUNABLE_INT("hw.cxgbe.nofldrxq_vi", &t4_nofldrxq_vi); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nofldrxq_vi, CTLFLAG_RDTUN, &t4_nofldrxq_vi, 0, + "Number of offload RX queues per VI"); #define TMR_IDX_OFLD 1 int t4_tmr_idx_ofld = TMR_IDX_OFLD; -TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_ofld", &t4_tmr_idx_ofld); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, holdoff_timer_idx_ofld, CTLFLAG_RDTUN, + &t4_tmr_idx_ofld, 0, "Holdoff timer index for offload queues"); #define PKTC_IDX_OFLD (-1) int t4_pktc_idx_ofld = PKTC_IDX_OFLD; -TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_ofld", &t4_pktc_idx_ofld); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, holdoff_pktc_idx_ofld, CTLFLAG_RDTUN, + &t4_pktc_idx_ofld, 0, "holdoff packet counter index for offload queues"); /* 0 means chip/fw default, non-zero number is value in microseconds */ static u_long t4_toe_keepalive_idle = 0; -TUNABLE_ULONG("hw.cxgbe.toe.keepalive_idle", &t4_toe_keepalive_idle); +SYSCTL_ULONG(_hw_cxgbe_toe, OID_AUTO, keepalive_idle, CTLFLAG_RDTUN, + &t4_toe_keepalive_idle, 0, "TOE keepalive idle timer (us)"); /* 0 means chip/fw default, non-zero number is value in microseconds */ static u_long t4_toe_keepalive_interval = 0; -TUNABLE_ULONG("hw.cxgbe.toe.keepalive_interval", &t4_toe_keepalive_interval); +SYSCTL_ULONG(_hw_cxgbe_toe, OID_AUTO, keepalive_interval, CTLFLAG_RDTUN, + &t4_toe_keepalive_interval, 0, "TOE keepalive interval timer (us)"); /* 0 means chip/fw default, non-zero number is # of keepalives before abort */ static int t4_toe_keepalive_count = 0; -TUNABLE_INT("hw.cxgbe.toe.keepalive_count", &t4_toe_keepalive_count); +SYSCTL_INT(_hw_cxgbe_toe, OID_AUTO, keepalive_count, CTLFLAG_RDTUN, + &t4_toe_keepalive_count, 0, "Number of TOE keepalive probes before abort"); /* 0 means chip/fw default, non-zero number is value in microseconds */ static u_long t4_toe_rexmt_min = 0; -TUNABLE_ULONG("hw.cxgbe.toe.rexmt_min", &t4_toe_rexmt_min); +SYSCTL_ULONG(_hw_cxgbe_toe, OID_AUTO, rexmt_min, CTLFLAG_RDTUN, + &t4_toe_rexmt_min, 0, "Minimum TOE retransmit interval (us)"); /* 0 means chip/fw default, non-zero number is value in microseconds */ static u_long t4_toe_rexmt_max = 0; -TUNABLE_ULONG("hw.cxgbe.toe.rexmt_max", &t4_toe_rexmt_max); +SYSCTL_ULONG(_hw_cxgbe_toe, OID_AUTO, rexmt_max, CTLFLAG_RDTUN, + &t4_toe_rexmt_max, 0, "Maximum TOE retransmit interval (us)"); /* 0 means chip/fw default, non-zero number is # of rexmt before abort */ static int t4_toe_rexmt_count = 0; -TUNABLE_INT("hw.cxgbe.toe.rexmt_count", &t4_toe_rexmt_count); +SYSCTL_INT(_hw_cxgbe_toe, OID_AUTO, rexmt_count, CTLFLAG_RDTUN, + &t4_toe_rexmt_count, 0, "Number of TOE retransmissions before abort"); /* -1 means chip/fw default, other values are raw backoff values to use */ static int t4_toe_rexmt_backoff[16] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.0", &t4_toe_rexmt_backoff[0]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.1", &t4_toe_rexmt_backoff[1]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.2", &t4_toe_rexmt_backoff[2]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.3", &t4_toe_rexmt_backoff[3]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.4", &t4_toe_rexmt_backoff[4]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.5", &t4_toe_rexmt_backoff[5]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.6", &t4_toe_rexmt_backoff[6]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.7", &t4_toe_rexmt_backoff[7]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.8", &t4_toe_rexmt_backoff[8]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.9", &t4_toe_rexmt_backoff[9]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.10", &t4_toe_rexmt_backoff[10]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.11", &t4_toe_rexmt_backoff[11]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.12", &t4_toe_rexmt_backoff[12]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.13", &t4_toe_rexmt_backoff[13]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.14", &t4_toe_rexmt_backoff[14]); -TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.15", &t4_toe_rexmt_backoff[15]); +SYSCTL_NODE(_hw_cxgbe_toe, OID_AUTO, rexmt_backoff, CTLFLAG_RD, 0, + "cxgbe(4) TOE retransmit backoff values"); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 0, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[0], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 1, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[1], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 2, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[2], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 3, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[3], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 4, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[4], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 5, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[5], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 6, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[6], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 7, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[7], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 8, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[8], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 9, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[9], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 10, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[10], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 11, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[11], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 12, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[12], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 13, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[13], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 14, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[14], 0, ""); +SYSCTL_INT(_hw_cxgbe_toe_rexmt_backoff, OID_AUTO, 15, CTLFLAG_RDTUN, + &t4_toe_rexmt_backoff[15], 0, ""); #endif #ifdef DEV_NETMAP #define NNMTXQ_VI 2 static int t4_nnmtxq_vi = -NNMTXQ_VI; -TUNABLE_INT("hw.cxgbe.nnmtxq_vi", &t4_nnmtxq_vi); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nnmtxq_vi, CTLFLAG_RDTUN, &t4_nnmtxq_vi, 0, + "Number of netmap TX queues per VI"); #define NNMRXQ_VI 2 static int t4_nnmrxq_vi = -NNMRXQ_VI; -TUNABLE_INT("hw.cxgbe.nnmrxq_vi", &t4_nnmrxq_vi); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nnmrxq_vi, CTLFLAG_RDTUN, &t4_nnmrxq_vi, 0, + "Number of netmap RX queues per VI"); #endif /* @@ -362,28 +402,33 @@ TUNABLE_INT("hw.cxgbe.nnmrxq_vi", &t4_nnmrxq_vi); */ #define TMR_IDX 1 int t4_tmr_idx = TMR_IDX; -TUNABLE_INT("hw.cxgbe.holdoff_timer_idx", &t4_tmr_idx); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, holdoff_timer_idx, CTLFLAG_RDTUN, &t4_tmr_idx, + 0, "Holdoff timer index"); TUNABLE_INT("hw.cxgbe.holdoff_timer_idx_10G", &t4_tmr_idx); /* Old name */ #define PKTC_IDX (-1) int t4_pktc_idx = PKTC_IDX; -TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx", &t4_pktc_idx); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, holdoff_pktc_idx, CTLFLAG_RDTUN, &t4_pktc_idx, + 0, "Holdoff packet counter index"); TUNABLE_INT("hw.cxgbe.holdoff_pktc_idx_10G", &t4_pktc_idx); /* Old name */ /* * Size (# of entries) of each tx and rx queue. */ unsigned int t4_qsize_txq = TX_EQ_QSIZE; -TUNABLE_INT("hw.cxgbe.qsize_txq", &t4_qsize_txq); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, qsize_txq, CTLFLAG_RDTUN, &t4_qsize_txq, 0, + "Number of descriptors in each TX queue"); unsigned int t4_qsize_rxq = RX_IQ_QSIZE; -TUNABLE_INT("hw.cxgbe.qsize_rxq", &t4_qsize_rxq); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, qsize_rxq, CTLFLAG_RDTUN, &t4_qsize_rxq, 0, + "Number of descriptors in each RX queue"); /* * Interrupt types allowed (bits 0, 1, 2 = INTx, MSI, MSI-X respectively). */ int t4_intr_types = INTR_MSIX | INTR_MSI | INTR_INTX; -TUNABLE_INT("hw.cxgbe.interrupt_types", &t4_intr_types); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, interrupt_types, CTLFLAG_RDTUN, &t4_intr_types, + 0, "Interrupt types allowed (bit 0 = INTx, 1 = MSI, 2 = MSI-X)"); /* * Configuration file. All the _CF names here are special. @@ -394,7 +439,8 @@ TUNABLE_INT("hw.cxgbe.interrupt_types", &t4_intr_types #define UWIRE_CF "uwire" #define FPGA_CF "fpga" static char t4_cfg_file[32] = DEFAULT_CF; -TUNABLE_STR("hw.cxgbe.config_file", t4_cfg_file, sizeof(t4_cfg_file)); +SYSCTL_STRING(_hw_cxgbe, OID_AUTO, config_file, CTLFLAG_RDTUN, t4_cfg_file, + sizeof(t4_cfg_file), "Firmware configuration file"); /* * PAUSE settings (bit 0, 1, 2 = rx_pause, tx_pause, pause_autoneg respectively). @@ -406,7 +452,9 @@ TUNABLE_STR("hw.cxgbe.config_file", t4_cfg_file, sizeo * Otherwise rx_pause/tx_pause are applied forcibly. */ static int t4_pause_settings = PAUSE_RX | PAUSE_TX | PAUSE_AUTONEG; -TUNABLE_INT("hw.cxgbe.pause_settings", &t4_pause_settings); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, pause_settings, CTLFLAG_RDTUN, + &t4_pause_settings, 0, + "PAUSE settings (bit 0 = rx_pause, 1 = tx_pause, 2 = pause_autoneg)"); /* * Forward Error Correction settings (bit 0, 1 = RS, BASER respectively). @@ -414,7 +462,8 @@ TUNABLE_INT("hw.cxgbe.pause_settings", &t4_pause_setti * 0 to disable FEC. */ static int t4_fec = -1; -TUNABLE_INT("hw.cxgbe.fec", &t4_fec); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, fec, CTLFLAG_RDTUN, &t4_fec, 0, + "Forward Error Correction (bit 0 = RS, bit 1 = BASER_RS)"); /* * Link autonegotiation. @@ -423,28 +472,33 @@ TUNABLE_INT("hw.cxgbe.fec", &t4_fec); * 1 to enable. */ static int t4_autoneg = -1; -TUNABLE_INT("hw.cxgbe.autoneg", &t4_autoneg); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, autoneg, CTLFLAG_RDTUN, &t4_autoneg, 0, + "Link autonegotiation"); /* * Firmware auto-install by driver during attach (0, 1, 2 = prohibited, allowed, * encouraged respectively). */ static unsigned int t4_fw_install = 1; -TUNABLE_INT("hw.cxgbe.fw_install", &t4_fw_install); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, fw_install, CTLFLAG_RDTUN, &t4_fw_install, 0, + "Firmware auto-install (0 = prohibited, 1 = allowed, 2 = encouraged)"); /* * ASIC features that will be used. Disable the ones you don't want so that the * chip resources aren't wasted on features that will not be used. */ static int t4_nbmcaps_allowed = 0; -TUNABLE_INT("hw.cxgbe.nbmcaps_allowed", &t4_nbmcaps_allowed); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nbmcaps_allowed, CTLFLAG_RDTUN, + &t4_nbmcaps_allowed, 0, "Default NBM capabilities"); static int t4_linkcaps_allowed = 0; /* No DCBX, PPP, etc. by default */ -TUNABLE_INT("hw.cxgbe.linkcaps_allowed", &t4_linkcaps_allowed); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, linkcaps_allowed, CTLFLAG_RDTUN, + &t4_linkcaps_allowed, 0, "Default link capabilities"); static int t4_switchcaps_allowed = FW_CAPS_CONFIG_SWITCH_INGRESS | FW_CAPS_CONFIG_SWITCH_EGRESS; -TUNABLE_INT("hw.cxgbe.switchcaps_allowed", &t4_switchcaps_allowed); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, switchcaps_allowed, CTLFLAG_RDTUN, + &t4_switchcaps_allowed, 0, "Default switch capabilities"); #ifdef RATELIMIT static int t4_niccaps_allowed = FW_CAPS_CONFIG_NIC | @@ -453,28 +507,37 @@ static int t4_niccaps_allowed = FW_CAPS_CONFIG_NIC | static int t4_niccaps_allowed = FW_CAPS_CONFIG_NIC | FW_CAPS_CONFIG_NIC_HASHFILTER; #endif -TUNABLE_INT("hw.cxgbe.niccaps_allowed", &t4_niccaps_allowed); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, niccaps_allowed, CTLFLAG_RDTUN, + &t4_niccaps_allowed, 0, "Default NIC capabilities"); static int t4_toecaps_allowed = -1; -TUNABLE_INT("hw.cxgbe.toecaps_allowed", &t4_toecaps_allowed); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, toecaps_allowed, CTLFLAG_RDTUN, + &t4_toecaps_allowed, 0, "Default TCP offload capabilities"); static int t4_rdmacaps_allowed = -1; -TUNABLE_INT("hw.cxgbe.rdmacaps_allowed", &t4_rdmacaps_allowed); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, rdmacaps_allowed, CTLFLAG_RDTUN, + &t4_rdmacaps_allowed, 0, "Default RDMA capabilities"); static int t4_cryptocaps_allowed = -1; -TUNABLE_INT("hw.cxgbe.cryptocaps_allowed", &t4_cryptocaps_allowed); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, cryptocaps_allowed, CTLFLAG_RDTUN, + &t4_cryptocaps_allowed, 0, "Default crypto capabilities"); static int t4_iscsicaps_allowed = -1; -TUNABLE_INT("hw.cxgbe.iscsicaps_allowed", &t4_iscsicaps_allowed); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, iscsicaps_allowed, CTLFLAG_RDTUN, + &t4_iscsicaps_allowed, 0, "Default iSCSI capabilities"); static int t4_fcoecaps_allowed = 0; -TUNABLE_INT("hw.cxgbe.fcoecaps_allowed", &t4_fcoecaps_allowed); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, fcoecaps_allowed, CTLFLAG_RDTUN, + &t4_fcoecaps_allowed, 0, "Default FCoE capabilities"); static int t5_write_combine = 0; -TUNABLE_INT("hw.cxl.write_combine", &t5_write_combine); +SYSCTL_INT(_hw_cxl, OID_AUTO, write_combine, CTLFLAG_RDTUN, &t5_write_combine, + 0, "Use WC instead of UC for BAR2"); static int t4_num_vis = 1; -TUNABLE_INT("hw.cxgbe.num_vis", &t4_num_vis); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, num_vis, CTLFLAG_RDTUN, &t4_num_vis, 0, + "Number of VIs per port"); + /* * PCIe Relaxed Ordering. * -1: driver should figure out a good value. @@ -483,17 +546,22 @@ TUNABLE_INT("hw.cxgbe.num_vis", &t4_num_vis); * 2: leave RO alone. */ static int pcie_relaxed_ordering = -1; -TUNABLE_INT("hw.cxgbe.pcie_relaxed_ordering", &pcie_relaxed_ordering); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, pcie_relaxed_ordering, CTLFLAG_RDTUN, + &pcie_relaxed_ordering, 0, + "PCIe Relaxed Ordering: 0 = disable, 1 = enable, 2 = leave alone"); static int t4_panic_on_fatal_err = 0; -TUNABLE_INT("hw.cxgbe.panic_on_fatal_err", &t4_panic_on_fatal_err); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, panic_on_fatal_err, CTLFLAG_RDTUN, + &t4_panic_on_fatal_err, 0, "panic on fatal firmware errors"); #ifdef TCP_OFFLOAD /* * TOE tunables. */ static int t4_cop_managed_offloading = 0; -TUNABLE_INT("hw.cxgbe.cop_managed_offloading", &t4_cop_managed_offloading); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, cop_managed_offloading, CTLFLAG_RDTUN, + &t4_cop_managed_offloading, 0, + "COP (Connection Offload Policy) controls all TOE offload"); #endif /* Functions used by VIs to obtain unique MAC addresses for each VI. */ @@ -6197,7 +6265,7 @@ cxgbe_sysctls(struct port_info *pi) SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "pause_settings", CTLTYPE_STRING | CTLFLAG_RW, pi, 0, sysctl_pause_settings, "A", - "PAUSE settings (bit 0 = rx_pause, bit 1 = tx_pause)"); + "PAUSE settings (bit 0 = rx_pause, 1 = tx_pause, 2 = pause_autoneg)"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "fec", CTLTYPE_STRING | CTLFLAG_RW, pi, 0, sysctl_fec, "A", "Forward Error Correction (bit 0 = RS, bit 1 = BASER_RS)"); Modified: stable/12/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_netmap.c Wed Mar 6 22:56:49 2019 (r344857) +++ stable/12/sys/dev/cxgbe/t4_netmap.c Wed Mar 6 23:09:27 2019 (r344858) @@ -57,8 +57,6 @@ __FBSDID("$FreeBSD$"); extern int fl_pad; /* XXXNM */ -SYSCTL_NODE(_hw, OID_AUTO, cxgbe, CTLFLAG_RD, 0, "cxgbe netmap parameters"); - /* * 0 = normal netmap rx * 1 = black hole @@ -87,7 +85,9 @@ SYSCTL_INT(_hw_cxgbe, OID_AUTO, nm_holdoff_tmr_idx, CT * 1: no backpressure, drop packets for the congested queue immediately. */ static int nm_cong_drop = 1; -TUNABLE_INT("hw.cxgbe.nm_cong_drop", &nm_cong_drop); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nm_cong_drop, CTLFLAG_RDTUN, + &nm_cong_drop, 0, + "Congestion control for netmap rx queues (0 = backpressure, 1 = drop"); int starve_fl = 0; SYSCTL_INT(_hw_cxgbe, OID_AUTO, starve_fl, CTLFLAG_RWTUN, Modified: stable/12/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_sge.c Wed Mar 6 22:56:49 2019 (r344857) +++ stable/12/sys/dev/cxgbe/t4_sge.c Wed Mar 6 23:09:27 2019 (r344858) @@ -87,7 +87,8 @@ __FBSDID("$FreeBSD$"); * 0-7 are valid values. */ static int fl_pktshift = 0; -TUNABLE_INT("hw.cxgbe.fl_pktshift", &fl_pktshift); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, fl_pktshift, CTLFLAG_RDTUN, &fl_pktshift, 0, + "payload DMA offset in rx buffer (bytes)"); /* * Pad ethernet payload up to this boundary. @@ -96,7 +97,8 @@ TUNABLE_INT("hw.cxgbe.fl_pktshift", &fl_pktshift); * Any power of 2 from 32 to 4096 (both inclusive) is also a valid value. */ int fl_pad = -1; -TUNABLE_INT("hw.cxgbe.fl_pad", &fl_pad); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, fl_pad, CTLFLAG_RDTUN, &fl_pad, 0, + "payload pad boundary (bytes)"); /* * Status page length. @@ -104,7 +106,8 @@ TUNABLE_INT("hw.cxgbe.fl_pad", &fl_pad); * 64 or 128 are the only other valid values. */ static int spg_len = -1; -TUNABLE_INT("hw.cxgbe.spg_len", &spg_len); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, spg_len, CTLFLAG_RDTUN, &spg_len, 0, + "status page size (bytes)"); /* * Congestion drops. @@ -113,7 +116,8 @@ TUNABLE_INT("hw.cxgbe.spg_len", &spg_len); * 1: no backpressure, drop packets for the congested queue immediately. */ static int cong_drop = 0; -TUNABLE_INT("hw.cxgbe.cong_drop", &cong_drop); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, cong_drop, CTLFLAG_RDTUN, &cong_drop, 0, + "Congestion control for RX queues (0 = backpressure, 1 = drop"); /* * Deliver multiple frames in the same free list buffer if they fit. @@ -122,7 +126,8 @@ TUNABLE_INT("hw.cxgbe.cong_drop", &cong_drop); * 1: enable buffer packing. */ static int buffer_packing = -1; -TUNABLE_INT("hw.cxgbe.buffer_packing", &buffer_packing); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, buffer_packing, CTLFLAG_RDTUN, &buffer_packing, + 0, "Enable buffer packing"); /* * Start next frame in a packed buffer at this boundary. @@ -131,7 +136,8 @@ TUNABLE_INT("hw.cxgbe.buffer_packing", &buffer_packing * T5: 16, or a power of 2 from 64 to 4096 (both inclusive) is a valid value. */ static int fl_pack = -1; -TUNABLE_INT("hw.cxgbe.fl_pack", &fl_pack); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, fl_pack, CTLFLAG_RDTUN, &fl_pack, 0, + "payload pack boundary (bytes)"); /* * Allow the driver to create mbuf(s) in a cluster allocated for rx. @@ -139,20 +145,24 @@ TUNABLE_INT("hw.cxgbe.fl_pack", &fl_pack); * 1: ok to create mbuf(s) within a cluster if there is room. */ static int allow_mbufs_in_cluster = 1; -TUNABLE_INT("hw.cxgbe.allow_mbufs_in_cluster", &allow_mbufs_in_cluster); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, allow_mbufs_in_cluster, CTLFLAG_RDTUN, + &allow_mbufs_in_cluster, 0, + "Allow driver to create mbufs within a rx cluster"); /* * Largest rx cluster size that the driver is allowed to allocate. */ static int largest_rx_cluster = MJUM16BYTES; -TUNABLE_INT("hw.cxgbe.largest_rx_cluster", &largest_rx_cluster); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, largest_rx_cluster, CTLFLAG_RDTUN, + &largest_rx_cluster, 0, "Largest rx cluster (bytes)"); /* * Size of cluster allocation that's most likely to succeed. The driver will * fall back to this size if it fails to allocate clusters larger than this. */ static int safest_rx_cluster = PAGE_SIZE; -TUNABLE_INT("hw.cxgbe.safest_rx_cluster", &safest_rx_cluster); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, safest_rx_cluster, CTLFLAG_RDTUN, + &safest_rx_cluster, 0, "Safe rx cluster (bytes)"); #ifdef RATELIMIT /* @@ -165,10 +175,12 @@ TUNABLE_INT("hw.cxgbe.safest_rx_cluster", &safest_rx_c * 3: 1us */ static int tsclk = -1; -TUNABLE_INT("hw.cxgbe.tsclk", &tsclk); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, tsclk, CTLFLAG_RDTUN, &tsclk, 0, + "Control TCP timestamp rewriting when using pacing"); static int eo_max_backlog = 1024 * 1024; -TUNABLE_INT("hw.cxgbe.eo_max_backlog", &eo_max_backlog); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, eo_max_backlog, CTLFLAG_RDTUN, &eo_max_backlog, + 0, "Maximum backlog of ratelimited data per flow"); #endif /* @@ -176,19 +188,22 @@ TUNABLE_INT("hw.cxgbe.eo_max_backlog", &eo_max_backlog * 1 and 3-17 (both inclusive) are legal values. */ static int tscale = 1; -TUNABLE_INT("hw.cxgbe.tscale", &tscale); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, tscale, CTLFLAG_RDTUN, &tscale, 0, + "Interrupt holdoff timer scale on T6+"); /* * Number of LRO entries in the lro_ctrl structure per rx queue. */ static int lro_entries = TCP_LRO_ENTRIES; -TUNABLE_INT("hw.cxgbe.lro_entries", &lro_entries); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, lro_entries, CTLFLAG_RDTUN, &lro_entries, 0, + "Number of LRO entries per RX queue"); /* * This enables presorting of frames before they're fed into tcp_lro_rx. */ static int lro_mbufs = 0; -TUNABLE_INT("hw.cxgbe.lro_mbufs", &lro_mbufs); +SYSCTL_INT(_hw_cxgbe, OID_AUTO, lro_mbufs, CTLFLAG_RDTUN, &lro_mbufs, 0, + "Enable presorting of LRO frames"); struct txpkts { u_int wr_type; /* type 0 or type 1 */ From owner-svn-src-stable-12@freebsd.org Wed Mar 6 23:54:58 2019 Return-Path: Delivered-To: svn-src-stable-12@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 B9CF0152BA56; Wed, 6 Mar 2019 23:54:57 +0000 (UTC) (envelope-from mckusick@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 5DCE5775AA; Wed, 6 Mar 2019 23:54:57 +0000 (UTC) (envelope-from mckusick@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 4DE4AAF1F; Wed, 6 Mar 2019 23:54:57 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x26NsvMT086014; Wed, 6 Mar 2019 23:54:57 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x26NstKN086003; Wed, 6 Mar 2019 23:54:55 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201903062354.x26NstKN086003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Wed, 6 Mar 2019 23:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344860 - in stable/12: sbin/fsck_ffs sbin/fsdb sys/ufs/ffs X-SVN-Group: stable-12 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in stable/12: sbin/fsck_ffs sbin/fsdb sys/ufs/ffs X-SVN-Commit-Revision: 344860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5DCE5775AA 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)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Mar 2019 23:54:58 -0000 Author: mckusick Date: Wed Mar 6 23:54:55 2019 New Revision: 344860 URL: https://svnweb.freebsd.org/changeset/base/344860 Log: MFC of 344552 and 344732 Have fsck_ffs adjust size for files with hole at end Tighten last lbn calculation Sponsored by: Netflix Modified: stable/12/sbin/fsck_ffs/fsck.h stable/12/sbin/fsck_ffs/globs.c stable/12/sbin/fsck_ffs/inode.c stable/12/sbin/fsck_ffs/pass1.c stable/12/sbin/fsck_ffs/setup.c stable/12/sbin/fsdb/fsdb.c stable/12/sys/ufs/ffs/ffs_alloc.c stable/12/sys/ufs/ffs/fs.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/fsck_ffs/fsck.h ============================================================================== --- stable/12/sbin/fsck_ffs/fsck.h Wed Mar 6 23:31:42 2019 (r344859) +++ stable/12/sbin/fsck_ffs/fsck.h Wed Mar 6 23:54:55 2019 (r344860) @@ -232,6 +232,7 @@ struct inodesc { ufs_lbn_t id_lbn; /* logical block number of current block */ ufs2_daddr_t id_blkno; /* current block number being examined */ int id_numfrags; /* number of frags contained in block */ + ufs_lbn_t id_lballoc; /* pass1: last LBN that is allocated */ off_t id_filesize; /* for DATA nodes, the size of the directory */ ufs2_daddr_t id_entryno;/* for DATA nodes, current entry number */ int id_loc; /* for DATA nodes, current location in dir */ @@ -291,6 +292,7 @@ extern long countdirs; /* number of directories we ac #define MIBSIZE 3 /* size of fsck sysctl MIBs */ extern int adjrefcnt[MIBSIZE]; /* MIB command to adjust inode reference cnt */ extern int adjblkcnt[MIBSIZE]; /* MIB command to adjust inode block count */ +extern int setsize[MIBSIZE]; /* MIB command to set inode size */ extern int adjndir[MIBSIZE]; /* MIB command to adjust number of directories */ extern int adjnbfree[MIBSIZE]; /* MIB command to adjust number of free blocks */ extern int adjnifree[MIBSIZE]; /* MIB command to adjust number of free inodes */ Modified: stable/12/sbin/fsck_ffs/globs.c ============================================================================== --- stable/12/sbin/fsck_ffs/globs.c Wed Mar 6 23:31:42 2019 (r344859) +++ stable/12/sbin/fsck_ffs/globs.c Wed Mar 6 23:54:55 2019 (r344860) @@ -63,6 +63,7 @@ unsigned long numdirs, listmax; long countdirs; /* number of directories we actually found */ int adjrefcnt[MIBSIZE]; /* MIB command to adjust inode reference cnt */ int adjblkcnt[MIBSIZE]; /* MIB command to adjust inode block count */ +int setsize[MIBSIZE]; /* MIB command to set inode size */ int adjndir[MIBSIZE]; /* MIB command to adjust number of directories */ int adjnbfree[MIBSIZE]; /* MIB command to adjust number of free blocks */ int adjnifree[MIBSIZE]; /* MIB command to adjust number of free inodes */ @@ -131,6 +132,7 @@ fsckinit(void) countdirs = 0; bzero(adjrefcnt, sizeof(int) * MIBSIZE); bzero(adjblkcnt, sizeof(int) * MIBSIZE); + bzero(setsize, sizeof(int) * MIBSIZE); bzero(adjndir, sizeof(int) * MIBSIZE); bzero(adjnbfree, sizeof(int) * MIBSIZE); bzero(adjnifree, sizeof(int) * MIBSIZE); Modified: stable/12/sbin/fsck_ffs/inode.c ============================================================================== --- stable/12/sbin/fsck_ffs/inode.c Wed Mar 6 23:31:42 2019 (r344859) +++ stable/12/sbin/fsck_ffs/inode.c Wed Mar 6 23:54:55 2019 (r344860) @@ -126,9 +126,9 @@ ckinode(union dinode *dp, struct inodesc *idesc) ret = iblock(idesc, i + 1, remsize, BT_LEVEL1 + i); if (ret & STOP) return (ret); - } else { + } else if (remsize > 0) { idesc->id_lbn += sizepb / sblock.fs_bsize; - if (idesc->id_type == DATA && remsize > 0) { + if (idesc->id_type == DATA) { /* An empty block in a directory XXX */ getpathname(pathbuf, idesc->id_number, idesc->id_number); Modified: stable/12/sbin/fsck_ffs/pass1.c ============================================================================== --- stable/12/sbin/fsck_ffs/pass1.c Wed Mar 6 23:31:42 2019 (r344859) +++ stable/12/sbin/fsck_ffs/pass1.c Wed Mar 6 23:54:55 2019 (r344860) @@ -247,6 +247,7 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r off_t kernmaxfilesize; ufs2_daddr_t ndb; mode_t mode; + uintmax_t fixsize; int j, ret, offset; if ((dp = getnextinode(inumber, rebuildcg)) == NULL) @@ -377,6 +378,7 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r idesc->id_type = SNAP; else idesc->id_type = ADDR; + idesc->id_lballoc = -1; (void)ckinode(dp, idesc); if (sblock.fs_magic == FS_UFS2_MAGIC && dp->dp2.di_extsize > 0) { idesc->id_type = ADDR; @@ -422,6 +424,46 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r rwerror("ADJUST INODE BLOCK COUNT", cmd.value); } } + /* + * Soft updates will always ensure that the file size is correct + * for files that contain only direct block pointers. However + * soft updates does not roll back sizes for files with indirect + * blocks that it has set to unallocated because their contents + * have not yet been written to disk. Hence, the file can appear + * to have a hole at its end because the block pointer has been + * rolled back to zero. Thus, id_lballoc tracks the last allocated + * block in the file. Here, for files that extend into indirect + * blocks, we check for a size past the last allocated block of + * the file and if that is found, shorten the file to reference + * the last allocated block to avoid having it reference a hole + * at its end. + */ + if (DIP(dp, di_size) > UFS_NDADDR * sblock.fs_bsize && + idesc->id_lballoc < lblkno(&sblock, DIP(dp, di_size) - 1)) { + fixsize = lblktosize(&sblock, idesc->id_lballoc + 1); + pwarn("INODE %lu: FILE SIZE %ju BEYOND END OF ALLOCATED FILE, " + "SIZE SHOULD BE %ju", (u_long)inumber, + (uintmax_t)DIP(dp, di_size), fixsize); + if (preen) + printf(" (ADJUSTED)\n"); + else if (reply("ADJUST") == 0) + return (1); + if (bkgrdflag == 0) { + dp = ginode(inumber); + DIP_SET(dp, di_size, fixsize); + inodirty(dp); + } else { + cmd.value = idesc->id_number; + cmd.size = fixsize; + if (debug) + printf("setsize ino %ju size set to %ju\n", + (uintmax_t)cmd.value, (uintmax_t)cmd.size); + if (sysctl(setsize, MIBSIZE, 0, 0, + &cmd, sizeof cmd) == -1) + rwerror("SET INODE SIZE", cmd.value); + } + + } return (1); unknown: pfatal("UNKNOWN FILE TYPE I=%lu", (u_long)inumber); @@ -523,5 +565,7 @@ pass1check(struct inodesc *idesc) */ idesc->id_entryno++; } + if (idesc->id_lballoc == -1 || idesc->id_lballoc < idesc->id_lbn) + idesc->id_lballoc = idesc->id_lbn; return (res); } Modified: stable/12/sbin/fsck_ffs/setup.c ============================================================================== --- stable/12/sbin/fsck_ffs/setup.c Wed Mar 6 23:31:42 2019 (r344859) +++ stable/12/sbin/fsck_ffs/setup.c Wed Mar 6 23:54:55 2019 (r344860) @@ -140,6 +140,7 @@ setup(char *dev) size = MIBSIZE; if (sysctlnametomib("vfs.ffs.adjrefcnt", adjrefcnt, &size) < 0|| sysctlnametomib("vfs.ffs.adjblkcnt", adjblkcnt, &size) < 0|| + sysctlnametomib("vfs.ffs.setsize", setsize, &size) < 0 || sysctlnametomib("vfs.ffs.freefiles", freefiles, &size) < 0|| sysctlnametomib("vfs.ffs.freedirs", freedirs, &size) < 0 || sysctlnametomib("vfs.ffs.freeblks", freeblks, &size) < 0) { Modified: stable/12/sbin/fsdb/fsdb.c ============================================================================== --- stable/12/sbin/fsdb/fsdb.c Wed Mar 6 23:31:42 2019 (r344859) +++ stable/12/sbin/fsdb/fsdb.c Wed Mar 6 23:54:55 2019 (r344860) @@ -157,6 +157,7 @@ CMDFUNC(chctime); /* Change ctime */ CMDFUNC(chatime); /* Change atime */ CMDFUNC(chinum); /* Change inode # of dirent */ CMDFUNC(chname); /* Change dirname of dirent */ +CMDFUNC(chsize); /* Change size */ struct cmdtable cmds[] = { { "help", "Print out help", 1, 1, FL_RO, helpfn }, @@ -186,6 +187,7 @@ struct cmdtable cmds[] = { { "chgrp", "Change group of current inode to GROUP", 2, 2, FL_WR, chgroup }, { "chflags", "Change flags of current inode to FLAGS", 2, 2, FL_WR, chaflags }, { "chgen", "Change generation number of current inode to GEN", 2, 2, FL_WR, chgen }, + { "chsize", "Change size of current inode to SIZE", 2, 2, FL_WR, chsize }, { "btime", "Change btime of current inode to BTIME", 2, 2, FL_WR, chbtime }, { "mtime", "Change mtime of current inode to MTIME", 2, 2, FL_WR, chmtime }, { "ctime", "Change ctime of current inode to CTIME", 2, 2, FL_WR, chctime }, @@ -1013,6 +1015,31 @@ CMDFUNCSTART(chgen) } DIP_SET(curinode, di_gen, gen); inodirty(); + printactive(0); + return rval; +} + +CMDFUNCSTART(chsize) +{ + int rval = 1; + off_t size; + char *cp; + + if (!checkactive()) + return 1; + + size = strtoll(argv[1], &cp, 0); + if (cp == argv[1] || *cp != '\0') { + warnx("bad size `%s'", argv[1]); + return 1; + } + + if (size < 0) { + warnx("size set to negative (%jd)\n", (intmax_t)size); + return(1); + } + DIP_SET(curinode, di_size, size); + inodirty(curinode); printactive(0); return rval; } Modified: stable/12/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- stable/12/sys/ufs/ffs/ffs_alloc.c Wed Mar 6 23:31:42 2019 (r344859) +++ stable/12/sys/ufs/ffs/ffs_alloc.c Wed Mar 6 23:54:55 2019 (r344860) @@ -3020,6 +3020,8 @@ ffs_fserr(fs, inum, cp) * the count to zero will cause the inode to be freed. * adjblkcnt(inode, amt) - adjust the number of blocks used by the * inode by the specified amount. + * adjsize(inode, size) - set the size of the inode to the + * specified size. * adjndir, adjbfree, adjifree, adjffree, adjnumclusters(amt) - * adjust the superblock summary. * freedirs(inode, count) - directory inodes [inode..inode + count - 1] @@ -3061,6 +3063,9 @@ SYSCTL_PROC(_vfs_ffs, FFS_ADJ_REFCNT, adjrefcnt, CTLFL static SYSCTL_NODE(_vfs_ffs, FFS_ADJ_BLKCNT, adjblkcnt, CTLFLAG_WR, sysctl_ffs_fsck, "Adjust Inode Used Blocks Count"); +static SYSCTL_NODE(_vfs_ffs, FFS_SET_SIZE, setsize, CTLFLAG_WR, + sysctl_ffs_fsck, "Set the inode size"); + static SYSCTL_NODE(_vfs_ffs, FFS_ADJ_NDIR, adjndir, CTLFLAG_WR, sysctl_ffs_fsck, "Adjust number of directories"); @@ -3208,6 +3213,23 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) break; ip = VTOI(vp); DIP_SET(ip, i_blocks, DIP(ip, i_blocks) + cmd.size); + ip->i_flag |= IN_CHANGE | IN_MODIFIED; + error = ffs_update(vp, 1); + vput(vp); + break; + + case FFS_SET_SIZE: +#ifdef DEBUG + if (fsckcmds) { + printf("%s: set inode %jd size to %jd\n", + mp->mnt_stat.f_mntonname, (intmax_t)cmd.value, + (intmax_t)cmd.size); + } +#endif /* DEBUG */ + if ((error = ffs_vget(mp, (ino_t)cmd.value, LK_EXCLUSIVE, &vp))) + break; + ip = VTOI(vp); + DIP_SET(ip, i_size, cmd.size); ip->i_flag |= IN_CHANGE | IN_MODIFIED; error = ffs_update(vp, 1); vput(vp); Modified: stable/12/sys/ufs/ffs/fs.h ============================================================================== --- stable/12/sys/ufs/ffs/fs.h Wed Mar 6 23:31:42 2019 (r344859) +++ stable/12/sys/ufs/ffs/fs.h Wed Mar 6 23:54:55 2019 (r344860) @@ -221,7 +221,8 @@ #define FFS_UNLINK 14 /* remove a name in the filesystem */ #define FFS_SET_INODE 15 /* update an on-disk inode */ #define FFS_SET_BUFOUTPUT 16 /* set buffered writing on descriptor */ -#define FFS_MAXID 16 /* number of valid ffs ids */ +#define FFS_SET_SIZE 17 /* set inode size */ +#define FFS_MAXID 17 /* number of valid ffs ids */ /* * Command structure passed in to the filesystem to adjust filesystem values. From owner-svn-src-stable-12@freebsd.org Thu Mar 7 00:02:26 2019 Return-Path: Delivered-To: svn-src-stable-12@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 94C35152C031; Thu, 7 Mar 2019 00:02:26 +0000 (UTC) (envelope-from mckusick@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 3323877DE6; Thu, 7 Mar 2019 00:02:26 +0000 (UTC) (envelope-from mckusick@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 22BEEB109; Thu, 7 Mar 2019 00:02:26 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2702QGb091211; Thu, 7 Mar 2019 00:02:26 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2702QmT091210; Thu, 7 Mar 2019 00:02:26 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201903070002.x2702QmT091210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 7 Mar 2019 00:02:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344863 - stable/12/sbin/tunefs X-SVN-Group: stable-12 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/12/sbin/tunefs X-SVN-Commit-Revision: 344863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3323877DE6 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2019 00:02:26 -0000 Author: mckusick Date: Thu Mar 7 00:02:25 2019 New Revision: 344863 URL: https://svnweb.freebsd.org/changeset/base/344863 Log: MFC of 344731 Roundup tunefs -S logsize to filesystem block size Sponsored by: Netflix Modified: stable/12/sbin/tunefs/tunefs.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/tunefs/tunefs.c ============================================================================== --- stable/12/sbin/tunefs/tunefs.c Thu Mar 7 00:01:28 2019 (r344862) +++ stable/12/sbin/tunefs/tunefs.c Thu Mar 7 00:02:25 2019 (r344863) @@ -989,9 +989,9 @@ journal_alloc(int64_t size) if (size / sblock.fs_fsize > sblock.fs_fpg) size = sblock.fs_fpg * sblock.fs_fsize; size = MAX(SUJ_MIN, size); - /* fsck does not support fragments in journal files. */ - size = roundup(size, sblock.fs_bsize); } + /* fsck does not support fragments in journal files. */ + size = roundup(size, sblock.fs_bsize); resid = blocks = size / sblock.fs_bsize; if (sblock.fs_cstotal.cs_nbfree < blocks) { warn("Insufficient free space for %jd byte journal", size); From owner-svn-src-stable-12@freebsd.org Thu Mar 7 13:10:35 2019 Return-Path: Delivered-To: svn-src-stable-12@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 126D5152EBE9; Thu, 7 Mar 2019 13:10:35 +0000 (UTC) (envelope-from dab@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 A731784402; Thu, 7 Mar 2019 13:10:34 +0000 (UTC) (envelope-from dab@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 9C5201C0F4; Thu, 7 Mar 2019 13:10:34 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x27DAYN0007819; Thu, 7 Mar 2019 13:10:34 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x27DAY87007817; Thu, 7 Mar 2019 13:10:34 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201903071310.x27DAY87007817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Thu, 7 Mar 2019 13:10:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344880 - stable/12/usr.sbin/newsyslog X-SVN-Group: stable-12 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/12/usr.sbin/newsyslog X-SVN-Commit-Revision: 344880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A731784402 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2019 13:10:35 -0000 Author: dab Date: Thu Mar 7 13:10:34 2019 New Revision: 344880 URL: https://svnweb.freebsd.org/changeset/base/344880 Log: MFC r344470: Fix several Coverity-detected issues in newsyslog. - CID 1394815, CID 1305673: Dereference before null check - memory was allocated and the allocation checked for NULL with a call to errx() if it failed. Code below that was guaranteed that the pointer was non-NULL, but there was another check for NULL at the exit of the function (after the memory had already been referenced). Eliminate the useless NULL check. - CID 1007452: Resource leak - Storage intended to be allocated and returned to the caller was never freed. This was the result of a regression in the function signature introduced in r208648 (2010) (thanks for that find, @cem!). Fixed by altering the function signature and passing the allocated memory to the caller as intended. This also fixes PR158794. - CID 1008620: Logically dead code in newsyslog.c - This was a direct result of CID 1007452. Since the memory allocated as described there was not returned to the caller, a subsequent check for the memory having been allocated was dead code. Returning the memory re-animates the code that is the subject of this CID. - CID 1006131: Unused value - in parsing a configuration file, a pointer to the end of the last field was saved, but not used after that. Rewrite to use the pointer value. This could have been fixed by avoiding the assignment altogether, but this solutions more closely follows the pattern used in the preceding code. PR: 158794 Reported by: Coverity, Ken-ichi EZURA (PR158794) Sponsored by: Dell EMC Isilon Modified: stable/12/usr.sbin/newsyslog/newsyslog.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/12/usr.sbin/newsyslog/newsyslog.c Thu Mar 7 13:07:10 2019 (r344879) +++ stable/12/usr.sbin/newsyslog/newsyslog.c Thu Mar 7 13:10:34 2019 (r344880) @@ -253,7 +253,7 @@ static const char *path_syslogpid = _PATH_SYSLOGPID; static struct cflist *get_worklist(char **files); static void parse_file(FILE *cf, struct cflist *work_p, struct cflist *glob_p, - struct conf_entry *defconf_p, struct ilist *inclist); + struct conf_entry **defconf, struct ilist *inclist); static void add_to_queue(const char *fname, struct ilist *inclist); static char *sob(char *p); static char *son(char *p); @@ -841,7 +841,7 @@ get_worklist(char **files) if (verbose) printf("Processing %s\n", inc->file); - parse_file(f, filelist, globlist, defconf, &inclist); + parse_file(f, filelist, globlist, &defconf, &inclist); (void) fclose(f); } @@ -858,7 +858,6 @@ get_worklist(char **files) if (defconf != NULL) free_entry(defconf); return (filelist); - /* NOTREACHED */ } /* @@ -915,7 +914,7 @@ get_worklist(char **files) * for a "glob" entry which does match. */ gmatch = 0; - if (verbose > 2 && globlist != NULL) + if (verbose > 2) printf("\t+ Checking globs for %s\n", *given); STAILQ_FOREACH(ent, globlist, cf_nextp) { fnres = fnmatch(ent->log, *given, FNM_PATHNAME); @@ -1046,7 +1045,7 @@ expand_globs(struct cflist *work_p, struct cflist *glo */ static void parse_file(FILE *cf, struct cflist *work_p, struct cflist *glob_p, - struct conf_entry *defconf_p, struct ilist *inclist) + struct conf_entry **defconf_p, struct ilist *inclist) { char line[BUFSIZ], *parse, *q; char *cp, *errline, *group; @@ -1137,12 +1136,12 @@ parse_file(FILE *cf, struct cflist *work_p, struct cfl working = init_entry(q, NULL); if (strcasecmp(DEFAULT_MARKER, q) == 0) { special = 1; - if (defconf_p != NULL) { + if (*defconf_p != NULL) { warnx("Ignoring duplicate entry for %s!", q); free_entry(working); continue; } - defconf_p = working; + *defconf_p = working; } q = parse = missing_field(sob(parse + 1), errline); @@ -1357,7 +1356,8 @@ no_trimat: q = NULL; else { q = parse = sob(parse + 1); /* Optional field */ - *(parse = son(parse)) = '\0'; + parse = son(parse); + *parse = '\0'; } working->sig = SIGHUP; @@ -2010,7 +2010,6 @@ do_zipwork(struct zipwork_entry *zwork) const char **args, *pgm_name, *pgm_path; char *zresult; - command = NULL; assert(zwork != NULL); assert(zwork->zw_conf != NULL); assert(zwork->zw_conf->compress > COMPRESS_NONE); @@ -2114,8 +2113,7 @@ do_zipwork(struct zipwork_entry *zwork) change_attrs(zresult, zwork->zw_conf); out: - if (command != NULL) - sbuf_delete(command); + sbuf_delete(command); free(args); free(zresult); } From owner-svn-src-stable-12@freebsd.org Thu Mar 7 13:50:19 2019 Return-Path: Delivered-To: svn-src-stable-12@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 DC2001530021; Thu, 7 Mar 2019 13:50:18 +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 8AC4B868BE; Thu, 7 Mar 2019 13:50:18 +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 636C41C7CE; Thu, 7 Mar 2019 13:50:18 +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 x27DoISp030639; Thu, 7 Mar 2019 13:50:18 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x27DlvTr030370; Thu, 7 Mar 2019 13:47:57 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201903071347.x27DlvTr030370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 7 Mar 2019 13:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344884 - in stable: 11/contrib/ntp 11/contrib/ntp/adjtimed 11/contrib/ntp/clockstuff 11/contrib/ntp/include 11/contrib/ntp/include/isc 11/contrib/ntp/kernel 11/contrib/ntp/kernel/sys 1... X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ntp 11/contrib/ntp/adjtimed 11/contrib/ntp/clockstuff 11/contrib/ntp/include 11/contrib/ntp/include/isc 11/contrib/ntp/kernel 11/contrib/ntp/kernel/sys 11/contrib/ntp/libntp 11/c... X-SVN-Commit-Revision: 344884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8AC4B868BE 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)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2019 13:50:19 -0000 Author: cy Date: Thu Mar 7 13:45:36 2019 New Revision: 344884 URL: https://svnweb.freebsd.org/changeset/base/344884 Log: MFC r344883: (MFV r344878:) 4.2.8p12 --> 4.2.8p13 Security: CVE-2019-8936 VuXML: c2576e14-36e2-11e9-9eda-206a8a720317 Obtained from: nwtime.org Added: stable/12/contrib/ntp/libntp/xsbprintf.c - copied unchanged from r344883, head/contrib/ntp/libntp/xsbprintf.c Modified: stable/12/contrib/ntp/COPYRIGHT stable/12/contrib/ntp/ChangeLog stable/12/contrib/ntp/CommitLog stable/12/contrib/ntp/Makefile.in stable/12/contrib/ntp/NEWS stable/12/contrib/ntp/aclocal.m4 stable/12/contrib/ntp/adjtimed/Makefile.in stable/12/contrib/ntp/build stable/12/contrib/ntp/clockstuff/Makefile.in stable/12/contrib/ntp/config.h.in stable/12/contrib/ntp/configure stable/12/contrib/ntp/configure.ac stable/12/contrib/ntp/include/Makefile.in stable/12/contrib/ntp/include/isc/Makefile.in stable/12/contrib/ntp/include/ntp_calendar.h stable/12/contrib/ntp/include/ntp_stdlib.h stable/12/contrib/ntp/include/ntpd.h stable/12/contrib/ntp/include/parse.h stable/12/contrib/ntp/kernel/Makefile.in stable/12/contrib/ntp/kernel/sys/Makefile.in stable/12/contrib/ntp/libntp/Makefile.am stable/12/contrib/ntp/libntp/Makefile.in stable/12/contrib/ntp/libntp/authreadkeys.c stable/12/contrib/ntp/libntp/calyearstart.c stable/12/contrib/ntp/libntp/ntp_calendar.c stable/12/contrib/ntp/libntp/work_fork.c stable/12/contrib/ntp/libparse/Makefile.in stable/12/contrib/ntp/libparse/clk_trimtsip.c stable/12/contrib/ntp/libparse/gpstolfp.c stable/12/contrib/ntp/ntpd/Makefile.in stable/12/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/12/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/12/contrib/ntp/ntpd/invoke-ntpd.texi stable/12/contrib/ntp/ntpd/ntp.conf.5man stable/12/contrib/ntp/ntpd/ntp.conf.5mdoc stable/12/contrib/ntp/ntpd/ntp.conf.html stable/12/contrib/ntp/ntpd/ntp.conf.man.in stable/12/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/12/contrib/ntp/ntpd/ntp.keys.5man stable/12/contrib/ntp/ntpd/ntp.keys.5mdoc stable/12/contrib/ntp/ntpd/ntp.keys.html stable/12/contrib/ntp/ntpd/ntp.keys.man.in stable/12/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/12/contrib/ntp/ntpd/ntp_config.c stable/12/contrib/ntp/ntpd/ntp_control.c stable/12/contrib/ntp/ntpd/ntp_crypto.c stable/12/contrib/ntp/ntpd/ntp_loopfilter.c stable/12/contrib/ntp/ntpd/ntp_proto.c stable/12/contrib/ntp/ntpd/ntp_request.c stable/12/contrib/ntp/ntpd/ntp_timer.c stable/12/contrib/ntp/ntpd/ntpd-opts.c stable/12/contrib/ntp/ntpd/ntpd-opts.h stable/12/contrib/ntp/ntpd/ntpd.1ntpdman stable/12/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/12/contrib/ntp/ntpd/ntpd.c stable/12/contrib/ntp/ntpd/ntpd.html stable/12/contrib/ntp/ntpd/ntpd.man.in stable/12/contrib/ntp/ntpd/ntpd.mdoc.in stable/12/contrib/ntp/ntpd/refclock_bancomm.c stable/12/contrib/ntp/ntpd/refclock_jupiter.c stable/12/contrib/ntp/ntpd/refclock_parse.c stable/12/contrib/ntp/ntpdate/Makefile.in stable/12/contrib/ntp/ntpdate/ntpdate.c stable/12/contrib/ntp/ntpdc/Makefile.in stable/12/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/12/contrib/ntp/ntpdc/nl.pl stable/12/contrib/ntp/ntpdc/ntpdc-opts.c stable/12/contrib/ntp/ntpdc/ntpdc-opts.h stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/12/contrib/ntp/ntpdc/ntpdc.html stable/12/contrib/ntp/ntpdc/ntpdc.man.in stable/12/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/12/contrib/ntp/ntpdc/ntpdc_ops.c stable/12/contrib/ntp/ntpq/Makefile.in stable/12/contrib/ntp/ntpq/invoke-ntpq.texi stable/12/contrib/ntp/ntpq/ntpq-opts.c stable/12/contrib/ntp/ntpq/ntpq-opts.h stable/12/contrib/ntp/ntpq/ntpq.1ntpqman stable/12/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/12/contrib/ntp/ntpq/ntpq.html stable/12/contrib/ntp/ntpq/ntpq.man.in stable/12/contrib/ntp/ntpq/ntpq.mdoc.in stable/12/contrib/ntp/ntpsnmpd/Makefile.in stable/12/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/12/contrib/ntp/packageinfo.sh stable/12/contrib/ntp/parseutil/Makefile.in stable/12/contrib/ntp/scripts/Makefile.in stable/12/contrib/ntp/scripts/build/Makefile.in stable/12/contrib/ntp/scripts/build/check--help stable/12/contrib/ntp/scripts/calc_tickadj/Makefile.in stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/12/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/12/contrib/ntp/scripts/invoke-plot_summary.texi stable/12/contrib/ntp/scripts/invoke-summary.texi stable/12/contrib/ntp/scripts/lib/Makefile.in stable/12/contrib/ntp/scripts/ntp-wait/Makefile.in stable/12/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/12/contrib/ntp/scripts/ntpsweep/Makefile.in stable/12/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/12/contrib/ntp/scripts/ntptrace/Makefile.in stable/12/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/12/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/12/contrib/ntp/scripts/ntptrace/ntptrace.html stable/12/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/12/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/12/contrib/ntp/scripts/plot_summary-opts stable/12/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/12/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/12/contrib/ntp/scripts/plot_summary.html stable/12/contrib/ntp/scripts/plot_summary.man.in stable/12/contrib/ntp/scripts/plot_summary.mdoc.in stable/12/contrib/ntp/scripts/summary-opts stable/12/contrib/ntp/scripts/summary.1summaryman stable/12/contrib/ntp/scripts/summary.1summarymdoc stable/12/contrib/ntp/scripts/summary.html stable/12/contrib/ntp/scripts/summary.man.in stable/12/contrib/ntp/scripts/summary.mdoc.in stable/12/contrib/ntp/scripts/update-leap/Makefile.in stable/12/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/12/contrib/ntp/scripts/update-leap/update-leap-opts stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/12/contrib/ntp/scripts/update-leap/update-leap.html stable/12/contrib/ntp/scripts/update-leap/update-leap.man.in stable/12/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/12/contrib/ntp/sntp/COPYRIGHT stable/12/contrib/ntp/sntp/Makefile.in stable/12/contrib/ntp/sntp/aclocal.m4 stable/12/contrib/ntp/sntp/config.h.in stable/12/contrib/ntp/sntp/configure stable/12/contrib/ntp/sntp/include/Makefile.in stable/12/contrib/ntp/sntp/include/version.def stable/12/contrib/ntp/sntp/include/version.texi stable/12/contrib/ntp/sntp/invoke-sntp.texi stable/12/contrib/ntp/sntp/libevent/Makefile.in stable/12/contrib/ntp/sntp/libevent/aclocal.m4 stable/12/contrib/ntp/sntp/libevent/build-aux/ar-lib stable/12/contrib/ntp/sntp/libevent/build-aux/compile stable/12/contrib/ntp/sntp/libevent/build-aux/config.guess stable/12/contrib/ntp/sntp/libevent/build-aux/config.sub stable/12/contrib/ntp/sntp/libevent/build-aux/depcomp stable/12/contrib/ntp/sntp/libevent/build-aux/install-sh stable/12/contrib/ntp/sntp/libevent/build-aux/missing stable/12/contrib/ntp/sntp/libevent/build-aux/test-driver stable/12/contrib/ntp/sntp/libevent/build-aux/ylwrap stable/12/contrib/ntp/sntp/libevent/config.h.in stable/12/contrib/ntp/sntp/libevent/configure stable/12/contrib/ntp/sntp/libevent/evconfig-private.h stable/12/contrib/ntp/sntp/libevent/test/regress.gen.c stable/12/contrib/ntp/sntp/libevent/test/regress.gen.h stable/12/contrib/ntp/sntp/libopts/Makefile.in stable/12/contrib/ntp/sntp/libopts/autoopts/options.h stable/12/contrib/ntp/sntp/libopts/genshell.h stable/12/contrib/ntp/sntp/m4/ntp_libntp.m4 stable/12/contrib/ntp/sntp/m4/version.m4 stable/12/contrib/ntp/sntp/main.c stable/12/contrib/ntp/sntp/networking.c stable/12/contrib/ntp/sntp/scm-rev stable/12/contrib/ntp/sntp/scripts/Makefile.in stable/12/contrib/ntp/sntp/sntp-opts.c stable/12/contrib/ntp/sntp/sntp-opts.h stable/12/contrib/ntp/sntp/sntp.1sntpman stable/12/contrib/ntp/sntp/sntp.1sntpmdoc stable/12/contrib/ntp/sntp/sntp.html stable/12/contrib/ntp/sntp/sntp.man.in stable/12/contrib/ntp/sntp/sntp.mdoc.in stable/12/contrib/ntp/sntp/tests/Makefile.in stable/12/contrib/ntp/sntp/unity/Makefile.in stable/12/contrib/ntp/sntp/version.c stable/12/contrib/ntp/util/Makefile.in stable/12/contrib/ntp/util/invoke-ntp-keygen.texi stable/12/contrib/ntp/util/ntp-keygen-opts.c stable/12/contrib/ntp/util/ntp-keygen-opts.h stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/12/contrib/ntp/util/ntp-keygen.html stable/12/contrib/ntp/util/ntp-keygen.man.in stable/12/contrib/ntp/util/ntp-keygen.mdoc.in stable/12/contrib/ntp/util/ntptime.c stable/12/usr.sbin/ntp/libntp/Makefile Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/contrib/ntp/libntp/xsbprintf.c - copied unchanged from r344883, head/contrib/ntp/libntp/xsbprintf.c Modified: stable/11/contrib/ntp/COPYRIGHT stable/11/contrib/ntp/ChangeLog stable/11/contrib/ntp/CommitLog stable/11/contrib/ntp/Makefile.in stable/11/contrib/ntp/NEWS stable/11/contrib/ntp/aclocal.m4 stable/11/contrib/ntp/adjtimed/Makefile.in stable/11/contrib/ntp/build stable/11/contrib/ntp/clockstuff/Makefile.in stable/11/contrib/ntp/config.h.in stable/11/contrib/ntp/configure stable/11/contrib/ntp/configure.ac stable/11/contrib/ntp/include/Makefile.in stable/11/contrib/ntp/include/isc/Makefile.in stable/11/contrib/ntp/include/ntp_calendar.h stable/11/contrib/ntp/include/ntp_stdlib.h stable/11/contrib/ntp/include/ntpd.h stable/11/contrib/ntp/include/parse.h stable/11/contrib/ntp/kernel/Makefile.in stable/11/contrib/ntp/kernel/sys/Makefile.in stable/11/contrib/ntp/libntp/Makefile.am stable/11/contrib/ntp/libntp/Makefile.in stable/11/contrib/ntp/libntp/authreadkeys.c stable/11/contrib/ntp/libntp/calyearstart.c stable/11/contrib/ntp/libntp/ntp_calendar.c stable/11/contrib/ntp/libntp/work_fork.c stable/11/contrib/ntp/libparse/Makefile.in stable/11/contrib/ntp/libparse/clk_trimtsip.c stable/11/contrib/ntp/libparse/gpstolfp.c stable/11/contrib/ntp/ntpd/Makefile.in stable/11/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/11/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/11/contrib/ntp/ntpd/invoke-ntpd.texi stable/11/contrib/ntp/ntpd/ntp.conf.5man stable/11/contrib/ntp/ntpd/ntp.conf.5mdoc stable/11/contrib/ntp/ntpd/ntp.conf.html stable/11/contrib/ntp/ntpd/ntp.conf.man.in stable/11/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/11/contrib/ntp/ntpd/ntp.keys.5man stable/11/contrib/ntp/ntpd/ntp.keys.5mdoc stable/11/contrib/ntp/ntpd/ntp.keys.html stable/11/contrib/ntp/ntpd/ntp.keys.man.in stable/11/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/11/contrib/ntp/ntpd/ntp_config.c stable/11/contrib/ntp/ntpd/ntp_control.c stable/11/contrib/ntp/ntpd/ntp_crypto.c stable/11/contrib/ntp/ntpd/ntp_loopfilter.c stable/11/contrib/ntp/ntpd/ntp_proto.c stable/11/contrib/ntp/ntpd/ntp_request.c stable/11/contrib/ntp/ntpd/ntp_timer.c stable/11/contrib/ntp/ntpd/ntpd-opts.c stable/11/contrib/ntp/ntpd/ntpd-opts.h stable/11/contrib/ntp/ntpd/ntpd.1ntpdman stable/11/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/11/contrib/ntp/ntpd/ntpd.c stable/11/contrib/ntp/ntpd/ntpd.html stable/11/contrib/ntp/ntpd/ntpd.man.in stable/11/contrib/ntp/ntpd/ntpd.mdoc.in stable/11/contrib/ntp/ntpd/refclock_bancomm.c stable/11/contrib/ntp/ntpd/refclock_jupiter.c stable/11/contrib/ntp/ntpd/refclock_parse.c stable/11/contrib/ntp/ntpdate/Makefile.in stable/11/contrib/ntp/ntpdate/ntpdate.c stable/11/contrib/ntp/ntpdc/Makefile.in stable/11/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/11/contrib/ntp/ntpdc/nl.pl stable/11/contrib/ntp/ntpdc/ntpdc-opts.c stable/11/contrib/ntp/ntpdc/ntpdc-opts.h stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/11/contrib/ntp/ntpdc/ntpdc.html stable/11/contrib/ntp/ntpdc/ntpdc.man.in stable/11/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/11/contrib/ntp/ntpdc/ntpdc_ops.c stable/11/contrib/ntp/ntpq/Makefile.in stable/11/contrib/ntp/ntpq/invoke-ntpq.texi stable/11/contrib/ntp/ntpq/ntpq-opts.c stable/11/contrib/ntp/ntpq/ntpq-opts.h stable/11/contrib/ntp/ntpq/ntpq.1ntpqman stable/11/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/11/contrib/ntp/ntpq/ntpq.html stable/11/contrib/ntp/ntpq/ntpq.man.in stable/11/contrib/ntp/ntpq/ntpq.mdoc.in stable/11/contrib/ntp/ntpsnmpd/Makefile.in stable/11/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/11/contrib/ntp/packageinfo.sh stable/11/contrib/ntp/parseutil/Makefile.in stable/11/contrib/ntp/scripts/Makefile.in stable/11/contrib/ntp/scripts/build/Makefile.in stable/11/contrib/ntp/scripts/build/check--help stable/11/contrib/ntp/scripts/calc_tickadj/Makefile.in stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/11/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/11/contrib/ntp/scripts/invoke-plot_summary.texi stable/11/contrib/ntp/scripts/invoke-summary.texi stable/11/contrib/ntp/scripts/lib/Makefile.in stable/11/contrib/ntp/scripts/ntp-wait/Makefile.in stable/11/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/11/contrib/ntp/scripts/ntpsweep/Makefile.in stable/11/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/11/contrib/ntp/scripts/ntptrace/Makefile.in stable/11/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/11/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/11/contrib/ntp/scripts/ntptrace/ntptrace.html stable/11/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/11/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/11/contrib/ntp/scripts/plot_summary-opts stable/11/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/11/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/11/contrib/ntp/scripts/plot_summary.html stable/11/contrib/ntp/scripts/plot_summary.man.in stable/11/contrib/ntp/scripts/plot_summary.mdoc.in stable/11/contrib/ntp/scripts/summary-opts stable/11/contrib/ntp/scripts/summary.1summaryman stable/11/contrib/ntp/scripts/summary.1summarymdoc stable/11/contrib/ntp/scripts/summary.html stable/11/contrib/ntp/scripts/summary.man.in stable/11/contrib/ntp/scripts/summary.mdoc.in stable/11/contrib/ntp/scripts/update-leap/Makefile.in stable/11/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/11/contrib/ntp/scripts/update-leap/update-leap-opts stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/11/contrib/ntp/scripts/update-leap/update-leap.html stable/11/contrib/ntp/scripts/update-leap/update-leap.man.in stable/11/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/11/contrib/ntp/sntp/COPYRIGHT stable/11/contrib/ntp/sntp/Makefile.in stable/11/contrib/ntp/sntp/aclocal.m4 stable/11/contrib/ntp/sntp/config.h.in stable/11/contrib/ntp/sntp/configure stable/11/contrib/ntp/sntp/include/Makefile.in stable/11/contrib/ntp/sntp/include/version.def stable/11/contrib/ntp/sntp/include/version.texi stable/11/contrib/ntp/sntp/invoke-sntp.texi stable/11/contrib/ntp/sntp/libevent/Makefile.in stable/11/contrib/ntp/sntp/libevent/aclocal.m4 stable/11/contrib/ntp/sntp/libevent/build-aux/ar-lib stable/11/contrib/ntp/sntp/libevent/build-aux/compile stable/11/contrib/ntp/sntp/libevent/build-aux/config.guess stable/11/contrib/ntp/sntp/libevent/build-aux/config.sub stable/11/contrib/ntp/sntp/libevent/build-aux/depcomp stable/11/contrib/ntp/sntp/libevent/build-aux/install-sh stable/11/contrib/ntp/sntp/libevent/build-aux/missing stable/11/contrib/ntp/sntp/libevent/build-aux/test-driver stable/11/contrib/ntp/sntp/libevent/build-aux/ylwrap stable/11/contrib/ntp/sntp/libevent/config.h.in stable/11/contrib/ntp/sntp/libevent/configure stable/11/contrib/ntp/sntp/libevent/evconfig-private.h stable/11/contrib/ntp/sntp/libevent/test/regress.gen.c stable/11/contrib/ntp/sntp/libevent/test/regress.gen.h stable/11/contrib/ntp/sntp/libopts/Makefile.in stable/11/contrib/ntp/sntp/libopts/autoopts/options.h stable/11/contrib/ntp/sntp/libopts/genshell.h stable/11/contrib/ntp/sntp/m4/ntp_libntp.m4 stable/11/contrib/ntp/sntp/m4/version.m4 stable/11/contrib/ntp/sntp/main.c stable/11/contrib/ntp/sntp/networking.c stable/11/contrib/ntp/sntp/scm-rev stable/11/contrib/ntp/sntp/scripts/Makefile.in stable/11/contrib/ntp/sntp/sntp-opts.c stable/11/contrib/ntp/sntp/sntp-opts.h stable/11/contrib/ntp/sntp/sntp.1sntpman stable/11/contrib/ntp/sntp/sntp.1sntpmdoc stable/11/contrib/ntp/sntp/sntp.html stable/11/contrib/ntp/sntp/sntp.man.in stable/11/contrib/ntp/sntp/sntp.mdoc.in stable/11/contrib/ntp/sntp/tests/Makefile.in stable/11/contrib/ntp/sntp/unity/Makefile.in stable/11/contrib/ntp/sntp/version.c stable/11/contrib/ntp/util/Makefile.in stable/11/contrib/ntp/util/invoke-ntp-keygen.texi stable/11/contrib/ntp/util/ntp-keygen-opts.c stable/11/contrib/ntp/util/ntp-keygen-opts.h stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/11/contrib/ntp/util/ntp-keygen.html stable/11/contrib/ntp/util/ntp-keygen.man.in stable/11/contrib/ntp/util/ntp-keygen.mdoc.in stable/11/contrib/ntp/util/ntptime.c stable/11/usr.sbin/ntp/libntp/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/ntp/COPYRIGHT ============================================================================== --- stable/12/contrib/ntp/COPYRIGHT Thu Mar 7 13:36:00 2019 (r344883) +++ stable/12/contrib/ntp/COPYRIGHT Thu Mar 7 13:45:36 2019 (r344884) @@ -1,16 +1,15 @@ This file is automatically generated from html/copyright.html - Copyright Notice - + jpg "Clone me," says Dolly sheepishly. - + Last update: 2-Jan-2017 11:58 UTC - _________________________________________________________________ - - The following copyright notice applies to all files collectively - called the Network Time Protocol Version 4 Distribution. Unless - specifically declared otherwise in an individual file, this entire - notice applies as if the text was explicitly included in the file. + __________________________________________________________________ + + The following copyright notice applies to all files collectively called + the Network Time Protocol Version 4 Distribution. Unless specifically + declared otherwise in an individual file, this entire notice applies as + if the text was explicitly included in the file. *********************************************************************** * * * Copyright (c) University of Delaware 1992-2015 * @@ -62,13 +61,13 @@ This file is automatically generated from html/copyrig *********************************************************************** The following individuals contributed in part to the Network Time - Protocol Distribution Version 4 and are acknowledged as authors of - this work. + Protocol Distribution Version 4 and are acknowledged as authors of this + work. 1. [1]Takao Abe Clock driver for JJY receivers 2. [2]Mark Andrews Leitch atomic clock controller - 3. [3]Bernd Altmeier hopf Elektronik serial - line and PCI-bus devices + 3. [3]Bernd Altmeier hopf Elektronik serial line + and PCI-bus devices 4. [4]Viraj Bais and [5]Clayton Kirkwood port to WindowsNT 3.5 5. [6]Michael Barone GPSVME fixes @@ -84,13 +83,12 @@ This file is automatically generated from html/copyrig IPv6 support 12. [13]Reg Clemens Oncore driver (Current maintainer) 13. [14]Steve Clift OMEGA clock driver - 14. [15]Casey Crellin vxWorks (Tornado) port and - help with target configuration + 14. [15]Casey Crellin vxWorks (Tornado) port and help + with target configuration 15. [16]Sven Dietrich Palisade reference clock driver, NT adj. residuals, integrated Greg's Winnt port. 16. [17]John A. Dundas III Apple A/UX port - 17. [18]Torsten Duwe Linux - port + 17. [18]Torsten Duwe Linux port 18. [19]Dennis Ferguson foundation code for NTP Version 2 as specified in RFC-1119 19. [20]John Hay IPv6 support and testing @@ -122,9 +120,8 @@ This file is automatically generated from html/copyrig code for Version 3 as specified in RFC-1305 36. [39]Danny Mayer Network I/O, Windows Port, Code Maintenance - 37. [40]David L. Mills Version 4 foundation, - precision kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19, - 22, 36 + 37. [40]David L. Mills Version 4 foundation, precision + kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19, 22, 36 38. [41]Wolfgang Moeller VMS port 39. [42]Jeffrey Mogul ntptrace utility 40. [43]Tom Moore i386 svr4 port @@ -136,22 +133,18 @@ This file is automatically generated from html/copyrig 44. [48]Rainer Pruy monitoring/trap scripts, statistics file handling 45. [49]Dirce Richards Digital UNIX V4.0 port - 46. [50]Wilfredo Sánchez added support for - NetInfo + 46. [50]Wilfredo Sánchez added support for NetInfo 47. [51]Nick Sayer SunOS streams modules 48. [52]Jack Sasportas Saved a Lot of space on the stuff in the html/pic/ subdirectory 49. [53]Ray Schnitzler Unixware1 port 50. [54]Michael Shields USNO clock driver - 51. [55]Jeff Steinman Datum PTS clock - driver + 51. [55]Jeff Steinman Datum PTS clock driver 52. [56]Harlan Stenn GNU automake/autoconfigure makeover, various other bits (see the ChangeLog) 53. [57]Kenneth Stone HP-UX port - 54. [58]Ajit Thyagarajan IP multicast/anycast - support - 55. [59]Tomoaki TSURUOKA TRAK clock - driver + 54. [58]Ajit Thyagarajan IP multicast/anycast support + 55. [59]Tomoaki TSURUOKA TRAK clock driver 56. [60]Brian Utterback General codebase, Solaris issues 57. [61]Loganaden Velvindron Sandboxing @@ -160,7 +153,7 @@ This file is automatically generated from html/copyrig TrueTime clock driver 59. [63]Ulrich Windl corrected and validated HTML documents according to the HTML DTD - _________________________________________________________________ + __________________________________________________________________ References Modified: stable/12/contrib/ntp/ChangeLog ============================================================================== --- stable/12/contrib/ntp/ChangeLog Thu Mar 7 13:36:00 2019 (r344883) +++ stable/12/contrib/ntp/ChangeLog Thu Mar 7 13:45:36 2019 (r344884) @@ -1,4 +1,49 @@ --- +(4.2.8p13) 2019/03/07 Released by Harlan Stenn + +* [Sec 3565] Crafted null dereference attack in authenticated + mode 6 packet + - reported by Magnus Stubman +* [Bug 3560] Fix build when HAVE_DROPROOT is not defined + - applied patch by Ian Lepore +* [Bug 3558] Crash and integer size bug + - isolate and fix linux/windows specific code issue +* [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - provide better function for incremental string formatting +* [Bug 3555] Tidy up print alignment of debug output from ntpdate + - applied patch by Gerry Garvey +* [Bug 3554] config revoke stores incorrect value + - original finding by Gerry Garvey, additional cleanup needed +* [Bug 3549] Spurious initgroups() error message + - patch by Christous Zoulas +* [Bug 3548] Signature not verified on windows system + - finding by Chen Jiabin, plus another one by me +* [Bug 3541] patch to fix STA_NANO struct timex units + - applied patch by Maciej Szmigiero +* [Bug 3540] Cannot set minsane to 0 anymore + - applied patch by Andre Charbonneau +* [Bug 3539] work_fork build fails when droproot is not supported + - applied patch by Baruch Siach +* [Bug 3538] Build fails for no-MMU targets + - applied patch by Baruch Siach +* [Bug 3535] libparse won't handle GPS week rollover + - refactored handling of GPS era based on 'tos basedate' for + parse (TSIP) and JUPITER clocks +* [Bug 3529] Build failures on Mac OS X 10.13 (High Sierra) + - patch by Daniel J. Luke; this does not fix a potential linker + regression issue on MacOS. +* [Bug 3527 - Backward Incompatible] mode7 clockinfo fudgeval2 packet + anomaly , reported by GGarvey. + - --enable-bug3527-fix support by HStenn +* [Bug 3526] Incorrect poll interval in packet + - applied patch by Gerry Garvey +* [Bug 3471] Check for openssl/[ch]mac.h. + - added missing check, reported by Reinhard Max +* [Bug 1674] runtime crashes and sync problems affecting both x86 and x86_64 + - this is a variant of [bug 3558] and should be fixed with it +* Implement --disable-signalled-io + +--- (4.2.8p12) 2018/08/14 Released by Harlan Stenn * [Sec 3505] CVE-2018-12327 - Arbitrary Code Execution Vulnerability Modified: stable/12/contrib/ntp/CommitLog ============================================================================== --- stable/12/contrib/ntp/CommitLog Thu Mar 7 13:36:00 2019 (r344883) +++ stable/12/contrib/ntp/CommitLog Thu Mar 7 13:45:36 2019 (r344884) @@ -1,363 +1,6898 @@ -ChangeSet@1.3729, 2017-02-01 07:39:35-05:00, stenn@deacon.udel.edu +ChangeSet@1.3849, 2019-02-20 17:13:36-08:00, harlan@ntp-build.tal1.ntfo.org + Update NEWS file + + NEWS@1.200 +3 -0 + Update NEWS file + +ChangeSet@1.3848, 2019-02-20 09:44:58-08:00, harlan@ntp-build.tal1.ntfo.org + build system cleanups + + build@1.50 +1 -1 + build system cleanups + + scripts/build/check--help@1.4 +2 -2 + build system cleanups + + sntp/libopts/autoopts/options.h@1.31 +1 -1 + build system cleanups + + sntp/libopts/genshell.h@1.31 +1 -1 + build system cleanups + +ChangeSet@1.3847, 2019-02-18 22:26:26-08:00, harlan@ntp-build.tal1.ntfo.org + ChangeLog and NEWS description cleanups + + ChangeLog@1.1971 +4 -4 + ChangeLog and NEWS description cleanups + + NEWS@1.199 +4 -2 + ChangeLog and NEWS description cleanups + +ChangeSet@1.3844.1.4, 2019-02-18 20:10:25-08:00, harlan@ntp-build.tal1.ntfo.org + NEWS file update + + NEWS@1.198 +49 -2 + NEWS file update + +ChangeSet@1.3844.1.3, 2019-02-16 07:36:50+00:00, stenn@stenn.ntp.org + Improve messages around signalled IO handling in configure + + sntp/m4/ntp_libntp.m4@1.38 +5 -0 + Improve messages around signalled IO handling in configure + +ChangeSet@1.3844.1.2, 2019-02-15 13:27:05+00:00, stenn@stenn.ntp.org + Implement --disable-signalled-io + + ChangeLog@1.1968.1.2 +1 -0 + Implement --disable-signalled-io + + sntp/m4/ntp_libntp.m4@1.37 +22 -2 + Implement --disable-signalled-io + +ChangeSet@1.3844.1.1, 2019-01-17 04:16:52+00:00, stenn@psp-deb1.ntp.org + Cleanup + + ChangeLog@1.1968.1.1 +0 -1 + Cleanup + +ChangeSet@1.3845, 2019-01-16 21:42:59+01:00, perlinger@ntp.org + [Sec 3565] null pointer crash by remote attack + + ChangeLog@1.1969 +3 -0 + [Sec 3565] null pointer crash by remote attack + + ntpd/ntp_control.c@1.233 +17 -9 + [Sec 3565] null pointer crash by remote attack + +ChangeSet@1.3827.1.2, 2018-12-15 13:25:25+00:00, stenn@psp-deb1.ntp.org + bug3527 fixes + + ChangeLog@1.1952.1.2 +3 -3 + bug3527 fixes + + configure.ac@1.614.1.1 +18 -0 + bug3527 fixes + + ntpd/ntp_request.c@1.129 +7 -4 + bug3527 fixes + + ntpdc/ntpdc_ops.c@1.85 +8 -3 + bug3527 fixes + +ChangeSet@1.3827.15.1, 2018-12-12 07:37:12+01:00, perlinger@ntp.org + [Bug 3560] Fix build when HAVE_DROPROOT is not defined + + ChangeLog@1.1952.15.1 +4 -0 + [Bug 3560] Fix build when HAVE_DROPROOT is not defined + + libntp/work_fork.c@1.20.2.1 +2 -0 + [Bug 3560] Fix build when HAVE_DROPROOT is not defined + +ChangeSet@1.3827.14.1, 2018-12-11 07:42:01+01:00, perlinger@ntp.org + [Bug 3558] Crash and integer size bug + [Bug 1674] runtime crashes and sync problems affecting both x86 and x86_64 + - isolate & fix LP64/LLP64 problem with BANCOMM SDK + + ChangeLog@1.1952.14.1 +6 -0 + [Bug 3558] Crash and integer size bug + [Bug 1674] runtime crashes and sync problems affecting both x86 and x86_64 + - isolate & fix LP64/LLP64 problem with BANCOMM SDK + + configure.ac@1.615 +1 -0 + [Bug 3558] Crash and integer size bug + [Bug 1674] runtime crashes and sync problems affecting both x86 and x86_64 + - search for BANCOMM SDK lib + + ntpd/refclock_bancomm.c@1.17 +96 -23 + [Bug 3558] Crash and integer size bug + [Bug 1674] runtime crashes and sync problems affecting both x86 and x86_64 + - isolate & fix LP64/LLP64 problem with BANCOMM SDK + +ChangeSet@1.3827.11.2, 2018-12-05 06:58:13+01:00, perlinger@ntp.org + Bug 3556 - ntp_loopfilter.c snprintf compilation warnings + - stricter buffer range checks + + libntp/xsbprintf.c@1.2 +11 -13 + Bug 3556 - ntp_loopfilter.c snprintf compilation warnings + - stricter buffer range checks + + tests/libntp/run-sbprintf.c@1.2 +8 -4 + Bug 3556 - ntp_loopfilter.c snprintf compilation warnings + - stricter buffer range checks + + tests/libntp/sbprintf.c@1.2 +28 -0 + Bug 3556 - ntp_loopfilter.c snprintf compilation warnings + - stricter buffer range checks + +ChangeSet@1.3827.10.2, 2018-12-03 02:29:24-05:00, stenn@psp-fb1.ntp.org + Update Changelog for latest fix for 3471 + + ChangeLog@1.1952.10.2 +6 -1 + Update Changelog for latest fix for 3471 + +ChangeSet@1.3827.13.1, 2018-12-02 09:05:37+01:00, perlinger@ntp.org + [Bug 3555] Tidy up print alignment of debug output from ntpdate + + ChangeLog@1.1952.13.1 +4 -0 + [Bug 3555] Tidy up print alignment of debug output from ntpdate + + ntpdate/ntpdate.c@1.102 +12 -9 + [Bug 3555] Tidy up print alignment of debug output from ntpdate + +ChangeSet@1.3827.12.1, 2018-12-02 08:17:05+01:00, perlinger@ntp.org + [Bug 3554] config revoke stores incorrect value + - plus some additional cleanup + + ChangeLog@1.1952.12.1 +4 -0 + [Bug 3554] config revoke stores incorrect value + + include/ntpd.h@1.204 +2 -2 + [Bug 3554] config revoke stores incorrect value + - sys_{revoke,automax} hold positive log2 value -- unsigned char is enough. + + ntpd/ntp_config.c@1.365.2.1 +12 -3 + [Bug 3554] config revoke stores incorrect value + - sys_{revoke,automax} hold positive log2 value for shift; clamp values + + ntpd/ntp_crypto.c@1.190.1.1 +2 -2 + [Bug 3554] config revoke stores incorrect value + - avoid possible integer truncation + + ntpd/ntp_timer.c@1.97 +4 -4 + [Bug 3554] config revoke stores incorrect value + - sys_{revoke,automax} hold positive log2 value -- unsigned char is enough. + - avoid possible integer truncation + +ChangeSet@1.3827.11.1, 2018-12-01 12:10:51+01:00, perlinger@ntp.org + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - provide better function for incremental string formatting + + ChangeLog@1.1952.11.1 +4 -0 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - provide better function for incremental string formatting + + include/ntp_stdlib.h@1.87 +3 -0 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - provide better API for incremental string formatting + + libntp/Makefile.am@1.82 +1 -0 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - add source of new API for incremental string formatting + + libntp/xsbprintf.c@1.1 +77 -0 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - implement new API for incremental string formatting + + libntp/xsbprintf.c@1.0 +0 -0 + + ntpd/ntp_loopfilter.c@1.192 +18 -14 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - use new API for incremental string formatting + + ports/winnt/vs2005/libntp.vcproj@1.27 +4 -0 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - add source of new API for incremental string formatting + + ports/winnt/vs2008/libntp/libntp.vcproj@1.58 +4 -0 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - add source of new API for incremental string formatting + + ports/winnt/vs2013/libntp/libntp.vcxproj@1.14 +3 -2 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - add source of new API for incremental string formatting + + ports/winnt/vs2013/libntp/libntp.vcxproj.filters@1.12 +5 -2 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - add source of new API for incremental string formatting + + ports/winnt/vs2015/libntp/libntp.vcxproj@1.4 +3 -2 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - add source of new API for incremental string formatting + + ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.4 +5 -2 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - add source of new API for incremental string formatting + + tests/libntp/Makefile.am@1.100 +12 -0 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - add string buffer formatting tests + + tests/libntp/run-sbprintf.c@1.1 +72 -0 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - add string buffer formatting tests + + tests/libntp/run-sbprintf.c@1.0 +0 -0 + + tests/libntp/sbprintf.c@1.1 +67 -0 + [Bug 3556] ntp_loopfilter.c snprintf compilation warnings + - add string buffer formatting tests + + tests/libntp/sbprintf.c@1.0 +0 -0 + +ChangeSet@1.3827.10.1, 2018-11-30 06:34:35+01:00, perlinger@ntp.org + [Bug 3471] Check for openssl/[ch]mac.h + - added missing check in code + + ChangeLog@1.1952.10.1 +1 -0 + [Bug 3471] Check for openssl/[ch]mac.h + - added missing check in code + + libntp/authreadkeys.c@1.33 +2 -0 + [Bug 3471] Check for openssl/[ch]mac.h + - added missing check in code + +ChangeSet@1.3827.9.1, 2018-11-11 12:03:14+01:00, perlinger@ntp.org + [Bug 3549] Spurious initgroups() error message + + ChangeLog@1.1952.9.1 +4 -0 + [Bug 3549] Spurious initgroups() error message + + ntpd/ntpd.c@1.177.2.1 +33 -17 + [Bug 3549] Spurious initgroups() error message + - make 'set_user_group_ids()' idempotent: If we're already there, don't complain. + +ChangeSet@1.3827.8.1, 2018-11-11 11:07:23+01:00, perlinger@ntp.org + [Bug 3548] Signature not verified on windows system + + ChangeLog@1.1952.8.1 +4 -0 + [Bug 3548] Signature not verified on windows system + + ntpd/ntp_crypto.c@1.191 +2 -1 + [Bug 3548] Signature not verified on windows system + - ntohl() can be a macro + + sntp/networking.c@1.70 +2 -1 + [Bug 3548] Signature not verified on windows system + - ntohl() can be a macro + +ChangeSet@1.3827.7.1, 2018-11-11 09:56:34+01:00, perlinger@ntp.org + [Bug 3541] patch to fix STA_NANO struct timex units + + ChangeLog@1.1952.7.1 +4 -0 + [Bug 3541] patch to fix STA_NANO struct timex units + + ntpd/ntp_control.c@1.232 +9 -7 + [Bug 3541] patch to fix STA_NANO struct timex units + + ntpdc/ntpdc_ops.c@1.83.1.1 +7 -7 + [Bug 3541] patch to fix STA_NANO struct timex units + + util/ntptime.c@1.28 +0 -4 + [Bug 3541] patch to fix STA_NANO struct timex units + +ChangeSet@1.3827.6.1, 2018-10-27 11:00:56+02:00, perlinger@ntp.org + [Bug 3540] Cannot set minsane to 0 anymore + + ChangeLog@1.1952.6.1 +4 -0 + [Bug 3540] Cannot set minsane to 0 anymore + + ntpd/ntp_config.c@1.365.1.1 +2 -2 + [Bug 3540] Cannot set minsane to 0 anymore + +ChangeSet@1.3827.5.1, 2018-10-27 10:33:55+02:00, perlinger@ntp.org + [Bug 3539] work_fork build fails when droproot is not supported + + ChangeLog@1.1952.5.1 +4 -0 + [Bug 3539] work_fork build fails when droproot is not supported + + libntp/work_fork.c@1.20.1.1 +2 -0 + [Bug 3539] work_fork build fails when droproot is not supported + +ChangeSet@1.3827.4.1, 2018-10-27 10:23:05+02:00, perlinger@ntp.org + [Bug 3538] Build fails for no-MMU targets + + ChangeLog@1.1952.4.1 +4 -0 + [Bug 3538] Build fails for no-MMU targets + + ntpd/ntpd.c@1.177.1.1 +2 -0 + [Bug 3538] Build fails for no-MMU targets + +ChangeSet@1.3827.3.1, 2018-10-13 08:03:48+02:00, perlinger@ntp.org + [Bug 3535] libparse won't handle GPS week rollover + + ChangeLog@1.1952.3.1 +5 -0 + [Bug 3535] libparse won't handle GPS week rollover + + include/ntp_calendar.h@1.20 +21 -3 + [Bug 3535] libparse won't handle GPS week rollover + - GPS week era support + + include/parse.h@1.15 +0 -1 + [Bug 3535] libparse won't handle GPS week rollover + - remove GPSWRAP definition to avoid lurking uses + + libntp/calyearstart.c@1.7 +1 -1 + [Bug 3535] libparse won't handle GPS week rollover + + libntp/ntp_calendar.c@1.21 +38 -0 + [Bug 3535] libparse won't handle GPS week rollover + - set GPS base week as first Sunday on or after base date + + libparse/clk_trimtsip.c@1.15 +5 -9 + [Bug 3535] libparse won't handle GPS week rollover + - use centralized week expansion code + + libparse/gpstolfp.c@1.14 +0 -5 + [Bug 3535] libparse won't handle GPS week rollover + - don't try to expand weeks in the conversion + + ntpd/ntp_config.c@1.366 +4 -0 + [Bug 3535] libparse won't handle GPS week rollover + - set basedate based on build stamp if not set explicitely + + ntpd/refclock_jupiter.c@1.32 +1 -56 + [Bug 3535] libparse won't handle GPS week rollover + - use centralized week expansion code instead of local copy + + ntpd/refclock_parse.c@1.87 +1 -2 + [Bug 3535] libparse won't handle GPS week rollover + - use centralized week expansion code + +ChangeSet@1.3827.2.1, 2018-10-02 18:03:33+02:00, perlinger@ntp.org + [Bug 3529] Build failures on Mac OS X 10.13 (High Sierra) + + ChangeLog@1.1952.2.1 +5 -0 + [Bug 3529] Build failures on Mac OS X 10.13 (High Sierra) + + libntp/work_fork.c@1.21 +6 -3 + [Bug 3529] Build failures on Mac OS X 10.13 (High Sierra) + - make existence of 'set_user_group_ids()' depend on HAVE_DROPROOT + +ChangeSet@1.3827.1.1, 2018-10-02 17:38:18+02:00, perlinger@ntp.org + [Bug 3527] fudgeval2 anomaly in mode7 clock info packet + + ChangeLog@1.1952.1.1 +5 -0 + [Bug 3527] fudgeval2 anomaly in mode7 clock info packet + + ntpd/ntp_request.c@1.128 +5 -0 + [Bug 3527] fudgeval2 anomaly in mode7 clock info packet + + ntpdc/ntpdc_ops.c@1.84 +4 -0 + [Bug 3527] fudgeval2 anomaly in mode7 clock info packet + +ChangeSet@1.3828, 2018-09-12 22:52:00+02:00, perlinger@ntp.org + [Bug 3526] Incorrect poll interval in packet + + ChangeLog@1.1953 +4 -0 + [Bug 3526] Incorrect poll interval in packet + + ntpd/ntp_proto.c@1.423 +4 -4 + [Bug 3526] Incorrect poll interval in packet + + ntpd/ntpd.c@1.178 +4 -4 + [Bug 3526] Incorrect poll interval in packet + (side kick: fix function prototypes. C is not C++.) + + sntp/main.c@1.104 +2 -3 + [Bug 3526] Incorrect poll interval in packet + (side kick: fix function prototypes. C is not C++.) + +ChangeSet@1.3827, 2018-08-14 08:31:08-04:00, stenn@deacon.udel.edu + NTP_4_2_8P12 + TAG: NTP_4_2_8P12 + + ChangeLog@1.1952 +1 -0 + NTP_4_2_8P12 + + ntpd/invoke-ntp.conf.texi@1.217 +1 -1 + NTP_4_2_8P12 + + ntpd/invoke-ntp.keys.texi@1.202 +1 -1 + NTP_4_2_8P12 + + ntpd/invoke-ntpd.texi@1.516 +2 -2 + NTP_4_2_8P12 + + ntpd/ntp.conf.5man@1.251 +3 -3 + NTP_4_2_8P12 + + ntpd/ntp.conf.5mdoc@1.251 +2 -2 + NTP_4_2_8P12 + + ntpd/ntp.conf.html@1.200 +92 -105 + NTP_4_2_8P12 + + ntpd/ntp.conf.man.in@1.251 +3 -3 + NTP_4_2_8P12 + + ntpd/ntp.conf.mdoc.in@1.251 +2 -2 + NTP_4_2_8P12 + + ntpd/ntp.keys.5man@1.236 +2 -2 + NTP_4_2_8P12 + + ntpd/ntp.keys.5mdoc@1.236 +3 -3 + NTP_4_2_8P12 + + ntpd/ntp.keys.html@1.199 +17 -29 + NTP_4_2_8P12 + + ntpd/ntp.keys.man.in@1.236 +2 -2 + NTP_4_2_8P12 + + ntpd/ntp.keys.mdoc.in@1.236 +3 -3 + NTP_4_2_8P12 + + ntpd/ntpd-opts.c@1.538 +7 -7 + NTP_4_2_8P12 + + ntpd/ntpd-opts.h@1.537 +3 -3 + NTP_4_2_8P12 + + ntpd/ntpd.1ntpdman@1.345 +3 -3 + NTP_4_2_8P12 + + ntpd/ntpd.1ntpdmdoc@1.345 +2 -2 + NTP_4_2_8P12 + + ntpd/ntpd.html@1.191 +101 -145 + NTP_4_2_8P12 + + ntpd/ntpd.man.in@1.345 +3 -3 + NTP_4_2_8P12 + + ntpd/ntpd.mdoc.in@1.345 +2 -2 + NTP_4_2_8P12 + + ntpdc/invoke-ntpdc.texi@1.513 +2 -2 + NTP_4_2_8P12 + + ntpdc/ntpdc-opts.c@1.531 +7 -7 + NTP_4_2_8P12 + + ntpdc/ntpdc-opts.h@1.530 +3 -3 + NTP_4_2_8P12 + + ntpdc/ntpdc.1ntpdcman@1.344 +3 -3 + NTP_4_2_8P12 + + ntpdc/ntpdc.1ntpdcmdoc@1.344 +2 -2 + NTP_4_2_8P12 + + ntpdc/ntpdc.html@1.359 +57 -77 + NTP_4_2_8P12 + + ntpdc/ntpdc.man.in@1.344 +3 -3 + NTP_4_2_8P12 + + ntpdc/ntpdc.mdoc.in@1.344 +2 -2 + NTP_4_2_8P12 + + ntpq/invoke-ntpq.texi@1.523 +2 -2 + NTP_4_2_8P12 + + ntpq/ntpq-opts.c@1.540 +7 -7 + NTP_4_2_8P12 + + ntpq/ntpq-opts.h@1.538 +3 -3 + NTP_4_2_8P12 + + ntpq/ntpq.1ntpqman@1.351 +3 -3 + NTP_4_2_8P12 + + ntpq/ntpq.1ntpqmdoc@1.351 +2 -2 + NTP_4_2_8P12 + + ntpq/ntpq.html@1.190 +105 -129 + NTP_4_2_8P12 + + ntpq/ntpq.man.in@1.351 +3 -3 + NTP_4_2_8P12 + + ntpq/ntpq.mdoc.in@1.351 +2 -2 + NTP_4_2_8P12 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.515 +1 -1 + NTP_4_2_8P12 + + ntpsnmpd/ntpsnmpd-opts.c@1.533 +7 -7 + NTP_4_2_8P12 + + ntpsnmpd/ntpsnmpd-opts.h@1.532 +3 -3 + NTP_4_2_8P12 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.344 +3 -3 + NTP_4_2_8P12 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.344 +2 -2 + NTP_4_2_8P12 + + ntpsnmpd/ntpsnmpd.html@1.185 +10 -14 + NTP_4_2_8P12 + + ntpsnmpd/ntpsnmpd.man.in@1.344 +3 -3 + NTP_4_2_8P12 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.344 +2 -2 + NTP_4_2_8P12 + + packageinfo.sh@1.542 +2 -2 + NTP_4_2_8P12 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.105 +3 -3 + NTP_4_2_8P12 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.106 +2 -2 + NTP_4_2_8P12 + + scripts/calc_tickadj/calc_tickadj.html@1.106 +1 -1 + NTP_4_2_8P12 + + scripts/calc_tickadj/calc_tickadj.man.in@1.104 +3 -3 + NTP_4_2_8P12 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.106 +2 -2 + NTP_4_2_8P12 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.109 +1 -1 + NTP_4_2_8P12 + + scripts/invoke-plot_summary.texi@1.127 +2 -2 + NTP_4_2_8P12 + + scripts/invoke-summary.texi@1.126 +2 -2 + NTP_4_2_8P12 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.336 +2 -2 + NTP_4_2_8P12 + + scripts/ntp-wait/ntp-wait-opts@1.72 +2 -2 + NTP_4_2_8P12 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.333 +3 -3 + NTP_4_2_8P12 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.334 +2 -2 + NTP_4_2_8P12 + + scripts/ntp-wait/ntp-wait.html@1.355 +31 -49 + NTP_4_2_8P12 + + scripts/ntp-wait/ntp-wait.man.in@1.333 +3 -3 + NTP_4_2_8P12 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.334 +2 -2 + NTP_4_2_8P12 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.124 +2 -2 + NTP_4_2_8P12 + + scripts/ntpsweep/ntpsweep-opts@1.74 +2 -2 + NTP_4_2_8P12 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.112 +3 -3 + NTP_4_2_8P12 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.112 +2 -2 + NTP_4_2_8P12 + + scripts/ntpsweep/ntpsweep.html@1.127 +33 -44 + NTP_4_2_8P12 + + scripts/ntpsweep/ntpsweep.man.in@1.112 +3 -3 + NTP_4_2_8P12 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.113 +2 -2 + NTP_4_2_8P12 + + scripts/ntptrace/invoke-ntptrace.texi@1.125 +2 -2 + NTP_4_2_8P12 + + scripts/ntptrace/ntptrace-opts@1.74 +2 -2 + NTP_4_2_8P12 + + scripts/ntptrace/ntptrace.1ntptraceman@1.112 +3 -3 + NTP_4_2_8P12 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.113 +2 -2 + NTP_4_2_8P12 + + scripts/ntptrace/ntptrace.html@1.128 +27 -36 + NTP_4_2_8P12 + + scripts/ntptrace/ntptrace.man.in@1.112 +3 -3 + NTP_4_2_8P12 + + scripts/ntptrace/ntptrace.mdoc.in@1.114 +2 -2 + NTP_4_2_8P12 + + scripts/plot_summary-opts@1.75 +2 -2 + NTP_4_2_8P12 + + scripts/plot_summary.1plot_summaryman@1.125 +3 -3 + NTP_4_2_8P12 + + scripts/plot_summary.1plot_summarymdoc@1.125 +2 -2 + NTP_4_2_8P12 + + scripts/plot_summary.html@1.130 +29 -47 + NTP_4_2_8P12 + + scripts/plot_summary.man.in@1.125 +3 -3 + NTP_4_2_8P12 + + scripts/plot_summary.mdoc.in@1.125 +2 -2 + NTP_4_2_8P12 + + scripts/summary-opts@1.74 +2 -2 + NTP_4_2_8P12 + + scripts/summary.1summaryman@1.124 +3 -3 + NTP_4_2_8P12 + + scripts/summary.1summarymdoc@1.124 +2 -2 + NTP_4_2_8P12 + + scripts/summary.html@1.129 +27 -39 + NTP_4_2_8P12 + + scripts/summary.man.in@1.124 +3 -3 + NTP_4_2_8P12 + + scripts/summary.mdoc.in@1.124 +2 -2 + NTP_4_2_8P12 + + scripts/update-leap/invoke-update-leap.texi@1.25 +1 -1 + NTP_4_2_8P12 + + scripts/update-leap/update-leap-opts@1.25 +2 -2 + NTP_4_2_8P12 + + scripts/update-leap/update-leap.1update-leapman@1.25 +3 -3 + NTP_4_2_8P12 + + scripts/update-leap/update-leap.1update-leapmdoc@1.25 +2 -2 + NTP_4_2_8P12 + + scripts/update-leap/update-leap.html@1.27 +35 -59 + NTP_4_2_8P12 + + scripts/update-leap/update-leap.man.in@1.25 +3 -3 + NTP_4_2_8P12 + + scripts/update-leap/update-leap.mdoc.in@1.25 +2 -2 + NTP_4_2_8P12 + + sntp/invoke-sntp.texi@1.515 +23 -27 + NTP_4_2_8P12 + + sntp/sntp-opts.c@1.534 +7 -7 + NTP_4_2_8P12 + + sntp/sntp-opts.h@1.532 +3 -3 + NTP_4_2_8P12 + + sntp/sntp.1sntpman@1.350 +3 -3 + NTP_4_2_8P12 + + sntp/sntp.1sntpmdoc@1.350 +2 -2 + NTP_4_2_8P12 + + sntp/sntp.html@1.531 +106 -134 + NTP_4_2_8P12 + + sntp/sntp.man.in@1.350 +3 -3 + NTP_4_2_8P12 + + sntp/sntp.mdoc.in@1.350 +2 -2 + NTP_4_2_8P12 + + util/invoke-ntp-keygen.texi@1.518 +2 -2 + NTP_4_2_8P12 + + util/ntp-keygen-opts.c@1.536 +7 -7 + NTP_4_2_8P12 + + util/ntp-keygen-opts.h@1.534 +3 -3 + NTP_4_2_8P12 + + util/ntp-keygen.1ntp-keygenman@1.346 +3 -3 + NTP_4_2_8P12 + + util/ntp-keygen.1ntp-keygenmdoc@1.346 +2 -2 + NTP_4_2_8P12 + + util/ntp-keygen.html@1.191 +148 -206 + NTP_4_2_8P12 + + util/ntp-keygen.man.in@1.346 +3 -3 + NTP_4_2_8P12 + + util/ntp-keygen.mdoc.in@1.346 +2 -2 + NTP_4_2_8P12 + +ChangeSet@1.3826, 2018-08-14 07:16:23-04:00, stenn@deacon.udel.edu + Trigger the release of ntp-4.2.8p12 + + packageinfo.sh@1.541 +1 -1 + Trigger the release of ntp-4.2.8p12 + +ChangeSet@1.3825, 2018-08-13 04:31:37+00:00, stenn@psp-deb1.ntp.org + NEWS update + + NEWS@1.197 +1 -1 + NEWS update + +ChangeSet@1.3812.1.10, 2018-08-04 10:31:58+00:00, stenn@psp-deb1.ntp.org + [Bug 3521] Fix a logic bug in the INVALIDNAK checks + + ChangeLog@1.1942.1.9 +1 -0 + [Bug 3521] Fix a logic bug in the INVALIDNAK checks + + NEWS@1.192.1.2 +1 -0 + [Bug 3521] Fix a logic bug in the INVALIDNAK checks + + ntpd/ntp_proto.c@1.422 +46 -35 + [Bug 3521] Fix a logic bug in the INVALIDNAK checks + +ChangeSet@1.3823, 2018-07-28 05:03:57+00:00, stenn@psp-deb1.ntp.org + 3505 description updates + + ChangeLog@1.1950 +2 -1 + 3505 description updates + + NEWS@1.195 +2 -2 + 3505 description updates + +ChangeSet@1.3812.1.9, 2018-07-25 09:56:39+00:00, stenn@psp-deb1.ntp.org + updates + + ChangeLog@1.1942.1.8 +1 -0 + updates + + NEWS@1.192.1.1 +2 -2 + updates + + html/authentic.html@1.18 +219 -87 + updates + +ChangeSet@1.3821, 2018-07-25 07:41:01+00:00, stenn@psp-deb1.ntp.org + updates + + ntpd/ntp.conf.html@1.199 +104 -91 + updates + + ntpd/ntp.keys.html@1.198 +28 -16 + updates + + ntpd/ntpd.html@1.190 +145 -101 + updates + + ntpdc/ntpdc.html@1.358 +75 -55 + updates + + ntpsnmpd/ntpsnmpd.html@1.184 +13 -9 + updates + + scripts/ntp-wait/ntp-wait.html@1.354 +47 -29 + updates + + scripts/ntpsweep/ntpsweep.html@1.126 +42 -31 + updates + + scripts/ntptrace/ntptrace.html@1.127 +34 -25 + updates + + scripts/plot_summary.html@1.129 +45 -27 + updates + + scripts/summary.html@1.128 +37 -25 + updates + + scripts/update-leap/update-leap.html@1.26 +132 -34 + updates + + sntp/sntp.html@1.530 +107 -83 + updates + +ChangeSet@1.3820, 2018-07-25 07:38:42+00:00, stenn@psp-deb1.ntp.org + Bug 3509 tweaks + + NEWS@1.193 +6 -1 + Bug 3509 tweaks + + sntp/m4/ntp_libntp.m4@1.36 +1 -1 + Bug 3509 tweaks + +ChangeSet@1.3816.1.1, 2018-07-25 07:08:13+02:00, perlinger@ntp.org + [Bug 3509] Add support for running as non-root on FreeBSD, Darwin, other TrustedBSD platforms + + ChangeLog@1.1946.1.1 +3 -0 + [Bug 3509] Add support for running as non-root on FreeBSD, Darwin, other TrustedBSD platforms + + ntpd/ntpd.c@1.177 +20 -2 + [Bug 3509] Add support for running as non-root on FreeBSD, Darwin, other TrustedBSD platforms + + sntp/m4/ntp_libntp.m4@1.35 +22 -1 + [Bug 3509] Add support for running as non-root on FreeBSD, Darwin, other TrustedBSD platforms + +ChangeSet@1.3812.1.8, 2018-07-24 09:16:25+00:00, stenn@psp-deb1.ntp.org + Symmetric key range is 1-65535. Update docs. + + html/authentic.html@1.17 +3 -3 + Symmetric key range is 1-65535. Update docs. + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Thu Mar 7 13:51:20 2019 Return-Path: Delivered-To: svn-src-stable-12@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 EAB7E1530200; Thu, 7 Mar 2019 13:51:19 +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 9031C86A9E; Thu, 7 Mar 2019 13:51:19 +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 8615A1C92A; Thu, 7 Mar 2019 13:51:19 +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 x27DpJHC030731; Thu, 7 Mar 2019 13:51:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x27DpIdt030726; Thu, 7 Mar 2019 13:51:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903071351.x27DpIdt030726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 7 Mar 2019 13:51:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344885 - in stable/12/sbin: fsck_ffs fsdb X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sbin: fsck_ffs fsdb X-SVN-Commit-Revision: 344885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9031C86A9E 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2019 13:51:20 -0000 Author: kib Date: Thu Mar 7 13:51:18 2019 New Revision: 344885 URL: https://svnweb.freebsd.org/changeset/base/344885 Log: MFC r339941 (by mckusick): In preparation for adding inode check-hashes, change the fsck_ffs inodirty() function to have a pointer to the inode being dirtied. No functional change (as for now the parameter is ununsed). Modified: stable/12/sbin/fsck_ffs/dir.c stable/12/sbin/fsck_ffs/fsck.h stable/12/sbin/fsck_ffs/inode.c stable/12/sbin/fsck_ffs/pass1.c stable/12/sbin/fsck_ffs/pass2.c stable/12/sbin/fsdb/fsdb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/fsck_ffs/dir.c ============================================================================== --- stable/12/sbin/fsck_ffs/dir.c Thu Mar 7 13:45:36 2019 (r344884) +++ stable/12/sbin/fsck_ffs/dir.c Thu Mar 7 13:51:18 2019 (r344885) @@ -323,7 +323,7 @@ adjust(struct inodesc *idesc, int lcnt) if (preen || reply("ADJUST") == 1) { if (bkgrdflag == 0) { DIP_SET(dp, di_nlink, DIP(dp, di_nlink) - lcnt); - inodirty(); + inodirty(dp); } else { cmd.value = idesc->id_number; cmd.size = -lcnt; @@ -449,7 +449,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name) pfatal("SORRY. CANNOT CREATE lost+found DIRECTORY\n\n"); return (0); } - inodirty(); + inodirty(dp); idesc.id_type = ADDR; idesc.id_func = pass4check; idesc.id_number = oldlfdir; @@ -474,7 +474,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name) (void)makeentry(orphan, lfdir, ".."); dp = ginode(lfdir); DIP_SET(dp, di_nlink, DIP(dp, di_nlink) + 1); - inodirty(); + inodirty(dp); inoinfo(lfdir)->ino_linkcnt++; pwarn("DIR I=%lu CONNECTED. ", (u_long)orphan); if (parentdir != (ino_t)-1) { @@ -535,7 +535,7 @@ makeentry(ino_t parent, ino_t ino, const char *name) dp = ginode(parent); if (DIP(dp, di_size) % DIRBLKSIZ) { DIP_SET(dp, di_size, roundup(DIP(dp, di_size), DIRBLKSIZ)); - inodirty(); + inodirty(dp); } if ((ckinode(dp, &idesc) & ALTERED) != 0) return (1); @@ -591,7 +591,7 @@ expanddir(union dinode *dp, char *name) else if (reply("EXPAND") == 0) goto bad; dirty(bp); - inodirty(); + inodirty(dp); return (1); bad: DIP_SET(dp, di_db[lastbn], DIP(dp, di_db[lastbn + 1])); @@ -632,7 +632,7 @@ allocdir(ino_t parent, ino_t request, int mode) memmove(cp, &emptydir, sizeof emptydir); dirty(bp); DIP_SET(dp, di_nlink, 2); - inodirty(); + inodirty(dp); if (ino == UFS_ROOTINO) { inoinfo(ino)->ino_linkcnt = DIP(dp, di_nlink); cacheino(dp, ino); @@ -653,7 +653,7 @@ allocdir(ino_t parent, ino_t request, int mode) } dp = ginode(parent); DIP_SET(dp, di_nlink, DIP(dp, di_nlink) + 1); - inodirty(); + inodirty(dp); return (ino); } @@ -668,7 +668,7 @@ freedir(ino_t ino, ino_t parent) if (ino != parent) { dp = ginode(parent); DIP_SET(dp, di_nlink, DIP(dp, di_nlink) - 1); - inodirty(); + inodirty(dp); } freeino(ino); } Modified: stable/12/sbin/fsck_ffs/fsck.h ============================================================================== --- stable/12/sbin/fsck_ffs/fsck.h Thu Mar 7 13:45:36 2019 (r344884) +++ stable/12/sbin/fsck_ffs/fsck.h Thu Mar 7 13:51:18 2019 (r344885) @@ -450,7 +450,7 @@ union dinode *ginode(ino_t inumber); void infohandler(int sig); void alarmhandler(int sig); void inocleanup(void); -void inodirty(void); +void inodirty(union dinode *); struct inostat *inoinfo(ino_t inum); void IOstats(char *what); int linkup(ino_t orphan, ino_t parentdir, char *name); Modified: stable/12/sbin/fsck_ffs/inode.c ============================================================================== --- stable/12/sbin/fsck_ffs/inode.c Thu Mar 7 13:45:36 2019 (r344884) +++ stable/12/sbin/fsck_ffs/inode.c Thu Mar 7 13:51:18 2019 (r344885) @@ -102,7 +102,7 @@ ckinode(union dinode *dp, struct inodesc *idesc) printf( "YOU MUST RERUN FSCK AFTERWARDS\n"); rerun = 1; - inodirty(); + inodirty(dp); } } @@ -142,7 +142,7 @@ ckinode(union dinode *dp, struct inodesc *idesc) printf( "YOU MUST RERUN FSCK AFTERWARDS\n"); rerun = 1; - inodirty(); + inodirty(dp); break; } } @@ -221,7 +221,7 @@ iblock(struct inodesc *idesc, long ilevel, off_t isize printf( "YOU MUST RERUN FSCK AFTERWARDS\n"); rerun = 1; - inodirty(); + inodirty(dp); bp->b_flags &= ~B_INUSE; return(STOP); } @@ -519,7 +519,7 @@ inocleanup(void) } void -inodirty(void) +inodirty(union dinode *dp) { dirty(pbp); @@ -544,7 +544,7 @@ clri(struct inodesc *idesc, const char *type, int flag (void)ckinode(dp, idesc); inoinfo(idesc->id_number)->ino_state = USTATE; clearinode(dp); - inodirty(); + inodirty(dp); } else { cmd.value = idesc->id_number; cmd.size = -DIP(dp, di_nlink); @@ -711,7 +711,7 @@ allocino(ino_t request, int type) DIP_SET(dp, di_size, sblock.fs_fsize); DIP_SET(dp, di_blocks, btodb(sblock.fs_fsize)); n_files++; - inodirty(); + inodirty(dp); inoinfo(ino)->ino_type = IFTODT(type); return (ino); } @@ -732,7 +732,7 @@ freeino(ino_t ino) dp = ginode(ino); (void)ckinode(dp, &idesc); clearinode(dp); - inodirty(); + inodirty(dp); inoinfo(ino)->ino_state = USTATE; n_files--; } Modified: stable/12/sbin/fsck_ffs/pass1.c ============================================================================== --- stable/12/sbin/fsck_ffs/pass1.c Thu Mar 7 13:45:36 2019 (r344884) +++ stable/12/sbin/fsck_ffs/pass1.c Thu Mar 7 13:51:18 2019 (r344885) @@ -271,7 +271,7 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r if (reply("CLEAR") == 1) { dp = ginode(inumber); clearinode(dp); - inodirty(); + inodirty(dp); } } inoinfo(inumber)->ino_state = USTATE; @@ -294,7 +294,7 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r dp = ginode(inumber); DIP_SET(dp, di_size, sblock.fs_fsize); DIP_SET(dp, di_mode, IFREG|0600); - inodirty(); + inodirty(dp); } if ((mode == IFBLK || mode == IFCHR || mode == IFIFO || mode == IFSOCK) && DIP(dp, di_size) != 0) { @@ -412,7 +412,7 @@ checkinode(ino_t inumber, struct inodesc *idesc, int r if (bkgrdflag == 0) { dp = ginode(inumber); DIP_SET(dp, di_blocks, idesc->id_entryno); - inodirty(); + inodirty(dp); } else { cmd.value = idesc->id_number; cmd.size = idesc->id_entryno - DIP(dp, di_blocks); @@ -472,7 +472,7 @@ unknown: inoinfo(inumber)->ino_state = USTATE; dp = ginode(inumber); clearinode(dp); - inodirty(); + inodirty(dp); } return (1); } Modified: stable/12/sbin/fsck_ffs/pass2.c ============================================================================== --- stable/12/sbin/fsck_ffs/pass2.c Thu Mar 7 13:45:36 2019 (r344884) +++ stable/12/sbin/fsck_ffs/pass2.c Thu Mar 7 13:51:18 2019 (r344885) @@ -114,7 +114,7 @@ pass2(void) dp = ginode(UFS_ROOTINO); DIP_SET(dp, di_mode, DIP(dp, di_mode) & ~IFMT); DIP_SET(dp, di_mode, DIP(dp, di_mode) | IFDIR); - inodirty(); + inodirty(dp); break; case DSTATE: @@ -160,7 +160,7 @@ pass2(void) if (reply("FIX") == 1) { dp = ginode(inp->i_number); DIP_SET(dp, di_size, inp->i_isize); - inodirty(); + inodirty(dp); } } else if ((inp->i_isize & (DIRBLKSIZ - 1)) != 0) { getpathname(pathbuf, inp->i_number, inp->i_number); @@ -179,7 +179,7 @@ pass2(void) dp = ginode(inp->i_number); DIP_SET(dp, di_size, roundup(inp->i_isize, DIRBLKSIZ)); - inodirty(); + inodirty(dp); } } dp = &dino; Modified: stable/12/sbin/fsdb/fsdb.c ============================================================================== --- stable/12/sbin/fsdb/fsdb.c Thu Mar 7 13:45:36 2019 (r344884) +++ stable/12/sbin/fsdb/fsdb.c Thu Mar 7 13:51:18 2019 (r344885) @@ -342,7 +342,7 @@ CMDFUNCSTART(zapi) GETINUM(1,inum); dp = ginode(inum); clearinode(dp); - inodirty(); + inodirty(dp); if (curinode) /* re-set after potential change */ curinode = ginode(curinum); return 0; @@ -372,7 +372,7 @@ CMDFUNCSTART(uplink) DIP_SET(curinode, di_nlink, DIP(curinode, di_nlink) + 1); printf("inode %ju link count now %d\n", (uintmax_t)curinum, DIP(curinode, di_nlink)); - inodirty(); + inodirty(curinode); return 0; } @@ -383,7 +383,7 @@ CMDFUNCSTART(downlink) DIP_SET(curinode, di_nlink, DIP(curinode, di_nlink) - 1); printf("inode %ju link count now %d\n", (uintmax_t)curinum, DIP(curinode, di_nlink)); - inodirty(); + inodirty(curinode); return 0; } @@ -921,7 +921,7 @@ CMDFUNCSTART(newtype) } DIP_SET(curinode, di_mode, DIP(curinode, di_mode) & ~IFMT); DIP_SET(curinode, di_mode, DIP(curinode, di_mode) | type); - inodirty(); + inodirty(curinode); printactive(0); return 0; } @@ -942,7 +942,7 @@ CMDFUNCSTART(chlen) } DIP_SET(curinode, di_size, len); - inodirty(); + inodirty(curinode); printactive(0); return rval; } @@ -964,7 +964,7 @@ CMDFUNCSTART(chmode) DIP_SET(curinode, di_mode, DIP(curinode, di_mode) & ~07777); DIP_SET(curinode, di_mode, DIP(curinode, di_mode) | modebits); - inodirty(); + inodirty(curinode); printactive(0); return rval; } @@ -989,7 +989,7 @@ CMDFUNCSTART(chaflags) return(1); } DIP_SET(curinode, di_flags, flags); - inodirty(); + inodirty(curinode); printactive(0); return rval; } @@ -1014,7 +1014,7 @@ CMDFUNCSTART(chgen) return(1); } DIP_SET(curinode, di_gen, gen); - inodirty(); + inodirty(curinode); printactive(0); return rval; } @@ -1064,7 +1064,7 @@ CMDFUNCSTART(linkcount) } DIP_SET(curinode, di_nlink, lcnt); - inodirty(); + inodirty(curinode); printactive(0); return rval; } @@ -1091,7 +1091,7 @@ CMDFUNCSTART(chowner) } DIP_SET(curinode, di_uid, uid); - inodirty(); + inodirty(curinode); printactive(0); return rval; } @@ -1117,7 +1117,7 @@ CMDFUNCSTART(chgroup) } DIP_SET(curinode, di_gid, gid); - inodirty(); + inodirty(curinode); printactive(0); return rval; } @@ -1186,7 +1186,7 @@ CMDFUNCSTART(chbtime) return 1; curinode->dp2.di_birthtime = _time_to_time64(secs); curinode->dp2.di_birthnsec = nsecs; - inodirty(); + inodirty(curinode); printactive(0); return 0; } @@ -1203,7 +1203,7 @@ CMDFUNCSTART(chmtime) else curinode->dp2.di_mtime = _time_to_time64(secs); DIP_SET(curinode, di_mtimensec, nsecs); - inodirty(); + inodirty(curinode); printactive(0); return 0; } @@ -1220,7 +1220,7 @@ CMDFUNCSTART(chatime) else curinode->dp2.di_atime = _time_to_time64(secs); DIP_SET(curinode, di_atimensec, nsecs); - inodirty(); + inodirty(curinode); printactive(0); return 0; } @@ -1237,7 +1237,7 @@ CMDFUNCSTART(chctime) else curinode->dp2.di_ctime = _time_to_time64(secs); DIP_SET(curinode, di_ctimensec, nsecs); - inodirty(); + inodirty(curinode); printactive(0); return 0; } From owner-svn-src-stable-12@freebsd.org Thu Mar 7 15:30:50 2019 Return-Path: Delivered-To: svn-src-stable-12@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 212D31532D2D; Thu, 7 Mar 2019 15:30:50 +0000 (UTC) (envelope-from dab@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 937948AE15; Thu, 7 Mar 2019 15:30:49 +0000 (UTC) (envelope-from dab@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 894AB1D92D; Thu, 7 Mar 2019 15:30:49 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x27FUncU084990; Thu, 7 Mar 2019 15:30:49 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x27FUnVt084988; Thu, 7 Mar 2019 15:30:49 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201903071530.x27FUnVt084988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Thu, 7 Mar 2019 15:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344888 - stable/12/sys/dev/asmc X-SVN-Group: stable-12 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/12/sys/dev/asmc X-SVN-Commit-Revision: 344888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 937948AE15 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2019 15:30:50 -0000 Author: dab Date: Thu Mar 7 15:30:48 2019 New Revision: 344888 URL: https://svnweb.freebsd.org/changeset/base/344888 Log: MFC r344553: asmc: Add support for Mac mini 2,1 PR: 235798 Submitted by: Trev Reported by: Trev Modified: stable/12/sys/dev/asmc/asmc.c stable/12/sys/dev/asmc/asmcvar.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/asmc/asmc.c ============================================================================== --- stable/12/sys/dev/asmc/asmc.c Thu Mar 7 13:53:59 2019 (r344887) +++ stable/12/sys/dev/asmc/asmc.c Thu Mar 7 15:30:48 2019 (r344888) @@ -259,6 +259,15 @@ struct asmc_model asmc_models[] = { ASMC_MM_TEMPS, ASMC_MM_TEMPNAMES, ASMC_MM_TEMPDESCS }, + /* The Mac Mini 2,1 has no SMS */ + { + "Macmini2,1", "Apple SMC Mac Mini 2,1", + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS, + ASMC_LIGHT_FUNCS_DISABLED, + ASMC_MM21_TEMPS, ASMC_MM21_TEMPNAMES, ASMC_MM21_TEMPDESCS + }, + /* The Mac Mini 3,1 has no SMS */ { "Macmini3,1", "Apple SMC Mac Mini 3,1", Modified: stable/12/sys/dev/asmc/asmcvar.h ============================================================================== --- stable/12/sys/dev/asmc/asmcvar.h Thu Mar 7 13:53:59 2019 (r344887) +++ stable/12/sys/dev/asmc/asmcvar.h Thu Mar 7 15:30:48 2019 (r344888) @@ -341,6 +341,24 @@ struct asmc_softc { #define ASMC_MM_TEMPDESCS { "Northbridge Point 1", \ "Northbridge Point 2" } +#define ASMC_MM21_TEMPS { "TA0P", "TC0D", \ + "TC0H", "TC0P", \ + "TC1P", "TN0P", \ + "TN1P", NULL } + +#define ASMC_MM21_TEMPNAMES { "ambient_air", "cpu_die", \ + "cpu_heatsink", "cpu_proximity1", \ + "cpu_proximity2", "northbridge_proximity1", \ + "northbridge_proximity2", } + +#define ASMC_MM21_TEMPDESCS { "Ambient Air Temperature" \ + "CPU Die Core Temperature", \ + "CPU Heatsink Temperature", \ + "CPU Proximity 1 Temperature", \ + "CPU Proximity 2 Temperature", \ + "Northbridge Proximity 1 Temperature", \ + "Northbridge Proximity 2 Temperature", } + #define ASMC_MM31_TEMPS { "TC0D", "TC0H", \ "TC0P", "TH0P", \ "TN0D", "TN0P", \ From owner-svn-src-stable-12@freebsd.org Thu Mar 7 20:12:51 2019 Return-Path: Delivered-To: svn-src-stable-12@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 72BAE152423C; Thu, 7 Mar 2019 20:12:51 +0000 (UTC) (envelope-from emaste@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 1B25270F20; Thu, 7 Mar 2019 20:12:51 +0000 (UTC) (envelope-from emaste@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 107E720B1A; Thu, 7 Mar 2019 20:12:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x27KCouL044389; Thu, 7 Mar 2019 20:12:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x27KCoUx044387; Thu, 7 Mar 2019 20:12:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903072012.x27KCoUx044387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 7 Mar 2019 20:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344897 - stable/12/crypto/openssh X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/crypto/openssh X-SVN-Commit-Revision: 344897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1B25270F20 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2019 20:12:51 -0000 Author: emaste Date: Thu Mar 7 20:12:50 2019 New Revision: 344897 URL: https://svnweb.freebsd.org/changeset/base/344897 Log: MFC r344449: scp: validate filenames provided by server against wildcard ... in client OpenSSH-portable commits: check in scp client that filenames sent during remote->local directory copies satisfy the wildcard specified by the user. This checking provides some protection against a malicious server sending unexpected filenames, but it comes at a risk of rejecting wanted files due to differences between client and server wildcard expansion rules. For this reason, this also adds a new -T flag to disable the check. reported by Harry Sintonen fix approach suggested by markus@; has been in snaps for ~1wk courtesy deraadt@ OpenBSD-Commit-ID: 00f44b50d2be8e321973f3c6d014260f8f7a8eda Minor patch conflict (getopt) resolved. Obtained from: OpenSSH-portable 391ffc4b9d31fa1f4ad566499fef9176ff8a07dc scp: add -T to usage(); OpenBSD-Commit-ID: a7ae14d9436c64e1bd05022329187ea3a0ce1899 Obtained from: OpenSSH-portable 2c21b75a7be6ebdcbceaebb43157c48dbb36f3d8 PR: 234965 Sponsored by: The FreeBSD Foundation Modified: stable/12/crypto/openssh/scp.1 stable/12/crypto/openssh/scp.c Directory Properties: stable/12/ (props changed) Modified: stable/12/crypto/openssh/scp.1 ============================================================================== --- stable/12/crypto/openssh/scp.1 Thu Mar 7 19:33:39 2019 (r344896) +++ stable/12/crypto/openssh/scp.1 Thu Mar 7 20:12:50 2019 (r344897) @@ -18,7 +18,7 @@ .Nd secure copy (remote file copy program) .Sh SYNOPSIS .Nm scp -.Op Fl 346BCpqrv +.Op Fl 346BCpqrTv .Op Fl c Ar cipher .Op Fl F Ar ssh_config .Op Fl i Ar identity_file @@ -207,6 +207,16 @@ to use for the encrypted connection. The program must understand .Xr ssh 1 options. +.It Fl T +Disable strict filename checking. +By default when copying files from a remote host to a local directory +.Nm +checks that the received filenames match those requested on the command-line +to prevent the remote end from sending unexpected or unwanted files. +Because of differences in how various operating systems and shells interpret +filename wildcards, these checks may cause wanted files to be rejected. +This option disables these checks at the expense of fully trusting that +the server will not send unexpected filenames. .It Fl v Verbose mode. Causes Modified: stable/12/crypto/openssh/scp.c ============================================================================== --- stable/12/crypto/openssh/scp.c Thu Mar 7 19:33:39 2019 (r344896) +++ stable/12/crypto/openssh/scp.c Thu Mar 7 20:12:50 2019 (r344897) @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */ +/* $OpenBSD: scp.c,v 1.203 2019/01/27 07:14:11 jmc Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -94,6 +94,7 @@ #include #include #include +#include #include #include #include @@ -375,14 +376,14 @@ void verifydir(char *); struct passwd *pwd; uid_t userid; int errs, remin, remout; -int pflag, iamremote, iamrecursive, targetshouldbedirectory; +int Tflag, pflag, iamremote, iamrecursive, targetshouldbedirectory; #define CMDNEEDS 64 char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */ int response(void); void rsource(char *, struct stat *); -void sink(int, char *[]); +void sink(int, char *[], const char *); void source(int, char *[]); void tolocal(int, char *[]); void toremote(int, char *[]); @@ -421,8 +422,9 @@ main(int argc, char **argv) addargs(&args, "-oRemoteCommand=none"); addargs(&args, "-oRequestTTY=no"); - fflag = tflag = 0; - while ((ch = getopt(argc, argv, "dfl:prtvBCc:i:P:q12346S:o:F:")) != -1) + fflag = Tflag = tflag = 0; + while ((ch = getopt(argc, argv, + "dfl:prtTvBCc:i:P:q12346S:o:F:")) != -1) { switch (ch) { /* User-visible flags. */ case '1': @@ -501,9 +503,13 @@ main(int argc, char **argv) setmode(0, O_BINARY); #endif break; + case 'T': + Tflag = 1; + break; default: usage(); } + } argc -= optind; argv += optind; @@ -534,7 +540,7 @@ main(int argc, char **argv) } if (tflag) { /* Receive data. */ - sink(argc, argv); + sink(argc, argv, NULL); exit(errs != 0); } if (argc < 2) @@ -791,7 +797,7 @@ tolocal(int argc, char **argv) continue; } free(bp); - sink(1, argv + argc - 1); + sink(1, argv + argc - 1, src); (void) close(remin); remin = remout = -1; } @@ -967,7 +973,7 @@ rsource(char *name, struct stat *statp) (sizeof(type) != 4 && sizeof(type) != 8)) void -sink(int argc, char **argv) +sink(int argc, char **argv, const char *src) { static BUF buffer; struct stat stb; @@ -983,6 +989,7 @@ sink(int argc, char **argv) unsigned long long ull; int setimes, targisdir, wrerrno = 0; char ch, *cp, *np, *targ, *why, *vect[1], buf[2048], visbuf[2048]; + char *src_copy = NULL, *restrict_pattern = NULL; struct timeval tv[2]; #define atime tv[0] @@ -1007,6 +1014,17 @@ sink(int argc, char **argv) (void) atomicio(vwrite, remout, "", 1); if (stat(targ, &stb) == 0 && S_ISDIR(stb.st_mode)) targisdir = 1; + if (src != NULL && !iamrecursive && !Tflag) { + /* + * Prepare to try to restrict incoming filenames to match + * the requested destination file glob. + */ + if ((src_copy = strdup(src)) == NULL) + fatal("strdup failed"); + if ((restrict_pattern = strrchr(src_copy, '/')) != NULL) { + *restrict_pattern++ = '\0'; + } + } for (first = 1;; first = 0) { cp = buf; if (atomicio(read, remin, cp, 1) != 1) @@ -1111,6 +1129,9 @@ sink(int argc, char **argv) run_err("error: unexpected filename: %s", cp); exit(1); } + if (restrict_pattern != NULL && + fnmatch(restrict_pattern, cp, 0) != 0) + SCREWUP("filename does not match request"); if (targisdir) { static char *namebuf; static size_t cursize; @@ -1148,7 +1169,7 @@ sink(int argc, char **argv) goto bad; } vect[0] = xstrdup(np); - sink(1, vect); + sink(1, vect, src); if (setimes) { setimes = 0; if (utimes(vect[0], tv) < 0) @@ -1316,7 +1337,7 @@ void usage(void) { (void) fprintf(stderr, - "usage: scp [-346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]\n" + "usage: scp [-346BCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file]\n" " [-l limit] [-o ssh_option] [-P port] [-S program] source ... target\n"); exit(1); } From owner-svn-src-stable-12@freebsd.org Thu Mar 7 20:40:40 2019 Return-Path: Delivered-To: svn-src-stable-12@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 D19141524C16; Thu, 7 Mar 2019 20:40:40 +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 74B6471AC9; Thu, 7 Mar 2019 20:40:40 +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 6981B20E9A; Thu, 7 Mar 2019 20:40:40 +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 x27KeeuL055176; Thu, 7 Mar 2019 20:40:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x27KeeDI055175; Thu, 7 Mar 2019 20:40:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201903072040.x27KeeDI055175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 7 Mar 2019 20:40:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344898 - stable/12/share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/share/mk X-SVN-Commit-Revision: 344898 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 74B6471AC9 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2019 20:40:41 -0000 Author: kib Date: Thu Mar 7 20:40:39 2019 New Revision: 344898 URL: https://svnweb.freebsd.org/changeset/base/344898 Log: Disable WITH_RETPOLINE on stable/12. It is known that clang 7 generates broken ifunc calls when retpoline is enabled. Since libc uses ifuncs, mark WITH_RETPOLINE as always broken and disabled. To be removed after clang 8 MFC. This is a direct commit to the branch. Reported by: many Tested by: Nikola Mihaylov Reviewed by: emaste Sponsored by: The FreeBSD Foundation Modified: stable/12/share/mk/src.opts.mk Modified: stable/12/share/mk/src.opts.mk ============================================================================== --- stable/12/share/mk/src.opts.mk Thu Mar 7 20:12:50 2019 (r344897) +++ stable/12/share/mk/src.opts.mk Thu Mar 7 20:40:39 2019 (r344898) @@ -365,6 +365,9 @@ BROKEN_OPTIONS+=LOADER_UBOOT BROKEN_OPTIONS+=LOADER_GELI LOADER_LUA .endif +# clang 7.0 +BROKEN_OPTIONS+=RETPOLINE + .if ${__T:Mmips64*} # profiling won't work on MIPS64 because there is only assembly for o32 BROKEN_OPTIONS+=PROFILE From owner-svn-src-stable-12@freebsd.org Thu Mar 7 20:43:59 2019 Return-Path: Delivered-To: svn-src-stable-12@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 99B201524FB5; Thu, 7 Mar 2019 20:43:59 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED65071F74; Thu, 7 Mar 2019 20:43:58 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x27Khtqb092244; Thu, 7 Mar 2019 12:43:55 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x27KhtYw092243; Thu, 7 Mar 2019 12:43:55 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903072043.x27KhtYw092243@ gndrsh.dnsmgr.net> Subject: Re: svn commit: r344898 - stable/12/share/mk In-Reply-To: <201903072040.x27KeeDI055175@repo.freebsd.org> To: Konstantin Belousov Date: Thu, 7 Mar 2019 12:43:55 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: ED65071F74 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.977,0] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2019 20:43:59 -0000 > Author: kib > Date: Thu Mar 7 20:40:39 2019 > New Revision: 344898 > URL: https://svnweb.freebsd.org/changeset/base/344898 > > Log: > Disable WITH_RETPOLINE on stable/12. > > It is known that clang 7 generates broken ifunc calls when retpoline is > enabled. Since libc uses ifuncs, mark WITH_RETPOLINE as always broken > and disabled. To be removed after clang 8 MFC. > > This is a direct commit to the branch. > > Reported by: many > Tested by: Nikola Mihaylov > Reviewed by: emaste > Sponsored by: The FreeBSD Foundation Would an UPDATING entry be warranted? > Modified: > stable/12/share/mk/src.opts.mk > > Modified: stable/12/share/mk/src.opts.mk > ============================================================================== > --- stable/12/share/mk/src.opts.mk Thu Mar 7 20:12:50 2019 (r344897) > +++ stable/12/share/mk/src.opts.mk Thu Mar 7 20:40:39 2019 (r344898) > @@ -365,6 +365,9 @@ BROKEN_OPTIONS+=LOADER_UBOOT > BROKEN_OPTIONS+=LOADER_GELI LOADER_LUA > .endif > > +# clang 7.0 > +BROKEN_OPTIONS+=RETPOLINE > + > .if ${__T:Mmips64*} > # profiling won't work on MIPS64 because there is only assembly for o32 > BROKEN_OPTIONS+=PROFILE > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable-12@freebsd.org Thu Mar 7 20:47:56 2019 Return-Path: Delivered-To: svn-src-stable-12@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 8A5741525201; Thu, 7 Mar 2019 20:47:56 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it1-f173.google.com (mail-it1-f173.google.com [209.85.166.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B243C72380; Thu, 7 Mar 2019 20:47:55 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it1-f173.google.com with SMTP id w18so17492286itj.4; Thu, 07 Mar 2019 12:47:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2tcJOOgLpLTidIqZ1g4QZswn4XSYPuQ9TWuscGFFOo0=; b=Uoeqv14P4maAU7b5YiKe8HqML/6CH5rxjtLtJw2yi82BNz0KeDtmyFqnDS3GJdu/hb EoQcJmvlhzq5vTh6egO6uH2w61m7CJVHXUP1iELSGxV1ntZu9c4p+S4akkeYmDpGOJyh wpwmmfng7qpxPaNXNFlGqP4rNFV0EPSgTDVQrd9JapFI7o2dA0m6kJkXczQAtpCobXkZ 08DOoPI56SYGv6ghRBpKE6eq2/EFI727HrEro2c7gtnuWFG6hMSzHSuqMdlZJznAobw7 XAVmnQU2p1jcpDOGawEiGQPhQF4syTCCwhui8J0P3C6x/xJrSNpgF1vgGjdEzZjcRFmx jHTQ== X-Gm-Message-State: APjAAAX9yMVLW8ZxjwJTKQLM4lb3Zg5+vGp92/VKwz8hHezb+mupSEXk 042qnZcPJsi1qZb8SKEx1BYc3mTWQsne+Yh1j1SsfA== X-Google-Smtp-Source: APXvYqyyJFw86ZwLC3kGQNrrMIjsi1PLfPyRhKmE4wwnMfXxT9AFhOz9+IPgdDirozmacEsayLuba6zfXa9wXF+kbN0= X-Received: by 2002:a24:b501:: with SMTP id v1mr6453918ite.174.1551991669065; Thu, 07 Mar 2019 12:47:49 -0800 (PST) MIME-Version: 1.0 References: <201903072040.x27KeeDI055175@repo.freebsd.org> <5c81829b.1c69fb81.838b7.dda4SMTPIN_ADDED_BROKEN@mx.google.com> In-Reply-To: <5c81829b.1c69fb81.838b7.dda4SMTPIN_ADDED_BROKEN@mx.google.com> From: Ed Maste Date: Thu, 7 Mar 2019 15:47:35 -0500 Message-ID: Subject: Re: svn commit: r344898 - stable/12/share/mk To: "Rodney W. Grimes" Cc: Konstantin Belousov , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: B243C72380 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.173 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com X-Spamd-Result: default: False [-5.74 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-2.83)[ip: (-8.18), ipnet: 209.85.128.0/17(-3.84), asn: 15169(-2.05), country: US(-0.07)]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.90)[-0.902,0]; RCVD_IN_DNSWL_NONE(0.00)[173.166.85.209.list.dnswl.org : 127.0.5.0]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2019 20:47:56 -0000 On Thu, 7 Mar 2019 at 15:44, Rodney W. Grimes wrote: > > Would an UPDATING entry be warranted? I promised kib I will write one - will do so shortly. From owner-svn-src-stable-12@freebsd.org Thu Mar 7 20:48:42 2019 Return-Path: Delivered-To: svn-src-stable-12@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 E09C6152526F; Thu, 7 Mar 2019 20:48:41 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 565F6724D7; Thu, 7 Mar 2019 20:48:41 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x27KmcTF092285; Thu, 7 Mar 2019 12:48:38 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x27KmcWV092284; Thu, 7 Mar 2019 12:48:38 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903072048.x27KmcWV092284@ gndrsh.dnsmgr.net> Subject: Re: svn commit: r344898 - stable/12/share/mk In-Reply-To: To: Ed Maste Date: Thu, 7 Mar 2019 12:48:38 -0800 (PST) CC: "Rodney W. Grimes" , Konstantin Belousov , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 565F6724D7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.975,0] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2019 20:48:42 -0000 > On Thu, 7 Mar 2019 at 15:44, Rodney W. Grimes wrote: > > > > Would an UPDATING entry be warranted? > > I promised kib I will write one - will do so shortly. Thank you, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable-12@freebsd.org Thu Mar 7 21:30:27 2019 Return-Path: Delivered-To: svn-src-stable-12@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 9920C1526660; Thu, 7 Mar 2019 21:30:27 +0000 (UTC) (envelope-from emaste@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 3832573A71; Thu, 7 Mar 2019 21:30:27 +0000 (UTC) (envelope-from emaste@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 2DC79217BC; Thu, 7 Mar 2019 21:30:27 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x27LUQ9d081721; Thu, 7 Mar 2019 21:30:26 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x27LUQNJ081720; Thu, 7 Mar 2019 21:30:26 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201903072130.x27LUQNJ081720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 7 Mar 2019 21:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344899 - stable/12 X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12 X-SVN-Commit-Revision: 344899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3832573A71 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2019 21:30:27 -0000 Author: emaste Date: Thu Mar 7 21:30:26 2019 New Revision: 344899 URL: https://svnweb.freebsd.org/changeset/base/344899 Log: Add UPDATING entry for r344898 - RETPOLINE BROKEN_OPTIONS Sponsored by: The FreeBSD Foundation Modified: stable/12/UPDATING Modified: stable/12/UPDATING ============================================================================== --- stable/12/UPDATING Thu Mar 7 20:40:39 2019 (r344898) +++ stable/12/UPDATING Thu Mar 7 21:30:26 2019 (r344899) @@ -16,6 +16,11 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20190307: + The RETPOLINE option produces non-functional ifunc-using binaries + with Clang 7.0.1, and has been forced off (via BROKEN_OPTIONS). + Once Clang 8 is merged it may be enabled again. + 20190216: Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to 7.0.1. Please see the 20141231 entry below for information about From owner-svn-src-stable-12@freebsd.org Fri Mar 8 00:20:39 2019 Return-Path: Delivered-To: svn-src-stable-12@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 A9182152C31C; Fri, 8 Mar 2019 00:20:39 +0000 (UTC) (envelope-from jhb@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 4C88C81AD1; Fri, 8 Mar 2019 00:20:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 426792359B; Fri, 8 Mar 2019 00:20:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x280KdWe070901; Fri, 8 Mar 2019 00:20:39 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x280KbkJ070892; Fri, 8 Mar 2019 00:20:37 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903080020.x280KbkJ070892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 8 Mar 2019 00:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344905 - in stable: 11/sys/amd64/amd64 11/sys/arm/arm 11/sys/arm64/arm64 11/sys/i386/i386 11/sys/kern 11/sys/mips/mips 11/sys/powerpc/powerpc 11/sys/sys 12/sys/amd64/amd64 12/sys/arm/a... X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/amd64/amd64 11/sys/arm/arm 11/sys/arm64/arm64 11/sys/i386/i386 11/sys/kern 11/sys/mips/mips 11/sys/powerpc/powerpc 11/sys/sys 12/sys/amd64/amd64 12/sys/arm/arm 12/sys/arm64/arm64 12/... X-SVN-Commit-Revision: 344905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4C88C81AD1 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 00:20:39 -0000 Author: jhb Date: Fri Mar 8 00:20:37 2019 New Revision: 344905 URL: https://svnweb.freebsd.org/changeset/base/344905 Log: MFC 340020: Don't enter DDB for fatal traps before panic by default. Add a new 'debugger_on_trap' knob separate from 'debugger_on_panic' and make the calls to kdb_trap() in MD fatal trap handlers prior to calling panic() conditional on this new knob instead of 'debugger_on_panic'. Disable the new knob by default. Developers who wish to recover from a fatal fault by adjusting saved register state and retrying the faulting instruction can still do so by enabling the new knob. However, for the more common case this makes the user experience for panics due to a fatal fault match the user experience for other panics, e.g. 'c' in DDB will generate a crash dump and reboot the system rather than being stuck in an infinite loop of fatal fault messages and DDB prompts. Modified: stable/12/sys/amd64/amd64/trap.c stable/12/sys/arm/arm/trap-v4.c stable/12/sys/arm/arm/trap-v6.c stable/12/sys/arm64/arm64/trap.c stable/12/sys/i386/i386/trap.c stable/12/sys/kern/kern_shutdown.c stable/12/sys/mips/mips/trap.c stable/12/sys/powerpc/powerpc/trap.c stable/12/sys/sys/kdb.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/amd64/amd64/trap.c stable/11/sys/arm/arm/trap-v4.c stable/11/sys/arm/arm/trap-v6.c stable/11/sys/arm64/arm64/trap.c stable/11/sys/i386/i386/trap.c stable/11/sys/kern/kern_shutdown.c stable/11/sys/mips/mips/trap.c stable/11/sys/powerpc/powerpc/trap.c stable/11/sys/sys/kdb.h Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/amd64/amd64/trap.c ============================================================================== --- stable/12/sys/amd64/amd64/trap.c Thu Mar 7 23:03:39 2019 (r344904) +++ stable/12/sys/amd64/amd64/trap.c Fri Mar 8 00:20:37 2019 (r344905) @@ -933,7 +933,7 @@ trap_fatal(frame, eva) curproc->p_pid, curthread->td_name); #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; handled = kdb_trap(type, 0, frame); kdb_why = KDB_WHY_UNSET; Modified: stable/12/sys/arm/arm/trap-v4.c ============================================================================== --- stable/12/sys/arm/arm/trap-v4.c Thu Mar 7 23:03:39 2019 (r344904) +++ stable/12/sys/arm/arm/trap-v4.c Fri Mar 8 00:20:37 2019 (r344905) @@ -456,7 +456,7 @@ dab_fatal(struct trapframe *tf, u_int fsr, u_int far, printf(", pc =%08x\n\n", tf->tf_pc); #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; handled = kdb_trap(fsr, 0, tf); kdb_why = KDB_WHY_UNSET; Modified: stable/12/sys/arm/arm/trap-v6.c ============================================================================== --- stable/12/sys/arm/arm/trap-v6.c Thu Mar 7 23:03:39 2019 (r344904) +++ stable/12/sys/arm/arm/trap-v6.c Fri Mar 8 00:20:37 2019 (r344905) @@ -599,7 +599,7 @@ abort_fatal(struct trapframe *tf, u_int idx, u_int fsr printf(", pc =%08x\n\n", tf->tf_pc); #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; kdb_trap(fsr, 0, tf); kdb_why = KDB_WHY_UNSET; Modified: stable/12/sys/arm64/arm64/trap.c ============================================================================== --- stable/12/sys/arm64/arm64/trap.c Thu Mar 7 23:03:39 2019 (r344904) +++ stable/12/sys/arm64/arm64/trap.c Fri Mar 8 00:20:37 2019 (r344905) @@ -256,7 +256,7 @@ no_pmap_fault: printf(" esr: %.8lx\n", esr); #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; handled = kdb_trap(ESR_ELx_EXCEPTION(esr), 0, frame); Modified: stable/12/sys/i386/i386/trap.c ============================================================================== --- stable/12/sys/i386/i386/trap.c Thu Mar 7 23:03:39 2019 (r344904) +++ stable/12/sys/i386/i386/trap.c Fri Mar 8 00:20:37 2019 (r344905) @@ -977,7 +977,7 @@ trap_fatal(frame, eva) curproc->p_pid, curthread->td_name); #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; frame->tf_err = eva; /* smuggle fault address to ddb */ handled = kdb_trap(type, 0, frame); Modified: stable/12/sys/kern/kern_shutdown.c ============================================================================== --- stable/12/sys/kern/kern_shutdown.c Thu Mar 7 23:03:39 2019 (r344904) +++ stable/12/sys/kern/kern_shutdown.c Fri Mar 8 00:20:37 2019 (r344905) @@ -115,13 +115,18 @@ SYSCTL_INT(_kern, OID_AUTO, panic_reboot_wait_time, CT #ifdef KDB #ifdef KDB_UNATTENDED -int debugger_on_panic = 0; +static int debugger_on_panic = 0; #else -int debugger_on_panic = 1; +static int debugger_on_panic = 1; #endif SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic, CTLFLAG_RWTUN | CTLFLAG_SECURE, &debugger_on_panic, 0, "Run debugger on kernel panic"); + +int debugger_on_trap = 0; +SYSCTL_INT(_debug, OID_AUTO, debugger_on_trap, + CTLFLAG_RWTUN | CTLFLAG_SECURE, + &debugger_on_trap, 0, "Run debugger on kernel trap before panic"); #ifdef KDB_TRACE static int trace_on_panic = 1; Modified: stable/12/sys/mips/mips/trap.c ============================================================================== --- stable/12/sys/mips/mips/trap.c Thu Mar 7 23:03:39 2019 (r344904) +++ stable/12/sys/mips/mips/trap.c Fri Mar 8 00:20:37 2019 (r344905) @@ -1100,7 +1100,7 @@ err: #endif #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; kdb_trap(type, 0, trapframe); kdb_why = KDB_WHY_UNSET; Modified: stable/12/sys/powerpc/powerpc/trap.c ============================================================================== --- stable/12/sys/powerpc/powerpc/trap.c Thu Mar 7 23:03:39 2019 (r344904) +++ stable/12/sys/powerpc/powerpc/trap.c Fri Mar 8 00:20:37 2019 (r344905) @@ -455,7 +455,7 @@ trap_fatal(struct trapframe *frame) printtrap(frame->exc, frame, 1, (frame->srr1 & PSL_PR)); #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; handled = kdb_trap(frame->exc, 0, frame); kdb_why = KDB_WHY_UNSET; Modified: stable/12/sys/sys/kdb.h ============================================================================== --- stable/12/sys/sys/kdb.h Thu Mar 7 23:03:39 2019 (r344904) +++ stable/12/sys/sys/kdb.h Fri Mar 8 00:20:37 2019 (r344905) @@ -62,7 +62,7 @@ struct kdb_dbbe { DATA_SET(kdb_dbbe_set, name##_dbbe) extern u_char kdb_active; /* Non-zero while in debugger. */ -extern int debugger_on_panic; /* enter the debugger on panic. */ +extern int debugger_on_trap; /* enter the debugger on trap. */ extern struct kdb_dbbe *kdb_dbbe; /* Default debugger backend or NULL. */ extern struct trapframe *kdb_frame; /* Frame to kdb_trap(). */ extern struct pcb *kdb_thrctx; /* Current context. */ From owner-svn-src-stable-12@freebsd.org Fri Mar 8 00:53:12 2019 Return-Path: Delivered-To: svn-src-stable-12@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 5C568152D000; Fri, 8 Mar 2019 00:53:12 +0000 (UTC) (envelope-from mav@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 01D1582F36; Fri, 8 Mar 2019 00:53:12 +0000 (UTC) (envelope-from mav@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 E526323C4D; Fri, 8 Mar 2019 00:53:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x280rB6x091748; Fri, 8 Mar 2019 00:53:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x280rBDG091747; Fri, 8 Mar 2019 00:53:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903080053.x280rBDG091747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 8 Mar 2019 00:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344906 - stable/12/sys/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/conf X-SVN-Commit-Revision: 344906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 01D1582F36 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 00:53:12 -0000 Author: mav Date: Fri Mar 8 00:53:11 2019 New Revision: 344906 URL: https://svnweb.freebsd.org/changeset/base/344906 Log: MFC r344702: There is no `device atacard` but there is `device atapccard`. Modified: stable/12/sys/conf/NOTES Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/NOTES ============================================================================== --- stable/12/sys/conf/NOTES Fri Mar 8 00:20:37 2019 (r344905) +++ stable/12/sys/conf/NOTES Fri Mar 8 00:53:11 2019 (r344906) @@ -1776,7 +1776,7 @@ device ata # Modular ATA #device atacore # Core ATA functionality -#device atacard # CARDBUS support +#device atapccard # CARDBUS support #device ataisa # ISA bus support #device atapci # PCI bus support; only generic chipset support From owner-svn-src-stable-12@freebsd.org Fri Mar 8 00:54:36 2019 Return-Path: Delivered-To: svn-src-stable-12@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 1E02B152D0C5; Fri, 8 Mar 2019 00:54:36 +0000 (UTC) (envelope-from mav@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 9BAC6831AB; Fri, 8 Mar 2019 00:54:35 +0000 (UTC) (envelope-from mav@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 8EE6D23C4F; Fri, 8 Mar 2019 00:54:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x280sZ3p091923; Fri, 8 Mar 2019 00:54:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x280sZlx091922; Fri, 8 Mar 2019 00:54:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903080054.x280sZlx091922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 8 Mar 2019 00:54:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344908 - in stable/12: share/man/man4 sys/dev/isp X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/isp X-SVN-Commit-Revision: 344908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9BAC6831AB 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.944,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 00:54:36 -0000 Author: mav Date: Fri Mar 8 00:54:34 2019 New Revision: 344908 URL: https://svnweb.freebsd.org/changeset/base/344908 Log: MFC r344660: Add to isp(4) tunables to limit MSI/MSI-X usage. There are some problem reports possibly related to the new driver use of multiple interrupts on older cards. Hopefully this allow to workaround them. Modified: stable/12/share/man/man4/isp.4 stable/12/sys/dev/isp/isp_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/isp.4 ============================================================================== --- stable/12/share/man/man4/isp.4 Fri Mar 8 00:53:33 2019 (r344907) +++ stable/12/share/man/man4/isp.4 Fri Mar 8 00:54:34 2019 (r344908) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 27, 2018 +.Dd February 28, 2019 .Dt ISP 4 .Os .Sh NAME @@ -163,15 +163,19 @@ The following options are switchable by setting values .Pp They are: .Bl -tag -width indent -.It Va hint.isp.0.fwload_disable +.It Va hint.isp. Ns Ar N Ns Va .msi +Limit on number of Message Signaled Interrupts (MSI) to be used. +.It Va hint.isp. Ns Ar N Ns Va .msix +Limit on number of Extended Message Signaled Interrupts (MSI-X) to be used. +.It Va hint.isp. Ns Ar N Ns Va .fwload_disable A hint value to disable loading of firmware .Xr ispfw 4 . -.It Va hint.isp.0.ignore_nvram +.It Va hint.isp. Ns Ar N Ns Va .ignore_nvram A hint value to ignore board NVRAM settings for. Otherwise use NVRAM settings. -.It Va hint.isp.0.fullduplex +.It Va hint.isp. Ns Ar N Ns Va .fullduplex A hint value to set full duplex mode. -.It Va hint.isp.0.topology +.It Va hint.isp. Ns Ar N Ns Va .topology A hint value to select topology of connection. Supported values are: .Pp @@ -185,48 +189,48 @@ Loopback only. .It Li nport-only Point to point only. .El -.It Va hint.isp.0.portwwn +.It Va hint.isp. Ns Ar N Ns Va .portwwn This should be the full 64 bit World Wide Port Name you would like to use, overriding the value in NVRAM for the card. -.It Va hint.isp.0.nodewwn +.It Va hint.isp. Ns Ar N Ns Va .nodewwn This should be the full 64 bit World Wide Node Name you would like to use, overriding the value in NVRAM for the card. -.It Va hint.isp.0.iid +.It Va hint.isp. Ns Ar N Ns Va .iid A hint to override or set the Initiator ID or Loop ID. For Fibre Channel cards in Local Loop topologies it is .Ar strongly recommended that you set this value to non-zero. -.It Va hint.isp.0.role +.It Va hint.isp. Ns Ar N Ns Va .role A hint to define default role for isp instance (0 -- none, 1 -- target, 2 -- initiator, 3 -- both). -.It Va hint.isp.0.debug +.It Va hint.isp. Ns Ar N Ns Va .debug A hint value for a driver debug level (see the file .Pa /usr/src/sys/dev/isp/ispvar.h for the values. -.It Va hint.isp.0.vports +.It Va hint.isp. Ns Ar N Ns Va .vports A hint to create specified number of additional virtual ports. -.It Va hint.isp.0.nofctape +.It Va hint.isp. Ns Ar N Ns Va .nofctape Set this to 1 to disable FC-Tape operation on the given isp instance. -.It Va hint.isp.0.fctape +.It Va hint.isp. Ns Ar N Ns Va .fctape Set this to 1 to enable FC-Tape operation on the given isp instance for targets that support it. .El .Sh SYSCTL OPTIONS .Bl -tag -width indent -.It Va dev.isp.N.loop_down_limit +.It Va dev.isp. Ns Ar N Ns Va .loop_down_limit This value says how long to wait in seconds after loop has gone down before giving up and expiring all of the devices that were visible. The default is 300 seconds (5 minutes). A separate (nonadjustable) timeout is used when booting to not stop booting on lack of FC connectivity. -.It Va dev.isp.N.gone_device_time +.It Va dev.isp. Ns Ar N Ns Va .gone_device_time This value says how long to wait for devices to reappear if they (temporarily) disappear due to loop or fabric events. While this timeout is running, I/O to those devices will simply be held. -.It Va dev.isp.N.use_gff_id -.It Va dev.isp.N.use_gft_id +.It Va dev.isp. Ns Ar N Ns Va .use_gff_id +.It Va dev.isp. Ns Ar N Ns Va .use_gft_id Setting those options to 0 allows to disable use of GFF_ID and GFT_ID SNS requests during FC fabric scan. It may be useful if switch does not implement them correctly, @@ -234,9 +238,9 @@ preventing some devices from being found. Disabling them may cause unneeded logins to ports not supporting target role or even FCP at all. The default is 1 (enabled). -.It Va dev.isp.N.wwnn +.It Va dev.isp. Ns Ar N Ns Va .wwnn This is the readonly World Wide Node Name value for this port. -.It Va dev.isp.N.wwpn +.It Va dev.isp. Ns Ar N Ns Va .wwpn This is the readonly World Wide Port Name value for this port. .El .Sh SEE ALSO Modified: stable/12/sys/dev/isp/isp_pci.c ============================================================================== --- stable/12/sys/dev/isp/isp_pci.c Fri Mar 8 00:53:33 2019 (r344907) +++ stable/12/sys/dev/isp/isp_pci.c Fri Mar 8 00:54:34 2019 (r344908) @@ -1910,14 +1910,21 @@ isp_pci_irqsetup(ispsoftc_t *isp) ISP_UNLOCK(isp); if (ISP_CAP_MSIX(isp)) { - max_irq = min(ISP_MAX_IRQS, IS_26XX(isp) ? 3 : 2); + max_irq = IS_26XX(isp) ? 3 : 2; + resource_int_value(device_get_name(dev), + device_get_unit(dev), "msix", &max_irq); + max_irq = imin(ISP_MAX_IRQS, max_irq); pcs->msicount = imin(pci_msix_count(dev), max_irq); if (pcs->msicount > 0 && pci_alloc_msix(dev, &pcs->msicount) != 0) pcs->msicount = 0; } if (pcs->msicount == 0) { - pcs->msicount = imin(pci_msi_count(dev), 1); + max_irq = 1; + resource_int_value(device_get_name(dev), + device_get_unit(dev), "msi", &max_irq); + max_irq = imin(1, max_irq); + pcs->msicount = imin(pci_msi_count(dev), max_irq); if (pcs->msicount > 0 && pci_alloc_msi(dev, &pcs->msicount) != 0) pcs->msicount = 0; From owner-svn-src-stable-12@freebsd.org Fri Mar 8 00:56:08 2019 Return-Path: Delivered-To: svn-src-stable-12@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 1FC72152D1CE; Fri, 8 Mar 2019 00:56:08 +0000 (UTC) (envelope-from mav@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 B7D5B8344E; Fri, 8 Mar 2019 00:56:07 +0000 (UTC) (envelope-from mav@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 AD95E23C51; Fri, 8 Mar 2019 00:56:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x280u7dc092126; Fri, 8 Mar 2019 00:56:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x280u7g2092125; Fri, 8 Mar 2019 00:56:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201903080056.x280u7g2092125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 8 Mar 2019 00:56:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344910 - stable/12/sys/dev/isp X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/isp X-SVN-Commit-Revision: 344910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B7D5B8344E 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)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 00:56:08 -0000 Author: mav Date: Fri Mar 8 00:56:07 2019 New Revision: 344910 URL: https://svnweb.freebsd.org/changeset/base/344910 Log: MFC r344661, r344669: Limit 24xx adapters to only MSI interrupts by default. This was actually the known good configuration we used before. Single MSI-X configuration doesn't even work there on my tests, just due to lack of documentation not sure whether by design or I am doing something wrong. Modified: stable/12/sys/dev/isp/isp_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/isp/isp_pci.c ============================================================================== --- stable/12/sys/dev/isp/isp_pci.c Fri Mar 8 00:54:54 2019 (r344909) +++ stable/12/sys/dev/isp/isp_pci.c Fri Mar 8 00:56:07 2019 (r344910) @@ -1910,7 +1910,7 @@ isp_pci_irqsetup(ispsoftc_t *isp) ISP_UNLOCK(isp); if (ISP_CAP_MSIX(isp)) { - max_irq = IS_26XX(isp) ? 3 : 2; + max_irq = IS_26XX(isp) ? 3 : (IS_25XX(isp) ? 2 : 0); resource_int_value(device_get_name(dev), device_get_unit(dev), "msix", &max_irq); max_irq = imin(ISP_MAX_IRQS, max_irq); From owner-svn-src-stable-12@freebsd.org Fri Mar 8 01:04:20 2019 Return-Path: Delivered-To: svn-src-stable-12@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 4815A152D4DB; Fri, 8 Mar 2019 01:04:20 +0000 (UTC) (envelope-from jhb@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 D178283A0F; Fri, 8 Mar 2019 01:04:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0DE923DF5; Fri, 8 Mar 2019 01:04:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2814JnL097141; Fri, 8 Mar 2019 01:04:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2814JQQ097139; Fri, 8 Mar 2019 01:04:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903080104.x2814JQQ097139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 8 Mar 2019 01:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344912 - in stable: 11/sys/x86/x86 11/sys/x86/xen 12/sys/x86/x86 12/sys/x86/xen X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/x86/x86 11/sys/x86/xen 12/sys/x86/x86 12/sys/x86/xen X-SVN-Commit-Revision: 344912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D178283A0F 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)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 01:04:20 -0000 Author: jhb Date: Fri Mar 8 01:04:19 2019 New Revision: 344912 URL: https://svnweb.freebsd.org/changeset/base/344912 Log: MFC 342658: Correct variable name in two panic messages: num_msi_irq -> num_msi_irqs. Modified: stable/12/sys/x86/x86/msi.c stable/12/sys/x86/xen/xen_msi.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/x86/x86/msi.c stable/11/sys/x86/xen/xen_msi.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/x86/x86/msi.c ============================================================================== --- stable/12/sys/x86/x86/msi.c Fri Mar 8 00:56:41 2019 (r344911) +++ stable/12/sys/x86/x86/msi.c Fri Mar 8 01:04:19 2019 (r344912) @@ -341,7 +341,7 @@ msi_init(void) first_msi_irq = max(MINIMUM_MSI_INT, num_io_irqs); if (num_msi_irqs > UINT_MAX - first_msi_irq) - panic("num_msi_irq too high"); + panic("num_msi_irqs too high"); num_io_irqs = first_msi_irq + num_msi_irqs; msi_enabled = 1; Modified: stable/12/sys/x86/xen/xen_msi.c ============================================================================== --- stable/12/sys/x86/xen/xen_msi.c Fri Mar 8 00:56:41 2019 (r344911) +++ stable/12/sys/x86/xen/xen_msi.c Fri Mar 8 01:04:19 2019 (r344912) @@ -59,7 +59,7 @@ xen_msi_init(void) MPASS(num_io_irqs > 0); first_msi_irq = min(MINIMUM_MSI_INT, num_io_irqs); if (num_msi_irqs > UINT_MAX - first_msi_irq) - panic("num_msi_irq too high"); + panic("num_msi_irqs too high"); num_io_irqs = first_msi_irq + num_msi_irqs; mtx_init(&msi_lock, "msi", NULL, MTX_DEF); From owner-svn-src-stable-12@freebsd.org Fri Mar 8 08:26:08 2019 Return-Path: Delivered-To: svn-src-stable-12@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 EB9C11536466; Fri, 8 Mar 2019 08:26:07 +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 6113F6A095; Fri, 8 Mar 2019 08:26:07 +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 4D98528932; Fri, 8 Mar 2019 08:26:07 +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 x288Q7aH028262; Fri, 8 Mar 2019 08:26:07 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x288Q7so028261; Fri, 8 Mar 2019 08:26:07 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <201903080826.x288Q7so028261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Fri, 8 Mar 2019 08:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344917 - stable/12/tools/tools/netmap X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/tools/tools/netmap X-SVN-Commit-Revision: 344917 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6113F6A095 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)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.947,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 08:26:08 -0000 Author: vmaffione Date: Fri Mar 8 08:26:06 2019 New Revision: 344917 URL: https://svnweb.freebsd.org/changeset/base/344917 Log: MFC r344696: netmap: pkt-gen: fix bug in send_packets() The send_packets() function was using ring->cur as index to scan the transmit ring. This function may also set ring->cur ahead of ring->head, in case no more slots are available. However, the function also uses nm_ring_space() which looks at ring->head to check how many slots are available. If ring->head and ring->cur are different, this results in pkt-gen advancing ring->cur beyond ring->tail. This patch fixes send_packets() (and similar source locations) to use ring->head as a index, rather than using ring->cur. Modified: stable/12/tools/tools/netmap/pkt-gen.c Directory Properties: stable/12/ (props changed) Modified: stable/12/tools/tools/netmap/pkt-gen.c ============================================================================== --- stable/12/tools/tools/netmap/pkt-gen.c Fri Mar 8 04:20:33 2019 (r344916) +++ stable/12/tools/tools/netmap/pkt-gen.c Fri Mar 8 08:26:06 2019 (r344917) @@ -626,10 +626,10 @@ parse_nmr_config(const char* conf, struct nmreq *nmr) char *w, *tok; int i, v; - nmr->nr_tx_rings = nmr->nr_rx_rings = 0; - nmr->nr_tx_slots = nmr->nr_rx_slots = 0; if (conf == NULL || ! *conf) return 0; + nmr->nr_tx_rings = nmr->nr_rx_rings = 0; + nmr->nr_tx_slots = nmr->nr_rx_slots = 0; w = strdup(conf); for (i = 0, tok = strtok(w, ","); tok; i++, tok = strtok(NULL, ",")) { v = atoi(tok); @@ -1158,22 +1158,22 @@ static int send_packets(struct netmap_ring *ring, struct pkt *pkt, void *frame, int size, struct targ *t, u_int count, int options) { - u_int n, sent, cur = ring->cur; + u_int n, sent, head = ring->head; u_int frags = t->frags; u_int frag_size = t->frag_size; - struct netmap_slot *slot = &ring->slot[cur]; + struct netmap_slot *slot = &ring->slot[head]; n = nm_ring_space(ring); #if 0 if (options & (OPT_COPY | OPT_PREFETCH) ) { for (sent = 0; sent < count; sent++) { - struct netmap_slot *slot = &ring->slot[cur]; + struct netmap_slot *slot = &ring->slot[head]; char *p = NETMAP_BUF(ring, slot->buf_idx); __builtin_prefetch(p); - cur = nm_ring_next(ring, cur); + head = nm_ring_next(ring, head); } - cur = ring->cur; + head = ring->head; } #endif for (sent = 0; sent < count && n >= frags; sent++, n--) { @@ -1181,7 +1181,7 @@ send_packets(struct netmap_ring *ring, struct pkt *pkt int buf_changed; u_int tosend = size; - slot = &ring->slot[cur]; + slot = &ring->slot[head]; p = NETMAP_BUF(ring, slot->buf_idx); buf_changed = slot->flags & NS_BUF_CHANGED; @@ -1200,11 +1200,11 @@ send_packets(struct netmap_ring *ring, struct pkt *pkt slot->len = frag_size; slot->flags = NS_MOREFRAG; if (options & OPT_DUMP) - dump_payload(fp, frag_size, ring, cur); + dump_payload(fp, frag_size, ring, head); tosend -= frag_size; f += frag_size; - cur = nm_ring_next(ring, cur); - slot = &ring->slot[cur]; + head = nm_ring_next(ring, head); + slot = &ring->slot[head]; fp = NETMAP_BUF(ring, slot->buf_idx); } n -= (frags - 1); @@ -1223,12 +1223,12 @@ send_packets(struct netmap_ring *ring, struct pkt *pkt } slot->len = tosend; if (options & OPT_DUMP) - dump_payload(p, tosend, ring, cur); - cur = nm_ring_next(ring, cur); + dump_payload(p, tosend, ring, head); + head = nm_ring_next(ring, head); } if (sent) { slot->flags |= NS_REPORT; - ring->head = ring->cur = cur; + ring->head = ring->cur = head; } if (sent < count) { /* tell netmap that we need more slots */ @@ -1329,7 +1329,7 @@ ping_body(void *data) if (n > 0 && n - sent < limit) limit = n - sent; for (m = 0; (unsigned)m < limit; m++) { - slot = &ring->slot[ring->cur]; + slot = &ring->slot[ring->head]; slot->len = size; p = NETMAP_BUF(ring, slot->buf_idx); @@ -1345,7 +1345,7 @@ ping_body(void *data) tp->sec = (uint32_t)ts.tv_sec; tp->nsec = (uint32_t)ts.tv_nsec; sent++; - ring->head = ring->cur = nm_ring_next(ring, ring->cur); + ring->head = ring->cur = nm_ring_next(ring, ring->head); } } if (m > 0) @@ -1381,7 +1381,7 @@ ping_body(void *data) struct tstamp *tp; int pos; - slot = &ring->slot[ring->cur]; + slot = &ring->slot[ring->head]; p = NETMAP_BUF(ring, slot->buf_idx); clock_gettime(CLOCK_REALTIME_PRECISE, &now); @@ -1406,7 +1406,7 @@ ping_body(void *data) pos = msb64(t_cur); buckets[pos]++; /* now store it in a bucket */ - ring->head = ring->cur = nm_ring_next(ring, ring->cur); + ring->head = ring->cur = nm_ring_next(ring, ring->head); rx++; } } @@ -1486,7 +1486,7 @@ pong_body(void *data) D("understood ponger %llu but don't know how to do it", (unsigned long long)n); while (!targ->cancel && (n == 0 || sent < n)) { - uint32_t txcur, txavail; + uint32_t txhead, txavail; //#define BUSYWAIT #ifdef BUSYWAIT ioctl(pfd.fd, NIOCRXSYNC, NULL); @@ -1499,24 +1499,24 @@ pong_body(void *data) } #endif txring = NETMAP_TXRING(nifp, targ->nmd->first_tx_ring); - txcur = txring->cur; + txhead = txring->head; txavail = nm_ring_space(txring); /* see what we got back */ for (i = targ->nmd->first_rx_ring; i <= targ->nmd->last_rx_ring; i++) { rxring = NETMAP_RXRING(nifp, i); while (!nm_ring_empty(rxring)) { uint16_t *spkt, *dpkt; - uint32_t cur = rxring->cur; - struct netmap_slot *slot = &rxring->slot[cur]; + uint32_t head = rxring->head; + struct netmap_slot *slot = &rxring->slot[head]; char *src, *dst; src = NETMAP_BUF(rxring, slot->buf_idx); //D("got pkt %p of size %d", src, slot->len); - rxring->head = rxring->cur = nm_ring_next(rxring, cur); + rxring->head = rxring->cur = nm_ring_next(rxring, head); rx++; if (txavail == 0) continue; dst = NETMAP_BUF(txring, - txring->slot[txcur].buf_idx); + txring->slot[txhead].buf_idx); /* copy... */ dpkt = (uint16_t *)dst; spkt = (uint16_t *)src; @@ -1528,13 +1528,13 @@ pong_body(void *data) dpkt[3] = spkt[0]; dpkt[4] = spkt[1]; dpkt[5] = spkt[2]; - txring->slot[txcur].len = slot->len; - txcur = nm_ring_next(txring, txcur); + txring->slot[txhead].len = slot->len; + txhead = nm_ring_next(txring, txhead); txavail--; sent++; } } - txring->head = txring->cur = txcur; + txring->head = txring->cur = txhead; targ->ctr.pkts = sent; #ifdef BUSYWAIT ioctl(pfd.fd, NIOCTXSYNC, NULL); @@ -1760,30 +1760,30 @@ receive_pcap(u_char *user, const struct pcap_pkthdr * static int receive_packets(struct netmap_ring *ring, u_int limit, int dump, uint64_t *bytes) { - u_int cur, rx, n; + u_int head, rx, n; uint64_t b = 0; u_int complete = 0; if (bytes == NULL) bytes = &b; - cur = ring->cur; + head = ring->head; n = nm_ring_space(ring); if (n < limit) limit = n; for (rx = 0; rx < limit; rx++) { - struct netmap_slot *slot = &ring->slot[cur]; + struct netmap_slot *slot = &ring->slot[head]; char *p = NETMAP_BUF(ring, slot->buf_idx); *bytes += slot->len; if (dump) - dump_payload(p, slot->len, ring, cur); + dump_payload(p, slot->len, ring, head); if (!(slot->flags & NS_MOREFRAG)) complete++; - cur = nm_ring_next(ring, cur); + head = nm_ring_next(ring, head); } - ring->head = ring->cur = cur; + ring->head = ring->cur = head; return (complete); } From owner-svn-src-stable-12@freebsd.org Fri Mar 8 15:48:20 2019 Return-Path: Delivered-To: svn-src-stable-12@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 3FFF4150E33A; Fri, 8 Mar 2019 15:48:20 +0000 (UTC) (envelope-from ngie@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 DC2DF8061B; Fri, 8 Mar 2019 15:48:19 +0000 (UTC) (envelope-from ngie@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 CE33E2D42B; Fri, 8 Mar 2019 15:48:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x28FmJv0057680; Fri, 8 Mar 2019 15:48:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x28FmJ8Z057679; Fri, 8 Mar 2019 15:48:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903081548.x28FmJ8Z057679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Fri, 8 Mar 2019 15:48:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344923 - stable/12/share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/12/share/mk X-SVN-Commit-Revision: 344923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DC2DF8061B 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)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 15:48:20 -0000 Author: ngie Date: Fri Mar 8 15:48:19 2019 New Revision: 344923 URL: https://svnweb.freebsd.org/changeset/base/344923 Log: MFC r343845: Clean up all directories created by `make hier` The logic I introduced in r322511 unfortunately left chflags schg'ed directories behind created by `make hier` (in the stock /etc/mtree files, this is limited to /var/empty). The proposed change calls `chflags -R 0` and `rm -Rf ...` to clean all of the directories that could not be removed by `${MAKE} clean`. `${MAKE} clean` in bsd.obj.mk calls `cleandir`/`cleanobj`, which handles the first directory tree walk/removal. Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D19174 Modified: stable/12/share/mk/suite.test.mk Directory Properties: stable/12/ (props changed) Modified: stable/12/share/mk/suite.test.mk ============================================================================== --- stable/12/share/mk/suite.test.mk Fri Mar 8 10:03:16 2019 (r344922) +++ stable/12/share/mk/suite.test.mk Fri Mar 8 15:48:19 2019 (r344923) @@ -120,5 +120,7 @@ beforecheck: # etc. aftercheck: @cd ${.CURDIR} && ${MAKE} clean + @chflags -R 0 "${DESTDIR}" + @rm -Rf "${DESTDIR}" .endif From owner-svn-src-stable-12@freebsd.org Fri Mar 8 18:53:56 2019 Return-Path: Delivered-To: svn-src-stable-12@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 DBEC91525F91; Fri, 8 Mar 2019 18:53:55 +0000 (UTC) (envelope-from jhb@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 7B51786B99; Fri, 8 Mar 2019 18:53:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68C5D2F495; Fri, 8 Mar 2019 18:53:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x28Irtwe058155; Fri, 8 Mar 2019 18:53:55 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x28IrtaD058154; Fri, 8 Mar 2019 18:53:55 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903081853.x28IrtaD058154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 8 Mar 2019 18:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344927 - in stable: 11 12 X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11 12 X-SVN-Commit-Revision: 344927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7B51786B99 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 18:53:56 -0000 Author: jhb Date: Fri Mar 8 18:53:54 2019 New Revision: 344927 URL: https://svnweb.freebsd.org/changeset/base/344927 Log: MFC 343048: Update the note about the need for COMPAT_FREEBSD kernel options. Rather than mentioning the requirement for 4.x binaries but not explaining why (it was assuming an upgrade from 4.x to 5.0-current), explain when compat options are needed (for running existing host binaries) in a more general way while using a more modern example (COMPAT_FREEBSD11 for 11.x binaries). While here, explicitly mention that a GENERIC kernel should always work. Modified: stable/12/UPDATING Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/UPDATING Directory Properties: stable/11/ (props changed) Modified: stable/12/UPDATING ============================================================================== --- stable/12/UPDATING Fri Mar 8 18:49:27 2019 (r344926) +++ stable/12/UPDATING Fri Mar 8 18:53:54 2019 (r344927) @@ -1867,12 +1867,13 @@ COMMON ITEMS: can be deleted by "make delete-old-libs", but you have to make sure that no program is using those libraries anymore. - [8] In order to have a kernel that can run the 4.x binaries needed to - do an installworld, you must include the COMPAT_FREEBSD4 option in - your kernel. Failure to do so may leave you with a system that is - hard to boot to recover. A similar kernel option COMPAT_FREEBSD5 is - required to run the 5.x binaries on more recent kernels. And so on - for COMPAT_FREEBSD6 and COMPAT_FREEBSD7. + [8] The new kernel must be able to run existing binaries used by + an installworld. When upgrading across major versions, the new + kernel's configuration must include the correct COMPAT_FREEBSD + option for existing binaries (e.g. COMPAT_FREEBSD11 to run 11.x + binaries). Failure to do so may leave you with a system that is + hard to boot to recover. A GENERIC kernel will include suitable + compatibility options to run binaries from older branches. Make sure that you merge any new devices from GENERIC since the last time you updated your kernel config file. From owner-svn-src-stable-12@freebsd.org Fri Mar 8 18:59:38 2019 Return-Path: Delivered-To: svn-src-stable-12@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 8572315261C7; Fri, 8 Mar 2019 18:59:38 +0000 (UTC) (envelope-from jhb@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 29C09870DE; Fri, 8 Mar 2019 18:59:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EC3A2F49D; Fri, 8 Mar 2019 18:59:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x28IxcbO058512; Fri, 8 Mar 2019 18:59:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x28Ixce3058511; Fri, 8 Mar 2019 18:59:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903081859.x28Ixce3058511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 8 Mar 2019 18:59:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344929 - stable/12/sys/dev/cxgbe/crypto X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/crypto X-SVN-Commit-Revision: 344929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 29C09870DE 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 18:59:38 -0000 Author: jhb Date: Fri Mar 8 18:59:37 2019 New Revision: 344929 URL: https://svnweb.freebsd.org/changeset/base/344929 Log: MFC 343056: Reject new sessions if the necessary queues aren't initialized. ccr reuses the control queue and first rx queue from the first port on each adapter. The driver cannot send requests until those queues are initialized. Refuse to create sessions for now if the queues aren't ready. This is a workaround until cxgbe allocates one or more dedicated queues for ccr. Modified: stable/12/sys/dev/cxgbe/crypto/t4_crypto.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/crypto/t4_crypto.c ============================================================================== --- stable/12/sys/dev/cxgbe/crypto/t4_crypto.c Fri Mar 8 18:58:41 2019 (r344928) +++ stable/12/sys/dev/cxgbe/crypto/t4_crypto.c Fri Mar 8 18:59:37 2019 (r344929) @@ -1652,12 +1652,6 @@ ccr_attach(device_t dev) struct ccr_softc *sc; int32_t cid; - /* - * TODO: Crypto requests will panic if the parent device isn't - * initialized so that the queues are up and running. Need to - * figure out how to handle that correctly, maybe just reject - * requests if the adapter isn't fully initialized? - */ sc = device_get_softc(dev); sc->dev = dev; sc->adapter = device_get_softc(device_get_parent(dev)); @@ -2058,6 +2052,16 @@ ccr_newsession(device_t dev, crypto_session_t cses, st } sc = device_get_softc(dev); + + /* + * XXX: Don't create a session if the queues aren't + * initialized. This is racy as the rxq can be destroyed by + * the associated VI detaching. Eventually ccr should use + * dedicated queues. + */ + if (sc->rxq->iq.adapter == NULL || sc->txq->adapter == NULL) + return (ENXIO); + mtx_lock(&sc->lock); if (sc->detaching) { mtx_unlock(&sc->lock); From owner-svn-src-stable-12@freebsd.org Fri Mar 8 19:03:29 2019 Return-Path: Delivered-To: svn-src-stable-12@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 1668E152641A; Fri, 8 Mar 2019 19:03:29 +0000 (UTC) (envelope-from jhb@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 AEE6B875DB; Fri, 8 Mar 2019 19:03:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 88A572F641; Fri, 8 Mar 2019 19:03:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x28J3SDj063424; Fri, 8 Mar 2019 19:03:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x28J3Scw063423; Fri, 8 Mar 2019 19:03:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903081903.x28J3Scw063423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 8 Mar 2019 19:03:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344931 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 344931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AEE6B875DB 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 19:03:29 -0000 Author: jhb Date: Fri Mar 8 19:03:28 2019 New Revision: 344931 URL: https://svnweb.freebsd.org/changeset/base/344931 Log: MFC 343456: Fix a few more places to handle ofld tx queues for RATELIMIT. - Drain offload transmit queues when RATELIMIT is enabled but TCP_OFFLOAD is not. - Expose the per-VI nofldtxq and first_ofld_txq sysctls when RATELIMIT is enabled but TCP_OFFLOAD is not. - Clear offload transmit queue stats as part of a 'cxgbetool clearstats' request when RATELIMIT is enabled but TCP_OFFLOAD is not. Modified: stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Fri Mar 8 19:01:31 2019 (r344930) +++ stable/12/sys/dev/cxgbe/t4_main.c Fri Mar 8 19:03:28 2019 (r344931) @@ -5389,6 +5389,8 @@ vi_full_uninit(struct vi_info *vi) struct sge_txq *txq; #ifdef TCP_OFFLOAD struct sge_ofld_rxq *ofld_rxq; +#endif +#if defined(TCP_OFFLOAD) || defined(RATELIMIT) struct sge_wrq *ofld_txq; #endif @@ -5404,7 +5406,7 @@ vi_full_uninit(struct vi_info *vi) quiesce_txq(sc, txq); } -#ifdef TCP_OFFLOAD +#if defined(TCP_OFFLOAD) || defined(RATELIMIT) for_each_ofld_txq(vi, i, ofld_txq) { quiesce_wrq(sc, ofld_txq); } @@ -6184,15 +6186,9 @@ vi_sysctls(struct vi_info *vi) SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nofldrxq", CTLFLAG_RD, &vi->nofldrxq, 0, "# of rx queues for offloaded TCP connections"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nofldtxq", CTLFLAG_RD, - &vi->nofldtxq, 0, - "# of tx queues for offloaded TCP connections"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "first_ofld_rxq", CTLFLAG_RD, &vi->first_ofld_rxq, 0, "index of first TOE rx queue"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, "first_ofld_txq", - CTLFLAG_RD, &vi->first_ofld_txq, 0, - "index of first TOE tx queue"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "holdoff_tmr_idx_ofld", CTLTYPE_INT | CTLFLAG_RW, vi, 0, sysctl_holdoff_tmr_idx_ofld, "I", @@ -6203,6 +6199,16 @@ vi_sysctls(struct vi_info *vi) "holdoff packet counter index for TOE queues"); } #endif +#if defined(TCP_OFFLOAD) || defined(RATELIMIT) + if (vi->nofldtxq != 0) { + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nofldtxq", CTLFLAG_RD, + &vi->nofldtxq, 0, + "# of tx queues for TOE/ETHOFLD"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "first_ofld_txq", + CTLFLAG_RD, &vi->first_ofld_txq, 0, + "index of first TOE/ETHOFLD tx queue"); + } +#endif #ifdef DEV_NETMAP if (vi->nnmrxq != 0) { SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nnmrxq", CTLFLAG_RD, @@ -9867,7 +9873,7 @@ t4_ioctl(struct cdev *dev, unsigned long cmd, caddr_t mp_ring_reset_stats(txq->r); } -#ifdef TCP_OFFLOAD +#if defined(TCP_OFFLOAD) || defined(RATELIMIT) /* nothing to clear for each ofld_rxq */ for_each_ofld_txq(vi, i, wrq) { From owner-svn-src-stable-12@freebsd.org Fri Mar 8 19:07:42 2019 Return-Path: Delivered-To: svn-src-stable-12@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 DE4161526562; Fri, 8 Mar 2019 19:07:42 +0000 (UTC) (envelope-from jhb@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 76E8E87800; Fri, 8 Mar 2019 19:07:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68D852F64A; Fri, 8 Mar 2019 19:07:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x28J7gRp063652; Fri, 8 Mar 2019 19:07:42 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x28J7g6K063651; Fri, 8 Mar 2019 19:07:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903081907.x28J7g6K063651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 8 Mar 2019 19:07:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344932 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 344932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 76E8E87800 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)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 19:07:43 -0000 Author: jhb Date: Fri Mar 8 19:07:41 2019 New Revision: 344932 URL: https://svnweb.freebsd.org/changeset/base/344932 Log: MFC 343620: Don't set IFCAP_TXRTLMT during lagg_clone_create(). lagg_capabilities() will set the capability once interfaces supporting the feature are added to the lagg. Setting it on a lagg without any interfaces is pointless as the if_snd_tag_alloc call will always fail in that case. Modified: stable/12/sys/net/if_lagg.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_lagg.c ============================================================================== --- stable/12/sys/net/if_lagg.c Fri Mar 8 19:03:28 2019 (r344931) +++ stable/12/sys/net/if_lagg.c Fri Mar 8 19:07:41 2019 (r344932) @@ -514,10 +514,8 @@ lagg_clone_create(struct if_clone *ifc, int unit, cadd ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; #ifdef RATELIMIT ifp->if_snd_tag_alloc = lagg_snd_tag_alloc; - ifp->if_capenable = ifp->if_capabilities = IFCAP_HWSTATS | IFCAP_TXRTLMT; -#else - ifp->if_capenable = ifp->if_capabilities = IFCAP_HWSTATS; #endif + ifp->if_capenable = ifp->if_capabilities = IFCAP_HWSTATS; /* * Attach as an ordinary ethernet device, children will be attached From owner-svn-src-stable-12@freebsd.org Fri Mar 8 19:20:47 2019 Return-Path: Delivered-To: svn-src-stable-12@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 6690615268E1; Fri, 8 Mar 2019 19:20:47 +0000 (UTC) (envelope-from jhb@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 0664287EFD; Fri, 8 Mar 2019 19:20:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E8E032F925; Fri, 8 Mar 2019 19:20:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x28JKku5068949; Fri, 8 Mar 2019 19:20:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x28JKkfm068948; Fri, 8 Mar 2019 19:20:46 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201903081920.x28JKkfm068948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 8 Mar 2019 19:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344933 - in stable: 11/sys/dev/cxgbe 12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/dev/cxgbe 12/sys/dev/cxgbe X-SVN-Commit-Revision: 344933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0664287EFD 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 19:20:47 -0000 Author: jhb Date: Fri Mar 8 19:20:46 2019 New Revision: 344933 URL: https://svnweb.freebsd.org/changeset/base/344933 Log: MFC 344671: Don't assume all children of a nexus are ports. Specifically, ccr(4) devices are also children of cxgbe nexus devices. Rather than making assumptions about the child device's softc, walk the list of ports from the nexus' softc to determine if a child is a port in t4_child_location_str(). This fixes a panic when detaching a ccr device. Modified: stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Fri Mar 8 19:07:41 2019 (r344932) +++ stable/12/sys/dev/cxgbe/t4_main.c Fri Mar 8 19:20:46 2019 (r344933) @@ -1354,10 +1354,19 @@ done: static int t4_child_location_str(device_t bus, device_t dev, char *buf, size_t buflen) { + struct adapter *sc; struct port_info *pi; + int i; - pi = device_get_softc(dev); - snprintf(buf, buflen, "port=%d", pi->port_id); + sc = device_get_softc(bus); + buf[0] = '\0'; + for_each_port(sc, i) { + pi = sc->port[i]; + if (pi != NULL && pi->dev == dev) { + snprintf(buf, buflen, "port=%d", pi->port_id); + break; + } + } return (0); } From owner-svn-src-stable-12@freebsd.org Sat Mar 9 00:32:01 2019 Return-Path: Delivered-To: svn-src-stable-12@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 8850B152F558; Sat, 9 Mar 2019 00:32:01 +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 11AFA93903; Sat, 9 Mar 2019 00:32:01 +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 061402E08; Sat, 9 Mar 2019 00:32:01 +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 x290W0u3038411; Sat, 9 Mar 2019 00:32:00 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x290W0Q6038410; Sat, 9 Mar 2019 00:32:00 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201903090032.x290W0Q6038410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 9 Mar 2019 00:32:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344953 - in stable: 11/contrib/ipfilter/ipsend/.OLD 12/contrib/ipfilter/ipsend/.OLD X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ipfilter/ipsend/.OLD 12/contrib/ipfilter/ipsend/.OLD X-SVN-Commit-Revision: 344953 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 11AFA93903 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2019 00:32:01 -0000 Author: cy Date: Sat Mar 9 00:32:00 2019 New Revision: 344953 URL: https://svnweb.freebsd.org/changeset/base/344953 Log: MFC r344838: Remove an empty directory emptied by r343702. Deleted: stable/12/contrib/ipfilter/ipsend/.OLD/ Modified: Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Deleted: stable/11/contrib/ipfilter/ipsend/.OLD/ Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-12@freebsd.org Sat Mar 9 10:28:37 2019 Return-Path: Delivered-To: svn-src-stable-12@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 D6BB4154092C; Sat, 9 Mar 2019 10:28:36 +0000 (UTC) (envelope-from kp@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 78AC38082F; Sat, 9 Mar 2019 10:28:36 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C5D09E0D; Sat, 9 Mar 2019 10:28:36 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x29ASaiX048824; Sat, 9 Mar 2019 10:28:36 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x29ASaKh048823; Sat, 9 Mar 2019 10:28:36 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903091028.x29ASaKh048823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 9 Mar 2019 10:28:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344963 - stable/12/sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/sys/netpfil/pf X-SVN-Commit-Revision: 344963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 78AC38082F 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)[-1.000,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2019 10:28:37 -0000 Author: kp Date: Sat Mar 9 10:28:36 2019 New Revision: 344963 URL: https://svnweb.freebsd.org/changeset/base/344963 Log: MFC r340073, r341359: pf: Keep a reference to struct ifnets we're using Ensure that the struct ifnet we use can't go away until we're done with it. pf: Fix panic on overlapping interface names In rare situations[*] it's possible for two different interfaces to have the same name. This confuses pf, because kifs are indexed by name (which is assumed to be unique). As a result we can end up trying to if_rele(NULL), which panics. Explicitly checking the ifp pointer before if_rele() prevents the panic. Note pf will likely behave in unexpected ways on the the overlapping interfaces. [*] Insert an interface in a vnet jail. Rename it to an interface which exists on the host. Remove the jail. There are now two interfaces with the same name in the host. Modified: stable/12/sys/netpfil/pf/pf_if.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/pf/pf_if.c ============================================================================== --- stable/12/sys/netpfil/pf/pf_if.c Sat Mar 9 10:24:39 2019 (r344962) +++ stable/12/sys/netpfil/pf/pf_if.c Sat Mar 9 10:28:36 2019 (r344963) @@ -165,8 +165,10 @@ pfi_cleanup_vnet(void) RB_REMOVE(pfi_ifhead, &V_pfi_ifs, kif); if (kif->pfik_group) kif->pfik_group->ifg_pf_kif = NULL; - if (kif->pfik_ifp) + if (kif->pfik_ifp) { + if_rele(kif->pfik_ifp); kif->pfik_ifp->if_pf_kif = NULL; + } free(kif, PFI_MTYPE); } @@ -322,6 +324,8 @@ pfi_attach_ifnet(struct ifnet *ifp) V_pfi_update++; kif = pfi_kif_attach(kif, ifp->if_xname); + if_ref(ifp); + kif->pfik_ifp = ifp; ifp->if_pf_kif = kif; @@ -847,6 +851,9 @@ pfi_detach_ifnet_event(void *arg __unused, struct ifne PF_RULES_WLOCK(); V_pfi_update++; pfi_kif_update(kif); + + if (kif->pfik_ifp) + if_rele(kif->pfik_ifp); kif->pfik_ifp = NULL; ifp->if_pf_kif = NULL; From owner-svn-src-stable-12@freebsd.org Sat Mar 9 10:35:38 2019 Return-Path: Delivered-To: svn-src-stable-12@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 47C011540E20; Sat, 9 Mar 2019 10:35:38 +0000 (UTC) (envelope-from kp@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 D30B38106B; Sat, 9 Mar 2019 10:35:37 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C12079FE7; Sat, 9 Mar 2019 10:35:37 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x29AZbeP054331; Sat, 9 Mar 2019 10:35:37 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x29AZbf5054330; Sat, 9 Mar 2019 10:35:37 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903091035.x29AZbf5054330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 9 Mar 2019 10:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344967 - stable/12/tests/sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/tests/sys/netpfil/pf X-SVN-Commit-Revision: 344967 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D30B38106B 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)[-1.000,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2019 10:35:38 -0000 Author: kp Date: Sat Mar 9 10:35:37 2019 New Revision: 344967 URL: https://svnweb.freebsd.org/changeset/base/344967 Log: MFC r344720: pf tests: Test for nested inline anchor issue PR: 196314 Modified: stable/12/tests/sys/netpfil/pf/pass_block.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/netpfil/pf/pass_block.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/pass_block.sh Sat Mar 9 10:34:42 2019 (r344966) +++ stable/12/tests/sys/netpfil/pf/pass_block.sh Sat Mar 9 10:35:37 2019 (r344967) @@ -129,9 +129,45 @@ noalias_cleanup() pft_cleanup } +atf_test_case "nested_inline" "cleanup" +nested_inline_head() +{ + atf_set descr "Test nested inline anchors, PR196314" + atf_set require.user root +} + +nested_inline_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a inet 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "block in" \ + "anchor \"an1\" {" \ + "pass in quick proto tcp to port time" \ + "anchor \"an2\" {" \ + "pass in quick proto icmp" \ + "}" \ + "}" + + atf_check -s exit:0 -o ignore ping -c 1 -t 1 192.0.2.2 +} + +nested_inline_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4" atf_add_test_case "v6" atf_add_test_case "noalias" + atf_add_test_case "nested_inline" } From owner-svn-src-stable-12@freebsd.org Sat Mar 9 10:33:48 2019 Return-Path: Delivered-To: svn-src-stable-12@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 73B141540DB5; Sat, 9 Mar 2019 10:33:48 +0000 (UTC) (envelope-from kp@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 119F680E77; Sat, 9 Mar 2019 10:33:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 06AB99FD5; Sat, 9 Mar 2019 10:33:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x29AXlCc054104; Sat, 9 Mar 2019 10:33:47 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x29AXl4O054103; Sat, 9 Mar 2019 10:33:47 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903091033.x29AXl4O054103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 9 Mar 2019 10:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344965 - stable/12/tests/sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/tests/sys/netpfil/pf X-SVN-Commit-Revision: 344965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 119F680E77 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)[-1.000,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2019 10:33:48 -0000 Author: kp Date: Sat Mar 9 10:33:47 2019 New Revision: 344965 URL: https://svnweb.freebsd.org/changeset/base/344965 Log: MFC r339836, r340286, r341358: pf tests: Test ':0' ignoring link-local addresses Fix test: sys.netpfil.pf.pass_block.noalias Replace hard-coded epair0b with the variable holds the real epair interface used for testing. pf tests: Make pass_block:noalias more robust Send several ICMPv6 echo requests. We've seen occasional failures with a single request. PR: 201695 Modified: stable/12/tests/sys/netpfil/pf/pass_block.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/netpfil/pf/pass_block.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/pass_block.sh Sat Mar 9 10:28:36 2019 (r344964) +++ stable/12/tests/sys/netpfil/pf/pass_block.sh Sat Mar 9 10:33:47 2019 (r344965) @@ -84,8 +84,54 @@ v6_cleanup() pft_cleanup } +atf_test_case "noalias" "cleanup" +noalias_head() +{ + atf_set descr 'Test the :0 noalias option' + atf_set require.user root +} + +noalias_body() +{ + pft_init + + epair=$(pft_mkepair) + ifconfig ${epair}a inet6 2001:db8:42::1/64 up no_dad + + pft_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b inet6 2001:db8:42::2/64 up no_dad + + linklocaladdr=$(jexec alcatraz ifconfig ${epair}b inet6 \ + | grep %${epair}b \ + | awk '{ print $2; }' \ + | cut -d % -f 1) + + # Sanity check + atf_check -s exit:0 -o ignore ping6 -c 3 -x 1 2001:db8:42::2 + atf_check -s exit:0 -o ignore ping6 -c 3 -x 1 ${linklocaladdr}%${epair}a + + jexec alcatraz pfctl -e + pft_set_rules alcatraz "block out inet6 from (${epair}b:0) to any" + + atf_check -s exit:2 -o ignore ping6 -c 3 -x 1 2001:db8:42::2 + + # We should still be able to ping the link-local address + atf_check -s exit:0 -o ignore ping6 -c 3 -x 1 ${linklocaladdr}%${epair}a + + pft_set_rules alcatraz "block out inet6 from (${epair}b) to any" + + # We cannot ping to the link-local address + atf_check -s exit:2 -o ignore ping6 -c 3 -x 1 ${linklocaladdr}%${epair}a +} + +noalias_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4" atf_add_test_case "v6" + atf_add_test_case "noalias" } From owner-svn-src-stable-12@freebsd.org Sat Mar 9 10:24:40 2019 Return-Path: Delivered-To: svn-src-stable-12@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 93C771540789; Sat, 9 Mar 2019 10:24:40 +0000 (UTC) (envelope-from kp@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 2BB4E80651; Sat, 9 Mar 2019 10:24:40 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B6EF9DF7; Sat, 9 Mar 2019 10:24:40 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x29AOdFS048584; Sat, 9 Mar 2019 10:24:39 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x29AOd0t048583; Sat, 9 Mar 2019 10:24:39 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903091024.x29AOd0t048583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 9 Mar 2019 10:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344962 - stable/12/tests/sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/tests/sys/netpfil/pf X-SVN-Commit-Revision: 344962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2BB4E80651 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)[-1.000,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2019 10:24:40 -0000 Author: kp Date: Sat Mar 9 10:24:39 2019 New Revision: 344962 URL: https://svnweb.freebsd.org/changeset/base/344962 Log: MFC r341360: pf tests: Test name handling Provoke a situation where two interfaces have the same name, and verify pf's reaction to this. Added: stable/12/tests/sys/netpfil/pf/names.sh - copied unchanged from r341360, head/tests/sys/netpfil/pf/names.sh Modified: stable/12/tests/sys/netpfil/pf/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/netpfil/pf/Makefile ============================================================================== --- stable/12/tests/sys/netpfil/pf/Makefile Sat Mar 9 03:24:39 2019 (r344961) +++ stable/12/tests/sys/netpfil/pf/Makefile Sat Mar 9 10:24:39 2019 (r344962) @@ -9,6 +9,7 @@ ATF_TESTS_SH+= anchor \ pass_block \ forward \ fragmentation \ + names \ nat \ set_tos \ rdr \ Copied: stable/12/tests/sys/netpfil/pf/names.sh (from r341360, head/tests/sys/netpfil/pf/names.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/tests/sys/netpfil/pf/names.sh Sat Mar 9 10:24:39 2019 (r344962, copy of r341360, head/tests/sys/netpfil/pf/names.sh) @@ -0,0 +1,34 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "names" "cleanup" +names_head() +{ + atf_set descr 'Test overlapping names' + atf_set require.user root +} + +names_body() +{ + pft_init + + epair=$(pft_mkepair) + + pft_mkjail alcatraz ${epair}b + ifconfig ${epair}a name foo + jexec alcatraz ifconfig ${epair}b name foo + + jail -r alcatraz + ifconfig foo destroy +} + +names_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "names" +} From owner-svn-src-stable-12@freebsd.org Sat Mar 9 10:34:46 2019 Return-Path: Delivered-To: svn-src-stable-12@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 5EB651540DF8; Sat, 9 Mar 2019 10:34:46 +0000 (UTC) (envelope-from kp@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 091B380F70; Sat, 9 Mar 2019 10:34:46 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6A6A9FDD; Sat, 9 Mar 2019 10:34:45 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x29AYjsF054223; Sat, 9 Mar 2019 10:34:45 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x29AYhkR054205; Sat, 9 Mar 2019 10:34:43 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201903091034.x29AYhkR054205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 9 Mar 2019 10:34:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344966 - in stable/12/tests/sys: . common netipsec/tunnel netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: in stable/12/tests/sys: . common netipsec/tunnel netpfil/pf X-SVN-Commit-Revision: 344966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 091B380F70 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2019 10:34:46 -0000 Author: kp Date: Sat Mar 9 10:34:42 2019 New Revision: 344966 URL: https://svnweb.freebsd.org/changeset/base/344966 Log: MFC r344764 tests: Move common (vnet) test functions into a common file The netipsec and pf tests have a number of common test functions. These used to be duplicated, but it makes more sense for them to re-use the common functions. PR: 236223 Added: stable/12/tests/sys/common/ - copied from r344764, head/tests/sys/common/ Modified: stable/12/tests/sys/Makefile stable/12/tests/sys/netipsec/tunnel/utils.subr stable/12/tests/sys/netpfil/pf/anchor.sh stable/12/tests/sys/netpfil/pf/forward.sh stable/12/tests/sys/netpfil/pf/fragmentation.sh stable/12/tests/sys/netpfil/pf/names.sh stable/12/tests/sys/netpfil/pf/nat.sh stable/12/tests/sys/netpfil/pf/pass_block.sh stable/12/tests/sys/netpfil/pf/pfsync.sh stable/12/tests/sys/netpfil/pf/rdr.sh stable/12/tests/sys/netpfil/pf/route_to.sh stable/12/tests/sys/netpfil/pf/set_skip.sh stable/12/tests/sys/netpfil/pf/set_tos.sh stable/12/tests/sys/netpfil/pf/synproxy.sh stable/12/tests/sys/netpfil/pf/utils.subr Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/Makefile ============================================================================== --- stable/12/tests/sys/Makefile Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/Makefile Sat Mar 9 10:34:42 2019 (r344966) @@ -39,4 +39,6 @@ _cddl= cddl # Items not integrated into kyua runs by default SUBDIR+= pjdfstest +SUBDIR+= common + .include Modified: stable/12/tests/sys/netipsec/tunnel/utils.subr ============================================================================== --- stable/12/tests/sys/netipsec/tunnel/utils.subr Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netipsec/tunnel/utils.subr Sat Mar 9 10:34:42 2019 (r344966) @@ -4,51 +4,29 @@ : ${TMPDIR=/tmp} +. $(atf_get_srcdir)/../../common/vnet.subr + ist_init() { - if [ "$(sysctl -i -n kern.features.vimage)" != 1 ]; then - atf_skip "This test requires VIMAGE" - fi + vnet_init } -pft_mkepair() -{ - ifname=$(ifconfig epair create) - echo $ifname >> created_interfaces.lst - echo ${ifname%a} -} - -pft_mkjail() -{ - jailname=$1 - shift - - vnet_interfaces= - for ifname in $@ - do - vnet_interfaces="${vnet_interfaces} vnet.interface=${ifname}" - done - jail -c name=${jailname} persist vnet ${vnet_interfaces} - - echo $jailname >> created_jails.lst -} - ist_labsetup () { - epair_LAN_A=$(pft_mkepair) + epair_LAN_A=$(vnet_mkepair) ifconfig ${epair_LAN_A}a up - epair_PUB_A=$(pft_mkepair) + epair_PUB_A=$(vnet_mkepair) ifconfig ${epair_PUB_A}a up - epair_LAN_B=$(pft_mkepair) + epair_LAN_B=$(vnet_mkepair) ifconfig ${epair_LAN_B}a up - epair_PUB_B=$(pft_mkepair) + epair_PUB_B=$(vnet_mkepair) ifconfig ${epair_PUB_B}a up - pft_mkjail hostA ${epair_LAN_A}a - pft_mkjail ipsecA ${epair_LAN_A}b ${epair_PUB_A}a - pft_mkjail router ${epair_PUB_A}b ${epair_PUB_B}b - pft_mkjail ipsecB ${epair_LAN_B}b ${epair_PUB_B}a - pft_mkjail hostB ${epair_LAN_B}a + vnet_mkjail hostA ${epair_LAN_A}a + vnet_mkjail ipsecA ${epair_LAN_A}b ${epair_PUB_A}a + vnet_mkjail router ${epair_PUB_A}b ${epair_PUB_B}b + vnet_mkjail ipsecB ${epair_LAN_B}b ${epair_PUB_B}a + vnet_mkjail hostB ${epair_LAN_B}a } ist_v4_setup () @@ -147,20 +125,5 @@ ist_test() } ist_cleanup() { - if [ -f created_jails.lst ]; then - for jailname in $(cat created_jails.lst) - do - jail -r ${jailname} - rm -f ${TMPDIR}/ipsec.${jailname}.conf - done - rm created_jails.lst - fi - - if [ -f created_interfaces.lst ]; then - for ifname in $(cat created_interfaces.lst) - do - ifconfig ${ifname} destroy - done - rm created_interfaces.lst - fi + vnet_cleanup } Modified: stable/12/tests/sys/netpfil/pf/anchor.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/anchor.sh Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netpfil/pf/anchor.sh Sat Mar 9 10:34:42 2019 (r344966) @@ -13,8 +13,8 @@ pr183198_body() { pft_init - epair=$(pft_mkepair) - pft_mkjail alcatraz ${epair}b + epair=$(vnet_mkepair) + vnet_mkjail alcatraz ${epair}b jexec alcatraz pfctl -e # Forward with pf enabled Modified: stable/12/tests/sys/netpfil/pf/forward.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/forward.sh Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netpfil/pf/forward.sh Sat Mar 9 10:34:42 2019 (r344966) @@ -16,13 +16,13 @@ v4_body() { pft_init - epair_send=$(pft_mkepair) + epair_send=$(vnet_mkepair) ifconfig ${epair_send}a 192.0.2.1/24 up - epair_recv=$(pft_mkepair) + epair_recv=$(vnet_mkepair) ifconfig ${epair_recv}a up - pft_mkjail alcatraz ${epair_send}b ${epair_recv}b + vnet_mkjail alcatraz ${epair_send}b ${epair_recv}b jexec alcatraz ifconfig ${epair_send}b 192.0.2.2/24 up jexec alcatraz ifconfig ${epair_recv}b 198.51.100.2/24 up jexec alcatraz sysctl net.inet.ip.forwarding=1 @@ -75,13 +75,13 @@ v6_body() { pft_init - epair_send=$(pft_mkepair) - epair_recv=$(pft_mkepair) + epair_send=$(vnet_mkepair) + epair_recv=$(vnet_mkepair) ifconfig ${epair_send}a inet6 2001:db8:42::1/64 up no_dad -ifdisabled ifconfig ${epair_recv}a up - pft_mkjail alcatraz ${epair_send}b ${epair_recv}b + vnet_mkjail alcatraz ${epair_send}b ${epair_recv}b jexec alcatraz ifconfig ${epair_send}b inet6 2001:db8:42::2/64 up no_dad jexec alcatraz ifconfig ${epair_recv}b inet6 2001:db8:43::2/64 up no_dad Modified: stable/12/tests/sys/netpfil/pf/fragmentation.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/fragmentation.sh Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netpfil/pf/fragmentation.sh Sat Mar 9 10:34:42 2019 (r344966) @@ -14,8 +14,8 @@ too_many_fragments_body() { pft_init - epair=$(pft_mkepair) - pft_mkjail alcatraz ${epair}a + epair=$(vnet_mkepair) + vnet_mkjail alcatraz ${epair}a ifconfig ${epair}b inet 192.0.2.1/24 up jexec alcatraz ifconfig ${epair}a 192.0.2.2/24 up @@ -57,11 +57,11 @@ v6_body() { pft_init - epair_send=$(pft_mkepair) - epair_link=$(pft_mkepair) + epair_send=$(vnet_mkepair) + epair_link=$(vnet_mkepair) - pft_mkjail alcatraz ${epair_send}b ${epair_link}a - pft_mkjail singsing ${epair_link}b + vnet_mkjail alcatraz ${epair_send}b ${epair_link}a + vnet_mkjail singsing ${epair_link}b ifconfig ${epair_send}a inet6 2001:db8:42::1/64 no_dad up Modified: stable/12/tests/sys/netpfil/pf/names.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/names.sh Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netpfil/pf/names.sh Sat Mar 9 10:34:42 2019 (r344966) @@ -13,9 +13,9 @@ names_body() { pft_init - epair=$(pft_mkepair) + epair=$(vnet_mkepair) - pft_mkjail alcatraz ${epair}b + vnet_mkjail alcatraz ${epair}b ifconfig ${epair}a name foo jexec alcatraz ifconfig ${epair}b name foo Modified: stable/12/tests/sys/netpfil/pf/nat.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/nat.sh Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netpfil/pf/nat.sh Sat Mar 9 10:34:42 2019 (r344966) @@ -13,11 +13,11 @@ exhaust_body() { pft_init - epair_nat=$(pft_mkepair) - epair_echo=$(pft_mkepair) + epair_nat=$(vnet_mkepair) + epair_echo=$(vnet_mkepair) - pft_mkjail nat ${epair_nat}b ${epair_echo}a - pft_mkjail echo ${epair_echo}b + vnet_mkjail nat ${epair_nat}b ${epair_echo}a + vnet_mkjail echo ${epair_echo}b ifconfig ${epair_nat}a 192.0.2.2/24 up route add -net 198.51.100.0/24 192.0.2.1 Modified: stable/12/tests/sys/netpfil/pf/pass_block.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/pass_block.sh Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netpfil/pf/pass_block.sh Sat Mar 9 10:34:42 2019 (r344966) @@ -13,11 +13,11 @@ v4_body() { pft_init - epair=$(pft_mkepair) + epair=$(vnet_mkepair) ifconfig ${epair}a 192.0.2.1/24 up # Set up a simple jail with one interface - pft_mkjail alcatraz ${epair}b + vnet_mkjail alcatraz ${epair}b jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up # Trivial ping to the jail, without pf @@ -52,11 +52,11 @@ v6_body() { pft_init - epair=$(pft_mkepair) + epair=$(vnet_mkepair) ifconfig ${epair}a inet6 2001:db8:42::1/64 up no_dad # Set up a simple jail with one interface - pft_mkjail alcatraz ${epair}b + vnet_mkjail alcatraz ${epair}b jexec alcatraz ifconfig ${epair}b inet6 2001:db8:42::2/64 up no_dad # Trivial ping to the jail, without pf @@ -95,10 +95,10 @@ noalias_body() { pft_init - epair=$(pft_mkepair) + epair=$(vnet_mkepair) ifconfig ${epair}a inet6 2001:db8:42::1/64 up no_dad - pft_mkjail alcatraz ${epair}b + vnet_mkjail alcatraz ${epair}b jexec alcatraz ifconfig ${epair}b inet6 2001:db8:42::2/64 up no_dad linklocaladdr=$(jexec alcatraz ifconfig ${epair}b inet6 \ Modified: stable/12/tests/sys/netpfil/pf/pfsync.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/pfsync.sh Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netpfil/pf/pfsync.sh Sat Mar 9 10:34:42 2019 (r344966) @@ -15,12 +15,12 @@ basic_body() { pfsynct_init - epair_sync=$(pft_mkepair) - epair_one=$(pft_mkepair) - epair_two=$(pft_mkepair) + epair_sync=$(vnet_mkepair) + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) - pft_mkjail one ${epair_one}a ${epair_sync}a - pft_mkjail two ${epair_two}a ${epair_sync}b + vnet_mkjail one ${epair_one}a ${epair_sync}a + vnet_mkjail two ${epair_two}a ${epair_sync}b # pfsync interface jexec one ifconfig ${epair_sync}a 192.0.2.1/24 up Modified: stable/12/tests/sys/netpfil/pf/rdr.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/rdr.sh Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netpfil/pf/rdr.sh Sat Mar 9 10:34:42 2019 (r344966) @@ -13,9 +13,9 @@ basic_body() { pft_init - epair=$(pft_mkepair) + epair=$(vnet_mkepair) - pft_mkjail alcatraz ${epair}b + vnet_mkjail alcatraz ${epair}b ifconfig ${epair}a 192.0.2.2/24 up route add -net 198.51.100.0/24 192.0.2.1 Modified: stable/12/tests/sys/netpfil/pf/route_to.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/route_to.sh Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netpfil/pf/route_to.sh Sat Mar 9 10:34:42 2019 (r344966) @@ -13,12 +13,12 @@ v4_body() { pft_init - epair_send=$(pft_mkepair) + epair_send=$(vnet_mkepair) ifconfig ${epair_send}a 192.0.2.1/24 up - epair_route=$(pft_mkepair) + epair_route=$(vnet_mkepair) ifconfig ${epair_route}a 203.0.113.1/24 up - pft_mkjail alcatraz ${epair_send}b ${epair_route}b + vnet_mkjail alcatraz ${epair_send}b ${epair_route}b jexec alcatraz ifconfig ${epair_send}b 192.0.2.2/24 up jexec alcatraz ifconfig ${epair_route}b 203.0.113.2/24 up jexec alcatraz route add -net 198.51.100.0/24 192.0.2.1 @@ -49,12 +49,12 @@ v6_body() { pft_init - epair_send=$(pft_mkepair) + epair_send=$(vnet_mkepair) ifconfig ${epair_send}a inet6 2001:db8:42::1/64 up no_dad -ifdisabled - epair_route=$(pft_mkepair) + epair_route=$(vnet_mkepair) ifconfig ${epair_route}a inet6 2001:db8:43::1/64 up no_dad -ifdisabled - pft_mkjail alcatraz ${epair_send}b ${epair_route}b + vnet_mkjail alcatraz ${epair_send}b ${epair_route}b jexec alcatraz ifconfig ${epair_send}b inet6 2001:db8:42::2/64 up no_dad jexec alcatraz ifconfig ${epair_route}b inet6 2001:db8:43::2/64 up no_dad jexec alcatraz route add -6 2001:db8:666::/64 2001:db8:42::2 Modified: stable/12/tests/sys/netpfil/pf/set_skip.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/set_skip.sh Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netpfil/pf/set_skip.sh Sat Mar 9 10:34:42 2019 (r344966) @@ -14,7 +14,7 @@ set_skip_group_body() # See PR 229241 pft_init - pft_mkjail alcatraz + vnet_mkjail alcatraz jexec alcatraz ifconfig lo0 127.0.0.1/8 up jexec alcatraz ifconfig lo0 group foo jexec alcatraz pfctl -e @@ -42,7 +42,7 @@ set_skip_group_lo_body() # See PR 229241 pft_init - pft_mkjail alcatraz + vnet_mkjail alcatraz jexec alcatraz ifconfig lo0 127.0.0.1/8 up jexec alcatraz pfctl -e pft_set_rules alcatraz "set skip on lo" \ Modified: stable/12/tests/sys/netpfil/pf/set_tos.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/set_tos.sh Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netpfil/pf/set_tos.sh Sat Mar 9 10:34:42 2019 (r344966) @@ -16,13 +16,13 @@ v4_body() { pft_init - epair_send=$(pft_mkepair) + epair_send=$(vnet_mkepair) ifconfig ${epair_send}a 192.0.2.1/24 up - epair_recv=$(pft_mkepair) + epair_recv=$(vnet_mkepair) ifconfig ${epair_recv}a up - pft_mkjail alcatraz ${epair_send}b ${epair_recv}b + vnet_mkjail alcatraz ${epair_send}b ${epair_recv}b jexec alcatraz ifconfig ${epair_send}b 192.0.2.2/24 up jexec alcatraz ifconfig ${epair_recv}b 198.51.100.2/24 up jexec alcatraz sysctl net.inet.ip.forwarding=1 Modified: stable/12/tests/sys/netpfil/pf/synproxy.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/synproxy.sh Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netpfil/pf/synproxy.sh Sat Mar 9 10:34:42 2019 (r344966) @@ -13,18 +13,18 @@ synproxy_body() { pft_init - epair=$(pft_mkepair) + epair=$(vnet_mkepair) ifconfig ${epair}a 192.0.2.1/24 up route add -net 198.51.100.0/24 192.0.2.2 - link=$(pft_mkepair) + link=$(vnet_mkepair) - pft_mkjail alcatraz ${epair}b ${link}a + vnet_mkjail alcatraz ${epair}b ${link}a jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up jexec alcatraz ifconfig ${link}a 198.51.100.1/24 up jexec alcatraz sysctl net.inet.ip.forwarding=1 - pft_mkjail singsing ${link}b + vnet_mkjail singsing ${link}b jexec singsing ifconfig ${link}b 198.51.100.2/24 up jexec singsing route add default 198.51.100.1 Modified: stable/12/tests/sys/netpfil/pf/utils.subr ============================================================================== --- stable/12/tests/sys/netpfil/pf/utils.subr Sat Mar 9 10:33:47 2019 (r344965) +++ stable/12/tests/sys/netpfil/pf/utils.subr Sat Mar 9 10:34:42 2019 (r344966) @@ -2,15 +2,15 @@ # Utility functions ## +. $(atf_get_srcdir)/../../common/vnet.subr + pft_init() { + vnet_init + if [ ! -c /dev/pf ]; then atf_skip "This test requires pf" fi - - if [ "`sysctl -i -n kern.features.vimage`" != 1 ]; then - atf_skip "This test requires VIMAGE" - fi } pfsynct_init() @@ -22,28 +22,6 @@ pfsynct_init() fi } -pft_mkepair() -{ - ifname=$(ifconfig epair create) - echo $ifname >> created_interfaces.lst - echo ${ifname%a} -} - -pft_mkjail() -{ - jailname=$1 - shift - - vnet_interfaces= - for ifname in $@ - do - vnet_interfaces="${vnet_interfaces} vnet.interface=${ifname}" - done - jail -c name=${jailname} persist vnet ${vnet_interfaces} - - echo $jailname >> created_jails.lst -} - pft_set_rules() { jname=$1 @@ -66,21 +44,7 @@ pft_set_rules() pft_cleanup() { - if [ -f created_jails.lst ]; then - for jailname in `cat created_jails.lst` - do - jail -r ${jailname} - done - rm created_jails.lst - fi - - if [ -f created_interfaces.lst ]; then - for ifname in `cat created_interfaces.lst` - do - ifconfig ${ifname} destroy - done - rm created_interfaces.lst - fi + vnet_cleanup } pfsynct_cleanup() From owner-svn-src-stable-12@freebsd.org Sat Mar 9 12:54:16 2019 Return-Path: Delivered-To: svn-src-stable-12@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 94E0015250A2; Sat, 9 Mar 2019 12:54:16 +0000 (UTC) (envelope-from avos@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 3805B86222; Sat, 9 Mar 2019 12:54:16 +0000 (UTC) (envelope-from avos@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 26AC3B83F; Sat, 9 Mar 2019 12:54:16 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x29CsGqW030269; Sat, 9 Mar 2019 12:54:16 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x29CsDEC030258; Sat, 9 Mar 2019 12:54:13 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903091254.x29CsDEC030258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 9 Mar 2019 12:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344969 - in stable: 11/sys/dev/malo 11/sys/dev/mwl 11/sys/dev/usb/wlan 11/sys/net80211 12/sys/dev/malo 12/sys/dev/mwl 12/sys/dev/usb/wlan 12/sys/net80211 X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable: 11/sys/dev/malo 11/sys/dev/mwl 11/sys/dev/usb/wlan 11/sys/net80211 12/sys/dev/malo 12/sys/dev/mwl 12/sys/dev/usb/wlan 12/sys/net80211 X-SVN-Commit-Revision: 344969 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3805B86222 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2019 12:54:16 -0000 Author: avos Date: Sat Mar 9 12:54:10 2019 New Revision: 344969 URL: https://svnweb.freebsd.org/changeset/base/344969 Log: MFC r343990: net80211: hide casts for 'i_seq' field offset calculation inside ieee80211_getqos() and reuse it in various places. Modified: stable/12/sys/dev/malo/if_malo.c stable/12/sys/dev/mwl/if_mwl.c stable/12/sys/dev/usb/wlan/if_run.c stable/12/sys/net80211/ieee80211_adhoc.c stable/12/sys/net80211/ieee80211_hostap.c stable/12/sys/net80211/ieee80211_ht.c stable/12/sys/net80211/ieee80211_mesh.c stable/12/sys/net80211/ieee80211_output.c stable/12/sys/net80211/ieee80211_proto.h stable/12/sys/net80211/ieee80211_sta.c stable/12/sys/net80211/ieee80211_wds.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/malo/if_malo.c stable/11/sys/dev/mwl/if_mwl.c stable/11/sys/dev/usb/wlan/if_run.c stable/11/sys/net80211/ieee80211_adhoc.c stable/11/sys/net80211/ieee80211_hostap.c stable/11/sys/net80211/ieee80211_ht.c stable/11/sys/net80211/ieee80211_mesh.c stable/11/sys/net80211/ieee80211_output.c stable/11/sys/net80211/ieee80211_proto.h stable/11/sys/net80211/ieee80211_sta.c stable/11/sys/net80211/ieee80211_wds.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/dev/malo/if_malo.c ============================================================================== --- stable/12/sys/dev/malo/if_malo.c Sat Mar 9 12:44:05 2019 (r344968) +++ stable/12/sys/dev/malo/if_malo.c Sat Mar 9 12:54:10 2019 (r344969) @@ -1051,13 +1051,9 @@ malo_tx_start(struct malo_softc *sc, struct ieee80211_ copyhdrlen = hdrlen = ieee80211_anyhdrsize(wh); pktlen = m0->m_pkthdr.len; if (IEEE80211_QOS_HAS_SEQ(wh)) { - if (IEEE80211_IS_DSTODS(wh)) { - qos = *(uint16_t *) - (((struct ieee80211_qosframe_addr4 *) wh)->i_qos); + qos = *(uint16_t *)ieee80211_getqos(wh); + if (IEEE80211_IS_DSTODS(wh)) copyhdrlen -= sizeof(qos); - } else - qos = *(uint16_t *) - (((struct ieee80211_qosframe *) wh)->i_qos); } else qos = 0; @@ -1952,7 +1948,6 @@ malo_rx_proc(void *arg, int npending) struct malo_rxdesc *ds; struct mbuf *m, *mnew; struct ieee80211_qosframe *wh; - struct ieee80211_qosframe_addr4 *wh4; struct ieee80211_node *ni; int off, len, hdrlen, pktlen, rssi, ntodo; uint8_t *data, status; @@ -2062,15 +2057,8 @@ malo_rx_proc(void *arg, int npending) /* NB: don't need to do this sometimes but ... */ /* XXX special case so we can memcpy after m_devget? */ ovbcopy(data + sizeof(uint16_t), wh, hdrlen); - if (IEEE80211_QOS_HAS_SEQ(wh)) { - if (IEEE80211_IS_DSTODS(wh)) { - wh4 = mtod(m, - struct ieee80211_qosframe_addr4*); - *(uint16_t *)wh4->i_qos = ds->qosctrl; - } else { - *(uint16_t *)wh->i_qos = ds->qosctrl; - } - } + if (IEEE80211_QOS_HAS_SEQ(wh)) + *(uint16_t *)ieee80211_getqos(wh) = ds->qosctrl; if (ieee80211_radiotap_active(ic)) { sc->malo_rx_th.wr_flags = 0; sc->malo_rx_th.wr_rate = ds->rate; Modified: stable/12/sys/dev/mwl/if_mwl.c ============================================================================== --- stable/12/sys/dev/mwl/if_mwl.c Sat Mar 9 12:44:05 2019 (r344968) +++ stable/12/sys/dev/mwl/if_mwl.c Sat Mar 9 12:54:10 2019 (r344969) @@ -2614,7 +2614,6 @@ mwl_rx_proc(void *arg, int npending) struct mwl_rxdesc *ds; struct mbuf *m; struct ieee80211_qosframe *wh; - struct ieee80211_qosframe_addr4 *wh4; struct ieee80211_node *ni; struct mwl_node *mn; int off, len, hdrlen, pktlen, rssi, ntodo; @@ -2761,15 +2760,8 @@ mwl_rx_proc(void *arg, int npending) /* NB: don't need to do this sometimes but ... */ /* XXX special case so we can memcpy after m_devget? */ ovbcopy(data + sizeof(uint16_t), wh, hdrlen); - if (IEEE80211_QOS_HAS_SEQ(wh)) { - if (IEEE80211_IS_DSTODS(wh)) { - wh4 = mtod(m, - struct ieee80211_qosframe_addr4*); - *(uint16_t *)wh4->i_qos = ds->QosCtrl; - } else { - *(uint16_t *)wh->i_qos = ds->QosCtrl; - } - } + if (IEEE80211_QOS_HAS_SEQ(wh)) + *(uint16_t *)ieee80211_getqos(wh) = ds->QosCtrl; /* * The f/w strips WEP header but doesn't clear * the WEP bit; mark the packet with M_WEP so @@ -3100,13 +3092,9 @@ mwl_tx_start(struct mwl_softc *sc, struct ieee80211_no copyhdrlen = hdrlen; pktlen = m0->m_pkthdr.len; if (IEEE80211_QOS_HAS_SEQ(wh)) { - if (IEEE80211_IS_DSTODS(wh)) { - qos = *(uint16_t *) - (((struct ieee80211_qosframe_addr4 *) wh)->i_qos); + qos = *(uint16_t *)ieee80211_getqos(wh); + if (IEEE80211_IS_DSTODS(wh)) copyhdrlen -= sizeof(qos); - } else - qos = *(uint16_t *) - (((struct ieee80211_qosframe *) wh)->i_qos); } else qos = 0; Modified: stable/12/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/12/sys/dev/usb/wlan/if_run.c Sat Mar 9 12:44:05 2019 (r344968) +++ stable/12/sys/dev/usb/wlan/if_run.c Sat Mar 9 12:54:10 2019 (r344969) @@ -3369,11 +3369,7 @@ run_tx(struct run_softc *sc, struct mbuf *m, struct ie if ((hasqos = IEEE80211_QOS_HAS_SEQ(wh))) { uint8_t *frm; - if(IEEE80211_HAS_ADDR4(wh)) - frm = ((struct ieee80211_qosframe_addr4 *)wh)->i_qos; - else - frm =((struct ieee80211_qosframe *)wh)->i_qos; - + frm = ieee80211_getqos(wh); qos = le16toh(*(const uint16_t *)frm); tid = qos & IEEE80211_QOS_TID; qid = TID_TO_WME_AC(tid); Modified: stable/12/sys/net80211/ieee80211_adhoc.c ============================================================================== --- stable/12/sys/net80211/ieee80211_adhoc.c Sat Mar 9 12:44:05 2019 (r344968) +++ stable/12/sys/net80211/ieee80211_adhoc.c Sat Mar 9 12:54:10 2019 (r344969) @@ -522,11 +522,9 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, /* * Save QoS bits for use below--before we strip the header. */ - if (subtype == IEEE80211_FC0_SUBTYPE_QOS) { - qos = (dir == IEEE80211_FC1_DIR_DSTODS) ? - ((struct ieee80211_qosframe_addr4 *)wh)->i_qos[0] : - ((struct ieee80211_qosframe *)wh)->i_qos[0]; - } else + if (subtype == IEEE80211_FC0_SUBTYPE_QOS) + qos = ieee80211_getqos(wh)[0]; + else qos = 0; /* Modified: stable/12/sys/net80211/ieee80211_hostap.c ============================================================================== --- stable/12/sys/net80211/ieee80211_hostap.c Sat Mar 9 12:44:05 2019 (r344968) +++ stable/12/sys/net80211/ieee80211_hostap.c Sat Mar 9 12:54:10 2019 (r344969) @@ -708,11 +708,9 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m /* * Save QoS bits for use below--before we strip the header. */ - if (subtype == IEEE80211_FC0_SUBTYPE_QOS) { - qos = (dir == IEEE80211_FC1_DIR_DSTODS) ? - ((struct ieee80211_qosframe_addr4 *)wh)->i_qos[0] : - ((struct ieee80211_qosframe *)wh)->i_qos[0]; - } else + if (subtype == IEEE80211_FC0_SUBTYPE_QOS) + qos = ieee80211_getqos(wh)[0]; + else qos = 0; /* Modified: stable/12/sys/net80211/ieee80211_ht.c ============================================================================== --- stable/12/sys/net80211/ieee80211_ht.c Sat Mar 9 12:44:05 2019 (r344968) +++ stable/12/sys/net80211/ieee80211_ht.c Sat Mar 9 12:54:10 2019 (r344969) @@ -886,10 +886,7 @@ ieee80211_ampdu_reorder(struct ieee80211_node *ni, str if (IEEE80211_IS_MULTICAST(wh->i_addr1)) return PROCESS; - if (IEEE80211_IS_DSTODS(wh)) - tid = ((struct ieee80211_qosframe_addr4 *)wh)->i_qos[0]; - else - tid = wh->i_qos[0]; + tid = ieee80211_getqos(wh)[0]; tid &= IEEE80211_QOS_TID; rap = &ni->ni_rx_ampdu[tid]; if ((rap->rxa_flags & IEEE80211_AGGR_XCHGPEND) == 0) { Modified: stable/12/sys/net80211/ieee80211_mesh.c ============================================================================== --- stable/12/sys/net80211/ieee80211_mesh.c Sat Mar 9 12:44:05 2019 (r344968) +++ stable/12/sys/net80211/ieee80211_mesh.c Sat Mar 9 12:54:10 2019 (r344969) @@ -1655,12 +1655,7 @@ mesh_input(struct ieee80211_node *ni, struct mbuf *m, * in the Mesh Control field and a 3 address qos frame * is used. */ - if (IEEE80211_IS_DSTODS(wh)) - *(uint16_t *)qos = *(uint16_t *) - ((struct ieee80211_qosframe_addr4 *)wh)->i_qos; - else - *(uint16_t *)qos = *(uint16_t *) - ((struct ieee80211_qosframe *)wh)->i_qos; + *(uint16_t *)qos = *(uint16_t *)ieee80211_getqos(wh); /* * NB: The mesh STA sets the Mesh Control Present Modified: stable/12/sys/net80211/ieee80211_output.c ============================================================================== --- stable/12/sys/net80211/ieee80211_output.c Sat Mar 9 12:44:05 2019 (r344968) +++ stable/12/sys/net80211/ieee80211_output.c Sat Mar 9 12:54:10 2019 (r344969) @@ -1948,14 +1948,8 @@ ieee80211_fragment(struct ieee80211vap *vap, struct mb whf = mtod(m, struct ieee80211_frame *); memcpy(whf, wh, hdrsize); #ifdef IEEE80211_SUPPORT_MESH - if (vap->iv_opmode == IEEE80211_M_MBSS) { - if (IEEE80211_IS_DSTODS(wh)) - ((struct ieee80211_qosframe_addr4 *) - whf)->i_qos[1] &= ~IEEE80211_QOS_MC; - else - ((struct ieee80211_qosframe *) - whf)->i_qos[1] &= ~IEEE80211_QOS_MC; - } + if (vap->iv_opmode == IEEE80211_M_MBSS) + ieee80211_getqos(wh)[1] &= ~IEEE80211_QOS_MC; #endif *(uint16_t *)&whf->i_seq[0] |= htole16( (fragno & IEEE80211_SEQ_FRAG_MASK) << Modified: stable/12/sys/net80211/ieee80211_proto.h ============================================================================== --- stable/12/sys/net80211/ieee80211_proto.h Sat Mar 9 12:44:05 2019 (r344968) +++ stable/12/sys/net80211/ieee80211_proto.h Sat Mar 9 12:54:10 2019 (r344969) @@ -303,6 +303,22 @@ void ieee80211_wme_ic_getparams(struct ieee80211com *i int ieee80211_wme_vap_ac_is_noack(struct ieee80211vap *vap, int ac); /* + * Return pointer to the QoS field from a Qos frame. + */ +static __inline uint8_t * +ieee80211_getqos(void *data) +{ + struct ieee80211_frame *wh = data; + + KASSERT(IEEE80211_QOS_HAS_SEQ(wh), ("QoS field is absent!")); + + if (IEEE80211_IS_DSTODS(wh)) + return (((struct ieee80211_qosframe_addr4 *)wh)->i_qos); + else + return (((struct ieee80211_qosframe *)wh)->i_qos); +} + +/* * Return the WME TID from a QoS frame. If no TID * is present return the index for the "non-QoS" entry. */ Modified: stable/12/sys/net80211/ieee80211_sta.c ============================================================================== --- stable/12/sys/net80211/ieee80211_sta.c Sat Mar 9 12:44:05 2019 (r344968) +++ stable/12/sys/net80211/ieee80211_sta.c Sat Mar 9 12:54:10 2019 (r344969) @@ -786,11 +786,9 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, /* * Save QoS bits for use below--before we strip the header. */ - if (subtype == IEEE80211_FC0_SUBTYPE_QOS) { - qos = (dir == IEEE80211_FC1_DIR_DSTODS) ? - ((struct ieee80211_qosframe_addr4 *)wh)->i_qos[0] : - ((struct ieee80211_qosframe *)wh)->i_qos[0]; - } else + if (subtype == IEEE80211_FC0_SUBTYPE_QOS) + qos = ieee80211_getqos(wh)[0]; + else qos = 0; /* Modified: stable/12/sys/net80211/ieee80211_wds.c ============================================================================== --- stable/12/sys/net80211/ieee80211_wds.c Sat Mar 9 12:44:05 2019 (r344968) +++ stable/12/sys/net80211/ieee80211_wds.c Sat Mar 9 12:54:10 2019 (r344969) @@ -583,11 +583,9 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, /* * Save QoS bits for use below--before we strip the header. */ - if (subtype == IEEE80211_FC0_SUBTYPE_QOS) { - qos = (dir == IEEE80211_FC1_DIR_DSTODS) ? - ((struct ieee80211_qosframe_addr4 *)wh)->i_qos[0] : - ((struct ieee80211_qosframe *)wh)->i_qos[0]; - } else + if (subtype == IEEE80211_FC0_SUBTYPE_QOS) + qos = ieee80211_getqos(wh)[0]; + else qos = 0; /* From owner-svn-src-stable-12@freebsd.org Sat Mar 9 12:44:06 2019 Return-Path: Delivered-To: svn-src-stable-12@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 08DBE152492E; Sat, 9 Mar 2019 12:44:06 +0000 (UTC) (envelope-from avos@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 9CB1785B6C; Sat, 9 Mar 2019 12:44:05 +0000 (UTC) (envelope-from avos@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 8CD19B690; Sat, 9 Mar 2019 12:44:05 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x29Ci5w0024682; Sat, 9 Mar 2019 12:44:05 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x29Ci5Kr024681; Sat, 9 Mar 2019 12:44:05 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201903091244.x29Ci5Kr024681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 9 Mar 2019 12:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344968 - stable/12/sys/dev/rtwn/rtl8192c X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/12/sys/dev/rtwn/rtl8192c X-SVN-Commit-Revision: 344968 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9CB1785B6C 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)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2019 12:44:06 -0000 Author: avos Date: Sat Mar 9 12:44:05 2019 New Revision: 344968 URL: https://svnweb.freebsd.org/changeset/base/344968 Log: MFC r344744: rtwn_usb(4): fix LED blinking for RTL8192CU during scanning Modified: stable/12/sys/dev/rtwn/rtl8192c/r92c_init.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/rtwn/rtl8192c/r92c_init.c ============================================================================== --- stable/12/sys/dev/rtwn/rtl8192c/r92c_init.c Sat Mar 9 10:35:37 2019 (r344967) +++ stable/12/sys/dev/rtwn/rtl8192c/r92c_init.c Sat Mar 9 12:44:05 2019 (r344968) @@ -322,6 +322,7 @@ r92c_init_antsel(struct rtwn_softc *sc) rtwn_bb_setbits(sc, R92C_FPGA0_RFPARAM(0), 0, 0x2000); reg = rtwn_bb_read(sc, R92C_FPGA0_RFIFACEOE(0)); sc->sc_ant = MS(reg, R92C_FPGA0_RFIFACEOE0_ANT); /* XXX */ + rtwn_setbits_1(sc, R92C_LEDCFG2, 0x80, 0); } void From owner-svn-src-stable-12@freebsd.org Sat Mar 9 21:09:45 2019 Return-Path: Delivered-To: svn-src-stable-12@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 6377615372F4; Sat, 9 Mar 2019 21:09:45 +0000 (UTC) (envelope-from markj@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 034DB72D2E; Sat, 9 Mar 2019 21:09:45 +0000 (UTC) (envelope-from markj@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 E6D5C18DCD; Sat, 9 Mar 2019 21:09:44 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x29L9iD7092443; Sat, 9 Mar 2019 21:09:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x29L9iJx092442; Sat, 9 Mar 2019 21:09:44 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201903092109.x29L9iJx092442@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 9 Mar 2019 21:09:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344973 - stable/12/usr.bin/write X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/usr.bin/write X-SVN-Commit-Revision: 344973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 034DB72D2E 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)[-1.000,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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2019 21:09:45 -0000 Author: markj Date: Sat Mar 9 21:09:44 2019 New Revision: 344973 URL: https://svnweb.freebsd.org/changeset/base/344973 Log: MFC r343354: Remove extraneous setutxent() calls in write(1). PR: 235096 Modified: stable/12/usr.bin/write/write.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/write/write.c ============================================================================== --- stable/12/usr.bin/write/write.c Sat Mar 9 17:17:59 2019 (r344972) +++ stable/12/usr.bin/write/write.c Sat Mar 9 21:09:44 2019 (r344973) @@ -204,7 +204,6 @@ utmp_chk(char *user, char *tty) struct utmpx lu, *u; strncpy(lu.ut_line, tty, sizeof lu.ut_line); - setutxent(); while ((u = getutxline(&lu)) != NULL) if (u->ut_type == USER_PROCESS && strcmp(user, u->ut_user) == 0) { @@ -237,7 +236,6 @@ search_utmp(int devfd, char *user, char *tty, char *my bestatime = 0; user_is_me = 0; - setutxent(); while ((u = getutxent()) != NULL) if (u->ut_type == USER_PROCESS && strcmp(user, u->ut_user) == 0) {