From owner-svn-src-all@freebsd.org Sun Nov 25 00:32:24 2018 Return-Path: Delivered-To: svn-src-all@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 86C64113F8B6; Sun, 25 Nov 2018 00:32:24 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2BEF86DBAE; Sun, 25 Nov 2018 00:32:24 +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 0D04915749; Sun, 25 Nov 2018 00:32:24 +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 wAP0WNoG047327; Sun, 25 Nov 2018 00:32:23 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAP0WNPF047326; Sun, 25 Nov 2018 00:32:23 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201811250032.wAP0WNPF047326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 25 Nov 2018 00:32:23 +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: r340915 - stable/12/sys/dev/proto X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/dev/proto X-SVN-Commit-Revision: 340915 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2BEF86DBAE X-Spamd-Result: default: False [1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.62)[0.623,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.30)[0.302,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 00:32:24 -0000 Author: emaste Date: Sun Nov 25 00:32:23 2018 New Revision: 340915 URL: https://svnweb.freebsd.org/changeset/base/340915 Log: MFC r340771: proto: change device permissions to 0600 C Turt reports that the driver is not thread safe and may have exploitable races. Note that the proto device is intended for prototyping and development, and is not for use on production systems. From the man page: SECURITY CONSIDERATIONS Because programs have direct access to the hardware, the proto driver is inherently insecure. It is not advisable to use this driver on a production machine. The proto device is not included in any of FreeBSD's kernel config files (although the module is built). The issues in the proto device still need to be fixed, and the device is inherently (and intentionally) insecure, but it might as well be limited to root only. admbugs: 782 Reported by: C Turt Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/dev/proto/proto_core.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/proto/proto_core.c ============================================================================== --- stable/12/sys/dev/proto/proto_core.c Sat Nov 24 21:52:10 2018 (r340914) +++ stable/12/sys/dev/proto/proto_core.c Sun Nov 25 00:32:23 2018 (r340915) @@ -196,7 +196,7 @@ proto_attach(device_t dev) case SYS_RES_MEMORY: case SYS_RES_IOPORT: r->r_size = rman_get_size(r->r_d.res); - r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0666, + r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0600, "proto/%s/%02x.%s", device_get_desc(dev), r->r_rid, (r->r_type == SYS_RES_IOPORT) ? "io" : "mem"); r->r_u.cdev->si_drv1 = sc; @@ -204,7 +204,7 @@ proto_attach(device_t dev) break; case PROTO_RES_PCICFG: r->r_size = 4096; - r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0666, + r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0600, "proto/%s/pcicfg", device_get_desc(dev)); r->r_u.cdev->si_drv1 = sc; r->r_u.cdev->si_drv2 = r; @@ -212,7 +212,7 @@ proto_attach(device_t dev) case PROTO_RES_BUSDMA: r->r_d.busdma = proto_busdma_attach(sc); r->r_size = 0; /* no read(2) nor write(2) */ - r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0666, + r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0600, "proto/%s/busdma", device_get_desc(dev)); r->r_u.cdev->si_drv1 = sc; r->r_u.cdev->si_drv2 = r; From owner-svn-src-all@freebsd.org Sun Nov 25 00:34:01 2018 Return-Path: Delivered-To: svn-src-all@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 B81CF113F984; Sun, 25 Nov 2018 00:34:01 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5923E6DD18; Sun, 25 Nov 2018 00:34:01 +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 3698615754; Sun, 25 Nov 2018 00:34:01 +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 wAP0Y092048262; Sun, 25 Nov 2018 00:34:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAP0Y0ea048261; Sun, 25 Nov 2018 00:34:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201811250034.wAP0Y0ea048261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 25 Nov 2018 00:34:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340916 - stable/11/sys/dev/proto X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/dev/proto X-SVN-Commit-Revision: 340916 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5923E6DD18 X-Spamd-Result: default: False [1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.62)[0.623,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.30)[0.302,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 00:34:02 -0000 Author: emaste Date: Sun Nov 25 00:34:00 2018 New Revision: 340916 URL: https://svnweb.freebsd.org/changeset/base/340916 Log: MFC r340771: proto: change device permissions to 0600 C Turt reports that the driver is not thread safe and may have exploitable races. Note that the proto device is intended for prototyping and development, and is not for use on production systems. From the man page: SECURITY CONSIDERATIONS Because programs have direct access to the hardware, the proto driver is inherently insecure. It is not advisable to use this driver on a production machine. The proto device is not included in any of FreeBSD's kernel config files (although the module is built). The issues in the proto device still need to be fixed, and the device is inherently (and intentionally) insecure, but it might as well be limited to root only. admbugs: 782 Reported by: C Turt Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/dev/proto/proto_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/proto/proto_core.c ============================================================================== --- stable/11/sys/dev/proto/proto_core.c Sun Nov 25 00:32:23 2018 (r340915) +++ stable/11/sys/dev/proto/proto_core.c Sun Nov 25 00:34:00 2018 (r340916) @@ -196,7 +196,7 @@ proto_attach(device_t dev) case SYS_RES_MEMORY: case SYS_RES_IOPORT: r->r_size = rman_get_size(r->r_d.res); - r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0666, + r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0600, "proto/%s/%02x.%s", device_get_desc(dev), r->r_rid, (r->r_type == SYS_RES_IOPORT) ? "io" : "mem"); r->r_u.cdev->si_drv1 = sc; @@ -204,7 +204,7 @@ proto_attach(device_t dev) break; case PROTO_RES_PCICFG: r->r_size = 4096; - r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0666, + r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0600, "proto/%s/pcicfg", device_get_desc(dev)); r->r_u.cdev->si_drv1 = sc; r->r_u.cdev->si_drv2 = r; @@ -212,7 +212,7 @@ proto_attach(device_t dev) case PROTO_RES_BUSDMA: r->r_d.busdma = proto_busdma_attach(sc); r->r_size = 0; /* no read(2) nor write(2) */ - r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0666, + r->r_u.cdev = make_dev(&proto_devsw, res, 0, 0, 0600, "proto/%s/busdma", device_get_desc(dev)); r->r_u.cdev->si_drv1 = sc; r->r_u.cdev->si_drv2 = r; From owner-svn-src-all@freebsd.org Sun Nov 25 09:37:58 2018 Return-Path: Delivered-To: svn-src-all@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 94050114D6AD; Sun, 25 Nov 2018 09:37:58 +0000 (UTC) (envelope-from ygy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C0BA7C5A6; Sun, 25 Nov 2018 09:37:58 +0000 (UTC) (envelope-from ygy@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 076601B04B; Sun, 25 Nov 2018 09:37:58 +0000 (UTC) (envelope-from ygy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAP9bvSh026101; Sun, 25 Nov 2018 09:37:57 GMT (envelope-from ygy@FreeBSD.org) Received: (from ygy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAP9bv1n026100; Sun, 25 Nov 2018 09:37:57 GMT (envelope-from ygy@FreeBSD.org) Message-Id: <201811250937.wAP9bv1n026100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ygy set sender to ygy@FreeBSD.org using -f From: Guangyuan Yang Date: Sun, 25 Nov 2018 09:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340917 - head/stand/i386/pxeldr X-SVN-Group: head X-SVN-Commit-Author: ygy X-SVN-Commit-Paths: head/stand/i386/pxeldr X-SVN-Commit-Revision: 340917 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2C0BA7C5A6 X-Spamd-Result: default: False [1.45 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.64)[0.643,0]; NEURAL_SPAM_MEDIUM(0.64)[0.638,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.16)[0.164,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 09:37:58 -0000 Author: ygy (doc committer) Date: Sun Nov 25 09:37:57 2018 New Revision: 340917 URL: https://svnweb.freebsd.org/changeset/base/340917 Log: Update pxeboot(8) manual page to reflect the next-server change in the ISC DHCP v3 server. PR: 123484 Submitted by: edwin@mavetju.org Reviewed by: AllanJude MFC after: 1 week Modified: head/stand/i386/pxeldr/pxeboot.8 Modified: head/stand/i386/pxeldr/pxeboot.8 ============================================================================== --- head/stand/i386/pxeldr/pxeboot.8 Sun Nov 25 00:34:00 2018 (r340916) +++ head/stand/i386/pxeldr/pxeboot.8 Sun Nov 25 09:37:57 2018 (r340917) @@ -58,7 +58,7 @@ The .Nm binary is loaded just like any other boot file, by specifying it in the DHCP server's configuration file. -Below is a sample configuration for the ISC DHCP v2 server: +Below is a sample configuration for the ISC DHCP v3 server: .Bd -literal -offset indent option domain-name "example.com"; option routers 10.0.0.1; @@ -67,6 +67,7 @@ option broadcast-address 10.0.0.255; option domain-name-servers 10.0.0.1; server-name "DHCPserver"; server-identifier 10.0.0.1; +next-server 10.0.0.1; default-lease-time 120; max-lease-time 120; @@ -80,10 +81,11 @@ subnet 10.0.0.0 netmask 255.255.255.0 { } .Ed +.Va next-server +is the IP address of the next server in the bootstrap process, i.e. +your TFTP server or NFS server. .Nm recognizes -.Va next-server -and .Va option root-path directives as the server and path to NFS mount for file requests, respectively, or the server to make TFTP requests to. From owner-svn-src-all@freebsd.org Sun Nov 25 17:39:42 2018 Return-Path: Delivered-To: svn-src-all@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 1EF47113ADF7; Sun, 25 Nov 2018 17:39:42 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B733E6EF95; Sun, 25 Nov 2018 17:39:41 +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 98CC11FF02; Sun, 25 Nov 2018 17:39:41 +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 wAPHdflE073427; Sun, 25 Nov 2018 17:39:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAPHdfDA073426; Sun, 25 Nov 2018 17:39:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811251739.wAPHdfDA073426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 25 Nov 2018 17:39: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: r340919 - stable/12/sys/amd64/ia32 X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/amd64/ia32 X-SVN-Commit-Revision: 340919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B733E6EF95 X-Spamd-Result: default: False [1.36 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_SHORT(0.13)[0.128,0]; NEURAL_SPAM_MEDIUM(0.62)[0.623,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 17:39:42 -0000 Author: markj Date: Sun Nov 25 17:39:41 2018 New Revision: 340919 URL: https://svnweb.freebsd.org/changeset/base/340919 Log: MFC r340772: Clear unused bytes in ia32_osendsig(). Modified: stable/12/sys/amd64/ia32/ia32_signal.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/ia32/ia32_signal.c ============================================================================== --- stable/12/sys/amd64/ia32/ia32_signal.c Sun Nov 25 11:15:01 2018 (r340918) +++ stable/12/sys/amd64/ia32/ia32_signal.c Sun Nov 25 17:39:41 2018 (r340919) @@ -364,12 +364,14 @@ ia32_osendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_scp = (register_t)&fp->sf_siginfo.si_sc; + bzero(&sf.sf_siginfo, sizeof(sf.sf_siginfo)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_arg2 = (register_t)&fp->sf_siginfo; sf.sf_siginfo.si_signo = sig; sf.sf_siginfo.si_code = ksi->ksi_code; sf.sf_ah = (uintptr_t)catcher; + sf.sf_addr = 0; } else { /* Old FreeBSD-style arguments. */ sf.sf_arg2 = ksi->ksi_code; From owner-svn-src-all@freebsd.org Sun Nov 25 17:44:31 2018 Return-Path: Delivered-To: svn-src-all@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 C157A113B116; Sun, 25 Nov 2018 17:44:31 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F6F26F448; Sun, 25 Nov 2018 17:44:31 +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 3B6CF200C0; Sun, 25 Nov 2018 17:44:31 +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 wAPHiVNA078210; Sun, 25 Nov 2018 17:44:31 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAPHiVfW078209; Sun, 25 Nov 2018 17:44:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811251744.wAPHiVfW078209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 25 Nov 2018 17:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340920 - stable/11/sys/amd64/ia32 X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/amd64/ia32 X-SVN-Commit-Revision: 340920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5F6F26F448 X-Spamd-Result: default: False [1.36 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.13)[0.128,0]; NEURAL_SPAM_MEDIUM(0.62)[0.623,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 17:44:31 -0000 Author: markj Date: Sun Nov 25 17:44:30 2018 New Revision: 340920 URL: https://svnweb.freebsd.org/changeset/base/340920 Log: MFC r340772: Clear unused bytes in ia32_osendsig(). Modified: stable/11/sys/amd64/ia32/ia32_signal.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/ia32/ia32_signal.c ============================================================================== --- stable/11/sys/amd64/ia32/ia32_signal.c Sun Nov 25 17:39:41 2018 (r340919) +++ stable/11/sys/amd64/ia32/ia32_signal.c Sun Nov 25 17:44:30 2018 (r340920) @@ -363,12 +363,14 @@ ia32_osendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_scp = (register_t)&fp->sf_siginfo.si_sc; + bzero(&sf.sf_siginfo, sizeof(sf.sf_siginfo)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_arg2 = (register_t)&fp->sf_siginfo; sf.sf_siginfo.si_signo = sig; sf.sf_siginfo.si_code = ksi->ksi_code; sf.sf_ah = (uintptr_t)catcher; + sf.sf_addr = 0; } else { /* Old FreeBSD-style arguments. */ sf.sf_arg2 = ksi->ksi_code; From owner-svn-src-all@freebsd.org Sun Nov 25 17:46:40 2018 Return-Path: Delivered-To: svn-src-all@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 5643D113B20E; Sun, 25 Nov 2018 17:46:40 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8BAE6F5D6; Sun, 25 Nov 2018 17:46:39 +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 C3F40200C3; Sun, 25 Nov 2018 17:46:39 +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 wAPHkd2s078369; Sun, 25 Nov 2018 17:46:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAPHkbWm078356; Sun, 25 Nov 2018 17:46:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811251746.wAPHkbWm078356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 25 Nov 2018 17:46: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: r340921 - in stable/12/sys: kern netinet netinet6 ofed/drivers/infiniband/ulp/sdp X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: kern netinet netinet6 ofed/drivers/infiniband/ulp/sdp X-SVN-Commit-Revision: 340921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E8BAE6F5D6 X-Spamd-Result: default: False [1.43 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.63)[0.630,0]; NEURAL_SPAM_SHORT(0.15)[0.153,0]; NEURAL_SPAM_MEDIUM(0.64)[0.643,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 17:46:40 -0000 Author: markj Date: Sun Nov 25 17:46:37 2018 New Revision: 340921 URL: https://svnweb.freebsd.org/changeset/base/340921 Log: MFC r340783: Plug some networking sysctl leaks. Modified: stable/12/sys/kern/uipc_socket.c stable/12/sys/kern/uipc_usrreq.c stable/12/sys/netinet/in_pcb.c stable/12/sys/netinet/ip_divert.c stable/12/sys/netinet/raw_ip.c stable/12/sys/netinet/sctp_sysctl.c stable/12/sys/netinet/tcp_subr.c stable/12/sys/netinet/udp_usrreq.c stable/12/sys/netinet6/ip6_mroute.c stable/12/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/uipc_socket.c ============================================================================== --- stable/12/sys/kern/uipc_socket.c Sun Nov 25 17:44:30 2018 (r340920) +++ stable/12/sys/kern/uipc_socket.c Sun Nov 25 17:46:37 2018 (r340921) @@ -4007,6 +4007,7 @@ void sotoxsocket(struct socket *so, struct xsocket *xso) { + bzero(xso, sizeof(*xso)); xso->xso_len = sizeof *xso; xso->xso_so = (uintptr_t)so; xso->so_type = so->so_type; @@ -4025,8 +4026,6 @@ sotoxsocket(struct socket *so, struct xsocket *xso) xso->so_incqlen = so->sol_incqlen; xso->so_qlimit = so->sol_qlimit; xso->so_oobmark = 0; - bzero(&xso->so_snd, sizeof(xso->so_snd)); - bzero(&xso->so_rcv, sizeof(xso->so_rcv)); } else { xso->so_state |= so->so_qstate; xso->so_qlen = xso->so_incqlen = xso->so_qlimit = 0; Modified: stable/12/sys/kern/uipc_usrreq.c ============================================================================== --- stable/12/sys/kern/uipc_usrreq.c Sun Nov 25 17:44:30 2018 (r340920) +++ stable/12/sys/kern/uipc_usrreq.c Sun Nov 25 17:46:37 2018 (r340921) @@ -1812,7 +1812,7 @@ unp_pcblist(SYSCTL_HANDLER_ARGS) /* * OK, now we're committed to doing something. */ - xug = malloc(sizeof(*xug), M_TEMP, M_WAITOK); + xug = malloc(sizeof(*xug), M_TEMP, M_WAITOK | M_ZERO); UNP_LINK_RLOCK(); gencnt = unp_gencnt; n = unp_count; Modified: stable/12/sys/netinet/in_pcb.c ============================================================================== --- stable/12/sys/netinet/in_pcb.c Sun Nov 25 17:44:30 2018 (r340920) +++ stable/12/sys/netinet/in_pcb.c Sun Nov 25 17:46:37 2018 (r340921) @@ -2883,11 +2883,10 @@ void in_pcbtoxinpcb(const struct inpcb *inp, struct xinpcb *xi) { + bzero(xi, sizeof(*xi)); xi->xi_len = sizeof(struct xinpcb); if (inp->inp_socket) sotoxsocket(inp->inp_socket, &xi->xi_socket); - else - bzero(&xi->xi_socket, sizeof(struct xsocket)); bcopy(&inp->inp_inc, &xi->inp_inc, sizeof(struct in_conninfo)); xi->inp_gencnt = inp->inp_gencnt; xi->inp_ppcb = (uintptr_t)inp->inp_ppcb; Modified: stable/12/sys/netinet/ip_divert.c ============================================================================== --- stable/12/sys/netinet/ip_divert.c Sun Nov 25 17:44:30 2018 (r340920) +++ stable/12/sys/netinet/ip_divert.c Sun Nov 25 17:46:37 2018 (r340921) @@ -664,6 +664,7 @@ div_pcblist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n; xig.xig_gen = gencnt; Modified: stable/12/sys/netinet/raw_ip.c ============================================================================== --- stable/12/sys/netinet/raw_ip.c Sun Nov 25 17:44:30 2018 (r340920) +++ stable/12/sys/netinet/raw_ip.c Sun Nov 25 17:46:37 2018 (r340921) @@ -1060,6 +1060,7 @@ rip_pcblist(SYSCTL_HANDLER_ARGS) n = V_ripcbinfo.ipi_count; INP_INFO_WUNLOCK(&V_ripcbinfo); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n; xig.xig_gen = gencnt; Modified: stable/12/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/12/sys/netinet/sctp_sysctl.c Sun Nov 25 17:44:30 2018 (r340920) +++ stable/12/sys/netinet/sctp_sysctl.c Sun Nov 25 17:46:37 2018 (r340921) @@ -395,6 +395,9 @@ sctp_sysctl_handle_assoclist(SYSCTL_HANDLER_ARGS) SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_SYSCTL, EPERM); return (EPERM); } + memset(&xinpcb, 0, sizeof(xinpcb)); + memset(&xstcb, 0, sizeof(xstcb)); + memset(&xraddr, 0, sizeof(xraddr)); LIST_FOREACH(inp, &SCTP_BASE_INFO(listhead), sctp_list) { SCTP_INP_RLOCK(inp); if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) { Modified: stable/12/sys/netinet/tcp_subr.c ============================================================================== --- stable/12/sys/netinet/tcp_subr.c Sun Nov 25 17:44:30 2018 (r340920) +++ stable/12/sys/netinet/tcp_subr.c Sun Nov 25 17:46:37 2018 (r340921) @@ -556,6 +556,7 @@ sysctl_net_inet_list_func_info(SYSCTL_HANDLER_ARGS) cnt++; #endif if (req->oldptr != NULL) { + bzero(&tfi, sizeof(tfi)); tfi.tfi_refcnt = f->tf_fb->tfb_refcnt; tfi.tfi_id = f->tf_fb->tfb_id; (void)strncpy(tfi.tfi_alias, f->tf_name, @@ -2154,6 +2155,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n + m; xig.xig_gen = gencnt; @@ -3215,8 +3217,8 @@ tcp_inptoxtp(const struct inpcb *inp, struct xtcpcb *x struct tcpcb *tp = intotcpcb(inp); sbintime_t now; + bzero(xt, sizeof(*xt)); if (inp->inp_flags & INP_TIMEWAIT) { - bzero(xt, sizeof(struct xtcpcb)); xt->t_state = TCPS_TIME_WAIT; } else { xt->t_state = tp->t_state; @@ -3244,7 +3246,6 @@ tcp_inptoxtp(const struct inpcb *inp, struct xtcpcb *x bcopy(tp->t_fb->tfb_tcp_block_name, xt->xt_stack, TCP_FUNCTION_NAME_LEN_MAX); - bzero(xt->xt_logid, TCP_LOG_ID_LEN); #ifdef TCP_BLACKBOX (void)tcp_log_get_id(tp, xt->xt_logid); #endif Modified: stable/12/sys/netinet/udp_usrreq.c ============================================================================== --- stable/12/sys/netinet/udp_usrreq.c Sun Nov 25 17:44:30 2018 (r340920) +++ stable/12/sys/netinet/udp_usrreq.c Sun Nov 25 17:46:37 2018 (r340921) @@ -887,6 +887,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n; xig.xig_gen = gencnt; Modified: stable/12/sys/netinet6/ip6_mroute.c ============================================================================== --- stable/12/sys/netinet6/ip6_mroute.c Sun Nov 25 17:44:30 2018 (r340920) +++ stable/12/sys/netinet6/ip6_mroute.c Sun Nov 25 17:46:37 2018 (r340921) @@ -203,7 +203,8 @@ sysctl_mif6table(SYSCTL_HANDLER_ARGS) struct mif6_sctl *out; int error; - out = malloc(sizeof(struct mif6_sctl) * MAXMIFS, M_TEMP, M_WAITOK); + out = malloc(sizeof(struct mif6_sctl) * MAXMIFS, M_TEMP, + M_WAITOK | M_ZERO); for (int i = 0; i < MAXMIFS; i++) { out[i].m6_flags = mif6table[i].m6_flags; out[i].m6_rate_limit = mif6table[i].m6_rate_limit; Modified: stable/12/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c ============================================================================== --- stable/12/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Sun Nov 25 17:44:30 2018 (r340920) +++ stable/12/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Sun Nov 25 17:46:37 2018 (r340921) @@ -1810,6 +1810,7 @@ sdp_pcblist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n; xig.xig_gen = 0; From owner-svn-src-all@freebsd.org Sun Nov 25 17:56:50 2018 Return-Path: Delivered-To: svn-src-all@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 3060C113B670; Sun, 25 Nov 2018 17:56:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC2076FC63; Sun, 25 Nov 2018 17:56:49 +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 AD0FD20265; Sun, 25 Nov 2018 17:56:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAPHun2p083599; Sun, 25 Nov 2018 17:56:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAPHunIm083598; Sun, 25 Nov 2018 17:56:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201811251756.wAPHunIm083598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 25 Nov 2018 17:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340922 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 340922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CC2076FC63 X-Spamd-Result: default: False [1.46 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.64)[0.643,0]; NEURAL_SPAM_SHORT(0.17)[0.174,0]; NEURAL_SPAM_MEDIUM(0.64)[0.638,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 17:56:50 -0000 Author: kib Date: Sun Nov 25 17:56:49 2018 New Revision: 340922 URL: https://svnweb.freebsd.org/changeset/base/340922 Log: Avoid unneeded check in vmspace_alloc(). All vmspace_alloc() callers know which kind of pmap they allocate. Reviewed by: alc, markj (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D18329 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Nov 25 17:46:37 2018 (r340921) +++ head/sys/vm/vm_map.c Sun Nov 25 17:56:49 2018 (r340922) @@ -283,12 +283,7 @@ vmspace_alloc(vm_offset_t min, vm_offset_t max, pmap_p struct vmspace *vm; vm = uma_zalloc(vmspace_zone, M_WAITOK); - KASSERT(vm->vm_map.pmap == NULL, ("vm_map.pmap must be NULL")); - - if (pinit == NULL) - pinit = &pmap_pinit; - if (!pinit(vmspace_pmap(vm))) { uma_zfree(vmspace_zone, vm); return (NULL); @@ -3424,7 +3419,8 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c old_map = &vm1->vm_map; /* Copy immutable fields of vm1 to vm2. */ - vm2 = vmspace_alloc(vm_map_min(old_map), vm_map_max(old_map), NULL); + vm2 = vmspace_alloc(vm_map_min(old_map), vm_map_max(old_map), + pmap_pinit); if (vm2 == NULL) return (NULL); vm2->vm_taddr = vm1->vm_taddr; @@ -3975,7 +3971,7 @@ vmspace_exec(struct proc *p, vm_offset_t minuser, vm_o KASSERT((curthread->td_pflags & TDP_EXECVMSPC) == 0, ("vmspace_exec recursed")); - newvmspace = vmspace_alloc(minuser, maxuser, NULL); + newvmspace = vmspace_alloc(minuser, maxuser, pmap_pinit); if (newvmspace == NULL) return (ENOMEM); newvmspace->vm_swrss = oldvmspace->vm_swrss; From owner-svn-src-all@freebsd.org Sun Nov 25 18:00:55 2018 Return-Path: Delivered-To: svn-src-all@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 0DCFC113B9CB; Sun, 25 Nov 2018 18:00:55 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5B3A6FF70; Sun, 25 Nov 2018 18:00:54 +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 8AD2B20285; Sun, 25 Nov 2018 18:00:52 +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 wAPI0qpA084020; Sun, 25 Nov 2018 18:00:52 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAPI0ojq084011; Sun, 25 Nov 2018 18:00:50 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201811251800.wAPI0ojq084011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 25 Nov 2018 18:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340923 - in stable/11/sys: kern netinet netinet6 ofed/drivers/infiniband/ulp/sdp X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/11/sys: kern netinet netinet6 ofed/drivers/infiniband/ulp/sdp X-SVN-Commit-Revision: 340923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A5B3A6FF70 X-Spamd-Result: default: False [1.43 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.63)[0.630,0]; NEURAL_SPAM_MEDIUM(0.64)[0.643,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.15)[0.153,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 18:00:55 -0000 Author: markj Date: Sun Nov 25 18:00:50 2018 New Revision: 340923 URL: https://svnweb.freebsd.org/changeset/base/340923 Log: MFC r340783: Plug some networking sysctl leaks. Modified: stable/11/sys/kern/uipc_socket.c stable/11/sys/kern/uipc_usrreq.c stable/11/sys/netinet/ip_divert.c stable/11/sys/netinet/raw_ip.c stable/11/sys/netinet/sctp_sysctl.c stable/11/sys/netinet/tcp_subr.c stable/11/sys/netinet/udp_usrreq.c stable/11/sys/netinet6/ip6_mroute.c stable/11/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/uipc_socket.c ============================================================================== --- stable/11/sys/kern/uipc_socket.c Sun Nov 25 17:56:49 2018 (r340922) +++ stable/11/sys/kern/uipc_socket.c Sun Nov 25 18:00:50 2018 (r340923) @@ -3597,6 +3597,7 @@ void sotoxsocket(struct socket *so, struct xsocket *xso) { + bzero(xso, sizeof(*xso)); xso->xso_len = sizeof *xso; xso->xso_so = so; xso->so_type = so->so_type; Modified: stable/11/sys/kern/uipc_usrreq.c ============================================================================== --- stable/11/sys/kern/uipc_usrreq.c Sun Nov 25 17:56:49 2018 (r340922) +++ stable/11/sys/kern/uipc_usrreq.c Sun Nov 25 18:00:50 2018 (r340923) @@ -1606,7 +1606,7 @@ unp_pcblist(SYSCTL_HANDLER_ARGS) /* * OK, now we're committed to doing something. */ - xug = malloc(sizeof(*xug), M_TEMP, M_WAITOK); + xug = malloc(sizeof(*xug), M_TEMP, M_WAITOK | M_ZERO); UNP_LIST_LOCK(); gencnt = unp_gencnt; n = unp_count; Modified: stable/11/sys/netinet/ip_divert.c ============================================================================== --- stable/11/sys/netinet/ip_divert.c Sun Nov 25 17:56:49 2018 (r340922) +++ stable/11/sys/netinet/ip_divert.c Sun Nov 25 18:00:50 2018 (r340923) @@ -667,6 +667,7 @@ div_pcblist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n; xig.xig_gen = gencnt; Modified: stable/11/sys/netinet/raw_ip.c ============================================================================== --- stable/11/sys/netinet/raw_ip.c Sun Nov 25 17:56:49 2018 (r340922) +++ stable/11/sys/netinet/raw_ip.c Sun Nov 25 18:00:50 2018 (r340923) @@ -1044,6 +1044,7 @@ rip_pcblist(SYSCTL_HANDLER_ARGS) n = V_ripcbinfo.ipi_count; INP_INFO_RUNLOCK(&V_ripcbinfo); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n; xig.xig_gen = gencnt; Modified: stable/11/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/11/sys/netinet/sctp_sysctl.c Sun Nov 25 17:56:49 2018 (r340922) +++ stable/11/sys/netinet/sctp_sysctl.c Sun Nov 25 18:00:50 2018 (r340923) @@ -393,6 +393,9 @@ sctp_sysctl_handle_assoclist(SYSCTL_HANDLER_ARGS) SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_SYSCTL, EPERM); return (EPERM); } + memset(&xinpcb, 0, sizeof(xinpcb)); + memset(&xstcb, 0, sizeof(xstcb)); + memset(&xraddr, 0, sizeof(xraddr)); LIST_FOREACH(inp, &SCTP_BASE_INFO(listhead), sctp_list) { SCTP_INP_RLOCK(inp); if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) { Modified: stable/11/sys/netinet/tcp_subr.c ============================================================================== --- stable/11/sys/netinet/tcp_subr.c Sun Nov 25 17:56:49 2018 (r340922) +++ stable/11/sys/netinet/tcp_subr.c Sun Nov 25 18:00:50 2018 (r340923) @@ -1710,6 +1710,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n + m; xig.xig_gen = gencnt; Modified: stable/11/sys/netinet/udp_usrreq.c ============================================================================== --- stable/11/sys/netinet/udp_usrreq.c Sun Nov 25 17:56:49 2018 (r340922) +++ stable/11/sys/netinet/udp_usrreq.c Sun Nov 25 18:00:50 2018 (r340923) @@ -849,6 +849,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n; xig.xig_gen = gencnt; Modified: stable/11/sys/netinet6/ip6_mroute.c ============================================================================== --- stable/11/sys/netinet6/ip6_mroute.c Sun Nov 25 17:56:49 2018 (r340922) +++ stable/11/sys/netinet6/ip6_mroute.c Sun Nov 25 18:00:50 2018 (r340923) @@ -202,7 +202,8 @@ sysctl_mif6table(SYSCTL_HANDLER_ARGS) struct mif6_sctl *out; int error; - out = malloc(sizeof(struct mif6_sctl) * MAXMIFS, M_TEMP, M_WAITOK); + out = malloc(sizeof(struct mif6_sctl) * MAXMIFS, M_TEMP, + M_WAITOK | M_ZERO); for (int i = 0; i < MAXMIFS; i++) { out[i].m6_flags = mif6table[i].m6_flags; out[i].m6_rate_limit = mif6table[i].m6_rate_limit; Modified: stable/11/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Sun Nov 25 17:56:49 2018 (r340922) +++ stable/11/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Sun Nov 25 18:00:50 2018 (r340923) @@ -1810,6 +1810,7 @@ sdp_pcblist(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); + bzero(&xig, sizeof(xig)); xig.xig_len = sizeof xig; xig.xig_count = n; xig.xig_gen = 0; From owner-svn-src-all@freebsd.org Sun Nov 25 18:01:17 2018 Return-Path: Delivered-To: svn-src-all@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 027E1113BA29; Sun, 25 Nov 2018 18:01:17 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 99812700FD; Sun, 25 Nov 2018 18:01:16 +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 7A7C52039B; Sun, 25 Nov 2018 18:01:16 +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 wAPI1G9H084798; Sun, 25 Nov 2018 18:01:16 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAPI1F0f084795; Sun, 25 Nov 2018 18:01:15 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201811251801.wAPI1F0f084795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sun, 25 Nov 2018 18:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340924 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 340924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 99812700FD X-Spamd-Result: default: False [1.52 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.66)[0.661,0]; NEURAL_SPAM_MEDIUM(0.66)[0.657,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.20)[0.198,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 18:01:17 -0000 Author: mckusick Date: Sun Nov 25 18:01:15 2018 New Revision: 340924 URL: https://svnweb.freebsd.org/changeset/base/340924 Log: Calculate updated superblock check-hash before writing it into the snapshot. This corrects a bug that prevented snapshots from being mounted due to a superblock check-hash failure. Reported by: Brennan Vincent Tested by: Peter Holm (pho@) Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_extern.h head/sys/ufs/ffs/ffs_snapshot.c head/sys/ufs/ffs/ffs_subr.c Modified: head/sys/ufs/ffs/ffs_extern.h ============================================================================== --- head/sys/ufs/ffs/ffs_extern.h Sun Nov 25 18:00:50 2018 (r340923) +++ head/sys/ufs/ffs/ffs_extern.h Sun Nov 25 18:01:15 2018 (r340924) @@ -68,6 +68,7 @@ ufs2_daddr_t ffs_blkpref_ufs1(struct inode *, ufs_lbn_ ufs2_daddr_t ffs_blkpref_ufs2(struct inode *, ufs_lbn_t, int, ufs2_daddr_t *); void ffs_blkrelease_finish(struct ufsmount *, u_long); u_long ffs_blkrelease_start(struct ufsmount *, struct vnode *, ino_t); +uint32_t ffs_calc_sbhash(struct fs *); int ffs_checkfreefile(struct fs *, struct vnode *, ino_t); void ffs_clrblock(struct fs *, u_char *, ufs1_daddr_t); void ffs_clusteracct(struct fs *, struct cg *, ufs1_daddr_t, int); Modified: head/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- head/sys/ufs/ffs/ffs_snapshot.c Sun Nov 25 18:00:50 2018 (r340923) +++ head/sys/ufs/ffs/ffs_snapshot.c Sun Nov 25 18:01:15 2018 (r340924) @@ -795,6 +795,7 @@ out1: brelse(nbp); } else { loc = blkoff(fs, fs->fs_sblockloc); + copy_fs->fs_ckhash = ffs_calc_sbhash(copy_fs); bcopy((char *)copy_fs, &nbp->b_data[loc], (u_int)fs->fs_sbsize); bawrite(nbp); } Modified: head/sys/ufs/ffs/ffs_subr.c ============================================================================== --- head/sys/ufs/ffs/ffs_subr.c Sun Nov 25 18:00:50 2018 (r340923) +++ head/sys/ufs/ffs/ffs_subr.c Sun Nov 25 18:01:15 2018 (r340924) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include uint32_t calculate_crc32c(uint32_t, const void *, size_t); +uint32_t ffs_calc_sbhash(struct fs *); struct malloc_type; #define UFS_MALLOC(size, type, flags) malloc(size) #define UFS_FREE(ptr, type) free(ptr) @@ -147,7 +148,6 @@ ffs_load_inode(struct buf *bp, struct inode *ip, struc static off_t sblock_try[] = SBLOCKSEARCH; static int readsuper(void *, struct fs **, off_t, int, int (*)(void *, off_t, void **, int)); -static uint32_t calc_sbhash(struct fs *); /* * Read a superblock from the devfd device. @@ -276,7 +276,7 @@ readsuper(void *devfd, struct fs **fsp, off_t sblocklo fs->fs_bsize <= MAXBSIZE && fs->fs_bsize >= roundup(sizeof(struct fs), DEV_BSIZE) && fs->fs_sbsize <= SBLOCKSIZE) { - if (fs->fs_ckhash != (ckhash = calc_sbhash(fs))) { + if (fs->fs_ckhash != (ckhash = ffs_calc_sbhash(fs))) { #ifdef _KERNEL res = uprintf("Superblock check-hash failed: recorded " "check-hash 0x%x != computed check-hash 0x%x\n", @@ -339,7 +339,7 @@ ffs_sbput(void *devfd, struct fs *fs, off_t loc, } fs->fs_fmod = 0; fs->fs_time = UFS_TIME; - fs->fs_ckhash = calc_sbhash(fs); + fs->fs_ckhash = ffs_calc_sbhash(fs); if ((error = (*writefunc)(devfd, loc, fs, fs->fs_sbsize)) != 0) return (error); return (0); @@ -348,8 +348,8 @@ ffs_sbput(void *devfd, struct fs *fs, off_t loc, /* * Calculate the check-hash for a superblock. */ -static uint32_t -calc_sbhash(struct fs *fs) +uint32_t +ffs_calc_sbhash(struct fs *fs) { uint32_t ckhash, save_ckhash; From owner-svn-src-all@freebsd.org Sun Nov 25 18:09:40 2018 Return-Path: Delivered-To: svn-src-all@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 559D0113BD7B; Sun, 25 Nov 2018 18:09:40 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE920705CD; Sun, 25 Nov 2018 18:09:39 +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 CE9982040B; Sun, 25 Nov 2018 18:09:39 +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 wAPI9dIO089082; Sun, 25 Nov 2018 18:09:39 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAPI9de2089081; Sun, 25 Nov 2018 18:09:39 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201811251809.wAPI9de2089081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sun, 25 Nov 2018 18:09:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340925 - head/sbin/fsck_ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sbin/fsck_ffs X-SVN-Commit-Revision: 340925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EE920705CD X-Spamd-Result: default: False [1.46 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.17)[0.174,0]; NEURAL_SPAM_MEDIUM(0.64)[0.638,0]; NEURAL_SPAM_LONG(0.64)[0.643,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 18:09:40 -0000 Author: mckusick Date: Sun Nov 25 18:09:39 2018 New Revision: 340925 URL: https://svnweb.freebsd.org/changeset/base/340925 Log: Properly recover from superblock check-hash failures. Specifically, report the check-hash failure and offer to search for and use alternate superblocks. Prior to this fix fsck_ffs would simply report the check-hash failure and exit. Reported by: Julian H. Stacey Tested by: Peter Holm Sponsored by: Netflix Modified: head/sbin/fsck_ffs/setup.c Modified: head/sbin/fsck_ffs/setup.c ============================================================================== --- head/sbin/fsck_ffs/setup.c Sun Nov 25 18:01:15 2018 (r340924) +++ head/sbin/fsck_ffs/setup.c Sun Nov 25 18:09:39 2018 (r340925) @@ -127,7 +127,7 @@ setup(char *dev) } } if ((fsreadfd = open(dev, O_RDONLY)) < 0 || - ufs_disk_fillout(&disk, dev) < 0) { + ufs_disk_fillout_blank(&disk, dev) < 0) { if (bkgrdflag) { unlink(snapname); bkgrdflag = 0; @@ -325,10 +325,8 @@ readsb(int listerr) if ((ret = sbget(fsreadfd, &fs, super)) != 0) { switch (ret) { case EINVAL: - fprintf(stderr, "The previous newfs operation " - "on this volume did not complete.\nYou must " - "complete newfs before using this volume.\n"); - exit(11); + /* Superblock check-hash failed */ + return (0); case ENOENT: if (bflag) fprintf(stderr, "%jd is not a file system " From owner-svn-src-all@freebsd.org Sun Nov 25 19:37:01 2018 Return-Path: Delivered-To: svn-src-all@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 1BA5A113FCD8; Sun, 25 Nov 2018 19:37:01 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE83A7417F; Sun, 25 Nov 2018 19:37:00 +0000 (UTC) (envelope-from wulf@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 9102521337; Sun, 25 Nov 2018 19:37:00 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAPJb0tk035544; Sun, 25 Nov 2018 19:37:00 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAPJb0Mc035543; Sun, 25 Nov 2018 19:37:00 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201811251937.wAPJb0Mc035543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Sun, 25 Nov 2018 19:37:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340926 - head/sys/dev/evdev X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/evdev X-SVN-Commit-Revision: 340926 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: AE83A7417F X-Spamd-Result: default: False [1.54 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.64)[0.643,0]; NEURAL_SPAM_SHORT(0.26)[0.262,0]; NEURAL_SPAM_MEDIUM(0.64)[0.638,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 19:37:01 -0000 Author: wulf Date: Sun Nov 25 19:37:00 2018 New Revision: 340926 URL: https://svnweb.freebsd.org/changeset/base/340926 Log: evdev: Fix pause key release event in AT keyboard set 1 to evdev xlat-or. MFC after: 2 weeks Modified: head/sys/dev/evdev/evdev_utils.c Modified: head/sys/dev/evdev/evdev_utils.c ============================================================================== --- head/sys/dev/evdev/evdev_utils.c Sun Nov 25 18:09:39 2018 (r340925) +++ head/sys/dev/evdev/evdev_utils.c Sun Nov 25 19:37:00 2018 (r340926) @@ -250,12 +250,15 @@ evdev_scancode2key(int *state, int scancode) */ *state = 0; if ((scancode & 0x7f) == 0x1D) - *state = 0x1D; + *state = scancode; return (NONE); /* NOT REACHED */ case 0x1D: /* pause / break */ + case 0x9D: + if ((*state ^ scancode) & 0x80) + return (NONE); *state = 0; - if (scancode != 0x45) + if ((scancode & 0x7f) != 0x45) return (NONE); keycode = KEY_PAUSE; break; From owner-svn-src-all@freebsd.org Mon Nov 26 00:58:08 2018 Return-Path: Delivered-To: svn-src-all@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 683E11148CDB; Mon, 26 Nov 2018 00:58:08 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AA6C7E55F; Mon, 26 Nov 2018 00:58:08 +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 D368E24879; Mon, 26 Nov 2018 00:58:07 +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 wAQ0w7S8099204; Mon, 26 Nov 2018 00:58:07 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQ0w7MU099202; Mon, 26 Nov 2018 00:58:07 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201811260058.wAQ0w7MU099202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 26 Nov 2018 00:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340927 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 340927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0AA6C7E55F X-Spamd-Result: default: False [1.75 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.64)[0.643,0]; NEURAL_SPAM_MEDIUM(0.64)[0.638,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.46)[0.464,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 00:58:08 -0000 Author: mckusick Date: Mon Nov 26 00:58:07 2018 New Revision: 340927 URL: https://svnweb.freebsd.org/changeset/base/340927 Log: Move the check for the filesystem having been run on a kernel that predates metadata check hashes so that it is done before deciding whether to compute a check-hash of the superblock. Reported by: Rick Macklem Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_subr.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_subr.c ============================================================================== --- head/sys/ufs/ffs/ffs_subr.c Sun Nov 25 19:37:00 2018 (r340926) +++ head/sys/ufs/ffs/ffs_subr.c Mon Nov 26 00:58:07 2018 (r340927) @@ -276,6 +276,12 @@ readsuper(void *devfd, struct fs **fsp, off_t sblocklo fs->fs_bsize <= MAXBSIZE && fs->fs_bsize >= roundup(sizeof(struct fs), DEV_BSIZE) && fs->fs_sbsize <= SBLOCKSIZE) { + /* + * If the filesystem has been run on a kernel without + * metadata check hashes, disable them. + */ + if ((fs->fs_flags & FS_METACKHASH) == 0) + fs->fs_metackhash = 0; if (fs->fs_ckhash != (ckhash = ffs_calc_sbhash(fs))) { #ifdef _KERNEL res = uprintf("Superblock check-hash failed: recorded " Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sun Nov 25 19:37:00 2018 (r340926) +++ head/sys/ufs/ffs/ffs_vfsops.c Mon Nov 26 00:58:07 2018 (r340927) @@ -813,9 +813,6 @@ ffs_mountfs(devvp, mp, td) if ((error = ffs_sbget(devvp, &fs, -1, M_UFSMNT, ffs_use_bread)) != 0) goto out; fs->fs_fmod = 0; - /* if we ran on a kernel without metadata check hashes, disable them */ - if ((fs->fs_flags & FS_METACKHASH) == 0) - fs->fs_metackhash = 0; /* none of these types of check-hashes are maintained by this kernel */ fs->fs_metackhash &= ~(CK_INODE | CK_INDIR | CK_DIR); /* no support for any undefined flags */ From owner-svn-src-all@freebsd.org Mon Nov 26 06:20:16 2018 Return-Path: Delivered-To: svn-src-all@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 5F534114EC28; Mon, 26 Nov 2018 06:20:16 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F3D7188AFC; Mon, 26 Nov 2018 06:20:15 +0000 (UTC) (envelope-from arybchik@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 D049727D0B; Mon, 26 Nov 2018 06:20:15 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQ6KFV0064716; Mon, 26 Nov 2018 06:20:15 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQ6KDYw064706; Mon, 26 Nov 2018 06:20:13 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201811260620.wAQ6KDYw064706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 26 Nov 2018 06:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340928 - in head/sys: conf dev/sfxge/common modules/sfxge X-SVN-Group: head X-SVN-Commit-Author: arybchik X-SVN-Commit-Paths: in head/sys: conf dev/sfxge/common modules/sfxge X-SVN-Commit-Revision: 340928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F3D7188AFC X-Spamd-Result: default: False [1.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.54)[0.541,0]; NEURAL_SPAM_MEDIUM(0.69)[0.693,0]; NEURAL_SPAM_LONG(0.69)[0.695,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 06:20:16 -0000 Author: arybchik Date: Mon Nov 26 06:20:13 2018 New Revision: 340928 URL: https://svnweb.freebsd.org/changeset/base/340928 Log: sfxge(4): add API to control UDP tunnel ports HW needs to know which UDP packets should be treated as tunnel encapsulation to do inner packet recognition, classification and offloads. Submitted by: Ivan Malov Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18134 Added: head/sys/dev/sfxge/common/efx_tunnel.c (contents, props changed) Modified: head/sys/conf/files.amd64 head/sys/dev/sfxge/common/ef10_nic.c head/sys/dev/sfxge/common/efsys.h head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_impl.h head/sys/dev/sfxge/common/efx_mcdi.h head/sys/dev/sfxge/common/efx_nic.c head/sys/modules/sfxge/Makefile Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Mon Nov 26 00:58:07 2018 (r340927) +++ head/sys/conf/files.amd64 Mon Nov 26 06:20:13 2018 (r340928) @@ -438,6 +438,7 @@ dev/sfxge/common/efx_phy.c optional sfxge pci dev/sfxge/common/efx_port.c optional sfxge pci dev/sfxge/common/efx_rx.c optional sfxge pci dev/sfxge/common/efx_sram.c optional sfxge pci +dev/sfxge/common/efx_tunnel.c optional sfxge pci dev/sfxge/common/efx_tx.c optional sfxge pci dev/sfxge/common/efx_vpd.c optional sfxge pci dev/sfxge/common/hunt_nic.c optional sfxge pci Modified: head/sys/dev/sfxge/common/ef10_nic.c ============================================================================== --- head/sys/dev/sfxge/common/ef10_nic.c Mon Nov 26 00:58:07 2018 (r340927) +++ head/sys/dev/sfxge/common/ef10_nic.c Mon Nov 26 06:20:13 2018 (r340928) @@ -1079,11 +1079,19 @@ ef10_get_datapath_caps( * Check if firmware supports VXLAN and NVGRE tunnels. * The capability indicates Geneve protocol support as well. */ - if (CAP_FLAG(flags, VXLAN_NVGRE)) + if (CAP_FLAG(flags, VXLAN_NVGRE)) { encp->enc_tunnel_encapsulations_supported = (1u << EFX_TUNNEL_PROTOCOL_VXLAN) | (1u << EFX_TUNNEL_PROTOCOL_GENEVE) | (1u << EFX_TUNNEL_PROTOCOL_NVGRE); + + EFX_STATIC_ASSERT(EFX_TUNNEL_MAXNENTRIES == + MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES_MAXNUM); + encp->enc_tunnel_config_udp_entries_max = + EFX_TUNNEL_MAXNENTRIES; + } else { + encp->enc_tunnel_config_udp_entries_max = 0; + } #undef CAP_FLAG #undef CAP_FLAG2 Modified: head/sys/dev/sfxge/common/efsys.h ============================================================================== --- head/sys/dev/sfxge/common/efsys.h Mon Nov 26 00:58:07 2018 (r340927) +++ head/sys/dev/sfxge/common/efsys.h Mon Nov 26 06:20:13 2018 (r340928) @@ -283,6 +283,8 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, bus_dmamap_t ma #define EFSYS_OPT_RX_PACKED_STREAM 0 +#define EFSYS_OPT_TUNNEL 0 + /* ID */ typedef struct __efsys_identifier_s efsys_identifier_t; Modified: head/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Mon Nov 26 00:58:07 2018 (r340927) +++ head/sys/dev/sfxge/common/efx.h Mon Nov 26 06:20:13 2018 (r340928) @@ -1209,6 +1209,11 @@ typedef struct efx_nic_cfg_s { boolean_t enc_pm_and_rxdp_counters; boolean_t enc_mac_stats_40g_tx_size_bins; uint32_t enc_tunnel_encapsulations_supported; + /* + * NIC global maximum for unique UDP tunnel ports shared by all + * functions. + */ + uint32_t enc_tunnel_config_udp_entries_max; /* External port identifier */ uint8_t enc_external_port; uint32_t enc_mcdi_max_payload_length; @@ -2635,6 +2640,52 @@ efx_lic_finish_partition( #endif /* EFSYS_OPT_LICENSING */ +/* TUNNEL */ + +#if EFSYS_OPT_TUNNEL + +extern __checkReturn efx_rc_t +efx_tunnel_init( + __in efx_nic_t *enp); + +extern void +efx_tunnel_fini( + __in efx_nic_t *enp); + +/* + * For overlay network encapsulation using UDP, the firmware needs to know + * the configured UDP port for the overlay so it can decode encapsulated + * frames correctly. + * The UDP port/protocol list is global. + */ + +extern __checkReturn efx_rc_t +efx_tunnel_config_udp_add( + __in efx_nic_t *enp, + __in uint16_t port /* host/cpu-endian */, + __in efx_tunnel_protocol_t protocol); + +extern __checkReturn efx_rc_t +efx_tunnel_config_udp_remove( + __in efx_nic_t *enp, + __in uint16_t port /* host/cpu-endian */, + __in efx_tunnel_protocol_t protocol); + +extern void +efx_tunnel_config_clear( + __in efx_nic_t *enp); + +/** + * Apply tunnel UDP ports configuration to hardware. + * + * EAGAIN is returned if hardware will be reset (datapath and management CPU + * reboot). + */ +extern __checkReturn efx_rc_t +efx_tunnel_reconfigure( + __in efx_nic_t *enp); + +#endif /* EFSYS_OPT_TUNNEL */ #ifdef __cplusplus Modified: head/sys/dev/sfxge/common/efx_check.h ============================================================================== --- head/sys/dev/sfxge/common/efx_check.h Mon Nov 26 00:58:07 2018 (r340927) +++ head/sys/dev/sfxge/common/efx_check.h Mon Nov 26 06:20:13 2018 (r340928) @@ -346,4 +346,11 @@ # endif #endif +/* Support hardware assistance for tunnels */ +#if EFSYS_OPT_TUNNEL +# if !EFSYS_OPT_MEDFORD +# error "TUNNEL requires MEDFORD" +# endif +#endif /* EFSYS_OPT_TUNNEL */ + #endif /* _SYS_EFX_CHECK_H */ Modified: head/sys/dev/sfxge/common/efx_impl.h ============================================================================== --- head/sys/dev/sfxge/common/efx_impl.h Mon Nov 26 00:58:07 2018 (r340927) +++ head/sys/dev/sfxge/common/efx_impl.h Mon Nov 26 06:20:13 2018 (r340928) @@ -78,6 +78,7 @@ extern "C" { #define EFX_MOD_MON 0x00000400 #define EFX_MOD_FILTER 0x00001000 #define EFX_MOD_LIC 0x00002000 +#define EFX_MOD_TUNNEL 0x00004000 #define EFX_RESET_PHY 0x00000001 #define EFX_RESET_RXQ_ERR 0x00000002 @@ -266,6 +267,12 @@ efx_filter_reconfigure( #endif /* EFSYS_OPT_FILTER */ +#if EFSYS_OPT_TUNNEL +typedef struct efx_tunnel_ops_s { + boolean_t (*eto_udp_encap_supported)(efx_nic_t *); + efx_rc_t (*eto_reconfigure)(efx_nic_t *); +} efx_tunnel_ops_t; +#endif /* EFSYS_OPT_TUNNEL */ typedef struct efx_port_s { efx_mac_type_t ep_mac_type; @@ -429,6 +436,22 @@ siena_filter_tbl_clear( #if EFSYS_OPT_MCDI +#define EFX_TUNNEL_MAXNENTRIES (16) + +#if EFSYS_OPT_TUNNEL + +typedef struct efx_tunnel_udp_entry_s { + uint16_t etue_port; /* host/cpu-endian */ + uint16_t etue_protocol; +} efx_tunnel_udp_entry_t; + +typedef struct efx_tunnel_cfg_s { + efx_tunnel_udp_entry_t etc_udp_entries[EFX_TUNNEL_MAXNENTRIES]; + unsigned int etc_udp_entries_num; +} efx_tunnel_cfg_t; + +#endif /* EFSYS_OPT_TUNNEL */ + typedef struct efx_mcdi_ops_s { efx_rc_t (*emco_init)(efx_nic_t *, const efx_mcdi_transport_t *); void (*emco_send_request)(efx_nic_t *, void *, size_t, @@ -641,6 +664,10 @@ struct efx_nic_s { efx_filter_t en_filter; const efx_filter_ops_t *en_efop; #endif /* EFSYS_OPT_FILTER */ +#if EFSYS_OPT_TUNNEL + efx_tunnel_cfg_t en_tunnel_cfg; + const efx_tunnel_ops_t *en_etop; +#endif /* EFSYS_OPT_TUNNEL */ #if EFSYS_OPT_MCDI efx_mcdi_t en_mcdi; #endif /* EFSYS_OPT_MCDI */ Modified: head/sys/dev/sfxge/common/efx_mcdi.h ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.h Mon Nov 26 00:58:07 2018 (r340927) +++ head/sys/dev/sfxge/common/efx_mcdi.h Mon Nov 26 06:20:13 2018 (r340928) @@ -386,6 +386,10 @@ efx_mcdi_phy_module_get_info( EFX_WORD_FIELD(*MCDI_OUT2(_emr, efx_word_t, _ofst), \ EFX_WORD_0) +#define MCDI_OUT_WORD_FIELD(_emr, _ofst, _field) \ + EFX_WORD_FIELD(*MCDI_OUT2(_emr, efx_word_t, _ofst), \ + MC_CMD_ ## _field) + #define MCDI_OUT_DWORD(_emr, _ofst) \ EFX_DWORD_FIELD(*MCDI_OUT2(_emr, efx_dword_t, _ofst), \ EFX_DWORD_0) Modified: head/sys/dev/sfxge/common/efx_nic.c ============================================================================== --- head/sys/dev/sfxge/common/efx_nic.c Mon Nov 26 00:58:07 2018 (r340927) +++ head/sys/dev/sfxge/common/efx_nic.c Mon Nov 26 06:20:13 2018 (r340928) @@ -510,7 +510,7 @@ efx_nic_reset( EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT(enp->en_mod_flags & EFX_MOD_PROBE); /* - * All modules except the MCDI, PROBE, NVRAM, VPD, MON + * All modules except the MCDI, PROBE, NVRAM, VPD, MON, TUNNEL * (which we do not reset here) must have been shut down or never * initialized. * @@ -520,7 +520,10 @@ efx_nic_reset( */ mod_flags = enp->en_mod_flags; mod_flags &= ~(EFX_MOD_MCDI | EFX_MOD_PROBE | EFX_MOD_NVRAM | - EFX_MOD_VPD | EFX_MOD_MON); + EFX_MOD_VPD | EFX_MOD_MON); +#if EFSYS_OPT_TUNNEL + mod_flags &= ~EFX_MOD_TUNNEL; +#endif /* EFSYS_OPT_TUNNEL */ EFSYS_ASSERT3U(mod_flags, ==, 0); if (mod_flags != 0) { rc = EINVAL; Added: head/sys/dev/sfxge/common/efx_tunnel.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/sfxge/common/efx_tunnel.c Mon Nov 26 06:20:13 2018 (r340928) @@ -0,0 +1,492 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2017-2018 Solarflare Communications Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. + * + * The views and conclusions contained in the software and documentation are + * those of the authors and should not be interpreted as representing official + * policies, either expressed or implied, of the FreeBSD Project. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "efx.h" +#include "efx_impl.h" + + +#if EFSYS_OPT_TUNNEL + +#if EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON +static const efx_tunnel_ops_t __efx_tunnel_dummy_ops = { + NULL, /* eto_udp_encap_supported */ + NULL, /* eto_reconfigure */ +}; +#endif /* EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON */ + +#if EFSYS_OPT_MEDFORD +static __checkReturn boolean_t +medford_udp_encap_supported( + __in efx_nic_t *enp); + +static __checkReturn efx_rc_t +medford_tunnel_reconfigure( + __in efx_nic_t *enp); + +static const efx_tunnel_ops_t __efx_tunnel_medford_ops = { + medford_udp_encap_supported, /* eto_udp_encap_supported */ + medford_tunnel_reconfigure, /* eto_reconfigure */ +}; +#endif /* EFSYS_OPT_MEDFORD */ + +static __checkReturn efx_rc_t +efx_mcdi_set_tunnel_encap_udp_ports( + __in efx_nic_t *enp, + __in efx_tunnel_cfg_t *etcp, + __in boolean_t unloading, + __out boolean_t *resetting) +{ + efx_mcdi_req_t req; + uint8_t payload[MAX(MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_LENMAX, + MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_LEN)]; + efx_word_t flags; + efx_rc_t rc; + unsigned int i; + unsigned int entries_num; + + if (etcp == NULL) + entries_num = 0; + else + entries_num = etcp->etc_udp_entries_num; + + (void) memset(payload, 0, sizeof (payload)); + req.emr_cmd = MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS; + req.emr_in_buf = payload; + req.emr_in_length = + MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_LEN(entries_num); + req.emr_out_buf = payload; + req.emr_out_length = MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_LEN; + + EFX_POPULATE_WORD_1(flags, + MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_UNLOADING, + (unloading == B_TRUE) ? 1 : 0); + MCDI_IN_SET_WORD(req, SET_TUNNEL_ENCAP_UDP_PORTS_IN_FLAGS, + EFX_WORD_FIELD(flags, EFX_WORD_0)); + + MCDI_IN_SET_WORD(req, SET_TUNNEL_ENCAP_UDP_PORTS_IN_NUM_ENTRIES, + entries_num); + + for (i = 0; i < entries_num; ++i) { + uint16_t mcdi_udp_protocol; + + switch (etcp->etc_udp_entries[i].etue_protocol) { + case EFX_TUNNEL_PROTOCOL_VXLAN: + mcdi_udp_protocol = TUNNEL_ENCAP_UDP_PORT_ENTRY_VXLAN; + break; + case EFX_TUNNEL_PROTOCOL_GENEVE: + mcdi_udp_protocol = TUNNEL_ENCAP_UDP_PORT_ENTRY_GENEVE; + break; + default: + rc = EINVAL; + goto fail1; + } + + /* + * UDP port is MCDI native little-endian in the request + * and EFX_POPULATE_DWORD cares about conversion from + * host/CPU byte order to little-endian. + */ + EFX_STATIC_ASSERT(sizeof (efx_dword_t) == + TUNNEL_ENCAP_UDP_PORT_ENTRY_LEN); + EFX_POPULATE_DWORD_2( + MCDI_IN2(req, efx_dword_t, + SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES)[i], + TUNNEL_ENCAP_UDP_PORT_ENTRY_UDP_PORT, + etcp->etc_udp_entries[i].etue_port, + TUNNEL_ENCAP_UDP_PORT_ENTRY_PROTOCOL, + mcdi_udp_protocol); + } + + efx_mcdi_execute(enp, &req); + + if (req.emr_rc != 0) { + rc = req.emr_rc; + goto fail2; + } + + if (req.emr_out_length_used != + MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_LEN) { + rc = EMSGSIZE; + goto fail3; + } + + *resetting = MCDI_OUT_WORD_FIELD(req, + SET_TUNNEL_ENCAP_UDP_PORTS_OUT_FLAGS, + SET_TUNNEL_ENCAP_UDP_PORTS_OUT_RESETTING); + + return (0); + +fail3: + EFSYS_PROBE(fail3); + +fail2: + EFSYS_PROBE(fail2); + +fail1: + EFSYS_PROBE1(fail1, efx_rc_t, rc); + + return (rc); +} + + __checkReturn efx_rc_t +efx_tunnel_init( + __in efx_nic_t *enp) +{ + efx_tunnel_cfg_t *etcp = &enp->en_tunnel_cfg; + const efx_tunnel_ops_t *etop; + efx_rc_t rc; + + EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); + EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); + EFSYS_ASSERT(!(enp->en_mod_flags & EFX_MOD_TUNNEL)); + + EFX_STATIC_ASSERT(EFX_TUNNEL_MAXNENTRIES == + MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES_MAXNUM); + + switch (enp->en_family) { +#if EFSYS_OPT_SIENA + case EFX_FAMILY_SIENA: + etop = &__efx_tunnel_dummy_ops; + break; +#endif /* EFSYS_OPT_SIENA */ + +#if EFSYS_OPT_HUNTINGTON + case EFX_FAMILY_HUNTINGTON: + etop = &__efx_tunnel_dummy_ops; + break; +#endif /* EFSYS_OPT_HUNTINGTON */ + +#if EFSYS_OPT_MEDFORD + case EFX_FAMILY_MEDFORD: + etop = &__efx_tunnel_medford_ops; + break; +#endif /* EFSYS_OPT_MEDFORD */ + + default: + EFSYS_ASSERT(0); + rc = ENOTSUP; + goto fail1; + } + + memset(etcp->etc_udp_entries, 0, sizeof (etcp->etc_udp_entries)); + etcp->etc_udp_entries_num = 0; + + enp->en_etop = etop; + enp->en_mod_flags |= EFX_MOD_TUNNEL; + + return (0); + +fail1: + EFSYS_PROBE1(fail1, efx_rc_t, rc); + + enp->en_etop = NULL; + enp->en_mod_flags &= ~EFX_MOD_TUNNEL; + + return (rc); +} + + void +efx_tunnel_fini( + __in efx_nic_t *enp) +{ + boolean_t resetting; + + EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); + EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); + EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_TUNNEL); + + if ((enp->en_etop->eto_udp_encap_supported != NULL) && + enp->en_etop->eto_udp_encap_supported(enp)) { + /* + * The UNLOADING flag allows the MC to suppress the datapath + * reset if it was set on the last call to + * MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS by all functions + */ + (void) efx_mcdi_set_tunnel_encap_udp_ports(enp, NULL, B_TRUE, + &resetting); + } + + enp->en_etop = NULL; + enp->en_mod_flags &= ~EFX_MOD_TUNNEL; +} + +static __checkReturn efx_rc_t +efx_tunnel_config_find_udp_tunnel_entry( + __in efx_tunnel_cfg_t *etcp, + __in uint16_t port, + __out unsigned int *entryp) +{ + unsigned int i; + + for (i = 0; i < etcp->etc_udp_entries_num; ++i) { + efx_tunnel_udp_entry_t *p = &etcp->etc_udp_entries[i]; + + if (p->etue_port == port) { + *entryp = i; + return (0); + } + } + + return (ENOENT); +} + + __checkReturn efx_rc_t +efx_tunnel_config_udp_add( + __in efx_nic_t *enp, + __in uint16_t port /* host/cpu-endian */, + __in efx_tunnel_protocol_t protocol) +{ + const efx_nic_cfg_t *encp = &enp->en_nic_cfg; + efx_tunnel_cfg_t *etcp = &enp->en_tunnel_cfg; + efsys_lock_state_t state; + efx_rc_t rc; + unsigned int entry; + + EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_TUNNEL); + + if (protocol >= EFX_TUNNEL_NPROTOS) { + rc = EINVAL; + goto fail1; + } + + if ((encp->enc_tunnel_encapsulations_supported & + (1u << protocol)) == 0) { + rc = ENOTSUP; + goto fail2; + } + + EFSYS_LOCK(enp->en_eslp, state); + + rc = efx_tunnel_config_find_udp_tunnel_entry(etcp, port, &entry); + if (rc == 0) { + rc = EEXIST; + goto fail3; + } + + if (etcp->etc_udp_entries_num == + encp->enc_tunnel_config_udp_entries_max) { + rc = ENOSPC; + goto fail4; + } + + etcp->etc_udp_entries[etcp->etc_udp_entries_num].etue_port = port; + etcp->etc_udp_entries[etcp->etc_udp_entries_num].etue_protocol = + protocol; + + etcp->etc_udp_entries_num++; + + EFSYS_UNLOCK(enp->en_eslp, state); + + return (0); + +fail4: + EFSYS_PROBE(fail4); + +fail3: + EFSYS_PROBE(fail3); + EFSYS_UNLOCK(enp->en_eslp, state); + +fail2: + EFSYS_PROBE(fail2); + +fail1: + EFSYS_PROBE1(fail1, efx_rc_t, rc); + + return (rc); +} + + __checkReturn efx_rc_t +efx_tunnel_config_udp_remove( + __in efx_nic_t *enp, + __in uint16_t port /* host/cpu-endian */, + __in efx_tunnel_protocol_t protocol) +{ + efx_tunnel_cfg_t *etcp = &enp->en_tunnel_cfg; + efsys_lock_state_t state; + unsigned int entry; + efx_rc_t rc; + + EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_TUNNEL); + + EFSYS_LOCK(enp->en_eslp, state); + + rc = efx_tunnel_config_find_udp_tunnel_entry(etcp, port, &entry); + if (rc != 0) + goto fail1; + + if (etcp->etc_udp_entries[entry].etue_protocol != protocol) { + rc = EINVAL; + goto fail2; + } + + EFSYS_ASSERT3U(etcp->etc_udp_entries_num, >, 0); + etcp->etc_udp_entries_num--; + + if (entry < etcp->etc_udp_entries_num) { + memmove(&etcp->etc_udp_entries[entry], + &etcp->etc_udp_entries[entry + 1], + (etcp->etc_udp_entries_num - entry) * + sizeof (etcp->etc_udp_entries[0])); + } + + memset(&etcp->etc_udp_entries[etcp->etc_udp_entries_num], 0, + sizeof (etcp->etc_udp_entries[0])); + + EFSYS_UNLOCK(enp->en_eslp, state); + + return (0); + +fail2: + EFSYS_PROBE(fail2); + +fail1: + EFSYS_PROBE1(fail1, efx_rc_t, rc); + EFSYS_UNLOCK(enp->en_eslp, state); + + return (rc); +} + + void +efx_tunnel_config_clear( + __in efx_nic_t *enp) +{ + efx_tunnel_cfg_t *etcp = &enp->en_tunnel_cfg; + efsys_lock_state_t state; + + EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_TUNNEL); + + EFSYS_LOCK(enp->en_eslp, state); + + etcp->etc_udp_entries_num = 0; + memset(etcp->etc_udp_entries, 0, sizeof (etcp->etc_udp_entries)); + + EFSYS_UNLOCK(enp->en_eslp, state); +} + + __checkReturn efx_rc_t +efx_tunnel_reconfigure( + __in efx_nic_t *enp) +{ + const efx_tunnel_ops_t *etop = enp->en_etop; + efx_rc_t rc; + + EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_TUNNEL); + + if (etop->eto_reconfigure == NULL) { + rc = ENOTSUP; + goto fail1; + } + + if ((rc = enp->en_etop->eto_reconfigure(enp)) != 0) + goto fail2; + + return (0); + +fail2: + EFSYS_PROBE(fail2); + +fail1: + EFSYS_PROBE1(fail1, efx_rc_t, rc); + + return (rc); +} + +#if EFSYS_OPT_MEDFORD +static __checkReturn boolean_t +medford_udp_encap_supported( + __in efx_nic_t *enp) +{ + const efx_nic_cfg_t *encp = &enp->en_nic_cfg; + uint32_t udp_tunnels_mask = 0; + + udp_tunnels_mask |= (1u << EFX_TUNNEL_PROTOCOL_VXLAN); + udp_tunnels_mask |= (1u << EFX_TUNNEL_PROTOCOL_GENEVE); + + return ((encp->enc_tunnel_encapsulations_supported & + udp_tunnels_mask) == 0 ? B_FALSE : B_TRUE); +} + +static __checkReturn efx_rc_t +medford_tunnel_reconfigure( + __in efx_nic_t *enp) +{ + efx_tunnel_cfg_t *etcp = &enp->en_tunnel_cfg; + efx_rc_t rc; + boolean_t resetting; + efsys_lock_state_t state; + efx_tunnel_cfg_t etc; + + EFSYS_LOCK(enp->en_eslp, state); + memcpy(&etc, etcp, sizeof (etc)); + EFSYS_UNLOCK(enp->en_eslp, state); + + if (medford_udp_encap_supported(enp) == B_FALSE) { + /* + * It is OK to apply empty UDP tunnel ports when UDP + * tunnel encapsulations are not supported - just nothing + * should be done. + */ + if (etc.etc_udp_entries_num == 0) + return (0); + rc = ENOTSUP; + goto fail1; + } else { + /* + * All PCI functions can see a reset upon the + * MCDI request completion + */ + rc = efx_mcdi_set_tunnel_encap_udp_ports(enp, &etc, B_FALSE, + &resetting); + if (rc != 0) + goto fail2; + + /* + * Although the caller should be able to handle MC reboot, + * it might come in handy to report the impending reboot + * by returning EAGAIN + */ + return ((resetting) ? EAGAIN : 0); + } +fail2: + EFSYS_PROBE(fail2); + +fail1: + EFSYS_PROBE1(fail1, efx_rc_t, rc); + + return (rc); +} +#endif /* EFSYS_OPT_MEDFORD */ + +#endif /* EFSYS_OPT_TUNNEL */ Modified: head/sys/modules/sfxge/Makefile ============================================================================== --- head/sys/modules/sfxge/Makefile Mon Nov 26 00:58:07 2018 (r340927) +++ head/sys/modules/sfxge/Makefile Mon Nov 26 06:20:13 2018 (r340928) @@ -16,8 +16,8 @@ SRCS+= sfxge.h sfxge_rx.h sfxge_tx.h sfxge_version.h .PATH: ${SRCTOP}/sys/dev/sfxge/common SRCS+= efx_bootcfg.c efx_crc32.c efx_ev.c efx_intr.c efx_lic.c efx_mac.c SRCS+= efx_mcdi.c efx_mon.c efx_nic.c -SRCS+= efx_nvram.c efx_phy.c efx_port.c efx_rx.c efx_sram.c efx_tx.c -SRCS+= efx_vpd.c efx_filter.c efx_hash.c +SRCS+= efx_nvram.c efx_phy.c efx_port.c efx_rx.c efx_sram.c efx_tunnel.c +SRCS+= efx_tx.c efx_vpd.c efx_filter.c efx_hash.c SRCS+= efsys.h SRCS+= efx.h efx_check.h efx_impl.h efx_mcdi.h efx_regs.h efx_regs_ef10.h SRCS+= efx_regs_mcdi.h efx_regs_pci.h efx_types.h efx_phy_ids.h From owner-svn-src-all@freebsd.org Mon Nov 26 07:15:20 2018 Return-Path: Delivered-To: svn-src-all@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 87D21114FECE; Mon, 26 Nov 2018 07:15:20 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 279F28A9B9; Mon, 26 Nov 2018 07:15:20 +0000 (UTC) (envelope-from arybchik@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 07635707; Mon, 26 Nov 2018 07:15:20 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQ7FJCR095785; Mon, 26 Nov 2018 07:15:19 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQ7FJbd095784; Mon, 26 Nov 2018 07:15:19 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201811260715.wAQ7FJbd095784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 26 Nov 2018 07:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340929 - head/sys/dev/sfxge/common X-SVN-Group: head X-SVN-Commit-Author: arybchik X-SVN-Commit-Paths: head/sys/dev/sfxge/common X-SVN-Commit-Revision: 340929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 279F28A9B9 X-Spamd-Result: default: False [1.74 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.46)[0.461,0]; NEURAL_SPAM_MEDIUM(0.64)[0.638,0]; NEURAL_SPAM_LONG(0.64)[0.643,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 07:15:20 -0000 Author: arybchik Date: Mon Nov 26 07:15:19 2018 New Revision: 340929 URL: https://svnweb.freebsd.org/changeset/base/340929 Log: sfxge(4): regenerate files with genfwdef after ID update Add security level to image boot header. Submitted by: Andrew Jackson Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18289 Modified: head/sys/dev/sfxge/common/siena_flash.h Modified: head/sys/dev/sfxge/common/siena_flash.h ============================================================================== --- head/sys/dev/sfxge/common/siena_flash.h Mon Nov 26 06:20:13 2018 (r340928) +++ head/sys/dev/sfxge/common/siena_flash.h Mon Nov 26 07:15:19 2018 (r340929) @@ -131,7 +131,14 @@ typedef struct siena_mc_boot_hdr_s { /* GENERATED BY /* the key, or 0xffff if unsigned. (Otherwise set to 0) */ efx_byte_t mumfw_subtype; /* MUM & SUC images: subtype. (Otherwise set to 0) */ efx_byte_t reserved_b[3]; /* (set to 0) */ - efx_dword_t reserved_c[6]; /* (set to 0) */ + efx_dword_t security_level; /* This number increases every time a serious security flaw */ + /* is fixed. A secure NIC may not downgrade to any image */ + /* with a lower security level than the current image. */ + /* Note: The number in this header should only be used for */ + /* determining the level of new images, not to determine */ + /* the level of the current image as this header is not */ + /* protected by a CMAC. */ + efx_dword_t reserved_c[5]; /* (set to 0) */ } siena_mc_boot_hdr_t; #define SIENA_MC_BOOT_HDR_PADDING \ From owner-svn-src-all@freebsd.org Mon Nov 26 07:23:05 2018 Return-Path: Delivered-To: svn-src-all@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 81D201150195; Mon, 26 Nov 2018 07:23:04 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 312F18AE91; Mon, 26 Nov 2018 07:23:04 +0000 (UTC) (envelope-from arybchik@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 120F28A1; Mon, 26 Nov 2018 07:23:04 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQ7N4L9000954; Mon, 26 Nov 2018 07:23:04 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQ7N3pT000949; Mon, 26 Nov 2018 07:23:03 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201811260723.wAQ7N3pT000949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 26 Nov 2018 07:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340930 - in head: . sys/dev/sfxge/common sys/modules/sfxge X-SVN-Group: head X-SVN-Commit-Author: arybchik X-SVN-Commit-Paths: in head: . sys/dev/sfxge/common sys/modules/sfxge X-SVN-Commit-Revision: 340930 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 312F18AE91 X-Spamd-Result: default: False [1.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.71)[0.710,0]; NEURAL_SPAM_SHORT(0.56)[0.565,0]; NEURAL_SPAM_MEDIUM(0.71)[0.710,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 07:23:05 -0000 Author: arybchik Date: Mon Nov 26 07:23:02 2018 New Revision: 340930 URL: https://svnweb.freebsd.org/changeset/base/340930 Log: sfxge(4): update autogenerated headers from firmwaresrc Pick up Medford2 interfaces. Split AOE operations out into own header. Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18137 Added: head/sys/dev/sfxge/common/efx_regs_mcdi_aoe.h (contents, props changed) Modified: head/.gitattributes head/sys/dev/sfxge/common/ef10_tlv_layout.h head/sys/dev/sfxge/common/efx_lic.c head/sys/dev/sfxge/common/efx_regs_mcdi.h head/sys/modules/sfxge/Makefile Modified: head/.gitattributes ============================================================================== --- head/.gitattributes Mon Nov 26 07:15:19 2018 (r340929) +++ head/.gitattributes Mon Nov 26 07:23:02 2018 (r340930) @@ -3,3 +3,5 @@ *.cpp diff=cpp *.hpp diff=cpp *.py diff=python +. svn-properties=svn:mime-type=sys/dev/sfxge/common/efx_regs_mcdi_aoe.h +. svn-properties=svn:eol-style=sys/dev/sfxge/common/efx_regs_mcdi_aoe.h Modified: head/sys/dev/sfxge/common/ef10_tlv_layout.h ============================================================================== --- head/sys/dev/sfxge/common/ef10_tlv_layout.h Mon Nov 26 07:15:19 2018 (r340929) +++ head/sys/dev/sfxge/common/ef10_tlv_layout.h Mon Nov 26 07:23:02 2018 (r340930) @@ -540,6 +540,17 @@ struct tlv_pcie_config_r2 { * number of externally visible ports (and, hence, PF to port mapping), so must * be done at boot time. * + * Port mode naming convention is + * + * [nports_on_cage0]x[port_lane_width]_[nports_on_cage1]x[port_lane_width] + * + * Port lane width determines the capabilities (speeds) of the ports, subject + * to architecture capabilities (e.g. 25G support) and switch bandwidth + * constraints: + * - single lane ports can do 25G/10G/1G + * - dual lane ports can do 50G/25G/10G/1G (with fallback to 1 lane) + * - quad lane ports can do 100G/40G/50G/25G/10G/1G (with fallback to 2 or 1 lanes) + * This tag supercedes tlv_global_port_config. */ @@ -550,18 +561,68 @@ struct tlv_global_port_mode { uint32_t length; uint32_t port_mode; #define TLV_PORT_MODE_DEFAULT (0xffffffff) /* Default for given platform */ -#define TLV_PORT_MODE_10G (0) /* 10G, single SFP/10G-KR */ -#define TLV_PORT_MODE_40G (1) /* 40G, single QSFP/40G-KR */ -#define TLV_PORT_MODE_10G_10G (2) /* 2x10G, dual SFP/10G-KR or single QSFP */ -#define TLV_PORT_MODE_40G_40G (3) /* 40G + 40G, dual QSFP/40G-KR (Greenport, Medford) */ -#define TLV_PORT_MODE_10G_10G_10G_10G (4) /* 2x10G + 2x10G, quad SFP/10G-KR or dual QSFP (Greenport) */ -#define TLV_PORT_MODE_10G_10G_10G_10G_Q1 (4) /* 4x10G, single QSFP, cage 0 (Medford) */ -#define TLV_PORT_MODE_10G_10G_10G_10G_Q (5) /* 4x10G, single QSFP, cage 0 (Medford) OBSOLETE DO NOT USE */ -#define TLV_PORT_MODE_40G_10G_10G (6) /* 1x40G + 2x10G, dual QSFP (Greenport, Medford) */ -#define TLV_PORT_MODE_10G_10G_40G (7) /* 2x10G + 1x40G, dual QSFP (Greenport, Medford) */ -#define TLV_PORT_MODE_10G_10G_10G_10G_Q2 (8) /* 4x10G, single QSFP, cage 1 (Medford) */ -#define TLV_PORT_MODE_10G_10G_10G_10G_Q1_Q2 (9) /* 2x10G + 2x10G, dual QSFP (Medford) */ -#define TLV_PORT_MODE_MAX TLV_PORT_MODE_10G_10G_10G_10G_Q1_Q2 +#define TLV_PORT_MODE_1x1_NA (0) /* Single 10G/25G on mdi0 */ +#define TLV_PORT_MODE_1x4_NA (1) /* Single 100G/40G on mdi0 */ +#define TLV_PORT_MODE_NA_1x4 (22) /* Single 100G/40G on mdi1 */ +#define TLV_PORT_MODE_1x2_NA (10) /* Single 50G on mdi0 */ +#define TLV_PORT_MODE_NA_1x2 (11) /* Single 50G on mdi1 */ +#define TLV_PORT_MODE_1x1_1x1 (2) /* Single 10G/25G on mdi0, single 10G/25G on mdi1 */ +#define TLV_PORT_MODE_1x4_1x4 (3) /* Single 40G on mdi0, single 40G on mdi1 */ +#define TLV_PORT_MODE_2x1_2x1 (4) /* Dual 10G/25G on mdi0, dual 10G/25G on mdi1 - WARNING: bug3720: On Newport only, this is actually Quad 10G on mdi0 */ +#define TLV_PORT_MODE_4x1_NA (5) /* Quad 10G/25G on mdi0 */ +#define TLV_PORT_MODE_NA_4x1 (8) /* Quad 10G/25G on mdi1 */ +#define TLV_PORT_MODE_1x4_2x1 (6) /* Single 40G on mdi0, dual 10G/25G on mdi1 */ +#define TLV_PORT_MODE_2x1_1x4 (7) /* Dual 10G/25G on mdi0, single 40G on mdi1 */ +#define TLV_PORT_MODE_1x2_1x2 (12) /* Single 50G on mdi0, single 50G on mdi1 */ +#define TLV_PORT_MODE_2x2_NA (13) /* Dual 50G on mdi0 */ +#define TLV_PORT_MODE_NA_2x2 (14) /* Dual 50G on mdi1 */ +#define TLV_PORT_MODE_1x4_1x2 (15) /* Single 40G on mdi0, single 50G on mdi1 */ +#define TLV_PORT_MODE_1x2_1x4 (16) /* Single 50G on mdi0, single 40G on mdi1 */ +#define TLV_PORT_MODE_1x2_2x1 (17) /* Single 50G on mdi0, dual 10G/25G on mdi1 */ +#define TLV_PORT_MODE_2x1_1x2 (18) /* Dual 10G/25G on mdi0, single 50G on mdi1 */ +#define TLV_PORT_MODE_2x1_2x1_LL (19) /* Dual 10G/25G on mdi0, dual 10G/25G on mdi1, low-latency PCS */ +#define TLV_PORT_MODE_4x1_NA_LL (20) /* Quad 10G/25G on mdi0, low-latency PCS */ +#define TLV_PORT_MODE_NA_4x1_LL (21) /* Quad 10G/25G on mdi1, low-latency PCS */ +#define TLV_PORT_MODE_1x1_NA_LL (23) /* Single 10G/25G on mdi0, low-latency PCS */ +#define TLV_PORT_MODE_1x1_1x1_LL (24) /* Single 10G/25G on mdi0, single 10G/25G on mdi1, low-latency PCS */ +#define TLV_PORT_MODE_BUG63720_DO_NOT_USE (9) /* bug63720: Do not use */ +#define TLV_PORT_MODE_MAX TLV_PORT_MODE_1x1_1x1_LL + +/* Deprecated aliases */ +#define TLV_PORT_MODE_10G TLV_PORT_MODE_1x1_NA +#define TLV_PORT_MODE_40G TLV_PORT_MODE_1x4_NA +#define TLV_PORT_MODE_10G_10G TLV_PORT_MODE_1x1_1x1 +#define TLV_PORT_MODE_40G_40G TLV_PORT_MODE_1x4_1x4 +#define TLV_PORT_MODE_10G_10G_10G_10G TLV_PORT_MODE_2x1_2x1 +#define TLV_PORT_MODE_10G_10G_10G_10G_Q1 TLV_PORT_MODE_2x1_2x1 /* bug63720: Do not use */ +#define TLV_PORT_MODE_10G_10G_10G_10G_Q TLV_PORT_MODE_4x1_NA +#define TLV_PORT_MODE_40G_10G_10G TLV_PORT_MODE_1x4_2x1 +#define TLV_PORT_MODE_10G_10G_40G TLV_PORT_MODE_2x1_1x4 +#define TLV_PORT_MODE_10G_10G_10G_10G_Q2 TLV_PORT_MODE_NA_4x1 +#define TLV_PORT_MODE_10G_10G_10G_10G_Q1_Q2 TLV_PORT_MODE_BUG63720_DO_NOT_USE /* bug63720: Do not use */ +#define TLV_PORT_MODE_25G TLV_PORT_MODE_1x1_NA /* Single 25G on mdi0 */ +#define TLV_PORT_MODE_100G_Q1 TLV_PORT_MODE_1x4_NA /* Single 100G on mdi0 */ +#define TLV_PORT_MODE_100G_Q2 TLV_PORT_MODE_NA_1x4 /* Single 100G on mdi1 */ +#define TLV_PORT_MODE_50G_Q1 TLV_PORT_MODE_1x2_NA /* Single 50G on mdi0 */ +#define TLV_PORT_MODE_50G_Q2 TLV_PORT_MODE_NA_1x2 /* Single 50G on mdi1 */ +#define TLV_PORT_MODE_25G_25G TLV_PORT_MODE_1x1_1x1 /* Single 25G on mdi0, single 25G on mdi1 */ +#define TLV_PORT_MODE_25G_25G_25G_25G_Q1_Q2 TLV_PORT_MODE_2x1_2x1 /* Dual 25G on mdi0, dual 25G on mdi1 */ +#define TLV_PORT_MODE_25G_25G_25G_25G_Q1 TLV_PORT_MODE_4x1_NA /* Quad 25G on mdi0 */ +#define TLV_PORT_MODE_25G_25G_25G_25G_Q2 TLV_PORT_MODE_NA_4x1 /* Quad 25G on mdi1 */ +#define TLV_PORT_MODE_40G_25G_25G TLV_PORT_MODE_1x4_2x1 /* Single 40G on mdi0, dual 25G on mdi1 */ +#define TLV_PORT_MODE_25G_25G_40G TLV_PORT_MODE_2x1_1x4 /* Dual 25G on mdi0, single 40G on mdi1 */ +#define TLV_PORT_MODE_50G_50G_Q1_Q2 TLV_PORT_MODE_1x2_1x2 /* Single 50G on mdi0, single 50G on mdi1 */ +#define TLV_PORT_MODE_50G_50G_Q1 TLV_PORT_MODE_2x2_NA /* Dual 50G on mdi0 */ +#define TLV_PORT_MODE_50G_50G_Q2 TLV_PORT_MODE_NA_2x2 /* Dual 50G on mdi1 */ +#define TLV_PORT_MODE_40G_50G TLV_PORT_MODE_1x4_1x2 /* Single 40G on mdi0, single 50G on mdi1 */ +#define TLV_PORT_MODE_50G_40G TLV_PORT_MODE_1x2_1x4 /* Single 50G on mdi0, single 40G on mdi1 */ +#define TLV_PORT_MODE_50G_25G_25G TLV_PORT_MODE_1x2_2x1 /* Single 50G on mdi0, dual 25G on mdi1 */ +#define TLV_PORT_MODE_25G_25G_50G TLV_PORT_MODE_2x1_1x2 /* Dual 25G on mdi0, single 50G on mdi1 */ +#define TLV_PORT_MODE_25G_25G_25G_25G_Q1_Q2_LL TLV_PORT_MODE_2x1_2x1_LL /* Dual 25G on mdi0, dual 25G on mdi1, low-latency PCS */ +#define TLV_PORT_MODE_25G_25G_25G_25G_Q1_LL TLV_PORT_MODE_4x1_NA_LL /* Quad 25G on mdi0, low-latency PCS */ +#define TLV_PORT_MODE_25G_25G_25G_25G_Q2_LL TLV_PORT_MODE_NA_4x1_LL /* Quad 25G on mdi1, low-latency PCS */ +#define TLV_PORT_MODE_25G_LL TLV_PORT_MODE_1x1_NA_LL /* Single 10G/25G on mdi0, low-latency PCS */ +#define TLV_PORT_MODE_25G_25G_LL TLV_PORT_MODE_1x1_1x1_LL /* Single 10G/25G on mdi0, single 10G/25G on mdi1, low-latency PCS */ }; /* Type of the v-switch created implicitly by the firmware */ Modified: head/sys/dev/sfxge/common/efx_lic.c ============================================================================== --- head/sys/dev/sfxge/common/efx_lic.c Mon Nov 26 07:15:19 2018 (r340929) +++ head/sys/dev/sfxge/common/efx_lic.c Mon Nov 26 07:23:02 2018 (r340930) @@ -37,6 +37,9 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_LICENSING #include "ef10_tlv_layout.h" +#if EFSYS_OPT_SIENA +#include "efx_regs_mcdi_aoe.h" +#endif #if EFSYS_OPT_SIENA | EFSYS_OPT_HUNTINGTON Modified: head/sys/dev/sfxge/common/efx_regs_mcdi.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs_mcdi.h Mon Nov 26 07:15:19 2018 (r340929) +++ head/sys/dev/sfxge/common/efx_regs_mcdi.h Mon Nov 26 07:23:02 2018 (r340930) @@ -312,6 +312,14 @@ /* This command needs to be processed in the background but there were no * resources to do so. Send it again after a command has completed. */ #define MC_CMD_ERR_QUEUE_FULL 0x1017 +/* The operation could not be completed because the PCIe link has gone + * away. This error code is never expected to be returned over the TLP + * transport. */ +#define MC_CMD_ERR_NO_PCIE 0x1018 +/* The operation could not be completed because the datapath has gone + * away. This is distinct from MC_CMD_ERR_DATAPATH_DISABLED in that the + * datapath absence may be temporary*/ +#define MC_CMD_ERR_NO_DATAPATH 0x1019 #define MC_CMD_ERR_CODE_OFST 0 @@ -397,6 +405,7 @@ /* enum: Fatal. */ #define MCDI_EVENT_LEVEL_FATAL 0x3 #define MCDI_EVENT_DATA_OFST 0 +#define MCDI_EVENT_DATA_LEN 4 #define MCDI_EVENT_CMDDONE_SEQ_LBN 0 #define MCDI_EVENT_CMDDONE_SEQ_WIDTH 8 #define MCDI_EVENT_CMDDONE_DATALEN_LBN 8 @@ -415,6 +424,12 @@ #define MCDI_EVENT_LINKCHANGE_SPEED_10G 0x3 /* enum: 40Gbs */ #define MCDI_EVENT_LINKCHANGE_SPEED_40G 0x4 +/* enum: 25Gbs */ +#define MCDI_EVENT_LINKCHANGE_SPEED_25G 0x5 +/* enum: 50Gbs */ +#define MCDI_EVENT_LINKCHANGE_SPEED_50G 0x6 +/* enum: 100Gbs */ +#define MCDI_EVENT_LINKCHANGE_SPEED_100G 0x7 #define MCDI_EVENT_LINKCHANGE_FCNTL_LBN 20 #define MCDI_EVENT_LINKCHANGE_FCNTL_WIDTH 4 #define MCDI_EVENT_LINKCHANGE_LINK_FLAGS_LBN 24 @@ -503,8 +518,23 @@ #define MCDI_EVENT_AOE_INVALID_FPGA_FLASH_TYPE 0xf /* enum: Notify that the attempt to run FPGA Controller firmware timedout */ #define MCDI_EVENT_AOE_FC_RUN_TIMEDOUT 0x10 +/* enum: Failure to probe one or more FPGA boot flash chips */ +#define MCDI_EVENT_AOE_FPGA_BOOT_FLASH_INVALID 0x11 +/* enum: FPGA boot-flash contains an invalid image header */ +#define MCDI_EVENT_AOE_FPGA_BOOT_FLASH_HDR_INVALID 0x12 +/* enum: Failed to program clocks required by the FPGA */ +#define MCDI_EVENT_AOE_FPGA_CLOCKS_PROGRAM_FAILED 0x13 +/* enum: Notify that FPGA Controller is alive to serve MCDI requests */ +#define MCDI_EVENT_AOE_FC_RUNNING 0x14 #define MCDI_EVENT_AOE_ERR_DATA_LBN 8 #define MCDI_EVENT_AOE_ERR_DATA_WIDTH 8 +#define MCDI_EVENT_AOE_ERR_FC_ASSERT_INFO_LBN 8 +#define MCDI_EVENT_AOE_ERR_FC_ASSERT_INFO_WIDTH 8 +/* enum: FC Assert happened, but the register information is not available */ +#define MCDI_EVENT_AOE_ERR_FC_ASSERT_SEEN 0x0 +/* enum: The register information for FC Assert is ready for readinng by driver + */ +#define MCDI_EVENT_AOE_ERR_FC_ASSERT_DATA_READY 0x1 #define MCDI_EVENT_AOE_ERR_CODE_FPGA_HEADER_VERIFY_FAILED_LBN 8 #define MCDI_EVENT_AOE_ERR_CODE_FPGA_HEADER_VERIFY_FAILED_WIDTH 8 /* enum: Reading from NV failed */ @@ -557,6 +587,22 @@ #define MCDI_EVENT_MUM_WATCHDOG 0x3 #define MCDI_EVENT_MUM_ERR_DATA_LBN 8 #define MCDI_EVENT_MUM_ERR_DATA_WIDTH 8 +#define MCDI_EVENT_DBRET_SEQ_LBN 0 +#define MCDI_EVENT_DBRET_SEQ_WIDTH 8 +#define MCDI_EVENT_SUC_ERR_TYPE_LBN 0 +#define MCDI_EVENT_SUC_ERR_TYPE_WIDTH 8 +/* enum: Corrupted or bad SUC application. */ +#define MCDI_EVENT_SUC_BAD_APP 0x1 +/* enum: SUC application reported an assert. */ +#define MCDI_EVENT_SUC_ASSERT 0x2 +/* enum: SUC application reported an exception. */ +#define MCDI_EVENT_SUC_EXCEPTION 0x3 +/* enum: SUC watchdog timer expired. */ +#define MCDI_EVENT_SUC_WATCHDOG 0x4 +#define MCDI_EVENT_SUC_ERR_ADDRESS_LBN 8 +#define MCDI_EVENT_SUC_ERR_ADDRESS_WIDTH 24 +#define MCDI_EVENT_SUC_ERR_DATA_LBN 8 +#define MCDI_EVENT_SUC_ERR_DATA_WIDTH 24 #define MCDI_EVENT_DATA_LBN 0 #define MCDI_EVENT_DATA_WIDTH 32 #define MCDI_EVENT_SRC_LBN 36 @@ -629,73 +675,99 @@ * been processed and it may now resend the command */ #define MCDI_EVENT_CODE_PROXY_RESPONSE 0x1d +/* enum: MCDI command accepted. New commands can be issued but this command is + * not done yet. + */ +#define MCDI_EVENT_CODE_DBRET 0x1e +/* enum: The MC has detected a fault on the SUC */ +#define MCDI_EVENT_CODE_SUC 0x1f /* enum: Artificial event generated by host and posted via MC for test * purposes. */ #define MCDI_EVENT_CODE_TESTGEN 0xfa #define MCDI_EVENT_CMDDONE_DATA_OFST 0 +#define MCDI_EVENT_CMDDONE_DATA_LEN 4 #define MCDI_EVENT_CMDDONE_DATA_LBN 0 #define MCDI_EVENT_CMDDONE_DATA_WIDTH 32 #define MCDI_EVENT_LINKCHANGE_DATA_OFST 0 +#define MCDI_EVENT_LINKCHANGE_DATA_LEN 4 #define MCDI_EVENT_LINKCHANGE_DATA_LBN 0 #define MCDI_EVENT_LINKCHANGE_DATA_WIDTH 32 #define MCDI_EVENT_SENSOREVT_DATA_OFST 0 +#define MCDI_EVENT_SENSOREVT_DATA_LEN 4 #define MCDI_EVENT_SENSOREVT_DATA_LBN 0 #define MCDI_EVENT_SENSOREVT_DATA_WIDTH 32 #define MCDI_EVENT_MAC_STATS_DMA_GENERATION_OFST 0 +#define MCDI_EVENT_MAC_STATS_DMA_GENERATION_LEN 4 #define MCDI_EVENT_MAC_STATS_DMA_GENERATION_LBN 0 #define MCDI_EVENT_MAC_STATS_DMA_GENERATION_WIDTH 32 #define MCDI_EVENT_TX_ERR_DATA_OFST 0 +#define MCDI_EVENT_TX_ERR_DATA_LEN 4 #define MCDI_EVENT_TX_ERR_DATA_LBN 0 #define MCDI_EVENT_TX_ERR_DATA_WIDTH 32 /* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the seconds field of * timestamp */ #define MCDI_EVENT_PTP_SECONDS_OFST 0 +#define MCDI_EVENT_PTP_SECONDS_LEN 4 #define MCDI_EVENT_PTP_SECONDS_LBN 0 #define MCDI_EVENT_PTP_SECONDS_WIDTH 32 /* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the major field of * timestamp */ #define MCDI_EVENT_PTP_MAJOR_OFST 0 +#define MCDI_EVENT_PTP_MAJOR_LEN 4 #define MCDI_EVENT_PTP_MAJOR_LBN 0 #define MCDI_EVENT_PTP_MAJOR_WIDTH 32 /* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the nanoseconds field * of timestamp */ #define MCDI_EVENT_PTP_NANOSECONDS_OFST 0 +#define MCDI_EVENT_PTP_NANOSECONDS_LEN 4 #define MCDI_EVENT_PTP_NANOSECONDS_LBN 0 #define MCDI_EVENT_PTP_NANOSECONDS_WIDTH 32 /* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the minor field of * timestamp */ #define MCDI_EVENT_PTP_MINOR_OFST 0 +#define MCDI_EVENT_PTP_MINOR_LEN 4 #define MCDI_EVENT_PTP_MINOR_LBN 0 #define MCDI_EVENT_PTP_MINOR_WIDTH 32 /* For CODE_PTP_RX events, the lowest four bytes of sourceUUID from PTP packet */ #define MCDI_EVENT_PTP_UUID_OFST 0 +#define MCDI_EVENT_PTP_UUID_LEN 4 #define MCDI_EVENT_PTP_UUID_LBN 0 #define MCDI_EVENT_PTP_UUID_WIDTH 32 #define MCDI_EVENT_RX_ERR_DATA_OFST 0 +#define MCDI_EVENT_RX_ERR_DATA_LEN 4 #define MCDI_EVENT_RX_ERR_DATA_LBN 0 #define MCDI_EVENT_RX_ERR_DATA_WIDTH 32 #define MCDI_EVENT_PAR_ERR_DATA_OFST 0 +#define MCDI_EVENT_PAR_ERR_DATA_LEN 4 #define MCDI_EVENT_PAR_ERR_DATA_LBN 0 #define MCDI_EVENT_PAR_ERR_DATA_WIDTH 32 #define MCDI_EVENT_ECC_CORR_ERR_DATA_OFST 0 +#define MCDI_EVENT_ECC_CORR_ERR_DATA_LEN 4 #define MCDI_EVENT_ECC_CORR_ERR_DATA_LBN 0 #define MCDI_EVENT_ECC_CORR_ERR_DATA_WIDTH 32 #define MCDI_EVENT_ECC_FATAL_ERR_DATA_OFST 0 +#define MCDI_EVENT_ECC_FATAL_ERR_DATA_LEN 4 #define MCDI_EVENT_ECC_FATAL_ERR_DATA_LBN 0 #define MCDI_EVENT_ECC_FATAL_ERR_DATA_WIDTH 32 /* For CODE_PTP_TIME events, the major value of the PTP clock */ #define MCDI_EVENT_PTP_TIME_MAJOR_OFST 0 +#define MCDI_EVENT_PTP_TIME_MAJOR_LEN 4 #define MCDI_EVENT_PTP_TIME_MAJOR_LBN 0 #define MCDI_EVENT_PTP_TIME_MAJOR_WIDTH 32 /* For CODE_PTP_TIME events, bits 19-26 of the minor value of the PTP clock */ #define MCDI_EVENT_PTP_TIME_MINOR_26_19_LBN 36 #define MCDI_EVENT_PTP_TIME_MINOR_26_19_WIDTH 8 +/* For CODE_PTP_TIME events, most significant bits of the minor value of the + * PTP clock. This is a more generic equivalent of PTP_TIME_MINOR_26_19. + */ +#define MCDI_EVENT_PTP_TIME_MINOR_MS_8BITS_LBN 36 +#define MCDI_EVENT_PTP_TIME_MINOR_MS_8BITS_WIDTH 8 /* For CODE_PTP_TIME events where report sync status is enabled, indicates * whether the NIC clock has ever been set */ @@ -711,10 +783,17 @@ */ #define MCDI_EVENT_PTP_TIME_MINOR_26_21_LBN 38 #define MCDI_EVENT_PTP_TIME_MINOR_26_21_WIDTH 6 +/* For CODE_PTP_TIME events, most significant bits of the minor value of the + * PTP clock. This is a more generic equivalent of PTP_TIME_MINOR_26_21. + */ +#define MCDI_EVENT_PTP_TIME_MINOR_MS_6BITS_LBN 38 +#define MCDI_EVENT_PTP_TIME_MINOR_MS_6BITS_WIDTH 6 #define MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_OFST 0 +#define MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_LEN 4 #define MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_LBN 0 #define MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_WIDTH 32 #define MCDI_EVENT_PROXY_RESPONSE_HANDLE_OFST 0 +#define MCDI_EVENT_PROXY_RESPONSE_HANDLE_LEN 4 #define MCDI_EVENT_PROXY_RESPONSE_HANDLE_LBN 0 #define MCDI_EVENT_PROXY_RESPONSE_HANDLE_WIDTH 32 /* Zero means that the request has been completed or authorized, and the driver @@ -723,6 +802,10 @@ */ #define MCDI_EVENT_PROXY_RESPONSE_RC_LBN 36 #define MCDI_EVENT_PROXY_RESPONSE_RC_WIDTH 8 +#define MCDI_EVENT_DBRET_DATA_OFST 0 +#define MCDI_EVENT_DBRET_DATA_LEN 4 +#define MCDI_EVENT_DBRET_DATA_LBN 0 +#define MCDI_EVENT_DBRET_DATA_WIDTH 32 /* FCDI_EVENT structuredef */ #define FCDI_EVENT_LEN 8 @@ -739,6 +822,7 @@ /* enum: Fatal. */ #define FCDI_EVENT_LEVEL_FATAL 0x3 #define FCDI_EVENT_DATA_OFST 0 +#define FCDI_EVENT_DATA_LEN 4 #define FCDI_EVENT_LINK_STATE_STATUS_LBN 0 #define FCDI_EVENT_LINK_STATE_STATUS_WIDTH 1 #define FCDI_EVENT_LINK_DOWN 0x0 /* enum */ @@ -778,6 +862,7 @@ #define FCDI_EVENT_REBOOT_FC_FW 0x0 /* enum */ #define FCDI_EVENT_REBOOT_FC_BOOTLOADER 0x1 /* enum */ #define FCDI_EVENT_ASSERT_INSTR_ADDRESS_OFST 0 +#define FCDI_EVENT_ASSERT_INSTR_ADDRESS_LEN 4 #define FCDI_EVENT_ASSERT_INSTR_ADDRESS_LBN 0 #define FCDI_EVENT_ASSERT_INSTR_ADDRESS_WIDTH 32 #define FCDI_EVENT_ASSERT_TYPE_LBN 36 @@ -785,12 +870,15 @@ #define FCDI_EVENT_DDR_TEST_RESULT_STATUS_CODE_LBN 36 #define FCDI_EVENT_DDR_TEST_RESULT_STATUS_CODE_WIDTH 8 #define FCDI_EVENT_DDR_TEST_RESULT_RESULT_OFST 0 +#define FCDI_EVENT_DDR_TEST_RESULT_RESULT_LEN 4 #define FCDI_EVENT_DDR_TEST_RESULT_RESULT_LBN 0 #define FCDI_EVENT_DDR_TEST_RESULT_RESULT_WIDTH 32 #define FCDI_EVENT_LINK_STATE_DATA_OFST 0 +#define FCDI_EVENT_LINK_STATE_DATA_LEN 4 #define FCDI_EVENT_LINK_STATE_DATA_LBN 0 #define FCDI_EVENT_LINK_STATE_DATA_WIDTH 32 #define FCDI_EVENT_PTP_STATE_OFST 0 +#define FCDI_EVENT_PTP_STATE_LEN 4 #define FCDI_EVENT_PTP_UNDEFINED 0x0 /* enum */ #define FCDI_EVENT_PTP_SETUP_FAILED 0x1 /* enum */ #define FCDI_EVENT_PTP_OPERATIONAL 0x2 /* enum */ @@ -799,6 +887,7 @@ #define FCDI_EVENT_DDR_ECC_STATUS_BANK_ID_LBN 36 #define FCDI_EVENT_DDR_ECC_STATUS_BANK_ID_WIDTH 8 #define FCDI_EVENT_DDR_ECC_STATUS_STATUS_OFST 0 +#define FCDI_EVENT_DDR_ECC_STATUS_STATUS_LEN 4 #define FCDI_EVENT_DDR_ECC_STATUS_STATUS_LBN 0 #define FCDI_EVENT_DDR_ECC_STATUS_STATUS_WIDTH 32 /* Index of MC port being referred to */ @@ -806,9 +895,11 @@ #define FCDI_EVENT_PORT_CONFIG_SRC_WIDTH 8 /* FC Port index that matches the MC port index in SRC */ #define FCDI_EVENT_PORT_CONFIG_DATA_OFST 0 +#define FCDI_EVENT_PORT_CONFIG_DATA_LEN 4 #define FCDI_EVENT_PORT_CONFIG_DATA_LBN 0 #define FCDI_EVENT_PORT_CONFIG_DATA_WIDTH 32 #define FCDI_EVENT_BOOT_RESULT_OFST 0 +#define FCDI_EVENT_BOOT_RESULT_LEN 4 /* Enum values, see field(s): */ /* MC_CMD_AOE/MC_CMD_AOE_OUT_INFO/FC_BOOT_RESULT */ #define FCDI_EVENT_BOOT_RESULT_LBN 0 @@ -825,14 +916,17 @@ #define FCDI_EXTENDED_EVENT_PPS_LEN(num) (8+8*(num)) /* Number of timestamps following */ #define FCDI_EXTENDED_EVENT_PPS_COUNT_OFST 0 +#define FCDI_EXTENDED_EVENT_PPS_COUNT_LEN 4 #define FCDI_EXTENDED_EVENT_PPS_COUNT_LBN 0 #define FCDI_EXTENDED_EVENT_PPS_COUNT_WIDTH 32 /* Seconds field of a timestamp record */ #define FCDI_EXTENDED_EVENT_PPS_SECONDS_OFST 8 +#define FCDI_EXTENDED_EVENT_PPS_SECONDS_LEN 4 #define FCDI_EXTENDED_EVENT_PPS_SECONDS_LBN 64 #define FCDI_EXTENDED_EVENT_PPS_SECONDS_WIDTH 32 /* Nanoseconds field of a timestamp record */ #define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_OFST 12 +#define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_LEN 4 #define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_LBN 96 #define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_WIDTH 32 /* Timestamp records comprising the event */ @@ -860,6 +954,7 @@ /* enum: Fatal. */ #define MUM_EVENT_LEVEL_FATAL 0x3 #define MUM_EVENT_DATA_OFST 0 +#define MUM_EVENT_DATA_LEN 4 #define MUM_EVENT_SENSOR_ID_LBN 0 #define MUM_EVENT_SENSOR_ID_WIDTH 8 /* Enum values, see field(s): */ @@ -897,18 +992,23 @@ /* enum: Link fault has been asserted, or has cleared. */ #define MUM_EVENT_CODE_QSFP_LASI_INTERRUPT 0x4 #define MUM_EVENT_SENSOR_DATA_OFST 0 +#define MUM_EVENT_SENSOR_DATA_LEN 4 #define MUM_EVENT_SENSOR_DATA_LBN 0 #define MUM_EVENT_SENSOR_DATA_WIDTH 32 #define MUM_EVENT_PORT_PHY_FLAGS_OFST 0 +#define MUM_EVENT_PORT_PHY_FLAGS_LEN 4 #define MUM_EVENT_PORT_PHY_FLAGS_LBN 0 #define MUM_EVENT_PORT_PHY_FLAGS_WIDTH 32 #define MUM_EVENT_PORT_PHY_COPPER_LEN_OFST 0 +#define MUM_EVENT_PORT_PHY_COPPER_LEN_LEN 4 #define MUM_EVENT_PORT_PHY_COPPER_LEN_LBN 0 #define MUM_EVENT_PORT_PHY_COPPER_LEN_WIDTH 32 #define MUM_EVENT_PORT_PHY_CAPS_OFST 0 +#define MUM_EVENT_PORT_PHY_CAPS_LEN 4 #define MUM_EVENT_PORT_PHY_CAPS_LBN 0 #define MUM_EVENT_PORT_PHY_CAPS_WIDTH 32 #define MUM_EVENT_PORT_PHY_TECH_OFST 0 +#define MUM_EVENT_PORT_PHY_TECH_LEN 4 #define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_UNKNOWN 0x0 /* enum */ #define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_OPTICAL 0x1 /* enum */ #define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_COPPER_PASSIVE 0x2 /* enum */ @@ -932,7 +1032,9 @@ /***********************************/ /* MC_CMD_READ32 - * Read multiple 32byte words from MC memory. + * Read multiple 32byte words from MC memory. Note - this command really + * belongs to INSECURE category but is required by shmboot. The command handler + * has additional checks to reject insecure calls. */ #define MC_CMD_READ32 0x1 #undef MC_CMD_0x1_PRIVILEGE_CTG @@ -942,7 +1044,9 @@ /* MC_CMD_READ32_IN msgrequest */ #define MC_CMD_READ32_IN_LEN 8 #define MC_CMD_READ32_IN_ADDR_OFST 0 +#define MC_CMD_READ32_IN_ADDR_LEN 4 #define MC_CMD_READ32_IN_NUMWORDS_OFST 4 +#define MC_CMD_READ32_IN_NUMWORDS_LEN 4 /* MC_CMD_READ32_OUT msgresponse */ #define MC_CMD_READ32_OUT_LENMIN 4 @@ -961,13 +1065,14 @@ #define MC_CMD_WRITE32 0x2 #undef MC_CMD_0x2_PRIVILEGE_CTG -#define MC_CMD_0x2_PRIVILEGE_CTG SRIOV_CTG_ADMIN +#define MC_CMD_0x2_PRIVILEGE_CTG SRIOV_CTG_INSECURE /* MC_CMD_WRITE32_IN msgrequest */ #define MC_CMD_WRITE32_IN_LENMIN 8 #define MC_CMD_WRITE32_IN_LENMAX 252 #define MC_CMD_WRITE32_IN_LEN(num) (4+4*(num)) #define MC_CMD_WRITE32_IN_ADDR_OFST 0 +#define MC_CMD_WRITE32_IN_ADDR_LEN 4 #define MC_CMD_WRITE32_IN_BUFFER_OFST 4 #define MC_CMD_WRITE32_IN_BUFFER_LEN 4 #define MC_CMD_WRITE32_IN_BUFFER_MINNUM 1 @@ -979,7 +1084,9 @@ /***********************************/ /* MC_CMD_COPYCODE - * Copy MC code between two locations and jump. + * Copy MC code between two locations and jump. Note - this command really + * belongs to INSECURE category but is required by shmboot. The command handler + * has additional checks to reject insecure calls. */ #define MC_CMD_COPYCODE 0x3 #undef MC_CMD_0x3_PRIVILEGE_CTG @@ -995,6 +1102,7 @@ * is a bitfield, with each bit as documented below. */ #define MC_CMD_COPYCODE_IN_SRC_ADDR_OFST 0 +#define MC_CMD_COPYCODE_IN_SRC_ADDR_LEN 4 /* enum: Deprecated; equivalent to setting BOOT_MAGIC_PRESENT (see below) */ #define MC_CMD_COPYCODE_HUNT_NO_MAGIC_ADDR 0x10000 /* enum: Deprecated; equivalent to setting BOOT_MAGIC_PRESENT and @@ -1020,9 +1128,12 @@ #define MC_CMD_COPYCODE_IN_BOOT_MAGIC_DISABLE_XIP_WIDTH 1 /* Destination address */ #define MC_CMD_COPYCODE_IN_DEST_ADDR_OFST 4 +#define MC_CMD_COPYCODE_IN_DEST_ADDR_LEN 4 #define MC_CMD_COPYCODE_IN_NUMWORDS_OFST 8 +#define MC_CMD_COPYCODE_IN_NUMWORDS_LEN 4 /* Address of where to jump after copy. */ #define MC_CMD_COPYCODE_IN_JUMP_OFST 12 +#define MC_CMD_COPYCODE_IN_JUMP_LEN 4 /* enum: Control should return to the caller rather than jumping */ #define MC_CMD_COPYCODE_JUMP_NONE 0x1 @@ -1037,12 +1148,13 @@ #define MC_CMD_SET_FUNC 0x4 #undef MC_CMD_0x4_PRIVILEGE_CTG -#define MC_CMD_0x4_PRIVILEGE_CTG SRIOV_CTG_ADMIN +#define MC_CMD_0x4_PRIVILEGE_CTG SRIOV_CTG_INSECURE /* MC_CMD_SET_FUNC_IN msgrequest */ #define MC_CMD_SET_FUNC_IN_LEN 4 /* Set function */ #define MC_CMD_SET_FUNC_IN_FUNC_OFST 0 +#define MC_CMD_SET_FUNC_IN_FUNC_LEN 4 /* MC_CMD_SET_FUNC_OUT msgresponse */ #define MC_CMD_SET_FUNC_OUT_LEN 0 @@ -1055,7 +1167,7 @@ #define MC_CMD_GET_BOOT_STATUS 0x5 #undef MC_CMD_0x5_PRIVILEGE_CTG -#define MC_CMD_0x5_PRIVILEGE_CTG SRIOV_CTG_ADMIN +#define MC_CMD_0x5_PRIVILEGE_CTG SRIOV_CTG_GENERAL /* MC_CMD_GET_BOOT_STATUS_IN msgrequest */ #define MC_CMD_GET_BOOT_STATUS_IN_LEN 0 @@ -1064,9 +1176,11 @@ #define MC_CMD_GET_BOOT_STATUS_OUT_LEN 8 /* ?? */ #define MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_OFST 0 +#define MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_LEN 4 /* enum: indicates that the MC wasn't flash booted */ #define MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_NULL 0xdeadbeef #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_OFST 4 +#define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_LEN 4 #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_WATCHDOG_LBN 0 #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_WATCHDOG_WIDTH 1 #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_PRIMARY_LBN 1 @@ -1090,11 +1204,13 @@ #define MC_CMD_GET_ASSERTS_IN_LEN 4 /* Set to clear assertion */ #define MC_CMD_GET_ASSERTS_IN_CLEAR_OFST 0 +#define MC_CMD_GET_ASSERTS_IN_CLEAR_LEN 4 /* MC_CMD_GET_ASSERTS_OUT msgresponse */ #define MC_CMD_GET_ASSERTS_OUT_LEN 140 /* Assertion status flag. */ #define MC_CMD_GET_ASSERTS_OUT_GLOBAL_FLAGS_OFST 0 +#define MC_CMD_GET_ASSERTS_OUT_GLOBAL_FLAGS_LEN 4 /* enum: No assertions have failed. */ #define MC_CMD_GET_ASSERTS_FLAGS_NO_FAILS 0x1 /* enum: A system-level assertion has failed. */ @@ -1107,6 +1223,7 @@ #define MC_CMD_GET_ASSERTS_FLAGS_ADDR_TRAP 0x5 /* Failing PC value */ #define MC_CMD_GET_ASSERTS_OUT_SAVED_PC_OFFS_OFST 4 +#define MC_CMD_GET_ASSERTS_OUT_SAVED_PC_OFFS_LEN 4 /* Saved GP regs */ #define MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_OFST 8 #define MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_LEN 4 @@ -1117,7 +1234,9 @@ #define MC_CMD_GET_ASSERTS_REG_NO_DATA 0xda7a1057 /* Failing thread address */ #define MC_CMD_GET_ASSERTS_OUT_THREAD_OFFS_OFST 132 +#define MC_CMD_GET_ASSERTS_OUT_THREAD_OFFS_LEN 4 #define MC_CMD_GET_ASSERTS_OUT_RESERVED_OFST 136 +#define MC_CMD_GET_ASSERTS_OUT_RESERVED_LEN 4 /***********************************/ @@ -1134,12 +1253,14 @@ #define MC_CMD_LOG_CTRL_IN_LEN 8 /* Log destination */ #define MC_CMD_LOG_CTRL_IN_LOG_DEST_OFST 0 +#define MC_CMD_LOG_CTRL_IN_LOG_DEST_LEN 4 /* enum: UART. */ #define MC_CMD_LOG_CTRL_IN_LOG_DEST_UART 0x1 /* enum: Event queue. */ #define MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ 0x2 /* Legacy argument. Must be zero. */ #define MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ_OFST 4 +#define MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ_LEN 4 /* MC_CMD_LOG_CTRL_OUT msgresponse */ #define MC_CMD_LOG_CTRL_OUT_LEN 0 @@ -1161,23 +1282,29 @@ #define MC_CMD_GET_VERSION_EXT_IN_LEN 4 /* placeholder, set to 0 */ #define MC_CMD_GET_VERSION_EXT_IN_EXT_FLAGS_OFST 0 +#define MC_CMD_GET_VERSION_EXT_IN_EXT_FLAGS_LEN 4 /* MC_CMD_GET_VERSION_V0_OUT msgresponse: deprecated version format */ #define MC_CMD_GET_VERSION_V0_OUT_LEN 4 #define MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 +#define MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4 /* enum: Reserved version number to indicate "any" version. */ #define MC_CMD_GET_VERSION_OUT_FIRMWARE_ANY 0xffffffff /* enum: Bootrom version value for Siena. */ #define MC_CMD_GET_VERSION_OUT_FIRMWARE_SIENA_BOOTROM 0xb0070000 /* enum: Bootrom version value for Huntington. */ #define MC_CMD_GET_VERSION_OUT_FIRMWARE_HUNT_BOOTROM 0xb0070001 +/* enum: Bootrom version value for Medford2. */ +#define MC_CMD_GET_VERSION_OUT_FIRMWARE_MEDFORD2_BOOTROM 0xb0070002 /* MC_CMD_GET_VERSION_OUT msgresponse */ #define MC_CMD_GET_VERSION_OUT_LEN 32 /* MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 */ +/* MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4 */ /* Enum values, see field(s): */ /* MC_CMD_GET_VERSION_V0_OUT/MC_CMD_GET_VERSION_OUT_FIRMWARE */ #define MC_CMD_GET_VERSION_OUT_PCOL_OFST 4 +#define MC_CMD_GET_VERSION_OUT_PCOL_LEN 4 /* 128bit mask of functions supported by the current firmware */ #define MC_CMD_GET_VERSION_OUT_SUPPORTED_FUNCS_OFST 8 #define MC_CMD_GET_VERSION_OUT_SUPPORTED_FUNCS_LEN 16 @@ -1189,9 +1316,11 @@ /* MC_CMD_GET_VERSION_EXT_OUT msgresponse */ #define MC_CMD_GET_VERSION_EXT_OUT_LEN 48 /* MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 */ +/* MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4 */ /* Enum values, see field(s): */ /* MC_CMD_GET_VERSION_V0_OUT/MC_CMD_GET_VERSION_OUT_FIRMWARE */ #define MC_CMD_GET_VERSION_EXT_OUT_PCOL_OFST 4 +#define MC_CMD_GET_VERSION_EXT_OUT_PCOL_LEN 4 /* 128bit mask of functions supported by the current firmware */ #define MC_CMD_GET_VERSION_EXT_OUT_SUPPORTED_FUNCS_OFST 8 #define MC_CMD_GET_VERSION_EXT_OUT_SUPPORTED_FUNCS_LEN 16 @@ -1205,2421 +1334,6 @@ /***********************************/ -/* MC_CMD_FC - * Perform an FC operation - */ -#define MC_CMD_FC 0x9 - -/* MC_CMD_FC_IN msgrequest */ -#define MC_CMD_FC_IN_LEN 4 -#define MC_CMD_FC_IN_OP_HDR_OFST 0 -#define MC_CMD_FC_IN_OP_LBN 0 -#define MC_CMD_FC_IN_OP_WIDTH 8 -/* enum: NULL MCDI command to FC. */ -#define MC_CMD_FC_OP_NULL 0x1 -/* enum: Unused opcode */ -#define MC_CMD_FC_OP_UNUSED 0x2 -/* enum: MAC driver commands */ -#define MC_CMD_FC_OP_MAC 0x3 -/* enum: Read FC memory */ -#define MC_CMD_FC_OP_READ32 0x4 -/* enum: Write to FC memory */ -#define MC_CMD_FC_OP_WRITE32 0x5 -/* enum: Read FC memory */ -#define MC_CMD_FC_OP_TRC_READ 0x6 -/* enum: Write to FC memory */ -#define MC_CMD_FC_OP_TRC_WRITE 0x7 -/* enum: FC firmware Version */ -#define MC_CMD_FC_OP_GET_VERSION 0x8 -/* enum: Read FC memory */ -#define MC_CMD_FC_OP_TRC_RX_READ 0x9 -/* enum: Write to FC memory */ -#define MC_CMD_FC_OP_TRC_RX_WRITE 0xa -/* enum: SFP parameters */ -#define MC_CMD_FC_OP_SFP 0xb -/* enum: DDR3 test */ -#define MC_CMD_FC_OP_DDR_TEST 0xc -/* enum: Get Crash context from FC */ -#define MC_CMD_FC_OP_GET_ASSERT 0xd -/* enum: Get FPGA Build registers */ -#define MC_CMD_FC_OP_FPGA_BUILD 0xe -/* enum: Read map support commands */ -#define MC_CMD_FC_OP_READ_MAP 0xf -/* enum: FC Capabilities */ -#define MC_CMD_FC_OP_CAPABILITIES 0x10 -/* enum: FC Global flags */ -#define MC_CMD_FC_OP_GLOBAL_FLAGS 0x11 -/* enum: FC IO using relative addressing modes */ -#define MC_CMD_FC_OP_IO_REL 0x12 -/* enum: FPGA link information */ -#define MC_CMD_FC_OP_UHLINK 0x13 -/* enum: Configure loopbacks and link on FPGA ports */ -#define MC_CMD_FC_OP_SET_LINK 0x14 -/* enum: Licensing operations relating to AOE */ -#define MC_CMD_FC_OP_LICENSE 0x15 -/* enum: Startup information to the FC */ -#define MC_CMD_FC_OP_STARTUP 0x16 -/* enum: Configure a DMA read */ -#define MC_CMD_FC_OP_DMA 0x17 -/* enum: Configure a timed read */ -#define MC_CMD_FC_OP_TIMED_READ 0x18 -/* enum: Control UART logging */ -#define MC_CMD_FC_OP_LOG 0x19 -/* enum: Get the value of a given clock_id */ -#define MC_CMD_FC_OP_CLOCK 0x1a -/* enum: DDR3/QDR3 parameters */ -#define MC_CMD_FC_OP_DDR 0x1b -/* enum: PTP and timestamp control */ -#define MC_CMD_FC_OP_TIMESTAMP 0x1c -/* enum: Commands for SPI Flash interface */ -#define MC_CMD_FC_OP_SPI 0x1d -/* enum: Commands for diagnostic components */ -#define MC_CMD_FC_OP_DIAG 0x1e -/* enum: External AOE port. */ -#define MC_CMD_FC_IN_PORT_EXT_OFST 0x0 -/* enum: Internal AOE port. */ -#define MC_CMD_FC_IN_PORT_INT_OFST 0x40 - -/* MC_CMD_FC_IN_NULL msgrequest */ -#define MC_CMD_FC_IN_NULL_LEN 4 -#define MC_CMD_FC_IN_CMD_OFST 0 - -/* MC_CMD_FC_IN_PHY msgrequest */ -#define MC_CMD_FC_IN_PHY_LEN 5 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -/* FC PHY driver operation code */ -#define MC_CMD_FC_IN_PHY_OP_OFST 4 -#define MC_CMD_FC_IN_PHY_OP_LEN 1 -/* enum: PHY init handler */ -#define MC_CMD_FC_OP_PHY_OP_INIT 0x1 -/* enum: PHY reconfigure handler */ -#define MC_CMD_FC_OP_PHY_OP_RECONFIGURE 0x2 -/* enum: PHY reboot handler */ -#define MC_CMD_FC_OP_PHY_OP_REBOOT 0x3 -/* enum: PHY get_supported_cap handler */ -#define MC_CMD_FC_OP_PHY_OP_GET_SUPPORTED_CAP 0x4 -/* enum: PHY get_config handler */ -#define MC_CMD_FC_OP_PHY_OP_GET_CONFIG 0x5 -/* enum: PHY get_media_info handler */ -#define MC_CMD_FC_OP_PHY_OP_GET_MEDIA_INFO 0x6 -/* enum: PHY set_led handler */ -#define MC_CMD_FC_OP_PHY_OP_SET_LED 0x7 -/* enum: PHY lasi_interrupt handler */ -#define MC_CMD_FC_OP_PHY_OP_LASI_INTERRUPT 0x8 -/* enum: PHY check_link handler */ -#define MC_CMD_FC_OP_PHY_OP_CHECK_LINK 0x9 -/* enum: PHY fill_stats handler */ -#define MC_CMD_FC_OP_PHY_OP_FILL_STATS 0xa -/* enum: PHY bpx_link_state_changed handler */ -#define MC_CMD_FC_OP_PHY_OP_BPX_LINK_STATE_CHANGED 0xb -/* enum: PHY get_state handler */ -#define MC_CMD_FC_OP_PHY_OP_GET_STATE 0xc -/* enum: PHY start_bist handler */ -#define MC_CMD_FC_OP_PHY_OP_START_BIST 0xd -/* enum: PHY poll_bist handler */ -#define MC_CMD_FC_OP_PHY_OP_POLL_BIST 0xe -/* enum: PHY nvram_test handler */ -#define MC_CMD_FC_OP_PHY_OP_NVRAM_TEST 0xf -/* enum: PHY relinquish handler */ -#define MC_CMD_FC_OP_PHY_OP_RELINQUISH_SPI 0x10 -/* enum: PHY read connection from FC - may be not required */ -#define MC_CMD_FC_OP_PHY_OP_GET_CONNECTION 0x11 -/* enum: PHY read flags from FC - may be not required */ -#define MC_CMD_FC_OP_PHY_OP_GET_FLAGS 0x12 - -/* MC_CMD_FC_IN_PHY_INIT msgrequest */ -#define MC_CMD_FC_IN_PHY_INIT_LEN 4 -#define MC_CMD_FC_IN_PHY_CMD_OFST 0 - -/* MC_CMD_FC_IN_MAC msgrequest */ -#define MC_CMD_FC_IN_MAC_LEN 8 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -#define MC_CMD_FC_IN_MAC_HEADER_OFST 4 -#define MC_CMD_FC_IN_MAC_OP_LBN 0 -#define MC_CMD_FC_IN_MAC_OP_WIDTH 8 -/* enum: MAC reconfigure handler */ -#define MC_CMD_FC_OP_MAC_OP_RECONFIGURE 0x1 -/* enum: MAC Set command - same as MC_CMD_SET_MAC */ -#define MC_CMD_FC_OP_MAC_OP_SET_LINK 0x2 -/* enum: MAC statistics */ -#define MC_CMD_FC_OP_MAC_OP_GET_STATS 0x3 -/* enum: MAC RX statistics */ -#define MC_CMD_FC_OP_MAC_OP_GET_RX_STATS 0x6 -/* enum: MAC TX statistics */ -#define MC_CMD_FC_OP_MAC_OP_GET_TX_STATS 0x7 -/* enum: MAC Read status */ -#define MC_CMD_FC_OP_MAC_OP_READ_STATUS 0x8 -#define MC_CMD_FC_IN_MAC_PORT_TYPE_LBN 8 -#define MC_CMD_FC_IN_MAC_PORT_TYPE_WIDTH 8 -/* enum: External FPGA port. */ -#define MC_CMD_FC_PORT_EXT 0x0 -/* enum: Internal Siena-facing FPGA ports. */ -#define MC_CMD_FC_PORT_INT 0x1 -#define MC_CMD_FC_IN_MAC_PORT_IDX_LBN 16 -#define MC_CMD_FC_IN_MAC_PORT_IDX_WIDTH 8 -#define MC_CMD_FC_IN_MAC_CMD_FORMAT_LBN 24 -#define MC_CMD_FC_IN_MAC_CMD_FORMAT_WIDTH 8 -/* enum: Default FC command format; the fields PORT_TYPE and PORT_IDX are - * irrelevant. Port number is derived from pci_fn; passed in FC header. - */ -#define MC_CMD_FC_OP_MAC_CMD_FORMAT_DEFAULT 0x0 -/* enum: Override default port number. Port number determined by fields - * PORT_TYPE and PORT_IDX. - */ -#define MC_CMD_FC_OP_MAC_CMD_FORMAT_PORT_OVERRIDE 0x1 - -/* MC_CMD_FC_IN_MAC_RECONFIGURE msgrequest */ -#define MC_CMD_FC_IN_MAC_RECONFIGURE_LEN 8 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -/* MC_CMD_FC_IN_MAC_HEADER_OFST 4 */ - -/* MC_CMD_FC_IN_MAC_SET_LINK msgrequest */ -#define MC_CMD_FC_IN_MAC_SET_LINK_LEN 32 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -/* MC_CMD_FC_IN_MAC_HEADER_OFST 4 */ -/* MTU size */ -#define MC_CMD_FC_IN_MAC_SET_LINK_MTU_OFST 8 -/* Drain Tx FIFO */ -#define MC_CMD_FC_IN_MAC_SET_LINK_DRAIN_OFST 12 -#define MC_CMD_FC_IN_MAC_SET_LINK_ADDR_OFST 16 -#define MC_CMD_FC_IN_MAC_SET_LINK_ADDR_LEN 8 -#define MC_CMD_FC_IN_MAC_SET_LINK_ADDR_LO_OFST 16 -#define MC_CMD_FC_IN_MAC_SET_LINK_ADDR_HI_OFST 20 -#define MC_CMD_FC_IN_MAC_SET_LINK_REJECT_OFST 24 -#define MC_CMD_FC_IN_MAC_SET_LINK_REJECT_UNICAST_LBN 0 -#define MC_CMD_FC_IN_MAC_SET_LINK_REJECT_UNICAST_WIDTH 1 -#define MC_CMD_FC_IN_MAC_SET_LINK_REJECT_BRDCAST_LBN 1 -#define MC_CMD_FC_IN_MAC_SET_LINK_REJECT_BRDCAST_WIDTH 1 -#define MC_CMD_FC_IN_MAC_SET_LINK_FCNTL_OFST 28 - -/* MC_CMD_FC_IN_MAC_READ_STATUS msgrequest */ -#define MC_CMD_FC_IN_MAC_READ_STATUS_LEN 8 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -/* MC_CMD_FC_IN_MAC_HEADER_OFST 4 */ - -/* MC_CMD_FC_IN_MAC_GET_RX_STATS msgrequest */ -#define MC_CMD_FC_IN_MAC_GET_RX_STATS_LEN 8 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -/* MC_CMD_FC_IN_MAC_HEADER_OFST 4 */ - -/* MC_CMD_FC_IN_MAC_GET_TX_STATS msgrequest */ -#define MC_CMD_FC_IN_MAC_GET_TX_STATS_LEN 8 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -/* MC_CMD_FC_IN_MAC_HEADER_OFST 4 */ - -/* MC_CMD_FC_IN_MAC_GET_STATS msgrequest */ -#define MC_CMD_FC_IN_MAC_GET_STATS_LEN 20 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -/* MC_CMD_FC_IN_MAC_HEADER_OFST 4 */ -/* MC Statistics index */ -#define MC_CMD_FC_IN_MAC_GET_STATS_STATS_INDEX_OFST 8 -#define MC_CMD_FC_IN_MAC_GET_STATS_FLAGS_OFST 12 -#define MC_CMD_FC_IN_MAC_GET_STATS_CLEAR_ALL_LBN 0 -#define MC_CMD_FC_IN_MAC_GET_STATS_CLEAR_ALL_WIDTH 1 -#define MC_CMD_FC_IN_MAC_GET_STATS_CLEAR_LBN 1 -#define MC_CMD_FC_IN_MAC_GET_STATS_CLEAR_WIDTH 1 -#define MC_CMD_FC_IN_MAC_GET_STATS_UPDATE_LBN 2 -#define MC_CMD_FC_IN_MAC_GET_STATS_UPDATE_WIDTH 1 -/* Number of statistics to read */ -#define MC_CMD_FC_IN_MAC_GET_STATS_NUM_OFST 16 -#define MC_CMD_FC_MAC_NSTATS_PER_BLOCK 0x1e /* enum */ -#define MC_CMD_FC_MAC_NBYTES_PER_STAT 0x8 /* enum */ - -/* MC_CMD_FC_IN_READ32 msgrequest */ -#define MC_CMD_FC_IN_READ32_LEN 16 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -#define MC_CMD_FC_IN_READ32_ADDR_HI_OFST 4 -#define MC_CMD_FC_IN_READ32_ADDR_LO_OFST 8 -#define MC_CMD_FC_IN_READ32_NUMWORDS_OFST 12 - -/* MC_CMD_FC_IN_WRITE32 msgrequest */ -#define MC_CMD_FC_IN_WRITE32_LENMIN 16 -#define MC_CMD_FC_IN_WRITE32_LENMAX 252 -#define MC_CMD_FC_IN_WRITE32_LEN(num) (12+4*(num)) -/* MC_CMD_FC_IN_CMD_OFST 0 */ -#define MC_CMD_FC_IN_WRITE32_ADDR_HI_OFST 4 -#define MC_CMD_FC_IN_WRITE32_ADDR_LO_OFST 8 -#define MC_CMD_FC_IN_WRITE32_BUFFER_OFST 12 -#define MC_CMD_FC_IN_WRITE32_BUFFER_LEN 4 -#define MC_CMD_FC_IN_WRITE32_BUFFER_MINNUM 1 -#define MC_CMD_FC_IN_WRITE32_BUFFER_MAXNUM 60 - -/* MC_CMD_FC_IN_TRC_READ msgrequest */ -#define MC_CMD_FC_IN_TRC_READ_LEN 12 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -#define MC_CMD_FC_IN_TRC_READ_TRC_OFST 4 -#define MC_CMD_FC_IN_TRC_READ_CHANNEL_OFST 8 - -/* MC_CMD_FC_IN_TRC_WRITE msgrequest */ -#define MC_CMD_FC_IN_TRC_WRITE_LEN 28 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -#define MC_CMD_FC_IN_TRC_WRITE_TRC_OFST 4 -#define MC_CMD_FC_IN_TRC_WRITE_CHANNEL_OFST 8 -#define MC_CMD_FC_IN_TRC_WRITE_DATA_OFST 12 -#define MC_CMD_FC_IN_TRC_WRITE_DATA_LEN 4 -#define MC_CMD_FC_IN_TRC_WRITE_DATA_NUM 4 - -/* MC_CMD_FC_IN_GET_VERSION msgrequest */ -#define MC_CMD_FC_IN_GET_VERSION_LEN 4 -/* MC_CMD_FC_IN_CMD_OFST 0 */ - -/* MC_CMD_FC_IN_TRC_RX_READ msgrequest */ -#define MC_CMD_FC_IN_TRC_RX_READ_LEN 12 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -#define MC_CMD_FC_IN_TRC_RX_READ_TRC_OFST 4 -#define MC_CMD_FC_IN_TRC_RX_READ_CHANNEL_OFST 8 - -/* MC_CMD_FC_IN_TRC_RX_WRITE msgrequest */ -#define MC_CMD_FC_IN_TRC_RX_WRITE_LEN 20 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -#define MC_CMD_FC_IN_TRC_RX_WRITE_TRC_OFST 4 -#define MC_CMD_FC_IN_TRC_RX_WRITE_CHANNEL_OFST 8 -#define MC_CMD_FC_IN_TRC_RX_WRITE_DATA_OFST 12 -#define MC_CMD_FC_IN_TRC_RX_WRITE_DATA_LEN 4 -#define MC_CMD_FC_IN_TRC_RX_WRITE_DATA_NUM 2 - -/* MC_CMD_FC_IN_SFP msgrequest */ -#define MC_CMD_FC_IN_SFP_LEN 28 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -/* Link speed is 100, 1000, 10000, 40000 */ -#define MC_CMD_FC_IN_SFP_SPEED_OFST 4 -/* Length of copper cable - zero when not relevant (e.g. if cable is fibre) */ -#define MC_CMD_FC_IN_SFP_COPPER_LEN_OFST 8 -/* Not relevant for cards with QSFP modules. For older cards, true if module is - * a dual speed SFP+ module. - */ -#define MC_CMD_FC_IN_SFP_DUAL_SPEED_OFST 12 -/* True if an SFP Module is present (other fields valid when true) */ -#define MC_CMD_FC_IN_SFP_PRESENT_OFST 16 -/* The type of the SFP+ Module. For later cards with QSFP modules, this field - * is unused and the type is communicated by other means. - */ -#define MC_CMD_FC_IN_SFP_TYPE_OFST 20 -/* Capabilities corresponding to 1 bits. */ -#define MC_CMD_FC_IN_SFP_CAPS_OFST 24 - -/* MC_CMD_FC_IN_DDR_TEST msgrequest */ -#define MC_CMD_FC_IN_DDR_TEST_LEN 8 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -#define MC_CMD_FC_IN_DDR_TEST_HEADER_OFST 4 -#define MC_CMD_FC_IN_DDR_TEST_OP_LBN 0 -#define MC_CMD_FC_IN_DDR_TEST_OP_WIDTH 8 -/* enum: DRAM Test Start */ -#define MC_CMD_FC_OP_DDR_TEST_START 0x1 -/* enum: DRAM Test Poll */ -#define MC_CMD_FC_OP_DDR_TEST_POLL 0x2 - -/* MC_CMD_FC_IN_DDR_TEST_START msgrequest */ -#define MC_CMD_FC_IN_DDR_TEST_START_LEN 12 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -/* MC_CMD_FC_IN_DDR_TEST_HEADER_OFST 4 */ -#define MC_CMD_FC_IN_DDR_TEST_START_MASK_OFST 8 -#define MC_CMD_FC_IN_DDR_TEST_START_T0_LBN 0 -#define MC_CMD_FC_IN_DDR_TEST_START_T0_WIDTH 1 -#define MC_CMD_FC_IN_DDR_TEST_START_T1_LBN 1 -#define MC_CMD_FC_IN_DDR_TEST_START_T1_WIDTH 1 -#define MC_CMD_FC_IN_DDR_TEST_START_B0_LBN 2 -#define MC_CMD_FC_IN_DDR_TEST_START_B0_WIDTH 1 -#define MC_CMD_FC_IN_DDR_TEST_START_B1_LBN 3 -#define MC_CMD_FC_IN_DDR_TEST_START_B1_WIDTH 1 - -/* MC_CMD_FC_IN_DDR_TEST_POLL msgrequest */ -#define MC_CMD_FC_IN_DDR_TEST_POLL_LEN 12 -#define MC_CMD_FC_IN_DDR_TEST_CMD_OFST 0 -/* MC_CMD_FC_IN_DDR_TEST_HEADER_OFST 4 */ -/* Clear previous test result and prepare for restarting DDR test */ -#define MC_CMD_FC_IN_DDR_TEST_POLL_CLEAR_RESULT_FOR_DDR_TEST_OFST 8 - -/* MC_CMD_FC_IN_GET_ASSERT msgrequest */ -#define MC_CMD_FC_IN_GET_ASSERT_LEN 4 -/* MC_CMD_FC_IN_CMD_OFST 0 */ - -/* MC_CMD_FC_IN_FPGA_BUILD msgrequest */ -#define MC_CMD_FC_IN_FPGA_BUILD_LEN 8 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -/* FPGA build info operation code */ -#define MC_CMD_FC_IN_FPGA_BUILD_OP_OFST 4 -/* enum: Get the build registers */ -#define MC_CMD_FC_IN_FPGA_BUILD_BUILD 0x1 -/* enum: Get the services registers */ -#define MC_CMD_FC_IN_FPGA_BUILD_SERVICES 0x2 -/* enum: Get the BSP version */ -#define MC_CMD_FC_IN_FPGA_BUILD_BSP_VERSION 0x3 -/* enum: Get build register for V2 (SFA974X) */ -#define MC_CMD_FC_IN_FPGA_BUILD_BUILD_V2 0x4 -/* enum: GEt the services register for V2 (SFA974X) */ -#define MC_CMD_FC_IN_FPGA_BUILD_SERVICES_V2 0x5 - -/* MC_CMD_FC_IN_READ_MAP msgrequest */ -#define MC_CMD_FC_IN_READ_MAP_LEN 8 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -#define MC_CMD_FC_IN_READ_MAP_HEADER_OFST 4 -#define MC_CMD_FC_IN_READ_MAP_OP_LBN 0 -#define MC_CMD_FC_IN_READ_MAP_OP_WIDTH 8 -/* enum: Get the number of map regions */ -#define MC_CMD_FC_OP_READ_MAP_COUNT 0x1 -/* enum: Get the specified map */ -#define MC_CMD_FC_OP_READ_MAP_INDEX 0x2 - -/* MC_CMD_FC_IN_READ_MAP_COUNT msgrequest */ -#define MC_CMD_FC_IN_READ_MAP_COUNT_LEN 8 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -/* MC_CMD_FC_IN_READ_MAP_HEADER_OFST 4 */ - -/* MC_CMD_FC_IN_READ_MAP_INDEX msgrequest */ -#define MC_CMD_FC_IN_READ_MAP_INDEX_LEN 12 -/* MC_CMD_FC_IN_CMD_OFST 0 */ -/* MC_CMD_FC_IN_READ_MAP_HEADER_OFST 4 */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Nov 26 07:30:48 2018 Return-Path: Delivered-To: svn-src-all@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 6736A115036B; Mon, 26 Nov 2018 07:30:48 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B9408B264; Mon, 26 Nov 2018 07:30:48 +0000 (UTC) (envelope-from arybchik@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 E0DE99B2; Mon, 26 Nov 2018 07:30:47 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQ7Ul9A001562; Mon, 26 Nov 2018 07:30:47 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQ7UlXV001561; Mon, 26 Nov 2018 07:30:47 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201811260730.wAQ7UlXV001561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 26 Nov 2018 07:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340931 - in head: . sys/dev/sfxge/common X-SVN-Group: head X-SVN-Commit-Author: arybchik X-SVN-Commit-Paths: in head: . sys/dev/sfxge/common X-SVN-Commit-Revision: 340931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0B9408B264 X-Spamd-Result: default: False [1.74 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.64)[0.643,0]; NEURAL_SPAM_MEDIUM(0.64)[0.638,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.46)[0.461,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 07:30:48 -0000 Author: arybchik Date: Mon Nov 26 07:30:47 2018 New Revision: 340931 URL: https://svnweb.freebsd.org/changeset/base/340931 Log: sfxge(4): fix incorrectly set svn properties File name was used by the svn property value since real value was lost in the command. Modified: head/.gitattributes Directory Properties: head/sys/dev/sfxge/common/efx_regs_mcdi_aoe.h (props changed) Modified: head/.gitattributes ============================================================================== --- head/.gitattributes Mon Nov 26 07:23:02 2018 (r340930) +++ head/.gitattributes Mon Nov 26 07:30:47 2018 (r340931) @@ -3,5 +3,3 @@ *.cpp diff=cpp *.hpp diff=cpp *.py diff=python -. svn-properties=svn:mime-type=sys/dev/sfxge/common/efx_regs_mcdi_aoe.h -. svn-properties=svn:eol-style=sys/dev/sfxge/common/efx_regs_mcdi_aoe.h From owner-svn-src-all@freebsd.org Mon Nov 26 07:42:53 2018 Return-Path: Delivered-To: svn-src-all@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 5339011506A9; Mon, 26 Nov 2018 07:42:53 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E95348B8DC; Mon, 26 Nov 2018 07:42:52 +0000 (UTC) (envelope-from arybchik@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 ABE46BD6; Mon, 26 Nov 2018 07:42:52 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQ7gqjU011429; Mon, 26 Nov 2018 07:42:52 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQ7gqmV011427; Mon, 26 Nov 2018 07:42:52 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201811260742.wAQ7gqmV011427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 26 Nov 2018 07:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340932 - head/sys/dev/sfxge/common X-SVN-Group: head X-SVN-Commit-Author: arybchik X-SVN-Commit-Paths: head/sys/dev/sfxge/common X-SVN-Commit-Revision: 340932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E95348B8DC X-Spamd-Result: default: False [1.66 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.64)[0.643,0]; NEURAL_SPAM_MEDIUM(0.64)[0.638,0]; NEURAL_SPAM_SHORT(0.37)[0.375,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 07:42:53 -0000 Author: arybchik Date: Mon Nov 26 07:42:52 2018 New Revision: 340932 URL: https://svnweb.freebsd.org/changeset/base/340932 Log: sfxge(4): add 3.3V and 12.0V current sensors Automatically generated using mkconfig.py. Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18138 Modified: head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_mon.c Modified: head/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Mon Nov 26 07:30:47 2018 (r340931) +++ head/sys/dev/sfxge/common/efx.h Mon Nov 26 07:42:52 2018 (r340932) @@ -631,7 +631,7 @@ efx_mon_init( #define EFX_MON_STATS_PAGE_SIZE 0x100 #define EFX_MON_MASK_ELEMENT_SIZE 32 -/* START MKCONFIG GENERATED MonitorHeaderStatsBlock aa0233c80156308e */ +/* START MKCONFIG GENERATED MonitorHeaderStatsBlock fcc1b6748432e1ac */ typedef enum efx_mon_stat_e { EFX_MON_STAT_2_5V, EFX_MON_STAT_VCCP1, @@ -712,6 +712,8 @@ typedef enum efx_mon_stat_e { EFX_MON_STAT_BOARD_BACK_TEMP, EFX_MON_STAT_I1V8, EFX_MON_STAT_I2V5, + EFX_MON_STAT_I3V3, + EFX_MON_STAT_I12V0, EFX_MON_NSTATS } efx_mon_stat_t; Modified: head/sys/dev/sfxge/common/efx_mon.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mon.c Mon Nov 26 07:30:47 2018 (r340931) +++ head/sys/dev/sfxge/common/efx_mon.c Mon Nov 26 07:42:52 2018 (r340932) @@ -128,7 +128,7 @@ fail1: #if EFSYS_OPT_NAMES -/* START MKCONFIG GENERATED MonitorStatNamesBlock d92af1538001301f */ +/* START MKCONFIG GENERATED MonitorStatNamesBlock a808884b01444549 */ static const char * const __mon_stat_name[] = { "value_2_5v", "value_vccp1", @@ -209,6 +209,8 @@ static const char * const __mon_stat_name[] = { "board_back_temp", "i1v8", "i2v5", + "i3v3", + "i12v0", }; /* END MKCONFIG GENERATED MonitorStatNamesBlock */ From owner-svn-src-all@freebsd.org Mon Nov 26 08:16:34 2018 Return-Path: Delivered-To: svn-src-all@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 C0356115116D; Mon, 26 Nov 2018 08:16:34 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 613288C783; Mon, 26 Nov 2018 08:16:34 +0000 (UTC) (envelope-from bapt@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 4211610C5; Mon, 26 Nov 2018 08:16:34 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQ8GY4l027088; Mon, 26 Nov 2018 08:16:34 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQ8GXpk027081; Mon, 26 Nov 2018 08:16:33 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201811260816.wAQ8GXpk027081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 26 Nov 2018 08:16:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340933 - head/lib/libedit X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/lib/libedit X-SVN-Commit-Revision: 340933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 613288C783 X-Spamd-Result: default: False [1.72 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.41)[0.406,0]; NEURAL_SPAM_MEDIUM(0.66)[0.657,0]; NEURAL_SPAM_LONG(0.66)[0.661,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 08:16:35 -0000 Author: bapt Date: Mon Nov 26 08:16:33 2018 New Revision: 340933 URL: https://svnweb.freebsd.org/changeset/base/340933 Log: libedit: improve multibyte support Until this commit libedit only supported UTF-8 for multibyte charset Improve it to support other multibyte charsets Tested with eucJP and SJIS charsets. Note that this change as been review and committed in upstream libedit as well via christos@NetBSD Submitted by: naito.yuichiro _at_ gmail.com Reviewed by: bapt, pfg, yuripv, 0mp MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D17903 Modified: head/lib/libedit/chartype.c head/lib/libedit/chartype.h head/lib/libedit/el.c head/lib/libedit/el.h head/lib/libedit/read.c Modified: head/lib/libedit/chartype.c ============================================================================== --- head/lib/libedit/chartype.c Mon Nov 26 07:42:52 2018 (r340932) +++ head/lib/libedit/chartype.c Mon Nov 26 08:16:33 2018 (r340933) @@ -37,6 +37,7 @@ __RCSID("$NetBSD: chartype.c,v 1.23 2016/02/28 23:02:2 __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -182,17 +183,13 @@ ct_decode_argv(int argc, const char *argv[], ct_buffer protected size_t ct_enc_width(Char c) { - /* UTF-8 encoding specific values */ - if (c < 0x80) - return 1; - else if (c < 0x0800) - return 2; - else if (c < 0x10000) - return 3; - else if (c < 0x110000) - return 4; - else - return 0; /* not a valid codepoint */ + mbstate_t ps = (mbstate_t){{0}}; + size_t len; + char cbuf[MB_LEN_MAX]; + len = ct_wcrtomb(cbuf, c, &ps); + if (len == (size_t)-1) + return (0); + return (len); } protected ssize_t Modified: head/lib/libedit/chartype.h ============================================================================== --- head/lib/libedit/chartype.h Mon Nov 26 07:42:52 2018 (r340932) +++ head/lib/libedit/chartype.h Mon Nov 26 08:16:33 2018 (r340933) @@ -56,6 +56,7 @@ #define ct_wctob wctob #define ct_wctomb wctomb +#define ct_wcrtomb wcrtomb #define ct_wctomb_reset wctomb(0,0) #define ct_wcstombs wcstombs #define ct_mbstowcs mbstowcs @@ -109,6 +110,7 @@ Width(wchar_t c) #define ct_wctob(w) ((int)(w)) #define ct_wctomb error +#define ct_wcrtomb error #define ct_wctomb_reset #define ct_wcstombs(a, b, c) (strncpy(a, b, c), strlen(a)) #define ct_mbstowcs(a, b, c) (strncpy(a, b, c), strlen(a)) Modified: head/lib/libedit/el.c ============================================================================== --- head/lib/libedit/el.c Mon Nov 26 07:42:52 2018 (r340932) +++ head/lib/libedit/el.c Mon Nov 26 08:16:33 2018 (r340933) @@ -99,10 +99,6 @@ el_init_fd(const char *prog, FILE *fin, FILE *fout, FI * Initialize all the modules. Order is important!!! */ el->el_flags = 0; - if (setlocale(LC_CTYPE, NULL) != NULL){ - if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0) - el->el_flags |= CHARSET_IS_UTF8; - } if (terminal_init(el) == -1) { el_free(el->el_prog); @@ -293,7 +289,7 @@ FUN(el,set)(EditLine *el, int op, ...) void *ptr = va_arg(ap, void *); rv = hist_set(el, func, ptr); - if (!(el->el_flags & CHARSET_IS_UTF8)) + if (MB_CUR_MAX == 1) el->el_flags &= ~NARROW_HISTORY; break; } Modified: head/lib/libedit/el.h ============================================================================== --- head/lib/libedit/el.h Mon Nov 26 07:42:52 2018 (r340932) +++ head/lib/libedit/el.h Mon Nov 26 08:16:33 2018 (r340933) @@ -56,7 +56,6 @@ #define NO_TTY 0x02 #define EDIT_DISABLED 0x04 #define UNBUFFERED 0x08 -#define CHARSET_IS_UTF8 0x10 #define NARROW_HISTORY 0x40 typedef unsigned char el_action_t; /* Index to command array */ Modified: head/lib/libedit/read.c ============================================================================== --- head/lib/libedit/read.c Mon Nov 26 07:42:52 2018 (r340932) +++ head/lib/libedit/read.c Mon Nov 26 08:16:33 2018 (r340933) @@ -363,13 +363,7 @@ read_char(EditLine *el, wchar_t *cp) goto again; } case (size_t)-2: - /* - * We don't support other multibyte charsets. - * The second condition shouldn't happen - * and is here merely for additional safety. - */ - if ((el->el_flags & CHARSET_IS_UTF8) == 0 || - cbp >= MB_LEN_MAX) { + if (cbp >= MB_LEN_MAX) { errno = EILSEQ; *cp = L'\0'; return -1; From owner-svn-src-all@freebsd.org Mon Nov 26 10:47:01 2018 Return-Path: Delivered-To: svn-src-all@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 935A4115478E; Mon, 26 Nov 2018 10:47:01 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38D1C6AF2A; Mon, 26 Nov 2018 10:47:01 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19C842996; Mon, 26 Nov 2018 10:47:01 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQAl0Rb004976; Mon, 26 Nov 2018 10:47:00 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQAl0Fe004975; Mon, 26 Nov 2018 10:47:00 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261047.wAQAl0Fe004975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 10:47: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: r340934 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 340934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 38D1C6AF2A X-Spamd-Result: default: False [0.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.64)[0.643,0]; NEURAL_HAM_SHORT(-0.29)[-0.291,0]; NEURAL_SPAM_LONG(0.63)[0.630,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 10:47:01 -0000 Author: eugen Date: Mon Nov 26 10:47:00 2018 New Revision: 340934 URL: https://svnweb.freebsd.org/changeset/base/340934 Log: MFC r339807: Prevent multicast code from panicing due to unprotected access to INADDR_HASH. PR: 220078 Differential Revision: https://reviews.freebsd.org/D12457 Tested-by: Cassiano Peixoto and others Modified: stable/12/sys/netinet/in_mcast.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/in_mcast.c ============================================================================== --- stable/12/sys/netinet/in_mcast.c Mon Nov 26 08:16:33 2018 (r340933) +++ stable/12/sys/netinet/in_mcast.c Mon Nov 26 10:47:00 2018 (r340934) @@ -1444,6 +1444,7 @@ static int inp_block_unblock_source(struct inpcb *inp, struct sockopt *sopt) { struct group_source_req gsr; + struct rm_priotracker in_ifa_tracker; sockunion_t *gsa, *ssa; struct ifnet *ifp; struct in_mfilter *imf; @@ -1481,9 +1482,11 @@ inp_block_unblock_source(struct inpcb *inp, struct soc ssa->sin.sin_len = sizeof(struct sockaddr_in); ssa->sin.sin_addr = mreqs.imr_sourceaddr; - if (!in_nullhost(mreqs.imr_interface)) + if (!in_nullhost(mreqs.imr_interface)) { + IN_IFADDR_RLOCK(&in_ifa_tracker); INADDR_TO_IFP(mreqs.imr_interface, ifp); - + IN_IFADDR_RUNLOCK(&in_ifa_tracker); + } if (sopt->sopt_name == IP_BLOCK_SOURCE) doblock = 1; @@ -1969,7 +1972,6 @@ inp_getmoptions(struct inpcb *inp, struct sockopt *sop * * Returns NULL if no ifp could be found. * - * SMPng: TODO: Acquire the appropriate locks for INADDR_TO_IFP. * FUTURE: Implement IPv4 source-address selection. */ static struct ifnet * @@ -1987,7 +1989,9 @@ inp_lookup_mcast_ifp(const struct inpcb *inp, ifp = NULL; if (!in_nullhost(ina)) { + IN_IFADDR_RLOCK(&in_ifa_tracker); INADDR_TO_IFP(ina, ifp); + IN_IFADDR_RUNLOCK(&in_ifa_tracker); } else { fibnum = inp ? inp->inp_inc.inc_fibnum : 0; if (fib4_lookup_nh_basic(fibnum, gsin->sin_addr, 0, 0, &nh4)==0) @@ -2332,6 +2336,7 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop { struct group_source_req gsr; struct ip_mreq_source mreqs; + struct rm_priotracker in_ifa_tracker; sockunion_t *gsa, *ssa; struct ifnet *ifp; struct in_mfilter *imf; @@ -2390,9 +2395,11 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop * XXX NOTE WELL: The RFC 3678 API is preferred because * using an IPv4 address as a key is racy. */ - if (!in_nullhost(mreqs.imr_interface)) + if (!in_nullhost(mreqs.imr_interface)) { + IN_IFADDR_RLOCK(&in_ifa_tracker); INADDR_TO_IFP(mreqs.imr_interface, ifp); - + IN_IFADDR_RUNLOCK(&in_ifa_tracker); + } CTR3(KTR_IGMPV3, "%s: imr_interface = 0x%08x, ifp = %p", __func__, ntohl(mreqs.imr_interface.s_addr), ifp); @@ -2560,6 +2567,7 @@ out_inp_locked: static int inp_set_multicast_if(struct inpcb *inp, struct sockopt *sopt) { + struct rm_priotracker in_ifa_tracker; struct in_addr addr; struct ip_mreqn mreqn; struct ifnet *ifp; @@ -2598,7 +2606,9 @@ inp_set_multicast_if(struct inpcb *inp, struct sockopt if (in_nullhost(addr)) { ifp = NULL; } else { + IN_IFADDR_RLOCK(&in_ifa_tracker); INADDR_TO_IFP(addr, ifp); + IN_IFADDR_RUNLOCK(&in_ifa_tracker); if (ifp == NULL) return (EADDRNOTAVAIL); } From owner-svn-src-all@freebsd.org Mon Nov 26 10:50:51 2018 Return-Path: Delivered-To: svn-src-all@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 E50DA1154986; Mon, 26 Nov 2018 10:50:50 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C68E6B1F6; Mon, 26 Nov 2018 10:50:50 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E66529AF; Mon, 26 Nov 2018 10:50:50 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQAooqe005226; Mon, 26 Nov 2018 10:50:50 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQAooag005225; Mon, 26 Nov 2018 10:50:50 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261050.wAQAooag005225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 10:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340935 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 340935 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8C68E6B1F6 X-Spamd-Result: default: False [0.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.291,0]; NEURAL_SPAM_LONG(0.63)[0.630,0]; NEURAL_SPAM_MEDIUM(0.64)[0.643,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 10:50:51 -0000 Author: eugen Date: Mon Nov 26 10:50:50 2018 New Revision: 340935 URL: https://svnweb.freebsd.org/changeset/base/340935 Log: MFC r339807: Prevent multicast code from panicing due to unprotected access to INADDR_HASH. PR: 220078 Differential Revision: https://reviews.freebsd.org/D12457 Tested-by: Cassiano Peixoto and others Modified: stable/11/sys/netinet/in_mcast.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/in_mcast.c ============================================================================== --- stable/11/sys/netinet/in_mcast.c Mon Nov 26 10:47:00 2018 (r340934) +++ stable/11/sys/netinet/in_mcast.c Mon Nov 26 10:50:50 2018 (r340935) @@ -1339,6 +1339,7 @@ static int inp_block_unblock_source(struct inpcb *inp, struct sockopt *sopt) { struct group_source_req gsr; + struct rm_priotracker in_ifa_tracker; sockunion_t *gsa, *ssa; struct ifnet *ifp; struct in_mfilter *imf; @@ -1376,9 +1377,11 @@ inp_block_unblock_source(struct inpcb *inp, struct soc ssa->sin.sin_len = sizeof(struct sockaddr_in); ssa->sin.sin_addr = mreqs.imr_sourceaddr; - if (!in_nullhost(mreqs.imr_interface)) + if (!in_nullhost(mreqs.imr_interface)) { + IN_IFADDR_RLOCK(&in_ifa_tracker); INADDR_TO_IFP(mreqs.imr_interface, ifp); - + IN_IFADDR_RUNLOCK(&in_ifa_tracker); + } if (sopt->sopt_name == IP_BLOCK_SOURCE) doblock = 1; @@ -1874,7 +1877,6 @@ inp_getmoptions(struct inpcb *inp, struct sockopt *sop * * Returns NULL if no ifp could be found. * - * SMPng: TODO: Acquire the appropriate locks for INADDR_TO_IFP. * FUTURE: Implement IPv4 source-address selection. */ static struct ifnet * @@ -1892,7 +1894,9 @@ inp_lookup_mcast_ifp(const struct inpcb *inp, ifp = NULL; if (!in_nullhost(ina)) { + IN_IFADDR_RLOCK(&in_ifa_tracker); INADDR_TO_IFP(ina, ifp); + IN_IFADDR_RUNLOCK(&in_ifa_tracker); } else { fibnum = inp ? inp->inp_inc.inc_fibnum : 0; if (fib4_lookup_nh_basic(fibnum, gsin->sin_addr, 0, 0, &nh4)==0) @@ -2224,6 +2228,7 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop { struct group_source_req gsr; struct ip_mreq_source mreqs; + struct rm_priotracker in_ifa_tracker; sockunion_t *gsa, *ssa; struct ifnet *ifp; struct in_mfilter *imf; @@ -2282,9 +2287,11 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop * XXX NOTE WELL: The RFC 3678 API is preferred because * using an IPv4 address as a key is racy. */ - if (!in_nullhost(mreqs.imr_interface)) + if (!in_nullhost(mreqs.imr_interface)) { + IN_IFADDR_RLOCK(&in_ifa_tracker); INADDR_TO_IFP(mreqs.imr_interface, ifp); - + IN_IFADDR_RUNLOCK(&in_ifa_tracker); + } CTR3(KTR_IGMPV3, "%s: imr_interface = 0x%08x, ifp = %p", __func__, ntohl(mreqs.imr_interface.s_addr), ifp); @@ -2444,6 +2451,7 @@ out_inp_locked: static int inp_set_multicast_if(struct inpcb *inp, struct sockopt *sopt) { + struct rm_priotracker in_ifa_tracker; struct in_addr addr; struct ip_mreqn mreqn; struct ifnet *ifp; @@ -2482,7 +2490,9 @@ inp_set_multicast_if(struct inpcb *inp, struct sockopt if (in_nullhost(addr)) { ifp = NULL; } else { + IN_IFADDR_RLOCK(&in_ifa_tracker); INADDR_TO_IFP(addr, ifp); + IN_IFADDR_RUNLOCK(&in_ifa_tracker); if (ifp == NULL) return (EADDRNOTAVAIL); } From owner-svn-src-all@freebsd.org Mon Nov 26 10:51:40 2018 Return-Path: Delivered-To: svn-src-all@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 97E7C1154B3E; Mon, 26 Nov 2018 10:51: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E5C66B505; Mon, 26 Nov 2018 10:51: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 1F8572AE7; Mon, 26 Nov 2018 10:51: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 wAQApdSR008320; Mon, 26 Nov 2018 10:51:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQApdCQ008319; Mon, 26 Nov 2018 10:51:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201811261051.wAQApdCQ008319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 26 Nov 2018 10:51: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: r340936 - stable/12/libexec/rtld-elf/amd64 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/libexec/rtld-elf/amd64 X-SVN-Commit-Revision: 340936 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3E5C66B505 X-Spamd-Result: default: False [0.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.62)[0.623,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 10:51:40 -0000 Author: kib Date: Mon Nov 26 10:51:39 2018 New Revision: 340936 URL: https://svnweb.freebsd.org/changeset/base/340936 Log: MFC r340842: Silence gcc warnings. Modified: stable/12/libexec/rtld-elf/amd64/reloc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/amd64/reloc.c ============================================================================== --- stable/12/libexec/rtld-elf/amd64/reloc.c Mon Nov 26 10:50:50 2018 (r340935) +++ stable/12/libexec/rtld-elf/amd64/reloc.c Mon Nov 26 10:51:39 2018 (r340936) @@ -138,6 +138,9 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int int r; r = -1; + symval = 0; + def = NULL; + /* * The dynamic loader may be called from a thread, we have * limited amounts of stack available so we cannot use alloca(). From owner-svn-src-all@freebsd.org Mon Nov 26 10:53:18 2018 Return-Path: Delivered-To: svn-src-all@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 03B811154C49; Mon, 26 Nov 2018 10:53:18 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97DF06B7C4; Mon, 26 Nov 2018 10:53:17 +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 791E42B2E; Mon, 26 Nov 2018 10:53:17 +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 wAQArHOh010303; Mon, 26 Nov 2018 10:53:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQArHuT010302; Mon, 26 Nov 2018 10:53:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201811261053.wAQArHuT010302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 26 Nov 2018 10:53:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340937 - stable/11/libexec/rtld-elf/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/libexec/rtld-elf/amd64 X-SVN-Commit-Revision: 340937 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 97DF06B7C4 X-Spamd-Result: default: False [0.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.62)[0.623,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 10:53:18 -0000 Author: kib Date: Mon Nov 26 10:53:17 2018 New Revision: 340937 URL: https://svnweb.freebsd.org/changeset/base/340937 Log: MFC r340842: Silence gcc warnings. Modified: stable/11/libexec/rtld-elf/amd64/reloc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/amd64/reloc.c ============================================================================== --- stable/11/libexec/rtld-elf/amd64/reloc.c Mon Nov 26 10:51:39 2018 (r340936) +++ stable/11/libexec/rtld-elf/amd64/reloc.c Mon Nov 26 10:53:17 2018 (r340937) @@ -136,6 +136,9 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int int r; r = -1; + symval = 0; + def = NULL; + /* * The dynamic loader may be called from a thread, we have * limited amounts of stack available so we cannot use alloca(). From owner-svn-src-all@freebsd.org Mon Nov 26 11:01:53 2018 Return-Path: Delivered-To: svn-src-all@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 47B2F1154E0F; Mon, 26 Nov 2018 11:01:53 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1FD56C18C; Mon, 26 Nov 2018 11:01:52 +0000 (UTC) (envelope-from mm@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 A8F5A2B8E; Mon, 26 Nov 2018 11:01:52 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQB1qZj010759; Mon, 26 Nov 2018 11:01:52 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQB1peW010754; Mon, 26 Nov 2018 11:01:51 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201811261101.wAQB1peW010754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Mon, 26 Nov 2018 11:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r340938 - in vendor/libarchive/dist: . libarchive libarchive/test X-SVN-Group: vendor X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in vendor/libarchive/dist: . libarchive libarchive/test X-SVN-Commit-Revision: 340938 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E1FD56C18C X-Spamd-Result: default: False [1.08 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.27)[-0.272,0]; NEURAL_SPAM_LONG(0.68)[0.678,0]; NEURAL_SPAM_MEDIUM(0.68)[0.676,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:01:53 -0000 Author: mm Date: Mon Nov 26 11:01:51 2018 New Revision: 340938 URL: https://svnweb.freebsd.org/changeset/base/340938 Log: Update vendor/libarchive/dist to git 2c5e9bdbb62eeb56a37776f796c15ed16727193e Relevant vendor changes: Issue #1096: Support extracting ACLs with in-entry comments (GNU tar) PR #1023: Support extracting extattrs as non-root on non-user-writable files Modified: vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/libarchive/archive_acl.c vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/dist/libarchive/test/test_extattr_freebsd.c vendor/libarchive/dist/libarchive/test/test_read_format_rar5.c Modified: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/CMakeLists.txt Mon Nov 26 10:53:17 2018 (r340937) +++ vendor/libarchive/dist/CMakeLists.txt Mon Nov 26 11:01:51 2018 (r340938) @@ -592,6 +592,8 @@ ENDIF(ZSTD_FOUND) MARK_AS_ADVANCED(CLEAR ZSTD_INCLUDE_DIR) MARK_AS_ADVANCED(CLEAR ZSTD_LIBRARY) +set(CMAKE_REQUIRED_LIBRARIES) + # # Check headers # Modified: vendor/libarchive/dist/libarchive/archive_acl.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_acl.c Mon Nov 26 10:53:17 2018 (r340937) +++ vendor/libarchive/dist/libarchive/archive_acl.c Mon Nov 26 11:01:51 2018 (r340938) @@ -1585,18 +1585,30 @@ next_field_w(const wchar_t **wp, const wchar_t **start /* Scan for the separator. */ while (**wp != L'\0' && **wp != L',' && **wp != L':' && - **wp != L'\n') { + **wp != L'\n' && **wp != L'#') { (*wp)++; } *sep = **wp; - /* Trim trailing whitespace to locate end of field. */ - *end = *wp - 1; - while (**end == L' ' || **end == L'\t' || **end == L'\n') { - (*end)--; + /* Locate end of field, trim trailing whitespace if necessary */ + if (*wp == *start) { + *end = *wp; + } else { + *end = *wp - 1; + while (**end == L' ' || **end == L'\t' || **end == L'\n') { + (*end)--; + } + (*end)++; } - (*end)++; + /* Handle in-field comments */ + if (*sep == L'#') { + while (**wp != L'\0' && **wp != L',' && **wp != L'\n') { + (*wp)++; + } + *sep = **wp; + } + /* Adjust scanner location. */ if (**wp != L'\0') (*wp)++; @@ -1646,7 +1658,7 @@ archive_acl_from_text_l(struct archive_acl *acl, const ret = ARCHIVE_OK; types = 0; - while (text != NULL && *text != '\0') { + while (text != NULL && *text != '\0') { /* * Parse the fields out of the next entry, * advance 'text' to start of next entry. @@ -2057,23 +2069,30 @@ next_field(const char **p, const char **start, *start = *p; /* Scan for the separator. */ - while (**p != '\0' && **p != ',' && **p != ':' && **p != '\n') { + while (**p != '\0' && **p != ',' && **p != ':' && **p != '\n' && + **p != '#') { (*p)++; } *sep = **p; - /* If the field is only whitespace, bail out now. */ - if (**p == '\0') { + /* Locate end of field, trim trailing whitespace if necessary */ + if (*p == *start) { *end = *p; - return; + } else { + *end = *p - 1; + while (**end == ' ' || **end == '\t' || **end == '\n') { + (*end)--; + } + (*end)++; } - /* Trim trailing whitespace to locate end of field. */ - *end = *p - 1; - while (**end == ' ' || **end == '\t' || **end == '\n') { - (*end)--; + /* Handle in-field comments */ + if (*sep == '#') { + while (**p != '\0' && **p != ',' && **p != '\n') { + (*p)++; + } + *sep = **p; } - (*end)++; /* Adjust scanner location. */ if (**p != '\0') Modified: vendor/libarchive/dist/libarchive/archive_write_disk_posix.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Mon Nov 26 10:53:17 2018 (r340937) +++ vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Mon Nov 26 11:01:51 2018 (r340938) @@ -1705,6 +1705,20 @@ _archive_write_disk_finish_entry(struct archive *_a) } /* + * HYPOTHESIS: + * If we're not root, we won't be setting any security + * attributes that may be wiped by the set_mode() routine + * below. We also can't set xattr on non-owner-writable files, + * which may be the state after set_mode(). Perform + * set_xattrs() first based on these constraints. + */ + if (a->user_uid != 0 && + (a->todo & TODO_XATTR)) { + int r2 = set_xattrs(a); + if (r2 < ret) ret = r2; + } + + /* * set_mode must precede ACLs on systems such as Solaris and * FreeBSD where setting the mode implicitly clears extended ACLs */ @@ -1717,8 +1731,10 @@ _archive_write_disk_finish_entry(struct archive *_a) * Security-related extended attributes (such as * security.capability on Linux) have to be restored last, * since they're implicitly removed by other file changes. + * We do this last only when root. */ - if (a->todo & TODO_XATTR) { + if (a->user_uid == 0 && + (a->todo & TODO_XATTR)) { int r2 = set_xattrs(a); if (r2 < ret) ret = r2; } @@ -2222,6 +2238,15 @@ create_filesystem_object(struct archive_write_disk *a) * security, so we never restore them at this point. */ mode = final_mode & 0777 & ~a->user_umask; + + /* + * Always create writable such that [f]setxattr() works if we're not + * root. + */ + if (a->user_uid != 0 && + a->todo & (TODO_HFS_COMPRESSION | TODO_XATTR)) { + mode |= 0200; + } switch (a->mode & AE_IFMT) { default: Modified: vendor/libarchive/dist/libarchive/test/test_extattr_freebsd.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_extattr_freebsd.c Mon Nov 26 10:53:17 2018 (r340937) +++ vendor/libarchive/dist/libarchive/test/test_extattr_freebsd.c Mon Nov 26 11:01:51 2018 (r340938) @@ -48,7 +48,6 @@ DEFINE_TEST(test_extattr_freebsd) struct archive *a; struct archive_entry *ae; int n, fd; - int extattr_privilege_bug = 0; /* * First, do a quick manual set/read of an extended attribute @@ -72,24 +71,6 @@ DEFINE_TEST(test_extattr_freebsd) assertEqualInt(4, n); close(fd); - /* - * Repeat the above, but with file permissions set to 0000. - * This should work (extattr_set_fd() should follow fd - * permissions, not file permissions), but is known broken on - * some versions of FreeBSD. - */ - fd = open("pretest2", O_RDWR | O_CREAT, 00000); - failure("Could not create test file?!"); - if (!assert(fd >= 0)) - return; - - n = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, "testattr", "1234", 4); - if (n != 4) { - skipping("Restoring xattr to an unwritable file seems to be broken on this platform"); - extattr_privilege_bug = 1; - } - close(fd); - /* Create a write-to-disk object. */ assert(NULL != (a = archive_write_disk_new())); archive_write_disk_set_options(a, @@ -119,16 +100,12 @@ DEFINE_TEST(test_extattr_freebsd) archive_entry_free(ae); /* Close the archive. */ - if (extattr_privilege_bug) - /* If the bug is here, write_close will return warning. */ - assertEqualIntA(a, ARCHIVE_WARN, archive_write_close(a)); - else - assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); - assertEqualInt(ARCHIVE_OK, archive_write_free(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); /* Verify the data on disk. */ assertEqualInt(0, stat("test0", &st)); assertEqualInt(st.st_mtime, 123456); + assertEqualInt(st.st_mode & 0777, 0755); /* Verify extattr */ n = extattr_get_file("test0", EXTATTR_NAMESPACE_USER, "foo", buff, sizeof(buff)); @@ -140,17 +117,20 @@ DEFINE_TEST(test_extattr_freebsd) /* Verify the data on disk. */ assertEqualInt(0, stat("test1", &st)); assertEqualInt(st.st_mtime, 12345678); + assertEqualInt(st.st_mode & 0777, 0); + /* + * If we are not root, we have to make test1 user readable + * or extattr_get_file() will fail + */ + if (geteuid() != 0) { + chmod("test1", S_IRUSR); + } /* Verify extattr */ n = extattr_get_file("test1", EXTATTR_NAMESPACE_USER, "bar", buff, sizeof(buff)); - if (extattr_privilege_bug) { - /* If we have the bug, the extattr won't have been written. */ - assertEqualInt(n, -1); - } else { - if (assertEqualInt(n, 6)) { - buff[n] = '\0'; - assertEqualString(buff, "123456"); - } + if (assertEqualInt(n, 6)) { + buff[n] = '\0'; + assertEqualString(buff, "123456"); } /* Use libarchive APIs to read the file back into an entry and Modified: vendor/libarchive/dist/libarchive/test/test_read_format_rar5.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_read_format_rar5.c Mon Nov 26 10:53:17 2018 (r340937) +++ vendor/libarchive/dist/libarchive/test/test_read_format_rar5.c Mon Nov 26 11:01:51 2018 (r340938) @@ -90,7 +90,7 @@ int verify_data(const uint8_t* data_ptr, int magic, in static int extract_one(struct archive* a, struct archive_entry* ae, uint32_t crc) { - la_ssize_t fsize, read; + la_ssize_t fsize, bytes_read; uint8_t* buf; int ret = 1; uint32_t computed_crc; @@ -100,9 +100,9 @@ int extract_one(struct archive* a, struct archive_entr if(buf == NULL) return 1; - read = archive_read_data(a, buf, fsize); - if(read != fsize) { - assertEqualInt(read, fsize); + bytes_read = archive_read_data(a, buf, fsize); + if(bytes_read != fsize) { + assertEqualInt(bytes_read, fsize); goto fn_exit; } From owner-svn-src-all@freebsd.org Mon Nov 26 11:04:37 2018 Return-Path: Delivered-To: svn-src-all@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 EFDE7115503A; Mon, 26 Nov 2018 11:04:36 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DFCC6C444; Mon, 26 Nov 2018 11:04:36 +0000 (UTC) (envelope-from mm@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 6EDD92CD8; Mon, 26 Nov 2018 11:04:36 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQB4aCj015463; Mon, 26 Nov 2018 11:04:36 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQB4ZLL015459; Mon, 26 Nov 2018 11:04:35 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201811261104.wAQB4ZLL015459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Mon, 26 Nov 2018 11:04:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340939 - in head/contrib/libarchive/libarchive: . test X-SVN-Group: head X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in head/contrib/libarchive/libarchive: . test X-SVN-Commit-Revision: 340939 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8DFCC6C444 X-Spamd-Result: default: False [1.08 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.27)[-0.272,0]; NEURAL_SPAM_LONG(0.68)[0.678,0]; NEURAL_SPAM_MEDIUM(0.68)[0.676,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:04:37 -0000 Author: mm Date: Mon Nov 26 11:04:35 2018 New Revision: 340939 URL: https://svnweb.freebsd.org/changeset/base/340939 Log: MFV r340938: Sync libarchive with vendor. Relevant vendor changes: Issue #1096: Support extracting ACLs with in-entry comments (GNU tar) PR #1023: Support extracting extattrs as non-root on non-user-writeable files MFC after: 1 week Modified: head/contrib/libarchive/libarchive/archive_acl.c head/contrib/libarchive/libarchive/archive_write_disk_posix.c head/contrib/libarchive/libarchive/test/test_extattr_freebsd.c head/contrib/libarchive/libarchive/test/test_read_format_rar5.c Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/libarchive/archive_acl.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_acl.c Mon Nov 26 11:01:51 2018 (r340938) +++ head/contrib/libarchive/libarchive/archive_acl.c Mon Nov 26 11:04:35 2018 (r340939) @@ -1585,18 +1585,30 @@ next_field_w(const wchar_t **wp, const wchar_t **start /* Scan for the separator. */ while (**wp != L'\0' && **wp != L',' && **wp != L':' && - **wp != L'\n') { + **wp != L'\n' && **wp != L'#') { (*wp)++; } *sep = **wp; - /* Trim trailing whitespace to locate end of field. */ - *end = *wp - 1; - while (**end == L' ' || **end == L'\t' || **end == L'\n') { - (*end)--; + /* Locate end of field, trim trailing whitespace if necessary */ + if (*wp == *start) { + *end = *wp; + } else { + *end = *wp - 1; + while (**end == L' ' || **end == L'\t' || **end == L'\n') { + (*end)--; + } + (*end)++; } - (*end)++; + /* Handle in-field comments */ + if (*sep == L'#') { + while (**wp != L'\0' && **wp != L',' && **wp != L'\n') { + (*wp)++; + } + *sep = **wp; + } + /* Adjust scanner location. */ if (**wp != L'\0') (*wp)++; @@ -1646,7 +1658,7 @@ archive_acl_from_text_l(struct archive_acl *acl, const ret = ARCHIVE_OK; types = 0; - while (text != NULL && *text != '\0') { + while (text != NULL && *text != '\0') { /* * Parse the fields out of the next entry, * advance 'text' to start of next entry. @@ -2057,23 +2069,30 @@ next_field(const char **p, const char **start, *start = *p; /* Scan for the separator. */ - while (**p != '\0' && **p != ',' && **p != ':' && **p != '\n') { + while (**p != '\0' && **p != ',' && **p != ':' && **p != '\n' && + **p != '#') { (*p)++; } *sep = **p; - /* If the field is only whitespace, bail out now. */ - if (**p == '\0') { + /* Locate end of field, trim trailing whitespace if necessary */ + if (*p == *start) { *end = *p; - return; + } else { + *end = *p - 1; + while (**end == ' ' || **end == '\t' || **end == '\n') { + (*end)--; + } + (*end)++; } - /* Trim trailing whitespace to locate end of field. */ - *end = *p - 1; - while (**end == ' ' || **end == '\t' || **end == '\n') { - (*end)--; + /* Handle in-field comments */ + if (*sep == '#') { + while (**p != '\0' && **p != ',' && **p != '\n') { + (*p)++; + } + *sep = **p; } - (*end)++; /* Adjust scanner location. */ if (**p != '\0') Modified: head/contrib/libarchive/libarchive/archive_write_disk_posix.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_disk_posix.c Mon Nov 26 11:01:51 2018 (r340938) +++ head/contrib/libarchive/libarchive/archive_write_disk_posix.c Mon Nov 26 11:04:35 2018 (r340939) @@ -1705,6 +1705,20 @@ _archive_write_disk_finish_entry(struct archive *_a) } /* + * HYPOTHESIS: + * If we're not root, we won't be setting any security + * attributes that may be wiped by the set_mode() routine + * below. We also can't set xattr on non-owner-writable files, + * which may be the state after set_mode(). Perform + * set_xattrs() first based on these constraints. + */ + if (a->user_uid != 0 && + (a->todo & TODO_XATTR)) { + int r2 = set_xattrs(a); + if (r2 < ret) ret = r2; + } + + /* * set_mode must precede ACLs on systems such as Solaris and * FreeBSD where setting the mode implicitly clears extended ACLs */ @@ -1717,8 +1731,10 @@ _archive_write_disk_finish_entry(struct archive *_a) * Security-related extended attributes (such as * security.capability on Linux) have to be restored last, * since they're implicitly removed by other file changes. + * We do this last only when root. */ - if (a->todo & TODO_XATTR) { + if (a->user_uid == 0 && + (a->todo & TODO_XATTR)) { int r2 = set_xattrs(a); if (r2 < ret) ret = r2; } @@ -2222,6 +2238,15 @@ create_filesystem_object(struct archive_write_disk *a) * security, so we never restore them at this point. */ mode = final_mode & 0777 & ~a->user_umask; + + /* + * Always create writable such that [f]setxattr() works if we're not + * root. + */ + if (a->user_uid != 0 && + a->todo & (TODO_HFS_COMPRESSION | TODO_XATTR)) { + mode |= 0200; + } switch (a->mode & AE_IFMT) { default: Modified: head/contrib/libarchive/libarchive/test/test_extattr_freebsd.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_extattr_freebsd.c Mon Nov 26 11:01:51 2018 (r340938) +++ head/contrib/libarchive/libarchive/test/test_extattr_freebsd.c Mon Nov 26 11:04:35 2018 (r340939) @@ -49,7 +49,6 @@ DEFINE_TEST(test_extattr_freebsd) struct archive_entry *ae; ssize_t n; int fd; - int extattr_privilege_bug = 0; /* * First, do a quick manual set/read of an extended attribute @@ -73,24 +72,6 @@ DEFINE_TEST(test_extattr_freebsd) assertEqualInt(4, n); close(fd); - /* - * Repeat the above, but with file permissions set to 0000. - * This should work (extattr_set_fd() should follow fd - * permissions, not file permissions), but is known broken on - * some versions of FreeBSD. - */ - fd = open("pretest2", O_RDWR | O_CREAT, 00000); - failure("Could not create test file?!"); - if (!assert(fd >= 0)) - return; - - n = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, "testattr", "1234", 4); - if (n != 4) { - skipping("Restoring xattr to an unwritable file seems to be broken on this platform"); - extattr_privilege_bug = 1; - } - close(fd); - /* Create a write-to-disk object. */ assert(NULL != (a = archive_write_disk_new())); archive_write_disk_set_options(a, @@ -120,16 +101,12 @@ DEFINE_TEST(test_extattr_freebsd) archive_entry_free(ae); /* Close the archive. */ - if (extattr_privilege_bug) - /* If the bug is here, write_close will return warning. */ - assertEqualIntA(a, ARCHIVE_WARN, archive_write_close(a)); - else - assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); - assertEqualInt(ARCHIVE_OK, archive_write_free(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); /* Verify the data on disk. */ assertEqualInt(0, stat("test0", &st)); assertEqualInt(st.st_mtime, 123456); + assertEqualInt(st.st_mode & 0777, 0755); /* Verify extattr */ n = extattr_get_file("test0", EXTATTR_NAMESPACE_USER, "foo", buff, sizeof(buff)); @@ -141,17 +118,20 @@ DEFINE_TEST(test_extattr_freebsd) /* Verify the data on disk. */ assertEqualInt(0, stat("test1", &st)); assertEqualInt(st.st_mtime, 12345678); + assertEqualInt(st.st_mode & 0777, 0); + /* + * If we are not root, we have to make test1 user readable + * or extattr_get_file() will fail + */ + if (geteuid() != 0) { + chmod("test1", S_IRUSR); + } /* Verify extattr */ n = extattr_get_file("test1", EXTATTR_NAMESPACE_USER, "bar", buff, sizeof(buff)); - if (extattr_privilege_bug) { - /* If we have the bug, the extattr won't have been written. */ - assertEqualInt(n, -1); - } else { - if (assertEqualInt(n, 6)) { - buff[n] = '\0'; - assertEqualString(buff, "123456"); - } + if (assertEqualInt(n, 6)) { + buff[n] = '\0'; + assertEqualString(buff, "123456"); } /* Use libarchive APIs to read the file back into an entry and Modified: head/contrib/libarchive/libarchive/test/test_read_format_rar5.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_read_format_rar5.c Mon Nov 26 11:01:51 2018 (r340938) +++ head/contrib/libarchive/libarchive/test/test_read_format_rar5.c Mon Nov 26 11:04:35 2018 (r340939) @@ -90,7 +90,7 @@ int verify_data(const uint8_t* data_ptr, int magic, in static int extract_one(struct archive* a, struct archive_entry* ae, uint32_t crc) { - la_ssize_t fsize, read; + la_ssize_t fsize, bytes_read; uint8_t* buf; int ret = 1; uint32_t computed_crc; @@ -100,9 +100,9 @@ int extract_one(struct archive* a, struct archive_entr if(buf == NULL) return 1; - read = archive_read_data(a, buf, fsize); - if(read != fsize) { - assertEqualInt(read, fsize); + bytes_read = archive_read_data(a, buf, fsize); + if(bytes_read != fsize) { + assertEqualInt(bytes_read, fsize); goto fn_exit; } From owner-svn-src-all@freebsd.org Mon Nov 26 11:05:27 2018 Return-Path: Delivered-To: svn-src-all@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 A6220115508E; Mon, 26 Nov 2018 11:05:27 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B69F6C5DC; Mon, 26 Nov 2018 11:05:27 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CB342CD9; Mon, 26 Nov 2018 11:05:27 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQB5RVh015547; Mon, 26 Nov 2018 11:05:27 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQB5RCZ015546; Mon, 26 Nov 2018 11:05:27 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261105.wAQB5RCZ015546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 11:05: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: r340940 - stable/12/sbin/route X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sbin/route X-SVN-Commit-Revision: 340940 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4B69F6C5DC X-Spamd-Result: default: False [0.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.62)[0.623,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:05:27 -0000 Author: eugen Date: Mon Nov 26 11:05:26 2018 New Revision: 340940 URL: https://svnweb.freebsd.org/changeset/base/340940 Log: MFC r339811: route(8): correctly return exit status when "-q" flag is used. Previously, route returned 1 in case of error properly signalling failure but "route -q" it returned 0 for same case. Fix it. PR: 186333 Modified: stable/12/sbin/route/route.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/route/route.c ============================================================================== --- stable/12/sbin/route/route.c Mon Nov 26 11:04:35 2018 (r340939) +++ stable/12/sbin/route/route.c Mon Nov 26 11:05:26 2018 (r340940) @@ -1050,10 +1050,13 @@ newroute(int argc, char **argv) } printf("\n"); } + } - fibnum = 0; - TAILQ_FOREACH(fl, &fibl_head, fl_next) { - if (fl->fl_error != 0) { + fibnum = 0; + TAILQ_FOREACH(fl, &fibl_head, fl_next) { + if (fl->fl_error != 0) { + error = 1; + if (!qflag) { printf("%s %s %s", cmd, (nrflags & F_ISHOST) ? "host" : "net", dest); if (*gateway) @@ -1087,7 +1090,6 @@ newroute(int argc, char **argv) break; } printf(": %s\n", errmsg); - error = 1; } } } From owner-svn-src-all@freebsd.org Mon Nov 26 11:06:40 2018 Return-Path: Delivered-To: svn-src-all@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 AF38D115512D; Mon, 26 Nov 2018 11:06:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F2366C79E; Mon, 26 Nov 2018 11:06:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2FA242CDB; Mon, 26 Nov 2018 11:06:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQB6eab015677; Mon, 26 Nov 2018 11:06:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQB6ecl015676; Mon, 26 Nov 2018 11:06:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201811261106.wAQB6ecl015676@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 26 Nov 2018 11:06: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: r340941 - stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 340941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4F2366C79E X-Spamd-Result: default: False [0.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.62)[0.623,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:06:40 -0000 Author: hselasky Date: Mon Nov 26 11:06:39 2018 New Revision: 340941 URL: https://svnweb.freebsd.org/changeset/base/340941 Log: MFC r340479: Implement ktime_get_ts64() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/ktime.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/ktime.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/ktime.h Mon Nov 26 11:05:26 2018 (r340940) +++ stable/12/sys/compat/linuxkpi/common/include/linux/ktime.h Mon Nov 26 11:06:39 2018 (r340941) @@ -176,6 +176,7 @@ timeval_to_ktime(struct timeval tv) #define ktime_to_timespec64(kt) ns_to_timespec(kt) #define ktime_to_timeval(kt) ns_to_timeval(kt) #define ktime_to_ns(kt) (kt) +#define ktime_get_ts64(ts) ktime_get_ts(ts) static inline int64_t ktime_get_ns(void) From owner-svn-src-all@freebsd.org Mon Nov 26 11:07:44 2018 Return-Path: Delivered-To: svn-src-all@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 132CD115519F; Mon, 26 Nov 2018 11:07:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A70886C8F6; Mon, 26 Nov 2018 11:07:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 889DA2CDC; Mon, 26 Nov 2018 11:07:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQB7hZP015780; Mon, 26 Nov 2018 11:07:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQB7hp4015779; Mon, 26 Nov 2018 11:07:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201811261107.wAQB7hp4015779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 26 Nov 2018 11:07:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340942 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 340942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A70886C8F6 X-Spamd-Result: default: False [0.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.62)[0.623,0]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:07:44 -0000 Author: hselasky Date: Mon Nov 26 11:07:43 2018 New Revision: 340942 URL: https://svnweb.freebsd.org/changeset/base/340942 Log: MFC r340479: Implement ktime_get_ts64() function macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Mon Nov 26 11:06:39 2018 (r340941) +++ stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Mon Nov 26 11:07:43 2018 (r340942) @@ -176,6 +176,7 @@ timeval_to_ktime(struct timeval tv) #define ktime_to_timespec64(kt) ns_to_timespec(kt) #define ktime_to_timeval(kt) ns_to_timeval(kt) #define ktime_to_ns(kt) (kt) +#define ktime_get_ts64(ts) ktime_get_ts(ts) static inline int64_t ktime_get_ns(void) From owner-svn-src-all@freebsd.org Mon Nov 26 11:08:39 2018 Return-Path: Delivered-To: svn-src-all@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 48242115521F; Mon, 26 Nov 2018 11:08:39 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDF416CA36; Mon, 26 Nov 2018 11:08:38 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE9692CDD; Mon, 26 Nov 2018 11:08:38 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQB8cX7015888; Mon, 26 Nov 2018 11:08:38 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQB8ccV015887; Mon, 26 Nov 2018 11:08:38 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261108.wAQB8ccV015887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 11:08:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340943 - stable/11/sbin/route X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sbin/route X-SVN-Commit-Revision: 340943 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DDF416CA36 X-Spamd-Result: default: False [0.88 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:08:39 -0000 Author: eugen Date: Mon Nov 26 11:08:38 2018 New Revision: 340943 URL: https://svnweb.freebsd.org/changeset/base/340943 Log: MFC r339811: route(8): correctly return exit status when "-q" flag is used. Previously, route returned 1 in case of error properly signalling failure but "route -q" returned 0 in the same case. Fix it. PR: 186333 Modified: stable/11/sbin/route/route.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/route/route.c ============================================================================== --- stable/11/sbin/route/route.c Mon Nov 26 11:07:43 2018 (r340942) +++ stable/11/sbin/route/route.c Mon Nov 26 11:08:38 2018 (r340943) @@ -1047,10 +1047,13 @@ newroute(int argc, char **argv) } printf("\n"); } + } - fibnum = 0; - TAILQ_FOREACH(fl, &fibl_head, fl_next) { - if (fl->fl_error != 0) { + fibnum = 0; + TAILQ_FOREACH(fl, &fibl_head, fl_next) { + if (fl->fl_error != 0) { + error = 1; + if (!qflag) { printf("%s %s %s", cmd, (nrflags & F_ISHOST) ? "host" : "net", dest); if (*gateway) @@ -1084,7 +1087,6 @@ newroute(int argc, char **argv) break; } printf(": %s\n", errmsg); - error = 1; } } } From owner-svn-src-all@freebsd.org Mon Nov 26 11:08:56 2018 Return-Path: Delivered-To: svn-src-all@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 4C63D115526B; Mon, 26 Nov 2018 11:08:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8C586CB58; Mon, 26 Nov 2018 11:08:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA3FF2CDF; Mon, 26 Nov 2018 11:08:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQB8te0015955; Mon, 26 Nov 2018 11:08:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQB8tf8015954; Mon, 26 Nov 2018 11:08:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201811261108.wAQB8tf8015954@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 26 Nov 2018 11:08: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: r340944 - stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 340944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E8C586CB58 X-Spamd-Result: default: False [0.88 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:08:56 -0000 Author: hselasky Date: Mon Nov 26 11:08:55 2018 New Revision: 340944 URL: https://svnweb.freebsd.org/changeset/base/340944 Log: MFC r340480: Define asm macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Nov 26 11:08:38 2018 (r340943) +++ stable/12/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Nov 26 11:08:55 2018 (r340944) @@ -138,6 +138,8 @@ #define printk(...) printf(__VA_ARGS__) #define vprintk(f, a) vprintf(f, a) +#define asm __asm + extern void linux_dump_stack(void); #define dump_stack() linux_dump_stack() From owner-svn-src-all@freebsd.org Mon Nov 26 11:09:52 2018 Return-Path: Delivered-To: svn-src-all@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 9AD8211552DD; Mon, 26 Nov 2018 11:09:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3EA066CCBF; Mon, 26 Nov 2018 11:09:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2121E2CE0; Mon, 26 Nov 2018 11:09:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQB9quq016052; Mon, 26 Nov 2018 11:09:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQB9qRu016051; Mon, 26 Nov 2018 11:09:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201811261109.wAQB9qRu016051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 26 Nov 2018 11:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340945 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 340945 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3EA066CCBF X-Spamd-Result: default: False [0.88 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:09:52 -0000 Author: hselasky Date: Mon Nov 26 11:09:51 2018 New Revision: 340945 URL: https://svnweb.freebsd.org/changeset/base/340945 Log: MFC r340480: Define asm macro in the LinuxKPI. Submitted by: Johannes Lundberg Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Nov 26 11:08:55 2018 (r340944) +++ stable/11/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Nov 26 11:09:51 2018 (r340945) @@ -138,6 +138,8 @@ #define printk(...) printf(__VA_ARGS__) #define vprintk(f, a) vprintf(f, a) +#define asm __asm + extern void linux_dump_stack(void); #define dump_stack() linux_dump_stack() From owner-svn-src-all@freebsd.org Mon Nov 26 11:11:03 2018 Return-Path: Delivered-To: svn-src-all@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 3E68E11553D2; Mon, 26 Nov 2018 11:11:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D5F0E6CEB2; Mon, 26 Nov 2018 11:11:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6CF52DF7; Mon, 26 Nov 2018 11:11:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQBB2uO016999; Mon, 26 Nov 2018 11:11:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQBB2V1016998; Mon, 26 Nov 2018 11:11:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201811261111.wAQBB2V1016998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 26 Nov 2018 11:11: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: r340946 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 340946 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D5F0E6CEB2 X-Spamd-Result: default: False [0.88 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:11:03 -0000 Author: hselasky Date: Mon Nov 26 11:11:02 2018 New Revision: 340946 URL: https://svnweb.freebsd.org/changeset/base/340946 Log: MFC r340621: Be more verbose when a sysctl fails to unregister. Print name of sysctl in question. Sponsored by: Mellanox Technologies Modified: stable/12/sys/kern/kern_sysctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_sysctl.c ============================================================================== --- stable/12/sys/kern/kern_sysctl.c Mon Nov 26 11:09:51 2018 (r340945) +++ stable/12/sys/kern/kern_sysctl.c Mon Nov 26 11:11:02 2018 (r340946) @@ -565,8 +565,10 @@ sysctl_unregister_oid(struct sysctl_oid *oidp) * being unloaded afterwards. It should not be a panic() * for normal use. */ - if (error) - printf("%s: failed to unregister sysctl\n", __func__); + if (error) { + printf("%s: failed(%d) to unregister sysctl(%s)\n", + __func__, error, oidp->oid_name); + } } /* Initialize a new context to keep track of dynamically added sysctls. */ From owner-svn-src-all@freebsd.org Mon Nov 26 11:11:54 2018 Return-Path: Delivered-To: svn-src-all@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 C60441155436; Mon, 26 Nov 2018 11:11:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6965B6D17F; Mon, 26 Nov 2018 11:11:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B9D92E3D; Mon, 26 Nov 2018 11:11:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQBBs5S017789; Mon, 26 Nov 2018 11:11:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQBBs8F017788; Mon, 26 Nov 2018 11:11:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201811261111.wAQBBs8F017788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 26 Nov 2018 11:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340947 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 340947 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6965B6D17F X-Spamd-Result: default: False [0.88 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:11:54 -0000 Author: hselasky Date: Mon Nov 26 11:11:53 2018 New Revision: 340947 URL: https://svnweb.freebsd.org/changeset/base/340947 Log: MFC r340621: Be more verbose when a sysctl fails to unregister. Print name of sysctl in question. Sponsored by: Mellanox Technologies Modified: stable/11/sys/kern/kern_sysctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sysctl.c ============================================================================== --- stable/11/sys/kern/kern_sysctl.c Mon Nov 26 11:11:02 2018 (r340946) +++ stable/11/sys/kern/kern_sysctl.c Mon Nov 26 11:11:53 2018 (r340947) @@ -479,8 +479,10 @@ sysctl_unregister_oid(struct sysctl_oid *oidp) * being unloaded afterwards. It should not be a panic() * for normal use. */ - if (error) - printf("%s: failed to unregister sysctl\n", __func__); + if (error) { + printf("%s: failed(%d) to unregister sysctl(%s)\n", + __func__, error, oidp->oid_name); + } } /* Initialize a new context to keep track of dynamically added sysctls. */ From owner-svn-src-all@freebsd.org Mon Nov 26 11:13:12 2018 Return-Path: Delivered-To: svn-src-all@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 258F611555C2; Mon, 26 Nov 2018 11:13:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C12F86D34E; Mon, 26 Nov 2018 11:13:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A39212E71; Mon, 26 Nov 2018 11:13:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQBDB3D021024; Mon, 26 Nov 2018 11:13:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQBDBiE021023; Mon, 26 Nov 2018 11:13:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201811261113.wAQBDBiE021023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 26 Nov 2018 11:13: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: r340948 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 340948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C12F86D34E X-Spamd-Result: default: False [0.88 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:13:12 -0000 Author: hselasky Date: Mon Nov 26 11:13:11 2018 New Revision: 340948 URL: https://svnweb.freebsd.org/changeset/base/340948 Log: MFC r340622: Minor code factoring. No functional change. Sponsored by: Mellanox Technologies Modified: stable/12/sys/kern/kern_sysctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_sysctl.c ============================================================================== --- stable/12/sys/kern/kern_sysctl.c Mon Nov 26 11:11:53 2018 (r340947) +++ stable/12/sys/kern/kern_sysctl.c Mon Nov 26 11:13:11 2018 (r340948) @@ -546,10 +546,10 @@ sysctl_unregister_oid(struct sysctl_oid *oidp) int error; SYSCTL_ASSERT_WLOCKED(); - error = ENOENT; if (oidp->oid_number == OID_AUTO) { error = EINVAL; } else { + error = ENOENT; SLIST_FOREACH(p, oidp->oid_parent, oid_link) { if (p == oidp) { SLIST_REMOVE(oidp->oid_parent, oidp, From owner-svn-src-all@freebsd.org Mon Nov 26 11:14:08 2018 Return-Path: Delivered-To: svn-src-all@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 E65B2115565E; Mon, 26 Nov 2018 11:14:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 83EED6D57A; Mon, 26 Nov 2018 11:14:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AABB12E74; Mon, 26 Nov 2018 11:14:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQBE6tN021257; Mon, 26 Nov 2018 11:14:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQBE68A021256; Mon, 26 Nov 2018 11:14:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201811261114.wAQBE68A021256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 26 Nov 2018 11:14:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340949 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 340949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 83EED6D57A X-Spamd-Result: default: False [0.88 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:14:08 -0000 Author: hselasky Date: Mon Nov 26 11:14:06 2018 New Revision: 340949 URL: https://svnweb.freebsd.org/changeset/base/340949 Log: MFC r340622: Minor code factoring. No functional change. Sponsored by: Mellanox Technologies Modified: stable/11/sys/kern/kern_sysctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sysctl.c ============================================================================== --- stable/11/sys/kern/kern_sysctl.c Mon Nov 26 11:13:11 2018 (r340948) +++ stable/11/sys/kern/kern_sysctl.c Mon Nov 26 11:14:06 2018 (r340949) @@ -460,10 +460,10 @@ sysctl_unregister_oid(struct sysctl_oid *oidp) int error; SYSCTL_ASSERT_WLOCKED(); - error = ENOENT; if (oidp->oid_number == OID_AUTO) { error = EINVAL; } else { + error = ENOENT; SLIST_FOREACH(p, oidp->oid_parent, oid_link) { if (p == oidp) { SLIST_REMOVE(oidp->oid_parent, oidp, From owner-svn-src-all@freebsd.org Mon Nov 26 11:16:00 2018 Return-Path: Delivered-To: svn-src-all@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 563F41155745; Mon, 26 Nov 2018 11:16:00 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECC716D749; Mon, 26 Nov 2018 11:15:59 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDA732E77; Mon, 26 Nov 2018 11:15:59 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQBFxH2021396; Mon, 26 Nov 2018 11:15:59 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQBFx7Q021395; Mon, 26 Nov 2018 11:15:59 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261115.wAQBFx7Q021395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 11:15:59 +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: r340950 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 340950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ECC716D749 X-Spamd-Result: default: False [0.88 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:16:00 -0000 Author: eugen Date: Mon Nov 26 11:15:59 2018 New Revision: 340950 URL: https://svnweb.freebsd.org/changeset/base/340950 Log: MFC r339806: Prevent stf(4) from panicing due to unprotected access to INADDR_HASH. PR: 220078 Differential Revision: https://reviews.freebsd.org/D12457 Tested-by: Cassiano Peixoto and others Modified: stable/12/sys/net/if_stf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_stf.c ============================================================================== --- stable/12/sys/net/if_stf.c Mon Nov 26 11:14:06 2018 (r340949) +++ stable/12/sys/net/if_stf.c Mon Nov 26 11:15:59 2018 (r340950) @@ -367,6 +367,7 @@ stf_encapcheck(const struct mbuf *m, int off, int prot static int stf_getsrcifa6(struct ifnet *ifp, struct in6_addr *addr, struct in6_addr *mask) { + struct rm_priotracker in_ifa_tracker; struct ifaddr *ia; struct in_ifaddr *ia4; struct in6_ifaddr *ia6; @@ -382,9 +383,11 @@ stf_getsrcifa6(struct ifnet *ifp, struct in6_addr *add continue; bcopy(GET_V4(&sin6->sin6_addr), &in, sizeof(in)); + IN_IFADDR_RLOCK(&in_ifa_tracker); LIST_FOREACH(ia4, INADDR_HASH(in.s_addr), ia_hash) if (ia4->ia_addr.sin_addr.s_addr == in.s_addr) break; + IN_IFADDR_RUNLOCK(&in_ifa_tracker); if (ia4 == NULL) continue; From owner-svn-src-all@freebsd.org Mon Nov 26 11:17:13 2018 Return-Path: Delivered-To: svn-src-all@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 75F1F11557C3; Mon, 26 Nov 2018 11:17:13 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 125CF6D8AE; Mon, 26 Nov 2018 11:17:13 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E732D2E79; Mon, 26 Nov 2018 11:17:12 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQBHClO021514; Mon, 26 Nov 2018 11:17:12 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQBHCsK021513; Mon, 26 Nov 2018 11:17:12 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261117.wAQBHCsK021513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 11:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340951 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 340951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 125CF6D8AE X-Spamd-Result: default: False [0.88 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:17:13 -0000 Author: eugen Date: Mon Nov 26 11:17:12 2018 New Revision: 340951 URL: https://svnweb.freebsd.org/changeset/base/340951 Log: MFC r339806: Prevent stf(4) from panicing due to unprotected access to INADDR_HASH. PR: 220078 Differential Revision: https://reviews.freebsd.org/D12457 Tested-by: Cassiano Peixoto and others Modified: stable/11/sys/net/if_stf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_stf.c ============================================================================== --- stable/11/sys/net/if_stf.c Mon Nov 26 11:15:59 2018 (r340950) +++ stable/11/sys/net/if_stf.c Mon Nov 26 11:17:12 2018 (r340951) @@ -372,6 +372,7 @@ stf_encapcheck(const struct mbuf *m, int off, int prot static int stf_getsrcifa6(struct ifnet *ifp, struct in6_addr *addr, struct in6_addr *mask) { + struct rm_priotracker in_ifa_tracker; struct ifaddr *ia; struct in_ifaddr *ia4; struct in6_ifaddr *ia6; @@ -387,9 +388,11 @@ stf_getsrcifa6(struct ifnet *ifp, struct in6_addr *add continue; bcopy(GET_V4(&sin6->sin6_addr), &in, sizeof(in)); + IN_IFADDR_RLOCK(&in_ifa_tracker); LIST_FOREACH(ia4, INADDR_HASH(in.s_addr), ia_hash) if (ia4->ia_addr.sin_addr.s_addr == in.s_addr) break; + IN_IFADDR_RUNLOCK(&in_ifa_tracker); if (ia4 == NULL) continue; From owner-svn-src-all@freebsd.org Mon Nov 26 11:20:26 2018 Return-Path: Delivered-To: svn-src-all@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 1A3EE115590E; Mon, 26 Nov 2018 11:20:26 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2FE26DAF6; Mon, 26 Nov 2018 11:20:25 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9451A2E81; Mon, 26 Nov 2018 11:20:25 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQBKPxW021732; Mon, 26 Nov 2018 11:20:25 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQBKPlE021731; Mon, 26 Nov 2018 11:20:25 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261120.wAQBKPlE021731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 11:20: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: r340952 - stable/12/sbin/mount_msdosfs X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sbin/mount_msdosfs X-SVN-Commit-Revision: 340952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B2FE26DAF6 X-Spamd-Result: default: False [0.88 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:20:26 -0000 Author: eugen Date: Mon Nov 26 11:20:25 2018 New Revision: 340952 URL: https://svnweb.freebsd.org/changeset/base/340952 Log: MFC r339816: mount_msdosfs mount_msdosfs: do not fail mounts requiring locale name conversion table that is already present in a kernel statically. For example, the command "mount_msdosfs -L ru_RU.KOI8-R" fails with error "mount_msdosfs: msdosfs_iconv: File exists" for a kernel having options LIBICONV and MSDOSFS_ICONV. After this change, it mounts successfully. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D16951 Modified: stable/12/sbin/mount_msdosfs/mount_msdosfs.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/mount_msdosfs/mount_msdosfs.c ============================================================================== --- stable/12/sbin/mount_msdosfs/mount_msdosfs.c Mon Nov 26 11:17:12 2018 (r340951) +++ stable/12/sbin/mount_msdosfs/mount_msdosfs.c Mon Nov 26 11:20:25 2018 (r340952) @@ -46,6 +46,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -308,17 +309,17 @@ set_charset(struct iovec **iov, int *iovlen, const cha build_iovec_argf(iov, iovlen, "cs_win", ENCODING_UNICODE); error = kiconv_add_xlat16_cspairs(ENCODING_UNICODE, cs_local); - if (error) + if (error && errno != EEXIST) return (-1); if (cs_dos != NULL) { error = kiconv_add_xlat16_cspairs(cs_dos, cs_local); - if (error) + if (error && errno != EEXIST) return (-1); } else { build_iovec_argf(iov, iovlen, "cs_dos", cs_local); error = kiconv_add_xlat16_cspair(cs_local, cs_local, KICONV_FROM_UPPER | KICONV_LOWER); - if (error) + if (error && errno != EEXIST) return (-1); } From owner-svn-src-all@freebsd.org Mon Nov 26 11:22:05 2018 Return-Path: Delivered-To: svn-src-all@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 A95E311559F2; Mon, 26 Nov 2018 11:22:05 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FB4B6DEEE; Mon, 26 Nov 2018 11:22:05 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30ADE2FE5; Mon, 26 Nov 2018 11:22:05 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQBM5Yc026283; Mon, 26 Nov 2018 11:22:05 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQBM5bA026282; Mon, 26 Nov 2018 11:22:05 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261122.wAQBM5bA026282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 11:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340953 - stable/11/sbin/mount_msdosfs X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sbin/mount_msdosfs X-SVN-Commit-Revision: 340953 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4FB4B6DEEE X-Spamd-Result: default: False [0.88 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:22:05 -0000 Author: eugen Date: Mon Nov 26 11:22:04 2018 New Revision: 340953 URL: https://svnweb.freebsd.org/changeset/base/340953 Log: MFC r339816: mount_msdosfs mount_msdosfs: do not fail mounts requiring locale name conversion table that is already present in a kernel statically. For example, the command "mount_msdosfs -L ru_RU.KOI8-R" fails with error "mount_msdosfs: msdosfs_iconv: File exists" for a kernel having options LIBICONV and MSDOSFS_ICONV. After this change, it mounts successfully. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D16951 Modified: stable/11/sbin/mount_msdosfs/mount_msdosfs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/mount_msdosfs/mount_msdosfs.c ============================================================================== --- stable/11/sbin/mount_msdosfs/mount_msdosfs.c Mon Nov 26 11:20:25 2018 (r340952) +++ stable/11/sbin/mount_msdosfs/mount_msdosfs.c Mon Nov 26 11:22:04 2018 (r340953) @@ -46,6 +46,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -308,17 +309,17 @@ set_charset(struct iovec **iov, int *iovlen, const cha build_iovec_argf(iov, iovlen, "cs_win", ENCODING_UNICODE); error = kiconv_add_xlat16_cspairs(ENCODING_UNICODE, cs_local); - if (error) + if (error && errno != EEXIST) return (-1); if (cs_dos != NULL) { error = kiconv_add_xlat16_cspairs(cs_dos, cs_local); - if (error) + if (error && errno != EEXIST) return (-1); } else { build_iovec_argf(iov, iovlen, "cs_dos", cs_local); error = kiconv_add_xlat16_cspair(cs_local, cs_local, KICONV_FROM_UPPER | KICONV_LOWER); - if (error) + if (error && errno != EEXIST) return (-1); } From owner-svn-src-all@freebsd.org Mon Nov 26 11:23:02 2018 Return-Path: Delivered-To: svn-src-all@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 6FB051155BD1; Mon, 26 Nov 2018 11:23:02 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1744C6E0BC; Mon, 26 Nov 2018 11:23:02 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EDDD1300D; Mon, 26 Nov 2018 11:23:01 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQBN1R9026370; Mon, 26 Nov 2018 11:23:01 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQBN1KK026368; Mon, 26 Nov 2018 11:23:01 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261123.wAQBN1KK026368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 11:23:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r340954 - stable/10/sbin/mount_msdosfs X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/sbin/mount_msdosfs X-SVN-Commit-Revision: 340954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1744C6E0BC X-Spamd-Result: default: False [0.88 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; NEURAL_HAM_SHORT(-0.29)[-0.294,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:23:02 -0000 Author: eugen Date: Mon Nov 26 11:23:01 2018 New Revision: 340954 URL: https://svnweb.freebsd.org/changeset/base/340954 Log: MFC r339816: mount_msdosfs mount_msdosfs: do not fail mounts requiring locale name conversion table that is already present in a kernel statically. For example, the command "mount_msdosfs -L ru_RU.KOI8-R" fails with error "mount_msdosfs: msdosfs_iconv: File exists" for a kernel having options LIBICONV and MSDOSFS_ICONV. After this change, it mounts successfully. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D16951 Modified: stable/10/sbin/mount_msdosfs/mount_msdosfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_msdosfs/mount_msdosfs.c ============================================================================== --- stable/10/sbin/mount_msdosfs/mount_msdosfs.c Mon Nov 26 11:22:04 2018 (r340953) +++ stable/10/sbin/mount_msdosfs/mount_msdosfs.c Mon Nov 26 11:23:01 2018 (r340954) @@ -44,6 +44,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -306,17 +307,17 @@ set_charset(struct iovec **iov, int *iovlen, const cha build_iovec_argf(iov, iovlen, "cs_win", ENCODING_UNICODE); error = kiconv_add_xlat16_cspairs(ENCODING_UNICODE, cs_local); - if (error) + if (error && errno != EEXIST) return (-1); if (cs_dos != NULL) { error = kiconv_add_xlat16_cspairs(cs_dos, cs_local); - if (error) + if (error && errno != EEXIST) return (-1); } else { build_iovec_argf(iov, iovlen, "cs_dos", cs_local); error = kiconv_add_xlat16_cspair(cs_local, cs_local, KICONV_FROM_UPPER | KICONV_LOWER); - if (error) + if (error && errno != EEXIST) return (-1); } From owner-svn-src-all@freebsd.org Mon Nov 26 11:28:36 2018 Return-Path: Delivered-To: svn-src-all@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 CA7EA1155D2F; Mon, 26 Nov 2018 11:28:35 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C6716E4BC; Mon, 26 Nov 2018 11:28:35 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48A6C3012; Mon, 26 Nov 2018 11:28:35 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQBSZAH026637; Mon, 26 Nov 2018 11:28:35 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQBSZRP026636; Mon, 26 Nov 2018 11:28:35 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261128.wAQBSZRP026636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 11:28: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: r340955 - stable/12/sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw X-SVN-Commit-Revision: 340955 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6C6716E4BC X-Spamd-Result: default: False [1.19 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.05)[-0.053,0]; NEURAL_SPAM_LONG(0.63)[0.630,0]; NEURAL_SPAM_MEDIUM(0.61)[0.608,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:28:36 -0000 Author: eugen Date: Mon Nov 26 11:28:34 2018 New Revision: 340955 URL: https://svnweb.freebsd.org/changeset/base/340955 Log: MFC r339810: ipfw: implement ngtee/netgraph actions for layer-2 frames. Kernel part of ipfw does not support and ignores rules other than "pass", "deny" and dummynet-related for layer-2 (ethernet frames). Others are processed as "pass". Make it support ngtee/netgraph rules just like they are supported for IP packets. For example, this allows us to mirror some frames selectively to another interface for delivery to remote network analyzer over RSPAN vlan. Assuming ng_ipfw(4) netgraph node has a hook named "900" attached to "lower" hook of vlan900's ng_ether(4) node, that would be as simple as: ipfw add ngtee 900 ip from any to 8.8.8.8 layer2 out xmit igb0 PR: 213452 Tested-by: Fyodor Ustinov Modified: stable/12/sys/netpfil/ipfw/ip_fw_pfil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw_pfil.c Mon Nov 26 11:23:01 2018 (r340954) +++ stable/12/sys/netpfil/ipfw/ip_fw_pfil.c Mon Nov 26 11:28:34 2018 (r340955) @@ -317,11 +317,12 @@ ipfw_check_frame(void *arg, struct mbuf **m0, struct i struct ip_fw_args args; struct m_tag *mtag; + bzero(&args, sizeof(args)); + +again: /* fetch start point from rule, if any. remove the tag if present. */ mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL); - if (mtag == NULL) { - args.rule.slot = 0; - } else { + if (mtag != NULL) { args.rule = *((struct ipfw_rule_ref *)(mtag+1)); m_tag_delete(*m0, mtag); if (args.rule.info & IPFW_ONEPASS) @@ -378,14 +379,27 @@ ipfw_check_frame(void *arg, struct mbuf **m0, struct i case IP_FW_DUMMYNET: ret = EACCES; + int dir2; if (ip_dn_io_ptr == NULL) break; /* i.e. drop */ *m0 = NULL; - dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; - ip_dn_io_ptr(&m, dir | PROTO_LAYER2, &args); + dir2 = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; + ip_dn_io_ptr(&m, dir2 | PROTO_LAYER2, &args); return 0; + + case IP_FW_NGTEE: + case IP_FW_NETGRAPH: + if (ng_ipfw_input_p == NULL) { + ret = EACCES; + break; /* i.e. drop */ + } + ret = ng_ipfw_input_p(m0, (dir == PFIL_IN) ? DIR_IN : DIR_OUT, + &args, (i == IP_FW_NGTEE) ? 1 : 0); + if (i == IP_FW_NGTEE) /* ignore errors for NGTEE */ + goto again; /* continue with packet */ + break; default: KASSERT(0, ("%s: unknown retval", __func__)); From owner-svn-src-all@freebsd.org Mon Nov 26 11:32:23 2018 Return-Path: Delivered-To: svn-src-all@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 71F64115627D; Mon, 26 Nov 2018 11:32:23 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1EAA6EA77; Mon, 26 Nov 2018 11:32:22 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA5D731A6; Mon, 26 Nov 2018 11:32:22 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQBWM0L030036; Mon, 26 Nov 2018 11:32:22 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQBWMYG030035; Mon, 26 Nov 2018 11:32:22 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261132.wAQBWMYG030035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 11:32:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340956 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw X-SVN-Commit-Revision: 340956 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F1EAA6EA77 X-Spamd-Result: default: False [1.19 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.05)[-0.053,0]; NEURAL_SPAM_LONG(0.63)[0.630,0]; NEURAL_SPAM_MEDIUM(0.61)[0.608,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:32:23 -0000 Author: eugen Date: Mon Nov 26 11:32:22 2018 New Revision: 340956 URL: https://svnweb.freebsd.org/changeset/base/340956 Log: MFC r339810: ipfw: implement ngtee/netgraph actions for layer-2 frames. Kernel part of ipfw does not support and ignores rules other than "pass", "deny" and dummynet-related for layer-2 (ethernet frames). Others are processed as "pass". Make it support ngtee/netgraph rules just like they are supported for IP packets. For example, this allows us to mirror some frames selectively to another interface for delivery to remote network analyzer over RSPAN vlan. Assuming ng_ipfw(4) netgraph node has a hook named "900" attached to "lower" hook of vlan900's ng_ether(4) node, that would be as simple as: ipfw add ngtee 900 ip from any to 8.8.8.8 layer2 out xmit igb0 PR: 213452 Tested-by: Fyodor Ustinov Modified: stable/11/sys/netpfil/ipfw/ip_fw_pfil.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw_pfil.c Mon Nov 26 11:28:34 2018 (r340955) +++ stable/11/sys/netpfil/ipfw/ip_fw_pfil.c Mon Nov 26 11:32:22 2018 (r340956) @@ -315,11 +315,12 @@ ipfw_check_frame(void *arg, struct mbuf **m0, struct i struct ip_fw_args args; struct m_tag *mtag; + bzero(&args, sizeof(args)); + +again: /* fetch start point from rule, if any. remove the tag if present. */ mtag = m_tag_locate(*m0, MTAG_IPFW_RULE, 0, NULL); - if (mtag == NULL) { - args.rule.slot = 0; - } else { + if (mtag != NULL) { args.rule = *((struct ipfw_rule_ref *)(mtag+1)); m_tag_delete(*m0, mtag); if (args.rule.info & IPFW_ONEPASS) @@ -376,14 +377,27 @@ ipfw_check_frame(void *arg, struct mbuf **m0, struct i case IP_FW_DUMMYNET: ret = EACCES; + int dir2; if (ip_dn_io_ptr == NULL) break; /* i.e. drop */ *m0 = NULL; - dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; - ip_dn_io_ptr(&m, dir | PROTO_LAYER2, &args); + dir2 = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; + ip_dn_io_ptr(&m, dir2 | PROTO_LAYER2, &args); return 0; + + case IP_FW_NGTEE: + case IP_FW_NETGRAPH: + if (ng_ipfw_input_p == NULL) { + ret = EACCES; + break; /* i.e. drop */ + } + ret = ng_ipfw_input_p(m0, (dir == PFIL_IN) ? DIR_IN : DIR_OUT, + &args, (i == IP_FW_NGTEE) ? 1 : 0); + if (i == IP_FW_NGTEE) /* ignore errors for NGTEE */ + goto again; /* continue with packet */ + break; default: KASSERT(0, ("%s: unknown retval", __func__)); From owner-svn-src-all@freebsd.org Mon Nov 26 11:51:45 2018 Return-Path: Delivered-To: svn-src-all@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 71C2D115678A; Mon, 26 Nov 2018 11:51:45 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16AAF6F43B; Mon, 26 Nov 2018 11:51:45 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBD733407; Mon, 26 Nov 2018 11:51:44 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQBpi0A041073; Mon, 26 Nov 2018 11:51:44 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQBpi3v041072; Mon, 26 Nov 2018 11:51:44 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261151.wAQBpi3v041072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 11:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r340957 - stable/10/sys/netinet X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/sys/netinet X-SVN-Commit-Revision: 340957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 16AAF6F43B X-Spamd-Result: default: False [1.11 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.07)[-0.068,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 11:51:45 -0000 Author: eugen Date: Mon Nov 26 11:51:44 2018 New Revision: 340957 URL: https://svnweb.freebsd.org/changeset/base/340957 Log: Prevent multicast code from panicing due to unprotected access to INADDR_HASH. This is direct commit to stable/10 instead of MFC r339807 due to significant difference in code base. PR: 220078 Tested-by: Cassiano Peixoto and others Modified: stable/10/sys/netinet/in_mcast.c Modified: stable/10/sys/netinet/in_mcast.c ============================================================================== --- stable/10/sys/netinet/in_mcast.c Mon Nov 26 11:32:22 2018 (r340956) +++ stable/10/sys/netinet/in_mcast.c Mon Nov 26 11:51:44 2018 (r340957) @@ -1339,9 +1339,11 @@ inp_block_unblock_source(struct inpcb *inp, struct soc ssa->sin.sin_len = sizeof(struct sockaddr_in); ssa->sin.sin_addr = mreqs.imr_sourceaddr; - if (!in_nullhost(mreqs.imr_interface)) + if (!in_nullhost(mreqs.imr_interface)) { + IN_IFADDR_RLOCK(); INADDR_TO_IFP(mreqs.imr_interface, ifp); - + IN_IFADDR_RUNLOCK(); + } if (sopt->sopt_name == IP_BLOCK_SOURCE) doblock = 1; @@ -1836,7 +1838,6 @@ inp_getmoptions(struct inpcb *inp, struct sockopt *sop * * Returns NULL if no ifp could be found. * - * SMPng: TODO: Acquire the appropriate locks for INADDR_TO_IFP. * FUTURE: Implement IPv4 source-address selection. */ static struct ifnet * @@ -1851,7 +1852,9 @@ inp_lookup_mcast_ifp(const struct inpcb *inp, ifp = NULL; if (!in_nullhost(ina)) { + IN_IFADDR_RLOCK(); INADDR_TO_IFP(ina, ifp); + IN_IFADDR_RUNLOCK(); } else { struct route ro; @@ -2247,9 +2250,11 @@ inp_leave_group(struct inpcb *inp, struct sockopt *sop * XXX NOTE WELL: The RFC 3678 API is preferred because * using an IPv4 address as a key is racy. */ - if (!in_nullhost(mreqs.imr_interface)) + if (!in_nullhost(mreqs.imr_interface)) { + IN_IFADDR_RLOCK(); INADDR_TO_IFP(mreqs.imr_interface, ifp); - + IN_IFADDR_RUNLOCK(); + } CTR3(KTR_IGMPV3, "%s: imr_interface = %s, ifp = %p", __func__, inet_ntoa(mreqs.imr_interface), ifp); @@ -2447,7 +2452,9 @@ inp_set_multicast_if(struct inpcb *inp, struct sockopt if (in_nullhost(addr)) { ifp = NULL; } else { + IN_IFADDR_RLOCK(); INADDR_TO_IFP(addr, ifp); + IN_IFADDR_RUNLOCK(); if (ifp == NULL) return (EADDRNOTAVAIL); } From owner-svn-src-all@freebsd.org Mon Nov 26 12:19:32 2018 Return-Path: Delivered-To: svn-src-all@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 EC140110403F; Mon, 26 Nov 2018 12:19:31 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F14A707C3; Mon, 26 Nov 2018 12:19:31 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 702673CA2; Mon, 26 Nov 2018 12:19:31 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQCJVkj052702; Mon, 26 Nov 2018 12:19:31 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQCJVQt052701; Mon, 26 Nov 2018 12:19:31 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261219.wAQCJVQt052701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 12:19:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r340958 - stable/10/sys/net X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/sys/net X-SVN-Commit-Revision: 340958 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8F14A707C3 X-Spamd-Result: default: False [1.22 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_SHORT(0.04)[0.044,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 12:19:32 -0000 Author: eugen Date: Mon Nov 26 12:19:30 2018 New Revision: 340958 URL: https://svnweb.freebsd.org/changeset/base/340958 Log: Prevent stf(4) from panicing due to unprotected access to INADDR_HASH. This is direct commit to stable/10 instead of MFC r339806 due to significant differences in code base. PR: 220078 Differential Revision: https://reviews.freebsd.org/D12457 Tested-by: Cassiano Peixoto and others Modified: stable/10/sys/net/if_stf.c Modified: stable/10/sys/net/if_stf.c ============================================================================== --- stable/10/sys/net/if_stf.c Mon Nov 26 11:51:44 2018 (r340957) +++ stable/10/sys/net/if_stf.c Mon Nov 26 12:19:30 2018 (r340958) @@ -384,7 +384,6 @@ stf_getsrcifa6(ifp) struct ifnet *ifp; { struct ifaddr *ia; - struct in_ifaddr *ia4; struct sockaddr_in6 *sin6; struct in_addr in; @@ -397,10 +396,7 @@ stf_getsrcifa6(ifp) continue; bcopy(GET_V4(&sin6->sin6_addr), &in, sizeof(in)); - LIST_FOREACH(ia4, INADDR_HASH(in.s_addr), ia_hash) - if (ia4->ia_addr.sin_addr.s_addr == in.s_addr) - break; - if (ia4 == NULL) + if (!in_localip(in)) continue; ifa_ref(ia); From owner-svn-src-all@freebsd.org Mon Nov 26 12:39:58 2018 Return-Path: Delivered-To: svn-src-all@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 21A5B1104983; Mon, 26 Nov 2018 12:39:58 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCCDD712B8; Mon, 26 Nov 2018 12:39:57 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EC6B4032; Mon, 26 Nov 2018 12:39:57 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQCdvnb062639; Mon, 26 Nov 2018 12:39:57 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQCdvoE062638; Mon, 26 Nov 2018 12:39:57 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261239.wAQCdvoE062638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 12:39: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: r340959 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 340959 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BCCDD712B8 X-Spamd-Result: default: False [1.22 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.04)[0.044,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 12:39:58 -0000 Author: eugen Date: Mon Nov 26 12:39:57 2018 New Revision: 340959 URL: https://svnweb.freebsd.org/changeset/base/340959 Log: MFC r339808: Prevent ip_input() from panicing due to unprotected access to INADDR_HASH. PR: 220078 Differential Revision: https://reviews.freebsd.org/D12457 Tested-by: Cassiano Peixoto and others Modified: stable/12/sys/netinet/ip_input.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/ip_input.c ============================================================================== --- stable/12/sys/netinet/ip_input.c Mon Nov 26 12:19:30 2018 (r340958) +++ stable/12/sys/netinet/ip_input.c Mon Nov 26 12:39:57 2018 (r340959) @@ -448,6 +448,7 @@ ip_direct_input(struct mbuf *m) void ip_input(struct mbuf *m) { + struct rm_priotracker in_ifa_tracker; struct ip *ip = NULL; struct in_ifaddr *ia = NULL; struct ifaddr *ifa; @@ -681,7 +682,7 @@ passin: /* * Check for exact addresses in the hash bucket. */ - /* IN_IFADDR_RLOCK(); */ + IN_IFADDR_RLOCK(&in_ifa_tracker); LIST_FOREACH(ia, INADDR_HASH(ip->ip_dst.s_addr), ia_hash) { /* * If the address matches, verify that the packet @@ -693,11 +694,11 @@ passin: counter_u64_add(ia->ia_ifa.ifa_ipackets, 1); counter_u64_add(ia->ia_ifa.ifa_ibytes, m->m_pkthdr.len); - /* IN_IFADDR_RUNLOCK(); */ + IN_IFADDR_RUNLOCK(&in_ifa_tracker); goto ours; } } - /* IN_IFADDR_RUNLOCK(); */ + IN_IFADDR_RUNLOCK(&in_ifa_tracker); /* * Check for broadcast addresses. From owner-svn-src-all@freebsd.org Mon Nov 26 12:41:50 2018 Return-Path: Delivered-To: svn-src-all@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 AFB201104E73; Mon, 26 Nov 2018 12:41:50 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F1EF717BE; Mon, 26 Nov 2018 12:41:50 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3101E4191; Mon, 26 Nov 2018 12:41:50 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQCfocg067541; Mon, 26 Nov 2018 12:41:50 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQCfoZD067540; Mon, 26 Nov 2018 12:41:50 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261241.wAQCfoZD067540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 12:41:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340960 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 340960 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4F1EF717BE X-Spamd-Result: default: False [1.49 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.32)[0.320,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 12:41:50 -0000 Author: eugen Date: Mon Nov 26 12:41:49 2018 New Revision: 340960 URL: https://svnweb.freebsd.org/changeset/base/340960 Log: MFC r339808: Prevent ip_input() from panicing due to unprotected access to INADDR_HASH. PR: 220078 Differential Revision: https://reviews.freebsd.org/D12457 Tested-by: Cassiano Peixoto and others Modified: stable/11/sys/netinet/ip_input.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/ip_input.c ============================================================================== --- stable/11/sys/netinet/ip_input.c Mon Nov 26 12:39:57 2018 (r340959) +++ stable/11/sys/netinet/ip_input.c Mon Nov 26 12:41:49 2018 (r340960) @@ -446,6 +446,7 @@ ip_direct_input(struct mbuf *m) void ip_input(struct mbuf *m) { + struct rm_priotracker in_ifa_tracker; struct ip *ip = NULL; struct in_ifaddr *ia = NULL; struct ifaddr *ifa; @@ -679,7 +680,7 @@ passin: /* * Check for exact addresses in the hash bucket. */ - /* IN_IFADDR_RLOCK(); */ + IN_IFADDR_RLOCK(&in_ifa_tracker); LIST_FOREACH(ia, INADDR_HASH(ip->ip_dst.s_addr), ia_hash) { /* * If the address matches, verify that the packet @@ -691,11 +692,11 @@ passin: counter_u64_add(ia->ia_ifa.ifa_ipackets, 1); counter_u64_add(ia->ia_ifa.ifa_ibytes, m->m_pkthdr.len); - /* IN_IFADDR_RUNLOCK(); */ + IN_IFADDR_RUNLOCK(&in_ifa_tracker); goto ours; } } - /* IN_IFADDR_RUNLOCK(); */ + IN_IFADDR_RUNLOCK(&in_ifa_tracker); /* * Check for broadcast addresses. From owner-svn-src-all@freebsd.org Mon Nov 26 12:47:13 2018 Return-Path: Delivered-To: svn-src-all@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 BEEA2113328D; Mon, 26 Nov 2018 12:47:13 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C06F71B39; Mon, 26 Nov 2018 12:47:13 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 387CE41D9; Mon, 26 Nov 2018 12:47:13 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQClDbP067827; Mon, 26 Nov 2018 12:47:13 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQClD7h067826; Mon, 26 Nov 2018 12:47:13 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261247.wAQClD7h067826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 12:47:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r340961 - stable/10/sys/netinet X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/sys/netinet X-SVN-Commit-Revision: 340961 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5C06F71B39 X-Spamd-Result: default: False [1.49 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.32)[0.320,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 12:47:13 -0000 Author: eugen Date: Mon Nov 26 12:47:12 2018 New Revision: 340961 URL: https://svnweb.freebsd.org/changeset/base/340961 Log: Prevent ip_input() from panicing due to unprotected access to INADDR_HASH. This is direct commit to stable/10 instead of MFC r339808 due to significant differences in code base. PR: 220078 Differential Revision: https://reviews.freebsd.org/D12457 Tested-by: Cassiano Peixoto and others Modified: stable/10/sys/netinet/ip_input.c Modified: stable/10/sys/netinet/ip_input.c ============================================================================== --- stable/10/sys/netinet/ip_input.c Mon Nov 26 12:41:49 2018 (r340960) +++ stable/10/sys/netinet/ip_input.c Mon Nov 26 12:47:12 2018 (r340961) @@ -564,7 +564,7 @@ passin: /* * Check for exact addresses in the hash bucket. */ - /* IN_IFADDR_RLOCK(); */ + IN_IFADDR_RLOCK(); LIST_FOREACH(ia, INADDR_HASH(ip->ip_dst.s_addr), ia_hash) { /* * If the address matches, verify that the packet @@ -574,11 +574,11 @@ passin: if (IA_SIN(ia)->sin_addr.s_addr == ip->ip_dst.s_addr && (!checkif || ia->ia_ifp == ifp)) { ifa_ref(&ia->ia_ifa); - /* IN_IFADDR_RUNLOCK(); */ + IN_IFADDR_RUNLOCK(); goto ours; } } - /* IN_IFADDR_RUNLOCK(); */ + IN_IFADDR_RUNLOCK(); /* * Check for broadcast addresses. From owner-svn-src-all@freebsd.org Mon Nov 26 13:01:52 2018 Return-Path: Delivered-To: svn-src-all@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 CB2491133B41; Mon, 26 Nov 2018 13:01:52 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B5C672696; Mon, 26 Nov 2018 13:01:52 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C8C943EA; Mon, 26 Nov 2018 13:01:52 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQD1q2x074268; Mon, 26 Nov 2018 13:01:52 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQD1qWU074259; Mon, 26 Nov 2018 13:01:52 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261301.wAQD1qWU074259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 13:01:52 +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: r340962 - stable/12/libexec/makewhatis.local X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/libexec/makewhatis.local X-SVN-Commit-Revision: 340962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6B5C672696 X-Spamd-Result: default: False [1.49 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.61)[0.611,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_SPAM_SHORT(0.32)[0.320,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 13:01:53 -0000 Author: eugen Date: Mon Nov 26 13:01:51 2018 New Revision: 340962 URL: https://svnweb.freebsd.org/changeset/base/340962 Log: MFC r339817: makewhatis: do not try to operate on read-only mounted directories just to fail later. Modified: stable/12/libexec/makewhatis.local/makewhatis.local.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/makewhatis.local/makewhatis.local.sh ============================================================================== --- stable/12/libexec/makewhatis.local/makewhatis.local.sh Mon Nov 26 12:47:12 2018 (r340961) +++ stable/12/libexec/makewhatis.local/makewhatis.local.sh Mon Nov 26 13:01:51 2018 (r340962) @@ -47,10 +47,10 @@ done dirs=`echo $dirs | sed 's/:/ /g'` case X"$dirs" in X) echo "usage: $0 [options] directories ..."; exit 1;; esac -localdirs=`find -H $dirs -fstype local -type d -prune -print` +localdirs=`find -H $dirs -fstype local \! -fstype rdonly -type d -prune -print` case X"$localdirs" in - X) echo "$0: no local-mounted manual directories found: $dirs" + X) echo "$0: no local rw-mounted manual directories found: $dirs" exit 1;; *) exec `basename $0 .local` $opt $localdirs;; esac From owner-svn-src-all@freebsd.org Mon Nov 26 13:03:35 2018 Return-Path: Delivered-To: svn-src-all@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 36AF81133DC9; Mon, 26 Nov 2018 13:03:35 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0BE6729A1; Mon, 26 Nov 2018 13:03:34 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CF714529; Mon, 26 Nov 2018 13:03:34 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQD3Y02078184; Mon, 26 Nov 2018 13:03:34 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQD3YRp078183; Mon, 26 Nov 2018 13:03:34 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261303.wAQD3YRp078183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 13:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r340963 - stable/11/libexec/makewhatis.local X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/libexec/makewhatis.local X-SVN-Commit-Revision: 340963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D0BE6729A1 X-Spamd-Result: default: False [1.49 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.32)[0.320,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; NEURAL_SPAM_LONG(0.61)[0.611,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 13:03:35 -0000 Author: eugen Date: Mon Nov 26 13:03:34 2018 New Revision: 340963 URL: https://svnweb.freebsd.org/changeset/base/340963 Log: MFC r339817: makewhatis: do not try to operate on read-only mounted directories just to fail later. Modified: stable/11/libexec/makewhatis.local/makewhatis.local.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/makewhatis.local/makewhatis.local.sh ============================================================================== --- stable/11/libexec/makewhatis.local/makewhatis.local.sh Mon Nov 26 13:01:51 2018 (r340962) +++ stable/11/libexec/makewhatis.local/makewhatis.local.sh Mon Nov 26 13:03:34 2018 (r340963) @@ -49,10 +49,10 @@ done dirs=`echo $dirs | sed 's/:/ /g'` case X"$dirs" in X) echo "usage: $0 [options] directories ..."; exit 1;; esac -localdirs=`find -H $dirs -fstype local -type d -prune -print` +localdirs=`find -H $dirs -fstype local \! -fstype rdonly -type d -prune -print` case X"$localdirs" in - X) echo "$0: no local-mounted manual directories found: $dirs" + X) echo "$0: no local rw-mounted manual directories found: $dirs" exit 1;; *) exec `basename $0 .local` $opt $localdirs;; esac From owner-svn-src-all@freebsd.org Mon Nov 26 13:08:35 2018 Return-Path: Delivered-To: svn-src-all@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 BF5411133EE7; Mon, 26 Nov 2018 13:08:35 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5957E72BF2; Mon, 26 Nov 2018 13:08:35 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A5244537; Mon, 26 Nov 2018 13:08:35 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQD8ZG9078440; Mon, 26 Nov 2018 13:08:35 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQD8Zxn078439; Mon, 26 Nov 2018 13:08:35 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261308.wAQD8Zxn078439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 13:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r340964 - stable/10/usr.bin/makewhatis X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/usr.bin/makewhatis X-SVN-Commit-Revision: 340964 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5957E72BF2 X-Spamd-Result: default: False [1.49 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.32)[0.320,0]; NEURAL_SPAM_MEDIUM(0.56)[0.562,0]; NEURAL_SPAM_LONG(0.61)[0.611,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 13:08:35 -0000 Author: eugen Date: Mon Nov 26 13:08:34 2018 New Revision: 340964 URL: https://svnweb.freebsd.org/changeset/base/340964 Log: makewhatis: do not try to operate on read-only mounted directories just to fail later. This is direct commit to stable/10 instead of MFC r339817 due to makewhatis.local being moved in recent branches. Modified: stable/10/usr.bin/makewhatis/makewhatis.local.sh Modified: stable/10/usr.bin/makewhatis/makewhatis.local.sh ============================================================================== --- stable/10/usr.bin/makewhatis/makewhatis.local.sh Mon Nov 26 13:03:34 2018 (r340963) +++ stable/10/usr.bin/makewhatis/makewhatis.local.sh Mon Nov 26 13:08:34 2018 (r340964) @@ -49,10 +49,10 @@ done dirs=`echo $dirs | sed 's/:/ /g'` case X"$dirs" in X) echo "usage: $0 [options] directories ..."; exit 1;; esac -localdirs=`find -H $dirs -fstype local -type d -prune -print` +localdirs=`find -H $dirs -fstype local \! -fstype rdonly -type d -prune -print` case X"$localdirs" in - X) echo "$0: no local-mounted manual directories found: $dirs" + X) echo "$0: no local rw-mounted manual directories found: $dirs" exit 1;; *) exec `basename $0 .local` $opt $localdirs;; esac From owner-svn-src-all@freebsd.org Mon Nov 26 13:23:13 2018 Return-Path: Delivered-To: svn-src-all@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 0637011355A0; Mon, 26 Nov 2018 13:23:13 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B076D73487; Mon, 26 Nov 2018 13:23:11 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 775F5485E; Mon, 26 Nov 2018 13:23:11 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wAQDNBhc088526; Mon, 26 Nov 2018 13:23:11 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wAQDNAvW088523; Mon, 26 Nov 2018 13:23:10 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201811261323.wAQDNAvW088523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 26 Nov 2018 13:23:10 +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: r340965 - in stable/12: libexec/rc sbin/rcorder share/man/man8 usr.sbin/acpi/acpiconf X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in stable/12: libexec/rc sbin/rcorder share/man/man8 usr.sbin/acpi/acpiconf X-SVN-Commit-Revision: 340965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B076D73487 X-Spamd-Result: default: False [1.45 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.22)[0.215,0]; NEURAL_SPAM_MEDIUM(0.61)[0.608,0]; NEURAL_SPAM_LONG(0.63)[0.630,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 13:23:13 -0000 Author: eugen Date: Mon Nov 26 13:23:10 2018 New Revision: 340965 URL: https://svnweb.freebsd.org/changeset/base/340965 Log: MFC r339818: rcorder(8) Add support for /etc/rc.resume, so it calls "rcorder -k resume" and runs scripts containing "KEYWORD: resume" with single "resume" argument. Working example is the port sysutils/cpupdate that defines extra_commands="resume" to reload CPU microcode cleared by suspend/resume sequence. This change does nothing for a system having no scripts with KEYWORD: resume. PR: 227866 Differential Revision: https://reviews.freebsd.org/D15247 Modified: stable/12/libexec/rc/rc.resume stable/12/sbin/rcorder/rcorder.8 stable/12/share/man/man8/rc.8 stable/12/usr.sbin/acpi/acpiconf/acpiconf.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/rc.resume ============================================================================== --- stable/12/libexec/rc/rc.resume Mon Nov 26 13:08:34 2018 (r340964) +++ stable/12/libexec/rc/rc.resume Mon Nov 26 13:23:10 2018 (r340965) @@ -