From owner-svn-src-stable@freebsd.org Sun Jun 24 13:26:32 2018 Return-Path: Delivered-To: svn-src-stable@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 8DDF41000018; Sun, 24 Jun 2018 13:26:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 34AE789FBD; Sun, 24 Jun 2018 13:26:32 +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 12DC41F4D0; Sun, 24 Jun 2018 13:26:32 +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 w5ODQVZd038021; Sun, 24 Jun 2018 13:26:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5ODQVAg038020; Sun, 24 Jun 2018 13:26:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806241326.w5ODQVAg038020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 24 Jun 2018 13:26: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: r335603 - stable/11/lib/libc/stdlib X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/lib/libc/stdlib X-SVN-Commit-Revision: 335603 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2018 13:26:32 -0000 Author: kib Date: Sun Jun 24 13:26:31 2018 New Revision: 335603 URL: https://svnweb.freebsd.org/changeset/base/335603 Log: MFC r334928: libc qsort(3): stop aliasing. PR: 228780 Modified: stable/11/lib/libc/stdlib/qsort.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/stdlib/qsort.c ============================================================================== --- stable/11/lib/libc/stdlib/qsort.c Sun Jun 24 13:23:27 2018 (r335602) +++ stable/11/lib/libc/stdlib/qsort.c Sun Jun 24 13:26:31 2018 (r335603) @@ -41,53 +41,27 @@ typedef int cmp_t(void *, const void *, const void * typedef int cmp_t(const void *, const void *); #endif static inline char *med3(char *, char *, char *, cmp_t *, void *); -static inline void swapfunc(char *, char *, size_t, int, int); #define MIN(a, b) ((a) < (b) ? a : b) /* * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". */ -#define swapcode(TYPE, parmi, parmj, n) { \ - size_t i = (n) / sizeof (TYPE); \ - TYPE *pi = (TYPE *) (parmi); \ - TYPE *pj = (TYPE *) (parmj); \ - do { \ - TYPE t = *pi; \ - *pi++ = *pj; \ - *pj++ = t; \ - } while (--i > 0); \ -} -#define SWAPINIT(TYPE, a, es) swaptype_ ## TYPE = \ - ((char *)a - (char *)0) % sizeof(TYPE) || \ - es % sizeof(TYPE) ? 2 : es == sizeof(TYPE) ? 0 : 1; - static inline void -swapfunc(char *a, char *b, size_t n, int swaptype_long, int swaptype_int) +swapfunc(char *a, char *b, size_t es) { - if (swaptype_long <= 1) - swapcode(long, a, b, n) - else if (swaptype_int <= 1) - swapcode(int, a, b, n) - else - swapcode(char, a, b, n) + char t; + + do { + t = *a; + *a++ = *b; + *b++ = t; + } while (--es > 0); } -#define swap(a, b) \ - if (swaptype_long == 0) { \ - long t = *(long *)(a); \ - *(long *)(a) = *(long *)(b); \ - *(long *)(b) = t; \ - } else if (swaptype_int == 0) { \ - int t = *(int *)(a); \ - *(int *)(a) = *(int *)(b); \ - *(int *)(b) = t; \ - } else \ - swapfunc(a, b, es, swaptype_long, swaptype_int) - #define vecswap(a, b, n) \ - if ((n) > 0) swapfunc(a, b, n, swaptype_long, swaptype_int) + if ((n) > 0) swapfunc(a, b, n) #ifdef I_AM_QSORT_R #define CMP(t, x, y) (cmp((t), (x), (y))) @@ -119,17 +93,16 @@ qsort(void *a, size_t n, size_t es, cmp_t *cmp) char *pa, *pb, *pc, *pd, *pl, *pm, *pn; size_t d1, d2; int cmp_result; - int swaptype_long, swaptype_int, swap_cnt; + int swap_cnt; -loop: SWAPINIT(long, a, es); - SWAPINIT(int, a, es); +loop: swap_cnt = 0; if (n < 7) { for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) - swap(pl, pl - es); + swapfunc(pl, pl - es, es); return; } pm = (char *)a + (n / 2) * es; @@ -145,7 +118,7 @@ loop: SWAPINIT(long, a, es); } pm = med3(pl, pm, pn, cmp, thunk); } - swap(a, pm); + swapfunc(a, pm, es); pa = pb = (char *)a + es; pc = pd = (char *)a + (n - 1) * es; @@ -153,7 +126,7 @@ loop: SWAPINIT(long, a, es); while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) { if (cmp_result == 0) { swap_cnt = 1; - swap(pa, pb); + swapfunc(pa, pb, es); pa += es; } pb += es; @@ -161,14 +134,14 @@ loop: SWAPINIT(long, a, es); while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) { if (cmp_result == 0) { swap_cnt = 1; - swap(pc, pd); + swapfunc(pc, pd, es); pd -= es; } pc -= es; } if (pb > pc) break; - swap(pb, pc); + swapfunc(pb, pc, es); swap_cnt = 1; pb += es; pc -= es; @@ -178,7 +151,7 @@ loop: SWAPINIT(long, a, es); for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) - swap(pl, pl - es); + swapfunc(pl, pl - es, es); return; } From owner-svn-src-stable@freebsd.org Mon Jun 25 07:25:42 2018 Return-Path: Delivered-To: svn-src-stable@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 562D1102894B; Mon, 25 Jun 2018 07:25:42 +0000 (UTC) (envelope-from slavash@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 F34C38F2C3; Mon, 25 Jun 2018 07:25:41 +0000 (UTC) (envelope-from slavash@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 C93BC2A1D5; Mon, 25 Jun 2018 07:25:41 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P7PfMf000334; Mon, 25 Jun 2018 07:25:41 GMT (envelope-from slavash@FreeBSD.org) Received: (from slavash@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P7Pfor000333; Mon, 25 Jun 2018 07:25:41 GMT (envelope-from slavash@FreeBSD.org) Message-Id: <201806250725.w5P7Pfor000333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slavash set sender to slavash@FreeBSD.org using -f From: Slava Shwartsman Date: Mon, 25 Jun 2018 07:25:41 +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: r335614 - stable/11/contrib/ofed/librdmacm/examples X-SVN-Group: stable-11 X-SVN-Commit-Author: slavash X-SVN-Commit-Paths: stable/11/contrib/ofed/librdmacm/examples X-SVN-Commit-Revision: 335614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 07:25:42 -0000 Author: slavash Date: Mon Jun 25 07:25:41 2018 New Revision: 335614 URL: https://svnweb.freebsd.org/changeset/base/335614 Log: MFC r335282: Fix false positive on failure When running mckey, errors may happen in the init/connect stage. When leaving multicast groups, we override this value. Fix that by saving the return value from rdma_leave_multicast to different parameter, and only in case of failure in rdma_leave_multicast override it. Approved by: hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies Modified: stable/11/contrib/ofed/librdmacm/examples/mckey.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/ofed/librdmacm/examples/mckey.c ============================================================================== --- stable/11/contrib/ofed/librdmacm/examples/mckey.c Mon Jun 25 06:57:10 2018 (r335613) +++ stable/11/contrib/ofed/librdmacm/examples/mckey.c Mon Jun 25 07:25:41 2018 (r335614) @@ -475,7 +475,7 @@ static int get_dst_addr(char *dst, struct sockaddr *ad static int run(void) { - int i, ret; + int i, ret, err; printf("mckey: starting %s\n", is_sender ? "client" : "server"); if (src_addr) { @@ -543,10 +543,12 @@ static int run(void) } out: for (i = 0; i < connections; i++) { - ret = rdma_leave_multicast(test.nodes[i].cma_id, + err = rdma_leave_multicast(test.nodes[i].cma_id, test.dst_addr); - if (ret) + if (err) { perror("mckey: failure leaving"); + ret = err; + } } return ret; } From owner-svn-src-stable@freebsd.org Mon Jun 25 08:47:08 2018 Return-Path: Delivered-To: svn-src-stable@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 602D51001332; Mon, 25 Jun 2018 08:47:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 1181371C92; Mon, 25 Jun 2018 08:47:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E2A9F2AE95; Mon, 25 Jun 2018 08:47:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8l7a3040903; Mon, 25 Jun 2018 08:47:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8l7oW040902; Mon, 25 Jun 2018 08:47:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250847.w5P8l7oW040902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:47:07 +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: r335616 - stable/11/sys/dev/usb/serial X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/usb/serial X-SVN-Commit-Revision: 335616 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 08:47:08 -0000 Author: avg Date: Mon Jun 25 08:47:07 2018 New Revision: 335616 URL: https://svnweb.freebsd.org/changeset/base/335616 Log: MFC r333997: uchcom: report detected product based on USB product ID Modified: stable/11/sys/dev/usb/serial/uchcom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:29:43 2018 (r335615) +++ stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:47:07 2018 (r335616) @@ -320,12 +320,16 @@ uchcom_attach(device_t dev) sc->sc_udev = uaa->device; - switch (uaa->info.bcdDevice) { - case UCHCOM_REV_CH340: + switch (uaa->info.idProduct) { + case USB_PRODUCT_WCH2_CH341SER: device_printf(dev, "CH340 detected\n"); break; - default: + case USB_PRODUCT_WCH2_CH341SER_2: device_printf(dev, "CH341 detected\n"); + break; + default: + device_printf(dev, "New CH340/CH341 product 0x%04x detected\n", + uaa->info.idProduct); break; } From owner-svn-src-stable@freebsd.org Mon Jun 25 08:47:55 2018 Return-Path: Delivered-To: svn-src-stable@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 ADDE110013AF; Mon, 25 Jun 2018 08:47:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 589D071DF7; Mon, 25 Jun 2018 08:47:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39C962AE96; Mon, 25 Jun 2018 08:47:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8ltUs041001; Mon, 25 Jun 2018 08:47:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8lt85041000; Mon, 25 Jun 2018 08:47:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250847.w5P8lt85041000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:47:55 +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: r335617 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/usb/serial X-SVN-Commit-Revision: 335617 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 08:47:55 -0000 Author: avg Date: Mon Jun 25 08:47:54 2018 New Revision: 335617 URL: https://svnweb.freebsd.org/changeset/base/335617 Log: MFC r333997: uchcom: report detected product based on USB product ID Modified: stable/10/sys/dev/usb/serial/uchcom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:47:07 2018 (r335616) +++ stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:47:54 2018 (r335617) @@ -320,12 +320,16 @@ uchcom_attach(device_t dev) sc->sc_udev = uaa->device; - switch (uaa->info.bcdDevice) { - case UCHCOM_REV_CH340: + switch (uaa->info.idProduct) { + case USB_PRODUCT_WCH2_CH341SER: device_printf(dev, "CH340 detected\n"); break; - default: + case USB_PRODUCT_WCH2_CH341SER_2: device_printf(dev, "CH341 detected\n"); + break; + default: + device_printf(dev, "New CH340/CH341 product 0x%04x detected\n", + uaa->info.idProduct); break; } From owner-svn-src-stable@freebsd.org Mon Jun 25 08:48:40 2018 Return-Path: Delivered-To: svn-src-stable@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 C10C8100144C; Mon, 25 Jun 2018 08:48:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 6DDB871F38; Mon, 25 Jun 2018 08:48:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FC242AE97; Mon, 25 Jun 2018 08:48:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8meWK041095; Mon, 25 Jun 2018 08:48:40 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8meYf041094; Mon, 25 Jun 2018 08:48:40 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250848.w5P8meYf041094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:48:40 +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: r335618 - stable/11/sys/dev/usb/serial X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/usb/serial X-SVN-Commit-Revision: 335618 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 08:48:40 -0000 Author: avg Date: Mon Jun 25 08:48:39 2018 New Revision: 335618 URL: https://svnweb.freebsd.org/changeset/base/335618 Log: MFC r333998: uchcom: add DPRINTF-s to aid debugging of the driver Modified: stable/11/sys/dev/usb/serial/uchcom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:47:54 2018 (r335617) +++ stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:48:39 2018 (r335618) @@ -414,6 +414,8 @@ uchcom_ctrl_write(struct uchcom_softc *sc, uint8_t req USETW(req.wIndex, index); USETW(req.wLength, 0); + DPRINTF("WR REQ 0x%02X VAL 0x%04X IDX 0x%04X\n", + reqno, value, index); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, NULL, 0, 1000); } @@ -430,6 +432,8 @@ uchcom_ctrl_read(struct uchcom_softc *sc, uint8_t reqn USETW(req.wIndex, index); USETW(req.wLength, buflen); + DPRINTF("RD REQ 0x%02X VAL 0x%04X IDX 0x%04X LEN %d\n", + reqno, value, index, buflen); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, buf, USB_SHORT_XFER_OK, 1000); } @@ -504,6 +508,7 @@ static void uchcom_update_version(struct uchcom_softc *sc) { uchcom_get_version(sc, &sc->sc_version); + DPRINTF("Chip version: 0x%02x\n", sc->sc_version); } static void From owner-svn-src-stable@freebsd.org Mon Jun 25 08:49:14 2018 Return-Path: Delivered-To: svn-src-stable@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 5619710014FA; Mon, 25 Jun 2018 08:49:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 0809C72079; Mon, 25 Jun 2018 08:49:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD4E52AE98; Mon, 25 Jun 2018 08:49:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8nDvF041184; Mon, 25 Jun 2018 08:49:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8nDMA041183; Mon, 25 Jun 2018 08:49:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250849.w5P8nDMA041183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:49: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: r335619 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/usb/serial X-SVN-Commit-Revision: 335619 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 08:49:14 -0000 Author: avg Date: Mon Jun 25 08:49:13 2018 New Revision: 335619 URL: https://svnweb.freebsd.org/changeset/base/335619 Log: MFC r333998: uchcom: add DPRINTF-s to aid debugging of the driver Modified: stable/10/sys/dev/usb/serial/uchcom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:48:39 2018 (r335618) +++ stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:49:13 2018 (r335619) @@ -414,6 +414,8 @@ uchcom_ctrl_write(struct uchcom_softc *sc, uint8_t req USETW(req.wIndex, index); USETW(req.wLength, 0); + DPRINTF("WR REQ 0x%02X VAL 0x%04X IDX 0x%04X\n", + reqno, value, index); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, NULL, 0, 1000); } @@ -430,6 +432,8 @@ uchcom_ctrl_read(struct uchcom_softc *sc, uint8_t reqn USETW(req.wIndex, index); USETW(req.wLength, buflen); + DPRINTF("RD REQ 0x%02X VAL 0x%04X IDX 0x%04X LEN %d\n", + reqno, value, index, buflen); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, buf, USB_SHORT_XFER_OK, 1000); } @@ -504,6 +508,7 @@ static void uchcom_update_version(struct uchcom_softc *sc) { uchcom_get_version(sc, &sc->sc_version); + DPRINTF("Chip version: 0x%02x\n", sc->sc_version); } static void From owner-svn-src-stable@freebsd.org Mon Jun 25 08:50:07 2018 Return-Path: Delivered-To: svn-src-stable@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 29C7310015C0; Mon, 25 Jun 2018 08:50:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 CF323721D8; Mon, 25 Jun 2018 08:50:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B15022AE9C; Mon, 25 Jun 2018 08:50:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8o6TN041317; Mon, 25 Jun 2018 08:50:06 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8o6Va041316; Mon, 25 Jun 2018 08:50:06 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250850.w5P8o6Va041316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:50: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: r335620 - stable/11/sys/dev/usb/serial X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/usb/serial X-SVN-Commit-Revision: 335620 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 08:50:07 -0000 Author: avg Date: Mon Jun 25 08:50:06 2018 New Revision: 335620 URL: https://svnweb.freebsd.org/changeset/base/335620 Log: MFC r333999: uchcom: add a hardware configuration tweak seen in Linux code Modified: stable/11/sys/dev/usb/serial/uchcom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:49:13 2018 (r335619) +++ stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:50:06 2018 (r335620) @@ -616,8 +616,12 @@ uchcom_set_baudrate(struct uchcom_softc *sc, uint32_t if (uchcom_calc_divider_settings(&dv, rate)) return; + /* + * According to linux code we need to set bit 7 of UCHCOM_REG_BPS_PRE, + * otherwise the chip will buffer data. + */ uchcom_write_reg(sc, - UCHCOM_REG_BPS_PRE, dv.dv_prescaler, + UCHCOM_REG_BPS_PRE, dv.dv_prescaler | 0x80, UCHCOM_REG_BPS_DIV, dv.dv_div); uchcom_write_reg(sc, UCHCOM_REG_BPS_MOD, dv.dv_mod, From owner-svn-src-stable@freebsd.org Mon Jun 25 08:50:47 2018 Return-Path: Delivered-To: svn-src-stable@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 2EA7410016A3; Mon, 25 Jun 2018 08:50:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 D460E72361; Mon, 25 Jun 2018 08:50:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B15532AEB2; Mon, 25 Jun 2018 08:50:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8okdt043610; Mon, 25 Jun 2018 08:50:46 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8okBX043609; Mon, 25 Jun 2018 08:50:46 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250850.w5P8okBX043609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:50:46 +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: r335621 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/usb/serial X-SVN-Commit-Revision: 335621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 08:50:47 -0000 Author: avg Date: Mon Jun 25 08:50:46 2018 New Revision: 335621 URL: https://svnweb.freebsd.org/changeset/base/335621 Log: MFC r333999: uchcom: add a hardware configuration tweak seen in Linux code Modified: stable/10/sys/dev/usb/serial/uchcom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:50:06 2018 (r335620) +++ stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:50:46 2018 (r335621) @@ -616,8 +616,12 @@ uchcom_set_baudrate(struct uchcom_softc *sc, uint32_t if (uchcom_calc_divider_settings(&dv, rate)) return; + /* + * According to linux code we need to set bit 7 of UCHCOM_REG_BPS_PRE, + * otherwise the chip will buffer data. + */ uchcom_write_reg(sc, - UCHCOM_REG_BPS_PRE, dv.dv_prescaler, + UCHCOM_REG_BPS_PRE, dv.dv_prescaler | 0x80, UCHCOM_REG_BPS_DIV, dv.dv_div); uchcom_write_reg(sc, UCHCOM_REG_BPS_MOD, dv.dv_mod, From owner-svn-src-stable@freebsd.org Mon Jun 25 08:52:49 2018 Return-Path: Delivered-To: svn-src-stable@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 76ACF1001B74; Mon, 25 Jun 2018 08:52:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 2C2307283B; Mon, 25 Jun 2018 08:52:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F01A2B028; Mon, 25 Jun 2018 08:52:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8qmax045926; Mon, 25 Jun 2018 08:52:48 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8qm8w045925; Mon, 25 Jun 2018 08:52:48 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250852.w5P8qm8w045925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335622 - stable/11/sys/dev/usb/serial X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/usb/serial X-SVN-Commit-Revision: 335622 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 08:52:49 -0000 Author: avg Date: Mon Jun 25 08:52:48 2018 New Revision: 335622 URL: https://svnweb.freebsd.org/changeset/base/335622 Log: MFC r334000: uchcom: reject parity and double stop bits as unsupported Modified: stable/11/sys/dev/usb/serial/uchcom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:50:46 2018 (r335621) +++ stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:52:48 2018 (r335622) @@ -687,6 +687,10 @@ uchcom_pre_param(struct ucom_softc *ucom, struct termi default: return (EIO); } + if ((t->c_cflag & CSTOPB) != 0) + return (EIO); + if ((t->c_cflag & PARENB) != 0) + return (EIO); if (uchcom_calc_divider_settings(&dv, t->c_ospeed)) { return (EIO); From owner-svn-src-stable@freebsd.org Mon Jun 25 08:53:31 2018 Return-Path: Delivered-To: svn-src-stable@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 4CFEE1001DC4; Mon, 25 Jun 2018 08:53:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 F101E72A31; Mon, 25 Jun 2018 08:53:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1FA02B02A; Mon, 25 Jun 2018 08:53:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8rUE3046022; Mon, 25 Jun 2018 08:53:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8rU2c046021; Mon, 25 Jun 2018 08:53:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250853.w5P8rU2c046021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:53:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335623 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/usb/serial X-SVN-Commit-Revision: 335623 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 08:53:31 -0000 Author: avg Date: Mon Jun 25 08:53:30 2018 New Revision: 335623 URL: https://svnweb.freebsd.org/changeset/base/335623 Log: MFC r334000: uchcom: reject parity and double stop bits as unsupported Modified: stable/10/sys/dev/usb/serial/uchcom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:52:48 2018 (r335622) +++ stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:53:30 2018 (r335623) @@ -686,6 +686,10 @@ uchcom_pre_param(struct ucom_softc *ucom, struct termi default: return (EIO); } + if ((t->c_cflag & CSTOPB) != 0) + return (EIO); + if ((t->c_cflag & PARENB) != 0) + return (EIO); if (uchcom_calc_divider_settings(&dv, t->c_ospeed)) { return (EIO); From owner-svn-src-stable@freebsd.org Mon Jun 25 08:54:46 2018 Return-Path: Delivered-To: svn-src-stable@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 E14591002073; Mon, 25 Jun 2018 08:54:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 9109672BCD; Mon, 25 Jun 2018 08:54:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72D762B02B; Mon, 25 Jun 2018 08:54:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8skZ9046139; Mon, 25 Jun 2018 08:54:46 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8skGM046138; Mon, 25 Jun 2018 08:54:46 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250854.w5P8skGM046138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:54:46 +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: r335624 - stable/11/sys/dev/usb/serial X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/usb/serial X-SVN-Commit-Revision: 335624 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 08:54:47 -0000 Author: avg Date: Mon Jun 25 08:54:46 2018 New Revision: 335624 URL: https://svnweb.freebsd.org/changeset/base/335624 Log: MFC r334001: uchcom: remove UCHCOM_REG_BREAK2 alias of UCHCOM_REG_LCR1 Modified: stable/11/sys/dev/usb/serial/uchcom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:53:30 2018 (r335623) +++ stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:54:46 2018 (r335624) @@ -120,7 +120,6 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_REG_BPS_MOD 0x14 #define UCHCOM_REG_BPS_PAD 0x0F #define UCHCOM_REG_BREAK1 0x05 -#define UCHCOM_REG_BREAK2 0x18 #define UCHCOM_REG_LCR1 0x18 #define UCHCOM_REG_LCR2 0x25 @@ -133,12 +132,14 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_DTR_MASK 0x20 #define UCHCOM_RTS_MASK 0x40 -#define UCHCOM_BRK1_MASK 0x01 -#define UCHCOM_BRK2_MASK 0x40 +#define UCHCOM_BRK_MASK 0x01 #define UCHCOM_LCR1_MASK 0xAF #define UCHCOM_LCR2_MASK 0x07 -#define UCHCOM_LCR1_PARENB 0x80 +#define UCHCOM_LCR1_RX 0x80 +#define UCHCOM_LCR1_TX 0x40 +#define UCHCOM_LCR1_PARENB 0x08 +#define UCHCOM_LCR1_CS8 0x03 #define UCHCOM_LCR2_PAREVEN 0x07 #define UCHCOM_LCR2_PARODD 0x06 #define UCHCOM_LCR2_PARMARK 0x05 @@ -554,17 +555,17 @@ uchcom_cfg_set_break(struct ucom_softc *ucom, uint8_t uint8_t brk1; uint8_t brk2; - uchcom_read_reg(sc, UCHCOM_REG_BREAK1, &brk1, UCHCOM_REG_BREAK2, &brk2); + uchcom_read_reg(sc, UCHCOM_REG_BREAK1, &brk1, UCHCOM_REG_LCR1, &brk2); if (onoff) { /* on - clear bits */ - brk1 &= ~UCHCOM_BRK1_MASK; - brk2 &= ~UCHCOM_BRK2_MASK; + brk1 &= ~UCHCOM_BRK_MASK; + brk2 &= ~UCHCOM_LCR1_TX; } else { /* off - set bits */ - brk1 |= UCHCOM_BRK1_MASK; - brk2 |= UCHCOM_BRK2_MASK; + brk1 |= UCHCOM_BRK_MASK; + brk2 |= UCHCOM_LCR1_TX; } - uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_BREAK2, brk2); + uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_LCR1, brk2); } static int From owner-svn-src-stable@freebsd.org Mon Jun 25 08:55:20 2018 Return-Path: Delivered-To: svn-src-stable@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 584B11002106; Mon, 25 Jun 2018 08:55:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 005D572CF1; Mon, 25 Jun 2018 08:55:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D59B52B02C; Mon, 25 Jun 2018 08:55:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8tJUY046255; Mon, 25 Jun 2018 08:55:19 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8tJrX046254; Mon, 25 Jun 2018 08:55:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250855.w5P8tJrX046254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r335625 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/usb/serial X-SVN-Commit-Revision: 335625 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 08:55:20 -0000 Author: avg Date: Mon Jun 25 08:55:19 2018 New Revision: 335625 URL: https://svnweb.freebsd.org/changeset/base/335625 Log: MFC r334001: uchcom: remove UCHCOM_REG_BREAK2 alias of UCHCOM_REG_LCR1 Modified: stable/10/sys/dev/usb/serial/uchcom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:54:46 2018 (r335624) +++ stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:55:19 2018 (r335625) @@ -120,7 +120,6 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_REG_BPS_MOD 0x14 #define UCHCOM_REG_BPS_PAD 0x0F #define UCHCOM_REG_BREAK1 0x05 -#define UCHCOM_REG_BREAK2 0x18 #define UCHCOM_REG_LCR1 0x18 #define UCHCOM_REG_LCR2 0x25 @@ -133,12 +132,14 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_DTR_MASK 0x20 #define UCHCOM_RTS_MASK 0x40 -#define UCHCOM_BRK1_MASK 0x01 -#define UCHCOM_BRK2_MASK 0x40 +#define UCHCOM_BRK_MASK 0x01 #define UCHCOM_LCR1_MASK 0xAF #define UCHCOM_LCR2_MASK 0x07 -#define UCHCOM_LCR1_PARENB 0x80 +#define UCHCOM_LCR1_RX 0x80 +#define UCHCOM_LCR1_TX 0x40 +#define UCHCOM_LCR1_PARENB 0x08 +#define UCHCOM_LCR1_CS8 0x03 #define UCHCOM_LCR2_PAREVEN 0x07 #define UCHCOM_LCR2_PARODD 0x06 #define UCHCOM_LCR2_PARMARK 0x05 @@ -554,17 +555,17 @@ uchcom_cfg_set_break(struct ucom_softc *ucom, uint8_t uint8_t brk1; uint8_t brk2; - uchcom_read_reg(sc, UCHCOM_REG_BREAK1, &brk1, UCHCOM_REG_BREAK2, &brk2); + uchcom_read_reg(sc, UCHCOM_REG_BREAK1, &brk1, UCHCOM_REG_LCR1, &brk2); if (onoff) { /* on - clear bits */ - brk1 &= ~UCHCOM_BRK1_MASK; - brk2 &= ~UCHCOM_BRK2_MASK; + brk1 &= ~UCHCOM_BRK_MASK; + brk2 &= ~UCHCOM_LCR1_TX; } else { /* off - set bits */ - brk1 |= UCHCOM_BRK1_MASK; - brk2 |= UCHCOM_BRK2_MASK; + brk1 |= UCHCOM_BRK_MASK; + brk2 |= UCHCOM_LCR1_TX; } - uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_BREAK2, brk2); + uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_LCR1, brk2); } static int From owner-svn-src-stable@freebsd.org Mon Jun 25 08:56:31 2018 Return-Path: Delivered-To: svn-src-stable@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 435A010021FC; Mon, 25 Jun 2018 08:56:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 E492372E83; Mon, 25 Jun 2018 08:56:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C585B2B02D; Mon, 25 Jun 2018 08:56:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8uUAq046375; Mon, 25 Jun 2018 08:56:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8uUEv046374; Mon, 25 Jun 2018 08:56:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250856.w5P8uUEv046374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:56:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335626 - stable/11/sys/dev/usb/serial X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/usb/serial X-SVN-Commit-Revision: 335626 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 08:56:31 -0000 Author: avg Date: Mon Jun 25 08:56:30 2018 New Revision: 335626 URL: https://svnweb.freebsd.org/changeset/base/335626 Log: MFC r334002: uchcom: extend hardware support to version 0x30 Modified: stable/11/sys/dev/usb/serial/uchcom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:55:19 2018 (r335625) +++ stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:56:30 2018 (r335626) @@ -124,6 +124,7 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_REG_LCR2 0x25 #define UCHCOM_VER_20 0x20 +#define UCHCOM_VER_30 0x30 #define UCHCOM_BASE_UNKNOWN 0 #define UCHCOM_BPS_MOD_BASE 20000000 @@ -704,11 +705,26 @@ uchcom_cfg_param(struct ucom_softc *ucom, struct termi { struct uchcom_softc *sc = ucom->sc_parent; - uchcom_get_version(sc, 0); + uchcom_get_version(sc, NULL); uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0, 0); uchcom_set_baudrate(sc, t->c_ospeed); - uchcom_read_reg(sc, 0x18, 0, 0x25, 0); - uchcom_write_reg(sc, 0x18, 0x50, 0x25, 0x00); + if (sc->sc_version < UCHCOM_VER_30) { + uchcom_read_reg(sc, UCHCOM_REG_LCR1, NULL, + UCHCOM_REG_LCR2, NULL); + uchcom_write_reg(sc, UCHCOM_REG_LCR1, 0x50, + UCHCOM_REG_LCR2, 0x00); + } else { + /* + * Set up line control: + * - enable transmit and receive + * - set 8n1 mode + * To do: support other sizes, parity, stop bits. + */ + uchcom_write_reg(sc, + UCHCOM_REG_LCR1, + UCHCOM_LCR1_RX | UCHCOM_LCR1_TX | UCHCOM_LCR1_CS8, + UCHCOM_REG_LCR2, 0x00); + } uchcom_update_status(sc); uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0x501f, 0xd90a); uchcom_set_baudrate(sc, t->c_ospeed); From owner-svn-src-stable@freebsd.org Mon Jun 25 08:57:05 2018 Return-Path: Delivered-To: svn-src-stable@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 0B2DF10022C8; Mon, 25 Jun 2018 08:57:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 9C5AC72FC9; Mon, 25 Jun 2018 08:57:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EC5A2B02E; Mon, 25 Jun 2018 08:57:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8v4gM046461; Mon, 25 Jun 2018 08:57:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8v4fl046460; Mon, 25 Jun 2018 08:57:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250857.w5P8v4fl046460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:57:04 +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: r335627 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/usb/serial X-SVN-Commit-Revision: 335627 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 08:57:05 -0000 Author: avg Date: Mon Jun 25 08:57:03 2018 New Revision: 335627 URL: https://svnweb.freebsd.org/changeset/base/335627 Log: MFC r334002: uchcom: extend hardware support to version 0x30 Modified: stable/10/sys/dev/usb/serial/uchcom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:56:30 2018 (r335626) +++ stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:57:03 2018 (r335627) @@ -124,6 +124,7 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_REG_LCR2 0x25 #define UCHCOM_VER_20 0x20 +#define UCHCOM_VER_30 0x30 #define UCHCOM_BASE_UNKNOWN 0 #define UCHCOM_BPS_MOD_BASE 20000000 @@ -703,11 +704,26 @@ uchcom_cfg_param(struct ucom_softc *ucom, struct termi { struct uchcom_softc *sc = ucom->sc_parent; - uchcom_get_version(sc, 0); + uchcom_get_version(sc, NULL); uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0, 0); uchcom_set_baudrate(sc, t->c_ospeed); - uchcom_read_reg(sc, 0x18, 0, 0x25, 0); - uchcom_write_reg(sc, 0x18, 0x50, 0x25, 0x00); + if (sc->sc_version < UCHCOM_VER_30) { + uchcom_read_reg(sc, UCHCOM_REG_LCR1, NULL, + UCHCOM_REG_LCR2, NULL); + uchcom_write_reg(sc, UCHCOM_REG_LCR1, 0x50, + UCHCOM_REG_LCR2, 0x00); + } else { + /* + * Set up line control: + * - enable transmit and receive + * - set 8n1 mode + * To do: support other sizes, parity, stop bits. + */ + uchcom_write_reg(sc, + UCHCOM_REG_LCR1, + UCHCOM_LCR1_RX | UCHCOM_LCR1_TX | UCHCOM_LCR1_CS8, + UCHCOM_REG_LCR2, 0x00); + } uchcom_update_status(sc); uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0x501f, 0xd90a); uchcom_set_baudrate(sc, t->c_ospeed); From owner-svn-src-stable@freebsd.org Mon Jun 25 09:19:51 2018 Return-Path: Delivered-To: svn-src-stable@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 8639F1002F85; Mon, 25 Jun 2018 09:19:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 3864E73BBB; Mon, 25 Jun 2018 09:19:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15A662B360; Mon, 25 Jun 2018 09:19:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P9Jo4F057028; Mon, 25 Jun 2018 09:19:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P9JoTM057027; Mon, 25 Jun 2018 09:19:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250919.w5P9JoTM057027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 09:19: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: r335628 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/x86/x86 X-SVN-Commit-Revision: 335628 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 09:19:51 -0000 Author: avg Date: Mon Jun 25 09:19:50 2018 New Revision: 335628 URL: https://svnweb.freebsd.org/changeset/base/335628 Log: MFC r333638: calibrate lapic timer in native_lapic_setup Modified: stable/11/sys/x86/x86/local_apic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/local_apic.c ============================================================================== --- stable/11/sys/x86/x86/local_apic.c Mon Jun 25 08:57:03 2018 (r335627) +++ stable/11/sys/x86/x86/local_apic.c Mon Jun 25 09:19:50 2018 (r335628) @@ -202,6 +202,9 @@ SYSCTL_INT(_hw_apic, OID_AUTO, eoi_suppression, CTLFLA SYSCTL_INT(_hw_apic, OID_AUTO, timer_tsc_deadline, CTLFLAG_RD, &lapic_timer_tsc_deadline, 0, ""); +static void lapic_calibrate_initcount(struct lapic *la); +static void lapic_calibrate_deadline(struct lapic *la); + static uint32_t lapic_read32(enum LAPIC_REGISTERS reg) { @@ -783,6 +786,13 @@ native_lapic_setup(int boot) intrcnt_add(buf, &la->la_timer_count); } + /* Calibrate the timer parameters using BSP. */ + if (boot && IS_BSP()) { + lapic_calibrate_initcount(la); + if (lapic_timer_tsc_deadline) + lapic_calibrate_deadline(la); + } + /* Setup the timer if configured. */ if (la->la_timer_mode != LAT_MODE_UNDEF) { KASSERT(la->la_timer_period != 0, ("lapic%u: zero divisor", @@ -917,7 +927,7 @@ native_lapic_disable_pmc(void) } static void -lapic_calibrate_initcount(struct eventtimer *et, struct lapic *la) +lapic_calibrate_initcount(struct lapic *la) { u_long value; @@ -943,7 +953,7 @@ lapic_calibrate_initcount(struct eventtimer *et, struc } static void -lapic_calibrate_deadline(struct eventtimer *et, struct lapic *la __unused) +lapic_calibrate_deadline(struct lapic *la __unused) { if (bootverbose) { @@ -985,11 +995,6 @@ lapic_et_start(struct eventtimer *et, sbintime_t first struct lapic *la; la = &lapics[PCPU_GET(apic_id)]; - if (et->et_frequency == 0) { - lapic_calibrate_initcount(et, la); - if (lapic_timer_tsc_deadline) - lapic_calibrate_deadline(et, la); - } if (period != 0) { lapic_change_mode(et, la, LAT_MODE_PERIODIC); la->la_timer_period = ((uint32_t)et->et_frequency * period) >> From owner-svn-src-stable@freebsd.org Mon Jun 25 10:37:22 2018 Return-Path: Delivered-To: svn-src-stable@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 467C9100631D; Mon, 25 Jun 2018 10:37:22 +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 EFD10763C4; Mon, 25 Jun 2018 10:37:21 +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 CC78F2C053; Mon, 25 Jun 2018 10:37:21 +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 w5PAbLfQ097438; Mon, 25 Jun 2018 10:37:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PAbLOM097436; Mon, 25 Jun 2018 10:37:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201806251037.w5PAbLOM097436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 25 Jun 2018 10:37:21 +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: r335630 - stable/11/contrib/elftoolchain/libdwarf X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/contrib/elftoolchain/libdwarf X-SVN-Commit-Revision: 335630 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 10:37:22 -0000 Author: markj Date: Mon Jun 25 10:37:21 2018 New Revision: 335630 URL: https://svnweb.freebsd.org/changeset/base/335630 Log: MFC r334881: Add DW_LANG_* definitions from DWARF 4 and 5. Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf.h stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf.h ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/dwarf.h Mon Jun 25 09:39:16 2018 (r335629) +++ stable/11/contrib/elftoolchain/libdwarf/dwarf.h Mon Jun 25 10:37:21 2018 (r335630) @@ -523,6 +523,24 @@ #define DW_LANG_ObjC_plus_plus 0x0011 #define DW_LANG_UPC 0x0012 #define DW_LANG_D 0x0013 +#define DW_LANG_Python 0x0014 +#define DW_LANG_OpenCL 0x0015 +#define DW_LANG_Go 0x0016 +#define DW_LANG_Modula3 0x0017 +#define DW_LANG_Haskell 0x0018 +#define DW_LANG_C_plus_plus_03 0x0019 +#define DW_LANG_C_plus_plus_11 0x001a +#define DW_LANG_OCaml 0x001b +#define DW_LANG_Rust 0x001c +#define DW_LANG_C11 0x001d +#define DW_LANG_Swift 0x001e +#define DW_LANG_Julia 0x001f +#define DW_LANG_Dylan 0x0020 +#define DW_LANG_C_plus_plus_14 0x0021 +#define DW_LANG_Fortran03 0x0022 +#define DW_LANG_Fortran08 0x0023 +#define DW_LANG_RenderScript 0x0024 +#define DW_LANG_BLISS 0x0025 #define DW_LANG_lo_user 0x8000 #define DW_LANG_Mips_Assembler 0x8001 #define DW_LANG_hi_user 0xffff Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c Mon Jun 25 09:39:16 2018 (r335629) +++ stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c Mon Jun 25 10:37:21 2018 (r335630) @@ -788,6 +788,42 @@ dwarf_get_LANG_name(unsigned lang, const char **s) *s = "DW_LANG_UPC"; break; case DW_LANG_D: *s = "DW_LANG_D"; break; + case DW_LANG_Python: + *s = "DW_LANG_Python"; break; + case DW_LANG_OpenCL: + *s = "DW_LANG_OpenCL"; break; + case DW_LANG_Go: + *s = "DW_LANG_Go"; break; + case DW_LANG_Modula3: + *s = "DW_LANG_Modula3"; break; + case DW_LANG_Haskell: + *s = "DW_LANG_Haskell"; break; + case DW_LANG_C_plus_plus_03: + *s = "DW_LANG_C_plus_plus_03"; break; + case DW_LANG_C_plus_plus_11: + *s = "DW_LANG_C_plus_plus_11"; break; + case DW_LANG_OCaml: + *s = "DW_LANG_OCaml"; break; + case DW_LANG_Rust: + *s = "DW_LANG_Rust"; break; + case DW_LANG_C11: + *s = "DW_LANG_C11"; break; + case DW_LANG_Swift: + *s = "DW_LANG_Swift"; break; + case DW_LANG_Julia: + *s = "DW_LANG_Julia"; break; + case DW_LANG_Dylan: + *s = "DW_LANG_Dylan"; break; + case DW_LANG_C_plus_plus_14: + *s = "DW_LANG_C_plus_plus_14"; break; + case DW_LANG_Fortran03: + *s = "DW_LANG_Fortran03"; break; + case DW_LANG_Fortran08: + *s = "DW_LANG_Fortran08"; break; + case DW_LANG_RenderScript: + *s = "DW_LANG_RenderScript"; break; + case DW_LANG_BLISS: + *s = "DW_LANG_BLISS"; break; case DW_LANG_lo_user: *s = "DW_LANG_lo_user"; break; case DW_LANG_Mips_Assembler: From owner-svn-src-stable@freebsd.org Mon Jun 25 15:09:57 2018 Return-Path: Delivered-To: svn-src-stable@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 5E4CD1012D16; Mon, 25 Jun 2018 15:09:57 +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 0551480C07; Mon, 25 Jun 2018 15:09:57 +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 D996F2EB32; Mon, 25 Jun 2018 15:09:56 +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 w5PF9uLl037661; Mon, 25 Jun 2018 15:09:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PF9u9N037658; Mon, 25 Jun 2018 15:09:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806251509.w5PF9u9N037658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 25 Jun 2018 15:09:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335640 - in stable/11: contrib/libpcap contrib/libpcap/ChmodBPF contrib/libpcap/Win32 contrib/libpcap/Win32/Prj contrib/libpcap/cmake contrib/libpcap/cmake/Modules contrib/libpcap/lbl ... X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11: contrib/libpcap contrib/libpcap/ChmodBPF contrib/libpcap/Win32 contrib/libpcap/Win32/Prj contrib/libpcap/cmake contrib/libpcap/cmake/Modules contrib/libpcap/lbl contrib/libpcap/missing c... X-SVN-Commit-Revision: 335640 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 15:09:58 -0000 Author: hselasky Date: Mon Jun 25 15:09:55 2018 New Revision: 335640 URL: https://svnweb.freebsd.org/changeset/base/335640 Log: MFC r334277, r334376, r334378 and r334418: MFV r333789: libpcap 1.9.0 (pre-release) - Update local copy of dlt.h with new DLT types. Sponsored by: Mellanox Technologies Added: stable/11/contrib/libpcap/CHANGES stable/11/contrib/libpcap/CMakeLists.txt (contents, props changed) stable/11/contrib/libpcap/CONTRIBUTING stable/11/contrib/libpcap/CREDITS stable/11/contrib/libpcap/ChmodBPF/ stable/11/contrib/libpcap/ChmodBPF/ChmodBPF (contents, props changed) stable/11/contrib/libpcap/ChmodBPF/StartupParameters.plist stable/11/contrib/libpcap/INSTALL.txt (contents, props changed) stable/11/contrib/libpcap/LICENSE stable/11/contrib/libpcap/Makefile-devel-adds (contents, props changed) stable/11/contrib/libpcap/Makefile.in (contents, props changed) stable/11/contrib/libpcap/README stable/11/contrib/libpcap/README.Win32 stable/11/contrib/libpcap/README.aix stable/11/contrib/libpcap/README.dag stable/11/contrib/libpcap/README.hpux stable/11/contrib/libpcap/README.linux stable/11/contrib/libpcap/README.macos stable/11/contrib/libpcap/README.septel stable/11/contrib/libpcap/README.sita stable/11/contrib/libpcap/README.tru64 stable/11/contrib/libpcap/TODO stable/11/contrib/libpcap/VERSION stable/11/contrib/libpcap/Win32/ stable/11/contrib/libpcap/Win32/Prj/ stable/11/contrib/libpcap/Win32/Prj/wpcap.sln stable/11/contrib/libpcap/Win32/Prj/wpcap.vcxproj stable/11/contrib/libpcap/Win32/Prj/wpcap.vcxproj.filters stable/11/contrib/libpcap/aclocal.m4 stable/11/contrib/libpcap/arcnet.h (contents, props changed) stable/11/contrib/libpcap/atmuni31.h (contents, props changed) stable/11/contrib/libpcap/bpf_dump.c (contents, props changed) stable/11/contrib/libpcap/bpf_filter.c (contents, props changed) stable/11/contrib/libpcap/bpf_image.c (contents, props changed) stable/11/contrib/libpcap/chmod_bpf (contents, props changed) stable/11/contrib/libpcap/cmake/ stable/11/contrib/libpcap/cmake/Modules/ stable/11/contrib/libpcap/cmake/Modules/FindDAG.cmake stable/11/contrib/libpcap/cmake/Modules/FindFseeko.cmake stable/11/contrib/libpcap/cmake/Modules/FindLFS.cmake stable/11/contrib/libpcap/cmake/Modules/FindPacket.cmake stable/11/contrib/libpcap/cmake/Modules/FindPthreads-w32.cmake stable/11/contrib/libpcap/cmake/Modules/FindSNF.cmake stable/11/contrib/libpcap/cmake/Modules/FindTC.cmake stable/11/contrib/libpcap/cmake/have_siocglifconf.c (contents, props changed) stable/11/contrib/libpcap/cmake_uninstall.cmake.in (contents, props changed) stable/11/contrib/libpcap/cmakeconfig.h.in (contents, props changed) stable/11/contrib/libpcap/config.guess (contents, props changed) stable/11/contrib/libpcap/config.h.in (contents, props changed) stable/11/contrib/libpcap/config.sub (contents, props changed) stable/11/contrib/libpcap/configure (contents, props changed) stable/11/contrib/libpcap/configure.ac stable/11/contrib/libpcap/diag-control.h (contents, props changed) stable/11/contrib/libpcap/dlpisubs.c (contents, props changed) stable/11/contrib/libpcap/dlpisubs.h (contents, props changed) stable/11/contrib/libpcap/etherent.c (contents, props changed) stable/11/contrib/libpcap/ethertype.h (contents, props changed) stable/11/contrib/libpcap/extract.h (contents, props changed) stable/11/contrib/libpcap/fad-getad.c (contents, props changed) stable/11/contrib/libpcap/fad-gifc.c (contents, props changed) stable/11/contrib/libpcap/fad-glifc.c (contents, props changed) stable/11/contrib/libpcap/fmtutils.c (contents, props changed) stable/11/contrib/libpcap/fmtutils.h (contents, props changed) stable/11/contrib/libpcap/ftmacros.h (contents, props changed) stable/11/contrib/libpcap/gencode.c (contents, props changed) stable/11/contrib/libpcap/gencode.h (contents, props changed) stable/11/contrib/libpcap/grammar.y stable/11/contrib/libpcap/ieee80211.h (contents, props changed) stable/11/contrib/libpcap/install-sh (contents, props changed) stable/11/contrib/libpcap/lbl/ stable/11/contrib/libpcap/lbl/os-aix4.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-aix7.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-hpux11.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-osf4.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-osf5.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-solaris2.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-sunos4.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-ultrix4.h (contents, props changed) stable/11/contrib/libpcap/libpcap.pc.in (contents, props changed) stable/11/contrib/libpcap/llc.h (contents, props changed) stable/11/contrib/libpcap/missing/ stable/11/contrib/libpcap/missing/getopt.c (contents, props changed) stable/11/contrib/libpcap/missing/getopt.h (contents, props changed) stable/11/contrib/libpcap/missing/snprintf.c (contents, props changed) stable/11/contrib/libpcap/missing/strtok_r.c (contents, props changed) stable/11/contrib/libpcap/missing/win_snprintf.c (contents, props changed) stable/11/contrib/libpcap/mkdep (contents, props changed) stable/11/contrib/libpcap/msdos/ stable/11/contrib/libpcap/msdos/bin2c.c (contents, props changed) stable/11/contrib/libpcap/msdos/makefile (contents, props changed) stable/11/contrib/libpcap/msdos/makefile.dj (contents, props changed) stable/11/contrib/libpcap/msdos/makefile.wc (contents, props changed) stable/11/contrib/libpcap/msdos/pkt_rx0.asm stable/11/contrib/libpcap/msdos/pkt_rx1.s (contents, props changed) stable/11/contrib/libpcap/msdos/pktdrvr.c (contents, props changed) stable/11/contrib/libpcap/msdos/pktdrvr.h (contents, props changed) stable/11/contrib/libpcap/msdos/readme.dos stable/11/contrib/libpcap/nametoaddr.c (contents, props changed) stable/11/contrib/libpcap/nametoaddr.h (contents, props changed) stable/11/contrib/libpcap/nlpid.h (contents, props changed) stable/11/contrib/libpcap/nomkdep stable/11/contrib/libpcap/optimize.c (contents, props changed) stable/11/contrib/libpcap/optimize.h (contents, props changed) stable/11/contrib/libpcap/org.tcpdump.chmod_bpf.plist stable/11/contrib/libpcap/pcap/ stable/11/contrib/libpcap/pcap-bpf.c (contents, props changed) stable/11/contrib/libpcap/pcap-bpf.h (contents, props changed) stable/11/contrib/libpcap/pcap-bt-linux.c (contents, props changed) stable/11/contrib/libpcap/pcap-bt-linux.h (contents, props changed) stable/11/contrib/libpcap/pcap-bt-monitor-linux.c (contents, props changed) stable/11/contrib/libpcap/pcap-bt-monitor-linux.h (contents, props changed) stable/11/contrib/libpcap/pcap-common.c (contents, props changed) stable/11/contrib/libpcap/pcap-common.h (contents, props changed) stable/11/contrib/libpcap/pcap-config.1 (contents, props changed) stable/11/contrib/libpcap/pcap-config.in (contents, props changed) stable/11/contrib/libpcap/pcap-dag.c (contents, props changed) stable/11/contrib/libpcap/pcap-dag.h (contents, props changed) stable/11/contrib/libpcap/pcap-dbus.c (contents, props changed) stable/11/contrib/libpcap/pcap-dbus.h (contents, props changed) stable/11/contrib/libpcap/pcap-dll.rc stable/11/contrib/libpcap/pcap-dlpi.c (contents, props changed) stable/11/contrib/libpcap/pcap-dos.c (contents, props changed) stable/11/contrib/libpcap/pcap-dos.h (contents, props changed) stable/11/contrib/libpcap/pcap-enet.c (contents, props changed) stable/11/contrib/libpcap/pcap-filter.manmisc.in (contents, props changed) stable/11/contrib/libpcap/pcap-int.h (contents, props changed) stable/11/contrib/libpcap/pcap-libdlpi.c (contents, props changed) stable/11/contrib/libpcap/pcap-linktype.manmisc.in (contents, props changed) stable/11/contrib/libpcap/pcap-linux.c (contents, props changed) stable/11/contrib/libpcap/pcap-namedb.h (contents, props changed) stable/11/contrib/libpcap/pcap-netfilter-linux.c (contents, props changed) stable/11/contrib/libpcap/pcap-netfilter-linux.h (contents, props changed) stable/11/contrib/libpcap/pcap-netmap.c (contents, props changed) stable/11/contrib/libpcap/pcap-netmap.h (contents, props changed) stable/11/contrib/libpcap/pcap-new.c (contents, props changed) stable/11/contrib/libpcap/pcap-nit.c (contents, props changed) stable/11/contrib/libpcap/pcap-npf.c (contents, props changed) stable/11/contrib/libpcap/pcap-null.c (contents, props changed) stable/11/contrib/libpcap/pcap-pf.c (contents, props changed) stable/11/contrib/libpcap/pcap-rdmasniff.c (contents, props changed) stable/11/contrib/libpcap/pcap-rdmasniff.h (contents, props changed) stable/11/contrib/libpcap/pcap-rpcap-int.h (contents, props changed) stable/11/contrib/libpcap/pcap-rpcap.c (contents, props changed) stable/11/contrib/libpcap/pcap-rpcap.h (contents, props changed) stable/11/contrib/libpcap/pcap-savefile.manfile.in (contents, props changed) stable/11/contrib/libpcap/pcap-septel.c (contents, props changed) stable/11/contrib/libpcap/pcap-septel.h (contents, props changed) stable/11/contrib/libpcap/pcap-sita.c (contents, props changed) stable/11/contrib/libpcap/pcap-sita.h (contents, props changed) stable/11/contrib/libpcap/pcap-sita.html (contents, props changed) stable/11/contrib/libpcap/pcap-snf.c (contents, props changed) stable/11/contrib/libpcap/pcap-snf.h (contents, props changed) stable/11/contrib/libpcap/pcap-snit.c (contents, props changed) stable/11/contrib/libpcap/pcap-snoop.c (contents, props changed) stable/11/contrib/libpcap/pcap-tc.c (contents, props changed) stable/11/contrib/libpcap/pcap-tc.h (contents, props changed) stable/11/contrib/libpcap/pcap-tstamp.manmisc.in (contents, props changed) stable/11/contrib/libpcap/pcap-types.h (contents, props changed) stable/11/contrib/libpcap/pcap-usb-linux.c (contents, props changed) stable/11/contrib/libpcap/pcap-usb-linux.h (contents, props changed) stable/11/contrib/libpcap/pcap.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap.c (contents, props changed) stable/11/contrib/libpcap/pcap.h (contents, props changed) stable/11/contrib/libpcap/pcap/bluetooth.h (contents, props changed) stable/11/contrib/libpcap/pcap/bpf.h (contents, props changed) stable/11/contrib/libpcap/pcap/can_socketcan.h (contents, props changed) stable/11/contrib/libpcap/pcap/compiler-tests.h (contents, props changed) stable/11/contrib/libpcap/pcap/dlt.h (contents, props changed) stable/11/contrib/libpcap/pcap/funcattrs.h (contents, props changed) stable/11/contrib/libpcap/pcap/ipnet.h (contents, props changed) stable/11/contrib/libpcap/pcap/namedb.h (contents, props changed) stable/11/contrib/libpcap/pcap/nflog.h (contents, props changed) stable/11/contrib/libpcap/pcap/pcap-inttypes.h (contents, props changed) stable/11/contrib/libpcap/pcap/pcap.h (contents, props changed) stable/11/contrib/libpcap/pcap/sll.h (contents, props changed) stable/11/contrib/libpcap/pcap/usb.h (contents, props changed) stable/11/contrib/libpcap/pcap/vlan.h (contents, props changed) stable/11/contrib/libpcap/pcap_activate.3pcap stable/11/contrib/libpcap/pcap_breakloop.3pcap stable/11/contrib/libpcap/pcap_can_set_rfmon.3pcap stable/11/contrib/libpcap/pcap_close.3pcap stable/11/contrib/libpcap/pcap_compile.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_create.3pcap stable/11/contrib/libpcap/pcap_datalink.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_datalink_name_to_val.3pcap stable/11/contrib/libpcap/pcap_datalink_val_to_name.3pcap stable/11/contrib/libpcap/pcap_dump.3pcap stable/11/contrib/libpcap/pcap_dump_close.3pcap stable/11/contrib/libpcap/pcap_dump_file.3pcap stable/11/contrib/libpcap/pcap_dump_flush.3pcap stable/11/contrib/libpcap/pcap_dump_ftell.3pcap stable/11/contrib/libpcap/pcap_dump_open.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_file.3pcap stable/11/contrib/libpcap/pcap_fileno.3pcap stable/11/contrib/libpcap/pcap_findalldevs.3pcap stable/11/contrib/libpcap/pcap_freecode.3pcap stable/11/contrib/libpcap/pcap_get_required_select_timeout.3pcap stable/11/contrib/libpcap/pcap_get_selectable_fd.3pcap stable/11/contrib/libpcap/pcap_get_tstamp_precision.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_geterr.3pcap stable/11/contrib/libpcap/pcap_inject.3pcap stable/11/contrib/libpcap/pcap_is_swapped.3pcap stable/11/contrib/libpcap/pcap_lib_version.3pcap stable/11/contrib/libpcap/pcap_list_datalinks.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_list_tstamp_types.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_lookupdev.3pcap stable/11/contrib/libpcap/pcap_lookupnet.3pcap stable/11/contrib/libpcap/pcap_loop.3pcap stable/11/contrib/libpcap/pcap_major_version.3pcap stable/11/contrib/libpcap/pcap_next_ex.3pcap stable/11/contrib/libpcap/pcap_offline_filter.3pcap stable/11/contrib/libpcap/pcap_open_dead.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_open_live.3pcap stable/11/contrib/libpcap/pcap_open_offline.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_set_buffer_size.3pcap stable/11/contrib/libpcap/pcap_set_datalink.3pcap stable/11/contrib/libpcap/pcap_set_immediate_mode.3pcap stable/11/contrib/libpcap/pcap_set_promisc.3pcap stable/11/contrib/libpcap/pcap_set_protocol.3pcap stable/11/contrib/libpcap/pcap_set_rfmon.3pcap stable/11/contrib/libpcap/pcap_set_snaplen.3pcap stable/11/contrib/libpcap/pcap_set_timeout.3pcap stable/11/contrib/libpcap/pcap_set_tstamp_precision.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_set_tstamp_type.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_setdirection.3pcap stable/11/contrib/libpcap/pcap_setfilter.3pcap stable/11/contrib/libpcap/pcap_setnonblock.3pcap stable/11/contrib/libpcap/pcap_snapshot.3pcap stable/11/contrib/libpcap/pcap_stats.3pcap stable/11/contrib/libpcap/pcap_statustostr.3pcap stable/11/contrib/libpcap/pcap_strerror.3pcap stable/11/contrib/libpcap/pcap_tstamp_type_name_to_val.3pcap stable/11/contrib/libpcap/pcap_tstamp_type_val_to_name.3pcap stable/11/contrib/libpcap/portability.h (contents, props changed) stable/11/contrib/libpcap/ppp.h (contents, props changed) stable/11/contrib/libpcap/rpcap-protocol.c (contents, props changed) stable/11/contrib/libpcap/rpcap-protocol.h (contents, props changed) stable/11/contrib/libpcap/savefile.c (contents, props changed) stable/11/contrib/libpcap/scanner.l stable/11/contrib/libpcap/sf-pcap.c (contents, props changed) stable/11/contrib/libpcap/sf-pcap.h (contents, props changed) stable/11/contrib/libpcap/sf-pcapng.c (contents, props changed) stable/11/contrib/libpcap/sf-pcapng.h (contents, props changed) stable/11/contrib/libpcap/sockutils.c (contents, props changed) stable/11/contrib/libpcap/sockutils.h (contents, props changed) stable/11/contrib/libpcap/sunatmpos.h (contents, props changed) stable/11/contrib/libpcap/tests/ stable/11/contrib/libpcap/tests/shb-option-too-long.pcapng (contents, props changed) stable/11/contrib/libpcap/varattrs.h (contents, props changed) Replaced: stable/11/contrib/libpcap/ Deleted: stable/11/lib/libpcap/pcap-netmap.c Modified: stable/11/contrib/ofed/usr.lib/3/Makefile stable/11/lib/Makefile stable/11/lib/libpcap/Makefile stable/11/lib/libpcap/config.h stable/11/share/mk/src.libnames.mk stable/11/sys/net/dlt.h Directory Properties: stable/11/ (props changed) Added: stable/11/contrib/libpcap/CHANGES ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/contrib/libpcap/CHANGES Mon Jun 25 15:09:55 2018 (r335640) @@ -0,0 +1,864 @@ +Wednesday, Jan. 25, 2017 guy@alum.mit.edu + Summary for 1.9.0 libpcap release + Man page improvements + Fix Linux cooked mode userspace filtering (GitHub pull request #429) + Fix compilation if IPv6 support not enabled + Fix some Linux memory-mapped capture buffer size issues + Don't fail if kernel filter can't be set on Linux (GitHub issue + #549) + Improve sorting of interfaces for pcap_findalldevs() + Don't list Linux usbmon devices if usbmon module isn't loaded + Report PCAP_ERROR_PERM_DENIED if no permission to open Linux usbmon + devices + Fix DLT_ type for Solaris IPNET devices + Always return an error message for errors finding DAG or Myricom + devices + If possible, don't require that a device be openable when + enumerating them for pcap_findalldevs() + Don't put incompletely-initialized addresses in the address list for + When finding Myricom devices, update description for regular + interfaces that are Myricom devices and handle SNF_FLAGS=0x2(port + aggregation enabled) + Fix compilation error in DAG support + Fix issues with CMake configuration + Add support for stream buffers larger than 2GB on newer DAG cards + Remove support for building against DAG versions without STREAMS + support (before dag-3.0.0 2007) + +Tuesday, Oct. 25, 2016 mcr@sandelman.ca + Summary for 1.8.1 libpcap release + Add a target in Makefile.in for Exuberant Ctags use: 'extags'. + Rename configure.in to configure.ac: autoconf 2.59 + Clean up the name-to-DLT mapping table. + Add some newer DLT_ values: IPMI_HPM_2,ZWAVE_R1_R2,ZWAVE_R3,WATTSTOPPER_DLM,ISO_14443,RDS + Clarify what the return values are for both success and failure. + Many changes to build on windows + Check for the "break the loop" condition in the inner loop for TPACKET_V3. + Fix handling of packet count in the TPACKET_V3 inner loop: GitHub issue #493. + Filter out duplicate looped back CAN frames. + Fix the handling of loopback filters for IPv6 packets. + Add a link-layer header type for RDS (IEC 62106) groups. + Use different intermediate folders for x86 and x64 builds on Windows. + On Linux, handle all CAN captures with pcap-linux.c, in cooked mode. + Removes the need for the "host-endian" link-layer header type. + Compile with '-Wused-but-marked-unused' in devel mode if supported + Have separate DLTs for big-endian and host-endian SocketCAN headers. + Reflect version.h being renamed to pcap_version.h. + Require that version.h be generated: all build procedures we support generate version.h (autoconf, CMake, MSVC)! + Properly check for sock_recv() errors. + Re-impose some of Winsock's limitations on sock_recv(). + Replace sprintf() with pcap_snprintf(). + Fix signature of pcap_stats_ex_remote(). + Initial cmake support for remote packet capture. + Have rpcap_remoteact_getsock() return a SOCKET and supply an "is active" flag. + Clean up {DAG, Septel, Myricom SNF}-only builds. + Do UTF-16-to-ASCII conversion into the right place. + pcap_create_interface() needs the interface name on Linux. + Clean up hardware time stamp support: the "any" device does not support any time stamp types. + Add support for capturing on FreeBSD usbusN interfaces. + Add a LINKTYPE/DLT_ value for FreeBSD USB. + Go back to using PCAP_API on Windows. + CMake support + Add TurboCap support from WinPcap. + Recognize 802.1ad nested VLAN tag in vlan filter. + +Thursday Sep. 3, 2015 guy@alum.mit.edu + Summary for 1.7.5 libpcap release + Man page cleanups. + Add some allocation failure checks. + Fix a number of Linux/ucLinux configure/build issues. + Fix some memory leaks. + Recognize 802.1ad nested VLAN tag in vlan filter. + Fix building Bluetooth Linux Monitor support with BlueZ 5.1+ + +Saturday Jun. 27, 2015 mcr@sandelman.ca + Summary for 1.7.4 libpcap release + Include fix for GitHub issue #424 -- out of tree builds. + +Friday Apr. 10, 2015 guy@alum.mit.edu + Summary for 1.7.3 libpcap release + Work around a Linux bonding driver bug. + +Thursday Feb. 12, 2015 guy@alum.mit.edu/mcr@sandelman.ca + Summary for 1.7.2 libpcap release + Support for filtering Geneve encapsulated packets. + Generalize encapsulation handling, fixing some bugs. + Don't add null addresses to address lists. + Add pcap_dump_open_append() to open for appending. + Fix the swapping of isochronous descriptors in Linux USB. + Attempt to handle TPACKET_V1 with 32-bit userland and 64-bit kernel. + +Wednesday Nov. 12, 2014 guy@alum.mit.edu/mcr@sandelman.ca + Summary for 1.7.0 libpcap release + Fix handling of zones for BPF on Solaris + new DLT for ZWAVE + clarifications for read timeouts. + Use BPF extensions in compiled filters, fixing VLAN filters + some fixes to compilation without stdint.h + EBUSY can now be returned by SNFv3 code. + Fix the range checks in BPF loads + Various DAG fixes. + Various Linux fixes. + +Monday Aug. 12, 2014 guy@alum.mit.edu + Summary for 1.6.2 libpcap release + Don't crash on filters testing a non-existent link-layer type + field. + Fix sending in non-blocking mode on Linux with memory-mapped + capture. + Fix timestamps when reading pcap-ng files on big-endian + machines. + +Saturday Jul. 19, 2014 mcr@sandelman.ca + Summary for 1.6.1 libpcap release + some fixes for the any device + changes for how --enable-XXX (--enable-sniffing, --enable-can) works + +Wednesday Jul. 2, 2014 mcr@sandelman.ca + Summary for 1.6.0 libpcap release + Don't support D-Bus sniffing on OS X + fixes for byte order issues with NFLOG captures + Handle using cooked mode for DLT_NETLINK in activate_new(). + on platforms where you can not capture on down interfaces, do not list them + but: do list interfaces which are down, if you can capture on them! + +Wednesday December 18, 2013 guy@alum.mit.edu +Summary for 1.5.3 libpcap release + Don't let packets that don't match the current filter get to the + application when TPACKET_V3 is used. (GitHub issue #331) + Fix handling of pcap_loop()/pcap_dispatch() with a packet count + of 0 on some platforms (including Linux with TPACKET_V3). + (GitHub issue #333) + Work around TPACKET_V3 deficiency that causes packets to be lost + when a timeout of 0 is specified. (GitHub issue #335) + Man page formatting fixes. + +Wednesday December 4, 2013 guy@alum.mit.edu +Summary for 1.5.2 libpcap release + Fix libpcap to work when compiled with TPACKET_V3 support and + running on a kernel without TPACKET_V3 support. (GitHub + issue #329) + +Wednesday November 20, 2013 guy@alum.mit.edu +Summary for 1.5.1 libpcap release + Report an error, rather than crashing, if an IPv6 address is + used for link-layer filtering. (Wireshark bug 9376) + +Wednesday October 30, 2013 guy@alum.mit.edu +Summary for 1.5.0 libpcap release + TPACKET_V3 support added for Linux + Point users to the the-tcpdump-group repository on GitHub rather + than the mcr repository + Checks added for malloc()/realloc()/etc. failures + Fixed build on Solaris 11 + Support filtering filtering E1 SS7 traffic on MTP2 layer Annex A + Use "ln -s" to link man pages by default + Add support for getting nanosecond-resolution time stamps when + capturing and reading capture files + Many changes to autoconf to deal better with non-GCC compilers + added many new DLT types + +Saturday April 6, 2013 guy@alum.mit.edu +Summary for 1.4.0 libpcap release + Add netfilter/nfqueue interface. + If we don't have support for IPv6 address resolution, support, + in filter expressions, what IPv6 stuff we can. + Fix pcap-config to include -lpthread if canusb support is + present + Try to fix "pcap_parse not defined" problems when --without-flex + and --without-bison are used when you have Flex and Bison + Fix some issues with the pcap_loop man page. + Fix pcap_getnonblock() and pcap_setnonblock() to fill in the + supplied error message buffer + Fix typo that, it appeared, would cause pcap-libdlpi.c not to + compile (perhaps systems with libdlpi also have BPF and use + that instead) + Catch attempts to call pcap_compile() on a non-activated pcap_t + Fix crash on Linux with CAN-USB support without usbfs + Fix addition of VLAN tags for Linux cooked captures + Check for both EOPNOTSUPP and EINVAL after SIOCETHTOOL ioctl, so + that the driver can report either one if it doesn't support + SIOCETHTOOL + Add DLT_INFINIBAND and DLT_SCTP + Describe "proto XXX" and "protochain XXX" in the pcap-filter man + page + Handle either directories, or symlinks to directories, that + correspond to interfaces in /sys/class/net + Fix handling of VLAN tag insertion to check, on Linux 3.x + kernels, for VLAN tag valid flag + Clean up some man pages + Support libnl3 as well as libnl1 and libnl2 on Linux + Fix handling of Bluetooth devices on 3.x Linux kernels + +Friday March 30, 2012. mcr@sandelman.ca +Summary for 1.3.0 libpcap release + Handle DLT_PFSYNC in {FreeBSD, other *BSD+Mac OS X, other}. + Linux: Don't fail if netfilter isn't enabled in the kernel. + Add new link-layer type for NFC Forum LLCP. + Put the CANUSB stuff into EXTRA_DIST, so it shows up in the release tarball. + Add LINKTYPE_NG40/DLT_NG40. + Add DLT_MPEG_2_TS/LINKTYPE_MPEG_2_TS for MPEG-2 transport streams. + [PATCH] Fix AIX-3.5 crash with read failure during stress + AIX fixes. + Introduce --disable-shared configure option. + Added initial support for canusb devices. + Include the pcap(3PCAP) additions as 1.2.1 changes. + many updates to documentation: pcap.3pcap.in + Improve 'inbound'/'outbound' capture filters under Linux. + Note the cleanup of handling of new DLT_/LINKTYPE_ values. + On Lion, don't build for PPC. + For mac80211 devices we need to clean up monitor mode on exit. + +Friday December 9, 2011. guy@alum.mit.edu. +Summary for 1.2.1 libpcap release + Update README file. + Fix typoes in README.linux file. + Clean up some compiler warnings. + Fix Linux compile problems and tests for ethtool.h. + Treat Debian/kFreeBSD and GNU/Hurd as systems with GNU + toolchains. + Support 802.1 QinQ as a form of VLAN in filters. + Treat "carp" as equivalent to "vrrp" in filters. + Fix code generated for "ip6 protochain". + Add some new link-layer header types. + Support capturing NetFilter log messages on Linux. + Clean up some error messages. + Turn off monitor mode on exit for mac80211 interfaces on Linux. + Fix problems turning monitor mode on for non-mac80211 interfaces + on Linux. + Properly fail if /sys/class/net or /proc/net/dev exist but can't + be opened. + Fail if pcap_activate() is called on an already-activated + pcap_t, and add a test program for that. + Fix filtering in pcap-ng files. + Don't build for PowerPC on Mac OS X Lion. + Simplify handling of new DLT_/LINKTYPE_ values. + Expand pcap(3PCAP) man page. + +Sunday July 24, 2011. mcr@sandelman.ca. +Summary for 1.2 libpcap release + All of the changes listed below for 1.1.1 and 1.1.2. + Changes to error handling for pcap_findalldevs(). + Fix the calculation of the frame size in memory-mapped captures. + Add a link-layer header type for STANAG 5066 D_PDUs. + Add a link-layer type for a variant of 3GPP TS 27.010. + Noted real nature of LINKTYPE_ARCNET. + Add a link-layer type for DVB-CI. + Fix configure-script discovery of VLAN acceleration support. + see http://netoptimizer.blogspot.com/2010/09/tcpdump-vs-vlan-tags.html + Linux, HP-UX, AIX, NetBSD and OpenBSD compilation/conflict fixes. + Protect against including AIX 5.x's having been included. + Add DLT_DBUS, for raw D-Bus messages. + Treat either EPERM or EACCES as "no soup for you". + Changes to permissions on DLPI systems. + Add DLT_IEEE802_15_4_NOFCS for 802.15.4 interfaces. + +Fri. August 6, 2010. guy@alum.mit.edu. +Summary for 1.1.2 libpcap release + Return DLT_ values, not raw LINKTYPE_ values from + pcap_datalink() when reading pcap-ng files + Add support for "wlan ra" and "wlan ta", to check the RA and TA + of WLAN frames that have them + Don't crash if "wlan addr{1,2,3,4}" are used without 802.11 + headers + Do filtering on USB and Bluetooth capturing + On FreeBSD/SPARC64, use -fPIC - it's apparently necessary + Check for valid port numbers (fit in a 16-bit unsigned field) in + "port" filters + Reject attempts to put savefiles into non-blocking mode + Check for "no such device" for the "get the media types" ioctl + in *BSD + Improve error messages from bpf_open(), and let it do the error + handling + Return more specific errors from pcap_can_set_rfmon(); fix + documentation + Update description fetching code for FreeBSD, fix code for + OpenBSD + Ignore /sys/net/dev files if we get ENODEV for them, not just + ENXIO; fixes handling of bonding devices on Linux + Fix check for a constant 0 argument to BPF_DIV + Use the right version of ar when cross-building + Free any filter set on a savefile when the savefile is closed + Include the CFLAGS setting when configure was run in the + compiler flags + Add support for 802.15.4 interfaces on Linux + +Thu. April 1, 2010. guy@alum.mit.edu. +Summary for 1.1.1 libpcap release + Update CHANGES to reflect more of the changes in 1.1.0. + Fix build on RHEL5. + Fix shared library build on AIX. + +Thu. March 11, 2010. ken@netfunctional.ca/guy@alum.mit.edu. +Summary for 1.1.0 libpcap release + Add SocketCAN capture support + Add Myricom SNF API support + Update Endace DAG and ERF support + Add support for shared libraries on Solaris, HP-UX, and AIX + Build, install, and un-install shared libraries by default; + don't build/install shared libraries on platforms we don't support + Fix building from a directory other than the source directory + Fix compiler warnings and builds on some platforms + Update config.guess and config.sub + Support monitor mode on mac80211 devices on Linux + Fix USB memory-mapped capturing on Linux; it requires a new DLT_ + value + On Linux, scan /sys/class/net for devices if we have it; scan + it, or /proc/net/dev if we don't have /sys/class/net, even if + we have getifaddrs(), as it'll find interfaces with no + addresses + Add limited support for reading pcap-ng files + Fix BPF driver-loading error handling on AIX + Support getting the full-length interface description on FreeBSD + In the lexical analyzer, free up any addrinfo structure we got back + from getaddrinfo(). + Add support for BPF and libdlpi in OpenSolaris (and SXCE) + Hyphenate "link-layer" everywhere + Add /sys/kernel/debug/usb/usbmon to the list of usbmon locations + In pcap_read_linux_mmap(), if there are no frames available, call + poll() even if we're in non-blocking mode, so we pick up + errors, and check for the errors in question. + Note that poll() works on BPF devices is Snow Leopard + If an ENXIO or ENETDOWN is received, it may mean the device has + gone away. Deal with it. + For BPF, raise the default capture buffer size to from 32k to 512k + Support ps_ifdrop on Linux + Added a bunch of #ifdef directives to make wpcap.dll (WinPcap) compile + under cygwin. + Changes to Linux mmapped captures. + Fix bug where create_ring would fail for particular snaplen and + buffer size combinations + Update pcap-config so that it handles libpcap requiring + additional libraries + Add workaround for threadsafeness on Windows + Add missing mapping for DLT_ENC <-> LINKTYPE_ENC + DLT: Add DLT_CAN_SOCKETCAN + DLT: Add Solaris ipnet + Don't check for DLT_IPNET if it's not defined + Add link-layer types for Fibre Channel FC-2 + Add link-layer types for Wireless HART + Add link-layer types for AOS + Add link-layer types for DECT + Autoconf fixes (AIX, HP-UX, OSF/1, Tru64 cleanups) + Install headers unconditionally, and include vlan.h/bluetooth.h if + enabled + Autoconf fixes+cleanup + Support enabling/disabling bluetooth (--{en,dis}able-bluetooth) + Support disabling SITA support (--without-sita) + Return -1 on failure to create packet ring (if supported but + creation failed) + Fix handling of 'any' device, so that it can be opened, and no longer + attempt to open it in Monitor mode + Add support for snapshot length for USB Memory-Mapped Interface + Fix configure and build on recent Linux kernels + Fix memory-mapped Linux capture to support pcap_next() and + pcap_next_ex() + Fixes for Linux USB capture + DLT: Add DLT_LINUX_EVDEV + DLT: Add DLT_GSMTAP_UM + DLT: Add DLT_GSMTAP_ABIS + +Mon. October 27, 2008. ken@netfunctional.ca. Summary for 1.0.0 libpcap release + Compile with IPv6 support by default + Compile with large file support on by default + Add pcap-config script, which deals with -I/-L flags for compiling + DLT: Add IPMB + DLT: Add LAPD + DLT: Add AX25 (AX.25 w/KISS header) + DLT: Add JUNIPER_ST + 802.15.4 support + Variable length 802.11 header support + X2E data type support + SITA ACN Interface support - see README.sita + Support for memory-mapped capture on Linux + Support for zerocopy BPF on platforms that support it + Support for setting buffer size when opening devices + Support for setting monitor mode when opening 802.11 devices + Better support for dealing with VLAN tagging/stripping on Linux + Fix dynamic library support on OSX + Return PCAP_ERROR_IFACE_NOT_UP if the interface isn't 'UP', so applications + can print better diagnostic information + Return PCAP_ERROR_PERM_DENIED if we don't have permission to open a device, so + applications can tell the user they need to go play with permissions + On Linux, ignore ENETDOWN so we can continue to capture packets if the + interface goes down and comes back up again. + On Linux, support new tpacket frame headers (2.6.27+) + On Mac OS X, add scripts for changing permissions on /dev/bpf* and launchd plist + On Solaris, support 'passive mode' on systems that support it + Fixes to autoconf and general build environment + Man page reorganization + cleanup + Autogenerate VERSION numbers better + +Mon. September 10, 2007. ken@xelerance.com. Summary for 0.9.8 libpcap release + Change build process to put public libpcap headers into pcap subir + DLT: Add value for IPMI IPMB packets + DLT: Add value for u10 Networks boards + Require for pf definitions - allows reading of pflog formatted + libpcap files on an OS other than where the file was generated + +Wed. April 25, 2007. ken@xelerance.com. Summary for 0.9.6 libpcap release + + Put the public libpcap headers into a pcap subdirectory in both the + source directory and the target include directory, and have include + files at the top-level directory to include those headers, for + backwards compatibility. + Add Bluetooth support + Add USB capturing support on Linux + Add support for the binary USB sniffing interface in Linux + Add support for new FreeBSD BIOCSDIRECTION ioctl + Add additional filter operations for 802.11 frame types + Add support for filtering on MTP2 frame types + Propagate some changes from the main branch, so the x.9 branch has + all the DLT_ and LINKTYPE_ values that the main branch does + Reserved a DLT_ and SAVEFILE_ value for PPI (Per Packet Info) + encapsulated packets + Add LINKTYPE_ for IEEE 802.15.4, with address fields padded as done + by Linux drivers + Add LINKTYPE_ value corresponding to DLT_IEEE802_16_MAC_CPS. + Add DLT for IEEE 802.16 (WiMAX) MAC Common Part Sublayer + Add DLT for Bluetooth HCI UART transport layer + When building a shared library, build with "-fPIC" on Linux to support x86_64 + Link with "$(CC) -shared" rather than "ld -shared" when building a + ".so" shared library + Add support for autoconf 2.60 + Fixes to discard unread packets when changing filters + Changes to handle name changes in the DAG library resulting from + switching to libtool. + Add support for new DAG ERF types. + Add an explicit "-ldag" when building the shared library, so the DAG + library dependency is explicit. + Mac OSX fixes for dealing with "wlt" devices + Fixes in add_or_find_if() & pcap_findalldevs() to optimize generating + device lists + Fixed a bug in pcap_open_live(). The return value of PacketSetHwFilter + was not checked. + +Tue. September 19, 2006. ken@xelerance.com. Summary for 0.9.5 libpcap release + + Support for LAPD frames with vISDN + Support for ERF on channelized T1/E1 cards via DAG API + Fix capitalization that caused issues crossc compiling on Linux + Better failure detection on PacketGetAdapterNames() + Fixes for MPLS packet generation (link layer) + OP_PACKET now matches the beginning of the packet, instead of + beginning+link-layer + Add DLT/LINKTYPE for carrying FRF.16 Multi-link Frame Relay + Fix allocation of buffer for list of link-layer types + Added a new DLT and LINKTYPE value for ARINC 653 Interpartition Communcation Messages + Fixed a typo in a DLT value: it should start with DLT_ and not LINKTYPE_ + Redefined DLT_CAN20B and LINKTYPE_CAN20B as #190 (as this is the right value for CAN). + Added definition for DLT_A429 and LINKTYPE_A429 as #184. + Added a new DLT and LINKTYPE value for CAN v2.0B frames. + Add support for DLT_JUNIPER_VP. + Don't double-count received packets on Linux systems that + support the PACKET_STATISTICS getsockopt() argument on + PF_PACKET sockets. + Add support for DLT_IEEE802_11 and DLT_IEEE802_11_RADIO link + layers in Windows + Add support to build libpcap.lib and wpcap.dll under Cygnus and + MingW32. + +Mon. September 5, 2005. ken@xelerance.com. Summary for 0.9.4 libpcap release + + Support for radiotap on Linux (Mike Kershaw) + Fixes for HP-UX + Support for additional Juniper link-layer types + Fixes for filters on MPLS-encapsulated packets + "vlan" filter fixed + "pppoed" and "pppoes" filters added; the latter modifies later + parts of the filter expression to look at the PPP headers and + headers in the PPP payload + +Tue. July 5, 2005. ken@xelerance.com. Summary for 0.9.3 libpcap release + + Fixes for compiling on nearly every platform, + including improved 64bit support + MSDOS Support + Add support for sending packets + OpenBSD pf format support + IrDA capture (Linux only) + +Tue. March 30, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.3 release + + Fixed minor problem in gencode.c that would appear on 64-bit + platforms. + Version number is now sane. + +Mon. March 29, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.2 release + + updates for autoconf 2.5 + fixes for ppp interfaces for freebsd 4.1 + pcap gencode can generate code for 802.11, IEEE1394, and pflog. + +Wed. November 12, 2003. mcr@sandelman.ottawa.on.ca. Summary for 0.8 release + + added pcap_findalldevs() + Win32 patches from NetGroup, Politecnico di Torino (Italy) + OpenBSD pf, DLT_PFLOG added + Many changes to ATM support. + lookup pcap_lookupnet() + Added DLT_ARCNET_LINUX, DLT_ENC, DLT_IEEE802_11_RADIO, DLT_SUNATM, + DLT_IP_OVER_FC, DLT_FRELAY, others. + Sigh. More AIX wonderfulness. + Document updates. + Changes to API: pcap_next_ex(), pcap_breakloop(), pcap_dump_flush(), + pcap_list_datalinks(), pcap_set_datalink(), + pcap_lib_version(), pcap_datalink_val_to_name(), + pcap_datalink_name_to_val(), new error returns. + +Tuesday, February 25, 2003. fenner@research.att.com. 0.7.2 release + + Support link types that use 802.2 always, never, and sometimes. + Don't decrease the size of the BPF buffer from the default. + Support frame relay. + Handle 32-bit timestamps in DLPI, and pass the right buffer size. + Handle Linux systems with modern kernel but without + SOL_PACKET in the userland headers. + Linux support for ARPHRD_RAWHDLC. + Handle 32-bit timestamps in snoop. + Support eg (Octane/O2xxx/O3xxx Gigabit) devices. + Add new reserved DLT types. + +Monday October 23, 2001. mcr@sandelman.ottawa.on.ca. Summary for 0.7 release + + Added pcap_findalldevs() call to get list of interfaces in a MI way. + + pcap_stats() has been documented as to what its counters mean on + each platform. + +Tuesday January 9, 2001. guy@alum.mit.edu. Summary for 0.6 release + + New Linux libpcap implementation, which, in 2.2 and later + kernels, uses PF_PACKET sockets and supports kernel packet + filtering (if compiled into the kernel), and supports the "any" + device for capturing on all interfaces. Cleans up promiscuous + mode better on pre-2.2 kernels, and has various other fixes + (handles 2.4 ARPHRD_IEEE802_TR, handles ISDN devices better, + doesn't show duplicate packets on loopback interface, etc.). + + Fixed HP-UX libpcap implementation to correctly get the PPA for + an interface, to allow interfaces to be opened by interface name. + + libpcap savefiles have system-independent link-layer type values + in the header, rather than sometimes platform-dependent DLT_ + values, to make it easier to exchange capture files between + different OSes. + + Non-standard capture files produced by some Linux tcpdumps, e.g. + the one from Red Hat Linux 6.2 and later, can now be read. + + Updated autoconf stock files. + + Filter expressions can filter on VLAN IDs and various OSI + protocols, and work on Token Ring (with non-source-routed + packets). + + "pcap_open_dead()" added to allow compiling filter expressions + to pcap code without opening a capture device or capture file. + + Header files fixed to allow use in C++ programs. + + Removed dependancy on native headers for packet layout. + Removed Linux specific headers that were shipped. + + Security fixes: Strcpy replaced with strlcpy, sprintf replaced + with snprintf. + + Fixed bug that could cause subsequent "pcap_compile()"s to fail + erroneously after one compile failed. + + Assorted other bug fixes. + + README.aix and README.linux files added to describe + platform-specific issues. + + "getifaddrs()" rather than SIOCGIFCONF used, if available. + +v0.5 Sat Jun 10 11:09:15 PDT 2000 + +itojun@iijlab.net +- Brought in KAME IPv6/IPsec bpf compiler. +- Fixes for NetBSD. +- Support added for OpenBSD DLT_LOOP and BSD/OS DLT_C_HDLC (Cisco HDLC), + and changes to work around different BSDs having different DLT_ types + with the same numeric value. + +Assar Westerlund +- Building outside the source code tree fixed. +- Changed to write out time stamps with 32-bit seconds and microseconds + fields, regardless of whether those fields are 32 bits or 64 bits in + the OS's native "struct timeval". +- Changed "pcap_lookupdev()" to dynamically grow the buffer into which + the list of interfaces is read as necessary in order to hold the + entire list. + +Greg Troxel +- Added a new "pcap_compile_nopcap()", which lets you compile a filter + expression into a BPF program without having an open live capture or + capture file. + +v0.4 Sat Jul 25 12:40:09 PDT 1998 + +- Fix endian problem with DLT_NULL devices. From FreeBSD via Bill + Fenner (fenner@parc.xerox.com) + +- Fix alignment problem with FDDI under DLPI. This was causing core + dumps under Solaris. + +- Added configure options to disable flex and bison. Resulted from a + bug report by barnett@grymoire.crd.ge.com (Bruce Barnett). Also added + options to disable gcc and to force a particular packet capture type. + +- Added support for Fore ATM interfaces (qaa and fa) under IRIX. Thanks + to John Hawkinson (jhawk@mit.edu) + +- Change Linux PPP and SLIP to use DLT_RAW since the kernel does not + supply any "link layer" data. + +- Change Linux to use SIOCGIFHWADDR ioctl to determine link layer type. + Thanks to Thomas Sailer (sailer@ife.ee.ethz.ch) + +- Change IRIX PPP to use DLT_RAW since the kernel does not supply any + "link layer" data. + +- Modified to support the new BSD/OS 2.1 PPP and SLIP link layer header + formats. + +- Added some new SGI snoop interface types. Thanks to Steve Alexander + (sca@refugee.engr.sgi.com) + +- Fixes for HP-UX 10.20 (which is similar to HP-UX 9). Thanks to + Richard Allen (ra@hp.is) and Steinar Haug (sthaug@nethelp.no) + +- Fddi supports broadcast as reported by Jeff Macdonald + (jeff@iacnet.com). Also correct ieee802 and arcnet. + +- Determine Linux pcap buffer size at run time or else it might not be + big enough for some interface types (e.g. FDDI). Thanks to Jes + Sorensen (Jes.Sorensen@cern.ch) + +- Fix some linux alignment problems. + +- Document promisc argument to pcap_open_live(). Reported by Ian Marsh + (ianm@sics.se) + +- Support Metricom radio packets under Linux. Thanks to Kevin Lai + (laik@gunpowder.stanford.edu) + +- Bind to interface name under Linux to avoid packets from multiple + interfaces on multi-homed hosts. Thanks to Kevin Lai + (laik@gunpowder.stanford.edu) + +- Change L_SET to SEEK_SET for HP-UX. Thanks to Roland Roberts + (rroberts@muller.com) + +- Fixed an uninitialized memory reference found by Kent Vander Velden + (graphix@iastate.edu) + +- Fixed lex pattern for IDs to allow leading digits. As reported by + Theo de Raadt (deraadt@cvs.openbsd.org) + +- Fixed Linux include file problems when using GNU libc. + +- Ifdef ARPHRD_FDDI since not all versions of the Linux kernel have it. + Reported reported by Eric Jacksch (jacksch@tenebris.ca) + +- Fixed bug in pcap_dispatch() that kept it from returning on packet + timeouts. + +- Changed ISLOOPBACK() macro when IFF_LOOPBACK isn't available to check + for "lo" followed by an eos or digit (newer versions of Linux + apparently call the loopback "lo" instead of "lo0"). + +- Fixed Linux networking include files to use ints instead of longs to + avoid problems with 64 bit longs on the alpha. Thanks to Cristian + Gafton (gafton@redhat.com) + +v0.3 Sat Nov 30 20:56:27 PST 1996 + +- Added Linux support. + +- Fixed savefile bugs. + +- Solaris x86 fix from Tim Rylance (t.rylance@elsevier.nl) + +- Add support for bpf kernel port filters. + +- Remove duplicate atalk protocol table entry. Thanks to Christian + Hopps (chopps@water.emich.edu) + +- Fixed pcap_lookupdev() to ignore nonexistent devices. This was + reported to happen under BSD/OS by David Vincenzetti + (vince@cryptonet.it) + +- Avoid solaris compiler warnings. Thanks to Bruce Barnett + (barnett@grymoire.crd.ge.com) + +v0.2.1 Sun Jul 14 03:02:26 PDT 1996 + +- Fixes for HP-UX 10. Thanks in part to to Thomas Wolfram + (wolf@prz.tu-berlin.de) and Rick Jones (raj@hpisrdq.cup.hp.com) + +- Added support for SINIX. Thanks to Andrej Borsenkow + (borsenkow.msk@sni.de) + +- Fixes for AIX (although this system is not yet supported). Thanks to + John Hawkinson (jhawk@mit.edu) + +- Use autoconf's idea of the top level directory in install targets. + Thanks to John Hawkinson. + +- Add missing autoconf packet capture result message. Thanks to Bill + Fenner (fenner@parc.xerox.com) + +- Fixed padding problems in the pf module. + +- Fixed some more alignment problems on the alpha. + +- Added explicit netmask support. Thanks to Steve Nuchia + (steve@research.oknet.com) + +- Fixed to handle raw ip addresses such as 0.0.0.1 without "left + justifing" + +- Add "sca" keyword (for DEC cluster services) as suggested by Terry + Kennedy (terry@spcvxa.spc.edu) + +- Add "atalk" keyword as suggested by John Hawkinson. + +- Add "igrp" keyword. + +- Fixed HID definition in grammar.y to be a string, not a value. + +- Use $CC when checking gcc version. Thanks to Carl Lindberg + (carl_lindberg@blacksmith.com) + +- Removed obsolete reference to pcap_immediate() from the man page. + Michael Stolarchuk (mts@terminator.rs.itd.umich.edu) + +- DLT_NULL has a 4 byte family header. Thanks to Jeffrey Honig + (jch@bsdi.com) + +v0.2 Sun Jun 23 02:28:42 PDT 1996 + +- Add support for HP-UX. Resulted from code contributed by Tom Murray + (tmurray@hpindck.cup.hp.com) and Philippe-Andri Prindeville + (philipp@res.enst.fr) + +- Update INSTALL with a reminder to install include files. Thanks to + Mark Andrews (mandrews@aw.sgi.com) + +- Fix bpf compiler alignment bug on the alpha. + +- Use autoconf to detect architectures that can't handle misaligned + accesses. + +- Added loopback support for snoop. Resulted from report Steve + Alexander (sca@engr.sgi.com) + +v0.1 Fri Apr 28 18:11:03 PDT 1995 + +- Fixed compiler and optimizer bugs. The BPF filter engine uses unsigned + comparison operators, while the code generator and optimizer assumed + signed semantics in several places. Thanks to Charlie Slater + (cslater@imatek.com) for pointing this out. + +- Removed FDDI ifdef's, they aren't really needed. Resulted from report + by Gary Veum (veum@boa.gsfc.nasa.gov). + +- Add pcap-null.c which allows offline use of libpcap on systems that + don't support live package capture. This feature resulting from a + request from Jan van Oorschot (j.p.m.voorschot@et.tudelft.nl). + +- Make bpf_compile() reentrant. Fix thanks to Pascal Hennequin + (Pascal.Hennequin@hugo.int-evry.fr). + +- Port to GNU autoconf. + +- Fix pcap-dlpi.c to work with isdn. Resulted from report by Flemming + Johansen (fsj@csd.cri.dk). + +- Handle multi-digit interface unit numbers (aka ppa's) under dlpi. + Resulted from report by Daniel Ehrlich (ehrlich@cse.psu.edu). + +- Fix pcap-dlpi.c to work in non-promiscuous mode. Resulted from report + by Jeff Murphy (jcmurphy@acsu.buffalo.edu). + +- Add support for "long jumps". Thanks to Jeffrey Mogul + (mogul@pa.dec.com). + +- Fix minor problems when compiling with BDEBUG as noticed by Scott + Bertilson (scott@unet.umn.edu). + +- Declare sys_errlist "const char *const" to avoid problems under + FreeBSD. Resulted from report by jher@eden.com. + +v0.0.6 Fri Apr 28 04:07:13 PDT 1995 + +- Add missing variable declaration missing from 0.0.6 + +v0.0.5 Fri Apr 28 00:22:21 PDT 1995 + +- Workaround for problems when pcap_read() returns 0 due to the timeout + expiring. + +v0.0.4 Thu Apr 20 20:41:48 PDT 1995 + +- Change configuration to not use gcc v2 flags with gcc v1. + +- Fixed a bug in pcap_next(); if pcap_dispatch() returns 0, pcap_next() + should also return 0. Thanks to Richard Stevens (rstevens@noao.edu). + +- Fixed configure to test for snoop before dlpi to avoid problems under + IRIX 5. Thanks to J. Eric Townsend (jet@abulafia.genmagic.com). + +- Hack around deficiency in Ultrix's make. + +- Fix two bugs related to the Solaris pre-5.3.2 bufmod bug; handle + savefiles that have more than snapshot bytes of data in them (so we + can read old savefiles) and avoid writing such files. + +- Added checkioctl which is used with gcc to check that the + "fixincludes" script has been run. + +v0.0.3 Tue Oct 18 18:13:46 PDT 1994 + +- Fixed configure to test for snoop before dlpi to avoid problems under + IRIX 5. Thanks to J. Eric Townsend (jet@abulafia.genmagic.com). + +v0.0.2 Wed Oct 12 20:56:37 PDT 1994 + +- Implement timeout in the dlpi pcap_open_live(). Thanks to Richard + Stevens. + +- Determine pcap link type from dlpi media type. Resulted from report + by Mahesh Jethanandani (mahesh@npix.com). + +v0.0.1 Fri Jun 24 14:50:57 PDT 1994 + +- Fixed bug in nit_setflags() in pcap-snit.c. The streams ioctl timeout + wasn't being initialized sometimes resulting in an "NIOCSFLAGS: + Invalid argument" error under OSF/1. Reported by Matt Day + (mday@artisoft.com) and Danny Mitzel (dmitzel@whitney.hitc.com). + +- Turn on FDDI support by default. + +v0.0 Mon Jun 20 19:20:16 PDT 1994 + +- Initial release. + +- Fixed bug with greater/less keywords, reported by Mark Andrews + (mandrews@alias.com). + +- Fix bug where '|' was defined as BPF_AND instead of BPF_OR, reported + by Elan Amir (elan@leeb.cs.berkeley.edu). + +- Machines with little-endian byte ordering are supported thanks to + Jeff Mogul. + +- Add hack for version 2.3 savefiles which don't have caplen and len + swapped thanks to Vern Paxson. + +- Added "&&" and "||" aliases for "and" and "or" thanks to Vern Paxson. + +- Added length, inbound and outbound keywords. Added: stable/11/contrib/libpcap/CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/contrib/libpcap/CMakeLists.txt Mon Jun 25 15:09:55 2018 (r335640) @@ -0,0 +1,2294 @@ +cmake_minimum_required(VERSION 2.8.6) + +# +# Apple doesn't build with an install_name starting with @rpath, and +# neither do we with autotools; don't do so with CMake, either, and +# suppress warnings about that. +# +if(POLICY CMP0042) + cmake_policy(SET CMP0042 OLD) +endif() + +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) + +project(pcap) + +# +# Try to enable as many C99 features as we can. +# At minimum, we want C++/C99-style // comments. +# +# Newer versions of compilers might default to supporting C99, but older +# versions may require a special flag. +# +# Prior to CMake 3.1, setting CMAKE_C_STANDARD will not have any effect, +# so, unless and until we require CMake 3.1 or later, we have to do it +# ourselves on pre-3.1 CMake, so we just do it ourselves on all versions +# of CMake. +# +# Note: with CMake 3.1 through 3.5, the only compilers for which CMake +# handles CMAKE_C_STANDARD are GCC and Clang. 3.6 adds support only +# for Intel C; 3.9 adds support for PGI C, Sun C, and IBM XL C, and +# 3.10 adds support for Cray C and IAR C, but no version of CMake has +# support for HP C. Therefore, even if we use CMAKE_C_STANDARD with +# compilers for which CMake supports it, we may still have to do it +# ourselves on other compilers. +# +# See the CMake documentation for the CMAKE__COMPILER_ID variables +# for a list of compiler IDs. +# +# We don't worry about MSVC; it doesn't have such a flag - either it +# doesn't support the C99 features we need at all, or it supports them +# regardless of the compiler flag. +# +# XXX - this just tests whether the option works and adds it if it does. +# We don't test whether it's necessary in order to get the C99 features +# that we use; if we ever have a user who tries to compile with a compiler +# that can't be made to support those features, we can add a test to make +# sure we actually *have* C99 support. +# +include(CheckCCompilerFlag) +macro(check_and_add_compiler_option _option) + message(STATUS "Checking C compiler flag ${_option}") + string(REPLACE "=" "-" _temp_option_variable ${_option}) + string(REGEX REPLACE "^-" "" _option_variable ${_temp_option_variable}) + check_c_compiler_flag("${_option}" ${_option_variable}) + if(${${_option_variable}}) + set(C_ADDITIONAL_FLAGS "${C_ADDITIONAL_FLAGS} ${_option}") + endif() +endmacro() + +set(C_ADDITIONAL_FLAGS "") +if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR + CMAKE_C_COMPILER_ID MATCHES "Clang") + check_and_add_compiler_option("-std=gnu99") +elseif(CMAKE_C_COMPILER_ID MATCHES "XL") + # + # We want support for extensions picked up for GNU C compatibility, + # so we use -qlanglvl=extc99. + # + check_and_add_compiler_option("-qlanglvl=extc99") +elseif(CMAKE_C_COMPILER_ID MATCHES "HP") + check_and_add_compiler_option("-AC99") +elseif(CMAKE_C_COMPILER_ID MATCHES "Sun") + check_and_add_compiler_option("-xc99") +elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") + check_and_add_compiler_option("-c99") +endif() + +# +# Build all runtimes in the top-level binary directory; that way, +# on Windows, the executables will be in the same directory as +# the DLLs, so the system will find pcap.dll when any of the +# executables are run. +# +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run) + +################################################################### +# Parameters +################################################################### + +if(WIN32) + # + # On Windows, allow the library name to be overridden, for the + # benefit of projects that combine libpcap with their own + # kernel-mode code to support capturing. + # + set(LIBRARY_NAME pcap CACHE STRING "Library name") +else() + # + # On UN*X, it's always been libpcap. + # + set(LIBRARY_NAME pcap) +endif() + +option(INET6 "Enable IPv6" ON) +if(WIN32) + option(USE_STATIC_RT "Use static Runtime" ON) +endif(WIN32) +option(BUILD_SHARED_LIBS "Build shared libraries" ON) +if(WIN32) + set(PACKET_DLL_DIR "" CACHE PATH "Path to directory with include and lib subdirectories for packet.dll") +endif(WIN32) + +# To pacify those who hate the protochain instruction +option(NO_PROTOCHAIN "Disable protochain instruction" OFF) + +# +# Start out with the capture mechanism type unspecified; the user +# can explicitly specify it and, if they don't, we'll pick an +# appropriate one. +# +set(PCAP_TYPE "" CACHE STRING "Packet capture type") + +# +# Default to having remote capture support on Windows and, for now, to +# not having it on UN*X. +# +if(WIN32) + option(ENABLE_REMOTE "Enable remote capture" ON) +else() + option(ENABLE_REMOTE "Enable remote capture" OFF) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Mon Jun 25 18:53:07 2018 Return-Path: Delivered-To: svn-src-stable@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 3F09C101B20F; Mon, 25 Jun 2018 18:53:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 E468B894D0; Mon, 25 Jun 2018 18:53:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB7481128; Mon, 25 Jun 2018 18:53:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5PIr6c1054842; Mon, 25 Jun 2018 18:53:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PIr6dp054840; Mon, 25 Jun 2018 18:53:06 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806251853.w5PIr6dp054840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 25 Jun 2018 18:53: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: r335643 - stable/11/share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/11/share/mk X-SVN-Commit-Revision: 335643 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2018 18:53:07 -0000 Author: bdrewery Date: Mon Jun 25 18:53:06 2018 New Revision: 335643 URL: https://svnweb.freebsd.org/changeset/base/335643 Log: MFC r321427,r321445: r321427: PROGS: Fix ESTALE errors on NFS while cleaning in directories with PROGS. r321445: cleandir: Fix ESTALE errors from parallel removals. Modified: stable/11/share/mk/bsd.obj.mk stable/11/share/mk/bsd.progs.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.obj.mk ============================================================================== --- stable/11/share/mk/bsd.obj.mk Mon Jun 25 17:17:47 2018 (r335642) +++ stable/11/share/mk/bsd.obj.mk Mon Jun 25 18:53:06 2018 (r335643) @@ -157,6 +157,7 @@ whereobj: @echo ${.OBJDIR} .endif +# Same check in bsd.progs.mk .if ${CANONICALOBJDIR} != ${.CURDIR} && exists(${CANONICALOBJDIR}/) cleanobj: -rm -rf ${CANONICALOBJDIR} @@ -182,9 +183,9 @@ clean: .endif .ORDER: clean all -cleandir: cleanobj - .include + +cleandir: .WAIT cleanobj .if make(destroy*) && defined(OBJROOT) # this (rm -rf objdir) is much faster and more reliable than cleaning. Modified: stable/11/share/mk/bsd.progs.mk ============================================================================== --- stable/11/share/mk/bsd.progs.mk Mon Jun 25 17:17:47 2018 (r335642) +++ stable/11/share/mk/bsd.progs.mk Mon Jun 25 18:53:06 2018 (r335643) @@ -116,7 +116,16 @@ ${_PROGS_COMMON_OBJS}: .NOMETA .if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) # tell progs.mk we might want to install things -PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install +PROGS_TARGETS+= checkdpadd clean depend install +# Only handle removing depend files from the main process. +_PROG_MK.cleandir= CLEANDEPENDFILES= CLEANDEPENDDIRS= +_PROG_MK.cleanobj= CLEANDEPENDFILES= CLEANDEPENDDIRS= +# Only recurse on these if there is no objdir, meaning a normal +# 'clean' gets ran via the target defined in bsd.obj.mk. +# Same check from cleanobj: in bsd.obj.mk +.if ${CANONICALOBJDIR} == ${.CURDIR} || !exists(${CANONICALOBJDIR}/) +PROGS_TARGETS+= cleandir cleanobj +.endif # Ensure common objects are built before recursing. .if !empty(_PROGS_COMMON_OBJS) @@ -142,7 +151,7 @@ $p.$t: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \ - PROG=$p ${x.$p} ${@:E}) + ${_PROG_MK.${t}} PROG=$p ${x.$p} ${@:E}) .endfor .endfor From owner-svn-src-stable@freebsd.org Tue Jun 26 08:31:09 2018 Return-Path: Delivered-To: svn-src-stable@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 85E29101964B; Tue, 26 Jun 2018 08:31:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 35F0585FB4; Tue, 26 Jun 2018 08:31:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16E4B11D11; Tue, 26 Jun 2018 08:31:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5Q8V8b1074254; Tue, 26 Jun 2018 08:31:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q8V8jH074251; Tue, 26 Jun 2018 08:31:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806260831.w5Q8V8jH074251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 26 Jun 2018 08:31:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335656 - in stable/11/sys: dev/acpica kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys: dev/acpica kern sys X-SVN-Commit-Revision: 335656 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 08:31:09 -0000 Author: avg Date: Tue Jun 26 08:31:08 2018 New Revision: 335656 URL: https://svnweb.freebsd.org/changeset/base/335656 Log: MFC r333994: stop and restart kernel event timers in the suspend / resume cycle Modified: stable/11/sys/dev/acpica/acpi.c stable/11/sys/kern/kern_clocksource.c stable/11/sys/sys/systm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/acpica/acpi.c ============================================================================== --- stable/11/sys/dev/acpica/acpi.c Tue Jun 26 06:18:59 2018 (r335655) +++ stable/11/sys/dev/acpica/acpi.c Tue Jun 26 08:31:08 2018 (r335656) @@ -2909,6 +2909,7 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) if (sc->acpi_sleep_delay > 0) DELAY(sc->acpi_sleep_delay * 1000000); + suspendclock(); intr = intr_disable(); if (state != ACPI_STATE_S1) { sleep_result = acpi_sleep_machdep(sc, state); @@ -2979,6 +2980,8 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) * process. This handles both the error and success cases. */ backout: + if (slp_state >= ACPI_SS_SLP_PREP) + resumeclock(); if (slp_state >= ACPI_SS_GPE_SET) { acpi_wake_prep_walk(state); sc->acpi_sstate = ACPI_STATE_S0; Modified: stable/11/sys/kern/kern_clocksource.c ============================================================================== --- stable/11/sys/kern/kern_clocksource.c Tue Jun 26 06:18:59 2018 (r335655) +++ stable/11/sys/kern/kern_clocksource.c Tue Jun 26 08:31:08 2018 (r335656) @@ -692,6 +692,22 @@ cpu_initclocks_ap(void) spinlock_exit(); } +void +suspendclock(void) +{ + ET_LOCK(); + configtimer(0); + ET_UNLOCK(); +} + +void +resumeclock(void) +{ + ET_LOCK(); + configtimer(1); + ET_UNLOCK(); +} + /* * Switch to profiling clock rates. */ Modified: stable/11/sys/sys/systm.h ============================================================================== --- stable/11/sys/sys/systm.h Tue Jun 26 06:18:59 2018 (r335655) +++ stable/11/sys/sys/systm.h Tue Jun 26 08:31:08 2018 (r335656) @@ -318,6 +318,8 @@ void startprofclock(struct proc *); void stopprofclock(struct proc *); void cpu_startprofclock(void); void cpu_stopprofclock(void); +void suspendclock(void); +void resumeclock(void); sbintime_t cpu_idleclock(void); void cpu_activeclock(void); void cpu_new_callout(int cpu, sbintime_t bt, sbintime_t bt_opt); From owner-svn-src-stable@freebsd.org Tue Jun 26 08:36:00 2018 Return-Path: Delivered-To: svn-src-stable@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 D393C10199D4; Tue, 26 Jun 2018 08:35:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 82A5586362; Tue, 26 Jun 2018 08:35:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63C6311E70; Tue, 26 Jun 2018 08:35:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5Q8ZxDd075952; Tue, 26 Jun 2018 08:35:59 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q8Zw0j075948; Tue, 26 Jun 2018 08:35:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806260835.w5Q8Zw0j075948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 26 Jun 2018 08:35:58 +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: r335657 - in stable/11/sys: amd64/include dev/acpica i386/include x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys: amd64/include dev/acpica i386/include x86/x86 X-SVN-Commit-Revision: 335657 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 08:36:00 -0000 Author: avg Date: Tue Jun 26 08:35:58 2018 New Revision: 335657 URL: https://svnweb.freebsd.org/changeset/base/335657 Log: MFC r334204,r334338: re-synchronize TSC-s on SMP systems after resume Modified: stable/11/sys/amd64/include/clock.h stable/11/sys/dev/acpica/acpi.c stable/11/sys/i386/include/clock.h stable/11/sys/x86/x86/tsc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/include/clock.h ============================================================================== --- stable/11/sys/amd64/include/clock.h Tue Jun 26 08:31:08 2018 (r335656) +++ stable/11/sys/amd64/include/clock.h Tue Jun 26 08:35:58 2018 (r335657) @@ -34,6 +34,7 @@ void clock_init(void); void startrtclock(void); void init_TSC(void); +void resume_TSC(void); #define HAS_TIMER_SPKR 1 int timer_spkr_acquire(void); Modified: stable/11/sys/dev/acpica/acpi.c ============================================================================== --- stable/11/sys/dev/acpica/acpi.c Tue Jun 26 08:31:08 2018 (r335656) +++ stable/11/sys/dev/acpica/acpi.c Tue Jun 26 08:35:58 2018 (r335657) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #if defined(__i386__) || defined(__amd64__) +#include #include #endif #include @@ -2991,6 +2992,10 @@ backout: if (slp_state >= ACPI_SS_SLP_PREP) AcpiLeaveSleepState(state); if (slp_state >= ACPI_SS_SLEPT) { +#if defined(__i386__) || defined(__amd64__) + /* NB: we are still using ACPI timecounter at this point. */ + resume_TSC(); +#endif acpi_resync_clock(sc); acpi_enable_fixed_events(sc); } Modified: stable/11/sys/i386/include/clock.h ============================================================================== --- stable/11/sys/i386/include/clock.h Tue Jun 26 08:31:08 2018 (r335656) +++ stable/11/sys/i386/include/clock.h Tue Jun 26 08:35:58 2018 (r335657) @@ -32,6 +32,7 @@ void clock_init(void); void startrtclock(void); void timer_restore(void); void init_TSC(void); +void resume_TSC(void); #define HAS_TIMER_SPKR 1 int timer_spkr_acquire(void); Modified: stable/11/sys/x86/x86/tsc.c ============================================================================== --- stable/11/sys/x86/x86/tsc.c Tue Jun 26 08:31:08 2018 (r335656) +++ stable/11/sys/x86/x86/tsc.c Tue Jun 26 08:35:58 2018 (r335657) @@ -450,7 +450,7 @@ adj_smp_tsc(void *arg) } static int -test_tsc(void) +test_tsc(int adj_max_count) { uint64_t *data, *tsc; u_int i, size, adj; @@ -466,7 +466,7 @@ retry: smp_tsc = 1; /* XXX */ smp_rendezvous(smp_no_rendezvous_barrier, comp_smp_tsc, smp_no_rendezvous_barrier, data); - if (!smp_tsc && adj < smp_tsc_adjust) { + if (!smp_tsc && adj < adj_max_count) { adj++; smp_rendezvous(smp_no_rendezvous_barrier, adj_smp_tsc, smp_no_rendezvous_barrier, data); @@ -504,19 +504,6 @@ retry: #undef N -#else - -/* - * The function is not called, it is provided to avoid linking failure - * on uniprocessor kernel. - */ -static int -test_tsc(void) -{ - - return (0); -} - #endif /* SMP */ static void @@ -577,9 +564,12 @@ init_TSC_tc(void) * non-zero value. The TSC seems unreliable in virtualized SMP * environments, so it is set to a negative quality in those cases. */ +#ifdef SMP if (mp_ncpus > 1) - tsc_timecounter.tc_quality = test_tsc(); - else if (tsc_is_invariant) + tsc_timecounter.tc_quality = test_tsc(smp_tsc_adjust); + else +#endif /* SMP */ + if (tsc_is_invariant) tsc_timecounter.tc_quality = 1000; max_freq >>= tsc_shift; @@ -613,6 +603,32 @@ init: } } SYSINIT(tsc_tc, SI_SUB_SMP, SI_ORDER_ANY, init_TSC_tc, NULL); + +void +resume_TSC(void) +{ +#ifdef SMP + int quality; + + /* If TSC was not good on boot, it is unlikely to become good now. */ + if (tsc_timecounter.tc_quality < 0) + return; + /* Nothing to do with UP. */ + if (mp_ncpus < 2) + return; + + /* + * If TSC was good, a single synchronization should be enough, + * but honour smp_tsc_adjust if it's set. + */ + quality = test_tsc(MAX(smp_tsc_adjust, 1)); + if (quality != tsc_timecounter.tc_quality) { + printf("TSC timecounter quality changed: %d -> %d\n", + tsc_timecounter.tc_quality, quality); + tsc_timecounter.tc_quality = quality; + } +#endif /* SMP */ +} /* * When cpufreq levels change, find out about the (new) max frequency. We From owner-svn-src-stable@freebsd.org Tue Jun 26 08:56:35 2018 Return-Path: Delivered-To: svn-src-stable@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 8A8C2101C9AB; Tue, 26 Jun 2018 08:56:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 38560875E1; Tue, 26 Jun 2018 08:56:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1564E121A9; Tue, 26 Jun 2018 08:56:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5Q8uYhh086338; Tue, 26 Jun 2018 08:56:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q8uY5k086337; Tue, 26 Jun 2018 08:56:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806260856.w5Q8uY5k086337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 26 Jun 2018 08:56: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: r335658 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 335658 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 08:56:35 -0000 Author: avg Date: Tue Jun 26 08:56:34 2018 New Revision: 335658 URL: https://svnweb.freebsd.org/changeset/base/335658 Log: MFC r333268: for bus suspend, detach and shutdown iterate children in reverse order Modified: stable/11/sys/kern/subr_bus.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_bus.c ============================================================================== --- stable/11/sys/kern/subr_bus.c Tue Jun 26 08:35:58 2018 (r335657) +++ stable/11/sys/kern/subr_bus.c Tue Jun 26 08:56:34 2018 (r335658) @@ -3697,7 +3697,11 @@ bus_generic_detach(device_t dev) if (dev->state != DS_ATTACHED) return (EBUSY); - TAILQ_FOREACH(child, &dev->children, link) { + /* + * Detach children in the reverse order. + * See bus_generic_suspend for details. + */ + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { if ((error = device_detach(child)) != 0) return (error); } @@ -3717,7 +3721,11 @@ bus_generic_shutdown(device_t dev) { device_t child; - TAILQ_FOREACH(child, &dev->children, link) { + /* + * Shut down children in the reverse order. + * See bus_generic_suspend for details. + */ + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { device_shutdown(child); } @@ -3770,15 +3778,23 @@ int bus_generic_suspend(device_t dev) { int error; - device_t child, child2; + device_t child; - TAILQ_FOREACH(child, &dev->children, link) { + /* + * Suspend children in the reverse order. + * For most buses all children are equal, so the order does not matter. + * Other buses, such as acpi, carefully order their child devices to + * express implicit dependencies between them. For such buses it is + * safer to bring down devices in the reverse order. + */ + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { error = BUS_SUSPEND_CHILD(dev, child); - if (error) { - for (child2 = TAILQ_FIRST(&dev->children); - child2 && child2 != child; - child2 = TAILQ_NEXT(child2, link)) - BUS_RESUME_CHILD(dev, child2); + if (error != 0) { + child = TAILQ_NEXT(child, link); + if (child != NULL) { + TAILQ_FOREACH_FROM(child, &dev->children, link) + BUS_RESUME_CHILD(dev, child); + } return (error); } } From owner-svn-src-stable@freebsd.org Tue Jun 26 09:04:26 2018 Return-Path: Delivered-To: svn-src-stable@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 DC87A101D0CE; Tue, 26 Jun 2018 09:04:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 8E16388493; Tue, 26 Jun 2018 09:04:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EC0412338; Tue, 26 Jun 2018 09:04:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5Q94PHN091334; Tue, 26 Jun 2018 09:04:25 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q94OLa091330; Tue, 26 Jun 2018 09:04:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806260904.w5Q94OLa091330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 26 Jun 2018 09:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335659 - in stable/11/sys: dev/uart kern sys x86/acpica X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys: dev/uart kern sys x86/acpica X-SVN-Commit-Revision: 335659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 09:04:26 -0000 Author: avg Date: Tue Jun 26 09:04:24 2018 New Revision: 335659 URL: https://svnweb.freebsd.org/changeset/base/335659 Log: MFC r334340: add support for console resuming, implement it for uart, use on x86 Modified: stable/11/sys/dev/uart/uart_tty.c stable/11/sys/kern/kern_cons.c stable/11/sys/sys/cons.h stable/11/sys/x86/acpica/acpi_wakeup.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/uart/uart_tty.c ============================================================================== --- stable/11/sys/dev/uart/uart_tty.c Tue Jun 26 08:56:34 2018 (r335658) +++ stable/11/sys/dev/uart/uart_tty.c Tue Jun 26 09:04:24 2018 (r335659) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); static cn_probe_t uart_cnprobe; static cn_init_t uart_cninit; +static cn_init_t uart_cnresume; static cn_term_t uart_cnterm; static cn_getc_t uart_cngetc; static cn_putc_t uart_cnputc; @@ -67,7 +68,10 @@ static tsw_modem_t uart_tty_modem; static tsw_free_t uart_tty_free; static tsw_busy_t uart_tty_busy; -CONSOLE_DRIVER(uart); +CONSOLE_DRIVER( + uart, + .cn_resume = uart_cnresume, +); static struct uart_devinfo uart_console; @@ -110,6 +114,13 @@ uart_cninit(struct consdev *cp) di->type = UART_DEV_CONSOLE; uart_add_sysdev(di); uart_init(di); +} + +static void +uart_cnresume(struct consdev *cp) +{ + + uart_init(cp->cn_arg); } static void Modified: stable/11/sys/kern/kern_cons.c ============================================================================== --- stable/11/sys/kern/kern_cons.c Tue Jun 26 08:56:34 2018 (r335658) +++ stable/11/sys/kern/kern_cons.c Tue Jun 26 09:04:24 2018 (r335659) @@ -382,6 +382,19 @@ cnungrab() } } +void +cnresume() +{ + struct cn_device *cnd; + struct consdev *cn; + + STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { + cn = cnd->cnd_cn; + if (cn->cn_ops->cn_resume != NULL) + cn->cn_ops->cn_resume(cn); + } +} + /* * Low level console routines. */ Modified: stable/11/sys/sys/cons.h ============================================================================== --- stable/11/sys/sys/cons.h Tue Jun 26 08:56:34 2018 (r335658) +++ stable/11/sys/sys/cons.h Tue Jun 26 09:04:24 2018 (r335659) @@ -64,6 +64,8 @@ struct consdev_ops { /* grab console for exclusive kernel use */ cn_ungrab_t *cn_ungrab; /* ungrab console */ + cn_init_t *cn_resume; + /* set up console after sleep, optional */ }; struct consdev { @@ -103,8 +105,9 @@ extern struct tty *constty; /* Temporary virtual conso }; \ DATA_SET(cons_set, name) -#define CONSOLE_DRIVER(name) \ +#define CONSOLE_DRIVER(name, ...) \ static const struct consdev_ops name##_consdev_ops = { \ + /* Mandatory methods. */ \ .cn_probe = name##_cnprobe, \ .cn_init = name##_cninit, \ .cn_term = name##_cnterm, \ @@ -112,6 +115,8 @@ extern struct tty *constty; /* Temporary virtual conso .cn_putc = name##_cnputc, \ .cn_grab = name##_cngrab, \ .cn_ungrab = name##_cnungrab, \ + /* Optional fields. */ \ + __VA_ARGS__ \ }; \ CONSOLE_DEVICE(name##_consdev, name##_consdev_ops, NULL) @@ -124,6 +129,7 @@ void cnremove(struct consdev *); void cnselect(struct consdev *); void cngrab(void); void cnungrab(void); +void cnresume(void); int cncheckc(void); int cngetc(void); void cngets(char *, size_t, int); Modified: stable/11/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- stable/11/sys/x86/acpica/acpi_wakeup.c Tue Jun 26 08:56:34 2018 (r335658) +++ stable/11/sys/x86/acpica/acpi_wakeup.c Tue Jun 26 09:04:24 2018 (r335659) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -265,6 +266,12 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) for (;;) ia32_pause(); } else { + /* + * Re-initialize console hardware as soon as possibe. + * No console output (e.g. printf) is allowed before + * this point. + */ + cnresume(); #ifdef __amd64__ fpuresume(susppcbs[0]->sp_fpususpend); #else From owner-svn-src-stable@freebsd.org Tue Jun 26 13:29:50 2018 Return-Path: Delivered-To: svn-src-stable@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 B5812102629D; Tue, 26 Jun 2018 13:29:50 +0000 (UTC) (envelope-from gjb@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 6AA697037E; Tue, 26 Jun 2018 13:29:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BBD614D4B; Tue, 26 Jun 2018 13:29:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QDTokO023755; Tue, 26 Jun 2018 13:29:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QDTobM023754; Tue, 26 Jun 2018 13:29:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806261329.w5QDTobM023754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 26 Jun 2018 13:29: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: r335661 - stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Commit-Revision: 335661 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 13:29:50 -0000 Author: gjb Date: Tue Jun 26 13:29:49 2018 New Revision: 335661 URL: https://svnweb.freebsd.org/changeset/base/335661 Log: Document an issue with emulators/virtualbox-ose reported in Bugzilla 228535. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 26 09:30:14 2018 (r335660) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 26 13:29:49 2018 (r335661) @@ -173,6 +173,23 @@ boot for more information and updates as the issue is investigated. + + + [2018-06-26] An issue had been discovered late in the + release cycle where a system crash could occur after + installing emulators/virtualbox-ose from + upstream package mirrors via &man.pkg.8;. + + Building emulators/virtualbox-ose from + the &man.ports.7; collection has been observed to work + around the crash. + + See PR 228535 + for more information. + From owner-svn-src-stable@freebsd.org Tue Jun 26 13:53:34 2018 Return-Path: Delivered-To: svn-src-stable@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 BAD641027D43; Tue, 26 Jun 2018 13:53:34 +0000 (UTC) (envelope-from gjb@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 6E8AA714CD; Tue, 26 Jun 2018 13:53:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FB4B1524B; Tue, 26 Jun 2018 13:53:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QDrYZu038544; Tue, 26 Jun 2018 13:53:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QDrYhh038543; Tue, 26 Jun 2018 13:53:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806261353.w5QDrYhh038543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 26 Jun 2018 13:53: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: r335662 - stable/11/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/hardware X-SVN-Commit-Revision: 335662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 13:53:34 -0000 Author: gjb Date: Tue Jun 26 13:53:33 2018 New Revision: 335662 URL: https://svnweb.freebsd.org/changeset/base/335662 Log: Add a few missing drivers to the 11-STABLE hardware page. Submitted by: Grzegorz Junka list1 _@t_ gjunka.com Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Tue Jun 26 13:29:49 2018 (r335661) +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Tue Jun 26 13:53:33 2018 (r335662) @@ -822,6 +822,8 @@ &hwlist.age; + &hwlist.alc; + &hwlist.ale; &hwlist.aue; @@ -855,6 +857,8 @@ &hwlist.cxgbe; + &hwlist.cxgbev; + &hwlist.dc; &hwlist.de; @@ -896,6 +900,8 @@ &hwlist.lge; + &hwlist.liquidio; + &hwlist.mlx4en; &hwlist.mlx5en; @@ -1094,6 +1100,8 @@ &hwlist.ctau; &hwlist.cm; + + &hwlist.mos; From owner-svn-src-stable@freebsd.org Tue Jun 26 14:01:04 2018 Return-Path: Delivered-To: svn-src-stable@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 5D3C81027FC9; Tue, 26 Jun 2018 14:01:04 +0000 (UTC) (envelope-from gjb@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 0FAFD718AB; Tue, 26 Jun 2018 14:01:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E533D1528C; Tue, 26 Jun 2018 14:01:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QE13fl039922; Tue, 26 Jun 2018 14:01:03 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QE13n5039921; Tue, 26 Jun 2018 14:01:03 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806261401.w5QE13n5039921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 26 Jun 2018 14:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335663 - stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Commit-Revision: 335663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 14:01:04 -0000 Author: gjb Date: Tue Jun 26 14:01:03 2018 New Revision: 335663 URL: https://svnweb.freebsd.org/changeset/base/335663 Log: Document that a few device drivers were omitted from the 11.2 hardware page. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 26 13:53:33 2018 (r335662) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 26 14:01:03 2018 (r335663) @@ -190,6 +190,19 @@ boot xlink:href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228535">228535 for more information. + + + [2018-06-26] It was discovered after the releng/11.2 branch was tagged + for &os; 11.2-RELEASE that a few device drivers were + missing from the hardware + page. The missing drivers, &man.alc.4;, &man.cxgbev.4;, + &man.liquidio.4;, and &man.mos.4; were added to the + 11-STABLE hardware + page. + From owner-svn-src-stable@freebsd.org Tue Jun 26 14:48:24 2018 Return-Path: Delivered-To: svn-src-stable@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 5A7DD1029D7F; Tue, 26 Jun 2018 14:48:24 +0000 (UTC) (envelope-from gjb@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 0CA9C73A5D; Tue, 26 Jun 2018 14:48:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF55A15A4E; Tue, 26 Jun 2018 14:48:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QEmNp4064710; Tue, 26 Jun 2018 14:48:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QEmNJN064709; Tue, 26 Jun 2018 14:48:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806261448.w5QEmNJN064709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 26 Jun 2018 14:48:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335667 - stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Commit-Revision: 335667 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 14:48:24 -0000 Author: gjb Date: Tue Jun 26 14:48:23 2018 New Revision: 335667 URL: https://svnweb.freebsd.org/changeset/base/335667 Log: Add an errata note that the URL in UPDATING for source-based upgrades is incorrect. PR: 229345 Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 26 14:39:27 2018 (r335666) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 26 14:48:23 2018 (r335667) @@ -203,6 +203,14 @@ boot xlink:href="https://www.FreeBSD.org/relnotes/11-STABLE/hardware/support.html">hardware page. + + + [2018-06-26] The URL to the + instructions for source-based upgrades in + UPDATING incorrectly points to a page + that no longer exists. The correct URL is . + From owner-svn-src-stable@freebsd.org Tue Jun 26 16:16:09 2018 Return-Path: Delivered-To: svn-src-stable@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 D45481000F06; Tue, 26 Jun 2018 16:16:09 +0000 (UTC) (envelope-from gjb@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 88FFF771C3; Tue, 26 Jun 2018 16:16:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 677A916913; Tue, 26 Jun 2018 16:16:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QGG91V012056; Tue, 26 Jun 2018 16:16:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QGG99r012055; Tue, 26 Jun 2018 16:16:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806261616.w5QGG99r012055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 26 Jun 2018 16:16:09 +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: r335670 - in stable: 10 11 X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10 11 X-SVN-Commit-Revision: 335670 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 16:16:10 -0000 Author: gjb Date: Tue Jun 26 16:16:08 2018 New Revision: 335670 URL: https://svnweb.freebsd.org/changeset/base/335670 Log: MFC r325107, r335665: r325107 (eadler, partial): Update the updating URL in UPDATING. r335665: Use the 'Updating from Source' Handbook section in UPDATING. PR: 229345 Submitted by: Niels Bakker Approved by: re (marius, insta-MFC) Sponsored by: The FreeBSD Foundation Modified: stable/10/UPDATING Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/UPDATING Directory Properties: stable/11/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Tue Jun 26 16:00:16 2018 (r335669) +++ stable/10/UPDATING Tue Jun 26 16:16:08 2018 (r335670) @@ -6,7 +6,7 @@ COMMON ITEMS: section later in the file. These instru basically know what you are doing. If not, then please consult the FreeBSD handbook: - https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html + https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. From owner-svn-src-stable@freebsd.org Tue Jun 26 16:16:10 2018 Return-Path: Delivered-To: svn-src-stable@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 38CE81000F0B; Tue, 26 Jun 2018 16:16:10 +0000 (UTC) (envelope-from gjb@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 DCBCB771C6; Tue, 26 Jun 2018 16:16:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDE1D16914; Tue, 26 Jun 2018 16:16:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QGG9WW012062; Tue, 26 Jun 2018 16:16:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QGG9LT012061; Tue, 26 Jun 2018 16:16:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806261616.w5QGG9LT012061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 26 Jun 2018 16:16:09 +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: r335670 - in stable: 10 11 X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10 11 X-SVN-Commit-Revision: 335670 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 16:16:10 -0000 Author: gjb Date: Tue Jun 26 16:16:08 2018 New Revision: 335670 URL: https://svnweb.freebsd.org/changeset/base/335670 Log: MFC r325107, r335665: r325107 (eadler, partial): Update the updating URL in UPDATING. r335665: Use the 'Updating from Source' Handbook section in UPDATING. PR: 229345 Submitted by: Niels Bakker Approved by: re (marius, insta-MFC) Sponsored by: The FreeBSD Foundation Modified: stable/11/UPDATING Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/UPDATING Directory Properties: stable/10/ (props changed) Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Tue Jun 26 16:00:16 2018 (r335669) +++ stable/11/UPDATING Tue Jun 26 16:16:08 2018 (r335670) @@ -6,7 +6,7 @@ COMMON ITEMS: section later in the file. These instru basically know what you are doing. If not, then please consult the FreeBSD handbook: - https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html + https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. From owner-svn-src-stable@freebsd.org Wed Jun 27 03:29:37 2018 Return-Path: Delivered-To: svn-src-stable@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 3F8AC102ABD7; Wed, 27 Jun 2018 03:29:37 +0000 (UTC) (envelope-from eadler@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 D8975908EA; Wed, 27 Jun 2018 03:29:36 +0000 (UTC) (envelope-from eadler@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 B416D1D7CA; Wed, 27 Jun 2018 03:29:36 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R3Ta3p057986; Wed, 27 Jun 2018 03:29:36 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R3TaSI057985; Wed, 27 Jun 2018 03:29:36 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806270329.w5R3TaSI057985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 27 Jun 2018 03:29:36 +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: r335686 - stable/11/usr.bin/rctl X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/rctl X-SVN-Commit-Revision: 335686 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 03:29:37 -0000 Author: eadler Date: Wed Jun 27 03:29:36 2018 New Revision: 335686 URL: https://svnweb.freebsd.org/changeset/base/335686 Log: MFC r334208: rctl:correct use of "vmem" instead of "vmemoryuse" PR: 228482 Modified: stable/11/usr.bin/rctl/rctl.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/rctl/rctl.8 ============================================================================== --- stable/11/usr.bin/rctl/rctl.8 Wed Jun 27 02:55:30 2018 (r335685) +++ stable/11/usr.bin/rctl/rctl.8 Wed Jun 27 03:29:36 2018 (r335686) @@ -137,13 +137,13 @@ Resources which limit bytes may use prefixes from defines what entity the .Em amount gets accounted for. -For example, rule "loginclass:users:vmem:deny=100M/process" means +For example, rule "loginclass:users:vmemoryuse:deny=100M/process" means that each process of any user belonging to login class "users" may allocate up to 100MB of virtual memory. -Rule "loginclass:users:vmem:deny=100M/user" would mean that for each +Rule "loginclass:users:vmemoryuse:deny=100M/user" would mean that for each user belonging to the login class "users", the sum of virtual memory allocated by all the processes of that user will not exceed 100MB. -Rule "loginclass:users:vmem:deny=100M/loginclass" would mean that the sum of +Rule "loginclass:users:vmemoryuse:deny=100M/loginclass" would mean that the sum of virtual memory allocated by all processes of all users belonging to that login class will not exceed 100MB. .El From owner-svn-src-stable@freebsd.org Wed Jun 27 03:58:03 2018 Return-Path: Delivered-To: svn-src-stable@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 B1314102C76A; Wed, 27 Jun 2018 03:58:03 +0000 (UTC) (envelope-from araujo@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 5F3EF91CB4; Wed, 27 Jun 2018 03:58:03 +0000 (UTC) (envelope-from araujo@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 405651DCAB; Wed, 27 Jun 2018 03:58:03 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R3w3GY073215; Wed, 27 Jun 2018 03:58:03 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R3w2LB073213; Wed, 27 Jun 2018 03:58:02 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201806270358.w5R3w2LB073213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Wed, 27 Jun 2018 03:58:02 +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: r335688 - stable/11/usr.sbin/bhyve X-SVN-Group: stable-11 X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: stable/11/usr.sbin/bhyve X-SVN-Commit-Revision: 335688 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 03:58:04 -0000 Author: araujo Date: Wed Jun 27 03:58:02 2018 New Revision: 335688 URL: https://svnweb.freebsd.org/changeset/base/335688 Log: MFC r333622, r334019, r334084 r333622: vq_getchain() can return -1 if some descriptor(s) are invalid and prints a diagnostic message. So we do a sanity checking on the return value of vq_getchain(). Spotted by: gcc49 Reviewed by: avg Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D15388 r334019: Include atkbdc header where there are declared the prototype functions atkbdc_event and atkbdc_init. Sponsored by: iXsystems Inc. r334084: pthread_rwlock_unlock(3) returns 0 if successful, otherwise an error number will be returned to indicate the error, so I'm applying an assert(3) to do a sanity check of the return value. Reported by: Coverity CID: 1391235, 1193654 and 1193651 Reviewed by: grehan Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D15533 Modified: stable/11/usr.sbin/bhyve/atkbdc.c stable/11/usr.sbin/bhyve/mem.c stable/11/usr.sbin/bhyve/pci_virtio_console.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bhyve/atkbdc.c ============================================================================== --- stable/11/usr.sbin/bhyve/atkbdc.c Wed Jun 27 03:50:11 2018 (r335687) +++ stable/11/usr.sbin/bhyve/atkbdc.c Wed Jun 27 03:58:02 2018 (r335688) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include "acpi.h" +#include "atkbdc.h" #include "inout.h" #include "pci_emul.h" #include "pci_irq.h" Modified: stable/11/usr.sbin/bhyve/mem.c ============================================================================== --- stable/11/usr.sbin/bhyve/mem.c Wed Jun 27 03:50:11 2018 (r335687) +++ stable/11/usr.sbin/bhyve/mem.c Wed Jun 27 03:58:02 2018 (r335688) @@ -123,6 +123,7 @@ mmio_rb_add(struct mmio_rb_tree *rbt, struct mmio_rb_r static void mmio_rb_dump(struct mmio_rb_tree *rbt) { + int perror; struct mmio_rb_range *np; pthread_rwlock_rdlock(&mmio_rwlock); @@ -130,7 +131,8 @@ mmio_rb_dump(struct mmio_rb_tree *rbt) printf(" %lx:%lx, %s\n", np->mr_base, np->mr_end, np->mr_param.name); } - pthread_rwlock_unlock(&mmio_rwlock); + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); } #endif @@ -164,7 +166,7 @@ emulate_mem(struct vmctx *ctx, int vcpu, uint64_t padd { struct mmio_rb_range *entry; - int err, immutable; + int err, perror, immutable; pthread_rwlock_rdlock(&mmio_rwlock); /* @@ -182,7 +184,8 @@ emulate_mem(struct vmctx *ctx, int vcpu, uint64_t padd /* Update the per-vCPU cache */ mmio_hint[vcpu] = entry; } else if (mmio_rb_lookup(&mmio_rb_fallback, paddr, &entry)) { - pthread_rwlock_unlock(&mmio_rwlock); + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); return (ESRCH); } } @@ -201,15 +204,20 @@ emulate_mem(struct vmctx *ctx, int vcpu, uint64_t padd * config space window as 'immutable' the deadlock can be avoided. */ immutable = (entry->mr_param.flags & MEM_F_IMMUTABLE); - if (immutable) - pthread_rwlock_unlock(&mmio_rwlock); + if (immutable) { + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); + } err = vmm_emulate_instruction(ctx, vcpu, paddr, vie, paging, mem_read, mem_write, &entry->mr_param); - if (!immutable) - pthread_rwlock_unlock(&mmio_rwlock); + if (!immutable) { + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); + } + return (err); } @@ -217,7 +225,7 @@ static int register_mem_int(struct mmio_rb_tree *rbt, struct mem_range *memp) { struct mmio_rb_range *entry, *mrp; - int err; + int err, perror; err = 0; @@ -230,7 +238,8 @@ register_mem_int(struct mmio_rb_tree *rbt, struct mem_ pthread_rwlock_wrlock(&mmio_rwlock); if (mmio_rb_lookup(rbt, memp->base, &entry) != 0) err = mmio_rb_add(rbt, mrp); - pthread_rwlock_unlock(&mmio_rwlock); + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); if (err) free(mrp); } else @@ -258,7 +267,7 @@ unregister_mem(struct mem_range *memp) { struct mem_range *mr; struct mmio_rb_range *entry = NULL; - int err, i; + int err, perror, i; pthread_rwlock_wrlock(&mmio_rwlock); err = mmio_rb_lookup(&mmio_rb_root, memp->base, &entry); @@ -275,7 +284,8 @@ unregister_mem(struct mem_range *memp) mmio_hint[i] = NULL; } } - pthread_rwlock_unlock(&mmio_rwlock); + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); if (entry) free(entry); Modified: stable/11/usr.sbin/bhyve/pci_virtio_console.c ============================================================================== --- stable/11/usr.sbin/bhyve/pci_virtio_console.c Wed Jun 27 03:50:11 2018 (r335687) +++ stable/11/usr.sbin/bhyve/pci_virtio_console.c Wed Jun 27 03:58:02 2018 (r335688) @@ -556,6 +556,7 @@ pci_vtcon_notify_tx(void *vsc, struct vqueue_info *vq) while (vq_has_descs(vq)) { n = vq_getchain(vq, &idx, iov, 1, flags); + assert(n >= 1); if (port != NULL) port->vsp_cb(port, port->vsp_arg, iov, 1); From owner-svn-src-stable@freebsd.org Wed Jun 27 04:37:25 2018 Return-Path: Delivered-To: svn-src-stable@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 450BB102DDA8; Wed, 27 Jun 2018 04:37:25 +0000 (UTC) (envelope-from eadler@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 EA9CA932F2; Wed, 27 Jun 2018 04:37:24 +0000 (UTC) (envelope-from eadler@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 CBB571E336; Wed, 27 Jun 2018 04:37:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R4bOZu093573; Wed, 27 Jun 2018 04:37:24 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R4bNRQ093566; Wed, 27 Jun 2018 04:37:23 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806270437.w5R4bNRQ093566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 27 Jun 2018 04:37:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335693 - stable/11/usr.bin/mail X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/mail X-SVN-Commit-Revision: 335693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 04:37:25 -0000 Author: eadler Date: Wed Jun 27 04:37:22 2018 New Revision: 335693 URL: https://svnweb.freebsd.org/changeset/base/335693 Log: MFC r302776, r302799: mail(1): Bring some fixes from other BSDs. - Use varargs properly - Use pid_t - Better handling of error conditions on forked jobs. - Some prototype and warning cleanups. Fix missing forked job changes from r302776 in wait_child(). Modified: stable/11/usr.bin/mail/cmd1.c stable/11/usr.bin/mail/cmd2.c stable/11/usr.bin/mail/cmd3.c stable/11/usr.bin/mail/edit.c stable/11/usr.bin/mail/extern.h stable/11/usr.bin/mail/fio.c stable/11/usr.bin/mail/getname.c stable/11/usr.bin/mail/popen.c Modified: stable/11/usr.bin/mail/cmd1.c ============================================================================== --- stable/11/usr.bin/mail/cmd1.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/cmd1.c Wed Jun 27 04:37:22 2018 (r335693) @@ -439,7 +439,7 @@ folders(void) } if ((cmd = value("LISTER")) == NULL) cmd = "ls"; - (void)run_command(cmd, 0, -1, -1, dirname, NULL, NULL); + (void)run_command(cmd, 0, -1, -1, dirname, NULL); return (0); } Modified: stable/11/usr.bin/mail/cmd2.c ============================================================================== --- stable/11/usr.bin/mail/cmd2.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/cmd2.c Wed Jun 27 04:37:22 2018 (r335693) @@ -130,8 +130,9 @@ hitit: * so we can discard when the user quits. */ int -save(char str[]) +save(void *v) { + char *str = v; return (save1(str, 1, "save", saveignore)); } @@ -140,8 +141,9 @@ save(char str[]) * Copy a message to a file without affected its saved-ness */ int -copycmd(char str[]) +copycmd(void *v) { + char *str = v; return (save1(str, 0, "copy", saveignore)); } Modified: stable/11/usr.bin/mail/cmd3.c ============================================================================== --- stable/11/usr.bin/mail/cmd3.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/cmd3.c Wed Jun 27 04:37:22 2018 (r335693) @@ -79,7 +79,7 @@ dosh(char *str __unused) if ((sh = value("SHELL")) == NULL) sh = _PATH_CSHELL; - (void)run_command(sh, 0, -1, -1, NULL, NULL, NULL); + (void)run_command(sh, 0, -1, -1, NULL); (void)signal(SIGINT, sigint); printf("\n"); return (0); @@ -102,7 +102,7 @@ bangexp(char *str, size_t strsize) n = sizeof(bangbuf); while (*cp != '\0') { if (*cp == '!') { - if (n < strlen(lastbang)) { + if (n < (int)strlen(lastbang)) { overf: printf("Command buffer overflow\n"); return (-1); Modified: stable/11/usr.bin/mail/edit.c ============================================================================== --- stable/11/usr.bin/mail/edit.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/edit.c Wed Jun 27 04:37:22 2018 (r335693) @@ -180,7 +180,7 @@ run_editor(FILE *fp, off_t size, int type, int readonl nf = NULL; if ((edit = value(type == 'e' ? "EDITOR" : "VISUAL")) == NULL) edit = type == 'e' ? _PATH_EX : _PATH_VI; - if (run_command(edit, 0, -1, -1, tempname, NULL, NULL) < 0) { + if (run_command(edit, 0, -1, -1, tempname, NULL) < 0) { (void)rm(tempname); goto out; } Modified: stable/11/usr.bin/mail/extern.h ============================================================================== --- stable/11/usr.bin/mail/extern.h Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/extern.h Wed Jun 27 04:37:22 2018 (r335693) @@ -49,7 +49,7 @@ char *copyin(char *, char **); char *detract(struct name *, int); char *expand(char *); char *getdeadletter(void); -char *getname(int); +char *getname(uid_t); char *hfield(const char *, struct message *); FILE *infix(struct header *, FILE *); char *ishfield(char [], char *, const char *); @@ -95,7 +95,7 @@ void collhup(int); void collint(int); void collstop(int); void commands(void); -int copycmd(char []); +int copycmd(void *v); int core(void); int count(struct name *); int delete(int []); @@ -130,7 +130,7 @@ int getfold(char *, int); int gethfield(FILE *, char [], int, char **); int getmsglist(char *, int *, int); int getrawlist(char [], char **, int); -int getuserid(char []); +uid_t getuserid(char []); int grabh(struct header *, int); int group(char **); void hangup(int); @@ -198,8 +198,8 @@ int respond(int *); int retfield(char *[]); int rexit(int); int rm(char *); -int run_command(char *, sigset_t *, int, int, char *, char *, char *); -int save(char []); +int run_command(char *, sigset_t *, int, int, ...); +int save(void *v); int save1(char [], int, const char *, struct ignoretab *); void savedeadletter(FILE *); int saveigfield(char *[]); @@ -223,7 +223,7 @@ void sort(char **); int source(char **); void spreserve(void); void sreset(void); -int start_command(char *, sigset_t *, int, int, char *, char *, char *); +int start_command(char *, sigset_t *, int, int, ...); void statusput(struct message *, FILE *, char *); void stop(int); int stouch(int []); Modified: stable/11/usr.bin/mail/fio.c ============================================================================== --- stable/11/usr.bin/mail/fio.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/fio.c Wed Jun 27 04:37:22 2018 (r335693) @@ -235,7 +235,7 @@ makemessage(FILE *f, int omsgCount) size -= (omsgCount + 1) * sizeof(struct message); (void)fflush(f); (void)lseek(fileno(f), (off_t)sizeof(*message), 0); - if (read(fileno(f), (char *)&message[omsgCount], size) != size) + if (read(fileno(f), (void *)&message[omsgCount], size) != size) errx(1, "Message temporary file corrupted"); message[msgCount].m_size = 0; message[msgCount].m_lines = 0; Modified: stable/11/usr.bin/mail/getname.c ============================================================================== --- stable/11/usr.bin/mail/getname.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/getname.c Wed Jun 27 04:37:22 2018 (r335693) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); * Search the passwd file for a uid. Return name on success, NULL on failure. */ char * -getname(int uid) +getname(uid_t uid) { struct passwd *pw; @@ -58,7 +58,7 @@ getname(int uid) * Convert the passed name to a user id and return it. Return -1 * on error. */ -int +uid_t getuserid(char name[]) { struct passwd *pw; Modified: stable/11/usr.bin/mail/popen.c ============================================================================== --- stable/11/usr.bin/mail/popen.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/popen.c Wed Jun 27 04:37:22 2018 (r335693) @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include "rcv.h" #include #include +#include +#include #include "extern.h" #define READ 0 @@ -46,22 +48,23 @@ __FBSDID("$FreeBSD$"); struct fp { FILE *fp; int pipe; - int pid; + pid_t pid; struct fp *link; }; static struct fp *fp_head; struct child { - int pid; + pid_t pid; char done; char free; int status; struct child *link; }; -static struct child *child; -static struct child *findchild(int); +static struct child *child, *child_freelist = NULL; + static void delchild(struct child *); -static int file_pid(FILE *); +static pid_t file_pid(FILE *); +static pid_t start_commandv(char *, sigset_t *, int, int, va_list); FILE * Fopen(const char *path, const char *mode) @@ -90,6 +93,7 @@ Fdopen(int fd, const char *mode) int Fclose(FILE *fp) { + unregister_file(fp); return (fclose(fp)); } @@ -99,7 +103,7 @@ Popen(char *cmd, const char *mode) { int p[2]; int myside, hisside, fd0, fd1; - int pid; + pid_t pid; sigset_t nset; FILE *fp; @@ -109,15 +113,15 @@ Popen(char *cmd, const char *mode) (void)fcntl(p[WRITE], F_SETFD, 1); if (*mode == 'r') { myside = p[READ]; - fd0 = -1; - hisside = fd1 = p[WRITE]; + hisside = fd0 = fd1 = p[WRITE]; } else { myside = p[WRITE]; hisside = fd0 = p[READ]; fd1 = -1; } (void)sigemptyset(&nset); - if ((pid = start_command(cmd, &nset, fd0, fd1, NULL, NULL, NULL)) < 0) { + pid = start_command(value("SHELL"), &nset, fd0, fd1, "-c", cmd, NULL); + if (pid < 0) { (void)close(p[READ]); (void)close(p[WRITE]); return (NULL); @@ -158,7 +162,7 @@ close_all_files(void) } void -register_file(FILE *fp, int pipe, int pid) +register_file(FILE *fp, int pipe, pid_t pid) { struct fp *fpp; @@ -186,7 +190,7 @@ unregister_file(FILE *fp) /*NOTREACHED*/ } -int +pid_t file_pid(FILE *fp) { struct fp *p; @@ -200,30 +204,17 @@ file_pid(FILE *fp) /* * Run a command without a shell, with optional arguments and splicing - * of stdin and stdout. The command name can be a sequence of words. + * of stdin (-1 means none) and stdout. The command name can be a sequence + * of words. * Signals must be handled by the caller. - * "Mask" contains the signals to ignore in the new process. - * SIGINT is enabled unless it's in the mask. + * "nset" contains the signals to ignore in the new process. + * SIGINT is enabled unless it's in "nset". */ -/*VARARGS4*/ -int -run_command(char *cmd, sigset_t *mask, int infd, int outfd, char *a0, - char *a1, char *a2) +static pid_t +start_commandv(char *cmd, sigset_t *nset, int infd, int outfd, va_list args) { - int pid; + pid_t pid; - if ((pid = start_command(cmd, mask, infd, outfd, a0, a1, a2)) < 0) - return (-1); - return (wait_command(pid)); -} - -/*VARARGS4*/ -int -start_command(char *cmd, sigset_t *mask, int infd, int outfd, char *a0, - char *a1, char *a2) -{ - int pid; - if ((pid = fork()) < 0) { warn("fork"); return (-1); @@ -232,11 +223,10 @@ start_command(char *cmd, sigset_t *mask, int infd, int char *argv[100]; int i = getrawlist(cmd, argv, sizeof(argv) / sizeof(*argv)); - if ((argv[i++] = a0) != NULL && - (argv[i++] = a1) != NULL && - (argv[i++] = a2) != NULL) - argv[i] = NULL; - prepare_child(mask, infd, outfd); + while ((argv[i++] = va_arg(args, char *))) + ; + argv[i] = NULL; + prepare_child(nset, infd, outfd); execvp(argv[0], argv); warn("%s", argv[0]); _exit(1); @@ -244,6 +234,32 @@ start_command(char *cmd, sigset_t *mask, int infd, int return (pid); } +int +run_command(char *cmd, sigset_t *nset, int infd, int outfd, ...) +{ + pid_t pid; + va_list args; + + va_start(args, outfd); + pid = start_commandv(cmd, nset, infd, outfd, args); + va_end(args); + if (pid < 0) + return -1; + return wait_command(pid); +} + +int +start_command(char *cmd, sigset_t *nset, int infd, int outfd, ...) +{ + va_list args; + int r; + + va_start(args, outfd); + r = start_commandv(cmd, nset, infd, outfd, args); + va_end(args); + return r; +} + void prepare_child(sigset_t *nset, int infd, int outfd) { @@ -268,7 +284,7 @@ prepare_child(sigset_t *nset, int infd, int outfd) } int -wait_command(int pid) +wait_command(pid_t pid) { if (wait_child(pid) < 0) { @@ -279,7 +295,7 @@ wait_command(int pid) } static struct child * -findchild(int pid) +findchild(pid_t pid, int dont_alloc) { struct child **cpp; @@ -287,9 +303,16 @@ findchild(int pid) cpp = &(*cpp)->link) ; if (*cpp == NULL) { - *cpp = malloc(sizeof(struct child)); - if (*cpp == NULL) - err(1, "Out of memory"); + if (dont_alloc) + return(NULL); + if (child_freelist) { + *cpp = child_freelist; + child_freelist = (*cpp)->link; + } else { + *cpp = malloc(sizeof(struct child)); + if (*cpp == NULL) + err(1, "malloc"); + } (*cpp)->pid = pid; (*cpp)->done = (*cpp)->free = 0; (*cpp)->link = NULL; @@ -305,19 +328,22 @@ delchild(struct child *cp) for (cpp = &child; *cpp != cp; cpp = &(*cpp)->link) ; *cpp = cp->link; - (void)free(cp); + cp->link = child_freelist; + child_freelist = cp; } /*ARGSUSED*/ void sigchild(int signo __unused) { - int pid; + pid_t pid; int status; struct child *cp; + int save_errno; + save_errno = errno; while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { - cp = findchild(pid); + cp = findchild(pid, 1); if (cp->free) delchild(cp); else { @@ -325,6 +351,7 @@ sigchild(int signo __unused) cp->status = status; } } + errno = save_errno; } int wait_status; @@ -333,41 +360,51 @@ int wait_status; * Wait for a specific child to die. */ int -wait_child(int pid) +wait_child(pid_t pid) { - sigset_t nset, oset; struct child *cp; + sigset_t nset, oset; + pid_t rv = 0; (void)sigemptyset(&nset); (void)sigaddset(&nset, SIGCHLD); - (void)sigprocmask(SIG_BLOCK, &nset, &oset); - - cp = findchild(pid); - - while (!cp->done) - (void)sigsuspend(&oset); - wait_status = cp->status; - delchild(cp); + (void)sigprocmask(SIG_BLOCK, &nset, &oset); + /* + * If we have not already waited on the pid (via sigchild) + * wait on it now. Otherwise, use the wait status stashed + * by sigchild. + */ + cp = findchild(pid, 1); + if (cp == NULL || !cp->done) + rv = waitpid(pid, &wait_status, 0); + else + wait_status = cp->status; + if (cp != NULL) + delchild(cp); (void)sigprocmask(SIG_SETMASK, &oset, NULL); - return ((WIFEXITED(wait_status) && WEXITSTATUS(wait_status)) ? -1 : 0); + if (rv == -1 || (WIFEXITED(wait_status) && WEXITSTATUS(wait_status))) + return -1; + else + return 0; } /* * Mark a child as don't care. */ void -free_child(int pid) +free_child(pid_t pid) { + struct child *cp; sigset_t nset, oset; - struct child *cp = findchild(pid); (void)sigemptyset(&nset); (void)sigaddset(&nset, SIGCHLD); - (void)sigprocmask(SIG_BLOCK, &nset, &oset); - - if (cp->done) - delchild(cp); - else - cp->free = 1; + (void)sigprocmask(SIG_BLOCK, &nset, &oset); + if ((cp = findchild(pid, 0)) != NULL) { + if (cp->done) + delchild(cp); + else + cp->free = 1; + } (void)sigprocmask(SIG_SETMASK, &oset, NULL); } From owner-svn-src-stable@freebsd.org Wed Jun 27 04:56:04 2018 Return-Path: Delivered-To: svn-src-stable@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 EBAE0102EEBC; Wed, 27 Jun 2018 04:56:03 +0000 (UTC) (envelope-from eadler@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 9D81F93FB7; Wed, 27 Jun 2018 04:56:03 +0000 (UTC) (envelope-from eadler@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 7E8941E663; Wed, 27 Jun 2018 04:56:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R4u3oA003716; Wed, 27 Jun 2018 04:56:03 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R4u29X003709; Wed, 27 Jun 2018 04:56:02 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806270456.w5R4u29X003709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 27 Jun 2018 04:56:02 +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: r335694 - stable/10/usr.bin/mail X-SVN-Group: stable-10 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/10/usr.bin/mail X-SVN-Commit-Revision: 335694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 04:56:04 -0000 Author: eadler Date: Wed Jun 27 04:56:01 2018 New Revision: 335694 URL: https://svnweb.freebsd.org/changeset/base/335694 Log: MFC r302776, r302799: mail(1): Bring some fixes from other BSDs. - Use varargs properly - Use pid_t - Better handling of error conditions on forked jobs. - Some prototype and warning cleanups. Fix missing forked job changes from r302776 in wait_child(). Modified: stable/10/usr.bin/mail/cmd1.c stable/10/usr.bin/mail/cmd2.c stable/10/usr.bin/mail/cmd3.c stable/10/usr.bin/mail/edit.c stable/10/usr.bin/mail/extern.h stable/10/usr.bin/mail/fio.c stable/10/usr.bin/mail/getname.c stable/10/usr.bin/mail/popen.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mail/cmd1.c ============================================================================== --- stable/10/usr.bin/mail/cmd1.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/cmd1.c Wed Jun 27 04:56:01 2018 (r335694) @@ -439,7 +439,7 @@ folders(void) } if ((cmd = value("LISTER")) == NULL) cmd = "ls"; - (void)run_command(cmd, 0, -1, -1, dirname, NULL, NULL); + (void)run_command(cmd, 0, -1, -1, dirname, NULL); return (0); } Modified: stable/10/usr.bin/mail/cmd2.c ============================================================================== --- stable/10/usr.bin/mail/cmd2.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/cmd2.c Wed Jun 27 04:56:01 2018 (r335694) @@ -130,8 +130,9 @@ hitit: * so we can discard when the user quits. */ int -save(char str[]) +save(void *v) { + char *str = v; return (save1(str, 1, "save", saveignore)); } @@ -140,8 +141,9 @@ save(char str[]) * Copy a message to a file without affected its saved-ness */ int -copycmd(char str[]) +copycmd(void *v) { + char *str = v; return (save1(str, 0, "copy", saveignore)); } Modified: stable/10/usr.bin/mail/cmd3.c ============================================================================== --- stable/10/usr.bin/mail/cmd3.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/cmd3.c Wed Jun 27 04:56:01 2018 (r335694) @@ -79,7 +79,7 @@ dosh(char *str __unused) if ((sh = value("SHELL")) == NULL) sh = _PATH_CSHELL; - (void)run_command(sh, 0, -1, -1, NULL, NULL, NULL); + (void)run_command(sh, 0, -1, -1, NULL); (void)signal(SIGINT, sigint); printf("\n"); return (0); @@ -102,7 +102,7 @@ bangexp(char *str, size_t strsize) n = sizeof(bangbuf); while (*cp != '\0') { if (*cp == '!') { - if (n < strlen(lastbang)) { + if (n < (int)strlen(lastbang)) { overf: printf("Command buffer overflow\n"); return (-1); Modified: stable/10/usr.bin/mail/edit.c ============================================================================== --- stable/10/usr.bin/mail/edit.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/edit.c Wed Jun 27 04:56:01 2018 (r335694) @@ -180,7 +180,7 @@ run_editor(FILE *fp, off_t size, int type, int readonl nf = NULL; if ((edit = value(type == 'e' ? "EDITOR" : "VISUAL")) == NULL) edit = type == 'e' ? _PATH_EX : _PATH_VI; - if (run_command(edit, 0, -1, -1, tempname, NULL, NULL) < 0) { + if (run_command(edit, 0, -1, -1, tempname, NULL) < 0) { (void)rm(tempname); goto out; } Modified: stable/10/usr.bin/mail/extern.h ============================================================================== --- stable/10/usr.bin/mail/extern.h Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/extern.h Wed Jun 27 04:56:01 2018 (r335694) @@ -49,7 +49,7 @@ char *copyin(char *, char **); char *detract(struct name *, int); char *expand(char *); char *getdeadletter(void); -char *getname(int); +char *getname(uid_t); char *hfield(const char *, struct message *); FILE *infix(struct header *, FILE *); char *ishfield(char [], char *, const char *); @@ -95,7 +95,7 @@ void collhup(int); void collint(int); void collstop(int); void commands(void); -int copycmd(char []); +int copycmd(void *v); int core(void); int count(struct name *); int delete(int []); @@ -130,7 +130,7 @@ int getfold(char *, int); int gethfield(FILE *, char [], int, char **); int getmsglist(char *, int *, int); int getrawlist(char [], char **, int); -int getuserid(char []); +uid_t getuserid(char []); int grabh(struct header *, int); int group(char **); void hangup(int); @@ -198,8 +198,8 @@ int respond(int *); int retfield(char *[]); int rexit(int); int rm(char *); -int run_command(char *, sigset_t *, int, int, char *, char *, char *); -int save(char []); +int run_command(char *, sigset_t *, int, int, ...); +int save(void *v); int save1(char [], int, const char *, struct ignoretab *); void savedeadletter(FILE *); int saveigfield(char *[]); @@ -223,7 +223,7 @@ void sort(char **); int source(char **); void spreserve(void); void sreset(void); -int start_command(char *, sigset_t *, int, int, char *, char *, char *); +int start_command(char *, sigset_t *, int, int, ...); void statusput(struct message *, FILE *, char *); void stop(int); int stouch(int []); Modified: stable/10/usr.bin/mail/fio.c ============================================================================== --- stable/10/usr.bin/mail/fio.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/fio.c Wed Jun 27 04:56:01 2018 (r335694) @@ -235,7 +235,7 @@ makemessage(FILE *f, int omsgCount) size -= (omsgCount + 1) * sizeof(struct message); (void)fflush(f); (void)lseek(fileno(f), (off_t)sizeof(*message), 0); - if (read(fileno(f), (char *)&message[omsgCount], size) != size) + if (read(fileno(f), (void *)&message[omsgCount], size) != size) errx(1, "Message temporary file corrupted"); message[msgCount].m_size = 0; message[msgCount].m_lines = 0; Modified: stable/10/usr.bin/mail/getname.c ============================================================================== --- stable/10/usr.bin/mail/getname.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/getname.c Wed Jun 27 04:56:01 2018 (r335694) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); * Search the passwd file for a uid. Return name on success, NULL on failure. */ char * -getname(int uid) +getname(uid_t uid) { struct passwd *pw; @@ -58,7 +58,7 @@ getname(int uid) * Convert the passed name to a user id and return it. Return -1 * on error. */ -int +uid_t getuserid(char name[]) { struct passwd *pw; Modified: stable/10/usr.bin/mail/popen.c ============================================================================== --- stable/10/usr.bin/mail/popen.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/popen.c Wed Jun 27 04:56:01 2018 (r335694) @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include "rcv.h" #include #include +#include +#include #include "extern.h" #define READ 0 @@ -46,22 +48,23 @@ __FBSDID("$FreeBSD$"); struct fp { FILE *fp; int pipe; - int pid; + pid_t pid; struct fp *link; }; static struct fp *fp_head; struct child { - int pid; + pid_t pid; char done; char free; int status; struct child *link; }; -static struct child *child; -static struct child *findchild(int); +static struct child *child, *child_freelist = NULL; + static void delchild(struct child *); -static int file_pid(FILE *); +static pid_t file_pid(FILE *); +static pid_t start_commandv(char *, sigset_t *, int, int, va_list); FILE * Fopen(const char *path, const char *mode) @@ -90,6 +93,7 @@ Fdopen(int fd, const char *mode) int Fclose(FILE *fp) { + unregister_file(fp); return (fclose(fp)); } @@ -99,7 +103,7 @@ Popen(char *cmd, const char *mode) { int p[2]; int myside, hisside, fd0, fd1; - int pid; + pid_t pid; sigset_t nset; FILE *fp; @@ -109,15 +113,15 @@ Popen(char *cmd, const char *mode) (void)fcntl(p[WRITE], F_SETFD, 1); if (*mode == 'r') { myside = p[READ]; - fd0 = -1; - hisside = fd1 = p[WRITE]; + hisside = fd0 = fd1 = p[WRITE]; } else { myside = p[WRITE]; hisside = fd0 = p[READ]; fd1 = -1; } (void)sigemptyset(&nset); - if ((pid = start_command(cmd, &nset, fd0, fd1, NULL, NULL, NULL)) < 0) { + pid = start_command(value("SHELL"), &nset, fd0, fd1, "-c", cmd, NULL); + if (pid < 0) { (void)close(p[READ]); (void)close(p[WRITE]); return (NULL); @@ -158,7 +162,7 @@ close_all_files(void) } void -register_file(FILE *fp, int pipe, int pid) +register_file(FILE *fp, int pipe, pid_t pid) { struct fp *fpp; @@ -186,7 +190,7 @@ unregister_file(FILE *fp) /*NOTREACHED*/ } -int +pid_t file_pid(FILE *fp) { struct fp *p; @@ -200,30 +204,17 @@ file_pid(FILE *fp) /* * Run a command without a shell, with optional arguments and splicing - * of stdin and stdout. The command name can be a sequence of words. + * of stdin (-1 means none) and stdout. The command name can be a sequence + * of words. * Signals must be handled by the caller. - * "Mask" contains the signals to ignore in the new process. - * SIGINT is enabled unless it's in the mask. + * "nset" contains the signals to ignore in the new process. + * SIGINT is enabled unless it's in "nset". */ -/*VARARGS4*/ -int -run_command(char *cmd, sigset_t *mask, int infd, int outfd, char *a0, - char *a1, char *a2) +static pid_t +start_commandv(char *cmd, sigset_t *nset, int infd, int outfd, va_list args) { - int pid; + pid_t pid; - if ((pid = start_command(cmd, mask, infd, outfd, a0, a1, a2)) < 0) - return (-1); - return (wait_command(pid)); -} - -/*VARARGS4*/ -int -start_command(char *cmd, sigset_t *mask, int infd, int outfd, char *a0, - char *a1, char *a2) -{ - int pid; - if ((pid = fork()) < 0) { warn("fork"); return (-1); @@ -232,11 +223,10 @@ start_command(char *cmd, sigset_t *mask, int infd, int char *argv[100]; int i = getrawlist(cmd, argv, sizeof(argv) / sizeof(*argv)); - if ((argv[i++] = a0) != NULL && - (argv[i++] = a1) != NULL && - (argv[i++] = a2) != NULL) - argv[i] = NULL; - prepare_child(mask, infd, outfd); + while ((argv[i++] = va_arg(args, char *))) + ; + argv[i] = NULL; + prepare_child(nset, infd, outfd); execvp(argv[0], argv); warn("%s", argv[0]); _exit(1); @@ -244,6 +234,32 @@ start_command(char *cmd, sigset_t *mask, int infd, int return (pid); } +int +run_command(char *cmd, sigset_t *nset, int infd, int outfd, ...) +{ + pid_t pid; + va_list args; + + va_start(args, outfd); + pid = start_commandv(cmd, nset, infd, outfd, args); + va_end(args); + if (pid < 0) + return -1; + return wait_command(pid); +} + +int +start_command(char *cmd, sigset_t *nset, int infd, int outfd, ...) +{ + va_list args; + int r; + + va_start(args, outfd); + r = start_commandv(cmd, nset, infd, outfd, args); + va_end(args); + return r; +} + void prepare_child(sigset_t *nset, int infd, int outfd) { @@ -268,7 +284,7 @@ prepare_child(sigset_t *nset, int infd, int outfd) } int -wait_command(int pid) +wait_command(pid_t pid) { if (wait_child(pid) < 0) { @@ -279,7 +295,7 @@ wait_command(int pid) } static struct child * -findchild(int pid) +findchild(pid_t pid, int dont_alloc) { struct child **cpp; @@ -287,9 +303,16 @@ findchild(int pid) cpp = &(*cpp)->link) ; if (*cpp == NULL) { - *cpp = malloc(sizeof(struct child)); - if (*cpp == NULL) - err(1, "Out of memory"); + if (dont_alloc) + return(NULL); + if (child_freelist) { + *cpp = child_freelist; + child_freelist = (*cpp)->link; + } else { + *cpp = malloc(sizeof(struct child)); + if (*cpp == NULL) + err(1, "malloc"); + } (*cpp)->pid = pid; (*cpp)->done = (*cpp)->free = 0; (*cpp)->link = NULL; @@ -305,19 +328,22 @@ delchild(struct child *cp) for (cpp = &child; *cpp != cp; cpp = &(*cpp)->link) ; *cpp = cp->link; - (void)free(cp); + cp->link = child_freelist; + child_freelist = cp; } /*ARGSUSED*/ void sigchild(int signo __unused) { - int pid; + pid_t pid; int status; struct child *cp; + int save_errno; + save_errno = errno; while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { - cp = findchild(pid); + cp = findchild(pid, 1); if (cp->free) delchild(cp); else { @@ -325,6 +351,7 @@ sigchild(int signo __unused) cp->status = status; } } + errno = save_errno; } int wait_status; @@ -333,41 +360,51 @@ int wait_status; * Wait for a specific child to die. */ int -wait_child(int pid) +wait_child(pid_t pid) { - sigset_t nset, oset; struct child *cp; + sigset_t nset, oset; + pid_t rv = 0; (void)sigemptyset(&nset); (void)sigaddset(&nset, SIGCHLD); - (void)sigprocmask(SIG_BLOCK, &nset, &oset); - - cp = findchild(pid); - - while (!cp->done) - (void)sigsuspend(&oset); - wait_status = cp->status; - delchild(cp); + (void)sigprocmask(SIG_BLOCK, &nset, &oset); + /* + * If we have not already waited on the pid (via sigchild) + * wait on it now. Otherwise, use the wait status stashed + * by sigchild. + */ + cp = findchild(pid, 1); + if (cp == NULL || !cp->done) + rv = waitpid(pid, &wait_status, 0); + else + wait_status = cp->status; + if (cp != NULL) + delchild(cp); (void)sigprocmask(SIG_SETMASK, &oset, NULL); - return ((WIFEXITED(wait_status) && WEXITSTATUS(wait_status)) ? -1 : 0); + if (rv == -1 || (WIFEXITED(wait_status) && WEXITSTATUS(wait_status))) + return -1; + else + return 0; } /* * Mark a child as don't care. */ void -free_child(int pid) +free_child(pid_t pid) { + struct child *cp; sigset_t nset, oset; - struct child *cp = findchild(pid); (void)sigemptyset(&nset); (void)sigaddset(&nset, SIGCHLD); - (void)sigprocmask(SIG_BLOCK, &nset, &oset); - - if (cp->done) - delchild(cp); - else - cp->free = 1; + (void)sigprocmask(SIG_BLOCK, &nset, &oset); + if ((cp = findchild(pid, 0)) != NULL) { + if (cp->done) + delchild(cp); + else + cp->free = 1; + } (void)sigprocmask(SIG_SETMASK, &oset, NULL); } From owner-svn-src-stable@freebsd.org Wed Jun 27 04:58:40 2018 Return-Path: Delivered-To: svn-src-stable@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 C674510000A9; Wed, 27 Jun 2018 04:58:40 +0000 (UTC) (envelope-from eadler@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 7946294185; Wed, 27 Jun 2018 04:58:40 +0000 (UTC) (envelope-from eadler@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 5933B1E665; Wed, 27 Jun 2018 04:58:40 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R4weeY003856; Wed, 27 Jun 2018 04:58:40 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R4weYW003855; Wed, 27 Jun 2018 04:58:40 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806270458.w5R4weYW003855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 27 Jun 2018 04:58:40 +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: r335695 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 335695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 04:58:41 -0000 Author: eadler Date: Wed Jun 27 04:58:39 2018 New Revision: 335695 URL: https://svnweb.freebsd.org/changeset/base/335695 Log: MFC r302776, r302799: mail(1): Bring some fixes from other BSDs. - Use varargs properly - Use pid_t - Better handling of error conditions on forked jobs. - Some prototype and warning cleanups. Fix missing forked job changes from r302776 in wait_child(). Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable@freebsd.org Wed Jun 27 07:18:55 2018 Return-Path: Delivered-To: svn-src-stable@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 155EB100EC02; Wed, 27 Jun 2018 07:18:55 +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 B777C707AE; Wed, 27 Jun 2018 07:18:54 +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 9963E1FD59; Wed, 27 Jun 2018 07:18:54 +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 w5R7IsN5074566; Wed, 27 Jun 2018 07:18:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R7IsMD074565; Wed, 27 Jun 2018 07:18:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806270718.w5R7IsMD074565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Jun 2018 07:18: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: r335698 - stable/11/share/examples/bhyve X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/share/examples/bhyve X-SVN-Commit-Revision: 335698 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 07:18:55 -0000 Author: kib Date: Wed Jun 27 07:18:54 2018 New Revision: 335698 URL: https://svnweb.freebsd.org/changeset/base/335698 Log: MFC r335604: bhyve/vmrun.sh: make -L functional. Modified: stable/11/share/examples/bhyve/vmrun.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/share/examples/bhyve/vmrun.sh ============================================================================== --- stable/11/share/examples/bhyve/vmrun.sh Wed Jun 27 06:50:24 2018 (r335697) +++ stable/11/share/examples/bhyve/vmrun.sh Wed Jun 27 07:18:54 2018 (r335698) @@ -132,7 +132,7 @@ vncport=${DEFAULT_VNCPORT} vncsize=${DEFAULT_VNCSIZE} tablet="" -while getopts aAc:C:d:e:Ef:F:g:hH:iI:l:m:n:p:P:t:Tuvw c ; do +while getopts aAc:C:d:e:Ef:F:g:hH:iI:l:L:m:n:p:P:t:Tuvw c ; do case $c in a) bhyverun_opt="${bhyverun_opt} -a" From owner-svn-src-stable@freebsd.org Wed Jun 27 07:24:08 2018 Return-Path: Delivered-To: svn-src-stable@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 AC27A100F34D; Wed, 27 Jun 2018 07:24:08 +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 5C80C70E42; Wed, 27 Jun 2018 07:24:08 +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 3F1651FEEA; Wed, 27 Jun 2018 07:24:08 +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 w5R7O8t7079483; Wed, 27 Jun 2018 07:24:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R7O712079480; Wed, 27 Jun 2018 07:24:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806270724.w5R7O712079480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 27 Jun 2018 07:24:07 +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: r335699 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 335699 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 07:24:08 -0000 Author: hselasky Date: Wed Jun 27 07:24:07 2018 New Revision: 335699 URL: https://svnweb.freebsd.org/changeset/base/335699 Log: MFC r335461: Permit the kernel environment to set an array of numeric values for a single sysctl(9) node. Reviewed by: kib@, imp@, jhb@ Differential Revision: https://reviews.freebsd.org/D15802 Sponsored by: Mellanox Technologies Modified: stable/11/sys/kern/kern_environment.c stable/11/sys/kern/kern_sysctl.c stable/11/sys/sys/systm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_environment.c ============================================================================== --- stable/11/sys/kern/kern_environment.c Wed Jun 27 07:18:54 2018 (r335698) +++ stable/11/sys/kern/kern_environment.c Wed Jun 27 07:24:07 2018 (r335699) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -512,6 +513,141 @@ getenv_string(const char *name, char *data, int size) strlcpy(data, cp, size); } return (cp != NULL); +} + +/* + * Return an array of integers at the given type size and signedness. + */ +int +getenv_array(const char *name, void *pdata, int size, int *psize, + int type_size, bool allow_signed) +{ + char buf[KENV_MNAMELEN + 1 + KENV_MVALLEN + 1]; + uint8_t shift; + int64_t value; + int64_t old; + char *end; + char *ptr; + int n; + + if (getenv_string(name, buf, sizeof(buf)) == 0) + return (0); + + /* get maximum number of elements */ + size /= type_size; + + n = 0; + + for (ptr = buf; *ptr != 0; ) { + + value = strtoq(ptr, &end, 0); + + /* check if signed numbers are allowed */ + if (value < 0 && !allow_signed) + goto error; + + /* check for invalid value */ + if (ptr == end) + goto error; + + /* check for valid suffix */ + switch (*end) { + case 't': + case 'T': + shift = 40; + end++; + break; + case 'g': + case 'G': + shift = 30; + end++; + break; + case 'm': + case 'M': + shift = 20; + end++; + break; + case 'k': + case 'K': + shift = 10; + end++; + break; + case ' ': + case '\t': + case ',': + case 0: + shift = 0; + break; + default: + /* garbage after numeric value */ + goto error; + } + + /* skip till next value, if any */ + while (*end == '\t' || *end == ',' || *end == ' ') + end++; + + /* update pointer */ + ptr = end; + + /* apply shift */ + old = value; + value <<= shift; + + /* overflow check */ + if ((value >> shift) != old) + goto error; + + /* check for buffer overflow */ + if (n >= size) + goto error; + + /* store value according to type size */ + switch (type_size) { + case 1: + if (allow_signed) { + if (value < SCHAR_MIN || value > SCHAR_MAX) + goto error; + } else { + if (value < 0 || value > UCHAR_MAX) + goto error; + } + ((uint8_t *)pdata)[n] = (uint8_t)value; + break; + case 2: + if (allow_signed) { + if (value < SHRT_MIN || value > SHRT_MAX) + goto error; + } else { + if (value < 0 || value > USHRT_MAX) + goto error; + } + ((uint16_t *)pdata)[n] = (uint16_t)value; + break; + case 4: + if (allow_signed) { + if (value < INT_MIN || value > INT_MAX) + goto error; + } else { + if (value > UINT_MAX) + goto error; + } + ((uint32_t *)pdata)[n] = (uint32_t)value; + break; + case 8: + ((uint64_t *)pdata)[n] = (uint64_t)value; + break; + default: + goto error; + } + n++; + } + *psize = n * type_size; + + if (n != 0) + return (1); /* success */ +error: + return (0); /* failure */ } /* Modified: stable/11/sys/kern/kern_sysctl.c ============================================================================== --- stable/11/sys/kern/kern_sysctl.c Wed Jun 27 07:18:54 2018 (r335698) +++ stable/11/sys/kern/kern_sysctl.c Wed Jun 27 07:24:07 2018 (r335699) @@ -191,13 +191,8 @@ sysctl_load_tunable_by_oid_locked(struct sysctl_oid *o char path[96]; ssize_t rem = sizeof(path); ssize_t len; - uint8_t val_8; - uint16_t val_16; - uint32_t val_32; - int val_int; - long val_long; - int64_t val_64; - quad_t val_quad; + uint8_t data[512] __aligned(sizeof(uint64_t)); + int size; int error; path[--rem] = 0; @@ -225,85 +220,88 @@ sysctl_load_tunable_by_oid_locked(struct sysctl_oid *o switch (oidp->oid_kind & CTLTYPE) { case CTLTYPE_INT: - if (getenv_int(path + rem, &val_int) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(int), GETENV_SIGNED) == 0) return; - req.newlen = sizeof(val_int); - req.newptr = &val_int; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_UINT: - if (getenv_uint(path + rem, (unsigned int *)&val_int) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(int), GETENV_UNSIGNED) == 0) return; - req.newlen = sizeof(val_int); - req.newptr = &val_int; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_LONG: - if (getenv_long(path + rem, &val_long) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(long), GETENV_SIGNED) == 0) return; - req.newlen = sizeof(val_long); - req.newptr = &val_long; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_ULONG: - if (getenv_ulong(path + rem, (unsigned long *)&val_long) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(long), GETENV_UNSIGNED) == 0) return; - req.newlen = sizeof(val_long); - req.newptr = &val_long; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_S8: - if (getenv_int(path + rem, &val_int) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(int8_t), GETENV_SIGNED) == 0) return; - val_8 = val_int; - req.newlen = sizeof(val_8); - req.newptr = &val_8; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_S16: - if (getenv_int(path + rem, &val_int) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(int16_t), GETENV_SIGNED) == 0) return; - val_16 = val_int; - req.newlen = sizeof(val_16); - req.newptr = &val_16; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_S32: - if (getenv_long(path + rem, &val_long) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(int32_t), GETENV_SIGNED) == 0) return; - val_32 = val_long; - req.newlen = sizeof(val_32); - req.newptr = &val_32; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_S64: - if (getenv_quad(path + rem, &val_quad) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(int64_t), GETENV_SIGNED) == 0) return; - val_64 = val_quad; - req.newlen = sizeof(val_64); - req.newptr = &val_64; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_U8: - if (getenv_uint(path + rem, (unsigned int *)&val_int) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(uint8_t), GETENV_UNSIGNED) == 0) return; - val_8 = val_int; - req.newlen = sizeof(val_8); - req.newptr = &val_8; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_U16: - if (getenv_uint(path + rem, (unsigned int *)&val_int) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(uint16_t), GETENV_UNSIGNED) == 0) return; - val_16 = val_int; - req.newlen = sizeof(val_16); - req.newptr = &val_16; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_U32: - if (getenv_ulong(path + rem, (unsigned long *)&val_long) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(uint32_t), GETENV_UNSIGNED) == 0) return; - val_32 = val_long; - req.newlen = sizeof(val_32); - req.newptr = &val_32; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_U64: - /* XXX there is no getenv_uquad() */ - if (getenv_quad(path + rem, &val_quad) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(uint64_t), GETENV_UNSIGNED) == 0) return; - val_64 = val_quad; - req.newlen = sizeof(val_64); - req.newptr = &val_64; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_STRING: penv = kern_getenv(path + rem); Modified: stable/11/sys/sys/systm.h ============================================================================== --- stable/11/sys/sys/systm.h Wed Jun 27 07:18:54 2018 (r335698) +++ stable/11/sys/sys/systm.h Wed Jun 27 07:24:07 2018 (r335699) @@ -345,6 +345,11 @@ int kern_setenv(const char *name, const char *value); int kern_unsetenv(const char *name); int testenv(const char *name); +int getenv_array(const char *name, void *data, int size, int *psize, + int type_size, bool allow_signed); +#define GETENV_UNSIGNED false /* negative numbers not allowed */ +#define GETENV_SIGNED true /* negative numbers allowed */ + typedef uint64_t (cpu_tick_f)(void); void set_cputicker(cpu_tick_f *func, uint64_t freq, unsigned var); extern cpu_tick_f *cpu_ticks; From owner-svn-src-stable@freebsd.org Wed Jun 27 17:29:28 2018 Return-Path: Delivered-To: svn-src-stable@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 DD0B7102ED86; Wed, 27 Jun 2018 17:29:28 +0000 (UTC) (envelope-from gjb@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 8456D894B5; Wed, 27 Jun 2018 17:29:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62C69261FB; Wed, 27 Jun 2018 17:29:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RHTSov088094; Wed, 27 Jun 2018 17:29:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RHTSTK088093; Wed, 27 Jun 2018 17:29:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806271729.w5RHTSTK088093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 27 Jun 2018 17:29:28 +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: r335714 - stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Commit-Revision: 335714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 17:29:29 -0000 Author: gjb Date: Wed Jun 27 17:29:27 2018 New Revision: 335714 URL: https://svnweb.freebsd.org/changeset/base/335714 Log: Add an entry about an incorrectly-listed driver name in the 11.2 announcement. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Wed Jun 27 17:18:12 2018 (r335713) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Wed Jun 27 17:29:27 2018 (r335714) @@ -211,6 +211,13 @@ boot that no longer exists. The correct URL is . + + + [2018-06-27] The announcement email for &os; 11.2 + incorrectly states the ocs_fw(4) driver + had been added; this should have stated + &man.ocs.fc.4;. + From owner-svn-src-stable@freebsd.org Wed Jun 27 19:42:56 2018 Return-Path: Delivered-To: svn-src-stable@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 6AFC21004A13; Wed, 27 Jun 2018 19:42:56 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 1C9328FA3F; Wed, 27 Jun 2018 19:42:56 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F1DDB277E2; Wed, 27 Jun 2018 19:42:55 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RJgt1w058784; Wed, 27 Jun 2018 19:42:55 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJgtnH058783; Wed, 27 Jun 2018 19:42:55 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201806271942.w5RJgtnH058783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 27 Jun 2018 19:42:55 +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: r335734 - in stable: 10/contrib/amd/amq 11/contrib/amd/amq X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/amd/amq 11/contrib/amd/amq X-SVN-Commit-Revision: 335734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 19:42:56 -0000 Author: cy Date: Wed Jun 27 19:42:55 2018 New Revision: 335734 URL: https://svnweb.freebsd.org/changeset/base/335734 Log: MFC r335355: Fix amq -i timestamp segmentation violation. Modified: stable/11/contrib/amd/amq/amq.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/amd/amq/amq.c Directory Properties: stable/10/ (props changed) Modified: stable/11/contrib/amd/amq/amq.c ============================================================================== --- stable/11/contrib/amd/amq/amq.c Wed Jun 27 19:29:15 2018 (r335733) +++ stable/11/contrib/amd/amq/amq.c Wed Jun 27 19:42:55 2018 (r335734) @@ -79,7 +79,7 @@ enum show_opt { static void time_print(time_type tt) { - time_t t = (time_t)*tt; + time_t t = (time_t)(intptr_t)tt; struct tm *tp = localtime(&t); printf("%02d/%02d/%04d %02d:%02d:%02d", tp->tm_mon + 1, tp->tm_mday, From owner-svn-src-stable@freebsd.org Wed Jun 27 19:42:56 2018 Return-Path: Delivered-To: svn-src-stable@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 CAD321004A1B; Wed, 27 Jun 2018 19:42:56 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 6EBE08FA41; Wed, 27 Jun 2018 19:42:56 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51491277E3; Wed, 27 Jun 2018 19:42:56 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RJgul2058791; Wed, 27 Jun 2018 19:42:56 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJguX0058790; Wed, 27 Jun 2018 19:42:56 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201806271942.w5RJguX0058790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 27 Jun 2018 19:42:56 +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: r335734 - in stable: 10/contrib/amd/amq 11/contrib/amd/amq X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/amd/amq 11/contrib/amd/amq X-SVN-Commit-Revision: 335734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 19:42:57 -0000 Author: cy Date: Wed Jun 27 19:42:55 2018 New Revision: 335734 URL: https://svnweb.freebsd.org/changeset/base/335734 Log: MFC r335355: Fix amq -i timestamp segmentation violation. Modified: stable/10/contrib/amd/amq/amq.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/amd/amq/amq.c Directory Properties: stable/11/ (props changed) Modified: stable/10/contrib/amd/amq/amq.c ============================================================================== --- stable/10/contrib/amd/amq/amq.c Wed Jun 27 19:29:15 2018 (r335733) +++ stable/10/contrib/amd/amq/amq.c Wed Jun 27 19:42:55 2018 (r335734) @@ -79,7 +79,7 @@ enum show_opt { static void time_print(time_type tt) { - time_t t = (time_t)*tt; + time_t t = (time_t)(intptr_t)tt; struct tm *tp = localtime(&t); printf("%02d/%02d/%04d %02d:%02d:%02d", tp->tm_mon + 1, tp->tm_mday, From owner-svn-src-stable@freebsd.org Wed Jun 27 20:50:24 2018 Return-Path: Delivered-To: svn-src-stable@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 1D57E10103D2; Wed, 27 Jun 2018 20:50:24 +0000 (UTC) (envelope-from dteske@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 C53F97218E; Wed, 27 Jun 2018 20:50:23 +0000 (UTC) (envelope-from dteske@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 A15D4209; Wed, 27 Jun 2018 20:50:23 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RKoN8Z090249; Wed, 27 Jun 2018 20:50:23 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RKoNMi090248; Wed, 27 Jun 2018 20:50:23 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806272050.w5RKoNMi090248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 27 Jun 2018 20:50:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335735 - stable/11/stand/forth X-SVN-Group: stable-11 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/11/stand/forth X-SVN-Commit-Revision: 335735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 20:50:24 -0000 Author: dteske Date: Wed Jun 27 20:50:23 2018 New Revision: 335735 URL: https://svnweb.freebsd.org/changeset/base/335735 Log: MFC r335607: check-password.4th(8): Fix manual [in]accuracy SVN r280384 updated the maximum password length from 16 bytes to 255. The manual was not updated to reflect this. Sponsored by: Smule, Inc. Modified: stable/11/stand/forth/check-password.4th.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/forth/check-password.4th.8 ============================================================================== --- stable/11/stand/forth/check-password.4th.8 Wed Jun 27 19:42:55 2018 (r335734) +++ stable/11/stand/forth/check-password.4th.8 Wed Jun 27 20:50:23 2018 (r335735) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2015 Devin Teske +.\" Copyright (c) 2011-2018 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2015 +.Dd June 24, 2018 .Dt CHECK-PASSWORD.4TH 8 .Os .Sh NAME @@ -91,7 +91,7 @@ for additional information. The environment variables that effect its behavior are: .Bl -tag -width bootlock_password -offset indent .It Va bootlock_password -Sets the bootlock password (up to 16 characters long) that is required by +Sets the bootlock password (up to 255 characters long) that is required by .Ic check-password to be entered before the system is allowed to boot. .It Va geom_eli_passphrase_prompt @@ -100,7 +100,7 @@ kernel for later mounting of .Xr geli 8 encrypted root device(s). .It Va password -Sets the password (up to 16 characters long) that is required by +Sets the password (up to 255 characters long) that is required by .Ic check-password before the user is allowed to visit the boot menu. .El From owner-svn-src-stable@freebsd.org Wed Jun 27 20:54:14 2018 Return-Path: Delivered-To: svn-src-stable@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 2387C1010988; Wed, 27 Jun 2018 20:54:14 +0000 (UTC) (envelope-from kevans@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 C1DFC728C4; Wed, 27 Jun 2018 20:54:13 +0000 (UTC) (envelope-from kevans@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 8A23539A; Wed, 27 Jun 2018 20:54:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RKsDgY095102; Wed, 27 Jun 2018 20:54:13 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RKsD9T095101; Wed, 27 Jun 2018 20:54:13 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272054.w5RKsD9T095101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 20:54:13 +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: r335736 - stable/11/usr.bin/seq X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/usr.bin/seq X-SVN-Commit-Revision: 335736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 20:54:14 -0000 Author: kevans Date: Wed Jun 27 20:54:12 2018 New Revision: 335736 URL: https://svnweb.freebsd.org/changeset/base/335736 Log: MFC r333122: seq(1): Provide some long options These match GNU seq(1) names where applicable for compatibility purposes. Modified: stable/11/usr.bin/seq/seq.1 stable/11/usr.bin/seq/seq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/seq/seq.1 ============================================================================== --- stable/11/usr.bin/seq/seq.1 Wed Jun 27 20:50:23 2018 (r335735) +++ stable/11/usr.bin/seq/seq.1 Wed Jun 27 20:54:12 2018 (r335736) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 12, 2016 +.Dd April 30, 2018 .Dt SEQ 1 .Os .Sh NAME @@ -72,7 +72,7 @@ The .Nm utility accepts the following options: .Bl -tag -width Ar -.It Fl f Ar format +.It Fl f Ar format , Fl -format Ar format Use a .Xr printf 3 style @@ -98,7 +98,7 @@ defined in .St -ansiC . The default is .Cm %g . -.It Fl s Ar string +.It Fl s Ar string , Fl -separator Ar string Use .Ar string to separate numbers. @@ -109,7 +109,7 @@ defined in .St -ansiC . The default is .Cm \en . -.It Fl t Ar string +.It Fl t Ar string , Fl -terminator Ar string Use .Ar string to terminate sequence of numbers. @@ -121,7 +121,7 @@ defined in This option is useful when the default separator does not contain a .Cm \en . -.It Fl w +.It Fl w , Fl -fixed-width Equalize the widths of all numbers by padding with zeros as necessary. This option has no effect with the .Fl f Modified: stable/11/usr.bin/seq/seq.c ============================================================================== --- stable/11/usr.bin/seq/seq.c Wed Jun 27 20:50:23 2018 (r335735) +++ stable/11/usr.bin/seq/seq.c Wed Jun 27 20:54:12 2018 (r335736) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -67,6 +68,15 @@ static int valid_format(const char *); static char *generate_format(double, double, double, int, char); static char *unescape(char *); +static const struct option long_opts[] = +{ + {"format", required_argument, NULL, 'f'}, + {"separator", required_argument, NULL, 's'}, + {"terminator", required_argument, NULL, 't'}, + {"equal-width", no_argument, NULL, 'w'}, + {NULL, no_argument, NULL, 0} +}; + /* * The seq command will print out a numeric sequence from 1, the default, * to a user specified upper limit by 1. The lower bound and increment @@ -97,7 +107,7 @@ main(int argc, char *argv[]) * least they trip up getopt(3). */ while ((optind < argc) && !numeric(argv[optind]) && - (c = getopt(argc, argv, "f:hs:t:w")) != -1) { + (c = getopt_long(argc, argv, "+f:hs:t:w", long_opts, NULL)) != -1) { switch (c) { case 'f': /* format (plan9) */ From owner-svn-src-stable@freebsd.org Wed Jun 27 20:55:50 2018 Return-Path: Delivered-To: svn-src-stable@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 BB0801010B24; Wed, 27 Jun 2018 20:55:50 +0000 (UTC) (envelope-from kevans@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 6C1B072AAB; Wed, 27 Jun 2018 20:55:50 +0000 (UTC) (envelope-from kevans@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 4D03139B; Wed, 27 Jun 2018 20:55:50 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RKto8T095265; Wed, 27 Jun 2018 20:55:50 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RKtnIH095263; Wed, 27 Jun 2018 20:55:49 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272055.w5RKtnIH095263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 20:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335737 - stable/11/usr.bin/uniq X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/usr.bin/uniq X-SVN-Commit-Revision: 335737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 20:55:51 -0000 Author: kevans Date: Wed Jun 27 20:55:49 2018 New Revision: 335737 URL: https://svnweb.freebsd.org/changeset/base/335737 Log: MFC r333156: uniq(1): Add some long options These match GNU uniq(1) where appropriate for compatibility's sake. While here, re-sort options alphabetically by the short-option. Modified: stable/11/usr.bin/uniq/uniq.1 stable/11/usr.bin/uniq/uniq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/uniq/uniq.1 ============================================================================== --- stable/11/usr.bin/uniq/uniq.1 Wed Jun 27 20:54:12 2018 (r335736) +++ stable/11/usr.bin/uniq/uniq.1 Wed Jun 27 20:55:49 2018 (r335737) @@ -31,7 +31,7 @@ .\" From: @(#)uniq.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 15, 2017 +.Dd May 1, 2018 .Dt UNIQ 1 .Os .Sh NAME @@ -71,34 +71,34 @@ so it may be necessary to sort the files first. .Pp The following options are available: .Bl -tag -width Ds -.It Fl c +.It Fl c , Fl -count Precede each output line with the count of the number of times the line occurred in the input, followed by a single space. -.It Fl d +.It Fl d , Fl -repeated Only output lines that are repeated in the input. -.It Fl f Ar num +.It Fl f Ar num , Fl -skip-fields Ar num Ignore the first .Ar num fields in each input line when doing comparisons. A field is a string of non-blank characters separated from adjacent fields by blanks. Field numbers are one based, i.e., the first field is field one. -.It Fl s Ar chars +.It Fl i , Fl -ignore-case +Case insensitive comparison of lines. +.It Fl s Ar chars , Fl -skip-chars Ar chars Ignore the first .Ar chars characters in each input line when doing comparisons. If specified in conjunction with the -.Fl f +.Fl f , Fl -unique option, the first .Ar chars characters after the first .Ar num fields will be ignored. Character numbers are one based, i.e., the first character is character one. -.It Fl u +.It Fl u , Fl -unique Only output lines that are not repeated in the input. -.It Fl i -Case insensitive comparison of lines. .\".It Fl Ns Ar n .\"(Deprecated; replaced by .\".Fl f ) . Modified: stable/11/usr.bin/uniq/uniq.c ============================================================================== --- stable/11/usr.bin/uniq/uniq.c Wed Jun 27 20:54:12 2018 (r335736) +++ stable/11/usr.bin/uniq/uniq.c Wed Jun 27 20:55:49 2018 (r335737) @@ -49,6 +49,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -65,6 +66,17 @@ static const char rcsid[] = static int cflag, dflag, uflag, iflag; static int numchars, numfields, repeats; +static const struct option long_opts[] = +{ + {"count", no_argument, NULL, 'c'}, + {"repeated", no_argument, NULL, 'd'}, + {"skip-fields", required_argument, NULL, 'f'}, + {"ignore-case", no_argument, NULL, 'i'}, + {"skip-chars", required_argument, NULL, 's'}, + {"unique", no_argument, NULL, 'u'}, + {NULL, no_argument, NULL, 0} +}; + static FILE *file(const char *, const char *); static wchar_t *convert(const char *); static int inlcmp(const char *, const char *); @@ -98,7 +110,8 @@ main (int argc, char *argv[]) (void) setlocale(LC_ALL, ""); obsolete(argv); - while ((ch = getopt(argc, argv, "cdif:s:u")) != -1) + while ((ch = getopt_long(argc, argv, "+cdif:s:u", long_opts, + NULL)) != -1) switch (ch) { case 'c': cflag = 1; From owner-svn-src-stable@freebsd.org Wed Jun 27 21:00:11 2018 Return-Path: Delivered-To: svn-src-stable@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 E3A0B1010E36; Wed, 27 Jun 2018 21:00:10 +0000 (UTC) (envelope-from kevans@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 9576E72D79; Wed, 27 Jun 2018 21:00:10 +0000 (UTC) (envelope-from kevans@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 772293A0; Wed, 27 Jun 2018 21:00:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RL0Amr095653; Wed, 27 Jun 2018 21:00:10 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RL0A9F095651; Wed, 27 Jun 2018 21:00:10 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272100.w5RL0A9F095651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335738 - stable/11/usr.bin/cmp X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/usr.bin/cmp X-SVN-Commit-Revision: 335738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 21:00:11 -0000 Author: kevans Date: Wed Jun 27 21:00:09 2018 New Revision: 335738 URL: https://svnweb.freebsd.org/changeset/base/335738 Log: MFC r333157: cmp(1): Provide some long options These match GNU cmp(1) for compatibility where applicable. Future work might implement the -i option from GNU cmp(1) to express skip either in terms of both files or of the form "SKIP1:SKIP2" rather than specifying them as additional arguments to cmp(1). Modified: stable/11/usr.bin/cmp/cmp.1 stable/11/usr.bin/cmp/cmp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/cmp/cmp.1 ============================================================================== --- stable/11/usr.bin/cmp/cmp.1 Wed Jun 27 20:55:49 2018 (r335737) +++ stable/11/usr.bin/cmp/cmp.1 Wed Jun 27 21:00:09 2018 (r335738) @@ -31,7 +31,7 @@ .\" @(#)cmp.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 18, 2013 +.Dd May 1, 2018 .Dt CMP 1 .Os .Sh NAME @@ -59,10 +59,10 @@ The following options are available: .Bl -tag -width indent .It Fl h Do not follow symbolic links. -.It Fl l +.It Fl l , Fl -verbose Print the byte number (decimal) and the differing byte values (octal) for each difference. -.It Fl s +.It Fl s , Fl -silent , Fl -quiet Print nothing for differing files; return exit status only. .It Fl x Modified: stable/11/usr.bin/cmp/cmp.c ============================================================================== --- stable/11/usr.bin/cmp/cmp.c Wed Jun 27 20:55:49 2018 (r335737) +++ stable/11/usr.bin/cmp/cmp.c Wed Jun 27 21:00:09 2018 (r335738) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -57,6 +58,14 @@ __FBSDID("$FreeBSD$"); int lflag, sflag, xflag, zflag; +static const struct option long_opts[] = +{ + {"verbose", no_argument, NULL, 'l'}, + {"silent", no_argument, NULL, 's'}, + {"quiet", no_argument, NULL, 's'}, + {NULL, no_argument, NULL, 0} +}; + static void usage(void); int @@ -68,7 +77,7 @@ main(int argc, char *argv[]) const char *file1, *file2; oflag = O_RDONLY; - while ((ch = getopt(argc, argv, "hlsxz")) != -1) + while ((ch = getopt_long(argc, argv, "+hlsxz", long_opts, NULL)) != -1) switch (ch) { case 'h': /* Don't follow symlinks */ oflag |= O_NOFOLLOW; From owner-svn-src-stable@freebsd.org Wed Jun 27 21:03:06 2018 Return-Path: Delivered-To: svn-src-stable@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 6B6EF10111BD; Wed, 27 Jun 2018 21:03:06 +0000 (UTC) (envelope-from kevans@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 1B0057318E; Wed, 27 Jun 2018 21:03:06 +0000 (UTC) (envelope-from kevans@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 EF970531; Wed, 27 Jun 2018 21:03:05 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RL35Hh000640; Wed, 27 Jun 2018 21:03:05 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RL35eU000639; Wed, 27 Jun 2018 21:03:05 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272103.w5RL35eU000639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:03: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: r335739 - in stable/11/usr.bin/seq: . tests X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/usr.bin/seq: . tests X-SVN-Commit-Revision: 335739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 21:03:06 -0000 Author: kevans Date: Wed Jun 27 21:03:05 2018 New Revision: 335739 URL: https://svnweb.freebsd.org/changeset/base/335739 Log: MFC r330086, r333155: seq(1) improvements MFC r330086 (cem): seq(1): Consistently include 'last' for non-integers The source of error is a rounded increment being too large and thus the loop steps slightly past 'last'. Perform a final comparison using the formatted string values (truncated precision) to determine if we still need to print the 'last' value. MFC r333155: seq(1): Move long_opts up with globals PR: 217149 Added: stable/11/usr.bin/seq/tests/ - copied from r330086, head/usr.bin/seq/tests/ Modified: stable/11/usr.bin/seq/Makefile stable/11/usr.bin/seq/seq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/seq/Makefile ============================================================================== --- stable/11/usr.bin/seq/Makefile Wed Jun 27 21:00:09 2018 (r335738) +++ stable/11/usr.bin/seq/Makefile Wed Jun 27 21:03:05 2018 (r335739) @@ -1,8 +1,13 @@ # $NetBSD: Makefile,v 1.3 2009/04/14 22:15:26 lukem Exp $ # $FreeBSD$ +.include + PROG= seq LIBADD= m + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests .include Modified: stable/11/usr.bin/seq/seq.c ============================================================================== --- stable/11/usr.bin/seq/seq.c Wed Jun 27 21:00:09 2018 (r335738) +++ stable/11/usr.bin/seq/seq.c Wed Jun 27 21:03:05 2018 (r335739) @@ -57,6 +57,15 @@ __FBSDID("$FreeBSD$"); static const char *decimal_point = "."; /* default */ static char default_format[] = { "%g" }; /* default */ +static const struct option long_opts[] = +{ + {"format", required_argument, NULL, 'f'}, + {"separator", required_argument, NULL, 's'}, + {"terminator", required_argument, NULL, 't'}, + {"equal-width", no_argument, NULL, 'w'}, + {NULL, no_argument, NULL, 0} +}; + /* Prototypes */ static double e_atof(const char *); @@ -68,15 +77,6 @@ static int valid_format(const char *); static char *generate_format(double, double, double, int, char); static char *unescape(char *); -static const struct option long_opts[] = -{ - {"format", required_argument, NULL, 'f'}, - {"separator", required_argument, NULL, 's'}, - {"terminator", required_argument, NULL, 't'}, - {"equal-width", no_argument, NULL, 'w'}, - {NULL, no_argument, NULL, 0} -}; - /* * The seq command will print out a numeric sequence from 1, the default, * to a user specified upper limit by 1. The lower bound and increment @@ -86,17 +86,20 @@ static const struct option long_opts[] = int main(int argc, char *argv[]) { - int c = 0, errflg = 0; - int equalize = 0; - double first = 1.0; - double last = 0.0; - double incr = 0.0; + const char *sep, *term; struct lconv *locale; - char *fmt = NULL; - const char *sep = "\n"; - const char *term = NULL; - char pad = ZERO; + char pad, *fmt, *cur_print, *last_print; + double first, last, incr, last_shown_value, cur, step; + int c, errflg, equalize; + pad = ZERO; + fmt = NULL; + first = 1.0; + last = incr = last_shown_value = 0.0; + c = errflg = equalize = 0; + sep = "\n"; + term = NULL; + /* Determine the locale's decimal point. */ locale = localeconv(); if (locale && locale->decimal_point && locale->decimal_point[0] != '\0') @@ -179,17 +182,32 @@ main(int argc, char *argv[]) } else fmt = generate_format(first, incr, last, equalize, pad); - if (incr > 0) { - for (; first <= last; first += incr) { - printf(fmt, first); - fputs(sep, stdout); - } - } else { - for (; first >= last; first += incr) { - printf(fmt, first); - fputs(sep, stdout); - } + for (step = 1, cur = first; incr > 0 ? cur <= last : cur >= last; + cur = first + incr * step++) { + printf(fmt, cur); + fputs(sep, stdout); + last_shown_value = cur; } + + /* + * Did we miss the last value of the range in the loop above? + * + * We might have, so check if the printable version of the last + * computed value ('cur') and desired 'last' value are equal. If they + * are equal after formatting truncation, but 'cur' and + * 'last_shown_value' are not equal, it means the exit condition of the + * loop held true due to a rounding error and we still need to print + * 'last'. + */ + asprintf(&cur_print, fmt, cur); + asprintf(&last_print, fmt, last); + if (strcmp(cur_print, last_print) == 0 && cur != last_shown_value) { + fputs(last_print, stdout); + fputs(sep, stdout); + } + free(cur_print); + free(last_print); + if (term != NULL) fputs(term, stdout); From owner-svn-src-stable@freebsd.org Wed Jun 27 21:04:30 2018 Return-Path: Delivered-To: svn-src-stable@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 3E02E10112FC; Wed, 27 Jun 2018 21:04:30 +0000 (UTC) (envelope-from kevans@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 DBF35732FA; Wed, 27 Jun 2018 21:04:29 +0000 (UTC) (envelope-from kevans@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 BC9B1533; Wed, 27 Jun 2018 21:04:29 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RL4Th2000767; Wed, 27 Jun 2018 21:04:29 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RL4TKx000766; Wed, 27 Jun 2018 21:04:29 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272104.w5RL4TKx000766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335740 - stable/11/lib/libc/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/lib/libc/sys X-SVN-Commit-Revision: 335740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 21:04:30 -0000 Author: kevans Date: Wed Jun 27 21:04:29 2018 New Revision: 335740 URL: https://svnweb.freebsd.org/changeset/base/335740 Log: MFC r333192: fcntl(2): Vaguely document that ENOTTY is possible + examples Modified: stable/11/lib/libc/sys/fcntl.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/fcntl.2 ============================================================================== --- stable/11/lib/libc/sys/fcntl.2 Wed Jun 27 21:03:05 2018 (r335739) +++ stable/11/lib/libc/sys/fcntl.2 Wed Jun 27 21:04:29 2018 (r335740) @@ -28,7 +28,7 @@ .\" @(#)fcntl.2 8.2 (Berkeley) 1/12/94 .\" $FreeBSD$ .\" -.Dd July 7, 2016 +.Dd May 2, 2018 .Dt FCNTL 2 .Os .Sh NAME @@ -572,6 +572,14 @@ process are already in use, or no file descriptors greater than or equal to .Fa arg are available. +.It Bq Er ENOTTY +The +.Fa fd +argument is not a valid file descriptor for the requested operation. +This may be the case if +.Fa fd +is a device node, or a descriptor returned by +.Xr kqueue 2 . .It Bq Er ENOLCK The argument .Fa cmd From owner-svn-src-stable@freebsd.org Wed Jun 27 21:09:56 2018 Return-Path: Delivered-To: svn-src-stable@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 519831011B5E; Wed, 27 Jun 2018 21:09:56 +0000 (UTC) (envelope-from kevans@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 02651736B8; Wed, 27 Jun 2018 21:09:56 +0000 (UTC) (envelope-from kevans@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 B7E28534; Wed, 27 Jun 2018 21:09:55 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RL9tHv001052; Wed, 27 Jun 2018 21:09:55 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RL9tvx001051; Wed, 27 Jun 2018 21:09:55 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272109.w5RL9tvx001051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:09:55 +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: r335741 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 335741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 21:09:56 -0000 Author: kevans Date: Wed Jun 27 21:09:55 2018 New Revision: 335741 URL: https://svnweb.freebsd.org/changeset/base/335741 Log: MFC r333221: rsu(4) does not require legal.realtek.license_ack=1 The rsu firmware license check has been disabled since r292756. Changes rsu(4) since the license ack is no longer required. While here, add `device rsufw` hint to the kernel configuration lines and add/update paths to the installed license file in both rsu(4) and rsufw(4). Modified: stable/11/share/man/man4/rsu.4 stable/11/share/man/man4/rsufw.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/rsu.4 ============================================================================== --- stable/11/share/man/man4/rsu.4 Wed Jun 27 21:04:29 2018 (r335740) +++ stable/11/share/man/man4/rsu.4 Wed Jun 27 21:09:55 2018 (r335741) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd October 15, 2015 +.Dd April 4, 2018 .Dt RSU 4 .Os .Sh NAME @@ -30,22 +30,15 @@ place the following lines in your kernel configuration .Cd "device ohci" .Cd "device usb" .Cd "device rsu" +.Cd "device rsufw" .Cd "device wlan" .Ed .Pp Alternatively, to load the driver as a module at boot time, -place the following line in +place the following lines in .Xr loader.conf 5 : .Bd -literal -offset indent if_rsu_load="YES" -.Ed -.Pp -After you have read the license in -.Pa /usr/share/doc/legal/realtek.LICENSE -you will want to add the following lines to -.Xr loader.conf 5 : -.Bd -literal -offset indent -legal.realtek.license_ack=1 rsu-rtl8712fw_load="YES" .Ed .Sh DESCRIPTION @@ -96,6 +89,12 @@ The driver can be configured at runtime with .Xr ifconfig 8 . .Sh FILES +.Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact +.It Pa /usr/share/doc/legal/realtek.LICENSE +.Nm +firmware license +.El +.Pp The driver needs at least version 1.2 of the following firmware file, which is loaded when an interface is attached: .Pp Modified: stable/11/share/man/man4/rsufw.4 ============================================================================== --- stable/11/share/man/man4/rsufw.4 Wed Jun 27 21:04:29 2018 (r335740) +++ stable/11/share/man/man4/rsufw.4 Wed Jun 27 21:09:55 2018 (r335741) @@ -13,7 +13,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd July 21, 2013 +.Dd April 4, 2018 .Dt RSUFW 4 .Os .Sh NAME @@ -40,7 +40,7 @@ rsu-rtl8712fw_load="YES" This module provides the firmware for the Realtek RTL8188SU and RTL8192SU chip based USB WiFi adapters. Please read Realtek's license, -.Pa /usr/share/license/realtek . +.Pa /usr/share/doc/legal/realtek.LICENSE . .Sh SEE ALSO .Xr rsu 4 , .Xr firmware 9 From owner-svn-src-stable@freebsd.org Wed Jun 27 21:11:30 2018 Return-Path: Delivered-To: svn-src-stable@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 25F4A1011D33; Wed, 27 Jun 2018 21:11:30 +0000 (UTC) (envelope-from kevans@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 CF336739F9; Wed, 27 Jun 2018 21:11:29 +0000 (UTC) (envelope-from kevans@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 975CB57C; Wed, 27 Jun 2018 21:11:29 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RLBTuK003655; Wed, 27 Jun 2018 21:11:29 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RLBTWe003652; Wed, 27 Jun 2018 21:11:29 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272111.w5RLBTWe003652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335742 - stable/11/usr.bin/sort X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/usr.bin/sort X-SVN-Commit-Revision: 335742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 21:11:30 -0000 Author: kevans Date: Wed Jun 27 21:11:28 2018 New Revision: 335742 URL: https://svnweb.freebsd.org/changeset/base/335742 Log: MFC r335404: sort(1): Fix -m when only implicit stdin is used for input Observe: printf "a\nb\nc\n" > /tmp/foo # Next command results in no output cat /tmp/foo | sort -m # Next command results in proper output cat /tmp/foo | sort -m - # Also works: sort -m /tmp/foo Some const'ification was done to simplify the actual solution of adding "-" explicitly to the file list if we didn't have any file arguments left over. PR: 190099 Modified: stable/11/usr.bin/sort/file.c stable/11/usr.bin/sort/file.h stable/11/usr.bin/sort/sort.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/sort/file.c ============================================================================== --- stable/11/usr.bin/sort/file.c Wed Jun 27 21:09:55 2018 (r335741) +++ stable/11/usr.bin/sort/file.c Wed Jun 27 21:11:28 2018 (r335742) @@ -227,7 +227,7 @@ file_list_init(struct file_list *fl, bool tmp) * Add a file name to the list */ void -file_list_add(struct file_list *fl, char *fn, bool allocate) +file_list_add(struct file_list *fl, const char *fn, bool allocate) { if (fl && fn) { @@ -1116,7 +1116,7 @@ file_headers_merge(size_t fnum, struct file_header **f * stdout. */ static void -merge_files_array(size_t argc, char **argv, const char *fn_out) +merge_files_array(size_t argc, const char **argv, const char *fn_out) { if (argv && fn_out) { Modified: stable/11/usr.bin/sort/file.h ============================================================================== --- stable/11/usr.bin/sort/file.h Wed Jun 27 21:09:55 2018 (r335741) +++ stable/11/usr.bin/sort/file.h Wed Jun 27 21:11:28 2018 (r335742) @@ -66,7 +66,7 @@ struct file_reader; */ struct file_list { - char **fns; + const char * *fns; size_t count; size_t sz; bool tmp; @@ -108,7 +108,7 @@ char *new_tmp_file_name(void); void tmp_file_atexit(const char *tmp_file); void file_list_init(struct file_list *fl, bool tmp); -void file_list_add(struct file_list *fl, char *fn, bool allocate); +void file_list_add(struct file_list *fl, const char *fn, bool allocate); void file_list_populate(struct file_list *fl, int argc, char **argv, bool allocate); void file_list_clean(struct file_list *fl); Modified: stable/11/usr.bin/sort/sort.c ============================================================================== --- stable/11/usr.bin/sort/sort.c Wed Jun 27 21:09:55 2018 (r335741) +++ stable/11/usr.bin/sort/sort.c Wed Jun 27 21:11:28 2018 (r335742) @@ -1299,7 +1299,11 @@ main(int argc, char **argv) struct file_list fl; file_list_init(&fl, false); - file_list_populate(&fl, argc, argv, true); + /* No file arguments remaining means "read from stdin." */ + if (argc == 0) + file_list_add(&fl, "-", true); + else + file_list_populate(&fl, argc, argv, true); merge_files(&fl, outfile); file_list_clean(&fl); } From owner-svn-src-stable@freebsd.org Wed Jun 27 21:13:21 2018 Return-Path: Delivered-To: svn-src-stable@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 05B421011FDF; Wed, 27 Jun 2018 21:13:20 +0000 (UTC) (envelope-from kevans@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 921CE73C07; Wed, 27 Jun 2018 21:13:20 +0000 (UTC) (envelope-from kevans@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 71B1E6C4; Wed, 27 Jun 2018 21:13:20 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RLDKmp006215; Wed, 27 Jun 2018 21:13:20 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RLDKZG006214; Wed, 27 Jun 2018 21:13:20 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272113.w5RLDKZG006214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:13:20 +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: r335743 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 335743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 21:13:21 -0000 Author: kevans Date: Wed Jun 27 21:13:20 2018 New Revision: 335743 URL: https://svnweb.freebsd.org/changeset/base/335743 Log: MFC r335458: Add debug.verbose_sysinit tunable for VERBOSE_SYSINIT VERBOSE_SYSINIT is currently an all-or-nothing option. debug.verbose_sysinit adds an option to have the code compiled in but quiet by default so that getting this information from a device in the field doesn't necessarily require distributing a recompiled kernel. Its default is VERBOSE_SYSINIT's value as defined in the kernconf. As such, the default behavior for simply omitting or including this option is unchanged. Modified: stable/11/sys/kern/init_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/init_main.c ============================================================================== --- stable/11/sys/kern/init_main.c Wed Jun 27 21:11:28 2018 (r335742) +++ stable/11/sys/kern/init_main.c Wed Jun 27 21:13:20 2018 (r335743) @@ -117,6 +117,18 @@ int bootverbose = BOOTVERBOSE; SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0, "Control the output of verbose kernel messages"); +#ifdef VERBOSE_SYSINIT +/* + * We'll use the defined value of VERBOSE_SYSINIT from the kernel config to + * dictate the default VERBOSE_SYSINIT behavior. Significant values for this + * option and associated tunable are: + * - 0, 'compiled in but silent by default' + * - 1, 'compiled in but verbose by default' (default) + */ +int verbose_sysinit = VERBOSE_SYSINIT; +TUNABLE_INT("debug.verbose_sysinit", &verbose_sysinit); +#endif + #ifdef INVARIANTS FEATURE(invariants, "Kernel compiled with INVARIANTS, may affect performance"); #endif @@ -264,7 +276,7 @@ restart: continue; #if defined(VERBOSE_SYSINIT) - if ((*sipp)->subsystem > last) { + if ((*sipp)->subsystem > last && verbose_sysinit != 0) { verbose = 1; last = (*sipp)->subsystem; printf("subsystem %x\n", last); From owner-svn-src-stable@freebsd.org Wed Jun 27 21:22:01 2018 Return-Path: Delivered-To: svn-src-stable@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 5A1751012618; Wed, 27 Jun 2018 21:22:01 +0000 (UTC) (envelope-from dteske@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 09428741EC; Wed, 27 Jun 2018 21:22:01 +0000 (UTC) (envelope-from dteske@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 DF090859; Wed, 27 Jun 2018 21:22:00 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RLM0Zr011172; Wed, 27 Jun 2018 21:22:00 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RLM0n4011171; Wed, 27 Jun 2018 21:22:00 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806272122.w5RLM0n4011171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 27 Jun 2018 21:22:00 +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: r335744 - stable/10/sys/boot/forth X-SVN-Group: stable-10 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/10/sys/boot/forth X-SVN-Commit-Revision: 335744 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 21:22:01 -0000 Author: dteske Date: Wed Jun 27 21:22:00 2018 New Revision: 335744 URL: https://svnweb.freebsd.org/changeset/base/335744 Log: MFC r335607: check-password.4th(8): Fix manual [in]accuracy SVN r280384 updated the maximum password length from 16 bytes to 255. The manual was not updated to reflect this. Sponsored by: Smule, Inc. Modified: stable/10/sys/boot/forth/check-password.4th.8 Modified: stable/10/sys/boot/forth/check-password.4th.8 ============================================================================== --- stable/10/sys/boot/forth/check-password.4th.8 Wed Jun 27 21:13:20 2018 (r335743) +++ stable/10/sys/boot/forth/check-password.4th.8 Wed Jun 27 21:22:00 2018 (r335744) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2015 Devin Teske +.\" Copyright (c) 2011-2018 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2015 +.Dd June 24, 2018 .Dt CHECK-PASSWORD.4TH 8 .Os .Sh NAME @@ -91,7 +91,7 @@ for additional information. The environment variables that effect its behavior are: .Bl -tag -width bootlock_password -offset indent .It Va bootlock_password -Sets the bootlock password (up to 16 characters long) that is required by +Sets the bootlock password (up to 255 characters long) that is required by .Ic check-password to be entered before the system is allowed to boot. .It Va geom_eli_passphrase_prompt @@ -100,7 +100,7 @@ kernel for later mounting of .Xr geli 8 encrypted root device(s). .It Va password -Sets the password (up to 16 characters long) that is required by +Sets the password (up to 255 characters long) that is required by .Ic check-password before the user is allowed to visit the boot menu. .El From owner-svn-src-stable@freebsd.org Wed Jun 27 21:22:49 2018 Return-Path: Delivered-To: svn-src-stable@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 467391012697; Wed, 27 Jun 2018 21:22:49 +0000 (UTC) (envelope-from kevans@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 EF7D974366; Wed, 27 Jun 2018 21:22:48 +0000 (UTC) (envelope-from kevans@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 D0A18879; Wed, 27 Jun 2018 21:22:48 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RLMm3i011248; Wed, 27 Jun 2018 21:22:48 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RLMmu7011247; Wed, 27 Jun 2018 21:22:48 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272122.w5RLMmu7011247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:22:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335745 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 335745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 21:22:49 -0000 Author: kevans Date: Wed Jun 27 21:22:48 2018 New Revision: 335745 URL: https://svnweb.freebsd.org/changeset/base/335745 Log: MFC r332395 (ian): Use explicit_bzero() when cleaning values out of the kenv Sometimes the values contain geli passphrases being communicated from loader(8) to the kernel, and some day the compiler may decide to start eliding calls to memset() for a pointer which is not dereferenced again before being passed to free(). Modified: stable/11/sys/kern/kern_environment.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_environment.c ============================================================================== --- stable/11/sys/kern/kern_environment.c Wed Jun 27 21:22:00 2018 (r335744) +++ stable/11/sys/kern/kern_environment.c Wed Jun 27 21:22:48 2018 (r335745) @@ -288,7 +288,7 @@ init_dynamic_kenv(void *data __unused) if (i < KENV_SIZE) { kenvp[i] = malloc(len, M_KENV, M_WAITOK); strcpy(kenvp[i++], cp); - memset(cp, 0, strlen(cp)); + explicit_bzero(cp, strlen(cp)); } else printf( "WARNING: too many kenv strings, ignoring %s\n", @@ -307,7 +307,7 @@ freeenv(char *env) { if (dynamic_kenv && env != NULL) { - memset(env, 0, strlen(env)); + explicit_bzero(env, strlen(env)); free(env, M_KENV); } } @@ -485,7 +485,7 @@ kern_unsetenv(const char *name) kenvp[i++] = kenvp[j]; kenvp[i] = NULL; mtx_unlock(&kenv_lock); - memset(oldenv, 0, strlen(oldenv)); + explicit_bzero(oldenv, strlen(oldenv)); free(oldenv, M_KENV); return (0); } From owner-svn-src-stable@freebsd.org Wed Jun 27 21:25:17 2018 Return-Path: Delivered-To: svn-src-stable@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 7BEA310127FB; Wed, 27 Jun 2018 21:25:17 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27FF074519; Wed, 27 Jun 2018 21:25:17 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id B8B5F2089C; Wed, 27 Jun 2018 21:25:16 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f176.google.com with SMTP id u6-v6so2738187lju.13; Wed, 27 Jun 2018 14:25:16 -0700 (PDT) X-Gm-Message-State: APt69E2b0YFPcdx3Da6Zl9D1rU0PyhB0mM77q8QNNE19a5PPJN+aa9LL PkJgumzVFvjGPX93HIbIfUReJSeo2CKYgRXUo+E= X-Google-Smtp-Source: AAOMgpdqTqpOVpug90zto9d9ydg4q3JdfL/T2vRrW/FbXieX1P4p8rJ1y1Vv9n2bTK4cOmGGbWHSJZUQtfozvgAEIXc= X-Received: by 2002:a2e:8051:: with SMTP id p17-v6mr5140539ljg.22.1530134715153; Wed, 27 Jun 2018 14:25:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:3c0f:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 14:24:54 -0700 (PDT) In-Reply-To: <201806272122.w5RLM0n4011171@repo.freebsd.org> References: <201806272122.w5RLM0n4011171@repo.freebsd.org> From: Kyle Evans Date: Wed, 27 Jun 2018 16:24:54 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r335744 - stable/10/sys/boot/forth To: Devin Teske Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 21:25:17 -0000 On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske wrote: > Author: dteske > Date: Wed Jun 27 21:22:00 2018 > New Revision: 335744 > URL: https://svnweb.freebsd.org/changeset/base/335744 > > Log: > MFC r335607: check-password.4th(8): Fix manual [in]accuracy > > SVN r280384 updated the maximum password length from 16 bytes to 255. The > manual was not updated to reflect this. > > Sponsored by: Smule, Inc. > > Modified: > stable/10/sys/boot/forth/check-password.4th.8 > Hi, I think this should probably have been supplemented with a record-only merge of r335607 since it has actually been MFC'd, just in the old location. I'm not sure how much it matters, though, other than reflecting that this (general this; stable/10 commits) really wasn't a direct commit. Thanks, Kyle Evans From owner-svn-src-stable@freebsd.org Wed Jun 27 21:57:24 2018 Return-Path: Delivered-To: svn-src-stable@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 646DF1013F56; Wed, 27 Jun 2018 21:57:24 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C25647566F; Wed, 27 Jun 2018 21:57:23 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=63464 helo=[10.1.4.66]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1fY970-00061E-1L; Wed, 27 Jun 2018 11:59:50 +0000 From: Devin Teske Message-Id: Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r335744 - stable/10/sys/boot/forth Date: Wed, 27 Jun 2018 14:57:19 -0700 In-Reply-To: Cc: Devin Teske , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org To: Kyle Evans References: <201806272122.w5RLM0n4011171@repo.freebsd.org> X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 21:57:24 -0000 > On Jun 27, 2018, at 2:24 PM, Kyle Evans wrote: >=20 > On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske > wrote: >> Author: dteske >> Date: Wed Jun 27 21:22:00 2018 >> New Revision: 335744 >> URL: https://svnweb.freebsd.org/changeset/base/335744 >>=20 >> Log: >> MFC r335607: check-password.4th(8): Fix manual [in]accuracy >>=20 >> SVN r280384 updated the maximum password length from 16 bytes to = 255. The >> manual was not updated to reflect this. >>=20 >> Sponsored by: Smule, Inc. >>=20 >> Modified: >> stable/10/sys/boot/forth/check-password.4th.8 >>=20 >=20 > Hi, >=20 > I think this should probably have been supplemented with a record-only > merge of r335607 since it has actually been MFC'd, just in the old > location. I'm not sure how much it matters, though, other than > reflecting that this (general this; stable/10 commits) really wasn't a > direct commit. >=20 I kept trying that and kept getting "tree conflict" because it wants to = record info in stand which doesn't exist. Do you have a recommended way to achieve this that has a half-way chance = of working? --=20 Cheers, Devin= From owner-svn-src-stable@freebsd.org Wed Jun 27 21:59:22 2018 Return-Path: Delivered-To: svn-src-stable@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 AE5C1101519D; Wed, 27 Jun 2018 21:59:22 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C2D07582C; Wed, 27 Jun 2018 21:59:22 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id ECD8D20BA8; Wed, 27 Jun 2018 21:59:21 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf0-f45.google.com with SMTP id m12-v6so2093924lfc.10; Wed, 27 Jun 2018 14:59:21 -0700 (PDT) X-Gm-Message-State: APt69E2svHH4Eb2KAEwXUTI8vOEwfLeGrrNbTxv1NhL7TUPhaAwUE8Sl U5uR41xcabmKNp9Cdlw/XASUeTnAUr3NTdU6COg= X-Google-Smtp-Source: AAOMgpfq/CsIhERajPJXzkmJEaRG69UG7GWZtqmIRCCxlhSVcknpzn8TGOqXMi7KW7P11CEHP06D4k25Glag932oQt4= X-Received: by 2002:a19:b598:: with SMTP id g24-v6mr5475331lfk.129.1530136760458; Wed, 27 Jun 2018 14:59:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:3c0f:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 14:58:59 -0700 (PDT) In-Reply-To: References: <201806272122.w5RLM0n4011171@repo.freebsd.org> From: Kyle Evans Date: Wed, 27 Jun 2018 16:58:59 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r335744 - stable/10/sys/boot/forth To: Devin Teske Cc: Kyle Evans , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 21:59:22 -0000 On Wed, Jun 27, 2018 at 4:57 PM, Devin Teske wrote: > > On Jun 27, 2018, at 2:24 PM, Kyle Evans wrote: > > On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske wrote: > > Author: dteske > Date: Wed Jun 27 21:22:00 2018 > New Revision: 335744 > URL: https://svnweb.freebsd.org/changeset/base/335744 > > Log: > MFC r335607: check-password.4th(8): Fix manual [in]accuracy > > SVN r280384 updated the maximum password length from 16 bytes to 255. The > manual was not updated to reflect this. > > Sponsored by: Smule, Inc. > > Modified: > stable/10/sys/boot/forth/check-password.4th.8 > > > Hi, > > I think this should probably have been supplemented with a record-only > merge of r335607 since it has actually been MFC'd, just in the old > location. I'm not sure how much it matters, though, other than > reflecting that this (general this; stable/10 commits) really wasn't a > direct commit. > > > I kept trying that and kept getting "tree conflict" because it wants to > record info in stand which doesn't exist. > > Do you have a recommended way to achieve this that has a half-way chance of > working? > -- Target the base directory should be fine; assuming you're at base/: svn merge -c r335607 --record-only ^/head stable/11 From owner-svn-src-stable@freebsd.org Wed Jun 27 22:52:33 2018 Return-Path: Delivered-To: svn-src-stable@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 E0EE61019758; Wed, 27 Jun 2018 22:52:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 93F60773E8; Wed, 27 Jun 2018 22:52:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 753A816D0; Wed, 27 Jun 2018 22:52:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RMqWNM056852; Wed, 27 Jun 2018 22:52:32 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RMqWZW056851; Wed, 27 Jun 2018 22:52:32 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806272252.w5RMqWZW056851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 22:52:32 +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: r335751 - stable/11/etc/mtree X-SVN-Group: stable-11 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/11/etc/mtree X-SVN-Commit-Revision: 335751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 22:52:33 -0000 Author: bdrewery Date: Wed Jun 27 22:52:32 2018 New Revision: 335751 URL: https://svnweb.freebsd.org/changeset/base/335751 Log: MFC r330090: Add 'usr.bin/seq' to tests mtree after r330086 PR: 217149 Modified: stable/11/etc/mtree/BSD.tests.dist Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Wed Jun 27 22:15:50 2018 (r335750) +++ stable/11/etc/mtree/BSD.tests.dist Wed Jun 27 22:52:32 2018 (r335751) @@ -696,6 +696,8 @@ regress.multitest.out .. .. + seq + .. soelim .. stat From owner-svn-src-stable@freebsd.org Wed Jun 27 23:01:04 2018 Return-Path: Delivered-To: svn-src-stable@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 4DCFA1019D66; Wed, 27 Jun 2018 23:01:04 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCBB8776E7; Wed, 27 Jun 2018 23:01:03 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=1314 helo=[10.1.4.66]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1fYA6X-0006er-6t; Wed, 27 Jun 2018 13:03:25 +0000 From: Devin Teske Message-Id: Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r335744 - stable/10/sys/boot/forth Date: Wed, 27 Jun 2018 16:00:55 -0700 In-Reply-To: Cc: Devin Teske , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org To: Kyle Evans References: <201806272122.w5RLM0n4011171@repo.freebsd.org> X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 23:01:04 -0000 > On Jun 27, 2018, at 2:58 PM, Kyle Evans wrote: >=20 > On Wed, Jun 27, 2018 at 4:57 PM, Devin Teske > wrote: >>=20 >> On Jun 27, 2018, at 2:24 PM, Kyle Evans wrote: >>=20 >> On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske = wrote: >>=20 >> Author: dteske >> Date: Wed Jun 27 21:22:00 2018 >> New Revision: 335744 >> URL: https://svnweb.freebsd.org/changeset/base/335744 >>=20 >> Log: >> MFC r335607: check-password.4th(8): Fix manual [in]accuracy >>=20 >> SVN r280384 updated the maximum password length from 16 bytes to 255. = The >> manual was not updated to reflect this. >>=20 >> Sponsored by: Smule, Inc. >>=20 >> Modified: >> stable/10/sys/boot/forth/check-password.4th.8 >>=20 >>=20 >> Hi, >>=20 >> I think this should probably have been supplemented with a = record-only >> merge of r335607 since it has actually been MFC'd, just in the old >> location. I'm not sure how much it matters, though, other than >> reflecting that this (general this; stable/10 commits) really wasn't = a >> direct commit. >>=20 >>=20 >> I kept trying that and kept getting "tree conflict" because it wants = to >> record info in stand which doesn't exist. >>=20 >> Do you have a recommended way to achieve this that has a half-way = chance of >> working? >> -- >=20 > Target the base directory should be fine; assuming you're at base/: >=20 > svn merge -c r335607 --record-only ^/head stable/11 stable/11 ??? --=20 Devin From owner-svn-src-stable@freebsd.org Wed Jun 27 23:02:19 2018 Return-Path: Delivered-To: svn-src-stable@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 D17D91019FBC; Wed, 27 Jun 2018 23:02:19 +0000 (UTC) (envelope-from kevans@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 8433E77A0E; Wed, 27 Jun 2018 23:02:19 +0000 (UTC) (envelope-from kevans@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 655D5184C; Wed, 27 Jun 2018 23:02:19 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RN2JQv062315; Wed, 27 Jun 2018 23:02:19 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RN2J3a062314; Wed, 27 Jun 2018 23:02:19 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272302.w5RN2J3a062314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 23:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335752 - stable/11/tools/build/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/tools/build/mk X-SVN-Commit-Revision: 335752 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 23:02:20 -0000 Author: kevans Date: Wed Jun 27 23:02:18 2018 New Revision: 335752 URL: https://svnweb.freebsd.org/changeset/base/335752 Log: MFC r335467: Don't remove loader.conf(5) when built WITHOUT_FORTH The new stand/ structure installs loader.conf(5) and defaults/loader.conf regardless of interpreter. The only thing gating installation now is MK_BOOT. Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Wed Jun 27 22:52:32 2018 (r335751) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Wed Jun 27 23:02:18 2018 (r335752) @@ -2306,7 +2306,6 @@ OLD_FILES+=usr/share/man/man8/fdcontrol.8.gz .endif .if ${MK_FORTH} == no -OLD_FILES+=usr/share/man/man5/loader.conf.5.gz OLD_FILES+=usr/share/man/man8/beastie.4th.8.gz OLD_FILES+=usr/share/man/man8/brand.4th.8.gz OLD_FILES+=usr/share/man/man8/check-password.4th.8.gz From owner-svn-src-stable@freebsd.org Wed Jun 27 23:04:02 2018 Return-Path: Delivered-To: svn-src-stable@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 936B3101A24A; Wed, 27 Jun 2018 23:04:02 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38ACC77BE9; Wed, 27 Jun 2018 23:04:02 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id C89A8212BA; Wed, 27 Jun 2018 23:04:01 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf0-f42.google.com with SMTP id n24-v6so2753805lfh.3; Wed, 27 Jun 2018 16:04:01 -0700 (PDT) X-Gm-Message-State: APt69E0fY1DNpGdcCERgqe/Rb2+6+RR0WkbT+AD4bx9bgt0T3qe9qMgU pwjIdDcj5duSTzsBsB4BHmoNFUcSZ/O9xmfX8YE= X-Google-Smtp-Source: AAOMgpefPplGAZAOQmsXspaqkXNxdPo3nfIrkfLLnd0Mf4O1/Cca/LpWx4Uk9gjyBIboIO6urYDDNwGC4qL0wC4KKhI= X-Received: by 2002:a19:ce51:: with SMTP id e78-v6mr4829629lfg.99.1530140640336; Wed, 27 Jun 2018 16:04:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:3c0f:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 16:03:39 -0700 (PDT) In-Reply-To: References: <201806272122.w5RLM0n4011171@repo.freebsd.org> From: Kyle Evans Date: Wed, 27 Jun 2018 18:03:39 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r335744 - stable/10/sys/boot/forth To: Devin Teske Cc: Kyle Evans , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 23:04:02 -0000 On Wed, Jun 27, 2018 at 6:00 PM, Devin Teske wrote: > > On Jun 27, 2018, at 2:58 PM, Kyle Evans wrote: > > On Wed, Jun 27, 2018 at 4:57 PM, Devin Teske wrote: > > > On Jun 27, 2018, at 2:24 PM, Kyle Evans wrote: > > On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske wrote: > > Author: dteske > Date: Wed Jun 27 21:22:00 2018 > New Revision: 335744 > URL: https://svnweb.freebsd.org/changeset/base/335744 > > Log: > MFC r335607: check-password.4th(8): Fix manual [in]accuracy > > SVN r280384 updated the maximum password length from 16 bytes to 255. The > manual was not updated to reflect this. > > Sponsored by: Smule, Inc. > > Modified: > stable/10/sys/boot/forth/check-password.4th.8 > > > Hi, > > I think this should probably have been supplemented with a record-only > merge of r335607 since it has actually been MFC'd, just in the old > location. I'm not sure how much it matters, though, other than > reflecting that this (general this; stable/10 commits) really wasn't a > direct commit. > > > I kept trying that and kept getting "tree conflict" because it wants to > record info in stand which doesn't exist. > > Do you have a recommended way to achieve this that has a half-way chance of > working? > -- > > > Target the base directory should be fine; assuming you're at base/: > > svn merge -c r335607 --record-only ^/head stable/11 > > > stable/11 ??? > -- > Devin > s/11/10/ Works just the same. =) From owner-svn-src-stable@freebsd.org Thu Jun 28 01:30:04 2018 Return-Path: Delivered-To: svn-src-stable@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 2AFCB10253D9; Thu, 28 Jun 2018 01:30:04 +0000 (UTC) (envelope-from kevans@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 D07F27E07C; Thu, 28 Jun 2018 01:30:03 +0000 (UTC) (envelope-from kevans@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 B18682F12; Thu, 28 Jun 2018 01:30:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5S1U37a036612; Thu, 28 Jun 2018 01:30:03 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5S1U39v036611; Thu, 28 Jun 2018 01:30:03 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806280130.w5S1U39v036611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 28 Jun 2018 01:30:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335754 - stable/11/stand/libsa X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/stand/libsa X-SVN-Commit-Revision: 335754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 01:30:04 -0000 Author: kevans Date: Thu Jun 28 01:30:03 2018 New Revision: 335754 URL: https://svnweb.freebsd.org/changeset/base/335754 Log: MFC r334878: libsa(3): Correct statement about FS Write-support, name change - jhb implemented UFS write support a little over 16 years ago. - Update the library name while we're here. Modified: stable/11/stand/libsa/libsa.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/libsa/libsa.3 ============================================================================== --- stable/11/stand/libsa/libsa.3 Wed Jun 27 23:44:37 2018 (r335753) +++ stable/11/stand/libsa/libsa.3 Thu Jun 28 01:30:03 2018 (r335754) @@ -24,11 +24,11 @@ .\" .\" $FreeBSD$ .\" -.Dd February 1, 2018 -.Dt LIBSTAND 3 +.Dd February 22, 2018 +.Dt LIBSA 3 .Os .Sh NAME -.Nm libstand +.Nm libsa .Nd support library for standalone executables .Sh SYNOPSIS .In stand.h @@ -402,8 +402,8 @@ except that file creation is not supported, so the mod required. The .Fa flags -argument may be one of O_RDONLY, O_WRONLY and O_RDWR (although no file systems -currently support writing). +argument may be one of O_RDONLY, O_WRONLY and O_RDWR. +Only UFS currently supports writing. .It Xo .Ft int .Fn close "int fd" From owner-svn-src-stable@freebsd.org Thu Jun 28 01:32:40 2018 Return-Path: Delivered-To: svn-src-stable@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 F37AB10258F2; Thu, 28 Jun 2018 01:32:39 +0000 (UTC) (envelope-from kevans@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 CA4DE7E5CF; Thu, 28 Jun 2018 01:32:39 +0000 (UTC) (envelope-from kevans@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 AC8C030D3; Thu, 28 Jun 2018 01:32:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5S1WdR7041406; Thu, 28 Jun 2018 01:32:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5S1WcXR041397; Thu, 28 Jun 2018 01:32:38 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806280132.w5S1WcXR041397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 28 Jun 2018 01:32: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: r335755 - in stable/11/stand: common efi/loader i386/libi386 userboot/userboot X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/stand: common efi/loader i386/libi386 userboot/userboot X-SVN-Commit-Revision: 335755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 01:32:40 -0000 Author: kevans Date: Thu Jun 28 01:32:37 2018 New Revision: 335755 URL: https://svnweb.freebsd.org/changeset/base/335755 Log: MFC r334882, r334884-r334885: loader(8) boot flag <-> environment fixes r334882: stand: Consolidate checking for boot flags driven by environment vars e.g. boot_mute, boot_single, boot_verbose, and friends; we checked for these in multiple places, consolidate into common/ and allow a setting of "NO" for any of these to turn them off. This allows systems with multiple loader.conf(5) or loader.conf(5) overlay systems to easily turn off variables in later processed files by setting it to NO. Reported by: Nick Wolff @ iXsystems Reviewed by: imp r334884: stand: Fix build after r334882 Not sure how this was not caught in Universe. r334885: stand: One more trivial consolidation (setting environment from howto) Modified: stable/11/stand/common/boot.c stable/11/stand/common/bootstrap.h stable/11/stand/common/metadata.c stable/11/stand/efi/loader/bootinfo.c stable/11/stand/efi/loader/main.c stable/11/stand/i386/libi386/bootinfo.c stable/11/stand/userboot/userboot/bootinfo.c Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/common/boot.c ============================================================================== --- stable/11/stand/common/boot.c Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/common/boot.c Thu Jun 28 01:32:37 2018 (r335755) @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); */ #include +#include +#include #include #include "bootstrap.h" @@ -156,6 +158,30 @@ autoboot_maybe() cp = getenv("autoboot_delay"); if ((autoboot_tried == 0) && ((cp == NULL) || strcasecmp(cp, "NO"))) autoboot(-1, NULL); /* try to boot automatically */ +} + +int +bootenv_flags() +{ + int i, howto; + char *val; + + for (howto = 0, i = 0; howto_names[i].ev != NULL; i++) { + val = getenv(howto_names[i].ev); + if (val != NULL && strcasecmp(val, "no") != 0) + howto |= howto_names[i].mask; + } + return (howto); +} + +void +bootenv_set(int howto) +{ + int i; + + for (i = 0; howto_names[i].ev != NULL; i++) + if (howto & howto_names[i].mask) + setenv(howto_names[i].ev, "YES", 1); } static int Modified: stable/11/stand/common/bootstrap.h ============================================================================== --- stable/11/stand/common/bootstrap.h Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/common/bootstrap.h Thu Jun 28 01:32:37 2018 (r335755) @@ -63,6 +63,8 @@ int parse(int *argc, char ***argv, const char *str); /* boot.c */ void autoboot_maybe(void); int getrootmount(char *rootdev); +int bootenv_flags(void); +void bootenv_set(int); /* misc.c */ char *unargv(int argc, char *argv[]); Modified: stable/11/stand/common/metadata.c ============================================================================== --- stable/11/stand/common/metadata.c Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/common/metadata.c Thu Jun 28 01:32:37 2018 (r335755) @@ -31,9 +31,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include +#include #if defined(LOADER_FDT_SUPPORT) #include #endif @@ -100,7 +99,6 @@ md_getboothowto(char *kargs) char *cp; int howto; int active; - int i; /* Parse kargs */ howto = 0; @@ -153,10 +151,7 @@ md_getboothowto(char *kargs) } } - /* get equivalents from the environment */ - for (i = 0; howto_names[i].ev != NULL; i++) - if (getenv(howto_names[i].ev) != NULL) - howto |= howto_names[i].mask; + howto |= bootenv_flags(); #if defined(__sparc64__) if (md_bootserial() != -1) howto |= RB_SERIAL; Modified: stable/11/stand/efi/loader/bootinfo.c ============================================================================== --- stable/11/stand/efi/loader/bootinfo.c Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/efi/loader/bootinfo.c Thu Jun 28 01:32:37 2018 (r335755) @@ -32,9 +32,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include +#include #include #include #include @@ -72,15 +71,9 @@ bi_getboothowto(char *kargs) const char *sw; char *opts; char *console; - int howto, i; + int howto; - howto = 0; - - /* Get the boot options from the environment first. */ - for (i = 0; howto_names[i].ev != NULL; i++) { - if (getenv(howto_names[i].ev) != NULL) - howto |= howto_names[i].mask; - } + howto = bootenv_flags(); console = getenv("console"); if (console != NULL) { Modified: stable/11/stand/efi/loader/main.c ============================================================================== --- stable/11/stand/efi/loader/main.c Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/efi/loader/main.c Thu Jun 28 01:32:37 2018 (r335755) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -549,9 +548,8 @@ main(int argc, CHAR16 *argv[]) } } } - for (i = 0; howto_names[i].ev != NULL; i++) - if (howto & howto_names[i].mask) - setenv(howto_names[i].ev, "YES", 1); + + bootenv_set(howto); /* * XXX we need fallback to this stuff after looking at the ConIn, ConOut and ConErr variables Modified: stable/11/stand/i386/libi386/bootinfo.c ============================================================================== --- stable/11/stand/i386/libi386/bootinfo.c Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/i386/libi386/bootinfo.c Thu Jun 28 01:32:37 2018 (r335755) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "bootstrap.h" #include "libi386.h" #include "btxv86.h" @@ -43,7 +42,6 @@ bi_getboothowto(char *kargs) char *curpos, *next, *string; int howto; int active; - int i; int vidconsole; /* Parse kargs */ @@ -96,10 +94,7 @@ bi_getboothowto(char *kargs) cp++; } } - /* get equivalents from the environment */ - for (i = 0; howto_names[i].ev != NULL; i++) - if (getenv(howto_names[i].ev) != NULL) - howto |= howto_names[i].mask; + howto |= bootenv_flags(); /* Enable selected consoles */ string = next = strdup(getenv("console")); @@ -134,11 +129,8 @@ bi_getboothowto(char *kargs) void bi_setboothowto(int howto) { - int i; - for (i = 0; howto_names[i].ev != NULL; i++) - if (howto & howto_names[i].mask) - setenv(howto_names[i].ev, "YES", 1); + bootenv_set(howto); } /* Modified: stable/11/stand/userboot/userboot/bootinfo.c ============================================================================== --- stable/11/stand/userboot/userboot/bootinfo.c Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/userboot/userboot/bootinfo.c Thu Jun 28 01:32:37 2018 (r335755) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "bootstrap.h" #include "libuserboot.h" @@ -43,7 +42,6 @@ bi_getboothowto(char *kargs) char *curpos, *next, *string; int howto; int active; - int i; int vidconsole; /* Parse kargs */ @@ -96,11 +94,9 @@ bi_getboothowto(char *kargs) cp++; } } - /* get equivalents from the environment */ - for (i = 0; howto_names[i].ev != NULL; i++) - if (getenv(howto_names[i].ev) != NULL) - howto |= howto_names[i].mask; + howto |= bootenv_flags(); + /* Enable selected consoles */ string = next = strdup(getenv("console")); vidconsole = 0; @@ -134,11 +130,8 @@ bi_getboothowto(char *kargs) void bi_setboothowto(int howto) { - int i; - for (i = 0; howto_names[i].ev != NULL; i++) - if (howto & howto_names[i].mask) - setenv(howto_names[i].ev, "YES", 1); + bootenv_set(howto); } /* From owner-svn-src-stable@freebsd.org Thu Jun 28 07:01:57 2018 Return-Path: Delivered-To: svn-src-stable@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 9287C1020E07; Thu, 28 Jun 2018 07:01:57 +0000 (UTC) (envelope-from dteske@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 3E1F18DC2C; Thu, 28 Jun 2018 07:01:57 +0000 (UTC) (envelope-from dteske@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 1F6476DDB; Thu, 28 Jun 2018 07:01:57 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5S71vJD009233; Thu, 28 Jun 2018 07:01:57 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5S71v5o009232; Thu, 28 Jun 2018 07:01:57 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806280701.w5S71v5o009232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 28 Jun 2018 07:01:56 +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: r335758 - stable/10 X-SVN-Group: stable-10 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/10 X-SVN-Commit-Revision: 335758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 07:01:57 -0000 Author: dteske Date: Thu Jun 28 07:01:56 2018 New Revision: 335758 URL: https://svnweb.freebsd.org/changeset/base/335758 Log: Add mergeinfo for MFC r335607 This is a direct commit on stable/10 accounting for missing mergeinfo from SVN r335744. Difficulties with dealing with 'stand' vs 'sys/boot' in MFCs. Reported by: kevans Sponsored by: Smule, Inc. Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@freebsd.org Thu Jun 28 12:55:07 2018 Return-Path: Delivered-To: svn-src-stable@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 E617A1032C4E; Thu, 28 Jun 2018 12:55:06 +0000 (UTC) (envelope-from ed@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 94F297A9F7; Thu, 28 Jun 2018 12:55:06 +0000 (UTC) (envelope-from ed@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 75FE8127CE; Thu, 28 Jun 2018 12:55:06 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SCt6JN088753; Thu, 28 Jun 2018 12:55:06 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SCt6qc088752; Thu, 28 Jun 2018 12:55:06 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201806281255.w5SCt6qc088752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 28 Jun 2018 12:55: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: r335761 - stable/11/usr.sbin/syslogd X-SVN-Group: stable-11 X-SVN-Commit-Author: ed X-SVN-Commit-Paths: stable/11/usr.sbin/syslogd X-SVN-Commit-Revision: 335761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 12:55:07 -0000 Author: ed Date: Thu Jun 28 12:55:05 2018 New Revision: 335761 URL: https://svnweb.freebsd.org/changeset/base/335761 Log: MFC r335565: Still parse messages that don't contain an RFC 3164 timestamp. The changes made in r326573 required that messages always start with an RFC 3164 timestamp. It looks like certain devices, but also certain logging libraries (Python 3's "logging" package) simply don't generate RFC 3164 formatted messages containing a timestamp. Make timestamps optional again. When the timestamp is missing, also assume that the message contains no hostname. The first word of the message likely already belongs to the message payload. PR: 229236 Modified: stable/11/usr.sbin/syslogd/syslogd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/11/usr.sbin/syslogd/syslogd.c Thu Jun 28 11:39:27 2018 (r335760) +++ stable/11/usr.sbin/syslogd/syslogd.c Thu Jun 28 12:55:05 2018 (r335761) @@ -1170,68 +1170,70 @@ parsemsg_rfc3164(const char *from, int pri, char *msg) size_t i, msglen; char line[MAXLINE + 1]; - /* Parse the timestamp provided by the remote side. */ - if (strptime(msg, RFC3164_DATEFMT, &tm_parsed) != - msg + RFC3164_DATELEN || msg[RFC3164_DATELEN] != ' ') { - dprintf("Failed to parse TIMESTAMP from %s: %s\n", from, msg); - return; - } - msg += RFC3164_DATELEN + 1; + /* + * Parse the TIMESTAMP provided by the remote side. If none is + * found, assume this is not an RFC 3164 formatted message, + * only containing a TAG and a MSG. + */ + timestamp = NULL; + if (strptime(msg, RFC3164_DATEFMT, &tm_parsed) == + msg + RFC3164_DATELEN && msg[RFC3164_DATELEN] == ' ') { + msg += RFC3164_DATELEN + 1; + if (!RemoteAddDate) { + struct tm tm_now; + time_t t_now; + int year; - if (!RemoteAddDate) { - struct tm tm_now; - time_t t_now; - int year; + /* + * As the timestamp does not contain the year + * number, daylight saving time information, nor + * a time zone, attempt to infer it. Due to + * clock skews, the timestamp may even be part + * of the next year. Use the last year for which + * the timestamp is at most one week in the + * future. + * + * This loop can only run for at most three + * iterations before terminating. + */ + t_now = time(NULL); + localtime_r(&t_now, &tm_now); + for (year = tm_now.tm_year + 1;; --year) { + assert(year >= tm_now.tm_year - 1); + timestamp_remote.tm = tm_parsed; + timestamp_remote.tm.tm_year = year; + timestamp_remote.tm.tm_isdst = -1; + timestamp_remote.usec = 0; + if (mktime(×tamp_remote.tm) < + t_now + 7 * 24 * 60 * 60) + break; + } + timestamp = ×tamp_remote; + } /* - * As the timestamp does not contain the year number, - * daylight saving time information, nor a time zone, - * attempt to infer it. Due to clock skews, the - * timestamp may even be part of the next year. Use the - * last year for which the timestamp is at most one week - * in the future. - * - * This loop can only run for at most three iterations - * before terminating. + * A single space character MUST also follow the HOSTNAME field. */ - t_now = time(NULL); - localtime_r(&t_now, &tm_now); - for (year = tm_now.tm_year + 1;; --year) { - assert(year >= tm_now.tm_year - 1); - timestamp_remote.tm = tm_parsed; - timestamp_remote.tm.tm_year = year; - timestamp_remote.tm.tm_isdst = -1; - timestamp_remote.usec = 0; - if (mktime(×tamp_remote.tm) < - t_now + 7 * 24 * 60 * 60) + msglen = strlen(msg); + for (i = 0; i < MIN(MAXHOSTNAMELEN, msglen); i++) { + if (msg[i] == ' ') { + if (RemoteHostname) { + msg[i] = '\0'; + from = msg; + } + msg += i + 1; break; - } - timestamp = ×tamp_remote; - } else - timestamp = NULL; - - /* - * A single space character MUST also follow the HOSTNAME field. - */ - msglen = strlen(msg); - for (i = 0; i < MIN(MAXHOSTNAMELEN, msglen); i++) { - if (msg[i] == ' ') { - if (RemoteHostname) { - msg[i] = '\0'; - from = msg; } - msg += i + 1; - break; + /* + * Support non RFC compliant messages, without hostname. + */ + if (msg[i] == ':') + break; } - /* - * Support non RFC compliant messages, without hostname. - */ - if (msg[i] == ':') - break; - } - if (i == MIN(MAXHOSTNAMELEN, msglen)) { - dprintf("Invalid HOSTNAME from %s: %s\n", from, msg); - return; + if (i == MIN(MAXHOSTNAMELEN, msglen)) { + dprintf("Invalid HOSTNAME from %s: %s\n", from, msg); + return; + } } /* Remove the TAG, if present. */ From owner-svn-src-stable@freebsd.org Thu Jun 28 15:30:52 2018 Return-Path: Delivered-To: svn-src-stable@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 8D2BB1012959; Thu, 28 Jun 2018 15:30:52 +0000 (UTC) (envelope-from gjb@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 3E57780B55; Thu, 28 Jun 2018 15:30:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F83213FE6; Thu, 28 Jun 2018 15:30:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SFUqss065214; Thu, 28 Jun 2018 15:30:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SFUqgW065213; Thu, 28 Jun 2018 15:30:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806281530.w5SFUqgW065213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 28 Jun 2018 15:30: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: r335764 - stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Commit-Revision: 335764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 15:30:52 -0000 Author: gjb Date: Thu Jun 28 15:30:51 2018 New Revision: 335764 URL: https://svnweb.freebsd.org/changeset/base/335764 Log: Add an errata entry regarding Bugzilla 228536. PR: 228536 Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jun 28 15:00:18 2018 (r335763) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jun 28 15:30:51 2018 (r335764) @@ -218,6 +218,22 @@ boot had been added; this should have stated &man.ocs.fc.4;. + + + [2018-06-28] An issue had been reported after the + release of &os; 11.2 with x11/nvidia-driver installed from + the upstream package mirrors via &man.pkg.8;. + + Building x11/nvidia-driver from + the &man.ports.7; collection has been reported to resolve + the issue. + + See PR 228536 + for more information. + From owner-svn-src-stable@freebsd.org Thu Jun 28 20:33:13 2018 Return-Path: Delivered-To: svn-src-stable@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 27B94102670A; Thu, 28 Jun 2018 20:33:13 +0000 (UTC) (envelope-from brooks@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 DFAD58CA5C; Thu, 28 Jun 2018 20:33:12 +0000 (UTC) (envelope-from brooks@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 C200717313; Thu, 28 Jun 2018 20:33:12 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SKXCSv040063; Thu, 28 Jun 2018 20:33:12 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SKXCaQ040062; Thu, 28 Jun 2018 20:33:12 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201806282033.w5SKXCaQ040062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 28 Jun 2018 20:33: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: r335774 - stable/11/contrib/smbfs/lib/smb X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/11/contrib/smbfs/lib/smb X-SVN-Commit-Revision: 335774 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 20:33:13 -0000 Author: brooks Date: Thu Jun 28 20:33:12 2018 New Revision: 335774 URL: https://svnweb.freebsd.org/changeset/base/335774 Log: MFC r335641: Fix a stack overflow in mount_smbfs when hostname is too long. The local hostname was blindly copied into the to the nn_name array. When the hostname exceeded 16 bytes, it would overflow. Truncate the hostname to 15 bytes plus a 0 terminator which is the "workstation name" suffix. Use defensive strlcpy() when filling nn_name in all cases. PR: 228354 Reported by: donald.buchholz@intel.com Reviewed by: jpaetzel, ian (prior version) Discussed with: Security Officer (gtetlow) Security: Stack overflow with the hostname. Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15936 Modified: stable/11/contrib/smbfs/lib/smb/ctx.c stable/11/contrib/smbfs/lib/smb/nbns_rq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/smbfs/lib/smb/ctx.c ============================================================================== --- stable/11/contrib/smbfs/lib/smb/ctx.c Thu Jun 28 19:42:10 2018 (r335773) +++ stable/11/contrib/smbfs/lib/smb/ctx.c Thu Jun 28 20:33:12 2018 (r335774) @@ -549,7 +549,9 @@ smb_ctx_resolve(struct smb_ctx *ctx) } nn.nn_scope = ctx->ct_nb->nb_scope; nn.nn_type = NBT_SERVER; - strcpy(nn.nn_name, ssn->ioc_srvname); + if (strlen(ssn->ioc_srvname) > NB_NAMELEN) + return NBERROR(NBERR_NAMETOOLONG); + strlcpy(nn.nn_name, ssn->ioc_srvname, sizeof(nn.nn_name)); error = nb_sockaddr(sap, &nn, &saserver); nb_snbfree(sap); if (error) { @@ -565,7 +567,11 @@ smb_ctx_resolve(struct smb_ctx *ctx) } nls_str_upper(ctx->ct_locname, ctx->ct_locname); } - strcpy(nn.nn_name, ctx->ct_locname); + /* + * Truncate the local host name to NB_NAMELEN-1 which gives a + * suffix of 0 which is "workstation name". + */ + strlcpy(nn.nn_name, ctx->ct_locname, NB_NAMELEN); nn.nn_type = NBT_WKSTA; nn.nn_scope = ctx->ct_nb->nb_scope; error = nb_sockaddr(NULL, &nn, &salocal); Modified: stable/11/contrib/smbfs/lib/smb/nbns_rq.c ============================================================================== --- stable/11/contrib/smbfs/lib/smb/nbns_rq.c Thu Jun 28 19:42:10 2018 (r335773) +++ stable/11/contrib/smbfs/lib/smb/nbns_rq.c Thu Jun 28 20:33:12 2018 (r335774) @@ -74,7 +74,7 @@ nbns_resolvename(const char *name, struct nb_ctx *ctx, if (error) return error; bzero(&nn, sizeof(nn)); - strcpy(nn.nn_name, name); + strlcpy(nn.nn_name, name, sizeof(nn.nn_name)); nn.nn_scope = ctx->nb_scope; nn.nn_type = NBT_SERVER; rqp->nr_nmflags = NBNS_NMFLAG_RD; From owner-svn-src-stable@freebsd.org Thu Jun 28 21:23:06 2018 Return-Path: Delivered-To: svn-src-stable@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 293EA1027AC6; Thu, 28 Jun 2018 21:23:06 +0000 (UTC) (envelope-from brooks@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 CA3F48F143; Thu, 28 Jun 2018 21:23:05 +0000 (UTC) (envelope-from brooks@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 AB84E17B87; Thu, 28 Jun 2018 21:23:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SLN57h067489; Thu, 28 Jun 2018 21:23:05 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SLN5dw067487; Thu, 28 Jun 2018 21:23:05 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201806282123.w5SLN5dw067487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 28 Jun 2018 21:23:05 +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: r335781 - stable/10/contrib/smbfs/lib/smb X-SVN-Group: stable-10 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/10/contrib/smbfs/lib/smb X-SVN-Commit-Revision: 335781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 21:23:06 -0000 Author: brooks Date: Thu Jun 28 21:23:05 2018 New Revision: 335781 URL: https://svnweb.freebsd.org/changeset/base/335781 Log: MFC r335641: Fix a stack overflow in mount_smbfs when hostname is too long. The local hostname was blindly copied into the to the nn_name array. When the hostname exceeded 16 bytes, it would overflow. Truncate the hostname to 15 bytes plus a 0 terminator which is the "workstation name" suffix. Use defensive strlcpy() when filling nn_name in all cases. PR: 228354 Reported by: donald.buchholz@intel.com Reviewed by: jpaetzel, ian (prior version) Discussed with: Security Officer (gtetlow) Security: Stack overflow with the hostname. Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15936 Modified: stable/10/contrib/smbfs/lib/smb/ctx.c stable/10/contrib/smbfs/lib/smb/nbns_rq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/smbfs/lib/smb/ctx.c ============================================================================== --- stable/10/contrib/smbfs/lib/smb/ctx.c Thu Jun 28 21:16:50 2018 (r335780) +++ stable/10/contrib/smbfs/lib/smb/ctx.c Thu Jun 28 21:23:05 2018 (r335781) @@ -549,7 +549,9 @@ smb_ctx_resolve(struct smb_ctx *ctx) } nn.nn_scope = ctx->ct_nb->nb_scope; nn.nn_type = NBT_SERVER; - strcpy(nn.nn_name, ssn->ioc_srvname); + if (strlen(ssn->ioc_srvname) > NB_NAMELEN) + return NBERROR(NBERR_NAMETOOLONG); + strlcpy(nn.nn_name, ssn->ioc_srvname, sizeof(nn.nn_name)); error = nb_sockaddr(sap, &nn, &saserver); nb_snbfree(sap); if (error) { @@ -565,7 +567,11 @@ smb_ctx_resolve(struct smb_ctx *ctx) } nls_str_upper(ctx->ct_locname, ctx->ct_locname); } - strcpy(nn.nn_name, ctx->ct_locname); + /* + * Truncate the local host name to NB_NAMELEN-1 which gives a + * suffix of 0 which is "workstation name". + */ + strlcpy(nn.nn_name, ctx->ct_locname, NB_NAMELEN); nn.nn_type = NBT_WKSTA; nn.nn_scope = ctx->ct_nb->nb_scope; error = nb_sockaddr(NULL, &nn, &salocal); Modified: stable/10/contrib/smbfs/lib/smb/nbns_rq.c ============================================================================== --- stable/10/contrib/smbfs/lib/smb/nbns_rq.c Thu Jun 28 21:16:50 2018 (r335780) +++ stable/10/contrib/smbfs/lib/smb/nbns_rq.c Thu Jun 28 21:23:05 2018 (r335781) @@ -74,7 +74,7 @@ nbns_resolvename(const char *name, struct nb_ctx *ctx, if (error) return error; bzero(&nn, sizeof(nn)); - strcpy(nn.nn_name, name); + strlcpy(nn.nn_name, name, sizeof(nn.nn_name)); nn.nn_scope = ctx->nb_scope; nn.nn_type = NBT_SERVER; rqp->nr_nmflags = NBNS_NMFLAG_RD; From owner-svn-src-stable@freebsd.org Fri Jun 29 16:46:21 2018 Return-Path: Delivered-To: svn-src-stable@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 CD367EFE220; Fri, 29 Jun 2018 16:46:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 6A81772015; Fri, 29 Jun 2018 16:46:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40D9D23707; Fri, 29 Jun 2018 16:46:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5TGkKYE082675; Fri, 29 Jun 2018 16:46:20 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TGkJ6N082672; Fri, 29 Jun 2018 16:46:19 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201806291646.w5TGkJ6N082672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 29 Jun 2018 16:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335798 - in stable/11: sbin/pfctl share/man/man5 sys/netpfil/pf X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: in stable/11: sbin/pfctl share/man/man5 sys/netpfil/pf X-SVN-Commit-Revision: 335798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 16:46:21 -0000 Author: kp Date: Fri Jun 29 16:46:19 2018 New Revision: 335798 URL: https://svnweb.freebsd.org/changeset/base/335798 Log: MFC r335569: pf: Support "return" statements in passing rules when they fail. Normally pf rules are expected to do one of two things: pass the traffic or block it. Blocking can be silent - "drop", or loud - "return", "return-rst", "return-icmp". Yet there is a 3rd category of traffic passing through pf: Packets matching a "pass" rule but when applying the rule fails. This happens when redirection table is empty or when src node or state creation fails. Such rules always fail silently without notifying the sender. Allow users to configure this behaviour too, so that pf returns an error packet in these cases. PR: 226850 Submitted by: Kajetan Staszkiewicz Sponsored by: InnoGames GmbH Modified: stable/11/sbin/pfctl/parse.y stable/11/share/man/man5/pf.conf.5 stable/11/sys/netpfil/pf/pf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/pfctl/parse.y ============================================================================== --- stable/11/sbin/pfctl/parse.y Fri Jun 29 16:07:56 2018 (r335797) +++ stable/11/sbin/pfctl/parse.y Fri Jun 29 16:46:19 2018 (r335798) @@ -79,6 +79,7 @@ static u_int16_t returnicmpdefault = static u_int16_t returnicmp6default = (ICMP6_DST_UNREACH << 8) | ICMP6_DST_UNREACH_NOPORT; static int blockpolicy = PFRULE_DROP; +static int failpolicy = PFRULE_DROP; static int require_order = 1; static int default_statelock; @@ -453,8 +454,8 @@ int parseport(char *, struct range *r, int); %token MINTTL ERROR ALLOWOPTS FASTROUTE FILENAME ROUTETO DUPTO REPLYTO NO LABEL %token NOROUTE URPFFAILED FRAGMENT USER GROUP MAXMSS MAXIMUM TTL TOS DROP TABLE %token REASSEMBLE FRAGDROP FRAGCROP ANCHOR NATANCHOR RDRANCHOR BINATANCHOR -%token SET OPTIMIZATION TIMEOUT LIMIT LOGINTERFACE BLOCKPOLICY RANDOMID -%token REQUIREORDER SYNPROXY FINGERPRINTS NOSYNC DEBUG SKIP HOSTID +%token SET OPTIMIZATION TIMEOUT LIMIT LOGINTERFACE BLOCKPOLICY FAILPOLICY +%token RANDOMID REQUIREORDER SYNPROXY FINGERPRINTS NOSYNC DEBUG SKIP HOSTID %token ANTISPOOF FOR INCLUDE %token BITMASK RANDOM SOURCEHASH ROUNDROBIN STATICPORT PROBABILITY %token ALTQ CBQ CODEL PRIQ HFSC FAIRQ BANDWIDTH TBRSIZE LINKSHARE REALTIME @@ -638,6 +639,20 @@ option : SET OPTIMIZATION STRING { YYERROR; blockpolicy = PFRULE_RETURN; } + | SET FAILPOLICY DROP { + if (pf->opts & PF_OPT_VERBOSE) + printf("set fail-policy drop\n"); + if (check_rulestate(PFCTL_STATE_OPTION)) + YYERROR; + failpolicy = PFRULE_DROP; + } + | SET FAILPOLICY RETURN { + if (pf->opts & PF_OPT_VERBOSE) + printf("set fail-policy return\n"); + if (check_rulestate(PFCTL_STATE_OPTION)) + YYERROR; + failpolicy = PFRULE_RETURN; + } | SET REQUIREORDER yesno { if (pf->opts & PF_OPT_VERBOSE) printf("set require-order %s\n", @@ -2634,7 +2649,12 @@ probability : STRING { ; -action : PASS { $$.b1 = PF_PASS; $$.b2 = $$.w = 0; } +action : PASS { + $$.b1 = PF_PASS; + $$.b2 = failpolicy; + $$.w = returnicmpdefault; + $$.w2 = returnicmp6default; + } | BLOCK blockspec { $$ = $2; $$.b1 = PF_DROP; } ; @@ -5466,6 +5486,7 @@ lookup(char *s) { "drop", DROP}, { "drop-ovl", FRAGDROP}, { "dup-to", DUPTO}, + { "fail-policy", FAILPOLICY}, { "fairq", FAIRQ}, { "fastroute", FASTROUTE}, { "file", FILENAME}, @@ -5930,6 +5951,7 @@ parse_config(char *filename, struct pfctl *xpf) returnicmp6default = (ICMP6_DST_UNREACH << 8) | ICMP6_DST_UNREACH_NOPORT; blockpolicy = PFRULE_DROP; + failpolicy = PFRULE_DROP; require_order = 1; if ((file = pushfile(filename, 0)) == NULL) { Modified: stable/11/share/man/man5/pf.conf.5 ============================================================================== --- stable/11/share/man/man5/pf.conf.5 Fri Jun 29 16:07:56 2018 (r335797) +++ stable/11/share/man/man5/pf.conf.5 Fri Jun 29 16:46:19 2018 (r335798) @@ -498,6 +498,31 @@ For example: .Bd -literal -offset indent set block-policy return .Ed + +.It Ar set fail-policy +The +.Ar fail-policy +option sets the behaviour of rules which should pass a packet but were unable to +do so. This might happen when a nat or route-to rule uses an empty table as list +of targets or if a rule fails to create state or source node. +The following +.Ar block +actions are possible: +.Pp +.Bl -tag -width xxxxxxxx -compact +.It Ar drop +Incoming packet is silently dropped. +.It Ar return +Incoming packet is dropped and TCP RST is returned for TCP packets, +an ICMP UNREACHABLE is returned for UDP packets, +and no response is sent for other packets. +.El +.Pp +For example: +.Bd -literal -offset indent +set fail-policy return +.Ed + .It Ar set state-policy The .Ar state-policy Modified: stable/11/sys/netpfil/pf/pf.c ============================================================================== --- stable/11/sys/netpfil/pf/pf.c Fri Jun 29 16:07:56 2018 (r335797) +++ stable/11/sys/netpfil/pf/pf.c Fri Jun 29 16:46:19 2018 (r335798) @@ -2485,6 +2485,81 @@ pf_send_tcp(struct mbuf *replyto, const struct pf_rule pf_send(pfse); } +static void +pf_return(struct pf_rule *r, struct pf_rule *nr, struct pf_pdesc *pd, + struct pf_state_key *sk, int off, struct mbuf *m, struct tcphdr *th, + struct pfi_kif *kif, u_int16_t bproto_sum, u_int16_t bip_sum, int hdrlen, + u_short *reason) +{ + struct pf_addr * const saddr = pd->src; + struct pf_addr * const daddr = pd->dst; + sa_family_t af = pd->af; + + /* undo NAT changes, if they have taken place */ + if (nr != NULL) { + PF_ACPY(saddr, &sk->addr[pd->sidx], af); + PF_ACPY(daddr, &sk->addr[pd->didx], af); + if (pd->sport) + *pd->sport = sk->port[pd->sidx]; + if (pd->dport) + *pd->dport = sk->port[pd->didx]; + if (pd->proto_sum) + *pd->proto_sum = bproto_sum; + if (pd->ip_sum) + *pd->ip_sum = bip_sum; + m_copyback(m, off, hdrlen, pd->hdr.any); + } + if (pd->proto == IPPROTO_TCP && + ((r->rule_flag & PFRULE_RETURNRST) || + (r->rule_flag & PFRULE_RETURN)) && + !(th->th_flags & TH_RST)) { + u_int32_t ack = ntohl(th->th_seq) + pd->p_len; + int len = 0; +#ifdef INET + struct ip *h4; +#endif +#ifdef INET6 + struct ip6_hdr *h6; +#endif + + switch (af) { +#ifdef INET + case AF_INET: + h4 = mtod(m, struct ip *); + len = ntohs(h4->ip_len) - off; + break; +#endif +#ifdef INET6 + case AF_INET6: + h6 = mtod(m, struct ip6_hdr *); + len = ntohs(h6->ip6_plen) - (off - sizeof(*h6)); + break; +#endif + } + + if (pf_check_proto_cksum(m, off, len, IPPROTO_TCP, af)) + REASON_SET(reason, PFRES_PROTCKSUM); + else { + if (th->th_flags & TH_SYN) + ack++; + if (th->th_flags & TH_FIN) + ack++; + pf_send_tcp(m, r, af, pd->dst, + pd->src, th->th_dport, th->th_sport, + ntohl(th->th_ack), ack, TH_RST|TH_ACK, 0, 0, + r->return_ttl, 1, 0, kif->pfik_ifp); + } + } else if (pd->proto != IPPROTO_ICMP && af == AF_INET && + r->return_icmp) + pf_send_icmp(m, r->return_icmp >> 8, + r->return_icmp & 255, af, r); + else if (pd->proto != IPPROTO_ICMPV6 && af == AF_INET6 && + r->return_icmp6) + pf_send_icmp(m, r->return_icmp6 >> 8, + r->return_icmp6 & 255, af, r); +} + + static int pf_ieee8021q_setpcp(struct mbuf *m, u_int8_t prio) { @@ -3449,68 +3524,8 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm ((r->rule_flag & PFRULE_RETURNRST) || (r->rule_flag & PFRULE_RETURNICMP) || (r->rule_flag & PFRULE_RETURN))) { - /* undo NAT changes, if they have taken place */ - if (nr != NULL) { - PF_ACPY(saddr, &sk->addr[pd->sidx], af); - PF_ACPY(daddr, &sk->addr[pd->didx], af); - if (pd->sport) - *pd->sport = sk->port[pd->sidx]; - if (pd->dport) - *pd->dport = sk->port[pd->didx]; - if (pd->proto_sum) - *pd->proto_sum = bproto_sum; - if (pd->ip_sum) - *pd->ip_sum = bip_sum; - m_copyback(m, off, hdrlen, pd->hdr.any); - } - if (pd->proto == IPPROTO_TCP && - ((r->rule_flag & PFRULE_RETURNRST) || - (r->rule_flag & PFRULE_RETURN)) && - !(th->th_flags & TH_RST)) { - u_int32_t ack = ntohl(th->th_seq) + pd->p_len; - int len = 0; -#ifdef INET - struct ip *h4; -#endif -#ifdef INET6 - struct ip6_hdr *h6; -#endif - - switch (af) { -#ifdef INET - case AF_INET: - h4 = mtod(m, struct ip *); - len = ntohs(h4->ip_len) - off; - break; -#endif -#ifdef INET6 - case AF_INET6: - h6 = mtod(m, struct ip6_hdr *); - len = ntohs(h6->ip6_plen) - (off - sizeof(*h6)); - break; -#endif - } - - if (pf_check_proto_cksum(m, off, len, IPPROTO_TCP, af)) - REASON_SET(&reason, PFRES_PROTCKSUM); - else { - if (th->th_flags & TH_SYN) - ack++; - if (th->th_flags & TH_FIN) - ack++; - pf_send_tcp(m, r, af, pd->dst, - pd->src, th->th_dport, th->th_sport, - ntohl(th->th_ack), ack, TH_RST|TH_ACK, 0, 0, - r->return_ttl, 1, 0, kif->pfik_ifp); - } - } else if (pd->proto != IPPROTO_ICMP && af == AF_INET && - r->return_icmp) - pf_send_icmp(m, r->return_icmp >> 8, - r->return_icmp & 255, af, r); - else if (pd->proto != IPPROTO_ICMPV6 && af == AF_INET6 && - r->return_icmp6) - pf_send_icmp(m, r->return_icmp6 >> 8, - r->return_icmp6 & 255, af, r); + pf_return(r, nr, pd, sk, off, m, th, kif, bproto_sum, + bip_sum, hdrlen, &reason); } if (r->action == PF_DROP) @@ -3529,8 +3544,11 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm action = pf_create_state(r, nr, a, pd, nsn, nk, sk, m, off, sport, dport, &rewrite, kif, sm, tag, bproto_sum, bip_sum, hdrlen); - if (action != PF_PASS) + if (action != PF_PASS && r->rule_flag & PFRULE_RETURN) { + pf_return(r, nr, pd, sk, off, m, th, kif, + bproto_sum, bip_sum, hdrlen, &reason); return (action); + } } else { if (sk != NULL) uma_zfree(V_pf_state_key_z, sk); From owner-svn-src-stable@freebsd.org Sat Jun 30 14:55:48 2018 Return-Path: Delivered-To: svn-src-stable@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 2232E10331AD; Sat, 30 Jun 2018 14:55:48 +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 C1DD680888; Sat, 30 Jun 2018 14:55:47 +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 A06EF116E4; Sat, 30 Jun 2018 14:55:47 +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 w5UEtl5N086423; Sat, 30 Jun 2018 14:55:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UEtlPN086422; Sat, 30 Jun 2018 14:55:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806301455.w5UEtlPN086422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jun 2018 14:55:47 +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: r335817 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 335817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 14:55:48 -0000 Author: kib Date: Sat Jun 30 14:55:47 2018 New Revision: 335817 URL: https://svnweb.freebsd.org/changeset/base/335817 Log: MFC r333087 (by cem): amd64/mp_machdep.c: Fix GCC build after r333059. Noted by: bde Modified: stable/11/sys/amd64/amd64/mp_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/mp_machdep.c Sat Jun 30 12:51:08 2018 (r335816) +++ stable/11/sys/amd64/amd64/mp_machdep.c Sat Jun 30 14:55:47 2018 (r335817) @@ -255,8 +255,8 @@ init_secondary(void) pc->pc_tssp = &common_tss[cpu]; pc->pc_commontssp = &common_tss[cpu]; pc->pc_rsp0 = 0; - pc->pc_pti_rsp0 = ((vm_offset_t)&pc->pc_pti_stack + - PC_PTI_STACK_SZ * sizeof(uint64_t) & ~0xful); + pc->pc_pti_rsp0 = (((vm_offset_t)&pc->pc_pti_stack + + PC_PTI_STACK_SZ * sizeof(uint64_t)) & ~0xful); pc->pc_tss = (struct system_segment_descriptor *)&gdt[NGDT * cpu + GPROC0_SEL]; pc->pc_fs32p = &gdt[NGDT * cpu + GUFS32_SEL]; From owner-svn-src-stable@freebsd.org Sat Jun 30 15:03:07 2018 Return-Path: Delivered-To: svn-src-stable@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 58AEB10335EF; Sat, 30 Jun 2018 15:03:07 +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 E543B80D37; Sat, 30 Jun 2018 15:03:06 +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 C0AC211873; Sat, 30 Jun 2018 15:03:06 +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 w5UF36N0091562; Sat, 30 Jun 2018 15:03:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UF36NP091559; Sat, 30 Jun 2018 15:03:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806301503.w5UF36NP091559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jun 2018 15:03: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: r335818 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 335818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 15:03:07 -0000 Author: kib Date: Sat Jun 30 15:03:06 2018 New Revision: 335818 URL: https://svnweb.freebsd.org/changeset/base/335818 Log: MFC r335503: Update proc->p_ptevents annotation to reflect the actual locking. Modified: stable/11/sys/kern/sys_process.c stable/11/sys/sys/proc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/sys_process.c ============================================================================== --- stable/11/sys/kern/sys_process.c Sat Jun 30 14:55:47 2018 (r335817) +++ stable/11/sys/kern/sys_process.c Sat Jun 30 15:03:06 2018 (r335818) @@ -689,6 +689,7 @@ void proc_set_traced(struct proc *p, bool stop) { + sx_assert(&proctree_lock, SX_XLOCKED); PROC_LOCK_ASSERT(p, MA_OWNED); p->p_flag |= P_TRACED; if (stop) Modified: stable/11/sys/sys/proc.h ============================================================================== --- stable/11/sys/sys/proc.h Sat Jun 30 14:55:47 2018 (r335817) +++ stable/11/sys/sys/proc.h Sat Jun 30 15:03:06 2018 (r335818) @@ -669,7 +669,7 @@ struct proc { */ LIST_ENTRY(proc) p_orphan; /* (e) List of orphan processes. */ LIST_HEAD(, proc) p_orphans; /* (e) Pointer to list of orphans. */ - u_int p_ptevents; /* (c) ptrace() event mask. */ + u_int p_ptevents; /* (c + e) ptrace() event mask. */ uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ From owner-svn-src-stable@freebsd.org Sat Jun 30 15:07:46 2018 Return-Path: Delivered-To: svn-src-stable@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 A0F5E1033C23; Sat, 30 Jun 2018 15:07:46 +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 4C6F7811B1; Sat, 30 Jun 2018 15:07:46 +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 2A33D11875; Sat, 30 Jun 2018 15:07:46 +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 w5UF7kI8091879; Sat, 30 Jun 2018 15:07:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UF7jU7091875; Sat, 30 Jun 2018 15:07:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806301507.w5UF7jU7091875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jun 2018 15:07:45 +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: r335820 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 335820 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 15:07:47 -0000 Author: kib Date: Sat Jun 30 15:07:44 2018 New Revision: 335820 URL: https://svnweb.freebsd.org/changeset/base/335820 Log: MFC r335504: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED. Modified: stable/11/sys/kern/kern_fork.c stable/11/sys/kern/kern_proc.c stable/11/sys/kern/kern_sig.c stable/11/sys/sys/proc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_fork.c ============================================================================== --- stable/11/sys/kern/kern_fork.c Sat Jun 30 15:03:22 2018 (r335819) +++ stable/11/sys/kern/kern_fork.c Sat Jun 30 15:07:44 2018 (r335820) @@ -736,18 +736,6 @@ do_fork(struct thread *td, struct fork_req *fr, struct * but before we wait for the debugger. */ _PHOLD(p2); - if (p1->p_ptevents & PTRACE_FORK) { - /* - * Arrange for debugger to receive the fork event. - * - * We can report PL_FLAG_FORKED regardless of - * P_FOLLOWFORK settings, but it does not make a sense - * for runaway child. - */ - td->td_dbgflags |= TDB_FORK; - td->td_dbg_forked = p2->p_pid; - td2->td_dbgflags |= TDB_STOPATFORK; - } if (fr->fr_flags & RFPPWAIT) { td->td_pflags |= TDP_RFPPWAIT; td->td_rfppwait_p = p2; @@ -771,7 +759,42 @@ do_fork(struct thread *td, struct fork_req *fr, struct procdesc_finit(p2->p_procdesc, fp_procdesc); fdrop(fp_procdesc, td); } - + + /* + * Speculative check for PTRACE_FORK. PTRACE_FORK is not + * synced with forks in progress so it is OK if we miss it + * if being set atm. + */ + if ((p1->p_ptevents & PTRACE_FORK) != 0) { + sx_xlock(&proctree_lock); + PROC_LOCK(p2); + + /* + * p1->p_ptevents & p1->p_pptr are protected by both + * process and proctree locks for modifications, + * so owning proctree_lock allows the race-free read. + */ + if ((p1->p_ptevents & PTRACE_FORK) != 0) { + /* + * Arrange for debugger to receive the fork event. + * + * We can report PL_FLAG_FORKED regardless of + * P_FOLLOWFORK settings, but it does not make a sense + * for runaway child. + */ + td->td_dbgflags |= TDB_FORK; + td->td_dbg_forked = p2->p_pid; + td2->td_dbgflags |= TDB_STOPATFORK; + proc_set_traced(p2, true); + CTR2(KTR_PTRACE, + "do_fork: attaching to new child pid %d: oppid %d", + p2->p_pid, p2->p_oppid); + proc_reparent(p2, p1->p_pptr); + } + PROC_UNLOCK(p2); + sx_xunlock(&proctree_lock); + } + if ((fr->fr_flags & RFSTOPPED) == 0) { /* * If RFSTOPPED not requested, make child runnable and @@ -788,11 +811,6 @@ do_fork(struct thread *td, struct fork_req *fr, struct } PROC_LOCK(p2); - /* - * Wait until debugger is attached to child. - */ - while (td2->td_proc == p2 && (td2->td_dbgflags & TDB_STOPATFORK) != 0) - cv_wait(&p2->p_dbgwait, &p2->p_mtx); _PRELE(p2); racct_proc_fork_done(p2); PROC_UNLOCK(p2); @@ -1078,24 +1096,15 @@ fork_exit(void (*callout)(void *, struct trapframe *), void fork_return(struct thread *td, struct trapframe *frame) { - struct proc *p, *dbg; + struct proc *p; p = td->td_proc; if (td->td_dbgflags & TDB_STOPATFORK) { - sx_xlock(&proctree_lock); PROC_LOCK(p); - if (p->p_pptr->p_ptevents & PTRACE_FORK) { + if ((p->p_flag & P_TRACED) != 0) { /* - * If debugger still wants auto-attach for the - * parent's children, do it now. + * Inform the debugger if one is still present. */ - dbg = p->p_pptr->p_pptr; - proc_set_traced(p, true); - CTR2(KTR_PTRACE, - "fork_return: attaching to new child pid %d: oppid %d", - p->p_pid, p->p_oppid); - proc_reparent(p, dbg); - sx_xunlock(&proctree_lock); td->td_dbgflags |= TDB_CHILD | TDB_SCX | TDB_FSTP; ptracestop(td, SIGSTOP, NULL); td->td_dbgflags &= ~(TDB_CHILD | TDB_SCX); @@ -1103,9 +1112,7 @@ fork_return(struct thread *td, struct trapframe *frame /* * ... otherwise clear the request. */ - sx_xunlock(&proctree_lock); td->td_dbgflags &= ~TDB_STOPATFORK; - cv_broadcast(&p->p_dbgwait); } PROC_UNLOCK(p); } else if (p->p_flag & P_TRACED || td->td_dbgflags & TDB_BORN) { Modified: stable/11/sys/kern/kern_proc.c ============================================================================== --- stable/11/sys/kern/kern_proc.c Sat Jun 30 15:03:22 2018 (r335819) +++ stable/11/sys/kern/kern_proc.c Sat Jun 30 15:07:44 2018 (r335820) @@ -265,7 +265,6 @@ proc_init(void *mem, int size, int flags) mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN | MTX_NEW); mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN | MTX_NEW); cv_init(&p->p_pwait, "ppwait"); - cv_init(&p->p_dbgwait, "dbgwait"); TAILQ_INIT(&p->p_threads); /* all threads in proc */ EVENTHANDLER_DIRECT_INVOKE(process_init, p); p->p_stats = pstats_alloc(); Modified: stable/11/sys/kern/kern_sig.c ============================================================================== --- stable/11/sys/kern/kern_sig.c Sat Jun 30 15:03:22 2018 (r335819) +++ stable/11/sys/kern/kern_sig.c Sat Jun 30 15:07:44 2018 (r335820) @@ -2590,7 +2590,6 @@ ptracestop(struct thread *td, int sig, ksiginfo_t *si) } if ((td->td_dbgflags & TDB_STOPATFORK) != 0) { td->td_dbgflags &= ~TDB_STOPATFORK; - cv_broadcast(&p->p_dbgwait); } stopme: thread_suspend_switch(td, p); Modified: stable/11/sys/sys/proc.h ============================================================================== --- stable/11/sys/sys/proc.h Sat Jun 30 15:03:22 2018 (r335819) +++ stable/11/sys/sys/proc.h Sat Jun 30 15:07:44 2018 (r335820) @@ -655,8 +655,7 @@ struct proc { LIST_HEAD(, mqueue_notifier) p_mqnotifier; /* (c) mqueue notifiers.*/ struct kdtrace_proc *p_dtrace; /* (*) DTrace-specific data. */ struct cv p_pwait; /* (*) wait cv for exit/exec. */ - struct cv p_dbgwait; /* (*) wait cv for debugger attach - after fork. */ + struct cv p_pad_dbgwait; uint64_t p_prev_runtime; /* (c) Resource usage accounting. */ struct racct *p_racct; /* (b) Resource accounting. */ int p_throttled; /* (c) Flag for racct pcpu throttling */ From owner-svn-src-stable@freebsd.org Sat Jun 30 15:09:25 2018 Return-Path: Delivered-To: svn-src-stable@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 91F061033F34; Sat, 30 Jun 2018 15:09:25 +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 2F05E813FE; Sat, 30 Jun 2018 15:09:25 +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 0AC4011878; Sat, 30 Jun 2018 15:09:25 +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 w5UF9OeD092011; Sat, 30 Jun 2018 15:09:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UF9OuU092010; Sat, 30 Jun 2018 15:09:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806301509.w5UF9OuU092010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jun 2018 15:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r335821 - stable/11/sys/compat/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/compat/linux X-SVN-Commit-Revision: 335821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 15:09:25 -0000 Author: kib Date: Sat Jun 30 15:09:24 2018 New Revision: 335821 URL: https://svnweb.freebsd.org/changeset/base/335821 Log: MFC r335505: linux_clone_thread: mark new thread as TDB_BORN. Modified: stable/11/sys/compat/linux/linux_fork.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linux/linux_fork.c ============================================================================== --- stable/11/sys/compat/linux/linux_fork.c Sat Jun 30 15:07:44 2018 (r335820) +++ stable/11/sys/compat/linux/linux_fork.c Sat Jun 30 15:09:24 2018 (r335821) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -349,6 +350,9 @@ linux_clone_thread(struct thread *td, struct linux_clo thread_unlock(td); if (P_SHOULDSTOP(p)) newtd->td_flags |= TDF_ASTPENDING | TDF_NEEDSUSPCHK; + + if (p->p_ptevents & PTRACE_LWP) + newtd->td_dbgflags |= TDB_BORN; PROC_UNLOCK(p); tidhash_add(newtd); From owner-svn-src-stable@freebsd.org Sat Jun 30 20:09:45 2018 Return-Path: Delivered-To: svn-src-stable@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 4EBA5FDA749; Sat, 30 Jun 2018 20:09:45 +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 E93B38B0E9; Sat, 30 Jun 2018 20:09:44 +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 CA2E6148B2; Sat, 30 Jun 2018 20:09:44 +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 w5UK9iG1048662; Sat, 30 Jun 2018 20:09:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UK9iWk048658; Sat, 30 Jun 2018 20:09:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806302009.w5UK9iWk048658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jun 2018 20:09:44 +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: r335825 - in stable/11: . contrib/ofed contrib/ofed/include contrib/ofed/infiniband-diags/build contrib/ofed/libcxgb4 contrib/ofed/libibcm contrib/ofed/libibmad contrib/ofed/libibnetdis... X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11: . contrib/ofed contrib/ofed/include contrib/ofed/infiniband-diags/build contrib/ofed/libcxgb4 contrib/ofed/libibcm contrib/ofed/libibmad contrib/ofed/libibnetdisc contrib/ofed/libibumad ... X-SVN-Commit-Revision: 335825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 20:09:45 -0000 Author: kib Date: Sat Jun 30 20:09:43 2018 New Revision: 335825 URL: https://svnweb.freebsd.org/changeset/base/335825 Log: MFC r335253: Rework ofed build. Sponsored by: Mellanox Technologies Added: stable/11/lib/ofed/ - copied from r335253, head/lib/ofed/ stable/11/usr.bin/ofed/ - copied from r335253, head/usr.bin/ofed/ Deleted: stable/11/contrib/ofed/Makefile stable/11/contrib/ofed/include/Makefile stable/11/contrib/ofed/infiniband-diags/build/ stable/11/contrib/ofed/libcxgb4/Makefile stable/11/contrib/ofed/libibcm/Makefile stable/11/contrib/ofed/libibmad/Makefile stable/11/contrib/ofed/libibnetdisc/Makefile stable/11/contrib/ofed/libibumad/Makefile stable/11/contrib/ofed/libibverbs/Makefile stable/11/contrib/ofed/libibverbs/examples/build/ stable/11/contrib/ofed/libmlx4/Makefile stable/11/contrib/ofed/libmlx5/Makefile stable/11/contrib/ofed/librdmacm/Makefile stable/11/contrib/ofed/librdmacm/examples/build/ stable/11/contrib/ofed/opensm/complib/Makefile stable/11/contrib/ofed/opensm/libopensm/ stable/11/contrib/ofed/opensm/libvendor/Makefile stable/11/contrib/ofed/opensm/opensm/Makefile stable/11/contrib/ofed/usr.bin/ stable/11/contrib/ofed/usr.lib/ Modified: stable/11/Makefile.inc1 stable/11/lib/Makefile stable/11/share/mk/src.libnames.mk stable/11/usr.bin/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Sat Jun 30 19:50:25 2018 (r335824) +++ stable/11/Makefile.inc1 Sat Jun 30 20:09:43 2018 (r335825) @@ -263,9 +263,6 @@ SUBDIR+=sys usr.bin usr.sbin .if ${MK_TESTS} != "no" SUBDIR+= tests .endif -.if ${MK_OFED} != "no" -SUBDIR+=contrib/ofed -.endif # Local directories are built in parallel with the base system directories. # Users may insert a .WAIT directive at the beginning or elsewhere within @@ -2141,24 +2138,16 @@ _lib_libradius= lib/libradius .endif .if ${MK_OFED} != "no" -# -# The OFED libraries are built in four steps -# as reflected below, due to interdependencies. -# -# NOTE: Depending on contrib/ofed/include is only needed for -# the lib32 compat build. -# -_ofed_lib= \ -contrib/ofed/include \ -contrib/ofed/usr.lib/0 \ -contrib/ofed/usr.lib/1 \ -contrib/ofed/usr.lib/2 \ -contrib/ofed/usr.lib/3 +_prebuild_libs+= \ + lib/ofed/libibverbs \ + lib/ofed/libibmad \ + lib/ofed/libibumad \ + lib/ofed/complib \ + lib/ofed/libmlx5 -contrib/ofed/usr.lib/0__L: contrib/ofed/include__L lib/libthr__L -contrib/ofed/usr.lib/1__L: contrib/ofed/usr.lib/0__L -contrib/ofed/usr.lib/2__L: contrib/ofed/usr.lib/1__L -contrib/ofed/usr.lib/3__L: contrib/ofed/usr.lib/2__L +lib/ofed/libibmad__L: lib/ofed/libibumad__L +lib/ofed/complib__L: lib/libthr__L +lib/ofed/libmlx5__L: lib/ofed/libibverbs__L lib/libthr__L .endif .if ${MK_CASPER} != "no" @@ -2169,7 +2158,7 @@ lib/libpjdlog__L: lib/libutil__L lib/libcasper__L: lib/libnv__L lib/liblzma__L: lib/libthr__L -_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib ${_ofed_lib} +_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib .for _DIR in ${LOCAL_LIB_DIRS} .if ${_DIR} == ".WAIT" || (empty(_generic_libs:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile)) _generic_libs+= ${_DIR} Modified: stable/11/lib/Makefile ============================================================================== --- stable/11/lib/Makefile Sat Jun 30 19:50:25 2018 (r335824) +++ stable/11/lib/Makefile Sat Jun 30 20:09:43 2018 (r335825) @@ -83,7 +83,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libopenbsd \ libopie \ libpam \ - ${_libpcap} \ + libpcap \ ${_libpe} \ libpjdlog \ ${_libpmc} \ @@ -156,6 +156,9 @@ SUBDIR_DEPEND_libtacplus= libmd SUBDIR_DEPEND_libulog= libmd SUBDIR_DEPEND_libunbound= ${_libldns} SUBDIR_DEPEND_liblzma= ${_libthr} +.if ${MK_OFED} != "no" +SUBDIR_DEPEND_libpcap= ofed +.endif # NB: keep these sorted by MK_* knobs @@ -271,14 +274,6 @@ _libproc= libproc _librtld_db= librtld_db .endif -.if ${MK_OFED} == "no" -# -# When OFED is enabled libpcap is built as part of -# OFED due to library dependencies -# -_libpcap= libpcap -.endif - .if ${MACHINE_CPUARCH} == "powerpc" _libproc= libproc _librtld_db= librtld_db @@ -293,6 +288,7 @@ _libdl= libdl _libproc= libproc _librtld_db= librtld_db .endif +SUBDIR.${MK_OFED}+= ofed .if ${MK_OPENSSL} != "no" _libmp= libmp Modified: stable/11/share/mk/src.libnames.mk ============================================================================== --- stable/11/share/mk/src.libnames.mk Sat Jun 30 19:50:25 2018 (r335824) +++ stable/11/share/mk/src.libnames.mk Sat Jun 30 20:09:43 2018 (r335825) @@ -480,18 +480,18 @@ LIBZFS_COREDIR= ${OBJTOP}/cddl/lib/libzfs_core LIBZPOOLDIR= ${OBJTOP}/cddl/lib/libzpool # OFED support -LIBCXGB4DIR= ${OBJTOP}/contrib/ofed/libcxgb4 -LIBIBCMDIR= ${OBJTOP}/contrib/ofed/libibcm -LIBIBMADDIR= ${OBJTOP}/contrib/ofed/libibmad -LIBIBNETDISCDIR=${OBJTOP}/contrib/ofed/libibnetdisc -LIBIBUMADDIR= ${OBJTOP}/contrib/ofed/libibumad -LIBIBVERBSDIR= ${OBJTOP}/contrib/ofed/libibverbs -LIBMLX4DIR= ${OBJTOP}/contrib/ofed/libmlx4 -LIBMLX5DIR= ${OBJTOP}/contrib/ofed/libmlx5 -LIBRDMACMDIR= ${OBJTOP}/contrib/ofed/librdmacm -LIBOSMCOMPDIR= ${OBJTOP}/contrib/ofed/opensm/complib -LIBOPENSMDIR= ${OBJTOP}/contrib/ofed/opensm/libopensm -LIBOSMVENDORDIR=${OBJTOP}/contrib/ofed/opensm/libvendor +LIBCXGB4DIR= ${OBJTOP}/lib/ofed/libcxgb4 +LIBIBCMDIR= ${OBJTOP}/lib/ofed/libibcm +LIBIBMADDIR= ${OBJTOP}/lib/ofed/libibmad +LIBIBNETDISCDIR=${OBJTOP}/lib/ofed/libibnetdisc +LIBIBUMADDIR= ${OBJTOP}/lib/ofed/libibumad +LIBIBVERBSDIR= ${OBJTOP}/lib/ofed/libibverbs +LIBMLX4DIR= ${OBJTOP}/lib/ofed/libmlx4 +LIBMLX5DIR= ${OBJTOP}/lib/ofed/libmlx5 +LIBRDMACMDIR= ${OBJTOP}/lib/ofed/librdmacm +LIBOSMCOMPDIR= ${OBJTOP}/lib/ofed/complib +LIBOPENSMDIR= ${OBJTOP}/lib/ofed/libopensm +LIBOSMVENDORDIR=${OBJTOP}/lib/ofed/libvendor LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialog LIBGCOVDIR= ${OBJTOP}/gnu/lib/libgcov Modified: stable/11/usr.bin/Makefile ============================================================================== --- stable/11/usr.bin/Makefile Sat Jun 30 19:50:25 2018 (r335824) +++ stable/11/usr.bin/Makefile Sat Jun 30 20:09:43 2018 (r335825) @@ -306,6 +306,7 @@ SUBDIR.${MK_UTMPX}+= users SUBDIR.${MK_UTMPX}+= who SUBDIR.${MK_SVN}+= svn SUBDIR.${MK_SVNLITE}+= svn +SUBDIR.${MK_OFED}+= ofed # These are normally only handled for build-tools. .if make(clean*) From owner-svn-src-stable@freebsd.org Sat Jun 30 21:36:36 2018 Return-Path: Delivered-To: svn-src-stable@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 11140FDC56E; Sat, 30 Jun 2018 21:36:36 +0000 (UTC) (envelope-from cperciva@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 B4A028DC2F; Sat, 30 Jun 2018 21:36:35 +0000 (UTC) (envelope-from cperciva@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 949D515783; Sat, 30 Jun 2018 21:36:35 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5ULaZuX095517; Sat, 30 Jun 2018 21:36:35 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5ULaZdP095516; Sat, 30 Jun 2018 21:36:35 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201806302136.w5ULaZdP095516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 30 Jun 2018 21:36:35 +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: r335828 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 335828 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 21:36:36 -0000 Author: cperciva Date: Sat Jun 30 21:36:35 2018 New Revision: 335828 URL: https://svnweb.freebsd.org/changeset/base/335828 Log: MFC r335553: Make CLOCK_PROCESS_CPUTIME_ID more accurate by including the current timeslice, matching the behaviour of CLOCK_VIRTUAL and CLOCK_PROF. Modified: stable/11/sys/kern/kern_time.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_time.c ============================================================================== --- stable/11/sys/kern/kern_time.c Sat Jun 30 20:15:11 2018 (r335827) +++ stable/11/sys/kern/kern_time.c Sat Jun 30 21:36:35 2018 (r335828) @@ -278,6 +278,8 @@ get_process_cputime(struct proc *targetp, struct times PROC_STATLOCK(targetp); rufetch(targetp, &ru); runtime = targetp->p_rux.rux_runtime; + if (curthread->td_proc == targetp) + runtime += cpu_ticks() - PCPU_GET(switchtime); PROC_STATUNLOCK(targetp); cputick2timespec(runtime, ats); }